### 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,129 hits

Programming Enigma Puzzles

28 November 2012

Posted by on **From New Scientist #2642, 9th February 2008**

The five children Ann, Ben, Con, Den and Ern are of different ages. Three of them are honest but the other two always lie.

Ben said to Ern “I am younger than you”, and in fact there are exactly 12 choices of

XandYsuch thatXcould say that toY.Ten of the 12 are:

Ben to Ern,

Con to Ann,

Con to Ben,

Con to Den,

Con to Ern,

Den to Ben,

Den to Con,

Den to Ern,

Ern to Ann,

Ern to Den.List the five children in increasing order of age.

[enigma1480]

%d bloggers like this:

The following Python program runs in 51ms.

Solution:The list of children in increasing order of age is: Con, Em, Ben, Den, Ann.