[issue34751] Hash collisions for tuples

Jeroen Demeyer report at bugs.python.org
Sat Sep 22 05:12:44 EDT 2018


Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:

> I'm not aware of any research papers about picking multipliers in this context, but would love to see one.

The only real condition that I can think of is that the order should be large: we do not want MULTIPLIER**n = 1 (mod 2**N) for a small number n.

Other than that, we could pick the multiplier to guarantee no hash collisions on some chosen subset of inputs. A bit like your product(range(100), repeat=4) example but then for more inputs.

If you agree with this approach, I could try to find a good multiplier this way.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________


More information about the Python-bugs-list mailing list