Skip to content

Chapter 19. Strong Connectivity

Connectivity in undirected graphs asks whether every vertex can be reached from every other vertex. In directed graphs, direction changes the problem fundamentally. A vertex may reach another vertex without being reachable in return.

For this reason, directed graphs require several notions of connectivity. The most important is strong connectivity.

A directed graph is strongly connected if every vertex can reach every other vertex by directed paths. This means that movement through the graph is possible in both directions, even if the actual paths differ. Strong connectivity is one of the central structural ideas in directed graph theory. (en.wikipedia.org)

19.1 Reachability Revisited

Let

D=(V,A) D = (V,A)

be a directed graph.

A vertex vv is reachable from a vertex uu if there exists a directed path from uu to vv.

Reachability is directional. It may happen that uu reaches vv, while vv does not reach uu.

For example, consider the directed graph

abc. a \to b \to c.

The vertex cc is reachable from aa, because there is a directed path

a,b,c. a,b,c.

However, aa is not reachable from cc, because no directed path leaves cc.

Thus directed reachability differs fundamentally from ordinary graph connectivity.

19.2 Strong Connectivity

A directed graph DD is strongly connected if for every pair of vertices

u,vV, u,v \in V,

there exists a directed path from uu to vv and also a directed path from vv to uu.

Equivalently, every vertex is reachable from every other vertex.

This condition may be written as

uvandvu u \leadsto v \qquad \text{and} \qquad v \leadsto u

for all vertices uu and vv.

Strong connectivity is symmetric at the global level. Although individual arcs are directed, the graph as a whole permits movement between every ordered pair of vertices.

For example, the directed cycle

abca a \to b \to c \to a

is strongly connected. From any vertex, one can follow the cycle to reach any other vertex.

19.3 Examples

Example 1. A Strongly Connected Graph

Consider the graph

A={(a,b),(b,c),(c,a),(c,d),(d,b)}. A = \{(a,b),(b,c),(c,a),(c,d),(d,b)\}.

We verify strong connectivity.

From aa, we can reach

b,c,d. b,\quad c,\quad d.

From dd, we can reach

bca. b \to c \to a.

Every vertex reaches every other vertex. Therefore the graph is strongly connected.

Example 2. A Graph That Is Not Strongly Connected

Consider the graph

abc. a \to b \to c.

The vertex aa reaches bb and cc. The vertex bb reaches cc. But cc reaches no other vertex.

Therefore the graph is not strongly connected.

Example 3. A Single Vertex

A graph with one vertex and no arcs is strongly connected under the usual convention that every vertex reaches itself by a path of length zero.

19.4 Mutual Reachability

Define a relation on the vertex set by declaring that

uv u \sim v

if and only if

uvandvu. u \leadsto v \qquad \text{and} \qquad v \leadsto u.

This relation is called mutual reachability.

It is an equivalence relation.

Reflexivity

Every vertex reaches itself by the trivial path of length zero. Thus

uu. u \sim u.

Symmetry

If

uv, u \sim v,

then uu reaches vv and vv reaches uu. Reversing the statement gives

vu. v \sim u.

Transitivity

Suppose

uvandvw. u \sim v \qquad \text{and} \qquad v \sim w.

Then

uv,vw. u \leadsto v, \qquad v \leadsto w.

Concatenating paths gives

uw. u \leadsto w.

Similarly,

wv,vu, w \leadsto v, \qquad v \leadsto u,

so

wu. w \leadsto u.

Hence

uw. u \sim w.

Therefore mutual reachability partitions the vertices into equivalence classes.

These equivalence classes are the strongly connected components.

19.5 Strongly Connected Components

A strongly connected component of a directed graph is a maximal strongly connected subgraph.

“Maximal” means that no additional vertex can be added while preserving strong connectivity.

The vertices of a directed graph partition uniquely into strongly connected components. This decomposition into maximal mutually reachable sets is standard in graph theory. (en.wikipedia.org)

For example, consider the graph

ab,bc,cd. a \leftrightarrow b, \qquad b \to c, \qquad c \leftrightarrow d.

More explicitly,

A={(a,b),(b,a),(b,c),(c,d),(d,c)}. A = \{(a,b),(b,a),(b,c),(c,d),(d,c)\}.

The vertices aa and bb form one strongly connected component, because each reaches the other.

The vertices cc and dd form another strongly connected component.

There is an arc from the first component to the second, but no path returns from the second to the first.

Thus the strongly connected components are

{a,b}and{c,d}. \{a,b\} \qquad \text{and} \qquad \{c,d\}.

19.6 Component Graph

Given a directed graph DD, collapse each strongly connected component into a single vertex.

The resulting graph is called the component graph or condensation graph.

An arc exists between two components if an arc in the original graph goes from a vertex in one component to a vertex in the other.

A fundamental fact is that the component graph is always a directed acyclic graph.

If the component graph contained a directed cycle, then all components on that cycle would mutually reach one another. They would therefore belong to the same strongly connected component, contradicting maximality.

Thus strongly connected components reduce arbitrary directed graphs into DAG structure.

19.7 Strong Connectivity and Cycles

Directed cycles are closely related to strong connectivity.

Every directed cycle is strongly connected. If

v0v1vk1v0, v_0 \to v_1 \to \cdots \to v_{k-1} \to v_0,

then every vertex can reach every other vertex by moving around the cycle.

However, a strongly connected graph need not be a single cycle. It may contain many overlapping cycles.

For example,

ab,bc,ca,ad,db a \to b,\qquad b \to c,\qquad c \to a,\qquad a \to d,\qquad d \to b

