If the probability that in the process of repeatedly flipping a fair coin, one will encounter a continuous run of 5 heads, before one encounters a continuous run of 2 tails, can be represented by where and are coprime positive integers.
Find .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
A successful string is a sequence of H's and T's in which HHHHH appears before TT does. Each successful string must belong to one of the following three types:
(a) those that begin with T, followed by a successful string that begins with H;
(b) those that begin with H, HH, HHH, or HHHH, followed by a successfully string that begins with T.
(c) the string HHHHH.
Let P h denote the probability of obtaining a successful string that begins with H, and let P t denote the probability of obtaining a successful string that begins with T. The three types of winning strings allow us to build recursive relations in the backward direction. More precisely, a winning string of type
(a) is of the form of T H . . ., which can be mapped one-to-one to a winning string of the form H . . .. Thus, P t = 2 1 P h On the other hand, a winning string beginning with k (0 < k < 5) consecutive H's can also mapped one-to-one to a winning string beginning with T. It follows that
P h = ( 2 1 + 4 1 + 8 1 + 1 6 1 ) P t + 3 2 1
Solving the last two equations simultaneously, we find that
P h = 1 7 1
and
P t = 3 4 1
Thus the probability of obtaining five heads before obtaining two tails is
P h + P t = 3 4 3 .
So A+B = 37.