### 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 July 2018

Posted by on ** From New Scientist #1095, 23rd March 1978** [link]

At the time with which this story deals Alf, Bert, Charlie, Duggie and Ernie were living in separate houses in Men-only Mews.

It is useful for the managing director to know the address of his staff, but I’m afraid this information was not very easy to obtain.

However, I did manage to get some of them to tell me something:

Duggie said that the number of his house was three times the number of Bert’s.

Alf said that his number was odd, and was 23 more than Ernie’s.

Bert said that his number was nine less than Alf’s.

And Charlie said that his number was halfway between Bert’s and Duggie’s.

Men-only Mews has houses numbered from 1-50.

Find the numbers of all their houses.

[puzzle44]

%d bloggers like this:

This puzzle is straightforward analytically:

Houses are numbered from 1 to 50.

A is an odd-number, 23 more than E, so is limited to: [25, 27, 29, 31, …, 49] (13 possibilities).

And the corresponding values for E are: [2, 4, 6, 8, …, 26].

B is 9 less than A, so can be: [16, 18, 20, 22, …, 40].

And D is 3 times B, so can only be 48 (all other possibilities are more than 50). Giving: D=48, B=16, E=2, A=25.

All that’s left is to find C, which is midway between B and D, so is 32. And, as required, all the numbers are different.

Solution:Alf lives at 25, Bert at 16, Charlie at 32, Duggie at 48, Ernie at 2.A simple program also finds the solution:

Run:[ @repl.it ]