Table of Contents
Fetching ...

Largest common subgraph of two forests

Dieter Rautenbach, Florian Werner

Abstract

A common subgraph of two graphs $G_1$ and $G_2$ is a graph that is isomorphic to subgraphs of $G_1$ and $G_2$. In the largest common subgraph problem the task is to determine a common subgraph for two given graphs $G_1$ and $G_2$ that is of maximum possible size ${\rm lcs}(G_1,G_2)$. This natural problem generalizes the well-studied graph isomorphism problem, has many applications, and remains NP-hard even restricted to unions of paths. We present a simple $4$-approximation algorithm for forests, and, for every fixed $ε\in (0,1)$, we show that, for two given forests $F_1$ and $F_2$ of order at most $n$, one can determine in polynomial time a common subgraph $F$ of $F_1$ and $F_2$ with at least ${\rm lcs}(F_1,F_2)-εn$ edges. Restricted to instances with ${\rm lcs}(F_1,F_2)\geq cn$ for some fixed positive $c$, this yields a polynomial time approximation scheme. Our approach relies on the approximation of the given forests by structurally simpler forests that are composed of copies of only $O(\log (n))$ different starlike rooted trees and iterative quantizations of the options for the solutions.

Largest common subgraph of two forests

Abstract

A common subgraph of two graphs and is a graph that is isomorphic to subgraphs of and . In the largest common subgraph problem the task is to determine a common subgraph for two given graphs and that is of maximum possible size . This natural problem generalizes the well-studied graph isomorphism problem, has many applications, and remains NP-hard even restricted to unions of paths. We present a simple -approximation algorithm for forests, and, for every fixed , we show that, for two given forests and of order at most , one can determine in polynomial time a common subgraph of and with at least edges. Restricted to instances with for some fixed positive , this yields a polynomial time approximation scheme. Our approach relies on the approximation of the given forests by structurally simpler forests that are composed of copies of only different starlike rooted trees and iterative quantizations of the options for the solutions.
Paper Structure (3 sections, 6 theorems, 44 equations, 4 figures)

This paper contains 3 sections, 6 theorems, 44 equations, 4 figures.

Key Result

Theorem 1

For two given forests $F_1$ and $F_2$ of order $n$, one can determine a common subgraph $F$ of $F_1$ and $F_2$ with in time $n^{O(1)}$.

Figures (4)

  • Figure 1: A component $K$ with root $r_K$ of an $(\epsilon,\Delta)$-clean forest $F$. Note that we consider the components $L$ of $K-r_K$ as trees rooted in the neighbor of $r_K$ in $V(L)$, which means that we distinguish isomorphic components of $K-r_K$ that are attached differently to the root $r_K$. The figure shows five isomorphic components of $K-r_K$, two of which are attached to $r_k$ at their unique vertex of degree $2$ and three are attached to $r_k$ differently.
  • Figure 2: A common subgraph $F$ of $F_1$ and $F_2$ as a spanning subgraph of $F_1$ together with a corresponding bijection $f:V(F_1)\to V(F_2)$. The forest $f(F)$ with vertex set $V(F_2)$ and edge set $\{ f(x)f(y):xy\in E(F)\}$ is a spanning subgraph of $F_2$. Note that $F_f$ contains strictly more edges than $F$; the edge $uf^{-1}(v)$ of $F_1$ belongs to $F_f$, because the edge $f(u)v$ belongs to $F_2$. Up to isomorphism, $F$ is described by the multiplicities of its components; it consists of $4$ copies of $T_p$, $3$ copies of $K_2$, and $3$ copies of $P_3$. Note that there are two non-isomorphic ways to choose a root for $P_3$.
  • Figure 3: Subgraphs $A_{0,1}$ and $A_1$ of $T_{j_1}\subseteq F_1$ (on the left) and $A_{0,2}$ and $A_2$ of $T_{j_2}\subseteq F_2$ (on the right) for some $x=(j_1,j_2,A_0,A_1,A_2)$ in $X$. Note that there are different isomorphic copies of $A_0$ within $T_{j_1}$ and $T_{j_2}$ containing their roots, which lead to different possibilities for the subforests $A_1$ and $A_2$, completely specified up to isomorphism by the considered $5$-tupels.
  • Figure 4: The figure illustrates part of the information encoded by $M=(s(i_1,i_2,k))_{(i_1,i_2,k)}$ as a bipartite graph $G$. One partite set of $G$ --- shown in the upper half --- corresponds to $F_1$ and contains a vertex for each component of $F_1$. Similarly for the other partite set shown in the lower half corresponding to $F_2$. In the upper partite set, there are $s_{1,i_1}$ vertices corresponding to copies of $S_{i_1}$. The edges of $G$ encode which root vertices of components of $F_1$ can be mapped onto which root vertices of components of $F_2$. Since we aim for a nice common subgraph, the edges of $G$ reflect $c_2=2$.

Theorems & Definitions (12)

  • Theorem 1
  • Theorem 2
  • Lemma 3
  • proof
  • proof : Proof of Theorem \ref{['theorem1']}
  • Lemma 4
  • proof
  • Lemma 5
  • proof
  • Lemma 6
  • ...and 2 more