Skip to main content
Back to Sets, Relations & Functions
JEE Main 2021
Sets, Relations & Functions
Functions
Medium

Question

Let A={1,2,3,....,10}A = \{ 1,2,3,....,10\} and f:AAf:A \to A be defined as f(k) = \left\{ {\matrix{ {k + 1} & {if\,k\,is\,odd} \cr k & {if\,k\,is\,even} \cr } } \right. Then the number of possible functions g:AAg:A \to A such that gof=fgof = f is :

Options

Solution

Key Concepts and Formulas

  • Function Composition: For functions f:ABf: A \to B and g:BCg: B \to C, the composite function gf:ACg \circ f: A \to C is defined by (gf)(x)=g(f(x))(g \circ f)(x) = g(f(x)) for all xAx \in A.
  • Image of a Function: The image of a function f:ABf: A \to B, denoted by Im(f)Im(f), is the set of all possible output values of ff. That is, Im(f)={f(x)xA}Im(f) = \{f(x) \mid x \in A\}.
  • Identity Function: The identity function idXid_X on a set XX is defined by idX(x)=xid_X(x) = x for all xXx \in X.

Step-by-Step Solution

Step 1: Analyze the function ff and determine its image.

The domain of the function ff is A={1,2,3,4,5,6,7,8,9,10}A = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}. The function ff is defined as: f(k) = \left\{ {\matrix{ {k + 1} & {if\,k\,is\,odd} \cr k & {if\,k\,is\,even} \cr } } \right.

Let's compute the values of f(k)f(k) for each kAk \in A:

  • For odd kk:
    • f(1)=1+1=2f(1) = 1 + 1 = 2
    • f(3)=3+1=4f(3) = 3 + 1 = 4
    • f(5)=5+1=6f(5) = 5 + 1 = 6
    • f(7)=7+1=8f(7) = 7 + 1 = 8
    • f(9)=9+1=10f(9) = 9 + 1 = 10
  • For even kk:
    • f(2)=2f(2) = 2
    • f(4)=4f(4) = 4
    • f(6)=6f(6) = 6
    • f(8)=8f(8) = 8
    • f(10)=10f(10) = 10

The image of ff, denoted by Im(f)Im(f), is the set of all distinct output values of ff: Im(f)={2,4,6,8,10}Im(f) = \{2, 4, 6, 8, 10\} This step is crucial because the condition gf=fg \circ f = f imposes constraints on the behavior of gg specifically on the image of ff.

Step 2: Understand the condition gf=fg \circ f = f.

The condition gf=fg \circ f = f means that for every element kAk \in A, we must have g(f(k))=f(k)g(f(k)) = f(k). Let y=f(k)y = f(k). Then the condition becomes g(y)=yg(y) = y. This implies that for any element yy that belongs to the image of ff, the function gg must map yy to itself. In other words, gg must act as the identity function on the set Im(f)Im(f).

So, for all yIm(f)y \in Im(f), we must have g(y)=yg(y) = y.

Step 3: Determine the constraints on the function gg.

From Step 2, we know that gg must satisfy:

  • g(2)=2g(2) = 2
  • g(4)=4g(4) = 4
  • g(6)=6g(6) = 6
  • g(8)=8g(8) = 8
  • g(10)=10g(10) = 10

These are 5 specific mappings that gg must perform.

Step 4: Determine the freedom of choice for the remaining elements in the domain of gg.

The domain of gg is A={1,2,3,4,5,6,7,8,9,10}A = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}. The codomain of gg is also AA. We have already fixed the values of gg for the elements in Im(f)={2,4,6,8,10}Im(f) = \{2, 4, 6, 8, 10\}. The elements in the domain of gg for which the value of gg is not yet determined are those elements in AA that are not in Im(f)Im(f). Let S=AIm(f)S = A \setminus Im(f). S={1,2,3,4,5,6,7,8,9,10}{2,4,6,8,10}S = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\} \setminus \{2, 4, 6, 8, 10\} S={1,3,5,7,9}S = \{1, 3, 5, 7, 9\} These are the odd numbers in the set AA. There are 5 elements in SS.

For each element kSk \in S, the value of g(k)g(k) can be any element from the codomain A={1,2,3,4,5,6,7,8,9,10}A = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}. There are no further constraints on these mappings from the condition gf=fg \circ f = f.

Step 5: Calculate the total number of possible functions gg.

For each of the 5 elements in S={1,3,5,7,9}S = \{1, 3, 5, 7, 9\}, there are 10 possible choices for its image under gg (since the codomain is AA, which has 10 elements). Since the choice of the image for each element in SS is independent, the total number of ways to define gg for these elements is 10×10×10×10×10=10510 \times 10 \times 10 \times 10 \times 10 = 10^5.

The values of gg for the elements in Im(f)Im(f) are fixed to be the identity mapping. So there is only 1 way to define gg for these 5 elements.

Therefore, the total number of possible functions gg is the product of the number of choices for each part: Number of functions gg = (Number of ways to define gg for elements in SS) ×\times (Number of ways to define gg for elements in Im(f)Im(f)) Number of functions gg = 105×1=10510^5 \times 1 = 10^5.

Common Mistakes & Tips

  • Confusing Domain and Image: A common mistake is to assume that gg must be the identity function on its entire domain. However, the condition gf=fg \circ f = f only imposes constraints on gg for values that are in the image of ff.
  • Misinterpreting g(f(k))=f(k)g(f(k)) = f(k): This equation means that gg maps the output of ff to itself. It does not necessarily mean g(k)=kg(k) = k for all kk.
  • Careful Counting: Ensure that you are correctly identifying the elements for which gg has fixed values and the elements for which gg has free choices.

Summary

The problem requires us to find the number of functions g:AAg: A \to A such that gf=fg \circ f = f. The condition g(f(k))=f(k)g(f(k)) = f(k) for all kAk \in A implies that gg must act as the identity function on the image of ff. We first determined the image of ff to be Im(f)={2,4,6,8,10}Im(f) = \{2, 4, 6, 8, 10\}. This means g(2)=2,g(4)=4,g(6)=6,g(8)=8,g(10)=10g(2)=2, g(4)=4, g(6)=6, g(8)=8, g(10)=10. For the remaining elements in the domain of gg, which are {1,3,5,7,9}\{1, 3, 5, 7, 9\} (5 elements), the function gg can map each of them to any of the 10 elements in the codomain AA. Thus, there are 10510^5 possible functions for gg.

The final answer is 105\boxed{10^5}.

Practice More Sets, Relations & Functions Questions

View All Questions