### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,158)
- misc (2)
- project euler (2)
- puzzle (40)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,959 hits

Advertisements

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]

Advertisements

%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.