MathDB
a switch and a light bulb at each square of xa x b board

Source: Portugal OPM 2005 p3

May 19, 2024
combinatorics

Problem Statement

On a board with aa rows and bb columns, each square has a switch and an unlit light bulb. By pressing the switch of a house, the lamp in that house changes state, along with the lamps in the same row and those in the same column (those that are on go out and the that are off light up). For what values of aa and bb is it possible to have just one lamp on, by pressing a series of switches?