Light bulbs in a high dimensional grid

428 Views Asked by At

Consider a $n \times n \times n$ array of light bulbs. In each step, one can flip lights from on to off and off to on along a 1d row in the $x$-, $y$- or $z$-axis.

Suppose one has a configuration that can switch all the lights off. Show that one can do so in $3\text{(# of lights that are on)}/n$ steps.

More generally, for a $d$-dimensional array of light bulbs with width $n$, if one again can flip a 1d row of lights, show that one can switch off in $d\text{(# of lights that are on)}/n$ steps.

===

I’m 90% confident that this is true from examples. Note that this bound is tight in the sense that for all $d$, there exists $n$ and a configuration where one needs to perform $d\text{(# of lights that are on)}/n$ steps. For example, when $n=2$ and 2 lights are on are at $0^d$ and $1^d$, one needs to perform $d$ flips. There are other examples too.