when does a function have an inverse function
Inverse function Not all functions have inverse functions. In order for a function f: X → Y to have an inverse,[nb 1] it must have the property that for every y in Y there must be one, and only one x in X so that f(x) = y. This property ensures that a function g: Y → X will exist having the necessary relationship with f.
Hash function Good hash functions, in the original sense of the term, are usually required to satisfy certain properties listed below. The exact requirements are dependent on the application, for example a hash function well suited to indexing data will probably be a poor choice for a cryptographic hash function.