Skip to main content
OlympiadHQ

Browse · MathNet

Print

International Mathematical Olympiad

China counting and probability

Problem

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 the ratio .
Solution
Lemma For any positive integer , call a -element array which consists of () "good" if there are odd '0's in it. Prove that there are "good" arrays.

Proof: In fact, for the same , when is 0 or 1, the parity of 0s in these two arrays is different, so only one of the arrays is "good". There are arrays in all, we can match one array to the other, there are only of them are different. Only one of these two arrays is "good". So of all the possible arrays, only half of them are "good". The lemma is proved.

Let be the set 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 set 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.

For any in , match all in to if "a's elements are the same as 's (mod )" (For example, take , if , then it could correspond to , , etc). Since in , the number of must be odd; in , the number of of must be odd, and the number of must be even.

For any , if number of 'i's in is , then only need to satisfy: for the positions taken by in the corresponding positions taken by or in , and the number of 'i's is odd (thus the number of is even). By lemma and the product principle, there are 'a's corresponding to , but only one of (letting every position of be the remainder when divided by ) in corresponds to each in .

Therefore , i.e. .

Obviously (because the sequence ), so
Final answer
2^(k-n)

Techniques

Counting two waysRecursion, bijection