damecco.tex
author Alpar Juttner <alpar@cs.elte.hu>
Wed, 30 Nov 2016 22:45:35 +0100
changeset 24 bdf97dafabfb
parent 23 b098561f70fe
child 25 217340b8dec7
child 26 42fbe17f0e3b
permissions -rw-r--r--
New title and abstract
alpar@0
     1
%% 
alpar@0
     2
%% Copyright 2007, 2008, 2009 Elsevier Ltd
alpar@0
     3
%% 
alpar@0
     4
%% This file is part of the 'Elsarticle Bundle'.
alpar@0
     5
%% ---------------------------------------------
alpar@0
     6
%% 
alpar@0
     7
%% It may be distributed under the conditions of the LaTeX Project Public
alpar@0
     8
%% License, either version 1.2 of this license or (at your option) any
alpar@0
     9
%% later version.  The latest version of this license is in
alpar@0
    10
%%    http://www.latex-project.org/lppl.txt
alpar@0
    11
%% and version 1.2 or later is part of all distributions of LaTeX
alpar@0
    12
%% version 1999/12/01 or later.
alpar@0
    13
%% 
alpar@0
    14
%% The list of all files belonging to the 'Elsarticle Bundle' is
alpar@0
    15
%% given in the file `manifest.txt'.
alpar@0
    16
%% 
alpar@0
    17
alpar@0
    18
%% Template article for Elsevier's document class `elsarticle'
alpar@0
    19
%% with numbered style bibliographic references
alpar@0
    20
%% SP 2008/03/01
alpar@0
    21
alpar@0
    22
\documentclass[preprint,12pt]{elsarticle}
alpar@0
    23
alpar@0
    24
%% Use the option review to obtain double line spacing
alpar@0
    25
%% \documentclass[authoryear,preprint,review,12pt]{elsarticle}
alpar@0
    26
alpar@0
    27
%% Use the options 1p,twocolumn; 3p; 3p,twocolumn; 5p; or 5p,twocolumn
alpar@0
    28
%% for a journal layout:
alpar@0
    29
%% \documentclass[final,1p,times]{elsarticle}
alpar@0
    30
%% \documentclass[final,1p,times,twocolumn]{elsarticle}
alpar@0
    31
%% \documentclass[final,3p,times]{elsarticle}
alpar@0
    32
%% \documentclass[final,3p,times,twocolumn]{elsarticle}
alpar@0
    33
%% \documentclass[final,5p,times]{elsarticle}
alpar@0
    34
%% \documentclass[final,5p,times,twocolumn]{elsarticle}
alpar@0
    35
alpar@0
    36
%% For including figures, graphicx.sty has been loaded in
alpar@0
    37
%% elsarticle.cls. If you prefer to use the old commands
alpar@0
    38
%% please give \usepackage{epsfig}
alpar@0
    39
alpar@0
    40
%% The amssymb package provides various useful mathematical symbols
alpar@0
    41
\usepackage{amssymb}
alpar@0
    42
%% The amsthm package provides extended theorem environments
alpar@0
    43
%% \usepackage{amsthm}
alpar@0
    44
alpar@0
    45
%% The lineno packages adds line numbers. Start line numbering with
alpar@0
    46
%% \begin{linenumbers}, end it with \end{linenumbers}. Or switch it on
alpar@0
    47
%% for the whole article with \linenumbers.
alpar@0
    48
%% \usepackage{lineno}
alpar@0
    49
alpar@2
    50
\usepackage{amsmath}
alpar@2
    51
%% \usepackage[pdftex]{graphicx}
alpar@2
    52
alpar@2
    53
\usepackage{pgfplots}
alpar@2
    54
\pgfplotsset{width=9cm}
alpar@2
    55
\pgfplotsset{compat=1.8}
alpar@2
    56
alpar@2
    57
\usepackage{caption}
alpar@2
    58
\usepackage{subcaption} 
alpar@2
    59
alpar@2
    60
\usepackage{algorithm}
alpar@2
    61
\usepackage{algpseudocode}
alpar@2
    62
\usepackage{tikz}
alpar@2
    63
alpar@2
    64
\usepackage{amsthm,amssymb}
alpar@2
    65
\renewcommand{\qedsymbol}{\rule{0.7em}{0.7em}}
alpar@2
    66
alpar@2
    67
\newtheorem{theorem}{Theorem}[subsection]
alpar@2
    68
\newtheorem{corollary}{Corollary}[theorem]
alpar@2
    69
\newtheorem{claim}[theorem]{Claim}
alpar@2
    70
alpar@2
    71
\newtheorem{definition}{Definition}[subsection]
alpar@2
    72
\newtheorem{notation}{Notation}[subsection]
alpar@2
    73
\newtheorem{example}{Example}[subsection]
alpar@2
    74
\usetikzlibrary{decorations.markings}
alpar@2
    75
\let\oldproofname=\proofname
alpar@2
    76
%% \renewcommand{\proofname}{\rm\bf{Proof:}}
alpar@2
    77
Madarasi@7
    78
\captionsetup{font=normalsize}
Madarasi@7
    79
alpar@1
    80
\journal{Discrete Applied Mathematics}
alpar@0
    81
alpar@0
    82
\begin{document}
alpar@0
    83
alpar@0
    84
\begin{frontmatter}
alpar@0
    85
alpar@0
    86
%% Title, authors and addresses
alpar@0
    87
alpar@0
    88
%% use the tnoteref command within \title for footnotes;
alpar@0
    89
%% use the tnotetext command for theassociated footnote;
alpar@0
    90
%% use the fnref command within \author or \address for footnotes;
alpar@0
    91
%% use the fntext command for theassociated footnote;
alpar@0
    92
%% use the corref command within \author for corresponding author footnotes;
alpar@0
    93
%% use the cortext command for theassociated footnote;
alpar@0
    94
%% use the ead command for the email address,
alpar@0
    95
%% and the form \ead[url] for the home page:
alpar@0
    96
%% \title{Title\tnoteref{label1}}
alpar@0
    97
%% \tnotetext[label1]{}
alpar@0
    98
%% \author{Name\corref{cor1}\fnref{label2}}
alpar@0
    99
%% \ead{email address}
alpar@0
   100
%% \ead[url]{home page}
alpar@0
   101
%% \fntext[label2]{}
alpar@0
   102
%% \cortext[cor1]{}
alpar@0
   103
%% \address{Address\fnref{label3}}
alpar@0
   104
%% \fntext[label3]{}
alpar@0
   105
alpar@24
   106
\title{VF2++ --- An Improved Subgraph Isomorphism Algorithm}
alpar@0
   107
alpar@0
   108
%% use optional labels to link authors explicitly to addresses:
alpar@0
   109
%% \author[label1,label2]{}
alpar@0
   110
%% \address[label1]{}
alpar@0
   111
%% \address[label2]{}
alpar@0
   112
alpar@24
   113
