MathProblem 23 Fork in the road problem
作者:互联网
You are traveling down a path and come to a fork in the road. A sign lays fallen at the path indicating that one path leads to a village where everyone tells the truth and the other to a village where everyone tells lies. The sign has been knocked down so you do not know which path leads to which village. Then someone from one of the villages (you don't know which one) comes down the path from which you came. You may ask him one question to determine which path goes to which village. What question do you ask?
Solution
也是很经典的问题。我们可以问 "你是来自另一个村庄的吗"
- 如果是诚实的人,显然会回答 \(No\)
- 如果是撒谎的人,则会回答 \(Yes\)
由此便可以分辨出来
标签:Fork,everyone,question,MathProblem,sign,down,village,path,problem 来源: https://www.cnblogs.com/xinyu04/p/16549336.html