Maths Olympiad Prep

Track / Stage 6 / 27 of 400 #1027 of 1964

Problem 1027

National olympiad, first round
Combinatorics Difficulty 6.0 Prove it

2. Can a table of size n×nn \times n be filled with numbers 1,0,1-1,0,1 so that the sums in all rows, all columns, and on the main diagonals are different? The main diagonals of the table are the diagonals drawn from the top left corner of the table to the bottom right and from the top right corner of the table to the bottom left.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

Solution. A total of 2n+22 n+2 sums are considered. Note that each of these sums is an integer, the largest possible sum is n=1+1+1++1n=1+1+1+\ldots+1 ( nn ones), and the smallest sum is n=1+(1)++(1)-n=-1+(-1)+\ldots+(-1) ( nn minus ones). On the segment [n;n][-n ; n], there are exactly 2n+12 n+1 integers. Then, by the Pigeonhole Principle, at least two sums will be equal. Answer: it is impossible.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.