Engineering MathematicsVery hardGATE CS (PYQ pattern)
A fair coin is tossed repeatedly. What is the expected number of tosses until the pattern H T H H first appears?
- A. 16
- B. 18
- C. 20
- D. 14
Correct answer: B. 18
Add 2^k for every k at which the length-k prefix of the pattern equals its length-k suffix: k = 4 (the whole pattern) and k = 1 (H = H). So 16 + 2 = 18.
Practise more Engineering Mathematics (GATE) questionsEngineering Mathematics (GATE): notes and key points
More Engineering Mathematics (GATE) questions
- A fair coin is tossed 10 times. What is the probability that no two consecutive tosses are both heads?
- 10 balls are thrown independently and uniformly into 5 bins. What is the variance of the number of empty bins, to two decimals?
- Each cereal pack contains one of 3 different cards, uniformly at random. Let N be the number of packs bought until all 3 cards are…
- Gambler's ruin: a player starts with ₹3, wins ₹1 with probability 2/3 and loses ₹1 with probability 1/3 on each play, and stops at ₹0 or…
- X is the number of tosses of a coin with P(head) = 1/3 up to and including the first head. What is E[X | X is even]?
- X ~ Poisson(6) and, given X = n, Y ~ Binomial(n, 1/3). What is P(X − Y = 2 | Y = 1)?