Problem about Leonardo da Vinci's cache, which is not so easy to get into
Problem about Leonardo da Vinci's cache, which is not so easy to get into
Anonim

Decipher the missing combination of numbers to open the door behind which something interesting is hidden.

Problem about Leonardo da Vinci's cache, which is not so easy to get into
Problem about Leonardo da Vinci's cache, which is not so easy to get into

A curious tourist discovered Leonardo da Vinci's cache. It is not easy to get into it: the path is blocked by a huge door. Only those who know the required combination of numbers from the combination lock will be able to get inside. The tourist has a scroll with tips, from which he learned the first two combinations: 1210 and 3211000. But the third one cannot be made out. We'll have to decipher it yourself!

Common to the first and second combination is that both of these numbers are autobiographical. This means that they contain a description of their own structure. Each digit of an autobiographical number indicates how many times in the number there is a digit corresponding to the ordinal number of the digit itself. The first digit indicates the number of zeros, the second indicates the number of ones, the third indicates the number of twos, and so on.

Determine the number - the third combination of numbers - based on the first two
Determine the number - the third combination of numbers - based on the first two

The third combination consists of a sequence of 10 digits. It represents the only possible 10-digit autobiographical number. What is this number? Help the tourist to identify!

If you randomly select combinations of numbers, it will take a long time to solve. It is better to analyze the numbers we have and identify the pattern.

Summing up the digits of the first number - 1210, we get 4 (the number of digits in this combination). Summing up the digits of the second number - 3211000, we get 7 (the result is also equal to the number of digits in this combination). Each digit indicates how many times it appears in the given number. Therefore, the sum of the digits in a 10-digit autobiographical number must be 10.

It follows from this that there cannot be many large numbers in the third combination. For example, if 6 and 7 were present there, this would mean that some number should be repeated six times, and some seven, as a result of which there would be more than 10 digits.

Thus, in the entire sequence, there cannot be more than one digit greater than 5. That is, out of four digits - 6, 7, 8 and 9 - only one can be part of the desired combination. Or none at all. And in the place of unused digits, there will be zeros. It turns out that the desired number contains at least three zeros and that in the first place there is a digit that is greater than or equal to 3.

The first digit in the desired sequence determines the number of zeros, and each further digit determines the number of nonzero digits. If you add up all the digits except the first, you get a number that determines the number of non-zero digits in the desired combination, taking into account the very first digit in the sequence.

For example, if we add the numbers in the first combination, we get 2 + 1 = 3. Now we subtract 1 and get a number that determines the number of non-zero digits after the first leading digit. In our case, this is 2.

These calculations provide important information that the number of nonzero digits after the first digit is equal to the sum of those digits minus 1. How do you calculate the values of digits that add 1 more than the number of nonzero positive integers to add?

The only possible option is when one of the terms is two, and the others are ones. How many units? It turns out that there can be only two of them - otherwise, the numbers 3 and 4 would be present in the sequence.

Now we know that the first digit must be 3 or higher - it determines the number of zeros; then the number 2 to determine the number of ones and two 1s, one of which indicates the number of twos, the other to the first digit.

Now let's determine the value of the first digit in the desired sequence. Since we know that the sum of 2 and two 1s is 4, subtract that value from 10 to get 6. Now all that remains is to arrange all the numbers in the correct sequence: six 0, two 1, one 2, zero 3, zero 4, zero 5, one 6, zero 7, zero 8 and zero 9. The required number is 6210001000.

The hiding place opens and the tourist discovers the long-lost autobiography of Leonardo da Vinci inside. Hooray!

The puzzle is based on a TED-Ed video.

Show answer Hide answer

Recommended: