In computer science, quadratic probing is used in hash tables. We choose a $c_1$ and $c_2$ in the hash formula $h(k,i) = (h'(k) + c_1 i + c_2 i^2) \mod{m}$ where $h'(k) = k \mod{m}$ and $m$ is the size of the table. Now say I choose $c_1$ and $c_2$ to be $1$ and $m = 13$. We want $h(k,i)$ to be a permutation of the numbers $0,1,2,...,12$.
It appears that choosing value $1$ for constants $c_1$ and $c_2$ is not a fitting match for this problem. I think it might has to do with the fact that $13$ is prime.
Anyhow, I want to show that:
$\nexists_{i \in \mathcal{n}}: h(k,i) = ((k \mod{13}) + i + i^2)\mod{13} = q$
Where using $q = (k+1)\mod{13}$ will work. For example; there does not exists an $i \in \mathbb{N}$ such that
$h(5,i) = 6$.
I rewrite;
$h(5,i) = ((5\mod{13}) + i + i^2)\mod{13} = (5 + i + i^2)\mod{13} = 6$
Which holds iff
$(i^2 + i - 1)\mod{13} = 0$.
I can't manage to get a formal proof there exists no such $i \in \mathbb{N}$, or am I doing something wrong here? Any help would be greatly appreciated!
You're using modular arithmetic modulo 13, so 0=13=26=..., 1=14=27=... and the equations really mean the numbers are equal. You have only to check thirteen numbers, there is no point trying others. If none of the thirteen is the root of your equation, you have your formal proof that the solution does not exist.
If you want to check other equations, two further facts may be of use:
Ok, maybe now I better understand your question. Going on: