### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,367)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (48)
- site news (58)
- tantalizer (94)
- teaser (7)

### Site Stats

- 233,130 hits

Programming Enigma Puzzles

18 September 2019

Posted by on **From New Scientist #971, 16th October 1975 **[link]

“I say”, said young Tommy on Christmas morning, when we had each seen our own presents but no one else’s, “here is a poser based on the tea-strainer, bath hat, bath soap and gloves I gave Jane, Kate, Lucy and Maud. I shall now put three questions and each of the girls must give at least two true answers out of the three”.

He first asked, “Did I give you the tea-strainer?” and got the answers: Yes, Yes, No, No. Then he asked: “Did I give you something for the bath?”, getting the answers: Yes, No, Yes, No. The he asked: “Did I give you something to wear?”, getting the answers: No, Yes, Yes, Yes. (Answers are in alphabetical order of girls).

“Now”, he said to the rest of us, “I can tell you that exactly one girl is in a position to deduce what each other girl got. Can you tell me what each girl did get?”

Due to a typo in *New Scientist* this puzzle was published as **Tantalizer No 42**.

[tantalizer421]

%d bloggers like this:

This Python program runs in 108ms.

Run:[ @repl.it ]Solution:Jane got the bath soap; Kate got the tea-strainer; Lucy got the gloves; Maud got the bath hat.There are three assignments of gifts to girls where each of the girls gives at least 2 correct responses.

Lucy is always able to deduce what the other girls got knowing her own gift. But in one of the scenarios Maud will also be able to tell, and in another scenario both Jane and Kate can also tell. So the scenario where only Lucy can tell is the one we are interested in.