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 the 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 .
Step 2 of 3: Define the folding map f from N-sequences to M-sequences
In plain words
Folding every switch of lamp onto lamp adds an even number of switches to lamp , keeping its total count odd while eliminating all switches in .
Detailed analysis
Define by replacing each entry with . Because appears an even number of times in any and appears an odd number of times, the image has each appearing an odd-plus-even = odd number of times and no entries from , so .