Büchi automaton

From HandWiki
A Büchi automaton
A Büchi automaton with two states, [math]\displaystyle{ q_0 }[/math] and [math]\displaystyle{ q_1 }[/math], the former of which is the start state and the latter of which is accepting. Its inputs are infinite words over the symbols [math]\displaystyle{ \{a,b\} }[/math]. As an example, it accepts the infinite word [math]\displaystyle{ (ab)^\omega }[/math], where [math]\displaystyle{ x^\omega }[/math] denotes the infinite repetition of a string. It rejects the infinite word [math]\displaystyle{ aaab^\omega }[/math].

In computer science and automata theory, a deterministic Büchi automaton is a theoretical machine which either accepts or rejects infinite inputs. Such a machine has a set of states and a transition function, which determines which state the machine should move to from its current state when it reads the next input character. Some states are accepting states and one state is the start state. The machine accepts an input if and only if it will pass through an accepting state infinitely many times as it reads the input.

A non-deterministic Büchi automaton, later referred to just as a Büchi automaton, has a transition function which may have multiple outputs, leading to many possible paths for the same input; it accepts an infinite input if and only if some possible path is accepting. Deterministic and non-deterministic Büchi automata generalize deterministic finite automata and nondeterministic finite automata to infinite inputs. Each are types of ω-automata. Büchi automata recognize the ω-regular languages, the infinite word version of regular languages. They are named after the Swiss mathematician Julius Richard Büchi, who invented them in 1962.[1]

Büchi automata are often used in model checking as an automata-theoretic version of a formula in linear temporal logic.

Formal definition

Formally, a deterministic Büchi automaton is a tuple A = (Q,Σ,δ,q0,F) that consists of the following components:

  • Q is a finite set. The elements of Q are called the states of A.
  • Σ is a finite set called the alphabet of A.
  • δ: Q × Σ → Q is a function, called the transition function of A.
  • q0 is an element of Q, called the initial state of A.
  • FQ is the acceptance condition. A accepts exactly those runs in which at least one of the infinitely often occurring states is in F.

In a (non-deterministic) Büchi automaton, the transition function δ is replaced with a transition relation Δ that returns a set of states, and the single initial state q0 is replaced by a set I of initial states. Generally, the term Büchi automaton without qualifier refers to non-deterministic Büchi automata.

For more comprehensive formalism see also ω-automaton.

Closure properties

The set of Büchi automata is closed under the following operations.

Let [math]\displaystyle{ \scriptstyle A=(Q_A,\Sigma,\Delta_A,I_A,{F}_A) }[/math] and [math]\displaystyle{ \scriptstyle B=(Q_B,\Sigma,\Delta_B,I_B,{F}_B) }[/math] be Büchi automata and [math]\displaystyle{ \scriptstyle C=(Q_C,\Sigma,\Delta_C,I_C,{F}_C) }[/math] be a finite automaton.

  • Union: There is a Büchi automaton that recognizes the language [math]\displaystyle{ \scriptstyle L(A)\cup L(B). }[/math]
Proof: If we assume, w.l.o.g., [math]\displaystyle{ \scriptstyle Q_A\cap Q_B }[/math] is empty then [math]\displaystyle{ \scriptstyle L(A)\cup L(B) }[/math] is recognized by the Büchi automaton [math]\displaystyle{ \scriptstyle (Q_A\cup Q_B, \Sigma, \Delta_A\cup \Delta_B, I_A\cup I_B, {F}_A\cup {F}_B). }[/math]
  • Intersection: There is a Büchi automaton that recognizes the language [math]\displaystyle{ \scriptstyle L(A)\cap L(B). }[/math]
Proof: The Büchi automaton [math]\displaystyle{ \scriptstyle A'=(Q',\Sigma,\Delta',I',F') }[/math] recognizes [math]\displaystyle{ \scriptstyle L(A)\cap L(B), }[/math] where
  • [math]\displaystyle{ \scriptstyle Q' = Q_A \times Q_B \times \{1,2\} }[/math]
  • [math]\displaystyle{ \scriptstyle \Delta' = \Delta_1 \cup \Delta_2 }[/math]
    • [math]\displaystyle{ \scriptstyle \Delta_1 = \{( (q_A,q_B,1), a, (q'_A,q'_B,i) ) | (q_A,a,q'_A)\in \Delta_A\text{ and }(q_B,a,q'_B)\in \Delta_B\text{ and if }q_A\in F_A\text{ then }i=2\text{ else }i=1 \} }[/math]
    • [math]\displaystyle{ \scriptstyle \Delta_2 = \{( (q_A,q_B,2), a, (q'_A,q'_B,i) ) | (q_A,a,q'_A)\in \Delta_A\text{ and }(q_B,a,q'_B)\in \Delta_B\text{ and if }q_B\in F_B\text{ then }i=1\text{ else }i=2 \} }[/math]
  • [math]\displaystyle{ \scriptstyle I' = I_A \times I_B \times \{1\} }[/math]
  • [math]\displaystyle{ \scriptstyle F' = \{ (q_A,q_B,2) | q_B\in F_B \} }[/math]
By construction, [math]\displaystyle{ \scriptstyle r'=(q_A^0,q_B^0,i^0),(q_A^1,q_B^1,i^1),\dots }[/math] is a run of automaton A' on input word w if [math]\displaystyle{ \scriptstyle r_A=q_A^0,q_A^1,\dots }[/math] is run of A on w and [math]\displaystyle{ \scriptstyle r_B=q_B^0,q_B^1,\dots }[/math] is run of B on w. [math]\displaystyle{ \scriptstyle r_A }[/math] is accepting and [math]\displaystyle{ \scriptstyle r_B }[/math] is accepting if r' is concatenation of an infinite series of finite segments of 1-states (states with third component 1) and 2-states (states with third component 2) alternatively. There is such a series of segments of r' if r' is accepted by A'.
  • Concatenation: There is a Büchi automaton that recognizes the language [math]\displaystyle{ \scriptstyle L(C) \cdot L(A). }[/math]
Proof: If we assume, w.l.o.g., [math]\displaystyle{ \scriptstyle Q_C\cap Q_A }[/math] is empty then the Büchi automaton [math]\displaystyle{ \scriptstyle A'=(Q_C\cup Q_A,\Sigma,\Delta',I',F_A) }[/math] recognizes [math]\displaystyle{ \scriptstyle L(C)\cdot L(A) }[/math], where
  • [math]\displaystyle{ \scriptstyle \Delta' = \Delta_A \cup \Delta_C \cup \{ (q,a,q') | q'\in I_A\text{ and }\exists f\in F_C. (q,a,f)\in \Delta_C \} }[/math]
  • [math]\displaystyle{ \scriptstyle \text{ if }I_C\cap F_C\text{ is empty then }I' = I_C\text{ otherwise }I' = I_C \cup I_A }[/math]
  • ω-closure: If [math]\displaystyle{ \scriptstyle L(C) }[/math] does not contain the empty word then there is a Büchi automaton that recognizes the language [math]\displaystyle{ \scriptstyle L(C)^\omega. }[/math]
Proof: The Büchi automaton that recognizes [math]\displaystyle{ \scriptstyle L(C)^\omega }[/math] is constructed in two stages. First, we construct a finite automaton A' such that A' also recognizes [math]\displaystyle{ \scriptstyle L(C) }[/math] but there are no incoming transitions to initial states of A'. So, [math]\displaystyle{ \scriptstyle A'=(Q_C \cup \{q_\text{new}\},\Sigma,\Delta',\{q_\text{new}\},F_C), }[/math] where [math]\displaystyle{ \scriptstyle \Delta' = \Delta_C \cup \{ (q_\text{new},a,q') | \exists q\in I_C. (q,a,q')\in \Delta_C\}. }[/math] Note that [math]\displaystyle{ \scriptstyle L(C)=L(A') }[/math] because [math]\displaystyle{ \scriptstyle L(C) }[/math] does not contain the empty string. Second, we will construct the Büchi automaton A" that recognize [math]\displaystyle{ \scriptstyle L(C)^\omega }[/math] by adding a loop back to the initial state of A'. So, [math]\displaystyle{ \scriptstyle A''=(Q_C \cup \{q_\text{new}\},\Sigma,\Delta'',\{q_\text{new}\},\{q_\text{new}\}) }[/math], where [math]\displaystyle{ \scriptstyle \Delta'' = \Delta' \cup \{ (q,a,q_\text{new}) | \exists q'\in F_C. (q,a,q')\in \Delta'\}. }[/math]
  • Complementation:There is a Büchi automaton that recognizes the language [math]\displaystyle{ \scriptstyle \Sigma^\omega/L(A). }[/math]
Proof: The proof is presented here.

Recognizable languages

Büchi automata recognize the ω-regular languages. Using the definition of ω-regular language and the above closure properties of Büchi automata, it can be easily shown that a Büchi automaton can be constructed such that it recognizes any given ω-regular language. For converse, see construction of a ω-regular language for a Büchi automaton.

Deterministic versus non-deterministic Büchi automata

A non-deterministic Büchi automaton that recognizes [math]\displaystyle{ (0\cup 1)^* 0^\omega }[/math]

The class of deterministic Büchi automata does not suffice to encompass all omega-regular languages. In particular, there is no deterministic Büchi automaton that recognizes the language [math]\displaystyle{ (0\cup 1)^* 0^\omega }[/math], which contains exactly words in which 1 occurs only finitely many times. We can demonstrate it by contradiction that no such deterministic Büchi automaton exists. Let us suppose A is a deterministic Büchi automaton that recognizes [math]\displaystyle{ (0\cup 1)^* 0^\omega }[/math] with final state set F. A accepts [math]\displaystyle{ 0^\omega }[/math]. So, A will visit some state in F after reading some finite prefix of [math]\displaystyle{ 0^\omega }[/math], say after the [math]\displaystyle{ i_{0} }[/math]th letter. A also accepts the ω-word [math]\displaystyle{ 0^{i_{0}}10^\omega. }[/math] Therefore, for some [math]\displaystyle{ i_{1} }[/math], after the prefix [math]\displaystyle{ 0^{i_{0}}10^{i_{1}} }[/math] the automaton will visit some state in F. Continuing with this construction the ω-word [math]\displaystyle{ 0^{i_{0}}10^{i_{1}}10^{i_{2}}\dots }[/math] is generated which causes A to visit some state in F infinitely often and the word is not in [math]\displaystyle{ (0\cup 1)^* 0^\omega. }[/math] Contradiction.

The class of languages recognizable by deterministic Büchi automata is characterized by the following lemma.

Lemma: An ω-language is recognizable by a deterministic Büchi automaton if it is the limit language of some regular language.
Proof: Any deterministic Büchi automaton A can be viewed as a deterministic finite automaton A' and vice versa, since both types of automaton are defined as 5-tuple of the same components, only the interpretation of acceptance condition is different. We will show that [math]\displaystyle{ L(A) }[/math] is the limit language of [math]\displaystyle{ L(A') }[/math]. An ω-word is accepted by A if it will force A to visit final states infinitely often. Thus, infinitely many finite prefixes of this ω-word will be accepted by A'. Hence, [math]\displaystyle{ L(A) }[/math] is a limit language of [math]\displaystyle{ L(A') }[/math].

Algorithms

Model checking of finite state systems can often be translated into various operations on Büchi automata. In addition to the closure operations presented above, the following are some useful operations for the applications of Büchi automata.

Determinization

Since deterministic Büchi automata are strictly less expressive than non-deterministic automata, there can not be an algorithm for determinization of Büchi automata. But, McNaughton's Theorem and Safra's construction provide algorithms that can translate a Büchi automaton into a deterministic Muller automaton or deterministic Rabin automaton.[2]

Emptiness checking

The language recognized by a Büchi automaton is non-empty if and only if there is a final state that is both reachable from the initial state, and lies on a cycle.

An effective algorithm that can check emptiness of a Büchi automaton:

  1. Consider the automaton as a directed graph and decompose it into strongly connected components (SCCs).
  2. Run a search (e.g., the depth-first search) to find which SCCs are reachable from the initial state.
  3. Check whether there is a non-trivial SCC that is reachable and contains a final state.

Each of the steps of this algorithm can be done in time linear in the automaton size, hence the algorithm is clearly optimal.

Minimization

Minimizing deterministic Büchi automata (i.e., given a deterministic Büchi automaton, finding a deterministic Büchi automaton recognizing the same language with a minimal number of states) is an NP-complete problem.[3] This is in contrast to DFA minimization, which can be done in polynomial time.

Variants

Transforming from other models of description to non-deterministic Büchi automata

From generalized Büchi automata (GBA)

Multiple sets of states in acceptance condition can be translated into one set of states by an automata construction, which is known as "counting construction". Let's say A = (Q,Σ,∆,q0,{F1,...,Fn}) is a GBA, where F1,...,Fn are sets of accepting states then the equivalent Büchi automaton is A' = (Q', Σ, ∆',q'0,F'), where
  • Q' = Q × {1,...,n}
  • q'0 = ( q0,1 )
  • ∆' = { ( (q,i), a, (q',j) ) | (q,a,q') ∈ ∆ and if q ∈ Fi then j=((i+1) mod n) else j=i }
  • F'=F1× {1}

From Linear temporal logic formula

A translation from a Linear temporal logic formula to a generalized Büchi automaton is given here. And, a translation from a generalized Büchi automaton to a Büchi automaton is presented above.

From Muller automata

A given Muller automaton can be transformed into an equivalent Büchi automaton with the following automata construction. Let's suppose A = (Q,Σ,∆,Q0,{F0,...,Fn}) is a Muller automaton, where F0,...,Fn are sets of accepting states. An equivalent Büchi automaton is A' = (Q', Σ, ∆',Q0,F'), where
  • Q' = Q ∪  ni=0 {i} × Fi × 2Fi
  • ∆'= ∆ ∪ ∆1 ∪ ∆2, where
    • 1 ={ ( q, a, (i,q',∅) ) | (q, a, q') ∈ ∆ and q' ∈ Fi }
    • 2={ ( (i,q,R), a, (i,q',R') ) | (q,a,q')∈∆ and q,q' ∈ Fi and if R=Fi then R'= ∅ otherwise R'=R∪{q} }
  • F'=ni=0 {i} × Fi × {Fi}
A' keeps original set of states from A and adds extra states on them. The Büchi automaton A' simulates the Muller automaton A as follows: At the beginning of the input word, the execution of A' follows the execution of A, since initial states are same and ∆' contains ∆. At some non-deterministically chosen position in the input word, A' decides of jump into newly added states via a transition in ∆1. Then, the transitions in ∆2 try to visit all the states of Fi and keep growing R. Once R becomes equal to Fi then it is reset to the empty set and ∆2 try to visit all the states of Fi states again and again. So, if the states R=Fi are visited infinitely often then A' accepts corresponding input and so does A. This construction closely follows the first part of the proof of McNaughton's Theorem.

From Kripke structures

Let the given Kripke structure be defined by M = ⟨Q, I, R, L, AP where Q is the set of states, I is the set of initial states, R is a relation between two states also interpreted as an edge, L is the label for the state and AP are the set of atomic propositions that form L.
The Büchi automaton will have the following characteristics:
[math]\displaystyle{ Q_\text{final} = Q \cup \{ \text{init} \} }[/math]
[math]\displaystyle{ \Sigma = 2^{AP} }[/math]
[math]\displaystyle{ I =\{ \text{init} \} }[/math]
[math]\displaystyle{ F = Q \cup \{ \text{init} \} }[/math]
[math]\displaystyle{ \delta = q \overrightarrow{a} p }[/math] if (q, p) belongs to R and L(p) = a
and init [math]\displaystyle{ \overrightarrow{a} }[/math] q if q belongs to I and L(q) = a.
Note however that there is a difference in the interpretation between Kripke structures and Büchi automata. While the former explicitly names every state variable's polarity for every state, the latter just declares the current set of variables holding or not holding true. It says absolutely nothing about the other variables that could be present in the model.

References

  1. Büchi, J.R. (1962). "On a Decision Method in Restricted Second Order Arithmetic". The Collected Works of J. Richard Büchi. Stanford: Stanford University Press. 425–435. doi:10.1007/978-1-4613-8928-6_23. ISBN 978-1-4613-8930-9. 
  2. "On the complexity of ω-automata", Proceedings of the 29th Annual Symposium on Foundations of Computer Science (FOCS '88), Washington DC, US: IEEE Computer Society, 1988, pp. 319–327, doi:10.1109/SFCS.1988.21948 .
  3. Schewe, Sven (2010). "Minimisation of Deterministic Parity and Büchi Automata and Relative Minimisation of Deterministic Finite Automata". arXiv:1007.1333 [cs.FL].

External links