Practice Discrete Math

Algorithms / Scc

Least You Need to Know: Strongly Connected Components and Mutual Reachability

A strongly connected component in a directed graph is a maximal set of vertices that can all reach one another. SCCs reveal the graph's cyclic cores and compress repeated mutual-reachability structure into components.

The least you need to know

Key notation

u ↝ v there exists a directed path from u to v
SCC maximal set with pairwise mutual reachability
transpose graph graph with every edge direction reversed

Tiny worked example

  • If `a → b → c → a`, then `a, b, c` lie in one SCC because each reaches the others.
  • If there is an edge `c → d` but no path back from `d` to `a`, then `d` is outside that SCC.
  • SCC decomposition groups the cycle together and keeps one-way outgoing structure separate.
  • That grouping is the right abstraction for many reachability and condensation arguments.

Common mistakes

How to recognize this kind of problem

Next recommended lesson

Continue through this topic with Least You Need to Know: Lazy Propagation for Range Updates and Range Queries.

Least You Need to Know: Lazy Propagation for Range Updates and Range Queries

Related lessons

Keep going with nearby lessons in the same topic.

More ways to explore

Start practice