Tree template matching in unranked ordered trees

被引:1
|
作者
Christou, Michalis [2 ]
Flouri, Tomas [1 ]
Iliopoulos, Costas S. [2 ,3 ]
Janousek, Jan [1 ]
Melichar, Borivoj [1 ]
Pissis, Solon P. [4 ,5 ]
Zd'arek, Jan [1 ]
机构
[1] Czech Tech Univ, Dept Theoret Comp Sci, Prague, Czech Republic
[2] Kings Coll London, Dept Informat, London, England
[3] Univ Western Australia, Dept Math & Stat, Perth, WA, Australia
[4] Heidelberg Inst Theoret Studies, Heidelberg, Germany
[5] Univ Florida, Florida Museum Nat Hist, Gainesville, FL 32611 USA
关键词
Tree pattern matching; Tree template matching; Algorithms on strings;
D O I
10.1016/j.jda.2013.02.001
中图分类号
O29 [应用数学];
学科分类号
070104 ;
摘要
We consider the problem of tree template matching, a type of tree pattern matching, where the tree templates have some of their leaves denoted as "don't care", and propose a solution based on the bottom-up technique. Specifically, we transform the tree pattern matching problem for unranked ordered trees to a string matching problem, by transforming the tree template and the subject tree to strings representing their postfix bar notation, and then propose a table-driven algorithm to solve it. The proposed algorithm is divided into two phases: the preprocessing and the searching phase. The tree template is preprocessed once, and the searching phase can be applied to many subject trees, without the need of preprocessing the tree template again. Although we prove that the space required for preprocessing is exponential in the size of the tree template in the worst case, we show that for a specific class of tree templates, the space required is linear in the size of the tree template. The time for the searching phase is linear in the size of the subject tree in the worst case. Thus, the algorithm is asymptotically optimal when one needs to search for a given tree template, of constant to logarithmic size, in many subject trees. (C) 2013 Elsevier B.V. All rights reserved.
引用
收藏
页码:51 / 60
页数:10
相关论文
共 50 条
  • [1] Tree Template Matching in Ranked Ordered Trees by Pushdown Automata
    Flouri, Tomas
    Janousek, Jan
    Melichar, Borivoj
    Iliopoulos, Costas S.
    Pissis, Solon P.
    [J]. IMPLEMENTATION AND APPLICATION OF AUTOMATA, 2011, 6807 : 273 - +
  • [2] Tree template matching in ranked ordered trees by pushdown automata
    Flouri, Tomas
    Iliopoulos, Costas S.
    Janousek, Jan
    Melichar, Borivoj
    Pissis, Solon P.
    [J]. JOURNAL OF DISCRETE ALGORITHMS, 2012, 17 : 15 - 23
  • [3] Minimizing tree automata for unranked trees
    Martens, W
    Niehren, J
    [J]. DATABASE PROGRAMMING LANGUAGES, 2005, 3774 : 232 - +
  • [4] Querying unranked trees with stepwise tree automata
    Carme, J
    Niehren, J
    Tommasi, M
    [J]. REWRITING TECHNIQUES AND APPLICATIONS, PROCEEDINGS, 2004, 3091 : 105 - 118
  • [5] On the minimization of XML Schemas and tree automata for unranked trees
    Martens, Wim
    Niehren, Joachim
    [J]. JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 2007, 73 (04) : 550 - 583
  • [6] Indexing Ordered Trees for (Nonlinear) Tree Pattern Matching by Pushdown Automata
    Travnicek, Jan
    Janousek, Jan
    Melichar, Borivoj
    [J]. COMPUTER SCIENCE AND INFORMATION SYSTEMS, 2012, 9 (03) : 1125 - 1153
  • [7] ORDERED SEARCH TECHNIQUES IN TEMPLATE MATCHING
    NAGEL, RN
    ROSENFELD, A
    [J]. PROCEEDINGS OF THE INSTITUTE OF ELECTRICAL AND ELECTRONICS ENGINEERS, 1972, 60 (02): : 242 - +
  • [8] Combination of context-free grammars and tree automata for unranked and ranked trees
    Fujiyoshi, Akio
    [J]. IMPLEMENTATION AND APPLICATION OF AUTOMATA, PROCEEDINGS, 2008, 5148 : 283 - 285
  • [9] LOGICS FOR UNRANKED TREES: AN OVERVIEW
    Libkin, Leonid
    [J]. LOGICAL METHODS IN COMPUTER SCIENCE, 2006, 2 (03)
  • [10] Logics for unranked trees: An overview
    Libkin, L
    [J]. AUTOMATA, LANGUAGES AND PROGRAMMING, PROCEEDINGS, 2005, 3580 : 35 - 50