GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 8(a)

Count function equivalence classes

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

GATE 1996, Q8(a) Descriptive
Report issue

Sets, Relations & Functions

Question 8(a), GATE 1996: F consists of all functions {1,2,3}→{1,2,3}. Define f~g iff f(3)=g(3). How many equivalence classes are there?
Question 8(a), GATE 1996: F consists of all functions {1,2,3}→{1,2,3}. Define f~g iff f(3)=g(3). How many equivalence classes are there?
Tap to enlarge
Answer & solution

Answer: 3. (no official key was published)

A class is determined completely by the value at input 3. This value can be 1,2 or 3. Define Cr={f∈F:f(3)=r}, for r∈{1,2,3}. Each Cr is nonempty, for example because the constant function with value r lies in it. Every function belongs to exactly one Cr, since f(3) is a single well-defined value.

Within Cr, any two functions have the same value at 3 and are related. Functions from different Cr sets are not related. Thus these three sets are precisely the equivalence classes, not merely three arbitrary subsets. The assignments at 1 and 2 can vary freely without changing class membership.

The relation is reflexive because f(3)=f(3), symmetric because equality is symmetric, and transitive because equal values at 3 remain equal through an intermediate function. There are 3³=27 total functions, but the number of functions is not the number of classes. The quotient groups them by only one of their three output coordinates.

Original paper, page 8