Browse · MathNet
PrintChina Western Mathematical Olympiad
China counting and probability
Problem
There are () coins in a row. If one of the coins is head, select an odd number of consecutive coins (or even 1 coin) with the one in head on the leftmost, and then flip all the selected coins upside down simultaneously. This is a move. No move is allowed if all coins are tails. Suppose coins are heads at the initial stage, determine if there is a way to carry out moves. (posed by Gu Bin)
Solution
The answer is possible.
For any configuration of the coins, we define a corresponding 01-sequence of length as follows: , if the -th coin from the left is head, otherwise, . It is easy to see that the status of the coins has a one-to-one correspondence to such 01-sequences, so in the following, we will consider this sequence model instead.
Initially, the sequence is , denoted by (with consecutive digits of 1). Similarly, , denoted by (with digits of 0). For any 01-sequence with at least a digit "1", consider the following move: locate the first digit "1" from right to left in the sequence, then take the 01-subsequence from left to right starting this "1" of maximal odd length, and change the 01-parity in this subsequence just like flipping the coins in a move. Denote by the total number of moves in the way stated above. We claim: .
When , it is easy to see that , proceed by induction. Assume holds for , i.e., .
For any configuration of the coins, we define a corresponding 01-sequence of length as follows: , if the -th coin from the left is head, otherwise, . It is easy to see that the status of the coins has a one-to-one correspondence to such 01-sequences, so in the following, we will consider this sequence model instead.
Initially, the sequence is , denoted by (with consecutive digits of 1). Similarly, , denoted by (with digits of 0). For any 01-sequence with at least a digit "1", consider the following move: locate the first digit "1" from right to left in the sequence, then take the 01-subsequence from left to right starting this "1" of maximal odd length, and change the 01-parity in this subsequence just like flipping the coins in a move. Denote by the total number of moves in the way stated above. We claim: .
When , it is easy to see that , proceed by induction. Assume holds for , i.e., .
Final answer
possible
Techniques
Invariants / monovariantsGames / greedy algorithmsInduction / smoothing