Docsity

Algorithms in Networking Mid-Term Exam, Fall 2004 - Prof. Aravind Srinivasan, Exams of Computer Science

Toggle sidebar
bg1
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

Partial preview of the text

Download Algorithms in Networking Mid-Term Exam, Fall 2004 - Prof. Aravind Srinivasan and more Exams Computer Science in PDF only on Docsity!

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. ( 4 points) Let X be a non-negative random variable. We generate independent random variables X 1 , X 2 , X 3 ,.. ., each of which has the same distribution as X. Let I be the following random variable: I is the smallest integer i such that Xi < 2 · E[X]. Given a positive integer k, show that Pr[I > k] ≤ 2 −k.
  2. ( 5 points) 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 X of { 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 A and B of { 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 π.)

  1. ( 6 points) We are given some constant , where 0 <  ≤ 1 /2. A peer p in Chord wants to estimate n, the total number of peers, to within a high accuracy: it wants to compute a number n′^ such that (1 − )n ≤ n′^ ≤ (1 + )n with 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 n is large enough. (Hint: King and Saia show how to estimate n to 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 –