Alright, let's tackle this problem step by step. I'm going to think about the game where A and B take turns tossing a fair coin, with A going first. The game ends when we see a Head followed by a Tail (HT), and the person who tossed the Tail wins. We need to find the probability that A wins the game.
Understanding the Problem
First, let's clarify the rules:
- Players alternate turns, with A going first.
- On each turn, the player tosses a fair coin (so Heads (H) or Tails (T) each with probability 1/2).
- The sequence of outcomes is recorded in order.
- The game ends as soon as we see an HT subsequence (i.e., a Head immediately followed by a Tail).
- The player who tossed the Tail in this HT sequence wins.
- We want to find the probability that A is the one who wins (i.e., A is the one who tosses the T in the first HT sequence).
Possible Sequences Leading to A's Win
Let's think about the sequences where A wins. For A to win, the HT sequence must occur with A tossing the T. This means that the T in HT must be on A's turn.
Given that A starts first, the turns alternate as A, B, A, B, A, B, ...
So, the positions where A tosses are odd-numbered tosses (1st, 3rd, 5th, ...), and B tosses are even-numbered tosses (2nd, 4th, 6th, ...).
For the HT sequence to have T on A's turn, the H must be on the previous turn, which would be B's turn (since A's turns are odd, the previous is even, hence B).
So, the HT sequence where A wins must have H tossed by B and T tossed by A immediately after.
This can happen in sequences like:
- B tosses H, then A tosses T: This is the sequence ... H (by B), T (by A) → A wins.
But we need to consider how we get to B tossing an H. The game starts with A's toss, so the sequence must start with A's toss, then B's, then A's, etc.
Let's enumerate some possible sequences where A wins:
-
A: T, B: H, A: T → Here, the first HT is B's H and A's T, so A wins.
- But wait, the sequence is T, H, T. The first HT is the second and third tosses (B's H and A's T), so A wins.
-
A: H, B: H, A: T → Sequence H, H, T. The first HT is B's H and A's T, so A wins.
-
A: H, B: T → Here, the sequence is H, T. The HT is A's H and B's T, so B wins. This is not A's win.
-
A: T, B: T → Sequence T, T. No HT yet, game continues to next tosses, but since the game ends at first HT, this would continue until HT appears.
From these examples, it seems that A wins if the first HT sequence has T on A's turn, which means H was on B's turn just before.
Modeling the Problem with States
To systematically calculate the probability, let's define states based on the last toss and whose turn it is next.
Define:
- ( P_A ): Probability that A wins when it's A's turn to toss, and the last toss (if any) is not relevant (i.e., no prior H is waiting for a T).
- ( P_{A|H} ): Probability that A wins when it's A's turn to toss, and the last toss was H (so if A tosses T now, A wins).
- ( P_{B|H} ): Probability that A wins when it's B's turn to toss, and the last toss was H (so if B tosses T now, B wins).
Similarly, we can define ( P_{A|T} ) and ( P_{B|T} ), but since the game ends at HT, tails alone don't trigger a win unless followed by H then T.
But actually, since the game only ends at HT, the only relevant "waiting" state is when the last toss was H, and we're waiting for a T to complete HT.
So, the main states are:
-
Start: It's A's turn, no prior toss.
- A tosses H: next is B's turn, last was H.
- A tosses T: next is B's turn, last was T.
-
It's B's turn, last was H:
- B tosses H: still B's turn (no, wait, turns alternate), no, next is A's turn, last was H.
- B tosses T: B wins (game ends), so A's win probability is 0 in this path.
-
It's B's turn, last was T:
- B tosses H: next is A's turn, last was H.
- B tosses T: next is A's turn, last was T.
-
It's A's turn, last was H:
- A tosses H: next is B's turn, last was H.
- A tosses T: A wins (game ends), so A's win probability is 1 in this path.
-
It's A's turn, last was T:
- A tosses H: next is B's turn, last was H.
- A tosses T: next is B's turn, last was T.
Now, let's define:
- ( P ): Probability A wins from the start (A's turn, no prior toss).
- ( Q_H ): Probability A wins when it's B's turn and last toss was H.
- ( Q_T ): Probability A wins when it's B's turn and last toss was T.
- ( R_H ): Probability A wins when it's A's turn and last toss was H.
- ( R_T ): Probability A wins when it's A's turn and last toss was T.
Now, let's write equations based on possible outcomes:
-
From the start (A's turn, no prior toss):
- A tosses H (prob 1/2): next is B's turn, last was H → ( Q_H ).
- A tosses T (prob 1/2): next is B's turn, last was T → ( Q_T ).
- So, ( P = \frac{1}{2} Q_H + \frac{1}{2} Q_T ).
-
From B's turn, last was H (( Q_H )):
- B tosses H (prob 1/2): next is A's turn, last was H → ( R_H ).
- B tosses T (prob 1/2): B wins, so A's win prob is 0.
- So, ( Q_H = \frac{1}{2} R_H + \frac{1}{2} \times 0 = \frac{1}{2} R_H ).
-
From B's turn, last was T (( Q_T )):
- B tosses H (prob 1/2): next is A's turn, last was H → ( R_H ).
- B tosses T (prob 1/2): next is A's turn, last was T → ( R_T ).
- So, ( Q_T = \frac{1}{2} R_H + \frac{1}{2} R_T ).
-
From A's turn, last was H (( R_H )):
- A tosses H (prob 1/2): next is B's turn, last was H → ( Q_H ).
- A tosses T (prob 1/2): A wins, so prob is 1.
- So, ( R_H = \frac{1}{2} Q_H + \frac{1}{2} \times 1 ).
-
From A's turn, last was T (( R_T )):
- A tosses H (prob 1/2): next is B's turn, last was H → ( Q_H ).
- A tosses T (prob 1/2): next is B's turn, last was T → ( Q_T ).
- So, ( R_T = \frac{1}{2} Q_H + \frac{1}{2} Q_T ).
Now we have the system of equations:
- ( P = \frac{1}{2} Q_H + \frac{1}{2} Q_T ).
- ( Q_H = \frac{1}{2} R_H ).
- ( Q_T = \frac{1}{2} R_H + \frac{1}{2} R_T ).
- ( R_H = \frac{1}{2} Q_H + \frac{1}{2} ).
- ( R_T = \frac{1}{2} Q_H + \frac{1}{2} Q_T ).
We can solve these step by step.
From equation 4:
( R_H = \frac{1}{2} Q_H + \frac{1}{2} ).
From equation 2:
( Q_H = \frac{1}{2} R_H ).
Substitute ( Q_H ) into ( R_H ):
(