Algorithm based Combinatorics problem IMO style

120 Views Asked by At

The problem is described in the picture, the solution is suppose to be a constructive proof, so you need to find an algorithm that works regardless of stuff like running time. Any help would be grate I can’t solve this and I’ve trying for a whileThe problem

EDIT: My main direction was changing the sign on every raw with negative sum, now every raw is complete and the sum of all entries is nonnegative (since the sum of all raws is now nonnegative)

2

There are 2 best solutions below

2
On BEST ANSWER

If any row or column has a negative sum, choose one and reverse the signs.

Iterate the process.

After each transition, the sum of all the entries in the matrix is increased.

But the absolute value of the entries remains unchanged, hence there are only finitely many possibilities for the total sum.

It follows that the process will eventually terminate.

0
On

Just use the following simple algorithm: In each turn, reverse the signs of a random row or column with negative sum and we'll prove that this procedure ends in finite moves: Note that by using this algorithm the sum of numbers in all of the board will always increase and because this sum is bounded from above and also there are finite possibilities for this sum, our algorithm will stop somewhere and there is the point that the sum of all rows and columns are non-negative.