Skip to main content
OlympiadHQ

Browse · MathNet

Print

Austrian Mathematical Olympiad

Austria counting and probability

Problem

The numbers and are written on a blackboard. The following operation is executed: Two numbers are chosen, both are erased and replaced by the absolute value of their difference. This operation is repeated until there is only one number left on the blackboard.

a) Show that can be the final number on the blackboard.

b) Show that cannot be the final number on the blackboard.
Solution
(a) Let us first choose the following pairs of numbers: . The absolute value of the difference within each of these pairs is . After applying the operation for each of these pairs, the number and times the number remain on the blackboard. Now we execute the given operation times with pairs of the form . Then the number and times the number remain on the blackboard. As and , we end up with as the final number on the board after additional operations, regardless of the pairs we pick at each step.

(b) We prove a more general statement: The final remaining number on the blackboard cannot be even. As we obtain that the parity of the sum of all numbers on the board is an invariant throughout the game. At the beginning, the sum of the numbers on the blackboard is an odd number. Therefore, the final number on the board must be odd as well. In particular, cannot be the final number on the blackboard.

Techniques

Invariants / monovariantsGames / greedy algorithms