Can you solve the prisoner boxes riddle? - Yossi Elran

10,957,059 views ・ 2016-10-03

TED-Ed


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

00:06
Your favorite band is great at playing music,
0
6875
3478
00:10
but not so great at being organized.
1
10353
3121
00:13
They keep misplacing their instruments on tour,
2
13474
2790
00:16
and it's driving their manager mad.
3
16264
2500
00:18
On the day of the big concert,
4
18764
1810
00:20
the band wakes up to find themselves tied up
5
20574
2310
00:22
in a windowless, soundproof practice room.
6
22884
3680
00:26
Their manager explains what's happening.
7
26564
2240
00:28
Outside, there are ten large boxes.
8
28804
3230
00:32
Each contains one of your instruments,
9
32034
2360
00:34
but don't be fooled by the pictures - they've been randomly placed.
10
34394
4820
00:39
I'm going to let you out one at a time.
11
39214
3540
00:42
While you're outside, you can look inside any five boxes
12
42754
3481
00:46
before security takes you back to the tour bus.
13
46235
3999
00:50
You can't touch the instruments
14
50234
1669
00:51
or in any way communicate what you find to the others.
15
51903
3901
00:55
No marking the boxes, shouting, nothing.
16
55804
3770
00:59
If each one of you can find your own instrument,
17
59574
2571
01:02
then you can play tonight.
18
62145
1860
01:04
Otherwise, the label is dropping you.
19
64005
2999
01:07
You have three minutes to think about it before we start.
20
67004
3790
01:10
The band is in despair.
21
70794
1540
01:12
After all, each musician only has a 50% chance of finding their instrument
22
72334
4520
01:16
by picking five random boxes.
23
76854
2480
01:19
And the chances that all ten will succeed are even lower -
24
79334
3316
01:22
just 1 in 1024.
25
82650
3124
01:25
But suddenly, the drummer comes up with a valid strategy
26
85774
2690
01:28
that has a better than 35% chance of working.
27
88464
4580
01:33
Can you figure out what it was?
28
93044
2700
01:35
Pause the video on the next screen if you want to figure it out for yourself!
29
95744
8021
01:43
Answer in: 3
30
103765
1449
01:45
Answer in: 2
31
105214
1001
01:46
Answer in: 1
32
106215
1430
01:47
Here's what the drummer said:
33
107645
1640
01:49
Everyone first open the box with the picture of your instrument.
34
109285
3771
01:53
If your instrument is inside, you're done.
35
113056
2319
01:55
Otherwise, look at whatever's in there,
36
115375
2180
01:57
and then open the box with that picture on it.
37
117555
2880
02:00
Keep going that way until you find your instrument.
38
120435
3070
02:03
The bandmates are skeptical,
39
123505
1650
02:05
but amazingly enough, they all find what they need.
40
125155
3070
02:08
And a few hours later, they're playing to thousands of adoring fans.
41
128225
3871
02:12
So why did the drummer's strategy work?
42
132096
2559
02:14
Each musician follows a linked sequence
43
134655
2630
02:17
that starts with the box whose outside matches their instrument
44
137285
3660
02:20
and ends with the box actually containing it.
45
140945
4060
02:25
Note that if they kept going, that would lead them back to the start,
46
145005
3500
02:28
so this is a loop.
47
148505
1601
02:30
For example, if the boxes are arranged like so,
48
150106
2819
02:32
the singer would open the first box to find the drums,
49
152925
3109
02:36
go to the eighth box to find the bass,
50
156034
2231
02:38
and find her microphone in the third box,
51
158265
2800
02:41
which would point back to the first.
52
161065
2821
02:43
This works much better than random guessing
53
163886
2589
02:46
because by starting with the box with the picture of their instrument,
54
166475
3349
02:49
each musician restricts their search to the loop that contains their instrument,
55
169824
4611
02:54
and there are decent odds, about 35%,
56
174435
3401
02:57
that all of the loops will be of length five or less.
57
177836
4441
03:02
How do we calculate those odds?
58
182277
1648
03:03
For the sake of simplicity, we'll demonstrate with a simplified case,
59
183925
3802
03:07
four instruments and no more than two guesses allowed for each musician.
60
187727
5759
03:13
Let's start by finding the odds of failure,
61
193486
2841
03:16
the chance that someone will need to open three or four boxes
62
196327
3350
03:19
before they find their instrument.
63
199677
2048
03:21
There are six distinct four-box loops.
64
201725
2591
03:24
One fun way to count them is to make a square,
65
204316
3141
03:27
put an instrument at each corner,
66
207457
2169
03:29
and draw the diagonals.
67
209626
2161
03:31
See how many unique loops you can find,
68
211787
2830
03:34
and keep in mind that these two are considered the same,
69
214617
3490
03:38
they just start at different points.
70
218107
2030
03:40
These two, however, are different.
71
220137
2261
03:42
We can visualize the eight distinct three-box loops using triangles.
72
222398
4700
03:47
You'll find four possible triangles
73
227098
2350
03:49
depending on which instrument you leave out,
74
229448
2569
03:52
and two distinct paths on each.
75
232017
2931
03:54
So of the 24 possible combinations of boxes,
76
234948
3381
03:58
there are 14 that lead to faliure,
77
238329
2469
04:00
and ten that result in success.
78
240798
2600
04:03
That computational strategy works for any even number of musicians,
79
243398
5070
04:08
but if you want a shortcut,
80
248468
1380
04:09
it generalizes to a handy equation.
81
249848
3960
04:13
Plug in ten musicians, and we get odds of about 35%.
82
253808
4299
04:18
What if there were 1,000 musicians?
83
258107
2321
04:20
1,000,000?
84
260428
1370
04:21
As n increases, the odds approach about 30%.
85
261798
4400
04:26
Not a guarantee, but with a bit of musician's luck, it's far from hopeless.
86
266198
6030
04:32
Hi everybody, if you liked this riddle, try solving these two.
87
272228
3689
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