Heaven or Hell Puzzle

这篇文章介绍了如何在面对天堂和地狱双门,且只有一名诚实守信和一名说谎者的困境中,通过巧妙提问找到通往天堂的路径。关键策略是询问另一个守卫关于另一扇门通向天堂的回答。无论选择哪扇门,最终答案都会指向地狱,从而确定正确的道路。
摘要由CSDN通过智能技术生成

Puzzle

You are standing before two doors. One of the path leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who is the liar.

You can only ask one question to one of them in order to find the way to heaven. What is the question?

Solution

The question you should ask is “If I ask the other guard about which side leads to heaven, what would he answer?”. It should be fairly easy to see that irrespective of whom do you ask this question, you will always get an answer which leads to hell. So you can chose the other path to continue your journey to heaven.

This idea was famously used in the 1986 film Labyrinth.

Here is the explanation if it is yet not clear.

Let us assume that the left door leads to heaven.

If you ask the guard which speaks truth about which path leads to heaven, as he speaks always the truth, he
would say “left”. Now that the liar , when he is asked what “the other guard (truth teller) ” would answer, he would definitely say “right”.

Similarly, if you ask the liar about which path leads to heaven, he would say “right”. As the truth teller speaks nothing but the truth, he would say “right” when he is asked what “the other guard( liar ) ” would answer. So in any case, you would end up having the path to hell as an answer. So you can chose the other path as a way to heaven.

Another version of the question

The guard can only say yes or no to your answer.

Solution of the changed version

Then the answer should change to

  1. Point to any way, then ask one guard “if I ask the other guard whether the way towards to heaven, he would say yes, right?”
  2. If the answer is yes, then choose the other path.
  3. If the answer is no, choose the path you asked.

Here is the explanation:

Point to the heaven way

Let us assume you point to the left way, which is the heaven way.

Ask to the truth guard

If we ask the question to the truth guard, since the false guard would say no to the question “whether the way towards to heaven”, then the truch guard will also say no.

Ask to the false guard

If we ask the question to the false guard, since the truth guard will say yes to the question “whether the way towards to heaven”, the false guard will lie to the question we asked and say no.

Conclusion

Thus we can always get the no answer, then the way is the heaven way.

Point to the hell way

If we point to the way that is the hell way.

Ask to the truth guard

If we ask the question to the truth guard, since the false guard would say yes to the question “whether the way towards to heaven”, then the truch guard will also say yes.

Ask to the false guard

If we ask the question to the false guard, since the truth guard will say no to the question “whether the way towards to heaven”, the false guard will lie to the question we asked and say yes.

Conclusion

Thus we can always get the yes answer, then the opposite way we point to is the heaven way.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值