Chapter Questions
What is the minimum number of keys which are hashed to their home positions using the linear probing technique? Show an example using a 5-cell array.
Consider the following hashing algorithm (Bell and Kaman 1970). Let $Q$ and $R$ be the quotient and remainder obtained by dividing $K$ by $T$ Size and let the probing sequence be created by the following recurrence formula:$$h_i(K)= \begin{cases}R & \text { if } i=0 \\ \left(h_{i-1}(K)+Q\right) \bmod \text { TSize } & \text { otherwise }\end{cases}$$What is the desirable value of TSize? What condition should be imposed on Q?
Is there any advantage to using binary search trees instead of linked lists in the separate chaining method?
In Cichelli's method for constructing the minimal hash function, why are all words first ordered according to the occurrence of the first and the last letters? The subsequent searching algorithm does not make any reference to this order.
Trace the execution of the searching algorithm used in Cichelli's technique with $\operatorname{Max}$ $=3$. (See the illustration of such a trace for $\operatorname{Max}=4$ in Figure 10.11.)
In which case does Cichelli's method not guarantee to generate a minimal perfect hash function?
Apply the FHCD algorithm to the nine Muses with $r=n / 2=4$ and then with $r=2$. What is the impact of the value of $r$ on the execution of this algorithm?
Strictly speaking, the hash function used in extendible hashing also dynamically changes. In what sense is this true?
Consider an implementation of extendible hashing that allows buckets to be pointed to by only one pointer. The directory contains null pointers so that all pointers in the directory are unique except the null pointers. What keys are stored in the buckets? What are the advantages and disadvantages of this implementation?
How would the directory used in extendible hashing be updated after splitting if the last depth bits of $h(K)$ are considered an index to the directory, not the first depth bits?
List the similarities and differences between extendible hashing and $\mathrm{B}^{+}$-trees.
What is the impact of the uniform distribution of keys over the buckets in extendible hashing on the frequency of splitting?
Apply the linear hashing method to hash numbers $12,24,36,48,60,72$, and 84 to an initially empty table with three buckets and with three cells in the overflow area. What problem can you observe? Can this problem bring the algorithm to a halt?
Outline an algorithm to delete a key from a table when the linear hashing method is used for inserting keys.
The function hash ( ) applied in the case study uses the exclusive or (xor) operation to fold all the characters in a string. Would it be a good idea to replace it by bitwiseand or bitwise-or?