You’ve found Leonardo Da Vinci’s secret vault, secured by a series of combination locks. Fortunately, your treasure map has three codes: 1210, 3211000, and… hmm. The last one appears to be missing. Looks like you’re gonna have to figure it out on your own.
Tocmai ai descoperit seiful secret al lui Leonardo Da Vinci, protejat de o serie de combinații numerice. Din fericire, harta comorilor are trei coduri: 1210, 3211000, și... hmm. Ultimul pare să lipsească. Se pare că vei fi nevoit să te descurci singur.
There’s something those first two numbers have in common: they’re what’s called autobiographical numbers. This is a special type of number whose structure describes itself. Each of an autobiographical number’s digits indicates how many times the digit corresponding to that position occurs within the number. The first digit indicates the quantity of zeroes, the second digit indicates the number of ones, the third digit the number of twos, and so on until the end.
Primele două numere au ceva în comun: sunt ceea ce numim numere autodescriptive. E un tip special de număr, a cărui structură se descrie pe ea însăși. Fiecare cifră a unui număr autodescriptiv arată de câte ori cifra corespunzătoare acelei poziții apare în cadrul numărului. Prima cifră arată de câte ori apare cifra zero, a doua cifră arată de câte ori apare numărul 1, a treia cifră arată de câte ori apare numărul 2, și tot așa.
The last lock takes a 10 digit number, and it just so happens that there’s exactly one ten-digit autobiographical number. What is it? Pause here if you want to figure it out for yourself! Answer in: 3 Answer in: 2 Answer in: 1
Ultima încuietoare e formată dintr-un număr de 10 cifre, iar întâmplarea face că există exact un singur număr autodescriptiv alcătuit din 10 cifre. Care este acela? Oprește-te aici dacă vrei să-ți dai seama singur! Răspunsul în: 3 Răspunsul în: 2 Răspunsul în: 1
Blindly trying different combinations would take forever. So let’s analyze the autobiographical numbers we already have to see what kinds of patterns we can find. By adding all the digits in 1210 together, we get 4 – the total number of digits. This makes sense since each individual digit tells us the number of times a specific digit occurs within the total. So the digits in our ten-digit autobiographical number must add up to ten.
Să încerci diferite combinații la întâmplare ar dura o veșnicie. Așadar, să analizăm numerele autodescriptive pe care le avem deja, să vedem ce fel de tipare putem descoperi. Adunând toate cifrele numărului 1210, obținem 4 – numărul total de cifre. Are sens din moment ce fiecare cifră ne spune de câte ori o anumită cifră apare în cadrul numărului. Deci cifrele din numărul nostru autodescriptiv de 10 cifre trebuie să însumeze 10.
This tells us another important thing – the number can’t have too many large digits. For example, if it included a 6 and a 7, then some digit would have to appear 6 times, and another digit 7 times– making more than 10 digits. We can conclude that there can be no more than one digit greater than 5 in the entire sequence. So out of the four digits 6, 7, 8, and 9, only one – if any-- will make the cut. And there will be zeroes in the positions corresponding to the numbers that aren’t used. So now we know that our number must contain at least three zeroes – which also means that the leading digit must be 3 or greater.
Asta ne spune un alt lucru important – numărul nu poate fi alcătuit din cifre prea mari. De exemplu, dacă ar include cifra 6 sau 7, una dintre cifre ar trebui să apară de 6 ori, iar alta de 7 ori, rezultând astfel mai mult de 10 cifre. Putem concluziona că nu poate fi mai mult de o singură cifră mai mare de 5 în toată operația. Deci în afară de 6, 7, 8, și 9, numai una, dacă există, va trece testul. Și vor fi cifre de zero în poziția care corespunde numerelor nefolosite. Deci acum știm că numărul nostru trebuie să conțină cel puțin trei zerouri, ceea ce înseamnă că prima cifră trebuie să fie egală cu 3 sau mai mare.
Now, while this first digit counts the number of zeroes, every digit after it counts how many times a particular non-zero digit occurs. If we add together all the digits besides the first one – and remember, zeroes don’t increase the sum – we get a count of how many non-zero digits appear in the sequence, including that leading digit. For example, if we try this with the first code, we get 2 plus 1 equals 3 digits. Now, if we subtract one, we have a count of how many non-zero digits there are after the first digit – two, in our example.
Dacă această primă cifră arată numărul de zerouri, fiecare cifră care urmează arată de câte ori apare o cifră diferită de 0. Dacă adunăm toate cifrele excluzând-o pe prima, și să ne amintim că zerourile nu cresc suma, aflăm de câte ori apar cifre diferite de zero, incluzând și prima cifră. De exemplu, dacă încercăm primul cod, avem 2 plus 1 egal 3 cifre. Dacă sustragem una, aflăm câte cifre diferite de zero se află după prima cifră, două, în cazul nostru.
Why go through all that? Well, we now know something important: the total quantity of non-zero digits that occur after the first digit is equal to the sum of these digits, minus one. And how can you get a distribution where the sum is exactly 1 greater than the number of non-zero positive integers being added together? The only way is for one of the addends to be a 2, and the rest 1s. How many 1s? Turns out there can only be two – any more would require additional digits like 3 or 4 to count them.
Dar de ce să ne chinuim atât? Acum știm ceva important: numărul total de cifre diferite de zero care apare după prima cifră e egal cu suma acestor cifre, minus unu. Cum aflăm unde suma e cu exact 1 mai mare decât numărul pozitiv diferit de zero adăugate împreună? Singura cale e ca unul dintre termeni să fie 2, iar restul 1. Dar câți de 1? Se pare că pot fi doar doi, mai mulți ar necesita cifre în plus, de exemplu 3 sau 4 cifre.
So now we have the leading digit of 3 or greater counting the zeroes, a 2 counting the 1s, and two 1s – one to count the 2s and another to count the leading digit. And speaking of that, it’s time to find out what the leading digit is. Since we know that the 2 and the double 1s have a sum of 4, we can subtract that from 10 to get 6. Now it’s just a matter of putting them all in place: 6 zeroes, 2 ones, 1 two, 0 threes, 0 fours, 0 fives, 1 six, 0 sevens, 0 eights, and 0 nines.
Acum avem prima cifră egală cu 3 sau mai mare, numărând inclusiv zerourile, un 2 numărând cifrele de 1, și doi de 1, unul să numere cifrele de 2 și încă unul care numără prima cifră. Dacă tot suntem aici, e cazul să aflăm această primă cifră. Fiindcă știm că cifrele de 2 și cei doi 1 însumează 4, putem să le scădem din 10 ca să obținem 6. Acum e doar o chestiune de aranjare: șase de 0, doi de 1, un singur 2, trei de 0, zero de 4, zero de 5, unu de 6, zero de 7, zero de 8, și zero de 9.
The safe swings open, and inside you find... Da Vinci’s long-lost autobiography.
Lanțurile seifului se deschid, iar înăuntru se află... Autobiografia de mult pierdută a lui Da Vinci.