Given the following input (4322, 1334, 1471, 9679, 1989, 6171,
6173, 4199) and the hash function x mod 9, which of the following
statements are true? (GATE CS 2004)
i. 9679, and 1471 hash to the same value
ii. 4199 and 6171 hash to the same value
iii. All elements hash to the same value
iv. Each element hashes to a different value
(A) i only
(B) ii only
(C) i and ii only
(D) iii or iv
Show your work
As you can see here, each element has the same hash value for the hash function x mod 9 +
So the answer should be "All element hash to same value" but there is no option for iii, hence the D option is correct as iii or iv.
I hope it helps.
Get Answers For Free
Most questions answered within 1 hours.