<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Reduction of the Graph Isomorphism Problem to Equality Checking of n-variables Polynomials and the Algorithms that use the Reduction</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexander Prolubnikov</string-name>
          <email>a.v.prolubnikov@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Omsk State University</institution>
          ,
          <addr-line>Omsk, Russian Federation</addr-line>
        </aff>
      </contrib-group>
      <fpage>96</fpage>
      <lpage>108</lpage>
      <abstract>
        <p>The graph isomorphism problem is considered. We assign modi ed characteristic polynomials for graphs and reduce the graph isomorphism problem to the following one. It is required to nd out, is there such an enumeration of the graphs vertices that the polynomials of the graphs are equal. We present algorithms that use the redution and we show that we may check equality of the graphs polynomials values at speci ed points without direct evaluation of the values. We give justi cation of the algorithms and give the scheme of its numerical realization. The example of the approach implementation and the results of computational experiments are presented.</p>
      </abstract>
      <kwd-group>
        <kwd>graph isomorphism</kwd>
        <kwd>complete invariant</kwd>
        <kwd>computational complexity</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>(A(G))ij =
{ 1; if (i; j) 2 E(G);</p>
      <p>0; else:
Let A(G) and A(H) be adjacency matrices of the graphs G and H. Then</p>
      <p>G ≃ H , 9φ 2 Sn : A(H) = PφA(G)Pφ⊤;
Copyright ⃝c by the paper's authors. Copying permitted for private and academic purposes.
In: A. Kononov et al. (eds.): DOOR 2016, Vladivostok, Russia, published at http://ceur-ws.org
where Sn is a symmetric group on [n] and
(Pφ)ij =
{ 1; if i = φ(j);</p>
      <p>0; else:
By this formulation of the problem, the two graphs are isomorphic if and only if we
can obtain adjacency matrix of the rst graph from adjacency matrix of the second
one by some permutation of its rows and columns.</p>
      <p>GI is one of the fundamental problems of discrete mathematics and there are
numerous applications where it arises. For example, without solving GI, we cannot practically
solve the following problem. In the problem we need to nd an n-vertices graph that
has some speci ed property. We may search the graph doing the exhaustive search on
all labelled n-vertices graphs. But, since there are n! of isomorphic labelled graphs, we
must check the property only for nonisomorphic labeled graphs during this search. For
this purpose, we need to efficiently solve GI. Else our memory expenses would be too
high.</p>
      <p>GI belongs to N P class since it takes O(n2) time to check whether some bijection of
V (G) onto V (H) is an isomorphism. It is not proved that the problem is N P -complete
and there is no any polynomial algorithm has been obtained for the general case of the
problem.</p>
      <p>GI is solvable in polynomial time for some classes of graphs: for trees [1], for graphs
with bounded genus [2], for graphs with bounded multiplicity of their adjacency matrix
eigenvalues [3], for graphs with bounded degree of their vertices [4] and for some other
restricted classes of graphs. The more regular structure of the graphs, the harder to
obtain solution of GI for them. Such classes as regular graphs, strongly regular graphs,
isoregular graphs give the instances of GI that cannot be solved in polynomial time by
existing algorithms.</p>
      <p>For GI, the designed algorithms may be divided in two classes. The rst class
algorithms are designed to solve GI for some restricted cases and the second class
algorithms are designed to solve the problem for the general case. The examples of
the algorithms which belongs to the rst class are the algorithms that solve GI for
the mentioned above classes of graphs. The Ullman algorithm [5], the Schmidt-Druffel
algorithm [6], B. McKay's NAUTY algorithm [7] belong to the second class of the
algorithms. These algorithms are called practical, since they are exponential in the
worst case but they are effective for most of the input graphs.</p>
      <p>It stated in [8] that GI may be solved in quasipolynomial time. It is in the process
of proof-checking by other mathematicians at the moment when this paper is written.</p>
      <p>To solve GI, the algorithms checks graph invariants during their implementation.
Graph invariants are properties of graphs which are invariant under graph
isomorphisms, i.e., graph invariant is a function f such that f (G) = f (H) if G ≃ H. The
examples of graph invariants are such graph properties as connectivity, genus, degree
sequence, the characteristic polynomial of adjacency matrix, its spectrum. A graph
invariant f (G) is called complete if the equality f (G) = f (H) implies that G ≃ H. Let
us consider some of the well-known graph invariants.</p>
      <p>The Weisfeiler-Lehman method is an example of the approach to check invariant
characteristics of graphs. Applying this method, we perform iterative classi cation of
graphs vertices. As a result, we have such colourings of vertices that we may use it to
distinguish non-isomorphic graphs. Using this method, we can solve GI for large class
of graphs in polynomial time. But it is shown [9] that there exists such pairs of
nonisomorphic graphs on n vertices that they are cannot be distinguished by k-dimensional
Weisfeiler-Lehman algorithm in polynomial time for k = Ω(n). This implies that, for
the general case, this method not solve GI in polynomial time.</p>
      <p>The procedures of graph canonization give complete graph invariants. For a graph
G, using some procedure of graph canonization, we obtain its canonical form that is
some labeled graph. Two graphs are isomorphic if and only if they have the same
canonical form. Using canonical form of the graph, we may compute its canonical
code. Canonical code c(G) of a graph G is a bit string such that G ≃ H if and only if
c(G) = c(H). The example of a canonical code is the code c0(G):</p>
      <p>
        c0(G) = m2aSxnf(A) (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )jj(A) (
        <xref ref-type="bibr" rid="ref2">2</xref>
        )jj : : : jj(A) (n)g;
where \jj" denotes concatenation of bit strings and (A)i denotes the i-th row of the
adjacency matrix A(G). For some classes of graphs, canonical codes may be computed in
polynomial time [1], [10]. Every complete invariant gives a way for graph canonization.
      </p>
      <p>In [11], complete invariant for hypergraphs is presented. This complete invariant is
not a result of canonization. For the case of simple graphs, this invariant is a system of
n2 + 1 polynomials over a eld of characteristic q, where q is a prime number or zero.</p>
      <p>In our work, we assign modi ed characteristic polynomials for graphs and reduce the
graph isomorphism problem to the following one. It is required to nd out, is there such
an enumeration of the graphs vertices that the modi ed characteristic polynomials of
the graphs are equal. The modi ed characteristic polynomial of a graph is not a graph
invariant in the sense of its immutability to different enumerations of the graph vertices.
But the polynomial is complete invariant of a graph in the sense that there is no such
enumeration that gives equal polynomials for non-isomorphic graphs.</p>
      <p>In addition to the reduction and the theoretical algorithm that we have presented in
[12], using the same approach, we present the practical algorithms for GI in this work.
These algorithms not check equality of the graphs polynomials by checking equality of
their coefficients but they check equality of the polynomials values in randomly taken
points. We give justi cation of the algorithms and give the scheme of its numerical
realization. The example of the approach implementation and the results of computational
experiments are presented.
2</p>
      <p>The modi ed characteristic polynomial of a graph
Let us consider the characteristic polynomial of a graph and some of its modi cations
which have been used for characterization of graphs by their structural properties. The
characteristic polynomial of a graph G is the polynomial</p>
      <p>G(x) = det(A(G)
xE);
where x is a variable and E is the identity matrix. Let D(G) = diag(d1; : : : ; dn) be a
diagonal matrix, where di is a degree of vertex i 2 V (G).</p>
      <p>Some modi cations of the characteristic polynomial are considered in [13]. The
examples are the graph Laplacian L(G) that is de ned as
the signless graph Laplacian jL(G)j that is de ned as</p>
      <p>L(G) = D(G)</p>
      <p>A(G);
jL(G)j = D(G) + A(G);
and some other modi cations which may be generalized by the polynomial G(x; y):
G(x; y) = det(xE
(A(G)
yD(G))):</p>
      <p>Seidel polynomial [14] is another modi cation of the characteristic polynomial that
is obtained by modi cation of a graph adjacency matrix. It is the polynomial G(x):
G(x) = det(xE
(F</p>
      <p>E
2A(G)));
where (F )ij = 1 for i; j = 1; n.</p>
      <p>A generalization of the characteristic polynomial is the polynomial that is presented
in [15]. It is a polynomial G(x; y; ) of the form</p>
      <p>G(x; y; ) = det(A(x; y)</p>
      <p>E);
where A(x; y) is the matrix, derived from A, in which the 1s are replaced by variable
x and 0s (other than the diagonals) are replaced by variable y.</p>
      <p>None of the presented above modi cations of the characteristic polynomial is a
complete graph invariant.</p>
      <p>The modi ed characteristic polynomial of a graph. Variables of the polynomials above
have no connection with graph vertices. We modify the characteristic polynomial G(x)
of a graph G on n vertices assigning variable xi to i 2 V (G). Let x1; : : : ; xn be
independent variables and let X = diag(x1; : : : ; xn).</p>
      <p>
        De nition 1. For a graph G, jV (G)j = n, G(x1; : : : ; xn) is a polynomial of the form
G(x1; : : : ; xn) = det(A(G) + X):
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
      </p>
      <p>
        For graphs on n = 1; 2; 3 vertices, the polynomials of the form (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) are the following
ones:
1) n = 1: x1;
2) n = 2: x1x2, x1x2 1;
3) n = 3: x1x2x3, x1x2x3 x1, x1x2x3 x1 x3, x1x2x3 x1 x2 x3 + 2.
It is clear that we have different polynomials for non-isomorphi graphs no matter what
enumeration of its vertices we use for n = 1; 2; 3.
      </p>
      <p>
        For a subset c of V (G), let xc be a product of the form ∏i2c xi and A(G)c be a
