<!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>
      <journal-title-group>
        <journal-title>CEUR Workshop Proceedings</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.18287/1613-0073-2016-1638-838-842</article-id>
      <title-group>
        <article-title>A HEURISTIC APPROACH TO THE VERIFICATION OF ISOMORPHIC GRAPHS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>E.F. Sayfullina</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Togliatti State University</institution>
          ,
          <addr-line>Togliatti</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2016</year>
      </pub-date>
      <volume>1638</volume>
      <fpage>838</fpage>
      <lpage>842</lpage>
      <abstract>
        <p>A heuristic approach to the verification of isomorphic graphs is described in this work. The approach is a sequential verification of the graph characteristics which are invariants. The results of computational experiments are described. The aim of experiments is to determine which of the comparative sequences (for graph invariants values) are more efficient for graph isomorphism verification.</p>
      </abstract>
      <kwd-group>
        <kwd>isomorphic graphs</kwd>
        <kwd>invariants</kwd>
        <kwd>heuristic approach</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        An isomorphism between two undirected and unweighted graphs is a bijection
between the vertex sets of these graphs such that two vertices of the first graph are
adjacent if and only if corresponding vertices of the second graph are adjacent [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In case
of isomorphism between two directed or weighted graphs additional restrictions are
imposed on directions and weights of the edges.
      </p>
      <p>
        The graph isomorphism problem is one of computational complexity theory standard
problems belonging to NP, but not known to belong to P (in assumption that P ≠NP).
It’s not known yet whether this problem is belonging to NP-complete [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], but it’s
known that subgraph isomorphism problem is belonging to NP-complete. Thus, the
recent researches for both random and specific graphs are relevant.
      </p>
      <p>
        Graph invariant is any graph property which is equal for isomorphic graphs [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ].
Graph invariant is complete if its value is equal for two graphs if and only if these
graphs are isomorphic. Currently known complete graph invariants are min-code and
max-code code of adjacency matrix obtained by writing out binary adjacency matrix’s
values in place followed by subsequent transfer of the resulting binary number to
decimal form. Man-code corresponds to such order of adjacency matrix’s rows and
columns when the result value is the largest. Currently complete graph invariant
which can be calculated in polynomial time is not known. But it’s not proved that
such invariant does not exist.
The most obvious graph invariants are number of vertices n(G) and number of edges
m(G).
      </p>
      <p>For graph G = (V, E) number of vertices adjacent with vertex v or number of rows
incident with vertex v is called degree s of vertex v. Apparently that for any
isomorphic graphs L and L’ corresponding vertices are having the same degree.
For graph G an arranged system of degrees (s1, s2, …, sn) of its vertices is called
degree sequence s(G). It also called graphic sequence.</p>
      <p>A degree sequence s(G) = (s1, s2, …, sn) produces two more numeric graph invariants:
min(si) and max(si) (i = 1,2,…n). The second one is also called graph degree.</p>
    </sec>
    <sec id="sec-2">
      <title>Description of heuristic approach to the verification of isomorphic graphs and results of computational experiments</title>
      <p>
        This paper examines the following graph invariants [
        <xref ref-type="bibr" rid="ref1 ref3 ref4">1, 3, 4</xref>
        ].
      </p>
      <p>Chromatic number, the smallest number of colors for the vertices in a proper coloring.
Diameter, the longest of the shortest path lengths between pairs of vertices.
Wiener index –    d (vi , v j ), where d(vi, vj) – shortest path between vertices vi and
vj.</p>
      <p>Randic index – r  
(vi ,v j ) d (vi )d (v j )
1</p>
      <p>, where vi and vj are two adjacent vertices,
d(vk) – degree of vertex k.</p>
      <p>Determinant of adjacency matrix.</p>
      <p>Number of connected components.</p>
      <p>Cyclomatic number – minimal number of edges which need to be removed in order to
graph became acyclic. p1(G) = p0(G) + |E(G)| - |V(G)|, where p1(G) – cyclomatic
number, p0(G) – number of connected components, |E(G)| – number of edges, |V(G)| –
number of vertices.</p>
      <p>
        We describe a new graph invariant (property) second-level degree sequence (such
invariant can be described based on more general models [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]). Every element of this
sequence is a list of degrees of the vertices adjacent to the current vertex of graph. It’s
obvious that this property is a graph invariant.
      </p>
      <p>There are two graphs on the pictures below and the values of the invariants for these
graphs (Table 1).</p>
      <p>
        The values of these invariants are equal for Graph1 and Graph2. But these two
graphs have different second-level degree sequences: [[
        <xref ref-type="bibr" rid="ref2 ref3 ref3 ref4 ref5 ref5 ref6">2, 3, 3, 4, 5, 5, 6</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref3 ref4 ref4 ref5 ref7">3, 3, 4, 4,
5, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref2 ref3 ref5 ref6 ref7">2, 3, 5, 6, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref4 ref4 ref5 ref7">3, 4, 4, 5, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref5 ref6 ref7">3, 5, 6, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref3 ref5 ref6">3, 3, 5, 6</xref>
        ], [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5, 6, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref4 ref5 ref7">4, 5, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref4 ref4 ref6">4, 4, 6</xref>
        ],
[
        <xref ref-type="bibr" rid="ref5 ref7">5, 7</xref>
        ]] – for Graph1, and [[
        <xref ref-type="bibr" rid="ref2 ref3 ref3 ref4 ref5 ref5 ref6">2, 3, 3, 4, 5, 5, 6</xref>
        ], [
        <xref ref-type="bibr" rid="ref2 ref3 ref4 ref4 ref5 ref7">2, 3, 4, 4, 5, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref3 ref5 ref6 ref7">3, 3, 5, 6, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref4 ref4 ref5 ref7">3, 4, 4, 5,
7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref5 ref6 ref7">3, 5, 6, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref3 ref3 ref5 ref6">3, 3, 5, 6</xref>
        ], [
        <xref ref-type="bibr" rid="ref4 ref5 ref7">4, 5, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref4 ref5 ref7">4, 5, 7</xref>
        ], [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4, 5, 6</xref>
        ], [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ]] – for Graph2. Thus, it
can be concluded that Graph1 and Graph2 are nonisomorphic.
      </p>
      <p>For graph isomorphism problem (in case of random graph) all know algorithms
ensuring the correct answer are exponential. But for almost every discrete optimization
problem there several different approaches for construction of algorithms that are
solved this problem. Each of these approaches is more effective for specific set of</p>
      <sec id="sec-2-1">
        <title>Number of vertices</title>
      </sec>
      <sec id="sec-2-2">
        <title>Number of edges</title>
      </sec>
      <sec id="sec-2-3">
        <title>Degree sequence</title>
      </sec>
      <sec id="sec-2-4">
        <title>Determinant of adjacency matrix</title>
      </sec>
      <sec id="sec-2-5">
        <title>Number of connected components</title>
      </sec>
      <sec id="sec-2-6">
        <title>Chromatic number</title>
      </sec>
      <sec id="sec-2-7">
        <title>Graph diameter</title>
      </sec>
      <sec id="sec-2-8">
        <title>Wiener index</title>
        <p>
          incoming data. Regarding this statement in 1997 NoFreeLunchTheorem [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] was
formulated and proved. There several different interpretations of this theorem. One of
these interpretations is described below.
There is set of incoming data for the considered discrete optimization problem,
instead of the set of incoming data an algorithm for generation of the incoming data is
often specified. If for some set of incoming data (specified or generated) some
discrete optimization problem solvation algorithm is optimal regarding some criteria (i.e.
execution time), then there is other incoming data set for which this algorithm is not
optimal regarding the same criteria.
During the research algorithms for random generation of graphs were described and
implemented. Based on this algorithms a heuristics approach (depending on a given
generation algorithm) for graph isomorphism problem solvation was described and
implemented.
        </p>
        <p>For computational experiments 1000 algorithms were randomly generated from the
eight graph invariants:
 Chromatic number;
 Determinant of adjacency matrix;
 Graph diameter;
 Number of connected components;
 Cyclomatic number;
 Wiener index;
 Randic index;
 Second-level degree sequence.</p>
        <p>
          For two validated graphs during each of these algorithms the values of these
properties are calculated and then then comparing in particular order. If the value of one of
these invariants is different for the two graphs, then the algorithm is stopped with the
conclusion that these graphs are not isomorphic. If for all eight invariants the value
are equal for two graphs then these graph are expected to be isomorphic.
The Markov chain was used for computational experiments. This chain consists of
five states (probability of each state is 0.2). Each state is one of the following
algorithms for random generation of graphs with given degree sequence.
 Markov chain Monte Carlo (MCMC) algorithm [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]
 A Sequential Importance Sampling Algorithm for Generating Random Graphs with
        </p>
        <p>
          Prescribed Degrees [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]
 Algorithm developed by A. Steger and N. Wormald [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]
 Algorithm for generation of graphs with given degree sequence developed by
author [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]
 Algorithm for generation of graphs with given second-level degree sequence
developed by author [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]
The algorithm of computational experiments is described below.
        </p>
        <p>Input: number of vertices and distribution function of degree sequence.
 Generate degree sequence according to the given distribution function (such as</p>
        <p>
          Binominal distribution, Poison distribution, Zipf distribution).
 Generate initial graph with this degree sequence using Havel-Hakimi criteria [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]
 Generate graph with this degree sequence using the algorithm from the current
state of the Markov chain. 1000 iterations were executed for Markov chain. Om
each iteration one of the 1000 algorithms (one of the 1000 generated sequences of
graph invariants comparison) were executed to validate whether initial graph and
generated graph are isomorphic.
        </p>
        <p>Based on the results of the computational experiment it can be concluded that the
most effective invariants are Wiener index and second-level degree sequence and the
least effective is determinant of adjacency matrix.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>Described approach is one of the possible ways to choose the most efficient from
several algorithms for solving some discrete optimization problem. In this case this
approach was applied for graph isomorphism problem. Moreover, the algorithm is
chosen for the given or generated input data.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ore</surname>
            <given-names>O</given-names>
          </string-name>
          .
          <article-title>Graphs and their application</article-title>
          . Moscow: “URSS”,
          <year>2006</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Gromkovich</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Theoretical computer sciences. Introduction into automata theory, theory of calculability, complexity theory, algorithm theory, randomization, communication and cryptography theory</article-title>
          . Saint Petersburg: “
          <string-name>
            <surname>BKhV-Peterburg</surname>
            <given-names>”</given-names>
          </string-name>
          ,
          <year>2010</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Zykov</surname>
            <given-names>A</given-names>
          </string-name>
          .
          <article-title>Fundamentals of graph theory</article-title>
          . Moscow: “Nauka”,
          <year>1986</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Harary F.
          <article-title>Graph theory</article-title>
          . Moscow: “Mir”,
          <year>1973</year>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Ostroumova L.
          <source>Proceedings of Moscow Institute of Physics and Technology</source>
          ,
          <year>2012</year>
          ;
          <volume>4 N 1</volume>
          (
          <issue>13</issue>
          ):
          <fpage>29</fpage>
          -
          <lpage>40</lpage>
          . [In Russian]
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Wolpert</surname>
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Macready</surname>
            <given-names>W.</given-names>
          </string-name>
          <article-title>No free lunch theorems for optimization</article-title>
          .
          <source>IEEE Transactions on Evolutionary Computation</source>
          ,
          <year>1997</year>
          ;
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <fpage>67</fpage>
          -
          <lpage>82</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Berg</surname>
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Markov Chain</surname>
          </string-name>
          <article-title>Monte Carlo Simulations and Their Statistical Analysis</article-title>
          . Singapore, World Scientific Publ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Blitzstein J. A Sequential Importance</surname>
          </string-name>
          <article-title>Sampling Algorithm for Generating Random Graphs with Prescribed Degrees</article-title>
          . URL : http://statweb.stanford.edu/~cgates/PERSI/papers/ degrees.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Steger</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wormald</surname>
            <given-names>N.</given-names>
          </string-name>
          <article-title>Generating random regular graphs quickly</article-title>
          .
          <source>Combinatorics, Probab. and Comput.</source>
          ,
          <year>1999</year>
          ;
          <volume>8</volume>
          :
          <fpage>377</fpage>
          -
          <lpage>396</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Melnikov</surname>
            <given-names>B</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sayfullina</surname>
            <given-names>E.</given-names>
          </string-name>
          <article-title>Applying multiheuristic approach to randomly generating graphs with a given degree sequence</article-title>
          .
          <source>University proceedings. Volga region. Physical and mathematical sciences. Mathematics</source>
          ,
          <year>2013</year>
          ;
          <volume>3</volume>
          (
          <issue>27</issue>
          ):
          <fpage>69</fpage>
          -
          <lpage>82</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Frank</surname>
            <given-names>H</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hakimi S</surname>
          </string-name>
          . IEEE Transactions on,
          <year>1965</year>
          ;
          <volume>12</volume>
          (
          <issue>3</issue>
          ):
          <fpage>44</fpage>
          -
          <lpage>51</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>