Question
Question: Define a bijective function. Show that \(f:N\to N\) given by \[f\left( x \right)=\left\\{ \begin{ali...
Define a bijective function. Show that f:N→N given by f\left( x \right)=\left\\{ \begin{aligned} & x+1,\text{ if x is odd} \\\ & x-1,\text{ if x is even} \\\ \end{aligned} \right. is a bijective function.
Solution
A function is called bijective if it is both one-one and onto, it is one-one if f:A→B has f(a)=f(b)⇒a=b ∀a∈A and ∀b∈B. The function f:A→B is onto if ∃b∈B∃a unique a∈A such that f(a)=b. We will consider cases for a and b being even or odd and then check for all that, they are one-one and onto or not.
Complete step-by-step answer:
Let us define a bijective function first.
A function f:A→B is called bijective if it is both one-one and onto.
One-one function: A function f:A→B is one to one if f(a1)=f(a2)⇒a1=a2 where a1∈A,a2∈A.
Here, A and B are both sets.
Onto function: A function f:A→B is onto function if ∃b∈B∃a∈A unique such that f(a)=b. Basically, for every image of f there exists a preimage of f.
Hence, we have defined a bijective function. We have f as f:N→N given by f\left( x \right)=\left\\{ \begin{aligned}
& x+1,\text{ if x is odd} \\\
& x-1,\text{ if x is even} \\\
\end{aligned} \right. is a bijective function.
Let us first show f is one-to-one.
Let us assume for a,b∈N,f(a)=f(b) we have to show that a = b.
Consider cases when a, b are odd, even etc.
Case I: