Skip to main content
Log in

Tree inclusions in windows and slices

  • Published:
Journal of Mathematical Sciences Aims and scope Submit manuscript

A labelled tree P is an embedded subtree of a labelled tree T if P can be obtained by deleting some nodes from T: if a node v is deleted, all edges adjacent to v are also deleted and replaced by edges going from the parent of v (if it exists) to the children of v. Deciding whether P is an embedded subtree of T is known to be NP-complete. Given two trees (a target T and a pattern P) and a natural number w, we address two problems: 1) counting the number of windows of T having height exactly w and containing the pattern P as an embedded subtree, and 2) counting the number of slices of T having height exactly w and containing the pattern P as an embedded subtree. Our algorithms run in time O(|T|(wh(P)+2)4|P|), where |T| (respectively, |P|) is the size of T (respectively, P), and h(P) is the height of P. Bibliography: 10 titles.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. P. Bille, “A survey on tree edit distance and related problems,” Theoret. Comput. Sci., 337, 217–239 (2005).

    Article  MATH  MathSciNet  Google Scholar 

  2. L. Boasson, P. Cegielski, I. Guessarian, and Yu. Matiyasevich, “Window accumulated subsequence matching is linear,” Ann. Pure Appl. Logic, 113, 59–80 (2001).

    Article  MathSciNet  Google Scholar 

  3. P. Cegielski, I. Guessarian, and Yu. Matiyasevich, “Tree inclusion problems,” RAIRO, 42, No. 1, 5–20 (2008).

    MATH  MathSciNet  Google Scholar 

  4. P. Cegielski, I. Guessarian, Yu. Lifshits, and Yu. Matiyasevich, “Window subsequence problems for compressed texts,” CSR’06, Lect. Notes Comput. Sci., 3697, 127–136 (2006).

    Article  MathSciNet  Google Scholar 

  5. Y. Chi, R. Muntz, S. Nijssen, and J. Kok, “Frequent subtree mining — an overview,” Fund. Inform., 66, 161–198 (2005).

    MATH  MathSciNet  Google Scholar 

  6. A. Durand and E. Grandjean, “First-order queries on structures of bounded degree are computable with constant delay,” ACM Trans. Comput. Log., 8, No. 4 (2007).

    Google Scholar 

  7. J. Flum and M. Grohe, Parameterized Complexity Theory, Springer-Verlag, Berlin (2006).

    Google Scholar 

  8. C. Hoffmann and M. O’Donnell, “Pattern matching in trees,” J. ACM, 28, No. 1, 68–95 (1982).

    Article  MathSciNet  Google Scholar 

  9. P. Kilpelainen, “Tree matching problems with applications to structured text databases,” PhD Thesis, Helsinki (1992), http://thesis.helsinki.fi/julkaisut/mat/tieto/vk/kilpelainen/ .

  10. P. Kilpelainen and H. Mannila, “Ordered and unordered tree inclusion,” SIAM J. Comput., 24, No. 2 B, 340–356 (1995).

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to I. Guessarian.

Additional information

Dedicated to Yu. Matiyasevich on the occasion of his 60th birthday.

Published in Zapiski Nauchnykh Seminarov POMI, Vol. 358, 2008, pp. 3–53.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Guessarian, I., Cégielski, P. Tree inclusions in windows and slices. J Math Sci 158, 623–632 (2009). https://doi.org/10.1007/s10958-009-9401-7

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10958-009-9401-7

Keywords

Navigation