{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arbitrary-length-analogs-to-de-bruijn","title":"Arbitrary-length analogs to de Bruijn sequences","arxiv_id":"2108.07759","date":"2021-08-17","proceeding":null,"authors":["Abhinav Nellore","Rachel Ward"],"abstract":"Let $\\widetilde{\\alpha}$ 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{\\alpha}$ is $\\lfloor L / K^m \\rfloor$ or $\\lceil L / K^m \\rceil$. When $L = K^N$ for any positive integer $N$, $\\widetilde{\\alpha}$ is a de Bruijn sequence of order $N$, and when $L \\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 $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.","url_abs":"https://arxiv.org/abs/2108.07759v2","url_pdf":"https://arxiv.org/pdf/2108.07759v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"arbitrary-length-analogs-to-de-bruijn","repo_url":"https://github.com/nelloreward/pkl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}