In a $ 40 \times 50$ array of control buttons, each button has two states: on and off. By touching a button, its state and the states of all buttons in the same row and in the same column are switched. Prove that the array of control buttons may be altered from the all-off state to the all-on state by touching buttons successively, and determine the least number of touches needed to do so.
Problem
Source: Baltic Way 2000 Problem 7
Tags: combinatorics unsolved, combinatorics
02.03.2009 02:48
I think that this is very similar to this problem: http://www.mathlinks.ro/viewtopic.php?p=506217#506217
04.04.2019 07:19
Generalization: Consider an array of size $m\times{n}$. If both $m$, $n$ are odd then minimum number of steps = $min(m,n)$ obtained by touching each of the buttons along the side containing the $min(m,n)$ buttons. If only one of the sides is odd say $m$, then minimum number of steps = $m$, obtained by touching each of the buttons along the side containing m buttons. If both $m$ and $n$ are even, then one way to alter all lights to all-ON state is to touch each of the $m.n$ buttons EXACTLY ONCE sequentially going from one row/column to the next or in any other order. We shall prove that minimum number of steps = $m.n$ when both $m$, $n$ are even. To prove the above claim it suffices to prove that no button can be left untouched. Assume that a button is left untouched, then this button will be turned to ON state only if there are a total of Odd number of touches along the row and column containing this button. So either the row or column (say row) containing this button must have odd number of touches and the other (say column) must have an even number of touches. Let us label this row as $R$ and column as $C$. Now, each button in $C$ needs to have Odd number of touches in total, so each row of the matrix obtained after excluding $C$ and $R$ must have an Odd number of touches. This matrix has the dimensions of $m-1\times{n-1}$, so total number of touches in this matrix must be odd $-- (1)$ Now, each button in $R$ needs to have Odd number of touches in total, so each column of the matrix obtained after excluding $C$ and $R$ must have an even number of touches, so total number of touches in this matrix must be even $-- (2)$ From $(1)$ and $(2)$ we have a contradiction.