Introduction
Next: Game-Theoretic Techniques
Problems
1.1
Due to J. von Neumann [409].
- Suppose you are given a coin for which the probability of HEADS, say , is unknown. How can you use this coin to generate unbiased coin-flips, i.e.
Give a scheme for which the expected number of flips of the biased coin for extracting one unbiased coin-flip is no more than . Hint: consider two consecutive flips of the biased coin. 2. Devise an extension of the scheme that extracts the largest possible number of independent, unbiased coin-flips from a given number of flips of the biased coin.
1.2
Due to D. E. Knuth and A. C.-C. Yao [264].
- Suppose you are provided with a source of unbiased random bits. Explain how you will use this to generate uniform samples from the set . Determine the expected number of random bits required by your sampling algorithm.
- What is the worst-case number of random bits required by your sampling algorithm? Consider the case when is a power of , as well as the case when it is not.
- Solve parts (1) and (2) when, instead of unbiased random bits, you are required to use as the source of randomness uniform random samples from the set ; consider the case when is a power of , as well as the case when it is not.
1.3
Due to D. E. Knuth and A. C.-C. Yao [264].
Suppose you are provided with a source of unbiased random bits. Provide efficient schemes, in terms of expected running time and expected number of random bits used, for generating samples from the distribution over the set induced by rolling two unbiased dice and taking the sum of their outcomes.
1.4
- Suppose you are required to generate a random permutation of size . Assuming that you have access to a source of independent and unbiased random bits, suggest a method for generating random permutations of size . Efficiency is measured in terms of both time and number of random bits. What lower bounds can you prove for this task?
- Consider the following method for generating a random permutation of size . Pick random values independently from the uniform distribution over the interval . Now, the permutation that orders the random variables in ascending order is claimed to be a random permutation, and it can be determined by sorting the random values. Is the claim correct? How efficient is this scheme?
- Consider the following lazy implementation of the scheme suggested in part (2). The binary representation of the fraction is a sequence of unbiased and independent random bits. At any given stage of the sorting algorithm, we would have chosen only as many bits of each as necessary to resolve all the comparisons performed up to that point. When comparing to , if the current prefixes of their binary expansions do not determine the outcome of the comparison, then we extend their prefixes by choosing further random bits until this happens. Compute tight bounds on the expected number of random bits used by this implementation.
1.5
Consider the problem of using a source of unbiased random bits to generate samples from the set such that the element is chosen with probability . Show how to perform this sampling using random bits per sample, regardless of the values of . Use the result from Problem 1.4(3).
1.6
Consider a sequence of flips of an unbiased coin. Let denote the absolute value of the excess of the number of HEADS over the number of TAILS seen in the first flips. Define
Show that
and that
1.7
Suppose we choose a permutation of the ordered set uniformly at random from the space of all permutations of . Let denote the length of the longest increasing subsequence in permutation .
- For large and some positive constant , prove that
- Is the bound in part (1) tight?
1.8
Consider adapting the min-cut algorithm of Section 1.1 to the problem of finding an - min-cut in an undirected graph. In this problem, we are given an undirected graph together with two distinguished vertices and . An - cut is a set of edges whose removal from disconnects from ; we seek an - cut of minimum cardinality. As the algorithm proceeds, the vertex may get amalgamated into a new vertex as a result of an edge being contracted; we call this vertex the -vertex, initially the -vertex is itself. Similarly, we have a -vertex. As we run the contraction algorithm, we ensure that we never contract an edge between the -vertex and the -vertex.
- Show that there are graphs in which the probability that this algorithm finds an - min-cut is exponentially small.
- How large can the number of - min-cuts in an instance be?
1.9
Consider the Find algorithm described in Section 1.4 for selecting the th smallest of a set of elements. Show that the algorithm finds the th smallest element in in expected time .
1.10
Consider the setting of Example 1.1. Show that the probability that no sailor returns to her own cabin approaches as the number of sailors grows large.
1.11
Verify the following inclusions:
It is not known whether these inclusions are strict.
1.12
Verify the following inclusions:
It is not known whether these inclusions are strict.
1.13
Show that
and
1.14
Show that
1.15
Due to K.-I. Ko [265].
Show that
implies