English

Arbitrary-length analogs to de Bruijn sequences

Combinatorics 2022-06-24 v2 Discrete Mathematics Data Structures and Algorithms Information Theory math.IT

Abstract

Let α~\widetilde{\alpha} be a length-LL cyclic sequence of characters from a size-KK alphabet A\mathcal{A} such that the number of occurrences of any length-mm string on A\mathcal{A} as a substring of α~\widetilde{\alpha} is L/Km\lfloor L / K^m \rfloor or L/Km\lceil L / K^m \rceil. When L=KNL = K^N for any positive integer NN, α~\widetilde{\alpha} is a de Bruijn sequence of order NN, and when LKNL \neq K^N, α~\widetilde{\alpha} shares many properties with de Bruijn sequences. We describe an algorithm that outputs some α~\widetilde{\alpha} for any combination of K2K \geq 2 and L1L \geq 1 in O(L)O(L) time using O(LlogK)O(L \log 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.

Keywords

Cite

@article{arxiv.2108.07759,
  title  = {Arbitrary-length analogs to de Bruijn sequences},
  author = {Abhinav Nellore and Rachel Ward},
  journal= {arXiv preprint arXiv:2108.07759},
  year   = {2022}
}

Comments

18 pages, 3 algorithms, 1 table; v2 refines language and fixes references

R2 v1 2026-06-24T05:11:54.923Z