蓝眼睛与红眼睛(The blue-eyed islanders puzzle)
澳大利亚的华裔数学神童陶哲轩曾在网上贴出来一个问题 The blue-eyed islanders puzzle 让大家思考,逗大家玩儿。
说一个岛上有100个人,其中有5个红眼睛,95个蓝眼睛。这个岛有三个奇怪的宗教规则。
- 他们不能照镜子,不能看自己眼睛的颜色。
- 他们不能告诉别人对方的眼睛是什么颜色。
- 一旦有人知道了自己的眼睛颜色,他就必须在第二天中午自杀。
注:虽然题设了有5个红眼睛,但岛民是不知道具体数字的。(因为互相能看见,所有岛上的蓝眼睛的人知道岛上有红眼睛)
某天,有个旅行者到了这个岛上。由于不知道这里的规矩,所以他在和全岛人一起狂欢的时候,不留神就说了一句话:“你们这里有红眼睛的人。”
最后的问题是:假设这个岛上的人足够聪明,每个人都可以做出缜密的逻辑推理。请问这个岛上将会发生什么?
结果,岛上在第五天后,有5个人自杀,且都是红眼睛的人,请问为什么?
证明过程:
数学归纳
此问题的第一个答案是用数学归纳法得出的:如果这个岛上有N个红眼睛,那么在旅行者说这句话的第N天,他们全部都会自杀。具体到本题则是,在第5天,这个岛上的5个红眼睛会全部自杀。(尊重原题,补:其他蓝眼睛在红眼睛集体自杀后,知道自己的眼睛颜色,也跟着自杀)。
如果这个岛上只有 1 个红眼睛,其他人都是蓝眼睛。那么,当旅行者说了这句话之后,此人立刻就会知道自己是红眼睛,因为他看到的其他人都是蓝眼睛,他就会在当天自杀。即,当 n 取第一个值 n0 = 1 时,命题成立。
假设当这个岛上有 N 个红眼睛的时候,在旅行者说了这句话之后的第N天,这些红眼睛会全部自杀。
那么,当这个岛上有 N + 1 个红眼睛的时候,在每个红眼睛看来,岛上都确定有N个红眼睛,并等待着他们在第N天自杀。而在第N天,大家都没有自杀。所以一到第 N + 1 天,每个红眼睛都明白了这个岛上还有第 N + 1个红眼睛——他自己。于是大家都在第 N + 1 天自杀了。
所以命题得证:如果这个岛上有 N 个红眼睛,那么在旅行者说这句话的第 N 天,他们全部都会自杀。
穷举推理
如果上述证明还让人有疑惑的话,也可以改用穷举法来证明。
当岛上只有一个红眼睛的时候,在旅行者说完这句话的当天,他就会自杀。这个无疑。
当岛上有两个红眼睛的时候。在旅行者说完这句话的当天,这两个红眼睛都在等着对方自杀,但对方却没有自杀。于是在第二天他们立刻明白了自己也是红眼睛,于是在第二天一起自杀了。
以此往下推理,当岛上有三个红眼睛的时候。旅行者说完这句话,每个红眼睛都在等着第二天另外两个红眼睛集体自杀,但他们没有自杀。所以到了第三天,大家都明白了自己也是红眼睛,就一起自杀了。
如此类推下去。就得出了命题:如果岛上有N个红眼睛,那么在旅行者说完这句话后的第N天,这个N个红眼睛会一起自杀。具体到本题就是,到了第五天,这五个红眼睛一起自杀。
是悖论吗?
但是,实际想想,旅行者说了一句“这个岛上有红眼睛的人?” 而这个事实岛上人已经知道了,所以这个问题看似是一个悖论(paradox)。
共有知识与公共知识
其实,这个问题并不是一个悖论。
首先,岛上的人,一部分人心里都知道岛上有红眼睛的人(蓝眼睛的人能看到红眼睛的人,红眼睛的人能看到其他红眼睛的人(如果红眼睛的人数大于 1)),但是,每个人并不知道其他人是否已经知道这个岛上有红眼睛。旅行者的话,也就让大家都知道岛上有红眼睛的人,并且其他人也都知道这个事实。比如说,当只有一个红眼睛的人时,所有蓝眼睛的人都知道有红眼睛,但是红眼睛的人不知道。
- 共有知识: 所有人都知道的知识称为共有知识。
- 公共知识:1.知识是共有知识,2.所有人都知道其他人也知道这个知识。
Given that there has recently been a lot of discussion on this blog about this logic puzzle, I thought I would make a dedicated post for it (and move all the previous comments to this post). The text here is adapted from an earlier web page of mine from a few years back.
The puzzle has a number of formulations, but I will use this one:
There is an island upon which a tribe resides. The tribe consists of 1000 people, with various eye colours. Yet, their religion forbids them to know their own eye color, or even to discuss the topic; thus, each resident can (and does) see the eye colors of all other residents, but has no way of discovering his or her own (there are no reflective surfaces). If a tribesperson does discover his or her own eye color, then their religion compels them to commit ritual suicide at noon the following day in the village square for all to witness. All the tribespeople are highly logical and devout, and they all know that each other is also highly logical and devout (and they all know that they all know that each other is highly logical and devout, and so forth).
[Added, Feb 15: for the purposes of this logic puzzle, “highly logical” means that any conclusion that can logically deduced from the information and observations available to an islander, will automatically be known to that islander.]
Of the 1000 islanders, it turns out that 100 of them have blue eyes and 900 of them have brown eyes, although the islanders are not initially aware of these statistics (each of them can of course only see 999 of the 1000 tribespeople).
One day, a blue-eyed foreigner visits to the island and wins the complete trust of the tribe.
One evening, he addresses the entire tribe to thank them for their hospitality.
However, not knowing the customs, the foreigner makes the mistake of mentioning eye color in his address, remarking “how unusual it is to see another blue-eyed person like myself in this region of the world”.
What effect, if anything, does this faux pas have on the tribe?
The interesting thing about this puzzle is that there are two quite plausible arguments here, which give opposing conclusions:
[Note: if you have not seen the puzzle before, I recommend thinking about it first before clicking ahead.]
Argument 1. The foreigner has no effect, because his comments do not tell the tribe anything that they do not already know (everyone in the tribe can already see that there are several blue-eyed people in their tribe).
Argument 2. 100 days after the address, all the blue eyed people commit suicide. This is proven as a special case of
Proposition. Suppose that the tribe had n blue-eyed people for some positive integer n. Then n days after the traveller’s address, all n blue-eyed people commit suicide.
Proof: We induct on n. When n=1, the single blue-eyed person realizes that the traveler is referring to him or her, and thus commits suicide on the next day. Now suppose inductively that n is larger than 1. Each blue-eyed person will reason as follows: “If I am not blue-eyed, then there will only be n-1 blue-eyed people on this island, and so they will all commit suicide n-1 days after the traveler’s address”. But when n-1 days pass, none of the blue-eyed people do so (because at that stage they have no evidence that they themselves are blue-eyed). After nobody commits suicide on the day, each of the blue eyed people then realizes that they themselves must have blue eyes, and will then commit suicide on the day.
Which argument is valid? I won’t spoil it in this main post, but readers are welcome to discuss the solution in the comments. (Again, for those of you who haven’t seen the puzzle before, I recommend thinking about it first before reading the comments below.)
Added, Feb 12: It is undoubtedly true that the assumptions of this logic puzzle are highly unrealistic, and defy common sense. This however does not invalidate the above question, which is to resolve the fact that there are two separate and seemingly valid arguments which start with the same hypotheses but yield contradictory conclusions. This fact requires resolution even if the hypotheses are extremely unlikely to be completely satisfied in any reasonable situation; it is only when the hypotheses are logically impossible to satisfy completely that there is no need to analyse the situation further.
[Update, Feb 10: wording of the puzzle clarified. (My original version, which did not contain the last parenthetical of the first paragraph, can be found on my web page; it had an unexpectedly interesting subtlety in its formulation, but was not the puzzle I had actually intended to write. See also this formulation of the puzzle by xkcd.)]