Synchronization of primitive automata

We exhibit new conditions under which a primitive automaton is synchronizing. In particular, we show that the primitivity of an automaton forces its synchronizability whenever the automaton has either a letter of defect 1 or a word of rank 2.

some non-empty set of states designated as final states are used as language recognizers; see, e.g., [7], especially, Proposition 1 therein, which the authors attribute to Zoltan Ésik, and [8].
In general, primitivity and synchronizability are independent properties: there exist primitive DFAs that are not synchronizing and synchronizing DFAs that are not primitive.However, the conjunction of these properties defines an affluent class that contains many exciting species of DFAs.Say, several series of synchronizing DFAs with reset threshold close to the state number squared are observed to be primitive in [6]; these include the famous series of DFAs with n states and reset threshold (n − 1)2 discovered by Jan Černý [9].The literature contains many results that give or can be interpreted as conditions under which primitive DFAs become synchronizing; see, e.g., [10][11][12][13][14][15].The present note provides two new such conditions that strengthen several known results and allow us to confirm a conjecture proposed in [15].
To describe our contribution in more detail, we need some extra notions.Given a DFA A = ⟨Q, Σ⟩, the rank of a word w ∈ Σ * is the cardinality of Q .w and the defect of w is the cardinality of the set difference Q \ Q .w. Denote by Σ 0 the set of all letters of defect 0 in Σ.Assuming Σ 0 ̸ = ∅, one can consider the DFA A 0 := ⟨Q, Σ 0 ⟩; observe that all letters in Σ 0 act on Q as permutations.We call a DFA A permutation-primitive if the DFA A 0 is primitive.
So far, most studies on the synchronizability of primitive DFAs have actually dealt with permutation-primitive DFAs; see, e.g., the already cited papers [10][11][12][13][14]. Considering permutation-primitive DFAs is very natural from the viewpoint of the theory of permutation groups, and work in this direction has revealed several deep ties with the theory of classical combinatorial configurations (such as Latin squares, Steiner systems, Hadamard matrices, and others); see the survey [16].From the present note's perspective, however, the permutation-primitivity may look like an ad hoc condition since there are plenty of primitive DFAs that are not permutation-primitive (for instance, the DFAs with a composite number of states from the Černý series [9] are such), and, moreover, there exist primitive DFAs without letters of defect 0. Still, it is worthwhile to analyze which synchronizability results established for permutation-primitive DFAs extend to general primitive DFAs.
For instance, Peter Neumann [11], Lemma 2.4, observed that a permutation-primitive DFA with at least three states is synchronizing whenever it has a letter of rank 2. In Section 4, we show that so is any primitive DFA with at least three states and a letter of rank 2. It is also known that permutation-primitive DFAs possessing a letter of defect 1 are synchronizing; see, e.g., [13], Theorem 1 2 .In Section 2, we prove that the presence of a letter of defect 1 ensures synchronizability for an arbitrary primitive DFA as was conjectured in [15].The latter fact is a consequence of a general result (Thm.2.1) having several other applications.
We have made a fair effort to make this note self-contained to a reasonable extent.In particular, it should be understandable without any familiarity with the theory of permutation groups.

Primitive automata with a unimodal letter
The graph of a DFA A = ⟨Q, Σ⟩ is the labeled directed graph that has Q as the vertex set and the edge from q to q ′ labeled a for every q, q ′ ∈ Q and a ∈ Σ such that q .a = q ′ .Fix a letter a ∈ Σ and remove all edges of the graph of A except for those labeled a.The remaining graph is denoted Γ a , and its weakly connected components are called the a-clusters.
Observe that Γ a has exactly one outgoing edge for every state in Q.Take a state q ∈ Q and consider the path in Γ a starting at q: Since Q is finite, states in this path eventually begin repeating, that is, for some non-negative integer ℓ and some integer m > ℓ, we have q .a ℓ = q .a m .(Here and below, we adopt the convention that a 0 = ε.)In other words, each path in Γ a eventually arrives at a cycle.Hence, each a-cluster contains a unique cycle (that can degenerate into a loop) and, perhaps, some trees attached to this cycle at their roots.The least non-negative ℓ such that q .a ℓ = q .a m for some m > ℓ is called the a-height of q.If the a-height ℓ of q is positive, then the state q .a ℓ is the root of the tree of Γ a containing q and is called the root of q.The illustration in Figure 1 shows an a-cluster whose states are marked with their a-heights.States connected with dashed lines belong to the same of the equivalence We say that a is a unimodal letter if the defect of a is positive and all states with maximal a-height have the same root.In the a-cluster shown in Figure 1, the maximal a-height of a state is 3, and all states of this a-height have the same root.If we assume that the a-heights of states in other a-clusters of Γ a are all less than 3, then the letter a is unimodal.
Our first main result is the following.
We prove Theorem 2.1 in Section 3.Here we demonstrate some of its applications.Given a DFA A = ⟨Q, Σ⟩, the kernel type of a letter a ∈ Σ is the non-increasing sequence of the class sizes of the equivalence ker a.For an example, look again at the a-cluster shown in Figure 1.If we assume that all other a-clusters of Γ a are cycles, then the letter a has the kernel type (3, 2, 2, 2, 2, 2, 1, 1, . . .).Lemma 2.2.In an arbitrary DFA, every letter of kernel type (k, 1, 1, . . .), where k > 1, is unimodal.
Proof.Consider a DFA ⟨Q, Σ⟩ and fix a letter a ∈ Σ.For each state p ∈ Q .a, the set p . a −1 := {q ∈ Q | q .a = p} constitutes a class of the equivalence ker a.Now suppose that the defect of a is positive and a state r ∈ Q is the root of some state s ∈ Q in the graph Γ a .Then r = q .a = q ′ .a where q is the predecessor of r in the path that leads from s to r in Γ a and q ′ is the predecessor of r in the cycle of Γ a on which r lies (q ′ = r if the cycle degenerates into a loop).Since q ̸ = q ′ , the class r .a −1 is non-singleton.We see that each root contributes an entry different from 1 to the kernel type of the letter a.
Thus, if the kernel type of a has a unique entry different from 1, then the graph Γ a has only one root whence all states with positive a-heights have the same root.In particular, the unimodality condition holds.
Combining Lemma 2.2 and Theorem 2.1 immediately yields the following.For permutation-primitive DFAs, synchronizability under the presence of a letter of kernel type (k, 1, 1, . . .), k > 1, was established by João Araújo and Peter Cameron [13]; see Theorem 2 therein.Corollary 2.3 generalizes this result.In [15], Igor Rystsov and Marek Szyku la came up with two conjectures on the synchronizability of primitive DFAs.The first of them, restated in the terminology of the present note, is the following.
Conjecture RS.Every primitive DFA with all letters of defect at most 1 is synchronizing unless all letters have defect 0.
In [15], Section 3.3, Conjecture RS was supported by some experimental data; in particular, it was reported to hold for all DFAs with two letters and at most 11 states.Besides, it was shown in [15], Section 3.1, that several known results implied the validity of Conjecture RS in certain classes of DFAs.
Since the kernel type of a letter of defect 1 is (2, 1, 1, . . .), the following result (validating Conjecture RS) is a special case of Corollary 2.3.
Corollary 2.4.Every primitive DFA possessing a letter of defect 1 is synchronizing.
One may ask whether primitivity implies synchronizability also in the presence of a letter of defect 2. The answer is negative as shown in [15], Example 7, by exhibiting two non-synchronizing primitive DFAs each of which has five states and a letter of defect 2. The graphs of these DFAs are shown in Figure 2 borrowed from [15] with the authors' permission.
On the other hand, every permutation-primitive DFA with a letter of defect 2 is synchronizing [13], Theorem 3(a).
Given a DFA ⟨Q, Σ⟩, a letter a ∈ Σ of positive defect is called a semiconstant if q .a = q ′ .a for all q, q ′ / ∈ Q .a and p . a = p for all p ∈ Q .a.In other words, a semiconstant fixes every state in its image and sends all states outside the image to one particular state.By [15], Theorem 25, every primitive DFA whose letters are either of defect 0 or semiconstants is synchronizing unless all letters have defect 0. Obviously, the kernel type of a semiconstant of defect d is (d + 1, 1, 1, . . .).Thus, Corollary 2.3 readily leads to a stronger fact.

Proof of Theorem 2.1
We start with a reduction which was deduced in [15], Section 3.1, from a known property of primitive DFAs; see [3], Proposition 8, or [4], Proposition 5.1.Here, we provide a direct proof for the sake of self-containedness.
A DFA ⟨Q, Σ⟩ is called strongly connected if for all q, q ′ ∈ Q there exists a word w ∈ Σ * such that q .w = q ′ .Proposition 3.1.Every primitive DFA with more than two states is either strongly connected or synchronizing.
Proof.Let A = ⟨Q, Σ⟩ be a DFA.A non-empty subset S ⊆ Q is said to be invariant if s .a ∈ S for all s ∈ S and a ∈ Σ.Given an invariant subset S, consider the relation It is known (and easy to verify) that ρ S is a congruence on A for which S is a class.Hence, in a primitive DFA, every invariant subset either is a singleton or coincides with the set of all states.
Assume that A = ⟨Q, Σ⟩ is a primitive DFA with more than two states.For each q ∈ Q, consider the set q := {q .w | w ∈ Σ * }.Clearly, q is an invariant subset whence either q = {q} or q = Q.If q = Q for all q ∈ Q, then A is strongly connected.Suppose that there is a state q 0 such that q 0 = {q 0 }.If q 1 is another state with q 1 = {q 1 }, then {q 0 , q 1 } is a 2-element invariant subset.We then must have {q 0 , q 1 } = Q, a contradiction.Hence, q = Q for all q ∈ Q \ {q 0 }; in particular, for each q ∈ Q \ {q 0 }, there exists a word w q ∈ Σ * such that q .w q = q 0 .We inductively construct a reset word for A , starting with w 0 := ε.If a word w i has already been constructed and Q .w i = {q 0 }, then w i is a reset word.Otherwise, take any q ∈ Q .w i \ {q 0 } and let w i+1 := w i w q .Since q .w q = q 0 .w q = q 0 , the cardinality of Q .w i+1 is strictly less than that of Q .w i .Hence, the described process eventually produces a reset word, and A is synchronizing.
We need a notion which is due to Karel Culik II, Juhani Karhumäki, and Jarkko Kari [19].They defined the stability relation σ on a DFA ⟨Q, Σ⟩ as follows: The following properties were observed in [19].Lemma 3.2.
1. On each DFA, the stability relation is a congruence.2. A DFA is synchronizing if and only if its stability relation is universal.
The final ingredient we need stems from Avraham Trahtman's proof of the Road Coloring Conjecture in [20].We use the presentation of Trahtman's argument given in [1]; the following is Lemma 4.4 from [1] restated in the terminology adopted in the present note.Lemma 3.3.In a strongly connected DFA possessing a unimodal letter, the stability relation is not the equality.
Proof of Theorem 2.1.Let A be a primitive DFA possessing a unimodal letter; we aim to show that A is synchronizing.If A has at most two states, then the unimodal letter is easily seen to be a reset word for A .Otherwise, in view of Proposition 3.1, we may assume that A is strongly connected.Then Lemma 3.3 ensures that the stability relation σ on A is not the equality.Since A is primitive, Lemma 3.2(1) implies that σ is universal whence A is synchronizing by Lemma 3.2(2).

