(Solved) : 23 12 Consider Hash Table Size 10 External Overflow Chaining Used Resolve Collisions Using Q42334221 . . .

$9.00

23-24 thanks !!
23. (12%) Consider a hash table of size 10, where external (overflow) chaining is used to resolve collisions using the follow23. (12%) Consider a hash table of size 10, where external (overflow) chaining is used to resolve collisions using the following hash functions. a) h(x)=x3 % 10 b) h(x) =x2 % 10 c) h(x) =(11x)%10 d) h(x) =(12x]%10 Suppose the numbers 0,1,2, …, 19 are inserted in sequence. Fill up the following tables. Note that • New numbers are inserted at the head of the chain. • If a table entry has more than one key, then list the keys in the order that they are linked Hints: (xy) %10 is the same as ((x%10)*(y%10) % 10 a. h(x)=x3 % 10 2 Slotu o 3 1 2 3 4 4 5 6 b.h(x)=x2 %10 0 1 2 3 4 Slot# keys eh_110210 c.h(x) =11×2 % 10 4 5 0 1 2 3 6 Slot# keys d. h(x) =(12x) %10 4 5 I 1 I 2 3 Slot# 10 keys 24. (Cont.) a) Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for key values ranging from 0 to 2020? b) Which two hash functions have the same key distributions? Show transcribed image text 23. (12%) Consider a hash table of size 10, where external (overflow) chaining is used to resolve collisions using the following hash functions. a) h(x)=x3 % 10 b) h(x) =x2 % 10 c) h(x) =(11x)%10 d) h(x) =(12x]%10 Suppose the numbers 0,1,2, …, 19 are inserted in sequence. Fill up the following tables. Note that • New numbers are inserted at the head of the chain. • If a table entry has more than one key, then list the keys in the order that they are linked Hints: (xy) %10 is the same as ((x%10)*(y%10) % 10 a. h(x)=x3 % 10 2 Slotu o 3 1 2 3 4 4 5 6 b.h(x)=x2 %10 0 1 2 3 4 Slot# keys eh_110210 c.h(x) =11×2 % 10 4 5 0 1 2 3 6 Slot# keys d. h(x) =(12x) %10 4 5 I 1 I 2 3 Slot# 10 keys 24. (Cont.) a) Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for key values ranging from 0 to 2020? b) Which two hash functions have the same key distributions?

Expert Answer


Answer to 23. (12%) Consider a hash table of size 10, where external (overflow) chaining is used to resolve collisions using the f…

Category:

Description

23-24 thanks !!
23. (12%) Consider a hash table of size 10, where external (overflow) chaining is used to resolve collisions using the follow23. (12%) Consider a hash table of size 10, where external (overflow) chaining is used to resolve collisions using the following hash functions. a) h(x)=x3 % 10 b) h(x) =x2 % 10 c) h(x) =(11x)%10 d) h(x) =(12x]%10 Suppose the numbers 0,1,2, …, 19 are inserted in sequence. Fill up the following tables. Note that • New numbers are inserted at the head ... View full description