{"title":"Arbitrary-length analogs to de Bruijn sequences","authors":"Abhinav Nellore, Rachel A. Ward","doi":"10.4230/LIPIcs.CPM.2022.9","DOIUrl":null,"url":null,"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.","PeriodicalId":236737,"journal":{"name":"Annual Symposium on Combinatorial Pattern Matching","volume":"15 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-08-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Annual Symposium on Combinatorial Pattern Matching","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.CPM.2022.9","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
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.