Consider a double hashing scheme in which the primary hash function is h1(k) = k mod 23, and the secondary hash function is h2(k) = 1+(k mod 19). Assume that the table size is 23. Then the address returned by probe 1 in the probe sequence (assume that the probe sequence begins at probe 0) for key value k = 90 is ________ .
Note – This question was Numerical Type.
(A) 13
(B) 15
(C) 21
(D) 23
Answer: (A)
Explanation: Given,
Table size = 23, key value k = 90, And, probe i = 1 (probe 1 in the probe sequence)
According to double hashing, we use the formula as,
(h1(k) + i*h1(k)) mod (table size)
where i denotes probe value.
Now,
h1(k) = k mod 23 = 90 mod 23 = 21 And, h2(k) = 1+(k mod 19) = 1+(90 mod 19) = 15
Using to double hashing,
= (h1(k) + i*h1(k)) mod (table size) = (21 + 15) mod 23 = 36 mod 23 = 13
Option (A) is correct.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 1999 | Question 36
- GATE | GATE CS Mock 2018 | Question 39
- Top 5 Topics for Each Section of GATE CS Syllabus
- How to prepare in Last 10 days to score high in GATE?
- Aptitude | GATE IT 2006 | Question 7
- Aptitude | GATE IT 2006 | Question 8
- GATE | GATE CS 2013 | Question 1
- GATE | GATE CS 2013 | Question 3
- GATE | GATE CS 2013 | Question 4
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 6
- GATE | GATE CS 2013 | Question 7
- GATE | GATE CS 2013 | Question 8
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 11
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 17
- GATE | GATE CS 2013 | Question 18
- GATE | GATE CS 2013 | Question 19

