When a fair coin is flipped twice, there are 4 equally likely outcomes, each with probability 41:
(TAILS,HEADS) with probability 41⟹ Output Y and stop.
(HEADS,HEADS) or (HEADS,TAILS) with total probability 42=21⟹ Output N and stop.
(TAILS,TAILS) with probability 41⟹ Repeat Step 1.
Let P(Y) be the probability that the experiment eventually outputs Y. By the law of total probability:
P(Y)=41+41P(Y) Solving for $P(Y)$:
P(Y)−41P(Y)=41 43P(Y)=41 P(Y)=31≈0.33