Abstract
We study the problem of identifying palindromes in compressed strings. The underlying compression scheme is called run-length encoding, which has been extensively studied and widely applied in diverse areas. Given a run-length encoded string \(\textsc{rle}(T)\), we show how to preprocess \(\textsc{rle}(T)\) to support efficient retrieval of the longest palindrome with a specified center position and a tolerated number of mismatches between its two arms. Let n be the number of runs of \(\textsc{rle}(T)\) and k be the tolerated number of mismatches. We present two algorithms for the problem, both with preprocessing time polynomial in the number of runs. The first algorithm, devised for small k, identifies the desired palindrome in O(logn + min {k,n}) time with O(nlogn) preprocessing time, while the second algorithm achieves O(log2 n) query time, independent of k, after O(n 2logn)-time preprocessing.
Partially supported by NSC grants 97-2221-E-002-097-MY3 and 98-2221-E-002-081-MY3 from the National Science Council, Taiwan.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Amir, A., Benson, G.: Efficient Two-Dimensional Compressed Matching. In: Data Compression Conference, pp. 279–288 (1992)
Apostolico, A., Landau, G.M., Skiena, S.: Matching for Run-Length Encoded Strings. Journal of Complexity 15(1), 4–16 (1999)
de Berg, M., Cheong, O., van Kreveld, M., Overmars, M.: Computational Geometry: Algorithms and Applications. Springer, Heidelberg (2008)
Bentley, J.L.: Solutions to Klee’s Rectangle Problems. Technical Report, Carnegie-Mellon University, Pittsburgh, PA (1977)
Chen, K.-Y., Chao, K.-M.: A Fully Compressed Algorithm for Computing the Edit Distance of Run-Length Encoded Strings. In: de Berg, M., Meyer, U. (eds.) ESA 2010. LNCS, vol. 6346, pp. 415–426. Springer, Heidelberg (2010)
Chen, K.-Y., Hsu, P.-H., Chao, K.-M.: Hardness of Comparing Two Run-Length Encoded Strings. Journal of Complexity (accepted) (A preliminary version appeared in CPM 2009)
Diede, S.J., Tanaka, H., Bergstrom, D.A., Yao, M.-C., Tapscott, S.J.: Tapscott: Genome-wide Analysis of Palindrome Formation. Nature Genetics 42(4), 279 (2010)
Farach-Colton, M., Ferragina, P., Muthukrishnan, S.: On the Sorting-Complexity of Suffix Tree Construction. Journal of ACM 47(6), 987–1011 (2000)
Gasieniec, L., Karpinski, M., Plandowski, W., Rytter, W.: Efficient Algorithms for Lempel-Ziv Encoding (Extended Abstract). In: Karlsson, R., Lingas, A. (eds.) SWAT 1996. LNCS, vol. 1097, pp. 392–403. Springer, Heidelberg (1996)
Gusfield, D.: Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. Cambridge University Press, Cambridge (1997)
Harel, D., Tarjan, R.E.: Fast Algorithms for Finding Nearest Common Ancestors. SIAM Journal on Computing 13(2), 338–355 (1984)
Hermelin, D., Landau, G.M., Landau, S., Weimann, O.: A Unified Algorithm for Accelerating Edit-Distance Computation via Text-Compression. In: STACS, pp. 529–540 (2009)
Hsu, P.-H., Chen, K.-Y., Chao, K.-M.: Finding All Approximate Gapped Palindromes. In: ISAAC, pp. 1084–1093 (2009)
Liu, J.J., Huang, G.S., Wang, Y.L.: A Fast Algorithm for Finding the Positions of All Squares in a Run-Length Encoded String. Theoretical Computer Science 410(38-40), 3942–3948 (2009)
Lueker, G.S.: A Data Structure for Orthogonal Range Queries. In: FOCS, pp. 28–34 (1978)
Matsubara, W., Inenaga, S., Ishino, A., Shinohara, A., Nakamura, T., Hashimoto, K.: Efficient Algorithms to Compute Compressed Longest Common Substrings and Compressed Palindromes. Theoretical Computer Science 410(8-10), 900–913 (2009)
Rytter, W.: Algorithms on Compressed Strings and Arrays. In: Bartosek, M., Tel, G., Pavelka, J. (eds.) SOFSEM 1999. LNCS, vol. 1725, pp. 48–65. Springer, Heidelberg (1999)
Willard, D.E.: Predicate-Oriented Database Search Algorithms. Garland Publishing, New York (1978)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chen, KY., Hsu, PH., Chao, KM. (2010). Identifying Approximate Palindromes in Run-Length Encoded Strings. In: Cheong, O., Chwa, KY., Park, K. (eds) Algorithms and Computation. ISAAC 2010. Lecture Notes in Computer Science, vol 6507. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17514-5_29
Download citation
DOI: https://doi.org/10.1007/978-3-642-17514-5_29
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-17513-8
Online ISBN: 978-3-642-17514-5
eBook Packages: Computer ScienceComputer Science (R0)