蓝眼睛与红眼睛(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 中有 ...
随机推荐
- 一、Django学习之连接与建立数据库
连接MySQL数据库 配置文件 找到DATABASES对应的设置,修改为MySQL的配置即可 DATABASES = { 'default': { 'ENGINE': 'django.db.backe ...
- 第一篇:CDH配置本地http服务
在我们安装cdh的时候,避免不了要安装一大堆软件,包括cm的服务器,hadoop的各种组件.这些组件的文件都比较大,所以我们会在本地配置一个http服务,以便于在安装cdh服务的时候能快速的安装完.本 ...
- 04讲基础篇:经常说的CPU上下文切换是什么意思(下)
具体分析 自愿上下文切换变多了,说明进程都在等待资源,有可能发生了 I/O 等其他问题: 非自愿上下文切换变多了,说明进程都在被强制调度,也就是都在争抢 CPU,说明 CPU 的确成了瓶颈: 中断次数 ...
- mysql 5.7中 count(0) count(*) count(主键) count(非空字段)效率比较
mysql count(0) count(*) count(主键) count(非空字段) 效率比较 写代码的时候经理在背后说了一句count(0)的效率高于count(*) ,索性全部测试了一下 结 ...
- sockaddr与sockaddr_in的关系
WIN7+VS2013 sockaddr // // Structure used to store most addresses. // typedef struct sockaddr { #if ...
- Visual Studio 2012 出现关于ActivityLog.xml错误的解决方案
由sp1升级sp2后出现的错误. devenv.exe /safemode启动下,就可以了 命令列參數 描述 /Command (devenv.exe) 啟動 IDE 並執行指定的命令. /Debug ...
- js笔记(2)--第一天记录
---恢复内容开始--- 模仿了网站的一个常见小功能,开关灯小功能. 代码: <!DOCTYPE html> <html lang="en"> <he ...
- [terminal]终端仿真程序
char * szCommAry[COMM_NUM]={ //屏幕属性命令,23 "\x1b[12h",//禁止本端回显,键盘数据仅送给主机 "\x1b[12l" ...
- Spark中的RDD和DataFrame
什么是DataFrame 在Spark中,DataFrame是一种以RDD为基础的分布式数据集,类似于传统数据库中的二维表格. RDD和DataFrame的区别 DataFrame与RDD的主要区别在 ...
- javascript 获取两点的像素距离
getPosLen(sdot, edot){//获取2点距离 /* 56 40 56 40 00 40 56 40 56 */ return parseInt(Math.sqrt(Math.pow(M ...