Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Implement dynamic tables with open addressing using a linear probing function based on myhash() given in HashTable.ipynb. When the load factor is greater than
1. Implement dynamic tables with open addressing using a linear probing function based on myhash() given in HashTable.ipynb. When the load factor is greater than 1/2, expand to a new table that doubles the size of the old. When the load factor is less than 1/4, contract to a new table that halves the size of the old. 2. Run the following experiments: generate a binary string using PRNG of length 100 , where 1 represents insertion and 0 deletion. For each 1 in the binary string, generate a 3-digit key to insert using a PRNG and for each 0 in the binary string, select at random a number in the table to delete. Count the number of times of table expansion and table contraction. Repeat the experiments for 20 times and compute the average number of times the able is expanded and the average number of times the table is contracted
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started