Randomized Algorithms, Exercises - Discrete Mathematics 3, Exercises of Discrete Structures and Graph Theory

Discrete Structures, Randomized Algorithm, Exercises, Exam Paper

Typology: Exercises

2010/2011

Uploaded on 10/12/2011

lovefool
lovefool 🇬🇧

4.5

(21)

292 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
6.856 Randomized Algorithms
David Karger
Handout #4, Feb. 16, 2011 Homework 3, Due 2/23
1. Consider a collection of nrandom variables Xidrawn independently from the geometric
distribution with mean 2 that is, Xiis the number of flips of an unbiased coin up to
and including the first occurrence of heads. Let X=PXi. Use two different methods
to derive bounds on the probability that X > (1 + )(2n) for any fixed :
(a) Figure out how to reduce this to a question involving just the sum of independent
Bernoulli (i.e. indicator) variables, allowing you to apply the Chernoff bound we
already know.
(b) Use the method of the in-class Chernoff bound analysis to derive ab initio an upper
bound for deviation of sums of geometric random variables.
2. This problem should be done without collaboration. MR 4.14. Show that the
Quicksort algorithm of Chapter 1 runs in O(nlog n) time with high probability. Do
so by bounding the number of pivots to which each element is compared. Hint: for a
given item x, call a pivoting round good if xends up in the smaller subproblem. How
many good rounds can xbe in? How long will that take to happen? You may use the
previous problem.
3. Some problems with bit-fixing:
(a) Based on MR Exercise 4.2. Consider the transpose permutation: writing ias the
concatenation of two n/2-bit strings aiand bi, we want to route aibito biai. Show
the bit fixing strategy takes Ω(N) steps on this permutation.
(b) MR 4.9. Consider the following randomized variant of the bit fixing algorithm.
Each packet randomly orders the bit positions in the label of its source and then
corrects the mismatched bits in that order. Show that there is a permutation for
which with high probability that algorithm uses 2Ω(n)steps to route. An inequality
that might be helpful:
n
kk
n
ken
kk
.
4. In class we showed that nballs in nrandom bins see a maximum load of O(log n/ log log n).
Show this bound is tight:
1
pf2

Partial preview of the text

Download Randomized Algorithms, Exercises - Discrete Mathematics 3 and more Exercises Discrete Structures and Graph Theory in PDF only on Docsity!

6.856 — Randomized Algorithms

David Karger

Handout #4, Feb. 16, 2011 — Homework 3, Due 2/

  1. Consider a collection of n random variables Xi drawn independently from the geometric distribution with mean 2 – that is, Xi is the number of flips of an unbiased coin up to and including the first occurrence of heads. Let X =

Xi. Use two different methods to derive bounds on the probability that X > (1 + )(2n) for any fixed :

(a) Figure out how to reduce this to a question involving just the sum of independent Bernoulli (i.e. indicator) variables, allowing you to apply the Chernoff bound we already know. (b) Use the method of the in-class Chernoff bound analysis to derive ab initio an upper bound for deviation of sums of geometric random variables.

  1. This problem should be done without collaboration. MR 4.14. Show that the Quicksort algorithm of Chapter 1 runs in O(n log n) time with high probability. Do so by bounding the number of pivots to which each element is compared. Hint: for a given item x, call a pivoting round good if x ends up in the smaller subproblem. How many good rounds can x be in? How long will that take to happen? You may use the previous problem.
  2. Some problems with bit-fixing:

(a) Based on MR Exercise 4.2. Consider the transpose permutation: writing i as the concatenation of two n/2-bit strings ai and bi, we want to route aibi to biai. Show the bit fixing strategy takes Ω(

N ) steps on this permutation. (b) MR 4.9. Consider the following randomized variant of the bit fixing algorithm. Each packet randomly orders the bit positions in the label of its source and then corrects the mismatched bits in that order. Show that there is a permutation for which with high probability that algorithm uses 2Ω(n)^ steps to route. An inequality that might be helpful: (n

k

)k ≤

n k

(en

k

)k .

  1. In class we showed that n balls in n random bins see a maximum load of O(log n/ log log n). Show this bound is tight:

(a) Show there is a k = Ω(log n/ log log n) such that bin 1 has k balls with probability at least 1/

n. You may want to use the inequality from problem 3. (b) Argue that conditioning on the first bin not having k balls only increases the prob- ability that the second bin does, and so on. Conclude that with high probability, some bin has Ω(log n/ log log n) balls.

  1. (Optional) MR 4.7. Prove that Chernoff bounds hold for arbitrary random variables in the [0, 1] interval:

(a) A function f is said to be convex if for any x, y, and 0 ≤ λ ≤ 1, f (λx+ (1 − λ)y) ≤ λf (x) + (1 − λ)f (y). Show that f (x) = etx^ is convex for any t > 0 (you can use the fact that etx^ has positive second derivative everywhere). What if t ≤ 0? (b) Let Z be a random variable that takes values in the interval [0, 1] and let p = E[Z]. Define the Bernoulli random variable X such that Pr[X = 1] = p. Show that for any convex f , E[f (Z)] ≤ E[f (X)]. (c) Let Y 1 ,... , Yn be independent identical distributed random variables over [0, 1] and define Y =

Yi. Derive Chernoff-type upper and lower tail bounds for the random variable Y. In particular, show that for δ ≤ 1,

Pr[Y − E[Y ] > δ] ≤ exp(−δ^2 / 2 n).

  1. (Optional) (variant of MR 4.22). Chernoff bounds with dependent variables: Chernoff bounds are quite powerful, but are limited to sums of independent random variables. In the next problem, we will consider ways to apply them to sums of de- pendent random variables by comparing the dependent distributions to independent ones. Consider the model of n balls tossed randomly in n bins. We derive tight bounds on the number of empty bins. Let Xi be the indicator variable that is 1 if the i-th bin is empty. Let Z =

Ii be the number of empty bins. Define p = E[Xi] = (1 − 1 /n)n and let X i′ be n mutually independent Bernoulli random variables that are 1 with probability p. Note that Y =

X i′ has the binomial distribution with parameters n and p.

  • Show that for all t ≥ 0, E[etZ^ ] ≤ E[etY^ ] (hint: think about comparing E[Y k] and E[Zk] by expanding them). Conclude that any Chernoff bound on the upper tail of Y ’s distribution also applies to the upper tail of Z’s distribution, even though the Bernoulli variables Xi are not independent. (The point is that their correlation is negative and only helps to reduce the tail probability.) Give a resulting bound on the upper tail of Z.
  • (This one is very hard) Perform the same sort of analysis for the lower tail.