Randomized Algorithms: Homework 6 Solutions, Exercises of Discrete Structures and Graph Theory

Solutions to homework 6 of the 6.856: randomized algorithms course, which covers topics such as maximal independent set algorithms, sampling tricks, and dnf counting. It includes problems on finding maximal independent sets using randomized algorithms, amplification for sampling, estimating the mean of a distribution, and estimating the number of satisfying assignments to a dnf formula.

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 #10, Mar. 16th, 2005 Homework 6, Due 3/30
1. MR 12.12. Consider the following alternative parallel algorithm for maximal inde-
pendent set. In a phase, a (non maximal) independent set Sis output, and all of its
neighbors are deleted. To find S, randomly permute the vertices, then mark each vertex
that precedes all of its neighbors in the permutation. It may help to use the following
equivalent formulation: assign to each vertex a uniformly distributed random weight
from the range {1, ..., n4}. Mark all vertices, then in parallel unmark the larger-weight
endpoint of each edge. The set of vertices that remain marked is S. Continue until
the graph is empty.
(a) Argue that the set of vertices output over all phases is a maximal independent
set.
(b) Assuming that vhas degree dduring a phase, what is the probability that vertex
vstays marked?
(c) Show that this approach yields an RNC algorithm for maximal independent set.
2. Basic Sampling Tricks
(a) Amplification for sampling. Suppose you have an estimation algorithm that will
find a (1 ±) approximation to the correct value with probability 3/4. Show that
you can reduce the failure probability exponentially fast from 1/4 to any desired
δby performing some number kof estimation experiments and taking the median
value returned. Give the smallest upper bound you can on kas a function of δ.
This shows the log(1) term in µ,δ is natural.
(b) Error bound for sampling. Suppose you are able to sample from some probability
distribution whose standard deviation is less than its mean. Give an (, δ)-FPRAS
for estimating the mean of this distribution (to within 1±with probability 1δ)
with a number of samples polynomial in 1/ and log 1.Hint: Consider the
sum of nindependent samples from the distribution and determine its mean and
variance. Bound the probability that this sum deviates greatly from its mean.
Now use the previous part. This shows the 1/2term in µ,δ is natural.
1
pf2

Partial preview of the text

Download Randomized Algorithms: Homework 6 Solutions and more Exercises Discrete Structures and Graph Theory in PDF only on Docsity!

6.856 — Randomized Algorithms

David Karger

Handout #10, Mar. 16th, 2005 — Homework 6, Due 3/

  1. MR 12.12. Consider the following alternative parallel algorithm for maximal inde- pendent set. In a phase, a (non maximal) independent set S is output, and all of its neighbors are deleted. To find S, randomly permute the vertices, then mark each vertex that precedes all of its neighbors in the permutation. It may help to use the following equivalent formulation: assign to each vertex a uniformly distributed random weight from the range { 1 , ..., n^4 }. Mark all vertices, then in parallel unmark the larger-weight endpoint of each edge. The set of vertices that remain marked is S. Continue until the graph is empty.

(a) Argue that the set of vertices output over all phases is a maximal independent set. (b) Assuming that v has degree d during a phase, what is the probability that vertex v stays marked? (c) Show that this approach yields an RNC algorithm for maximal independent set.

  1. Basic Sampling Tricks

(a) Amplification for sampling. Suppose you have an estimation algorithm that will find a (1 ± ) approximation to the correct value with probability 3/4. Show that you can reduce the failure probability exponentially fast from 1/4 to any desired δ by performing some number k of estimation experiments and taking the median value returned. Give the smallest upper bound you can on k as a function of δ. This shows the log(1/δ) term in μ,δ is natural. (b) Error bound for sampling. Suppose you are able to sample from some probability distribution whose standard deviation is less than its mean. Give an (, δ)-FPRAS for estimating the mean of this distribution (to within 1± with probability 1−δ) with a number of samples polynomial in 1/ and log 1/δ. Hint: Consider the sum of n independent samples from the distribution and determine its mean and variance. Bound the probability that this sum deviates greatly from its mean. Now use the previous part. This shows the 1/^2 term in μ,δ is natural.

  1. This problem should be done without collaboration Suppose you are given a directed graph with n vertices and m unit-length edges. Consider the problem of estimating the number of vertices within distance d of each vertex. Give a fully polynomial (, δ) approximation scheme that solves this problem simultaneously for all vertices for any fixed d. Your running time should be O((m + n)/^2 log 1/δ)) to within polylogarithmic factors.
  2. Based on MR 11.2. In class we gave an FPRAS for DNF counting that evaluated the entire formula about m times. Here we develop a faster algorithm. Consider the following variant of the DNF counting algorithm from class. For the t-th trial, pick a satisfying assignment a uniformly at random from the disjoint union of satisfying assignments, just as described in class. But now, instead of checking whether a is the “first” copy of itself, try the following. Let N be the number of assignments in the disjoint union. Let ca be the number of clauses that a satisfies. Define Xt = 1/ca.

(a) Prove that N · E[Xt] is the number of satisfying assignments to the DNF formula (b) Prove that O(mμδ) trials (and computation of the resulting

Xt) suffice to DNF-count to within (1 ± ) with probability 1 − δ. Hint: use the Chernoff bound generalization from MR 4.7. (c) Once a has been chosen in the previous subproblem, give an algorithm for quickly estimating ca to within (1 ± ). Argue that this is sufficient to give us the (1 ± ) approximation for DNF-counting. (d) Using the new scheme from the previous subproblem, analyze the expected num- ber of clauses you need to evaluate in the course of the algorithm. Assuming all clauses are the same size, what is the actual running time of the scheme in terms of basic operations? (e) (Optional) Justify the assumption that all clauses are the same size to within a logarithmic factor, thus extending the runtime analysis to arbitrary formulae.

  1. Optional. Suppose you wish to implement a counter that supports an “increment” operation and a “query current value” operation. To handle values up to n exactly you need log n bits. Suppose that you are willing to tolerate relative error  in your queries. Design a scheme that uses O(log log n) bits. Hint: increment probabilistically.