# Büchi automaton

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 automaton 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[edit]

Formally, a **deterministic Büchi automaton** is a tuple *A* = (*Q*,Σ,δ,*q*_{0},**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*. *q*_{0}is an element of*Q*, called the*initial state*of*A*.**F**⊆*Q*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 *q*_{0} 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[edit]

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

Let A=(*Q*_{A},Σ,Δ_{A},*I*_{A},*F*_{A}) and B=(*Q*_{B},Σ,Δ_{B},*I*_{B},*F*_{B}) be Büchi automata and C=(*Q*_{C},Σ,Δ_{C},*I*_{C},*F*_{C}) be a finite automaton.

**Union**:*There is a Büchi automaton that recognizes the language L(A)∪L(B).*

**Proof:**If we assume,*w.l.o.g.*,*Q*_{A}∩*Q*_{B}is empty then L(A)∪L(B) is recognized by the Büchi automaton (*Q*_{A}∪*Q*_{B}, Σ, Δ_{A}∪Δ_{B},*I*_{A}∪*I*_{B},*F*_{A}∪*F*_{B}).

**Intersection**:*There is a Büchi automaton that recognizes the language L(A)∩L(B).*

**Proof:**The Büchi automaton A'=(Q',Σ,Δ',I',F') recognizes L(A)∩L(B), where- Q' =
*Q*_{A}×*Q*_{B}× {1,2} - Δ' = Δ
_{1}∪ Δ_{2}- Δ
_{1}= {( (q_{A},q_{B},1), a, (q'_{A},q'_{B},i) ) | (q_{A},a,q'_{A})∈Δ_{A}and (q_{B},a,q'_{B})∈Δ_{B}and if q_{A}∈F_{A}then i=2 else i=1 } - Δ
_{2}= {( (q_{A},q_{B},2), a, (q'_{A},q'_{B},i) ) | (q_{A},a,q'_{A})∈Δ_{A}and (q_{B},a,q'_{B})∈Δ_{B}and if q_{B}∈F_{B}then i=1 else i=2 }

- Δ
- I' = I
_{A}× I_{B}× {1} - F' = { (q
_{A},q_{B},2) | q_{B}∈F_{B}}

- Q' =
- By construction, r'=(q
_{A}^{0},q_{B}^{0},i^{0}),(q_{A}^{1},q_{B}^{1},i^{1}),... is a run of automaton A' on input word*w*if r_{A}=q_{A}^{0},q_{A}^{1},... is run of A on*w*and r_{B}=q_{B}^{0},q_{B}^{1},... is run of B on*w*. r_{A}is accepting and r_{B}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 L(C)⋅L(A).*

