JEE MainMathematicsFunctions
Let a function f: N N be defined by f(n) = cases n + |k-2|, & if n is odd n - |k-2|, & if n is even cases where k is an integer. If f is a bijective function, then the sum of all possible values of k is
Options
- A6
- B2
- C4
- D10
Correct answer
A. 6
Step-by-step solution
Let c = |k-2| . Since c is an absolute value, c 0 and c is an integer. The function is given by f(n) = n + c for odd n , and f(n) = n - c for even n . Case 1: c = 0 Then f(n) = n for all n N . This is the identity function, which is clearly bijective. So, |k-2| = 0 k = 2 . Case 2: c = 1 For odd n ( 1, 3, 5, ), f(n) = n + 1 , which gives the even numbers ( 2, 4, 6, ). For even n ( 2, 4, 6, ), f(n) = n - 1 , which gives the odd numbers ( 1, 3, 5, ). The function perfectly swaps adjacent odd and even numbers, covering