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 arcu ⟶ v(level 1). - arcEnd : NodeTag
The end node
b(u,v)of an arcu ⟶ v(level 2).
Instances For
Dependency graph
Dependency graph
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
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.DagIso.nodeF mark adj DescriptiveComplexity.DagIso.NodeTag.vtx x y = (FirstOrder.Language.var x).equal (FirstOrder.Language.var y) ⊓ mark.formula₁ (FirstOrder.Language.var x)
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
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.DagIso.arcF mark adj t s x₀ x₁ y₀ y₁ = ⊥
Instances For
Dependency graph
The topological order of the gadget: the level of the tag strictly increases. It mentions no variable at all – the whole point of the three-level layout.
Equations
- DescriptiveComplexity.DagIso.ltF DescriptiveComplexity.DagIso.NodeTag.vtx DescriptiveComplexity.DagIso.NodeTag.arcMid = ⊤
- DescriptiveComplexity.DagIso.ltF DescriptiveComplexity.DagIso.NodeTag.vtx DescriptiveComplexity.DagIso.NodeTag.arcEnd = ⊤
- DescriptiveComplexity.DagIso.ltF DescriptiveComplexity.DagIso.NodeTag.arcMid DescriptiveComplexity.DagIso.NodeTag.arcEnd = ⊤
- DescriptiveComplexity.DagIso.ltF t s = ⊥
Instances For
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
The middle node of an arc.
Equations
Instances For
Dependency graph
The end node of an arc.
Equations
Instances For
Dependency graph
Dependency graph
A point of the vertex level, in named form.
Dependency graph
A point of the middle level, in named form.
Dependency graph
A point of the end level, in named form.
Dependency graph
Dependency graph
Dependency graph
What the gadget builds, on the pattern side #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
A pattern node is a vertex node, a middle node or an end node. The
hypothesis is unfolded by rcases rather than by rw: the defining formula's
realization is definitionally a conjunction, and a pair literal at
FOInterpretation.Map type does not match at rewriting transparency.
Dependency graph
The only arcs are the three of the gadget: the tags of an arc's endpoints
climb the three levels. The six forbidden tag combinations need no argument –
their defining formula is ⊥, so the hypothesis is False.
Dependency graph
Nothing points at a vertex node: level 0 is the bottom.
Dependency graph
An end node points at nothing: level 2 is the top.
Dependency graph
Two middle nodes are never joined: they sit at the same level.
Dependency graph
Dependency graph
Dependency graph
Dependency graph
What the gadget builds, on the host side #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
A host node is a vertex node, a middle node or an end node. The
hypothesis is unfolded by rcases rather than by rw: the defining formula's
realization is definitionally a conjunction, and a pair literal at
FOInterpretation.Map type does not match at rewriting transparency.
Dependency graph
The only arcs are the three of the gadget: the tags of an arc's endpoints
climb the three levels. The six forbidden tag combinations need no argument –
their defining formula is ⊥, so the hypothesis is False.
Dependency graph
Nothing points at a vertex node: level 0 is the bottom.
Dependency graph
An end node points at nothing: level 2 is the top.
Dependency graph
Two middle nodes are never joined: they sit at the same level.
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The gadget is acyclic: the levels #
The level of a node: vertices at 0, middle nodes at 1, end nodes at 2. The carried topological order is exactly the comparison of levels.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Arcs climb the levels, on the pattern side.
Dependency graph
Arcs climb the levels, on the host side.
Dependency graph
The pattern side of the image is a DAG, with the carried order as
witness: the order is the level comparison, so irreflexivity and transitivity
are those of < on ℕ, and every arc climbs a level.
Dependency graph
The host side of the image is a DAG, likewise.
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.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Both coordinates of a pattern node are marked vertices.
Dependency graph
The gadget is functorial and faithful: an isomorphism of the two marked graphs lifts, level by level, to an isomorphism of the two DAGs. The six combinations of levels that carry no arc are dispatched by the level lemmas, the three that do by the corresponding characterizations.
Dependency graph
From an isomorphism of the DAGs back to one of the graphs #
An isomorphism of the DAGs sends vertex nodes to vertex nodes: they are the nodes nothing points at, and that is preserved because every host node is the image of a pattern node.
Dependency graph
Nothing follows the image of an end node: end nodes are the nodes with no outgoing arc, and that too is preserved.
Dependency graph
The image of a middle node is a middle node: it has both an incoming and an outgoing arc, which no other level has.
Dependency graph
The image of an end node is an end node.
Dependency graph
The image of the middle node of an arc is the middle node of the image arc: the tail is pinned by the arc from the tail's vertex node, the head by the arc from the head's vertex node through the end node.
Dependency graph
Correctness of the reduction #
Reading an isomorphism of the DAGs on level 0: it maps vertex nodes to vertex nodes, so it restricts to a bijection of the marked vertices, and the arcs of the graphs are recovered from the arcs of the gadget through the middle and end nodes.
Dependency graph
Correctness of the reduction: the two graphs are isomorphic exactly when the two DAGs built from them are.
Dependency graph
Digraph Isomorphism FO-reduces to DAG Isomorphism: subdivide every arc twice, and carry the level comparison as the topological order. Two dimensions, three tags, and no order on the input – the reduction is order-free, as every reduction between isomorphism problems must be.
Equations
- One or more equations did not get rendered due to their size.