1
GATE CSE 2023
+1
-0.33

An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let $$k$$ be the number of keys, $$m$$ be the number of slots in the hash table, and $$k > m$$. Which one of the following is the best hashing strategy to counteract the adversary?

A
Division method, i.e., use the hash function $$h(k)=k$$ mod $$m$$.
B
Multiplication method, i.e., use the has function $$h(k) = \left\lfloor {m(kA - \left\lfloor {kA} \right\rfloor )} \right\rfloor$$, where $$A$$ is a carefully chosen constant.
C
Universal hashing method.
D
If $$k$$ is a prime number, use Division method. Otherwise, use Multiplication method.
2
GATE CSE 2022
+1
-0.33

Suppose we are given n keys, m has table slots, and two simple uniform hash functions h1 and h2. Further suppose our hashing scheme uses h1 for the odd keys and h2 for the even keys. What is the expected number of keys in a slot?

A
$${m \over n}$$
B
$${n \over m}$$
C
$${2n \over m}$$
D
$${n \over 2m}$$
3
GATE CSE 2020
Numerical
+1
-0.33
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 _______.
4
GATE CSE 2015 Set 3
Numerical
+1
-0
Given a hash table $$𝑇$$ with $$25$$ slots that stores $$2000$$ elements, the load factor $$\alpha$$ for $$𝑇$$ is ____________ .
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Digital Logic
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages
Computer Organization
EXAM MAP
Joint Entrance Examination