Streaming exercise
Here is an (HW?) exercise in streaming algorithm design.
Given a stream of items a_1,...,a_n, a_i \in [1,u], find the average of items below the median or the median of items below the average.
There is previous work on finding the median (or more generally, the quantiles) and the kth frequency moments \sum_i f_i^k, where f_i is the frequency of i (k=1 is the average). The exercise here is an example of cascaded aggregation: computing the kth frequency moment following a quantile computation.
As is standard in streaming algorithms, one has to use space and per-item update time of polylog(n,u) and obtain reasonable approximation.
Given a stream of items a_1,...,a_n, a_i \in [1,u], find the average of items below the median or the median of items below the average.
There is previous work on finding the median (or more generally, the quantiles) and the kth frequency moments \sum_i f_i^k, where f_i is the frequency of i (k=1 is the average). The exercise here is an example of cascaded aggregation: computing the kth frequency moment following a quantile computation.
As is standard in streaming algorithms, one has to use space and per-item update time of polylog(n,u) and obtain reasonable approximation.
7 Comments:
low calorie diet Having problems with weight loss? To achieve lasting weight loss requires some knowledge and a little work. Your food intake must consist of the right amounts of protein carbohydrate and fat. (or it won�t work!) And you need proper exercise intensity, frequency and duration (not what you think). To get more info. please visit low calorie diet
weight loss calories Looking for the right diet? To help you choose we have reviewed the top diet plans available today. Simply fill out a free profile and choose one you�re most comfortable with. Please visit weight loss calories
diet programs Having problems with weight loss? To achieve lasting weight loss requires some knowledge and a little work. Your food intake must consist of the right amounts of protein carbohydrate and fat. (or it won�t work!) And you need proper exercise intensity, frequency and duration (not what you think). To get more info. please visit diet programs
weight loss calories How many calories do you need per day? Learn more. Please visit weight loss calories
Nice blog. :)
Natural weight loss
[url=http://www.review6.com]Website Review Evaluation[/url]
Post a Comment
<< Home