Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[6 pts] Suppose we are going to hash numbers into a hash table using open addressing with double hashing. 1 Thus there are two auxiliary
[6 pts] Suppose we are going to hash numbers into a hash table using open addressing with double hashing. 1 Thus there are two auxiliary hash functions, h1(k) and h2(k) (where k is the value of the key to be hashed). The successive locations for probes into a hash table of size n are given by the function h(k,i)=(h1(k)+ih2(k))%n,fori=0,1,2,,n1. Suppose: n=19h1(k)=k2h2(k)=1+(k%18) Hash the first eleven prime numbers into this table, in order. In the table below, show the location into which the each successive number is placed. I have done the first five for you. Your job is to fill in the tables for the last six. See next page. You just need to show the tables, not your work. You only need to fill in the unshaded rows. Here are the first 11 prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 Hint: I found it easiest to use a spreadsheet to do the calculations. Solution: (Fill in the bright yellow boxes) P1=2 P2=3 P3=5 P4=7 P5=11 P6=13 P7=17 P8=19 P9=23 P11=31
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