Auditing relocation after a removal

A double-hashing table has capacity 11 and uses


pi(k)=((k mod 11)+i[1+(k mod 10)]) mod 11,i=0,1,2,….p_i(k)=\bigl((k\bmod 11)+i[1+(k\bmod 10)]\bigr)\bmod 11,\qquad i=0,1,2,\ldots.


A search stops when it finds its key or an EMPTY slot. A tombstone is a removed-entry marker that the search passes over. The initial table is shown below; E denotes EMPTY.


An eleven-slot hash table contains keys 3, 4, 8, and 14 at slots 3, 4, 6, and 8.


Key 3 is removed. A programmer proposes moving one remaining key into the vacated slot 3 and marking that key's former slot as indicated in each row below. No other slot changes.


Evaluate each proposal independently from the same initial table after removal. Enter yes or no for whether the moved key remains discoverable and whether every remaining live key remains discoverable by the stated search algorithm. The remaining live keys are 4, 8, and 14.

Moved keyFormer slotFormer slot becomesMoved key foundEvery live key found
148EMPTY
148TOMBSTONE
86TOMBSTONE

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Double Hashing and Removal Questions: