Question: You are developing a customer information system for a shopping centre. Each customer is assigned a unique customer registration number (CRN). To efficiently store and
You are developing a customer information system for a shopping centre. Each customer is assigned a unique customer registration number (CRN). To efficiently store and access data in a storage, you decided to use a hash table with 25 entries and a modulo operation as a hash function which gives equal chance of getting each hash values. Give answers and their derivation to the following: 1) Consider the case of using Open hashing. Explain how many collisions will happen when trying to store customer information with the following CRNS: 3372, 4797, 2048, 1127, 2774 2) Consider using Closed hashing instead, with a policy of using the next available hash value when collision occurs. Explain how many collisions will happen when trying to store the same customer information as above. 3) Assume that the system is initially empty and uses Closed hashing. Explain what is the probability of having collisions when adding three customers with random CRNS into the system. 4) If the size of the hash table is increased to have 50 entries, what will be the probability of having collisions when adding three customers with random CRNs into the system? Assume that the system is initially empty and uses Closed hashing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
