Skip to main content
OlympiadHQ

Browse · MathNet

Print

67th Czech and Slovak Mathematical Olympiad

Czech Republic counting and probability

Problem

Paul is filling the cells of a rectangular table alternately with crosses and circles (he starts with a cross). When the table is filled in completely, he determines his score as where is the sum of squares of the numbers of crosses in all the rows and columns, and is the sum of squares of the numbers of circles in all the rows and columns. Find all possible values of the score for a table.
Solution
Let and denote by the total number of crosses in the table. A row containing crosses and circles contributes to the total score and thus all the rows combined contribute to the total score. Likewise, columns contribute . Hence the total score is always equal to .

---

Alternative solution.

Consider an table filled with arbitrarily many crosses and circles. We show that replacing any circle by a cross increases the score by . Since the score for a table filled with all circles equals and Paul's table contains crosses, the final score will always be equal to .

Consider any cell containing a circle and denote by and the number of crosses in its row and column, respectively. The contribution of this row and column changes from to and the contribution of other rows and columns doesn't change. Since , we are done.
Final answer
134

Techniques

Invariants / monovariantsCounting two ways