Maths Olympiad Prep

Track / Stage 6 / 208 of 400 #1208 of 1964

Problem 1208

National Olympiad, first round
Number theory Difficulty 6.3 Prove it

Let the hashing function be h(K)K(modm)h(K) \equiv K(\bmod m), with 0h(K)<m0 \leqslant h(K)<m, and let the probing sequence for collision resolution be hj(K)h(K)+jq(modm)h_{j}(K) \equiv h(K)+j q(\bmod m), 0hj(K)<m0 \leqslant h_{j}(K)<m, for j=1,2,,m1j=1,2, \ldots, m-1. Show that all memory locations are probed
a) if mm is prime and 1qm11 \leqslant q \leqslant m-1.
b) if m=2rm=2^{r} and qq is odd.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

None

Source: NuminaMath-1.5, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.