Skip to content
Snippets Groups Projects
Commit ca65177d authored by Martin Mareš's avatar Martin Mareš
Browse files

Linear probing: Bug fixes

parent e901e8a6
Branches
No related tags found
No related merge requests found
......@@ -599,7 +599,7 @@ This is a~sequence of possible locations of the element in the array in decreasi
order of preference. The cells will be numbered from~0 to~$m-1$ and indexed modulo~$m$.
\alg{Insert} follows the probe sequence until it finds an~empty cell.
\alg{Find} follows the probe sequence until it either finds a~mathching item,
\alg{Find} follows the probe sequence until it either finds a~matching item,
or it finds an~empty cell.
\alg{Delete} is more complicated, since we generally cannot remove items
from their cells --- a~probe sequence for a~different item could have been
......@@ -660,7 +660,7 @@ in most probability theory textbooks).
\theoremn{Chernoff bound for the right tail}{
Let $X_1,\ldots,X_k$ be independent random variables taking values in $\{0,1\}$.
Let further $X = X_1 + \ldots + X_k$, $\mu = \E[X]$, and $c>1$. Then
$$\Pr[X > c\mu] = \left( \e^{c-1} \over c^c \right) ^ \mu.$$
$$\Pr[X > c\mu] \le \left( \e^{c-1} \over c^c \right) ^ \mu.$$
}
\lemma{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment