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

Home > Logic
Impostor Identification (Posted on 2014-01-15) Difficulty: 3 of 5
An impostor's identity is being investigated. The impostor is known to be one of three people: Andy, Barry, or Cal. The three people make the following statements:

Andy
1. Cal is the impostor.
2. Barry's first statement is true.

Barry
1. I am not the impostor.
2. Andy is the impostor.

Cal
1. Andy's second statement is true.
2. Barry's second statement is false.

However, it is known that the impostor makes one true and one false statement but the truthfulness of the other two suspects is unknown.
Who is the impostor?

See The Solution Submitted by K Sengupta    
No Rating

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

DATA Andy,Barry,Cal
FOR i = 1 TO 3: READ n$(i): NEXT
FOR impost = 1 TO 3
   FOR a1 = 0 TO 1
   FOR a2 = 0 TO 1
   FOR b1 = 0 TO 1
   FOR b2 = 0 TO 1
   FOR c1 = 0 TO 1
   FOR c2 = 0 TO 1
     good = 1
     IF impost = 1 AND a1 = a2 THEN good = 0
     IF impost = 2 AND b1 = b2 THEN good = 0
     IF impost = 3 AND c1 = c2 THEN good = 0
     IF good THEN
       IF a1 <> ABS(impost = 3) THEN good = 0
       IF a2 <> b1 THEN good = 0
       IF b1 <> ABS(impost <> 2) THEN good = 0
       IF b2 <> ABS(impost = 1) THEN good = 0
       IF c1 <> a2 THEN good = 0
       IF c2 = b2 THEN good = 0
       IF good THEN
          PRINT n$(impost), a1; a2, b1; b2, c1; c2
       END IF
     END IF
   NEXT
   NEXT
   NEXT
   NEXT
   NEXT
   NEXT
NEXT impost

finds

Andy           0  1          1  1          1  0

meaning that Andy is the imposter, whose first statement is false and second statement is true. Barry's statements are both true and Cal's first is true and second is false.

 


  Posted by Charlie on 2014-01-15 12:41:58
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 (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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