Suppose you are given 4 pairs of coins of different diameters and you have in front of you drawn 3 squares , , on a piece of paper anyway.
In the first two squares , and , you construct 2 towers of 4 coins where each coin is placed on a coin with a bigger diameter.
All coins in tower A are up , all coins in tower B are down. You play a game such that starting from this you must invert it , all coins in A should be down and all coins in B should be up by a sequence of moves which has anyway the following rules.
Anyway , consider a move to respect the following 2 characteristics:
What is the minimum number of moves necessary for you to swap the 2 towers of coins ?
Insert your number as that number of minimum moves necessary.
And , for having a bonus (which almost necessary imposes itself) can you find a general understanding of what is the smallest number of moves necessary to made for any equal number of coins placed in the two towers at the beginning of the game anyway ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
As the coins accumulate, they naturally form "double towers," or towers with layers of two coins of equal radius. We know from the traditional tower of Hanoi game that the minimum number of moves to transfer a tower with n coins of different radii is 2 n − 1 , so the minimum number of moves to transfer a double tower with 2 n coins is 2 ( 2 n − 1 ) . With this understanding, we can find a recurrence relation that gives the minimum number of moves to construct a double tower with 2 n coins. To swap towers, we construct a double tower on S 3 and then deconstruct it in mirror reverse order (i.e., by replacing moves to or from S 1 with moves from or to S 2 and performing the moves in reverse).
Suppose A and B have n coins each, and label the coins in increasing order of radius a 1 , … , a n , b 1 , … , b n . Let u n and v n denote the minimum number of moves to combine A and B into a double tower of 2 n coins on S 2 and S 3 , respectively, and let w n denote the minimum number of moves to swap A and B . To combine A and B on S 2 , we must
The minimum number of moves for this process is u n = v n − 1 + 1 + 2 ( 2 n − 1 − 1 ) . To combine A and B on S 3 , we can
We also could have started by constructing the double tower on a n , but that would not have changed the minimum number of moves, which is v n = u n − 1 + 1 + 2 ( 2 n − 1 − 1 ) + 1 + 2 ( 2 n − 1 − 1 ) . To swap A and B , we can
Again, we could have started by building the double tower on top of a n , but that would not change the minimum number of moves for these steps, which is u n + 1 + 2 ( 2 n − 1 ) . Whatever sequence of moves we use for the three steps above, we can move b n to S 1 and then apply the mirror reverse sequence to reconstruct the towers in swapped positions. The minimum number of moves to swap the towers is then w n = 2 [ u n − 1 + 1 + 2 ( 2 n − 1 − 1 ) ] + 1 . From these recurrence relations and the initial conditions u 1 = 1 , v 1 = 2 , and w 1 = 3 , we can compute u n , v n , and w n for all n . The first few values are given in the following table.
When n = 4 , the minimum number of moves to swap the towers is w 4 = 5 9 .