Folioby Interconnected
Log InSign Up

Paths and Connectivity

We formalize the notions of walks, paths, and cycles, then develop the theory of connected components, vertex and edge connectivity, cut vertices and bridges, the characterization of bipartite graphs, and Menger's theorem.

FO
Folio Official
March 1, 2026

1 Walks, Paths, and Cycles

Definition 1 (Walk, path, cycle).
A walk in a graph G is a sequence of vertices v0​,v1​,…,vk​ such that {vi−1​,vi​}∈E(G) for each i. The integer k is the length of the walk.
  • A walk in which all edges are distinct is called a trail.

  • A walk in which all vertices are distinct is called a path.

  • A trail with v0​=vk​ and k≥1 is called a closed trail.

  • A walk with v0​=vk​, v0​,v1​,…,vk−1​ all distinct, and k≥3 is called a cycle.

A path of length k and a cycle of length k are also denoted Pk​ and Ck​, respectively.

A path P4​ (left) and a cycle C4​ (right):

v0​
v1​
v2​
v3​

v0​
v1​
v2​
v3​

Remark 2.
A word of caution regarding the definition of a path: since the vertices of a path are all distinct, the edges are automatically distinct as well. The requirement k≥3 in the definition of a cycle reflects the fact that in a simple graph, C1​ and C2​ do not exist.
Lemma 3.
If there is a walk from u to v in a graph G, then there is a path from u to v.
Proof.
Among all walks from u to v, choose one of minimum length, say W=v0​,v1​,…,vk​ with v0​=u and vk​=v. If W has a repeated vertex vi​=vj​ with i<j, then the walk v0​,…,vi​,vj+1​,…,vk​ is shorter, contradicting the minimality of W. Therefore W is a path. □

2 Connectivity and Connected Components

Definition 4 (Connected).
A graph G is connected if for every pair of vertices u,v∈V(G), there exists a path from u to v.

The relation "there is a path between u and v" is an equivalence relation on V(G). The subgraphs induced by the equivalence classes are called the connected components of G.

Definition 5 (Distance).
In a connected graph G, the distanced(u,v) between two vertices u and v is the length of a shortest path from u to v. The diameter of G is diam(G)=maxu,v∈V​d(u,v).

3 Cut Vertices, Bridges, and Connectivity

Definition 6 (Cut vertex and bridge).
A vertex v of a connected graph G is a cut vertex if the graph G−v (obtained by removing v and all edges incident to v) is disconnected. Similarly, an edge e is a bridge if G−e is disconnected.

In the following graph, v is a cut vertex and the edge {v,d} is a bridge:

a
b
v
d
e

Theorem 7.
An edge e is a bridge of G if and only if e does not lie on any cycle.
Proof.
(⇒) We prove the contrapositive. Suppose the edge e={u,v} lies on a cycle C. In G−e, the vertices u and v are still connected by the portion of C that avoids e. Any path in G that uses e can be rerouted through this portion, so G−e remains connected. Hence e is not a bridge.

