🤖 AI Summary
This study addresses the matching problem for unordered tree patterns under generalized height constraints, relaxing the conventional restriction that variables may only bind to leaf nodes by allowing their child ports to map to any non-root node in the binding tree. To this end, we introduce a more general variable-binding model with height constraints and present, for the first time, a polynomial-time matching algorithm for this setting. By reducing the problem to a graph isomorphism subproblem and integrating efficient tree pattern matching techniques, the proposed method demonstrates superior performance both theoretically and empirically, confirming its practical efficiency and feasibility.
📝 Abstract
Unordered trees are useful for modeling hierarchical structures in which the order among siblings is irrelevant. To represent flexible structural patterns in such data, unordered term tree patterns with height-constrained variables provide a natural framework. In our previous work, we studied the pattern matching problem for rooted unordered term tree patterns with height-constrained variables under the restriction that the child port of each variable must correspond to a leaf of a binding tree. In this paper, we remove this restriction and generalize the binding model so that the child port may correspond to any non-root vertex of a binding tree. Under generalized bindings, we formulate the corresponding membership problem and present a polynomial-time pattern matching algorithm. We also implement the proposed algorithm and conduct computational experiments to evaluate its running time. The experimental results show that the proposed method achieves practical running times.