International Workshop on Combinatorial Algorithms

IWOCA 2014: Combinatorial Algorithms pp 338-350 | Cite as

A Suffix Tree Or Not a Suffix Tree?

  • Tatiana Starikovskaya
  • Hjalte Wedel VildhøjEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8986)


In this paper we study the structure of suffix trees. Given an unlabeled tree \(\tau \) on n nodes and suffix links of its internal nodes, we ask the question “Is \(\tau \) a suffix tree?", i.e., is there a string S whose suffix tree has the same topological structure as \(\tau \)? We place no restrictions on S, in particular we do not require that S ends with a unique symbol. This corresponds to considering the more general definition of implicit or extended suffix trees. Such general suffix trees have many applications and are for example needed to allow efficient updates when suffix trees are built online. We prove that \(\tau \) is a suffix tree if and only if it is realized by a string S of length \(n-1\), and we give a linear-time algorithm for inferring S when the first letter on each edge is known. This generalizes the work of I et al. [Discrete Appl. Math. 163, 2014].


Internal Node Suffix Tree Internal Edge Suffix Array Leaf Edge 
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.


  1. 1.
    Apostolico, A., Crochemore, M., Farach-Colton, M., Galil, Z., Muthukrishnan, S.: Forty years of text indexing. In: Fischer, J., Sanders, P. (eds.) CPM 2013. LNCS, vol. 7922, pp. 1–10. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  2. 2.
    Bannai, H., Inenaga, S., Shinohara, A., Takeda, M.: Inferring strings from graphs and arrays. In: Rovan, B., Vojtáš, P. (eds.) MFCS 2003. LNCS, vol. 2747, pp. 208–217. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  3. 3.
    Breslauer, D., Hariharan, R.: Optimal parallel construction of minimal suffix and factor automata. Parallel Process. Lett. 06(01), 35–44 (1996)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Breslauer, D., Italiano, G.F.: On suffix extensions in suffix trees. Theor. Comp. Sci. 457, 27–34 (2012)zbMATHMathSciNetCrossRefGoogle Scholar
  5. 5.
    Cazaux, B., Rivals, E.: Reverse engineering of compact suffix trees and links: a novel algorithm. J. Discrete Algorithms 28, 9–22 (2014)zbMATHMathSciNetCrossRefGoogle Scholar
  6. 6.
    Clément, J., Crochemore, M., Rindone, G.: Reverse engineering prefix tables. In: Proceedings of the 26th STACS, pp. 289–300 (2009)Google Scholar
  7. 7.
    Crochemore, M., Iliopoulos, C.S., Pissis, S.P., Tischler, G.: Cover array string reconstruction. In: Amir, A., Parida, L. (eds.) CPM 2010. LNCS, vol. 6129, pp. 251–259. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  8. 8.
    Duval, J.P., Lecroq, T., Lefebvre, A.: Border array on bounded alphabet. J. Autom. Lang. Comb. 10(1), 51–60 (2005)zbMATHMathSciNetGoogle Scholar
  9. 9.
    Duval, J.P., Lecroq, T., Lefebvre, A.: Efficient validation and construction of border arrays and validation of string matching automata. RAIRO Theor. Inform. Appl. 43, 281–297 (2009)zbMATHMathSciNetCrossRefGoogle Scholar
  10. 10.
    Duval, J.P., Lefebvre, A.: Words over an ordered alphabet and suffix permutations. RAIRO Theor. Inform. Appl. 36(3), 249–259 (2002)zbMATHMathSciNetCrossRefGoogle Scholar
  11. 11.
    Gawrychowski, P., Jeż, A., Jeż, Ł.: Validating the Knuth-Morris-Pratt failure function, fast and online. Theory Comput. Syst. 54(2), 337–372 (2014)CrossRefGoogle Scholar
  12. 12.
    Gusfield, D.: Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. Cambridge University Press, New York (1997) zbMATHCrossRefGoogle Scholar
  13. 13.
    I, T., Inenaga, S., Bannai, H., Takeda, M.: Verifying and enumerating parameterized border arrays. Theor. Comput. Sci. 412(50), 6959–6981 (2011)zbMATHMathSciNetCrossRefGoogle Scholar
  14. 14.
    I, T., Inenaga, S., Bannai, H., Takeda, M.: Counting parameterized border arrays for a binary alphabet. In: Dediu, A.H., Ionescu, A.M., Martín-Vide, C. (eds.) LATA 2009. LNCS, vol. 5457, pp. 422–433. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  15. 15.
    I., Tomohiro, Inenaga, Shunsuke, Bannai, Hideo, Takeda, Masayuki: Verifying a Parameterized Border Array in O(n \(^\text{1.5 }\)) Time. In: Amir, Amihood, Parida, Laxmi (eds.) CPM 2010. LNCS, vol. 6129, pp. 238–250. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  16. 16.
    I, T., Inenaga, S., Bannai, H., Takeda, M.: Inferring strings from suffix trees and links on a binary alphabet. Discrete Appl. Math. 163, 316–325 (2014)MathSciNetCrossRefGoogle Scholar
  17. 17.
    Kucherov, G., Tóthmérész, L., Vialette, S.: On the combinatorics of suffix arrays. Inf. Process. Lett. 113(22–24), 915–920 (2013)zbMATHCrossRefGoogle Scholar
  18. 18.
    Lu, W., Ryan, P.J., Smyth, W.F., Sun, Y., Yang, L.: Verifying a border array in linear time. J. Comb. Math. Comb. Comput. 42, 223–236 (2002)zbMATHMathSciNetCrossRefGoogle Scholar
  19. 19.
    Starikovskaya, T., Vildhøj, H.W.: A suffix tree or not a suffix tree. arXiv (2014).
  20. 20.
    Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)zbMATHMathSciNetCrossRefGoogle Scholar
  21. 21.
    Weiner, P.: Linear pattern matching algorithms. In: Proceedings of the 14th FOCS (SWAT), pp. 1–11 (1973)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.National Research University Higher School of Economics (HSE)MoscowRussia
  2. 2.DTU ComputeTechnical University of DenmarkKongens LyngbyDenmark

Personalised recommendations