de bruijn sequence
59 papers tagged with this keyword
Nonbinary Counterparts of the Prefer-Same and Prefer-Opposite de Bruijn Sequences
The well known prefer-one, prefer-opposite, and prefer-same binary de Bruijn sequences are all constructed using simple preference rules. We apply the technique of preference functions of span one to define q-ary sequences that generalize the prefer-opposite and prefer-same sequences and we present some of their basic properties that are shared with their binary versions. In particular, we show that the prefer-higher sequence (the nonbinary counter-part of the prefer-one sequence) is obtained from a homomorphic image of the proposed prefer-opposite, when repetitions are cleaned up. This mirrors a known relationship between the binary versions. We also perform calculations that demonstrate that the discrepancy profile of the proposed sequences is similar to that of the binary case.
Cut-Down de Bruijn Sequences
Published
• View Publication
• BIB
A cut-down de Bruijn sequence is a cyclic string of length $L$, where $1 \leq L \leq k^n$, such that every substring of length $n$ appears at most once. Etzion [Theor. Comp. Sci 44 (1986)] gives an algorithm to construct binary cut-down de Bruijn sequences that requires $o(n)$ simple $n$-bit operations per symbol generated. In this paper, we simplify the algorithm and improve the running time to $\mathcal{O}(n)$ time per symbol generated using $\mathcal{O}(n)$ space. We then provide the first successor-rule approach for constructing a binary cut-down de Bruijn sequence by leveraging recent ranking algorithms for fixed-density Lyndon words. Finally, we develop an algorithm to generate cut-down de Bruijn sequences for $k>2$ that runs in $\mathcal{O}(n)$ time per symbol using $\mathcal{O}(n)$ space after some initialization. While our $k$-ary algorithm is based on our simplified version of Etzion's binary algorithm, a number of non-trivial adaptations are required to generalize to larger alphabets.
On the Existence of Balanced Generalized de Bruijn Sequences
Published
• View Publication
• BIB
A balanced generalized de Bruijn sequence with parameters $(n,l,k)$ is a cyclic sequence of $n$ bits such that (a) the number of 0's equals the number of 1's, and (b) each substring of length $l$ occurs at most $k$ times. We determine necessary and sufficient conditions on $n,l$, and $k$ for the existence of such a sequence.
Arbitrary-length analogs to de Bruijn sequences
Published in CPM 2022
• View Publication
• BIB
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. 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.
Constructing orientable sequences
Published
• View Publication
• BIB
This paper describes new, simple, recursive methods of construction for orientable sequences, i.e. periodic binary sequences in which any n-tuple occurs at most once in a period in either direction. As has been previously described, such sequences have potential applications in automatic position-location systems, where the sequence is encoded onto a surface and a reader needs only examine n consecutive encoded bits to determine its location and orientation on the surface. The only previously described method of construction (due to Dai et al.) is somewhat complex, whereas the new techniques are simple to both describe and implement. The methods of construction cover both the standard `infinite periodic' case, and also the aperiodic, finite sequence, case. Both the new methods build on the Lempel homomorphism, first introduced as a means of recursively generating de Bruijn sequences.
A Cycle Joining Construction of the Prefer-Max De Bruijn Sequence
We propose a novel construction for the well-known prefer-max De Bruijn sequence, based on the cycle joining technique. We further show that the construction implies known results from the literature in a straightforward manner. First, it implies the correctness of the onion theorem, stating that, effectively, the reverse of prefer-max is in fact an infinite De Bruijn sequence. Second, it implies the correctness of recently discovered shift rules for prefer-max, prefer-min, and their reversals. Lastly, it forms an alternative proof for the seminal FKM-theorem.
Efficient constructions of the Prefer-same and Prefer-opposite de Bruijn sequences
Published
• View Publication
• BIB
The greedy Prefer-same de Bruijn sequence construction was first presented by Eldert et al.[AIEE Transactions 77 (1958)]. As a greedy algorithm, it has one major downside: it requires an exponential amount of space to store the length $2^n$ de Bruijn sequence. Though de Bruijn sequences have been heavily studied over the last 60 years, finding an efficient construction for the Prefer-same de Bruijn sequence has remained a tantalizing open problem. In this paper, we unveil the underlying structure of the Prefer-same de Bruijn sequence and solve the open problem by presenting an efficient algorithm to construct it using $O(n)$ time per bit and only $O(n)$ space. Following a similar approach, we also present an efficient algorithm to construct the Prefer-opposite de Bruijn sequence.
A note on watchman's walks in de Bruijn graphs
The watchman's walk problem in a digraph calls for finding a minimum length closed dominating walk, where direction of arcs is respected. The watchman's walk of a de Bruijn graph of order $k$ is described by a de Bruijn sequence of order $k-1$. This idea is extended to certain subdigraphs of de Bruijn graphs.
Investigating the discrepancy property of de Bruijn sequences
Published
• View Publication
• BIB
The discrepancy of a binary string refers to the maximum (absolute) difference between the number of ones and the number of zeroes over all possible substrings of the given binary string. We provide an investigation of the discrepancy of known simple constructions of de Bruijn sequences. Furthermore, we demonstrate constructions that attain the lower bound of $Θ(n)$ and a new construction that attains the previously known upper bound of $Θ(\frac{2^n}{\sqrt{n}})$. This extends the work of Cooper and Heitsch~[\emph{Discrete Mathematics}, 310 (2010)].
A Graph Joining Greedy Approach to Binary de Bruijn Sequences
Using greedy algorithms to generate de Bruijn sequences is a classical approach that has produced numerous interesting theoretical results. This paper investigates an algorithm which we call the Generalized Prefer-Opposite (GPO). It includes all prior greedy algorithms, with the exception of the Fleury Algorithm applied on the de Bruijn graph, as specific instances. The GPO Algorithm can produce any binary periodic sequences with nonlinear complexity at least two on input a pair of suitable feedback function and initial state. In particular, a sufficient and necessary condition for the GPO Algorithm to generate binary de Bruijn sequences is established. This requires the use of feedback functions with a unique cycle or loop in their respective state graphs. Moreover, we discuss modifications to the GPO Algorithm to handle more families of feedback functions whose state graphs have multiple cycles or loops. These culminate in a graph joining method. Several large classes of feedback functions are subsequently used to illustrate how the GPO Algorithm and its modification into the Graph Joining Prefer-Opposite (GJPO) Algorithm work in practice.
An Efficiently Generated Family of Binary de Bruijn Sequences
Published in Discrete Mathematics, Volume 344, Issue 6, June 2021, 112368
• View Publication
• BIB
We study how to generate binary de Bruijn sequences efficiently from the class of simple linear feedback shift registers with feedback function $f(x_0, x_1, \ldots, x_{n-1}) = x_0 + x_1 + x_{n-1}$ for $n \geq 3$, using the cycle joining method. Based on the properties of this class of LFSRs, we propose two new generic successor rules, each of which produces at least $2^{n-3}$ de Bruijn sequences. These two classes build upon a framework proposed by Gabric, Sawada, Williams and Wong in Discrete Mathematics vol. 341, no. 11, pp. 2977--2987, November 2018. Here we introduce new useful choices for the uniquely determined state in each cycle to devise valid successor rules. These choices significantly increase the number of de Bruijn sequences that can be generated. In each class, the next bit costs $O(n)$ time and $O(n)$ space for a fixed $n$.
Avoidance of split overlaps
Published
• View Publication
• BIB
We generalize Axel Thue's familiar definition of overlaps in words, and show that there are no infinite words containing split occurrences of these generalized overlaps. Along the way we prove a useful theorem about repeated disjoint occurrences in words -- an interesting natural variation on the classical de Bruijn sequences.
New Successor Rules to Efficiently Produce Exponentially Many Binary de Bruijn Sequences
Published
• View Publication
• BIB
We put forward new general criteria to design successor rules that generate binary de Bruijn sequences. Prior fast algorithms based on successor rules in the literature are then shown to be special instances. We implemented the criteria to join the cycles generated by a number of simple feedback shift registers (FSRs) of order $n$. These include the pure cycling register (PCR) and the pure summing register (PSR). For the PCR, we define a transitive relation on its cycles, based on their weights. We also extend the choices of conjugate states by using shift operations. For the PSR, we define three distinct transitive relations on its cycles, namely a run order, a necklace order, and a mixed order. Using the new orders, we propose numerous classes of successor rules. Each class efficiently generates a number, exponential in $n$, of binary de Bruijn sequences. Producing the next bit in each such sequence takes $O(n)$ memory and $O(n)$ time. We implemented computational routines to confirm the claims.
On the probability of existence of a universal cycle or a universal word for a set of words
Published
• View Publication
• BIB
A universal cycle, or u-cycle, for a given set of words is a circular word that contains each word from the set exactly once as a contiguous subword. The celebrated de Bruijn sequences are a particular case of such a u-cycle, where a set in question is the set $A^n$ of all words of length $n$ over a $k$-letter alphabet $A$. A universal word, or u-word, is a linear, i.e. non-circular, version of the notion of a u-cycle, and it is defined similarly.
Removing some words in $A^n$ may, or may not, result in a set of words for which u-cycle, or u-word, exists. The goal of this paper is to study the probability of existence of the universal objects in such a situation. We give lower bounds for the probability in general cases, and also derive explicit answers for the case of removing up to two words in $A^n$, or the case when $k=2$ and $n\leq 4$.
Extending de Bruijn sequences to larger alphabets
Published
• View Publication
• BIB
A de Bruijn sequence of order n over a k-symbol alphabet is a circular sequence where each length-n sequence occurs exactly once. We present a way of extending de Bruijn sequences by adding a new symbol to the alphabet: the extension is performed by embedding a given de Bruijn sequence into another one of the same order, but over the alphabet with one more symbol, while ensuring that there are no long runs without the new symbol. Our solution is based on auxiliary graphs derived from the de Bruijn graph and solving a problem of maximum flow.
To Infinity and Beyond: Continuing De Bruijn Sequences by Extending the Alphabet
This article presents proof that the reverse of the Prefer Max De Bruijn sequence can be expanded into an infinite De Bruijn sequence by increasing the size of the alphabet. Furthermore, we show that every De Bruijn sequence possessing this characteristic exhibits behavior similar to that of the reverse of the Prefer Max De Bruijn sequence.
On Greedy Algorithms for Binary de Bruijn Sequences
Published in Applicable Algebra in Engineering, Communication and Computing, 2021
• View Publication
• BIB
We propose a general greedy algorithm for binary de Bruijn sequences, called Generalized Prefer-Opposite (GPO) Algorithm, and its modifications. By identifying specific feedback functions and initial states, we demonstrate that most previously-known greedy algorithms that generate binary de Bruijn sequences are particular cases of our new algorithm.
The Warden's de Bruijn Sequence
The Warden's Game is a 2-player game, played with a row of coins. One player (the prisoner) wants to get all coins to show tails; the other player (the warden) wants to delay that as long as possible. At each turn, one player transfers the coin on the far right to the far left, and optionally flips that coin; the prisoner transfers heads, and the warden transfers tails. We will find the optimal strategies for both players, and we will also analyze some variations on this game.
Hamiltonicity of the Cross-Join Graph of de Bruijn Sequences
A generalized de Bruijn digraph generalizes a de Bruijn digraph to the case where the number of vertices need not be a pure power of an integer. Hamiltonian cycles in these digraphs thus generalize regular de~Bruijn cycles, and we will thus refer to them simply as de Bruijn cycles. We define the cross-join to be the graph with all de Bruijn cycles as vertices, there is an edge between two of these vertices if one can be obtained from the other via a cross-join operation. We show that the cross-join graph is connected. This in particular means that any regular de Bruijn cycle can be cross-joined repeatedly to reach any other de Bruijn cycle, generalizing a result about regular binary de Bruijn cycles by Mykkeltveit and Szmidt in 2014. Furthermore, we present an algorithm that produces a Hamiltonian path across the cross-join graph, one that we may call a de~Bruijn sequence of de Bruijn sequences.
De Bruijn Sequences: From Games to Shift-Rules to a Proof of the Fredricksen-Kessler-Maiorana Theorem
Published
• View Publication
• BIB
We present a combinatorial game and propose efficiently computable optimal strategies. We then show how these strategies can be translated to efficiently computable shift-rules for the well known prefer-max and prefer-min De Bruijn sequences, in both forward and backward directions. Using these shift-rules, we provide a new proof of the well known theorem by Fredricksen, Kessler, and Maiorana on De Bruijn sequences and Lyndon words.