Büchi Automata and Their Determinization Edinburgh, October 215
Plan of the Day 1. Büchi automata and their determinization 2. Infinite games 3. Rabin s Tree Theorem 4. Decidability of monadic theories
Plan of the Lecture 1. Preparations on MSO-logic 2. MSO-logic over finite words 3. Büchi automata and their complementation 4. Determinization
MSO-Logic
MSO-Logic over (N, +1, ) We have first-order variables x, y, z,... ranging over natural numbers set variables X, Y, Z,... ranging over sets of natural numbers terms formed from first-order variables and by application of +1 atomic formulas s = t and X(t) for terms s, t and set variables X connectives,,,, and quantifiers,
Transitive Closure Consider a formula ψ(z, z ) Write ψ (x, y) for: each set containing x and closed under the relation defined by ψ(z, z ) contains also y there is a path of ψ(z, z )-steps from x to y Let doubsucc(z, z ) be the formula z+1+1 = z Then we write Even(y) for doubsucc (, y) Similarly with succ(z, z ) := z+1 = z : x < y definable as succ (x+1, y)
Example Each set with two successive elements contains an even number X( x(x(x) X(x+1)) y(x(y) Even(y)))
First Step: MSO over Finite Words
Words coded by Sets Consider w = ( 1 )( )( )(1 1 )(1 ) Domain of letter positions: D = {, 1, 2, 3, 4} For an infinite word this domain is N. w is identified with a pair of sets: K 1 = {3, 4}, K 2 = {, 3} A word over {, 1} n with domain D can be identified with an n-tuple (K 1,..., K n ) of subsets of D.
A Definable Language Consider the regular language L over {, 1} 2 containing the words where between any two letters ( 1 ) there is a letter ( ) w = ( 1 )( )( )(1 1 )(1 ) satsfies this. ϕ(x 1, X 2 ) = x y(x < y X 2 (x) X 2 (y) z (x < z z < y X 1 (z)))
BET Theorem J.R. Büchi C.C. Elgot B.A. Trakhtenbrot Theorem of Büchi-Elgot-Trakhtenbrot (196): Finite automata and monadic second-order fomulas can express the same properties of finite words.
From Automata to MSO-Logic A : 1 q q 1 1 q 2 We look for an MSO-formula ϕ equivalent to A It should express over w that A accepts w.
q q 1 q 2 1 1 An input word and an accepting run: 1 1 1 1 1 1 1 1
1 q q 1 1 q 2 ϕ(x) := Y Y 1 Y 2 (Partition(Y, Y 1, Y 2 ) Y (min) x((y (x) X(x) Y 1 (x+1)) (Y 1 (x) X(x) Y (x+1)) (Y 1 (x) X(x) Y 2 (x+1)) (Y 2 (x) X(x) Y 2 (x+1))) (Y 1 (max) Y 2 (max)) X(max))
Preparing MSO for Easy Induction Work with a dialect of MSO in which the first-order variables are cancelled. Simulate x by a singleton variable {x}. Atomic formulas: X Y, Sing(X), Succ(X, Y), X < Y. Example ϕ(x 1, X 2 ) = x y(x < y X 2 (x) X 2 (y) z X 1 (z)) ϕ (X 1, X 2 ) = X Y(X < Y X X 2 Y X 2 (y) Z(Sing(Z) Z X 1 )) Task: Find for any ϕ(x 1,..., X n ) a corresponding automaton over {, 1} n.
From MSO to Automata (Finite Words) Proceed by induction on formulas. Example: Succ(X 1, X 2 ) ( ) ( ) ( 1 q ) q ( 1 ) 1 q 2 Use nondeterministic automata: Then atomic formulas,, are easy. For complementation use the subset construction to obtain a deterministic automaton which is easily complementable.
Büchi Automata and Their Complementation
Definition A Büchi automaton (NBA) has the form A = (Q, Σ, q,, F) with finite state-set Q, initial state q, set F Q of final states, transition relation Q Σ Q A accepts the input word α Σ ω if there is a run of A on α such that ω i (i) F. L(A) := {α Σ ω A accepts α} is the ω-language recognized by A. L is called Büchi recognizable if L = L(A) for some Büchi automaton A.
Periodicity Given A = (Q, Σ, q,, F) define W pq = {w Σ A : p w q} Then L(A) = q F W q q (W q,q ) ω An ω-language is Büchi recognizable iff it is a finite union of ω-languages U V ω with regular U, V Σ Consequence: A nonempty Büchi-recognizable ω-language contains an ultimately periodic ω-word.
Büchi s Theorem An ω-language is MSO-definable iff it is Büchi recognizable From automata to MSO: as over finite words. From MSO to automata: Proceed again by induction. Only complementation is difficult.
Complementation
Büchi-Equivalence Idea: Represent also the complement-ω-language as a finite union of sets U V ω with regular U, V. As U, V use equivalence classes of an equivalence relation: u A v : A : p u q A : p v q and A : p u q via F This is an equivalence relation. A : p v q via F The A -class of u is captured by two lists of edges (p, q): those (p, q) with A : p u q those (p, q) with A : p u q via F A is of finite index, and each A -class is regular.
A Crucial Property Assume U V ω L(A) O, where U, V are A -classes. Then U V ω L(A). By assumption we have: u v A : q 1 v p1 2 v 3 p2 p3... with u U, vi V where via infinitely many v i a final state is passed. Consider β = u v 1 v 2 v 3... in U V ω with u U, v i V. Apply u A u and v i A v i : A : q u p 1 v 1 p 2 v 2 p 3 v 3... where via infinitely many v i a final state is passed.
Last Missing Step We want to show (with A -classes U, V): L(A) = {U V ω U V ω L(A) = O} Missing step: Show that each α belongs to some U V ω where U, V are A -classes. Ramsey s Theorem: Given a coloring of all pairs i < j of natural numbers, there is an infinite homogeneous set H N and a fixed color c such that each pair i < j with i, j H is colored with c. Take as color for (i, j) the A -class of α[i, j)
Consequences 1. The MSO-theory of (N, +1, ) is decidable. Proof: Transform a sentence ϕ into a Büchi automaton over {, 1} (i.e. with unlabelled transitions) and check whether there is a reachable q F with a loop back to q. 2. MSO-formulas over (N, +1, ) can be rewritten as EMSO-formulas. 3. Model checking: Check whether for each path of a transition system S a formula ϕ holds. Check whether the intersection automaton of S and A ϕ accepts some ω-word.
Determinization
Deterministic Büchi Automata (DBA) are of the form A = (Q, Σ, q, δ, F) with δ : Q Σ Q A accepts α if its unique run on α visits F infinitely often. This means: The DFA A accepts infinitely many prefixes of α Let ϕ(x 1,..., X n ) be a formula equivalent to the DFA A Modify ϕ(x 1,..., X n ) to a formula ϕ (X 1,..., X n, y) saying the segment up to position y satisfies ϕ Then the DBA A is equivalent to the formula x y (x < y ϕ (X 1,..., X n, y)) where ϕ is bounded in y. So: DBA-recognizable ω-languages are Π 2-sets of the Borel hierarchy (as opposed to Σ 1 1 sets for NBA).
Weakness of DBA Consider the ω-language (+1) ω, recognized by an NBA:, 1 q q 1 Assume the DBA A recognizes (+1) ω. Reading ω it will reach a final state after n Reading n 1 ω it will reach a final state after n 1 n 1 etc. So on n 1 n 11 n 21... A will visit final states infinitely often, contradiction.
Muller Automata are a form of ω-automata that recognize the Boolean combinations of DBA-recognizable sets. Format: A = (Q, Σ, q, δ,f) with δ : Q Σ Q, F = {F 1,..., F k } where F i Q Acceptance: A accepts α iff for the unique run we have k ( i=1 q F i ω m (m) = q q Q\F i ω m (m) = q) Write A q for the det. Büchi automaton (Q, Σ, q, δ,{q}). k L(A) = ( L(A q ) L(A q )) i=1 q F i q Q\F i
McNaughton s Theorem R. McNaughton (1924-214) Each Büchi automaton an be transformed into a (deterministic) Muller automaton.
Constructions of Automata Muller (1963), with a flaw McNaughton (1966) Choueka (1974) Th., using logic (1981) Safra (1988) with optimal growth rate 2 O(n log n) for number of states presented here Muller and Schupp (1995) Fogharty, Kähler, Vardi, Wilke (213) and others...
Safra Trees The desired Muller automaton has states that are Safra trees. A Safra tree is a finite ordered tree of macrostates, possibly some of them ticked, where the children of a node are disjoint and their union a proper subset of the parent. There are only finitely many such trees. These are the states of the desired Muller automaton M.
Transitions of M From a Safra tree s via letter a the following Safra tree results: 1. For each node whose label contains final states, branch off a new son containing these final states. 2. To each node label apply the subset construction via input letter a. 3. Cancel state q if it occurs also in an older brother node. Cancel a node if it has label O 4. Cancel all children (and their descendants) if the union of their labels equals the parent label, and in this case tick the parent.
Acceptance A run s s 1 s 2... is accepting if from some s i onwards some node stays uncancelled in s i s i+1 s i+2... and is ticked infinitely often. Then by construction we have L(M) L(B). This is a Boolean combination of Büchi conditions on the run s s 1 s 2...: For some node name k: there are only finitely many s i where k is missing. there are infinitely many s i where the label of k is ticked.