UGC-NET Jan 2017 · File Organization & Data Types

MCQ · 2 marks · Problem DBMS-INDX-0004

If $h$ is chosen from a universal collection of hash functions and is used to hash $n$ keys into a table of size $m$, where $n \leq m$, the expected number of collisions involving a particular key $x$ is less than .
  1. A
    $1$
  2. B
    $1/n$
  3. C
    $1/m$
  4. D
    $n/m$

Solve it on GATE DA practice →More Storage & Indexing problems

Show the worked solution\[\boxed{\Pr[h(x)=h(y)]\le\frac1m\ \text{for }x\ne y}\]That is the universal-hashing guarantee. Summing over the other \(n-1\) keys gives\[E[\text{collisions with }x]\le\frac{n-1}{m}<\frac{n}{m}\le1\quad(\text{since }n\le m).\]So the expected number is less than \(1\).Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com