Abstract
We consider the question of finding an approximate period in a given string S of length n. Let S′ be a periodic string closest to S under some distance metric. We consider this distance the error of the periodic string, and seek the smallest period that generates a string with this distance to S. In this paper we consider the Hamming and swap distance metrics. In particular, if S is the given string, and S′ is the closest periodic string to S under the Hamming distance, and if that distance is k, we develop an O(nkloglogn) algorithm that constructs the smallest period that defines such a periodic string S′. We call that string the approximate period of S under the Hamming distance. We further develop an O(n 2) algorithm that constructs the approximate period under the swap distance. Finally, we show an O(nlogn) algorithm for finite alphabets, and O(nlog3 n) algorithm for infinite alphabets, that approximates the number of mismatches in the approximate period of the string.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Amir, A., Benson, G.: Two-dimensional periodicity and its application. SIAM J. Comp. 27(1), 90–106 (1998)
Amir, A., Benson, G., Farach, M.: Optimal parallel two dimensional text searching on a crew pram. Information and Computation 144(1), 1–17 (1998)
Apostolico, A., Giancarlo, R.: Periodicity and repetitions in parameterized strings. Discrete Appl. Math. 156(9), 1389–1398 (2008)
Cole, R., Crochemore, M., Galil, Z., Gąsieniec, L., Harihan, R., Muthukrishnan, S., Park, K., Rytter, W.: Optimally fast parallel algorithms for preprocessing and pattern matching in one and two dimensions. In: Proc. 34th IEEE FOCS, pp. 248–258 (1993)
Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Information Processing Letters 12(5), 244–250 (1981)
Fischer, M.J., Paterson, M.S.: String matching and other products, Complexity of Computation. In: Karp, R.M. (ed.) Complexity of Computation. SIAM-AMS Proceedings, vol. 7, pp. 113–125 (1974)
Galil, Z.: Optimal parallel algorithms for string matching. In: Proc. 16th ACM Symposium on Theory of Computing, vol. 67, pp. 144–157 (1984)
Galil, Z., Giancarlo, R.: Improved string matching with k mismatches. SIGACT News 17(4), 52–54 (1986)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestor. Computer and System Science 13, 338–355 (1984)
Kärkkäinen, J., Sanders, P.: Simple linear work suffix array construction. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds.) ICALP 2003. LNCS, vol. 2719, pp. 943–955. Springer, Heidelberg (2003)
Karloff, H.: Fast algorithms for approximately counting mismatches. Information Processing Letters 48(2), 53–60 (1993)
Kasai, T., Lee, G., Arimura, H., Arikawa, S., Park, K.: Linear-time longest-common-prefix computation in suffix arrays and its applications. In: Amir, A., Landau, G.M. (eds.) CPM 2001. LNCS, vol. 2089, pp. 181–192. Springer, Heidelberg (2001)
Kolpakov, R.M., Kucherov, G.: Finding Approximate Repetitions under Hamming Distance. In: Meyer auf der Heide, F. (ed.) ESA 2001. LNCS, vol. 2161, pp. 170–181. Springer, Heidelberg (2001)
Landau, G.M., Vishkin, U.: Efficient string matching with k mismatches. Theoretical Computer Science 43, 239–249 (1986)
Landau, G.M., Schmidt, J.P., Sokol, D.: An algorithm for approximate tandem repeats. Journal of Computational Biology 8(1), 1–18 (2001)
Lothaire, M.: Combinatorics on words. Addison-Wesley, Reading (1983)
Main, M.G., Lorentz, R.J.: An o(nlogn) algorithm for finding all repetitions in a string. Journal of Algorithms 5, 422–432 (1984)
Sim, J.S., Park, K., Iliopoulos, C.S., Smyth, W.F.: Approximate periods of strings. In: Crochemore, M., Paterson, M. (eds.) CPM 1999. LNCS, vol. 1645, pp. 123–133. Springer, Heidelberg (1999)
van Emde Boas, P., Kaas, R., Zijlstra, E.: Design and implementation of an efficient priority queue. Mathematical systems Theory 10, 99–127 (1977)
Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)
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
Amir, A., Eisenberg, E., Levy, A. (2010). Approximate Periodicity. In: Cheong, O., Chwa, KY., Park, K. (eds) Algorithms and Computation. ISAAC 2010. Lecture Notes in Computer Science, vol 6506. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17517-6_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-17517-6_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-17516-9
Online ISBN: 978-3-642-17517-6
eBook Packages: Computer ScienceComputer Science (R0)