哪扇门通向 Offer
Door to Offer
题目详情
有两扇门:一扇通往工作 offer,另一扇通往失败。每扇门前各有一名守卫,其中一人永远说真话,另一人永远说假话。你不知道谁是谁。
你只能向其中一名守卫问一个是/否问题。
如何保证选到通往 offer 的门?
There are two doors: one leads to your job offer, the other leads to failure. In front of each door is a guard. One guard always lies and the other always tells the truth. You do not know which guard is which, and you can ask only one yes/no question to one guard. How do you guarantee finding the correct door to the offer?
解析
可以问任意一名守卫:
“如果我问另一个守卫哪扇门通向 offer,他会指哪一扇?”
无论你问到真话者还是说谎者,对方给出的都会是“错误的那扇门”。因此你选择相反的门即可。
Original Explanation
Ask one guard: “Would the other guard say that you are standing in front of the offer door?” If the guard says "Yes," go to the other door; if the guard says "No," go to this door. By structuring the question about what the other guard would say, you effectively account for both possibilities (the truth-teller or liar).