Hacker News new | ask | show | jobs
by detaro 2091 days ago
A hash function has a limited range of outputs (e.g. for a hashtable it might be a number only a few bits large), whereas the space of possible inputs is larger or even unrestricted - e.g. could be arbitrary text.

If you have a space of possible inputs that isn't larger thant the outputs, then you can indeed design hash functions that do not collide.