Please I want a detailed complete answers for each part Then


                  Please I want a detailed complete answers for each part. Then make sure you provide clear picture(s) of soultions that I can read. Try making all numbers and letters clrearly readable easy to recognize. You also can type it which I prefer so I can copy all later, paste them in Microsoft Word to enlarge & edit if needed. Thanks for all :)

9.16: Using closed hashing, with double hashing to resolve collisions insert the following keys into a hash table of thirteen slots (the slots are numbered 0 through 12). The hash functions to be used are H1 and H2, defined below. You should show the hash table after all eight keys have been inserted. Be sure to indicate how you are using H1 and H2 to do the hashing. Function Rev0k) reverses the decimal digits of k, for example, Rev(37)-73; Rev(7) 7 a) H1(k) k mod(13); an b) H20k) Rev(k mod(11). Keys: 2, 8, 31, 20, 19, 18, 53, 27

Solution

In double hashing we first try to map it through H1 and if collision occurs then choose H2.

For key = 2: H1(2) = 2 which is empty so it\'ll fit at 2nd-index position.

For key = 8: H1(8) = 8 which is empty so it\'ll fit at 8th-index position.

For key = 31: H1(31) = 5 which is empty so it\'ll fit at 5th-index

For key = 20: H1(20) = 7 which is empty so it\'ll fit at 7th-index

For key = 19: H1(19) = 6 which is empty sp it\'ll fit at 6th-index

For key = 18: H1(18) = 5 which isn\'t empty so H2(18) = 91%11 = 3 which is empty so it\'ll fit at 3rd-index

For key = 53: H1(53) = 1 which is empty so it\'ll fit at 1-index

For key = 27: H1(27) = 1 which isn\'t empty so H2(27) = 82%11 = 4 which is empty so it\'ll fit at 4th index.

 Please I want a detailed complete answers for each part. Then make sure you provide clear picture(s) of soultions that I can read. Try making all numbers and l

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site