Arbitrary-length analogs to de Bruijn sequences
Abstract
Let α be a length-L cyclic sequence of characters from a size-K alphabet A such that the number of occurrences of any length-m string on A as a substring of α is L / Km or L / Km . When L = KN for any positive integer N, α is a de Bruijn sequence of order N, and when L ≠ KN, α shares many properties with de Bruijn sequences. We describe an algorithm that outputs some α for any combination of K ≥ 2 and L ≥ 1 in O(L) time using O(L 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.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.