Maths Olympiad Prep

Library / /13 of 14

Combinatorics Difficulty 6.9 National olympiad Prove it Bulgaria

Find all pairs of positive integers (m,n)(m, n), mnm \le n, such that there exists an m×nm \times n table of zeros and ones which satisfy the following condition:
If there is a zero (resp. one) in a cell, then the number of the zeros (resp. ones) in the row of that cell is equal to the number of the zeros (resp. ones) in the column of the cell.

Solution

Denote by apqa_{pq} the number in the pp-th row and qq-th column, by A0(p)A_0(p) (resp. A1(p)A_1(p)) the number of the zeros (resp. ones) in the pp-th row, and by B0(q)B_0(q) (resp. B1(q)B_1(q)) the number of the zeros (resp. ones) in the qq-th column.

Lemma. If exactly three of the numbers aika_{ik}, aila_{il}, ajka_{jk} and ajla_{jl}, iji \neq j, klk \neq l, are the same, then m=nm = n.

Proof. We can assume without loss of generality that aik=ail=ajk=0a_{ik} = a_{il} = a_{jk} = 0 and ajl=1a_{jl} = 1. Then ajl=1a_{jl} = 1 implies that A1(j)=B1(l)A_1(j) = B_1(l) and it follows from aik=ail=ajk=0a_{ik} = a_{il} = a_{jk} = 0 that A0(j)=B0(k)=A0(i)=B0(l)A_0(j) = B_0(k) = A_0(i) = B_0(l). Hence A1(j)=B1(l)A_1(j) = B_1(l) and A0(j)=B0(l)A_0(j) = B_0(l), which means that m=nm = n.

An example of a square table (m=nm = n) is the all-zero table (or the table with zeros at the main diagonal and ones in the remaining cells).

Assume now that n>mn > m. It is clear that any permutation of the rows or the columns does not affect the required property. Thus we can assume that the first row begins with its ones and continues with its zeros, and similarly for the first column: it begins with its ones and continues with its zeros. Then a11=1a_{11} = 1 shows that the ones in the first row are as much as the ones in the first column. Denote this number by tt. Now it follows from the Lemma that apq=1a_{pq} = 1 for every p,q=1,2,,tp, q = 1, 2, \dots, t.

Case 1. Let n>m=tn > m = t. Then n>tn > t and apq=0a_{pq} = 0 for every q>tq > t. Therefore nt=tn - t = t, i.e. n=2t=2mn = 2t = 2m.

Case 2. Let n>m>tn > m > t. If apq=1a_{pq} = 1 for some p>tp > t and 1qt1 \le q \le t then the Lemma implies that m=nm = n (since apq=a11=a1q=1a_{pq} = a_{11} = a_{1q} = 1 and ap1=0a_{p1} = 0). Therefore apq=0a_{pq} = 0 for p>tp > t and 1qt1 \le q \le t. Analogously apq=0a_{pq} = 0 for q>tq > t and 1pt1 \le p \le t.

Assume that apq=0a_{pq} = 0 for some p>tp > t and q>tq > t. Again the Lemma shows that m=nm = n, a contradiction. Hence apq=1a_{pq} = 1 for every p>tp > t and q>tq > t. Now amn=1a_{mn} = 1 gives mt=ntm - t = n - t, i.e. m=nm = n, a contradiction.

We finally obtain that m=nm = n or n=2mn = 2m. For the last case, an example is a table which consists of two m×mm \times m tables, one of them having only zeros, and the other only ones.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.