Skip to main content
OlympiadHQ

Browse · MathNet

Print

Final Round, September 2019

Netherlands 2019 counting and probability

Problem

A complete number is a 9 digit number that contains each of the digits 1 to 9 exactly once. The difference number of a number is the number you get by taking the differences of consecutive digits in and then stringing these digits together. For instance, the difference number of 25143 is equal to 3431. The complete number 124356879 has the additional property that its difference number, 12121212, consists of digits alternating between 1 and 2.

Determine all with for which there exists a complete number with the additional property that the digits of its difference number alternate between 1 and .
Solution
For , an example of such a number is 126734895. For , an example is the number 549832761. (There are other solutions as well.)

We will show that for there is no complete number with a difference number equal to . It then immediately follows that there is also no complete number with difference number equal to (otherwise, we could write the digits of in reverse order and obtain a complete number with difference number ).

For equal to 6, 7, 8, and 9, no such number exists for the following reason. For the digits 4, 5, and 6, there is no digit that differs by from that digit. Since the difference number of the complete number is equal to , every digit of , except the first, must be next to a digit that differs from it by . Hence, the digits 4, 5, and 6 can only occur in the first position of , which is impossible.

For the argument is different. If we consider the digits that differ by 3, we find the triples 1–4–7, 2–5–8, and 3–6–9. If the 1 is next to the 4 in , the 7 cannot be next to the 4 and so the 7 must be the first digit of . If the 1 is not next to the 4, the 1 must be the first digit of . In the same way, either the 2 or the 8 must be the first digit of as well. This is impossible.
Final answer
a = 4, 5

Techniques

Pigeonhole principleColoring schemes, extremal arguments