GATE Computer ScienceVery hardGATE CS

A relation R on {1, 2, …, 8} contains exactly the pairs (1,2), (2,3), (3,1), (3,4), (5,6), (6,7), (7,5), (4,8), (8,8). How many ordered pairs does the transitive closure of R contain?

  1. A. 31
  2. B. 27
  3. C. 26
  4. D. 25

Correct answer: C. 26

The 3-cycle {1,2,3} gives all 9 pairs among its members, and each of 1, 2, 3 reaches 4 and 8: 6 more pairs; 4 reaches 8 (1 pair) and 8 reaches itself (1 pair). The 3-cycle {5,6,7} gives 9 pairs. Total 9 + 6 + 1 + 1 + 9 = 26. Note that 4 does not reach 4.

More Discrete Mathematics questions

Exams that ask this topic