Abstract
A binary modified de Bruijn sequence is an infinite and periodic binary sequence derived by removing a zero from the longest run of zeros in a binary de Bruijn sequence. The minimal polynomial of the modified sequence is its unique least-degree characteristic polynomial. Leveraging a recent characterization, we devise a novel general approach to determine the minimal polynomial. We translate the characterization into a problem of identifying a Hamiltonian cycle in a specially constructed graph. The graph is isomorphic to the modified de Bruijn–Good graph. Along the way, we demonstrate the usefulness of some computational tools from the cycle joining method in the modified setup.
Keywords:
binary sequence; Hamiltonian cycle; linear span; minimal polynomial; modified de Bruijn sequence MSC:
11B50; 94A55; 94A60
1. Introduction
Given a positive integer n, a binary de Bruijn sequence of order n is an infinite sequence over with period . Each binary n-tuple appears exactly once per period. Much has been found in the studies of such sequences. One can start from a primitive polynomial with . The linear feedback shift register (LFSR) whose characteristic polynomial is produces a maximum length sequence , also known as an m-sequence, of period . Appending a 0 to the longest run of zeroes in results a de Bruijn sequence.
We know from [], who independently rediscovered the result in [], that the number of binary de Bruijn sequences of order n is . The number of primitive polynomials over is , where is the Euler totient function. The number of de Bruijn sequences from the set of all primitive polynomials becomes minuscule compared to as n grows.
There are other methods than the route via m-sequences. Interested readers may want to consult Fredricksen’s survey [] and more recent works, such as the ones by Chang, Ezerman, Ling and Wang in [], by Gabric, Sawada, Williams and Wong in [] and in many of their respective references.
The sequence produced by a primitive polynomial can also be seen as a modification of the corresponding de Bruijn sequence by removing a 0 from the longest run of zeros. We call a sequence modified from any de Bruijn sequence, by such a removal of a 0, a modified de Bruijn sequence.
A sequence’s measure of predictability is given by its linear span or linear complexity. This is defined to be the degree of the shortest linear recursion or minimal polynomial that produces the sequence. The higher the span is, the less predictable the sequence becomes. For cryptographic applications, for example, sequences with large spans are desirable.
The respective minimal and maximal values for the linear span of de Bruijn sequences are and , for . This fact and further results on the distribution of the linear span values can be found in []. The extremal values were initially established as bounds in [], where the upper bound was then shown to be achievable. Etzion and Lempel showed how to construct de Bruijn sequences of minimal span in [].
Let denote a modified binary de Bruijn sequence of order n and period . Let be its corresponding de Bruijn sequence. One often prefers using , instead of , since the presence of the all zero strings of length n can be undesirable. On the other hand, there are instances where has an optimal linear complexity but performs poorly in this measure.
Example 1.
The sequence with has linear complexity 15. The linear complexity of drops significantly to 4.
Much less is known regarding the minimal polynomials of modified de Bruijn sequences. An early work on this topic was conducted by Mayhew and Golomb in []. Subsequent works by Kyureghyan in [], by Tan, Xu and Qi in [] and a more recent one by Wang, Zheng, Wang and Qi in [] have not managed to supply any systematic method to determine the minimal polynomials.
For any , let be the set of all nonzero polynomials of degree —that is,
In this work, we propose a general method to design the minimal polynomial of a modified de Bruijn sequence. To briefly outline our method, we defer the formal definition of terms related to polynomials to Section 2. We pick up from where the work by Tan et al. in [] ends. In particular, we rely on the following useful characterization.
Theorem 1
([], Theorem 3.2). Let m and n be positive integers satisfying . A polynomial of degree m is the minimal polynomial of a modified de Bruijn sequence of order n if and only if the following conditions hold:
- 1.
- The polynomial satisfies
- 2.
- Let be the reciprocal polynomial of . There exist with such that
Theorem 1 requires the two polynomials and to not only satisfy their respective conditions in (2) and (3) but also to simultaneously meet the requirements in (4) and (5) with as defined in (1).
Our first step is to posit an auxiliary self-reciprocal polynomial
by taking the product of all elements in the set
Since the product of all irreducible polynomials whose degrees divide n is and the only irreducible polynomials of degree 1 are x and , it is clear that
The next move is to transform the problem of finding a suitable into a problem of determining a Hamiltonian cycle in a specially constructed graph . We give a systematic way to determine . The details are covered in Section 3 and Section 4.
Our main contributions
- 1.
- For a given , we construct a graph with the property that every Hamiltonian cycle in corresponds to a modified de Bruijn sequence. We then propose basic algorithms to identify numerous Hamiltonian cycles in .
- 2.
- To each Hamiltonian cycle in , we associate a canonical generator polynomial . Once is found, we compute and prove that the minimal polynomial of is , where .
- 3.
- We supply basic computational tools as proofs of concept.
2. Preliminaries
Let be an infinite sequence over a given finite field . If there is a positive integer N for which N is the smallest number such that for all , then is an N-periodic sequence, and we write . Such an N is the period of . The sum of two infinite sequences and over the same finite field is , and the scalar multiple with is simply . Henceforth, unless otherwise stated, all sequences in this work are binary—that is, .
Let L be the (left) shift operator that sends
By convention, fixes the sequence. Two sequences and are called distinct or (cyclically) inequivalent if one is not the cyclic shift of the other—that is, there is no integer such that .
A monic polynomial in the ring of binary polynomials of indeterminate x is a characteristic polynomial of if . One can then call a linear feedback shift register (LFSR) sequence. As an LFSR sequence, may have many characteristic polynomials. We identify the unique characteristic polynomial of least degree as its minimal polynomial. Any characteristic polynomial of is divisible by .
The minimal polynomial of a sequence gives the sequences measure of predictability. The degree is the linear complexity or the linear span of . Knowing any -tuple in allows us to reconstruct completely. The zero sequence has linear span 0.
The reciprocal polynomial of is the polynomial
A polynomial is self-reciprocal if it is its own reciprocal. The order of , denoted by , is the least positive integer for which divides . The minimal polynomial of an N-periodic sequence has order N.
We will use the rational fraction representation of any . Further details can be found in Chapter 6, Section 3 of []. The generating function of is the element
in the ring of formal power series over . Since is periodic, it can be represented as a rational function
with and in such that
The minimal polynomial of is the reciprocal of the denominator in (11). The converse also holds. For any and in satisfying (12), there exists a periodic sequence for which (11) holds.
The requirement that is not strictly necessary. Indeed, there will be occasions in the sequel that we relax this condition and allow for a rational function representation with . The context will make it clear whether the representation is the simplest one or the more relaxed version.
Theorem 2
([], Section 2). If is binary de Bruijn sequence, then the minimal polynomial of has the form for some integer z satisfying .
Let denote the number of binary irreducible polynomials of degree n in . Let be the Möbius function. Gauss’ general formula in Theorem 3.25 of [] says that . Sequence A001037 in [] lists .
Theorem 3
([], Theorem 2). If is a de Bruijn sequence of order whose modified sequence is , then
Let be a modified de Bruijn sequence of order n. For small values of n, it is known that . It is conjectured in [] that . If is not an m-sequence, then we know from Corollary 3 in [] that .
We now recall useful results on the rational fraction representations of modified de Bruijn sequences over established by Tan et al. in []. For any nonnegative integer k, the k-shifted sequence of is
The set of all shifted sequences of is .
Lemma 1
([], Lemma 3.5). If is a given N-periodic sequence with rational fraction representation , then, for any , the rational fraction representation of its k-shifted sequence is
Lemma 2
([], Lemma 3.6). If is a sequence of period with as its rational fraction representation, then is a modified de Bruijn sequence of order n if and only if
Lemma 2 asserts that is a modified de Bruijn sequence if and only if traverses all nonzero polynomials of degree less than n as k goes from 0 to . The preparation in Lemmas 1 and 2 leads to Theorem 1 in the introduction.
We use graph theoretic notions commonly defined in standard textbooks. A directed gaph or a digraph is an ordered pair , where V is a set of vertices and E is a set of ordered pairs called directed edges or arcs. In this work, a digraph does not have multiple arcs on the same ordered pair of vertices, although it may contain a loop. A Hamiltonian path (cycle) is a path (cycle) that visits every vertex exactly once, with each arc traced according to its direction. We will often use the terms Hamiltonian cycle and Hamiltonian path interchangably, without causing ambiguity or losing generality.
3. From Polynomials to Directed Graphs
From the work of Mayhew and Golomb in [] we know that the minimal polynomial of modified binary de Bruijn sequences of order n is a product of distinct irreducible polynomials of degree , with . Setting aside the m-sequences built from primitive polynomials of degree n, there had not been any systematic way to determine the minimal polynomial of a given modified de Bruijn sequence.
Not all possible values given in (13) are the actual values of the linear span. For —for instance, there is no modified binary de Bruijn sequence with minimal polynomial , which is a product of two distinct irreducible polynomials of degree 5. Table 1 lists the degrees taken by the actual minimal polynomials for .
Example 2.
For , there are exactly 10 modified de Bruijn sequences with the maximal linear span 14. Their minimal polynomial is . Table 2 gives the 10 polynomials that each satisfy the requirements in Theorem 1 with taking the place of . Performing long division, we easily confirm that the first entry in Table 2 with has a representation
corresponding to the modified de Bruijn sequence . The rest of the entries can be similarly interpreted.