determinant of the submatrix of A(G) that is obtained by deleting of the rows and
columns of A(G) where numbers are belong to the subset c. A(G)c is the coefficient of
∏i2c xi in the polynomial G(x1; : : : ; xn). Having c and φ 2 Sn, let φ(c) be the image
of c: φ(c) = fφ(i) j i 2 cg. For x = (x1; : : : ; xn), xφ = (xφ(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); : : : ; xφ(n)). The following
theorem holds.
for all x 2 Rn.
      </p>
      <p>Theorem 1. G ≃ H and φ : V (G) ! V (H) is an isomorphism of the graphs if and only
if</p>
      <p>
        G(x1; : : : ; xn) = H(xφ(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); : : : ; xφ(n)):
The polynomials G and H are equal if the coefficient of xc is equal to the coefficient
of xφ(c) for every subset c of V (G). Thus, the equality (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) holds if and only if A(G)c =
A(H)φ(c) for all subsets c of V (G). Let us prove the Theorem 1.
      </p>
      <p>
        Proof. If G ≃ H and φ is an isomorphism of the graphs, then (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) holds since
      </p>
      <p>A(H) = PφA(G)Pφ⊤;
and the coefficients of G and H, corresponded by φ, are equal to each other.</p>
      <p>
        Let us show that if the equality (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) holds, then G ≃ H and φ is an isomorphism of
the graphs. Let us denote A(G) as A = (aij) and B(G) as B = (bij).
      </p>
      <p>
        If (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) holds, then the coefficient of xc is equal to the coefficient of xφ(c) for all
subsets c of V (G). Thus, if we take c such that c = V (G) n fi; jg for some pair
( 0 aij)
of vertices i; j 2 V (G), we have Ac = Bφ(c). This is equivalent to det
=
det (bφ(i0)φ(j) bφ(i0)φ(j)) : So aij = bφ(i)φ(j) and (i; j) 2 E(G) if and only if (φ(i); φ(j)) 2
V (H), i.e., G ≃ H and φ is an isomorphism of the graphs.
aij 0
Remark 1. To check the equality (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) for some φ, it suffice to check equality of the
coefficients that correspond to c such that jcj = n 2. Since if Ac = Bφ(c) for such c,
then A(H) may be obtained from A(G) by permutation of its rows and columns. And,
since the equality (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) holds, then Ac = Bφ(c) for all subsets c of V (G).
3
      </p>
      <p>
        The algorithms for GI that check equality of the values of
the modi ed characteristic polynomials at the speci ed
points
To check wether the two given graphs G and H are isomorphic, we try to nd φ such
that the equality (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) holds. If such φ exists, then the graphs are isomorphic, else they
are not isomorphic.
      </p>
      <p>
        The equality checking of coefficients of two polynomials of the form (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) may be
performed as it is presented in [12]. But if we check equality of the polynomials this
way, we need exponential time since G(x1; : : : ; xn) has 2n coefficients. Such algorithm
has an exponential complexity no matter what instance of GI it solves. The algorithms
we present below solve GI by comparing of the values that the modi ed characteristic
polynomials take on the speci ed points of Rn. This approach make possible to
significantly reduce the time that is needed to solve GI instance checking equality of the
modi ed characteristic polynomials of graphs. We present two heuristic algorithms to
implement the approach: the Direct algorithm for GI and its recursive modi cation.
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
      </p>
      <p>
        The Direct algorithm for GI
Let N 2 N, S = fk=10N j 0 &lt; k &lt; 10N ; k 2 Z+g, S (0; 1). For i = 1; n, let "i be selected
at random independently and uniformly from S. Let "(i) be the following points of Rn:
"(0) := 0, "(i) := "(i 1) + "iei, i = 1; : : : ; n. I.e., "(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) = ("1; 0; : : : ; 0), "(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) = ("1; "2; : : : ; 0),
: : :, "(n) = ("1; "2; : : : ; "n).
      </p>
      <p>In the course of implemetation of the algorithms we present below, we trying to set
a bijection φ : V (G) ! V (H) such that G("(i)) = H ("(φi)). On the i-th iteration of the
Direct algorithm, we searching for such j 2 V (H) that
If we can set such φ for the graphs G and H during iterations of the algorithm, we make
a conclusion that the graphs are isomorphic and φ is an isomorphism of the graphs,
else we make a conclusion that they are not isomorphic.</p>
      <p>The Direct algorithm for GI is named below as Algorithm 1. It is a test for
isomorphism that may be mistaken for some instances of GI. For any test for
isomorphism, there are two kinds of mistakes it can make: 1) wrong conclusion that G ≃ H,
when G ̸≃ H, 2) wrong conclusion that G ̸≃ H, when G ≃ H. As it shall be stated
below, the probability of a mistake of the rst kind may be considered as negligible for
the Direct algorithm. The algorithm solves the GI instances that presented in [16] but
it makes a mistake of the second kind for GI instances obtained for strongly-regular
graphs from [17] when n 13.</p>
      <p>Algorithm 1 (G; H)
1 J V (H);
2 for i 1 to n
3 choose at random "i 2 S;
4 if (9j 2 J : G("(i)) = H ("(φi 1) + "iej ))
5 φ(i) j;
6 J J nfjg;
7 else print "G ̸≃ H".
8 print "G ≃ H, φ is an isomorphism of G and H".
3.2</p>
      <p>Recursive modi cation of the Direct algorithm for GI
Algorithm 2 we present below is a recursive modi cation of the Direct algorithm for
GI. In addition to the GI instances that presented in [16], in a reasonable time, it
solves the GI instances obtained for strongly-regular graphs from [17] (n 64).
true;
k, where k such that J = fkg;</p>
      <p>
        The recursive procedure Set the correspondence gets on input i 2 V (G) and
set φ(i) j for j 2 J V (H) such that (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) holds. If there is no such j 2 J , then we
modify the correspondence that was already setted up for i 1: we use the next element
of J for setting φ(i 1).
      </p>
      <p>The probability of mistake. Let P[ ] denote a probability of the event that we specify
in square brackets. The following theorem [18, ?] is known:
Theorem 2. Let f 2 F [x1; : : : ; xn] be a non-zero polynomial of total degree d 0
over a eld F . Let S be a nite subset of F and let "1; : : : ; "n be selected at random
independently and uniformly from S. Then</p>
      <p>P[f ("1; : : : ; "n) = 0]
d
jSj
:
If we have set up φ for every i = 1; : : : ; n, then
Let
G("1; : : : ; "n) =</p>
      <p>
        H ("φ(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); : : : ; "φ(n)).
f ("1; : : : ; "n) = G("1; : : : ; "n)
      </p>
      <p>
        H ("φ(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); : : : ; "φ(n)):
Total degree d of the polynomial f is equal to n, and F = R in this case. So,
implementing Algorithm 1 or Algorithm 2, if we obtain a message that G ≃ H and φ is an
isomorphism of the graphs, we have G ̸= H with the probability P[mistake] n=10N :
If we set N = n, then P[mistake] 1=10n lg n and the message is correct with
probability no less than 1 1=10n lg n. For the Direct algorithm, the message that the graphs are
not isomorphic may be incorrect. The message is always correct for its recursive
modication since in this case there is no such φ that (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) holds successively for i = 1; : : : ; n.
By the Theorem 1, it follows that the graphs are not isomorphic.
4
      </p>
      <p>
        The numerical realization of the algorithms
and their computational complexity
Modi cations of adjacency matrices. Let d be the maximum degree of vertices of G and
H: d = maxfd1; : : : ; dng (we suppose that G and H have the same degree sequences).
Let A and B be modi ed graph adjacency matrices of the following form
A := A(G) + 2dE; B := A(H) + 2dE:
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
A(H) = PφA(G)Pφ⊤ for some bijection φ if and only if A = PφBPφ⊤. If d &gt; 0, then A
and B have the strong diagonal predominance:
so
(A)ii = 2d
2di &gt; di =
n
∑(A)ij ;
j=1
j̸=i
(A)ii
n
∑(A)ij &gt; 0;
j=1
j̸=i
i = 1; n. Thus, the matrices of the form (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) satisfy the Hadamard conditions, and we
have det A ̸= 0, det B ̸= 0 [20]. For numerical realization of the algorithms that we have
presented, we use modi ed characteristic polynomials of the following form:
G(x1; : : : ; xn) = det(A + X);
      </p>
      <p>
        H (xφ(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); : : : ; xφ(n)) = det(B + Xφ);
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        )
where Xφ = PφXPφ⊤. This modi cation is equivalent to the change of variables: xi !
xi + 2d.
      </p>
      <p>We may consider the presented algorithms as a try to perform series of consistent
modi cations of the matrices A and B:</p>
      <p>
        A(i) := A(i 1) + "iEi; B(i) := B(i 1) + "iEj ;
where A(0) = A; B(0) = B, i = 1; : : : ; n. We call the modi cations of the form (
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
consistent, if we successively choose, for every i 2 V (G), such j 2 V (H) that holds
((A(i)) 1)ii =
      </p>
      <p>A(ii)</p>
      <p>
        f g (B(i 1) + "iEj )fjg = ((B(i 1) + "iEj ) 1)jj ;
det A(i) = det(B(i 1) + "iEj )
(
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
(
        <xref ref-type="bibr" rid="ref8">8</xref>
        )
where Ei is n n-matrix such that all of its elements are zeros except the i-th diagonal
element, which is equal to 1. It follows from (
        <xref ref-type="bibr" rid="ref8">8</xref>
        ) that
since the equality (
        <xref ref-type="bibr" rid="ref8">8</xref>
        ) is equivalent to the equality
And, since the values Gnfig("(i)) and Hnfjg("(φi 1) + "iej ) not change when the value of
"i is changing, if the equality (
        <xref ref-type="bibr" rid="ref10">10</xref>
        ) holds for "i = 0 and for some non-zero value of "i, then
the equality (
        <xref ref-type="bibr" rid="ref9">9</xref>
        ) holds too. Thus, if we can perform series of consistent modi cations for
i = 1; : : : ; n, then the values of the polynomials of the graphs are equal at the speci ed
points "(i). As a result, we solve GI by using series of consistent modi cations of graphs
adjacency matrices. This idea belongs to R.T. Faizullin. It was presented in [21].
Accuracy of computations and computational complexity. We compute the values of
((A(i)) 1)ii by solving the system of linear equations A(i)y = ei. The value of ((A(i)) 1)ii
is the i-th component of y. In order to solve the systems of linear equations, we may
use such iterative methods as the Gauss-Seidel method or the simple iteration method.
These methods converge at the rate of geometric progression for any starting vector
because the systems matrices have the diagonal predominance. Using the standard
numeric type double, we can solve instances of GI that was mentioned above choosing
"i 2 [ ; 1), 0:001. The computational complexity of the Direct algorithm is equal to
O(n4k), where k is a number of iterations of the method we use to solve the systems
of linear equations. In our computational experiments, we choosed k = 10. Recursive
modi cation of the Direct algorithm is exponential in the worst case.
5
      </p>
      <p>Eliminating regularities of graphs
and reducing the exhaustive search
The Algorithm 2 scheme differs from the scheme of exhaustive search on all bijections
of V (G) onto V (H) only in step 8 of the procedure Set the correspondence that
it use. Here, in addition to check whether current j 2 V (H) is not already setted up
as an image for some vertex in V (G) with label less than i, we check equality of the
polynomials values in prede ned points "(i) and "(φi). The algorithm of the same form
may be obtained for numerous graph invariant characteristics. For example, we may
check the equality of adjacency matrices of the induced subgraphs on i vertices for
both input graphs. These subgraphs include the vertices for which the correspondence
is setted up and all of the edges whose endpoints are these vertices. We check the
equality of the subgraphs adjacency matrices after enumerating vertices of the induced
subgraph of H in according to φ that is setted up for vertices from V (G) with labels
less or equal than i.</p>
      <p>The graph G has more regular structure if it has more symmetries, i.e., if there
are such bijections of V (G) onto V (G) which are isomorphisms of G onto itself (graph
automorphisms).
De nition 2. The graph G automorphism group is a set of isomorphisms of the graphs
onto itself, i.e.,</p>
      <p>Aut(G) = f 2 Sn j aij = a (i) (j); i; j = 1; ng:
De nition 3. The orbit of the vertex i 2 V (G) is the set</p>
      <p>Oi(G) = f (i) j
2 Aut(G)g:
The considered scheme of the algorithm for GI (exhaustive search on all bijections that
is reduced by equlity checking of some invariant characteristics for the input graphs)
may be modi ed to be efficient for some restricted classes of graphs, or, using some
invariant characteristics, we may obtain some partitions of the graphs vertices that we
may use to reduce the exhaustive search, but the main problem stays the same for
every algorithm for GI of that sort: the more cardinalities of Aut(G) and Aut(H) and
the weaker the graph invariant (i.e., it's more easy to nd two non-isomorphic graphs
for which the values of the invariant are the same) that we use to check at step 8 of the
procedure Set the correspondence, the more alternatives for setting of φ we shall
obtain in the course of its implementation, and it is more hard to nd among them
such a bijection that is an isomorphism or to nd out that there is no isomorphism for
input graphs. Conversely, the graphs with less regular structure, such as, e.g., random
graphs, give GI instances that are easy to solve using known algorithms since they
have automorphism groups of low cardinalities.</p>
      <p>The following lemma shows that, solving GI for the graphs G and H, we may have
alternative variants for setting isomorphism of the graphs only if we have such i 2 V (G)
that jOi(G)j &gt; 1.</p>
      <p>Lemma 1. Let G ≃ H, i1; i2 2 V (H). i1 2 Oi2 (H) if and only if there exists a vertex
j 2 V (G) and such isomorphisms φ1; φ2 : V (G) ! V (H) that φ1(j) = i1, φ2(j) = i2.
Proof. Let i1 2 Oi2 (H). It follows that there is 2 Aut(G) such that (i1) = i2. Let φ1
be an isomorphism of G onto H and let j = φ1 1(i1), j 2 V (H). Let φ2 = ◦ φ1. We
have φ2(j) = ( ◦ φ1)(j) = (i1) = i2 and φ2 is an isomorphism of G onto H. Conversely,
suppose there are such i1; i2 2 V (H), j 2 V (G) and isomorphisms φ1, φ2 that φ1(j) = i1,
φ2(j) = i2. Then = φ2 ◦φ1 1 2 Aut(H) and (j) = i2, i.e., i1 2 Oi2 (H).</p>
      <p>
        In the course of the transformations (
        <xref ref-type="bibr" rid="ref7">7</xref>
        ), we subsequently obtain the graphs with
less regular structure than the input graphs have. The matrices A(i) and B(i) in (
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
may be considered as adjacency matrices of the graphs G(i) and H(i). These graphs
has weighted loops, i.e., edges of the form (j; j) 2 E(G). After the i-th iteration of the
algorithm, we have (i) ̸= j for all 2 Aut(G(i)) since the i-th and the j-th diagonal
elements of A(G(i)) are not equal to each other with probability that negligibly close to
1 for all j 2 V (G), i ̸= j. So we have jOi(G(i))j = 1. And, in accordance with the Lemma
above, we have no more than one way to set the value of φ(i) on the i-th iteration of
the algorithm. Performing transformations (
        <xref ref-type="bibr" rid="ref7">7</xref>
        ) and selecting unique values of the loops
weights "i, we subsequently obtain such G(i) and H(i) that
jOj (G(i))j = 1; j
i;
jAut(G(i+1))j
jAut(G(i 1))j;
and nally we get
jOφ(j)(H(i))j = 1; j
i;
jAut(H(i))j
jAut(H(i 1))j
jOj (G(t))j = jOφ(j)(H(t))j = 1; j = 1; n;
jAut(G(t))j = jAut(H(t))j = 1
for t n 1.
      </p>
      <p>Let us consider an example of the algorithm operating that illustrates this reasoning.
Let G and H be the input graphs shown on a picture below.</p>
      <p>
        Reduction of the number of variants to set φ is shown in table 1. After the 4-th
iteration, we have jAut(G(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ))j = 1. In the table 2, the values of ((A(i)) 1)jj are shown.
For all i = 1; n, if the value of φ(i) is setted up, then the multisets f((B(i)) 1)jj gjn=1 and
f((A(i)) 1)jj gjn=1 are equal. To compute these values, we perform 10 iterations of the
Gauss-Seidel method in order to solve the systems of equations of the form A(i)y = ei.
The initial approximation that we use is y(0) = (1; : : : ; 1).
In our work, we assign modi ed characteristic polynomials for graphs and reduce the
graph isomorphism problem to the following one. It is required to nd out, is there such
an enumeration of the graphs vertices that the modi ed characteristic polynomials of
the graphs are equal. The modi ed characteristic polynomial of a graph on n vertices
is a polynomial of n variables. We prove that two graphs are isomorphic if and only
if there is exists an enumeration of the graphs vertices such that the polynomials
of the graphs are equal. We present algorithms for the graph isomorphism problem
that use the redution. The algorithms check equality of the graphs polynomials values
at speci ed points without direct evaluation of the values. We give justi cation of
the algorithms and give the scheme of its numerical realization. The example of the
approach implementation and the results of computational experiments are presented.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Lindell</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>A logspace algorithm for tree canonization</article-title>
          .
          <source>Proc. of the 24th Annual ACM Symposium on the Theory of Computing</source>
          .
          <volume>400</volume>
          {
          <issue>404</issue>
          (
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Filotti</surname>
            ,
            <given-names>I.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mayer</surname>
            ,
            <given-names>J.N.:</given-names>
          </string-name>
          <article-title>A polynomial-time algorithm for determining the isomorphism of graphs of xed genus</article-title>
          .
          <source>Proc. of the 12th Annual ACM Symposium on Theory of Computing</source>
          .
          <volume>236</volume>
          {
          <issue>243</issue>
          (
          <year>1980</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Babai</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grigoryev</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
          </string-name>
          .,
          <string-name>
            <surname>Mount</surname>
            ,
            <given-names>D.M.:</given-names>
          </string-name>
          <article-title>Isomorphism of graphs with bounded eigenvalue multiplicity</article-title>
          .
          <source>Proc. of the 14-th Annual ACM Symposium on Theory of Computing</source>
          .
          <volume>310</volume>
          -
          <fpage>324</fpage>
          (
          <year>1982</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Luks</surname>
            ,
            <given-names>E.M.:</given-names>
          </string-name>
          <article-title>Isomorphism of graphs of bounded valence can be tested in polynomial time</article-title>
          .
          <source>Journal of Computer and System Sciences</source>
          .
          <volume>25</volume>
          .
          <fpage>42</fpage>
          -
          <lpage>65</lpage>
          (
          <year>1982</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ullman</surname>
            ,
            <given-names>J.R.:</given-names>
          </string-name>
          <article-title>An algorithm for subgraph isomorphism</article-title>
          .
          <source>Journal of the ACM</source>
          .
          <volume>23</volume>
          . 31{
          <issue>42</issue>
          (
          <year>1976</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>D.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Druffel</surname>
            ,
            <given-names>L.E.</given-names>
          </string-name>
          :
          <article-title>A fast backtracking algorithm to test directed graphs for isomorphism using distance matrices</article-title>
          .
          <source>Journal of the ACM</source>
          .
          <volume>23</volume>
          (
          <issue>3</issue>
          ).
          <volume>433</volume>
          {
          <issue>445</issue>
          (
          <year>1978</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>McKay</surname>
            ,
            <given-names>B.D.</given-names>
          </string-name>
          :
          <article-title>Practical graph isomorphism</article-title>
          .
          <source>Congr. Numer</source>
          .
          <volume>30</volume>
          . 45{
          <issue>87</issue>
          (
          <year>1981</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Babai</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Graph Isomorphism in Quasipolynomial Time</article-title>
          . https://arxiv.org/abs/1512.03547
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Cai</surname>
            ,
            <given-names>J-Y.</given-names>
          </string-name>
          , Furer,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Immerman</surname>
          </string-name>
          ,
          <string-name>
            <surname>N.:</surname>
          </string-name>
          <article-title>An optimal lower bound on the number of variables for graph identi cation</article-title>
          .
          <source>Combinatorica</source>
          .
          <volume>12</volume>
          (
          <issue>4</issue>
          ).
          <volume>389</volume>
          {
          <issue>410</issue>
          (
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Datta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Limaye</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nimbhorkar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thierauf</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Planar graph isomorphism is in log-space</article-title>
          .
          <source>24th Annual IEEE Conference on Computational Complexity</source>
          . Paris, France.
          <volume>203</volume>
          {
          <issue>214</issue>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Grigoriev</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
          </string-name>
          .:
          <article-title>Two Reductions of graph isomorphism problem for polynomials</article-title>
          .
          <source>J. Soviet Math. 20. 2296{2298</source>
          (
          <year>1982</year>
          )
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Prolubnikov</surname>
            ,
            <given-names>A.V.</given-names>
          </string-name>
          :
          <article-title>Reduction of the graph isomorphism problem to equality checking of polynomials of n-variables</article-title>
          .
          <source>Trudy Instituta Matematiki i Mekhaniki</source>
          ,
          <article-title>Ekaterinburg: IMM of Ural Department of Russian Academy of Sciences</article-title>
          .
          <volume>22</volume>
          (
          <issue>1</issue>
          ).
          <volume>235</volume>
          {
          <issue>240</issue>
          (
          <year>2016</year>
          )
          <article-title>(In Russ</article-title>
          .)
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Cvetkovic</surname>
            ,
            <given-names>D.M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doob</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sachs</surname>
          </string-name>
          , H.:
          <article-title>Spectra of Graphs</article-title>
          . Academic Press, New York (
          <year>1980</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Seidel</surname>
            ,
            <given-names>J.J.:</given-names>
          </string-name>
          <article-title>Strongly regular graphs with (-1,1,0) adjacency matrix having eigenvalue 3</article-title>
          .
          <string-name>
            <surname>Lin</surname>
          </string-name>
          .
          <source>Alg. Appl</source>
          .
          <volume>1</volume>
          (
          <issue>2</issue>
          ).
          <volume>281</volume>
          {
          <issue>298</issue>
          (
          <year>1968</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Lipton</surname>
            ,
            <given-names>R.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vishnoi</surname>
            ,
            <given-names>N.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zalcstein</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>A generalization of the characteristic polynomial of a graph</article-title>
          .
          <source>CC Technical Report, GIT-CC-03-51</source>
          .
          <year>2003</year>
          . https://smartech.gatech.edu/bitstream/handle/1853/6511/GIT-CC-
          <volume>03</volume>
          -51.pdf
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Foggia</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sansone</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vento</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A database of graphs for isomorphism and sub-graph isomorphism benchmarking</article-title>
          .
          <source>Proc. of the 3rd IAPR TC-15 international workshop on graphbased representations</source>
          .
          <volume>157</volume>
          {
          <issue>168</issue>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <article-title>Strongly regular graphs on at most 64 vertices</article-title>
          . http://www.maths.gla.ac.uk/ es/srgraphs.php
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Schwartz</surname>
          </string-name>
          , J.:
          <article-title>Fast probabilistic algorithms for veri cation of polynomial identities</article-title>
          .
          <source>Journal of the ACM</source>
          .
          <volume>27</volume>
          . 701{
          <issue>717</issue>
          (
          <year>1980</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Zippel</surname>
          </string-name>
          , R.:
          <article-title>Probabilistic algorithms for sparse polynomials</article-title>
          .
          <source>Proc. of the International Symposium on Symbolic and Algebraic Computation</source>
          .
          <volume>216</volume>
          {
          <issue>226</issue>
          (
          <year>1979</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Gantmaher</surname>
            ,
            <given-names>F.R.</given-names>
          </string-name>
          :
          <article-title>Teoria matriz</article-title>
          . Moskva: Izd-vo
          <string-name>
            <surname>Nauka</surname>
          </string-name>
          (
          <year>1967</year>
          )
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Faizullin</surname>
          </string-name>
          , R.T.,
          <string-name>
            <surname>Prolubnikov</surname>
            ,
            <given-names>A.V.</given-names>
          </string-name>
          :
          <article-title>An algorithm of the spectral splitting for the double permutation cipher</article-title>
          .
          <source>Pattern Recognition and Image Analysis</source>
          .
          <volume>12</volume>
          (
          <issue>4</issue>
          ).
          <volume>365</volume>
          {
          <issue>375</issue>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>