Can you solve the prisoner hat riddle? - Alex Gendler

29,345,917 views ・ 2015-10-05

TED-Ed


请双击下面的英文字幕来播放视频。

翻译人员: Chenxiao Qian 校对人员: Peipei Xiang
00:10
You and nine other individuals have been captured
0
10714
3128
你和其他九个人
被高智商的外星人统治者俘虏了。
00:13
by super intelligent alien overlords.
1
13842
3653
00:17
The aliens think humans look quite tasty,
2
17495
3312
他们觉得地球人看起来很好吃,
00:20
but their civilization forbids eating highly logical and cooperative beings.
3
20807
5326
但是他们的文明禁止他们吃 有很强逻辑性和合作性的生物。
不幸的是,他们不确定你们是否合乎标准,
00:26
Unfortunately, they're not sure whether you qualify,
4
26133
3698
00:29
so they decide to give you all a test.
5
29831
2922
所以他们决定给你们所有人一个测试。
00:32
Through its universal translator,
6
32753
1645
通过他们的“全宇宙通翻译“软件,
00:34
the alien guarding you tells you the following:
7
34398
3564
外星守卫告诉你以下信息:
00:37
You will be placed in a single-file line facing forward in size order
8
37962
5461
你们会被从高到矮排成一条直线,
这样每个人就可以看到站在前面的所有人,
00:43
so that each of you can see everyone lined up ahead of you.
9
43423
3921
你不能往后看或者走到线外。
00:47
You will not be able to look behind you or step out of line.
10
47344
3729
每个人的头上会有一顶白色或者黑色的帽子。
00:51
Each of you will have either a black or a white hat on your head
11
51073
4231
00:55
assigned randomly,
12
55304
1934
帽子的颜色是随机分配的,
00:57
and I won't tell you how many of each color there are.
13
57238
4017
而且我不会告诉你 每种颜色的帽子总共有几个。
01:01
When I say to begin, each of you must guess the color of your hat
14
61255
3819
当我说“开始”时, 每个人必须猜测自己帽子的颜色,
01:05
starting with the person in the back and moving up the line.
15
65074
4400
从最后一个人开始。
01:09
And don't even try saying words other than black or white
16
69474
3048
不要试图说除了黑或白以外的词,
01:12
or signaling some other way, like intonation or volume;
17
72522
4465
或者通过声调或音量等其他方式做出暗示,
01:16
you'll all be eaten immediately.
18
76987
2762
要不你们就会马上被吃掉。
01:19
If at least nine of you guess correctly, you'll all be spared.
19
79749
4368
如果至少九个人能猜对,你们就会被释放。
你们有五分钟的时间来商量,想出一个方案,
01:24
You have five minutes to discuss and come up with a plan,
20
84117
3126
01:27
and then I'll line you up, assign your hats, and we'll begin.
21
87243
4748
然后我会把你们排成一排, 分发帽子,然后就开始。
01:31
Can you think of a strategy guaranteed to save everyone?
22
91991
4051
你能想到一个绝对能救大家的计划吗?
暂停下视频,好好想想。
01:36
Pause the video now to figure it out for yourself.
23
96042
3095
倒计时:3、
01:39
Answer in: 3
24
99137
1017
2、
01:40
Answer in: 2
25
100154
1092
01:41
Answer in: 1
26
101246
1865
1。
01:43
The key is that the person at the back of the line
27
103111
2829
其实重点在于排在队尾的人,
01:45
who can see everyone else's hats can use the words "black" or "white"
28
105940
4554
他在看到其他所有人的帽子后
可以用黑白来传递加密信息。
01:50
to communicate some coded information.
29
110494
3378
01:53
So what meaning can be assigned to those words
30
113872
2668
那么我们应当在这些词上附加什么含义,
01:56
that will allow everyone else to deduce their hat colors?
31
116540
4202
以使得其他人可以推测他们帽子的颜色呢?
02:00
It can't be the total number of black or white hats.
32
120742
3367
首先不能是黑帽子或白帽子的总数,
那样可能的值就会超过两种。
02:04
There are more than two possible values,
33
124109
2763
02:06
but what does have two possible values is that number's parity,
34
126872
5016
但是数字的奇偶性恰好只有两种可能,
02:11
that is whether it's odd or even.
35
131888
3304
那就是奇数,或偶数。
所以,解决方案就在于第一个说的人——
02:15
So the solution is to agree that whoever goes first will,
36
135192
3816
举个例子,比如他看到了奇数个黑帽子, 他就要说“黑色”,
02:19
for example, say "black" if he sees an odd number of black hats
37
139008
4347
02:23
and "white" if he sees an even number of black hats.
38
143355
4432
当他看到了偶数个黑帽子时就要说“白色”。
02:27
Let's see how it would play out if the hats were distributed like this.
39
147787
4624
我们看下如果帽子颜色是这样分配的话, 这个策略执行起来如何。
最高的人看到前面有三个黑帽子,
02:32
The tallest captive sees three black hats in front of him,
40
152411
3018
02:35
so he says "black," telling everyone else he sees an odd number of black hats.
41
155429
5205
所以他说“黑色”, 告诉其他所有人他看到的是奇数个黑帽子。
02:40
He gets his own hat color wrong, but that's okay
42
160634
3372
他没有说对自己帽子的颜色,但是没关系,
因为所有被抓的人总共可以犯一个错误。
02:44
since you're collectively allowed to have one wrong answer.
43
164006
4280
第二高的人也看到奇数个黑帽子,
02:48
Prisoner two also sees an odd number of black hats,
44
168286
2754
02:51
so she knows hers is white, and answers correctly.
45
171040
4211
她就会知道她的是白色的,就答对了。
02:55
Prisoner three sees an even number of black hats,
46
175251
2793
第三个人看到前面是偶数个黑帽子,
02:58
so he knows that his must be one of the black hats
47
178044
3212
所以他知道他的一定是
前面两个人看到的其中一顶黑帽子。
03:01
the first two prisoners saw.
48
181256
2345
03:03
Prisoner four hears that and knows
49
183601
1736
第四个人听到后就知道
03:05
that she should be looking for an even number of black hats
50
185337
3241
她应当看到前面有偶数顶黑帽子,
03:08
since one was behind her.
51
188578
1932
因为其中一顶在她身后,
03:10
But she only sees one, so she deduces that her hat is also black.
52
190510
5655
但是她只看到了一个, 所以她推测出自己的也是黑帽子。
03:16
Prisoners five through nine are each looking for an odd number of black hats,
53
196165
4334
第五个人至第九个人每个都寻找奇数个黑帽子,
03:20
which they see, so they figure out that their hats are white.
54
200499
4728
他们找到了,所以他们推测 自己的帽子都是白色的。
现在到了站在最前面的你了,
03:25
Now it all comes down to you at the front of the line.
55
205227
3827
假如第九个人看到的是奇数个黑帽子的话,
03:29
If the ninth prisoner saw an odd number of black hats,
56
209054
3181
03:32
that can only mean one thing.
57
212235
2791
那就只有一种可能(最后一个人是黑帽子)。
你会发现这个策略 对所有的排列组合都是适用的。
03:35
You'll find that this strategy works for any possible arrangement of the hats.
58
215026
4372
03:39
The first prisoner has a 50% chance of giving a wrong answer about his own hat,
59
219398
5114
最开始的那个人有50%的几率出错,
03:44
but the parity information he conveys
60
224512
2309
但是他传达的奇偶性的信息
03:46
allows everyone else to guess theirs with absolute certainty.
61
226821
5199
让其他所有人都可以猜对自己帽子的颜色。
每个人在开始时都假定自己 应当在身前看到奇数或偶数个
03:52
Each begins by expecting to see an odd or even number of hats
62
232020
4015
03:56
of the specified color.
63
236035
2031
特定颜色的帽子,
如果他们的数字不对的话, 意味着他们自己的帽子就是那种特定的颜色。
03:58
If what they count doesn't match, that means their own hat is that color.
64
238066
4436
04:02
And everytime this happens,
65
242502
1634
每次这样的情况发生后,
04:04
the next person in line will switch the parity they expect to see.
66
244136
4747
下个人就知道他们需要看到 奇数还是偶数个特定颜色的帽子。
04:08
So that's it, you're free to go.
67
248883
1741
好了成功了,你们可以走了。
04:10
It looks like these aliens will have to go hungry,
68
250624
2408
看起来这些外星人只好饿肚子了,
04:13
or find some less logical organisms to abduct.
69
253032
3429
或者去找些其他逻辑差的生物来绑架。
关于本网站

这个网站将向你介绍对学习英语有用的YouTube视频。你将看到来自世界各地的一流教师教授的英语课程。双击每个视频页面上显示的英文字幕,即可从那里播放视频。字幕会随着视频的播放而同步滚动。如果你有任何意见或要求,请使用此联系表与我们联系。

https://forms.gle/WvT1wiN1qDtmnspy7