(The gambler's ruin problem) Two gamblers, A and B, bet on the outcomes of successive ?ips of a coin. On each ?ip, if the coin comes up heads, A collects from B one unit, whereas if it comes up tails, A pays to B one unit. They continue to do this until one of them runs out of money. If it is assumed that the successive ?ips of the coin are independent and each ?ip results in a head ith probability p, what is the probability that A winds up with all the money if A starts with i units and B starts with N - i units?