Discrete Math’s Guess Scenario

discrete mathematicslogic

I recently came across a question while doing discrete math's and got stuck. How would I go about to solve this question?

Inhabitants of an island on which there are two kinds of people: knights who always tell
the truth and knaves who always lie. You arrive at a fork in the road and need to choose the
correct path that leads to your destination. There are two people standing at the fork, and you
know that one must be a knight and the other must be a knave. What single question could you
ask to one of the people to determine the correct path, A or B? Explain your answer.

I have tried multiple scenarios but I can't seem to get it right no matter what I think of. Kindly Help will be highly appreciated in this case.

Best Answer

Choose any one of the paths and ask $A$ the following question: "If I ask $B$ whether this is the correct path what will $B$ answer?"

If $A$ replies "No", then you will know that the path you have chosen is the correct path. Otherwise if $A$ replies "Yes", then you will know that the path you have chosen is the wrong path and the other path is the correct one.

This is because if $A$ is a knight, then $B$ is a knave. $A$ replies "No" means that when asked whether the path you have chosen is the correct one, $B$ will say "No", which implies that the path you have chosen is indeed the correct one, because $B$ always lies. If $A$ replies "Yes", means that when asked whether the path you have chosen is the correct one, $B$ will say "Yes", which implies that the path you have chosen is the wrong one.

If $A$ is a knave, then $B$ is a knight. $A$ replies "No" means, when asked whether the path you have chosen is the correct one, $B$ will reply "Yes", and as $B$ always tells the truth, the path you have chosen is indeed the correct one. If $A$ replies "Yes", it means that when asked whether the path you have chosen is the correct one, $B$ will reply "No", which implies that the path you have chosen is the wrong one.

Related Question