What is the probability of going bankrupt in roulette? Imagine that the bank has the money $M_1$ and the player has the money $M_2$.
The rules are the following: You win with a chance of $\frac{17}{36}$ and lose with $\frac{19}{36}$ each round. Now you are allowed to bet as much as you want. If you win, you get twice your money back and otherwise your money is gone. The question is: What is the probability of going bankrupt in this game?
I heard that the probability is surprisingly small to win this game, so I wanted to have a mathematical answer.
 A: Here is the step I cannot prove for you:
The best way of maximising the probability of winning is always to bet the maximum amount of money which is smaller than your goal. 
The reason behind is that the odds is against you so you should try to win as quickly as possible by making fewest bets possible. The intuition is the more money you bet, the more the bank edge plays out in its favour.. 
Let $f(a,b)$ be the probability of you winning with bank has $a$ and you have $b$, the probability of bank wins is $p=19/36$. Then, if you play optimally, $f$ satisfy the following condition:
If $a\geq b$, then 
$$f(a,b) = pf(a+b,0)+ (1-p)f(a-b,2b)= (1-p)f(a-b,2b)$$
since $f(a+b,0) = 0$.
If $a<b$
$$f(a,b) = pf(2a, b-a) +(1-p)f(0,b+a)=pf(2a, b-a) +(1-p)$$
since $f(0,a+b) = 1$.
You need to solve these equations to with boundary conditions $f(a+b,0) = 0$ and $f(0,a+b) = 1$. 
For $M_1$, $M_2$ integers and you can only bet in increment of 1, there is explict formulae here in example $4.3$. In these notes $M_2=N-i$ and $M_1=i$.
http://www.statslab.cam.ac.uk/~rrw1/oc/oc2013.pdf 
A: An answer depends also on your ultimate objective as well as your bet sizing and they are dependent.  The objective could be to play until you have doubled your money, play until your adversary is bankrupt, etc.
For comparison, if you bet one $1$ unit each round you can use the Gambler's Ruin solution where $M_1+M_2$ is your target:
$$P_{ruin} = \frac{(q/p)^{M_1+M_2}-(q/p)^{M_2}}{(q/p)^{M_1+M_2}-1}$$
Here $p = 17/36$ and $q = 19/36$. If you bet $x$ units each round you can use the same formula by replacing $M_1$ and $M_2$ with $M_1/x$ and $M_2/x$, respectively.
Unless your capital is comparable to that of the bank you will find that the probability of ruin is effectively $1$.  The optimal strategy to double your money is to bet everything at once with unfavorable odds.
With favorable odds look at the Kelly criterion.  
