When a process repeats identically after the first trial (a duel, a sequence of tosses, a game of rounds, a walk), let x be the unknown probability or expectation, condition on what happens on the very first step, and notice that one of the outcomes returns you to a state identical to the start, so x reappears on the right. Solve the resulting linear equation for x.
Trigger: the phrase "repeatedly", "until", "takes turns", "continues" with the same rules each time, or a state that resets after one move.
Instances: (i) first-throw conditioning for who-wins-first duels, giving fixed points like p+r−prp; (ii) expectation equations E=p(1+E)+⋯ where surviving the first step costs one trial and restarts the count; (iii) probability-generating-function form G(t)=a+bG(t)+ctG(t) when continuing the game re-enters the same distribution; (iv) first-two-tosses case split (HH, HT, TH, TT) for coin-pattern races, expressing each p∙ in terms of the others.
Linked questions (9)
STEP 2 2011 — Q12
Xavier and Younis are playing a match. The match consists of a series of games and each game consists of three points.
Xavier has probability p and Younis has probability 1−p of winning the first point of any game. In the second and third points of each game, the player who won the previous point has probability p and the player who lost the previous point has probability 1−p of winning the point. If a player wins two consecutive points in a single game, the match ends and that player has won; otherwise the match continues with another game.
Let w be the probability that Younis wins the match. Show that, for p=0, w=2−p1−p2. Show that w>21 if p<21, and w<21 if p>21. Does w increase whenever p decreases?
If Xavier wins the match, Younis gives him £1; if Younis wins the match, Xavier gives him £k. Find the value of k for which the game is `fair' in the case when p=32.
What happens when p=0?
Voir la correctionMasquer la correction
Part (i).
Within each game there are three points. Xavier wins point 1 with probability p; thereafter, whoever won the previous point wins the next with probability p, and loses it with probability 1−p. The match ends as soon as one player takes two consecutive points.
Tracing all game outcomes. Condition on who wins point 1.
*Xavier wins point 1* (probability p): - Xavier wins point 2 (prob p): sequence XX — Xavier wins the match. Overall probability p2. - Younis wins point 2 (prob 1−p): now Younis has the advantage. - Younis wins point 3 (prob p): sequence XYY — Younis wins. Probability p(1−p)⋅p=p2(1−p). - Xavier wins point 3 (prob 1−p): sequence XYX — neither player has two consecutive; the game is replayed. Probability p(1−p)2.
*Younis wins point 1* (probability 1−p): - Younis wins point 2 (prob p): sequence YY — Younis wins. Probability (1−p)p. - Xavier wins point 2 (prob 1−p): Xavier now has the advantage. - Xavier wins point 3 (prob p): sequence YXX — Xavier wins. Probability (1−p)2p. - Younis wins point 3 (prob 1−p): sequence YXY — replayed. Probability (1−p)3.
Collecting probabilities:P(Younis wins one game)=p2(1−p)+(1−p)p=p(1−p)(1+p),P(rematch)=p(1−p)2+(1−p)3=(1−p)2(p+(1−p))=(1−p)2.Recurrence. Since every game is identically distributed, w=P(Younis wins match) satisfiesw=p(1−p)(1+p)+(1−p)2⋅w.For p=0, rearrange using 1−(1−p)2=p(2−p):w=p(2−p)p(1−p)(1+p)=2−p(1−p)(1+p)=2−p1−p2.Comparing w with 21: computew−21=2(2−p)2(1−p2)−(2−p)=2(2−p)p−2p2=2(2−p)p(1−2p).For 0<p<1, the factor p>0 and 2−p>0, so the sign is determined entirely by (1−2p). Hence w>21 when p<21, and w<21 when p>21.
Monotonicity of w in p: differentiate:dpdw=(2−p)2−2p(2−p)+(1−p2)=(2−p)2p2−4p+1.The numerator vanishes at p=2−3≈0.27. For 0<p<2−3, the numerator is positive, so dpdw>0 — meaning w is increasing in p on this interval, i.e. decreasing p actually decreases w. Therefore no, w does not always increase when p decreases.
Part (ii).
With p=32:w=2−321−94=3495=125.For a fair game, Younis's expected gain is zero. He wins £k with probability 125 and pays £1 with probability 127:0=125k−127⟹k=57=1.4.Part (iii).
When p=0, the player who won the previous point wins the next with probability 0 — so the outcome of each point strictly alternates. Within every game, no player ever secures two consecutive points, so every game ends in a rematch. The rematch probability equals (1−p)2=1, confirming that the match never ends.
STEP 2 2013 — Q13
A biased coin has probability p of showing a head and probability q of showing a tail, where p=0, q=0 and p=q. When the coin is tossed repeatedly, runs occur. A {\em straight run} of length n is a sequence of n consecutive heads or n consecutive tails. An {\em alternating run} of length n is a sequence of length n alternating between heads and tails. An alternating run can start with either a head or a tail.
Let S be the length of the longest straight run beginning with the first toss and let A be the length of the longest alternating run beginning with the first toss.
Explain why P(A=1)=p2+q2 and find P(S=1). Show that P(S=1)<P(A=1).
Show that P(S=2)=P(A=2) and determine the relationship between P(S=3) and P(A=3).
Show that, for n>1, P(S=2n)>P(A=2n) and determine the corresponding relationship between P(S=2n+1) and P(A=2n+1). [You are advised {\em not} to use p+q=1 in this part.]
Voir la correctionMasquer la correction
Part (i).
An alternating run of length 1 means the first two tosses show the same face (so the alternation breaks immediately after the first toss). The probability isP(A=1)=p2+q2,since both tosses are heads (probability p2) or both tails (probability q2).
A straight run of length 1 means the first two tosses differ. The probability isP(S=1)=pq+qp=2pq.Now p2+q2−2pq=(p−q)2>0 since p=q, so P(S=1)<P(A=1).
Part (ii).
A straight run of length exactly 2 requires two identical tosses followed by a different one:P(S=2)=p2q+q2p=pq(p+q).An alternating run of length exactly 2 requires two alternating tosses followed by a repeat of the second:P(A=2)=pqq+qpp=pq2+qp2=pq(p+q).Hence P(S=2)=P(A=2).
For length 3: a straight run of length exactly 3 is three identical then one different, giving p3q+q3p. An alternating run of length exactly 3 is three alternating then a repeat of the third toss. The two patterns (starting with heads or tails) give p⋅q⋅p⋅p+q⋅p⋅q⋅q=p3q+q3p. Hence P(S=3)=P(A=3).
Part (iii).
For a straight run of length 2n: exactly 2n identical tosses then one different:P(S=2n)=p2nq+q2np=pq(p2n−1+q2n−1).For an alternating run of length 2n: the 2n tosses alternate, then the (2n+1)th matches the 2nth. A sequence of 2n alternating tosses starting with heads consists of n heads and n tails (since 2n is even, it ends on tails), and has probability pnqn; the next toss must be tails, contributing an extra factor q. By symmetry:P(A=2n)=pnqn⋅q+pnqn⋅p=pnqn(p+q).Now compute the difference:P(S=2n)−P(A=2n)=pq(p2n−1+q2n−1)−pnqn(p+q).Factoring out pq:=pq[p2n−1+q2n−1−pn−1qn−1(p+q)]=pq[pn−1(pn−qn)−qn−1(pn−qn)],where the last step uses p2n−1−pn−1qn=pn−1(pn−qn) and similarly for the q terms. Thus:P(S=2n)−P(A=2n)=pq(pn−1−qn−1)(pn−qn).Since p=q, both factors (pn−1−qn−1) and (pn−qn) are nonzero and have the same sign (both positive if p>q, both negative if p<q). Hence their product is strictly positive, andP(S=2n)>P(A=2n).For odd length 2n+1 (with n>1): a straight run gives P(S=2n+1)=p2n+1q+pq2n+1, whilst an alternating run of length 2n+1 has n+1 of the starting face and n of the other, ending on the starting face; the next toss repeats it. Computing both starting cases:P(A=2n+1)=pn+2qn+pnqn+2=pnqn(p2+q2).The difference is:P(S=2n+1)−P(A=2n+1)=pq(p2n+q2n)−pnqn(p2+q2).Grouping by pairing each term:=(pq⋅p2n−pn+2qn)+(pq⋅q2n−pnqn+2)=pn+1q(pn−1−qn−1)+qn+1p(qn−1−pn−1),=pq(pn−1−qn−1)(pn+1−qn+1).For n>1, both factors are nonzero with the same sign, so their product is strictly positive and P(S=2n+1)>P(A=2n+1).
STEP 2 2014 — Q13
A random number generator prints out a sequence of integers I1, I2, I3, …. Each integer is independently equally likely to be any one of 1, 2, …, n, where n is fixed. The random variable X takes the value r, where Ir is the first integer which is a repeat of some earlier integer.
Write down an expression for P˙(X=4).
Find an expression for P˙(X=r), where 2⩽r⩽n+1. Hence show that, for any positive integer n, n1+(1−n1)n2+(1−n1)(1−n2)n3+⋯=1.
Write down an expression for E˙(X). (You do not need to simplify it.)
Write down an expression for P˙(X⩾k).
Show that, for any discrete random variable Y taking the values 1, 2, \dots, N, E˙(Y)=k=1∑NP˙(Y⩾k). Hence show that, for any positive integer n, (1−n12)+(1−n1)(1−n22)+(1−n1)(1−n2)(1−n32)+⋯=0.
Voir la correctionMasquer la correction
Part (i).
For X=4, the first three integers must all be distinct, and the fourth must match one of the first three. The first integer is always new. The second must avoid the first (probability 1−n1), the third must avoid both previous (probability 1−n2), and the fourth must match one of the three already seen (probability n3). SoP(X=4)=(1−n1)(1−n2)n3.The same logic gives, for 2⩽r⩽n+1:P(X=r)=(1−n1)(1−n2)⋯(1−nr−2)⋅nr−1.Since X takes values in 2,3,…,n+1 and these events are exhaustive and mutually exclusive, ∑r=2n+1P(X=r)=1. Writing this out term by term recovers exactly the stated identity.
Part (ii).
Direct substitution into E(X)=∑r=2n+1r,P(X=r):E(X)=r=2∑n+1r(1−n1)⋯(1−nr−2)nr−1.Part (iii).
The event X⩾k means the first k−1 integers are all distinct. Integer j avoids the j−1 previous values with probability 1−nj−1, soP(X⩾k)=(1−n1)(1−n2)⋯(1−nk−2).(For k=2 this is an empty product, giving P(X⩾2)=1, which is correct since a repeat always occurs eventually.)
Part (iv).
For a discrete random variable Y taking values 1,2,…,N, write k⋅P(Y=k) as the sum of k copies of P(Y=k), one for each j∈1,2,…,k. ThenE(Y)=k=1∑Nk,P(Y=k)=k=1∑Nj=1∑kP(Y=k)=j=1∑Nk=j∑NP(Y=k)=j=1∑NP(Y⩾j).Apply this to X (which takes values 2,…,n+1, equivalently shifting: Y=X−1 takes values 1,…,n):E(X)=k=1∑n+1P(X⩾k)=1+k=2∑n+1P(X⩾k).Substituting the expression from part (iii) and equating with the formula from part (ii), both equal E(X). Their difference is zero:r=2∑n+1r,P(X=r)−k=1∑n+1P(X⩾k)=0.Expanding and regrouping — using the identity from part (i) to replace ∑P(X=r)=1 — the left-hand side rearranges to produce exactly the telescoping sum(1−n12)+(1−n1)(1−n22)+(1−n1)(1−n2)(1−n32)+⋯=0,as required.
STEP 3 2014 — Q13
I play a game which has repeated rounds. Before the first round, my score is 0. Each round can have three outcomes: \begin{compactenum}[1.] \item my score is unchanged and the game ends; \item my score is unchanged and I continue to the next round; \item my score is increased by one and I continue to the next round. \end{compactenum} The probabilities of these outcomes are a, b and~c, respectively (the same in each round), where a+b+c=1 and abc=0. The random variable N represents my score at the end of a randomly chosen game.
Let G˙(t) be the probability generating function of N.
Suppose in the first round, the game ends. Show that the probability generating function conditional on this happening is 1.
Suppose in the first round, the game continues to the next round with no change in score. Show that the probability generating function conditional on this happening is~G˙(t).
By comparing the coefficients of tn, show that G˙(t)=a+bG˙(t)+ctG˙(t). Deduce that, for n⩾0, P(N=n)=(1−b)n+1acn.
Show further that, for n⩾0, P(N=n)=(1+μ)n+1μn, where μ=E˙(N).
Voir la correctionMasquer la correction
Parties (i) et (ii).
La fonction génératrice des probabilités (FGP) de N est G(t)=E(tN)=∑n≥0P(N=n)tn.
Si le jeu se termine au premier tour (résultat 1, probabilité a), alors N=0 avec certitude, donc la FGP conditionnelle est E(t0)=1.
Si le jeu continue au premier tour sans changement de score (résultat 2, probabilité b), alors le score final est déterminé par les tours suivants, qui ont la même distribution que N entier. Donc la FGP conditionnelle est G(t).
Partie (iii).
Si le premier tour donne le résultat 3 (probabilité c), le score augmente de 1 et le reste du jeu est distribué comme N. Donc la FGP conditionnelle est t⋅G(t) (multiplication par t pour le score supplémentaire).
En combinant via la loi des probabilités totales sur le premier tour :G(t)=a⋅1+b⋅G(t)+c⋅t⋅G(t).On résout : G(t)(1−b−ct)=a, donc G(t)=1−b−cta.
Or 1−b=a+c (puisque a+b+c=1), donc G(t)=(a+c)(1−a+cct)a=a+ca⋅1−a+cct1.
Développement en série : pour n≥0,P(N=n)=[tn]G(t)=a+ca(a+cc)n=(a+c)n+1acn.Puisque a+c=1−b, on obtient bien P(N=n)=(1−b)n+1acn.
Partie (iv).
On calcule μ=E(N)=G′(1). En dérivant G(t)=1−b−cta :G′(t)=(1−b−ct)2ac,μ=G′(1)=(1−b−c)2ac=a2ac=ac.Donc c=aμ et a+c=a(1+μ). On substitue dans la formule de P(N=n) :P(N=n)=(a(1+μ))n+1a(aμ)n=an+1(1+μ)n+1an+1μn=(1+μ)n+1μn.Cette distribution géométrique (sur {0,1,2,…}) est entièrement déterminée par sa moyenne μ : la structure du jeu force une loi géométrique, quelle que soit la valeur précise de a, b, c (tant que μ=c/a est fixé).
STEP 2 2015 — Q12
Four players A, B, C and D play a coin-tossing game with a fair coin. Each player chooses a sequence of heads and tails, as follows:
\noindent Player A: HHT; Player B: THH; Player C: TTH; Player D: HTT. \noindent
The coin is then tossed until one of these sequences occurs, in which case the corresponding player is the winner.
Show that, if only A and B play, then A has a probability of 41 of winning.
If all four players play together, find the probabilities of each one winning.
Only B and C play. What is the probability of C winning if the first two tosses are~TT?
Let the probabilities of C winning if the first two tosses are HT, TH and HH be p, q and r, respectively. Show that p=21+21q.
Find the probability that C wins.
Voir la correctionMasquer la correction
Part (i). We want to show that if only A (HHT) and B (THH) play, then A wins with probability 41.
The key observation is that A's sequence begins with two heads. So before A can win, the game must produce HH somewhere. But once HH appears, the very next toss either gives A a T (completing HHT) or gives B the start of THH (if it is H — but then we now have HHH, and the next T wins for A, while if the next is H again... eventually we need a T). More directly: B's sequence THH requires a tail to appear at some point. The first tail in the sequence immediately puts us in a position where B just needs two consecutive heads. Indeed, once a tail has appeared, B wins as soon as two consecutive heads follow — and at that point A cannot yet have won (HHT requires two heads first, which would end the game via HHT only if a tail follows those two heads, but if a tail follows HH then A wins first). The race is therefore decided on the very first pair of tosses: if the game opens with HH (probability 41), then A wins on the very next tail; if the game opens with anything containing a tail first, B is guaranteed to win eventually. Hence P(A wins)=41.
Part (ii). With all four players, note that D (HTT) is the mirror image of B (THH) and C (TTH) is the mirror image of A (HHT) under the exchange of heads and tails. By symmetry, P(D)=P(B) and P(C)=P(A). From part (i) applied to A vs B alone, and using similar reasoning for C and D, each of A and C wins with probability 41 in any sub-game between their respective pairs. Since the four probabilities must sum to 1 and P(A)=P(C)=41 while P(B)=P(D), we get P(B)=P(D)=41. Each player wins with probability 41.
Part (iii). Now only B (THH) and C (TTH) play. If the first two tosses are TT, the sequence TTH is already two-thirds complete, and B still needs to build THH from scratch. In fact, after TT the only way B can win requires the sequence to not show a third T immediately — but any further T resets and extends C's partial match. A careful tree analysis shows C wins with certainty after TT opening, so P(C∣first two are TT)=1.
For the remaining cases, let p,q,r denote P(C wins) given the last two tosses were HT, TH, HH respectively. From position HT, the next toss is:H⇒last two are TH, probability q;T⇒last two are TT, probability 1.Hence p=21q+21(1)=21+21q, as required.
Similarly, from TH: toss H ⇒ last two HH (r); toss T ⇒ last two TT (1). So q=21r+21. From HH: toss H ⇒ last two HH (r); toss T ⇒B wins (sequence THH just completed), so probability 0 for C. Thus r=21r+0, giving r=0.
Back-substituting: q=21(0)+21=21, then p=21+21⋅21=43.
The overall probability that C wins is found by conditioning on the first two tosses (each equally likely with probability 41):P(C)=41(1)+41(p)+41(q)+41(r)=41(1+43+21+0)=41⋅49=169.
STEP 2 2018 — Q13
Four children, A, B, C and D, are playing a version of the game `pass the parcel'. They stand in a circle, so that ABCDA is the clockwise order. Each time a whistle is blown, the child holding the parcel is supposed to pass the parcel immediately exactly one place clockwise. In fact each child, independently of any other past event, passes the parcel clockwise with probability~41, passes it anticlockwise with probability 41 and fails to pass it at all with~probability 21. At the start of the game, child~A is holding the parcel.
The probability that child A is holding the parcel just after the whistle has been blown for the nth time is An, and Bn, Cn and Dn are defined similarly.
Find A1, B1, C1 and D1. Find also A2, B2, C2 and D2.
By first considering Bn+1+Dn+1, or otherwise, find Bn and Dn.
Find also expressions for An and Cn in terms of n.
Voir la correctionMasquer la correction
Part (i).
At the start, A holds the parcel. After one whistle, A keeps it with probability 21, passes it to B (clockwise) with probability 41, and passes it to D (anticlockwise) with probability 41. Child C cannot receive the parcel in a single step from A. Therefore:A1=21,B1=41,C1=0,D1=41.For n=2, each child can receive the parcel from either neighbour or retain it. The recurrence is An+1=21An+41Bn+41Dn (A receives from B clockwise or D anticlockwise, or keeps it), and similarly for B, C, D by cyclic symmetry. Substituting n=1:A2=21⋅21+41⋅41+41⋅41=41+161+161=83.B2=41A1+21B1+41C1=81+81+0=41.C2=41B1+21C1+41D1=161+0+161=81.D2=41C1+21D1+41A1=0+81+81=41.As a check, A2+B2+C2+D2=83+41+81+41=1. ✓
Part (ii).
The recurrences for B and D are:Bn+1=41An+21Bn+41Cn,Dn+1=41An+21Dn+41Cn.Adding these:Bn+1+Dn+1=21(An+Cn)+21(Bn+Dn).Since the four probabilities always sum to 1, we have An+Cn+Bn+Dn=1, so (An+Cn)+(Bn+Dn)=1. Writing sn=Bn+Dn, this gives:sn+1=21(1−sn)+21sn=21.So sn=Bn+Dn=21 for all n≥1.
By symmetry of the circle, B and D play identical roles relative to A: B is always one step clockwise from A, D always one step anticlockwise. Since B1=D1=41, the recurrences for B and D are identical for all subsequent n, so Bn=Dn for all n≥1. Combined with Bn+Dn=21:Bn=Dn=41for all n≥1.Now substitute into the recurrence for An:An+1=21An+41Bn+41Dn=21An+81.Rearranging: An+1−41=21!(An−41). The sequence (An−41) is geometric with ratio 21. At n=0, A0=1 (A starts with the parcel), so A0−41=43, giving:An=41+43⋅(21)n=41+2n+23.Finally, since An+Cn=1−21=21:Cn=21−An=41−2n+23.
STEP 2 2020 — Q11
A coin is tossed repeatedly. The probability that a head appears is p and the probability that a tail appears is q=1−p.
(i) A and B play a game. The game ends if two successive heads appear, in which case A wins, or if two successive tails appear, in which case B wins.
Show that the probability that the game never ends is 0.
Given that the first toss is a head, show that the probability that A wins is1−pqp.Find and simplify an expression for the probability that A wins.
(ii) A and B play another game. The game ends if three successive heads appear, in which case A wins, or if three successive tails appear, in which case B wins.
Show thatP(A wins∣the first toss is a head)=p2+(q+pq)P(A wins∣the first toss is a tail)and give a similar result for P(A wins∣the first toss is a tail).
Show thatP(A wins)=1−(1−p2)(1−q2)p2(1−q3).(iii) A and B play a third game. The game ends if a successive heads appear, in which case A wins, or if b successive tails appear, in which case B wins, where a and b are integers greater than 1.
Find the probability that A wins this game.
Verify that your result agrees with part (i) when a=b=2.
Voir la correctionMasquer la correction
Part (i).
For the game to go on indefinitely, the sequence of tosses must alternate forever: either HTHTHTHT… or THTHTHTHT… After 2n tosses, the probability of any specific alternating sequence is (pq)n, so the probability of an unending game is at most 2(pq)n. Since 0<p<1 implies 0<pq<1, we have (pq)n→0 as n→∞. Hence the probability the game never ends is 0.
Given the first toss is a head, A wins by completing a pair HH. The winning patterns are: H, THH, THTHH, THTHTHH, … Each extra cycle contributes a factor of qp (one tail then one head), soP(A wins∣H first)=p+qp⋅p+(qp)2p+⋯=pk=0∑∞(qp)k=1−pqp.Given the first toss is a tail, A cannot win immediately (a second tail would end the game); A's only hope is that the second toss is H, and then we need HH before TT. The winning patterns from here are HH, HTHH, HTHTHH, … givingP(A wins∣T first)=p2+(pq)p2+(pq)2p2+⋯=1−pqp2.Using the law of total probability:P(A wins)=p⋅1−pqp+q⋅1−pqp2=1−pqp2+qp2=1−pqp2(1+q).Part (ii).
Write PH for P(A wins∣first toss H) and PT for P(A wins∣first toss T).
Deriving the first equation. If the first toss is H: two more heads (HH) gives A an immediate win, probability p2. If the second toss is T, the game resets with T as the new "first" toss: A wins with probability PT. If the second and third tosses are HT, the game again resets from a T: probability pq, contributing pqPT. No other transitions are possible without ending the game. HencePH=p2+qPT+pqPT=p2+(q+pq)PT.Similarly, if the first toss is T: the next toss must be H (otherwise TT gives B a win on the third toss at latest). If the second toss is H, the game is at state H: probability p. If the second and third are TH, the game resets to H: probability qp. (Three tails in a row would mean B wins.) HencePT=pPH+qpPH=(p+pq)PH.Substituting the expression for PT into the equation for PH:PH=p2+(q+pq)(p+pq)PH⟹PH[1−(q+pq)(p+pq)]=p2⟹PH=1−pq(1+p)(1+q)p2.Then PT=p(1+q)PH=1−pq(1+p)(1+q)p3(1+q).
Computing P(A wins)=pPH+qPT:P(A)=1−pq(1+p)(1+q)p3+qp3(1+q)=1−(1−q)(1−p)(1+p)(1+q)p3(1+q+q2).Note p3=p2⋅p=p2(1−q) and 1+q+q2=1−q1−q3, so the numerator is p2(1−q3). The denominator is 1−(1−p2)(1−q2). HenceP(A wins)=1−(1−p2)(1−q2)p2(1−q3).Part (iii).
Now A needs a successive heads and B needs b successive tails. Using the same conditioning:PH=pa−1+q(1+p+p2+⋯+pa−2)PT=pa−1+q⋅1−p1−pa−1⋅(1−p)PT=pa−1+(1−pa−1)PT.PT=p(1+q+q2+⋯+qb−2)PH=p⋅1−q1−qb−1⋅(1−q)PH=(1−qb−1)PH.Substituting: PH=pa−1+(1−pa−1)(1−qb−1)PH, soPH[1−(1−pa−1)(1−qb−1)]=pa−1⟹PH=1−(1−pa−1)(1−qb−1)pa−1.Then PT=1−(1−pa−1)(1−qb−1)pa−1(1−qb−1), andP(A)=pPH+qPT=1−(1−pa−1)(1−qb−1)pa+qpa−1(1−qb−1)=1−(1−pa−1)(1−qb−1)pa−1(p+q−qb)=1−(1−pa−1)(1−qb−1)pa−1(1−qb).Verification with a=b=2: the formula gives 1−(1−p)(1−q)p(1−q2)=pqp(1−q)(1+q)=1−pqp2(1+q), matching part (i).
STEP 2 2021 — Q11
A train has n seats, where n≥2. For a particular journey, all n seats have been sold, and each of the n passengers has been allocated a seat.
The passengers arrive one at a time and are labelled T1,…,Tn according to the order in which they arrive: T1 arrives first and Tn arrives last. The seat allocated to Tr (r=1,…,n) is labelled Sr.
Passenger T1 ignores their allocation and decides to choose a seat at random (each of the n seats being equally likely). However, for each r≥2, passenger Tr sits in Sr if it is available or, if Sr is not available, chooses from the available seats at random.
(i) Let Pn be the probability that, in a train with n seats, Tn sits in Sn. Write down the value of P2 and find the value of P3.
(ii) Explain why, for k=2,3,…,n−1,P(Tn sits in Sn∣T1 sits in Sk)=Pn−k+1,and deduce that, for n≥3,Pn=n1(1+r=2∑n−1Pr).(iii) Give the value of Pn in its simplest form and prove your result by induction.
(iv) Let Qn be the probability that, in a train with n seats, Tn−1 sits in Sn−1. Determine Qn for n≥2.
Voir la correctionMasquer la correction
Part (i). With only two seats, T1 either takes S1 (leaving S2 free for T2) or takes S2 (so T2 has no choice but to sit elsewhere). Each happens with probability 21, giving P2=21.
For three seats, T3 sits in S3 precisely when S3 is still free on their arrival. There are two favourable scenarios: T1 takes S1 (then everyone follows their allocation), or T1 takes S2 and T2 then picks at random from {S1,S3} and chooses S1. ThusP3=31+31×21=31+61=21.Part (ii). Suppose T1 occupies Sk for some k∈{2,3,…,n−1}. Passengers T2,T3,…,Tk−1 each find their allocated seat free and sit in it without disruption. When Tk arrives, their seat Sk is taken, so they must choose uniformly at random from the remaining available seats. The available seats at that moment are S1,Sk+1,Sk+2,…,Sn — exactly n−k+1 seats — and the passengers still to be seated are Tk,Tk+1,…,Tn. This is structurally identical to a fresh problem with n−k+1 passengers, where Tk plays the role of the first passenger choosing at random. HenceP(Tn sits in Sn∣T1 sits in Sk)=Pn−k+1.Conditioning on where T1 sits and using the fact that each of the n seats is equally likely:Pn=n1k=1∑nP(Tn sits in Sn∣T1 sits in Sk).The k=1 term equals 1 (if T1 sits correctly, everyone does), and the k=n term equals 0 (T1 takes Sn, so Tn cannot). The remaining terms give Pn−k+1. Substituting r=n−k+1 (so r runs from 2 to n−1 as k runs from n−1 to 2):Pn=n1(1+r=2∑n−1Pr).Part (iii). We claim Pn=21 for all n≥2. From part (i), P2=P3=21.
Inductive step. Suppose P2=P3=⋯=Pk=21 for some k≥3. Then by the recurrence:Pk+1=k+11(1+r=2∑kPr)=k+11(1+(k−1)⋅21)=k+11⋅2k+1=21.By induction, Pn=21 for all n≥2.
Part (iv). We seek Qn=P(Tn−1 sits in Sn−1). Computing small cases: Q2=21 (T1 must choose S1), Q3=32 (T2 sits in S2 unless T1 took it), and a direct calculation gives Q4=32. The pattern suggests Qn=32 for n≥3.
By the same conditioning argument as part (ii), noting that if T1 sits in Sn−1 then Tn−1 cannot sit there (probability 0), and if T1 sits in Sn then the problem reduces with Tn effectively removed (probability 1), one obtains the recurrenceQn=n1(2+r=3∑n−1Qr),n≥4,with Q3=Q4=32.
Inductive step. Suppose Q3=⋯=Qk=32. ThenQk+1=k+11(2+(k−2)⋅32)=k+11⋅32(k+1)=32.Therefore Q2=21 and Qn=32 for all n≥3.
STEP 2 2021 — Q12
(i) A game for two players, A and B, can be won by player A, with probability pA, won by player B, with probability pB, where 0<pA+pB<1, or drawn. A match consists of a series of games and is won by the first player to win a game. Show that the probability that A wins the match ispA+pBpA.(ii) A second game for two players, A and B, can be won by player A, with probability p, or won by player B, with probability q=1−p. A match consists of a series of games and is won by the first player to have won two more games than the other. Show that the match is won after an even number of games, and that the probability that A wins the match isp2+q2p2.(iii) A third game, for only one player, consists of a series of rounds. The player starts the game with one token, wins the game if they have four tokens at the end of a round and loses the game if they have no tokens at the end of a round. There are two versions of the game. In the cautious version, in each round where the player has any tokens, the player wins one token with probability p and loses one token with probability q=1−p. In the bold version, in each round where the player has any tokens, the player's tokens are doubled in number with probability p and all lost with probability q=1−p.
In each of the two versions of the game, find the probability that the player wins.
Hence show that the player is more likely to win in the cautious version if 1>p>21 and more likely to win in the bold version if 0<p<21.
Voir la correctionMasquer la correction
Part (i). Suppose the probability of a draw is d=1−(pA+pB). Player A wins the match if they win the first game, or the first game is drawn and they win the second, and so on. This gives a geometric series:P(A wins)=pA+dpA+d2pA+⋯=1−dpA=pA+pBpA.Part (ii). When the match ends, the loser has won n games and the winner has won n+2, so the total is 2n+2, which is always even.
Think of the games in pairs. In each pair, either A wins both (probability p2), B wins both (probability q2), or they split one each (probability 2pq). Only the first two outcomes change the score gap; splitting leaves both players level and a fresh pair must be played. This is exactly the structure of part (i), with pA=p2 and pB=q2. Applying that result directly:P(A wins)=p2+q2p2.Part (iii).
Cautious version. The player begins with 1 token. To reach 4 tokens they must gain 3, and to lose they must reach 0. The cautious game changes the token count by ±1 each round.
After the first round the player either has 2 tokens (probability p) or 0 tokens (probability q, losing immediately). Conditional on surviving that first round, the player now needs to gain 2 more tokens before losing 2 — exactly the structure of part (ii) with the same p and q. So:P(cautious win)=p⋅p2+q2p2=p2+q2p3.Bold version. The player starts with 1 token. In each round their tokens are either doubled or all lost. To reach 4 tokens, they must double twice in a row (1 → 2 → 4); a single loss ends the game. There is only one winning path:P(bold win)=p2.Comparison. The cautious version is better whenp2+q2p3>p2.Dividing both sides by p2>0 and rearranging:p3−p2(p2+q2)>0⟹p2(p−(p2+q2))>0.Substitute q=1−p:p2+q2=p2+(1−p)2=2p2−2p+1,so the condition becomes p2(p−2p2+2p−1)>0, i.e.p2(−2p2+3p−1)>0⟹p2(2p−1)(1−p)>0.For 0<p<1 we have p2>0 and 1−p>0, so this holds if and only if 2p−1>0, i.e. p>21.
Conversely, for 0<p<21 we have 2p−1<0, so the inequality reverses and the bold version is more likely to win, as required.