**Proof:**If we assume,*w.l.o.g.*,*Q*_{C}∩*Q*_{A}is empty then the Büchi automaton A'=(Q_{C}∪Q_{A},Σ,Δ',I',F_{A}) recognizes L(C)⋅L(A), where- Δ' = Δ
_{A}∪ Δ_{C}∪ { (q,a,q') | q'∈I_{A}and ∃f∈F_{C}. (q,a,f)∈Δ_{C}} - if I
_{C}∩F_{C}is empty then I' = I_{C}otherwise I' = I_{C}∪ I_{A}

- Δ' = Δ

**ω-closure**:*If L(C) does not contain the empty word then there is a Büchi automaton that recognizes the language L(C)*^{ω}.

**Proof:**The Büchi automaton that recognizes L(C)^{ω}is constructed in two stages. First, we construct a finite automaton A' such that A' also recognizes L(C) but there are no incoming transitions to initial states of A'. So, A'=(Q_{C}∪ {q_{new}},Σ,Δ',{q_{new}},F_{C}), where Δ' = Δ_{C}∪ { (q_{new},a,q') | ∃q∈I_{C}. (q,a,q')∈Δ_{C}}. Note that L(C)=L(A') because L(C) does not contain the empty string. Second, we will construct the Büchi automaton A" that recognize L(C)^{ω}by adding a loop back to the initial state of A'. So, A"=(Q_{C}∪ {q_{new}},Σ,Δ",{q_{new}},{q_{new}}), where Δ" = Δ' ∪ { (q,a,q_{new}) | ∃q'∈F_{C}. (q,a,q')∈Δ'}.

**Complementation**:*There is a Büchi automaton that recognizes the language Σ*^{ω}/L(A).

**Proof:**The proof is presented here.

## Recognizable languages[edit]

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

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 (0∪1)*0^{ω}, 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 (0∪1)*0^{ω} with final state set *F*. *A* accepts 0^{ω}. So, *A* will visit some state in *F* after reading some finite prefix of 0^{ω}, say after the i_{0}th letter. *A* also accepts the ω-word 0^{i0}10^{ω}. Therefore, for some i_{1}, after the prefix 0^{i0}10^{i1} the automaton will visit some state in *F*. Continuing with this construction the ω-word 0^{i0}10^{i1}10^{i2}... is generated which causes A to visit some state in *F* infinitely often and the word is not in (0∪1)*0^{ω}. 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 L(A) is the limit language of L(A'). An ω-word is accepted by A if it will force A to visit final states infinitely often. if, infinitely many finite prefixes of this ω-word will be accepted by A'. Hence, L(A) is a limit language of L(A').

## Algorithms[edit]

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:

- Consider the automaton as a directed graph and decompose it into strongly connected components (SCCs).
- Run a search (e.g., the depth-first search) to find which SCCs are reachable from the initial state.
- 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

This article or section appears to contradict itself. (January 2018) |

The algorithm for minimizing nondeterministic finite automaton also correctly minimizes a Büchi automaton.
The algorithm does not guarantee minimum Büchi automaton^{[clarification needed]}.
However, the algorithms for minimizing deterministic finite automaton does not work for deterministic Büchi automaton.

## Variants[edit]

- Co-Büchi automaton
- Weak Büchi automaton
- Semi-deterministic Büchi automaton
- Generalized Büchi automaton

## Transforming from other models of description to non-deterministic Büchi automata[edit]

- 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,Σ,∆,q_{0},{F_{1},...,F_{n}}) is a GBA, where F_{1},...,F_{n}are sets of accepting states then the equivalent Büchi automaton is*A'*= (Q', Σ, ∆',q'_{0},F'), where- Q' = Q × {1,...,n}
- q'
_{0}= ( q_{0},1 ) - ∆' = { ( (q,i), a, (q',j) ) | (q,a,q') ∈ ∆ and if q ∈ F
_{i}then j=((i+1) mod n) else j=i } - F'=F
_{1}× {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,Σ,∆,Q_{0},{F_{0},...,F_{n}}) is a Muller automaton, where F_{0},...,F_{n}are sets of accepting states. An equivalent Büchi automaton is*A'*= (Q', Σ, ∆',Q_{0},F'), where- Q' = Q ∪ ∪
^{n}_{i=0}{i} × F_{i}× 2^{Fi} - ∆'= ∆ ∪ ∆
_{1}∪ ∆_{2}, where- ∆
_{1}={ ( q, a, (i,q',∅) ) | (q, a, q') ∈ ∆ and q' ∈ F_{i}} - ∆
_{2}={ ( (i,q,R), a, (i,q',R') ) | (q,a,q')∈∆ and q,q' ∈ F_{i}and if R=F_{i}then R'= ∅ otherwise R'=R∪{q} }

- ∆
- F'=∪
^{n}_{i=0}{i} × F_{i}× {F_{i}}

- Q' = Q ∪ ∪
*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*F*and keep growing_{i}*R*. Once*R*becomes equal to*F*then it is reset to the empty set and ∆_{i}_{2}try to visit all the states of*F*states again and again. So, if the states_{i}*R*=*F*are visited infinitely often then_{i}*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:
- if (
*q*,*p*) belongs to*R*and*L*(*p*) =*a*

- and init
*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[edit]

**^**Büchi, J.R. (1962). "On a decision method in restricted second order arithmetic".*Proc. International Congress on Logic, Method, and Philosophy of Science. 1960*. Stanford: Stanford University Press: 425–435. doi:10.1007/978-1-4613-8928-6_23. ISBN 978-1-4613-8930-9.**^**Safra, S. (1988), "On the complexity of ω-automata",*Proceedings of the 29th Annual Symposium on Foundations of Computer Science (FOCS '88)*, Washington DC, US: IEEE Computer Society, pp. 319–327, doi:10.1109/SFCS.1988.21948, S2CID 206559211.

- Bakhadyr Khoussainov; Anil Nerode (6 December 2012).
*Automata Theory and its Applications*. Springer Science & Business Media. ISBN 978-1-4612-0171-7. - Thomas, Wolfgang (1990). "Automata on infinite objects". In Van Leeuwen (ed.).
*Handbook of Theoretical Computer Science*. Elsevier. pp. 133–164.

## External links[edit]

Wikimedia Commons has media related to .Büchi automaton |

- "Finite-state Automata on Infinite Inputs" (PDF). Cite journal requires
`|journal=`

(help) - Vardi, Moshe Y. "An automata-theoretic approach to linear temporal logic". CiteSeerX 10.1.1.125.8126. Cite journal requires
`|journal=`

(help)