Multigraphs, layouts, and the layout hypothesis #
A Multigraph V E gives every edge two endpoints. Parallel edges are distinct elements of E,
and the orientation of an edge plays no role: incidence, cuts and connectivity depend only on
the unordered pair G.ends e. A multigraph is the spanning case of Mathlib's Graph V E
(Multigraph.toGraph), presented with the vertices and edges as types, so that layouts are
numberings of a type and assignments of values to the edges are functions on E. Its map
Multigraph.ends presents it as a multigraph given by its ends (Cslib.Multigraph): the two share
the underlying simple graph by definition, and their edge cuts agree
(Multigraph.coe_edgeCut_ends). Unlike Cslib.Multigraph.incidence, which leaves self-loops out
for parity arguments, Multigraph.incidenceSet counts a self-loop at its vertex once
(Multigraph.coe_incidence_ends).
A layout numbers the vertices v₀, v₁, ..., and its frontier at time t is the edge cut
between the first t vertices and the rest. The width of a layout is the size of its largest
frontier.
For a connected graph, the cycle rank β₁ = |E| - |V| + 1 counts its independent cycles.
The frontier method needs one fact from graph theory: that graphs of maximum degree d have
layouts whose width is at most a fixed multiple A of their cycle rank, up to lower-order terms.
LayoutBound d A states this as a hypothesis, so that any layout theorem can be plugged in.
A set of vertices W is closed when no edge leaves it: G.edgeCut W = ∅. Connected
components (Multigraph.component) are closed, and adding a disjoint closed set to a set of
vertices does not change its edge cut (Multigraph.edgeCut_union_of_edgeCut_eq_empty). The cycle
rank of a closed set W is |E(W)| + 1 - |W|, where E(W) are the edges with an endpoint in
W (Multigraph.cycleRankOn); it is the cycle rank of the subgraph induced on W
(Multigraph.induce).
Main definitions #
Cslib.Circuits.Frontier.Multigraph: a multigraph, withincidenceSet,MaxDegreeLE,Loopless,toSimpleGraph(whose connectivity is that of the multigraph),edgeCut, andcycleRank.Cslib.Circuits.Frontier.Layout V: a numbering of the vertices, withLayout.initial.Cslib.Circuits.Frontier.Multigraph.cycleRankOn: the cycle rank of a set of vertices.Cslib.Circuits.Frontier.Multigraph.component: the connected component of a vertex.Cslib.Circuits.Frontier.Multigraph.induce: the subgraph induced on a set of vertices.Cslib.Circuits.Frontier.Multigraph.frontier,Multigraph.width: the frontiers of a layout and its width.Cslib.Circuits.Frontier.LayoutBound d A: the layout hypothesis for maximum degreedwith coefficientA.
Main results #
Cslib.Circuits.Frontier.Multigraph.edgeCut_toGraph: edge cuts are those of Mathlib's multigraphs.Cslib.Circuits.Frontier.Multigraph.toSimpleGraph_eq,Cslib.Circuits.Frontier.Multigraph.coe_edgeCut_ends,Cslib.Circuits.Frontier.Multigraph.coe_incidence_ends: the simple graph, edge cuts and incidences of the multigraph given by the ends.Cslib.Circuits.Frontier.Multigraph.card_le_card_add_one_of_connected: a connected graph has at least|V| - 1edges, so its cycle rank|E| + 1 - |V|involves no truncation.Cslib.Circuits.Frontier.Multigraph.edgeCut_union_of_edgeCut_eq_empty: closed sets do not change edge cuts.Cslib.Circuits.Frontier.Multigraph.edgeCut_component,Cslib.Circuits.Frontier.Multigraph.connected_induce_component: components are closed and connected.Cslib.Circuits.Frontier.Multigraph.ncard_component_le_ncard_touching_add_one: a componentWhas at least|W| - 1edges.Cslib.Circuits.Frontier.Multigraph.frontier_succ_subset: consecutive frontiers differ only at the edges of the vertex processed in between.
A multigraph with vertices V and edges E: every edge has two endpoints, its source
and its target. Parallel edges are distinct elements of E, and loops are allowed. The
orientation plays no role in what follows.
- src : E → V
One endpoint of an edge.
- tgt : E → V
The other endpoint of an edge.
Instances For
The ends of an edge, as an unordered pair.
Instances For
The edges incident to a vertex.
Instances For
Every vertex is incident to at most d edges. In a loopless multigraph this says that the
maximum degree is at most d. The finite edge type ensures that natural cardinalities
count every incident edge.
Instances For
No edge joins a vertex to itself.
Instances For
The simple graph underlying a multigraph: two distinct vertices are adjacent when an edge
joins them. A multigraph is connected when this simple graph is. It is the simple graph of the
multigraph given by the ends (Cslib.Multigraph.toSimpleGraph).
Instances For
The edge cut of a set of vertices L: the edges with exactly one endpoint in L.
Instances For
The edges with an endpoint in L.
Instances For
The cycle rank |E| + 1 - |V|. For a nonempty connected multigraph this is the number of
independent cycles, the dimension of its cycle space; on disconnected graphs it is not the sum of
the cycle ranks of the components.
Instances For
The simple graph of a multigraph is that of the multigraph given by its ends.
The endpoints of an edge are joined in the underlying simple graph.
The edges of the cut of L touch L.
Adding a vertex changes a cut only at the edges incident to it.
A connected multigraph has at least |V| - 1 edges: its cycle rank |E| + 1 - |V|
involves no truncation.
Mathlib's multigraphs #
A multigraph as a Mathlib Graph whose vertex set and edge set are everything.
Instances For
The incidence sets of a multigraph are those of Mathlib's Graph.
Multigraphs given by their ends #
The edge cuts are those of the multigraph given by the ends.
The incidences of the multigraph given by the ends are the incident edges other than self-loops.
Cycle rank of a set of vertices #
The truncated expression |E(W)| + 1 - |W|, where E(W) are the edges with an endpoint
in W. For a connected component it is the number of independent cycles of the component; it
need not be additive over components.
Instances For
Closed sets #
A larger set of vertices touches more edges.
Closed sets do not change edge cuts. Adding a closed set K to a set L disjoint from
it does not change the edge cut of L.
Connected components #
The endpoints of an edge lie in the same connected component.
Unions of components are closed. A set of vertices described by their connected components has an empty edge cut.
The connected component of a vertex v: the vertices joined to v by a walk.
Instances For
Every vertex lies in its own component.
Connected components are closed.
Induced subgraphs #
Induced subgraphs of loopless graphs are loopless.
Induced subgraphs have no larger degrees.
The simple graph underlying an induced subgraph is the induced simple graph.
Components are connected.
The subgraph induced on a closed set W has the cycle rank of W.
A component W has at least |W| - 1 edges, so its cycle rank |E(W)| + 1 - |W|
involves no truncation.
On a closed set W, the edge cuts of the induced subgraph are those of G.
Layouts #
A layout of a finite set of vertices: a numbering v₀, v₁, ..., v_{N-1}.
Instances For
The frontier of a layout at time t: the edge cut between the first t vertices and the
rest.
Instances For
The width of a layout with finitely many edges: the size of its largest frontier.
Instances For
An edge is on the frontier at time t when exactly one of its ends is among the first t
vertices.
Consecutive frontiers differ only at the edges of the vertex processed in between.
The layout hypothesis for maximum degree d, with coefficient A. For every η > 0
there is a constant C such that every connected, loopless multigraph of maximum degree d
has a layout of width at most (A + η) β₁ + η |V| + C, where β₁ is the cycle rank.
Only the coefficient A matters for the circuit lower bounds: any error term that is sublinear
in the number of vertices may be absorbed into η |V| + C.