Let F be the collection of all functions f : {1, 2, 3} -> {1, 2, 3}. If g, f ∈ F, define an equivalence relation ~ by f ~ g if and only if f(3) = g(3).
a. Find the number of equivalence classes defined by ~.
b. Find the number of elements in each equivalence class.
GATE 1996 · Discrete Mathematics · Relations · medium
Answer: a. 3 equivalence classes. b. Each class has 9 elements.
Identify the equivalence classes: The value f(3) can be 1, 2, or 3. Each distinct value determines one equivalence class: C_1 = {f : f(3)=1}, C_2 = {f : f(3)=2}, C_3 = {f : f(3)=3}. Number of equivalence classes = 3.
Count elements in each class: Within C_k (where f(3) = k is fixed), the values f(1) and f(2) are free. Each can independently be any of {1, 2, 3}. So |C_k| = 3 * 3 = 9 functions.