Graph isomorphism #
GraphIsomorphism is the set of pairs of graphs (Cslib.Complexity.GraphIsomorphismInstance,
encoded by Cslib.Complexity.encGraphIsomorphism), that are isomorphic: the simple graphs
induced on their declared vertices (Cslib.Complexity.Graph.induced) are isomorphic in the sense
of Mathlib's SimpleGraph.Iso. Repeated vertex entries are ignored, and so are edges with an
endpoint outside the declared vertices. GraphNonIsomorphism is its complement
Arora and Barak, Section 8.1.3.
Positions in the list Graph.distinctVertices of declared vertices without repetitions enumerate
the vertices (Cslib.Complexity.Graph.vertexEquiv), and Graph.adjIndex reads adjacency through
positions. Two graphs are isomorphic exactly when a bijection of positions preserves adjIndex
(mem_GraphIsomorphism_iff).
GraphIsomorphism ∈ NP: a certificate encodes an ordering of the second graph's declared vertices
in unary blocks (Cslib.Complexity.Graph.decodeVertexList), and the verifier checks that it lists
every declared vertex of the second graph once (Cslib.Complexity.Graph.verifyOrdering), has as
many vertices as the first graph, and preserves adjacency.
Main definitions #
Cslib.Complexity.Graph.adjIndex.Cslib.Complexity.GraphIsomorphismInstance,Cslib.Complexity.encGraphIsomorphism.Cslib.Complexity.GraphIsomorphism,Cslib.Complexity.GraphNonIsomorphism.Cslib.Complexity.GraphIsomorphism.verifier.
Main results #
Cslib.Complexity.mem_GraphIsomorphism_iff: isomorphism through positions.Cslib.Complexity.length_distinctVertices_eq_of_mem_GraphIsomorphism,Cslib.Complexity.mem_GraphIsomorphism_iff_exists_perm: isomorphic graphs have equally many vertices, and are then related by a permutation of positions.Cslib.Complexity.GraphIsomorphism.isVerifier,Cslib.Complexity.GraphIsomorphism.mem_NP:GraphIsomorphism ∈ NP encGraphIsomorphism.
References #
Adjacency of the vertices at positions i and j of G.distinctVertices.
Adjacency of computed positions in a computed graph is polynomial-time.
An instance (first, second) of Graph Isomorphism and Graph Non-Isomorphism.
Instances For
The tuple of the fields of encGraphIsomorphism.
Encoding of GraphIsomorphismInstance as a pair (first, second).
The pairs of isomorphic graphs: the graphs induced on the declared vertices are isomorphic Arora and Barak, Section 8.1.3.
The pairs of non-isomorphic graphs Arora and Barak, Section 8.1.3.
Two graphs are isomorphic exactly when a bijection between the positions of their distinct vertices preserves adjacency.
Isomorphic graphs have equally many distinct vertices.
Graphs with equally many distinct vertices are isomorphic exactly when a permutation of the positions of the first carries its adjacency to the adjacency of the second.
Verification #
Accept a certificate when the decoded ordering of the second graph's declared vertices has as many vertices as the first graph and preserves adjacency.
verifier is a verifier for GraphIsomorphism with certificates whose length is the square
of the length of the encoded pair of graphs.