Can you solve the egg drop riddle? - Yossi Elran

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

TED-Ed


Please double-click on the English subtitles below to play the video.

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
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
01:38
Answer in: 2
25
98954
1434
01:40
Answer in: 1
26
100388
1439
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
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
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
03:10
seven,
52
190670
1149
03:11
and nine.
53
191819
1451
03:13
If it broke at floor four, it would take up to three throws of the second egg
54
193270
4645
03:17
to find the exact floor.
55
197915
1859
03:19
If it broke at seven,
56
199774
1236
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
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
04:02
If we plug in three, we get this.
69
242677
2556
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
04:12
which is 14.
72
252462
2261
04:14
And so our thief starts on the 14th floor,
73
254723
2971
04:17
moving up to the 27th,
74
257694
1601
04:19
the 39th,
75
259295
1129
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
About this website

This site will introduce you to YouTube videos that are useful for learning English. You will see English lessons taught by top-notch teachers from around the world. Double-click on the English subtitles displayed on each video page to play the video from there. The subtitles scroll in sync with the video playback. If you have any comments or requests, please contact us using this contact form.

https://forms.gle/WvT1wiN1qDtmnspy7