Telephone numbers in a certain country have six digits. Compute the maximum number telephones can be installed such that any two numbers differ in at least two digits.
This problem is a part of Tessellate S.T.E.M.S. (2019)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The answer is 1 0 5 , that is, 1 0 5 phone numbers can be assigned.
One method for doing so is to use a ‘check digit’, as follows. For each of the 1 0 5 5 -digit strings x 1 x 2 x 3 x 4 x 5 , define digit x 6 so that x 6 ≡ ∑ i = 1 5 x i ( m o d 1 0 ) and produce the 6 -digit phone number x 1 x 2 x 3 x 4 x 5 x 6 . Then, for any pair of distinct 6 -digit strings x 1 x 2 x 3 x 4 x 5 x 6 and y 1 y 2 y 3 y 4 y 5 y 6 constructed in this way, there must be at least one position j with 1 ≤ j ≤ 5 such that a j = b j .
If there are two such j ’s, these two strings differ at those two places.
If there is only one such j , then y 6 − x 6 ≡ ( y 1 + y 2 + y 3 + y 4 + y 5 ) − ( x 1 + x 2 + x 3 + x 4 + x 5 ) ≡ y j − x j ≡ 0 ( m o d 1 0 ) implying that y 6 = x 6 . Hence x 1 x 2 x 3 x 4 x 5 x 6 and y 1 y 2 y 3 y 4 y 5 y 6 are differ at the j th and the 6 th places.
In any case, x 1 x 2 x 3 x 4 x 5 x 6 and y 1 y 2 y 3 y 4 y 5 y 6 must differ in at least two places.
To show that no method can produce a greater number of acceptable phone numbers, observe that among 1 0 5 + 1 distinct phone numbers, two would have agree in their first five places, where only 1 0 5 distinct 5 -digit combinations are possible. These two phone numbers would differ in only in the 6 th place.