InterviewSolution
Saved Bookmarks
| 1. |
Let f : N → N be defined by\(\ f(n) = \begin{cases} \frac{n+1}{2} \,, & \quad \text {if } n \text { is odd} \\ \frac{n}{2} \,, & \quad \text{if }n \text{ is even} \end{cases}\) for all n ∈ NFind whether the function is bijective or not. Give reasons. |
|
Answer» f (3) = \(\frac{3+1}{2} =2 \) and f(4) = \(\frac{4}{2}\) = 2 So, although 3 ≠ 4, f (3) = f (4) ⇒ f is not one-one but many-one. For onto, consider any n ∈ N. When n is odd, then (2n – 1) is odd, so f (2n – 1) = \(\frac{2n-1+1}{2}\) = n when n is even, then 2n is even, so f (2n) = \(\frac{2n}{2}\) = n Thus for every n ∈ N, whether even or odd, there exists a pre-image n ∈ N, so the function f is onto. Hence the function f is many-one onto. |
|