Find positive integers satisfying the following conditions.
(a) Each positive integer has digits.
(b) Each positive integer only has 7 or 8 in its digits.
(c) Among any two chosen integers, at most half of their corresponding digits are the same.
Solution
We construct the numbers recursively. Firstly, we start from the following integers:
77, 78, 87, 88,
each of which has digits, and at most digit of each pair is the same.
Suppose we have constructed integers with digits 7, 8, each of which has digits, and at most digits of each pair are the same. We construct integers as follows:
where means the integer having the same number of digits as such that each digit is different from that of (and is still 7 or 8). For example, when , we construct
7777, 7878, 8787, 8888, 7788, 7887, 8778, 8877.
Note that each of the integers constructed has digits. Also, one can easily prove by induction that is a permutation of .
* For and (with ), at most of their digits are the same by the inductive hypothesis. Similarly, the same holds for the pair and unless , and for the pair and .
* For and with , the first digits are different, while the last digits are the same.
* For and , the first digits are the same, while the last digits are different.
Thus, in any case, each pair of integers shares at most same digits. Repeating the same procedure, we eventually obtain integers satisfying all the conditions.