Connectivity for general graphs #
A walk is a sequence of adjacent vertices. For vertices u v : α,
the type Walk G u v consists of all walks starting at u and ending at v.
- nil {α : Type u_1} {β : Type u_2} {G : UnweightedGraph α β} {u : α} : Walk u u
- cons {α : Type u_1} {β : Type u_2} {G : UnweightedGraph α β} {u v w : α} (h : G.Adj u v) (p : Walk v w) : Walk u w
Instances For
Equations
- One or more equations did not get rendered due to their size.
- UnweightedGraph.instDecidableEqWalk.decEq UnweightedGraph.Walk.nil UnweightedGraph.Walk.nil = isTrue ⋯
- UnweightedGraph.instDecidableEqWalk.decEq UnweightedGraph.Walk.nil (UnweightedGraph.Walk.cons h p) = isFalse ⋯
- UnweightedGraph.instDecidableEqWalk.decEq (UnweightedGraph.Walk.cons h p) UnweightedGraph.Walk.nil = isFalse ⋯
Instances For
Two vertices are reachable if there is a walk between them.
Equations
Instances For
A graph is preconnected if every pair of vertices is reachable from one another.
Equations
- UnweightedGraph.Preconnected = ∀ (u v : α), UnweightedGraph.Reachable u v
Instances For
A graph is connected if it's preconnected and contains at least one vertex.
- preconnected : Preconnected
- nonempty : Nonempty α
Instances For
We define the edge boundary ∂S of S to consist of all edges with exactly one endpoint in S.
Equations
Instances For
We can define the vertex boundary δS of S to be the set of all vertices v not in S but adjacent to some vertex in S.
Equations
Instances For
If there is a walk going from S to Sᶜ then there is a least on edge that goes from S to Sᶜ.
In a connected graph, every set of vertices, different from ∅ and univ, has non empty edgeBoundary: ∂S ≠ ∅.