GATE Computer ScienceHardGATE CS (PYQ pattern)

How many ordered pairs (f, g) of functions from {1, 2, 3} to itself satisfy f∘g = g∘f?

  1. A. 162
  2. B. 110
  3. C. 141
  4. D. 81

Correct answer: C. 141

Enumerating all 27 × 27 = 729 pairs gives 141 commuting pairs.

More Discrete Mathematics questions

Exams that ask this topic