Table 1.
The degrees of actual minimal polynomials of modified de Bruijn sequences of order , reproduced from [].
We define a digraph , or simply , when n is clear from the context, based on the set in (1) as follows. We associate each nonzero polynomial
with the n-string
and its integer representation

Table 2.
Degree 10 polynomials , written as , that generate the set in (1) and their corresponding sequences.
Table 2.
Degree 10 polynomials , written as , that generate the set in (1) and their corresponding sequences.
Modified de Bruijn Sequence s | Modified de Bruijn Sequence s | ||
---|---|---|---|
10100100011 | 11011000101 | ||
10011010111 | 10100011011 | ||
11101011001 | 11010111011 | ||
10001101011 | 11011101011 | ||
11010110001 | 11000100101 |
Hence, there is a one-to-one correspondence between elements in and the integers in , which we use as the vertex set V. Let be seen as vertices . By Equations (5) and (6), we add an arc from A to B if and only if
The arc governed by (18) is from A to , while the one defined by (19) is from A to . We call the former the doubling arc, marked in blue and labeled by 0, and the latter the double-then-complement arc, marked in red and labeled by a 1. For brevity, the names are abbreviated to double and complement arcs.
The outdegree of each vertex is 2, except for the vertex whose outdegree is 1 since . This vertex has only a red arc to its complement vertex . Each vertex has indegree 2, except for the vertex whose only inbound edge comes from . There is a loop from vertex A to itself if and only if mod . This vertex is clearly unique. The graph is simple for all n such that .
Example 3.
The graph is in Figure 1 Top. The loop is from to itself.
Let us briefly review the de Bruijn graph on vertices, denoted by or simply B when n is understood. The graph, which is also known as the Good graph and the de Bruin–Good graph, was introduced independently by N. de Bruijn in [] and by I. J. Good in []. Its set of vertices consists of binary n-strings
Each vertex has indegree 2 and outdegree 2. The two arcs from vertex are to vertices and . For our purposes, we relabel the vertices by integers from 0 to by replacing with .
We denote, by , the graph obtained by deleting vertex 0 and its incident arcs in . In , there is an arc from vertex A to vertex B if and only if or . Moreover, the only vertex with a loop is , and the only vertex with outdegree 1 is .
Theorem 4.
For any positive integer n, the graphs and are isomorphic.

Proof.
Since all arithmetic operations are performed modulo , we omit for brevity. It is clear that and have the same number of vertices and edges. To devise a recursive mapping , we start by sending vertex in to vertex in . In their respective graphs, the vertices are the only ones with a loop. Since , the inverse of 3 always exists for all n. Now that we have , we assign, for , the images
A vertex labeled by an even number in is sent to an even-numbered vertex in . Similarly, a vertex labeled by an odd number in is mapped to an odd-numbered vertex in . By definition, , which means that the unique vertex in whose outdegree is 1 is sent to the unique vertex with outdegree 1 in . Let A and B be vertices in such that there is an arc from A to B. It is immediate to verify that there is an arc from to .
We note that, since is a Hamiltonian graph, then so is . To show that is injective, let be a Hamiltonian path that starts from vertex in . Let A and B be two distinct vertices in such that . If vertex C is the predecessor of B in , then there exists an arc from to in . Hence, there must be an arc from C to A, contradicting the fact that is a Hamiltonian path. Thus, . □
Example 4.
For , we start with . Proceeding recursively, we obtain
Definition 1.
Our task is to identify polynomials , with and , that generate Hamiltonian cycles in . Once such a is found, Theorem 1 concludes that the reciprocal polynomial of is the minimal polynomial of a modified binary de Bruijn sequence.
4. Hamiltonian Cycles in
Deciding whether a directed graph is Hamiltonian is difficult. A survey on this topic was performed by Kühn and Osthus in []. Further references and discussion can be found in Section 6.1 of []. Fortunately, has many properties that allow us to explicitly determine some Hamiltonian cycles for all n.
4.1. Hamiltonian Cycles by Two Greedy Algorithms
Inspired by some greedy algorithms in the construction of certain classes of de Bruijn sequences discussed by Chang, Ezerman and Fahreza in [], we devise two basic algorithms. Algorithm 1 prefers the complement over the double arcs when moving from the current vertex to the next vertex. Algorithm 2 swaps the preference with a modification imposed to avoid the inclusion of 0, since .
Algorithm 1Prefer Complement |
Input: The order n of the sequences. |
Output: Paths in . |
1: for do |
2: Initiate the indexed set ▹ |
3: element in S with largest index |
4: |
5: |
6: while or do |
7: if then |
8: Append c to S |
9: else |
10: Append d to S |
11: Path is , where . |
The two algorithms produce paths, starting from an initial vertex . While each initial vertex produces a path, only several of them lead to Hamiltonian cycles. Table 3 lists the Hamiltonian cycles produced for .
For a given , Algorithm 1 yields distinct—that is, cyclically-inequivalent—Hamiltonian cycles: of them have two distinct initial vertices, whereas one cycle has three possible initial vertices. Let . Then, for each j. When , the generated cycle is the same as the one produced when —that is, with . This is because the only arc from is to and the complement of the double of is . Algorithm 2 produces a unique Hamiltonian cycle. It occurs if and only if the initial vertex is either or its complement .
Example 5.
For , Algorithm 1 yields the Hamiltonian cycle in Figure 2 on . The path consists of arcs:
Algorithm 2Modified Prefer Double |
Input: The order n of the sequences. |
Output: Paths in . |
1: for do |
2: Initiate indexed set ▹ |
3: element in S with largest index |
4: |
5: |
6: while or do |
7: if and then |
8: Append c to S |
9: else |
10: if then |
11: Append d to S |
12: else |
13: Append c to S |
14: Path is , where . |

