### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,115)
- misc (2)
- project euler (2)
- puzzle (29)
- site news (43)
- tantalizer (29)
- teaser (3)

### Site Stats

- 166,357 hits

Programming Enigma Puzzles

7 January 2013

Posted by on **From New Scientist #1176, 11th October 1979** [link]

“The figure”, said Professor Mortis, “shows a straight rod

XYof quite infinite rigidity and totally infinitesimal width which is too long to be pushed around the right-angled corner in the corridor. It came along armA, and it has got stuck on its way round into armB. Now if you measure the width of the arms in the figure and interpret them according to the scale so helpfully provided, you will know the exact width of each arm, won’t you? Both figures are an exact number of inches, right? Yes. And now you can tell me, can’t you, the length of the longest rod which will just go round the corner? It must of course be straight and rigid and widthless, and incidentally it is still so heavy that it has to be pushed along flat on the floor.”“Ten foot five,” I said.

“Perfectly right,” said he.

You can’t measure the figure as I did, because the figure shown here is only a rough copy of the professor’s; but can you tell me the width in inches of the arms

AandB?

[enigma34]

Advertisements

%d bloggers like this:

A bit of trigonometry and calculus, yields a surprisingly simple formula for the shortest permissible rod given the widths of the arms.

You can use Python floats to get a good approximate answer in 45ms, but here I’ve used SymPy to get an exact answer. It is somewhat slower though – it runs in 850ms.

Solution:Arm A is 27″. Arm B is 64″.This is a really nice enigma with the answer that [z^(1/3)]^2 = [(a^(1/3)]^2 + [(b^(1/3)]^2 so if we have any Pythagorean triple (p, q, r), then a = p^3, b = q^3 and z = r^3 will provide a solution, The triple in our case is the most well known one: (3, 4, 5).