Exercises 7.3
1. For the input 30, 20, 56, 75, 31, 19 and hash function ()=mod 11
a. construct the open hash table.
2. For the input 30, 20, 56, 75, 31, 19 and hash function ()=mod 11
a. construct the closed hash table.
3. Whyisitnotagoodideaforahashfunctiontodependonjustoneletter
(say, the first one) of a natural-language word?
4. Find the probability of all keys being hashed to the same cell of a hash
table of size if the hash function distributes keys evenly among all the
cells of the table.
6. Answer the following questions for the separate-chaining version of hash-
ing.
a. Where would you insert keys if you knew that all the keys in the
dictionary are distinct? Which dictionary operations, if any, would ben-
efitfromthismodification?