Document Open Access Logo

Finding the Anticover of a String

Authors Mai Alzamel , Alessio Conte , Shuhei Denzumi, Roberto Grossi, Costas S. Iliopoulos, Kazuhiro Kurita , Kunihiro Wasa

Thumbnail PDF


  • Filesize: 0.55 MB
  • 11 pages

Document Identifiers

Author Details

Mai Alzamel
  • Department of Informatics, King’s College London, UK
  • Department of Computer Science, King Saud University, KSA
Alessio Conte
  • Dipartimento di Informatica, Università di Pisa, Italy
Shuhei Denzumi
  • Graduate School of Information Science and Technology, The University of Tokyo, Japan
Roberto Grossi
  • Dipartimento di Informatica, Università di Pisa, Italy
Costas S. Iliopoulos
  • Department of Informatics, King’s College London, UK
Kazuhiro Kurita
  • IST, Hokkaido University, Sapporo, Japan
Kunihiro Wasa
  • National Institute of Informatics, Tokyo, Japan

Cite AsGet BibTex

Mai Alzamel, Alessio Conte, Shuhei Denzumi, Roberto Grossi, Costas S. Iliopoulos, Kazuhiro Kurita, and Kunihiro Wasa. Finding the Anticover of a String. In 31st Annual Symposium on Combinatorial Pattern Matching (CPM 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 161, pp. 2:1-2:11, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020)


A k-anticover of a string x is a set of pairwise distinct factors of x of equal length k, such that every symbol of x is contained into an occurrence of at least one of those factors. The existence of a k-anticover can be seen as a notion of non-redundancy, which has application in computational biology, where they are associated with various non-regulatory mechanisms. In this paper we address the complexity of the problem of finding a k-anticover of a string x if it exists, showing that the decision problem is NP-complete on general strings for k ≥ 3. We also show that the problem admits a polynomial-time solution for k=2. For unbounded k, we provide an exact exponential algorithm to find a k-anticover of a string of length n (or determine that none exists), which runs in O*(min {3^{(n-k)/3)}, ((k(k+1))/2)^{n/(k+1)) time using polynomial space.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Combinatorics on words
  • Anticover
  • String algorithms
  • Stringology
  • NP-complete


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Hayam Alamro, Golnaz Badkobeh, Djamal Belazzougui, Costas S Iliopoulos, and Simon J Puglisi. Computing the antiperiod (s) of a string. In 30th Annual Symposium on Combinatorial Pattern Matching (CPM 2019). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2019. Google Scholar
  2. Mai Alzamel, Alessio Conte, Daniele Greco, Veronica Guerrini, Costas Iliopoulos, Nadia Pisanti, Nicola Prezza, Giulia Punzi, and Giovanna Rosone. Online algorithms on antipowers and antiperiods. In Nieves R. Brisaboa and Simon J. Puglisi, editors, String Processing and Information Retrieval, pages 175-188, Cham, 2019. Springer International Publishing. Google Scholar
  3. Alberto Apostolico and Andrzej Ehrenfeucht. Efficient detection of quasiperiodicities in strings. Theoretical Computer Science, 119(2):247-265, 1993. Google Scholar
  4. Alberto Apostolico, Martin Farach, and Costas S Iliopoulos. Optimal superprimitivity testing for strings. Information Processing Letters, 39(1):17-20, 1991. Google Scholar
  5. Bengt Aspvall, Michael F. Plass, and Robert Endre Tarjan. A linear-time algorithm for testing the truth of certain quantified Boolean formulas. Inf. Process. Lett., 8(3):121-123, 1979. URL:
  6. Golnaz Badkobeh, Gabriele Fici, and Simon J Puglisi. Algorithms for anti-powers in strings. Information Processing Letters, 137:57-60, 2018. Google Scholar
  7. Anne Condon, Ján Maňuch, and Chris Thachuk. The complexity of string partitioning. J. Discrete Algorithms, 32:24-43, 2015. URL:
  8. Alessio Conte, Roberto Grossi, and Andrea Marino. Large-scale clique cover of real-world networks. Information and Computation, 270:104464, 2020. Special Issue on 26th London Stringology Days & London Algorithmic Workshop (LSD & LAW). URL:
  9. Maxime Crochemore and Wojciech Rytter. Jewels of stringology: text algorithms. World Scientific, 2002. Google Scholar
  10. Gabriele Fici, Antonio Restivo, Manuel Silva, and Luca Q Zamboni. Anti-powers in infinite words. Journal of Combinatorial Theory, Series A, 157:109-119, 2018. Google Scholar
  11. Fedor V. Fomin and Dieter Kratsch. Exact Exponential Algorithms. Springer-Verlag, Berlin, Heidelberg, 1st edition, 2010. Google Scholar
  12. Dan Gusfield. Algorithms on strings, trees, and sequences. 1997. Computer Science and Computational Biology. New York: Cambridge University Press, 1997. Google Scholar
  13. Tomasz Kociumaka, Marcin Kubica, Jakub Radoszewski, Wojciech Rytter, and Tomasz Waleń. A linear time algorithm for seeds computation. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete algorithms, pages 1095-1112. SIAM, 2012. Google Scholar
  14. Roman Kolpakov, Ghizlane Bana, and Gregory Kucherov. mreps: efficient and flexible detection of tandem repeats in DNA. Nucleic acids research, 31(13):3672-3678, 2003. Google Scholar
  15. Yin Li and William F Smyth. Computing the cover array in linear time. Algorithmica, 32(1):95-106, 2002. Google Scholar
  16. M Lothaire. Applied combinatorics on words, volume 105. Cambridge University Press, 2005. Google Scholar
  17. Monsieur Lothaire and M Lothaire. Algebraic combinatorics on words, volume 90. Cambridge university press, 2002. Google Scholar
  18. Radu Stefan Mincu and Alexandru Popa. The maximum equality-free string factorization problem: Gaps vs. no gaps. In Alexander Chatzigeorgiou, Riccardo Dondi, Herodotos Herodotou, Christos Kapoutsis, Yannis Manolopoulos, George A. Papadopoulos, and Florian Sikora, editors, SOFSEM 2020: Theory and Practice of Computer Science, pages 531-543, Cham, 2020. Springer International Publishing. Google Scholar
  19. Dennis Moore and W. F. Smyth. Computing the covers of a string in linear time. In Proceedings of the Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’94, page 511–515, USA, 1994. Society for Industrial and Applied Mathematics. Google Scholar
  20. Dennis Moore and William F Smyth. An optimal algorithm to compute all the covers of a string. Information Processing Letters, 50(5):239-246, 1994. Google Scholar
  21. Robert Z Norman and Michael O Rabin. An algorithm for a minimum cover of a graph. Proceedings of the American Mathematical Society, 10(2):315-319, 1959. Google Scholar
  22. Craig A. Tovey. A simplified NP-complete satisfiability problem. Discrete Applied Mathematics, 8(1):85-89, 1984. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail