PPT Slide
Now let us look at typical keys and see how we might define a function
h(key) which will take a value for a key of some type and return an
integer which is a location in an array.
Definition - The domain of a function is the set of values the function takes
as input and the range of a function is the set of values the
function returns as outputs.
Let us look at last names as keys:
1. Assume no last name has more than 10 characters.
2. Assume each of the 26 letters of the English alphabet occur
with equal probability in each of the possible 10 positions
Number of names = 26*26* …= 26**10 !!!
Clearly we cannot have an array of size 26**10 so we need to
define h so that it has a range of the order of the number of