蓝眼睛与红眼睛(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 中有 ...
随机推荐
- .net core 认证与授权(一)
前言 .net core web并不是一个非常新的架构,很多文章提及到认证与授权这个过程,但是一般都会提及到里面的方法怎么用的,而不是模拟一个怎样的过程,所以我打算记录自己的理解. 什么是认证?我们大 ...
- QQ IP 地址查询相关
1.QQwry.dat格式分析和查询IP位置的PHP程序 以前的追捕数据库太大,而且很久没有更新了. 所以我想到利用QQwry.dat这个文件查询IP所在位置,QQwry.dat 在很多地方都能找到, ...
- js小练习---实现红绿灯
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- thinkphp3关闭Runtime中的日志方法
将LOG_LEVEL允许记录的日志级别设置为空,则不会记录日志
- 06-Spring03-事务管理
今日知识 1. Spring事务管理 2. 转账案例 Spring事务管理 1. 事务特性(ACID) 1. 原子性:整体 [原子性是指事务包含的所有操作要么全部成功,要么全部失败] 2. 一致性:数 ...
- javascript get set读取器
class Person{ constructor(name, id){ let _name = name, _id = id; Object.defineProperties(this, { nam ...
- 数据库主从监控脚本,数据传到influxdb
#!/bin/bash port=`/usr/sbin/ss -ntlp | | awk '{print $4}' | awk -F":" '{print $2}'` array= ...
- Python 实现转堆排序算法原理及时间复杂度(多图解释)
原创文章出自公众号:「码农富哥」,欢迎转载和关注,如转载请注明出处! 堆基本概念 堆排序是一个很重要的排序算法,它是高效率的排序算法,复杂度是O(nlogn),堆排序不仅是面试进场考的重点,而且在很多 ...
- [dubbo 源码之 ]1. 服务提供方如何发布服务
服务发布 启动流程 1.ServiceConfig#export 服务提供方在启动部署时,dubbo会调用ServiceConfig#export来激活服务发布流程,如下所示: Java API: ` ...
- 10分钟快速搭建可用的springboot-web项目
搭建步骤 工具准备 1. IntelliJ IDEA(开发工具,简称idea) 2. JDK1.8+ 3. MAVEN 4. mysql(数据库) 5. redis(session储存) 创建步骤 S ...