All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic > Liars and Knights
Fiancé Resolution (Posted on 2013-03-25) Difficulty: 3 of 5
Esther is engaged. Her fiancé is either Arthur, Barton, Claude, or Dexter.
  1. Each of the four men and Esther is a knight or a liar.
  2. Arthur says: "Exactly one of us four men is a knight."
  3. Barton says: "Exactly one of us four men is a liar."
  4. Claude says: "Arthur or Barton is Esther’s fiancé."
  5. Esther says: "My fiancé and I are either both knights, or both of us are liars."
Who is Esther's fiancé?

No Solution Yet Submitted by K Sengupta    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 7 |

FOR fiance = 1 TO 4
  FOR a = 0 TO 1
  FOR b = 0 TO 1
  FOR c = 0 TO 1
  FOR d = 0 TO 1
  FOR e = 0 TO 1
    totkt = a + b + c + d
    totliar = 4 - totkt
    IF (a = 1) = (totkt = 1) THEN
      IF (b = 1) = (totliar = 1) THEN
        IF (c = 1) = (fiance = 1 OR fiance = 2) THEN
          SELECT CASE fiance
            CASE 1
              f = a
            CASE 2
              f = b
            CASE 3
              f = c
            CASE 4
              f = d
          END SELECT
          IF (e = 1) = (e = f) THEN
            PRINT MID$("ABCD", fiance, 1), a; b; c; d; e
          END IF
        END IF
      END IF
    END IF
  NEXT
  NEXT
  NEXT
  NEXT
  NEXT
NEXT fiance

finds

B              0  1  1  1  0
B              0  1  1  1  1

meaning

Esther's fiance is Barton. Arthur is a liar. Everyone else is a knight, except for Esther, who could be either a liar or a knight.


  Posted by Charlie on 2013-03-25 11:29:29
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information