After years of experiments, you’ve finally created the pets of the future– nano-rabbits! They’re tiny, they’re fuzzy… and they multiply faster than the eye can see.
經過數年的實驗, 你終於創造出了未來的寵物—— 奈米兔子! 牠們很小且毛絨絨的…… 牠們繁殖的速度快到肉眼看不見。
In your lab there are 36 habitat cells, arranged in an inverted pyramid, with 8 cells in the top row. The first has one rabbit, the second has two, and so on, with eight rabbits in the last one. The other rows of cells are empty… for now. The rabbits are hermaphroditic, and each rabbit in a given cell will breed once with every rabbit in the horizontally adjacent cells, producing exactly one offspring each time. The newborn rabbits will drop into the cell directly below the two cells of its parents, and within minutes will mature and reproduce in turn. Each cell can hold 10^80 nano-rabbits – that’s a 1 followed by 80 zeros – before they break free and overrun the world. Your calculations have given you a 46-digit number for the count of rabbits in the bottom cell– plenty of room to spare.
在你的實驗室中,有 36 間住窩, 用倒金字塔的形式排列, 最上面一層有 8 間, 第 1 間有 1 隻兔子, 第 2 間有 2 隻兔子,以此類推, 最後一間有 8 隻兔子。 其他層的住窩是空的…… 目前是空的。 這些兔子雌雄同體, 在每一間當中的每一隻兔子都會 與橫向隔壁間中的兔子交配一次, 每次都是生出一隻後代。 新生出來的兔子會直接落到 父母住窩正下方的那間住窩, 在幾分鐘之內就會長大成熟, 可以換牠們開始交配。 每一間住窩可以容納 10^80 隻奈米兔子—— 10^80 是 1 後面加 80 個 0 —— 超過的話,牠們就會 逃出住窩竄犯全世界。 你的計算算出來在最底層住窩中的 兔子數目只有 46 位數—— 空間綽綽有餘。
But just as you pull the lever to start the experiment, your assistant runs in with terrible news. A rival lab has sabotaged your code so that all the zeros at the end of your results got cut off. That means you don’t actually know if the bottom cell will be able to hold all the rabbits – and the reproduction is already underway! To make matters worse, your devices and calculators are all malfunctioning, so you only have a few minutes to work it out by hand. How many trailing zeros should there be at the end of the count of rabbits in the bottom habitat? And do you need to pull the emergency shut-down lever?
但當你拉動操縱桿要開始實驗時, 你的助理帶著壞消息跑來。 你競爭對手的實驗室 破壞了你的程式碼, 所以你最後算出的結果, 其實最後面的 0 都被切掉了。 那就表示你其實不知道 最下面一層的住窩是否 能容納所有的兔子—— 但繁殖已經開始了! 更糟糕的是, 你的裝置和計算機都故障了, 你只有幾分鐘的時間用手算出來。 底層住窩中的兔子數目, 後面應該要有多少個 0? 你需要去拉緊急關閉的控制桿嗎?
Pause the video now if you want to figure it out for yourself.
如果你想要自己解題, 請在這裡將影片暫停。
Answer in 3
答案即將公佈:3
Answer in 2
答案即將公佈:2
Answer in 1
答案即將公佈:1 沒有足夠的時間算出
There isn’t enough time to calculate the exact number of rabbits in the final cell. The good news is we don’t need to. All we need to figure out is how many trailing zeros it has.
在最後一間住窩中的兔子數目。 好消息是,我們並不需要算出它。 我們只需要算出後面有多少個 0。 但我們要怎麼在不計算出 這個數目的情況下,
But how can we know how many trailing zeros a number has without calculating the number itself? What we do know is that we arrive at the number of rabbits in the bottom cell through a process of multiplication – literally. The number of rabbits in each cell is the product of the number of rabbits in each of the two cells above it. And there are only two ways to get numbers with trailing zeros through multiplication: either multiplying a number ending in 5 by any even number, or by multiplying numbers that have trailing zeroes themselves.
知道後面有幾個零? 我們只知道,底層住窩的兔子數目 是透過乘法(與「繁殖」同字)的 過程得到的——真的。 每間住窩中的兔子數目 是上面兩間住窩中的 兔子數目相乘。 只有兩種方式 可以透過乘法得到 後面有 0 的數字: 把尾數是 5 的數字 和任何偶數相乘, 或是將本身尾數 就是 0 的數字相乘。 咱們來計算上面數下來 第二層的兔子數目,
Let’s calculate the number of rabbits in the second row and see what patterns emerge. Two of the numbers have trailing zeros – 20 rabbits in the fourth cell and 30 in the fifth cell. But there are no numbers ending in 5. And since the only way to get a number ending in 5 through multiplication is by starting with a number ending in 5, there won’t be any more down the line either. That means we only need to worry about the numbers that have trailing zeros themselves. And a neat trick to figure out the amount of trailing zeros in a product is to count and add the trailing zeros in each of the factors – for example, 10 x 100 = 1,000.
看看會發現什麼模式。 兩個數字的尾數有 0 —— 第 4 間有 20 隻兔子, 第 5 間有 30 隻。 但沒有尾數是 5 的數目出現。 因為若要透過乘法 得到尾數是 5 的數字, 一定要用尾數是 5 的數字來乘, 因此可確定下面也不會 再出現尾數是 5 的數字。 那就表示我們只需要擔心 本身尾數就是 0 的數字。 有招絕招可以知道乘法 乘積的尾數有幾個 0, 那就是算出每個因數尾數的 0 有幾個,再將它們加總—— 比如,10 x 100 = 1,000。
So let’s take the numbers in the fourth and fifth cells and multiply down from there. 20 and 30 each have one zero, so the product of both cells will have two trailing zeros, while the product of either cell and an adjacent non-zero-ending cell will have only one. When we continue all the way down, we end up with 35 zeros in the bottom cell. And if you’re not too stressed about the potential nano-rabbit apocalypse, you might notice that counting the zeros this way forms part of Pascal’s triangle.
所以,咱們從第 4、5 間的數目 著手開始向下相乘。 20 和 30 尾數都有 1 個 0, 所以這兩間的乘積, 尾數會有 2 個 0, 這兩間住窩和其隔壁 數目尾數非 0 的住窩相乘 得到的乘積尾數只有 1 個 0。 我們繼續向下計算, 會算出在最底層住窩中的 兔子數尾數有 35 個 0。 若在計算這可能會發生的奈米兔子 世界末日時你還有餘力的話, 你可能會注意到, 用這種方式計算 0, 會形成一部分的楊輝三角形。
Adding those 35 zeros to the 46 digit number we had before yields an 81 digit number – too big for the habitat to contain! You rush over and pull the emergency switch just as the seventh generation of rabbits was about to mature – hare-raisingly close to disaster.
將那 35 個 0 加在我們之前 算出的 46 位數數字後面, 得到一個 81 位數數字—— 超出住窩的容量! 你跑過去,拉下緊急開關, 此時第 7 代的兔子正要長大—— 差一點點就要發生繁殖災難。