Skip to main content

9.3 Walks, Paths, Cycles, Connectivity & Cut-Vertex Invariants

πŸ“šModule 09: Graph Theory Foundations, Paths & ConnectivityTopic 9.3: Walks, Paths & Connectivity⏱️5 min read
🎯High-Yield For:Semester Exams β€’ GATE CSE β€’ Technical Interviews

πŸ’‘ Core Intuition: The 3-Second Mental Model​

🍳 The Everyday Analogy: City Streets, Delivery Couriers & Bottleneck Bridges​

Think of traversing complex road networks:

  1. The Route Hierarchy (Degrees of Freedom):
    • Walk: Wandering around town aimlessly. You can re-visit intersections and drive down the same street ten times.
    • Trail: A delivery courier dropping off packages. You can cross the same busy intersection twice, but you never drive down the exact same street segment twice (no repeated edges).
    • Path: A direct tourist scenic route. You never visit the same landmark or intersection twice (no repeated vertices).
  2. Cut-Vertices & Bridges (Single Points of Failure):
    • A suspension bridge connecting an island to the mainland. If an earthquake destroys that one bridge, the city is split into two disconnected worlds! That edge is a Bridge (Cut-Edge).
    • An airport hub (like Chicago O'Hare). If the entire airport shuts down, connecting flights between east and west coasts fail. That hub is a Cut-Vertex (Articulation Point).
  3. Whitney's Connectivity Invariant: How many attacks can your network survive? You can never make a network more resilient than its weakest isolated server (κ≀λ≀δ\kappa \le \lambda \le \delta).

πŸ’» Bridging to Computer Science: Tarjan's Bridge Algorithm, Biconnectivity & Fault-Tolerance​

In computer systems:

  • Tarjan's DFS Bridge-Finding Algorithm: Finds all bridges and articulation points in a network in optimal linear time O(V+E)O(V + E) using DFS discovery and low-link numbers.
  • Distributed System Fault-Tolerance: A cloud data center network requires kk-vertex connectivity (ΞΊ(G)β‰₯k\kappa(G) \ge k) so that any kβˆ’1k - 1 server failures leave the cluster fully connected.
  • Strongly Connected Components (SCC): Algorithms like Kosaraju-Sharir and Tarjan's SCC partition directed web graphs to compute Google PageRank.

🚢 The Traversal Hierarchy: Walks, Trails & Paths​

The Hierarchical Classification of Graph Traversal Routes

From unrestricted walks down to strictly non-repeating paths and cycles

Level 1 (Most General)

Walk (Alternating Sequence)

🚢

An alternating sequence of vertices and edges: vβ‚€, e₁, v₁, eβ‚‚, ..., eβ‚–, vβ‚–.

Length = k (number of traversed edges)Both vertices AND edges MAY repeat freely
↓Forbid Repeated Edges
Level 2

Trail

🚚

A walk in which NO edge is traversed more than once.

Vertices MAY repeat (e.g. crossing an intersection twice)Edges are strictly unique
↓Forbid Repeated Vertices
Level 3 (Most Restrictive)

Path (Simple Path)

🎯

A walk in which NO vertex (and therefore no edge) is repeated.

All visited vertices are strictly distinctLength ≀ |V| - 1
↓Close the Loop (Start == End)
Closed Circuits & Cycles

Circuit vs Cycle

πŸ”„

Closed Trail = Circuit (no repeated edges). Closed Path = Cycle (no repeated vertices except vβ‚€ = vβ‚–).

Cycles in simple graphs have length k β‰₯ 3Triangles = C₃, Quadrilaterals = Cβ‚„

Master Traversal Taxonomy Comparison Table​

Traversal CategoryEdge Repetition Permitted?Vertex Repetition Permitted?Start Vertex Equals End Vertex?Canonical Term
Open WalkYesYesNo (v0β‰ vkv_0 \neq v_k)Walk
Closed WalkYesYesYes (v0=vkv_0 = v_k)Closed Walk
Open TrailNo (Unique Edges)YesNo (v0β‰ vkv_0 \neq v_k)Trail
Closed TrailNo (Unique Edges)YesYes (v0=vkv_0 = v_k)Circuit
Open PathNoNo (Unique Vertices)No (v0β‰ vkv_0 \neq v_k)Path (Simple Path)
Closed PathNoNo (except endpoints)Yes (v0=vkv_0 = v_k)Cycle (Simple Cycle)

🌐 Graph Connectivity & Component Bounds​

πŸ“–Definition 9.1: Connected Graphs & Connected Componentsdefinition
  1. Connected Undirected Graph: An undirected graph GG is connected if and only if there exists at least one path between every pair of vertices u,v∈Vu, v \in V.
  2. Connected Components: If GG is disconnected, it partitions into kβ‰₯2k \ge 2 maximal connected subgraphs called connected components (c(G)=kc(G) = k).
  3. Directed Graph Connectivity:
    • Strongly Connected: For every pair of vertices u,vu, v, there is a directed path from uβ†’vu \to v AND a directed path from vβ†’uv \to u.
    • Weakly Connected: There is an undirected path between every pair of vertices when all edge arrowheads are replaced with undirected lines.
πŸ“Theorem 9.1: Edge Bounds for Connected and k-Component Graphstheorem

Let G=(V,E)G = (V, E) be a simple graph with nn vertices:

  1. Edge Range for a Connected Graph (k=1k = 1):
    • Minimum edges: nβˆ’1n - 1 (achieved when GG is a Tree).
    • Maximum edges: (n2)=n(nβˆ’1)2\binom{n}{2} = \frac{n(n - 1)}{2} (achieved in KnK_n).
    nβˆ’1β‰€βˆ£Eβˆ£β‰€n(nβˆ’1)2n - 1 \le |E| \le \frac{n(n - 1)}{2}
  2. Edge Range for a Graph with Exactly kk Connected Components:
    • Minimum Edges: Occurs when every component is a tree: ∣Emin⁑∣=βˆ‘i=1k(niβˆ’1)=(βˆ‘ni)βˆ’k=nβˆ’k|E_{\min}| = \sum_{i=1}^k (n_i - 1) = \left(\sum n_i\right) - k = n - k
    • Maximum Edges: To maximize edges while maintaining kk disconnected components, make kβˆ’1k - 1 components isolated vertices (K1K_1), and consolidate all remaining nβˆ’(kβˆ’1)=nβˆ’k+1n - (k - 1) = n - k + 1 vertices into a single complete clique: ∣Emax⁑∣=(nβˆ’k+12)=(nβˆ’k)(nβˆ’k+1)2|E_{\max}| = \binom{n - k + 1}{2} = \frac{(n - k)(n - k + 1)}{2}
    nβˆ’kβ‰€βˆ£Eβˆ£β‰€(nβˆ’k)(nβˆ’k+1)2n - k \le |E| \le \frac{(n - k)(n - k + 1)}{2}
πŸ“Theorem 9.2: Edge Density Bound for Guaranteed Connectivitytheorem

If a simple graph GG with nn vertices has:

∣E∣>(nβˆ’1)(nβˆ’2)2|E| > \frac{(n - 1)(n - 2)}{2}

then GG is strictly guaranteed to be connected!

Proof: Setting k=2k = 2 in the component upper bound formula gives the maximum edges in any disconnected graph:

∣Emax-disconnected∣=(nβˆ’2)(nβˆ’2+1)2=(nβˆ’1)(nβˆ’2)2=(nβˆ’12)|E_{\text{max-disconnected}}| = \frac{(n - 2)(n - 2 + 1)}{2} = \frac{(n - 1)(n - 2)}{2} = \binom{n - 1}{2}

This maximum is realized by a complete graph Knβˆ’1K_{n-1} plus 1 isolated vertex K1K_1. Adding even one more edge (+1+1) forces an incident edge to the isolated vertex, uniting the graph into a single connected component!

πŸ“Theorem 9.3: Complement Connectivity & Odd-Degree Component Theoremstheorem
  1. Complement Connectivity Theorem: If a simple graph GG is disconnected, then its complement GΛ‰\bar{G} is always connected! (Moreover, the diameter of GΛ‰\bar{G} satisfies diam(GΛ‰)≀2\text{diam}(\bar{G}) \le 2).
  2. Minimum Degree Connectivity Guarantee: If every vertex in GG satisfies: deg⁑(v)β‰₯nβˆ’12(βˆ€v∈V)\deg(v) \ge \frac{n - 1}{2} \quad (\forall v \in V) then GG is guaranteed to be connected!
  3. Two Odd Vertices Path Theorem: If an undirected graph has exactly two vertices of odd degree, there must exist a path connecting them (they must reside in the exact same connected component)! Proof: By the Odd-Degree Parity Theorem, every connected component must contain an even number of odd-degree vertices. Since there are only two odd vertices in the entire graph, they cannot be split into different components (which would leave 1 odd vertex per component, an impossibility). Hence, both must reside in the same component.

πŸŒ‰ Single Points of Failure: Cut-Vertices & Bridges​

πŸ“–Definition 9.2: Cut-Vertex (Articulation Point) & Bridge (Cut-Edge)definition

Let G=(V,E)G = (V, E) be a connected graph:

  1. Cut-Vertex (Articulation Point): A vertex v∈Vv \in V is a cut-vertex if removing vv and all its incident edges increases the number of connected components: c(Gβˆ’v)>c(G)c(G - v) > c(G)
  2. Bridge (Cut-Edge): An edge e∈Ee \in E is a bridge if removing ee (retaining its endpoints) increases the number of connected components: c(Gβˆ’e)>c(G)c(G - e) > c(G)
βœ“ Cut-Vertices & Bridge EdgeComponent C₁ (Triangle)Component Cβ‚‚ (Triangle)Bridge (Cut-Edge)123Cut-Vertex4Cut-Vertex56
Connectivity Vulnerability: Removing bridge edge (3, 4) or cut-vertices {3, 4} increases connected components from 1 to 2.
πŸ“Theorem 9.4: The Cycle-Bridge Invariant Theoremtheorem

An edge ee in a connected graph GG is a bridge if and only if ee does NOT belong to any simple cycle in GG!

Proof:

  • Forward (β€…β€ŠβŸΉβ€…β€Š\implies): Suppose e={u,v}e = \{u, v\} belongs to a cycle CC. If we delete edge ee, the remaining cycle edges provide an alternative detour path between uu and vv. Thus, uu and vv remain connected, and c(Gβˆ’e)=c(G)c(G - e) = c(G). Hence, ee cannot be a bridge!
  • Backward (β€…β€ŠβŸΈβ€…β€Š\impliedby): If e={u,v}e = \{u, v\} is not a bridge, then upon deleting ee, uu and vv must still be connected by some path PP. Combining path PP with edge ee forms a simple cycle containing ee. Therefore, an edge is a bridge if and only if it lies on zero cycles!

πŸ›‘οΈ Quantitative Connectivity: Whitney's Theorem​

How many vertex or edge failures can a network endure before disconnecting?

The 3 Quantitative Connectivity Parameters

Measuring physical robustness and network fault-tolerance

🎯

Vertex Connectivity (ΞΊ(G))

Node Resilience
  • The minimum number of vertices whose removal disconnects G or leaves a single vertex.
  • ΞΊ(Kβ‚™) = n - 1 (cannot disconnect complete graph except by shrinking to 1 vertex).
  • If G has a cut-vertex, then ΞΊ(G) = 1.
βœ‚οΈ

Edge Connectivity (Ξ»(G))

Link Resilience
  • The minimum number of edges whose removal disconnects G.
  • If G has a bridge, then Ξ»(G) = 1.
  • Always satisfies: Ξ»(G) ≀ minimum vertex degree Ξ΄(G).
πŸ“‰

Minimum Degree (Ξ΄(G))

Local Weak Link
  • Ξ΄(G) = min { deg(v) | v ∈ V }.
  • Isolating the vertex of minimum degree requires cutting at most Ξ΄(G) edges.
  • Acts as a hard theoretical upper bound on both ΞΊ and Ξ».
πŸ“Theorem 9.5: Whitney's Fundamental Connectivity Inequalitytheorem

For any connected graph GG:

ΞΊ(G)≀λ(G)≀δ(G)\kappa(G) \le \lambda(G) \le \delta(G)

(Vertex Connectivity ≀\le Edge Connectivity ≀\le Minimum Degree).

  • Removing all edges incident to a minimum-degree vertex isolates it, proving Ξ»(G)≀δ(G)\lambda(G) \le \delta(G).
  • For each edge in an edge cut, picking one incident vertex forms a vertex cut (with minor boundary cases), proving ΞΊ(G)≀λ(G)\kappa(G) \le \lambda(G).

πŸ“ Step-by-Step Worked Examples​

Example 1: Calculating Connectivity Bounds for Guaranteed Connection​

Problem Statement:

  1. What is the minimum number of edges needed in a simple graph with n=6n = 6 vertices to guarantee that the graph is connected?
  2. If a graph has n=10n = 10 vertices and k=3k = 3 connected components, what is the maximum number of edges it can contain?

Step-by-Step Solution:

  1. Part 1: Guaranteed Connectivity (n=6n = 6)

    • By Theorem 9.2, the most densely-connected disconnected graph with n=6n = 6 vertices consists of a complete clique Knβˆ’1=K5K_{n-1} = K_5 plus an isolated vertex K1K_1.
    • The number of edges in K5K_5 is: ∣E(K5)∣=(52)=5Γ—42=10Β edges|E(K_5)| = \binom{5}{2} = \frac{5 \times 4}{2} = 10 \text{ edges}
    • With 10 edges, the graph can still be disconnected.
    • Adding 1 additional edge forces a connection between the isolated vertex and the clique!
    • Minimum edges for guaranteed connection: ∣Eguaranteed∣=(nβˆ’12)+1=10+1=11Β edges|E_{\text{guaranteed}}| = \binom{n - 1}{2} + 1 = 10 + 1 = 11 \text{ edges}
  2. Part 2: Maximum Edges with k=3k = 3 Components (n=10n = 10)

    • By Theorem 9.1: ∣Emax⁑∣=(nβˆ’k+12)=(10βˆ’3+12)=(82)=8Γ—72=28Β edges|E_{\max}| = \binom{n - k + 1}{2} = \binom{10 - 3 + 1}{2} = \binom{8}{2} = \frac{8 \times 7}{2} = 28 \text{ edges}
    • Achieved when 2 components are isolated vertices (2K12 K_1), and the remaining component is a complete graph on 8 vertices (K8K_8).

Key Takeaway: To maximize edges while preserving kk components, isolate kβˆ’1k-1 components as single vertices and condense the remaining vertices into one large complete clique.


Example 2: Finding Articulation Points, Bridges, and Connectivity​

Problem Statement: Consider the graph shown in the vector diagram above with vertices {1,2,3,4,5,6}\{1, 2, 3, 4, 5, 6\} and edges:

{1,2},β€…β€Š{2,3},β€…β€Š{1,3},β€…β€Š{3,4},β€…β€Š{4,5},β€…β€Š{5,6},β€…β€Š{4,6}\{1, 2\}, \; \{2, 3\}, \; \{1, 3\}, \; \{3, 4\}, \; \{4, 5\}, \; \{5, 6\}, \; \{4, 6\}
  1. Identify all cycles.
  2. Identify all bridges.
  3. Identify all cut-vertices.
  4. Compute Ξ΄(G)\delta(G), Ξ»(G)\lambda(G), and ΞΊ(G)\kappa(G) and verify Whitney's Inequality.

Step-by-Step Solution:

  1. Step 1: Identify Cycles

    • Cycle 1: (1βˆ’2βˆ’3βˆ’1)(1 - 2 - 3 - 1) (Triangle C3C_3).
    • Cycle 2: (4βˆ’5βˆ’6βˆ’4)(4 - 5 - 6 - 4) (Triangle C3C_3).
  2. Step 2: Identify Bridges

    • By the Cycle-Bridge Theorem (Theorem 9.4), an edge is a bridge if and only if it does not belong to any cycle.
    • The edge {3,4}\{3, 4\} connects the two triangles and belongs to zero cycles!
    • Removing {3,4}\{3, 4\} splits the graph into component {1,2,3}\{1, 2, 3\} and component {4,5,6}\{4, 5, 6\}.
    • Bridge: {3,4}\{3, 4\}.
  3. Step 3: Identify Cut-Vertices

    • Removing vertex 33 disconnects {1,2}\{1, 2\} from {4,5,6}\{4, 5, 6\}. Hence, vertex 33 is a cut-vertex!
    • Removing vertex 44 disconnects {5,6}\{5, 6\} from {1,2,3}\{1, 2, 3\}. Hence, vertex 44 is a cut-vertex!
    • Removing vertices 1,2,5,1, 2, 5, or 66 leaves the rest of the graph connected.
    • Cut-Vertices: {3,4}\{3, 4\}.
  4. Step 4: Compute Connectivity Parameters

    • Minimum degree Ξ΄(G)\delta(G): deg⁑(1)=2,deg⁑(2)=2,deg⁑(3)=3,deg⁑(4)=3,deg⁑(5)=2,deg⁑(6)=2β€…β€ŠβŸΉβ€…β€ŠΞ΄(G)=2\deg(1) = 2, \deg(2) = 2, \deg(3) = 3, \deg(4) = 3, \deg(5) = 2, \deg(6) = 2 \implies \delta(G) = 2.
    • Edge connectivity Ξ»(G)\lambda(G): Since the graph contains a bridge {3,4}\{3, 4\}, removing 1 edge disconnects it β€…β€ŠβŸΉβ€…β€ŠΞ»(G)=1\implies \lambda(G) = 1.
    • Vertex connectivity ΞΊ(G)\kappa(G): Since the graph contains a cut-vertex (e.g. vertex 3), removing 1 vertex disconnects it β€…β€ŠβŸΉβ€…β€ŠΞΊ(G)=1\implies \kappa(G) = 1.
    • Whitney's Inequality Check: ΞΊ(G)≀λ(G)≀δ(G)β€…β€ŠβŸΊβ€…β€Š1≀1≀2(Verified!)\kappa(G) \le \lambda(G) \le \delta(G) \iff 1 \le 1 \le 2 \quad (\text{Verified!})

Key Takeaway: A single bottleneck bridge connecting two dense clusters simultaneously creates an edge connectivity of 1 and articulation points at both its endpoints.


🎯 Exam & Interview Pitfall Check​

Core Conceptual Questions

Question 1: Can a vertex of degree 1 ever be a cut-vertex? Key Focus Points: No! If you remove a vertex vv of degree 1 (a leaf) and its single incident edge, the remaining nβˆ’1n - 1 vertices remain as connected as they were before. Removing a leaf never increases the number of connected components: c(Gβˆ’v)=c(G)c(G - v) = c(G). Only the neighbor of a leaf can potentially be a cut-vertex!

Question 2: If a disconnected graph has 10 vertices, what is the maximum number of edges it can contain? Key Focus Points: A disconnected graph must have at least k=2k = 2 components. By the component upper bound formula:

∣Emax⁑∣=(nβˆ’1)(nβˆ’2)2=9Γ—82=36Β edges|E_{\max}| = \frac{(n - 1)(n - 2)}{2} = \frac{9 \times 8}{2} = 36 \text{ edges}

This corresponds to a K9K_9 component (3636 edges) and 1 isolated vertex K1K_1 (00 edges).

Common Interview Traps: Architectural Trade-Offs

Trap 1: Confusing Trails with Paths Why it fails: In a trail, edges cannot repeat, but vertices can repeat! For example, in a figure-eight graph shaped like an '8', traversing the bottom loop and then the top loop visits the central intersection vertex twice. That route is a valid Trail, but it is NOT a Path!

Trap 2: Assuming ΞΊ(G)=Ξ΄(G)\kappa(G) = \delta(G) always holds Why it fails: Just because every server in a cluster has degree 4 does NOT mean the cluster can survive 4 failures! If two large 4-regular cliques are connected by a single bridge edge, Ξ΄(G)=4\delta(G) = 4, but Ξ»(G)=1\lambda(G) = 1 and ΞΊ(G)=1\kappa(G) = 1. Never assume connectivity equals minimum degree without proving 2-connectivity!

πŸ’¬

Discussion & Doubts