Winning Strategies for the Synchronization Game
on Subclasses of Finite Automata††thanks: Mikhail Volkov was supported by the Ministry of Science and Higher Education of the Russian Federation, project FEUZ-2023-2022.
Abstract
We exhibit a winning strategy for Synchronizer in the synchronization game on every synchronizing automaton in whose transition monoid the regular -classes form subsemigroups.
1 Introduction
A complete deterministic finite automaton (DFA) is a pair of two finite sets equipped with a map whose image at is denoted by . We call the state set and the input alphabet. Elements of and are referred to as states and, respectively, letters, and for a state and a letter , we refer to as the result of the action of at . The action of letters in naturally extends to the action of words over : if with , then .
A DFA is called synchronizing if there exists a word over whose action brings the DFA to one particular state no matter at which state is applied: for all . Any word with this property is said to be a reset word for the automaton.
Synchronizing automata serve as transparent and natural models of error-resistant systems in many applications (coding theory, robotics, testing of reactive systems) and reveal interesting connections with symbolic dynamics, substitution systems, and other parts of mathematics. We refer the reader to chapter [12] of the ‘Handbook of Automata Theory’ and survey [19] for an introduction to the area and an overview of its state-of-the-art.
The fourth-named author initiated viewing synchronizing automata through the lens of game theory; the motivation for this came from a game-theoretical approach to software testing suggested in [4]. In a synchronization game on a DFA , two players, Alice (Synchronizer) and Bob (Desynchronizer), take turns choosing letters from the input alphabet of . Alice who wants to synchronize wins when the sequence of chosen letters forms a reset word. Bob aims to prevent synchronization or, if synchronization is unavoidable, to delay it as long as possible. Provided that both players play optimally, the outcome of such a game depends on the automaton only. This raises the problem of classifying synchronizing automata into those on which Alice and, respectively, Bob have a winning strategy. DFAs on which Alice can ensure win are of interest because they are more amenable to synchronization, in a sense. For brevity, we call such DFAs A-automata.
A few initial results on synchronization games were obtained in [8]. In particular, [8, Theorem 4] provides an algorithm that, given a DFA with states and input letters, decides who has a winning strategy in the synchronization game on in time. Thus, for any individual DFA, one can determine whether it is an A-automaton. Here, however, we are interested in general conditions ensuring that all synchronizing DFAs of a certain type are A-automata. One such condition was mentioned in [8]: Alice always wins on definite DFAs introduced in [14].
In [7], the first three authors of the present note showed that within two further families of automata considered in the literature—weakly acyclic DFAs and commutative DFAs—every synchronizing DFA is an A-automaton. Here we continue this line of research by designing a winning strategy for Alice that applies to synchronizing automata from yet another family of DFAs. Automata in this family are distinguished by a structure feature of their transition monoids: the regular -classes in these monoids form subsemigroups. The set of all finite semigroups with regular -classes being subsemigroups plays a distinguished role in the algebraic theory of regular languages; see [1, Chapter 8]. Therefore, DFAs with transition monoids in often show up in the literature; see, e.g., [2, 3]. As they seem to have no specific name so far, we coin them DS-automata. Thus, our main result says that Alice can win the synchronization game on every synchronizing DS-automaton. Since the family of DS-automata is extensive and encompasses all the families above (definite, weakly acyclic, and commutative DFAs), this provides a vast generalization of the mentioned results from [8, 7].
Our approach is algebraic as it exploits the structural properties of transition monoids. We have collected all necessary prerequisites from semigroup theory in Section 2 to make the note self-contained, to a reasonable extent. Section 3 presents Alice’s winning strategy in synchronization games on synchronizing DS-automata. In Section 4, we relate our result to previously found facts about winning strategies for synchronization games and state two open questions.
2 Preliminaries
2.1 Transition Monoids and Synchronization
For a DFA , the map defined by the rule is a transformation on the set .
Definition 1.
The transition monoid of a DFA is the submonoid of the monoid of all transformations on the set generated by the set .
We denote the transition monoid of a DFA by . It is easy to see that any product is nothing but the transformation defined by the rule where stands for the word . Thus, the transition monoid can alternatively be defined as the monoid of all transformations on the set caused by the action of words over .
If is a synchronizing DFA and is a reset word for , then the transformation is a constant map on , that is, for a certain . Thus, the transition monoid of a synchronizing automaton always contains a constant transformation. Conversely, if is a constant transformation, then any word with is a reset word for and so is synchronizing. We see that synchronization is actually a property of the transition monoid of an automaton rather than the automaton itself: for DFAs and with the same state set but different input alphabets, the equality guarantees that is synchronizing if and only if so is .
We can say a bit more about transition monoids of synchronizing automata, but for this, we first need to recall some concepts of semigroup theory. A nonempty subset of a semigroup is called an ideal in if, for all and , both products and lie in . If and are two ideals in , their intersection contains any product with , . So is nonempty, and then it is easy to verify that is again an ideal in . Therefore, each finite semigroup has a least ideal called the kernel of and denoted .
The following observation is folklore but we provide a proof for the sake of completeness.
Lemma 1.
A DFA is synchronizing if and only if the kernel of its transition monoid consists of constant transformations.
Proof.
The ‘if’ part readily follows from the already mentioned fact that if the transition monoid of a DFA contains a constant transformation, then the DFA is synchronizing.
For the ‘only if’ part, let be a synchronizing DFA; then the set of all constant transformations in the transition monoid is nonempty. For any and any , we have
(1) |
Equality (1) implies that the set is contained in every ideal of the monoid , in particular, in its kernel . Further, for every and every , the product is a constant transformation: if , then . Together with (1), this observation implies that forms an ideal in . Since contains , we have by the definition of the kernel. ∎
2.2 Structure of Semigroups in
Green [9] defined five important relations on every semigroup , collectively referred to as Green’s relations, of which we need the following three:
-
either or and for some ;
-
either or and for some ;
-
and for some .
The relations and are obviously equivalencies. The definition of means that is the product of and as binary relations. As observed in [9], is also the product of and , and this implies that is the least equivalence containing both and .
An element of a semigroup is said to be regular if for some . A -class is called regular if it contains a regular element. (In this case, every element of is known to be regular; see [9, Theorem 6].) We denote by the set of all finite semigroups such that the regular -classes of are subsemigroups in .
The structure of semigroups is well understood in terms of their decompositions into some basic blocks. As we will use this structural result, we recall the notions involved.
A semilattice is a semigroup satisfying the laws of commutativity and idempotency .
Definition 2.
Let be a semilattice and a family of disjoint semigroups indexed by the elements of . A semigroup is said to be a semilattice of semigroups , , if:
- (S1)
-
;
- (S2)
-
each is a subsemigroup in ;
- (S3)
-
for every and every , , the product belongs to .
We say that a semigroup is -nilpotent over its kernel ( being a positive integer) if every product of elements of belongs to . We call a semigroup nilpotent over its kernel if it is -nilpotent over its kernel for some . (To a semigroupist, finite semigroups nilpotent over their kernels are familiar as finite Archimedean semigroups.)
The following is a specialization of the equivalence (4c) (1b) in [18, Theorem 3] to finite semigroups111Theorem 3 in [18] deals with semigroups in which every element has a power that belongs to a subgroup. Every finite semigroup has this property..
Lemma 2.
Every semigroup in is a semilattice of semigroups nilpotent over their kernels.
3 Winning Strategy in Synchronization Games on DS-Automata
We start with a visual yet rigorous description of the synchronization game under consideration. In this game, two players, Alice and Bob, play on a fixed DFA . At the start, each state in holds a token. During the game, some tokens can be removed according to the rules specified in the next paragraph. Alice wins if only one token remains, while Bob wins if he can keep at least two tokens unremoved for an indefinite amount of time.
Alice moves first, and then players alternate moves. The player whose turn is to move proceeds by selecting a letter . Then, for each state that held a token before the move, the token advances to the state . (In the standard graphical representation of as the labelled digraph with as the vertex set and the labelled edges of the form , one can visualize the move as follows: all tokens simultaneously slide along the edges labelled .) If several tokens arrive at the same state after this, all of them but one are removed so that when the move is completed, each state holds at most one token.
To illustrate, let us look at how the synchronization game might play out on the following DFA in which, initially, each state holds a token (shown in gray).
If Alice chooses the letter on her first move, the tokens in states 0 and 2 remain due to the loops at these states. The token from state 1 moves to 0 and then is removed because the state 0 is ‘occupied’. Hence, the position after Alice’s first moves looks as follows:
If Bob replies by choosing the letter , the token in state 0 remains while the token from state 2 moves to 1. Here is the position after Bob’s reply:
Now choosing , Alice wins because after the token from state 1 moves to 0, it is removed, and we get the position with only one token:
Notice that Alice won the game described above only because of Bob’s unfortunate reply. In fact, Bob has a winning strategy in the synchronization game on this DFA: if he repeats Alice’s moves, that is, chooses the same letter Alice chose on her previous move, he can maintain two tokens unremoved forever. Hence, there are simple synchronizing DFAs that are not A-automata.
Recall that a DS-automaton is a DFA whose transition monoid lies in the set of all finite semigroups with regular -classes being subsemigroups. The following is the main result of this note.
Theorem 3.
Alice has a winning strategy on every synchronizing DS-automaton.
Proof.
Take an arbitrary synchronizing DS-automaton . We denote the transition monoid by to lighten the notation. Since , by Lemma 2 there is a semilattice such that is a semilattice of semigroups , , where each semigroup is nilpotent over its kernel.
The relation defined by is known (and easy to see) to be a partial order on every semilattice, and so on . Due to the laws of commutativity and idempotency, the inequalities and hold for all . Since the semilattice is finite, it has a least element with respect to this order; denote it by . Then for every whence the semigroup is an ideal in by item (S3) in Definition 2. Therefore contains the kernel of , and therefore, . (In fact, it is easy to show that the equality holds, but it is not needed for the present proof.)
Fix a positive integer such that the semigroup is -nilpotent over its kernel . We show that Alice can win in the synchronization game on , using the following -round strategy. Denote by and the -th letters chosen in the -th round by Alice and Bob, respectively. In each round, Alice chooses the first letter at random. Then, after each reply of Bob, she checks whether the word causes a transformation in . If yes, then Alice starts the next round. If no, the transformation caused by lies in some subsemigroup with (recall that by item (S1) in Definition 2). For each letter , denote by the element of the semilattice such that the transformation lies in the subsemigroup . Take any transformation . By Definition 1, for some whence by item (S3) in Definition 2, . If for all , then , and this would contradict the choice of as the least element with respect to and the assumption . Thus, there must be a letter such that , and Alice chooses any such letter as .
By the construction, if , then the index of the subsemigroup containing the transformation caused by the word is strictly less than in the partially ordered set . Hence, for each , the number of pairs of moves in the -th round does not exceed the maximum length of strictly decreasing chains in , and the transformation caused by the word lies in the subsemigroup . Then the transformation caused by the word is a product of elements of and so belongs to as the semigroup is -nilpotent over its kernel. Since is a synchronizing automaton, the kernel of its transition monoid consists of constant transformations by Lemma 1. From the inclusion registered above, we conclude that is a constant transformation, and so is a reset word for . ∎
4 Relations to Earlier Results and Future Work
4.1 Corollaries
In the introduction, we mentioned a few previously known families of A-automata. Now we show that all these families consist of DS-automata so their winning strategies are subsumed by that of Theorem 3.
Definite automata.
This DFA family was introduced by some of the pioneers of automata theory back in 1963 [14]. In [14], the term ‘automaton’ meant a recognizer, that is, a DFA with a designated initial state and a distinguished set of final states. However, DFAs without initial and final states as defined in the present note also appeared in [14] but under the name ‘transition tables’. The following is [14, Definition 13] stated in our terminology and notation.
Definition 3.
A DFA is weakly -definite if for every word of length at least over , for all . A DFA is -definite if it is weakly -definite but not weakly -definite. A DFA is definite if it is -definite for some .
By Definition 3, every definite DFA is synchronizing and any word of length at least is a reset word for every -definite DFA. Therefore, Alice wins on every definite automaton by selecting her moves at random.
The transition monoid of a definite DFA is nilpotent over its kernel. This fact is implicitly contained in [14] and in the explicit form, it is a part of [20, Theorem 3]. Comparing it with Lemma 2, we see that definite automata constitute a special subfamily of DS-automata. Moreover, for definite automata, Alice’s winning strategy from Theorem 3 specializes exactly to the random choice of moves. In fact, a DFA is definite if and only if Alice can win by pure random choices of moves.
Commutative automata.
A DFA is said commutative if its transition monoid is commutative, that is, satisfy the law . Synchronizing commutative automata were considered in [15, 16, 10]. A simple winning strategy for Alice in synchronization games on such automata was suggested in [7, Theorem 5.2]: Alice must just choose letters spelling a reset word. Hence, as in the previous case, Alice can completely ignore the moves of Bob.
Obviously, on any commutative semigroup, Green’s relations and coincide with each other, and hence, with the relation . If an element of a commutative semigroup is regular, then for some whence . By [9, Theorem 7], this ensures that the -class containing is a subsemigroup (and even a subgroup) of . Thus, in all commutative semigroups, regular -classes are subsemigroups. Therefore, commutative DFAs are DS-automata, and Theorem 3 applies to commutative synchronizing DFAs.
Weakly acyclic automata.
Let be a DFA and . We say that is reachable from in if either or there exists a word over such that . The reachability relation of any DFA is reflexive and transitive. A DFA is called weakly acyclic if its reachability relation is a partial order.
Various properties of synchronizing weakly acyclic DFAs were considered in [17, 11]. A winning strategy for Alice in synchronization games on such automata was suggested in [7, Theorem 2.3].
By [5, Proposition 6.2] the transition monoid of any weakly acyclic DFA is -trivial, which means that Green’s relation on coincides with the equality relation. It is well known that regular -classes are subsemigroups in any -trivial semigroup, but we failed to locate a source where this fact was formulated such that it would be convenient to refer to it. Therefore we state it as a lemma and provide a proof.
Lemma 4.
In every -trivial semigroup, regular -classes are subsemigroups.
Proof.
Let be an -trivial semigroup and let be its regular -class. Every element is regular, so that for some . Then whence since is -trivial. We have . Now if , then since in every -trivial semigroup. By the definition of the relation , we have either or for some . If , then . If , multiplying through on the right by , we get . Thus, for arbitrary , whence is a subsemigroup. ∎
Thus, weakly acyclic DFAs are DS-automata, and Theorem 3 applies again.
4.2 Open Questions
Theorem 3 generalizes several earlier results on A-automata. Can it be further generalized? This is an interesting question, but it requires specification.
We mentioned in Section 2.1 that synchronization is a property of transition monoids. This is not true for the property of being an A-automaton. Moreover, for every synchronizing DFA , there exists an A-automaton such that . To see this, let where the action of the added letter coincides with the action of a fixed reset word for . The transformations caused by the letters in generate the same submonoid of the monoid of all transformations on the set as do the transformations caused by the letters in . Still, Alice instantly wins the synchronization game on by choosing the letter on her first move.
Thus, one cannot hope for a characterization of A-automata in terms of transition monoids. One can, however, try to find new sets of finite semigroups such that and every synchronizing DFA whose transition monoid lies in is an A-automaton.
It is easy to verify that the property of being an A-automaton is inherited by subautomata, homomorphic images, and finite direct products. This suggests looking for sets closed under corresponding operations with semigroups. A set of finite semigroups closed under forming finite direct products and taking subsemigroups and homomorphic images is called a pseudovariety; the set is an example of a pseudovariety. Using the notion of a pseudovariety, we can specify a possible direction towards generalizing Theorem 3 as follows:
Question 1.
Is there a pseudovariety of finite semigroups that strictly contains while all synchronizing DFAs with transition monoids in are A-automata?
The 5-element Brandt semigroup consists of the following five -matrices, multiplied according to the usual rule:
The monoid obtained by adding the identity -matrix to is the syntactic monoid of the language , and hence, the transition monoid of the minimal automaton of this language (shown below).
It is known that every pseudovariety of finite semigroups not contained in must include the semigroup (this fact occurs as Exercise 8.1.6 in [1]; the solution to this exercise follows from the proof of [13, Theorem 3]). Thus, if Bob had a winning strategy on the automaton , then the answer to Question 1 would be ‘No’, and moreover, would be the largest pseudovariety with the property that Alice can win the synchronization game on every synchronizing DFA whose transition monoid lies in . However, it is easy to see that Alice wins on : she can start with choosing ; if Bob replies with , he loses, and if he replies with , Alice wins by choosing .
The fact that is an A-automaton, along with other examples of A-automata beyond the family of DS-automata, indicates that Question 1 might have an affirmative answer. We have a candidate pseudovariety to witness such an answer but its definition requires more structure theory of semigroups than assumed here.
Another question of interest concerns the speed of synchronization for A-automata. When we mentioned in the introduction that A-automata seem more amenable to synchronization, we meant that they tend to have short reset words. Indeed, in all examples we know, an A-automaton with states admits a reset word of length at most . For DFAs in the range of Theorem 3, that is, synchronizing DS-automata, this was established in [3, Theorem 2.6]. The DFA with 3 states is reset by the words and of length 2 and hence provides another example. These observations lead to the next question.
Question 2.
Is each A-automaton with states reset by a word of length ?
Recall that for each , there exist synchronizing DFAs with states whose shortest reset words have length ; see [6, Lemma 1]. It can be verified that none of these ‘slowly synchronizing’ DFAs are A-automata.
Acknowledgement.
The authors are grateful to the anonymous referees for their attention and remarks.
References
- [1] Almeida, Jorge: Finite Semigroups and Universal Algebra. Series in Algebra, vol. 3. World Scientific, Singapore (1994)
- [2] Almeida, Jorge, Margolis, Stuart, Steinberg, Benjamin, Volkov, Mikhail: Representation theory of finite semigroups, semigroup radicals and formal language theory, Transactions of the American Mathematical Society 361:3, 1429–1461 (2009). https://doi.org/10.1090/S0002-9947-08-04712-0
- [3] Almeida, Jorge, Steinberg, Benjamin: Matrix mortality and the Černý–Pin conjecture. In: Diekert, Volker, Nowotka, Dirk (eds.), Developments in Language Theory, 13th International Conference (DLT 2009), Lecture Notes in Computer Science, vol. 5583, pp. 67–80. Springer, Berlin (2009). https://doi.org/10.1007/978-3-642-02737-6_5
- [4] Blass, Andreas, Gurevich, Yuri, Nachmanson, Lev, Veanes, Margus: Play to test. In: Grieskamp, Wolfgang, Weise, Carsten (eds.), Formal Approaches to Software Testing, 5th International Workshop (FATES 2005), Lecture Notes in Computer Science, vol. 3997, pp. 32–46. Springer, Berlin, Heidelberg (2006). https://doi.org/10.1007/11759744_3
- [5] Brzozowski, Janusz A., Fich, Faith E.: Languages of -trivial monoids. Journal of Computer and System Sciences 20:1, 32–49 (1980). https://doi.org/10.1016/0022-0000(80)90003-3
- [6] Černý, Jan: Poznámka k homogénnym eksperimentom s konečnými automatami. Matematicko-fyzikalny Časopis Slovenskej Akadémie Vied 14(3): 208–216 (1964) (in Slovak; English translation: A note on homogeneous experiments with finite automata. Journal of Automata, Languages, and Combinatorics 24:2-4, 123–132 (2019). https://doi.org/10.25596/jalc-2019-123)
- [7] Fernau, Henning, Haase, Carolina, Hoffmann, Stefan: The synchronization game on subclasses of automata. In: Fraigniaud, Pierre, Uno, Yushi (eds.), 11th International Conference on Fun with Algorithms (FUN 2022), Leibniz International Proceedings in Informatics (LIPIcs), vol. 226, pp. 14:1–14:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl (2022). https://doi.org/10.4230/LIPIcs.FUN.2022.14
- [8] Fominykh, Fedor M., Martyugin, Pavel V., Volkov, Mikhail V.: P(l)aying for synchronization, International Journal of Foundations of Computer Science 24:6, 765–780 (2013). https://doi.org/10.1142/S0129054113400170
- [9] Green, James Alexander: On the structure of semigroups. Annals of Mathematics, Second Series 54:1, 163–172 (1951). https://doi.org/10.2307/1969317
- [10] Hoffmann, Stefan: Constrained synchronization and commutativity. Theoretical Computer Science 890, 147-–170 (2021). https://doi.org/10.1016/j.tcs.2021.08.030
- [11] Hoffmann, Stefan: Constrained synchronization and subset synchronization problems for weakly acyclic automata, in: Moreira, Nelma, Reis, Rogério (eds.), Developments in Language Theory, 25th International Conference (DLT 2021), Lecture Notes in Computer Science, vol. 12811, pp. 204–216. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-81508-0_17
- [12] Kari, Jarkko, Volkov, Mikhail: Černý’s conjecture and the road colouring problem. In: Pin, Jean-Éric (ed.), Handbook of Automata Theory, vol. I, pp. 525–565. EMS Publishing House, Zürich (2021). https://doi.org/10.4171/AUTOMATA-1/15
- [13] Margolis, Stuart W. On M-varieties generated by power monoids. Semigroup Forum 22, 339–353 (1981). https://doi.org/10.1007/BF02572813
- [14] Perles, Micha, Rabin, Michael O., Shamir, Eliahu: The theory of definite automata. Transactions on Electronic Computers 12, 233–243 (1963). https://doi.org/10.1109/PGEC.1963.263534
- [15] Rystsov, Igor: Exact linear bound for the length of reset words in commutative automata. Publicationes Mathematicae Debrecen 48:3-4, 405–409 (1996)
- [16] Rystsov, Igor: Reset words for commutative and solvable automata. Theoretical Computer Science 172:1–2, 273–279 (1997). https://doi.org/10.1016/S0304-3975(96)00136-3
- [17] Ryzhikov, Andrew: Synchronization problems in automata without non-trivial cycles. Theoretical Computer Science 787, 77–88 (2019). https://doi.org/10.1016/j.tcs.2018.12.026
- [18] Shevrin, Lev N.: On the theory of epigroups. I. Russian Academy of Sciences. Sbornik. Mathematics 82:2, 485–512 (1995). https://doi.org/10.1070/SM1995v082n02ABEH003577
- [19] Volkov, Mikhail V.: Synchronization of finite automata. Russian Mathematical Surveys 77:5, 819–891 (2022). https://doi.org/10.4213/rm10005e
- [20] Zalcstein, Yechezkel: Locally testable languages. Journal of Computer and System Sciences 6, 151–167 (1972). https://doi.org/10.1016/S0022-0000(72)80020-5