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

Home > Logic > Liars and Knights
Find the killer (Posted on 2016-06-20) Difficulty: 3 of 5
British puzzle creator Hubert Phillips invented this genre of puzzle in the 1930s.

I have slightly modified a puzzle attributed to H.P. (a.k.a. Caliban).

One of five people is a murderer.
Here are their statements:
Bernie: Becky didn’t do it.
Benny: Betty did it.
Bella: Becky is innocent.
Betty: Becky did it.
Becky: I did not do it.

Can you identify the killer?

Given k people, including the killer, lied – provide your answers and reasoning for all possible values of k.

See The Solution Submitted by Ady TZIDON    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Only a pedantic comment on a formulation Comment 5 of 5 |
Does the statement in the puzzle "Given k people, including the killer, lied", presuppose that there exists at least one person who is lying? Principally, k could be zero ("Nobody lied, including the killer").
That's why the justification in Math Man's statement "Since the killer lied, Bernie did not do it" is maybe questionable. Because the justification for "since the killer lied" is not in that statement of the puzzle (as k could be zero) but follows automatically and trivially from: (a) There is a contradiction about Becky; and (b) there is a contradiction about Becky vs. Betty.
That's why there must be at least one liar and, therefore, why the killer must be among them. A presupposition out of the puzzle text would be unnecessary (as my comment certainly is).

Of course, I agree with the solutions that were given by the solvers before.

/*

| ?- solution(Bernie,Benny,Bella,Betty,Becky).

Becky = (1,0),
Bella   = (1,0),
Benny = (1,0),
Betty   = (0,1),
Bernie = (1,0) ? ;

Becky = (1,0),
Bella =   (1,0),
Benny = (0,1),
Betty =  (0,0),
Bernie = (1,0) ? ;

Becky = (0,1),
Bella =   (0,0),
Benny = (0,0),
Betty =  (1,0),
Bernie = (0,0) ? ;

no

*/   

s(1).                        % statement true
s(0).                        % statement false
k(1).                        % killer
k(0).                        % not killer

solution(bernie(S1,K1),benny(S2,K2),bella(S3,K3),
    betty(S4,K4),becky(S5,K5)) :-

    s(S1),s(S2),s(S3),s(S4),s(S5),
    k(K1),k(K2),k(K3),k(K4),k(K5),

    KillerSum is (K1+K2+K3+K4+K5),        % Only one killer
        KillerSum is 1,

    ( (S1=1) => (K5=0) ),                         % True statements
    ( (S2=1) => (K4=1) ),
    ( (S3=1) => (K5=0) ),
    ( (S4=1) => (K5=1) ),
    ( (S5=1) => (K5=0) ),

    ( (S1=0) => \+ (K5=0) ),                    % False statements
    ( (S2=0) => \+ (K4=1) ),
    ( (S3=0) => \+ (K5=0) ),
    ( (S4=0) => \+ (K5=1) ),
    ( (S5=0) => \+ (K5=0) ),

    TruthSum is (S1+S2+S3+S4+S5),

    (    (TruthSum < 5) =>                        % (k>0)->(killer=liar)

        ( (K1=1) => (S1=0) ),
        ( (K2=1) => (S2=0) ),
        ( (K3=1) => (S3=0) ),
        ( (K4=1) => (S4=0) ),
        ( (K5=1) => (S5=0) )
    ).
   



  Posted by ollie on 2016-11-18 19:42:06
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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