Skip to main content

Recovering, Counting and Enumerating Strings from Forward and Backward Suffix Arrays

  • Conference paper
  • First Online:
String Processing and Information Retrieval (SPIRE 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11147))

Included in the following conference series:

Abstract

The suffix array \( SA _{w}\) of a string w of length n is a permutation of [1..n] such that \( SA _{w}[i] = j\) iff w[jn] is the lexicographically i-th suffix of w. In this paper, we consider variants of the reverse-engineering problem on suffix arrays with two given permutations P and Q of [1..n], such that P refers to the forward suffix array of some string w and Q refers to the backward suffix array of the reversed string \(w^R\). Our results are the following: (1) An algorithm which computes a solution string over an alphabet of the smallest size, in O(n) time. (2) The exact number of solution strings over an alphabet of size \(\sigma \). (3) An efficient algorithm which computes all solution strings in the lexicographical order, in time near optimal up to \(\log n\) factor.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. 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). https://doi.org/10.1007/978-3-540-45138-9_15

    Chapter  Google Scholar 

  2. 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)

    Article  MathSciNet  Google Scholar 

  3. Blumer, A., Blumer, J., Haussler, D., Ehrenfeucht, A., Chen, M.T., Seiferas, J.: The smallest automaton recognizing the subwords of a text. Theor. Comput. Sci. 40, 31–55 (1985)

    Article  MathSciNet  Google Scholar 

  4. Cazaux, B., Rivals, E.: Reverse engineering of compact suffix trees and links: a novel algorithm. J. Discret. Algorithms 28, 9–22 (2014)

    Article  MathSciNet  Google Scholar 

  5. Clément, J., Crochemore, M., Rindone, G.: Reverse engineering prefix tables. In: Proceedings of 26th International Symposium on Theoretical Aspects of Computer Science (STACS 2009), pp. 289–300 (2009)

    Google Scholar 

  6. 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). https://doi.org/10.1007/978-3-642-13509-5_23

    Chapter  Google Scholar 

  7. Daykin, J.W., Franek, F., Holub, J., Islam, A.S., Smyth, W.: Reconstructing a string from its Lyndon arrays. Theor. Comput. Sci. 710, 44–51 (2018)

    Article  MathSciNet  Google Scholar 

  8. Duval, J., Lecroq, T., Lefebvre, A.: Efficient validation and construction of border arrays and validation of string matching automata. ITA 43(2), 281–297 (2009)

    MathSciNet  MATH  Google Scholar 

  9. Duval, J., Lefebvre, A.: Words over an ordered alphabet and suffix permutations. ITA 36(3), 249–259 (2002)

    MathSciNet  MATH  Google Scholar 

  10. Gawrychowski, P., Jeż, A., Jeż, L.: Validating the Knuth-Morris-Pratt failure function, fast and online. Theor. Comput. Syst. 54(2), 337–372 (2014)

    Article  Google Scholar 

  11. 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). https://doi.org/10.1007/978-3-642-22300-6_41

    Chapter  Google Scholar 

  12. I, T., 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). https://doi.org/10.1007/978-3-642-16321-0_13

    Chapter  Google Scholar 

  13. I, T., Inenaga, S., Bannai, H., Takeda, M.: Inferring strings from suffix trees and links on a binary alphabet. In: Proceedings of the Prague Stringology Conference 2011, pp. 121–130 (2011)

    Google Scholar 

  14. I, T., Inenaga, S., Bannai, H., Takeda, M.: Verifying and enumerating parameterized border arrays. Theor. Comput. Sci. 412(50), 6959–6981 (2011)

    Article  MathSciNet  Google Scholar 

  15. Kärkkäinen, J., Piatkowski, M., Puglisi, S.J.: String inference from longest-common-prefix array. In: Proceedings of 44th International Colloquium on Automata, Languages, and Programming (ICALP 2017), pp. 62:1–62:14 (2017)

    Google Scholar 

  16. 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)

    Article  MathSciNet  Google Scholar 

  17. Manber, U., Myers, E.W.: Suffix arrays: a new method for on-line string searches. SIAM J. Comput. 22(5), 935–948 (1993)

    Article  MathSciNet  Google Scholar 

  18. Matsubara, W., Ishino, A., Shinohara, A.: Inferring strings from runs. In: Proceedings of the Prague Stringology Conference vol. 2010, pp. 150–160 (2010)

    Google Scholar 

  19. McCreight, E.M.: Priority search trees. SIAM J. Comput. 14(2), 257–276 (1985)

    Article  MathSciNet  Google Scholar 

  20. Nakashima, Y., Okabe, T., I, T., Inenaga, S., Bannai, H., Takeda, M.: Inferring strings from Lyndon factorization. Theor. Comput. Sci. 689, 147–156 (2017)

    Article  MathSciNet  Google Scholar 

  21. Nakashima, Y., Takagi, T., Inenaga, S., Bannai, H., Takeda, M.: On reverse engineering the Lyndon tree. In: Proceedings of the Prague Stringology Conference vol. 2017, pp. 108–117 (2017)

    Google Scholar 

  22. Nishida, M., I., T., Inenaga, S., Bannai, H., Takeda, M.: Inferring strings from full abelian periods. In: Elbassioni, K., Makino, K. (eds.) ISAAC 2015. LNCS, vol. 9472, pp. 768–779. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48971-0_64

    Chapter  Google Scholar 

  23. Schürmann, K., Stoye, J.: Counting suffix arrays and strings. Theor. Comput. Sci. 395(2–3), 220–234 (2008)

    Article  MathSciNet  Google Scholar 

  24. Starikovskaya, T.A., Vildhøj, H.W.: A suffix tree or not a suffix tree? J. Discrete Algorithms 32, 14–23 (2015)

    Article  MathSciNet  Google Scholar 

  25. Stoye, J.: Affix trees. Technical report 2000-04, Universität Bielefeld, Technische Fakultät (2000)

    Google Scholar 

  26. Weiner, P.: Linear pattern-matching algorithms. In: Proceedings of 14th IEEE Annual Symposium on Switching and Automata Theory, pp. 1–11 (1973)

    Google Scholar 

Download references

Acknowledgements

This work was supported by JSPS KAKENHI Grant Numbers JP18K18002 (YN), JP17H01697 (SI), JP16H02783 (HB), and JP18H04098 (MT).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yuki Kuhara .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kuhara, Y., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M. (2018). Recovering, Counting and Enumerating Strings from Forward and Backward Suffix Arrays. In: Gagie, T., Moffat, A., Navarro, G., Cuadros-Vargas, E. (eds) String Processing and Information Retrieval. SPIRE 2018. Lecture Notes in Computer Science(), vol 11147. Springer, Cham. https://doi.org/10.1007/978-3-030-00479-8_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-00479-8_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-00478-1

  • Online ISBN: 978-3-030-00479-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics