Question: A parking lot has 31 visitor spaces, numbered from 0 to 30.Visitors are assigned parking spaces using the hashing function h(k) = k mod 31,

A parking lot has 31 visitor spaces, numbered from 0 to 30.Visitors are assigned parking spaces using the hashing function h(k) = k mod 31, where k is the number formed from the first three digits on a visitor's license plate.
a) Which spaces are assigned by the hashing function to cars that have these first three digits on their license plates: 317, 918, 007, 100, 111, 310?
b) Describe a procedure visitors should follow to find a free parking space, when the space they are assigned is occupied.

Step by Step Solution

3.45 Rating (177 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a We need to compute k mod 31 in each case A good way to do this on a calcul... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

923-M-C-M-S (1721).docx

120 KBs Word File

Students Have Also Explored These Related Statistics Questions!