(⇐) Suppose e={u,v} lies on no cycle. If G−e contained a path P from u to v, then P together with e would form a cycle, a contradiction. Therefore u and v are in different components of G−e, and e is a bridge. □
Definition 8 (Vertex connectivity and edge connectivity).
The vertex connectivityκ(G) of a connected graph G is the minimum number of vertices whose removal disconnects G (with the convention κ(Kn​)=n−1). The edge connectivityλ(G) is the minimum number of edges whose removal disconnects G.
Theorem 9 (Whitney's inequality).
For any connected graph G,
κ(G)≤λ(G)≤δ(G),
where δ(G) denotes the minimum degree of G.
Proof.
λ(G)≤δ(G): Removing all edges incident to a vertex v of minimum degree isolates v, so λ(G)≤deg(v)=δ(G).

κ(G)≤λ(G): Let F={e1​,…,ek​} be a minimum edge cut with λ(G)=k, and let G−F have components G1​ and G2​. Write ei​={ui​,vi​} with ui​∈V(G1​) and vi​∈V(G2​). If ∣V(G2​)∣>k, then removing the (at most k) distinct vertices among v1​,…,vk​ disconnects G1​ from the remainder of G2​, so κ(G)≤k. If ∣V(G2​)∣≤k, removing all of V(G2​) uses at most k vertices and disconnects G, so again κ(G)≤k. □

4 Characterization of Bipartite Graphs

Theorem 10 (Characterization of bipartite graphs).
A graph G is bipartite if and only if it contains no cycle of odd length.
Proof.
(⇒) Suppose G is bipartite with partition V=X⊔Y. In any cycle v0​,v1​,…,vk​=v0​, the vertices alternate between X and Y. If v0​∈X, then vi​∈X if and only if i is even. Since vk​=v0​∈X, the length k must be even.

(⇐) We may assume G is connected (apply the argument to each component). Fix a vertex s and set X={v∣d(s,v) is even} and Y={v∣d(s,v) is odd}. Suppose an edge {u,v}∈E has both endpoints in the same part. Then a shortest path from s to u and a shortest path from s to v, together with the edge {u,v}, yield a closed walk of odd length, which contains an odd cycle — a contradiction. □

5 Menger's Theorem

Definition 11 (Internally vertex-disjoint paths).
A collection of s-t paths is internally vertex-disjoint if no two paths share an internal vertex (i.e., a vertex other than s or t).
Theorem 12 (Menger's theorem, vertex version).
Let s and t be non-adjacent vertices of a graph G. Then the minimum size of a vertex cut separating s from t equals the maximum number of internally vertex-disjoint s-t paths.
Proof.
If k internally vertex-disjoint paths exist, then at least one internal vertex must be removed from each path to separate s from t, so the minimum cut has size at least k. The reverse inequality — that the existence of a minimum cut of size k guarantees k disjoint paths — can be established by induction on the number of edges. The essential idea mirrors the max-flow min-cut theorem, and the most elegant proof proceeds via the theory of network flows (which we treat in a later chapter). □
Remark 13.
Menger's theorem also has an edge version: the maximum number of edge-disjoint s-t paths equals the minimum size of an s-t edge cut. Whitney's inequality κ(G)≤λ(G) can be understood as a consequence of Menger's theorem.
Graph TheoryDiscrete MathematicsTextbookConnectivityBipartite GraphsMenger's Theorem
FO
Folio Official

Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.

1 followers·107 articles
Graph Theory TextbookPart 3 of 13
Previous
Fundamental Definitions and Basic Properties of Graphs
Next
Trees and Forests: The Minimal Connected Structures

Share your expertise with the world

Write articles with LaTeX support, build your audience, and earn from your knowledge.

Start Writing — It's Free

More from Folio Official

Folio Official·March 1, 2026

Eulerian and Hamiltonian Graphs: Two Classical Traversal Problems

From the Bridges of Königsberg to Euler's theorem on Eulerian circuits, directed Eulerian graphs, Hamiltonian cycles, the theorems of Ore and Dirac, and the NP-completeness of the Hamiltonian cycle problem.

Graph TheoryDiscrete MathematicsTextbook
1
Folio Official·March 1, 2026

Network Flows

Flow networks, the max-flow min-cut theorem, the Ford--Fulkerson method, the Edmonds--Karp algorithm, Dinic's algorithm, and the reduction of bipartite matching to maximum flow.

Graph TheoryDiscrete MathematicsTextbook
Folio Official·March 1, 2026

Recurrence Relations and Counting: Solving Linear Recurrences

We present the method of characteristic equations for solving linear recurrences with constant coefficients, treat the case of repeated roots, discuss nonhomogeneous recurrences, establish the equivalence with generating functions, and introduce matrix exponentiation and the Kitamasa method.

CombinatoricsDiscrete MathematicsTextbook
Folio Official·March 1, 2026

The Inclusion--Exclusion Principle: Counting by Alternating Sums

We prove the inclusion--exclusion principle and apply it to derive the formula for the number of derangements D_n, Euler's totient function, the relationship between surjections and Stirling numbers of the second kind, and the M\"{o}bius inversion formula.

CombinatoricsDiscrete MathematicsTextbook