Answered You can hire a professional tutor to get the answer.

QUESTION

Hashing Assignment   1. Suppose that we hash a string of r characters into m slots by  treating it as a radix-128 number and then using the division  method. We can easily represent the number m a

Hashing Assignment   

1. Suppose that we hash a string of r characters into m slots by  treating it as a radix-128 number and then using the division  method. We can easily represent the number m as a 32-bit computer  word, but the string of r characters, treated as a radix-128  number, takes many words. How can we apply the division method to  compute the hash value of the character string without using more  than a constant number of words of storage outside the string  itself? 

 2. Suppose we have stored n keys in a hash table of size m, with  collisions resolved by chaining, and that we know the length of  each chain, including the length L of the longest chain. Describe  a procedure that selects a key uniformly at random from among the  keys in the hash table and returns it in expected time  O(L.(1+1/Alpha)) 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question