## Brain-Teaser 512

**From The Sunday Times, 4th April 1971** [link]

When I first met the Problem Setter, and let on that I was interested in his line of entertainment, he immediately told me that he had five nieces all going to the same primary school where each girl was entered on her fourth birthday and on each subsequent birthday morning was moved up into the next form.

Forms I-III were the Infants section to which they all still belonged. Tomorrow (Tuesday) one of the five would have a birthday, on Wednesday another.

Which?To get me going, he gave me their names in order of seniority and told me which niece would be in which form on Wednesday.

I said all I could usefully deduce from this was that Alice wasn’t one of the celebrants; I couldn’t be at all sure of any of the other four; I was aware, needless to say, that Alice, though younger than Emily, was older than Isabel, and that Olive was older than Ursula, but would I be right in guessing that Wednesday’s celebrant was older than Tuesday’s? (This necessitating that Ursula and Olive were currently in the same form).

When he said yes, I knew the answer, so …

Whose birthday [was on] on Tuesday, and whose [was] on Wednesday?

[teaser512]

## Jim Randell 11:47 am

on10 December 2019 Permalink |I did this one manually before I wrote a program.

This Python program looks at the girls in ascending age order, and the possible assignment of forms, such that the setter would be unable to deduce any celebrants, and only deduce one non-celebrant. From the information given we can then assign to the girls and verify the remaining conditions. It runs in 80ms.

Run:[ @repl.it ]Solution:Isabel’s birthday is on Tuesday. Olive’s birthday is on Wednesday.The order of the girls (youngest to oldest) is: I, U, A, O, E.

LikeLike