Maths Olympiad Prep

Library / Progetto Olimpiadi della Matematica /22 of 28

Progetto Olimpiadi della Matematica

Combinatorics Difficulty 6.6 National Olympiad Prove it Italy

Problem:

The PIN of Eugenia's phone is made up of 4 digits; Eugenia only remembers that the first is between 0 and 6, the second between 0 and 3, the third between 0 and 4, the fourth between 0 and 2, and that the sum of the four digits is at least 8 (for example, the PIN could be 3330). How many codes are compatible with Eugenia's memories?

Solution

Solution:

The answer is 210. Let us consider all the 4-digit codes that can be formed with digits belonging to the correct intervals (without restrictions on the sum); these number 7⋅4⋅5⋅3=4207 \cdot 4 \cdot 5 \cdot 3 = 420. We now show that exactly half of these codes also satisfies the condition on the sum of the digits. We observe that if [a,b,c,d][a, b, c, d] are 4 digits in the indicated intervals, then the same is true for [6−a,3−b,4−c,2−d][6-a, 3-b, 4-c, 2-d]; we say that the second code is the companion of the first. The sum of the digits of [6−a,3−b,4−c,2−d][6-a, 3-b, 4-c, 2-d] is 15−(a+b+c+d)15 - (a + b + c + d), which is greater than or equal to 8 if and only if a+b+c+d≤7a + b + c + d \leq 7; in particular, exactly one of the two codes [a,b,c,d][a, b, c, d] and [6−a,3−b,4−c,2−d][6-a, 3-b, 4-c, 2-d] satisfies the hypothesis on the sum of the digits. Observing furthermore that the companion of the code [6−a,3−b,4−c,2−d][6-a, 3-b, 4-c, 2-d] is again [a,b,c,d][a, b, c, d], we have thus formed 210 pairs, each of which contains exactly one code compatible with Eugenia's memories.

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

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from it; metadata (topic, difficulty) added by this project.