Reductions between the Subgraph Isomorphism Problem and Hamiltonian and SAT Problems Ivan Olmos, Jesus A. Gonzalez Instituto Nacional de Astrof´ ısica, ´ Optica y Electr ´ onica, Luis Enrique Erro No. 1, Sta. Mar´ ıa Tonantzintla, Puebla, M´ exico {iolmos,jagonzalez}@inaoep.mx Mauricio Osorio Universidad de las Am´ ericas Puebla Sta. Catarina M´ artir, Puebla, M´ exico josorio@mail.udlap.mx Abstract Subgraph isomorphism (SI) detection is an important problem for several computer science subfields. In this paper we present a study of the Subgraph Isomorphism Problem (SIP) and its relation with the Hamiltonian cy- cles and SAT problems. In particular, we describe how instances of those problems can be solved throughout SI detection (using problems reductions). In our exper- iments we use an algorithm developed by the authors, which is capable to find all valid mappings in a SI in- stance. We performed several experiments, including cases for which there exists a known solution in poly- nomial time. In our analysis, we show the advantage and disadvantage of using a SI representation to solve Hamiltonian cycles and SAT problems. Introduction Graphs are a powerful and flexible knowledge representa- tion used to model simple and complex structured domains (Cook & Holder 1994). The representation power and flex- ibility is the reason of why the graph-based representation model has been adopted by researchers in different areas such as Artificial Intelligence (AI) and Data Mining (Cook & Holder 1994; Kuramochi & Karypis 2002). For example, in Data Mining the SI detection is used to find similarities between objects (Cook & Holder 1994). An important problem in the graph theory framework is the graph / subgraph isomorphism detection. The core of the SI problem consists on finding the association (or map- ping) between the vertices and edges of the graphs to match. In general, the number of possible mappings increases ex- ponentially with respect to the graph dimension and den- sity (number of vertices and edges). The Subgraph Isomor- phism Problem is known to be in NP-complete (Michael & David 2003) then, in the worst case, the time to detect a sub- graph isomorphism is exponential, unless P = NP. However, if a problem is NP-complete, this means that only some in- stances fall in the worse case, but not necessarily all of them. In the case of the SI problem there exist subclasses of graphs for which it can be solved in polynomial-time. The SI problem can also be used to solve problems for which there exists a reduction into a SI instance (this trans- Copyright c 2006, American Association for Artificial Intelli- gence (www.aaai.org). All rights reserved. formation might not be evident). Examples of this are the transformation of the Hamiltonian circuit and SAT problems into SI instances, which are applied to solve important AI problems. As an example, Hamiltonian graphs can be used to design the shortest possible way for the interconectivity in a system. On the other hand, the SAT problem is fun- damental to solve many application problems in automated reasoning, machine vision, scheduling, computer network- ing, and so on. In this paper we describe the way in which instances of the SAT and Hamiltonian problems can be rep- resented and solved as SI instances, using an algorithm de- veloped by the authors (Olmos, Gonzalez, & Osorio 2005). This algorithm, called SI-COBRA, has been successfully applied in other theoretical and practical domains (for ex- ample, in collaboration with biology experts we are useing the SI-COBRA algorithm in genome databases in order to find low-complexity sequences). Fisrt, we introduce a general description of the SI problem and its variants. Next, an algorithm to solve the SI problem is presented. The next two sections describe the relation be- tween the SI problem and the SAT and hamiltonian prob- lems respectively (reductions between them). In the exper- iments section we show our experiments where some SAT and hamiltonian instances were solved with the SI problem and finally, we present our conclusions. The Subgraph Isomorphism Problem As mentioned before, graphs have been used in several re- search areas. Different authors define a graph with some variations, according to their requirements. In this work, we assume that a graph is a 6-tuple G =(V,E,L V ,L E , α, β), where: V = {v i |i =1,...,n}, is the finite set of vertices, V = E V xV , is the finite set of edges, E = {e = {v i ,v j }|v i ,v j V } L V , is a set of vertex labels L E , is a set of edge labels α : V L V , is a function assigning labels to the vertices β : E L E , is a function assigning labels to the edges This definition only describes undirected simple graphs, and we can represent labeled / unlabeled graphs (an unla- 17th International Conference on Electronics, Communications and Computers (CONIELECOMP'07) 0-7695-2799-X/07 $20.00 © 2007