Disc Game Prize Fund
· Project Euler 121
Dynamic Programming / Probability · Difficulty 5/10 · 35 min
A player stakes £1 on 15 draws from a bag. The bag starts with two discs, one of each colour, red and blue. On each turn the player chooses a disc uniformly at random, records its colour, returns it to the bag, and adds one more red disc.
The player wins if blue appears strictly more often than red. A winner receives a whole-number prize in pounds that includes the original £1 stake. A losing player receives nothing. How large can the prize be if the banker must avoid an expected loss?