Skip to main content
OlympiadHQ

Browse · MathNet

Print

USA IMO 2003

United States 2003 counting and probability

Problem

At the vertices of a regular hexagon are written six nonnegative integers whose sum is . Bert is allowed to make moves of the following form: he may pick a vertex and replace the number written there by the absolute value of the difference between the numbers written at the two neighboring vertices. Prove that Bert can make a sequence of moves, after which the number appears at all six vertices.
Solution
Define the sum and maximum of a position to be the sum and maximum of the six numbers at the vertices. We will show that from any position in which the sum is odd, it is possible to reach the all-zero position. Our strategy alternates between two steps:

a) from a position with odd sum, move to a position with exactly one odd number; b) from a position with exactly one odd number, move to a position with odd sum and strictly smaller maximum, or to the all-zero position.

Note that no move will ever increase the maximum, so this strategy is guaranteed to terminate, because each step of type (b) decreases the maximum by at least one, and it can only terminate at the all-zero position. It suffices to show how each step can be carried out.

First, consider a position with odd sum. Then either or is odd; assume without loss of generality that is odd. If exactly one of and is odd, say is odd, we can make the sequence of moves where a letter or number in boldface represents a move at that vertex, and moves that do not affect each other have been written as a single move for brevity. Hence we can reach a position with exactly one odd number. Similarly, if are all odd, then the sequence of moves brings us to a position with exactly one odd number. Thus we have shown how to carry out step (a).

Now assume that we have a position with odd and all other numbers even. We want to reach a position with smaller maximum. Let be the maximum. There are two cases, depending on the parity of .

In this case, is even, so one of is the maximum. In particular, . We claim after making moves at , and in that order, the sum is odd and the maximum is less than . Indeed, the following \begin{array}{r@{\;}c@{\;}l@{\quad}l@{\quad}l} \begin{array}{cccc} & & \mathbf{1} & \\ & \mathbf{0} & \mathbf{0} & \\ \mathbf{1} & \mathbf{0} & \mathbf{0} & \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \end{array} & \rightarrow & \begin{array}{c} \mathbf{1} \\ \mathbf{0} \\ \mathbf{1} \\ \mathbf{0} \\ \mathbf{0} \end{array} & \rightarrow & \begin{array}{cccc} \mathbf{1} & \mathbf{1} & \mathbf{0} & \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \\ \mathbf{1} & \mathbf{0} & \mathbf{1} & \\ \mathbf{0} & \mathbf{1} & \mathbf{1} & \\ \mathbf{0} & \mathbf{0} & \mathbf{1} & \end{array} & \rightarrow \\ & & \begin{array}{cccc} \mathbf{1} & \mathbf{1} & \mathbf{1} & \\ \mathbf{0} & \mathbf{1} & \mathbf{1} & \\ \mathbf{1} & \mathbf{1} & \mathbf{1} & \\ \mathbf{0} & \mathbf{1} & \mathbf{1} & \\ \mathbf{1} & \mathbf{1} & \mathbf{1} & \end{array} & \rightarrow & \begin{array}{c} \mathbf{1} \\ \mathbf{0} \\ \mathbf{1} \\ \mathbf{0} \\ \mathbf{1} \end{array} & \pmod{2}. \end{array} shows how the numbers change in parity with each move. Call this new position The sum is odd, since there are five odd numbers. The numbers , , , , are all less than , since they are odd and is even, and the maximum can never increase. Also, . So the maximum has been decreased.

In this case, is odd, so and the other numbers are all less than . If , then we make moves at , , , and , in that order. The sequence of positions is \begin{array}{r@{\;}c@{\;}l} \begin{array}{cccc} & & \mathbf{1} & \\ & \mathbf{0} & \mathbf{0} & \\ \mathbf{1} & \mathbf{0} & \mathbf{0} & \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \end{array} & \rightarrow & \begin{array}{c} \mathbf{1} \\ \mathbf{0} \\ \mathbf{1} \\ \mathbf{0} \end{array} & \rightarrow \\ & & \begin{array}{cccc} \mathbf{1} & \mathbf{0} & \mathbf{0} & \\ \mathbf{0} & \mathbf{0} & \mathbf{1} & \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \end{array} & \rightarrow \\ & & \begin{array}{cccc} \mathbf{0} & \mathbf{1} & \mathbf{0} & \\ \mathbf{1} & \mathbf{0} & \mathbf{0} & \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \end{array} & \pmod{2}. \end{array} Call this new position The sum is odd, since there is exactly one odd number. As before, the only way the maximum could not decrease is if ; but this is impossible, since because . Hence we have reached a position with odd sum and lower maximum. If , then we apply a similar argument, interchanging with and with . If , then we can reach the all-zero position by the following sequence of moves: (Here represents zero, not any even number.) Hence we have shown how to carry out a step of type (b), proving the desired result. The problem statement follows since is odd.

---

Alternative solution.

(By Richard Stong) We will show that if there is a pair of opposite vertices with odd sum (which of course is true if the sum of all the vertices is odd), then we can reduce to a position of all zeros. Focus on such a pair with smallest possible . We will show we can always reduce this smallest maximum of a pair of opposite vertices with odd sum or reduce to the all-zero position. Because the smallest maximum takes nonnegative integer values, we must be able to achieve the all-zero position. To see this assume without loss of generality that and consider an arc of the position a^{x \ y}^{* *}d Consider updating and alternately, starting with . If , then in at most two updates we reduce . Thus, we can repeat this alternate updating process and we must eventually reach a point when , and hence this will be true from then on. Under this alternate updating process, the arc of the hexagon will eventually enter a unique cycle of length four modulo in at most one update. Indeed, we have and or and Further note that each possible parity for and will occur equally often. Applying this alternate updating process to both arcs and of we can make the other four entries be at most and control their parity. Thus we can create a position with odd and . In fact, we can have , as claimed, unless both arcs enter a cycle modulo where the values congruent to modulo are always exactly . More precisely, because the sum of and is odd, one of them is not congruent to and so has its value strictly less than . Thus both arcs must pass through the state (modulo , this is either or ) in a cycle of length four. It is easy to check that for this to happen, . Therefore, we can achieve the position From this position, the sequence of moves completes the task.

---

Alternative solution.

(By Tiankai Liu) In the beginning, because is odd, either or is odd; assume without loss of generality it is the former. Perform the following steps repeatedly.

a. In this case we assume that are all nonzero. Suppose without loss of generality that . Perform the sequence of moves which decreases the sum of the numbers in positions while keeping that sum odd.

b. In this case we assume that exactly one among is zero. Assume without loss of generality that . Then, because is odd, must be strictly greater than . Therefore, , and the sequence of moves decreases the sum of the numbers in positions while keeping that sum odd.

c. In this case we assume that exactly two among are zero. Assume without loss of generality that . Then perform the sequence of moves By repeatedly applying step (a) as long as it applies, then doing the same for step (b) if necessary, and finally applying step (c) if necessary, can eventually be achieved.

Techniques

Invariants / monovariantsGames / greedy algorithms