Consider the following gambler's ruin problem: the gambler bets $1 on each play of a game. Each time, he has a probability p of winning and a probability q = 1 - p of losing the dollar bet. He will continue to play until he goes broke or nets a fortune of T dollars. Let Xn denote the number of dollars possessed by the gambler after the n-th play of the game. Then, Xn+1 = Xn + 1 with probability p and Xn+1 = Xn - 1 with probability 1 - p for 0 < Xn < T. Xn+1 = Xn for Xn = 0 or Xn = T. Xn is a Markov chain: the gambler starts with X0 dollars, where 0 < X0 < T.
(a) Construct the (one-step) transition matrix.
(b) Let T = 3 and p = 0.55. Find the probabilities of winning T dollars when the initial capital of the gambler is 1, ..., T - 1 dollars.
(c) For T = 3 and p = 0.45, find the probability of going bankrupt when the initial capital is 1, ..., T - 1 dollars.