Maths Olympiad Prep

Library / /6 of 6

Combinatorics Difficulty 7.3 National olympiad, round 2 Prove it India

Define an nn-magic square to mean an n×nn \times n square matrix of non-negative integers such that the sum of all the entries in each row and each column is mm for some mNm \in \mathbb{N}. Also define an nn-permutation matrix to mean an n×nn \times n square matrix of n(n1)n(n-1) zeroes and nn ones such that every row and every column of the array contains exactly one 1. Show that every nn-magic square can be written as a sum of finitely many nn-permutation matrices.

Solution

Fix an nNn \in \mathbb{N}. We will prove the following statement by Induction:
P(m)P(m) : Every nn-magic square with common sum mm can be written as a sum of mm permutation matrices.
For the base case, we verify that P(1)P(1) is true. Since all the entries are non-negative integers, the only way possible nn-magic squares with common sum 1 are exactly nn-permutation matrices. Hence, every such matrix can be written as a sum of 11 nn-permutation matrix, i.e., itself.
For the Induction Hypothesis, assume that the statement P(k)P(k) is true for some kNk \in \mathbb{N}. Hence, every nn-magic square with common sum kk can be written as a sum of kk nn-permutation matrices. Consider any nn-magic square A0A_0 with common sum k+1k+1. We will prove that A0A_0 can be written as a sum of an nn-permutation matrix and an nn-magic square A1A_1 with common sum kk.
Consider the graph G=(W,E)\mathcal{G} = (\mathcal{W}, \mathcal{E}) defined as follows. Let R1,R2,,RnR_1, R_2, \dots, R_n be the rows of A0A_0 and let C1,C2,,CnC_1, C_2, \dots, C_n be the columns of A0A_0. Consider W={R1,R2,,Rn}{C1,C2,,Cn}\mathcal{W} = \{R_1, R_2, \dots, R_n\} \cup \{C_1, C_2, \dots, C_n\}. Each of the sets Ri={R1,R2,,Rn}R_i = \{R_1, R_2, \dots, R_n\} and Ci={C1,C2,,Cn}C_i = \{C_1, C_2, \dots, C_n\} are independent sets. For every i,jNni, j \in \mathbb{N}_n, Ri,CjR_i, C_j are connected by an edge if and only if aij>0a_{ij} > 0, where aija_{ij} is the entry of A0A_0 in the ii-th row and jj-th column. Observe that from our definition, G\mathcal{G} is a bipartite graph.
Consider some SRS \subseteq \mathbb{R}. By N(S)N(S), we will denote the set of vertices which are adjacent to some vertex in SS. We will show that N(S)S|N(S)| \ge |S|.
For every edge having an endpoint in SS, label that edge with aija_{ij}. Consider the 'sum' of all such edges. Clearly, for each RiSR_i \in S, the edges incident with RiR_i contribute mm to this total. Hence, the total sum is given by mSm|S|. Now these are edges are a subset of all edges with an endpoint in N(S)N(S). Hence, if we consider a similar such sum for the set N(S)N(S), we get the sum to be mN(S)m|N(S)|. As observed before, we see that mSmN(S)m|S| \le m|N(S)|. Hence, we get that N(S)S|N(S)| \ge |S|. Since SS was any arbitrary subset of R\mathbb{R}, we that this is true for all subsets of R\mathbb{R}.
Since the hypothesis for Hall's Matching Theorem is satisfied, an application of it implies that there exists a matching in the above bipartite graph G\mathcal{G}. Since R=C=n|\mathbb{R}| = |\mathbb{C}| = n, we see that the matching is nothing but a bijective function σ:NnNn\sigma: \mathbb{N}_n \to \mathbb{N}_n where σ(i)\sigma(i) is defined to be the index of the element in C\mathbb{C} which is matched with RiR_i. Note that σ\sigma can also be thought of as a permutation of Nn\mathbb{N}_n. We also know that RiCj={aij},i,jNnR_i \cap C_j = \{a_{ij}\}, \forall i, j \in \mathbb{N}_n. Since σ\sigma is a matching, we know that aiσ(i)>0a_{i\sigma(i)} > 0 for all iNni \in \mathbb{N}_n. Consider the permutation matrix PσP_\sigma where each entry pijp_{ij} is given by
pij={1if j=σ(i)0if otherwise.i,jNn p_{ij} = \begin{cases} 1 & \text{if } j = \sigma(i) \\ 0 & \text{if otherwise.} \end{cases} \quad \forall i, j \in \mathbb{N}_n
Also consider the matrix A1=A0PσA_1 = A_0 - P_\sigma. Note that since aiσ(i)>0,iNna_{i\sigma(i)} > 0, \forall i \in \mathbb{N}_n, every entry of A1A_1 is non-negative. Also observe that since PσP_\sigma is a permutation matrix, the sum of entries in each row and each column reduces by 1. In effect, A1A_1 is still an nn-magic square with common sum k1k-1. This completes the inductive step. Hence by Induction, we see that the statement P(m)P(m) is true for all mNm \in \mathbb{N}. The proof is now complete.

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.