Dylan has a list of all 25-digit numbers consisting of the digits 1, 2, 3 and 4 such that there are an equal number of 1s and 2s. Robert has a list of all 50-digit numbers consisting of 25 digits 1 and 25 digits 2. Show that the number of numbers on each list is the same.
, 2011
Solution
Let be the set of 25-digit numbers with the same number of 1s and 2s, and let be the set of 50-digit numbers with 25 digits 1 and 25 digits 2. We define a bijection between the two sets.
Let . We define a function on the digits of as follows:
By replacing each digit in with we obtain a number in ; indeed, if equals 3 or 4, then contains the same number of 1s and 2s, and since there are equal numbers of 1s and 2s in , there will be equal numbers of the digit pairs 11 and 22. Hence each number in corresponds to a number in - clearly two different numbers in will correspond to two different numbers in .
Conversely, using the inverse of , we can map each number in to a number in . A similar argument shows that this mapping is well-defined and injective as well, showing that the two sets have an equal number of elements.