MFCS 2011: Mathematical Foundations of Computer Science 2011 pp 472-484 | Cite as
Periodicity Algorithms for Partial Words
Abstract
In this paper we investigate several periodicity-related algorithms for partial words. First, we show that all periods of a partial word of length n are determined in \({\mathcal O}(n\log n)\) time, and provide algorithms and data structures that help us answer in constant time queries regarding the periodicity of their factors. For this we need a \({\mathcal O}(n^2)\) preprocessing time and a \({\mathcal O}(n)\) updating time, whenever the words are extended by adding a letter. In the second part we show that substituting letters of a word w with holes, with the property that no two holes are too close to each other, to make it periodic can be done in optimal time \({\mathcal O}(|w|)\). Moreover, we show that inserting the minimum number of holes such that the word keeps the property can be done as fast.
Keywords
Combinatorics on Words Periodicity Partial WordsPreview
Unable to display preview. Download preview PDF.
References
- 1.Choffrut, C., Karhumäki, J.: Combinatorics of words. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. 1, pp. 329–438. Springer, Heidelberg (1997)CrossRefGoogle Scholar
- 2.Lothaire, M.: Combinatorics on Words. Cambridge University Press, Cambridge (1997)MATHCrossRefGoogle Scholar
- 3.Blanchet-Sadri, F.: Algorithmic Combinatorics on Partial Words. Chapman & Hall/CRC Press (2008)Google Scholar
- 4.Galil, Z., Seiferas, J.I.: Time-space optimal string matching. J. of Comput. and Syst. Sci. 26, 280–294 (1983)MathSciNetCrossRefGoogle Scholar
- 5.Crochemore, M.: String-matching on ordered alphabets. Theor. Comput. Sci. 92(1), 33–47 (1992)MathSciNetMATHCrossRefGoogle Scholar
- 6.Blanchet-Sadri, F., Anavekar, A.R.: Testing primitivity on partial words. Discr. Appl. Math. 155(3), 279–287 (2007)MathSciNetMATHCrossRefGoogle Scholar
- 7.Blanchet-Sadri, F., Chriscoe, A.: Local periods and binary partial words: an algorithm. Theoret. Comput. Sci. 314(1-2), 189–216 (2004)MathSciNetMATHCrossRefGoogle Scholar
- 8.Cole, R., Hariharan, R.: Verifying candidate matches in sparse and wildcard matching. In: STOC 2002, pp. 592–601 (2002)Google Scholar
- 9.Fischer, M.J., Paterson, M.S.: String matching and other products. In: Complexity of Computation, SIAM-AMS Proceedings, vol. 7, pp. 113–125 (1974)Google Scholar
- 10.Clifford, P., Clifford, R.: Simple deterministic wildcard matching. Inform. Proc. Lett. 101(2), 53–54 (2007)MathSciNetMATHCrossRefGoogle Scholar
- 11.Manea, F., Mercaş, R.: Freeness of partial words. Theoret. Comput. Sci. 389(1-2), 265–277 (2007)MathSciNetMATHGoogle Scholar
- 12.Blanchet-Sadri, F., Mercaş, R., Rashin, A., Willett, E.: An answer to a conjecture on overlaps in partial words using periodicity algorithms. In: Dediu, A.H., Ionescu, A.M., Martín-Vide, C. (eds.) LATA 2009. LNCS, vol. 5457, pp. 188–199. Springer, Heidelberg (2009)CrossRefGoogle Scholar
- 13.Diaconu, A., Manea, F., Tiseanu, C.: Combinatorial queries and updates on partial words. In: Kutyłowski, M., Charatonik, W., Gębala, M. (eds.) FCT 2009. LNCS, vol. 5699, pp. 96–108. Springer, Heidelberg (2009)CrossRefGoogle Scholar
- 14.Leupold, P.: Languages of partial words - how to obtain them and what properties they have. Grammars 7, 179–192 (2004)Google Scholar
- 15.Leupold, P.: Partial words for DNA coding. In: Ferretti, C., Mauri, G., Zandron, C. (eds.) DNA 2004. LNCS, vol. 3384, pp. 224–234. Springer, Heidelberg (2005)CrossRefGoogle Scholar
- 16.Knuth, D.E.: The Art of Computer Programming Fundamental Algorithms, vol. 1. Addison-Wesley, Reading (1968)MATHGoogle Scholar
- 17.Aspvall, B., Plass, M.F., Tarjan, R.E.: A linear-time algorithm for testing the truth of certain quantified boolean formulas. Inform. Proc. Lett. 8(3), 121–123 (1979)MathSciNetMATHCrossRefGoogle Scholar