English

New and Improved Algorithms for Unordered Tree Inclusion

Data Structures and Algorithms 2021-06-16 v2

Abstract

The tree inclusion problem is, given two node-labeled trees PP and TT (the ``pattern tree'' and the ``target tree''), to locate every minimal subtree in TT (if any) that can be obtained by applying a sequence of node insertion operations to PP. Although the ordered tree inclusion problem is solvable in polynomial time, the unordered tree inclusion problem is NP-hard. The currently fastest algorithm for the latter is a classic algorithm by Kilpel\"{a}inen and Mannila from 1995 that runs in O(22dmn)O(2^{2d} mn) time, where mm and nn are the sizes of the pattern and target trees, respectively, and dd is the degree of the pattern tree. Here, we develop a new algorithm that runs in O(2dmn2)O(2^{d} mn^2) time, improving the exponential factor from 22d2^{2d} to 2d2^d by considering a particular type of ancestor-descendant relationships that is suitable for dynamic programming. We also study restricted variants of the unordered tree inclusion problem.

Keywords

Cite

@article{arxiv.1712.05517,
  title  = {New and Improved Algorithms for Unordered Tree Inclusion},
  author = {Tatsuya Akutsu and Jesper Jansson and Ruiming Li and Atsuhiro Takasu and Takeyuki Tamura},
  journal= {arXiv preprint arXiv:1712.05517},
  year   = {2021}
}

Comments

22 pages, 9 figures. To appear in Theoretical Computer Science

R2 v1 2026-06-22T23:18:48.663Z