an 1 u define the hash function ha by ha x n 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . , an-1 U , define the hash function ha by ha (x) = n-1 j=0 min-heap, worst-case hash table, worst-case hash table, average-case (a) Show that if the family H of hash functions is 2-universal, then it is universal. aj xj mod p . Let H = {ha }. This is the family of hash functions shown in lecture to be universal. Show that H is not 2-universal. (Hint: Find a key for which all hash functions in H produce the same value.) Handout 14: Problem Set 4 (c) Suppose that we modify H slightly from part (b): For any a U and for any b p , define ha,b (x) = n-1 j=0 3 aj xj + b mod p . and H = ha,b . Argue that H is 2-universal. (Hint: Consider fixed x U and y U , with xi = yi for some i. What happens to ha,b (x) and ha,b (y) as ai and b range over p ?) (d) Suppose that Alice and Bob secretly agree on a hash function h from a 2-universal family H of hash functions. Each h H maps from a univer...
View Full Document

Ask a homework question - tutors are online