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

 Profession Pursuit (Posted on 2013-12-11)
The professions of Mr. Miller, Mr. Painter, Mr. Treasurer and Mr. Hunter are: a miller, a painter, a treasurer and a hunter. However, none of them has a name identifying their profession. They made four statements:
1. Mr. Miller is the hunter
2. Mr. Treasurer is the miller.
3. Mr. Painter is not the hunter.
4. Mr. Hunter is not the painter.
According to those statements, the painter must be Mr. Painter, but this cannot be correct. Three of the four statements are false.

Who is the treasurer?

 See The Solution Submitted by K Sengupta Rating: 3.0000 (1 votes)

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

DECLARE SUB permute (a\$)
CLS
a\$ = "mtph": h\$ = a\$
PRINT UCASE\$(h\$)
DO
ct = 0
IF MID\$(a\$, 1, 1) = "h" THEN ct = ct + 1: t = 1
IF MID\$(a\$, 2, 1) = "m" THEN ct = ct + 1: t = 2
IF MID\$(a\$, 3, 1) <> "h" THEN ct = ct + 1: t = 3
IF MID\$(a\$, 4, 1) <> "p" THEN ct = ct + 1: t = 4
good = 1
FOR i = 1 TO 4
IF MID\$(a\$, i, 1) = MID\$(h\$, i, 1) THEN good = 0: EXIT FOR
NEXT
IF ct = 1 AND good = 1 THEN PRINT a\$, t

permute a\$
LOOP UNTIL a\$ = h\$

finds

`MTPHthmp           3tmhp           2tphm           4`

where the initials of the surnames are in the heading and the initials of the professions are below. The column on the right states which statement is true for that set.

In all cases, the treasurer is Mr. Miller, though the other professions vary.

 Posted by Charlie on 2013-12-11 16:10:40

 Search: Search body:
Forums (0)