I wonder – what is the most efficient solution – fewest number of moves?

]]>For n>1, let f(k,n,m) be the maximum value of d which can be obtained starting with

[n,m,0 … 0] (with k-2 zeros)

and ending with

[0,d,0 … 0]

Define f(1,n,0)=n (equivalent to [n] goes to [n])

Then (except perhaps for some marginal cases where m=1, which never arise staring with [n,0 … 0]

for k>1 f(k,n,0)=f(k,n-1,2)

(for n>0) f(k,n,m) = f(k,n-1,f(k-1,m,0))

and f(k,0,m) = f(k-1,m,0)

It looks like this can be generalized to give any finite number of coins in a finite number of boxes

has the total number of coins bounded.

Every extra place to the left adds an extra level of Knuth up-arrows to the maximum outcome of [n,0,0 … ,0] provided that n is at least 2 – this is the function of the second type of move (see 47 above).

BUT with [1,?,?, … ?] there can be advantages in using the first type of move more often, and the numbers in the left-hand places may not create the full value.

This creates constraints on how useful conserved quantities might be computed.

]]>