The transitive closure of the relation {(1,2), (2,3), (3,4), (4,5)} on the set {1,2,3,4,5} is ___________.
GATE 1989 · Discrete Mathematics · Relations · medium
Answer: The transitive closure is {(i,j) : 1 <= i < j <= 5} = {(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)}, a set of 10 pairs.
Compute reachability from each node: From 1: reach 2,3,4,5. From 2: reach 3,4,5. From 3: reach 4,5. From 4: reach 5. From 5: reach nothing new. So transitive closure = {(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)}.
Count the pairs: The transitive closure contains C(5,2) = 10 ordered pairs, which equals the number of 2-element subsets of {1,2,3,4,5} treated as ordered by the natural order.