Ordinal hash function

229 Views Asked by At

Suppose I have a set of integers from 0 to 100. Is there a non-invertible operation where the result is guaranteed to have the same ordinality as the input?

In other words, given 0 < 1 < 2,..., is there a function $H(x)$ which would result in: $H(0) < H(1) < H(2)$, whilst retaining the property that if both $H$ and $H(n)$ are known, $n$ cannot be trivially calculated (other than with a binary-search)

I've been attempting to use modulo-exponentiation, but I cannot see how to force it to produce the correct order.