
6.856 — Randomized Algorithms
David Karger
Handout #9, Mar. 9, 2011 — Homework 5, Due 3/16
1. This problem should be done without collaboration. Bloom filters can be used
to estimate the difference between two sets. Suppose that you have sets Xand Y, each
with melements, and with relements in common. Create an n-bit Bloom filter for
each, using the same khash functions. Determine the expected number of bits where
the two Bloom filters differ, as a function of m,n,k, and r. Explain how this could be
used as a technique for estimating r.
2. MR7.2. Two rooted trees T1and T2are said to be isomorphic if there exists a one to
one mapping ffrom the nodes of T1to those of T2satisfying the following condition:
vis a child of win T1if and only if f(v) is a child of f(w) in T2. Observe that no
ordering is assumed on the children of any vertex. Devise an efficient randomized
algorithm for testing the isomorphism of rooted trees and analyze its performance.
Hint: Associate a polynomial Pvwith each vertex vin a tree T. The polynomials
are defined recursively, the base case being that the leaf vertices all have P=x0. An
internal vertex vof height hwith children v1, . . . , vkhas its polynomial defined to be
(xh−Pv1)(xh−Pv2)· · · (xh−Pvk).
Note that there is exactly one indeterminate for each level in the tree.
3. Consider the problem of finding a minimum weight (total weight of included edges)
perfect matching in a bipartite graph whose edges are given integer weights of magni-
tude bounded by a polynomial in the number of vertices n. Note that it is not possible
to apply the Isolating Lemma directly to this case since the random weights chosen
there would conflict with the input weights.
(a) Explain how you would devise an RNC algorithm for this problem. Hint: start
by scaling up the input edge weights by a large polynomial factor. Apply random
perturbations to the scaled weights and prove a variant of the Isolating Lemma
for this situation.
(b) The parallel complexity of the version where the edge weights can have a polyno-
mial number of bits has not yet been resolved. Note that arithmetic operations on
such weights are still tractable. Explain why the RNC algorithm you developed
above does not work in this case.
1