A polynomial time matching algorithm of ordered tree patterns having height-constrained variables

  • Authors:
  • Kazuhide Aikou;Yusuke Suzuki;Takayoshi Shoudai;Tomoyuki Uchida;Tetsuhiro Miyahara

  • Affiliations:
  • Department of Informatics, Kyushu University, Kasuga, Japan;Department of Informatics, Kyushu University, Kasuga, Japan;Department of Informatics, Kyushu University, Kasuga, Japan;Faculty of Information Sciences, Hiroshima City University, Hiroshima, Japan;Faculty of Information Sciences, Hiroshima City University, Hiroshima, Japan

  • Venue:
  • CPM'05 Proceedings of the 16th annual conference on Combinatorial Pattern Matching
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Tree structured data such as HTML/XML files are represented by rooted trees with ordered children and edge labels. Knowledge representations for tree structured data are quite important to discover interesting features which such tree structured data have. In order to represent tree structured patterns with rich structural features, we introduce a new type of structured variables, called height-constrained variables. An (i,j)-height-constrained variable can be replaced with any tree such that the trunk length of the tree is at least i and the height of the tree is at most j. Then, we define a term tree as a rooted tree structured pattern with ordered children and height-constrained variables. In this paper, given a term tree t and an ordered tree T, we present an $O(N\max\{nD_{\max},{\cal S}\})$ time algorithm of deciding whether or not t matches T, where D max is the maximum number of the children of an internal vertex in T, ${\cal S}$ is the sum of all trunk length constraints i of all (i,j)-height-constrained variables in t, and n and N are the numbers of vertices of t and T, respectively.