Figure 2.
The Hamiltonian cycle in produced by Algorithm 1 on . It is generated by . The resulting sequence has linear complexity 14, which is maximal.
For brevity, we will only prove, in Theorem 6, that Algorithm 1 on always yields a Hamiltonian cycle. The respective proofs for the other valid initial vertices and on Algorithm 2 when using the two specified initial vertices follow a similar line of reasoning. To identify Hamiltonian cycles beyond those produced by the two algorithms, we establish a general result on the paths produced by Algorithm 1. The result will be used in the next subsection to identify many more Hamiltonian cycles in by cycle joining.

Table 3.
Hamiltonian cycles constructed by Algorithms 1 and 2 for .
Table 3.
Hamiltonian cycles constructed by Algorithms 1 and 2 for .
n | The Resulting Hamiltonian Cycle | |
---|---|---|
Algorithm 1: Prefer Complement | ||
4 | 1, 15, 8 | (1, 13, 5, 10, 11, 9, 2, 4, 7, 14, 3, 6, 12, 8, 15) |
3, 14 | (3, 9, 13, 5, 10, 11, 6, 12, 7, 1, 2, 4, 8, 15, 14) | |
7, 12 | (7, 1, 13, 5, 10, 11, 9, 2, 4, 8, 15, 14, 3, 6, 12) | |
5 | 1, 31, 16 | (1, 29, 5, 21, 10, 11, 9, 13, 26, 20, 23, 17, 2, 27, 22, |
19, 25, 18, 4, 8, 15,30, 3, 6, 12, 7, 14, 28, 24, 16, 31) | ||
3, 30 | (3, 25, 13, 5, 21, 10, 11, 9, 18, 27, 22, 19, 6, 12, 7, | |
17, 29, 26, 20, 23, 14, 28, 24, 15, 1, 2, 4, 8, 16, 31, 30) | ||
7, 28 | (7, 17, 29, 5, 21, 10, 11, 9, 13, 26, 20, 23, 14, 3, 25, | |
18, 27, 22, 19, 6, 12, 24, 15, 1, 2, 4, 8, 16, 31, 30, 28) | ||
15, 24 | (15, 1, 29, 5, 21, 10, 11, 9, 13, 26, 20, 23, 17, 2, 27, | |
22, 19, 25, 18, 4, 8,16, 31, 30, 3, 6, 12, 7, 14, 28, 24) | ||
6 | 1, 63, 32 | (1, 61, 5, 53, 21, 42, 43, 41, 45, 37, 10, 20, 23, 17, 29, 58, 11, 22, 19, 25, |
13, 26, 52, 40, 47, 33, 2, 59, 9, 18, 27, 54, 44, 39, 49, 34, 4, 55, 46, 35, 57, | ||
50, 36, 8, 16, 31, 62, 3, 6, 51, 38, 12, 24, 15, 30, 60, 7, 14, 28, 56, 48, 32, 63) | ||
3, 62 | (3, 57, 13, 37, 53, 21, 42, 43, 41, 45, 26, 11, 22, 19, 25, 50, 27, 9, 18, 36, | |
55, 17, 29, 5, 10, 20, 23, 46, 35, 6, 51, 38, 12, 39, 49, 34, 59, 54, 44, 24, 15, | ||
33, 61, 58, 52, 40, 47, 30, 60, 7, 14, 28, 56, 48, 31, 1, 2, 4, 8, 16, 32, 63, 62) | ||
7, 60 | (7, 49, 29, 5, 53, 21, 42, 43, 41, 45, 37, 10, 20, 23, 17, 34, 59, 9, 18, 27, 54, | |
19, 25, 13, 26, 11, 22, 44, 39, 14, 35, 57, 50, 36, 55, 46, 28, 56, 15, 33,61, | ||
58, 52, 40, 47, 30, 3, 6, 51, 38, 12, 24, 48, 31, 1, 2, 4, 8, 16, 32, 63, 62, 60) | ||
15, 56 | (15, 33, 61, 5, 53, 21, 42, 43, 41, 45, 37, 10, 20, 23, 17, 29, 58, 11, 22, 19, | |
25, 13, 26, 52, 40, 47, 30, 3, 57, 50, 27, 9, 18, 36, 55, 46, 35, 6, 51, 38, 12, | ||
39, 49, 34, 59, 54, 44, 24, 48, 31, 1, 2, 4, 8, 16, 32, 63, 62, 60, 7, 14, 28, 56) | ||
31, 48 | (31, 1, 61, 5, 53, 21, 42, 43, 41, 45, 37, 10, 20, 23, 17, 29, 58, 11, 22, 19, 25, | |
13, 26, 52, 40, 47, 33, 2, 59, 9, 18, 27,54, 44, 39, 49, 34, 4, 55, 46, 35, 57 | ||
50, 36, 8, 16, 32, 63, 62, 3, 6, 51, 38, 12, 24, 15, 30, 60, 7, 14, 28, 56, 48) | ||
Algorithm 2: Modified Prefer Double | ||
4 | 5, 10 | (5, 10, 4, 8, 15, 14, 12, 7, 1, 2, 11, 6, 3, 9, 13) |
5 | 10, 21 | (10, 20, 8, 16, 31, 30, 28, 24, 15, 1, 2, 4, 23, 14, 3, |
6, 12, 7, 17, 29, 26, 11, 22, 19, 25, 18, 27, 9, 13, 5, 21) | ||
6 | 21, 42 | (21, 42, 20, 40, 16, 32, 63, 62, 60, 56, 48, 31, 1, 2, 4, 8, 47, 30, 3, 6, 12, 24, |
15, 33, 61, 58, 52, 23,46, 28, 7, 14, 35, 57, 50, 36, 55, 17, 34, 59, 54, 44, 39, | ||
49, 29, 5, 10, 43, 22, 19, 38, 51, 25, 13, 26, 11, 41, 18, 27, 9, 45, 37, 53) |
Theorem 5.
Let . Given an indexed set whose elements are vertices in in the form of
let Ψ be a mapping on Θ defined by, for ,
Then, Ψ is a permutation on Θ.
Proof.
We show that is a bijection on . It is immediate to verify that there exist indices such that . If , then
If , then
Thus, is injective.
Let be an arbitrarily selected element of . If is even, then there exists an integer such that . Hence, either or . If is odd, then there exists an integer such that . Then, either or . We conclude that is surjective, and the proof is now complete. □
Since the function in (21) is a permutation on a finite set , then can be written as a composition of j disjoint cycles
Definition 2.
Let be a cycle generated by Ψ. We say that starts at and endsat since, by then, both possible images , one of which being , have appeared. The elements and are, respectively, the starting element and the terminating element of .
Lemma 3.
Let the indexed set Θ and the function Ψ be as defined in Theorem 5. Let be an even number that is not a starting element in any cycle. Then, the complement of γ is an odd number that occurs before γ in the said cycle.
Proof.
By how is defined and since is not the starting element, it is impossible for to appear in the cycle before its complement, which is an odd number. □
Lemma 4.
Let , and then . By the time both and appear in a cycle , we know that both β and must have appeared earlier.
Proof.
Since is bijective, the appearance of both and requires the prior inclusion of both possible predecessors in the cycle. □
The conclusion that is Hamiltonian for all follows from the next theorem.
Theorem 6.
Let the set Θ and function Ψ be as defined in Theorem 5. The function Ψ produces a single cycle of length that starts at 1 and ends at .
Proof.
Let be the cycle
Consider the shift-equivalent cycle . Since , must be either or .
For a contradiction, let us assume that . Since 1 has already appeared in , the only other possible successor of —namely, —must have appeared in . The two possible predecessors of are and . Hence, must have the form
On the other hand, since is both an odd number and the terminating element, then its complement—namely, —must not have appeared in . However, this rules out from as well, contradicting (26). Thus, the terminating element must be .
We now show that all elements of appear in . The computations are performed modulo . It is clear that , since it is the only preimage of . Hence, we have
Aided by Lemmas 3 and 4, we proceed by induction to confirm that each even number appears.
- Since is an even number, Lemma 3 says that its complement appears. By Lemma 4, both and must have appeared before both and do.
- Since is even, by Lemma 3, its complement appears. We infer by Lemma 4 that and appear.
- We repeat the same reasoning on . Its complement appears, and so do both and .
- Continuing the process, we establish the appearance of
Lemma 3 ensures the appearance of each odd number j such that , completing the proof. □
Corollary 1.
The graph for each is Hamiltonian.
Proof.
We built in the proof of Theorem 6. Following the sequence of vertices in , a Hamiltonian path in is formed by the edges
□
4.2. More Hamiltonian Cycles by Cycle Joining
Theorem 6 guarantees that, starting from , Algorithm 1 produces a cycle of length . However, for most other , we obtain disjoint cycles as in (24) with . The following lemma gives a condition for when two disjoint cycles can be joined into a longer cycle.
Lemma 5.
Two disjoint cycles and can be joined into one cycle if there exist and such that d is the complement of c—that is, .
Proof.
Let and , with and forming a complementary pair—that is, . We exchange the predecessors of and to obtain the joined cycle
□
Theorem 7.
If Ψ generates disjoint cycles as in (24), then all of the cycles can be joined into a single cycle of length .
Proof.
If generates only one cycle, then it is clear that the length of the cycle must be . Suppose that generates at least two cycles, and we take any cycle . It suffices to show that there exists whose complement does not appear in . For a contradiction, let there be no such element. Hence, every element in has its complement in —that is, for any . By definition, exactly one of either c or is an even number e. Therefore, the predecessors of c and , namely, and also appear in . Following this fact, all integers in appear in . This contradicts the assumption that generates two or more cycles. □
We can implement Theorem 7 and enumerate the number of resulting Hamiltonian cycles that can be constructed by adopting the cycle joining method from the theory of feedback shift registers.
Let be expressed in terms of its disjoint cycles as in (24). For distinct , let denote and with . The tuple joins and by interchanging the respective predecessors of r and s.
To count the number of inequivalent Hamiltonian cycles that can be produced from , we build the associated undirected multigraph as follows. The vertices are . We add an edge labeled between and whenever there is a pair with the property that , and . The graph has no loops but may have multiple edges connecting the same pair of vertices. The number of Hamiltonian cycles that can be constructed in this manner is equal to the number of subgraphs of that are rooted spanning trees.
The following well-known counting formula is a variant of the BEST (de Bruijn, Ehrenfest, Smith and Tutte) Theorem. Further details on graphical approaches to the generation of full cycles, including the BEST Theorem and its history, can be found in Section 2 of []. The cofactor of entry in a matrix is times the determinant of the matrix obtained by deleting the row and column of M.
Theorem 8.
(BEST) Let be the vertex set of . Let be the matrix derived from in which is the number of edges incident to , and is the negative of the number of edges between vertices and for . Then, the number of rooted spanning trees of is the cofactor of any entry of M.
Example 6.
A randomized instance for chooses
We label the cycles from left to right as , and to obtain the associated graph in Figure 3.
The associated matrix is
By the BEST Theorem, there are eight Hamiltonian cycles that can be constructed from Ψ. Table 4 lists them. All but one of the sequences have maximal linear complexity 14.

