Arbitrary-Length Analogs to de Bruijn Sequences

Abhinav Nellore, Rachel Ward

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Let αe be a length-L cyclic sequence of characters from a size-K alphabet A such that for every positive integer m ≤ L, the number of occurrences of any length-m string on A as a substring of αe is ⌊L/Km⌋ or ⌈L/Km⌉. When L = KN for any positive integer N, αe is a de Bruijn sequence of order N, and when L ≠ KN, αe shares many properties with de Bruijn sequences. We describe an algorithm that outputs some αe for any combination of K ≥ 2 and L ≥ 1 in O(L) time using O(Llog K) space. This algorithm extends Lempel's recursive construction of a binary de Bruijn sequence. An implementation written in Python is available at https://github.com/nelloreward/pkl.

Original languageEnglish (US)
Title of host publication33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022
EditorsHideo Bannai, Jan Holub
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959772341
DOIs
StatePublished - Jun 1 2022
Event33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022 - Prague, Czech Republic
Duration: Jun 27 2022Jun 29 2022

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume223
ISSN (Print)1868-8969

Conference

Conference33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022
Country/TerritoryCzech Republic
CityPrague
Period6/27/226/29/22

Keywords

  • de Bruijn sequence
  • de Bruijn word
  • Lempel's D-morphism
  • Lempel's homomorphism

ASJC Scopus subject areas

  • Software

Cite this