Documentation

Mathlib.Combinatorics.SimpleGraph.Matching

Matchings #

A matching for a simple graph is a set of disjoint pairs of adjacent vertices, and the set of all the vertices in a matching is called its support (and sometimes the vertices in the support are said to be saturated by the matching). A perfect matching is a matching whose support contains every vertex of the graph.

In this module, we represent a matching as a subgraph whose vertices are each incident to at most one edge, and the edges of the subgraph represent the paired vertices.

Main definitions #

TODO #

The subgraph M of G is a matching if every vertex of M is incident to exactly one edge in M. We say that the vertices in M.support are matched or saturated.

Equations
Instances For

    Given a vertex, returns the unique edge of the matching it is incident to.

    Equations
    Instances For
      theorem SimpleGraph.Subgraph.IsMatching.toEdge_eq_of_adj {V : Type u} {G : SimpleGraph V} {M : SimpleGraph.Subgraph G} (h : SimpleGraph.Subgraph.IsMatching M) {v : V} {w : V} (hv : v M.verts) (hvw : M.Adj v w) :
      SimpleGraph.Subgraph.IsMatching.toEdge h { val := v, property := hv } = { val := s(v, w), property := hvw }
      theorem SimpleGraph.Subgraph.IsMatching.toEdge_eq_toEdge_of_adj {V : Type u} {G : SimpleGraph V} {M : SimpleGraph.Subgraph G} {v : V} {w : V} (h : SimpleGraph.Subgraph.IsMatching M) (hv : v M.verts) (hw : w M.verts) (ha : M.Adj v w) :
      SimpleGraph.Subgraph.IsMatching.toEdge h { val := v, property := hv } = SimpleGraph.Subgraph.IsMatching.toEdge h { val := w, property := hw }

      The subgraph M of G is a perfect matching on G if it's a matching and every vertex G is matched.

      Equations
      Instances For