Problem 4
Let be an integer. There are cells on a circle, each assigned either 0 or 1, and a rooster occupies one cell. Repeatedly, if the rooster is on a cell assigned 0, it changes that number to 1 and moves to the next cell counterclockwise; if it is on a cell assigned 1, it changes that number to 0 and moves to the cell after next counterclockwise. Prove that after sufficiently many operations, whenever the rooster is on a cell , it goes around the circle exactly three times and stops again at , while every cell has the same number as it had immediately before those three laps.
Step 8 of 8: Conclude the three-lap return
Detailed analysis
Summing the contribution of all cells, the rooster advances a total of positions during each later three-lap block. This is exactly three complete circuits, so if it starts that block at a cell , it stops again at . By Step 7 every cell has also regained its number, which is precisely the required statement after sufficiently many operations.