In every cell of a square table is a number. The sum of the largest two numbers in each row is $a$ and the sum of the largest two numbers in each column is b. Prove that $a = b$.
Problem
Source: Tournament of towns 2011
Tags: matrix, combinatorics
04.10.2016 16:31
Consider set $S$ of $2n$ numbers where each number is one of the two largest numbers in its row. Assume that among these numbers in $S$, $x_1$ numbers are in first column, ... , $x_n$ numbers are in last column then $x_1+x_2+\cdots+x_n=2n$. According to the assumption, consider first column, if we pick any two numbers from this column then its sum must less than $b$. Hence, if $A_1$ is the sum of numbers in first column then $A_1(x_1-1) \le \binom{x_1}{2} \cdot b$ or $A_1 \le \frac{x_1b}{2}$. Thus, $$an=\sum_{i=1}^nA_i \le \frac b2 \cdot \sum_{i=1}^nx_i= bn.$$Similarly, $bn \le an$ or $b \le a$. Thus, $a=b$.
04.10.2016 20:12
But if $x_i=1$ for some $i$, your argument doesn't work.
19.01.2022 10:30
12.06.2022 21:46
Let $a_{i,j}$ be the number on the $i$th row (from the top) and $j$th column (from the left). Induct on $n$, with the base case $n=2$ holding because the sum of all entries of the square is $2a=2b$. Let $X$ be the largest entry in the box. Shift the rows and columns so that it is at the bottom left corner. Let $C$ be the assertion that there exists another column, call column $c\ne 1$ with one of the largest two numbers on the first row, and $R$ there exists another row $r\ne 1$ with one of the largest two numbers on the first column. Case 1: $C,R$ both holds. The sum of the two numbers in row 1 is at least $X+t$ where $t$ is on row 1 and column $c$. Thus, $a\ge X+t$. Since $t$ is one of the largest two in column $c$ and the other number is at most $X$, we get $b\le X+t\le a$. Similarly, $b\ge a$, so $b=a$. Case 2: $R$ doesn't hold. (If $C$ doesn't hold we are done by a symmetrical argument) Note $a_{1,t}$ is at most the second largest number of row $j$ for any $2\le t,j\le n$ because $a=a_{1,1}+a_{1,t}=X+a_{1,t} = a_{j,c_j}+a_{j,d_j}$ for some $c_j,d_j$. Since $X\ge \max\{a_{j,c_j},a_{j,d_j}\}$, $a_{1,t}\le \min\{a_{j,c_j},a_{j,d_j}\}$ Consider an alternate matrix $(b_{i,j})_{2\le i,j\le n}$. Initially, $b_{i,j}=a_{i,j}$. For each $t$ that satisfies $a_{1,t}$ is one of the two largest numbers in column $t$, say the two largest numbers are $a_{1,t}, a_{m,t}$. Select $2\le j\le n$ such that $j\ne m$, and reset $b_{j,t}$ to be $\max\{b_{j,t},a_{1,t}\}$. In column $t$, the two largest numbers in $(b_{i,j})$ is equal to $b$. Also, this operation doesn't change the two largest numbers in each row of the matrix $(b_{i,j})$, so the sum of the two largest in each row is $a$. We apply inductive hypothesis on $n-1$ and $b$ to get $a=b$, as needed.