Solveeit Logo

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:NNf:N\to 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.

Explanation

Solution

A function is called bijective if it is both one-one and onto, it is one-one if f:ABf:A\to B has f(a)=f(b)a=b aA and bBf\left( a \right)=f\left( b \right)\Rightarrow a=b\text{ }\forall \text{a}\in \text{A and }\forall b\in B. The function f:ABf:A\to B is onto if bBa\exists b\in B\exists a unique aAa\in A such that f(a)=bf\left( a \right)=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:ABf:A\to B is called bijective if it is both one-one and onto.
One-one function: A function f:ABf:A\to B is one to one if f(a1)=f(a2)a1=a2f\left( {{a}_{1}} \right)=f\left( {{a}_{2}} \right)\Rightarrow {{a}_{1}}={{a}_{2}} where a1A,a2A{{a}_{1}}\in A,{{a}_{2}}\in A.
Here, A and B are both sets.
Onto function: A function f:ABf:A\to B is onto function if bBaA\exists b\in B\exists a\in A unique such that f(a)=bf\left( a \right)=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:NNf:N\to 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,bN,f(a)=f(b)a,b\in N,f\left( a \right)=f\left( b \right) we have to show that a = b.
Consider cases when a, b are odd, even etc.
Case I:

& a\to \text{odd} \\\ & b\to \text{even} \\\ & \text{then }f\left( a \right)=f\left( b \right) \\\ & \text{As a is odd}\Rightarrow f\left( a \right)=a+1 \\\ & \text{As b is even}\Rightarrow f\left( b \right)=b-1 \\\ & \Rightarrow f\left( a \right)=f\left( b \right) \\\ & \Rightarrow a+1=b-1 \\\ & \Rightarrow b-a=2 \\\ \end{aligned}$$ Now, because a and b are odd and even and hence the difference of them can never be equal to 2. So, Case I is not possible as $b-a\ne 2$ for any b-even and a-odd. Case II: $$\begin{aligned} & a\to \text{odd} \\\ & b\to \text{odd} \\\ & \Rightarrow f\left( a \right)=f\left( b \right) \\\ & \Rightarrow a+1=b+1 \\\ & \Rightarrow a=b \\\ \end{aligned}$$ So, $$\Rightarrow f\left( a \right)=f\left( b \right)\Rightarrow a=b$$ Consider Case III: $$\begin{aligned} & a\to \text{even} \\\ & b\to \text{even} \\\ & \Rightarrow f\left( a \right)=f\left( b \right) \\\ & \Rightarrow a-1=b-1 \\\ & \Rightarrow a=b \\\ \end{aligned}$$ So, $$\Rightarrow f\left( a \right)=f\left( b \right)\Rightarrow a=b$$ So, from above cases we have $$\Rightarrow f\left( a \right)=f\left( b \right)\Rightarrow a=b$$ Therefore, function f is one-one . . . . . . . . . . . . . . . . . (i) Now, we will check for it. We have, $$f\left( x \right)=\left\\{ \begin{aligned} & x+1,\text{ if x is odd} \\\ & x-1,\text{ if x is even} \\\ \end{aligned} \right.$$ Let y=f(x) Case I: $$\begin{aligned} & x\to \text{odd} \\\ & \text{when }x\to \text{odd} \\\ & \Rightarrow f\left( x \right)=x+1 \\\ & \Rightarrow y=x+1 \\\ & \Rightarrow x=y-1 \\\ \end{aligned}$$ So, for x even we will get y as even as y=x+1. Case II: $$\begin{aligned} & x\to \text{even} \\\ & \text{when }x\to \text{even} \\\ & \Rightarrow f\left( x \right)=x-1 \\\ & \Rightarrow y=x-1 \\\ & \Rightarrow x=y+1 \\\ & \text{when }x\to \text{even}=y\to \text{odd} \\\ \end{aligned}$$ So, we have $$x=\left\\{ \begin{aligned} & y-1;y\to \text{even} \\\ & \text{y+1;y}\to \text{odd} \\\ \end{aligned} \right.$$ Now, as we had $f:1N\to 1N$ so for any number $b\in 1N$ we have a unique $a\in N$ such that $f\left( a \right)=b$ as $$x={{f}^{-1}}\left( y \right)=\left\\{ \begin{aligned} & y-1;y\to \text{even} \\\ & y+1;y\to \text{odd} \\\ \end{aligned} \right.$$ So, all even and odd are covered. Hence, the function f is onto. . . . . . . . . . . . . . . . . . . . . . . . (ii) Therefore, from (i) and (ii) we have $$f\left( x \right)=\left\\{ \begin{aligned} & x+1,\text{x}\to \text{odd} \\\ & x-1,\text{x}\to \text{even} \\\ \end{aligned} \right.$$ is a bijective function. **Note:** To have a better understanding, students can always assume values and check whether f given as $f:N\to N$ as $f\left( x \right)=\left\\{ \begin{aligned} & x+1,\text{x}\to \text{odd} \\\ & x-1,\text{x}\to \text{even} \\\ \end{aligned} \right.$ is one-one and onto. For confusion in Case I of one-one as a = odd and b = even, any odd number is of the form $a=2n+1\Rightarrow a=2n-1$ and any even b is of the form $b=2n$ then their difference $$b-a=\left( 2n \right)-\left( 2n-1 \right)=+1\Rightarrow \left( 2n \right)-\left( 2n+1 \right)=-1$$ So, this is never 2. This is for consecutive numbers. Hence, b-a is never 2, even if consecutive numbers are not taken. So, case I am rejected.