Knowee
Questions
Features
Study Tools

Multi Choice Type QuestionConsider 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 asked in Gate CS 2020.Marks : 1Negative Marks : 0Answer here13152123

Question

Multi Choice Type QuestionConsider 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 asked in Gate CS 2020.Marks : 1Negative Marks : 0Answer here13152123

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

To solve this problem, we need to use the given hash functions and the key value.

Step 1: Calculate the primary hash function h1(k) = k mod 23. Substitute k = 90 into the equation, we get h1(90) = 90 mod 23 = 21.

Step 2: Calculate the secondary hash function h2(k) = 1+(k mod 19). Substitute k = 90 into the equation, we get h2(90) = 1+(90 mod 19) = 1+14 = 15.

Step 3: Calculate the address returned by probe 1. In double hashing, the address returned by probe i is (h1(k) + ih2(k)) mod table size. Substitute i = 1, h1(k) = 21, h2(k) = 15, and table size = 23 into the equation, we get (21 + 115) mod 23 = 13.

So, the address returned by probe 1 for key value k = 90 is 13.

This problem has been solved

Similar Questions

Multi Choice Type QuestionFor the given hash table, in what location will element 58 be hashed using quadratic probing?Note: This kind of question will be helpful in clearing TCS recruitment.Marks : 1Negative Marks : 0Answer here1276

Multi Choice Type QuestionWhat is the primary purpose of a hash function in a hash table?Note: This kind of question will be helpful in clearing TCS recruitment.Marks : 1Negative Marks : 0Answer hereTo sort the elements in the hash tableTo determine the size of the hash tableTo compute the index (hash code) for each keyTo delete elements from the hash table

Double hashing is a closed addressing technique. Group of answer choicesTrueFalse

Multi Choice Type QuestionConsider a hash function that distributes keys uniformly. The hash table size is 20. After hashing of how many keys will the probability that any new key hashed collides with an existing one exceed 0.5?Note: This question was asked in Gate CS Exam.Marks : 1Negative Marks : 0Answer here56710

How many different insertion sequences of the key values using the same hash function and linear probing will result in the hash table shown above?a.30b.10c.20d.40

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.