Removal when every slot has been used

A double-hashing table has capacity m=11m=11 and uses


pi(k)=(h1(k)+ih2(k)) mod 11,i=0,1,2,…,p_i(k)=\bigl(h_1(k)+i h_2(k)\bigr)\bmod 11,\qquad i=0,1,2,\ldots,


where h1(k)=k mod 11h_1(k)=k\bmod 11 and h2(k)=1+(k mod 10)h_2(k)=1+(k\bmod 10). A tombstone marks a removed entry; searches continue past it. In the table below, D denotes a tombstone. There are no EMPTY slots.


Slot

Contents

0

0

1

1

2

17

3

3

4

D

5

5

6

6

7

D

8

8

9

9

10

D


A removal searches until it finds its key or completes one full probe cycle. A successful removal replaces the key with a tombstone. Each slot inspected counts once, including tombstones; revisiting the starting slot is not counted.


Starting independently from this snapshot for each operation, find the number of slot inspections required to remove key 17 and to attempt to remove absent key 28. Give both counts as exact integers.

Your answers

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: