The following paper treats your question: Gambler’s ruin probability - a general formula by Guy Katriel
In this paper you will find a formula giving the exact probability of ruin for any payoff distribution. This formula
is expressed in terms of the solutions in the complex unit disk of the equation p(z)=1, where p(z) is the generating function of the payoff distribution. In the example you mention
the function p(z) would be p(z)=0.6*z^41+0.4*z^(-43). The equation p(z)=1 will have
43 solutions in the unit disk of the complex plane (out of 84 solutions in all, since it is equivalent to a polynomial equation of degree 84), and the ruin probability can be
expressed in terms of these solutions by the formula given in the paper. Finding
these roots will require numerical computation using a mathematical software (for example wolfram alpha will do it).
I drew your transition matrix for you, to better visualize the situation:
Notice, of course, that there's no way to get to 20 dollars. It might as well be removed, but I wanted to put it there anyway.
I'll just explain what Tim did and how he did it, using the transition matrix.
First of all, let's define $\mu_i$ such that it is the expected number of "steps" to reach 0 dollars. Each "step" is simply a transition from 1 state (a circle) into another state (another circle).
So at $\mu_0$, we have $\mu_0 = 0$ because we're already there. The gambler is already ruined.
With just 1 dollar, we need to take 1 step either to state 0 or state 2. So whatever happens, our expected number of steps is always at least 1.
We therefore have $\mu_1 = p\mu_2 + (1-p)\mu_0 + 1$ because there is a $1-p$ chance to get to state 0, and a $p$ chance to get to state 2.
Generally, $\mu_n = p\mu_{n+1} + (1-p)\mu_{n-1} + 1$ which is exactly what Tim did. You can verify this on your diagram.
So with your $i$ ranging from 0 to 19 (we don't need to consider 20 since there is no way to get to it), you have 20 equations to define all your $\mu_i$ as well as 20 unknowns.
From here, it's only a matter of solving systems of equations. Tim showed a good shortcut though, so you probably want to do that instead.
Best Answer
Odds of 8 to 1 means that for every \$1 you wager, you could either
So from his 10 wins, he gets \$80, and from his 90 losses, he is down \$90. Net, he is down \$10.