Placement AptitudeVery hardTCS Digital · Infosys SP · CAT

A fair coin is tossed repeatedly. What is the expected number of tosses needed to see the pattern H T H for the first time?

  1. A. 10
  2. B. 8
  3. C. 12
  4. D. 6

Correct answer: A. 10

Using overlaps: the pattern HTH overlaps itself in the prefixes 'H' and 'HTH', so the expected time is 2³ + 2¹ = 10. (HH, with overlaps 'H' and 'HH', would give 6.)

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic