The length of a minimal synchronizing word and

1 downloads 0 Views 327KB Size Report
The hypothesis, well known today as the Cerny conjecture, claims that it ... The best upper bound for the length of the minimal synchronizing word is now cubic.
The length of a minimal synchronizing word and ˇ the Cerny conjecture A.N. Trahtman?

Abstract. A word w of letters on edges of underlying graph Γ of deterministic finite automaton (DFA) is called the synchronizing word if w sends all states of the automaton to a unique state. ˇ J. Cerny discovered in 1964 a sequence of n-state complete DFA possessing a minimal synchronizing word of length (n − 1)2 . ˇ The hypothesis, well known today as the Cerny conjecture, claims that it is also precise upper bound on the length of such a word for a complete DFA. The problem has motivated great and constantly growing number of investigations and generalizations and together with the Road Coloring problem this simple-looking conjecture is arguably the most fascinating and longstanding open problem in the combinatorial theory of finite automata. The best upper bound for the length of the minimal synchronizing word is now cubic. Some properties of synchronization are found. An attempt ˇ to prove the Cerny conjecture is presented.

ˇ Keywords: deterministic finite automaton, synchronizing word, Cerny conjecture.

Introduction The problem of synchronization of DFA is a natural one and various aspects of this problem have been touched in the literature. Prehistory of the topic, the emergence of the term, the connections with the early coding theory, first efforts to estimate the length of synchronizing word [22], [23] one can find in surveys [39], [38] of Volkov. Synchronization makes the behavior of an automaton resistant against input errors since, after detection of an error, a synchronizing word can reset the automaton back to its original state, as if no error had occurred. The synchronizing word limits the propagation of errors for a prefix code. The different problems of synchronization have drawn the attention of many investigators (see for instance, surveys [15],[18], [30], [38], [39]). A problem with a long story is the estimation of the minimal length of synchronizing word. ˇ J. Cerny in 1964 [8] found the sequence of n-state complete DFA with shortest synchronizing word of length (n−1)2 for an alphabet of size two. The hypothesis, ?

Email: [email protected]

ˇ well known today as the Cerny’s conjecture, claims that this lower bound on the length of the synchronizing word of aforementioned automaton is also the upper bound for the shortest synchronizing word of any n-state complete DFA: Conjecture 1 The deterministic complete n-state synchronizing automaton over alphabet Σ has synchronizing word in Σ of length at most (n − 1)2 [29] (Starke, 1966). The problem can be reduced to automata with a strongly connected graph [8]. An attempt to prove this hypothesis is proposed below. This famous conjecture is true for a lot of automata, but in general the problem still remains open although several hundreds of articles consider this problem from different points of view [36]. Moreover, two conferences ”Workshop ˇ on Synchronizing Automata” (Turku, 2004) and ”Around the Cerny conjecture” (Wroclaw, 2008) were dedicated to this longstanding conjecture. The problem is discussed in ”Wikipedia” - the popular Internet Encyclopedia and on many other sites. Together with the Road Coloring problem [1], [13], [34], this simple-looking conjecture was arguably the most longstanding and famous open combinatorial problems in the theory of finite automata [18], [25], [26], [29], [30], [38]. There are no examples of automata such that the length of the shortest synchronizing word is greater than (n−1)2 . Moreover, the examples of automata with shortest synchronizing word of length (n − 1)2 are infrequent. After the ˇ ˇ sequence of Cerny and the example of Cerny, Piricka and Rosenauerova [10] of 1971 for |Σ| = 2, the next such examples were found by Kari [16] in 2001 for n = 6 and |Σ| = 2 and by Roman [28] for n = 5 and |Σ| = 3 in 2004. The package TESTAS [34], [37] studied all automata with strongly connected underlying graph of size n ≤ 11 for |Σ| = 2, of size n ≤ 8 for |Σ| ≤ 3 and of size n ≤ 7 for |Σ| ≤ 4 and found five new examples of DFA with shortest synchronizing word of length (n − 1)2 with n ≤ 4. Don and Zantema present in [11] an ingenious method of designing new automata from existing examples of size three and four and proved that for n ≥ 5 the method does not work. So there are up to isomorphism exactly 15 DFA for n = 3 and exactly 15 DFA for n = 4 with shortest synchronizing word of length (n − 1)2 . The authors of [11] support the hypothesis from [32] that all automata with shortest synchronizing word of length (n − 1)2 are known, of course, with essential correction found by them for n = 3, 4. There are several reasons [2],[11], [32] to believe that the length of the shortest synchronizing word for remaining automata with n > 4 (except the sequence ˇ of Cerny) is essentially less and the gap grows with n. For several classes of automata, one can find some estimations on the length in [2], [19], [9]. Initially found upper bound for the minimal length of synchronizing word was even not polynomial. This estimation has been consistently improved over the years by different authors. The best known upper bound found by Frankl in 1982 [12] is now equal to (n3 − n)/6. The result was reformulated in terms of synchronization in [27] and repeated independently in [20]. My try to improve

this bound in [35] was wrong [14]. The cubic estimation of Frankl was not changed since 1982, M. Shykula [31] in 2017 proposed an improvement of [12], also cubic. The considered deterministic automaton A can be presented by a complete underlying graph with edges labelled by letters of an alphabet. Our work uses a special class of matrices defined by words in the alphabet of letters on edges of the underlying graph (a sort of stochastic). Some kind of equivalency of matrices having common fixed column was involved. We study the rational series [5]. This approach for synchronizing automata supposed first by B´eal [3] proved to be fruitful [4], [6], [7]. Some properties of synchronization and corollaries are found.

Preliminaries We consider a complete n-state DFA with strongly connected underlying graph Γ and transition semigroup S over a fixed finite alphabet Σ of labels on edges of Γ of an automaton A. The trivial cases n ≤ 2, |Σ| = 1 and |Γ σ| = 1 for σ ∈ Σ are excluded. The restriction on strongly connected graphs is based on [8]. The states of the automaton A are considered also as vertices of the graph Γ . If there exists a path in an automaton from the state p to the state q and the edges of the path are consecutively labelled by σ1 , ..., σk , then for s = σ1 ...σk ∈ Σ + let us write q = ps. Let P s be the set of states q = ps for all p from the subset P of states and s ∈ Σ + . Let Γ s denote the set P s for the set P of all states of the automaton. A word s ∈ Σ + is called a synchronizing (reset, magic, recurrent, homing, directable) word of an automaton A with underlying graph Γ if |Γ s| = 1. The word s below denotes mostly synchronizing word such that for the state q of number one As = q. An automaton (and its underlying graph) possessing a synchronizing word is called synchronizing. Let us consider a space generated by n × n matrices M with one unit in any row of the matrix and zeros everywhere else. The operations of the space are restricted mostly on the set of such matrices. We connect a mapping of the set of states of the automaton made by a word u with an n × n matrix Mu such that  for an element mi,j ∈ Mu holds 1, qi u = qj ; mi,j = 0, otherwise. Any mapping of the set of states of the graph Γ can be presented by some word u and by a corresponding matrix Mu . For instance,   001...0 1 0 0 . . . 0   0 0 0 . . . 1  Mu =  . . . ... .   0 1 0 . . . 0 100...0

Let us call the matrix Mu of the mapping induced by the word u, for brevity, the matrix of word u, and vice versa, u is the word of matrix Mu . Mu Mv = Muv [3]. The set of different indexes of nonzero columns (second indexes of its elements) of Mu is denoted as N (u) and can be considered also as a set of nonzero columns of Mu . For right subword v of the word u we write v  u. A directed acyclic graph (DAG) is a finite directed graph with no directed cycles. For linear algebra terminology and definitions, see [21], [24].

1

Mappings induced by a word and subword

Lemma 1 For underlying graph Γ considered as a set of states of deterministic finite automaton Γ uw ⊆ Γ w for any words u and w. For the state pi 6∈ Γ w holds pi 6∈ Γ uw for any word u and the column i in both matrices Mw and Muw consist of zeros. Nonzero columns of Muw have units also in Mw . |N (b)| is equal to the rank of the matrix Mb . Proof. The properties of Γ u ⊆ Γ , Mw and Muw follow from the definition of the matrix of word. The matrix Mb has submatrix with only one unit in every row and every column. Therefore |N (b)| is equal to the rank of Mb . Corollary 1 The matrix Ms of word s is synchronizing if and only if Ms has zeros in all columns except one and units in the residuary column. All matrices of right subwords of s also have at least one unit in this column. Remark 1 Let the matrix M belong to the space V generated by matrices Mi , but the matrix Mβ M 6∈ V . Then the matrix Mβ Mi ∈ 6 V for at least one matrix Mi . Remark 2 Every unit in the product Mu Ma is the product of two units, one from Mu and one from Ma .

2

The set of linear independent matrices of words

Lemma 2 The set V of all n × k-matrices of words (or n × n-matrices with zeros in fixed n − k columns for k < n) has n(k − 1) + 1 linear independent matrices. Proof. Let us consider distinct n × k-matrices of word with at most only one nonzero cell outside a fixed nonzero column k. These matrices have precisely one unit in any row and zeros everywhere else. Let us begin from the matrices Vi,j with unit in (i, j) cell (j < k) and units in (m, k) cells for all m except i. The

remaining cells contain zeros. So we have only one unit in the first k − 1 columns and n − 1 units in the k-th column of the matrix Vi,j . Let the matrix K have units in the k-th column and zeros in the other columns. There are n(k − 1) matrices Vi,j . Together with K they belong to the set V . So we have n(k − 1) + 1 matrices. For instance,       000..1 000..1 100..0 0 0 0 . . 1 0 0 0 . . 1 0 0 0 . . 1       0 0 0 . . 1 0 1 0 . . 0 0 0 0 . . 1       V1,1 =   V3,2 =  . . . . . .  K =  . . . . . .      . . . .. . 0 0 0 . . 1 0 0 0 . . 1 0 0 0 . . 1 000..1 000..1 000..1 The first step is to prove that the matrices Vi,j and K generate the space with the set V . For arbitrary matrix T of word from V for every ti,j 6= 0 and j < k, let Pus consider the matrices Vi,j with unit in the cell (i, j) and the sum of them Vi,j = Z. The first k − 1 columns of T and Z coincide. Hence in the first k − 1 columns of the matrix Z there is at most only one unit in any row. Therefore in the cell of k-th column of Z one can find only value of m or m − 1. The value of m appears if there are only zeros in other cells of the considered row. Therefore P Vi,j −(m−1)K = T . Thus every matrix from the set V is a span of (k −1)n+1 matrices from V . It remains now to prove that the set of matrices Vi,j and K is linear independent. If one excludes a certain matrix Vi,j from the set of these matrices, then it is impossible to obtain a nonzero value in the cell (i, j) and therefore to obtain the matrix Vi,j . So the set of matrices Vi,j is linear independent. Every non-trivial linear combination of the matrices Vi,j equal to a matrix of word has at least one nonzero element in the first k − 1 columns. Therefore, the matrix K could not be obtained as a linear combination of the matrices Vi,j . Consequently the set of matrices Vi,j and K forms a basis of the set V . Corollary 2 The set of all n × (n − 1) matrices of words (or n × n-matrices with zeros in a fixed column) has (n − 1)2 linear independent matrices. Proof. For k = n − 1 it follows from n(n − 1 − 1) + 1 = (n − 1)2 . Corollary 3 Suppose the vertex p 6∈ Γ α and let words u of matrices Mu have the last letter α. Then there are at most (n − 1)2 linear independent matrices Mu . Proof. All matrices Mu have common zero column p by Lemma 1. So we have n × n-matrices with zeros in a fixed column. Corollary 4 There are at most n(n − 1) + 1 linear independent matrices of words in the set of n × n-matrices.

