2026-04-15

Problem — 2026-04-15

Medium

Mediumprobability

You flip a fair coin 1010 times. What is the probability that you never get two heads in a row?

Express as a fraction

Show solution
Let f(n)f(n) be the number of length-nn binary strings with no two consecutive heads. We have f(1)=2f(1) = 2, f(2)=3f(2) = 3, and f(n)=f(n1)+f(n2)f(n) = f(n-1) + f(n-2) (the string starts with T followed by a valid (n1)(n-1)-string, or HT followed by a valid (n2)(n-2)-string). Computing: f(3)=5,f(4)=8,f(5)=13,f(6)=21,f(7)=34,f(8)=55,f(9)=89,f(10)=144f(3)=5, f(4)=8, f(5)=13, f(6)=21, f(7)=34, f(8)=55, f(9)=89, f(10)=144. Out of 210=10242^{10} = 1024 total strings, the probability is 1441024=964\frac{144}{1024} = \frac{9}{64}.