Wizard_32 wrote:
ISL 1998 C1 wrote:
A rectangular array of numbers is given. In each row and each column, the sum of all numbers is an integer. Prove that each nonintegral number $x$ in the array can be changed into either $\lceil x\rceil $ or $\lfloor x\rfloor $ so that the row-sums and column-sums remain unchanged. (Note that $\lceil x\rceil $ is the least integer greater than or equal to $x$, while $\lfloor x\rfloor $ is the greatest integer less than or equal to $x$.)
Let the array be $m \times n.$ For any given row $\mathcal{R}$, let the elements be $y_i$ for $1 \le i \le n.$ Call the value of $\mathcal{R}$ the number of terms on which we use $\lceil \circ \rceil$ so that the sum of the row remains constant.
A simple calculation shows that $\text{value} (\mathcal{R})=\{y_1\}+\cdots+\{y_n\} \in \mathbb{N}$. From this note that the $0<\text{value}<n.$ The only issue now is to choose which elements in each row so that the choice corresponds with the columns.
To see this, draw a bipartite graph with the rows and the columns as the two parts. Label each vertex by its value.
Consider the simple algorithm of choosing the first point (i.e. the left most point) from the first part, then connecting it to as many vertices as its value. This is possible since $\text{value}<n=\text{no. of vertices in the second part}.$ For instance:
[asy][asy]
unitsize(3);
int y=20; //y-gap between parts
int x=15; //x-gap between dots
draw((0,y)--(0,1), arrow=Arrow(HookHead), blue);
draw((0,y)--(x,1), arrow=Arrow(HookHead), blue);
draw(circle((0,0),1)); label("$2$",(0,-5)); fill(circle((0,0),1));
draw(circle((x,0),1)); label("$1$",(x,-5)); fill(circle((x,0),1));
draw(circle((2x,0),1)); label("$3$",(2x,-5)); fill(circle((2x,0),1));
draw(circle((0,y),1)); label("$2$",(0,5+y)); fill(circle((0,y),1));
draw(circle((x,y),1)); label("$2$",(x,5+y)); fill(circle((x,y),1));
draw(circle((2x,y),1)); label("$1$",(2x,5+y)); fill(circle((2x,y),1));
draw(circle((3x,y),1)); label("$1$",(3x,5+y)); fill(circle((3x,y),1));
[/asy][/asy]
Repeat this procedure for the points in the first part moving from left to right. If the value of a vertex from the second part is achieved at some point, delete it. Keep following this algorithm.
[asy][asy]
unitsize(3);
int y=20; //y-gap between parts
int x=15; //x-gap between dots
draw((0,y)--(0,1), arrow=Arrow(HookHead), blue);
draw((0,y)--(x,1), arrow=Arrow(HookHead), blue);
draw((x,y)--(0,1), arrow=Arrow(HookHead), red);
draw((x,y)--(2x,1), arrow=Arrow(HookHead), red);
draw((2x,y)--(2x,1), arrow=Arrow(HookHead), magenta);
draw((3x,y)--(2x,1), arrow=Arrow(HookHead), purple);
draw(circle((0,0),1)); label("$2$",(0,-5)); fill(circle((0,0),1));
draw(circle((x,0),1)); label("$1$",(x,-5)); fill(circle((x,0),1));
draw(circle((2x,0),1)); label("$3$",(2x,-5)); fill(circle((2x,0),1));
draw(circle((0,y),1)); label("$2$",(0,5+y)); fill(circle((0,y),1));
draw(circle((x,y),1)); label("$2$",(x,5+y)); fill(circle((x,y),1));
draw(circle((2x,y),1)); label("$1$",(2x,5+y)); fill(circle((2x,y),1));
draw(circle((3x,y),1)); label("$1$",(3x,5+y)); fill(circle((3x,y),1));
[/asy][/asy]
This algorithm would stop with each vertex satisfied since the sum of the values of the two parts are equal. Hence we are done. $\square$
From this solution it is clear to me that the algorithm will stop.But then in which cells will we apply the ceiling function???