Thursday, December 19, 2013

Puzzlers: Robinhood and the Boolean Question

(Assembled using Microsoft Clip Art images)

Robinhood arrives at an crossroads, where he comes across two of the King's guards. One of the guards is loyal to the king's brother, Prince John, who will do anything that he can to stop Robinhood and his merry men, and the other is loyal to the king. The guard loyal to Prince John always lies to Robinhood and the guard loyal to the king always tells him the truth. The two guards agree to give Robinhood a 'yes' or 'no' answer to any one question that Robin asks either one of them. What question should Robin ask to determine which guard is which?

(Note: inspiration drawn from http://www.scientificpsychic.com/mind/mind1.html , which does not provide an answer that logically follows).

How is this relevant? This is logic. In digital circuit design, you often have to check that what you are reading is real. You don't know if something went wrong earlier in the calculation. You have to do something to check that what you are reading is real. This property is called parity. Similarly, when doing a science experiment and gathering data, it is not always clear that the data you are gathering is telling the truth. Odd things can interfere with measurements and give misleading data. You need to find techniques that can distinguish whether the data you are gathering tells the truth or not.

Note: An answer is provided in the comments. There are definitely others, as well (I can think of several different ones). Feel free to post your thoughts on additional answers.

Now, if only we had an answer to this question.
Source: XKCD comic 246 (Note: no link provided since not all comics are appropriate for children)

2 comments:

  1. You can ask either one of the guards whether he just agreed to answer a yes-or-no question. You already know that he already agreed to answer a yes-or-no question, so if he says no, you know he's lying. We often call these sanity checks. Really, you could ask anything you already know the answer to, such as, "is it true that on a cloudless early afternoon, the sky is blue?" or "Is my name Robinhood?" This is how many parity circuits work. For science experiments, also, you try to independently verify things and then compare that to what you just measured.

    ReplyDelete
  2. You could just ask him what his counterpart would tell you and do the opposite.

    ReplyDelete