## The Coin Tossing Game

Two players pay a coin tossing game for money. If the coin shows heads, A wins ad if it shows tails, B wins. Draws are not possible. If each player starts with £2 and bets £1 on each throw, construct a transition matrix and find the probability that A will have lost all their money after at most 4 tosses.
If A has £0, then he cannot play, so will have \$0 for ever after.
If A has £1, then after 1 toss he will have either £0 or £2, each with probability 1/2, and £1, £3 or £4 with probability 0..
If A has £2, then after 1 toss he will have either £1 or £3, each with probability 1/2, and £0, £2 or £4 with probability 0..
If A has £4, then player B has £0, so cannot play and player A has £4 for ever after.
We can construct the table:
 A has\A has After 1 Toss £0 £1 £2 £3 £4 £0 1 0 0 0 0 £1 1/2 0 1/2 0 0 £2 0 1/2 0 1/2 0 £3 0 0 1/2 0 1/2 £4 0 0 0 0 1
The transition matrix is
$P= \left( \begin{array}{ccccc} 1 & 0 & 0 & 0 & 0 \\ 1/2 & 0 & 1/2 & 0 & 0 \\ 0 & 1/2 & 0 & 1/2 & 0 \\ 0 & 0 & 1/2 & 0 & 1/2 \\ 0 & 0 & 0 & 0 & 1 \end{array} \right)$
.
The four step transition matrix
$P^4$
will give us the probabilities of each player having an amount of money after 4 tosses. It is
$P^4= \left( \begin{array}{ccccc} 1 & 0 & 0 & 0 & 0 \\ 5/8 & 1/8 & 0 & 1/8 & 1/8 \\ 3/8 & 0 & 1/4 & 0 & 3/8 \\ 1/8 & 1/8 & 0 & 1/8 & 5/8 \\ 0 & 0 & 0 & 0 & 1 \end{array} \right)$
.
The answer is the entry in the third row (starting with £2) and fits column (ending up with £0) and is equal to 3/8.