Question: What happens if we insert keys 8 , 3 1 , 1 9 , 1 7 , 2 1 , 4 1 , 1 2

What happens if we insert keys 8,31,19,17,21,41,12,15,10 into a hash table where colliam
keys are stored in linked lists (as we did during the lecture - this is called "chaining") with the
hash function
h(k)=kmod11
Let #U=N=2?
u,m=2.
Represent xinU as binary number of length
u
bin(x)inB?
u.
Pick subset of indices in 0:
u-1
bin(x)[jy]z=bin(x)[i-1],dots,bin(x)[0]h(x)=(:z:)hxbin(x)
uzbin(x)p{h|EE(xy),h(x)=h(y)}{x)?,y,xyp{h|h(x)=h(y)}.S#S=np(S)=([N],[n])-1h:U[0:m-1]0j0
Concatenate bits bin(x)[jy]
z=bin(x)[i-1],dots,bin(x)[0]
and interpret as number
h(x)=(:z:)
Show that h distributes keys evenly.
Figure 1.To hash x convert it into a binary number bin(x)of length
u, obtain z
by concatenating a prescribed subsequence of bits of bin(x) and convert back.
Explain why (the proof of Lemma 9, lecture on Universal and Perfect Hashing)
p{h|EE(xy),h(x)=h(y)}{x)?,y,xyp{h|h(x)=h(y)}.
Suppose each set S with #S=nis chosen randomly with probability
p(S)=([N],[n])-1
and h:U[0:m-1] distributes keys evenly.
(1) Give asymptotic bounds for the expected times to perform, insert, delete and find ifwe
resolve conflicts by chaining.
(2) How do these bounds change ifwe use23-trees instead of linked lists? please solve second task
 What happens if we insert keys 8,31,19,17,21,41,12,15,10 into a hash table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!