(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Consider a hash table T with 11 entries and the hash function h(x) = x mod 11. Show the result of hashing the keys 10,16,11,43,33,13,14,12,3, and 22, assuming collisions are handled by

(a) open addressing with linear probing

(b) double hashing using a secondary hash function h′(x) = 5−(x mod 5)

2. Relevant equations

3. The attempt at a solution

I believe I have the correct answer, I just want to double-check since I'm having difficulties.

Using a table I have:

Key ---- h(x) ---- h'(x) ---- probes LP ---- probes DH

10 ---- 10 ---- ---- 10 ---- 10

16 ---- 05 ---- ---- 5 ---- 5

11 ---- 00 ---- ---- 0 ---- 0

43 ---- 10 ---- 2 ---- 10, 0, 1 ---- 10,2

33 ---- 00 ---- 2 ---- 0, 1, 2 ---- 0, 2, 3

13 ---- 02 ---- 2 ---- 2,3 ---- 2,2,3,4

14 ---- 03 ---- 1 ---- 3,4 ---- 3,1

12 ---- 01 ---- 3 ---- 1,2,3,4,5,6 ---- 1,3,4,5,6

03 ---- 03 ---- 2 ---- 3,4,5,6,7 ---- 3,2,3,4,5,6,7

22 ---- 00 ---- 3 ---- 0,1,2,3,4,5,6,7,8 ---- 0,3,4,5,6,7,8

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Hash Tables Linear Probing and Double Hashing

**Physics Forums | Science Articles, Homework Help, Discussion**