Abstract
Reconstructing input from a data structure entails determining whether an instance of the data structure is in fact valid or not, and if valid, discovering the underlying data that it represents. In this paper we consider the parameterized suffix array (pSA) along with its corresponding parameterized longest-common-prefix (pLCP) array and solve the following problem. Given two arrays of numbers as input, A and P, does there exist a parameterized string S such that A is its pSA and P is its pLCP array? If the answer is positive, our algorithm produces a string S whose pSA is A and whose pLCP array is P. Although the naive approach would have to consider an exponential number of possibilities for such a string S, our algorithm’s time complexity is only \(O(n^2)\) for input arrays of size n.
A. Amir—Partially supported by Grant No. 2018141 from the United States-Israel Binational Science Foundation (BSF) and Israel Science Foundation Grant 1475-18.
C. Guerra—Partially supported by BSF Grant No. 2018141.
G. M. Landau—Partially supported by Grant No. 2018141 from the United States-Israel Binational Science Foundation (BSF) and Israel Science Foundation Grant 1475-18.
D. Sokol—Partially supported by BSF Grant No. 2018141.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Amir, A., Aumann, A., Lewenstein, M., Porat, E.: Function matching. SIAM J. Comput. 35(5), 1007–1022 (2006)
Amir, A., Benson, G., Farach, M.: An alphabet independent approach to two dimensional pattern matching. SIAM J. Comp. 23(2), 313–323 (1994)
Amir, A., Church, K.W., Dar, E.: Separable attributes: a technique for solving the submatrices character count problem. In: Proceedings 13th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 400–401 (2002)
Amir, A., Farach, M., Muthukrishnan, S.: Alphabet dependence in parameterized matching. Inf. Process. Lett. 49(3), 111–115 (1994). https://doi.org/10.1016/0020-0190(94)90086-8
Amir, A., Kondratovsky, E.: Sufficient conditions for efficient indexing under different matchings. In: Pisanti, N., Pissis, S.P. (eds.) 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019, 18–20 June 2019, Pisa, Italy. LIPIcs, vol. 128, pp. 6:1–6:12. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2019). https://doi.org/10.4230/LIPIcs.CPM.2019.6
Amir, A., Kondratovsky, E.: Towards a real time algorithm for parameterized longest common prefix computation. Theor. Comput. Sci. 852, 132–137 (2021). https://doi.org/10.1016/j.tcs.2020.11.023
Apostolico, A., Erdös, P.L., Lewenstein, M.: Parameterized matching with mismatches. J. Discrete Algorithms 5(1), 135–140 (2007). https://doi.org/10.1016/j.jda.2006.03.014
Babu, G., Mehtre, B., Kankanhalli, M.: Color indexing for efficient image retrieval. Multimedia Tools Appl. 1(4), 327–348 (1995)
Baker, B.S.: Parameterized pattern matching: algorithms and applications. J. Comput. Syst. Sci. 52(1), 28–42 (1996). https://doi.org/10.1006/jcss.1996.0003
Baker, B.S.: Parameterized duplication in strings: algorithms and an application to software maintenance. SIAM J. Comput. 26(5), 1343–1362 (1997). https://doi.org/10.1137/S0097539793246707
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
Deguchi, S., Higashijima, F., Bannai, H., Inenaga, S., Takeda, M.: Parameterized suffix arrays for binary strings. In: Holub, J., Zdárek, J. (eds.) Proceedings of the Prague Stringology Conference 2008, Prague, Czech Republic, 1–3 September 2008, pp. 84–94. Prague Stringology Club, Department of Computer Science and Engineering, Faculty of Electrical Engineering, Czech Technical University in Prague (2008). http://www.stringology.org/event/2008/p08.html
Duval, J., Lefebvre, A.: Words over an ordered alphabet and suffix permutations. RAIRO Theor. Inform. Appl. 36(3), 249–259 (2002). https://doi.org/10.1051/ita:2002012
Fujisato, N., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Direct linear time construction of parameterized suffix and LCP arrays for constant alphabets. In: Brisaboa, N.R., Puglisi, S.J. (eds.) SPIRE 2019. LNCS, vol. 11811, pp. 382–391. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32686-9_27
Gabow, H.N., Bentley, J.L., Tarjan, R.E.: Scaling and related techniques for geometry problems. In: DeMillo, R.A. (ed.) Proceedings of the 16th Annual ACM Symposium on Theory of Computing, April 30 - May 2 1984, Washington, DC, USA, pp. 135–143. ACM (1984). https://doi.org/10.1145/800057.808675
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984). https://doi.org/10.1137/0213024
Hazay, C., Lewenstein, M., Sokol, D.: Approximate parameterized matching. In: Albers, S., Radzik, T. (eds.) ESA 2004. LNCS, vol. 3221, pp. 414–425. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30140-0_38
Idury, R.M., Schäffer, A.A.: Multiple matching of parameterized patterns. In: Crochemore, M., Gusfield, D. (eds.) CPM 1994. LNCS, vol. 807, pp. 226–239. Springer, Heidelberg (1994). https://doi.org/10.1007/3-540-58094-8_20
Lee, T., Na, J.C., Park, K.: On-line construction of parameterized suffix trees. In: Karlgren, J., Tarhio, J., Hyyrö, H. (eds.) SPIRE 2009. LNCS, vol. 5721, pp. 31–38. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03784-9_4
Swain, M., Ballard, D.: Color indexing. Int. J. Comput. Vision 7(1), 11–32 (1991)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Appendix
A Appendix
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Amir, A., Guerra, C., Kondratovsky, E., Landau, G.M., Marcus, S., Sokol, D. (2022). Reconstructing Parameterized Strings from Parameterized Suffix and LCP Arrays. In: Arroyuelo, D., Poblete, B. (eds) String Processing and Information Retrieval. SPIRE 2022. Lecture Notes in Computer Science, vol 13617. Springer, Cham. https://doi.org/10.1007/978-3-031-20643-6_5
Download citation
DOI: https://doi.org/10.1007/978-3-031-20643-6_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-20642-9
Online ISBN: 978-3-031-20643-6
eBook Packages: Computer ScienceComputer Science (R0)