GATE Computer ScienceVery hardGATE CS (PYQ pattern)

The directed graph on vertices A–K has edges A→B, B→A, C→D, D→C, E→F, F→G, G→E, A→H, C→H, E→H, H→I, H→J, I→K, J→K, B→J. What is the minimum number of directed edges that must be added to make it strongly connected?

  1. A. 3
  2. B. 2
  3. C. 4
  4. D. 5

Correct answer: A. 3

Condensing gives a DAG with 3 source components ({A,B}, {C,D}, {E,F,G}) and 1 sink component ({K}). The minimum number of edges to make a DAG strongly connected is max(#sources, #sinks) = 3 (confirmed by brute force over all edge sets of size 1 and 2).

More Algorithms questions

Exams that ask this topic