
CMSC 858S: HW 2, due on February 26th (Monday) at the start of class
Notes: Please work on this with your group-mate(s); just submit one writeup
per group. Consulting other sources (including the Web) is not allowed. Write
your solutions neatly; if you are able to make partial progress by making some
additional assumptions, then state these assumptions clearly and submit your
partial solution.
1. Luby’s (∆+ 1)-coloring algorithm took O(log n) steps with high probability,
but we ignored message contentions due to adjacent nodes communicating at
the same time. We fix this issue in this problem. Let us assume that:
•time is discrete and is divided into equal-length time slots;
•all nodes know the value of ∆;
•a node can send a message to all its neighbors in one time slot (due to
the broadcast nature of radio spectrum); however, if a node receives two
or more messages (from different neighbors) at the same time step, or if
a node receives message(s) during a time slot in which it transmits, then
all these messages “collide” and will have to be retransmitted;
•there are no acknowledgments, and there is no way for a node to know for
sure if its transmission to its neighbors at a particular time t, has been
successfully received by all of its neighbors.
Show how contention resolution can be added to Luby’s protocol, so that even
in the above model, we are done within a total of O(∆ log2n) time slots with
high probability (say, with probability at least 1 −1/n2). (10 points)
2. Prove that randomized median-selection can be implemented with an ex-
pected 1.5n+o(n) comparisons. (5 points)
3. There is some universe Uand some set A⊆Usuch that |U|=Nand
|A|=Np. Suppose we choose n≤Nitems I1,I2, . . . , Inat random without
replacement from U(i.e., once an item is chosen from U, it is deleted from U).
Let Xdenote the number of chosen elements Iithat lie in A.
(a) Evaluate E[X]. (5 points)
(b) For any a > 0, prove that Pr[X≥np +a]≤np(1−p)
np(1−p)+a2.(10 points)
4. We saw in class, a two-point sampling scheme that generates some tsamples
in the context of probability amplification for RP: for any given input instance
x∈L, the probability that we output the wrong answer after using these
tsamples was at most 1/t. Suggest a scheme for “four-point sampling” to
generate these tsamples, and analyze its probability of error; this error should
be of the form O(t−c) for as large a constant cthat you can come up with. (5
points)
5. Let X1, X2, . . . , Xnbe pairwise independent binary random variables (“bi-
nary” meaning that they take values in {0,1}) such that Pr[Xi= 1] = 1/n for
each i. Prove that Pr[∃i:Xi= 1] ≥1/2. (5 points)
1