Subtitles section Play video
The city has just opened its one-of-a-kind Fabergé Egg Museum
這座城市新開了一家獨一無二的「法貝熱蛋博物館」
with a single egg displayed on each floor of a 100-story building.
在一座 100 層的建築裡每一層都展示著一個蛋
And the world's most notorious jewel thief already has her eyes on the prize.
世界上最惡名昭彰的寶石大盜已經盯上了這個獎品
Because security is tight and the eggs are so large,
由於警衛森嚴而蛋又是那麼的大
she'll only get the chance to steal one
她唯一能將蛋偷走的機會
by dropping it out the window into her waiting truck
就是趁警察抵達之前,將蛋從窗戶丟到在樓下
and repelling down before the police can arrive.
等候的卡車上然後自己用繩子滑下去逃走
All eggs are identical in weight and construction,
所有的蛋,重量和結構都是一樣的
but each floor's egg is more rare and valuable than the one below it.
但每往上一個樓層,那個樓層的蛋就更稀有珍貴
While the thief would naturally like to take the priceless egg at the top,
想當然爾小偷喜歡拿最頂層的蛋,因為是無價之寶
she suspects it won't survive a 100-story drop.
但她估計,把蛋從 100 層樓高丟下去鐵定會摔破
Being pragmatic, she decides to settle for the most expensive egg she can get.
為了務實起見,她決定從她可以偷得到最昂貴的蛋下手
In the museum's gift shop, she finds two souvenir eggs,
在博物館的禮品店,她發現了兩個紀念品蛋
perfect replicas that are perfectly worthless.
那是毫無價值的完美複製品
The plan is to test drop them
計畫是這樣的,把複製蛋往樓下丟做測試
to find the highest floor at which an egg will survive the fall without breaking.
以找出一個最高且蛋丟下去不會摔破的樓層
Of course, the experiment can only be repeated
當然,這個實驗只可以重複做到
until both replica eggs are smashed.
兩個複製蛋摔破為止
And throwing souvenirs out the window too many times
而把複製蛋扔出窗外太多次
is probably going to draw the guards' attention.
可能會引起警衛的注意
What's the least number of tries it would take
所以至少須嘗試幾次才能夠保證
to guarantee that she find the right floor?
找到最佳的樓層?
Pause here if you want to figure it out for yourself!
如果你想自己找出答案,請在這裡暫停!
Answer in: 3
答案倒數:3
Answer in: 2
答案倒數:2
Answer in: 1
答案倒數:1
If you're having trouble getting started on the solution,
如果你不知道如何找出解答
it might help to start with a simpler scenario.
我們可以從更簡單的情境開始
Imagine our thief only had one replica egg.
設想小偷只有一顆複製蛋
She'd have a single option:
她就只有一個選擇:
To start by dropping it from the first floor
先從一樓開始丟
and go up one by one until it breaks.
然後逐層往上,直到蛋會摔破的樓層為止
Then she'd know that the floor below that
然後,她能得知下面那一個樓層
is the one she needs to target for the real heist.
就是她真正要搶劫的目標
But this could require as many as 100 tries.
但是這可能需要至多達 100 次嘗試
Having an additional replica egg gives the thief a better option.
多一個複製蛋可以讓小偷更容易找到答案
She can drop the first egg from different floors at larger intervals
她可以從不同的樓層丟下第一顆蛋
in order to narrow down the range where the critical floor can be found.
以縮小找出最高樓層的範圍
And once the first breaks,
如果蛋在某一樓層丟下去摔破了
she can use the second egg to explore that interval floor by floor.
她可以使用第二顆蛋逐層探索找出最佳的樓層
Large floor intervals don't work great.
一開始設定的樓層間隔太大會導致測試的效果不好
In the worst case scenario, they require many tests with the second egg.
在最糟的情況下,他們需要用第二個蛋進行很多次測試
Smaller intervals work much better.
用較小的樓層間隔測試效果較好
For example, if she starts by dropping the first egg from every 10th floor,
例如,如果她從第十層開始丟第一個蛋
once it breaks, she'll only have to test the nine floors below.
一旦它破了,她只需要測試下面的九層
That means it'll take at most 19 tries to find the right floor.
這意味著最多只要嘗試 19 次就可以找到最佳樓層
But can she do even better?
但她有更好的方式嗎?
After all, there's no reason every interval has to be the same size.
畢竟,沒有理由每個樓層間隔都必須相同
Let's say there were only ten floors.
假設只有十個樓層
The thief could test this whole building with just four total throws
小偷可以在整棟樓只丟四次就可以測出結果
by dropping the first egg at floors four,
把第一顆蛋先從第四層開始丟
seven,
然後第七層
and nine.
然後第九層
If it broke at floor four, it would take up to three throws of the second egg
如果蛋在第四層樓丟下摔破了,第二顆蛋只要再試三次
to find the exact floor.
就可以找到最佳樓層
If it broke at seven,
如果第一顆蛋在第七層樓丟下摔破了
it would take up to two throws with the second egg.
第二顆蛋只要再試二次
And if it broke at floor nine,
如果第一顆蛋在第九層樓丟下摔破了
it would take just one more throw of the second egg.
第二顆蛋只要再試一次
Intuitively, what we're trying to do here is divide the building into sections
直覺上,我們在這裡試圖做的是將建築物分成幾個部分
where no matter which floor is correct,
無論哪個是最佳樓層
it takes up to the same number of throws to find it.
都需要丟擲相同的次數才能找到它
We want each interval to be one floor smaller than the last.
我們希望每次測試的樓層間隔,能比前一次測試的減少一個樓層
This equation can help us solve for the first floor we need to start with
這個公式可以幫助我們找出,我們需要從 100 層樓
in the 100 floor building.
的第幾層開始
There are several ways to solve this equation,
這個公式有數種解法
including trial and error.
包括試誤法
If we plug in two for n, that equation would look like this.
如果我們將 n 設為 2,那麼這個公式看起來就像這樣
If we plug in three, we get this.
如果我們將 n 設為 3,我們得到這個答案
So we can find the first n to pass 100
所以我們可以設定第一個 n 後,將數值不斷的往上加來滿足 100 這個條件
by adding more terms until we get to our answer,
直到得出我們要的答案
which is 14.
那就是 14
And so our thief starts on the 14th floor,
所以寶石大盜從第14樓開始
moving up to the 27th,
再到第 27 樓
the 39th,
再到第 39 樓
and so on,
依此類推
for a maximum of 14 drops.
最多只要丟 14 次
Like the old saying goes, you can't pull a heist without breaking a few eggs.
俗話說得好,你不可能在沒有弄破幾個蛋的情況下搶劫成功的 (有得必有失)