A function f from the set of natural numbers to integers defined by f(n) = (n-1)/2 when n is odd; f(n) = -n/2 when n is even, is
- A. one-one and but not on to
- B. onto but not one-one
- C. one-one and onto both
- D. neither one-one nor onto
Answer: C. one-one and onto both
Explanation: Odd natural numbers {1, 3, 5, ...} map to non-negative integers {0, 1, 2, ...} and even natural numbers {2, 4, 6, ...} map to negative integers {-1, -2, -3, ...}. Each integer has a unique preimage in N, making f both one-one and onto.