is strongly connected but contains more structure than one simple cycle.

Cycles generate strong connectivity locally. Strong connectivity combines such cycles into a global reachability condition.

19.8 Weak Connectivity

A directed graph is weakly connected if its underlying undirected graph is connected.

This ignores the directions of arcs.

For example,

abc a \to b \to c

is weakly connected because the underlying undirected graph

abc a - b - c

is connected.

But it is not strongly connected, because cc cannot reach aa.

Thus strong connectivity is stricter than weak connectivity:

PropertyDirection respected?
Weak connectivityNo
Strong connectivityYes

Every strongly connected graph is weakly connected. The converse is false.

19.9 Unilateral Connectivity

Some authors also define unilateral connectivity.

A directed graph is unilaterally connected if for every pair of vertices u,vu,v, at least one of the following holds:

uvorvu. u \leadsto v \qquad \text{or} \qquad v \leadsto u.

This condition is weaker than strong connectivity but stronger than weak connectivity.

The directed path

abc a \to b \to c

is unilaterally connected, because every pair of vertices is connected in at least one direction.

But it is not strongly connected.

19.10 Strongly Connected Subgraphs

A subgraph HH of a directed graph DD is strongly connected if every pair of vertices in HH mutually reaches each other within HH.

Strongly connected subgraphs are important because large directed graphs often contain local regions of high internal connectivity.

For example:

SystemStrongly connected region
Web graphtightly interlinked websites
Social networkmutually connected communities
Dependency graphrecursive dependency groups
Program control graphloops and recursive structures
Transportation networkmutually reachable route clusters

Strongly connected components isolate these internally reachable regions.

19.11 Characterization Using Paths

A directed graph is strongly connected if and only if every pair of vertices lies on a common directed cycle or can mutually reach each other through chains of directed cycles.

More concretely:

D is strongly connected D \text{ is strongly connected}

if and only if for every pair u,vu,v,

uvandvu. u \leadsto v \qquad \text{and} \qquad v \leadsto u.

This statement is often used as the practical definition.

In finite directed graphs, reachability may be checked using graph search algorithms.

19.12 Strong Connectivity and Adjacency Matrices

Let MM be the adjacency matrix of a directed graph DD.

Recall that

(Mk)ij (M^k)_{ij}

counts directed walks of length kk from vertex viv_i to vertex vjv_j.

Thus vjv_j is reachable from viv_i if and only if there exists some integer k0k \geq 0 such that

(Mk)ij>0. (M^k)_{ij} > 0.

The graph is strongly connected if every ordered pair of vertices satisfies this condition for some kk.

Equivalently, for every i,ji,j, there exists a directed walk from viv_i to vjv_j.

This matrix perspective connects strong connectivity with linear algebra and spectral graph theory.

19.13 Detecting Strong Connectivity

Strong connectivity can be tested algorithmically.

A simple method is:

  1. Choose a vertex vv.
  2. Perform a graph search from vv.
  3. Check whether all vertices are reachable from vv.
  4. Reverse all arcs.
  5. Perform another graph search from vv.
  6. Check whether all vertices are reachable again.

If both searches reach all vertices, then the graph is strongly connected.

The reason is simple. The first search verifies that every vertex is reachable from vv. The reversed search verifies that every vertex reaches vv in the original graph.

More advanced algorithms compute all strongly connected components efficiently. Standard methods include Kosaraju’s algorithm, Tarjan’s algorithm, and Gabow’s algorithm. These algorithms are fundamental in graph processing and compiler theory. (en.wikipedia.org)

19.14 Strong Connectivity in Applications

Strong connectivity appears naturally in many systems.

Communication Networks

A strongly connected communication network allows messages to travel between every pair of locations.

Transportation Systems

In a road network with one-way streets, strong connectivity means every location is reachable from every other location while respecting street directions.

Web Graphs

Groups of mutually linked web pages often form strongly connected components.

Software Systems

Recursive module dependencies form strongly connected regions in dependency graphs.

State Machines

In automata and Markov chains, strong connectivity corresponds to recurrent or communicating states.

19.15 Strong Orientation

An orientation of an undirected graph assigns a direction to each edge.

An orientation is strongly connected if the resulting directed graph is strongly connected.

Not every connected graph admits a strong orientation. A connected undirected graph has a strong orientation if and only if it has no bridge. This classical result is known as Robbins’ theorem. (en.wikipedia.org)

A bridge prevents strong connectivity because crossing it in one direction disconnects the reverse reachability.

19.16 Common Mistakes

A common mistake is to confuse weak connectivity with strong connectivity. A graph may be connected when directions are ignored but disconnected when directions are respected.

Another mistake is to assume that having a directed cycle implies strong connectivity. A graph may contain cycles while still having unreachable regions.

A third mistake is to test reachability only one way. Strong connectivity requires mutual reachability.

A fourth mistake is to confuse strongly connected components with arbitrary connected regions. Strongly connected components are maximal with respect to mutual reachability.

19.17 Summary

A directed graph is strongly connected if every vertex can reach every other vertex through directed paths.

Mutual reachability defines an equivalence relation on the vertex set. Its equivalence classes are the strongly connected components.

Strongly connected components partition every directed graph. Collapsing them produces a directed acyclic component graph.

Strong connectivity is stricter than weak connectivity because it respects arc direction. It is fundamental in network structure, dependency analysis, compiler theory, transportation systems, and graph algorithms. Subsequent chapters build on this idea through directed acyclic graphs, topological ordering, network flow, and advanced directed graph algorithms.