MathLabs

Problem 5

Let nn and kk be positive integers with k≥nk \ge n and k−nk - n an even number. Let 2n2n lamps labelled 1,2,…,2n1, 2, \ldots, 2n 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 NN be the number of such sequences consisting of kk steps and resulting in the state where lamps 11 through nn are all on, and lamps n+1n+1 through 2n2n are all off. Let MM be the number of such sequences consisting of kk steps, resulting in the state where lamps 11 through nn are all on, and lamps n+1n+1 through 2n2n are all off, but where none of the lamps n+1n+1 through 2n2n is ever switched on. Determine NM\dfrac{N}{M}.
Step 2 of 3: Define the folding map f from N-sequences to M-sequences
In plain words

Folding every switch of lamp n+in+i onto lamp ii adds an even number of switches to lamp ii, keeping its total count odd while eliminating all switches in BB.

f(a1,…,ak)=(b1,…,bk),br={ar,ar∈Aar−n,ar∈Bf(a_1,\ldots,a_k) = (b_1,\ldots,b_k), \qquad b_r = \begin{cases} a_r, & a_r \in A \\ a_r - n, & a_r \in B \end{cases}
Detailed analysis

Define f:N→Mf: \mathcal{N} \to \mathcal{M} by replacing each entry n+i∈Bn+i \in B with i∈Ai \in A. Because n+in+i appears an even number of times in any (a1,…,ak)∈N(a_1,\ldots,a_k) \in \mathcal{N} and ii appears an odd number of times, the image f(a1,…,ak)f(a_1,\ldots,a_k) has each i∈Ai \in A appearing an odd-plus-even = odd number of times and no entries from BB, so f(N)⊆Mf(\mathcal{N}) \subseteq \mathcal{M}.