0
12kviews
Suppose a stream consists of the integers 2,1,6,1,5,9,2,3,5.

Let the hash functions all be of the from h(x)=ax+b mod 16 for some a & b. You should treat the results as a 4 bit binary integer. Determine the tail length for each stream element and the resulting estimate of the number of distinct elements if the hash function is: a) h(x) = 2x+3 mod 16 b) h(x) = 4x+1 mod 16 c) 5x mod 16

1 Answer
0
1.1kviews

S = { 2, 1, 6, 1, 5, 9, 2, 3, 5 } |b| = 2

(a) h(x) = 2x + 3 mod 16

S r binary r(a)
2 7 0111 0
1 5 0101 0
6 15 1111 0
1 5 0101 0
5 13 1101 0
9 5 …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.