Can the inverse of this function be expressed in closed form?

762 Views Asked by At

So there is such a visual way to show that set of integers has the same cardinality as the set of natural numbers. $$0,1,-1,2,-2,3,-3,4,-4,5,-5...$$ But I think it is not really rigorous proof (and I think it does not pretend to be so) of the fact that integers and natural numbers are equipotent, because it doesn't really show the bijective function between $\mathbb{Z}$ and $\mathbb{N}$ . So I tried to find such a function which will represent the sequence above. So what I found was this: $$f(n)=\sum_{i=0}^{n-1} i\cdot(-1)^{i+1}$$ The domain of course is $\mathbb{N}$. And although this function associates some integer to every natural number, I do not know how to show that for any integer $b$ I can find some $m$ such that $f(m)=b$. So to do this I need to find the inverse function of $f$ or at least show that this inverse exists, but can this inverse function be expressed in closed form? If not, is it possible to prove the inverse exists?

2

There are 2 best solutions below

0
On BEST ANSWER

$f^{-1}(n) = |2n - \frac{1}{2}| + \frac{1}{2}$

4
On

I am not sure what you consider to be a closed form, but I would consider a simpler version of the function $f$ to be: $$ f(n)=-\lfloor n/2\rfloor\cdot(-1)^n $$ and the inverse could be expressed as: $$ f^{-1}(n)= \begin{cases} 2n & \text{if }n>0\\ -2n+1 & \text{otherwise} \end{cases} $$