### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,393)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (61)
- site news (62)
- tantalizer (105)
- teaser (7)
- today (1)

### Site Stats

- 244,211 hits

Programming Enigma Puzzles

9 September 2013

Posted by on **From New Scientist #1269, 3rd September 1981** [link]

Fred Betts noticed that there were nine runners in the big race and asked his bookie what odds he was offering.

“3-1 on Bonnie Lass, 4-1 on Golden Stirrup, 7-1 on Two’s a Crowd, 9-1 on Greek Hero and 39-1 the field,” he replied.

Fred thought for a few moments and then astounded the bookie by placing a bet on each of the nine horses, all to win. No each-way nonsense for fearless Fred. And all on credit, of course.

“You might as well give me my winnings now,” said Fred.

“The race hasn’t been run yet, sir,” smiled the bookie.

“That doesn’t matter,” said Fred. “When it has, you’ll owe me £200.”

And he was right.

How much did he stake on each horse?

[enigma125]

%d bloggers like this:

We derive a series of 5 equations in 5 variables (the stake for each of the odds). These can then be solved manually, or programatically.

We can use SymPy to get exact answers in 306ms.

or, we can use a numerical solver like PyMathProg to get the answer in 35ms.

Solution:The stakes were as follows: £250 on Bonnie Lass; £200 on Golden Stirrup; £125 on Two’s A Crowd; £100 on Greek Hero; £25 on each of the remaining five horses.