Primitive automata with a word of rank 2
Our second main result generalizes Peter Neumann's lemma on permutation-primitive DFAs [11], Lemma 2.4, that has already been mentioned in Section 1.
Theorem 4.1.A primitive DFA A = ⟨Q, Σ⟩ with at least three states is synchronizing whenever some word w ∈ Σ * has rank 2. Figure 3.A non-synchronizing permutation-primitive DFA from [13] with a letter of rank 3.If the action of a letter x ∈ {a, b, c, e} at some state is not shown, then the loop labeled x is assumed.
Proof.Arguing by contradiction, assume that A is not synchronizing.Then A is strongly connected by Proposition 3.1.
The set S := Q .w consists of two states since w has rank 2.Moreover, |S .u| = 2 for every word u ∈ Σ * because if |S .u| = 1 for some u ∈ Σ * , then wu would be a reset word for A in a contradiction to the assumption that A is not synchronizing.Let S = {s, s ′ }.Since A is strongly connected, for every state q ∈ Q, there exists a word u ∈ Σ * such that s .u = q, that is, q ∈ S .u. Thus, Q is a union of 2-element sets of the form S .u, u ∈ Σ * .If different sets of this form are pairwise disjoint, then the relation is easily seen to be a congruence on A .Since each ρ-class consists of two states and A has at least three states, ρ is not the universal relation, nor is ρ the equality.This contradicts the primitivity of A .
Thus, there exist two words u 1 , u 2 ∈ Σ * such that the subsets S 1 := S .u 1 and S 2 := S .u 2 are different but have a common state, say, p.If p i is the other state in S i , i = 1, 2, we have p 1 ̸ = p 2 .Take an arbitrary word v ∈ Σ * and consider the set {p, p 1 , p 2 } .vw.It is contained in the 2-element subset S = Q .w whence amongst the three states p .vw, p 1 .vw, p 2 .vw, some two must be equal.We have p .vw ̸ = p i .vw since {p .vw, p i .vw} = S i .vw = S .u i vw for i = 1, 2, and each set of the form S .u, u ∈ Σ * , consists of two states.The only remaining option is p 1 .vw = p 2 .vw.
We have thus proved that the pair (p 1 , p 2 ) with p 1 ̸ = p 2 belongs to the stability relation σ on A .Hence, σ is not the equality, and since A is primitive, Lemma 3.2(1) implies that σ is the universal relation.By Lemma 3.2(2), A is synchronizing, a contradiction.
It was mentioned after Corollary 2.4 that the presence of a letter of defect 2 forces synchronizability for permutation-primitive DFAs but fails to do so for general primitive DFAs.Continuing this line of discussion, one may ask whether primitivity implies synchronizability in the presence of a word or a letter of rank 3. The answer is negative even for the permutation-primitive case.An example of a non-synchronizing permutationprimitive DFA with nine states and a letter of rank 3 is described after Theorem 4 in [13]; the graph of this DFA is shown in Figure 3, where the loops have been omitted for better readability.
Each of the two 5-state non-synchronizing primitive DFAs from Figure 2 also has a letter of rank 3, but these DFAs are not permutation-primitive.Remark 4.2.We could have stated and proved Corollary 2.4 in the form used in Theorem 4.1, that is, requesting the presence of a word of defect 1 rather than a letter of defect 1.However, this would not be a generalization since a DFA having a word of defect 1 necessarily has a letter of defect 1.In contrast, a DFA can have a word of rank 2 without having any letter of rank 2.

Figure 1 .
Figure 1.A sample a-cluster.Marks are the a-heights of states; dashed lines show the equivalence ker a.