Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedimage text in transcribed

[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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

25 Vba Macros For Data Analysis In Microsoft Excel

Authors: Klemens Nguyen

1st Edition

B0CNSXYMTC, 979-8868455629

More Books

Students also viewed these Databases questions

Question

What is the meaning of internal control?

Answered: 1 week ago

Question

2. Describe how technology can impact intercultural interaction.

Answered: 1 week ago

Question

7. Define cultural space.

Answered: 1 week ago