Albert, Barney, and Curtis were questioned about the murder of Dwight. Evidence at the scene of the
crime indicated a lawyer might have been implicated in Dwight's murder. Each suspect made two statements, as follows:
- Albert said he was not a lawyer and that he did not kill Dwight.
- Barney said he was a lawyer and he did not kill Dwight.
- Curtis said he was not a lawyer and a lawyer killed Dwight.
The police subsequently discovered that only two of the statements quoted above were true, and only
one of the three suspects was not a lawyer.
Which of the suspects killed Dwight?
There are only 3 possibilities for who's not a lawyer and 3 for who's the killer, and for the 9 possible combinations there are 6 statements to evaluate for each possibility. I'd rather program my computer to evaluate all 9 sets of 6, and see which amount to two true statements out of the six:
n$(1) = "Albert "
n$(2) = "Barney "
n$(3) = "Curtis "
FOR notlaw = 1 TO 3
FOR k = 1 TO 3
true = 0
IF notlaw = 1 THEN true = true + 1: a1 = 1: ELSE a1 = 0
IF k <> 1 THEN true = true + 1: a2 = 1: ELSE a2 = 0
IF notlaw <> 2 THEN true = true + 1: b1 = 1: ELSE b1 = 0
IF k <> 2 THEN true = true + 1: b2 = 1: ELSE b2 = 0
IF notlaw = 3 THEN true = true + 1: c1 = 1: ELSE c1 = 0
IF k <> notlaw THEN true = true + 1: c2 = 1: ELSE c2 = 0
IF true = 2 THEN
PRINT "Lawyers: ";
FOR i = 1 TO 3
IF notlaw <> i THEN PRINT n$(i);
PRINT "Killer: "; n$(k)
PRINT "True statements: ";
IF a1 THEN PRINT "A1 ";
IF a2 THEN PRINT "A2 ";
IF b1 THEN PRINT "B1 ";
IF b2 THEN PRINT "B2 ";
IF c1 THEN PRINT "C1 ";
IF c2 THEN PRINT "C2 ";
As a result we find:
Lawyers: Albert Curtis
True statements: B2 C2
Posted by Charlie
on 2012-11-13 12:26:17