Brain-Teaser 463: Betting prices
From The Sunday Times, 12th April 1970 [link]
In the third race, the bookmakers’ prices varied considerably and, in some cases, were unusual. At one time or another up to the start of the race, the odds quoted against one or more of the 9 horses were 2 to 1, 3 to 1, 4 to 1, and all other whole numbers to 1, up to and including 28 to 1 (i.e., 27 different prices in all).
Just before the “off” the Baron saw his chance. The prices then being offered by different bookmakers were such that, by staking a total of less than £100, and placing a whole number of pounds on each of the 9 runners he was able to ensure that, no matter which horse won, he would make an overall profit of exactly £13.
One horse was clear favourite. The other 8 were “paired” in the betting (i.e., there were 4 pairs, both horses in each pair being at the same price — the 4 prices all being different).
How much did the Baron stake in all, and what were the 5 prices at which he placed his bets?
This puzzle is included in the book Sunday Times Brain Teasers (1974).
[teaser463]
Jim Randell 6:58 am on 12 March 2019 Permalink |
This Python program collects together odds and stakes that would give the same winnings, and then looks for a collection of five that would give a profit of £13 as described.
It runs in 76ms.
Run: [ @repl.it ]
from collections import defaultdict from itertools import combinations from enigma import irange, printf # record bets = (odds, stake) by winnings d = defaultdict(list) # consider odds of "X to 1" for X in irange(2, 28): # if x pounds is bet... for x in irange(1, 99): # winnings are... w = x * (X + 1) if w < 22: continue if w > 112: break d[w].append((X, x)) # numbers of bets at lengthening odds ns = (1, 2, 2, 2, 2) # choose a collection of winnings and odds for (w, vs) in d.items(): # choose 5 different odds for bets in combinations(vs, len(ns)): # check the winnings = stake + profit if not (w == sum(n * x for (n, (_, x)) in zip(ns, bets)) + 13): continue # output solution printf("winnings = {w} -> (odds, stakes) = {bets}")Solution: The Baron staked bets totalling £71. The bets were placed at odds of: 3-1, 6-1, 13-1, 20-1, 27-1.
The bets were:
Giving a total stake of £71, and a total winnings of £84 should any single bet come in.
LikeLike