[Q22 – Q24] A gambler starts with $4 and plays a coin-flippi…

A gambler starts with $4 and plays a coin-flipping game, where: On each bet, the gambler wins $1 with probability 0.4 and loses $1 with probability 0.6. The game continues until the gambler either reaches $8 or loses all money ($0). Let us define a DTMC whose state corresponds to the gambler’s capital.