Can you solve the virus riddle? - Lisa Winer

12,641,860 views ・ 2017-04-03

TED-Ed


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

00:08
Your research team has found a prehistoric virus
0
8173
2605
00:10
preserved in the permafrost
1
10778
1911
00:12
and isolated it for study.
2
12689
2481
00:15
After a late night working,
3
15170
1689
00:16
you're just closing up the lab when a sudden earthquake hits
4
16859
3630
00:20
and knocks out the power.
5
20489
1960
00:22
As the emergency generators kick in, an alarm confirms your worst fears:
6
22449
5000
00:27
all the sample vials have broken.
7
27449
3285
00:30
The virus is contained for now,
8
30734
2219
00:32
but unless you can destroy it,
9
32953
1593
00:34
the vents will soon open and unleash a deadly airborne plague.
10
34546
5526
00:40
Without hesitation, you grab your HazMat suit
11
40072
2568
00:42
and get ready to save the world.
12
42640
3610
00:46
The lab is a four by four compound of 16 rooms
13
46250
3791
00:50
with an entrance on the northwest corner and an exit at the southeast.
14
50041
4950
00:54
Each room is connected to the adjacent ones by an airlock,
15
54991
3421
00:58
and the virus has been released in every room except the entrance.
16
58412
4618
01:03
To destroy it, you must enter each contaminated room
17
63030
3010
01:06
and pull its emergency self-destruct switch.
18
66040
3440
01:09
But there's a catch.
19
69480
2060
01:11
Because the security system is on lockdown,
20
71540
2282
01:13
once you enter the contaminated room,
21
73822
2289
01:16
you can't exit without activating the switch,
22
76111
3469
01:19
and once you've done so,
23
79580
1490
01:21
you won't be able to go back in to that room.
24
81070
4331
01:25
You start to draw out possible routes on a pad of paper,
25
85401
3749
01:29
but nothing seems to get you to the exit
26
89150
2174
01:31
without missing at least one room.
27
91324
3086
01:34
So how can you destroy the virus in every contaminated room
28
94410
3931
01:38
and survive to tell the story?
29
98341
2391
01:40
Pause here if you want to figure it out for yourself.
30
100732
4860
01:45
Answer in: 3
31
105592
1444
01:47
Answer in: 2
32
107036
1854
01:48
Answer in: 1
33
108890
1953
01:50
If your first instinct is to try to graph your possible moves on a grid,
34
110843
3957
01:54
you've got the right idea.
35
114800
2160
01:56
This puzzle is related to the Hamiltonian path problem
36
116960
3350
02:00
named after the 19th century Irish mathematician William Rowan Hamilton.
37
120310
5181
02:05
The challenge of the path problem
38
125491
1559
02:07
is to find whether a given graph has a Hamiltonian path.
39
127050
4761
02:11
That's a route that visits every point within it exactly once.
40
131811
4270
02:16
This type of problem, classified as NP-complete,
41
136081
3460
02:19
is notoriously difficult when the graph is sufficiently large.
42
139541
4630
02:24
Although any proposed solution can be easily verified,
43
144171
3581
02:27
we have no reliable formula or shortcut for finding one,
44
147752
3709
02:31
or determining that one exists.
45
151461
2081
02:33
And we're not even sure if it's possible for computers
46
153542
2549
02:36
to reliably find such solutions, either.
47
156091
4260
02:40
This puzzle adds a twist to the Hamiltonian path problem
48
160351
3190
02:43
in that you have to start and end at specific points.
49
163541
4061
02:47
But before you waste a ton of graph paper,
50
167602
2600
02:50
you should know that a true Hamiltonian path
51
170202
2470
02:52
isn't possible with these end points.
52
172672
2699
02:55
That's because the rooms form a grid with an even number of rooms on each side.
53
175371
5812
03:01
In any grid with that configuration,
54
181183
2259
03:03
a Hamiltonian path that starts and ends in opposite corners is impossible.
55
183442
6780
03:10
Here's one way of understanding why.
56
190222
2609
03:12
Consider a checkerboard grid with an even number of squares on each side.
57
192831
4731
03:17
Every path through it will alternate black and white.
58
197562
3450
03:21
These grids will all also have an even total number of squares
59
201012
4690
03:25
because an even number times and even number is even.
60
205702
3951
03:29
So a Hamiltonian path on an even-sided grid that starts on black
61
209653
4590
03:34
will have to end on white.
62
214243
2240
03:36
And one that starts on white will have to end on black.
63
216483
3811
03:40
However, in any grid with even numbered sides,
64
220294
2858
03:43
opposite corners are the same color,
65
223152
2960
03:46
so it's impossible to start and end a Hamiltonian path on opposite corners.
66
226112
6641
03:52
It seems like you're out of luck,
67
232753
1981
03:54
unless you look at the rules carefully and notice an important exception.
68
234734
5910
04:00
It's true that once you activate the switch in a contaminated room,
69
240644
3860
04:04
it's destroyed and you can never go back.
70
244504
2779
04:07
But there's one room that wasn't contaminated - the entrance.
71
247283
4190
04:11
This means that you can leave it once without pulling the switch
72
251473
3521
04:14
and return there when you've destroyed either of these two rooms.
73
254994
4984
04:19
The corner room may have been contaminated
74
259978
2056
04:22
from the airlock opening, but that's okay
75
262034
2949
04:24
because you can destroy the entrance after your second visit.
76
264983
3635
04:28
That return trip gives you four options for a successful route,
77
268618
3970
04:32
and a similar set of options if you destroyed this room first.
78
272588
4566
04:37
Congratulations. You've prevented an epidemic of apocalyptic proportions,
79
277154
5601
04:42
but after such a stressful episode, you need a break.
80
282755
3414
04:46
Maybe you should take up that recent job offer to become a traveling salesman.
81
286169
4418
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