Problem

Source: 2022 Dutch IMO TST 2.3

Tags: combinatorics



There are $15$ lights on the ceiling of a room, numbered from $1$ to $15$. All lights are turned off. In another room, there are $15$ switches: a switch for lights $1$ and $2$, a switch for lights $2$ and $3$, a switch for lights $3$ en $4$, etcetera, including a sqitch for lights $15$ and $1$. When the switch for such a pair of lights is turned, both of the lights change their state (from on to off, or vice versa). The switches are put in a random order and all look identical. Raymond wants to find out which switch belongs which pair of lights. From the room with the switches, he cannot see the lights. He can, however, flip a number of switches, and then go to the other room to see which lights are turned on. He can do this multiple times. What is the minimum number of visits to the other room that he has to take to determine for each switch with certainty which pair of lights it corresponds to?