Computing Values of a Hash FunctionInstead of 10,000 students, suppose there are only 6. Define a functionH, from the set of student ID numbers to the set {0, 1, 2, 3, 4, 5, 6,7, 8, 9, 10} as follows:H(n) = n mod 11 for each ID number n.To compute values of H either use a calculator or a computer with abuilt-in mod function or use the formula n mod 11 = n - (n div 11). Inother words, divide n by 11, multiply the integer part of the resultby 11, and subtract that number from n.As an example, since 328343419/11 = 29849401.73.H(328343419) = 328343419 - (11 * 29849401) = 8. To store the link tothe record for the student with ID number n, start by computing H(n).For instance, if the ID numbers are 328343419, 356633102, 223799061,607275830 and 513408716, calculate the hash values and comment in detailwith mathematical justification on the hash function.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here