I came across this problem in a competition training list, but I truly don't understand the expected answer.
http://www.codeforces.com/problemset/problem/98/B
To summarize for the TL;DR crowd, one person among n must be chosen using a coin toss, in such a way that everyone has the same probability of being chosen.
What's the expected number of coin tosses (As an irreducible fraction) needed to choose the winner.
The provided samples are:
Input: 2 Output: 1/1
Input: 3 Output: 8/3
Input: 4 Output: 2/1
How is this solved for the n=3 case? Don't understand the 8/3 answer here...
Statistics > Me
TIA
http://www.codeforces.com/problemset/problem/98/B
To summarize for the TL;DR crowd, one person among n must be chosen using a coin toss, in such a way that everyone has the same probability of being chosen.
What's the expected number of coin tosses (As an irreducible fraction) needed to choose the winner.
The provided samples are:
Input: 2 Output: 1/1
Input: 3 Output: 8/3
Input: 4 Output: 2/1
How is this solved for the n=3 case? Don't understand the 8/3 answer here...
Statistics > Me
TIA