Next Article in Journal
An Evolutionary Perspective of Virus Propagation
Previous Article in Journal
Multiobjective Model Predictive Control of a Parabolic Advection-Diffusion-Reaction Equation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Lower Bounds, and Exact Enumeration in Particular Cases, for the Probability of Existence of a Universal Cycle or a Universal Word for a Set of Words

1
School of Statistics and Data Science, Nankai University, Tianjin 300071, China
2
Department of Mathematics and Statistics, University of Strathclyde, Glasgow G1 1XH, UK
3
College of Mathematics and System Science, Xinjiang University, Urumqi, Xinjiang 830046, China
*
Author to whom correspondence should be addressed.
Mathematics 2020, 8(5), 778; https://doi.org/10.3390/math8050778
Submission received: 6 April 2020 / Revised: 8 May 2020 / Accepted: 9 May 2020 / Published: 12 May 2020
(This article belongs to the Section Mathematics and Computer Science)

Abstract

:
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 4 .

1. Introduction

A universal cycle, or u-cycle, for a given set S with words of length n over an alphabet A is a circular word u 0 u 1 u 1 that contains each word from S exactly once (and no other word) as a contiguous subword u i u i + 1 u i + n 1 for some 0 i 1 , where the indices are taken modulo . The notion of a universal cycle was introduced in [1]. 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, for S is a (non-circular) word u 0 u 1 u + n 2 that contains each word from S exactly once as a contiguous subword u i u i + 1 u i + n 1 for some 0 i 1 . In this paper, we assume that n 2 and k 2 to make all of our definitions well-defined and to avoid trivialities.
There is a long series of research in the literature dedicated to the study of universal cycles and universal words for various sets of combinatorial structures. For example, see [2] and references therein. We note that the existence of a u-cycle trivially implies the existence of a u-word, but not vice versa. Indeed, if u 0 u 1 u 1 is a u-cycle for S then u 0 u 1 u 1 u 0 u 1 u n 2 is a u-word for S. In either case, solving problems on u-cycles and u-word is normally done through considering de Bruijn graphs. A de Bruijn graph B ( n , k ) consists of k n nodes corresponding to words in A n and its directed edges are x 1 x 2 x n x 2 x n x n + 1 where x i A for i { 1 , , n + 1 } . De Bruijn graphs are an important structure that is used in solving a variety of problems, e.g., in combinatorics on words [3] and genomics [4].
Let G = ( V , E ) be a directed graph. A directed path in G is a sequence v 1 , , v t of distinct nodes such that there is an edge v i v i + 1 for each 1 i t 1 . Such a path is a Hamiltonian path if it contains all nodes in G. A closed Hamiltonian path ( v t v 1 is an edge) is a Hamiltonian cycle. If G has a Hamiltonian cycle then G is Hamiltonian. It is well-known, and is not difficult to show, that B ( n , k ) is Hamiltonian, so any Hamiltonian cycle (resp., path) in B ( n , k ) corresponds to a u-cycle (resp., u-word) for A n . For example, the cycle 00 01 11 10 00 in B ( 2 , 2 ) corresponds to the u-cycle 0011, and we can also get a u-word 00110 from this.
The problem in question. Now, suppose that we remove s < k n words from A n where A is an alphabet of size k so that each word is equally likely to be removed. The resulting set S may, or may not have a u-cycle or a u-word. Let P c ( n , k , s ) and P w ( n , k , s ) be the probabilities of the events that S has a u-cycle and u-word, respectively. Then, a natural question is: What are P c ( n , k , s ) and P w ( n , k , s ) ? Note that by definition, a u-cycle for S must cover at least n distinct words, and thus if s > k n n then P c ( n , k , s ) = 0 .
It is not difficult to see that if s = 1 , or s = k n 1 , then with probability 1 a u-word exists. Indeed, if s = 1 then removing a word in A n corresponds to removing a node in B ( n , k ) that turns a Hamiltonian cycle passing through it to a Hamiltonian path giving a u-word, while if s = k n 1 then only one word remains and it is a u-word. Similarly, it is not difficult to see that if s = 1 then with probability 1 / k n 1 a u-cycle exists. Indeed, if s = 1 then one can only remove words of the form x x x called loops, and there are k such words, while if s = k n 1 then the only u-cycle of length n can be a loop.
In Table 1, Table 2 and Table 3 we present the values of P c ( n , 2 , s ) and P w ( n , 2 , s ) for n = 2 , 3 , 4 obtained by Mathematica 11.3. Even though these tables were obtained by computer, it is possible to check them by hand for n = 2 , 3 by considering the existence of a Hamiltonian path in B ( n , 2 ) . Moreover, in the case of n = 4 , one can consider Eulerian cycles/paths (to be introduced below) in B ( 3 , 2 ) and be also able to check Table 3 by hand.
Our results in this paper. In this paper, we not only provide lower bounds for P c ( n , k , s ) and P w ( n , k , s ) for any values of n , k , s (summarized in Table 4), but also give exact values in the case of s = 2 in Theorem 8. For example, we will show that for k 3 and n 2 ,
P w ( n , k , 2 ) = 2 ( 2 k n 3 k + 1 ) k n 1 ( k n 1 ) .
We remark that some of our proofs require rather subtle considerations, which tend to be more difficult in the case of the binary alphabet.
Preliminaries. In this paper, B ( n , k ) denotes the graph obtained from B ( n , k ) after removing s nodes, or s edges depending on the context.
A directed graph is strongly connected if there exists a directed path from any node to any other node. A directed graph is connected if for any pair of nodes a and b there exists a path in the underlying undirected graph. A trail in a directed graph G is a sequence v 1 , , v t of nodes such that there is an edge v i v i + 1 for each 1 i t 1 and edges are not visited more than once. An Eularian trail in G is a trail that goes through each edge exactly once. A closed Eulerian trail is an Eulerian cycle. A directed graph is Eulerian (resp., semi-Eulerian) if it has an Eulerian cycle (resp., Eulerian trail). Let d + ( v ) (resp., d ( v ) ) denote the out-degree (resp., in-degree) of a node v. A directed graph is balanced if d + ( v ) = d ( v ) for each node v in the graph. The following result is well-known and is not hard to prove.
Theorem 1.
A directed graph G is semi-Eulerian if and only if at most one vertex v has d + ( v ) d ( v ) = 1 , at most one vertex u has d ( u ) d + ( u ) = 1 , every other vertex w has d + ( w ) = d ( w ) , and G is connected. A graph is Eulerian if and only if it is balanced and (strongly) connected.
The line graph L ( G ) of a directed graph G is the directed graph whose vertex set corresponds to the edge set of G, and L ( G ) has an edge e v if in G, the head of e meets the tail of v. It is well-known, and not difficult to show, that B ( n , k ) = L ( B ( n 1 , k ) ) , and thus a Hamiltonian path (resp., cycle) in B ( n , k ) corresponds to an Eulerian trail (resp., cycle) in B ( n 1 , k ) , and this property will be often used throughout this paper to show the existence of u-cycles and u-words.
Nodes of the form x n , as well as edges of the form x n x n , are loops. Nodes of the form y x n 1 are out-special and nodes of the form x n 1 y are in-special. Out-special and in-special nodes together are special. The following theorem will be used by us in the paper multiple times.
Theorem 2
([5]). Let u and v be two distinct non-loop nodes in B ( n , k ) . Then, there exist k distinct node-disjoint paths from u to v if and only if u is not out-special and v is not in-special.
Organization of the paper. In Section 2 and Section 3 we provide the lower bounds for P c ( n , k , s ) and P w ( n , k , s ) in the cases of k 3 and k = 2 , respectively. In Section 4 we give exact values of P c ( n , k , 2 ) and P w ( n , k , 2 ) , and in Section 5 we provide some concluding remarks.

2. The Case of the Alphabet of Size K 3

Let
S ( n , k , s ) : = k s 1 i = 2 n 2 ( i 1 ) k 2 s i ,
where the sum is taken over all s 1 + 2 s 2 + + ( n 2 ) s n 2 = s with s i 0 and 1 i n 2 . In the next theorem, we will obtain the following lower bounds for k 3 and n 3 :
P c ( n , k , s ) S ( n , k , s ) k n s
P w ( n , k , s ) 1 k n s S ( n , k , s ) + α k s 1 i = 2 n 2 ( i 1 ) k 2 s i ,
where α = k n s + s 1 k + 1 and the sum is taken over all s 1 + 2 s 2 + + ( n 2 ) s n 2 = s 1 with s i 0 and 1 i n 2 . The case of n = 2 and k 3 will be considered in Theorem 4 below.
Theorem 3.
For k , n 3 , the lower bounds in (1) and (2) hold.
Proof. 
Assume k 3 . We observe that removing all i-cycles in B ( n 1 , k ) , 1 i n 2 , of the binary form, that is, involving only nodes x 1 x n 1 for x j { x , y } for 1 j n and x , y { 1 , , k } , results in a strongly connected and balanced graph B ( n 1 , k ) . Indeed, clearly B ( n 1 , k ) is balanced. To justify that B ( n 1 , k ) is strongly connected, we need to show that for any edge e = A B belonging to a removed binary cycle, there is a directed path P A B from A to B which does not go through any other edge from the removed binary cycles. Then, in a path P X Y in B ( n 1 , k ) from a node X to a node Y, we can replace any such e with P A B , so that it gives a path in B ( n 1 , k ) from X to Y.
Suppose A = x 1 x n 1 and B = x 2 x n where all x j { x , y } for some x and y. Let z x , y . Then, P A B is given by
A x 2 x n 1 z x 3 x n 1 z x 2 x 4 x n 1 z x 2 x 3 B
since no of the edges in P A B belongs to an i-cycle for i < n 1 . So, B ( n 1 , k ) is Eulerian, and thus its line graph B ( n , k ) is Hamiltonian, and there exists a u-cycle corresponding to it.
To justify (1), we consider i-cycles, 2 i n 2 , of the form
x m y j x m y j x m 1 y j x m y j x m 2 y j x m y j
where x < y , m + j = i and 1 m , j i 1 . Note that no two of such cycles can share an edge. Thus, we can remove in B ( n 1 , k ) s i such i-cycles for 1 i n 2 so that the total number of removed edges (corresponding to the total number of removed nodes in B ( n , k ) ) is s. Clearly, the number of such one-cycles is k, and for i 2 , the number of such i-cycles is ( i 1 ) k 2 .
To justify (2) we note that if all of the s removed edges come from the binary cycles considered above, then the same lower bound as in (1) will be obtained. This bound can be improved as follows. Begin with removing s 1 edges coming from the binary i-cycles as above, which will result in a Eulerian graph, so that we can remove any edge e in such a graph and obtain a semi-Eulerian graph corresponding to a u-word. To count the possibilities to remove such an e, we do not want e to be a loop, because this will result in some double counting. However, if e is not a loop, all the cases will be different from already considered cases, because before we were removing entire i-cycles for some i. This explains the term α = k n ( s 1 ) ( k s 1 ) in (2). □
In the proof of the next theorem we need the following simple lemma. There, by a circular binary string, we mean a number of digits 0 and 1 placed around a circle in positions labeled by 1 , 2 , . . . . . .
Lemma 1.
For k 2 , the number of circular binary strings with i 1s and k i 0s, 0 i k , in which no two 1s stay next to each other is given by
k i 1 i 1 + k i i .
Proof. 
Let h ( k , i ) be the number of binary (non-circular) strings with i 1s in which no two 1s stay next to each other. Then, h ( k , i ) = k i + 1 i . Indeed, h ( k , i ) clearly counts placing i 1s in a binary string of length k i + 1 and then replacing each 1, but the rightmost 1, by 10. For the circular case, if 0 is in position 1, then we clearly have h ( k 1 , i ) such strings. On the other hand, if 1 is in position 1 in the circular case, then we have h ( k 3 , i 1 ) such strings since then positions k and 2 must be occupied by 0s. This completes the proof. □
Theorem 4.
Let n = 2 and k 3 , f ( k , s ) : = i = 0 k ( k 3 ) / 2 k ( k 3 ) 2 i k s 2 i ,
g ( k , s ) : = i 3 ( i 1 ) ! k i 1 i 1 + k i i k s i ,
U ( k , s ) : = f ( k , s ) + 2 f ( k , s k ) + g ( k , s ) + 2 g ( k , s k ) and
V ( k , s ) : = k ( k 3 ) k s 1 + 2 k s k 1 .
Then,
P c ( 2 , k , s ) U ( k , s ) k 2 s .
Also,
P w ( 2 , k , s ) U ( k , s ) + V ( k , s ) + 2 k j = 1 k 1 ( f ( k , s j ) + g ( k , s j ) ) k 2 s .
Proof. 
Instead of removing s nodes in B ( 2 , k ) , we consider removing s edges in B ( 1 , k ) , whose nodes are k loops 1 , k , and for every pair of nodes x and y, both x y and y x are present. We call a 2-cycle in B ( 1 , k ) special if it involves nodes x and x + 1 for 1 x k 1 , or 1 and k. Clearly, the number of non-special two-cycles is k ( k 3 ) 2 .
To justify (3), note that removing all the edges in any i of non-special 2-cycles in B ( 1 , k ) , and then removing s 2 i loops results in a balanced and strongly connected graph showing the existence of a u-cycle in this case. The number of ways to proceed in this way is clearly given by f ( k , s ) . Moreover, we can proceed in the same way after first removing the k edges either from the cycle 1 2 k 1 , or from the cycle k ( k 1 ) k 1 , which explains the term of 2 f ( k , s k ) .
To produce a more subtle estimate, we will be removing just a single i-cycle for a fixed i 3 from B ( 1 , k ) , which is clearly not counted previously. The only condition on removing such an i-cycle is that it must not involve any of the edges in a special two-cycle for us to guarantee strong connectivity of the obtained graph. The number of ways to selected i nodes to form such an i-cycle is given by Lemma 1, and since there are edges in both directions between any pair of selected nodes, there are ( i 1 ) ! ways to choose a cycle on the chosen nodes. The remaining s i edges to be removed after removing i-edges in an i-cycle can be chosen among the k loops. This explains the term of g ( k , s ) . Finally, removing the k edges in either the cycle 1 2 k 1 , or the cycle k ( k 1 ) k 1 , and then removing an i-cycle as above results in a balanced and strongly connected graph, and explains the term 2 g ( k , s k ) . This completes the justification of (3).
To justify (4), first note that all cases considered in proving (3) can be used in the case of u-words. To improve the bound, we note that a directed path (on distinct nodes) of length j, 1 j k 1 , consisting of edges coming from special 2-cycles, can be removed, and then some other cycles can be removed as discussed in the case of u-cycles, which will result in a semi-Eulerian graph and thus corresponds to a u-word. There are two ways to pick the direction of such a path on special two-cycles, and k ways to pick its start, justifying the term of 2 k j = 1 k 1 ( f ( k , s j ) + g ( k , s j ) ) . Finally, the following two options also result in semi-Eulerian graph not considered above:
  • remove any non-loop edge among the k ( k 3 ) edges coming not from special two-cycles, and the remaining edges can be removed from loops. This gives k ( k 3 ) k s 1 possibilities;
  • remove the k edges in either the cycle 1 2 k 1 , or the cycle k ( k 1 ) k 1 , and then remove one more non-loop edge among the k ( k 3 ) edges coming not from special two-cycles, and the remaining edges can be removed from loops, which gives 2 k ( k 3 ) k s k 1 possibilities.
This explains the term of V ( k , s ) and completes the proof of (4). □

3. The Case of the Alphabet Size k = 2

Recall that in Table 1, Table 2 and Table 3 we present the values of P c ( n , 2 , s ) and P w ( n , 2 , s ) for n = 2 , 3 , 4 .
Let
T ( n , s ) = 2 s 1 1 s 2 1 s n ,
where the sum is taken over all s 1 + 2 s 2 + ( n 1 ) s n 1 = s with 0 s 1 2 , 0 s 2 1 and 0 s n 1 2 . Then, for k = 2 and n 5 , we will show in the next theorem that
P c ( n , 2 , s ) T ( n , s ) 2 n s .
P w ( n , 2 , s ) T ( n , s ) + ( 2 n s + s 1 1 ) 2 s 1 1 s 2 1 s n 2 n s ,
where the sum is taken over all s 1 + 2 s 2 + ( n 1 ) s n 1 = s 1 with 0 s 1 2 , 0 s 2 1 and 0 s n 1 2 .
Theorem 5.
For n 5 , the lower bounds in (5) and (6) hold.
Proof. 
We have k = 2 and n 5 . We observe that after removing two loops, the two-cycle, and the two ( n 1 ) -cycles of the form
x n 2 y x n 3 y x x n 4 y x 2 x y n 2 x n 2 y
in B ( n 1 , k ) results in a strongly connected and balanced graph B ( n 1 , k ) . Indeed, clearly B ( n 1 , k ) is balanced. To justify that B ( n 1 , k ) is strongly connected, we need to show that for any edge e = A B belonging to a removed cycle, there is a directed path P A B from A to B which does not go through any other edge from the removed cycles. Then, in a path P X Y in B ( n 1 , k ) from a node X to a node Y we can replace any such e with P A B giving a path in B ( n 1 , k ) from X to Y. We consider two cases.
Case 1. A = x i y x n i 2 and B = x i 1 y x n i 3 for 0 i n 2 . If i = 0 then P A B = A x n 1 B . If i = 1 then P A B is given by
A y x n 3 y x n 3 y y y n 1 y n 2 x y n 3 x 2 B .
If i = n 2 , then P A B is given by
A x n 3 y y y n 1 y n 2 x y n 3 x 2 B .
In all other cases, P A B is given by
A x i 1 y x n i 2 y x i 2 y x n i 2 y 2 x i 3 y x n i 2 y 2 x
x i 4 y x n i 2 y 2 x 2 y 2 x i 1 y x n i 4 y x i 1 y x n i 3 B .
Case 2. A = x 1 x 2 x y x y and B = x 2 y x y x are in the 2-cycle where x y . Then, for even n, P A B is given by
A x 2 y x y y x 3 x y y x x 4 y y x y x 5 y x y x B ,
and for odd n, P A B is given by
A x 2 y x y y x 3 x y y x x 4 y y x x x 5 y x x y
x 6 x x y x x 7 x y x y B .
So, B ( n 1 , k ) is Eulerian, and thus its line graph B ( n , k ) is Hamiltonian, and there exists a u-cycle corresponding to it.
To justify (5), we note that no two of the two loops, one two-cycle and two ( n 1 ) -cycles considered above can share an edge. Thus, we can remove in B ( n 1 , k ) s i such i-cycles for i { 1 , 2 , n 1 } so that the total number of removed edges (corresponding to the total number of removed nodes in B ( n , k ) ) is s.
To justify (6) we note that if all of the s removed edges come from the cycles considered above, then the same lower bound as in (5) will be obtained. This bound, can be improved as follows. Begin with removing s 1 edges coming from the i-cycles as above, which will result in an Eulerian graph, so that we can remove any edge e in such a graph and obtain a semi-Eulerian graph corresponding to a u-word. To count the possibilities to remove such an e, we do not want e to be a loop, because this will result in some double counting. However, if e is not a loop, all the cases will be different from already considered cases, because before we were removing entire i-cycles for some i. This explains the factor of 2 n ( s 1 ) ( 2 s 1 ) in (6). □

4. Exact Values of P c ( n , k , 2 ) and P w ( n , k , 2 )

Theorem 6.
We have P c ( 2 , 2 , 2 ) = 1 6 and for n 3 and k 2 ,
P c ( n , k , 2 ) = k ( k 1 ) k n 2 .
Proof. 
If two nodes are removed in B ( 2 , 2 ) , the only possibility for the graph to stay Hamiltonian (and thus to correspond to a u-cycle) is if the removed nodes are loops, which explains that P c ( 2 , 2 , 2 ) = 1 6 . On the other hand, if n 3 and k 2 then in order to obtain an Eulerian graph by removing two edges in B ( n 1 , k ) we must either remove two loops, or remove a two-cycle. Each of these gives k 2 possibilities thus explaining the formula for P c ( n , k , 2 ) . □
The proof of Theorem 8 relies on the following theorem, which looks like an intuitively true statement, but its proof is rather involved and requires consideration of many cases, and we were not able to find this result in the literature.
Theorem 7.
Let e = a b be an edge in B ( n , k ) . Then, there exists a Hamiltonian cycle in B ( n , k ) that goes through e, with the only exception when k = 2 , a is out-special and b is in-special.
Proof. 
If k = 2 , a = y x n 1 and b = x n 1 y then no Hamiltonian cycle can cover the loop x n and go through e because the only edge coming to x n comes from a. This is not the case for k 3 .
If either a or b is a loop x n , then the statement is true. Indeed, if k = 2 then there is only one edge coming in to x n , and one edge coming out of x n , so these edges will be part of any Hamiltonian cycle. On the other hand, if k 3 , then suppose a = y x n 1 and b = x n ; the case when a = x n can be considered similarly. Since B ( n , k ) has a Hamiltonian cycle and the corresponding u-cycle U, it will go through an edge z x n 1 x n , x z . If y = z we are done. Otherwise, we can swap all y’s and z’s in U to obtain the desired Hamiltonian cycle from the new u-cycle.
Thus, we can assume that neither a nor b is a loop.
In what follows, we will use the following approach. We will be considering edges e 1 = A B and e 2 = B C in B ( n 1 , k ) corresponding to a and b, respectively. Next, we will demonstrate that after removing e 1 and e 2 (corresponding to removing a and b in B ( n , k ) ) the obtained graph B ( n 1 , k ) remains connected. This is done via finding alternative directed paths P X Y from X to Y, X Y , where X , Y { A , B } or X , Y { B , C } . Together with the fact that B ( n 1 , k ) is balanced if A = C , or otherwise A has one extra edge coming in, and C has one extra edge coming out, B ( n 1 , k ) has an Eulerian trail corresponding to a Hamiltonian path in B ( n , k ) obtained from B ( n , k ) after removing a and b. Such a Hamiltonian path can clearly be extended to a Hamiltonian cycle in B ( n , k ) by adding back the removed edge e.
Suppose that n = 3 . If k = 2 then we have 8 possibilities for e (loops are not involved, and we cannot have a be out-special and b be in-special). Each of the eight possible choices of e can be found in one of the following two Hamiltonian cycles in B ( 3 , 2 ) giving the desired result:
100 000 001 010 101 011 111 110 100
001 011 111 110 101 010 100 000 001
Thus we can assume k 3 . Let a = x y z and b = y z h . Then, A = x y , B = y z and C = z h . Letting t x , z we see that P A B = A y t t y B if t y y z , or else P A B = A y t B . P B C is found in the same way.
In what follows, we assume that n 4 (and a and b are not loops).
If A = C then A , B , C form a 2-cycle, and for n 3 none of these vertices is special. Thus, P A B and P B C exist by Theorem 2. So, we can assume that A C .
Suppose that one of A, B, or C is a loop.
Case 1. A = x n 1 is a loop, B = x n 2 y , C = x n 3 y z , and y x . P B C exist by Theorem 2, and for k 3 , P A B is given by
A = x n 1 x n 2 t x n 3 t x x n 4 t x 2 t x n 2 B = x n 2 y ,
where t y , x . For k = 2 , we note that P A B does not exist in this case. However, it is sufficient for us to prove that there exists P B A that does not use the edge e 2 ( e 1 clearly will not be used). Such a path is given by
B = x n 2 y x n 3 y z ¯ x n 4 y z ¯ x x n 4 y z ¯ x 2 A = x n 1 ,
where z ¯ denotes the letter distinct from z. In the case z = x the path above has one extra step than otherwise.
Case 2. B = y n 1 is a loop, A = x y n 2 , C = y n 2 z , y x , and z y . For k 3 , P B C is essentially P A B in Case 1, and P A B is given by
A = x y n 2 y n 2 t y n 3 t y y n 4 t y 2 t y n 2 B = y n 1
where t y , x . The case k = 2 corresponds to a being out-special, and b being in-special, and it is the exception in the statement of the theorem (the loop B becomes non-reachable from any other node).
Case 3. C = z n 1 is a loop, A = x y z n 3 , B = y z n 2 , and y z . P A B exist by Theorem 2, and for k 3 P B C is given by
B = y z n 2 z n 2 t z n 3 t z z n 4 t z 2 t z n 2 C = z n 1
where t y , x . Similarly to Case 1, for k = 2 , P B C does not exist, but we can find P C B not using e 1 and e 2 :
C = z n 1 z n 2 x ¯ z n 3 x ¯ y z n 4 x ¯ y z z n 5 x ¯ y z 2 B = y z n 2
where x ¯ is the letter different from x so the last step is not the edge e 1 .
Thus, we can assume that none of A, B, or C is a loop. Moreover, we only need to consider the following two cases, because otherwise, P A B and P B C are given by Theorem 2.
Case i. A = y x n 2 is out-special and B = x n 2 z is in-special, where x y , z . In this case, P A B = y x n 2 x n 1 B = x n 2 z .
Case ii. B = y x n 2 is out-special and C = x n 2 z is in-special, where x y , z . This is essentially Case i. □
Theorem 8.
We have P w ( 2 , 2 , 2 ) = 5 6 and for n 3 ,
P w ( n , 2 , 2 ) = 2 n 3 ( 2 n 1 ) 2 n 3
Moreover, for k 3 and n 2 , we have
P w ( n , k , 2 ) = 2 ( 2 k n 3 k + 1 ) k n 1 ( k n 1 ) .
Proof. 
If n = 2 and k = 2 , then it is easy to see that the graph obtained from B ( 2 , 2 ) by removing two nodes has a Hamiltonian path unless the removed nodes are 01 and 10. This gives P w ( 2 , 2 , 2 ) = 5 6 .
So, we can assume that either n 3 and k 2 or n 2 and k 3 .
Let a and b be the nodes in B ( n , k ) corresponding to the removed words of length n over k-letter alphabet. Note that B ( n 1 , k ) is semi-Eulerian (in particular, respecting the conditions on in-degrees and out-degrees) if and only if
  • either a or b is a loop, in which case clearly a Hamiltonian path in B ( n , k ) exists, or
  • a b (or b a ) is an edge in B ( n , k ) , in which case a Hamiltonian path in B ( n , k ) exists by Theorem 7 with one exception.
Thus, exactly one of the following four cases of choosing a can occur in order for B ( n , k ) to have a Hamiltonian path.
Case 1. a is a loop, in which case b can be any node. Clearly, there are k ( k n 1 ) ways to choose such a and b.
Case 2. (i) a = x y x y x or (ii) a = x y x y y . b can only be of the form, in case (i) t t t or y x y x y or z x y x y y or y x y x x z where z y , and in case (ii) t t t or y x y x y or z x y x y x or y x y x y z where z y . In either case, b can be chosen in k + 1 + ( k 1 ) + ( k 1 ) = 3 k 1 ways depending on the respective choices of t and z. There are k ( k 1 ) choices to pick a giving in total for this case k ( k 1 ) ( 3 k 1 ) possibilities.
Case 3. a = y x n 1 is out-special or a = x n 1 y is in-special. In either case, b can be either a loop, or the other endpoint of an edge coming into a or going out of a. There are k loops, k edges coming in, and k edges coming out of a, but one of these edges is connected to a loop. Thus, in this case we have 3 k 1 choices for b, and in total 2 k ( k 1 ) ( 3 k 1 ) possibilities (2 corresponds to the choices of being out-special or in-special). However, the last formular only works for k 3 , because when k = 2 , we cannot remove a and b connected by an edge, when both of them are special (in this case a loop becomes isolated). So, if k = 2 we have 2 k ( k 1 ) ( 3 k 1 1 ) = 16 possibilities.
Case 4. In all other cases of a, b can be any of 2 k nodes connected to a by an edge, or any of k loops. So, we have
3 k ( k n k k ( k 1 ) 2 k ( k 1 ) ) = 3 k ( k n 3 k 2 + 2 k )
possibilities.
Since every pair ( a , b ) appears twice in our arguments, Cases 1–4 give
P w ( n , 2 , 2 ) = 2 ( 2 n 1 ) + 10 + 16 + 6 ( 2 n 8 ) ( 2 n 1 ) 2 n
and for k 3 , P w ( n , k , 2 ) =
k ( k n 1 ) + k ( k 1 ) ( 3 k 1 ) + 2 k ( k 1 ) ( 3 k 1 ) + 3 k ( k n 3 k 2 + 2 k ) ( k n 1 ) k n .

5. Directions of Further Research

A universal cycle (or a universal word) for an arbitrary set S is a cyclic sequence (or a non-circular sequence) whose substrings of length n encode | S | distinct instances in S. U-cycles and u-words have been studied for a wide variety of combinatorial objects including permutations [6,7], partitions [8], subsets [9], multisets [10], labeled graphs [11], various functions and passwords; for more information, the reader is referred to [12]. There are many studies on universal cycles or universal words because of their applications including dynamic connections in overlay networks [13], genomics [4], software calculation of the ruler function in computer words [12], etc. An interesting direction of research would be extending our studies of P c ( n , k , s ) and P w ( n , k , s ) to other combinatorial structures. It would also be interesting to explore new methods to compute the exact values of P c ( n , k , s ) and P w ( n , k , s ) . Finally, our bounds for the general case presented in (1) and (2) can be improved by conducting a more subtle analysis of the removed cycles in the proof of Theorem 3, and exploring how far the improvement could go is another interesting direction.

Author Contributions

conceptualization, S.K.; methodology, H.Z.Q.C. and S.K.; software, H.Z.Q.C.; validation, H.Z.Q.C. and S.K.; formal analysis, H.Z.Q.C., S.K. and B.Y.S.; investigation, H.Z.Q.C., S.K. and B.Y.S.; resources, H.Z.Q.C., S.K. and B.Y.S.; data curation, H.Z.Q.C.; writing—original draft preparation, H.Z.Q.C. and S.K.; writing—review and editing, H.Z.Q.C., S.K. and B.Y.S.; visualization, H.Z.Q.C., S.K. and B.Y.S.; supervision, S.K.; project administration, S.K.; funding acquisition, N/A. All authors have read and agreed to the published version of the manuscript.

Funding

The work of the first author was supported by the National Natural Science Foundation of China (Grant Numbers 11901319) and the Fundamental Research Funds for the Central Universities (Grant Number 63191349). The third author was partially supported by the National Natural Science Foundation of China (Grant Numbers 11701491, 11726629 and 11726630) and the China Postdoctoral Science Foundation (Grant Number 2017M621188).

Acknowledgments

The authors are thankful to the reviewers for a number of useful comments.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chung, F.; Diaconis, P.W.; Graham, R.L. Universal cycles for combinatorial structures. Discrete Math. 1992, 110, 43–59. [Google Scholar] [CrossRef] [Green Version]
  2. Gardner, K.B.; Godbole, A. Universal cycles of restricted words. J. Combin. Math. Combin. Comput. 2018, 106, 153–173. [Google Scholar]
  3. Moreno, E. De Bruijn sequences and De Bruijn graphs for a general language. Inform. Process. Lett. 2005, 96, 214–219. [Google Scholar] [CrossRef]
  4. Zerbino, D.; Birney, E. Velvet: Algorithms for de novo short read assembly using de Bruijn graphs. Genome Res. 2008, 18, 821–829. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Baumslag, M. An algebraic analysis of the connectivity of DeBruijn and shuffle-exchange digraphs. Discrete Appl. Math. 1995, 61, 213–227. [Google Scholar] [CrossRef] [Green Version]
  6. Johnson, J.R. Universal cycles for permutations. Discrete Math. 2009, 309, 5264–5270. [Google Scholar] [CrossRef] [Green Version]
  7. Kitaev, S.; Potapov, V.N.; Vajnovszki, V. On shortening u-cycles and u-words for permutations. Discrete Appl. Math. 2019, in press. [Google Scholar] [CrossRef] [Green Version]
  8. Casteels, K.; Stevens, B. Universal cycles of (n − 1)-partitions of an n-set. Discrete Math. 2009, 309, 5332–5340. [Google Scholar] [CrossRef] [Green Version]
  9. Jackson, B. Universal cycles of k-subsets and k-permutations. Discrete Math. 1993, 117, 114–150. [Google Scholar] [CrossRef]
  10. Hurlbert, G.; Johnson, T.; Zahl, J. On universal cycles for multisets. Discrete Math. 2009, 309, 5321–5327. [Google Scholar] [CrossRef] [Green Version]
  11. Brockman, G.; Kay, B.; Snively, E. On universal cycles of labeled graphs. Electron. J. Combin. 2010, 17, 1–9. [Google Scholar] [CrossRef] [Green Version]
  12. Wong, D. Novel Universal Cycle Constructions for a Variety of Combinatorial Objects. Ph.D. Thesis, University of Guelph, Guelph, ON, Canada, 2015. [Google Scholar]
  13. Sridhar, M.A.; Raghavendra, C.S. Fault-tolerant networks based on the de Bruijn graph. IEEE Trans. Comput. 1991, 40, 1167–1174. [Google Scholar] [CrossRef]
