Documentation

Archive.Wiedijk100Theorems.Konigsberg

The Königsberg bridges problem #

We show that a graph that represents the islands and mainlands of Königsberg and seven bridges between them has no Eulerian trail.

The vertices for the Königsberg graph; four vertices for the bodies of land and seven vertices for the bridges.

Instances For
    Equations

    Each of the connections between the islands/mainlands and the bridges. These are ordered pairs, but the data becomes symmetric in Konigsberg.adj.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      The adjacency relation for the Königsberg graph.

      Equations
      Instances For

        The Königsberg graph structure. While the Königsberg bridge problem is usually described using a multigraph, the we use a "mediant" construction to transform it into a simple graph -- every edge in the multigraph is subdivided into a path of two edges. This construction preserves whether a graph is Eulerian.

        (TODO: once mathlib has multigraphs, either prove the mediant construction preserves the Eulerian property or switch this file to use multigraphs.

        Equations
        Instances For

          To speed up the proof, this is a cache of all the degrees of each vertex, proved in Konigsberg.degree_eq_degree.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Konigsberg.not_isEulerian {u : Konigsberg.Verts} {v : Konigsberg.Verts} (p : Konigsberg.graph.Walk u v) (h : p.IsEulerian) :

            The Königsberg graph is not Eulerian.