Lemma 3 Suppose that for matrices Mu of word u and Mui of words ui Mu =

k X

λi Mui .

(1)

i=1

Pk Then for nonzero matrix Mu the sum i=1 λi = 1 and the sum Sj of values in every row j of the sum in (1) also is equal to one. Pk Pk Sj = 0 ∀ j i=1 λi Mui = 0 if f i=1 λi = 0 if f in (1). Pk Pk If the sum i=1 λi 6∈ {0, 1} then i=1 λi Mui is not a matrix of word. Proof. The nonzero matrices Mu and Mui have n cells with unit in the cell. Therefore, the sum of values in all cells of the matrix λi Mui is nλi . Pk For nonzero Mu the sum is n. So one has in view of Mu = i=1 λi Mui Pk Pk n = n i=1 λi , whence 1 = i=1 λi . The sum of values in a row of the sum (1) is equal to unit in the row of Mu . Pk Pk So 1 = i=1 λi 1i = i=1 λi . Pk Pk equivalent to Sj = i=1 λi 1i = 0 for every row j of the i=1 λi Mui = 0 is Pk Pk sum and for every j i=1 λi 1i = 0 is equivalent to i=1 λi = 0 of the sum (1) for a zero matrix. Pk If the matrix M = ui is a matrix of word or zero matrix then i=1 λi MP Pk k λ ∈ {0, 1}. In opposite case i i=1 i=1 λi 6∈ {0, 1}.

3

Rational series

The section follows ideas and definitions from [5] and [3]. We recall that a formal power series with coefficients in a field K and variables in Σ is a mapping of the free monoid Σ ∗ into K [5], [6]. We consider an n-state automaton A. Let P denote the subset of states of the automaton with the characteristic column vector P t of P of length n having units in coordinates corresponding to the states of P and zeros everywhere else. Let C be a row of units of length n. Following [3], we denote by S the rational series depending on the set P defined by: (S, u) = CMu P t − CP t = C(Mu − E)P t .

(2)

Remark 3 Let S be a rational series depending on the set P of states of nstate automaton A. Then the matrix Mu has maximal (S, u) when all units of Mu belong to columns corresponding the states of P . The maximum is equal to n − |P |. Lemma 4 Let be a rational series depending PS Pk on the set P of an automaton k A. Let Mu = j=1 λj Muj . Then (S, u) = j=1 λj (S, uj ). If (S, uj ) = i for every j then for nonzero Mu also (S, u) = i.

Proof. One has in view of (2) Pk (S, u) = C( j=1 λj Muj − E)P t where C is a row of units and P t is a characteristic column of units and zeros. Due Pk to Lemma 3 Pk Pk Pk λj (Muj − E). So j=1 λj Muj − E = j=1 λj Muj − j=1 λj E = Pk Pk j=1 (S, u) = C(Mu − E)P t = C( j=1 λj Muj − E)P t = C( j=1 λj (Muj − E))P t = Pk Pk Pk t j=1 λj C(Muj − E)P = j=1 λj (S, uj ). Thus (S, u) = j=1 λj (S, uj ). Pk Pk If ∀j (S, uj ) = i, then for nonzero Mu (S, u) = j=1 λj i = i j=1 λj = i by Lemma 3. From Lemma 4 follows Corollary 5 Let S be a rational series depending on the set P of an automaton A. The matrices Mu with constant (S, u) = i generate a space V such that for every nontrivial matrix Mt ∈ V of word t (S, t) = i. Corollary 6 Let S be a rational series depending on the set P of size one of n-state automaton. Then the set V of matrices Mu with two fixed nonzero columns and fixed nonnegative (S, u) < n − 1 has at most n linear independent matrices. By lemma 2 for k = 2 the maximal space W has at most n + 1 linear independent matrices. Such maximal space W has a matrix Mw with one nonzero column and (S, w) 6= (S, u). Therefore fixed (S, u) < n − 1 excludes the matrix Mw from space generated by V . Lemma 5 Let S be a rational series depending on the set P = {q} for a first state q of n-state automaton A with As = q. Then for the space V generated by matrices Mv of right subwords v  s with (S, v) ≥ n − i dim(V ) ≤ (i − 1)n + 1. Proof. Let the word t have minimal length among words v. We have t  v for every v. In view of (S, t) = n − i the rank of Mt is equal to |N (t)| ≤ i. Therefore the rank of every matrix Mv with (S, v) ≥ n − i is not greater than |N (t)| and N (v) ⊆ N (t) by Lemma 1. So anyway every matrix Mv has at most i nonzero columns and zeros in at least n − i common remaining columns because (S, v) ≥ n − i and N (v) ⊆ N (t). In view of Lemma 2, dim(V ) is not greater than (i − 1)n + 1.

4

P -equivalence for the first state q

Definition 1 Two matrices Mu and Mv of word are called q-equivalent if the columns of the state q of both matrices are equal. We denote it as M u ∼q M v .

If the set of cells with units in the column q of the matrix Mv is a subset of the analogous set of the matrix Mu then we write M v vq M u Of course, Remark 4 (S, u) = (S, v) if Mu ∼q Mv and (S, v) ≤ (S, u) if Mv vq Mu for a rational series depending on the set P = {q} for the state q of the automaton A and matrices of words in the alphabet Σ. Lemma 6 Let S be a rational series depending on P = {q}. Then for matrices Mα , Mu , Mv of words Mu ∼q Mv → Mα Mu ∼q Mα Mv , Mv vq Mu → Mα Mv vq Mα Mu . Proof. Suppose Mu ∼q Mv and element ai,r = 1 in Mα . For an element ur,q in the column q of Mu and ti,q ∈P Mt = Mα Mu n ti,q = m=1 ai,m um,q = ai,r ur,q because ai,m = 0 for m 6= r in the matrix Mα of word a (Remark 4). Analogously, in the matrix Z = Mav zi,q = ai,r vr,q . Therefore zi,q = ai,r vr,q = ai,r ur,q = ti,q because vr,q = ur,q for every cell (i, q) of the column q of Mu and Mv . Thus matrices Mau and Mav have common columns q. So Mu ∼q Mv implies Mau ∼q Mav with (S, au) = (S, av). Suppose now Mv vq Mu . For the matrix T = Mav with ti,q = 1 one has ti,q = ai,r vr,q = 1 for some vr,q = 1 and ai,r = 1 as well as before. From vr,q = 1 and Mv vq Mu follows 1 = vr,q = ur,q . So for the matrix W = Mau one has wi,q = ai,r ur,q = 1, whence ti,q = 1 implies wi,q = 1 for every i. Thus Mv vq Mu implies Mα Mv vq Mα Mu . Let As = q. From Lemma 6 follow Corollary 7 For synchronizing word s and Mu ∼q Mv Ms ∼q Mt Mv → Ms = Mt Mu = Mt Mv .

(3)

Ms = Mt Mv → Ms = Mt Mu .

(4)

For Mv vq Mu

Corollary 8 For synchronizing word s and s = uv [s = vu] with (S, v) = 0 the word u also is synchronizing with |N (u)| = 1. Proof. Mv ∼ Mt for invertible matrix Mt by Lemma 6. The matrix Ms Mt−1 [Mt−1 Ms ] also is synchronizing with only one nonzero column. By Corollary 7 Ms Mt−1 = Mu Mv Mt−1 = Mu Mt Mt−1 = Mu E = Mu . [Mt−1 Ms = Mt−1 Mv Mu = Mt−1 Mt Mu = EMu = Mu .]

In the following example V1 ∼q V2 for the first column q, Ms = Mα V1 = Mα V 2 .         10000 00100 00010 01000 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0          V1 =  1 0 0 0 0  V2 =  1 0 0 0 0  Mα Vi =  1 0 0 0 0  0 1 0 0 0 Mα =          1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 10000 00010 10000 00100

5

Matrices Lu of word such that Lu ∼q Mu for matrix Mu of word u.

Definition 2 The matrix Lu ∼q Mu with (S, u) = n − i for 1 < i ≤ n has n − i + 1 units in the column one of the state q and remaining i − 1 units in the column i. Lu is a matrix of word not necessary in the alphabet Σ. Lu has in every row one unit and the rest of zeros. |N (u)| = 2. Lemma 7 Mv Lu ∼q Lvu for any words u, v. If (S, u) = (S, vu) or matrix Mv is invertible then Mv Lu = Lvu . The word u of every matrix Lu is not synchronizing. Proof. Mv Lu ∼q Mv Mu by Lemma 6 in view of Lu ∼q Mu (definition 2). Mv Mu = Mvu ∼q Lvu also by definition. So Mv Lu ∼q Lvu . From (S, u) = (S, vu) and Mv Lu ∼q Lvu follows equality of both nonzero columns of matrices Lu , Lvu and Mv Lu , whence they are equal. The invertible matrix Mv does not change (S, u), whence Mv Lu = Lvu . The word u of matrix Lu is not synchronizing because 1 < i and (S, u) = n−i. Lemma 8 Let the space W be generated by matrices Lw with (S, w) = n − i for 1 < i ≤ n. The matrix Ms 6∈ W for the word s with (S, s) = n − 1. Pk If the sum j=1 λwj Lwj is a matrix of word Mt then the matrix Mt = Lt . Pk In the sum j=1 λwj Lwj = Lt one can leave only terms with common (S, wj ) = (S, t). The rest does not imply on the sum. The number of linear independent matrices Lw with constant (S, w) = n − i is at most n. P Proof. Suppose the opposite Ms = λw Lw . Let us divide the sum according to their nonzero columns (except q) of Lw and let Ri be set of Lw with nonzero column i (having i − 1 units for 1 < i ≤ n). Ms =

n X X i=2 Lw ∈Ri

λiw Lw .

(5)

So in the sum P i Ri = λw Lw every matrix Lw has common value (S, w) = i and zeros in all columns except i and q. The remaining sums Rj for j 6= i have zero column i. So the column i of the matrix Ms is equal to the column i of the matrix Ri . However, Ms has only zeros in the column i. Therefore the matrix Ri also has only zeros in the column i. Every matrix Lw with (S, w) = n − i has i − 1 units in P the column i and n − i +P 1 units in the column q. Therefore in the P sum Ri = λiw Lw there are i i (i − 1) λw units in the column i and (n − i + 1) i λP w units in the column q. The column i of R has only zeros, whence 0 = (i − 1) λiw . Therefore in view i P i P i of i > 1 λw = 0. Consequently, (n − i + 1) λw = 0. So the columns q and i of every Ri have only zeros, whence Ri is a zero matrix for i > 1 and considered value (S, w). Therefore the sum (5) is reduced Pn−2 to Ms = i=2 Ri = 0. Contradiction. Thus Ms 6∈ W . Let us consider the matrix of word Mt equal to the sum X Mt = λw Lw . (6) with the set I of nonzero columns i 6= 1 in Mt . The column i ∈ I of the sum is obtained as a linear combination of matrices Lw with (S, w) = n − i having i − 1 units in the column i. Therefore the number of units pi in the column i ∈ I of Mt is a multiple of i − 1. P If we µj (i − 1) = P suppose P that some number of units pi = 0 then 0 = (i − 1) µj = µj (because i 6= 1) forP the part of the sum (6) of matrices Lwi with (S, wi ) = n − i. So pi = 0 implies µj = 0. The matrices Lwi of the same part from the sum (6) Phave units in the column q and the sum of these units is equal to (n − i + 1) µj = (n − i + 1)0 = 0. Thus such matrices do not imply on the sum (6). Consequently for real member Lwi in the sum (6) every value pi in the column i ∈ I is not zero. The sum of all units of the sum (6) outside the column q for all possible i P is P i∈I pi , the sum of all units of sum (6) in the column q for all possible i is of matrix P Mt is n. SoP i∈I (n P− pi ). The sum Pof units P P n = i∈I (n − pi ) + i∈I pi = i∈I n − i∈I pi + i∈I pi = i∈I n = |I|n. Therefore the size |I| = 1, whence Mt = Lt . The sum (6) depends only on matrices Lwj with common (S, wj ) = (S, t) due to Corollary 5. The remaining part of (6) is zero. The matrices Lwj with (S, wj ) 6= (S, t) do not imply on the sum. The matrices Lw of rank two and fixed (S, w) = n − i generate the space with at most n linear independent matrices Lx in view of Corollary 6. Corollary 9 The space W generated by matrices Lx with m distinct values of (S, x) has dimension at most mn and is a union of m subspaces generated by matrices Lx with fixed (S, x).

6

The equation with unknown Lx

The columns of matrix and corresponding states of n-state automaton are enumerated, the number one has the column of the state q of the automaton. As = q for a minimal synchronizing word s. We consider the solutions Lx (see definition 2) of the equation Mu Lx = Ms

(7)

The matrix of word Lx is not necessarily matrix of word in the alphabet Σ unlike Mu and Ms , but Lx of rank two also has in each row a single unit and the rest zeros. The solutions Lx of (7) with minimal (S, x) let us call also minimal. Lemma 9 Equation (7) has a solutions Lx with (S, x) ≥ 0 and nonzero column q. The units in the column q of of minimal Lx correspond nonzero columns of Mu and |N (u)| − 1 = (S, x). Every matrix Ly satisfies (7) if and only if the minimal solution Lx vq Ly . Proof. The matrix Ms of rank one has column of units of the state q. For every nonzero column j of Mu with elements ui,j = 1 from the equation of (7) follows that xj,q = 1 in the matrix Lx . So for the matrix Ms si,q = ui,j xj,q = 1 for all cells with units from the column j of Mu . The set N (u) of nonzero columns of Mu corresponds the set of cells (p, q) of the column q with unit of Lx , whence |N (u)| − 1 = (S, x) for minimal (S, x). So at least (S, x) + 1 rows of Lx have units in the column q. The remaining units of matrix Lx of word x belong to the column n − (S, x) and the rest of cells are zero cells. Lastly Lx is a matrix of word with (S, x) ≥ 0 and |N (u)| − 1 = (S, x) (for minimal (S, x)) due to (7). From Corollary 7 follows that Mu Lx = Mu Ly = Ms for Ly ∼q Lx . For Lx with minimal (S, x) Ms = Mu Lx = Mu Lz = Ms implies Lx vq Lz . Corollary 10 The matrix Lx with (S, x) = 0 corresponds Mu from (7) of synchronizing word u. Remark 5 The columns of the matrix Mu Ma are obtained by permutation of columns Mu . Some of them can be merged. The rows of the matrix Ma Mu are obtained by permutation of rows of the matrix Mu . Some of these rows may disappear and replaced by another rows of Mu . More precisely, the zero columns j of Ma corresponds the row j of Ma Mu that replicates some row k of Mu for nonzero column k of Ma . Lemma 10 For every words a and u |N (ua)| ≤ |N (u)| and N (au) ⊆ N (u). For invertible matrix Ma N (au) = N (u) and |N (ua)| = |N (u)|.

Proof. The matrix Ma in the product Mu Ma shifts column of Mu without changing the column itself. In view of possible merged columns, |N (ua)| ≤ |N (u)|. The matrix Ma does not shift columns of Mu in the product Ma Mu and shifts only rows. The zero columns j of Ma changes the row j of Ma in Ma Mu . The matrix Ma with some units in column k replicates row k of Mu in Ma Mu . So some rows of Mu can be replaced in Ma Mu by another rows and therefore some units from Mu may disappear. Hence N (au) ⊆ N (u) (See also Lemma 1). For invertible matrix Ma in view of existence Ma−1 we have |N (ua)| = |N (u)| and N (au) = N (u). From Lemma 10 follows Corollary 11 Let two equations Mu Lx = Ms and Muw Ly = Ms have minimal solutions Lx , Ly . Then |N (uw)| ≤ |N (u)| and (S, y) ≤ (S, x), in particular, |N (uw)| = |N (u)| implies (S, y) = (S, x).

7

The directed acyclic graph (DAG)

The pairs (Mu , Lx ) such that Mu Lx = Ms are vertices of DAG. Every root (Mu , Lx ) of the graph has singular matrix Mu of some letter α = u. If Lx and solution Ly of equation Mαβ Ly = Ms for letters α, β are linear independent then we add edge from root (Mα , Lx ) to the vertex (Mαβ , Ly ) in the graph. So we have a path from the root to (Mαβ , Ly ) and the space Vy generated by matrices Lx and Ly . We continue and will look at a path built before from the root to the vertex (Mw , Lyk ). The space Vyk is generated by matrices Lyi from vertices (Mui , Lyi ) (i ≤ k) of the path. If the matrix Lz from the vertex (Mwβ , Lz ) does not belong to the space Vyk then we add the edge from (Mw , Lyk ) to (Mwβ , Lz ). So we extend the existing path and obtain the space Vyk β generated by linear independent matrices Lyi and Lz of the new path. Thus linearly independent generators of every space Vx correspond vertices of its path and dim(Vx ) is is equal to the number of vertices on the path. Any vertex (Mu , Lx ) with incoming edge has at least one path (or more) and the corresponding space Vx . Remark 6 The set of m ≤ n states of the automaton can be considered as the set of m units in the column q of matrix Lx . The last set of the minimal solution Lx of the equation (7) corresponds the set of nonzero columns G of size |N (u)| = m of the matrix Mu from (7) in view of Lemma 9. Every permutation and shift of m columns Mu from G induces corresponding permutation of the set of m units in the column q of minimal silution Lx of (7) and vice versa as well as of the set of m states of the automaton. There exists one-to-one correspondence between elements of these three sets.

Lemma 11 For every nonnegative k < n − 1 there is a word u of length at most kn + 1 such that |N (u)| < n − k of the matrix Mu . Proof. The rank of matrix of word w is equal to the number of nonzero columns |N (w)| (Lemma 1). By Remark 5, the columns of the product Mu Ma of arbitrary matrices Mu and Ma are obtained by permutation of columns Mu . Some columns can be merged reducing the rank of the product. In view of Remark 5 every Ma does not increase the number of nonzero columns (|N (u)| ≥ |N (ua)|). Remark 6 emphasis the correspondence between nonzero columns of the matrix Mu and units in the column q of minimal solution Lx of the equation (7). There are at most n matrices Mu of left subwords u of minimal synchronizing word s with |N (u)| = n−1. Therefore for some left subword u of s with |u| ≤ n+1 |(N (u)| < n − 1. Thus the statement of lemma is true for k = 1. We consider the space Vx of every path in DAG from the root to the vertex (Mu , Lx ) with linear independent matrices Ly in its vertices. dim(Vx ) grows together with the length of the path and |u|. The set of matrices Ly from Vx with fixed (S, y) generates a subspace of dimension at most n (Corollary 6). By Corollary 9 the space Vx is a union of subspaces Wj generated by matrices Ly with fixed value of (S, y). If for all matrices Lx ∈ Vx n − 1 > (S, x) ≥ n − 1 − m then dim(Vx ) ≤ nm (Corollary 9). Our goal is to prove that for some generator Lb from vertex (Mu , Lb ) of some space Vx and some letter β the solution Ly of the equation Muβ Ly = Ms does not belong to Vx . In opposite case for every word x of matrix Lx from the vertex (Mu , Lx ) and every letter β the solution Ly of the equation Muβ Ly = Ms belongs to the space Vx . It is true for every existing path to the vertex (Mu , Lx ) and corresponding space. In particular, for Mu with minimal (N (u) = n − k and the minimal solution Lx of the equation 7 one has (S, x) = n − k − 1. Therefore due to Corollary 11 of Lemma 10 we can restrict ourselves to the case of minimal |N (u)| = n − k and to the subspace of every Vx generated only by solutions Lx of (7) with (S, x) = n − k − 1 = |N (u)| − 1 (Lemma 9). Let Wp be subspace generated by all generators of spaces Vx with (S, x) = n − k − 1. By Corollary 5, (S, z) = n − k − 1 for every Lz ∈ Wp . For generator Lx ∈ Wp , we consider the equations Mu Lx = Ms , Muβ Ly = Mu Mβ Ly = Ms for arbitrary letter β and two solutions Lx and Mβ Ly for common Mu . Let us prove the equality of these solutions. Recall that the solution Ly ∈ Wp for every letter β. Mβy ∼q Lβy by definition 2. Mβ Ly ∼q Lβy by Lemma 7. In view of Corollary 11 (S, y) = (S, x) for minimal solutions Lx and Ly of considered equations. Then (S, y) = (S, x) and Mβ Ly ∼q Lβy imply Mβ Ly = Lβy also by Lemma 7. Hence Lx = Lβy .

(8)

for every minimal solution Lx of (7) (a generator of Wp ) with (S, x) = n − k − 1, every letter β and suitable Ly ∈ Wp . For every Lz ∈ WpPand generators P Lxm of Wp P Lz = τm Lxm = τm Mβ Lym = Mβ τm Lym for suitable Lym ∈ Wp with (S, ym ) = (S, xm ) = n − k − 1. All Lym have two common nonzero columns due to common (S, ym ) = (S, z) P in view of Lemma 8. The sum τm Lym therefore also has at most two nonzero columns. By Remark 2Pevery unit in Lz is a product of two units, one from Mβ and one from M = τm Lym . Consequently every nonzero column of Mβ has corP responding unit in the matrix M . By Lemma 3 τm = 1, whence the second column has in such row zero. Let now j be zero column of Mβ . Then every minimal solution Lym of the equation Lxm = Mβ Lym (8) must have zero in the cell (j, q) in view of minimality of the solution of (7) and Lemma 9. Therefore also the matrix M has zero in the cell (j, q). Hence the considered sum has zero in every row in one of two its nonzero columns and unit in another column P (Lemma 3). Consequently the sum M = τm Lym is a matrix of word and belongs to Wp by Corollary 5. Moreover, by Lemma 8 this matrix of word is equal to some Lt with (S, t) = n − k − 1. Thus for every Lz ∈ Wp Lz = Mβ Lt for every letter β and suitable Lt ∈ Wp . Consequently by induction for every matrix Lz ∈ Wp Lz = Md Ly ∈ Wp for every word d, in particular, for s with |N (s)| = 1. This contradicts to n − 1 > (S, z) for Lz . Consequently some space Vx of matrix Lx with n−1 > (S, x) can be extended. So dim(Vx ) grows together with |u|. For every path to the vertex (Mu , Lx ) and |N (u)| ≥ n − k by Corollary 9 dim(Vx ) ≤ kn. Therefore for some word u of length at most kn + 1 some solution of the equation (7) for Mu is outside Vx with |N (u)| < n − k in view of Corollary 11. Thus |N (u)| < n − k for some |u| ≤ kn + 1.

8

Theorems and Corollaries

Theorem 1 The deterministic complete n-state synchronizing automaton A with strongly connected underlying graph Γ over alphabet Σ has synchronizing word in Σ of length at most (n − 1)2 . By Lemma 11 for every nonnegative k < n − 1 there is a word u of length kn + 1 such that |N (u)| < n−k for the matrix Mu . The statement of the theorem follows by k = n − 2. A word of length at most (n − 1)2 synchronizes the automaton A. Theorem 2 The deterministic complete n-state synchronizing automaton A with underlying graph Γ over alphabet Σ has synchronizing word in Σ of length at most (n − 1)2 .

Follows from Theorem 1 because the restriction for strongly connected graphs can be omitted due to [8]. Corollary 12 For every set P of states from deterministic complete n-state synchronizing automaton over alphabet Σ there exists a word s of length at most (n − 1)2 such that |P s| = 1. Corollary 13 The graph Γ 2 of pairs of states for deterministic complete n-state synchronizing automaton with underlying graph Γ and Γ s = q has a set of paths to the pair (q, q) of length at most (n − 1)2 defined by the word s such that every pair of distinct states belongs to a path from the set. Theorem 3 For every positive i < n in deterministic complete n-state synchronizing strongly connected automaton A over alphabet Σ there exists a word u ∈ Σ + of length at most (n − i − 1)n + 1 such that |Au| ≤ i. Proof. Let As = q. By Remark 6 |Au| = |N (u)| for every matrix Mu of left subword u of s. For every k < n − 1 by Lemma 11 there is a word u of length at most kn + 1 such that |N (u)| < n − k. Let i = n − k − 1. Hence there is a word u with |u| ≤ (n − i − 1)n + 1 and |N (u)| ≤ i. Theorem 4 Let |Γ α| < |Γ | − 1 for a letter α ∈ Σ for deterministic complete n-state synchronizing automaton A with underlying graph Γ over alphabet Σ. Then the minimal length of synchronizing word is less than (n − 1)2 . Proof. In the proof of Lemma 11, for the space U of the word u dim(U ) > |u| at the beginning because for the first letter α there are at least two linear independent matrices Lx with (S, x) > 0. The inequality dim(U ) > |u| remains with growth of u until maximal dim(U ) ≤ (n − 1)2 . Thus |u| < (n − 1)2 . Consequently from the proof of the Lemma and Theorem 1 follows the existence of synchronizing word s of length less than (n − 1)2 for strongly connected automata. The same is true for the strongly connected part I of underlying graph with the state q such that As = q. Let us go to the case of not strongly connected underlying graph. For k states outside I there is a word p of length at most k 2 such that Ap ⊂ I. Thus the restriction for strongly connected automata can be omitted.

9

Examples

J. Kari [16] discovered the following example of n-state automaton with minimal synchronizing word of length (n − 1)2 for n = 6. a *i e a :e XXX a zi e 6 b b* b b e b a a : X X  i e z ? X e  * a

The minimal synchronizing word s = ba 2 bababa 2 b 2 aba 2 ba 2 baba 2 b ˇ has the length at the Cerny border. By the bye, the matrices of right [and of left] subwords of s are linear independent (it is relevant to mention here Lemma 11). We have one word s with (S, s) = 5, 5 its left subwords v with (S, v) = 4, 5 its left subwords v with (S, v) = 3, 6 its left subwords v with (S, v) = 2, 8 its left subwords v with (S, v) = 1. (S, v) changes monotonically (Lemma 10). Below the fonts for left letters of right subwords v  s with different rational series are highlighted in s. s = b a2 b ab ab a2 b baba 2 b a2 baba2 b (S, v) now does not change monotonically 3 words v ≺ s with (S, v) = 4, 2 words v ≺ s with (S, v) = 3, 2 words v ≺ s with (S, v) = 4, 3 words v ≺ s with (S, v) = 3, 6 words v ≺ s with (S, v) = 2, 8 words v ≺ s with (S, v) = 1. ˇ For the Cerny sequence of n-state automata [8], [22], [23] the situation is more pure. b b b b b b b b b b b b b a *i ea *i ea *i ea *i ea *i ea *i ea *i e .... ea *i ea *i ea *i ea *i ea *i ea *i e 6 a b a a*i *? *i *i *i *i *i *i *i *i *i *i *i *i e?ai e ae ae ae ae ae .... e ae ae ae ae ae ae b

b

b

b

b

b

b

b

b

b

b

b

b

The minimal synchronizing word s = b(an−1 b)n−2 ˇ of the automaton also has the length at the Cerny border. The word s has n − 2 consequent left [and right] subwords v with (S, v) = i for 0 < i < n − 1 of the length n. In the example of Roman [28] c a, b a, b i e i e e i I @  @ a  c@@ b c @ R @ e R @  -e i a b the minimal synchronizing word s = ab(ca)2 c bca2 c abca ˇ has the length at the Cerny border for n = 5 and 4 right subwords v with (S, v) ≥ 3, 4 < n, 10 right subwords v with (S, v) ≥ 2, 10 = 2n, 16 right subwords v with (S, v) ≥ 1, 16 = 3n + 1. (S, v) changes monotonically in two last examples in contrast to the first.

b

Acknowledgments I would like to express my gratitude to Francois Gonze, Mikhail Berlinkov and Benjamin Weiss for fruitful and essential remarks.

References 1. R.L. Adler, B. Weiss: Similarity of automorphisms of the torus, Memoirs of the Amer. Math. Soc., 98, Providence, RI, 1970. 2. D. S. Ananichev, V. V. Gusev, and M. V. Volkov. Slowly synchronizing automata and digraphs. Springer, Lect. Notes in Comp. Sci., 6281(2010), 55-65. ˇ 3. M.-P. B´eal, A note on Cerny Conjecture and rational series, technical report, Inst. Gaspard Monge, Univ. de Marne-la-Vallee, 2003. 4. M.-P. B´eal, M.V. Berlinkov, D. Perrin. A quadratic upper bound on the size of a synchronizing word in one-cluster automata, Int. J. Found. Comput. Sci. 22(2), 2011, 277-288. 5. J. Berstel, C. Reutenauer, Rational series and their languages, Springer, 1988. ˇ 6. A. Carpi, F. D’Alessandro, Strongly transitive automata and the Cerny conjecture. Acta Informatica, 46(2009), 591-607. ˇ 7. A. Carpi, F. D’Alessandro, On the Hybrid Cerny-Road coloring problem and Hamiltonian paths. LNCS, 6224(2010), 124-135. ˇ 8. J. Cerny, Poznamka k homogenym eksperimentom s konechnymi automatami, ˇ Math.-Fyz. Cas., 14(1964), 208-215. 9. K.Chmiel, A. Roman. COMPAS - A Computing Package for Synchronization. LNCS, Impl. and Appl. of Automata, 6482(2011), 79-86, 2011. ˇ 10. J. Cerny, A. Piricka, B. Rosenauerova. On directable automata, Kybernetika 7(1971), 289-298. 11. H. Don, H. Zantema, Finding DFAs with maximal shortest synchronizing word length. arXiv:1609.06853, 2016. 12. P. Frankl, An extremal problem for two families of sets, Eur. J. Comb., 3(1982), 125-127. 13. J. Friedman. On the road coloring problem, Proc. of the Amer. Math. Soc. 110(1990), 1133-1135. 14. F. Gonze, R. M. Jungers, A.N. Trahtman. A Note on a Recent Attempt to Improve the Pin-Frankl Bound. DM & TCS, 1(17), 2015, 307-308. 15. H. Jurgensen, Synchronization. Inf. and Comp. 206(2008), 9-10, 1033-1044. 16. J. Kari, A counter example to a conjecture concerning synchronizing word in finite automata, EATCS Bulletin, 73(2001), 146-147. 17. J. Kari, Synchronizing finite automata on Eulerian digraphs. Springer, LNCS, 2136(2001), 432-438. ˇ 18. J. Kari, M. V. Volkov, Cerny’s conjecture and the road coloring problem. Handbook of Automata, 2013. 19. A. Kisielewicz, J. Kowalski, M. Szykula. Computing the shortest reset words of synchronizing automata, J. Comb. Optim., Springer, 29(2015), 88-124. 20. A.A. Kljachko, I.K. Rystsov, M.A. Spivak, An extremely combinatorial problem connected with the bound on the length of a recurrent word in an automata. Kybernetika. 2(1987), 16-25. 21. P. Lankaster, Theory of matrices, Acad. Press, 1969.

22. A. E. Laemmel. Study on application of coding theory. Technical Report PIBMRI895. Dept. Electrophysics, Microwave Research Inst., Polytechnic Inst., Brooklyn, NY, 5-63, 1963. 23. C. L. Liu. Determination of the final state of an automaton whose initial state is unknown. IEEE Transactions on Electronic Computers, EC-12(5):918-920, 1963. 24. A. I. Malcev, Foundations of linear algebra, San Francisco, Freeman, 1963. (Nauka, 1970, in Russian.) 25. A. Mateescu and A. Salomaa, Many-Valued Truth Functions, Cerny’s conjecture and road coloring, Bulletin EATCS, 68 (1999), 134-148. 26. D. Perrin, M.-P. Schutzenberger. Synchronizing prefix codes and automata and the road coloring problem. Symbolic dynamics and its applications , 135 (1992), 295-318. 27. J.-E. Pin, On two combinatorial problems arising from automata theory, Annals of Discrete Math., 17(1983), 535-548. 28. A. Roman, Experiments on Synchronizing Automata. Schedae Informaticae, Versita, Warsaw, 19(2010), 35-51. 29. P. H. Starke. Eine Bemerkung ueber homogene Experimente. Elektronische Informationverarbeitung und Kybernetik, 2(1966), 257-259. 30. B. Steinberg, The Averaging Trick and the Cerny Conjecture. Developments in Language Theory, Springer, NY, LNCS, 6224(2010), 423-431. 31. M. Shykula, Improving the upper bound on the length of the shortest reset words. 2017, arXiv:1702.05455. 32. A.N. Trahtman. Notable trends concerning the synchronization of graphs and automata, CTW06, El. Notes in Discrete Math., 25(2006), 173-175. ˇ 33. A.N. Trahtman. The Cerny Conjecture for Aperiodic Automata. Discr. Math. Theoret. Comput. Sci. v. 9, 2(2007), 3-10. 34. A.N. Trahtman. The Road Coloring and Cerny Conjecture. Proc. of Prague Stringology Conference. 2008, 1-12. 35. A.N. Trahtman. Modifying the upper bound on the length of minimal synchronizing word. LNCS, 6914(2011), 173-180, arXiv:1104.2409. 36. A.N. Trahtman. Bibliography, http://u.cs.biu.ac.il/∼trakht/syn.html. 37. A.N. Trahtman. Synchronization, http://u.cs.biu.ac.il/∼trakht/readme.html. 38. M. V. Volkov, Synchronizing automata and the Cerny conjecture, in: C.MartinVide, F. Otto, H. Fernau eds., Language and Automata Theory and Applications, LATA 2008, Springer, LNCS, 5196(2008), 11-27. 39. M. V. Volkov, Lecture Notes on Synchronizing Automata, M, V. Volkov, 2016, http://csseminar.kadm.usu.ru/Hunter/lectures.pdf.