Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EXAMPLE BELOW: Question: Demonstrate the insertion of keys 93,40,47,55 into a hash table using open addressing with double hashing scheme. Let the hash table have

image text in transcribedEXAMPLE BELOW: image text in transcribed

Question: Demonstrate the insertion of keys 93,40,47,55 into a hash table using open addressing with double hashing scheme. Let the hash table have 7 slots, and let the hash function be h(k)=kmod7 and R=5 Hints: h(k,i)=(h1(k)+f(i))modmh1(k)=kmodmf(i)=i(h2(k)),i=0,1,2,3,4,m1h2(k)=R(kmodR) - Insert keys 89,18,49,58,69 using double hashing with m=10 and R=7 Double hashing h(k,i)=(h1(k)+f(i))modm; where h1(k)=kmodm,f(i)=ih2(k) where i=0,1,2m1, and h2(k)=R(kmodR) To insert key 89: h1(k)=kmod10h1(89)=89mod10=9h2(k)=R(kmodR)h2(89)=7(89mod7)=2f(i)=ih2(k)f(0)=02=0[fori=0] L=h(k,i)=(h1(k)+f(i))modmh(89,0)=(9+0)mod10=9 T[9] empty ? Yes. Number of Probe 1 Probe sequence =T[9] Question: Demonstrate the insertion of keys 93,40,47,55 into a hash table using open addressing with double hashing scheme. Let the hash table have 7 slots, and let the hash function be h(k)=kmod7 and R=5 Hints: h(k,i)=(h1(k)+f(i))modmh1(k)=kmodmf(i)=i(h2(k)),i=0,1,2,3,4,m1h2(k)=R(kmodR) - Insert keys 89,18,49,58,69 using double hashing with m=10 and R=7 Double hashing h(k,i)=(h1(k)+f(i))modm; where h1(k)=kmodm,f(i)=ih2(k) where i=0,1,2m1, and h2(k)=R(kmodR) To insert key 89: h1(k)=kmod10h1(89)=89mod10=9h2(k)=R(kmodR)h2(89)=7(89mod7)=2f(i)=ih2(k)f(0)=02=0[fori=0] L=h(k,i)=(h1(k)+f(i))modmh(89,0)=(9+0)mod10=9 T[9] empty ? Yes. Number of Probe 1 Probe sequence =T[9]

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_2

Step: 3

blur-text-image_3

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago