The Position Heap of a Trie

  • Yuto Nakashima
  • Tomohiro I
  • Shunsuke Inenaga
  • Hideo Bannai
  • Masayuki Takeda
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7608)


The position heap is a text indexing structure for a single text string, recently proposed by Ehrenfeucht et al. [Position heaps: A simple and dynamic text indexing data structure, Journal of Discrete Algorithms, 9(1):100-121, 2011]. In this paper we introduce the position heap for a set of strings, and propose an efficient algorithm to construct the position heap for a set of strings which is given as a trie. For a fixed alphabet our algorithm runs in time linear in the size of the trie. We also show that the position heap can be efficiently updated after addition/removal of a leaf of the input trie.


Edge Label Edit Operation Text Indexing Single String Reversed Trie 
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.
    Alstrup, S., Holm, J., de Lichtenberg, K., Thorup, M.: Maintaining information in fully dynamic trees with top trees. ACM Transactions on Algorithms 1(2), 243–264 (2005)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Amir, A., Farach, M., Idury, R.M., La Poutré, J.A., Schäffer, A.A.: Improved dynamic dictionary matching. Information and Computation 119(2), 258–282 (1995)MathSciNetzbMATHCrossRefGoogle Scholar
  3. 3.
    Bender, M.A., Farach-Colton, M.: The level ancestor problem simplified. Theor. Comput. Sci. 321(1), 5–12 (2004)MathSciNetzbMATHCrossRefGoogle Scholar
  4. 4.
    Berkman, O., Vishkin, U.: Finding level-ancestors in trees. J. Comput. Syst. Sci. 48(2), 214–230 (1994)MathSciNetzbMATHCrossRefGoogle Scholar
  5. 5.
    Blumer, A., Blumer, J., Haussler, D., Mcconnell, R., Ehrenfeucht, A.: Complete inverted files for efficient text retrieval and analysis. J. ACM 34(3), 578–595 (1987)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Blumer, A., Blumer, J., Haussler, D., Ehrenfeucht, A., Chen, M.T., Seiferas, J.: The smallest automaton recognizing the subwords of a text. Theoret. Comput. Sci. 40, 31–55 (1985)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Breslauer, D.: The suffix tree of a tree and minimizing sequential transducers. Theoretical Computer Science 191(1-2), 131–144 (1998)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Coffman, E., Eve, J.: File structures using hashing functions. Communications of the ACM 13, 427–432 (1970)zbMATHCrossRefGoogle Scholar
  9. 9.
    Ehrenfeucht, A., McConnell, R.M., Osheim, N., Woo, S.-W.: Position heaps: A simple and dynamic text indexing data structure. Journal of Discrete Algorithms 9(1), 100–121 (2011)MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Inenaga, S., Hoshino, H., Shinohara, A., Takeda, M., Arikawa, S., Mauri, G., Pavesi, G.: On-line construction of compact directed acyclic word graphs. Discrete Applied Mathematics 146(2), 156–179 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Kärkkäinen, J., Sanders, P., Burkhardt, S.: Linear work suffix array construction. J. ACM 53(6), 918–936 (2006)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Kosaraju, S.R.: Efficient tree pattern matching. In: Proc. FOCS 1989, pp. 178–183 (1989)Google Scholar
  13. 13.
    Kucherov, G.: On-Line Construction of Position Heaps. In: Grossi, R., Sebastiani, F., Silvestri, F. (eds.) SPIRE 2011. LNCS, vol. 7024, pp. 326–337. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  14. 14.
    Manber, U., Myers, G.: Suffix arrays: A new method for on-line string searches. SIAM J. Computing 22(5), 935–948 (1993)MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    Shibuya, T.: Constructing the suffix tree of a tree with a large alphabet. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences E86-A(5), 1061–1066 (2003)Google Scholar
  16. 16.
    Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)MathSciNetzbMATHCrossRefGoogle Scholar
  17. 17.
    Weiner, P.: Linear pattern-matching algorithms. In: Proc. of 14th IEEE Ann. Symp. on Switching and Automata Theory, pp. 1–11 (1973)Google Scholar
  18. 18.
    Westbrook, J.: Fast Incremental Planarity Testing. In: Kuich, W. (ed.) ICALP 1992. LNCS, vol. 623, pp. 342–353. Springer, Heidelberg (1992)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Yuto Nakashima
    • 1
  • Tomohiro I
    • 1
    • 2
  • Shunsuke Inenaga
    • 1
  • Hideo Bannai
    • 1
  • Masayuki Takeda
    • 1
  1. 1.Department of InformaticsKyushu UniversityJapan
  2. 2.Japan Society for the Promotion of Science (JSPS)Japan

Personalised recommendations