蓝眼睛与红眼睛(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.所有人都知道其他人也知道这个知识。
The blue-eyed islanders puzzle
5 February, 2008 in diversions, math.GM, math.IT, math.LO | Tags: blue-eyed islander puzzle, common information, logic puzzle, mathematical induction
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.)]
蓝眼睛与红眼睛(The blue-eyed islanders puzzle)的更多相关文章
- IQ推理:红眼睛和蓝眼睛
题目: 有一个很古老的村子,这个村子的人分两种,红眼睛和蓝眼睛,这两种人并没有什么不同,小孩在没生出来之前,没人知道他是什么颜色的眼睛,这个村子中间有一个广 场,是村民们聚集的地方,现在这个村子只有 ...
- 用图来教你怎样用Photoshop蓝底转换红底
教你怎样用红底转换成蓝底.PS其实学了这个,你就可以在白底红底蓝底之间不同转变了. 第一步 第二步 第三步 第四步 最后给你们看看对比效果图
- Python给照片换底色(蓝底换红底)
环境要求 Python3 numpy函数库 opencv库 安装 下载适应版本的numpy函数库,我电脑是WIN10 64位,安装的函数库是 numpy-1.13.1+mkl-cp36-cp36m-w ...
- [No0000A3]护眼谎言大揭秘,选择正确的方式保护眼睛!
当眼睛因为过度劳累而状况频出的时候,许多人没有选择极目远眺.眼保健操.充分睡眠等简单易行的养眼方式,而是求助于各种护眼工具.于是,在视疲劳成为常见眼病之后,护眼市场产品层出不穷:护眼灯.眼贴.眼保仪. ...
- eclipse背景设置什么颜色缓解眼睛疲劳
eclipse背景设置什么颜色缓解眼睛疲劳 1.打开window->Preference,弹出Preference面板 2.展开General标签,选中Editors选项,展开. 3.选中 Te ...
- 教你用OpenCV 和 Python给证件照换底色(蓝底 <->红底->白底)
在我们的生活中常常要用到各种底色要求的证件电子照,红底.蓝底.或者白底,而假如你手上只有一种底色的证件照,你又不想再去拍又不会PS怎么办?今天教你们用OpenCV和Python给你的证件照换底色. P ...
- [听听音乐]love is blue
在朋友圈里听到这首歌,好像是中央台天气预报用过的背景音乐.百度了一下,大致如下: 1967年,在维也纳举行的欧洲电视歌唱大赛,卢森堡歌手薇基·琳德洛丝(Vicky Leandros)演唱了一首由彼埃尔 ...
- Red Team 指南-第1章 红队和红队概述
第1章 红队和红队概述 贡献者:Tony Kelly @infosectdk # 翻译者 BugMan 什么是红队?它来自哪里? 红队的起源是军事起源.人们意识到,为了更好地防御, 需要攻击自己的防御 ...
- 持续部署入门:基于 Kubernetes 实现蓝绿发布
前言 软件世界比以往任何时候都更快.为了保持竞争力,需要尽快推出新的软件版本,而不会中断活跃用户访问,影响用户体验.越来越多企业已将其应用迁移到 Kubernetes. 在 Kubernetes 中有 ...
随机推荐
- qt creator源码全方面分析(0)
本人主攻C++和Qt. 上两天刚研究完Qt install framework(IFW)应用程序安装框架. google没发现有正儿八经的官方文档的翻译,我就进行了翻译哈!! 系列文章具体见:http ...
- HTTP权威指南之URL与资源
前言 web基础中介绍了URI.URL与URN: URI是一类更通用的资源标识符,URL是它的一个子集: URI是一个通用的概念,它主要由URL与URN组成: URL是通过描述资源的位置来标识资源的, ...
- 对比PXC集群与主从架构在一致性上的区别
在上一篇文章中,已经完成了三节点PXC集群的搭建,现在搭建node3的从库node4,并且有如下测试: 搭建node3的从库,代号node4 测试1: 先断开node3节点,然后在node1构造数据, ...
- 20190708三人开黑CF模拟赛
7月8号晚上8点和两位巨佬开了一场虚拟cf: [Helvetic Coding Contest 2018 online mirror (teams allowed, unrated)] 我这么蔡,只A ...
- hive安装启动错误总结
错误一: Exception in thread "main" java.lang.NoClassDefFoundError: jline/console/completer/Ar ...
- 14、 NAT
私有IP地址段:10.0.0.0-10.255.255.255/8172.16.0.0-172.31.255.255/12192.168.0.0-192.168.255.255/16 NAT的必要性: ...
- ORA-12547: TNS: 丢失连接
今天服务器挂掉了,公司的人弄了一下,,把服务器修好了,,但是我本地链接数据库一直报这个ORA-12547: TNS: 丢失连接,是服务器上的TNS监听没有启动,需要重启一下,
- 机器学习(ML)七之模型选择、欠拟合和过拟合
训练误差和泛化误差 需要区分训练误差(training error)和泛化误差(generalization error).前者指模型在训练数据集上表现出的误差,后者指模型在任意一个测试数据样本上表现 ...
- 前端jQuery日历控件报错 $("#datepicker").datepicker is not a function
使用日历控件时,前端产生错误: $("#datepicker").datepicker is not a function 问题原因 前端在同一个页面,jQuery引入了两次. 解 ...
- [Redis-CentOS7]Redis字符串操作(二)
登录Redis # redis-cli 127.0.0.1:6379> 添加字符串 EX 超期时间60s 127.0.0.1:6379> set username 'leoshi' OK ...