# Represent sorting position by a parametric form

Given a set of random integers {0,5,100,65,...,0,1,2}, is there a mathematical method existing to construct a parametric form $f$ (the number of parameters $<<$ the number of integers) so that given any integer $x$, $f(x)$ gives the relative position (sorting position) of $x$?

Thanks!

-
Just for clarity I suggest that you either remove the second zero or explain how it should be treated (even though the general answer is no). – Bitwise Sep 26 '12 at 13:46

The silly answer is yes. For your example (and ignoring the second zero), $$f(x)=\begin {cases} 1 & x=0 \\2 & x=5 \\ 3 & x=100 \\ \ldots \end {cases}$$ You can also find an interpolating polynomial through the points-for these first three it would be $f(x)=(x-1)(5(x-3)+100(x-2))$
I suspect neither of these is what you were thinking of, that the structure is so complicated that it violates the idea of "few parameters". If so, there cannot be one, as you need to pick out one order out of $n!$ You need too much information to make a simple function.