Difference between revisions of "2014 Canadian MO Problems/Problem 5"

(Created page with "== Problem == Fix positive integers <math>n</math> and <math>k\ge 2</math>. A list of n integers is written in a row on a blackboard. You can choose a contiguous block of inte...")
 
Line 3: Line 3:
  
 
==Solution==
 
==Solution==
{{Solution}}
+
We aim to prove that given <math>n</math> positive integers written in a row on a blackboard, with <math>k \geq 2</math>, we can achieve a state where at least <math>n - k + 2</math> numbers are simultaneously divisible by <math>k</math> after a finite number of steps. For any number <math>a</math> on the blackboard, consider its value modulo <math>k</math>, denoted <math>a \mod k</math>. Initially, each number <math>a</math> can take one of the values <math>0, 1, \dots, k-1</math> modulo <math>k</math>. The allowed operations, which involve adding or subtracting <math>1</math> to all numbers in a contiguous block, cyclically adjust the residues of the selected block within <math>\{ 0, 1, \dots, k-1 \}</math>. This gives us complete control over the residues of the selected block modulo <math>k</math>.
 +
 
 +
Our goal is to ensure that at least <math>n - k + 2</math> numbers are divisible by <math>k</math>, which corresponds to ensuring that their residues modulo <math>k</math> are <math>0</math>. To do this, note that at every step, we can select a contiguous block of numbers and adjust their residues to reduce the number of distinct residues present among the <math>n</math> numbers. Specifically, we aim to minimize the number of residues different from <math>0</math>. If fewer than <math>n - k + 2</math> numbers are divisible by <math>k</math>, then more than <math>k - 2</math> numbers must have non-zero residues.
 +
 
 +
By the pigeonhole principle, at least one residue <math>r \neq 0</math> must appear more than once. Using our operations, we can choose a contiguous block of numbers containing all occurrences of <math>r</math> (or a subset) and adjust their residues modulo <math>k</math> to reduce <math>r</math> towards <math>0</math>.
 +
 
 +
Repeating this process for different residues as necessary, we can iteratively increase the number of numbers divisible by <math>k</math> until at least <math>n - k + 2</math> numbers satisfy this property. The process must terminate after a finite number of steps because each operation reduces the sum of the absolute values of the residues modulo <math>k</math> across all numbers. Since this sum is non-negative and decreases strictly with each operation, the process cannot continue indefinitely. Therefore, after a finite number of steps, we can ensure that at least <math>n - k + 2</math> numbers are divisible by <math>k</math>.

Revision as of 18:36, 17 November 2024

Problem

Fix positive integers $n$ and $k\ge 2$. A list of n integers is written in a row on a blackboard. You can choose a contiguous block of integers, and I will either add $1$ to all of them or subtract $1$ from all of them. You can repeat this step as often as you like, possibly adapting your selections based on what I do. Prove that after a finite number of steps, you can reach a state where at least $n-k+2$ of the numbers on the blackboard are all simultaneously divisible by $k$.

Solution

We aim to prove that given $n$ positive integers written in a row on a blackboard, with $k \geq 2$, we can achieve a state where at least $n - k + 2$ numbers are simultaneously divisible by $k$ after a finite number of steps. For any number $a$ on the blackboard, consider its value modulo $k$, denoted $a \mod k$. Initially, each number $a$ can take one of the values $0, 1, \dots, k-1$ modulo $k$. The allowed operations, which involve adding or subtracting $1$ to all numbers in a contiguous block, cyclically adjust the residues of the selected block within $\{ 0, 1, \dots, k-1 \}$. This gives us complete control over the residues of the selected block modulo $k$.

Our goal is to ensure that at least $n - k + 2$ numbers are divisible by $k$, which corresponds to ensuring that their residues modulo $k$ are $0$. To do this, note that at every step, we can select a contiguous block of numbers and adjust their residues to reduce the number of distinct residues present among the $n$ numbers. Specifically, we aim to minimize the number of residues different from $0$. If fewer than $n - k + 2$ numbers are divisible by $k$, then more than $k - 2$ numbers must have non-zero residues.

By the pigeonhole principle, at least one residue $r \neq 0$ must appear more than once. Using our operations, we can choose a contiguous block of numbers containing all occurrences of $r$ (or a subset) and adjust their residues modulo $k$ to reduce $r$ towards $0$.

Repeating this process for different residues as necessary, we can iteratively increase the number of numbers divisible by $k$ until at least $n - k + 2$ numbers satisfy this property. The process must terminate after a finite number of steps because each operation reduces the sum of the absolute values of the residues modulo $k$ across all numbers. Since this sum is non-negative and decreases strictly with each operation, the process cannot continue indefinitely. Therefore, after a finite number of steps, we can ensure that at least $n - k + 2$ numbers are divisible by $k$.