How Much Different Are Two Words with Different Shortest Periods

  • Mai Alzamel
  • Maxime Crochemore
  • Costas S. Iliopoulos
  • Tomasz Kociumaka
  • Ritu Kundu
  • Jakub RadoszewskiEmail author
  • Wojciech Rytter
  • Tomasz Waleń
Conference paper
Part of the IFIP Advances in Information and Communication Technology book series (IFIPAICT, volume 520)


Sometimes the difference between two distinct words of the same length cannot be smaller than a certain minimal amount. In particular if two distinct words of the same length are both periodic or quasiperiodic, then their Hamming distance is at least 2. We study here how the minimum Hamming distance \( dist (x,y)\) between two words xy of the same length n depends on their periods. Similar problems were considered in [1] in the context of quasiperiodicities. We say that a period p of a word x is primitive if x does not have any smaller period \(p'\) which divides p. For integers pn (\(p\le n\)) we define \(\mathcal {P}_{p}(n)\) as the set of words of length n with primitive period p. We show several results related to the following functions introduced in this paper for \(p\ne q\) and \(n \ge \max (p,q)\).
$$\begin{aligned} {\mathcal D}_{p,q}(n) = \min \,\{\, dist (x,y)\,:\; x\in \mathcal {P}_{p}(n), \,y\in \mathcal {P}_{q}(n)\,\}, \\ N_{p,q}(h) = \max \,\{\, n \,:\; {\mathcal D}_{p,q}(n)\le h\,\}. \qquad \qquad \end{aligned}$$


  1. 1.
    Amir, A., Iliopoulos, C.S., Radoszewski, J.: Two strings at Hamming distance 1 cannot be both quasiperiodic. Inf. Process. Lett. 128, 54–57 (2017)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Amir, A., Levy, A., Lubin, R., Porat, E.: Approximate cover of strings. In: Kärkkäinen, J., Radoszewski, J., Rytter, W. (eds.) 28th Annual Symposium on Combinatorial Pattern Matching, CPM 2017, 4–6 July 2017, Warsaw, Poland, vol. 78 of LIPIcs, pp. 26:1–26:14. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2017)Google Scholar
  3. 3.
    Bai, H., Franek, F., Smyth, W.F.: The new periodicity lemma revisited. Discrete Appl. Math. 212, 30–36 (2016)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Berstel, J., Boasson, L.: Partial words and a theorem of Fine and Wilf. Theor. Comput. Sci. 218(1), 135–141 (1999)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Blanchet-Sadri, F., Bal, D., Sisodia, G.: Graph connectivity, partial words, and a theorem of Fine and Wilf. Inf. Comput. 206(5), 676–693 (2008)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Blanchet-Sadri, F., Corcoran, K., Nyberg, J.: Fine and Wilf’s periodicity result on partial words and consequences. In: Loos, R., Fazekas, S.Z., Martín-Vide, C., (eds.) Proceedings of the 1st International Conference on Language and Automata Theory and Applications, LATA 2007, Report 35/07, pp. 115–126. Research Group on Mathematical Linguistics, Universitat Rovira i Virgili, Tarragona (2007)Google Scholar
  7. 7.
    Blanchet-Sadri, F., Hegstrom, R.A.: Partial words and a theorem of Fine and Wilf revisited. Theor. Comput. Sci. 270(1–2), 401–419 (2002)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Blanchet-Sadri, F., Oey, T., Rankin, T.D.: Fine and Wilf’s theorem for partial words with arbitrarily many weak periods. Int. J. Found. Comput. Sci. 21(5), 705–722 (2010)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Blanchet-Sadri, F., Simmons, S., Tebbe, A., Veprauskas, A.: Abelian periods, partial words, and an extension of a theorem of Fine and Wilf. RAIRO - Theor. Inf. Appl. 47(3), 215–234 (2013)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Castelli, M.G., Mignosi, F., Restivo, A.: Fine and Wilf’s theorem for three periods and a generalization of Sturmian words. Theor. Comput. Sci. 218(1), 83–94 (1999)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Constantinescu, S., Ilie, L.: Generalised Fine and Wilf’s theorem for arbitrary number of periods. Theor. Comput. Sci. 339(1), 49–60 (2005)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Constantinescu, S., Ilie, L.: Fine and Wilf’s theorem for Abelian periods. Bull. EATCS 89, 167–170 (2006)MathSciNetzbMATHGoogle Scholar
  13. 13.
    Fan, K., Puglisi, S.J., Smyth, W.F., Turpin, A.: A new periodicity lemma. SIAM J. Discrete Math. 20(3), 656–668 (2006)MathSciNetCrossRefGoogle Scholar
  14. 14.
    Fine, N.J., Wilf, H.S.: Uniqueness theorems for periodic functions. Proc. Am. Math. Soc. 16(1), 109–114 (1965)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Giancarlo, R., Mignosi, F.: Generalizations of the periodicity theorem of Fine and Wilf. In: Tison, S. (ed.) CAAP 1994. LNCS, vol. 787, pp. 130–141. Springer, Heidelberg (1994). Scholar
  16. 16.
    Holub, S.: On multiperiodic words. ITA 40(4), 583–591 (2006)MathSciNetzbMATHGoogle Scholar
  17. 17.
    Justin, J.: On a paper by Castelli, Mignosi, Restivo. ITA 34(5), 373–377 (2000)MathSciNetzbMATHGoogle Scholar
  18. 18.
    Karhumäki, J., Puzynina, S., Saarela, A.: Fine and Wilf’s theorem for \(k\)-Abelian periods. Int. J. Found. Comput. Sci. 24(7), 1135–1152 (2013)MathSciNetCrossRefGoogle Scholar
  19. 19.
    Manea, F., Mercaş, R., Nowotka, D.: Fine and Wilf’s theorem and pseudo-repetitions. In: Rovan, B., Sassone, V., Widmayer, P. (eds.) MFCS 2012. LNCS, vol. 7464, pp. 668–680. Springer, Heidelberg (2012). Scholar
  20. 20.
    Mignosi, F., Restivo, A., Silva, P.V.: On Fine and Wilf’s theorem for bidimensional words. Theor. Comput. Sci. 292(1), 245–262 (2003)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Mignosi, F., Shallit, J., Wang, M.: Variations on a theorem of Fine & Wilf. In: Sgall, J., Pultr, A., Kolman, P. (eds.) MFCS 2001. LNCS, vol. 2136, pp. 512–523. Springer, Heidelberg (2001). Scholar
  22. 22.
    Smyth, W.F., Wang, S.: A new approach to the periodicity lemma on strings with holes. Theor. Comput. Sci. 410(43), 4295–4302 (2009)MathSciNetCrossRefGoogle Scholar
  23. 23.
    Tijdeman, R., Zamboni, L.Q.: Fine and Wilf words for any periods II. Theor. Comput. Sci. 410(30–32), 3027–3034 (2009)MathSciNetCrossRefGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2018

Authors and Affiliations

  • Mai Alzamel
    • 1
  • Maxime Crochemore
    • 1
    • 2
  • Costas S. Iliopoulos
    • 1
  • Tomasz Kociumaka
    • 3
  • Ritu Kundu
    • 1
  • Jakub Radoszewski
    • 1
    • 3
    Email author
  • Wojciech Rytter
    • 3
  • Tomasz Waleń
    • 3
  1. 1.Department of InformaticsKing’s College LondonLondonUK
  2. 2.Université Paris-EstMarne-la-ValléeFrance
  3. 3.Faculty of Mathematics, Informatics and MechanicsUniversity of WarsawWarsawPoland

Personalised recommendations