Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Algorithms Networking - Homework Assignment 1 | CMSC 858, Assignments of Computer Science

Material Type: Assignment; Professor: Srinivasan; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-jr7
koofers-user-jr7 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Algorithms Networking - Homework Assignment 1 | CMSC 858 and more Assignments Computer Science in PDF only on Docsity! CMSC 858S: Algorithms in Networking Fall 2004 Homework Assignment #1 (will be graded) Due date: Beginning of class on September 30, 2004 Note: As with all homework assignments for this class, this needs to be done along with your group-mates. Please submit one final, polished set of answers for your group, and do not include unnecessary material. (For instance, don’t include your preliminary work/calculations/intuition that led to the final answer.) Partial credit will be given where appropriate: if you think you have some ideas that deserve partial credit, please itemize them concisely, so that the grading process can be accurate. The problem marked (*) may be more difficult than the others. Also, the Chernoff-bound approach of bounding: (i) Pr[X ≥ a] by Pr[etX ≥ eta], and (ii) Pr[X ≤ a] by Pr[e−tX ≥ e−ta] (and then applying Markov, simplifying, and choosing the optimal positive t), is quite general: the case where X is a sum of bounded and independent random variables seen in class, is just a special case. Problems 2 and 3 deal with such generalizations. 1. We have a random variable X whose distribution is some D; our aim is to estimate E[X] using “not too many” samples from D. Suppose we can draw independent random samples X1, X2, . . . from D; we want to draw some t such samples, and output the estimate Y = (X1 + X2 + · · · + Xt)/t for E[X]. Our main goal is that with probability at least 1 − δ, the absolute value of the difference between our estimate and E[X], should be at most  ·E[X]. We now explore how to solve this problem. Suppose the value ` = ⌈√ Var[X]/E[X] ⌉ is given, but that we do not know anything more about D. (P1) Show that O(`2/(2δ)) samples suffice. (We will see how to improve this in (P3).) (P2) Suppose we only need a “weak estimate” Z such that: with probability at least 0.6, the absolute value of the difference between Z and E[X], is at most  · E[X]. Show that O(`2/2) samples suffice to compute such a weak estimate. (P3) Show that by judiciously combining O(log(1/δ)) independently-computed weak esti- mates, we can solve our main problem: i.e., we can get an estimate such that with probability at least 1 − δ, the absolute value of the difference between our estimate and E[X], is at most  ·E[X]. (Thus, O(`2 log(1/δ)/2) samples suffice. A hint: the mean may not be the correct choice for the “judicious combination”!) 2. Suppose X is a Poisson random variable with mean λ; i.e., X takes values in the non-negative integers, with Pr[X = i] = e−λ · λi/i!. Given δ > 0, use a Chernoff-type approach to bound Pr[X ≥ λ(1 + δ)]. Does your result resemble any bound seen in class? 3 (*). We are given a black-box that outputs numbers independently and uniformly at random from the set {1, 2, . . . , 2n}. We use this to construct a random permutation π of {1, 2, . . . , n} as follows. We will construct a one-to-one function f : {1, 2, . . . , n} → {1, 2, . . . , 2n}, and then output the numbers in {1, 2, . . . , n} in the order of their f(·) values. To construct f , we proceed as follows, for j = 1, 2, . . . , n: choose f(j) by repeatedly obtaining numbers from the black-box, and setting f(j) to be the first number found such that f(j) 6= f(i) for all i < j. (Note that we ensure that f is one-to-one.) Let X denote the number of calls to the black-box. 1
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved