Engineering MathematicsVery hardGATE CSE · NIELIT

A fair coin is tossed repeatedly. What is the expected number of tosses until the pattern HHTHH first appears?

  1. A. 32
  2. B. 34
  3. C. 36
  4. D. 38

Correct answer: D. 38

The expectation is Σ 2ᵏ over each k for which the length-k prefix equals the length-k suffix: k = 5 (32), k = 2 (HH, 4) and k = 1 (H, 2), total 38 (confirmed by solving the 31-state linear system).

More Engineering Mathematics (GATE) questions

Exams that ask this topic