On the tree inclusion problem
We consider the following problem: Given ordered labeled trees S and T can S be obtained from T by deleting nodes ? Deletion of the root node u of a subtree with children (T1,..., Tn) means replacing the subtree by the trees T1,...,Tn. For the tree inclusion problem,there can generally be exponentially many ways to obtain the included tree. Recently, P.Kilpeläinen and H.Mannila [KM] gave an algorithm based on dynamic programming requiring O(¦ S ¦ · ¦ T ¦) time and space in the worst case and also on the average. We give a new algorithm which improves the previous one on the average and breaks the ¦ S ¦ · ¦ T ¦ barrier.
KeywordsEditing Distance Label Tree Average Complexity Inclusion Search Cost Editing
Unable to display preview. Download preview PDF.
- [AS]L.Alonso, R.Schott, On the tree inclusion, preprint.Google Scholar
- [CPT]J.Cai, R.Paige, R.Tarjan, More efficient bottom-up tree pattern matching, Proc. CAAP'90, LNCS 431, 72–86.Google Scholar
- [HD]C.M.Hoffman, M.J.O'Donnell, Pattern matching in trees, J.A.C.M., 29, 1, 68–95, 1992.Google Scholar
- [KM]P.Kilpeläinen, H.Mannila, The tree inclusion problem, CAAP 91, LNCS 493, 202–214, 1991.Google Scholar
- [KNU]D.E.Knuth, The art of computer programming, Fundamental Algorithms, 1, Addison Wesley, 1973.Google Scholar
- [ZS1]K.Zhang, D.Shasha, Simple fast algorithms for editing distance between trees and related problems, SIAM Journal of Computing, 18, 1245–1262, 1989Google Scholar
- [ZS2]K.Zhang, D.Shasha, Fast Algorithms for the Unit Cost Editing Distance between Trees, Journal of Algorithms 11, 581–621, 1990Google Scholar