Figure 3.
The associated graph for Example 6.

Table 4.
The eight Hamiltonian cycles produced from by cycle joining in Example 6. For , we have . The edges a, b, c, d and e are specified in Figure 3.
Table 4.
The eight Hamiltonian cycles produced from by cycle joining in Example 6. For , we have . The edges a, b, c, d and e are specified in Figure 3.
Joining | Hamiltonian Cycle | Modified de Bruijn Sequence s | |
---|---|---|---|
5. The Canonical Generator Polynomial
In this section, we show that there exists a canonical generator for every Hamiltonian cycle .
Corollary 2.
If is a Hamiltonian cycle in , then there exists a polynomial that generates . The consecutive elements in
form the Hamiltonian path in .
Proof.
Since is a Hamiltonian cycle in , and is isomorphic to by Theorem 4, then corresponds to a modified binary de Bruijn sequence , which can be represented as , with . Lemma 2 ensures the existence of the required and, by Definition 1, generates . □
We recall Lemma 1 before establishing our next result. If is a modified binary de Bruijn sequence whose rational fraction representation is , for some , then, for any , the rational fraction representation of the k-shifted sequence in Equation (15) is where . Two polynomials and may generate the same Hamiltonian cycle in . The following lemma explains how to relate the polynomials to one another.
Lemma 6.
Let be given, and let . Two polynomials and in generate the same Hamiltonian cycle in if and only if
Proof.
To verify that , it suffices to use the fact that divides , which implies .
Let be any element of . If and generate the same Hamiltonian cycle , then there exist i and j, where , such that
If , then letting yields
If , then multiplying both sides of (31) by gives us
Since , we conclude that
Conversely, let for some k with . We take two vertices A and B in that correspond, respectively, to
for some . Then,
Using , one writes
Thus, both and generate the same in . □
Example 7.
Lemma 6 tells us to focus on the polynomial with the least degree that generates . We formally define this polynomial.
Definition 3.
Let be a Hamiltonian cycle in . The polynomial with the least degree ℓ among all of the polynomials that generate is the canonical generator of .
Theorem 9.
Let be given, and let be a rational fraction representation of a modified binary de Bruijn sequence . Then, there exists a polynomial of degree such that is a rational fraction representation of the k-shifted sequence for some . The polynomial is the canonical generator of the Hamiltonian cycle that corresponds to .
Proof.
We claim that . Suppose, on the contrary, that there exists some r, with , such that . Let
Then, . Therefore,
which contradicts the fact that .
Next, we show the existence of , for some , which satisfies and . Since , then there exists some t, with , such that . If with , then
Since , we multiply both sides by . If , then . Finally, we infer
Thus, . By Corollary 2 and Definition 3, we confirm that is precisely of . □
Every Hamiltonian cycle in has of degree . We now show how to determine for a given .
Theorem 10.
If is a Hamiltonian cycle in and , then its canonical generator can be determined by the following procedure.
- Begin by writing .
- Let and . Determine each by solving .
Proof.
Since and satisfies
then the solution of determines the value of . Thus, all s can be determined. □
Example 8.
Let be given in terms of its successive vertices
We have and . Hence, , which is vertex 15. Consequently, is vertex 3. Hence, . We iterate the process and read the resulting polynomials in terms of their vertices in . Since is vertex 1, we obtain . Since is vertex 13, we infer . We end with from Example 7.
Finally, we are ready to determine the minimal polynomial of a modified binary de Bruijn sequence.
Theorem 11.
Let . Let be a Hamiltonian cycle in whose canonical generator is . The reciprocal polynomial of
is the minimal polynomial of the modified de Bruijn sequence that corresponds to the given .
Proof.
Since is the canonical generator of in , we know that
Hence, is a rational fraction representation of . If , then
Thus, is also a rational fraction representation of , whose minimal polynomial is . □
Example 9.
When , the canonical polynomial generates the cycle of vertices . The arcs forming the Hamiltonian path are
and the corresponding sequence is . Since ,
6. Conclusions and Future Works
This work provides a systematic method to determine the minimal polynomial of a modified binary de Bruijn sequence. As a concluding remark, we highlight that, if, for any , one can characterize the occasions for which , then we can confirm that there exist modified de Bruijn sequences with maximal complexity . The computational evidence for small values of n strongly suggests that most modified de Bruijn sequences have maximal complexity. Determining a closed formula for the number of such sequences is a worthy research challenge to solve.
Author Contributions
Conceptualization, M., I.E.W., D.J.E.P. and M.F.E.; investigation, M., I.E.W., D.J.E.P. and M.F.E.; writing—original draft preparation, M.; writing—review and editing, I.E.W., D.J.E.P. and M.F.E.; visualization, M.F.E.; supervision, I.E.W., D.J.E.P. and M.F.E.; project administration, M.; funding acquisition, M. and I.E.W. All authors have read and agreed to the published version of the manuscript.
Funding
Musthofa is supported by the Indonesian Endowment Fund for Education, known by its abbreviation LPDP in Bahasa Indonesia, a full-ride scholarship from the Indonesian Ministry of Finance. Nanyang Technological University Grant 04INS000047C230GRT01 supports the research conducted by M.F.E.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
References
- De Bruijn, N.G. A combinatorial problem. Proc. Sect. Sci. K. Ned. Akad. Wet. 1946, 49, 758–764. [Google Scholar]
- Sainte-Marie, C.F. Solution to question nr. 48. Interméd. Math. 1894, 1, 107–110. [Google Scholar]
- Fredricksen, H. A survey of full length nonlinear shift register cycle algorithms. SIAM Rev. 1982, 24, 195–221. [Google Scholar] [CrossRef]
- Chang, Z.; Ezerman, M.F.; Ling, S.; Wang, H. On binary de Bruijn sequences from LFSRs with arbitrary characteristic polynomials. Des. Codes Cryptogr. 2019, 87, 1137–1160. [Google Scholar] [CrossRef]
- Gabric, D.; Sawada, J.; Williams, A.; Wong, D. A successor rule framework for constructing k-ary de Bruijn sequences and universal cycles. IEEE Trans. Inform. Theory 2020, 66, 679–687. [Google Scholar] [CrossRef]
- Etzion, T. Linear complexity of de Bruijn sequences-old and new results. IEEE Trans. Inform. Theory 1999, 45, 693–698. [Google Scholar] [CrossRef][Green Version]
- Chan, A.H.; Games, R.A.; Key, E.L. On the complexities of de Bruijn sequences. J. Comb. Theory Ser. A 1982, 33, 233–246. [Google Scholar] [CrossRef]
- Etzion, T.; Lempel, A. Construction of de Bruijn sequences of minimal complexity. IEEE Trans. Inform. Theory 1984, 30, 705–709. [Google Scholar] [CrossRef]
- Mayhew, G.; Golomb, S. Linear spans of modified de Bruijn sequences. IEEE Trans. Inform. Theory 1990, 36, 1166–1167. [Google Scholar] [CrossRef]
- Kyureghyan, G.M. Minimal polynomials of the modified de Bruijn sequences. Discrete Appl. Math. 2008, 156, 1549–1553. [Google Scholar] [CrossRef][Green Version]
- Tan, L.; Xu, H.; Qi, W.-F. Preliminary results on the minimal polynomial of modified de Bruijn sequences. Finite Fields Appl. 2018, 50, 356–365. [Google Scholar] [CrossRef]
- Wang, H.-Y.; Zheng, Q.-X.; Wang, Z.-X.; Qi, W.-F. The minimal polynomials of modified de Bruijn sequences revisited. Finite Fields Appl. 2020, 68, 101735. [Google Scholar] [CrossRef]
- Lidl, R.; Niederreiter, H. Finite Fields, Encyclopaedia of Mathematics and Its Applications; Cambridge University Press: New York, NY, USA, 1997. [Google Scholar]
- Sloane, N.J.A. Sequence No. A0001037. In The Online Encyclopedia of Integer Sequences; The OEIS Foundation Inc.: Highland Park, NJ, USA, 2009; Available online: https://oeis.org/A0001037 (accessed on 20 June 2022).
- Good, I.J. Normal recurring decimals. J. London Math. Soc. 1946, s1-21, 167–169. [Google Scholar] [CrossRef]
- Kühn, D.; Osthus, D. A survey on Hamilton cycles in directed graphs. Eur. J. Comb. 2012, 33, 750–766. [Google Scholar] [CrossRef]
- Bang-Jensen, J.; Gutin, G.Z. Digraphs: Theory, Algorithms and Applications, 2nd ed.; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Chang, Z.; Ezerman, M.F.; Fahreza, A.A. On greedy algorithms for binary de Bruijn sequences. Appl. Algebra Eng. Commun. 2020. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).