Coin Flips Needed to Simulate a Fair Die
Coding
Randomness
Medium
Hint 1
Each block of three flips independently succeeds with probability .
Hint 2
The number of blocks needed is geometric; multiply its expectation by the number of flips per block.
Show worked solution
1. Find the block success probability
Each three-bit block encodes a value in uniformly, and only of the outcomes are accepted.
2. Expected number of blocks and flips
The number of blocks needed is geometric with success probability , so its expectation is ; each block costs three flips.
Answer: 4
Related roles: Browse quant jobs