Skip to main content
OlympiadHQ

Browse · MathNet

Print

Selected Problems from Open Contests

Estonia counting and probability

Problem

Find all pairs of positive integers for which the grid contains exactly rectangles whose side lengths are odd and whose edges lie on the lines of the grid.
Solution
The grid is formed by horizontal and vertical lines. Number the horizontal lines with numbers from to and the vertical lines with numbers from to . Rectangles with odd side lengths arise if and only if two horizontal lines with different parity and two vertical lines with different parity intersect.

Assume that at least one of the numbers and is even. We can assume without loss of generality that . Then there are exactly odd-numbered and even-numbered horizontal lines and thus there are pairs of lines of different parity. But this means that overall the number of rectangles with odd side lengths is even and cannot be . Therefore and are both odd numbers.

Let now and . Then we have exactly even-numbered and odd-numbered horizontal lines and even-numbered and odd-numbered vertical lines. Overall it is possible to form rectangles with odd side lengths. From we get . The solutions are or (or vice versa). So or (or vice versa).
Final answer
(1,29), (29,1), (5,9), (9,5)

Techniques

Counting two waysColoring schemes, extremal arguments