\author[egres,elte]{Alp{\'a}r J{\"u}ttner}
alpar@24
   114
\ead{alpar@cs.elte.hu}
alpar@24
   115
\author[elte]{P{\'e}ter Madarasi}
alpar@24
   116
\ead{madarasip@caesar.elte.hu}
alpar@24
   117
\address[egres]{MTA-ELTE Egerv{\'a}ry Research Group, Budapest, Hungary.}
alpar@24
   118
\address[elte]{Department of Operations Research, E{\"o}tv{\"o}s Lor{\'a}nd University, Budapest, Hungary.}
alpar@0
   119
alpar@0
   120
\begin{abstract}
alpar@0
   121
alpar@24
   122
  This paper presents a largely improved version of the VF2 algorithm
alpar@24
   123
  for the \emph{Subgraph Isomorphism Problem}. The improvements are
alpar@24
   124
  twofold. Firstly, it is based on a new approach for determining the
alpar@24
   125
  matching order of the nodes, and secondly, more efficient -
alpar@24
   126
  nevertheless easier to compute - cutting rules significantly
alpar@24
   127
  reducing the search space are applied.
alpar@1
   128
alpar@24
   129
  In addition to the usual subgraph isomorphism, the paper also
alpar@24
   130
  presents specialized versions for the \emph{Induced Subgraph
alpar@24
   131
    Isomorphism} and for the \emph{Graph Isomorphism Problems}.
alpar@1
   132
alpar@24
   133
  Finally, an extensive experimental evaluation is provided using a
alpar@24
   134
  wide range of inputs, including both real life biological and
alpar@24
   135
  chemical datasets and standard randomly generated graph series. The
alpar@24
   136
  results show major and consistent running time improvements over the
alpar@24
   137
  other known methods.
alpar@24
   138
 
alpar@24
   139
  The C++ implementations of the algorithms are available open source as
alpar@24
   140
  the part of the LEMON graph and network optimization library.
alpar@24
   141
  
alpar@0
   142
\end{abstract}
alpar@0
   143
alpar@0
   144
\begin{keyword}
alpar@24
   145
  Computational Biology, Subgraph Isomorphism Problem
alpar@0
   146
%% keywords here, in the form: keyword \sep keyword
alpar@0
   147
alpar@0
   148
%% PACS codes here, in the form: \PACS code \sep code
alpar@0
   149
alpar@0
   150
%% MSC codes here, in the form: \MSC code \sep code
alpar@0
   151
%% or \MSC[2008] code \sep code (2000 is the default)
alpar@0
   152
alpar@0
   153
\end{keyword}
alpar@0
   154
alpar@0
   155
\end{frontmatter}
alpar@0
   156
alpar@0
   157
%% \linenumbers
alpar@0
   158
alpar@0
   159
%% main text
alpar@2
   160
\section{Introduction}
alpar@2
   161
\label{sec:intro}
alpar@2
   162
alpar@3
   163
In the last decades, combinatorial structures, and especially graphs
alpar@3
   164
have been considered with ever increasing interest, and applied to the
alpar@3
   165
solution of several new and revised questions.  The expressiveness,
alpar@3
   166
the simplicity and the studiedness of graphs make them practical for
alpar@3
   167
modelling and appear constantly in several seemingly independent
Madarasi@19
   168
fields, such as bioinformatics and chemistry.
alpar@2
   169
alpar@3
   170
Complex biological systems arise from the interaction and cooperation
alpar@3
   171
of plenty of molecular components. Getting acquainted with such
Madarasi@19
   172
systems at the molecular level is of primary importance, since
alpar@3
   173
protein-protein interaction, DNA-protein interaction, metabolic
alpar@3
   174
interaction, transcription factor binding, neuronal networks, and
Madarasi@19
   175
hormone signaling networks can be understood this way.
alpar@2
   176
Madarasi@19
   177
Many chemical and biological structures can easily be modeled
Madarasi@19
   178
as graphs, for instance, a molecular structure can be
Madarasi@19
   179
considered as a graph, whose nodes correspond to atoms and whose
Madarasi@19
   180
edges to chemical bonds. The similarity and dissimilarity of
Madarasi@19
   181
objects corresponding to nodes are incorporated to the model
Madarasi@19
   182
by \emph{node labels}. Understanding such networks basically
Madarasi@19
   183
requires finding specific subgraphs, thus calls for efficient
Madarasi@19
   184
graph matching algorithms.
alpar@2
   185
Madarasi@19
   186
Other real-world fields related to some
Madarasi@19
   187
variants of graph matching include pattern recognition
alpar@3
   188
and machine vision \cite{HorstBunkeApplications}, symbol recognition
alpar@3
   189
\cite{CordellaVentoSymbolRecognition}, face identification
alpar@3
   190
\cite{JianzhuangYongFaceIdentification}.  \\
alpar@2
   191
alpar@3
   192
Subgraph and induced subgraph matching problems are known to be
alpar@3
   193
NP-Complete\cite{SubgraphNPC}, while the graph isomorphism problem is
alpar@3
   194
one of the few problems in NP neither known to be in P nor
alpar@3
   195
NP-Complete. Although polynomial time isomorphism algorithms are known
alpar@3
   196
for various graph classes, like trees and planar
alpar@3
   197
graphs\cite{PlanarGraphIso}, bounded valence
alpar@3
   198
graphs\cite{BondedDegGraphIso}, interval graphs\cite{IntervalGraphIso}
Madarasi@19
   199
or permutation graphs\cite{PermGraphIso}, and recently, an FPT algorithm has been presented for the coloured hypergraph isomorphism problem in \cite{ColoredHiperGraphIso}.
alpar@2
   200
alpar@3
   201
In the following, some algorithms based on other approaches are
Madarasi@19
   202
summarized, which do not need any restrictions on the graphs. Even though,
alpar@3
   203
an overall polynomial behaviour is not expectable from such an
Madarasi@19
   204
alternative, it may often have good practical performance, in fact,
Madarasi@19
   205
it might be the best choice even on a graph class for which polynomial
Madarasi@19
   206
algorithm is known.
alpar@2
   207
alpar@3
   208
The first practically usable approach was due to
Madarasi@19
   209
\emph{Ullmann}\cite{Ullmann} which is a commonly used depth-first
alpar@3
   210
search based algorithm with a complex heuristic for reducing the
alpar@3
   211
number of visited states. A major problem is its $\Theta(n^3)$ space
alpar@3
   212
complexity, which makes it impractical in the case of big sparse
alpar@3
   213
graphs.
alpar@2
   214
alpar@4
   215
In a recent paper, Ullmann\cite{UllmannBit} presents an
alpar@3
   216
improved version of this algorithm based on a bit-vector solution for
alpar@3
   217
the binary Constraint Satisfaction Problem.
alpar@2
   218
Madarasi@19
   219
The \emph{Nauty} algorithm\cite{Nauty} transforms the two graphs to
alpar@3
   220
a canonical form before starting to check for the isomorphism. It has
alpar@3
   221
been considered as one of the fastest graph isomorphism algorithms,
alpar@3
   222
although graph categories were shown in which it takes exponentially
alpar@3
   223
many steps. This algorithm handles only the graph isomorphism problem.
alpar@2
   224
alpar@4
   225
The \emph{LAD} algorithm\cite{Lad} uses a depth-first search
alpar@3
   226
strategy and formulates the matching as a Constraint Satisfaction
alpar@3
   227
Problem to prune the search tree. The constraints are that the mapping
alpar@3
   228
has to be injective and edge-preserving, hence it is possible to
alpar@3
   229
handle new matching types as well.
alpar@2
   230
Madarasi@19
   231
The \emph{RI} algorithm\cite{RI} and its variations are based on a
alpar@3
   232
state space representation. After reordering the nodes of the graphs,
alpar@3
   233
it uses some fast executable heuristic checks without using any
alpar@3
   234
complex pruning rules. It seems to run really efficiently on graphs
alpar@3
   235
coming from biology, and won the International Contest on Pattern
alpar@3
   236
Search in Biological Databases\cite{Content}.
alpar@2
   237
alpar@3
   238
The currently most commonly used algorithm is the
Madarasi@19
   239
\emph{VF2}\cite{VF2}, the improved version of \emph{VF}\cite{VF}, which was
alpar@3
   240
designed for solving pattern matching and computer vision problems,
alpar@3
   241
and has been one of the best overall algorithms for more than a
alpar@3
   242
decade. Although, it can't be up to new specialized algorithms, it is
alpar@3
   243
still widely used due to its simplicity and space efficiency. VF2 uses
alpar@3
   244
a state space representation and checks some conditions in each state
alpar@3
   245
to prune the search tree.
alpar@2
   246
Madarasi@19
   247
Meanwhile, another variant called \emph{VF2 Plus}\cite{VF2Plus} has
alpar@3
   248
been published. It is considered to be as efficient as the RI
alpar@3
   249
algorithm and has a strictly better behavior on large graphs.  The
alpar@3
   250
main idea of VF2 Plus is to precompute a heuristic node order of the
alpar@3
   251
small graph, in which the VF2 works more efficiently.
alpar@2
   252
Madarasi@19
   253
This paper introduces \emph{VF2++}, a new further improved algorithm
Madarasi@19
   254
for the graph and (induced)subgraph isomorphism problem, which uses
Madarasi@19
   255
efficient cutting rules and determines a node order in which VF2 runs
Madarasi@19
   256
significantly faster on practical inputs.
Madarasi@19
   257
Madarasi@19
   258
This project was initiated and sponsored by QuantumBio
Madarasi@19
   259
Inc.\cite{QUANTUMBIO} and the implementation --- along with a source
Madarasi@19
   260
code --- has been published as a part of LEMON\cite{LEMON} open source
Madarasi@19
   261
graph library.
Madarasi@19
   262
Madarasi@22
   263
Outline: Section~\ref{sec:ProbStat} defines the problems to be solved, Section~\ref{sec:VF2Alg} provides a description of VF2, Section~\ref{sec:VF2ppAlg} introduces VF2++, a new graph matching algorithm, Section~\ref{sec:VF2ppImpl} presents the details of an efficient implementation of VF2++, and Section~\ref{sec:ExpRes} compares VF2++ to a state of the art algorithm.
Madarasi@22
   264
Madarasi@22
   265
\section{Problem Statement}\label{sec:ProbStat}
Madarasi@19
   266
This section provides a formal description of the problems to be
alpar@3
   267
solved.
alpar@2
   268
\subsection{Definitions}
alpar@2
   269
Madarasi@19
   270
Throughout the paper $G_{1}=(V_{1}, E_{1})$ and
Madarasi@19
   271
$G_{2}=(V_{2}, E_{2})$ denote two undirected graphs.
Madarasi@19
   272
Madarasi@19
   273
\begin{definition}
Madarasi@19
   274
$\mathcal{L}: (V_{1}\cup V_{2}) \longrightarrow K$ is a \textbf{node
Madarasi@19
   275
    label function}, where K is an arbitrary set. The elements in K
Madarasi@19
   276
  are the \textbf{node labels}. Two nodes, u and v are said to be
Madarasi@19
   277
  \textbf{equivalent} if $\mathcal{L}(u)=\mathcal{L}(v)$.
Madarasi@19
   278
\end{definition}
Madarasi@19
   279
Madarasi@19
   280
For the sake of simplicity, in this paper the graph, subgraph and induced subgraph isomorphisms are defined in a more general way.
Madarasi@19
   281
alpar@2
   282
\begin{definition}\label{sec:ismorphic}
Madarasi@19
   283
$G_{1}$ and $G_{2}$ are \textbf{isomorphic} (by the node label $\mathcal{L}$) if $\exists \mathfrak{m}:
Madarasi@19
   284
  V_{1} \longrightarrow V_{2}$ bijection, for which the
alpar@3
   285
  following is true:
alpar@2
   286
\begin{center}
Madarasi@20
   287
$\forall u\in{V_{1}} : \mathcal{L}(u)=\mathcal{L}(\mathfrak{m}(u))$ and\\
Madarasi@19
   288
$\forall u,v\in{V_{1}} : (u,v)\in{E_{1}} \Leftrightarrow (\mathfrak{m}(u),\mathfrak{m}(v))\in{E_{2}}$
alpar@2
   289
\end{center}
alpar@2
   290
\end{definition}
Madarasi@19
   291
alpar@2
   292
\begin{definition}
Madarasi@19
   293
$G_{1}$ is a \textbf{subgraph} of $G_{2}$ (by the node label $\mathcal{L}$) if $\exists \mathfrak{m}:
Madarasi@19
   294
  V_{1}\longrightarrow V_{2}$ injection, for which the
alpar@3
   295
  following is true:
alpar@2
   296
\begin{center}
Madarasi@20
   297
$\forall u\in{V_{1}} : \mathcal{L}(u)=\mathcal{L}(\mathfrak{m}(u))$ and\\
Madarasi@19
   298
$\forall u,v \in{V_{1}} : (u,v)\in{E_{1}} \Rightarrow (\mathfrak{m}(u),\mathfrak{m}(v))\in E_{2}$
alpar@2
   299
\end{center}
alpar@2
   300
\end{definition}
alpar@2
   301
alpar@2
   302
\begin{definition} 
Madarasi@19
   303
$G_{1}$ is an \textbf{induced subgraph} of $G_{2}$ (by the node label $\mathcal{L}$) if $\exists
Madarasi@19
   304
  \mathfrak{m}: V_{1}\longrightarrow V_{2}$ injection, for which the
alpar@3
   305
  following is true:
alpar@2
   306
\begin{center}
Madarasi@19
   307
$\forall u\in{V_{1}} : \mathcal{L}(u)=\mathcal{L}(\mathfrak{m}(u))$ and
Madarasi@19
   308
Madarasi@19
   309
$\forall u,v \in{V_{1}} : (u,v)\in{E_{1}} \Leftrightarrow
Madarasi@19
   310
  (\mathfrak{m}(u),\mathfrak{m}(v))\in E_{2}$
alpar@2
   311
\end{center}
alpar@2
   312
\end{definition}
alpar@2
   313
alpar@2
   314
alpar@2
   315
\subsection{Common problems}\label{sec:CommProb}
alpar@2
   316
alpar@3
   317
The focus of this paper is on two extensively studied topics, the
alpar@3
   318
subgraph isomorphism and its variations. However, the following
alpar@3
   319
problems also appear in many applications.
alpar@2
   320
alpar@3
   321
The \textbf{subgraph matching problem} is the following: is
Madarasi@19
   322
$G_{1}$ isomorphic to any subgraph of $G_{2}$ by a given node
alpar@3
   323
label?
alpar@2
   324
alpar@3
   325
The \textbf{induced subgraph matching problem} asks the same about the
alpar@3
   326
existence of an induced subgraph.
alpar@2
   327
alpar@3
   328
The \textbf{graph isomorphism problem} can be defined as induced
alpar@3
   329
subgraph matching problem where the sizes of the two graphs are equal.
alpar@2
   330
Madarasi@22
   331
In addition, one may want to find a \textbf{single} mapping or \textbf{enumerate} all of them.
alpar@2
   332
Madarasi@22
   333
Note that some authors refer to the term
alpar@3
   334
\emph{subgraph isomorphism problem} as an \emph{induced subgraph
alpar@3
   335
  isomorphism problem}.
alpar@2
   336
Madarasi@22
   337
\section{The VF2 Algorithm}\label{sec:VF2Alg}
alpar@3
   338
This algorithm is the basis of both the VF2++ and the VF2 Plus.  VF2
alpar@4
   339
is able to handle all the variations mentioned in Section
alpar@4
   340
  \ref{sec:CommProb}.  Although it can also handle directed graphs,
alpar@3
   341
for the sake of simplicity, only the undirected case will be
alpar@3
   342
discussed.
alpar@2
   343
alpar@2
   344
alpar@2
   345
\subsection{Common notations}
Madarasi@19
   346
\indent Assume $G_{1}$ is searched in $G_{2}$.  The following
alpar@3
   347
definitions and notations will be used throughout the whole paper.
alpar@2
   348
\begin{definition}
Madarasi@19
   349
An injection $\mathfrak{m} : D \longrightarrow V_2$ is called (partial) \textbf{mapping}, where $D\subseteq V_1$.
Madarasi@19
   350
\end{definition}
Madarasi@19
   351
Madarasi@19
   352
\begin{notation}
Madarasi@19
   353
$\mathfrak{D}(f)$ and $\mathfrak{R}(f)$ denote the domain and the range of a function $f$, respectively.
Madarasi@19
   354
\end{notation}
Madarasi@19
   355
Madarasi@19
   356
\begin{definition}
Madarasi@19
   357
Mapping $\mathfrak{m}$ \textbf{covers} a node $u\in V_1\cup V_2$ if $u\in \mathfrak{D}(\mathfrak{m})\cup \mathfrak{R}(\mathfrak{m})$.
alpar@2
   358
\end{definition}
alpar@2
   359
alpar@2
   360
\begin{definition}
Madarasi@19
   361
A mapping $\mathfrak{m}$ is $\mathbf{whole\ mapping}$ if $\mathfrak{m}$ covers all the
Madarasi@19
   362
nodes of $V_{1}$, i.e. $\mathfrak{D}(\mathfrak{m})=V_1$.
alpar@2
   363
\end{definition}
alpar@2
   364
alpar@2
   365
\begin{definition}
Madarasi@20
   366
Let \textbf{extend}$(\mathfrak{m},(u,v))$ denote the function $f : \mathfrak{D}(\mathfrak{m})\cup\{u\}\longrightarrow\mathfrak{R}(\mathfrak{m})\cup\{v\}$, for which $\forall w\in \mathfrak{D}(\mathfrak{m}) : \mathfrak{m}(w)=f(w)$ and $f(u)=v$ holds. Where $u\in V_1\setminus\mathfrak{D}(\mathfrak{m})$ and $v\in V_2\setminus\mathfrak{R}(\mathfrak{m})$, otherwise $extend(\mathfrak{m},(u,v))$ is undefined.
alpar@2
   367
\end{definition}
alpar@2
   368
alpar@2
   369
\begin{notation}
Madarasi@19
   370
Throughout the paper, $\mathbf{PT}$ denotes a generic problem type
Madarasi@19
   371
which can be substituted by any of the $\mathbf{ISO}$, $\mathbf{SUB}$
Madarasi@19
   372
and $\mathbf{IND}$ problems.
alpar@2
   373
\end{notation}
alpar@2
   374
alpar@2
   375
\begin{definition}
Madarasi@19
   376
Let $\mathfrak{m}$ be a mapping. A logical function $\mathbf{Cons_{PT}}$ is a
Madarasi@17
   377
\textbf{consistency function by } $\mathbf{PT}$ if the following
Madarasi@19
   378
holds. If there exists a whole mapping $w$ satisfying the requirements of $PT$, for which $\mathfrak{m}$ is exactly $w$ restricted to $\mathfrak{D}(\mathfrak{m})$.
alpar@2
   379
\end{definition}
alpar@2
   380
alpar@2
   381
\begin{definition} 
Madarasi@19
   382
Let $\mathfrak{m}$ be a mapping. A logical function $\mathbf{Cut_{PT}}$ is a
Madarasi@17
   383
\textbf{cutting function by } $\mathbf{PT}$ if the following
Madarasi@19
   384
holds. $\mathbf{Cut_{PT}(\mathfrak{m})}$ is false if there exists a sequence of extend operations, which results in a whole mapping satisfying the requirements of $PT$.
alpar@2
   385
\end{definition}
alpar@2
   386
alpar@2
   387
\begin{definition}
Madarasi@19
   388
$\mathfrak{m}$ is said to be \textbf{consistent mapping by} $\mathbf{PT}$ if
Madarasi@19
   389
  $Cons_{PT}(\mathfrak{m})$ is true.
alpar@2
   390
\end{definition}
alpar@2
   391
alpar@2
   392
$Cons_{PT}$ and $Cut_{PT}$ will often be used in the following form.
alpar@2
   393
\begin{notation}
Madarasi@19
   394
Let $\mathbf{Cons_{PT}(p, \mathfrak{m})}:=Cons_{PT}(extend(\mathfrak{m},p))$, and
Madarasi@19
   395
$\mathbf{Cut_{PT}(p, \mathfrak{m})}:=Cut_{PT}(extend(\mathfrak{m},p))$, where
Madarasi@19
   396
$p\in{V_{1}\backslash\mathfrak{D}(\mathfrak{m}) \!\times\!V_{2}\backslash\mathfrak{R}(\mathfrak{m})}$.
alpar@2
   397
\end{notation}
alpar@2
   398
alpar@3
   399
$Cons_{PT}$ will be used to check the consistency of the already
alpar@3
   400
covered nodes, while $Cut_{PT}$ is for looking ahead to recognize if
alpar@3
   401
no whole consistent mapping can contain the current mapping.
alpar@2
   402
alpar@2
   403
\subsection{Overview of the algorithm}
alpar@3
   404
VF2 uses a state space representation of mappings, $Cons_{PT}$ for
alpar@3
   405
excluding inconsistency with the problem type and $Cut_{PT}$ for
Madarasi@19
   406
pruning the search tree.
alpar@2
   407
alpar@4
   408
Algorithm~\ref{alg:VF2Pseu} is a high level description of
Madarasi@19
   409
the VF2 matching algorithm. Each state of the matching process can
Madarasi@19
   410
be associated with a mapping $\mathfrak{m}$. The initial state
Madarasi@19
   411
is associated with a mapping $\mathfrak{m}$, for which
Madarasi@19
   412
$\mathfrak{D}(\mathfrak{m})=\emptyset$, i.e. it starts with an empty mapping.
alpar@2
   413
alpar@2
   414
alpar@2
   415
\begin{algorithm}
Madarasi@13
   416
\algtext*{EndIf}%ne nyomtasson end if-et
Madarasi@13
   417
\algtext*{EndFor}%ne
Madarasi@13
   418
\algtext*{EndProcedure}%ne nyomtasson ..
alpar@2
   419
\caption{\hspace{0.5cm}$A\ high\ level\ description\ of\ VF2$}\label{alg:VF2Pseu}
alpar@2
   420
\begin{algorithmic}[1]
alpar@2
   421
Madarasi@19
   422
\Procedure{VF2}{Mapping $\mathfrak{m}$, ProblemType $PT$}
Madarasi@19
   423
  \If{$\mathfrak{m}$ covers
Madarasi@19
   424
    $V_{1}$} \State Output($\mathfrak{m}$)
Madarasi@19
   425
  \Else
Madarasi@19
   426
  \State Compute the set $P_\mathfrak{m}$ of the pairs candidate for inclusion
Madarasi@19
   427
  in $\mathfrak{m}$ \ForAll{$p\in{P_\mathfrak{m}}$} \If{Cons$_{PT}$($p,\mathfrak{m}$) $\wedge$
Madarasi@19
   428
    $\neg$Cut$_{PT}$($p,\mathfrak{m}$)}
Madarasi@19
   429
    \State \textbf{call}
Madarasi@19
   430
  VF2($extend(\mathfrak{m},p)$, $PT$) \EndIf \EndFor \EndIf \EndProcedure
alpar@2
   431
\end{algorithmic}
alpar@2
   432
\end{algorithm}
alpar@2
   433
alpar@2
   434
Madarasi@19
   435
For the current mapping $\mathfrak{m}$, the algorithm computes $P_\mathfrak{m}$, the set of
Madarasi@19
   436
candidate node pairs for adding to the current mapping $\mathfrak{m}_s$.
alpar@2
   437
Madarasi@19
   438
For each pair $p$ in $P_\mathfrak{m}$, $Cons_{PT}(p,\mathfrak{m})$ and
Madarasi@19
   439
$Cut_{PT}(p,\mathfrak{m})$ are evaluated. If the former is true and
Madarasi@19
   440
the latter is false, the whole process is recursively applied to
Madarasi@19
   441
$extend(\mathfrak{m},p)$. Otherwise, $extend(\mathfrak{m},p)$ is not consistent by $PT$, or it
Madarasi@19
   442
can be proved that $\mathfrak{m}$ can not be extended to a whole mapping.
alpar@2
   443
Madarasi@11
   444
In order to make sure of the correctness, see
alpar@2
   445
\begin{claim}
alpar@3
   446
Through consistent mappings, only consistent whole mappings can be
Madarasi@19
   447
reached, and all the consistent whole mappings are reachable through
alpar@3
   448
consistent mappings.
alpar@2
   449
\end{claim}
alpar@2
   450
Madarasi@19
   451
Note that a mapping may be reached in exponentially many different ways, since the
Madarasi@19
   452
order of extensions does not influence the nascent mapping.
alpar@2
   453
alpar@2
   454
However, one may observe
alpar@2
   455
alpar@2
   456
\begin{claim}
alpar@2
   457
\label{claim:claimTotOrd}
Madarasi@19
   458
Let $\prec$ be an arbitrary total ordering relation on $V_{1}$.  If
Madarasi@19
   459
the algorithm ignores each $p=(u,v) \in P_\mathfrak{m}$, for which
alpar@2
   460
\begin{center}
Madarasi@19
   461
$\exists (\tilde{u},\tilde{v})\in P_\mathfrak{m}: \tilde{u} \prec u$,
alpar@2
   462
\end{center}
Madarasi@19
   463
then no mapping can be reached more than once, and each whole mapping remains reachable.
alpar@2
   464
\end{claim}
alpar@2
   465
alpar@3
   466
Note that the cornerstone of the improvements to VF2 is a proper
alpar@3
   467
choice of a total ordering.
alpar@2
   468
Madarasi@19
   469
\subsection{The candidate set}
alpar@2
   470
\label{candidateComputingVF2}
Madarasi@19
   471
Let $P_\mathfrak{m}$ be the set of the candidate pairs for inclusion in $\mathfrak{m}$.
alpar@2
   472
alpar@2
   473
\begin{notation}
Madarasi@19
   474
Let $\mathbf{T_{1}(\mathfrak{m})}:=\{u \in V_{1}\backslash\mathfrak{D}(\mathfrak{m}) : \exists \tilde{u}\in{\mathfrak{D}(\mathfrak{m}): (u,\tilde{u})\in E_{1}}\}$, and
Madarasi@19
   475
 $\mathbf{T_{2}(\mathfrak{m})} := \{v \in V_{2}\backslash\mathfrak{R}(\mathfrak{m}) : \exists\tilde{v}\in{\mathfrak{R}(\mathfrak{m}):(v,\tilde{v})\in E_{2}}\}$.
alpar@2
   476
\end{notation}
alpar@2
   477
Madarasi@19
   478
The set $P_\mathfrak{m}$ includes the pairs of uncovered neighbours of covered
Madarasi@17
   479
nodes, and if there is not such a node pair, all the pairs containing
alpar@3
   480
two uncovered nodes are added. Formally, let
alpar@2
   481
\[
Madarasi@19
   482
 P_\mathfrak{m}\!=\!
alpar@2
   483
  \begin{cases} 
Madarasi@19
   484
   T_{1}(\mathfrak{m})\times T_{2}(\mathfrak{m})&\hspace{-0.15cm}\text{if }
Madarasi@19
   485
   T_{1}(\mathfrak{m})\!\neq\!\emptyset\ \text{and }T_{2}(\mathfrak{m})\!\neq
Madarasi@19
   486
   \emptyset,\\ (V_{1}\!\setminus\!\mathfrak{D}(\mathfrak{m}))\!\times\!(V_{2}\!\setminus\!\mathfrak{R}(\mathfrak{m}))
Madarasi@19
   487
   &\hspace{-0.15cm}\text{otherwise}.
alpar@2
   488
  \end{cases}
alpar@2
   489
\]
alpar@2
   490
alpar@2
   491
\subsection{Consistency}
Madarasi@19
   492
Suppose $p=(u,v)$, where $u\in V_{1}$ and $v\in V_{2}$, $\mathfrak{m}$ is a consistent mapping by
Madarasi@19
   493
$PT$. $Cons_{PT}(p,\mathfrak{m})$ checks whether
Madarasi@19
   494
including pair $p$ into $\mathfrak{m}$ leads to a consistent mapping by $PT$.
Madarasi@15
   495
Madarasi@15
   496
For example, the consistency function of induced subgraph isomorphism is as follows.
alpar@2
   497
\begin{notation}
Madarasi@19
   498
Let $\mathbf{\Gamma_{1} (u)}:=\{\tilde{u}\in V_{1} :
Madarasi@19
   499
(u,\tilde{u})\in E_{1}\}$, and $\mathbf{\Gamma_{2}
Madarasi@19
   500
  (v)}:=\{\tilde{v}\in V_{2} : (v,\tilde{v})\in E_{2}\}$, where $u\in V_{1}$ and $v\in V_{2}$.
alpar@2
   501
\end{notation}
alpar@2
   502
Madarasi@19
   503
$extend(\mathfrak{m},(u,v))$ is a consistent mapping by $IND$ $\Leftrightarrow
Madarasi@19
   504
(\forall \tilde{u}\in \mathfrak{D}(\mathfrak{m}): (u,\tilde{u})\in E_{1}
Madarasi@19
   505
\Leftrightarrow (v,\mathfrak{m}(\tilde{u}))\in E_{2})$. The
alpar@3
   506
following formulation gives an efficient way of calculating
alpar@3
   507
$Cons_{IND}$.
alpar@2
   508
\begin{claim}
Madarasi@19
   509
$Cons_{IND}((u,v),\mathfrak{m}):=\mathcal{L}(u)\!\!=\!\!\mathcal{L}(v)\wedge(\forall \tilde{v}\in \Gamma_{2}(v)\cap\mathfrak{R}(\mathfrak{m}):(u,\mathfrak{m}^{-1}(\tilde{v}))\in E_{1})\wedge
Madarasi@19
   510
  (\forall \tilde{u}\in \Gamma_{1}(u)
Madarasi@19
   511
  \cap \mathfrak{D}(\mathfrak{m}):(v,\mathfrak{m}(\tilde{u}))\in E_{2})$ is a
alpar@3
   512
  consistency function in the case of $IND$.
alpar@2
   513
\end{claim}
alpar@2
   514
alpar@2
   515
\subsection{Cutting rules}
Madarasi@19
   516
$Cut_{PT}(p,\mathfrak{m})$ is defined by a collection of efficiently
Madarasi@19
   517
verifiable conditions. The requirement is that $Cut_{PT}(p,\mathfrak{m})$ can
Madarasi@19
   518
be true only if it is impossible to extend $extend(\mathfrak{m},p)$ to a
alpar@3
   519
whole mapping.
Madarasi@15
   520
Madarasi@15
   521
As an example, the cutting function of induced subgraph isomorphism is presented.
alpar@2
   522
\begin{notation}
Madarasi@19
   523
Let $\mathbf{\tilde{T}_{1}}(\mathfrak{m}):=(V_{1}\backslash
Madarasi@19
   524
\mathfrak{D}(\mathfrak{m}))\backslash T_{1}(\mathfrak{m})$, and
Madarasi@19
   525
\\ $\mathbf{\tilde{T}_{2}}(\mathfrak{m}):=(V_{2}\backslash
Madarasi@19
   526
\mathfrak{R}(\mathfrak{m}))\backslash T_{2}(\mathfrak{m})$.
alpar@2
   527
\end{notation}
Madarasi@15
   528
alpar@2
   529
\begin{claim}
Madarasi@19
   530
$Cut_{IND}((u,v),\mathfrak{m}):= |\Gamma_{2} (v)\ \cap\ T_{2}(\mathfrak{m})| <
Madarasi@19
   531
  |\Gamma_{1} (u)\ \cap\ T_{1}(\mathfrak{m})| \vee |\Gamma_{2}(v)\cap
Madarasi@19
   532
  \tilde{T}_{2}(\mathfrak{m})| < |\Gamma_{1}(u)\cap
Madarasi@19
   533
  \tilde{T}_{1}(\mathfrak{m})|$ is a cutting function by $IND$.
alpar@2
   534
\end{claim}
alpar@2
   535
Madarasi@22
   536
\section{The VF2++ Algorithm}\label{sec:VF2ppAlg}
alpar@3
   537
Although any total ordering relation makes the search space of VF2 a
alpar@3
   538
tree, its choice turns out to dramatically influence the number of
alpar@3
   539
visited states. The goal is to determine an efficient one as quickly
alpar@3
   540
as possible.
alpar@2
   541
alpar@3
   542
The main reason for VF2++' superiority over VF2 is twofold. Firstly,
alpar@3
   543
taking into account the structure and the node labeling of the graph,
alpar@3
   544
VF2++ determines a state order in which most of the unfruitful
alpar@3
   545
branches of the search space can be pruned immediately. Secondly,
alpar@3
   546
introducing more efficient --- nevertheless still easier to compute
alpar@3
   547
--- cutting rules reduces the chance of going astray even further.
alpar@2
   548
alpar@3
   549
In addition to the usual subgraph isomorphism, specialized versions
alpar@3
   550
for induced subgraph isomorphism and for graph isomorphism have been
Madarasi@22
   551
designed.
alpar@2
   552
Madarasi@22
   553
Note that a weaker version of the cutting rules and an efficient
Madarasi@22
   554
candidate set calculating were described in \cite{VF2Plus}.
alpar@2
   555
alpar@3
   556
It should be noted that all the methods described in this section are
Madarasi@22
   557
extendable to handle directed graphs and edge labels as well.
alpar@3
   558
The basic ideas and the detailed description of VF2++ are provided in
Madarasi@22
   559
the following.\newline
alpar@2
   560
Madarasi@19
   561
The goal is to find a matching order in which the algorithm is able to
Madarasi@19
   562
recognize inconsistency or prune the infeasible branches on the
Madarasi@19
   563
highest levels and goes deep only if it is needed.
Madarasi@19
   564
Madarasi@19
   565
\begin{notation}
Madarasi@19
   566
Let $\mathbf{Conn_{H}(u)}:=|\Gamma_{1}(u)\cap H\}|$, that is the
Madarasi@19
   567
number of neighbours of u which are in H, where $u\in V_{1} $ and
Madarasi@19
   568
$H\subseteq V_{1}$.
Madarasi@19
   569
\end{notation}
Madarasi@19
   570
Madarasi@19
   571
The principal question is the following. Suppose a mapping $\mathfrak{m}$ is
Madarasi@19
   572
given. For which node of $T_{1}(\mathfrak{m})$ is the hardest to find a
Madarasi@19
   573
consistent pair in $G_{2}$? The more covered neighbours a node in
Madarasi@19
   574
$T_{1}(\mathfrak{m})$ has --- i.e. the largest $Conn_{\mathfrak{D}(\mathfrak{m})}$ it has
Madarasi@19
   575
---, the more rarely satisfiable consistency constraints for its pair
Madarasi@19
   576
are given.
Madarasi@19
   577
Madarasi@19
   578
In biology, most of the graphs are sparse, thus several nodes in
Madarasi@19
   579
$T_{1}(\mathfrak{m})$ may have the same $Conn_{\mathfrak{D}(\mathfrak{m})}$, which makes
Madarasi@19
   580
reasonable to define a secondary and a tertiary order between them.
Madarasi@19
   581
The observation above proves itself to be as determining, that the
Madarasi@19
   582
secondary ordering prefers nodes with the most uncovered neighbours
Madarasi@19
   583
among which have the same $Conn_{\mathfrak{D}(\mathfrak{m})}$ to increase
Madarasi@19
   584
$Conn_{\mathfrak{D}(\mathfrak{m})}$ of uncovered nodes so much, as possible.  The
Madarasi@19
   585
tertiary ordering prefers nodes having the rarest uncovered labels.
Madarasi@19
   586
Madarasi@19
   587
Note that the secondary ordering is the same as the ordering by $deg$,
Madarasi@19
   588
which is a static data in front of the above used.
Madarasi@19
   589
Madarasi@19
   590
These rules can easily result in a matching order which contains the
Madarasi@19
   591
nodes of a long path successively, whose nodes may have low $Conn$ and
Madarasi@19
   592
is easily matchable into $G_{2}$. To avoid that, a BFS order is
Madarasi@19
   593
used, which provides the shortest possible paths.
Madarasi@19
   594
\newline
Madarasi@19
   595
Madarasi@19
   596
In the following, some examples on which the VF2 may be slow are
Madarasi@19
   597
described, although they are easily solvable by using a proper
Madarasi@19
   598
matching order.
Madarasi@19
   599
Madarasi@19
   600
\begin{example}
Madarasi@19
   601
Suppose $G_{1}$ can be mapped into $G_{2}$ in many ways
Madarasi@19
   602
without node labels. Let $u\in V_{1}$ and $v\in V_{2}$.
Madarasi@19
   603
\newline
Madarasi@19
   604
$\mathcal{L}(u):=black$
Madarasi@19
   605
\newline
Madarasi@19
   606
$\mathcal{L}(v):=black$
Madarasi@19
   607
\newline
Madarasi@22
   608
$\mathcal{L}(\tilde{u}):=red \ \forall \tilde{u}\in V_{1}\backslash
Madarasi@22
   609
\{u\}$
Madarasi@19
   610
\newline
Madarasi@22
   611
$\mathcal{L}(\tilde{v}):=red \ \forall \tilde{v}\in V_{2}\backslash
Madarasi@22
   612
\{v\}$
Madarasi@19
   613
\newline
Madarasi@19
   614
Madarasi@19
   615
Now, any mapping by $\mathcal{L}$ must contain $(u,v)$, since
Madarasi@19
   616
$u$ is black and no node in $V_{2}$ has a black label except
Madarasi@19
   617
$v$. If unfortunately $u$ were the last node which will get covered,
Madarasi@19
   618
VF2 would check only in the last steps, whether $u$ can be matched to
Madarasi@19
   619
$v$.
Madarasi@19
   620
\newline
Madarasi@19
   621
However, had $u$ been the first matched node, u would have been
Madarasi@19
   622
matched immediately to v, so all the mappings would have been
Madarasi@19
   623
precluded in which node labels can not correspond.
Madarasi@19
   624
\end{example}
Madarasi@19
   625
Madarasi@19
   626
\begin{example}
Madarasi@19
   627
Suppose there is no node label given, $G_{1}$ is a small graph and
Madarasi@19
   628
can not be mapped into $G_{2}$ and $u\in V_{1}$.
Madarasi@19
   629
\newline
Madarasi@19
   630
Let $G'_{1}:=(V_{1}\cup
Madarasi@19
   631
\{u'_{1},u'_{2},..,u'_{k}\},E_{1}\cup
Madarasi@19
   632
\{(u,u'_{1}),(u'_{1},u'_{2}),..,(u'_{k-1},u'_{k})\})$, that is,
Madarasi@19
   633
$G'_{1}$ is $G_{1}\cup \{ a\ k$ long path, which is disjoint
Madarasi@19
   634
from $G_{1}$ and one of its starting points is connected to $u\in
Madarasi@19
   635
V_{1}\}$.
Madarasi@19
   636
\newline
Madarasi@19
   637
Is there a subgraph of $G_{2}$, which is isomorph with
Madarasi@19
   638
$G'_{1}$?
Madarasi@19
   639
\newline
Madarasi@19
   640
If unfortunately the nodes of the path were the first $k$ nodes in the
Madarasi@19
   641
matching order, the algorithm would iterate through all the possible k
Madarasi@19
   642
long paths in $G_{2}$, and it would recognize that no path can be
Madarasi@19
   643
extended to $G'_{1}$.
Madarasi@19
   644
\newline
Madarasi@19
   645
However, had it started by the matching of $G_{1}$, it would not
Madarasi@19
   646
have matched any nodes of the path.
Madarasi@19
   647
\end{example}
Madarasi@19
   648
Madarasi@19
   649
These examples may look artificial, but the same problems also appear
Madarasi@19
   650
in real-world instances, even though in a less obvious way.
Madarasi@19
   651
alpar@2
   652
\subsection{Preparations}
alpar@2
   653
\begin{claim}
alpar@2
   654
\label{claim:claimCoverFromLeft}
alpar@3
   655
The total ordering relation uniquely determines a node order, in which
Madarasi@19
   656
the nodes of $V_{1}$ will be covered by VF2. From the point of
alpar@3
   657
view of the matching procedure, this means, that always the same node
Madarasi@19
   658
of $G_{1}$ will be covered on the d-th level.
alpar@2
   659
\end{claim}
alpar@2
   660
alpar@2
   661
\begin{definition}
Madarasi@19
   662
An order $(u_{\sigma(1)},u_{\sigma(2)},..,u_{\sigma(|V_{1}|)})$ of
Madarasi@19
   663
$V_{1}$ is \textbf{matching order} if exists $\prec$ total
alpar@3
   664
ordering relation, s.t. the VF2 with $\prec$ on the d-th level finds
Madarasi@19
   665
pair for $u_{\sigma(d)}$ for all $d\in\{1,..,|V_{1}|\}$.
alpar@2
   666
\end{definition}
alpar@2
   667
alpar@2
   668
\begin{claim}\label{claim:MOclaim}
Madarasi@17
   669
A total ordering is matching order iff the nodes of every component
alpar@3
   670
form an interval in the node sequence, and every node connects to a
Madarasi@17
   671
previous node in its component except the first node of each component.
alpar@2
   672
\end{claim}
alpar@2
   673
alpar@3
   674
To summing up, a total ordering always uniquely determines a matching
alpar@3
   675
order, and every matching order can be determined by a total ordering,
alpar@3
   676
however, more than one different total orderings may determine the
alpar@3
   677
same matching order.
alpar@2
   678
alpar@2
   679
\subsection{Total ordering}
Madarasi@19
   680
The matching order will be searched directly.
alpar@2
   681
\begin{notation}
Madarasi@19
   682
Let \textbf{F$_\mathcal{M}$(l)}$:=|\{v\in V_{2} :
Madarasi@19
   683
l=\mathcal{L}(v)\}|-|\{u\in V_{1}\backslash \mathcal{M} : l=\mathcal{L}(u)\}|$ ,
Madarasi@19
   684
where $l$ is a label and $\mathcal{M}\subseteq V_{1}$.
alpar@2
   685
\end{notation}
alpar@2
   686
Madarasi@17
   687
\begin{definition}Let $\mathbf{arg\ max}_{f}(S) :=\{u\in S : f(u)=max_{v\in S}\{f(v)\}\}$ and $\mathbf{arg\ min}_{f}(S) := arg\ max_{-f}(S)$, where $S$ is a finite set and $f:S\longrightarrow \mathbb{R}$.
alpar@2
   688
\end{definition}
alpar@2
   689
alpar@2
   690
\begin{algorithm}
Madarasi@8
   691
\algtext*{EndIf}
Madarasi@8
   692
\algtext*{EndProcedure}
alpar@2
   693
\algtext*{EndWhile}
Madarasi@13
   694
\algtext*{EndFor}
alpar@2
   695
\caption{\hspace{0.5cm}$The\ method\ of\ VF2++\ for\ determining\ the\ node\ order$}\label{alg:VF2PPPseu}
alpar@2
   696
\begin{algorithmic}[1]
alpar@3
   697
\Procedure{VF2++order}{} \State $\mathcal{M}$ := $\emptyset$
Madarasi@19
   698
\Comment{matching order} \While{$V_{1}\backslash \mathcal{M}
alpar@3
   699
  \neq\emptyset$} \State $r\in$ arg max$_{deg}$ (arg
Madarasi@19
   700
min$_{F_\mathcal{M}\circ \mathcal{L}}(V_{1}\backslash
alpar@3
   701
\mathcal{M})$)\label{alg:findMin} \State Compute $T$, a BFS tree with
alpar@3
   702
root node $r$.  \For{$d=0,1,...,depth(T)$} \State $V_d$:=nodes of the
alpar@3
   703
$d$-th level \State Process $V_d$ \Comment{See Algorithm
Madarasi@8
   704
  \ref{alg:VF2PPProcess1}} \EndFor
alpar@3
   705
\EndWhile \EndProcedure
alpar@2
   706
\end{algorithmic}
alpar@2
   707
\end{algorithm}
alpar@2
   708
alpar@2
   709
\begin{algorithm}
Madarasi@8
   710
\algtext*{EndIf}
Madarasi@8
   711
\algtext*{EndProcedure}%ne nyomtasson ..
alpar@2
   712
\algtext*{EndWhile}
Madarasi@8
   713
\caption{\hspace{.5cm}$The\ method\ for\ processing\ a\ level\ of\ the\ BFS\ tree$}\label{alg:VF2PPProcess1}
alpar@2
   714
\begin{algorithmic}[1]
Madarasi@17
   715
\Procedure{VF2++ProcessLevel}{$V_{d}$} \While{$V_d\neq\emptyset$}
Madarasi@22
   716
\State $m\in$ arg min$_{F_{\mathcal{M}\circ\ \mathcal{L}}}($ arg max$_{deg}($arg
alpar@3
   717
max$_{Conn_{\mathcal{M}}}(V_{d})))$ \State $V_d:=V_d\backslash m$
alpar@3
   718
\State Append node $m$ to the end of $\mathcal{M}$ \State Refresh
alpar@3
   719
$F_\mathcal{M}$ \EndWhile \EndProcedure
alpar@2
   720
\end{algorithmic}
alpar@2
   721
\end{algorithm}
alpar@2
   722
alpar@4
   723
Algorithm~\ref{alg:VF2PPPseu} is a high level description of the
alpar@4
   724
matching order procedure of VF2++. It computes a BFS tree for each
Madarasi@19
   725
component in ascending order of their rarest node labels and largest $deg$,
alpar@4
   726
whose root vertex is the component's minimal
Madarasi@8
   727
node. Algorithm~\ref{alg:VF2PPProcess1} is a method to process a level of the BFS tree, which appends the nodes of the current level in descending
Madarasi@8
   728
lexicographic order by $(Conn_{\mathcal{M}},deg,-F_\mathcal{M})$ separately
Madarasi@8
   729
to $\mathcal{M}$, and refreshes $F_\mathcal{M}$ immediately.
alpar@2
   730
alpar@4
   731
Claim~\ref{claim:MOclaim} shows that Algorithm~\ref{alg:VF2PPPseu}
alpar@4
   732
provides a matching order.
alpar@2
   733
alpar@2
   734
alpar@2
   735
\subsection{Cutting rules}
alpar@2
   736
\label{VF2PPCuttingRules}
Madarasi@19
   737
This section presents the cutting rules of VF2++, which are improved by using extra information coming from the node labels.
alpar@2
   738
\begin{notation}
Madarasi@19
   739
Let $\mathbf{\Gamma_{1}^{l}(u)}:=\{\tilde{u} : \mathcal{L}(\tilde{u})=l
Madarasi@19
   740
\wedge \tilde{u}\in \Gamma_{1} (u)\}$ and
Madarasi@19
   741
$\mathbf{\Gamma_{2}^{l}(v)}:=\{\tilde{v} : \mathcal{L}(\tilde{v})=l \wedge
Madarasi@19
   742
\tilde{v}\in \Gamma_{2} (v)\}$, where $u\in V_{1}$, $v\in
Madarasi@19
   743
V_{2}$ and $l$ is a label.
alpar@2
   744
\end{notation}
alpar@2
   745
Madarasi@19
   746
\subsubsection{Induced subgraph isomorphism}
alpar@2
   747
\begin{claim}
Madarasi@19
   748
\[LabCut_{IND}((u,v),\mathfrak{m}):=\bigvee_{l\ is\ label}|\Gamma_{2}^{l} (v) \cap T_{2}(\mathfrak{m})|\!<\!|\Gamma_{1}^{l}(u)\cap T_{1}(\mathfrak{m})|\ \vee\]\[\bigvee_{l\ is\ label} \newline |\Gamma_{2}^{l}(v)\cap \tilde{T}_{2}(\mathfrak{m})| < |\Gamma_{1}^{l}(u)\cap \tilde{T}_{1}(\mathfrak{m})|\] is a cutting function by IND.
Madarasi@19
   749
\end{claim}
Madarasi@19
   750
\subsubsection{Graph isomorphism}
Madarasi@19
   751
\begin{claim}
Madarasi@19
   752
\[LabCut_{ISO}((u,v),\mathfrak{m}):=\bigvee_{l\ is\ label}|\Gamma_{2}^{l} (v) \cap T_{2}(\mathfrak{m})|\!\neq\!|\Gamma_{1}^{l}(u)\cap T_{1}(\mathfrak{m})|\  \vee\]\[\bigvee_{l\ is\ label} \newline |\Gamma_{2}^{l}(v)\cap \tilde{T}_{2}(\mathfrak{m})| \neq |\Gamma_{1}^{l}(u)\cap \tilde{T}_{1}(\mathfrak{m})|\] is a cutting function by ISO.
alpar@2
   753
\end{claim}
Madarasi@13
   754
Madarasi@19
   755
\subsubsection{Subgraph isomorphism}
Madarasi@19
   756
\begin{claim}
Madarasi@19
   757
\[LabCut_{SU\!B}((u,v),\mathfrak{m}):=\bigvee_{l\ is\ label}|\Gamma_{2}^{l} (v) \cap T_{2}(\mathfrak{m})|\!<\!|\Gamma_{1}^{l}(u)\cap T_{1}(\mathfrak{m})|\] is a cutting function by SUB.
Madarasi@19
   758
\end{claim}
alpar@2
   759
Madarasi@19
   760
Madarasi@19
   761
Madarasi@22
   762
\section{Implementation details}\label{sec:VF2ppImpl}
alpar@3
   763
This section provides a detailed summary of an efficient
alpar@3
   764
implementation of VF2++.
Madarasi@22
   765
\subsection{Storing a mapping}
alpar@3
   766
After fixing an arbitrary node order ($u_0, u_1, ..,
Madarasi@19
   767
u_{|G_{1}|-1}$) of $G_{1}$, an array $M$ is usable to store
alpar@3
   768
the current mapping in the following way.
alpar@2
   769
\[
alpar@3
   770
 M[i] =
alpar@2
   771
  \begin{cases} 
Madarasi@19
   772
   v & if\ (u_i,v)\ is\ in\ the\ mapping\\ INV\!ALI\!D &
Madarasi@17
   773
   if\ no\ node\ has\ been\ mapped\ to\ u_i,
alpar@2
   774
  \end{cases}
alpar@2
   775
\]
Madarasi@19
   776
where $i\in\{0,1, ..,|G_{1}|-1\}$, $v\in V_{2}$ and $INV\!ALI\!D$
alpar@3
   777
means "no node".
Madarasi@22
   778
\subsection{Avoiding the recurrence}
alpar@4
   779
The recursion of Algorithm~\ref{alg:VF2Pseu} can be realized
Madarasi@9
   780
as a \textit{while loop}, which has a loop counter $depth$ denoting the
Madarasi@9
   781
all-time depth of the recursion. Fixing a matching order, let $M$
Madarasi@9
   782
denote the array storing the all-time mapping. Based on Claim~\ref{claim:claimCoverFromLeft},
Madarasi@19
   783
$M$ is $INV\!ALI\!D$ from index $depth$+1 and not $INV\!ALI\!D$ before
Madarasi@9
   784
$depth$. $M[depth]$ changes
alpar@3
   785
while the state is being processed, but the property is held before
alpar@3
   786
both stepping back to a predecessor state and exploring a successor
alpar@3
   787
state.
alpar@2
   788
alpar@3
   789
The necessary part of the candidate set is easily maintainable or
alpar@3
   790
computable by following
alpar@4
   791
Section~\ref{candidateComputingVF2}. A much faster method
alpar@3
   792
has been designed for biological- and sparse graphs, see the next
alpar@3
   793
section for details.
alpar@2
   794
Madarasi@22
   795
\subsection{Calculating the candidates for a node}
alpar@4
   796
Being aware of Claim~\ref{claim:claimCoverFromLeft}, the
alpar@3
   797
task is not to maintain the candidate set, but to generate the
Madarasi@19
   798
candidate nodes in $G_{2}$ for a given node $u\in V_{1}$.  In
Madarasi@20
   799
case of any of the three problem types and a mapping $\mathfrak{m}$, if a node $v\in
Madarasi@19
   800
V_{2}$ is a potential pair of $u\in V_{1}$, then $\forall
Madarasi@20
   801
u'\in \mathfrak{D}(\mathfrak{m}) : (u,u')\in
Madarasi@20
   802
E_{1}\Rightarrow (v,\mathfrak{m}(u'))\in
Madarasi@19
   803
E_{2}$. That is, each covered neighbour of $u$ has to be mapped to
alpar@3
   804
a covered neighbour of $v$.
alpar@2
   805
alpar@3
   806
Having said that, an algorithm running in $\Theta(deg)$ time is
alpar@3
   807
describable if there exists a covered node in the component containing
Madarasi@17
   808
$u$, and a linear one otherwise.
alpar@2
   809
alpar@2
   810
Madarasi@22
   811
\subsection{Determining the node order}
alpar@3
   812
This section describes how the node order preprocessing method of
alpar@3
   813
VF2++ can efficiently be implemented.
alpar@2
   814
alpar@3
   815
For using lookup tables, the node labels are associated with the
alpar@3
   816
numbers $\{0,1,..,|K|-1\}$, where $K$ is the set of the labels. It
Madarasi@9
   817
enables $F_\mathcal{M}$ to be stored in an array. At first, the node order
alpar@3
   818
$\mathcal{M}=\emptyset$, so $F_\mathcal{M}[i]$ is the number of nodes
Madarasi@19
   819
in $V_{1}$ having label $i$, which is easy to compute in
Madarasi@19
   820
$\Theta(|V_{1}|)$ steps.
alpar@2
   821
Madarasi@19
   822
Representing $\mathcal{M}\subseteq V_{1}$ as an array of
Madarasi@19
   823
size $|V_{1}|$, both the computation of the BFS tree, and processing its levels by Algorithm~\ref{alg:VF2PPProcess1} can be done inplace by swapping nodes.
alpar@2
   824
Madarasi@22
   825
\subsection{Cutting rules}
alpar@4
   826
In Section~\ref{VF2PPCuttingRules}, the cutting rules were
Madarasi@19
   827
described using the sets $T_{1}$, $T_{2}$, $\tilde T_{1}$
Madarasi@19
   828
and $\tilde T_{2}$, which are dependent on the all-time mapping
alpar@3
   829
(i.e. on the all-time state). The aim is to check the labeled cutting
alpar@3
   830
rules of VF2++ in $\Theta(deg)$ time.
alpar@2
   831
alpar@3
   832
Firstly, suppose that these four sets are given in such a way, that
alpar@3
   833
checking whether a node is in a certain set takes constant time,
alpar@3
   834
e.g. they are given by their 0-1 characteristic vectors. Let $L$ be an
alpar@3
   835
initially zero integer lookup table of size $|K|$. After incrementing
Madarasi@19
   836
$L[\mathcal{L}(u')]$ for all $u'\in \Gamma_{1}(u) \cap T_{1}(\mathfrak{m})$ and
Madarasi@19
   837
decrementing $L[\mathcal{L}(v')]$ for all $v'\in\Gamma_{2} (v) \cap
Madarasi@19
   838
T_{2}(s)$, the first part of the cutting rules is checkable in
alpar@3
   839
$\Theta(deg)$ time by considering the proper signs of $L$. Setting $L$
alpar@3
   840
to zero takes $\Theta(deg)$ time again, which makes it possible to use
Madarasi@9
   841
the same table through the whole algorithm. The second part of the
alpar@3
   842
cutting rules can be verified using the same method with $\tilde
Madarasi@19
   843
T_{1}$ and $\tilde T_{2}$ instead of $T_{1}$ and
Madarasi@19
   844
$T_{2}$. Thus, the overall complexity is $\Theta(deg)$.
alpar@2
   845
Madarasi@19
   846
Another integer lookup table storing the number of covered neighbours
Madarasi@19
   847
of each node in $G_{2}$ gives all the information about the sets
Madarasi@19
   848
$T_{2}$ and $\tilde T_{2}$, which is maintainable in
alpar@3
   849
$\Theta(deg)$ time when a pair is added or substracted by incrementing
alpar@3
   850
or decrementing the proper indices. A further improvement is that the
Madarasi@19
   851
values of $L[\mathcal{L}(u')]$ in case of checking $u$ are dependent only on
Madarasi@19
   852
$u$, i.e. on the size of the mapping, so for each $u\in V_{1}$ an
alpar@3
   853
array of pairs (label, number of such labels) can be stored to skip
alpar@3
   854
the maintaining operations. Note that these arrays are at most of size
Madarasi@19
   855
$deg$.
alpar@2
   856
Madarasi@19
   857
Using similar techniques, the consistency function can be evaluated in
alpar@3
   858
$\Theta(deg)$ steps, as well.
alpar@2
   859
Madarasi@22
   860
\section{Experimental results}\label{sec:ExpRes}
Madarasi@19
   861
This section compares the performance of VF2++ and VF2 Plus. According to
Madarasi@19
   862
our experience, both algorithms run faster than VF2 with orders of
Madarasi@19
   863
magnitude, thus its inclusion was not reasonable.
alpar@2
   864
Madarasi@19
   865
The algorithms were implemented in C++ using the open source
Madarasi@19
   866
LEMON graph and network optimization library\cite{LEMON}. The test were carried out on a linux based system with an Intel i7 X980 3.33 GHz CPU and 6 GB of RAM.
alpar@2
   867
\subsection{Biological graphs}
alpar@3
   868
The tests have been executed on a recent biological dataset created
alpar@3
   869
for the International Contest on Pattern Search in Biological
Madarasi@7
   870
Databases\cite{Content}, which has been constructed of molecule,
Madarasi@7
   871
protein and contact map graphs extracted from the Protein Data
alpar@3
   872
Bank\cite{ProteinDataBank}.
alpar@2
   873
alpar@3
   874
The molecule dataset contains small graphs with less than 100 nodes
alpar@3
   875
and an average degree of less than 3. The protein dataset contains
alpar@3
   876
graphs having 500-10 000 nodes and an average degree of 4, while the
alpar@3
   877
contact map dataset contains graphs with 150-800 nodes and an average
alpar@3
   878
degree of 20.  \\
alpar@2
   879
Madarasi@19
   880
In the following, both the induced subgraph isomorphism and the graph
alpar@3
   881
isomorphism will be examined.
alpar@2
   882
Madarasi@17
   883
This dataset provides graph pairs, between which all the induced subgraph isomorphisms have to be found. For runtime results, please see Figure~\ref{fig:bioIND}.
Madarasi@7
   884
Madarasi@7
   885
In an other experiment, the nodes of each graph in the database had been
Madarasi@7
   886
shuffled, and an isomorphism between the shuffled and the original
Madarasi@7
   887
graph was searched. The solution times are shown on Figure~\ref{fig:bioISO}.
Madarasi@7
   888
Madarasi@7
   889
Madarasi@17
   890
\begin{figure}[H]
Madarasi@17
   891
\vspace*{-2cm}
Madarasi@17
   892
\hspace*{-1.5cm}
Madarasi@17
   893
\begin{subfigure}[b]{0.55\textwidth}
Madarasi@17
   894
\begin{figure}[H]
Madarasi@17
   895
\begin{tikzpicture}[trim axis left, trim axis right]
Madarasi@17
   896
\begin{axis}[title=Molecules IND,xlabel={target size},ylabel={time (ms)},legend entries={VF2 Plus,VF2++},grid
Madarasi@17
   897
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
Madarasi@17
   898
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@17
   899
  format/1000 sep = \thinspace}]
Madarasi@17
   900
%\addplot+[only marks] table {proteinsOrig.txt};
Madarasi@17
   901
\addplot table {Orig/Molecules.32.txt}; \addplot[mark=triangle*,mark
Madarasi@17
   902
  size=1.8pt,color=red] table {VF2PPLabel/Molecules.32.txt};
Madarasi@17
   903
\end{axis}
Madarasi@17
   904
\end{tikzpicture}
Madarasi@17
   905
\caption{In the case of molecules, the algorithms have
Madarasi@17
   906
  similar behaviour, but VF2++ is almost two times faster even on such
Madarasi@17
   907
  small graphs.} \label{fig:INDMolecule}
Madarasi@17
   908
\end{figure}
Madarasi@17
   909
\end{subfigure}
Madarasi@17
   910
\hspace*{1.5cm}
Madarasi@17
   911
\begin{subfigure}[b]{0.55\textwidth}
Madarasi@17
   912
\begin{figure}[H]
Madarasi@17
   913
\begin{tikzpicture}[trim axis left, trim axis right]
Madarasi@17
   914
\begin{axis}[title=Contact maps IND,xlabel={target size},ylabel={time (ms)},legend entries={VF2 Plus,VF2++},grid
Madarasi@17
   915
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
Madarasi@17
   916
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@17
   917
  format/1000 sep = \thinspace}]
Madarasi@17
   918
%\addplot+[only marks] table {proteinsOrig.txt};
Madarasi@17
   919
\addplot table {Orig/ContactMaps.128.txt};
Madarasi@17
   920
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
Madarasi@17
   921
        {VF2PPLabel/ContactMaps.128.txt};
Madarasi@17
   922
\end{axis}
Madarasi@17
   923
\end{tikzpicture}
Madarasi@17
   924
\caption{On contact maps, VF2++ runs almost in constant time, while VF2
Madarasi@17
   925
  Plus has a near linear behaviour.} \label{fig:INDContact}
Madarasi@17
   926
\end{figure}
Madarasi@17
   927
\end{subfigure}
Madarasi@17
   928
Madarasi@17
   929
\begin{center}
Madarasi@17
   930
\vspace*{-0.5cm}
Madarasi@17
   931
\begin{subfigure}[b]{0.55\textwidth}
Madarasi@17
   932
\begin{figure}[H]
Madarasi@17
   933
\begin{tikzpicture}[trim axis left, trim axis right]
Madarasi@17
   934
  \begin{axis}[title=Proteins IND,xlabel={target size},ylabel={time (ms)},legend entries={VF2 Plus,VF2++},grid
Madarasi@17
   935
  =major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
Madarasi@17
   936
    west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@17
   937
    format/1000 sep = \thinspace}] %\addplot+[only marks] table
Madarasi@17
   938
    {proteinsOrig.txt}; \addplot[mark=*,mark size=1.2pt,color=blue]
Madarasi@17
   939
    table {Orig/Proteins.256.txt}; \addplot[mark=triangle*,mark
Madarasi@17
   940
      size=1.8pt,color=red] table {VF2PPLabel/Proteins.256.txt};
Madarasi@17
   941
  \end{axis}
Madarasi@17
   942
  \end{tikzpicture}
Madarasi@17
   943
\caption{Both the algorithms have linear behaviour on protein
Madarasi@17
   944
  graphs. VF2++ is more than 10 times faster than VF2
Madarasi@17
   945
  Plus.} \label{fig:INDProt}
Madarasi@17
   946
\end{figure}
Madarasi@17
   947
\end{subfigure}
Madarasi@17
   948
\end{center}
Madarasi@17
   949
\vspace*{-0.5cm}
Madarasi@17
   950
\caption{\normalsize{Induced subgraph isomorphism on biological graphs}}\label{fig:bioIND}
Madarasi@17
   951
\end{figure}
Madarasi@17
   952
alpar@2
   953
alpar@2
   954
\begin{figure}[H]
Madarasi@7
   955
\vspace*{-2cm}
Madarasi@7
   956
\hspace*{-1.5cm}
Madarasi@7
   957
\begin{subfigure}[b]{0.55\textwidth}
Madarasi@7
   958
\begin{figure}[H]
Madarasi@7
   959
\begin{tikzpicture}[trim axis left, trim axis right]
Madarasi@7
   960
\begin{axis}[title=Molecules ISO,xlabel={target size},ylabel={time (ms)},legend entries={VF2 Plus,VF2++},grid
Madarasi@7
   961
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
Madarasi@7
   962
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@7
   963
  format/1000 sep = \thinspace}]
Madarasi@7
   964
%\addplot+[only marks] table {proteinsOrig.txt};
Madarasi@7
   965
\addplot table {Orig/moleculesIso.txt}; \addplot[mark=triangle*,mark
Madarasi@7
   966
  size=1.8pt,color=red] table {VF2PPLabel/moleculesIso.txt};
Madarasi@7
   967
\end{axis}
Madarasi@7
   968
\end{tikzpicture}
Madarasi@7
   969
\caption{In the case of molecules, there is not such a significant
Madarasi@7
   970
  difference, but VF2++ seems to be faster as the number of nodes
Madarasi@7
   971
  increases.}\label{fig:ISOMolecule}
Madarasi@7
   972
\end{figure}
Madarasi@7
   973
\end{subfigure}
Madarasi@7
   974
\hspace*{1.5cm}
Madarasi@7
   975
\begin{subfigure}[b]{0.55\textwidth}
Madarasi@7
   976
\begin{figure}[H]
Madarasi@7
   977
\begin{tikzpicture}[trim axis left, trim axis right]
Madarasi@7
   978
\begin{axis}[title=Contact maps ISO,xlabel={target size},ylabel={time (ms)},legend entries={VF2 Plus,VF2++},grid
Madarasi@7
   979
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
Madarasi@7
   980
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@7
   981
  format/1000 sep = \thinspace}]
Madarasi@7
   982
%\addplot+[only marks] table {proteinsOrig.txt};
Madarasi@7
   983
\addplot table {Orig/contactMapsIso.txt}; \addplot[mark=triangle*,mark
Madarasi@7
   984
  size=1.8pt,color=red] table {VF2PPLabel/contactMapsIso.txt};
Madarasi@7
   985
\end{axis}
Madarasi@7
   986
\end{tikzpicture}
Madarasi@7
   987
\caption{The results are closer to each other on contact maps, but
Madarasi@7
   988
  VF2++ still performs consistently better.}\label{fig:ISOContact}
Madarasi@7
   989
\end{figure}
Madarasi@7
   990
\end{subfigure}
Madarasi@7
   991
alpar@2
   992
\begin{center}
Madarasi@7
   993
\vspace*{-0.5cm}
Madarasi@7
   994
\begin{subfigure}[b]{0.55\textwidth}
Madarasi@7
   995
\begin{figure}[H]
Madarasi@7
   996
\begin{tikzpicture}[trim axis left, trim axis right]
Madarasi@7
   997
\begin{axis}[title=Proteins ISO,xlabel={target size},ylabel={time (ms)},legend entries={VF2 Plus,VF2++},grid
Madarasi@7
   998
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
Madarasi@7
   999
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@7
  1000
  format/1000 sep = \thinspace}]
Madarasi@7
  1001
%\addplot+[only marks] table {proteinsOrig.txt};
Madarasi@7
  1002
\addplot table {Orig/proteinsIso.txt}; \addplot[mark=triangle*,mark
Madarasi@7
  1003
  size=1.8pt,color=red] table {VF2PPLabel/proteinsIso.txt};
Madarasi@7
  1004
\end{axis}
Madarasi@7
  1005
\end{tikzpicture}
Madarasi@7
  1006
\caption{On protein graphs, VF2 Plus has a super linear time
Madarasi@7
  1007
  complexity, while VF2++ runs in near constant time. The difference
Madarasi@7
  1008
  is about two order of magnitude on large graphs.}\label{fig:ISOProt}
Madarasi@7
  1009
\end{figure}
Madarasi@7
  1010
\end{subfigure}
Madarasi@7
  1011
\end{center}
Madarasi@7
  1012
\vspace*{-0.6cm}
Madarasi@17
  1013
\caption{\normalsize{Graph isomorphism on biological graphs}}\label{fig:bioISO}
Madarasi@7
  1014
\end{figure}
Madarasi@7
  1015
Madarasi@7
  1016
alpar@2
  1017
alpar@2
  1018
alpar@2
  1019
\subsection{Random graphs}
alpar@3
  1020
This section compares VF2++ with VF2 Plus on random graphs of a large
alpar@3
  1021
size. The node labels are uniformly distributed.  Let $\delta$ denote
alpar@3
  1022
the average degree.  For the parameters of problems solved in the
alpar@3
  1023
experiments, please see the top of each chart.
alpar@2
  1024
\subsubsection{Graph isomorphism}
alpar@3
  1025
To evaluate the efficiency of the algorithms in the case of graph
Madarasi@17
  1026
isomorphism, random connected graphs of less than 20 000 nodes have been
alpar@3
  1027
considered. Generating a random graph and shuffling its nodes, an
Madarasi@7
  1028
isomorphism had to be found. Figure \ref{fig:randISO} shows the runtime results
alpar@4
  1029
on graph sets of various density.
alpar@2
  1030
Madarasi@7
  1031
Madarasi@7
  1032
Madarasi@7
  1033
Madarasi@12
  1034
\begin{figure}
Madarasi@7
  1035
\vspace*{-1.5cm}
Madarasi@7
  1036
\hspace*{-1.5cm}
Madarasi@7
  1037
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1038
\begin{center}
alpar@2
  1039
\begin{tikzpicture}
Madarasi@7
  1040
\begin{axis}[title={Random ISO, $\delta = 5$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1041
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1042
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@7
  1043
  format/1000 sep = \space}]
alpar@2
  1044
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1045
\addplot table {randGraph/iso/vf2pIso5_1.txt};
alpar@3
  1046
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1047
        {randGraph/iso/vf2ppIso5_1.txt};
alpar@2
  1048
\end{axis}
alpar@2
  1049
\end{tikzpicture}
alpar@2
  1050
\end{center}
Madarasi@7
  1051
\end{subfigure}
Madarasi@7
  1052
%\hspace{1cm}
Madarasi@7
  1053
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1054
\begin{center}
alpar@2
  1055
\begin{tikzpicture}
Madarasi@7
  1056
\begin{axis}[title={Random ISO, $\delta = 10$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1057
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1058
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@7
  1059
  format/1000 sep = \space}]
alpar@2
  1060
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1061
\addplot table {randGraph/iso/vf2pIso10_1.txt};
alpar@3
  1062
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1063
        {randGraph/iso/vf2ppIso10_1.txt};
alpar@2
  1064
\end{axis}
alpar@2
  1065
\end{tikzpicture}
alpar@2
  1066
\end{center}
Madarasi@7
  1067
\end{subfigure}
Madarasi@7
  1068
%%\hspace{1cm}
Madarasi@7
  1069
\hspace*{-1.5cm}
Madarasi@7
  1070
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1071
\begin{center}
alpar@2
  1072
\begin{tikzpicture}
Madarasi@7
  1073
\begin{axis}[title={Random ISO, $\delta = 15$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1074
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1075
  west},scaled x ticks = false,x tick label style={/pgf/number
Madarasi@7
  1076
  format/1000 sep = \space}]
alpar@2
  1077
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1078
\addplot table {randGraph/iso/vf2pIso15_1.txt};
alpar@3
  1079
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1080
        {randGraph/iso/vf2ppIso15_1.txt};
alpar@2
  1081
\end{axis}
alpar@2
  1082
\end{tikzpicture}
alpar@2
  1083
\end{center}
Madarasi@7
  1084
     \end{subfigure}
Madarasi@7
  1085
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1086
\begin{center}
alpar@2
  1087
\begin{tikzpicture}
Madarasi@7
  1088
\begin{axis}[title={Random ISO, $\delta = 100$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1089
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1090
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1091
  format/1000 sep = \thinspace}]
alpar@2
  1092
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1093
\addplot table {randGraph/iso/vf2pIso100_1.txt};
alpar@3
  1094
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1095
        {randGraph/iso/vf2ppIso100_1.txt};
alpar@2
  1096
\end{axis}
alpar@2
  1097
\end{tikzpicture}
Madarasi@23
  1098
\end{center}
Madarasi@7
  1099
\end{subfigure}
alpar@2
  1100
\vspace*{-0.8cm}
Madarasi@23
  1101
\caption{ISO on random graphs.
Madarasi@23
  1102
}\label{fig:randISO}
alpar@2
  1103
\end{figure}
alpar@2
  1104
alpar@2
  1105
alpar@2
  1106
\subsubsection{Induced subgraph isomorphism}
Madarasi@17
  1107
This section presents a comparison of VF2++ and VF2 Plus in the case
alpar@3
  1108
of induced subgraph isomorphism. In addition to the size of the large
alpar@3
  1109
graph, that of the small graph dramatically influences the hardness of
alpar@3
  1110
a given problem too, so the overall picture is provided by examining
alpar@3
  1111
small graphs of various size.
alpar@2
  1112
Madarasi@17
  1113
For each chart, a number $0<\rho< 1$ has been fixed, and the following
Madarasi@19
  1114
has been executed 150 times. Generating a large graph $G_{2}$ of an average degree of $\delta$,
Madarasi@19
  1115
choose 10 of its induced subgraphs having $\rho\ |V_{2}|$ nodes,
alpar@3
  1116
and for all the 10 subgraphs find a mapping by using both the graph
alpar@3
  1117
matching algorithms.  The $\delta = 5, 10, 35$ and $\rho = 0.05, 0.1,
Madarasi@23
  1118
0.3, 0.8$ cases have been examined, see
alpar@4
  1119
Figure~\ref{fig:randIND5}, \ref{fig:randIND10} and
Madarasi@10
  1120
\ref{fig:randIND35}.
alpar@2
  1121
alpar@2
  1122
alpar@2
  1123
alpar@2
  1124
alpar@2
  1125
Madarasi@12
  1126
\begin{figure}
Madarasi@7
  1127
\vspace*{-1.5cm}
Madarasi@7
  1128
\hspace*{-1.5cm}
alpar@2
  1129
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1130
\begin{center}
alpar@2
  1131
\begin{tikzpicture}
alpar@2
  1132
\begin{axis}[title={Random IND, $\delta = 5$, $\rho = 0.05$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1133
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1134
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1135
  format/1000 sep = \space}]
alpar@2
  1136
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1137
\addplot table {randGraph/ind/vf2pInd5_0.05.txt};
alpar@3
  1138
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1139
        {randGraph/ind/vf2ppInd5_0.05.txt};
alpar@2
  1140
\end{axis}
alpar@2
  1141
\end{tikzpicture}
alpar@2
  1142
\end{center}
alpar@2
  1143
     \end{subfigure}
alpar@2
  1144
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1145
\begin{center}
alpar@2
  1146
\begin{tikzpicture}
alpar@2
  1147
\begin{axis}[title={Random IND, $\delta = 5$, $\rho = 0.1$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1148
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1149
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1150
  format/1000 sep = \space}]
alpar@2
  1151
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1152
\addplot table {randGraph/ind/vf2pInd5_0.1.txt};
alpar@3
  1153
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1154
        {randGraph/ind/vf2ppInd5_0.1.txt};
alpar@2
  1155
\end{axis}
alpar@2
  1156
\end{tikzpicture}
alpar@2
  1157
\end{center}
alpar@2
  1158
\end{subfigure}
Madarasi@7
  1159
\hspace*{-1.5cm}
alpar@2
  1160
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1161
\begin{center}
alpar@2
  1162
\begin{tikzpicture}
alpar@2
  1163
\begin{axis}[title={Random IND, $\delta = 5$, $\rho = 0.3$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1164
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1165
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1166
  format/1000 sep = \space}]
alpar@2
  1167
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1168
\addplot table {randGraph/ind/vf2pInd5_0.3.txt};
alpar@3
  1169
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1170
        {randGraph/ind/vf2ppInd5_0.3.txt};
alpar@2
  1171
\end{axis}
alpar@2
  1172
\end{tikzpicture}
alpar@2
  1173
\end{center}
alpar@2
  1174
     \end{subfigure}
alpar@2
  1175
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1176
\begin{center}
alpar@2
  1177
\begin{tikzpicture}
alpar@2
  1178
\begin{axis}[title={Random IND, $\delta = 5$, $\rho = 0.8$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1179
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1180
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1181
  format/1000 sep = \space}]
alpar@2
  1182
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1183
\addplot table {randGraph/ind/vf2pInd5_0.8.txt};
alpar@3
  1184
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1185
        {randGraph/ind/vf2ppInd5_0.8.txt};
alpar@2
  1186
\end{axis}
alpar@2
  1187
\end{tikzpicture}
Madarasi@23
  1188
\end{center}
alpar@2
  1189
\end{subfigure}
alpar@2
  1190
\vspace*{-0.8cm}
alpar@3
  1191
\caption{IND on graphs having an average degree of
alpar@3
  1192
  5.}\label{fig:randIND5}
alpar@2
  1193
\end{figure}
alpar@2
  1194
alpar@2
  1195
Madarasi@23
  1196
\begin{figure}
Madarasi@7
  1197
\vspace*{-1.5cm}
Madarasi@7
  1198
\hspace*{-1.5cm}
alpar@2
  1199
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1200
\begin{center}
Madarasi@7
  1201
\hspace*{-0.5cm}
alpar@2
  1202
\begin{tikzpicture}
alpar@2
  1203
\begin{axis}[title={Random IND, $\delta = 10$, $\rho = 0.05$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1204
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1205
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1206
  format/1000 sep = \space}]
alpar@2
  1207
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1208
\addplot table {randGraph/ind/vf2pInd10_0.05.txt};
alpar@3
  1209
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1210
        {randGraph/ind/vf2ppInd10_0.05.txt};
alpar@2
  1211
\end{axis}
alpar@2
  1212
\end{tikzpicture}
alpar@2
  1213
\end{center}
alpar@2
  1214
     \end{subfigure}
alpar@2
  1215
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1216
\begin{center}
Madarasi@7
  1217
     \hspace*{-0.5cm}
alpar@2
  1218
\begin{tikzpicture}
alpar@2
  1219
\begin{axis}[title={Random IND, $\delta = 10$, $\rho = 0.1$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1220
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1221
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1222
  format/1000 sep = \space}]
alpar@2
  1223
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1224
\addplot table {randGraph/ind/vf2pInd10_0.1.txt};
alpar@3
  1225
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1226
        {randGraph/ind/vf2ppInd10_0.1.txt};
alpar@2
  1227
\end{axis}
alpar@2
  1228
\end{tikzpicture}
alpar@2
  1229
\end{center}
alpar@2
  1230
\end{subfigure}
Madarasi@7
  1231
\hspace*{-1.5cm}
alpar@2
  1232
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1233
\begin{center}
alpar@2
  1234
\begin{tikzpicture}
alpar@2
  1235
\begin{axis}[title={Random IND, $\delta = 10$, $\rho = 0.3$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1236
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1237
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1238
  format/1000 sep = \space}]
alpar@2
  1239
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1240
\addplot table {randGraph/ind/vf2pInd10_0.3.txt};
alpar@3
  1241
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1242
        {randGraph/ind/vf2ppInd10_0.3.txt};
alpar@2
  1243
\end{axis}
alpar@2
  1244
\end{tikzpicture}
alpar@2
  1245
\end{center}
alpar@2
  1246
     \end{subfigure}
alpar@2
  1247
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1248
\begin{center}
alpar@2
  1249
\begin{tikzpicture}
alpar@2
  1250
\begin{axis}[title={Random IND, $\delta = 10$, $\rho = 0.8$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1251
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1252
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1253
  format/1000 sep = \space}]
alpar@2
  1254
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1255
\addplot table {randGraph/ind/vf2pInd10_0.8.txt};
alpar@3
  1256
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1257
        {randGraph/ind/vf2ppInd10_0.8.txt};
alpar@2
  1258
\end{axis}
alpar@2
  1259
\end{tikzpicture}
Madarasi@23
  1260
\end{center}
alpar@2
  1261
\end{subfigure}
alpar@2
  1262
\vspace*{-0.8cm}
alpar@3
  1263
\caption{IND on graphs having an average degree of
alpar@3
  1264
  10.}\label{fig:randIND10}
alpar@2
  1265
\end{figure}
alpar@2
  1266
alpar@2
  1267
alpar@2
  1268
Madarasi@23
  1269
\begin{figure}
Madarasi@7
  1270
\vspace*{-1.5cm}
Madarasi@7
  1271
\hspace*{-1.5cm}
alpar@2
  1272
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1273
\begin{center}
alpar@2
  1274
\begin{tikzpicture}
alpar@2
  1275
\begin{axis}[title={Random IND, $\delta = 35$, $\rho = 0.05$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1276
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1277
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1278
  format/1000 sep = \space}]
alpar@2
  1279
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1280
\addplot table {randGraph/ind/vf2pInd35_0.05.txt};
alpar@3
  1281
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1282
        {randGraph/ind/vf2ppInd35_0.05.txt};
alpar@2
  1283
\end{axis}
alpar@2
  1284
\end{tikzpicture}
alpar@2
  1285
\end{center}
alpar@2
  1286
     \end{subfigure}
alpar@2
  1287
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1288
\begin{center}
alpar@2
  1289
\begin{tikzpicture}
alpar@2
  1290
\begin{axis}[title={Random IND, $\delta = 35$, $\rho = 0.1$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1291
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1292
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1293
  format/1000 sep = \space}]
alpar@2
  1294
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1295
\addplot table {randGraph/ind/vf2pInd35_0.1.txt};
alpar@3
  1296
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1297
        {randGraph/ind/vf2ppInd35_0.1.txt};
alpar@2
  1298
\end{axis}
alpar@2
  1299
\end{tikzpicture}
alpar@2
  1300
\end{center}
alpar@2
  1301
\end{subfigure}
Madarasi@7
  1302
\hspace*{-1.5cm}
alpar@2
  1303
\begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1304
\begin{center}
alpar@2
  1305
\begin{tikzpicture}
alpar@2
  1306
\begin{axis}[title={Random IND, $\delta = 35$, $\rho = 0.3$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1307
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1308
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1309
  format/1000 sep = \space}]
alpar@2
  1310
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1311
\addplot table {randGraph/ind/vf2pInd35_0.3.txt};
alpar@3
  1312
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1313
        {randGraph/ind/vf2ppInd35_0.3.txt};
alpar@2
  1314
\end{axis}
alpar@2
  1315
\end{tikzpicture}
alpar@2
  1316
\end{center}
alpar@2
  1317
     \end{subfigure}
alpar@2
  1318
     \begin{subfigure}[b]{0.55\textwidth}
alpar@2
  1319
\begin{center}
alpar@2
  1320
\begin{tikzpicture}
alpar@2
  1321
\begin{axis}[title={Random IND, $\delta = 35$, $\rho = 0.8$},width=7.2cm,height=6cm,xlabel={target size},ylabel={time (ms)},ylabel near ticks,legend entries={VF2 Plus,VF2++},grid
alpar@3
  1322
=major,mark size=1.2pt, legend style={at={(0,1)},anchor=north
alpar@3
  1323
  west},scaled x ticks = false,x tick label style={/pgf/number
alpar@3
  1324
  format/1000 sep = \space}]
alpar@2
  1325
%\addplot+[only marks] table {proteinsOrig.txt};
alpar@2
  1326
\addplot table {randGraph/ind/vf2pInd35_0.8.txt};
alpar@3
  1327
\addplot[mark=triangle*,mark size=1.8pt,color=red] table
alpar@3
  1328
        {randGraph/ind/vf2ppInd35_0.8.txt};
alpar@2
  1329
\end{axis}
alpar@2
  1330
\end{tikzpicture}
Madarasi@23
  1331
\end{center}
alpar@2
  1332
\end{subfigure}
alpar@2
  1333
\vspace*{-0.8cm}
alpar@3
  1334
\caption{IND on graphs having an average degree of
alpar@3
  1335
  35.}\label{fig:randIND35}
alpar@2
  1336
\end{figure}
alpar@2
  1337
alpar@2
  1338
alpar@3
  1339
Based on these experiments, VF2++ is faster than VF2 Plus and able to
alpar@3
  1340
handle really large graphs in milliseconds. Note that when $IND$ was
alpar@3
  1341
considered and the small graphs had proportionally few nodes ($\rho =
alpar@3
  1342
0.05$, or $\rho = 0.1$), then VF2 Plus produced some inefficient node
alpar@4
  1343
orders (e.g. see the $\delta=10$ case on
Madarasi@17
  1344
Figure~\ref{fig:randIND10}). If these instances had been excluded, the
alpar@3
  1345
charts would have seemed to be similar to the other ones.
alpar@3
  1346
Unsurprisingly, as denser graphs are considered, both VF2++ and VF2
alpar@3
  1347
Plus slow slightly down, but remain practically usable even on graphs
alpar@3
  1348
having 10 000 nodes.
alpar@2
  1349
alpar@2
  1350
alpar@2
  1351
alpar@2
  1352
alpar@3
  1353
alpar@2
  1354
\section{Conclusion}
Madarasi@19
  1355
This paper presented VF2++, a new graph matching algorithm based on VF2, called VF2++, and analyzed it from a practical viewpoint.
alpar@2
  1356
alpar@3
  1357
Recognizing the importance of the node order and determining an
alpar@3
  1358
efficient one, VF2++ is able to match graphs of thousands of nodes in
alpar@3
  1359
near practically linear time including preprocessing. In addition to
alpar@3
  1360
the proper order, VF2++ uses more efficient consistency and cutting
alpar@3
  1361
rules which are easy to compute and make the algorithm able to prune
alpar@3
  1362
most of the unfruitful branches without going astray.
alpar@2
  1363
alpar@3
  1364
In order to show the efficiency of the new method, it has been
Madarasi@19
  1365
compared to VF2 Plus\cite{VF2Plus}, which is the best contemporary algorithm.
Madarasi@19
  1366
.
alpar@2
  1367
alpar@3
  1368
The experiments show that VF2++ consistently outperforms VF2 Plus on
alpar@3
  1369
biological graphs. It seems to be asymptotically faster on protein and
alpar@3
  1370
on contact map graphs in the case of induced subgraph isomorphism,
alpar@3
  1371
while in the case of graph isomorphism, it has definitely better
alpar@3
  1372
asymptotic behaviour on protein graphs.
alpar@2
  1373
alpar@3
  1374
Regarding random sparse graphs, not only has VF2++ proved itself to be
Madarasi@19
  1375
faster than VF2 Plus, but it also has a practically linear behaviour both
Madarasi@19
  1376
in the case of induced subgraph- and graph isomorphism.
alpar@2
  1377
alpar@2
  1378
alpar@0
  1379
alpar@0
  1380
%% The Appendices part is started with the command \appendix;
alpar@0
  1381
%% appendix sections are then done as normal sections
alpar@0
  1382
%% \appendix
alpar@0
  1383
alpar@0
  1384
%% \section{}
alpar@0
  1385
%% \label{}
alpar@0
  1386
alpar@0
  1387
%% If you have bibdatabase file and want bibtex to generate the
alpar@0
  1388
%% bibitems, please use
alpar@0
  1389
%%
alpar@3
  1390
\bibliographystyle{elsarticle-num} \bibliography{bibliography}
alpar@0
  1391
alpar@0
  1392
%% else use the following coding to input the bibitems directly in the
alpar@0
  1393
%% TeX file.
alpar@0
  1394
alpar@2
  1395
%% \begin{thebibliography}{00}
alpar@0
  1396
alpar@2
  1397
%% %% \bibitem{label}
alpar@2
  1398
%% %% Text of bibliographic item
alpar@0
  1399
alpar@2
  1400
%% \bibitem{}
alpar@0
  1401
alpar@2
  1402
%% \end{thebibliography}
alpar@2
  1403
alpar@0
  1404
\end{document}
alpar@0
  1405
\endinput
alpar@0
  1406
%%
alpar@0
  1407
%% End of file `elsarticle-template-num.tex'.