Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please show all work! A famous hash function when the key values are positive integers is the mid-square method, which squares the key value and

image text in transcribed

Please show all work!

A famous hash function when the key values are positive integers is the mid-square method, which squares the key value and then takes out the "middle" r digits as the bin number. For instance, when r = 2, and the key value is 3450, we first square 3450 to get 11902500, and then take 02 as the bin number. And if the key value is 3162, we first square 3162 to get 9998244, and then take 98 as the bin number. Now answer the following question assuming that r = 2, and the key values are four digit numbers. (See Lecture 15 notes for guidance) How many buckets(bins) will be needed? For each of the key values 2237, 1697, and 9832, find its corresponding bucket. Give two key values that map to the same bucket(bin). If we need to search for the key value 2015, which bucket(bin) should we search in

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

outline some of the current issues facing HR managers

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago