Sets, Relations & Functions


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.