لقد وجدت الخزنة السرية لليوناردو دافنشي، مؤمنة بسلسلة من مجموعة الأقفال المركبة. لحسن الحظ فإن خريطة الكنز التي لديك تحتوي ثلاثة رموز: 1210 3211000 و... اممم يبدو أن آخر عدد مفقود. يبدوا أنه يجب عليك استنتاج العدد الأخير بنفسك.
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.
يوجد شيء مشترك بين العددين الأول والثاني: هما يعرفان بأعداد السيرة الذاتية. وهو نوع خاص من الأعداد التي تصفها طريقة تركيبها. كل رقم مفرد من أعداد السيرة الذاتية يدل على عدد المرات كل رقم مفرد يعبر عن الموقع الذي يظهر به ضمن سلسة الأعداد. الرقم الأول يعبر عن عدد تكرار 0، الرقم الثاني يعبر عن عدد تكرار الرقم 1، الرقم الثالث يعبر عن عدد تكرار الرقم 2 وهكذا حتى النهاية.
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.
القفل الأخير مكون من 10 أرقام. وللمصادفة يوجد عدد ذاتي السيرة وحيد يتكون من 10 أرقام بالضبط. ما هو هذا العدد؟ اضغط الإيقاف المؤقت هنا في حال رغبت بحل اللغز بنفسك! الإجابة بعد: 3 الإجابة بعد: 2 الإجابة بعد: 1
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
سيستغرق الأمر للأبد إن حاولت تجربة تركيبات مختلفة للأرقام عشوائيًا. لنحلل إذًا أعداد أرقام السير الذاتية التي بحوزتنا منذ البداية لكي نحدد الأنماط التي يمكن أن نجدها. بجمع كل الأرقام في العدد 1210 معًا، نحصل على 4، وهو عدد الأرقام الموجودة. هذا أمر منطقي بما أن كل رقم مفرد يخبرنا عدد تكرار هذا الرقم ضمن الأرقام الأخرى المكونة للعدد. ولذا فإن الأرقام المكونة لعدد السيرة الذاتية الموجود معنا يجب أن يكون مجموعها يساوي 10.
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.
يخبرنا هذا بأمر مهم آخر أنه لا توجد عدة أرقام كبيرة ضمن العدد. فمثلًا، لو تواجد الرقم 6 أو الرقم 7، فيجب أن يتكرر الرقم ستة مرات، والرقم الآخر يجب أن يتكرر 7 مرات، ما سينتج عنه عدد يحتوي على أكثر من 10 أرقام. يمكننا استنتاج أنه لا يمكن أن يتواجد أكثر من رقم واحد أكبر من الرقم 5 في العدد ككل. لذا يمكن لرقم واحد فقط من الأرقام 6، 7، 8، 9، أن يتواجد في العدد لدينا. كما سنجد أصفارًا في الخانات لتمثل الأرقام التي لم يتم استخدامها. نعرف الآن أنه سيتواجد لدينا ثلاثة أصفار على الأقل ما يعني أن الرقم الأول يجب أن يكون 3 أو أكثر.
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.
بالرغم من أن الرقم الأول يوضح عدد الأصفار، كل رقم تالٍ يعبر عن عدد مرات تكرار رقم ما عدا الصفر. إن قمنا بجمع كل الأرقام معًا ما عدا الرقم الأول- وتذكر أن الأصفار ليس لها تأثير على عملية الجمع- فسنحصل على عدد الأرقام غير الصفر ضمن العدد ككل، بما فيها الرقم الأول. مثلًا، إن قمنا بتجربة ما يلي للخانة الأولى من الأحجية، فسنحصل على 2 زائد 1 يساوي 3 أرقام. إن قمنا الآن بطرح 1، فسنحصل على عدد الأرقام ما عدا الصفر التي تلي الرقم الأول وهما رقمان في مثالنا.
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. وكيف يمكنك الحصول على تكرار يكون مجموعه يكون أكبر برقم واحد بالضبط من عدد الأرقام الموجبة ما عدا الصفر في حال جمعها معًا؟ السبيل الوحيد هو أن يكون أحد الأرقام المجموعه هو 2، وباقي الأعداد هو تكرار الرقم 1. ولكن كم مرة يتكرر الرقم 1؟ يتبين أنه من الممكن أن نجد تكرارين فقط إن وجد تكرار أكثر، فيجب أن تتواجد أرقام مثل 3 أو 4 لتعبر عن هذه التكرارات.
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.
لذا لدينا الآن الرقم الأول هو 3 أو أكبر ليعبر عن تكرارات الصفر، لدينا الرقم 2 لتكرارات الرقم 1، والرقم 1 مكرر مرتين الرقم 1 ليعبر عن تكرار 2 وواحد آخر ليعبر عن الرقم الأول. وبالحديث عن ذلك، حان الوقت لمعرفة ما هو الرقم الأول. بما أننا نعرف عن ناتج جمع الرقم 2 والرقم 1 المكرر مرتين هو 4، يمكننا طرح هذا الناتج من 10 للحصول على الرقم 6. الأمر يتطلب الآن وضع جميع الأرقام في أماكنها: ستة أصفار، إثنان 1، واحد 2، لا يوجد الرقم 3، لا يوجد الرقم 4، لا يوجد الرقم 5، واحد 6، لا يوجد الرقم 7، لا يوجد الرقم 8، لا يوجد الرقم 9.
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.
تفتح الخزنة على مصراعيها وفي داخلها ستجد... السيرة الذاتية لدافنشي الضائعة منذ زمن طويل.
The safe swings open, and inside you find... Da Vinci’s long-lost autobiography.