Arbitrary-length analogs to de Bruijn sequences

Abhinav Nellore, Rachel Ward
8/17/2021
math.COcs.DMcs.DS

Official code: nelloreward/pkl (5 stars, Python, MIT, last commit 2023-05-03).

Abstract

Let $\widetildeα$ be a length-$L$ cyclic sequence of characters from a size-$K$ alphabet $\mathcal{A}$ such that the number of occurrences of any length-$m$ string on $\mathcal{A}$ as a substring of $\widetildeα$ is $\lfloor L / K^m \rfloor$ or $\lceil L / K^m \rceil$. When $L = K^N$ for any positive integer $N$, $\widetildeα$ is a de Bruijn sequence of order $N$, and when $L \neq K^N$, $\widetildeα$ shares many properties with de Bruijn sequences.

Show full abstract

We describe an algorithm that outputs some $\widetildeα$ for any combination of $K \geq 2$ and $L \geq 1$ in $O(L)$ time using $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.

View on arXivView PDF

Code Implementations(1)

nelloreward/pklOfficial100%
MIT

Software for generating arbitrary-length analogs to de Bruijn sequences

51PythonJul 31, 20213 years agoMIT

Similar Papers

Cite this paper

@article{nellore2021arbitrarylength,
  title  = {Arbitrary-length analogs to de Bruijn sequences},
  author = {Abhinav Nellore and Rachel Ward},
  year   = {2021},
  eprint = {2108.07759},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.07759}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.07759.svg)](https://codeofpaper.com/paper/2108.07759)

Discussion