




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Ruta Mehta University of Illinois, Urbana-Champaign Spring 2021
Most slides are courtesy Prof. Chekuri
A topic that is both very old, and very current!
Data was stored on tapes, and amount of RAM was very small. Too much data, too little space. Store only summary or sketch of data.
Terabytes of memory, Gigabytes of RAM. Data streams: Humongous amount of data (sometimes never ending)! Can go over it at most once, and sometimes not even that! Store only summary: sub-linear space-time algorithms.
An internet router sees a stream of packets, and may want to know, which connection is using the most packets how many different connections median of the file sizes transferred since mid-night which connections are using more than 0.1% of the bandwidth. Computing aggregative information about data streams.
A stream of data elements, S = a 1 , a 2 ,.... Say at arrive at time t. Let us assume that at ’s are numbers for this lecture.
A stream of data elements, S = a 1 , a 2 ,.... Say at arrive at time t. Let us assume that at ’s are numbers for this lecture. Denote a[1..t] = 〈a 1 , a 2 ,... , at 〉. Given some function we want to compute it continually, while usinglimited space. at any timethe stream seen so far, i.e., t we should be able to query the function value on a [1..t].
F (a[1..t]) = ∑ti =1 ai Outputs are: 3, 4, 21, 25, 16, 48, 149, 152, -570, ... Keep a counter, and keep adding to it. After T rounds, the number can be at most T 2 b. O(b + log T ) space.
F (a[1..t]) = maxti =1 ai Outputs are: 3, 3, 17, 17, 17, 32, 101, 101, ... Just need to store b bits.
F (a[1..t]) = maxti =1 ai Outputs are: 3, 3, 17, 17, 17, 32, 101, 101, ... Just need to store b bits. Median? A lot more tricky
F (a[1..t]) = maxti =1 ai Outputs are: 3, 3, 17, 17, 17, 32, 101, 101, ... Just need to store b bits. Median? A lot more tricky
〈Initialize summary information〉 While stream S is not done x 〈Do something with ← next element in x Sand update summary information〉 〈Output something if needed〉 Return 〈summary〉
〈Initialize summary information〉 While stream S is not done x 〈Do something with ← next element in x Sand update summary information〉 〈Output something if needed〉 Return 〈summary〉
Despite of restrictions, we can compute interesting functions if we can tolerate some error.
Part I
Heavy Hitters
Find the element that occur strictly more than half the time, if any. Note that at most one such element!