Universal Reconstruction of a String

  • Paweł Gawrychowski
  • Tomasz Kociumaka
  • Jakub Radoszewski
  • Wojciech Rytter
  • Tomasz Waleń
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9214)


Many properties of a string can be viewed as sets of dependencies between substrings of the string expressed in terms of substring equality. We design a linear-time algorithm which finds a solution to an arbitrary system of such constraints: a generic string satisfying a system of substring equations. This provides a general tool for reconstructing a string from different kinds of repetitions or symmetries present in the string, in particular, from runs or from maximal palindromes. The recursive structure of our algorithm in some aspects resembles the suffix array construction by Kärkkäinen and Sanders (J. ACM, 2006).


Priority Queue Reduction Rule Suffix Array Recovery Problem Span Forest 
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.
    Alatabbi, A., Rahman, M.S., Smyth, W.: Inferring an indeterminate string from a prefix graph. J. of Discrete Algorithms (2014)Google Scholar
  2. 2.
    Bannai, H., Tomohiro, I., Inenaga, S., Nakashima, Y., Takeda, M., Tsuruta, K.: The “runs” theorem. ArXiv e-prints 1406.0263v6 (2015)Google Scholar
  3. 3.
    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
  4. 4.
    Blanchet-Sadri, F., Bodnar, M., Winkle, B.D.: New bounds and extended relations between prefix arrays, border arrays, undirected graphs, and indeterminate strings. In: Mayr, E.W., Portier, N. (eds.) Symposium on Theoretical Aspects of Computer Science. LIPIcs, vol. 25, pp. 162–173. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2014)Google 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)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Christodoulakis, M., Ryan, P.J., Smyth, W.F., Wang, S.: Indeterminate strings, prefix arrays & undirected graphs. ArXiv e-prints 1406.3289 (2014)Google Scholar
  7. 7.
    Clément, J., Crochemore, M., Rindone, G.: Reverse engineering prefix tables. In: Albers, S., Marion, J.Y. (eds.) Symposium on Theoretical Aspects of Computer Science. LIPIcs, vol. 3, pp. 289–300. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2009)Google Scholar
  8. 8.
    Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings. Cambridge University Press, Cambridge (2007) CrossRefzbMATHGoogle Scholar
  9. 9.
    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
  10. 10.
    Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific (2003)Google Scholar
  11. 11.
    Duval, J., Lecroq, T., Lefebvre, A.: Border array on bounded alphabet. Journal of Automata, Languages and Combinatorics 10(1), 51–60 (2005)MathSciNetzbMATHGoogle Scholar
  12. 12.
    Duval, J., Lecroq, T., Lefebvre, A.: Efficient validation and construction of border arrays and validation of string matching automata. RAIRO-Theor. Inf. Appl. 43(02), 281–297 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Franek, F., Gao, S., Lu, W., Ryan, P., Smyth, W., Sun, Y., Yang, L.: Verifying a border array in linear time. J. on Combinatorial Mathematics and Combinatorial Computing 42, 223–236 (2002)MathSciNetzbMATHGoogle Scholar
  14. 14.
    Fredman, M.L., Willard, D.E.: Trans-dichotomous algorithms for minimum spanning trees and shortest paths. J. Comput. Syst. Sci. 48(3), 533–551 (1994)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Gawrychowski, P., Jeż, A., Jeż, P.: Validating the Knuth-Morris-Pratt failure function, fast and online. Theor. Comput. Syst. 54(2), 337–372 (2014)CrossRefGoogle Scholar
  16. 16.
    He, J., Liang, H., Yang, G.: Reversing longest previous factor tables is hard. In: Dehne, F., Iacono, J., Sack, J.-R. (eds.) WADS 2011. LNCS, vol. 6844, pp. 488–499. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  17. 17.
    Tomohiro, I., Inenaga, S., Bannai, H., Takeda, M.: Counting and verifying maximal palindromes. In: Chavez, E., Lonardi, S. (eds.) SPIRE 2010. LNCS, vol. 6393, pp. 135–146. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  18. 18.
    Tomohiro, I., Inenaga, S., Bannai, H., Takeda, M.: Verifying and enumerating parameterized border arrays. Theor. Comput. Sci. 412(50), 6959–6981 (2011)CrossRefzbMATHGoogle Scholar
  19. 19.
    Tomohiro, I., 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
  20. 20.
    Kärkkäinen, J., Sanders, P., Burkhardt, S.: Linear work suffix array construction. J. ACM 53(6), 918–936 (2006)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Karp, R.M., Miller, R.E., Rosenberg, A.L.: Rapid identification of repeated patterns in strings, trees and arrays. In: Fischer, P.C., Zeiger, H.P., Ullman, J.D., Rosenberg, A.L. (eds.) 4th Annual ACM Symposium on Theory of Computing, pp. 125–136. ACM (1972)Google Scholar
  22. 22.
    Kociumaka, T., Radoszewski, J., Rytter, W., Waleń, T.: Internal pattern matching queries in a text and applications. In: Indyk, P. (ed.) Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 532–551. SIAM (2015)Google Scholar
  23. 23.
    Kolpakov, R., Podolskiy, M., Posypkin, M., Khrapov, N.: Searching of gapped repeats and subrepetitions in a word. In: Kulikov, A.S., Kuznetsov, S.O., Pevzner, P. (eds.) CPM 2014. LNCS, vol. 8486, pp. 212–221. Springer, Heidelberg (2014) Google Scholar
  24. 24.
    Kolpakov, R.M., Kucherov, G.: Finding maximal repetitions in a word in linear time. In: 40th Annual Symposium on Foundations of Computer Science, FOCS 1999, pp. 596–604. IEEE Computer Society (1999)Google Scholar
  25. 25.
    Matsubara, W., Ishino, A., Shinohara, A.: Inferring strings from runs. In: Holub, J., Zdárek, J. (eds.) Prague Stringology Conference, pp. 150–160. Czech Technical University (2010)Google Scholar
  26. 26.
    Moosa, T.M., Nazeen, S., Rahman, M.S., Reaz, R.: Linear time inference of strings from cover arrays using a binary alphabet. In: Rahman, M.S., Nakano, S. (eds.) WALCOM 2012. LNCS, vol. 7157, pp. 160–172. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  27. 27.
    Nakashima, Y., Okabe, T., Tomohiro, I., Inenaga, S., Bannai, H., Takeda, M.: Inferring strings from lyndon factorization. In: Csuhaj-Varjú, E., Dietzfelbinger, M., Ésik, Z. (eds.) MFCS 2014, Part II. LNCS, vol. 8635, pp. 565–576. Springer, Heidelberg (2014) Google Scholar
  28. 28.
    Starikovskaya, T., Vildhøj, H.W.: A suffix tree or not a suffix tree? J. Discrete Algorithms 32, 14–14 (2015)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Paweł Gawrychowski
    • 1
  • Tomasz Kociumaka
    • 1
  • Jakub Radoszewski
    • 1
  • Wojciech Rytter
    • 1
    • 2
  • Tomasz Waleń
    • 1
  1. 1.Faculty of Mathematics, Informatics and MechanicsUniversity of WarsawWarsawPoland
  2. 2.Faculty of Mathematics and Computer ScienceCopernicus UniversityToruńPoland

Personalised recommendations