Three questions are enough, but the questions asked depend on the previous responses.
This chart has five questions, but only three questions are used in a single application.
(Q1) Is the other person a knight?
If yes then goto (Q2a)
If no then goto (Q2b)
(Q2a) Does two plus three equal five?
If yes then both are knights, goto (Q3a)
If no then both are liars, goto (Q3a)
(Q2b) Would the other person say Alex is a liar?
If yes then Alex is a knight and Bert is a liar, goto (Q3b)
If no then Bert is a knight and Alex is a liar, goto (Q3b)
(Q3a) Would the other person say you are Alex?
If yes then Alex responded, stop
If no then Bert responded, stop
(Q3b) Would the other person say you are Alex?
If yes then Bert responded, stop
If no then Alex responded, stop |