随机算法 (Spring 2013)/Problem Set 1
Problem 1
- (Due to von Neumann) Suppose that you are given a coin for which the probability of HEADS, say
, is unknown. How can you use this coin to generate unbiased (i.e., ) coin-flips? Give a scheme for which the expected number of flips of the biased coin for extracting one unbiased coin-flip is no more than .
- (Due to Knuth and Yao) Supposed you are provided with a source of unbiased random bits. Explain how you will use this to generate uniform random samples from the set
. Determine the expected number of bits required by your sampling algorithm. What is the worst-case number of bits required by your sampling algorithm (where the worst-case is taken over all random choices of unbiased random bits)? Consider the case when is a power of 2, as well as the case when it is not.
Problem 2
We play the following game:
Start with
- What is the expected number of cycles made by people holding hands with each other (one person with left hand holding right hand is also counted as a cycle) at the end of the game?
(Hint: Consider how to count the number of cycles using indicator random variables.)
Problem 3
For any
Give an analysis to lower bound the probability that a single iteration of Karger's Random Contraction algorithm returns an
Problem 4
Freivalds' Theorem - Let
be an matrix such that . For a uniformly random , .
- Let
Schwartz-Zippel Theorem - Let
be a multivariate polynomial of degree over a field such that . Fix any finite set , and let be chosen uniformly and independently at random from . Then
- Let
Prove that the Freivalds Theorem is a special case of the Schwartz-Zippel Theorem.
Problem 5
Consider the following two schemes of throwing
- BiB (balls-into-bins):
for i=1 to m do choose r uniformly and independently from [n]; put ball-i into bin-r;
When
- P2C (power of two choices):
for i=1 to m do choose r1 and r2 uniformly and independently from [n]; if bin-r1 has fewer balls than bin-r2 put ball-i into bin-r1; else put ball-i into bin-r2;
When
Questions: Assume
- If we throw the first
balls as BiB and then throw the rest balls as P2C, what is the asymptotic maximum load with high probability? - If we throw each even numbered ball as BiB and each odd numbered ball as P2C. What is the asymptotic maximum load with high probability?