Consider a square n× n array of lights (see Figure 5.1). There is one switch corresponding to each row and each column (i.e., 2n switches). Throwing a switch changes the state of all the lights in the corresponding row or column. We now consider the problem of setting the switches so as to maximize the number of lights that are on, starting from an arbitrary initial on/off configuration of the ...