Documentation

AlgoLib.Theory.Graph.Connectivity.Basic

AlgoLib.Theory.Graph.Connectivity #

Connectedness, connected components, cuts, separators, and the connectivity numbers κ(G) and κ'(G) for the simple graphs of AlgoLib.Graph.Basic.

This file defines nothing itself: it is an umbrella module that re-exports the development, which is split across AlgoLib/Theory/Connectivity/:

The executable layer — the reachability closure reachableFinset and distance computeDist by breadth-first search, the connected components as a Finset, the four connectivity numbers as executable definitions, and the Decidable instances for reachability, connectedness, cuts and separating sets — lives in AlgoLib.Algorithms.Graph.Connectivity.Basic. It depends on the search algorithm of AlgoLib.Algorithms.Graph.Traversal.BFS, which is why it is not part of this theory umbrella: AlgoLib.Theory never imports AlgoLib.Algorithms.

Downstream files should import this umbrella; the split is internal. The submodules form the acyclic spine Reachable ← Components ← Cuts ← Connectivity, on top of the deletion operations in AlgoLib.Graph.Delete and the walk development in AlgoLib.Theory.Structures.InSimpleGraph; Directed sits beside Reachable.

Main definitions #

Definitions based on lecture note "Graph Theory ETH 2026" by Benny Sudakov

Notation #

All notation is scoped to AlgoLib, so open scoped AlgoLib brings it into scope alongside V(G) and E(G).

Design choices #

Each submodule documents its own choices; the three that shape the whole development are:

Strong connectivity #

There is deliberately no stronglyConnectedComponent here. In an undirected graph Reachable is symmetric (SimpleGraph.Reachable.symm), so strong components coincide with connected components and a separate API would be pure duplication. Strong connectivity is a genuinely directed notion; its home is SimpleDiGraph, where SimpleDiGraph.IsSimpleWalkIn and its closure lemmas are already available in AlgoLib.Theory.Structures.InSimpleDiGraph.