Define f : Z → N + by ( f (x) = 2|x| if x < 0, 2x + 1 if x ≥ 0 ). Show that f has inverse. Note that N + = N \ {0}

523 Views Asked by At

Define f : Z → N + by ( f (x) = 2|x| if x < 0, 2x + 1 if x ≥ 0 ). Show that f has inverse. Note that N + = N \ {0}.

I don't know how to prove that f has inverse. Can you help me ?

3

There are 3 best solutions below

0
On BEST ANSWER

Plug if a few values into f and you'll see what the inverse has to be.

f(0)=1

f(-1)=2

f(1)=3

f(-2)=4

f(2)=5

f(-3)=6

Putting it in this order makes it clear what the inverse is. Look at what the inverse has to do to even and odd numbers separately.

0
On

Note that $f$ send negative numbers to even numbers and positive numbers to odd numbers. So, the inverse of $f$ is

$g:\mathbb{N}\setminus\{0\}\to\mathbb{Z}$ given by

$$\begin{cases}-\dfrac{n}{2}, &n\:\: \rm{even},\\\dfrac{n-1}{2}, &n\:\: \rm{odd},\end{cases}$$

0
On

Let $N \in \mathbb N+,$

if $N$ is even then $\exists! k\in \mathbb N+\;:\; N=2k=2|k|=f(-k)$

and

if $N$ is odd then $\exists! p\in \mathbb N\;:\; N=2p+1=f(p)$

qed.