--------------------------------------------------------- I have , 30, dollars and I walk into a casino where I can stake any amount, up to my current capital. I owe, 80, dollars to a loan shark who would kill me if I don't give him my debt by, 20, rounds. The probability of winning my stake at each round is, 6/11 I will play by following the optimal strategy. Right now I have, 30, dollars and , 20, rounds left . I am staking, 7, dollars, my probability of staying alive is , 0.5337831559 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 23, dollars and , 19, rounds left . I am staking, 6, dollars, my probability of staying alive is , 0.4330745019 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 17, dollars and , 18, rounds left . I am staking, 6, dollars, my probability of staying alive is , 0.3383447300 Let's toss the loaded coin Yea, I won this round! Right now I have, 23, dollars and , 17, rounds left . I am staking, 7, dollars, my probability of staying alive is , 0.4250344033 Let's toss the loaded coin Yea, I won this round! Right now I have, 30, dollars and , 16, rounds left . I am staking, 8, dollars, my probability of staying alive is , 0.5171512550 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 22, dollars and , 15, rounds left . I am staking, 7, dollars, my probability of staying alive is , 0.4016511604 Let's toss the loaded coin Yea, I won this round! Right now I have, 29, dollars and , 14, rounds left . I am staking, 8, dollars, my probability of staying alive is , 0.4943792680 Let's toss the loaded coin Yea, I won this round! Right now I have, 37, dollars and , 13, rounds left . I am staking, 9, dollars, my probability of staying alive is , 0.5915521791 Let's toss the loaded coin Yea, I won this round! Right now I have, 46, dollars and , 12, rounds left . I am staking, 10, dollars, my probability of staying alive is , 0.6921372660 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 36, dollars and , 11, rounds left . I am staking, 9, dollars, my probability of staying alive is , 0.5686484832 Let's toss the loaded coin Yea, I won this round! Right now I have, 45, dollars and , 10, rounds left . I am staking, 10, dollars, my probability of staying alive is , 0.6705969942 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 35, dollars and , 9, rounds left . I am staking, 10, dollars, my probability of staying alive is , 0.5446816403 Let's toss the loaded coin Yea, I won this round! Right now I have, 45, dollars and , 8, rounds left . I am staking, 15, dollars, my probability of staying alive is , 0.6590734909 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 30, dollars and , 7, rounds left . I am staking, 20, dollars, my probability of staying alive is , 0.4656035502 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 10, dollars and , 6, rounds left . I am staking, 5, dollars, my probability of staying alive is , 0.1763055294 Let's toss the loaded coin Yea, I won this round! Right now I have, 15, dollars and , 5, rounds left . I am staking, 10, dollars, my probability of staying alive is , 0.2494613508 Let's toss the loaded coin Yea, I won this round! Right now I have, 25, dollars and , 4, rounds left . I am staking, 15, dollars, my probability of staying alive is , 0.3835803565 Let's toss the loaded coin Yea, I won this round! Right now I have, 40, dollars and , 3, rounds left . I am staking, 20, dollars, my probability of staying alive is , 0.5679939895 Let's toss the loaded coin #**?#@! I lost this round! Right now I have, 20, dollars and , 2, rounds left . I am staking, 20, dollars, my probability of staying alive is , 0.2975206612 Let's toss the loaded coin #**?#@! I lost this round! Tarnations! I died., and it took me, 19, rounds to die. This took, 1.061, seconds.