难度很大的逻辑题

来源:互联网 发布:去马赛克软件安卓版 编辑:程序博客网 时间:2024/04/16 15:06

难度很大的逻辑题

The Hardest Logic Puzzle Ever

The Puzzle:

Three gods A, B, and C are called, in some order, True, False, and
Random. True always speaks truly, False always speaks falsely, but whether Random
speaks truly or falsely is a completely random matter. Your task is to determine the
identities of A, B, and C by asking three yes-no questions; each question must be
put to exactly one god. The gods understand English, but will answer all questions
in their own language, in which the words for "yes" and "no" are "dam and "ja," in
some order. You do not know which word means which.

Some clarifications:

1) It could be that some god gets asked more than one question (and hence that
some god is not asked any question at all).
2) What the second question is, and to which god it is put, may depend on the answer to the first question. (And of course similarly for the third question)
3) Whether Random speaks truly or not should be thought of as depending on the flip of a coin hidden in his brain: if the coin comes down heads, he speaks truly; if tails,

falsely.
4) Random will answer dam or ja when asked any yes-no question.
5) They know each other, i.e. they know which of them is "True", which is "Random", etc.

 


有三个精灵,其中一个只说真话,一个只说假话,一个随机的说真话或假话,它们之间互相认识。
你能否通过问它们三个问题以确定它们的身份。
精灵对问题的回答将是“是”和“否”,精灵能够听懂你的语言, 但是你不懂精灵的语言,精灵回答“dam”或者“ja”表示“是”或者“否”,你要根据自己的判断确定哪个是代表是,哪个代表否。
每个问题只能向一个精灵提问,但一个精灵可以被提问两次。


网上搜来的《补充说明》:

这是逻辑学家和难题制作大师Raymond Smullyan制作了一道逻辑难题,被称为迄今最难的逻辑题。 计算机科学家 John McCarthy 进一步加大该题的难度:精灵的语言中哪个词表示“是”,哪个词表示“

否”是未知的。
George Boolos 是麻省理工学院哲学教授和“Provability Logic”的创始人之一,《The Logic of Provability》一书的作者。该题在Boolos的书《逻辑,逻辑,逻辑》的第29章。(1998年哈佛大学出版

社出版)。

 

 

 

 

 


=================
Ask A: C is random xor dam means yes
Dam:
  Ask B: A is random xor dam means yes
  Dam:
    Ask B: B is true xor dam means yes
    Dam:rft Ja:rtf
  Ja:
    Ask B: B is true xor dam means yes
    Dam:tfr Ja:ftr
Ja:
  Ask C: A is random xor dam means yes
  Dam:
    Ask C: C is true xor dam means yes
    Dam:trf Ja:frt
  Ja:
    Ask C: C is true xor dam means yes
    Dam:rtf Ja:rft

 

原创粉丝点击