P765
projecteuler.net

Trillionaire

ℹ️Published on Saturday, 18th September 2021, 08:00 pm; Solved by 239;
Difficulty rating: 65%

Starting with 1 gram of gold you play a game. Each round you bet a certain amount of your gold: if you have $x$ grams you can bet $b$ grams for any $0 \le b \le x$. You then toss an unfair coin: with a probability of $0.6$ you double your bet (so you now have $x+b$), otherwise you lose your bet (so you now have $x-b$).

Choosing your bets to maximize your probability of having at least a trillion $(10^{12})$ grams of gold after $1000$ rounds, what is the probability that you become a trillionaire?

All computations are assumed to be exact (no rounding), but give your answer rounded to 10 digits behind the decimal point.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.