Skip to content
GATEiit

GATE DA 2024 Q21: Expected probes to insert into an open-address hash table

Question

Consider performing uniform hashing on an open address hash table with load factor α=nm<1\alpha = \dfrac{n}{m} < 1, where nn elements are stored in the table with mm slots. The expected number of probes in an unsuccessful search is at most 11−α\dfrac{1}{1-\alpha}.

Inserting an element in this hash table requires at most ______ probes, on average.

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2024 final answer key)

Concept used: Open addressing: an insertion probes exactly like an unsuccessful search until it finds an empty slot.

First step: Inserting means searching for the key without finding it, then using the empty slot reached, so the same bound applies.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2024 DA question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key