2008 IMO Problems/Problem 5
Problem 5
Let and be positive integers with and an even number. Let lamps labelled , , ..., be given, each of which can be either on or off. Initially all the lamps are off. We consider sequences of steps: at each step one of the lamps is switched (from on to off or from off to on).
Let be the number of such sequences consisting of steps and resulting in the state where lamps through are all on, and lamps through are all off.
Let be number of such sequences consisting of steps, resulting in the state where lamps through are all on, and lamps through are all off, but where none of the lamps through is ever switched on.
Determine .
Solution
Let us describe all sequences of switching the lamps as a -dimensional vector , where denotes which lamp was switched on the -th move for .
Let consist of those sequences that contain each of the numbers an odd number of times and each of the numbers an even number of times. Define the following mapping as
\[f(a_1, a_2, \ldots, a_k) = (b_1,b_2,\ldots b_k) : b_i = \left{ \begin{array} a_i, & a_i \in [1, n] \\ a_i-n, & a_i \in [n+1,2n] \end{array} \right .\] (Error compiling LaTeX. Unknown error_msg)