Question
Linear Hashing . . . . . . . . . . . . . . . . . . . . . . .
Linear Hashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[10 points] Consider a hash table that operates under the linear hashing scheme. When the hash table is first created, it starts with N=4 slots (numbered 03), its split pointer s set to zero, and it uses the following hashing function: h0(x) = x mod 4 (a) At time t1, the hash table has grown to N=6 slots (numbered 05). i. [2 points] What is the value s of the split pointer at time t1? 2 0 2 1 2 2 2 3 2 4 2 None of the above ii. [3 points] Which hashing functions are active? Mark all that apply. 2 x mod 2 2 x mod 3 2 x mod 4 2 x mod 6 2 x mod 8 2 x mod 12 2 x mod 16 2 x mod 18 2 x mod 24 2 x mod 32 (b) At time t2, the hash table has grown to N=32 slots (numbered 031). i. [2 points] What is the value s of the split pointer at time t2? 2 0 2 1 2 2 2 3 2 4 2 None of the above ii. [3 points] Which hashing functions are active? Mark all that apply. 2 x mod 2 2 x mod 3 2 x mod 4 2 x mod 6 2 x mod 8 2 x mod 12 2 x mod 16 2 x mod 18 2 x mod 24 2 x mod 32
Consider a hash table that operates under the linear hashing scheme. When the hash table is first created, it starts with N=4 slots (numbered 0-3), its split pointer s set to zero, and it uses the following hashing function: h0(x)=xmod4 (a) At time t1, the hash table has grown to N=6 slots (numbered 05 ). i. [ 2 points] What is the value s of the split pointer at time t1 ? 01234 None of the above ii. [3 points] Which hashing functions are active? Mark all that apply. xmod2 xmod3 xmod4 xmod6 xmod8 xmod12 xmod16 xmod18 xmod24 xmod32 (b) At time t2, the hash table has grown to N=32 slots (numbered 0-31). i. [ 2 points] What is the value s of the split pointer at time t2 ? 01234 None of the above ii. [3 points] Which hashing functions are active? Mark all that apply. xmod2 xmod3 xmod4 xmod6 xmod8 xmod12 xmod16 xmod18 xmod24 xmod32
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