Documentation

DescriptiveComplexity.Problems.DagIso.FromDigraphIso

Digraph Isomorphism reduces to DAG Isomorphism #

The substantial half of GI-completeness: an arbitrary directed graph is turned into a DAG whose isomorphisms are exactly the isomorphisms of the graph. Every arc is subdivided twice,

  u  ⟶  a(u,v)  ⟶  b(u,v)  ⟵  v

so that the arc u ⟶ v becomes a three-level pattern: the tail u points at the middle node a(u,v), which points at the end node b(u,v), which the head v also points at. Subdividing once would not do – with a single node per arc the two endpoints would be interchangeable and the direction of the arc lost; here the tail is the vertex pointing at a middle node and the head the vertex pointing at an end node.

The construction is acyclic by inspection: every arc goes from level 0 (vertices) to level 1 (middle nodes) or level 2 (end nodes), or from level 1 to level 2. That is also the topological order the instance must carry, and it needs no formula at all – it is read off the tags (DescriptiveComplexity.DagIso.ltF), which is why the reduction stays order-free: FirstOrder.Language.twoGraphs carries its own vertex marks, so the same gadget runs on the pattern side and on the host side inside a single interpretation, junk staying unmarked.

The three levels are recovered from the arcs alone, without any counting: a vertex node is one with no incoming arc, an end node one with an incoming but no outgoing arc, and a middle node has both (DescriptiveComplexity.DagIso.pat_no_in_vPt and its siblings). An isomorphism of the two DAGs therefore preserves the levels, and reading it on level 0 gives the isomorphism of the graphs.

The tags: the three levels of the construction #

The three kinds of node of the gadget: a vertex, the middle node of an arc, the end node of an arc.

  • vtx : NodeTag

    A copy of a vertex of the input graph (level 0).

  • arcMid : NodeTag

    The middle node a(u,v) of an arc u ⟶ v (level 1).

  • arcEnd : NodeTag

    The end node b(u,v) of an arc u ⟶ v (level 2).

Instances For
    Dependency graph
    Dependency graph
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    Dependency graph
    Dependency graph

    The defining formulas #

    Being a node of the gadget, for one side of the instance: a vertex node is a diagonal pair whose entry is a marked vertex, and an arc node is a pair that is an arc between two marked vertices.

    Equations
    Instances For
      Dependency graph

      The arcs of the gadget: u ⟶ a(u,v), a(u,v) ⟶ b(u,v) and v ⟶ b(u,v), and nothing else.

      Equations
      Instances For
        Dependency graph
        Dependency graph

        The interpretation of Digraph Isomorphism into DAG Isomorphism: two dimensions (an arc is a pair), three tags (the three levels), the same gadget run on the pattern side and on the host side.

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

          The points of the gadget #

          A point at the vertex level; it is a node only when its two coordinates agree (DescriptiveComplexity.DagIso.pat_vPt2).

          Equations
          Instances For
            Dependency graph

            The vertex node of a vertex.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              Dependency graph

              What the gadget builds, on the pattern side #

              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph

              Nothing points at a vertex node: level 0 is the bottom.

              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph

              What the gadget builds, on the host side #

              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph

              The gadget is acyclic: the levels #

              Dependency graph
              Dependency graph
              Dependency graph

              From an isomorphism of the graphs to one of the DAGs #

              A map of the universe, lifted to the nodes of the gadget: it keeps the level and acts on both coordinates.

              Equations
              Instances For
                Dependency graph
                @[simp]
                theorem DescriptiveComplexity.DagIso.liftMap_vPt {A : Type} (g : A → A) (v : A) :
                liftMap g (vPt v) = vPt (g v)
                Dependency graph
                @[simp]
                theorem DescriptiveComplexity.DagIso.liftMap_midPt {A : Type} (g : A → A) (u v : A) :
                liftMap g (midPt u v) = midPt (g u) (g v)
                Dependency graph
                @[simp]
                theorem DescriptiveComplexity.DagIso.liftMap_endPt {A : Type} (g : A → A) (u v : A) :
                liftMap g (endPt u v) = endPt (g u) (g v)
                Dependency graph

                From an isomorphism of the DAGs back to one of the graphs #

                Correctness of the reduction #