Problem Set 4

Assigned: Thursday, April 10, 2008
Due: Thursday, April 24, 2008

1.

Let be a random variable that takes nonnegative integer values. Show that

[Hint: First convince yourself that this is true by trying special cases.]

2.

Suppose a ZPP algorithm succeeds with probability , and outputs “don’t know” with probability . Calculate the expected number of times we need to run the algorithm, until it succeeds.

3.

Let be an -bit string chosen randomly among all strings with an even number of ‘s, and let be the substring of consisting only of bits in positions .

(a) Show that if and intersect, then and are not independent.

(b) Show that if and are disjoint and , then and are independent.

(c) Show that if and are disjoint (and nonempty) and , then and are not independent.

4.

Suppose we have balls and buckets, and suppose each ball is thrown into one of the buckets completely at random (independently of all the other balls).

(a) Let be the probability that at least one ball lands in the first bucket. What is ?

(b) Let be the probability that every ball lands in a separate bucket. Show that decreases exponentially with .

(c) [Extra credit] Let be the maximum number of balls that land in any one bucket. Show that there’s a positive constant such that with high probability. [Hint: Use the union bound, combined with the following version of the Chernoff bound. Let be any independent, -valued random variables and let . Then

for all .]

5.

Show that, if there’s a two-sided-error randomized algorithm that solves NP-complete problems in polynomial time, then there’s also a one-sided-error randomized algorithm. Or more concisely, if then , and hence . [Hint: Use the equivalence of search and decision problems from Pset3. Amplification and the union bound could also come in handy.]

6.

In many cryptographic applications (for example, digital signature schemes), it’s important to have a function for which it’s computationally infeasible to find a collision: that is, two distinct inputs and such that . Such an is called a collision-resistant hash function. Here you should think of as much larger than .

(a) Suppose is chosen uniformly at random, and suppose the only way an algorithm can learn about is by calling a subroutine that evaluates on any given input . Show that, on average, the algorithm will need to call the subroutine times before it finds a collision. [Hint: Use the union bound.]

(b) [Extra credit] Show that for any such function , after evaluating on only randomly-chosen values, with high probability we will have found a collision.

7.

Show that there is no one-way function where every bit of the output depends on only two bits of the input. [Hint: Use the fact that is in .]