🤖 AI Summary
This work addresses the problem of efficiently matching highly constrained patterns in unordered child trees—such as abstract syntax trees or chemical structures—by introducing a novel formalism called "unordered item tree patterns." For the first time, this framework incorporates variables that bound both the length of the pattern backbone and the height of subtrees, enabling a precise characterization of the matching task. Leveraging tools from graph theory and combinatorial optimization, the authors devise a polynomial-time algorithm with a time complexity of \(O(N \cdot \max\{nD^{3/2}, \mathcal{S}\})\), where \(N\) denotes the size of the input tree, \(n\) and \(D\) relate to pattern structure, and \(\mathcal{S}\) captures the solution space size. Empirical evaluation on real-world datasets demonstrates the algorithm’s efficiency and scalability, confirming its suitability for large-scale pattern matching in unordered tree structures.
📝 Abstract
Unordered trees appear in applications where the order among child vertices is insignificant, such as abstract syntax trees and chemical structures. To describe patterns in such trees, we propose unordered term tree patterns, which employ height-constrained variables that restrict trunk length and subtree height. We formalize the pattern matching problem between an unordered term tree pattern and an unordered tree, and present an $O(N \cdot \max\{nD^{3/2}, \mathcal{S}\})$-time algorithm, where $n$ and $N$ are the numbers of vertices in the pattern and tree, $D$ is the maximum vertex degree, and $\mathcal{S}$ is the sum of trunk constraints. Computational results show that the algorithm runs efficiently in practice.