How can we apply the division method to compute the hash


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 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))

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: How can we apply the division method to compute the hash
Reference No:- TGS02873135

Expected delivery within 24 Hours