Problem 5
The Bank of Bath issues coins with an on one side and a on the other. Harry has of these coins arranged in a line from left to right. He repeatedly performs the following operation: if there are exactly coins showing , then he turns over the th coin from the left; otherwise all coins show and he stops. For example, if , the process starting with is , which stops after three operations. (a) Show that, for each initial configuration, Harry stops after a finite number of operations. (b) For each initial configuration , let be the number of operations before Harry stops. Determine the average value of over all possible initial configurations.
Step 3 of 6: Transform a final head
In plain words
Counting heads from the left becomes counting tails from the right.
Detailed analysis
Now suppose the last coin is . If the first coins contain heads, the total is , so the rule flips the th coin from the left; this is among the first coins. Those coins contain tails, and the selected position is the th tail counted from the right. Thus, after reversing the first positions and exchanging with , the operation is exactly the original rule, with the target changed from all tails to all heads.