Section 6.8 Discussion Questions
-
Using the hash table performance formulas given in the chapter, compute the average number of comparisons necessary when the table is:
- 10% full
- 25% full
- 50% full
- 75% full
- 90% full
- 99% full
At what point do you think the hash table is too small? Explain. - Modify the hash function for strings to use positional weightings.
- We used a hash function for strings that weighted the characters by position. Devise an alternative weighting scheme. What are the biases that exist with these functions?
- Research perfect hash functions. Using a list of names (classmates, family members, etc.), generate the hash values using the perfect hash algorithm.
You have attempted of activities on this page.