
CMSC 858S: Algorithms in Networking, Fall 2004
Mid-Term Exam: 11 AM – 12:15 PM, October 21 2004
Instructions: There are three questions. If you think you have some ideas that deserve partial
credit, please itemize them concisely. Also, if you are unable to solve a problem but can do so
by making some assumptions, clearly state these assumptions and then proceed. Good luck!
1. (4points) Let Xbe a non-negative random variable. We generate independent random
variables X1, X2, X3, . . ., each of which has the same distribution as X. Let Ibe the following
random variable: Iis the smallest integer isuch that Xi<2·E[X]. Given a positive integer
k, show that Pr[I > k]≤2−k.
2. (5points) Choose a random permutation πof {1,2, . . . , n}(i.e., uniformly at random from
the set of all n! permutations). Then, for any nonempty subset Xof {1,2, . . . , n}, define a
random variable
h(X) = min
x∈Xπ(x).
(For instance, suppose n= 4, π= (2,4,1,3), and X={1,3}. Then, since π(1) = 2 and
π(3) = 1, we have in this example that h(X) = min{2,1}= 1.)
Consider any two nonempty subsets Aand Bof {1,2, . . . , n}. Express the probability of
the event “h(A) = h(B)” as a function of |A∩B|and |A∪B|. (As usual, |X|denotes the
cardinality of a finite set X. Note that the only underlying random process in this problem is
the random choice of π.)
3. (6points) We are given some constant , where 0 < ≤1/2. A peer pin Chord wants to
estimate n, the total number of peers, to within a high accuracy: it wants to compute a number
n0such that (1 −)n≤n0≤(1 + )nwith high probability. Show how to build on the protocol
of King and Saia, to achieve this using only O(log n) communication; the constant hidden in
the O() notation can be a function of , and you can assume that nis large enough. (Hint:
King and Saia show how to estimate nto within some fixed – not arbitrary – constant factor.
Start with such an estimate, and see how you can use ideas from the King-Saia protocol.)
– End of Exam –
1