Bit-Parallel Tree Pattern Matching Algorithms for Unordered Labeled Trees

  • Authors:
  • Hiroaki Yamamoto;Daichi Takenouchi

  • Affiliations:
  • Department of Information Engineering, Shinshu University, Japan 380-8553;NTT Advanced Technology Corporation,

  • Venue:
  • WADS '09 Proceedings of the 11th International Symposium on Algorithms and Data Structures
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

The following tree pattern matching problem is considered: Given two unordered labeled trees P and T , find all occurrences of P in T . Here P and T are called a pattern tree and a target tree , respectively. We first introduce a new problem called the pseudo-tree pattern matching problem . Then we show two efficient bit-parallel algorithms for the pseudo-tree pattern matching problem. One runs in $O(L_P\cdot n\cdot l\cdot \lceil \frac{h}{W}\rceil)$ time and $O(n\cdot l\cdot \lceil \frac{h}{W}\rceil)$ space, and another one runs in $O((L_P\cdot n+h\cdot 2^l)\cdot \lceil \frac{h\cdot l}{W}\rceil)$ time and $O((n+h\cdot 2^l)\cdot \lceil \frac{h\cdot l}{W}\rceil)$ space, where n is the number of nodes in T , h and l are the height of P and the number of leaves of P , respectively, and W is the length of a computer-word. The parameter L P , called a recursive level of P , is defined to be the number of occurrences of the same label on a path from the root to a leaf. Hence we have L P ≤ h . Finally, we give an algorithm to extract all occurrences from pseud-occurrences in $O(n\cdot L_P\cdot l^{3/2})$ time and O (n ·L P ·l ) space.