Compact Representation for Answer Sets of n-ary Regular Queries

  • Kazuhiro Inaba
  • Haruo Hosoya
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5642)


An n-ary query over trees takes an input tree t and returns a set of n-tuples of the nodes of t. In this paper, a compact data structure is introduced for representing the answer sets of n-ary queries defined by tree automata. Despite that the number of the elements of the answer set can be as large as |t| n , our representation allows to store the set using only O(3 n |t|) space. Several basic operations on the sets are shown to be efficiently executable on the representation.


Regular Language Compact Representation Input Tree Tree Automaton Tree Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Hosoya, H., Pierce, B.C.: Regular expression pattern matching for XML. Journal of Functional Programming 13, 961–1004 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Thatcher, J.W., Wright, J.B.: Generalized finite automata theory with an application to a decision problem of second-order logic. Mathematical Systems Theory 2, 57–811 (1968)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Niwinski, D.: Fixed points vs. infinite generation. In: LICS, pp. 402–409 (1988)Google Scholar
  4. 4.
    Gottlob, G., Koch, C., Pichler, R.: Efficient algorithms for processing XPath queries. ACM Transactions on Database Systems 30, 444–491 (2005)CrossRefGoogle Scholar
  5. 5.
    Gottlob, G., Koch, C.: Monadic datalog and the expressive power of languages for Web information extraction. Journal of the ACM 51, 74–113 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Neven, F., Bussche, J.V.D.: Expressiveness of structured document query languages based on attribute grammars. Journal of the ACM 49, 56–100 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Meuss, H., Schulz, K.U., Bry, F.: Towards aggregated answers for semistructured data. In: Van den Bussche, J., Vianu, V. (eds.) ICDT 2001. LNCS, vol. 1973, pp. 346–360. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  8. 8.
    Filiot, E., Tison, S.: Regular n-ary queries in trees and variable independence. In: International Conference on Theoretical Computer Science (TCS), pp. 429–443 (2008)Google Scholar
  9. 9.
    Flum, J., Frick, M., Grohe, M.: Query evaluation via tree-decompositions. Journal of the ACM 49, 716–752 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Dietz, P.F.: Maintaining order in a linked list. In: STOC, pp. 122–127 (1982)Google Scholar
  11. 11.
    Inaba, K., Hosoya, H.: XML transformation language based on monadic second order logic. In: Programming Language Technologies for XML (PLAN-X), pp. 49–60 (2007)Google Scholar
  12. 12.
    Berlea, A., Seidl, H.: Binary queries for document trees. Nordic Journal of Computing 11, 41–71 (2004)MathSciNetzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Kazuhiro Inaba
    • 1
  • Haruo Hosoya
    • 1
  1. 1.The University of TokyoJapan

Personalised recommendations