Course Hero Logo

HW6.pdf - Homework 6: Due November 18th 12pm ORIE 4520:...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 3 out of 5 pages.

ORIE 4520: Stochastics at ScaleFall 2015Homework 6: Due November 18th, 12pmSid Banerjee ([email protected])Problem 1: (The Flajolet-Martin Counter)In class (and in the prelim!), we looked at an idealized algorithm for finding the number of distinctelements in a stream, where we sampled uniform random variables for each item, and then storedtheir minimum value. One way to implement this in practice is via the Flajolet-Martin counter:Suppose we have a stream (X1, X2, . . . , Xm) ofmitems, where each itemXicorresponds to anelement in [n]. Assumenis a power of 2, andk= log2n. Lethbe a hash function that maps eachof the elements in [n] tokbits – in particular, let us denoteh(x) = (b1(x), b2(x), . . . , bk(x)) for eachx[n]), and assume that each bitkindependently satisfiesP[bk(x) = 0] =P[bk(x) = 1] = 1/2for every pairx[n]. For everyx[n], letr(x) be the number oftrailing0’sinh(x) – so forexample, forn= 16 (i.e.,k= 4),h(x) = 0100 meansr(x) = 2,h(x) = 1000 meansr(x) = 3, andso on). Finally, letR= maxi{r(Xi)}– i.e., the maximum number of trailing 0’s in the hashes ofthe items in the stream.Part (a)For any elementx[n], letYj(x) be the indicator thatr(x) =j. Argue thatE[Yj(x)] = 1/2j+1.Part (b)LetF0be the number of distinct elements in the stream, and defineNjto be the number of elementsin the stream for whichr(x)> j. Show that:E[Nj] =F02j+1,V ar(Nj) =F02j+11-12j+1E[Nj]Hint: WriteNjin terms ofYj(Xi).Part (c)Suppose we use 2Ras an estimator forF0. Argue that for anyj,P[Rj]P[Nj>0]. Next,assuming thatF0is a power of 2, show that:P[R <log2(F0)-c]12cHint: Use Chebyshev to boundP[Nj= 0].Part (d)On the other hand, argue thatP[Rj]j0jE[Nj0], and hence show that:P[Rlog2(F0) +c]12c1
ORIE 4520: Stochastics at ScaleFall 2015Homework 6: Due November 18th, 12pmSid Banerjee ([email protected])Problem 2: (An Alternate All-Pair Distance Sketch)In class we saw an All-Pairs Distance Sketch (ADS) by Das-Sarma et al., which for each nodevstored a sketchS(v) with distances toO(logn) other nodes, and then given any pair (u, v), usedthe to sketches to compute a shortest-path estimate within a multiplicative ‘stretch’ ofO(logn).We’ll now see an alternate ADS proposed by Cohen et al.We are given an undirected weighted graphG(V, E), where each edge (u, v)Ehas some weightwu,v0 corresponding to its length. The shortest path distanced*(u, v) between any nodesuandvis the minimum sum of weights over all paths fromutov. For convenience, assume that the weights

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 5 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Summer
Professor
NoProfessor
Tags
Graph Theory, Trigraph, Sid Banerjee

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture