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.
あなたは一連の文字合わせ錠で 厳重に保管された― レオナルド・ダ・ヴィンチの 秘密の地下金庫を見つけました 幸運なことに 持っている宝の地図には 3つのコードが書いてあります 1210 3211000 そして うーん 最後の1つは数字が欠けているようです どうやらあなた自身で 解かなければならないようですね
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.
最初の2つの数字には共通点があります これらは自己記述数と呼ばれる数字です これは数字の構造が自らを記述する 特別なタイプの数字なのです 自己記述数の各桁は その位置に対応する数が 数字全体で何度現れるかを示します 1桁目は0の数を示し 2桁目は1の数を 3桁目は2の数を というように最終桁まで続きます
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
最後の鍵は10桁の数字で そうなる10桁の自己記述数は ちょうど1つしかありません そうなる10桁の自己記述数は ちょうど1つしかありません この数字は何でしょうか ご自身で考える場合は ここで一時停止してください 答えまで3秒 2秒 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.
やみくもに異なる組み合わせを試していては 一生かかってしまいます そこで すでに手元にある 自己記述数を分析して パターンを見つけ出してみましょう 1210の各桁の数字を足すと 4つまり数字の桁数が得られます 各桁は特定の数字が現れる合計回数を 教えてくれるので これはつじつまが合いますね ですから私たちの10桁の 自己記述数の各桁の数字は 足して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.
このことは別の大切なこと ― 大きな数字が多くあってはいけないことを 示しています 例えば 6と7を1つずつ含んでいるとすると ある数字は6回出てこなければなりません そしてもう1つは7回 つまり10桁を超えてしまいます 数字全体の中で5より大きい数は 1つまでと結論付けられます 6,7,8,9の4つの数字の内 使われているものがあるとしたら それが1個なら上手くいきます 使われていない数字に対応する位置には 0が置かれます そう 少なくとも3つの0を含む ということが分かります このことは先頭の数が 3以上でなければならないことも意味します
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.
この1桁目が0の個数を表す一方で この後の各桁は その桁が示す特定の 0以外の数字が何回登場するかを表します 1桁目を除き 各桁の数字を足し合わせます この時 0は足しても 合計は増えませんね すると 合計値は 先頭の桁を含めた 0でない桁の数と一致します 例えばこれを 最初のコードに当てはめてみると 2たす1で3桁です ここから1を引くと 1桁目を除く 0以外の桁の数― この例では2が得られます
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.
すべてを細かく調べてみましょう 私たちは今 大切なことがわかっています 1桁目の後に現れる0以外の数の個数は これらの数字の合計から 1を引いたのと同じになります では どのように配置したら (1桁目を除く)各桁の数の合計が (1桁目を除く)0でない正の整数の 個数より1大きくなるでしょうか 唯一の可能性は 加える数として 2を1つ 残りを1にすることです 1はいくつあるでしょう? 2つだけというのが 正しいと分かります それ以上1があると その個数である 3や4のような数を表す追加の桁が必要です
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.
さて この問題では先頭の数は3以上で 0の個数を表しています 2は1の個数で 1が2つあり その内1つは 2の個数で もう1つは 先頭の数に対応しています それは何かと言えば… そう 先頭の数が何か 当てる時がやってきました 2と 2つの1で合計は4 10から引くと6になります これらをすべて正しい位置に 配置するだけです 0が6つ 1が2つ 2が1つ 3は0 4も0 5も0 6が1つ 7は0 8も0 そして9も0
The safe swings open, and inside you find... Da Vinci’s long-lost autobiography.
金庫の扉がスライドして開き 中にあなたが見つけるものは… 長らく行方不明だった ダヴィンチの自叙伝でした