1.

Show thatthe functionf : N to Ndefinedby f(x) = {[x-1 \ if \x \ is \ even], [x +1 \ if \ x is \ odd]} is one-oneand onto.

Answer»

SOLUTION :Suppose `f(x_(1))= f(x_(2))`
Case 1when`x_(1) ` isodd and `x_(2)`is even
In THISCASE `f(x_(1)) =f(x_(2)) rArr x_(1) +1 =x_(2)-1`
`rArr x_(2) - x_(1)=2`
Thisis acodtradicationsince thatdifferencebetween anodd interger and anevenintegercan neverbe 2.
Thusin this case`f(x_(1))NE f(x_(2))`
Similarlywhen `x_(1)`is evenand `x_(2)`is oddthen `f(x_(1)) ne f(x_(2))`
Case 2when `x_(1)" and " x_(2)`are bothodd
In thiscase`f(x_(1))=f(x_(2)) rArr x_(1)+ 1 =x_(2) -1`
`rArr x_(1)=x_(2)`
`:.` f isone-one
Case 3When `x_(1) " and " x_(2)`are both even
In thiscase `f(x_(1))=f(x_(2))rArr x_(1) -1 =x_(2) -1`
`rArr x_(1)= x_(2)`
`:.`f is one-one In orderto showthat FIS ontolet `y in N`(the codomain)
Case 1 wheny is odd
In thiscase `(y +1)` is even
`:. f( y+1) =(y+1)-1 =y`
Case 2wheny is even
In thiscase `(y-1) ` is odd
`:. f (y-1)=y-1 +1=y`
Thuseach `y in N`(codomain of f)has itspre-imagein dom (f)
`:. ` f is onto.
Hence f is one-oneonto.


Discussion

No Comment Found

Related InterviewSolutions