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?
- A. 10
- B. 8
- C. 12
- 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.)
Practise more Permutations, Combinations and Probability (Placement) questionsPermutations, Combinations and Probability (Placement): notes and key points
More Permutations, Combinations and Probability (Placement) questions
- A bag holds three coins: one fair, one with heads on both sides, and one that lands heads with probability 1/3. A coin is picked at random…
- Four people each have a birthday on a uniformly random day of the week, independently. What is the probability that exactly two of them…
- Five married couples are seated around a circular table. Two seatings are the same only if one is a rotation of the other. In how many…
- In how many ways can 4 numbers be chosen from 1, 2, …, 20 so that no two of them are consecutive?
- On a 5 × 5 chessboard (a grid of 25 unit squares), how many rectangles with sides along the grid lines are not squares?
- A sequence of 6 steps of +1 and 6 steps of -1 is chosen at random from all arrangements. What is the probability that the running total…