Functions
Counting functions with special properties
GRB_1000_SCQ
Grade Class 11

Question:

$S = \{1, 2, 3\}$, $f: S \to S$ satisfies the property: $\forall x \in S$, $f(f(x)) = f(x)$. How many different functions are there for $f(x)$? [Note: Can you generalize the result for $S = \{1, 2, 3, \ldots, n\}$?]
8
10
1
4

Step-by-Step Solution

Key Concept: Idempotent functions; fixed points
Step 1: Understand the condition $f(f(x)) = f(x)$. The condition $f(f(x)) = f(x)$ means that $f$ is idempotent. This implies that every element in the range of $f$ must be a fixed point of $f$. In other words, if $y$ is in the range of $f$, then $f(y) = y$. Step 2: Analyze Case 1 — Range has exactly 1 element. When the range of $f$ contains only one element, $f$ is a constant function. This single element must be a fixed point. We need to choose which 1 element from $S = \{1, 2, 3\}$ serves as this fixed point. Number of such functions: $\binom{3}{1} = 3$ These functions are: $f(x) = 1$ for all $x$, $f(x) = 2$ for all $x$, and $f(x) = 3$ for all $x$. Step 3: Analyze Case 2 — Range has exactly 2 elements. When the range contains exactly 2 elements, both of these elements must be fixed points (by the idempotent property). The third element (not in the range) must map to one of the two fixed points. First, choose which 2 elements from $S$ are fixed points: $\binom{3}{2} = 3$ ways. Then, the remaining element can map to either of the 2 fixed points: $2$ ways. Number of such functions: $\binom{3}{2} \times 2 = 3 \times 2 = 6$ Step 4: Analyze Case 3 — Range has exactly 3 elements. When the range contains all 3 elements, every element must be a fixed point. This means $f(x) = x$ for all $x \in S$, which is the identity function. Number of such functions: $1$ Step 5: Calculate the total number of functions. Adding all cases: $$\text{Total} = 3 + 6 + 1 = 10$$ Therefore, there are **10 different functions** $f: S \to S$ satisfying the given property. **Generalization for $S = \{1, 2, 3, \ldots, n\}$:** Following the same logic: - Case 1 (range size 1): $\binom{n}{1} = n$ functions - Case 2 (range size 2): $\binom{n}{2} \times 2 = n(n-1)$ functions - Case 3 (range size 3): $\binom{n}{3} \times 3! = n(n-1)(n-2)$ functions - ... - Case $k$ (range size $k$): $\binom{n}{k} \times k!$ functions The total number of idempotent functions is: $$\sum_{k=1}^{n} \binom{n}{k} \times k! = \sum_{k=1}^{n} \frac{n!}{(n-k)!}$$ **The answer is Option 2: 10**
Correct Answer: 2

Master Functions with Mathbee

Practice this topic under real exam conditions with strict timers, or ask our AI Mentor to explain the concepts step-by-step.

Start Practicing for Free