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.
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
,
Σ
,
δ
,
q
0
,
F
)
{\textstyle A=(Q,\Sigma ,\delta ,q_{0},\mathbf {F} )}
that consists of the following components:
Q
{\textstyle Q}
is a finite set. The elements of
Q
{\textstyle Q}
are called the states of
A
{\textstyle A}
.
Σ
{\textstyle \Sigma }
is a finite set called the alphabet of
A
{\textstyle A}
.
δ
:
Q
×
Σ
→
Q
{\textstyle \delta \colon Q\times \Sigma \to Q}
is a function, called the transition function of
A
{\textstyle A}
.
q
0
{\textstyle q_{0}}
is an element of
Q
{\textstyle Q}
, called the initial state of
A
{\textstyle A}
.
F
⊆
Q
{\textstyle \mathbf {F} \subseteq Q}
is the acceptance condition.
A run
i
_
=
i
0
i
1
i
2
⋯
∈
Σ
ω
{\displaystyle {\underline {i}}=i_{0}i_{1}i_{2}\cdots \in \Sigma ^{\omega }}
is an infinite string of inputs of
A
{\displaystyle A}
.
By calling
δ
{\displaystyle \delta }
recursively, we can extend it to a function
δ
ω
:
Σ
ω
→
Q
ω
{\displaystyle \delta ^{\omega }:\Sigma ^{\omega }\to Q^{\omega }}
.
A state
q
∈
Q
{\displaystyle q\in Q}
is said to occur infinitely often for a run
i
_
{\displaystyle {\underline {i}}}
when the set
{
n
∈
N
∣
δ
ω
(
i
_
)
n
=
q
}
{\displaystyle \{n\in \mathbb {N} \mid \delta ^{\omega }({\underline {i}})_{n}=q\}}
is infinite. Let
I
n
f
(
i
_
)
{\displaystyle \mathrm {Inf} ({\underline {i}})}
be the set of states occurring infinitely often for
i
_
{\displaystyle {\underline {i}}}
. The language of
A
{\displaystyle A}
is then the set of runs of
A
{\displaystyle A}
in which at least one of the infinitely-often occurring states is in
F
{\textstyle \mathbf {F} }
; in symbols:
}
.
{\displaystyle L(A)=\{{\underline {i}}\in \Sigma ^{\omega }\mid \mathrm {Inf} ({\underline {i}})\cap \mathbf {F} \neq \varnothing \}.}
In a (non-deterministic) Büchi automaton, the transition function
δ
{\textstyle \delta }
is replaced with a transition relation
Δ
{\textstyle \Delta }
that returns a set of states, and the single initial state
q
0
{\textstyle q_{0}}
is replaced by a set
I
{\textstyle 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
A
=
(
Q
A
,
Σ
,
Δ
A
,
I
A
,
F
A
)
{\displaystyle A=(Q_{A},\Sigma ,\Delta _{A},I_{A},{F}_{A})}
and
B
=
(
Q
B
,
Σ
,
Δ
B
,
I
B
,
F
B
)
{\displaystyle B=(Q_{B},\Sigma ,\Delta _{B},I_{B},{F}_{B})}
be Büchi automata and
C
=
(
Q
C
,
Σ
,
Δ
C
,
I
C
,
F
C
)
{\displaystyle C=(Q_{C},\Sigma ,\Delta _{C},I_{C},{F}_{C})}
be a finite automaton.
Union: There is a Büchi automaton that recognizes the language
L
(
A
)
∪
L
(
B
)
.
{\displaystyle L(A)\cup L(B).}
Proof: If we assume, w.l.o.g.,
Q
A
∩
Q
B
{\displaystyle Q_{A}\cap Q_{B}}
is empty then
L
(
A
)
∪
L
(
B
)
{\displaystyle L(A)\cup L(B)}
is recognized by the Büchi automaton
(
Q
A
∪
Q
B
,
Σ
∪
Σ
,
Δ
A
∪
Δ
B
,
I
A
∪
I
B
,
F
A
∪
F
B
)
.
{\displaystyle (Q_{A}\cup Q_{B},\Sigma \cup \Sigma ,\Delta _{A}\cup \Delta _{B},I_{A}\cup I_{B},{F}_{A}\cup {F}_{B}).}
Intersection: There is a Büchi automaton that recognizes the language
L
(
A
)
∩
L
(
B
)
.
{\displaystyle L(A)\cap L(B).}
Proof: The Büchi automaton
A
′
=
(
Q
′
,
Σ
,
Δ
′
,
I
′
,
F
′
)
{\displaystyle A'=(Q',\Sigma ,\Delta ',I',F')}
recognizes
L
(
A
)
∩
L
(
B
)
,
{\displaystyle L(A)\cap L(B),}
where
Q
′
=
Q
A
×
Q
B
×
{
1
,
2
}
{\displaystyle Q'=Q_{A}\times Q_{B}\times \{1,2\}}
Δ
′
=
Δ
1
∪
Δ
2
{\displaystyle \Delta '=\Delta _{1}\cup \Delta _{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
}
{\displaystyle \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\}}
Δ
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
}
{\displaystyle \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\}}
I
′
=
I
A
×
I
B
×
{
1
}
{\displaystyle I'=I_{A}\times I_{B}\times \{1\}}
F
′
=
{
(
q
A
,
q
B
,
2
)
|
q
B
∈
F
B
}
{\displaystyle F'=\{(q_{A},q_{B},2)|q_{B}\in F_{B}\}}
L
(
A
)
.
{\displaystyle L(C)\cdot L(A).}
L
(
A
)
{\displaystyle L(C)\cdot L(A)}
, where
Δ
′
=
Δ
A
∪
Δ
C
∪
{
(
q
,
a
,
q
′
)
|
q
′
∈
I
A
and
∃
f
∈
F
C
.
(
q
,
a
,
f
)
∈
Δ
C
}
{\displaystyle \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}\}}
if
I
C
∩
F
C
is empty then
I
′
=
I
C
otherwise
I
′
=
I
C
∪
I
A
{\displaystyle {\text{ if }}I_{C}\cap F_{C}{\text{ is empty then }}I'=I_{C}{\text{ otherwise }}I'=I_{C}\cup I_{A}}
ω-closure: If
L
(
C
)
{\displaystyle L(C)}
does not contain the empty word then there is a Büchi automaton that recognizes the language
L
(
C
)
ω
.
{\displaystyle L(C)^{\omega }.}
Proof: The Büchi automaton that recognizes
L
(
C
)
ω
{\displaystyle L(C)^{\omega }}
is constructed in two stages. First, we construct a finite automaton
A
′
{\textstyle A'}
such that
A
′
{\textstyle A'}
also recognizes
L
(
C
)
{\displaystyle L(C)}
but there are no incoming transitions to initial states of
A
′
{\textstyle A'}
. So,
A
′
=
(
Q
C
∪
{
q
new
}
,
Σ
,
Δ
′
,
{
q
new
}
,
F
C
)
,
{\displaystyle A'=(Q_{C}\cup \{q_{\text{new}}\},\Sigma ,\Delta ',\{q_{\text{new}}\},F_{C}),}
where
Δ
′
=
Δ
C
∪
{
(
q
new
,
a
,
q
′
)
|
∃
q
∈
I
C
.
(
q
,
a
,
q
′
)
∈
Δ
C
}
.
{\displaystyle \Delta '=\Delta _{C}\cup \{(q_{\text{new}},a,q')|\exists q\in I_{C}.(q,a,q')\in \Delta _{C}\}.}
Note that
L
(
C
)
=
L
(
A
′
)
{\displaystyle L(C)=L(A')}
because
L
(
C
)
{\displaystyle L(C)}
does not contain the empty string. Second, we will construct the Büchi automaton
A
″
{\textstyle A''}
that recognize
L
(
C
)
ω
{\displaystyle L(C)^{\omega }}
by adding a loop back to the initial state of
A
′
{\textstyle A'}
. So,
A
″
=
(
Q
C
∪
{
q
new
}
,
Σ
,
Δ
″
,
{
q
new
}
,
{
q
new
}
)
{\displaystyle A''=(Q_{C}\cup \{q_{\text{new}}\},\Sigma ,\Delta '',\{q_{\text{new}}\},\{q_{\text{new}}\})}
, where
Δ
″
=
Δ
′
∪
{
(
q
,
a
,
q
new
)
|
∃
q
′
∈
F
C
.
(
q
,
a
,
q
′
)
∈
Δ
′
}
.
{\displaystyle \Delta ''=\Delta '\cup \{(q,a,q_{\text{new}})|\exists q'\in F_{C}.(q,a,q')\in \Delta '\}.}
Complementation:There is a Büchi automaton that recognizes the language
Σ
ω
/
L
(
A
)
.
{\displaystyle \Sigma ^{\omega }/L(A).}
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
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
ω
{\displaystyle (0\cup 1)^{*}0^{\omega }}
, 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
{\textstyle A}
is a deterministic Büchi automaton that recognizes
(
0
∪
1
)
∗
0
ω
{\displaystyle (0\cup 1)^{*}0^{\omega }}
with final state set
F
{\textstyle \mathbf {F} }
.
A
{\textstyle A}
accepts
0
ω
{\textstyle 0^{\omega }}
. So,
A
{\textstyle A}
will visit some state in
F
{\textstyle \mathbf {F} }
after reading some finite prefix of
0
ω
{\textstyle 0^{\omega }}
, say after the
i
0
{\textstyle i_{0}}
th letter.
A
{\textstyle A}
also accepts the ω-word
0
i
0
10
ω
{\textstyle 0^{i_{0}}10^{\omega }}
. Therefore, for some
i
1
{\textstyle i_{1}}
, after the prefix
0
i
0
10
i
1
{\textstyle 0^{i_{0}}10^{i_{1}}}
the automaton will visit some state in
F
{\textstyle \mathbf {F} }
. Continuing with this construction the ω-word
0
i
0
10
i
1
10
i
2
…
{\textstyle 0^{i_{0}}10^{i_{1}}10^{i_{2}}\dots }
is generated which causes
A
{\textstyle A}
to visit some state in
F
{\textstyle \mathbf {F} }
infinitely often and the word is not in
(
0
∪
1
)
∗
0
ω
.
{\displaystyle (0\cup 1)^{*}0^{\omega }.}
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
{\textstyle A}
can be viewed as a deterministic finite automaton
A
′
{\textstyle 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
)
{\textstyle L(A)}
is the limit language of
L
(
A
′
)
{\textstyle L(A')}
. An ω-word is accepted by
A
{\textstyle A}
if it will force
A
{\textstyle A}
to visit final states infinitely often. Thus, infinitely many finite prefixes of this ω-word will be accepted by
A
′
{\textstyle A'}
. Hence,
L
(
A
)
{\textstyle L(A)}
is a limit language of
L
(
A
′
)
{\textstyle L(A')}
.
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.
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
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. This is in contrast to DFA minimization, which can be done in polynomial time.
Variants
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
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
}
)
{\textstyle A=(Q,\Sigma ,\Delta ,q_{0},\{F_{1},\ldots ,F_{n}\})}
is a GBA, where
F
1
,
…
,
F
n
{\textstyle F_{1},\ldots ,F_{n}}
are sets of accepting states then the equivalent Büchi automaton is
A
′
=
(
Q
′
,
Σ
,
Δ
′
,
q
0
′
,
F
′
)
{\textstyle A'=(Q',\Sigma ,\Delta ',q'_{0},F')}
, where
Q
′
=
Q
×
{
1
,
…
,
n
}
{\textstyle Q'=Q\times \{1,\ldots ,n\}}
q
0
′
=
(
q
0
,
1
)
{\textstyle 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
}
{\textstyle \Delta '=\{((q,i),a,(q',j))\mid (q,a,q')\in \Delta {\text{ and if }}q\in F_{i}{\text{ then }}j=((i+1){\bmod {n}}){\text{ else }}j=i\}}
F
′
=
F
1
×
{
1
}
{\textstyle F'=F_{1}\times \{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
}
)
{\textstyle A=(Q,\Sigma ,\Delta ,Q_{0},\{F_{0},\ldots ,F_{n}\})}
is a Muller automaton, where
F
0
,
…
,
F
n
{\textstyle F_{0},\ldots ,F_{n}}
are sets of accepting states. An equivalent Büchi automaton is
A
′
=
(
Q
′
,
Σ
,
Δ
′
,
Q
0
,
F
′
)
{\textstyle A'=(Q',\Sigma ,\Delta ',Q_{0},F')}
, where
Q
′
=
Q
∪
⋃
i
=
0
n
{
i
}
×
F
i
×
2
F
i
{\textstyle Q'=Q\cup \bigcup _{i=0}^{n}\{i\}\times F_{i}\times 2^{F_{i}}}
Δ
′
=
Δ
∪
Δ
1
∪
Δ
2
{\textstyle \Delta '=\Delta \cup \Delta _{1}\cup \Delta _{2}}
, where
)
)
∣
(
q
,
a
,
q
′
)
∈
Δ
and
q
′
∈
F
i
}
{\textstyle \Delta _{1}=\{(q,a,(i,q',\emptyset ))\mid (q,a,q')\in \Delta {\text{ and }}q'\in F_{i}\}}
otherwise
R
′
=
R
∪
{
q
}
}
{\textstyle \Delta _{2}=\{((i,q,R),a,(i,q',R'))\mid (q,a,q')\in \Delta {\text{ and }}q,q'\in F_{i}{\text{ and if }}R=F_{i}{\text{ then }}R'=\emptyset {\text{ otherwise }}R'=R\cup \{q\}\}}
F
′
=
⋃
i
=
0
n
{
i
}
×
F
i
×
{
F
i
}
{\textstyle F'=\bigcup _{i=0}^{n}\{i\}\times F_{i}\times \{F_{i}\}}
A
′
{\textstyle A'}
keeps original set of states from
A
{\textstyle A}
and adds extra states on them. The Büchi automaton
A
′
{\textstyle A'}
simulates the Muller automaton
A
{\textstyle A}
as follows: At the beginning of the input word, the execution of
A
′
{\textstyle A'}
follows the execution of
A
{\textstyle A}
, since initial states are same and
Δ
′
{\textstyle \Delta '}
contains
Δ
{\textstyle \Delta }
. At some non-deterministically chosen position in the input word,
A
′
{\textstyle A'}
decides of jump into newly added states via a transition in
Δ
1
{\textstyle \Delta _{1}}
. Then, the transitions in
Δ
2
{\textstyle \Delta _{2}}
try to visit all the states of
F
i
{\textstyle F_{i}}
and keep growing
R
{\textstyle R}
. Once
R
{\textstyle R}
becomes equal to
F
i
{\textstyle F_{i}}
then it is reset to the empty set and
Δ
2
{\textstyle \Delta _{2}}
try to visit all the states of
F
i
{\textstyle F_{i}}
states again and again. So, if the states
R
=
F
i
{\textstyle R=F_{i}}
are visited infinitely often then
A
′
{\textstyle A'}
accepts corresponding input and so does
A
{\textstyle 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
,
A
P
⟩
{\textstyle M=\langle Q,I,R,L,AP\rangle }
where
Q
{\textstyle Q}
is the set of states,
I
{\textstyle I}
is the set of initial states,
R
{\textstyle R}
is a relation between two states also interpreted as an edge,
L
{\textstyle L}
is the label for the state and
A
P
{\textstyle AP}
are the set of atomic propositions that form
L
{\textstyle L}
.
The Büchi automaton will have the following characteristics:
Q
final
=
Q
∪
{
init
}
{\displaystyle Q_{\text{final}}=Q\cup \{{\text{init}}\}}
Σ
=
2
A
P
{\displaystyle \Sigma =2^{AP}}
I
=
{
init
}
{\displaystyle I=\{{\text{init}}\}}
F
=
Q
∪
{
init
}
{\displaystyle F=Q\cup \{{\text{init}}\}}
δ
=
q
a
→
p
{\displaystyle \delta =q{\overrightarrow {a}}p}
if
(
q
,
p
)
{\textstyle (q,p)}
belongs to
R
{\textstyle R}
and
L
(
p
)
=
a
{\textstyle L(p)=a}
and
init
a
→
q
{\textstyle {\text{init}}{\overrightarrow {a}}q}
if
q
{\textstyle q}
belongs to
I
{\textstyle I}
and
L
(
q
)
=
a
{\textstyle 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.
Complementation
In automata theory, complementation of a Büchi automaton is the task of complementing a Büchi automaton, i.e., constructing another automaton that recognizes the complement of the ω-regular language recognized by the given Büchi automaton. Existence of algorithms for this construction proves that the set of ω-regular languages is closed under complementation.
This construction is particularly hard relative to the constructions for the other closure properties of Büchi automata. The first construction was presented by Büchi in 1962. Later, other constructions were developed that enabled efficient and optimal complementation.
Büchi's construction
Büchi presented a doubly exponential complement construction in a logical form. Here, we have his construction in the modern notation used in automata theory.
Let
A
=
(
Q
,
Σ
,
Δ
,
Q
0
,
F
)
{\textstyle A=(Q,\Sigma ,\Delta ,Q_{0},\mathbf {F} )}
be a Büchi automaton.
Let
∼
A
{\textstyle \sim _{A}}
be an equivalence relation over elements of
Σ
+
{\textstyle \Sigma ^{+}}
such that
for each
v
,
w
∈
Σ
+
{\textstyle v,w\in \Sigma ^{+}}
,
v
∼
A
w
{\textstyle v\sim _{A}w}
if and only if for all
p
,
q
∈
Q
{\textstyle p,q\in Q}
,
A
{\textstyle A}
has a run from
p
{\textstyle p}
to
q
{\textstyle q}
over
v
{\textstyle v}
if and only if this is possible over
w
{\textstyle w}
and furthermore
A
{\textstyle A}
has a run via
F
{\textstyle \mathbf {F} }
from
p
{\textstyle p}
to
q
{\textstyle q}
over
v
{\textstyle v}
if and only if this is possible over
w
{\textstyle w}
.
Each class of
∼
A
{\textstyle \sim _{A}}
defines a map
f
:
Q
→
2
Q
×
2
Q
{\textstyle f\colon Q\to 2^{Q}\times 2^{Q}}
in the following way:
for each state
p
∈
Q
{\textstyle p\in Q}
, we have
(
Q
1
,
Q
2
)
=
f
(
p
)
{\textstyle (Q_{1},Q_{2})=f(p)}
, where
Q
1
=
{
q
∈
Q
∣
w
can move automaton
A
from
p
to
q
}
{\textstyle Q_{1}=\{q\in Q\mid w{\text{ can move automaton }}A{\text{ from }}p{\text{ to }}q\}}
and
Q
2
=
{
q
∈
Q
∣
w
can move automaton
A
from
p
to
q
via a state in
F
}
{\textstyle Q_{2}=\{q\in Q\mid w{\text{ can move automaton }}A{\text{ from }}p{\text{ to }}q{\text{ via a state in }}\mathbf {F} \}}
.
Note that
Q
2
⊆
Q
1
{\textstyle Q_{2}\subseteq Q_{1}}
.
If
f
{\textstyle f}
is a map definable in this way, we denote the (unique) class defining
f
{\textstyle f}
by
L
f
{\textstyle L_{f}}
.
The following three theorems provide a construction of the complement of
A
{\textstyle A}
using the equivalence classes of
∼
A
{\textstyle \sim _{A}}
.
Theorem 1:
∼
A
{\textstyle \sim _{A}}
has finitely many equivalent classes and each class is a regular language.
Proof:
Since there are finitely many
f
:
Q
→
2
Q
×
2
Q
{\textstyle f\colon Q\to 2^{Q}\times 2^{Q}}
, the relation
∼
A
{\textstyle \sim _{A}}
has finitely many equivalence classes.
Now we show that
L
f
{\textstyle L_{f}}
is a regular language.
For
p
,
q
∈
Q
{\textstyle p,q\in Q}
and
i
∈
{
0
,
1
}
{\textstyle i\in \{0,1\}}
,
let
A
i
,
p
,
q
=
(
{
0
,
1
}
×
Q
,
Σ
,
Δ
1
∪
Δ
2
,
{
(
0
,
p
)
}
,
{
(
i
,
q
)
}
)
{\textstyle A_{i,p,q}=(\{0,1\}\times Q,\;\Sigma ,\;\Delta _{1}\cup \Delta _{2},\;\{(0,p)\},\;\{(i,q)\})}
be a nondeterministic finite automaton,
where
Δ
1
=
{
(
(
0
,
q
1
)
,
(
0
,
q
2
)
)
∣
(
q
1
,
q
2
)
∈
Δ
}
∪
{
(
(
1
,
q
1
)
,
(
1
,
q
2
)
)
∣
(
q
1
,
q
2
)
∈
Δ
}
{\textstyle \Delta _{1}=\{((0,q_{1}),(0,q_{2}))\mid (q_{1},q_{2})\in \Delta \}\cup \{((1,q_{1}),(1,q_{2}))\mid (q_{1},q_{2})\in \Delta \}}
,
and
Δ
2
=
{
(
(
0
,
q
1
)
,
(
1
,
q
2
)
)
∣
q
1
∈
F
∧
(
q
1
,
q
2
)
∈
Δ
}
{\textstyle \Delta _{2}=\{((0,q_{1}),(1,q_{2}))\mid q_{1}\in \mathbf {F} \land (q_{1},q_{2})\in \Delta \}}
.
Let
Q
′
⊆
Q
{\textstyle Q'\subseteq Q}
.
Let
α
p
,
Q
′
=
⋂
{
L
(
A
1
,
p
,
q
)
∣
q
∈
Q
′
}
{\textstyle \alpha _{p,Q'}=\bigcap \{L(A_{1,p,q})\mid q\in Q'\}}
,
which is the set of words that can move
A
{\textstyle A}
from
p
{\textstyle p}
to all the states in
Q
′
{\textstyle Q'}
via some state in
F
{\textstyle \mathbf {F} }
.
Let
β
p
,
Q
′
=
⋂
{
L
(
A
0
,
p
,
q
)
−
L
(
A
1
,
p
,
q
)
−
{
ε
}
∣
q
∈
Q
′
}
{\textstyle \beta _{p,Q'}=\bigcap \{L(A_{0,p,q})-L(A_{1,p,q})-\{\varepsilon \}\mid q\in Q'\}}
,
which is the set of non-empty words that can move
A
{\textstyle A}
from
p
{\textstyle p}
to all the states in
Q
′
{\textstyle Q'}
and does not have a run that passes through any state in
F
{\textstyle \mathbf {F} }
.
Let
γ
p
,
Q
′
=
⋂
{
Σ
+
−
L
(
A
0
,
p
,
q
)
∣
q
∈
Q
′
}
{\textstyle \gamma _{p,Q'}=\bigcap \{\Sigma ^{+}-L(A_{0,p,q})\mid q\in Q'\}}
,
which is the set of non-empty words that cannot move
A
{\textstyle A}
from
p
{\textstyle p}
to any of the
states in
Q
′
{\textstyle Q'}
. Since the regular languages are closed under finite intersections and under relative complements, every
α
p
,
Q
′
{\textstyle \alpha _{p,Q'}}
,
β
p
,
Q
′
{\textstyle \beta _{p,Q'}}
, and
γ
p
,
Q
′
{\textstyle \gamma _{p,Q'}}
is regular.
By definitions,
L
f
=
⋂
{
α
p
,
Q
2
∩
β
p
,
Q
1
−
Q
2
∩
γ
p
,
Q
−
Q
1
∣
(
Q
1
,
Q
2
)
=
f
(
p
)
∧
p
∈
Q
}
{\textstyle L_{f}=\bigcap \{\alpha _{p,Q_{2}}\cap \beta _{p,Q_{1}-Q_{2}}\cap \gamma _{p,Q-Q_{1}}\mid (Q_{1},Q_{2})=f(p)\land p\in Q\}}
.
Theorem 2: For each
w
∈
Σ
ω
{\textstyle w\in \Sigma ^{\omega }}
,
there are
∼
A
{\textstyle \sim _{A}}
classes
L
f
{\textstyle L_{f}}
and
L
g
{\textstyle L_{g}}
such that
w
∈
L
f
(
L
g
)
ω
{\textstyle w\in L_{f}(L_{g})^{\omega }}
.
Proof:
We will use the infinite Ramsey theorem
to prove this theorem.
Let
w
=
a
0
a
1
…
{\textstyle w=a_{0}a_{1}\ldots }
and
w
(
i
,
j
)
=
a
i
…
a
j
−
1
{\textstyle w(i,j)=a_{i}\ldots a_{j-1}}
.
Consider the set of natural numbers
N
{\textstyle \mathbb {N} }
.
Let equivalence classes of
∼
A
{\textstyle \sim _{A}}
be the colors of subsets of
N
{\textstyle \mathbb {N} }
of size 2.
We assign the colors as follows.
For each
i
<
j
{\textstyle i<j}
,
let the color of
{
i
,
j
}
{\textstyle \{i,j\}}
be the equivalence class in which
w
(
i
,
j
)
{\textstyle w(i,j)}
occurs.
By the infinite Ramsey theorem, we can find an infinite set
X
⊆
N
{\textstyle X\subseteq \mathbb {N} }
such that each subset of
X
{\textstyle X}
of size 2 has same color.
Let
0
<
i
0
<
i
1
<
i
2
…
∈
X
{\textstyle 0<i_{0}<i_{1}<i_{2}\ldots \in X}
.
Let
f
{\textstyle f}
be a defining map of an equivalence class such that
w
(
0
,
i
0
)
∈
L
f
{\textstyle w(0,i_{0})\in L_{f}}
.
Let
g
{\textstyle g}
be a defining map of an equivalence class such that
for each
j
>
0
{\textstyle j>0}
,
w
(
i
j
−
1
,
i
j
)
∈
L
g
{\textstyle w(i_{j-1},i_{j})\in L_{g}}
.
Then
w
∈
L
f
(
L
g
)
ω
{\textstyle w\in L_{f}(L_{g})^{\omega }}
.
Theorem 3: Let
L
f
{\textstyle L_{f}}
and
L
g
{\textstyle L_{g}}
be equivalence classes
of
∼
A
{\textstyle \sim _{A}}
.
Then
L
f
(
L
g
)
ω
{\textstyle L_{f}(L_{g})^{\omega }}
is either a subset of
L
(
A
)
{\textstyle L(A)}
or
disjoint from
L
(
A
)
{\textstyle L(A)}
.
Proof:
Suppose there is a word
w
∈
L
(
A
)
∩
L
f
(
L
g
)
ω
{\textstyle w\in L(A)\cap L_{f}(L_{g})^{\omega }}
, otherwise the theorem holds trivially.
Let
r
{\textstyle r}
be an accepting run of
A
{\textstyle A}
over input
w
{\textstyle w}
.
We need to show that each word
w
′
∈
L
f
(
L
g
)
ω
{\textstyle w'\in L_{f}(L_{g})^{\omega }}
is also in
L
(
A
)
{\textstyle L(A)}
, i.e., there exists a run
r
′
{\textstyle r'}
of
A
{\textstyle A}
over input
w
′
{\textstyle w'}
such that
a state in
F
{\textstyle \mathbf {F} }
occurs in
r
′
{\textstyle r'}
infinitely often.
Since
w
∈
L
f
(
L
g
)
ω
{\textstyle w\in L_{f}(L_{g})^{\omega }}
,
let
w
0
w
1
w
2
…
=
w
{\textstyle w_{0}w_{1}w_{2}\ldots =w}
such that
w
0
∈
L
f
{\textstyle w_{0}\in L_{f}}
and for each
i
>
0
{\textstyle i>0}
,
w
i
∈
L
g
{\textstyle w_{i}\in L_{g}}
.
Let
s
i
{\textstyle s_{i}}
be the state in
r
{\textstyle r}
after consuming
w
0
…
w
i
{\textstyle w_{0}\ldots w_{i}}
.
Let
I
{\textstyle I}
be a set of indices such that
i
∈
I
{\textstyle i\in I}
if and only if the run segment in
r
{\textstyle r}
from
s
i
{\textstyle s_{i}}
to
s
i
+
1
{\textstyle s_{i+1}}
contains a state from
F
{\textstyle \mathbf {F} }
.
I
{\textstyle I}
must be an infinite set.
Similarly, we can split the word
w
′
{\textstyle w'}
.
Let
w
0
′
w
1
′
w
2
′
…
=
w
′
{\textstyle w'_{0}w'_{1}w'_{2}\ldots =w'}
such that
w
0
′
∈
L
f
{\textstyle w'_{0}\in L_{f}}
and for each
i
>
0
{\textstyle i>0}
,
w
i
′
∈
L
g
{\textstyle w'_{i}\in L_{g}}
.
We construct
r
′
{\textstyle r'}
inductively in the following way.
Let the first state of
r
′
{\textstyle r'}
be same as
r
{\textstyle r}
. By definition of
L
f
{\textstyle L_{f}}
,
we can choose a run segment on word
w
0
′
{\textstyle w'_{0}}
to reach
s
0
{\textstyle s_{0}}
.
By induction hypothesis,
we have a run on
w
0
′
…
w
i
′
{\textstyle w'_{0}\ldots w'_{i}}
that reaches to
s
i
{\textstyle s_{i}}
.
By definition of
L
g
{\textstyle L_{g}}
,
we can extend the run along the word segment
w
i
+
1
′
{\textstyle w'_{i+1}}
such that
the extension reaches
s
i
+
1
{\textstyle s_{i+1}}
and visits a state in
F
{\textstyle \mathbf {F} }
if
i
∈
I
{\textstyle i\in I}
.
The
r
′
{\textstyle r'}
obtained from this process will have infinitely many run segments
containing states from
F
{\textstyle \mathbf {F} }
, since
I
{\textstyle I}
is infinite.
Therefore,
r
′
{\textstyle r'}
is an accepting run and
w
′
∈
L
(
A
)
{\textstyle w'\in L(A)}
.
By the above theorems, we can represent
Σ
ω
−
L
(
A
)
{\textstyle \Sigma ^{\omega }-L(A)}
as finite union of ω-regular languages of the form
L
f
(
L
g
)
ω
{\textstyle L_{f}(L_{g})^{\omega }}
, where
L
f
{\textstyle L_{f}}
and
L
g
{\textstyle L_{g}}
are equivalence classes of
∼
A
{\textstyle \sim _{A}}
.
Therefore,
Σ
ω
−
L
(
A
)
{\textstyle \Sigma ^{\omega }-L(A)}
is an ω-regular language.
We can translate the language into a Büchi automaton. This construction is doubly exponential in terms of size of
A
{\textstyle A}
.
References
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
"Finite-state Automata on Infinite Inputs" (PDF).
Vardi, Moshe Y. "An automata-theoretic approach to linear temporal logic" (PDF).