Abstract
We show a method to construct binary multi de Bruijn sequences using the cross-join method. We extend the proof given by Alhakim for ordinary de Bruijn sequences to the case of multi de Bruijn sequences. In particular, we establish that all multi de Bruijn sequences can be obtained by cross-joining an ordinary de Bruijn sequence concatenated with itself an appropriate number of times. We implemented the generation of all multi de Bruijn sequences of type and We experimentally confirm that some multi de Bruijn sequences can be generated by Galois Nonlinear Feedback Shift Registers (NLFSRs). It is supposed that all multi de Bruijn sequences can be generated using Galois NLFSRs.
MSC:
05-08
1. Introduction
De Bruijn sequences have been investigated for decades [1,2,3,4]. They have many applications: in combinatorial problems, in cryptography to generate pseudo-random sequences, and in biology to investigate genome sequences [5]. It is known that binary de Bruijn sequences can be generated by Nonlinear Feedback Shift Registers (NLFSRs) [6]. NLFSRs are the main components in constructing stream ciphers. Knowing a de Bruijn sequence, one can apply the cross-join method to construct new de Bruijn sequences [3,7,8,9]. In papers [10,11] It was proved first that the cross-join method generates all de Bruijn sequences of given order. In [10], an algorithm was explicitly given that begins with an arbitrary de Bruijn sequence from a finite alphabet and outputs a Hamiltonian path in the corresponding cross-join graph.
Paper [9] generalizes the notion of de Bruijn sequences to multi de Bruijn sequences, where patterns of fixed length appear m times (m = 1 for ordinary de Bruijn sequences), that paper presents formulas for the total number of possible multi de Bruijn sequences with a specified set of parameters. However, it does not provide a method to generate any such sequence. Although the notion of multi de Bruijn sequences appears to be more complex than ordinary ones and may cater to more applications (they appear in some biological sequences investigations [5],) one important consequence of the results of this paper is that all multi de Bruijn sequences stem, simply, from any ordinary de Bruijn sequence.
Following the proof given by Alhakim [10], we prove that all multi de Bruijn sequences can be generated starting from one such sequence by using the cross-join method. The proof is non-constructive in the sense that one has to start with a particular multi de Bruijn sequence in order to apply the cross-join method. On the positive side, it is sufficient to form a trivial multi de Bruijn sequence by concatenating an ordinary de Bruijn sequence m times with itself. Ordinary de Bruijn sequences can be constructed using various methods [7,12,13,14] (see also, [3] and references therein). We implemented this method for the case of multi de Bruijn sequences of the type and (binary multi de Bruijn sequences of order 2 and 3 with multiplicity 2 and patterns of length 2 and 3, see below for a formal definition). The drawback of the cross-join method is that to find a cross-join pair, we potentially have to run over the whole sequence. This can still be reasonably done for sequences up to the order of 40.
Galois NLFSRs were considered in papers [15,16]. We confirmed experimentally that some sequences of type can be generated by Galois NLFSRs listed in [16]. In fact, they are modified sequences where one of the patterns has a lower multiplicity. It is an open problem whether all binary multi de Bruijn sequences can be generated using suitable Galois NLFSRs.
2. Multi de Bruijn Sequences
We introduce multi de Bruijn sequences following Tesler’s paper [9]. Let be a totally ordered alphabet of size . A linear sequence is an ordinary sequence of elements of denoted . Define the cyclic shift of a linear sequence by In a cyclic sequence, we treat all rotations of a given linear sequence as equivalent. A k- is a sequence of length k over . The set of all k- over is . A de Bruijn sequence is a cyclic sequence over alphabet in which all k- occur exactly once. The length of such a sequence is .
Definition 1.
A multi de Bruijn sequence is a cyclic sequence over an alphabet Ω of size q in which each k- occurs exactly m-times with . k is the order of the sequence.
Let denote the set of all such sequences. The length of such a sequence is , since each of the k- accounts for m starting positions. Tesler [9] derived the formula for the cardinality of . In the following, we consider multi de Bruijn sequences over an alphabet with q symbols , addition modulo q is used.
Definition 2.
Let a sequence be represented as a sequence of its states , where each state is a k-mer . It is conjugate to a state if and . We denote this . The state is a companion of the state if and
Definition 3.
Two pairs of vertices that allow the transformation of a de Bruijn cycle to another de Bruijn cycle are called cross-join pairs. Let a multi de Bruijn sequence be considered a cyclic sequence and represented as a sequence of states . Then the four states , form a cross-join pair for the sequence if they occur in the sequence in the listed order.
Definition 4.
Let and be a cross-join pair. We construct a new multi de Bruijn sequence by swapping the successors of and and the successors of and . That is, by going from to the successor of , then from to the successor of and so on until closing the cycle. This construction is called the cross-join method.
To be more precise, let us denote and . Then the original sequence has states that proceed as:
After the cross-join operation, the modified sequence has states that proceed as:
The conjugate pair of states splits the full cycle into two shorter cycles after interchanging their successors. Then the states are on different cycles, and after interchanging their successors, we obtain a new de Bruijn cycle (see Figure 1).
Figure 1.
A geometric representation of the cross-join method.
3. The Main Theorem
Definition 5.
Let be two sequences from . The length of the sequences is . We take the least lexicographical representatives of both sequences and consider the length L of the longest common initial path of these sequences
We define the function (pseudo-distance) of the sequences as .
Proposition 1.
The function has the properties:
- For all in if and only if
One can find examples of three multi de Bruijn sequences, which are concatenations of de Bruijn sequences of lower order for which the triangle inequality is not satisfied. It turns out that the pseudo-distance suffices to get our connectedness result. Unlike the case of ordinary de Bruijn cycles, the absence of the triangle inequality does not allow for the construction of a Hamiltonian path of multi de Bruijn cycles.
Definition 6.
Let x and y be two distinct multi de Bruijn sequences. We say that y is a neighbor of x if y can be obtained from x by applying a sequence of cross-join operations.
We adapt the following proposition and its proof from the paper [10].
Proposition 2.
Let and be two distinct multi de Bruijn sequences from the set . Then there exists a multi de Bruijn sequence , which is a neighbor of x in such that .
Proposition 2 is crucial in the proof of following.
Theorem 1.
Any two distinct multi de Bruijn sequences in can be connected by applying a sequence of the cross-join operations.
Proof.
Let x and y be two distinct sequences in . By Proposition 2, x has a neighbor such that . If , then we are done; otherwise, the same argument can be iterated to get a sequence , which is a neighbor of , with . Due to the strict inequality, and since the number of sequences in is finite, it is evident that this iterative process must end at y after a finite number of steps l, leading to the desired path . □
Proof of Proposition 2.
Let x and y be state sequences of multi de Bruijn sequences. We take the least lexicographical representatives of the sequences and , where and are successive states of the multi de Bruijn sequences. Let be the maximal common initial sequence of x and y. Suppose that the sequence
is common to x and y and is maximal, where 0 is the state of zeros . Since and for the successors of in x and y at least one is distinct from the state 0. Let us refer to these successors as and . Since x is a multi de Bruijn sequence, it contains every state m times, so it must contain . The latter is at least one of the states in , the complement of in x; that is, the subsequence of x that starts with and extends till the end of the sequence, just before cycling back to . Let be the predecessor of the first occurrence of in x. Since belongs to , the state is either in or it is itself. However, the latter would make the common initial sub-sequence of x, and y would extend to , which contradicts the maximality of . Now and are predecessors of the same state so they form a conjugate pair. Swapping their successors, we split x into two cycles, a cycle that includes the initial subsequence , and another cycle that includes the edge .
The cycle aligned to start with the initial subsequence and the multi de Bruijn cycle y have a maximal common initial sequence of states
where . Let be a complement of in . The rest of the proof depends on establishing the following. □
Claim 1.
It is possible to join and by using a state in and a conjugate state in , i.e., there is a state in that has a conjugate in
To show this, suppose we cannot. Then let the successors of in y and be and , respectively. Obviously, since is common to y and and since is not on the path of y, there is at least one occurrence of the word in , the complement of in , as it cannot be on , by our assumption. Let be the predecessor of in . As before, we can argue that is in .
Interchanging the successors of and , we further split the cycle into two cycles and with the former being the cycle that includes the initial subsequence and that shares a larger still initial path with y:
In essence, this process can be iterated, arranging and re-arranging vertices on the initial cycle but without using vertices , only a finite number of times. Let k be the maximal number of iterations and let be the resulting cycle that includes with maximal initial path
that is common with the multi de Bruijn sequence y. Under the assumption that the above claim is not valid, we prove the following: the sub-path of the cycle that begins with and ends with 0 is simply an edge . That is, is the last vertex before rounding back to .
To see this, suppose that is the successor of in . Let be the successor of in y, so that and are companion vertices. We then see that is not the last vertex in y for otherwise, the multi de Bruijn sequence y would be shorter than . Hence, is not the initial of . Consequently, one occurrence of is either in or in the part of . If the first case is true, swapping the predecessor of in with the predecessor of (which is evidently one of the vertices of ) shows that and can be joined into multi de Bruijn sequence using a vertex outside , contradicting the original assumption of the Claim.
If the second case is true, that is, if belongs to or any of the cycles made by the previous iteration and that are at most (equivalently, it is one of the vertices of ), then we can swap the predecessors of and to get yet another cycle that shares a longer initial segment with y, contradicting the maximality of . It follows that is the last vertex in .
We now prove the following: includes all predecessors of 0. We prove this in a way similar to the proof of the previous statement. In effect, suppose that U is a predecessor of 0 that is not on . If U belongs to , we get a contradiction because we could have joined and by swapping, for example, the successors of U and the last vertex in before the initial subsequence , which is, of course, in . Likewise, the presence of U on any of the intermediate cycles contradicts the maximality of k.
The validity of this last means that the sequence cannot be continued into a multi de Bruijn sequence as it cannot cycle back to 0 without using one of the predecessors of zero. This, of course, is not true because is already the initial path of the multi de Bruijn sequence y. This contradiction means that the Claim must be true.
We have thus proven that and can be joined by swapping the successors of a vertex in with that of a conjugate vertex in . This makes a new multi de Bruijn sequence z which is a neighbor of x. Since and z satisfies the inequality
as desired.
Proposition 3.
Starting with a multi de Bruijn sequence in and applying the cross-join method generates all sequences in .
We present now the formula for the number of elements of [9].
where is the Euler totient function and
where m is repeated m times. We calculate
Next we calculate
We have implemented the cross-join method for the multi de Bruijn sequences of the type and . The implementation has been done in SAGE [17]. For each sequence, the succeeded states are represented as decimals, and the sequence representative is the least lexicographical one. We have started from the first sequences in the list in Table 1 and generated all sequences. First, we find the cross-join pairs from the chosen sequence and generate the corresponding sequences. Then we choose a new de Bruijn sequence and repeat the process. We then check whether all the sequences are different and throw away the repeated ones. After a few steps of this process, we find all sequences of a given type.
Table 1.
The sequences . (Tesler [9]). The green and the red sequences are the concatenation of de Bruijn sequences of . Changing from decimal representation to binary representation is descibed after Table 2.
The List. The feedback functions of NLFSRs generated the sequences shown in Table 2. + is understood as modulo 2 addition. This table is a part of the Table 3 of Dubrova et al. [16].
| # | ||||
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 | ||||
| 10 | ||||
| 11 | ||||
| 12 | ||||
| 13 | ||||
| 14 | ||||
| 15 | ||||
| 16 | ||||
| 17 | ||||
| 18 |
Table 2.
The sequences generated by Galois NLFSRs from the List above.
Table 3.
The sequences (Tesler [9]).
4. Galois NLFSRs
Following Dubrova et al. [16] and Dubrova [15], we introduce Galois NLFSRs. A Galois NLFSR is described by the set of Boolean functions of n binary variables and n cells which keep bits (Figure 2). The state of an NLFSR consists of the content of n cells at a given time. After the next clock, each bit i in the state of Galois NLFSR is updated to its next-state function, which is a Boolean function of state variables.
Figure 2.
(Dubrova [16]). A scheme of Galois NLFSRs of order n.
We considered Galois NLFSRs of order 4 given by Dubrova ([16], Table 1) which have period 15. We checked experimentally that some of them generate modified multi de Bruijn sequences of type . In Table 2 at all sequences, state 000 appears once, and other states appear twice beyond line 15, where state 000 appears twice, and state 111 appears once.
Conjecture: All binary multi de Bruijn sequences can be generated by some Galois NLFSRs.
The digital numbers in Table 2 are the states of NLFSRs regarded as generating sequences from . Each can be represented as . We explain the representation in the example. Let us take the first line in Table 2. The digit 0 from the left-hand side of the Decimal column is represented as the binary 000, and they are the first digitals in Binary. Then we take the decimal 4 and represent it as 001, and we add 1 to the sequence 000. Then we take 6 and represent it as 011 and add 1 to the sequence 0001. This way, each triple of binary digits from Binary, taking it from Decimal and going with one position from left to right, is a representation of a decimal digit from Decimal. The binary representation is treated as a cycle. The same representation can be done in Table 1 and Table 3.
5. Conclusions
We have extended the Alhakim proof [10] to the case of multi de Bruijn sequences. Specifically, we have shown that any multi de Bruijn sequence can be obtained using a sequence of cross-joins of an ordinary de Bruijn sequence concatenated m times with itself. Additionally, we have generated the and sequences. We have experimentally found that some Galois NLFSRs generate the multi de Bruijn sequences of type
Author Contributions
Investigation, A.A. and J.S. All authors have read and agreed to the published version of the manuscript.
Funding
Research of the first author was partially supported by the University Research Board of the American University of Beirut (Project Number 26310). Research of the second author was partially supported by the Military Institute of Communication.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- de Bruijn, N.G. A Combinatorial Problem. K. Ned. Akad. Wet. 1946, 49, 758–764. [Google Scholar]
- Flye-Sainte Marie, C. Solution to problem number 58. l’Intermédiare des Mathématiciens 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]
- Nellore, A.; Ward, R. Arbitrary-length analogs of de Bruijn sequences. arXiv 2021, arXiv:2108.07759v2. [Google Scholar]
- Kandel, D.; Matias, Y.D.; Unger, R.; Winkler, P. Shuffling biological sequences. Discrete Appl. Math. 1996, 71, 171–185. [Google Scholar] [CrossRef]
- Golomb, S. Shift Register Sequences, Revised ed.; Aegean Park Press: Laguna Hills, CA, USA, 1981. [Google Scholar]
- Chang, Z.; Ezerman, M.F.; Fahreza, A.A.; Ling, S.; Szmidt, J.; Wang, H. Binary de Bruijn Sequences via Zech’s Logarithms. SN Comput. Sci. 2021, 2, 1–18. [Google Scholar] [CrossRef]
- Helleseth, H.; Klöve, T. The Number of Cross-join pairs in maximum length linear sequences. IEEE Trans. Inf. Theory 1991, 31, 1731–1733. [Google Scholar] [CrossRef]
- Tesler, G. Multi de Bruijn Sequences. J. Comb. 2017, 8, 439–474. [Google Scholar] [CrossRef]
- Alhakim, A. Hamiltonicity of the Cross-Join Graph of de Bruijn Sequences. arXiv 2020, arXiv:1805.12059v2. [Google Scholar]
- Mykkeltveit, J.; Szmidt, J. On Cross Joining de Bruijn Sequences. Contemp. Math. 2015, 63, 335–346. [Google Scholar]
- Li, C.; Zeng, X.; Li, C.; Helleseth, T. A Class of de Bruijn Sequences. IEEE Trans. Inf. Theory 2014, 60, 7955–7969. [Google Scholar] [CrossRef]
- Li, C.; Zeng, X.; Helleseth, T.; Li, C.; Hu, L. The Properties of a Class of Linear FSRs and Their Applications to the Construction of Nonlinear FSRs. IEEE Trans. Inf. Theory 2014, 60, 3052–3061. [Google Scholar]
- Li, C.; Zeng, C.; Li, C.; Helleseth, T.; Li, M. Construction of de Bruijn Sequences From LFSRs With Reducible Characteristic Polynomials. IEEE Trans. Inf. Theory 2016, 62, 610–624. [Google Scholar] [CrossRef]
- Dubrova, E. A scalable method for constructing Galois NLFSRs with period 2n−1 using cross-join pairs. IEEE Trans. Inform. Theory 2013, 59, 703–709. [Google Scholar] [CrossRef]
- Dubrova, E.; Teslenko, M.; Tenhunen, H. On Analysis and Synthesis of (n,k)-Non-Linear Feedback Shift Registers. In Proceedings of the Conference on Design, Automation and Test in Europe, Munich, Germany, 10–14 March 2008; pp. 1286–1291. [Google Scholar]
- Stein, W.; Joyner, D. SAGE. System for Algebra and Geometry Experimentation. ACM Sigsam Bull. 2005, 39, 61–64. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 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/).