ACME: Automata with Counters, Monoids and Equivalence
نویسندگان
چکیده
We present ACME, a tool implementing algebraic techniques to solve decision problems from automata theory. The core generic algorithm takes as input an automaton and computes its stabilization monoid, which is a generalization of its transition monoid. Using the stabilization monoid, one can solve many problems: determine whether a B-automaton (which is a special kind of automata with counters) is limited, whether two B-automata are equivalent, and whether a probabilistic leaktight automaton has value 1. The dedicated webpage where the tool ACME can be downloaded is http://www.liafa.univ-paris-diderot.fr/~nath/acme.htm . 1 Stabilization Monoids for Band Probabilistic Automata The notion of stabilization monoids appears in two distinct contexts. It has first been developed in the theory of regular cost functions, introduced by Colcombet [Col09,Col13]. The underlying ideas have then been transferred to the setting of probabilistic automata [FGO12]. 1.1 Stabilization Monoids in the Theory of Regular Cost Functions At the heart of the theory of regular cost functions lies the equivalence between different formalisms: a logical formalism, cost MSO, two automata model, Band S-automata, and an algebraic counterpart, stabilization monoids. Here we briefly describe the model ofB-automata, and their transformations to stabilization monoid. This automaton model generalizes the non-deterministic automata by adding a finite set of counters. Instead of accepting or rejecting a word as a non-deterministic automaton does, a B-automaton associates an ? The research leading to these results has received funding from the French ANR project 2010 BLAN 0202 02 FREC, the European Union’s Seventh Framework Programme (FP7/20072013) under grant agreement 259454 (GALE) and 239850 (SOSNA). integer value to each input word. Formally, a B-automaton is a tuple A = 〈A,Q, Γ, I, F,∆〉, where A is a finite alphabet, Q is a finite set of states, Γ is a finite set of counters, I ⊆ Q is the set of initial states, F ⊆ Q is the set of final states, and ∆ ⊆ Q×A× {ic, ε, r}Γ ×Q is the set of transitions. A transition (p, a, τ, q) allows the automaton to go from state p to state q while reading letter a and performing action τ(γ) on counter γ. Action ic increments the current counter value by 1, ε leaves the counter unchanged, and r resets the counter to 0. The value of a run is the maximal value assumed by any of the counters during the run. The semantics of a B-automaton A is defined on a word w by [[A]](w) = inf{val(ρ) | ρ is a run of A on w}. In other words, the automaton uses the non determinism to minimize the value among all runs. In particular, if A has no run on w, then [[A]](w) =∞. The main decision problem in the theory of regular cost functions is the limitedness problem. We say that a B-automaton A is limited if there exists N such that for all words w, if [[A]](w) <∞, then [[A]](w) < N . One way to solve the limitedness problem is by computing the stabilization monoid. It is a monoid of matrices over the semiring of counter actions {ic, ε, r, ω}Γ . There are two operations on matrices: a binary composition called product, giving the monoid structure, and a unary operation called stabilization. The stabilization monoid of a B-automaton is the set of matrices containing the matrices corresponding to each letter, and closed under the two operations, product and stabilization. As shown in [Col09,Col13], the stabilization monoid of a B-automaton A contains an unlimited witness if and only if it is not limited, implying a conceptually simple solution to the limitedness problem: compute the stabilization monoid and check for the existence of unlimited witnesses. 1.2 Stabilization Monoids for Probabilistic Automata The notion of stabilization monoids also appeared for probabilistic automata, for the Markov Monoid Algorithm. This algorithm was introduced in [FGO12] to partially solves the value 1 problem: given a probabilistic automaton A, does there exist (un)n∈N a sequence of words such that limn PA(un) = 1? Although the value 1 problem is undecidable, it has been shown that the Markov Monoid Algorithm correctly determines whether a probabilistic automaton has value 1 under the leaktight restriction. It has been recently shown that all classes of probabilistic automata for which the value 1 problem has been shown decidable are included in the class of leaktight automata [FGKO14], hence the Markov Monoid Algorithm is the most correct algorithm known to (partially) solve the value 1 problem. As for the case of B-automata, the stabilization monoid of a probabilistic automaton is the set of matrices containing the matrices corresponding to each letter, and closed under the two operations, product and stabilization. Note that the main point is that both the products and the stabilizations depend on which type of automata is considered, B-automata or probabilistic automata. 2 Computing the Stabilization Monoid of an Automaton We report here on some implementation issues regarding the following algorithmic task: We are given as input: – A finite set of matrices S, – A binary associative operation on matrices, the product, denoted ·, – A unary operation on matrices, the stabilization, denoted ]. The aim is to compute the closure of S under product and stabilization, called the stabilization monoid generated by S. Our choice of OCaml allowed for a generic implementation of the algorithm. Note that if we ignore the stabilization operation, this reduces to computing the monoid generated by a finite set of matrices, i.e. the transition monoid of a non-deterministic automaton. It is well-known that this monoid can be exponential in the size of the automaton, so the crucial aspect here is space optimization. In our application, the initial set of matrices is given by matricesMa for a ∈ A, whereA is the finite alphabet of the automaton. Hence we naturally associate to every element of the stabilization monoid a ]-expression: (Ma ·M ] b ·Ma) ] is associated to (ab]a)]. Many ]-expressions actually correspond to the same matrix: for instance, it may be that (Ma ·Ma ·Mb) = M ] a; in such case, we would like to associate this matrix to the ]-expression a], which is “simpler” than (aab)]. There are two data structures: a table and a queue. The table is of fixed size (a large prime number), and is used to keep track of all the matrices found so far, through their hash value. The queue stores the elements to be treated. The pseudo-code of the algorithm is presented in Algorithm 1. Data: S = {Ma | a ∈ A} Result: The stabilization monoid generated by S Initialization: an empty table T and an empty queue Q; for a ∈ A do push (a,Ma) onto Q for every a ∈ A; add Ma to T ; end while Q is not empty do let (s,M) the first element in Q; search M in T (through its hash value); if M is not in T (new) then add M to T ; for N ∈ T do push M ·N onto Q; push N ·M onto Q; end push M ] onto Q; end end Algorithm 1: Computing the stabilization monoid 3 Minimizing the Stabilization Monoid To test whether two B-automata are equivalent, we follow [CKL10]: for both automata we construct its stabilization monoid, then we minimize them and check whether the minimal stabilization monoids are isomorphic. We do not explain in details how to check whether two stabilization monoids are isomorphic. This is in general a very hard problem, theoretically not well understood; for instance there is no polynomial-time algorithm to check whether two groups are isomorphic. Our setting here makes the task much easier, as we look for an isomorphism extending two given morphisms (associating to each letter an element), leading to a simple linear-time algorithm. Let M be a stabilization monoid, whose elements are denoted m1, · · · ,mn, and an ideal I ⊆ M . The algorithm constructs an increasing sequence of partitions, starting from the partition that separates I from M \ I . Consider a partition P of the elements. For an element m ∈ M , we denote by [m]P its equivalence class with respect to P . The type of m with respect to P is the following vector of equivalence classes: ([m]P , [m ]P , [m ·m1]P , · · · , [m ·mn]P , [m1 ·m]P , · · · , [mn ·m]P ) . Note that the second component uses the ω] operator, defined using the ] operator. Relying on the ] operator would not be correct, as it is partial (only defined for idempotent elements). Using the types, we construct a larger partition P ′, such that two elements are equivalent for P ′ if they have the same type with respect to P . There are three data structures: two union-find tables to handle partitions of the elements and a table of types. We present in Algorithm 2 a pseudo-code of the minimization algorithm. Data: A stabilization monoid (M, ·, ]), an ideal I ⊆M Result: The minimal stabilization monoid with respect to (M, I) Initialization: a partition P separating I and M \ I and an empty table T of types; while unstable do Compute the types (with respect to P ) in T ; Create a new partition P ′ such that two elements are equivalent for P ′ if they have the same types; P ←− P ′; end Algorithm 2: Minimizing the stabilization monoid
منابع مشابه
The Emptiness Problem for Valence Automata over Graph Monoids
This work studies which storage mechanisms in automata permit decidability of the emptiness problem. The question is formalized using valence automata, an abstract model of automata in which the storage mechanism is given by a monoid. For each of a variety of storage mechanisms, one can choose a (typically infinite) monoid $M$ such that valence automata over $M$ are equivalent to (one-way) auto...
متن کاملSilent Transitions in Automata with Storage
We consider the computational power of silent transitions in one-way automata with storage. Specifically, we ask which storage mechanisms admit a transformation of a given automaton into one that accepts the same language and reads at least one input symbol in each step. We study this question using the model of valence automata. Here, a finite automaton is equipped with a storage mechanism tha...
متن کاملStamina: Stabilisation Monoids in Automata Theory
We present Stamina, a tool solving three algorithmic problems in automata theory. First, compute the star height of a regular language, i.e. the minimal number of nested Kleene stars needed for expressing the language with a complement-free regular expression. Second, decide limitedness for regular cost functions. Third, decide whether a probabilistic leaktight automaton has value 1, i.e. wheth...
متن کاملThe Equivalence Problem of Multitape Finite Automata
Using a result of B.H. Neumann we extend Eilenberg’s Equality Theorem to a general result which implies that the multiplicity equivalence problem of two (nondeterministic) multitape finite automata is decidable. As a corollary we solve a long standing open problem in automata theory, namely, the equivalence problem for multitape deterministic finite automata. The main theorem states that there ...
متن کاملMonoids as Storage Mechanisms
Automata theory has given rise to a variety of automata models that consist of a finite-state control and an infinite-state storage mechanism. The aim of this work is to provide insights into how the structure of the storage mechanism influences the expressiveness and the analyzability of the resulting model. To this end, it presents generalizations of results about individual storage mechanism...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014