Teaser 3027: Long shot
From The Sunday Times, 27th September 2020 [link] [link]
Callum and Liam play a simple dice game together using standard dice (numbered 1 to 6). A first round merely determines how many dice (up to a maximum of three) each player can use in the second round. The winner is the player with the highest total on their dice in the second round.
In a recent game Callum was able to throw more dice than Liam in the second round but his total still gave Liam a chance to win. If Liam had been able to throw a different number of dice (no more than three), his chance of winning would be a whole number of times greater.
What was Callum’s score in the final round?
[teaser3027]






Jim Randell 5:13 pm on 25 September 2020 Permalink |
This Python program runs in 49ms.
Run: [ @repl.it ]
from enigma import (multiset, subsets, irange, div, printf) # calculate possible scores with 1, 2, 3 dice fn = lambda k: multiset.from_seq(sum(s) for s in subsets(irange(1, 6), size=k, select="M")) scores = dict((k, fn(k)) for k in (1, 2, 3)) # choose number of dice for Liam and Callum (L < C) for (kL, kC) in subsets(sorted(scores.keys()), size=2): (C, L) = (scores[kC], scores[kL]) tL = len(L) # consider scores for Callum for sC in C.keys(): # and calculate Liam's chance of winning nL = sum(n for (s, n) in L.items() if s > sC) if nL == 0: continue # but if Liam had been able to throw a different number of dice, his # chance of winning would be a whole number of times greater (L < H) for (kH, H) in scores.items(): if not (kH > kL): continue tH = len(H) nH = sum(n for (s, n) in H.items() if s > sC) d = div(nH * tL, nL * tH) if d is None or not(d > 1): continue # output solution printf("Callum: {kC} dice, score = {sC} -> Liam: {kL} dice, chance = {nL} / {tL}") printf("-> Liam: {kH} dice, chance = {nH} / {tH} = {d} times greater") printf()Solution: Callum scored 10 in the final round.
The result of the first round was that Callum was to throw 3 dice, and Liam was to throw 2.
Callum scored 10 on his throw. Which meant that Liam had a chance to win by scoring 11 (two ways out of 36) or 12 (one way out of 36), giving a total chance of 3/36 (= 1/12) of winning the game.
However if Liam had been able to throw 3 dice, he would have had a total chance of 108/216 (= 1/2 = 6/12) of scoring 11 to 18 and winning the game. This is 6 times larger.
LikeLike