2^n words - ISL 1987
Source:
September 20, 2010
algorithmcombinatoricsCombinatorics of wordsgraph theoryIMO Shortlist
Problem Statement
There are words of length over the alphabet . Prove that the following algorithm generates the sequence of all these words such that any two consecutive words differ in exactly one digit.(1) ( zeros).(2) Suppose w_{m-1} = a_1a_2 \ldots a_n, a_i \in \{0, 1\}. Let be the exponent of in the representation of as a product of primes, and let . Replace the digit in the word by . The obtained word is .