The maximum common subtree isomorphism problem asks for the largest possible isomorphism between subtrees of two given input trees. This problem is a natural restriction of the maximum common subgraph problem, which is NP-hard in general graphs. Confining to trees renders polynomial time algorithms possible and is of fundamental importance for approaches on more general graph classes.Various variants of this problem in trees have been intensively studied. We consider the general case, where trees are neither rooted nor ordered and the isomorphism is maximum w.r.t. a weight function on the mapped vertices and edges. For trees of order n and maximum degree Delta our algorithm achieves a running time of O(n^2*Delta) by exploiting the structure of the matching instances arising as subproblems. Thus our algorithm outperforms the best previously known approaches. No faster algorithm is possible for trees of bounded degree and for trees of unbounded degree we show that a further reduction of the running time would directly improve the best known approach to the assignment problem. Combining a polynomial-delay algorithm for the enumeration of all maximum common subtree isomorphisms with central ideas of our new algorithm leads to an improvement of its running time from O(n^6+T*n^2) to O(n^3+T*n*Delta), where n is the order of the larger tree, T is the number of different solutions, and Delta is the minimum of the maximum degrees of the input trees. Our theoretical results are supplemented by an experimental evaluation on synthetic and real-world instances.
展开▼
机译:最大公共子树同构问题要求两个给定输入树的子树之间的最大同构问题。此问题是对最大公共子图问题的自然限制,在一般图中,这是NP-hard的。限于树使多项式时间算法成为可能,并且对于更一般的图类的方法至关重要。我们考虑一般情况,即树既不生根也不有序,同构最大。映射的顶点和边上的权重函数。对于n阶和最大度数Delta的树,我们的算法通过利用作为子问题出现的匹配实例的结构来获得O(n ^ 2 * Delta)的运行时间。因此,我们的算法优于以前最好的已知方法。对于有界度的树,没有更快的算法是不可能的;对于无界度的树,我们表明,进一步减少运行时间将直接改善解决分配问题的最佳方法。将多项式延迟算法(用于枚举所有最大公共子树最大同构性)与我们新算法的中心思想相结合,可以将其运行时间从O(n ^ 6 + T * n ^ 2)缩短到O(n ^ 3 + T * n * Delta),其中n是大树的阶数,T是不同解的数量,而Delta是输入树的最大度数的最小值。通过对合成实例和真实实例的实验评估来补充我们的理论结果。
展开▼