In a $n \times n$ board there are total $n^2$ bulbs. If one touches any bulb the bulbs in that row and column is off.

108 Views Asked by At

At first all bulbs were on. At each touch the state of bulbs in that row and column is changed. If it is off the after touch it is on and if it is on then after touch it is on.

Find the minimum number of touches to off all the bulbs?

I am able to prove that the minimum number of touches if $n$ is odd is $n $. If one touches all the bulbs in top row then in that row there will be odd number of touches so all bulbs in that row will be off and as each column is touched one time bulbs win each column will also be off. But when $n $ is even the minimum number of touches is $n^2$. But i can't prove it

1

There are 1 best solutions below

7
On

For even $n$, for each bulb $B$ consider the parity of the number of bulbs that are on among the bulbs that change state when you touch $B$. Originally this parity is odd, in the end it should be even, and it only changes when you touch $B$. Thus you need to touch each bulb at least once.