🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Closures and Warshall's Algorithm: all 10 questions

Quiz: Closures and Warshall's Algorithm · Question 3 of 10

For R = {(1, 2), (2, 1), (2, 3), (3, 4)}, why does the transitive closure contain (1, 1)?

For R = {(1, 2), (2, 1), (2, 3), (3, 4)}, why does the transitive closure contain (1, 1)?

  1. A.Every transitive closure is reflexive
  2. B.There is a path 1 → 2 → 1
  3. C.Because (1, 2) is in R
  4. D.It does not contain (1, 1)
Answer & explanation

Correct answer: There is a path 1 → 2 → 1

Transitivity applied to (1, 2) and (2, 1) forces (1, 1).

Can you get the rest right without peeking?

Take the timed Quiz: Closures and Warshall's Algorithm quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →