This post follows from Part 5.
In this post, we shall explore another method of colouring, more often known as assigning weights. Commonly in such questions, we tend to involve a lot since the common technique of taking product and sum gives us lots of additional information. I would advise the reader to take special care as to the motivation behind finding a suitable invariance sum or product as it would help in the exercise in the next post.
(IMO shortlist 2005) There are markers, each with one side white and the other side black, aligned in a row with their white sides up. At each step, if possible, we choose a marker with the white side up (but not one of the outermost markers), remove it, and reverse the two neighbouring markers. Prove that one can reach a configuration with only two markers left if and only if .
Solution: Just playing around with small examples can lead to one trivial observation: the parity of the number of black markers remains unchanged during the game. Hence if only two markers are left, they must have the same colour.
We can see that we can assign "weights". Well, here the best thing to encode would be the number of black markers. Remember that for some provides lots of information by encoding the parity(when we consider sums), let us define assign to a white marker with black markers to its left the value . We only assign values to the white markers. Denote as the sum of all numbers assigned to the white markers.
Consider an arbitrary white marker with both of its neighbours initially white and with black markers to its left. We perform an operation on that marker and see how it affects . Clearly, if we turn both of its neighbouring markers black and remove it, then decreases by . Therefore, we have just shown that is invariant.
If the game ends with two black markers then and if it ends with two white markers then . .
To show that if we start with markers and satisfies the conditions. By removing the leftmost white markers (that do not violate the conditions), we obtain a row of markers. By working backwards, we can reach or white markers. We are done with the former and for the latter we can reach black markers. □
The next post will be tomorrow! :)