Tuesday, January 8, 2013

More Coin Problems

CT10
What is P(# of H out of 4 tosses >= # of H out of 5 tosses)?

CT10 - Answer:
1/2 (symmetry consideration)

CT11
Flip n unbiased coins. What is P(# of H = n/2)?

CT11 - Answer:
nC_(n/2)/2^n

CT12
Toss 4 coins and win the number of H. There is an option to re-toss. What is the value of the game?

CT12 - Answer:
([1 4 6 4 1] * [2 2 2 3 4]') / 16 = $2.375 (dynamic programming/backward induction)

CT13
What is the expected product of (# of H) * (# of T) when tossing 10 fair coins? (Hint: the answer is not 25)

CT13 - Answer:
22.5 (E[(# of H) * (10 - # of H)])

CT14
Keep flipping a fair coin. What is the probability that the sequence HHT appears before THH does?

CT14 - Answer:
1/4 (Once you have T, THH would always precede HHT; likewise, once you have HH, HHT would always precede THH)

CT15
Toss 4 coins and win the number of H. There is an option to re-toss one coin. What is the value of the game?

CT15 - Answer:
2 + 0.5 * 15/16 = $2.469 (dynamic programming/backward induction)

See here for more interview questions/brainteasers