21. Assuming keys are comprised of upper- and lowercase letters, give the bit pattern and base 10 numeric value of the pseudo key that would result from processing the key "Mary" using the algorithm illustrated in Figure 5.17.
22. What would be the base 10 value of the pseudo key produced by fold-shifting the key "Bob-Jones" to produce a 16-bit numeric pseudo key? Use the characters "bJ" as a pivot.
23. A pseudorandom preprocessing scheme is being used in a hashed data structure with the primes p1 = 11 and p2 = 5. Give the pseudo keys for the following keys:
a) 198
b) 24
For the numeric key: 987845369, the key is folded about 845. The addition is performed as:
845 + 987 + 369 = 2201
Thus, the pseudo key would be 201.
For the non-numeric key "AlMcAllister", the key is folded about the second grouping "Alli". The addition is performed as:
A + l + l + i = Alli
0100 0001 0110 1100 0110 1100 0110 1001 A l M c 0100 0001 0110 1100 0100 1101 0110 0011
AlMc + t + e + r + s + t + e + r = 01110011011101000110010101110010
1111 0110 0100 1101 0001 1111 0011 1110
Treating this result as a positive 32-bit integer, the pseudo key would be 4,132,249,406.
Figure 5.17: Fold-Shifting Key Conversion