32.4k views
4 votes
Give the Division Hashing function and the index it maps the key 2000 into, assuming a primary storage area array size of 61 elements and: a) The range of the keys is 0 to 999,999. b) The range of the keys is 100 to 999,999.

1 Answer

4 votes

Answer:

Check the explanation

Step-by-step explanation:

the elementary storage array size is 61 elements

in finding the location, we will need to do mod the process amid the key value and hash table size

Key value=2000

Hash table size=61

Location= key value % hash table size

= 2000 % 61

= 48

so now the position of the key in both cases are

a)48

b)48

11)

a)Compute the loading factor of the structure.

The key and address and same with no form of modification (direct hashing function)in between,

given size=60000

the Load factor is The ratio of the amount of items that is in a table to the table’s size

no of items are from 100,000 - 2000 +1

= 98001

loading factor of the structure= 98001/60000

= 1.633

b) Compute the density of the structure assuming a node width of 100 bytes

density of structure is given by number of values size by total size i

60,000*100 / (60,000*100 + 98,001*4)

= 0.93

User Denoise
by
4.8k points