A binary de Bruijn sequence of order $n$ is a cyclic sequence of bits in which every possible $n$-bit string appears exactly once as a contiguous substring. Because of their ideal randomness properties and comprehensive state coverage, these sequences are vital to cryptography, communications, and synthetic biology.
Historically, the most efficient way to generate maximum-length sequences is via Linear Feedback Shift Registers (LFSRs). However, standard LFSR techniques are highly restrictive: they require the register's feedback logic to be governed by a primitive characteristic polynomial. If you use an arbitrary or composite polynomial, the state space fragments into a collection of isolated, disjoint loops (cycles) rather than a single giant loop.
To overcome this limitation, a powerful framework has emerged: mapping out these fragmented cycles, treating them as nodes in a meta-graph, and systematically bridging them together to construct a massive, diverse library of valid de Bruijn sequences.
The Mechanics of Cycle Joining
When an LFSR's characteristic polynomial is not primitive, the state space splits. To understand how to merge these isolated cycles, consider how a shift register transitions between states. A state transitions to its successor by shifting all bits by one position and inserting a new bit at the end based on the feedback polynomial.
If we can find two states that are identical except for their companion bits (for example, differing only in the feedback bit position), they form what is called a conjugate pair (or a cross-join pair). Because these two states are nearly identical, a minor, localized modification to the feedback logic can swap their next-state transitions.
Cycle A: [State X] ---> [Successor of X]
|
(Modify feedback to swap paths)
v
Cycle B: [State Y] ---> [Successor of Y]
By rewiring the transition so that State X points to the successor of State Y, and State Y points to the successor of State X, the two previously isolated cycles are spliced into a single, larger loop. As highlighted in Generalized Orthogonal de Bruijn and Kautz Sequences by Yuan-Pon Chen et al., this fundamental mechanism of sequence rewiring provides the necessary structural flexibility to alter and design complex sequence properties.
The Cycle Adjacency Graph
When dealing with arbitrary polynomials, an LFSR might split into dozens, hundreds, or thousands of disjoint cycles. Swapping arbitrary conjugate pairs at random risks creating isolated sub-loops or failing to connect the entire state space. To solve this globally, researchers utilize a meta-graph called the Cycle Adjacency Graph (CAG).
In a CAG:
- Vertices represent the individual, disjoint cycles generated by the LFSR.
- Edges connect two vertices if there exists at least one conjugate pair that can bridge those two respective cycles.
The key insight to this methodology is that finding a spanning tree within the CAG provides an exact recipe for a valid de Bruijn sequence.
A spanning tree is a subset of edges that connects all vertices together without creating any closed loops. By identifying a spanning tree of the CAG and executing the cross-join swap for every conjugate pair dictated by the tree's edges, all individual cycles are systematically unified into a single global loop that visits every state exactly once. This graph-theoretic framework, detailed in On binary de Bruijn sequences from LFSRs with arbitrary characteristic polynomials by Zuling Chang et al., frees de Bruijn sequence construction from the constraints of specific polynomial types, allowing the use of completely arbitrary characteristic polynomials.
The Decomposition Principle for Composite Polynomials
To build a Cycle Adjacency Graph, one must first know the underlying cycle structure of the LFSR. For a complex, composite polynomial, mapping out every single cycle by brute force is computationally intractable.
To bypass this bottleneck, the authors rely on a decomposition principle. In The cycle structure of LFSR with arbitrary characteristic polynomial over finite fields, Zuling Chang et al. demonstrate that the cycle structure of an LFSR governed by a composite polynomial can be completely determined by analyzing the cycle structures of simpler LFSRs corresponding to its irreducible factors. By understanding how the direct sums of these simpler factor cycles interact, the complete state space can be algebraically mapped out, providing a systematic way to find a representative state for each cycle.
For instance, when a characteristic polynomial is formed by the product of two distinct irreducible polynomials, the resulting cycle interactions can be explicitly predicted. As shown by Zuling Chang et al. in Construction of de Bruijn sequences from product of two irreducible polynomials, this algebraic predictability allows researchers to construct the precise CAG for the composite system, unlocking an exceptionally large and diverse family of unique de Bruijn sequences that were previously impossible to generate systematically.
Accelerating the Search via Zech's Logarithms
Even when the cycle structure is known, finding the exact states that form conjugate pairs across different cycles can still require exhaustive, expensive searches. To make this framework practical for large sequence orders, researchers introduced finite field arithmetic tools to calculate the bridges directly.
In Binary de Bruijn Sequences via Zech's Logarithms, Zuling Chang et al. demonstrate that Zech's logarithms can be used to efficiently compute the exact locations of cross-join pairs. Zech's logarithms solve the equation $\log_\alpha(1 + \alpha^x)$ in a finite field, which algebraically maps to finding the precise bit-shifts where two distinct cycles become "adjacent" in the state space.
By leveraging these logarithmic relationships, the framework unifies previously disparate construction techniques—such as pure cycle joining and cross-join pairing—into a single mathematical architecture. Instead of searching for bridges, designers can use the underlying algebraic properties of primitive and irreducible polynomials to compute them instantly, making the cycle adjacency graph approach highly scalable.
Key Foundational Work
Construction of de Bruijn sequences from product of two irreducible polynomials (2018) — contributed 9 concept elements to this direction.
On Binary de Bruijn Sequences from LFSRs with Arbitrary Characteristic Polynomials (2019) — contributed 7 concept elements to this direction.
The cycle structure of LFSR with arbitrary characteristic polynomial over finite fields (2018) — contributed 4 concept elements to this direction.