Arbitrary-length analogs to de Bruijn sequences
arXiv:2108.07759 · doi:10.4230/LIPIcs.CPM.2022.9
Abstract
Let be a length- cyclic sequence of characters from a size- alphabet such that the number of occurrences of any length- string on as a substring of is or . When for any positive integer , is a de Bruijn sequence of order , and when , shares many properties with de Bruijn sequences. We describe an algorithm that outputs some for any combination of and in time using 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.
18 pages, 3 algorithms, 1 table; v2 refines language and fixes references