Problem

Source: Indian Team Selection Test 2015 Day 3 Problem 3

Tags: combinatorics



There are $n\ge 2$ lamps, each with two states: $\textbf{on}$ or $\textbf{off}$. For each non-empty subset $A$ of the set of these lamps, there is a $\textit{soft-button}$ which operates on the lamps in $A$; that is, upon $\textit{operating}$ this button each of the lamps in $A$ changes its state(on to off and off to on). The buttons are identical and it is not known which button corresponds to which subset of lamps. Suppose all the lamps are off initially. Show that one can always switch all the lamps on by performing at most $2^{n-1}+1$ operations.