3 ms·
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
by detaro 6y 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.