Skip to main content
OlympiadHQ

Browse · MathNet

Print

Silk Road Mathematics Competition

counting and probability

Problem

An integer is assigned to each unit square of a finite set of unit squares on an infinite chessboard such that the sum of numbers lying on each row as well as each column is divisible by . Prove that every number can be replaced by some number divisible by such that and the sums of rows and columns remain unchanged.
Solution
Consider any number which is not divisible by . Then there exists a number not divisible by lying on the same row with . In turn, there exists a number not divisible by lying on the same column with . We continue this process till we first reach a number which lies on the same row or column with some number , .

Take as a maximal number with this property. One easily sees that the collection of numbers includes an even number of elements.

For each number , set .

Take with , and replace with the closest integer number which is divisible by . By definition, . Set and replace the remaining elements in as follows: if is even, replace by ; if is odd, replace by .

It can be easily seen that after these replacements the number of integers not divisible by is decreased at least by one, the sums of rows and columns are unchanged, and if then . Thus, we can reach a desired configuration repeating this procedure finitely many times.

Techniques

Invariants / monovariantsInduction / smoothingDivisibility / Factorization