返回题库

岔路口

Diverging Roads

专题
Brainteaser / 脑筋急转弯
难度
L2

题目详情

一位孤独的旅行者想去拜访一位智者。途中他来到一个岔路口,一条路通向丛林,另一条路通向智者。岔路口站着两个矮人,其中一个永远说真话,另一个永远说谎(但你不知道谁是谁)。

你能否只向其中任意一个矮人问一个是非题,就找出通往智者的路?如果可以,该问什么?如果不可以,为什么?

A lone traveler seeks to visit a sage. Along his journey he arrives at a fork in the road, where one path leads to the jungle and the other leads to the sage. At the fork in the road stand two dwarfs. One of the dwarfs always says the truth, the other always lies (but you don't know who says the truth and who lies). Is it possible to find the path that goes to the sage by asking one yes/no question to either dwarf? If yes, what question? If no, why?

解析

这个问题的一种解法是:向任意一个矮人问“另一个矮人会不会说左边这条路通向智者?”

如果左边这条路确实通向智者,那么会有两种情况:

  1. 你问到的是说真话的矮人:他的回答会是“不会”,因为那个说谎的矮人会回答“不”。
  2. 你问到的是说谎的矮人:他的回答也会是“不会”,因为那个说真话的矮人其实会回答“会”,而他说谎时会说“不会”。

因此,只要任意一个矮人回答“不会”,你就知道左边这条路通向智者;否则,通往智者的路就在右边。


Original Explanation

One solution to this problem would be to ask either dwarf: "Would the other dwarf say that the left road leads to the sage?". In the case that the left road did lead to the sage, there are two possible scenarios:

  1. You ask the dwarf that tells the truth: In this case the dwarf's answer would be "no", because the dwarf that lies would answer no.
  2. You ask the dwarf that lies: In this case the dwarf's answer would be "no", because the dwarf that speaks the truth would answer yes.

Therefore, if either dwarf answers no, then you know that the road to the sage is indeed on the left. Otherwise, the road to the sage must be on the right.