The graph isomorphism problem is the
computational problem
In theoretical computer science, a computational problem is a problem that may be solved by an algorithm. For example, the problem of factoring
:"Given a positive integer ''n'', find a nontrivial prime factor of ''n''."
is a computational probl ...
of determining whether two finite
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
s are
isomorphic.
The problem is not known to be solvable in
polynomial time
In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
nor to be
NP-complete
In computational complexity theory, a problem is NP-complete when:
# it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by tryin ...
, and therefore may be in the computational
complexity class
In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory.
In general, a complexity class is defined in terms ...
NP-intermediate. It is known that the graph isomorphism problem is in the
low hierarchy of
class NP
In computational complexity theory, NP (nondeterministic polynomial time) is a complexity class used to classify decision problems. NP is the set of decision problems for which the problem instances, where the answer is "yes", have proof ...
, which implies that it is not NP-complete unless the
polynomial time hierarchy collapses to its second level. At the same time, isomorphism for many special classes of graphs can be solved in polynomial time, and in practice graph isomorphism can often be solved efficiently.
This problem is a special case of the
subgraph isomorphism problem, which asks whether a given graph ''G'' contains a subgraph that is isomorphic to another given graph ''H''; this problem is known to be NP-complete. It is also known to be a special case of the
non-abelian hidden subgroup problem over the
symmetric group
In abstract algebra, the symmetric group defined over any set is the group whose elements are all the bijections from the set to itself, and whose group operation is the composition of functions. In particular, the finite symmetric group ...
.
In the area of
image recognition it is known as the exact graph matching.
[Endika Bengoetxea]
"Inexact Graph Matching Using Estimation of Distribution Algorithms"
Ph.
D., 2002
Chapter 2:The graph matching problem
(retrieved June 28, 2017)
State of the art
In November 2015,
László Babai announced a
quasipolynomial time algorithm for all graphs, that is, one with running time
for some fixed
. On January 4, 2017, Babai retracted the quasi-polynomial claim and stated a
sub-exponential time bound instead after
Harald Helfgott discovered a flaw in the proof. On January 9, 2017, Babai announced a correction (published in full on January 19) and restored the quasi-polynomial claim, with Helfgott confirming the fix. Helfgott further claims that one can take , so the running time is .
Prior to this, the best currently accepted theoretical algorithm was due to , and is based on the earlier work by combined with a ''subfactorial'' algorithm of V. N. Zemlyachenko . The algorithm has run time 2
O() for graphs with ''n'' vertices and relies on the
classification of finite simple groups
In mathematics, the classification of the finite simple groups is a result of group theory stating that every finite simple group is either cyclic, or alternating, or it belongs to a broad infinite class called the groups of Lie type, or els ...
. Without this classification theorem, a slightly weaker bound
was obtained first for
strongly regular graphs by , and then extended to general graphs by . Improvement of the exponent is a major open problem; for strongly regular graphs this was done by . For
hypergraphs of bounded rank, a
subexponential upper bound matching the case of graphs was obtained by .
There are several competing practical algorithms for graph isomorphism, such as those due to , , , and . While they seem to perform well on
random graphs, a major drawback of these algorithms is their exponential time performance in the
worst case.
The graph isomorphism problem is computationally equivalent to the problem of computing the
automorphism group of a graph,
and is weaker than the
permutation group isomorphism problem and the permutation group intersection problem. For the latter two problems, obtained complexity bounds similar to that for graph isomorphism.
Solved special cases
A number of important special cases of the graph isomorphism problem have efficient, polynomial-time solutions:
*
Tree
In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
s
*
Planar graph
In graph theory, a planar graph is a graph that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. In other words, it can be drawn in such a way that no edges cro ...
s (In fact, planar graph isomorphism is in
log space, a class contained in
P)
*
Interval graph
In graph theory, an interval graph is an undirected graph formed from a set of intervals on the real line,
with a vertex for each interval and an edge between vertices whose intervals intersect. It is the intersection graph of the intervals.
...
s
*
Permutation graphs
*
Circulant graphs
*Bounded-parameter graphs
** Graphs of bounded
treewidth
** Graphs of bounded
genus
Genus ( plural genera ) is a taxonomic rank used in the biological classification of living and fossil organisms as well as viruses. In the hierarchy of biological classification, genus comes above species and below family. In binomial n ...
(Planar graphs are graphs of genus 0.)
** Graphs of bounded
degree
Degree may refer to:
As a unit of measurement
* Degree (angle), a unit of angle measurement
** Degree of geographical latitude
** Degree of geographical longitude
* Degree symbol (°), a notation used in science, engineering, and mathemati ...
** Graphs with bounded
eigenvalue
In linear algebra, an eigenvector () or characteristic vector of a linear transformation is a nonzero vector that changes at most by a scalar factor when that linear transformation is applied to it. The corresponding eigenvalue, often denot ...
multiplicity
** ''k''-Contractible graphs (a generalization of bounded degree and bounded genus)
**Color-preserving isomorphism of
colored graph
''Colored'' (or ''coloured'') is a racial descriptor historically used in the United States during the Jim Crow Era to refer to an African American. In many places, it may be considered a slur, though it has taken on a special meaning in South ...
s with bounded color multiplicity (i.e., at most ''k'' vertices have the same color for a fixed ''k'') is in class
NC, which is a subclass of
P
Complexity class GI
Since the graph isomorphism problem is neither known to be NP-complete nor known to be tractable, researchers have sought to gain insight into the problem by defining a new class GI, the set of problems with a
polynomial-time Turing reduction to the graph isomorphism problem. If in fact the graph isomorphism problem is solvable in polynomial time, GI would equal
P. On the other hand, if the problem is NP-complete, GI would equal
NP and all problems in NP would be solvable in quasi-polynomial time.
As is common for
complexity class
In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory.
In general, a complexity class is defined in terms ...
es within the
polynomial time hierarchy, a problem is called GI-hard if there is a
polynomial-time Turing reduction from any problem in GI to that problem, i.e., a polynomial-time solution to a GI-hard problem would yield a polynomial-time solution to the graph isomorphism problem (and so all problems in GI). A problem
is called
complete for GI, or GI-complete, if it is both GI-hard and a polynomial-time solution to the GI problem would yield a polynomial-time solution to
.
The graph isomorphism problem is contained in both NP and co-
AM. GI is contained in and
low
Low or LOW or lows, may refer to:
People
* Low (surname), listing people surnamed Low
Places
* Low, Quebec, Canada
* Low, Utah, United States
* Lo Wu station (MTR code LOW), Hong Kong; a rail station
* Salzburg Airport (ICAO airport code: LO ...
for
Parity P, as well as contained in the potentially much smaller class SPP. That it lies in Parity P means that the graph isomorphism problem is no harder than determining whether a polynomial-time
nondeterministic Turing machine has an even or odd number of accepting paths. GI is also contained in and low for
ZPPNP. This essentially means that an efficient
Las Vegas algorithm In computing, a Las Vegas algorithm is a randomized algorithm that always gives correct results; that is, it always produces the correct result or it informs about the failure. However, the runtime of a Las Vegas algorithm differs depending on the ...
with access to an NP
oracle
An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination.
Description
The wor ...
can solve graph isomorphism so easily that it gains no power from being given the ability to do so in constant time.
GI-complete and GI-hard problems
Isomorphism of other objects
There are a number of classes of mathematical objects for which the problem of isomorphism is a GI-complete problem. A number of them are graphs endowed with additional properties or restrictions:
*
digraphs[
* labelled graphs, with the proviso that an isomorphism is not required to preserve the labels,][ but only the ]equivalence relation
In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation.
Each equivalence relatio ...
consisting of pairs of vertices with the same label
*"polarized graphs" (made of a complete graph
In the mathematical field of graph theory, a complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge. A complete digraph is a directed graph in which every pair of distinct vertices ...
Km and an empty graph Kn plus some edges connecting the two; their isomorphism must preserve the partition)[
*2-]colored graph
''Colored'' (or ''coloured'') is a racial descriptor historically used in the United States during the Jim Crow Era to refer to an African American. In many places, it may be considered a slur, though it has taken on a special meaning in South ...
s[
*explicitly given finite structures][
* multigraphs][
* hypergraphs][
*]finite automata
A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
[
* Markov Decision Processes
*]commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name o ...
class 3 nilpotent
In mathematics, an element x of a ring R is called nilpotent if there exists some positive integer n, called the index (or sometimes the degree), such that x^n=0.
The term was introduced by Benjamin Peirce in the context of his work on the cl ...
(i.e., ''xyz'' = 0 for every elements ''x'', ''y'', ''z'') semigroup
In mathematics, a semigroup is an algebraic structure consisting of a Set (mathematics), set together with an associative internal binary operation on it.
The binary operation of a semigroup is most often denoted multiplication, multiplicatively ...
s[
*finite rank associative algebras over a fixed algebraically closed field with zero squared radical and commutative factor over the radical.][
*]context-free grammar
In formal language theory, a context-free grammar (CFG) is a formal grammar whose production rules are of the form
:A\ \to\ \alpha
with A a ''single'' nonterminal symbol, and \alpha a string of terminals and/or nonterminals (\alpha can be ...
s[
*]balanced incomplete block design
In combinatorial mathematics, a block design is an incidence structure consisting of a set together with a family of subsets known as ''blocks'', chosen such that frequency of the elements satisfies certain conditions making the collection of b ...
s[
*Recognizing combinatorial isomorphism of convex polytopes represented by vertex-facet incidences.
]
GI-complete classes of graphs
A class of graphs is called GI-complete if recognition of isomorphism for graphs from this subclass is a GI-complete problem. The following classes are GI-complete:[
* connected graphs][
*graphs of ]diameter
In geometry, a diameter of a circle is any straight line segment that passes through the center of the circle and whose endpoints lie on the circle. It can also be defined as the longest chord of the circle. Both definitions are also valid fo ...
2 and radius
In classical geometry, a radius ( : radii) of a circle or sphere is any of the line segments from its center to its perimeter, and in more modern usage, it is also their length. The name comes from the latin ''radius'', meaning ray but also the ...
1[
*]directed acyclic graph
In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one v ...
s[
* regular graphs][
*]bipartite graph
In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V, that is every edge connects a vertex in U to one in V. Vertex sets U and V ar ...
s without non-trivial strongly regular subgraphs[
*bipartite Eulerian graphs][
*bipartite regular graphs][
*]line graph
In the mathematical discipline of graph theory, the line graph of an undirected graph is another graph that represents the adjacencies between edges of . is constructed in the following way: for each edge in , make a vertex in ; for every ...
s[
* split graphs
* chordal graphs][
*regular self-complementary graphs][
* polytopal graphs of general, simple, and simplicial convex polytopes in arbitrary dimensions.
Many classes of digraphs are also GI-complete.
]
Other GI-complete problems
There are other nontrivial GI-complete problems in addition to isomorphism problems.
*The recognition of self-complementarity of a graph or digraph.
*A clique problem for a class of so-called ''M''-graphs. It is shown that finding an isomorphism for ''n''-vertex graphs is equivalent to finding an ''n''-clique in an ''M''-graph of size ''n''2. This fact is interesting because the problem of finding an (''n'' − ''ε'')-clique in a ''M''-graph of size ''n''2 is NP-complete for arbitrarily small positive ε.
*The problem of homeomorphism of 2-complexes.
GI-hard problems
*The problem of counting the number of isomorphisms between two graphs is polynomial-time equivalent to the problem of telling whether even one exists.[; .]
*The problem of deciding whether two convex polytopes given by either the V-description or H-description
A convex polytope is a special case of a polytope, having the additional property that it is also a convex set contained in the n-dimensional Euclidean space \mathbb^n. Most texts. use the term "polytope" for a bounded convex polytope, and the wo ...
are projectively or affinely isomorphic. The latter means existence of a projective or affine map between the spaces that contain the two polytopes (not necessarily of the same dimension) which induces a bijection between the polytopes.
Program checking
have shown a probabilistic checker for programs for graph isomorphism. Suppose ''P'' is a claimed polynomial-time procedure that checks if two graphs are isomorphic, but it is not trusted. To check if graphs ''G'' and ''H'' are isomorphic:
* Ask ''P'' whether ''G'' and ''H'' are isomorphic.
** If the answer is "yes":
*** Attempt to construct an isomorphism using ''P'' as subroutine. Mark a vertex ''u'' in ''G'' and ''v'' in ''H'', and modify the graphs to make them distinctive (with a small local change). Ask ''P'' if the modified graphs are isomorphic. If no, change ''v'' to a different vertex. Continue searching.
*** Either the isomorphism will be found (and can be verified), or ''P'' will contradict itself.
** If the answer is "no":
*** Perform the following 100 times. Choose randomly ''G'' or ''H'', and randomly permute its vertices. Ask ''P'' if the graph is isomorphic to ''G'' and ''H''. (As in AM protocol for graph nonisomorphism).
*** If any of the tests are failed, judge ''P'' as invalid program. Otherwise, answer "no".
This procedure is polynomial-time and gives the correct answer if ''P'' is a correct program for graph isomorphism. If ''P'' is not a correct program, but answers correctly on ''G'' and ''H'', the checker will either give the correct answer, or detect invalid behaviour of ''P''.
If ''P'' is not a correct program, and answers incorrectly on ''G'' and ''H'', the checker will detect invalid behaviour of ''P'' with high probability, or answer wrong with probability 2−100.
Notably, ''P'' is used only as a blackbox.
Applications
Graphs are commonly used to encode structural information in many fields, including computer vision
Computer vision is an Interdisciplinarity, interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate t ...
and pattern recognition, and graph matching, i.e., identification of similarities between graphs, is an important tools in these areas. In these areas graph isomorphism problem is known as the exact graph matching.[Endika Bengoetxea, Ph.D.]
Abstract
/ref>
In cheminformatics and in mathematical chemistry, graph isomorphism testing is used to identify a chemical compound
A chemical compound is a chemical substance composed of many identical molecules (or molecular entities) containing atoms from more than one chemical element held together by chemical bonds. A molecule consisting of atoms of only one ele ...
within a chemical database. Also, in organic mathematical chemistry graph isomorphism testing is useful for generation of molecular graphs and for computer synthesis.
Chemical database search is an example of graphical data mining, where the graph canonization In graph theory, a branch of mathematics, graph canonization is the problem of finding a canonical form of a given graph ''G''. A canonical form is a labeled graph Canon(''G'') that is isomorphic to ''G'', such that every graph that is isomorphic ...
approach is often used. In particular, a number of identifier
An identifier is a name that identifies (that is, labels the identity of) either a unique object or a unique ''class'' of objects, where the "object" or class may be an idea, physical countable object (or class thereof), or physical noncountable ...
s for chemical substance
A chemical substance is a form of matter having constant chemical composition and characteristic properties. Some references add that chemical substance cannot be separated into its constituent Chemical element, elements by physical separation m ...
s, such as SMILES and InChI, designed to provide a standard and human-readable way to encode molecular information and to facilitate the search for such information in databases and on the web, use canonization step in their computation, which is essentially the canonization of the graph which represents the molecule.
In electronic design automation
Electronic design automation (EDA), also referred to as electronic computer-aided design (ECAD), is a category of software tools for designing electronic systems such as integrated circuits and printed circuit boards. The tools work together ...
graph isomorphism is the basis of the Layout Versus Schematic (LVS) circuit design step, which is a verification whether the electric circuits represented by a circuit schematic
A circuit diagram (wiring diagram, electrical diagram, elementary diagram, electronic schematic) is a graphical representation of an electrical circuit. A pictorial circuit diagram uses simple images of components, while a schematic diagram s ...
and an integrated circuit layout are the same.
See also
*Graph automorphism problem
In the mathematical field of graph theory, an automorphism of a graph is a form of symmetry in which the graph is mapped onto itself while preserving the edge–vertex connectivity.
Formally, an automorphism of a graph is a permutation of the ...
*Graph canonization In graph theory, a branch of mathematics, graph canonization is the problem of finding a canonical form of a given graph ''G''. A canonical form is a labeled graph Canon(''G'') that is isomorphic to ''G'', such that every graph that is isomorphic ...
Notes
References
*.
*.
*.
*.
*.
*.
*.
*.
*
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*. English translation in ''Journal of Mathematical Sciences'' 22 (3): 1285–1289, 1983.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*.
*. Full paper in '' Information and Control'' 56 (1–2): 1–20, 1983.
*.
*.
*.
*.
*; also ''Journal of Computer and System Sciences'' 37: 312–323, 1988.
*.
*.
*.
Surveys and monographs
*.
*.
*. (Translated from ''Zapiski Nauchnykh Seminarov Leningradskogo Otdeleniya Matematicheskogo Instituta im. V. A. Steklova AN SSSR'' (Records of Seminars of the ), Vol. 118, pp. 83–158, 1982.)
*. (A brief survey of open questions related to the isomorphism problem for graphs, rings and groups.)
*. (''From the book cover'': The books focuses on the issue of the computational complexity of the problem and presents several recent results that provide a better understanding of the relative position of the problem in the class NP as well as in other complexity classes.)
*. (This 24th edition of the Column discusses the state of the art for the open problems from the book ''Computers and Intractability
''Computers and Intractability: A Guide to the Theory of NP-Completeness'' is a textbook by Michael Garey and David S. Johnson.
It was the first book exclusively on the theory of NP-completeness and computational intractability. The book feature ...
'' and previous columns, in particular, for Graph Isomorphism.)
*.
*.
Software
Graph Isomorphism
review of implementations
The Stony Brook Algorithm Repository
{{Authority control
Graph algorithms
Morphisms
Computational problems in graph theory
Unsolved problems in computer science
Computational complexity theory