game theory - coin flipping game Lets say $2$ players $A$ and $B$ make a bet, who can have more money at the end after playing the following game:
a coin is flipped:
with $51\%$ probability it lands tails, with $49\%$ probability it lands heads
you win if it lands heads, where you get back your bet $\times 2$.
e.g. you bet $\$1$ and it lands heads, then you get back $\$2$
e.g. you bet $\$2$ and it lands tails, then you get back $\$0$
here are the rules to the bet between A and B (the winner of the bet wins $\$100000$):


*

*you both start with $\$100$ (given to you for free, you're not allowed to cash this out nor the money you make from the coin game)

*each player may play the game as many times as they want and bet as much as they want for each time they play the game

*player A must go first (player A plays the casino games as many times as he wants then decides to stop, after that, A can't play the game anymore)


obviously the optimal strategy for player $B$ involves playing until $B$ either goes bankrupt or has more money than $A$ (although it's not obvious what bet sizes to use).
what would be the optimal strategy for $A$?
 A: Once $A$ has finished playing, ending with an amount $a$, the strategy for $B$ is simple and well-known: Use bold play. 
That is, aim for a target sum of $a+\epsilon$ and bet what is needed to reach this goal exactly or bet all, whatever is less. As seen for example here, the probability of $B$ reaching this target is maximized by this strategy and depends only on the initial proportion $\alpha:=\frac{100}{a+\epsilon}\in(0,1)$. (Of course, $B$ wins immediately if $a<100$). While the function $p(\alpha)$ that returns $B$'s winning probability is fractal and depends on the dyadic expansion of the number $\alpha$, we can for simplicyity (or  a first approximate analysis) assume that $p(\alpha)=\alpha$: If the coin were fair, we would indeed have $p(\alpha)=\alpha$, and the coin is quite close to being fair. 
Also, we drop the $\epsilon$ as $B$ may chose it arbitrarily small. (This is the same as saying that $B$ wins in case of a tie).
In view of this, what should $A$ do?
If $A$ does not play at all, $B$ wins with probability $\approx 1$.
If $A$ decides to bet $x$ once and then stop, $B$ wins if either $A$ loses ($p=0.51$) and $B$ wins immediately or if $A$ wins $p=0.49$ and then $B$ wins (as seen above) with $p(\frac{100}{100+x})\approx \frac{100}{100+x}$. So if $A$ decides beforehand to play only once, she better bet all she has and thus wins the grand prize with probaility $\approx 0.49\cdot(1-p(\frac12))\approx \frac14$.
Assume $A$ wins the first round and has $200$. What is the best decision to do now?
Betting $x<100$ will result in a winning probability of approximately
$$0.49\cdot(1-\frac{100}{200+x})+0.51\cdot(1- \frac{100}{200-x}) $$
It looks like the best to do is stop playing (with winning probability $\approx\frac12$ now).
Alernatively, let us assume instead that $A$ employs bold play as well with a target sum $T>100$. Then the probability of reaching the target is $\approx \frac{100}{T}$, so the total probability of $A$ winning is approximately
$$ \frac{100}T\cdot(1-\frac{100}T)$$
and this is maximized precisely when $T=200$. 
This repeats what we suspect from above:

The optimal strategy for $A$ is to play once and try to double, resulting in a winning probability $\approx \frac14$.

Admittedly, the optimality of this strategy for $A$ is not rigorously shown and especially there may be some gains from exploiting the detailed shape of $B$'s winnign probability function, but I am pretty sure this is a not-too-bad approximation.
A: The best answer provided by marshall / Hagen von Eitzen on the comments of his answer:

That's a smart answer there ("Bold play to target that can be reached with probability $\frac12$") and even lets the deviation from linearity cancel itself out! And you may have misread the answer: With that value, $A$ wins with $\frac 14$ precisely (the $0.249999385$ were for bold play with target $196$ instead of $195.67803788$). – Hagen von Eitzen Jul 10 '13 at 13:16 

So, $A$ should not just play all in once, but use a bold play strategy to a goal that is reachable by $p=50\%$. If he loses, he lost, if he wins, the best strategy for B is to also bold play up to that goal, which he can reach with $p=50\%$ (since A and B start from the same money). So, A will win with exactly p=25%, and may play many times.
Note here $A$ may be forced to play fractional dollars.
A: 
what would be the optimal strategy for A?

Since the game has negative expectancy (-0.02 of the bet), the optimal strategy for A is not to play.
