GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 8(b)

Count members of each class

Discrete Mathematics · Sets, Relations & Functions · Full GATE CSE 1996 paper

GATE 1996, Q8(b) Descriptive
Report issue

Sets, Relations & Functions

Question 8(b), GATE 1996: For functions {1,2,3}→{1,2,3} with f~g iff f(3)=g(3), find the size of each equivalence class.
Question 8(b), GATE 1996: For functions {1,2,3}→{1,2,3} with f~g iff f(3)=g(3), find the size of each equivalence class.
Tap to enlarge
Answer & solution

Answer: 9 functions per class. (no official key was published)

Fix one class Cr, so f(3)=r is fixed. There are three independent choices for f(1) and three for f(2). By the multiplication principle the class contains 3×3=9 functions. No injectivity or surjectivity restriction is stated, so the two values may coincide with each other or with r.

One can enumerate the free pair (f(1),f(2)) as (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3). Appending the fixed third coordinate r gives nine distinct functions, and every function in Cr is represented once. The same argument works for r=1,2,3, so all three classes have the same size.

As a consistency check, 3 classes times 9 members gives 27=3³, the number of all functions from a three-element set to a three-element set. A common mistake is to count only permutations, which would wrongly impose a one-to-one condition absent from the question. The complete equality f(3)=g(3) comes from the paper.

Original paper, page 8