Abstract
A preference function provides a method to build periodic sequences by specifying a set of rules that determine which symbols are to be attempted before others, when the sequence is constructed one symbol at a time. The well-known prefer-one, prefer-opposite, and prefer-same binary de Bruijn sequences are all constructed using appropriate preference functions. In this article we provide some fairly general results that give conditions for a pair of an initial word and a preference function on a q-ary alphabet to produce sequences that include every pattern of given size \(n\ge 1\)–except possibly some specified set of patterns. We provide several old and new constructions that showcase the flexibility of the results. Specifically, we give a construction for square-free and general separative de Bruijn sequences. The existence of these sequences was established more than a decade ago but nonconstructively. An important special case of these separative sequences produces universal cycles for permutations. We also build a preference function for binary de Bruijn sequences of patterns with a maximum density of ones. As for full de Bruijn sequences, the main result helps furnish a recursive construction from arbitrary cyclic permutations of q symbols. Finally, we build a preference function that extends a full de Bruijn sequence of order n into one of order \(n+1\).
Similar content being viewed by others
References
Alhakim A.: A simple combinatorial algorithm for de Bruijn sequences. Am. Math. Monthly 117(8), 728–732 (2010).
Alhakim A.: Spans of preference functions. Discret. Appl. Math. 160(7–8), 992–998 (2012).
Au Y.H.: Generalized de Bruijn words for primitive words and powers. Discret. Math. 338(12), 2320–2331 (2015).
Becher V., Heiber P.A.: On extending de Bruijn sequences. Inform. Process. Lett. 111(18), 930–932 (2011).
Chang Z., Ezerman M.F., Fahreza A.A.: On greedy algorithms for binary de Bruijn sequences. Appl. Algebra Eng. Commun. Comput. (2020).
Chung F., Diaconis P., Graham R.: Universal cycles for combinatorial structures. Discret. Math. 110(1–3), 43–55 (1992).
de Bruijn N.G.: A combinatorial problem. Koninklijke Nederlandse Akademie v. Wetenschappen 49, 758–764 (1946).
Eldert C., Gray H.J., Gurk H.M., Rubinoff M.: Shifting counters. AIEE Trans. 77, 70–74 (1958).
Ford L.R.: A Cyclic Arrangement of \(m\)-tuples, Report P-1071, Rand Corp., (1957)
Fredricksen H.: A survey of full length nonlinear shift register cycle algorithms. SIAM Rev. 24, 195–221 (1982).
Gabric D., Sawada J.: Investigating the discrepancy property of de Bruijn sequences. Discret. Math. 345(4), 1–15 (2022).
Golomb S.: Shift Register Sequences. Holden-Day, San Francisco (1967).
Hartke S.G.: Binary De Bruijn cycles under different equivalence relations. Discret. Math. 1–3, 93–102 (2000).
Hurlbert G., Isaak G.: Equivalence class universal cycles for permutations. Discret. Math. 149, 123–129 (1996).
Kása Z.: On arc-disjoint Hamiltonian cycles in de Bruijn graphs. CoRR abs/1003.1520 (2010)
Knuth D.E.: The Art of Computer Programming, vol. 1. Addison-Wesley, Reading (1968).
Lin Y-L., Ward C., Jain B., Skiena S.: Constructing Orthogonal de Bruijn Sequences, Proceedings of the 12th International Symposium on Algorithms and Data Structures, New York, August 15-17, (LNCS, V. 6844), (2011).
Martin M.H.: A problem in arrangements. Bull. Am. Math. Soc. 40, 859–864 (1934).
Moreno E., Matamala M.: Minimal de Bruijn Sequence in a Language with Forbidden Substrings. In: J. Hromkovič, M. Nagl, B. Westfechtel (eds) Graph-Theoretic Concepts in Computer Science. WG . Lecture Notes in Computer Science, vol 3353. Springer, Berlin (2004)
Moreno E.: De Bruijn sequences and de Bruijn graphs for a general language. Inform. Process. Lett. 96(6), 214–219 (2005).
Penne R.: A note on certain de Bruijn sequences with forbidden subsequences. Discret. Math. 310(4), 966–969 (2010).
Ruskey F., Williams A.: An explicit universal cycle for the \((n - 1)\)-permutations of an \(n\)-set. ACM Trans. Algor. 45(3), 1–12 (2010).
Sala E., Sawada J., Alhakim A.: Efficient constructions of the Prefer-same and Prefer-opposite de Bruijn sequences. Submitted (2020).
Sawada J., Stevens B., Williams A.: De Bruijn Sequences for the Binary Strings with Maximum Density. In: Katoh N., Kumar A. (eds) WALCOM: Algorithms and Computation. WALCOM 2011. Lecture Notes in Computer Science, vol 6552. Springer, Berlin (2011).
Wang X., Sun Y., Zhang W.: State Diagrams of a Class of Singular LFSR and Their Applications to the Construction of de Bruijn Cycles. arXiv:1805.00147 [math.CO].
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by T. Helleseth.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix A: Proof of Proposition 2.10
Appendix A: Proof of Proposition 2.10
By Lemma 2.9\(I^y\) occurs in \(S_x\). Identifying \(S_x\) and \(S_y\) with cycles on the de Bruijn digraph of order n, we will show that \(S_y\) can be obtained from \(S_x\) via a chain of cross-join operations (see e.g. Fredricksen [10] for an exact definition).
First we note that starting the cycle \(S_x\) at the word \(I^y\) can be regarded as the ‘cross’ part of a cross-join operation, when the predecessor of \(I^y\) is redirected to \(I^x\) and vice versa. This cuts \(S_x\) into two cycles \(C_x\) and \(C_y\) holding the n-words \(I^x\) and \(I^y\) respectively. Let us also refer by \(\mathbf {T}\) to the path in \(S_x\) that starts with \(I^x\) and ends with the predecessor of \(I^y\) (this is the cycle \(C_x\) with exactly one edge missing.)
Enumerate the consecutive n-words of \(C_y\) with \(I^y\) being first. Now let \(\mathbf {v}_1\) be the first n-word, beginning at \(I^y\) which has a potential successor, other than its own successor in \(C_y\), that appeared already in the path \(\mathbf {T}\). \(\mathbf {v}_1\) exists for sure among the vertices of \(C_y\) because, trivially, the predecessor of \(I^y\) is one such (previously being the predecessor of \(I^x\) in \(S_x\).) If \(\mathbf {v}_1\) coincides with the the latter then \(S_y\) is just a rotation of \(S_x\) and the claim of the proposition is clearly valid. Otherwise, denote by \(\mathbf {w}_1\) the leftmost successor of \(\mathbf {v}_1\) in \(\mathbf {T}\). This means that the right successor of \(\mathbf {v_1}\) in \(S_y\) is \(\mathbf {w}_1\). Moreover, redirecting \(\mathbf {v_1}\) to \(\mathbf {w}_1\), and the predecessor of \(\mathbf {w}_1\) in \(\mathbf {T}\) to the successor of \(\mathbf {v_1}\) in \(C_y\) rejoins \(C_x\) and \(C_y\) into one cycle.
The new cross-joined cycle, say \(S_1\), agrees with \(S_y\) on at least the path from \(I^y\) to \(\mathbf {w_1}\). To prepare for a second iteration of the argument, let \(\mathbf {T}_1\) be the sub-path of \(\mathbf {T}\) that starts at \(I^x\) and ends with the predecessor of \(\mathbf {w}_1\) and let \(\mathbf {T}_2\) be the remaining part of \(\mathbf {T}\). If no word in \(\mathbf {T}_2\) has a potential successor in \(\mathbf {T}_1\) then the cycle \(S_1\) is already a cycle that respects P when it is started with \(I^y\) so it must coincide with \(S_y\). Otherwise, we find the first such word, \(\mathbf {v_2}\in \mathbf {T}_2\) and its leftmost successor in \(\mathbf {T}_1\) and repeat the previous logic. Evidently, the argument can be inductively repeated until we get a cycle (and therefore a sequence) that fully respects P, and so it must be \(S_y\).
Rights and permissions
About this article
Cite this article
Alhakim, A. Designing preference functions for de Bruijn sequences with forbidden words. Des. Codes Cryptogr. 90, 2319–2335 (2022). https://doi.org/10.1007/s10623-022-01077-5
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10623-022-01077-5