Lecture:

- I thought about the discussion on the Karp+ algorithm. An update rule that works is:

if x is in K then count[x]++

else {

if |K | = k then

for all a in K do {

count[a]−−;

if count[a] = 0 then delete a from K & count

}

if |K| < k { insert x in K , set count[x] := 1; }

}

Note that x will not be inserted if sketch is full and no empty place appears after discounting. The proof works now. Intuitively, x may not get in this time, but does its job of discounting k symbols; so if it is frequent it will eventually make it into K when an infrequent element gets to 0 count.

- About the lab: for credit, hand me a short report (2 pages max) with your results. No code fragments, no screenshots please. I said within 2 weeks but it's easter break, so let's say for the 23rd.

## No comments:

## Post a Comment