Can you solve the egg drop riddle? - Yossi Elran

8,325,118 views ・ 2017-11-07

TED-Ed


請雙擊下方英文字幕播放視頻。

譯者: chenching teng 審譯者: Helen Chang
00:08
The city has just opened its one-of-a-kind Fabergé Egg Museum
0
8411
4850
這城市新開幕一間獨特的 法貝熱彩蛋博物館
00:13
with a single egg displayed on each floor of a 100-story building.
1
13261
5571
一百層的建築物中 每層樓各展出一顆蛋
00:18
And the world's most notorious jewel thief already has her eyes on the prize.
2
18832
5739
而世上最惡名昭彰的珠寶大盜 已經盯上這寶物了
00:24
Because security is tight and the eggs are so large,
3
24571
3391
由於戒備森嚴,蛋的體積又大
00:27
she'll only get the chance to steal one
4
27962
2800
她只有偷走一顆的機會
00:30
by dropping it out the window into her waiting truck
5
30762
3050
方式是將它從窗戶向下丟 丟進她準備好的卡車裡
00:33
and repelling down before the police can arrive.
6
33812
4042
然後在警察趕到之前靠繩子爬下去
00:37
All eggs are identical in weight and construction,
7
37854
3399
所有蛋的構造與重量皆相同
00:41
but each floor's egg is more rare and valuable than the one below it.
8
41253
5900
但隨著樓層越高,蛋就越稀有 價值也越高
00:47
While the thief would naturally like to take the priceless egg at the top,
9
47153
3778
大盜自然是想得到頂樓那無價之寶
00:50
she suspects it won't survive a 100-story drop.
10
50931
4061
但她不能確定 蛋從 100 樓摔下是否還能完好
00:54
Being pragmatic, she decides to settle for the most expensive egg she can get.
11
54992
5480
務實的她決定鎖定她所能得到最貴的蛋
01:00
In the museum's gift shop, she finds two souvenir eggs,
12
60472
3922
她在博物館的禮品店中 找到兩顆紀念品蛋
01:04
perfect replicas that are perfectly worthless.
13
64394
3579
是便宜的完美仿製品
01:07
The plan is to test drop them
14
67973
2058
計畫內容是藉由摔它們來進行測試
01:10
to find the highest floor at which an egg will survive the fall
15
70031
4535
去找出蛋能承受墜落
01:14
without breaking.
16
74566
1348
並保持完好的最高樓層
01:15
Of course, the experiment can only be repeated
17
75914
2529
當然,實驗能重複進行
01:18
until both replica eggs are smashed.
18
78443
3470
直到兩顆蛋都破碎為止
01:21
And throwing souvenirs out the window too many times
19
81913
2790
但將紀念蛋丟出窗外太多次
01:24
is probably going to draw the guards' attention.
20
84703
3521
也可能引起保全的注意
01:28
What's the least number of tries it would take
21
88224
2460
最少需要幾次測試
01:30
to guarantee that she find the right floor?
22
90684
3550
才能保證她找到對的樓層呢?
01:34
Pause here if you want to figure it out for yourself!
23
94234
3285
如果想自己得出答案,在這邊按下暫停
01:37
Answer in: 3
24
97519
1435
答案即將揭曉:3
01:38
Answer in: 2
25
98954
1434
答案即將揭曉:2
01:40
Answer in: 1
26
100388
1439
答案即將揭曉:1
01:41
If you're having trouble getting started on the solution,
27
101827
2731
如果你不知道該怎麼著手於這個問題
01:44
it might help to start with a simpler scenario.
28
104558
2836
從簡單點的局面開始也許會有幫助
01:47
Imagine our thief only had one replica egg.
29
107394
3269
如果我們的大盜只有一顆仿製蛋
01:50
She'd have a single option:
30
110663
1996
她只有一個選擇:
01:52
To start by dropping it from the first floor
31
112659
2516
從 1 樓開始摔它
01:55
and go up one by one until it breaks.
32
115175
3342
然後一層一層往上加直到它破掉為止
01:58
Then she'd know that the floor below that
33
118517
2439
那麼她就會知道
02:00
is the one she needs to target for the real heist.
34
120956
3229
下面那層就是她的目標樓層
02:04
But this could require as many as 100 tries.
35
124185
2981
但這樣一來可能需要多達一百次測試
02:07
Having an additional replica egg gives the thief a better option.
36
127166
4899
有額外的仿製蛋 能提供給大盜更好的選擇
02:12
She can drop the first egg from different floors at larger intervals
37
132065
4152
她可以先用較大的間隔樓層數 來丟第一顆蛋
02:16
in order to narrow down the range where the critical floor can be found.
38
136217
4908
這樣便可以縮小目標樓層的可能範圍
02:21
And once the first breaks,
39
141125
1662
一旦第一顆蛋破了
02:22
she can use the second egg to explore that interval floor by floor.
40
142787
5260
她可以用第二顆蛋 去逐層測試中間的所有樓層
02:28
Large floor intervals don't work great.
41
148047
3462
間隔樓層數太大並不是個好辦法
02:31
In the worst case scenario, they require many tests with the second egg.
42
151509
4827
最壞的情況下 需要用第二顆蛋測試很多次
02:36
Smaller intervals work much better.
43
156336
2741
間隔樓層數小一點比較好
02:39
For example, if she starts by dropping the first egg from every 10th floor,
44
159077
4500
例如,如果先是 每隔十層樓丟第一顆蛋一次
02:43
once it breaks, she'll only have to test the nine floors below.
45
163577
4681
一旦它破了 她只需要測試底下的九層樓
02:48
That means it'll take at most 19 tries to find the right floor.
46
168258
6280
這代表最多只要 19 次測試 就能找到對的樓層
02:54
But can she do even better?
47
174538
2286
然而她能做的更好嗎?
02:56
After all, there's no reason every interval has to be the same size.
48
176824
4767
畢竟沒有規定 每個間隔樓層數必須要是一樣的
03:01
Let's say there were only ten floors.
49
181591
2369
假設只有十層樓
03:03
The thief could test this whole building with just four total throws
50
183960
4215
大盜可以只丟四次 就完成整棟建築的測試
03:08
by dropping the first egg at floors four,
51
188175
2495
方法是依序從 4 樓
03:10
seven,
52
190670
1149
7 樓
03:11
and nine.
53
191819
1451
和 9 樓丟下第一顆蛋
03:13
If it broke at floor four, it would take up to three throws of the second egg
54
193270
4645
如果在 4 樓蛋破了 那第二顆就需要丟三次
03:17
to find the exact floor.
55
197915
1859
才能找到目標樓層
03:19
If it broke at seven,
56
199774
1236
如果在 7 樓破了
03:21
it would take up to two throws with the second egg.
57
201010
2952
那第二顆就需要丟兩次
03:23
And if it broke at floor nine,
58
203962
2178
如果在 9 樓破了
03:26
it would take just one more throw of the second egg.
59
206140
3840
那就只要再丟一次第二顆蛋
03:29
Intuitively, what we're trying to do here is divide the building into sections
60
209980
4740
直覺的做法是把建築物的分層方式
03:34
where no matter which floor is correct,
61
214720
2452
設計成無論目標樓層在哪
03:37
it takes up to the same number of throws to find it.
62
217172
4140
都能用相同的測試次數來找到它
03:41
We want each interval to be one floor smaller than the last.
63
221312
5099
我們希望每個間隔樓層數 都能比下面的更小一層樓
03:46
This equation can help us solve for the first floor we need to start with
64
226411
4141
這個公式能夠幫助我們 找出開始的第一層樓
03:50
in the 100 floor building.
65
230552
3055
在一百層樓建築的情況下
03:53
There are several ways to solve this equation,
66
233607
3126
有很多種方式來解這個公式
03:56
including trial and error.
67
236733
1693
包括嘗試錯誤法
03:58
If we plug in two for n, that equation would look like this.
68
238426
4251
如果我們讓 n 等於 2 代入 式子看起來會像這樣
04:02
If we plug in three, we get this.
69
242677
2556
如果代入 3 ,我們得到這個
04:05
So we can find the first n to pass 100
70
245233
3730
所以我們可以藉由增加更多項
04:08
by adding more terms until we get to our answer,
71
248963
3499
直到超過 100 也就是我們需要的答案
04:12
which is 14.
72
252462
2261
而答案是 14
04:14
And so our thief starts on the 14th floor,
73
254723
2971
因此我們的大盜從 14 樓開始
04:17
moving up to the 27th,
74
257694
1601
往上移動至 27 樓
04:19
the 39th,
75
259295
1129
39 樓
04:20
and so on,
76
260424
1109
以此類推
04:21
for a maximum of 14 drops.
77
261533
3039
而最多只需要丟十四次
04:24
Like the old saying goes, you can't pull a heist without breaking a few eggs.
78
264572
4522
就像俗話所說的 不破雞蛋 焉得打劫?
關於本網站

本網站將向您介紹對學習英語有用的 YouTube 視頻。 您將看到來自世界各地的一流教師教授的英語課程。 雙擊每個視頻頁面上顯示的英文字幕,從那裡播放視頻。 字幕與視頻播放同步滾動。 如果您有任何意見或要求,請使用此聯繫表與我們聯繫。

https://forms.gle/WvT1wiN1qDtmnspy7