Maths Olympiad Prep

Library / /107 of 136

Combinatorics Difficulty 8.3 Shortlist Prove it Hong Kong

In a city the phone numbers should consist of exactly eight digits, and 00 is not allowed as a digit in them (i.e., only 1,2,3,,91, 2, 3, \ldots, 9 may be used). It is required that every two phone numbers either be different in at least two places, or have digits separated by at least two units, in at least one of the eight places. (For example, both 1234567812345678 and 2334567823345678 may be selected if there is no more conflict with other numbers, or both 1234567812345678 and 9234567892345678 may be selected, again if there is no more conflict with other numbers, but at most one of 1234567812345678 and 1234567912345679 may be selected.)
What is the maximum number of phone numbers that can be selected, satisfying the requirements? In how many ways can one select this amount of phone numbers?

Solution

At most 2152336121523361 phone numbers can be selected, and there is only 11 way to select this amount of phone numbers.

Consider the situation when the phone numbers have nn digits instead of 88. We shall prove the following by induction: at most 9n+12\frac{9^n + 1}{2} phone numbers can be selected, and there is a unique way to select the phone numbers, which is to choose all phone numbers whose sum has the same parity as nn.

When n=1n = 1, we can choose at most one phone number from each group
(1,2),(3,4),(5,6),(7,8),(9). (1, 2), (3, 4), (5, 6), (7, 8), (9).
Thus, at most 9+12=5\frac{9+1}{2} = 5 phone numbers can be selected. Clearly, the only way to select 55 phone numbers is to select all odd numbers 1,3,5,7,91, 3, 5, 7, 9.

Assume the case n1n-1 is true. Consider the case nn. For those phone numbers not starting with the digit 99, we can pair them up such that a1a2an\overline{a_1a_2\cdots a_n} and (a1+1)a2an\overline{(a_1+1)a_2\cdots a_n} belong to the same pair if a1=1,3,5,7a_1 = 1, 3, 5, 7. Clearly, at most one phone number can be selected from each pair. Also, for the remaining phone numbers starting with 99, we can remove the digit 99 and regard this as the case n1n-1. By the inductive hypothesis, we can select at most 9n1+12\frac{9^{n-1} + 1}{2} phone numbers from these. In total, we can select at most
89n12+9n1+12=9n+12 \frac{8 \cdot 9^{n-1}}{2} + \frac{9^{n-1} + 1}{2} = \frac{9^n + 1}{2}
phone numbers.

To choose this amount of phone numbers, since we need to select 9n1+12\frac{9^{n-1} + 1}{2} phone numbers from those starting with 99, by the inductive hypothesis, the only way is to select all numbers 9a2an\overline{9a_2\cdots a_n} with a2++ann1(mod2)a_2 + \cdots + a_n \equiv n-1 \pmod 2. Equivalently, this means 9+a2++ann(mod2)9 + a_2 + \cdots + a_n \equiv n \pmod 2.

All numbers 8a2an\overline{8a_2\cdots a_n} with 8+a2++ann(mod2)8 + a_2 + \cdots + a_n \equiv n \pmod 2. Then by using the first pairing, we find that all numbers 7a2an\overline{7a_2\cdots a_n} with 7+a2++ann(mod2)7 + a_2 + \cdots + a_n \equiv n \pmod 2 should be selected, etc. In the same way, we find that all numbers with sum congruent to nn modulo 22 should be selected. Clearly, the condition is satisfied if we only select those numbers. Also, as exactly one number from each pair is selected, there are 9n+12\frac{9^n+1}{2} such phone numbers. This proves the inductive step.

When n=8n=8, we can select at most 98+12=21523361\frac{9^8+1}{2} = 21523361 phone numbers.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.