Question

Are there patterns A and B of heads and tails such A is longer than B, yet A appears before B more than half the time when a fair coin is being flipped? The textbook has already found one: A=TTHH and B=HHH, in exercise 8.59. The question is:

(1) are there other solutions?

(2) is there a generalized way to produce these solutions?

(3) prove or disprove: the length of A is just 1 more than that of B.

Answer

One Generalized Solution

Of course there are other solutions to this question, here is one of the generalized ways to produce these solutions:

A=TTHHHHn1B=HHHHn

Sequence B consists of n H’s, while sequence A consists of two T’s and n-1 H’s where n is greater than two.

Prove the Solution

We can notate the probation of sequence A and B appears as Sa and Sb, while the probation of other sequence which can’t be identified as A or B as N.

Then, we can get equations as follows:

1+N(H+T)=N+Sa+SbNB=Sb+n1i=1(Sa+Sb)HiNA=Sa

Obviously, H=T=12 when we consider a fair coin is being flipped. Finally, we can get Sb=1+2n122n+12n+1N and Sa=12n+1N.

When n is greater than 2, Sa is greater than Sb, which means A appears before B more than half the time.

Take A=TTHH and B=HHH as example, we find STTHH=116N and SHHH=5112N which check the result mentioned above.

Prove the Length Relation between A and B

As we have found one generalized way to produce sequence A and B where the length of A is just 1 more than that of B, we just need to disprove the existence of solution where the length of A is 2 or greater more than that of B.

To expand the solution proposed above, we modify the equations first:

1+N(H+T)=N+Sa+SbSbNBn1i=1(Sa+Sb)(H|T)i12NB12n1i=1Sa(H|T)iNASa

The first one is the same as before. The second one is limited to find the minimum of Sb. And the last one limits the maximum of Sa.

When the length of A is k more tan that of B, we notate |A|=k+n,|B|=n. Then we find

Sa12n+kNSb12n+1NSa(1212n)12n+1N12n+kN(1212n)=(12n+1+122n+k12n+k)N

Obviously, SbSaN1+2n+k12n+122n+k=N22n+k(1+2n+1(2k21)) which means Sb>Sa when k is euqal to or greater than 2.

As a result, we have proved the length of A is just 1 more than that of B.