Table 1. Values of P c ( 2 , 2 , s ) and P w ( 2 , 2 , s ) for s 1 .
Table 1. Values of P c ( 2 , 2 , s ) and P w ( 2 , 2 , s ) for s 1 .
s123
P c ( 2 , 2 , s ) 1 2 1 6 0
P w ( 2 , 2 , s ) 1 5 6 1
Table 2. Values of P c ( 3 , 2 , s ) and P w ( 3 , 2 , s ) for s 1 .
Table 2. Values of P c ( 3 , 2 , s ) and P w ( 3 , 2 , s ) for s 1 .
s1234567
P c ( 3 , 2 , s ) 1 4 1 14 1 28 3 70 1 28 00
P w ( 3 , 2 , s ) 1 5 7 13 28 5 14 5 14 13 28 1
Table 3. Values of P c ( 4 , 2 , s ) and P w ( 4 , 2 , s ) for s 1 .
Table 3. Values of P c ( 4 , 2 , s ) and P w ( 4 , 2 , s ) for s 1 .
s123456789101112131415
P c 1 8 1 60 1 140 3 910 1 546 1 728 1 1144 1 1287 1 1430 1 1144 1 728 3 1820 1 280 00
P w 1 13 30 13 70 1 10 23 364 355 8008 199 5720 62 2145 153 5720 31 1144 3 91 1 20 13 140 29 120 1
Table 4. References for the lower bounds for P c ( n , k , s ) and P w ( n , k , s ) . The gray cells refer to exact values.
Table 4. References for the lower bounds for P c ( n , k , s ) and P w ( n , k , s ) . The gray cells refer to exact values.
n234≥5
k
2Table 1Table 2Table 3Theorem 5
≥3Theorem 4Theorem 3

Share and Cite

MDPI and ACS Style

Chen, H.Z.Q.; Kitaev, S.; Sun, B.Y. Lower Bounds, and Exact Enumeration in Particular Cases, for the Probability of Existence of a Universal Cycle or a Universal Word for a Set of Words. Mathematics 2020, 8, 778. https://doi.org/10.3390/math8050778

AMA Style

Chen HZQ, Kitaev S, Sun BY. Lower Bounds, and Exact Enumeration in Particular Cases, for the Probability of Existence of a Universal Cycle or a Universal Word for a Set of Words. Mathematics. 2020; 8(5):778. https://doi.org/10.3390/math8050778

Chicago/Turabian Style

Chen, Herman Z. Q., Sergey Kitaev, and Brian Y. Sun. 2020. "Lower Bounds, and Exact Enumeration in Particular Cases, for the Probability of Existence of a Universal Cycle or a Universal Word for a Set of Words" Mathematics 8, no. 5: 778. https://doi.org/10.3390/math8050778

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop