# Consider the gambler’s ruin problem (Example 3.14) in which two gamblers play the game of “heads…

Consider the gambler’s ruin problem (Example 3.14) in which two gamblers play the game of “heads or tails.” Each time a fair coin lands heads up, player A wins \$1 from player B, and each time it lands tails up, player B wins \$1 from A. Suppose that, initially, player A has a dollars and player B has b dollars. We know that eventually either player A will be ruined in which case B wins the game, or player B will be ruined in which case A wins the game. Let T be the duration of the game. That is, the number of times A and B play until one of them is ruined. Find E(T).

Example 3.14

(Gambler’s Ruin Problem)

Two gamblers play the game of “heads or tails,” in which each time a fair coin lands heads up player A wins \$1 from B, and each time it lands tails up, player B wins \$1 from A. Suppose that player A initially has a dollars and player B has b dollars. If they continue to play this game successively, what is the probability that (a) A will be ruined; (b) the game goes forever with nobody winning?