Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
|Aaccepts}
Example:
A
0
:
1
2
a
a
3
a,b
a
b
a
= abbababab . . .
1
= 0000000000 . . .
2
= 0000002323 . . .
3
= 0000232323 . . .
2
,
3
accepting. A
0
accepts L(A
0
) = the set of all -words over {a, b} with from some point onwards
have ababab . . . or aaaa . . . .
Short notation: (a + b)
(ab)
+ (a + b)
regular expression
Questions
1. Reduction to deterministic automata?
2. Alternative characterization of accepted (or recognized) -languages?
3. Closure under operations like ,
4. Algorithmic properties
Remark on determinism In a deterministic B uchi automaton replace by a transition function :
Q Q
Then an -word induces a unique run of Aon .
(0) = q
0
(1) = (q
0
, (0))
(2) = ((q
0
, (0)), (1))
B uchi condition as before.
L
1
= { {a, b}
Claim: L
A
is B uchi recognizable, but not deterministically B uchi rec.
Proof:
Assume det. B uchi aut. A recognizes L
1
Consider A on aaa . . . . A visits nal states innitely often in its unique run, say rst time after n
0
letters a.
Consider A: a
n
0
baa . . . Next visit to nal state is guaranteed by assumption, say after prex
4
CHAPTER 1. INTRODUCTION 5
a
n
0
ba
n
1
ConsiderA on a
n
0
ba
n
1
baa . . .
Generate innite word a
n
0
, ba
n
1
ba
n
2
b . . . where the A-run visits nal states innitely often.
Contradiction to the assumption on A
1.4 Towards characterization of B uchi recognizable -languages
1.4.1 Preparation
Given U
, dene U
= {
| = u
0
u
1
u
2
. . . , u
i
U}
Example:
U = abba
+ aa
U
contains aa
.,,.
abb
.,,.
abba
.,,.
abbaa
.,,.
abbaaa . . .
Given U
, L
, U L = {
| = u, u U, L}
Theorem 1 L
is B uchi recognizable L =
_
n
i=1
U
i
V
i
with U
i
, V
i
regular.
Proof:
Given A = (Q, , q
0
, , F) B uchi automaton
Dene for p, q Q W
p,q
= {w
qq
()
Consequence: is ultimately periodic if = uvvv . . . for some xed words u, v
Proposition: L B uchi recognizable, L L contains an ultimately periodic -word
Proof:
Given A, consider the representation ()
For some q W
q
0
q
W
qq
Using u W
q
0
q
, v W
qq
nd = uvvv . . .
Denition
L
, with U, V
regular
Proof:
Proof of ) Lemma:
a) V
regular V
reg, K
B Rec L
1
L
2
B rec
Proof a) Given NFA A = (Q, , q
0
, , F) recognizing V
Preprocessing: Introduce new initial state q
0
wich cannot be reached via nenempty word, obtain
equiv. NFA A
Construct the B uchi-atuomaton B for V
from a
0
)
5
6 CHAPTER 1. INTRODUCTION
Use {q
0
} as set of nal states of B
Proof b) Given NFA A for U, B uchi automaton B for K Introduce over Q
A
Q
B
for (p, a, q) with q F
A
new transistion (p, a, q
0B
if q
0A
F
A
for (q
0B
, b, q) new transition (q
0A
, b, q)
Proof c) Given B
1
, B
2
for L
1
, resp L
2
Introduce a new initial state q
0
and new initial transitions
Consequence B uchi-recognizable -languages are described by regular -expressions (-regular ex-
pressions) r
1
s
1
+ + r
k
s
k
where r
i
, s
i
are standard regular expressions.
1.5 Complementation of B uchi automata.
Theorem 2 L
B-rec.
\ L B-rec
Strategy: Given B uchi-automaton A = (Q, , q
0
, , F) recognizing L
Dene nite family W
A
= {W
1
, . . . , w
k
} of regular languages W
i
such that
L is nite union of sets U V
with U, V
A
u
A
v for each p, q Q
p
u
q p
v
q
p
u
q p
v
q
Fact 1:
A
is equivalence relation, call the equivalence classes
A
-classes [u]
Fact 2: Each
A
-class is regular
w [u] p, q Q s.t. p
u
q [not p
u
q ] w W
pq
[w W
pq
] and p, q Q s.t.
p
u
q[not p
u
q] w W
F
pq
(allowing A to go from p to q visiting F )
L
B uchi-Rec.
Remark:
From the transition proles of u, v one can compute the transition prole of uv.
Other Formulation:
u
a
u
v
a
v
uv
a
u
6
CHAPTER 1. INTRODUCTION 7
a
is a congruence
U, V W
a
(U, V
a
classes)
U V W for some W
Consequence of Lemma 1,2:
\ L =
_
{U V
|U, V W
a
, V V V, U V
L = }
Proof (Proof of Lemma 2):
Given
merge at m(> k, k
)
k k
m n
V
V V
: k, k
merge at m, m < n k, k
m n
Check
wether U.V V For construction of
complement B uchi automaton we need a test wether U V
L =
Lemma (Intersection-Lemma:)
Given B uchi automata a
1
, a
2
, L(a
1
) L(a
2
) is B uchi-recognizable.
Emptiness Test: Given B uchi aut. a, one can test wether L(a) =
L(a) ex. nal state q, such that
q is reachable from q
0
7
8 CHAPTER 1. INTRODUCTION
q is reachable from q by nonempty path.
Idea: Given a
1
(Q
1
, , q
01
,
1
, F
1
)
a
2
(Q
2
, , q
02
,
2
, F
2
)
construct product automaton
Introduce memory component with entries 0, 1, 2:
1. wait for state in F
1
2. wait for state in F
2
3. Cycle completed
1.6 Acceptance Conditions
Aim: Obtain expressive of NBA by deterministic automata with other acceptance then B uchi-ac.
Four basic acceptance conditions (given a = (Q, , q
0
, , F))
The run Q
is E-Accepting if i, (i) F
A-Accepting if i(i) F
B uchi-Accepting if
j
i > j, (i) F
-B uchi-acc. , i > j(i) F
An E-/A-/B uchi/-B uchi-cond is here a det. automaton used over -words with E-/A-. . . acceptance
Example:
(aa + b)
= {a, b}
1 2 3
a,b
Error
a,b
Example:
For Q
q
Q
\ F
Intersection use a product construction, given A
i
= (Q
i
, , q
i
0
,
i
, F
i
), (i = 1, 2) construct A = (Q
1
Q
2
, , (q
1
0
, q
2
0
), , F) where ((p, q), a) (
1
(p, a),
2
(q, a)) and F dened n, p
1
. . . p
n
Q
1
, q
1
. . . , q
n
Q
2
: {(p
1
, q
1
), . . . , (p
n
, q
n
)} F {p
1
. . . p
n
} F
1
and {q
1
. . . q
n
} F
2
Lemma
a) L
E-recognizable
\ L is A-recognizable
proof of a) (B is similar
Let A = (Q, , q
0
, , F) be a det. B uchi automaton with L = L(A)
Dene A
= (Q, , q
0
, , Q \ F)
Then
\ L Inf (
F = From some point onwards only states from Q \ F are seen , i.e.
i n
(i) Q \ F A
is E-recognizable L = U
wher U
regular
b) L
regular
Denition
Let u
Lim(u) {
ba
lim(u) = {
.
9
10 CHAPTER 1. INTRODUCTION
b) Let A = (Q, , q
0
, , F) det, L = L(A)
B uchi recognized by A, U
: Aacceots in
(i) = q F for
inf. many i [0, . . . , i] acceptesd by DFA A for inf. many i [0, . . . , i] U for inf. many
i lim(u)
Comparison of det. recognizable -Languages Hierarchy Theorem For the classes of det. E,A,B uchi,
co-B uchi, Muller-recognizable languages, the following inclusion diagram
All the inclusions are strict!
proof strategy: done. B uchi Muller complement Lemma + closure of Muller under boolean comb.
co-B uchi Muller , we sho E B uchi, E co-B uchi.
Then (complement) A B uchi, A co-B uchi.
Proof: W B uchi, E co-B uchi
Let A be an E-automaton recognizing L
We construct automaton A
, {q
f
} = F
(q, a) = q
f
22.11.05
1.6.1 Strict inclusion claims
On (4): O
1(0 + 1)
is not A-recognizable.
Assume A with n states recognizes 0
1(0 + 1)
A on input 0
n
10
contradiction.
On (5): 0
, complement of 0
1(0 + 1)
Assuming {=
} is E-recogn., the complement would be A-recognizable. Now use the proof on the language
(4).
So {0
} is not E-recogn.
On(2): L
2
= { {0, 1}
, so contrad.
On (7): L
7
= { {0, 1}
exists w
+
with (s, w) = s
over Q S
Remark A set Inf () is a loop. We may restrict F to loops only. Assume A has only reacheable states, has
acceptance component F containing only loops.
F is closed under reacheable then S
F
F is closed under superloops if loop S F and loop S
S then S
F
Remark Given A both properties of F can be checked eectively.
1.6.3 Landwebers Theorem
Let A be a Muller automaton A = (Q, , q
0
, , F)
a) L(A) is E-recognizable if F is closed under reachable loops.
b) L(A) is B uchi-recognizable if F is closed under superloops.
Proof b) Assume A is closed under superloops. Construct B uchi automaton for L(A) Use set Q 2
Q
:
in rst component simulate A in second component accumulate visited states until superset S S F is
reached, then go to instead (nal).
Automaton accepts if given aut. A satis f iesInf () S F Given Muller-automaton A = (Q, , q
0
,
a
, F)
and a B uchi-atuomaton B = (P, , p
0
,
b
, F with L(A) = L(B)
Consider loop S F, superloop S
. Show S F
Find -word with Inf () = S
for the A-run , with A accepts. Start with prex w leading A to some
q S . Continue w by wich causes A to loop through S again and again. Bon w visits F-state after w, say
adter wu
1
. Via word v
1
back to q in A, via x
1
go once through S in A and back to q. On prex wu
1
v
1
x
1
A
has looped through S
againandagain
B reaches nal states inf. often
So Baccepts hence accepts, hence S
F
1.7 Weak automata
A Staiger-Wagner automaton (weak Muller automaton) has the same format (Q, , q
0
, , F) as Muller au-
tomaton, but with the following acceptance: A accepts if for unique run of A on : the set of states
occuring in is in F. Occ() F 29.11.2005
Staiger-Wagner automaton: A = (Q, , q
0
, , F) F Pow(Q)
A accepts for the unique run of A in we have Occ() F for some F F, the states of form F
Theorem 3 L
over Q 2
Q
2
Q
.,,.
k times
State (q, R
1
, . . . , R
k
) signals that A is in q, and that R
i
(i = 1, . . . , k) is the set of states visited so
11
12 CHAPTER 1. INTRODUCTION
far.
Declare (q, R
1
, . . . , R
k
) as nal if R
i
= F
i
for some i (For B uchi-automaton A)
A
used as b uchi or as Co-B uchi automaton, accepts if the visited states for A form some
F
i
.
Preparation for : SCC Decomposition) Given transition graph, a strongly connected component
is a maximal strongly connected subset.
Proposition the SCCs and the singletons wich do not belong to an SCC form a partial ordering under
the reachability relation.
SCC-Algorithm For directed Graph G = (V, E)
1. Run depth-rst search, recording enter/farewell-times for the vertices
2. Reverse edges, get G
T
3. Run depth-rst search on G
T
, taking as roots of depth-rst trees vertices in reversed order of
nish times (Starting from vertex with highest farewell
Resulting d-f-trees are the SCCs (the reacheable vertices form a SCC S of G
Given B uchi-automaton wich recognizes L
Take Muller-automaton for L, A = (Q, , q
0
, , F) F is closed under superloops.
Since A recognizes a co-B uchi recogn. set, F is closed under subloops.
Consequence: All loops of an SCC of A are accepting ( F) or all loops of SCC are rejecting
( F).
Call SCC S good, if all its loops are accepting, (otherwise its bad)
Fiven S , let S
+
be the set of states q S with transition (p, q), p S
Consequence: Run of A is accepting if reaches some good S but does not reach the cor-
repsonding set S
+
.
So get a Staiger-Wagner-automaton from A with the following acceptance component F
con-
taining a set R Q if for some good S we have R S and R S
+
= .
12
2 Determinization
Aim: Transformation of undet. B uchi automaton to det. Muller automata. (McNaughton 1966, (Information
and Control)).
Safra 1988: Optimal complexity bound for the number of states (Rabin automata)
Muller,Schupp (1992): Optimal complexity bound for the number of states
Problem: Powerset construction is not enough.
1
b
a,b
b
1 1 1
. . .
. . .
innitely often set visited with -
nal state 1!
Idea of MS-construction: On given input word, build up the run Tree of B uchi automaton. Use prexes
of tree up to some level as rst approximation of states. Reduction and compression leads to nite number
of states.
Illustration with
a
b
a
a,b
b
L = (a + b)
(b
+
a)
Example input: Run tree of A = (Q, , q
0
, , F) on input
Remark:
A accepts in run tree of A an innite path exists with innitely many nal states.
Reduct1on 1 Put states together if they are nal, respectingly nonnal (nal:down, vertically display:
left)
Result: Binary branching tree. Acceptance Tree.
Remark:
A accepts in acceptance of A on exists path pranching down innitely often.
13
14 CHAPTER 2. DETERMINIZATION
From a nondet. B uchi automaton, one can construct an equivalent det. Muller automaton.
Given A = (Q, , q
0
, , F), start on input from run tree of A on
Convention: Branch left(down) with nal states.
1. Reduction Merge states at a branching when they are nal (left succ.)
Merge states at a branching when they are non-nal (right succ.)
Get acceptance tree with a most binary branching.
Remark:
A accepts in acceptance tree of A on exists path with innitley many left turns.
easy from condition on run tree
from innite path in acc. tree obtain a partial run tree wich is innite and nitely branch-
ing.K onigs Lemma gives innite path of run tree of course with innitley many left turns.
2. Reduction On each Level keep only the leftmost (downmost) occurence of each individual state.
Remark:
A accepts in the resulted left-reduced acc. tree a path exists with innitely many
left turns.
3. Reduction Compress path segments into single nodes:
Merge
nodes of a path segment into the topmost one (not a successor of branching node)
Keep states at leaves, color each node of compressed tree by:
Red: if no nal state occurs
yellow: if nal state occurs, no nal state added
green: if nal state was added in left update
4. Reduction Delete all nodes wich do not get a new descendent in the last update step.
Result: Muller-Schupp tree (over Q), a nite, strictly binary tree with node names from N
+
where node is
colored red,green or yellow, and the leaves are labelled with disjoint state sets (over Q).
Notation: MS (Q) for the nite set of all Muller-Schupp trees over Q.
Remark:
A accepts in the sequence of Muller-Schupp trees of A on , some node stays forever from
some point onwards and is colored gren again and again.
14
CHAPTER 2. DETERMINIZATION 15
Denition
of Muller automaton A
= {q|p P, (p, a, q) }
Delete state p if it occurs more to the left.
Split any set into left,right son with the nal, resp. nonnal states with colors green,red.
3. Delete all nodes wich did not get a new descnendant with set.
4. Compress path semgents into the respective top node giving it colour green if it is merged with nodes
either coloured green or yellow.
Convention about use of node names after deletion step a node name can be reused, however not in an
immediate successor tree accordings to update.
Observation: Over Q, 3|Q| node names suces.
Acceptance Component: Dene F as follows:
R( MS (Q)) F some node name k occurs in each tree of R and even colored green in some tree of R.
Example:
t =
1; red
2; green 3; red
{2} {0, 1}
(t, b) to be computed.
1; red
2; yellow 3; red
{0, 1, 2}
1; red
2; yellow 3; red
4; green 5; yellow
{2} {0, 1}
1; red
4; green 5; red
{2} {0, 1}
Denition
Dene E
k
set of MS-trees without node k
F
k
set of MS-trees with node k colored green.
Acceptance Condition: for some k: any tree in E
k
occurs only nitely often, some tree in F
k
occurs
15
16 CHAPTER 2. DETERMINIZATION
innitely often.
Start notation for run (of MS-trees):
_
m
k=1
Inf () E
k
= Inf () F
k
Denition
A (det.) Rabin-automaton has the form A = (Q, , q
0
, , ) where is sequence (E
1
, F
1
), . . . , (E
m
, F
m
) of
sets Q.
A-run is accepting if for some k {1, . . . , m}: Inf () E
k
= Inf () F
k
13.12.05
Theorem 4 A nondet. B uchi aut. can be transformed into a deterministic Muller automaton and also into
a det. Rabin automaton.
Rabin aut.: A = (Q, , q
0
, , ) = (E
1
, F
1
), . . . , (E
m
, F
m
)) E
i
, F
i
Q
successfull
_
m
i=1
(Inf () E
i
= Inf () F
i
)
Remark on Rabin and (Union Lemma) Given Rabin aut. over Q, whith = (E
1
, F
1
), . . . , (E
m
, F
m
)),
1
,
2
non-successful runs
Let be run with Inf () = Inf (
1
) Inf (
2
)
is not successful
Proof:
1
,
2
arenotsuccess f ul, assume is successful, Inf () = Inf (
1
) Inf (
2
)
Pick index i: Inf () E
i
= Inf () F
i
Then Inf () E
i
= , Inf (
2
) E
i
=
Also Inf (
1
) F
i
or Inf (
2
) F
i
So
1
or
2
successful
Theorem 5 MS-construction yelds a Rabin automaton with 2
O(nlog n)
states from B uchi automaton with n
states
Proof:
Estimate number of MS-Trees over Q, |Q| = n
MS-trees are built from node names 1, . . . , 3n
Fix a MS-Tree by the following functions:
parent p : N N {0, }
p(n) =
_
_
parent if exists
0 i k is root
otherwise
right brother rb : N N {0, } anologously
color: c : N {green, red,yellow} {}
State occurence: : Q N {0}
_
_
node where q occurs if q occurs
0 otherwise
Number od MS-Trees number of quadruples (p, rb, c, ) of functions.
(3n + 2)
3n
(3n + 2)
3n
4
3n
(3n + 1)
n
(4n)
10n
= 2
O(n log n)
Optimality of bound:
16
CHAPTER 2. DETERMINIZATION 17
Theorem 6 There is L
n
{#, 1, . . . , n}
recognized by B uchi aut. with n +2 states auch that any det. Rabin
automaton recognizing L
n
needs n! states. n! 2
=(n log n)
Proof:
B uchi automaton for L
n
= {#, 1, . . . , n}
q
0
1 1 3 n
#
#
#
#
f
1
2
3
4
Cycle property: L
n
exists letters i
1
, . . . , i
k
\ {#} such that the letter paris segments i
1
i
2
, i
2
i
3
, i
3
i
4
. . . i
k1
i
k
, i
k
i
1
occur innitely often.
Consider permutation (i
1
, . . . , i
n
) of 1, . . . , n (i
1
, i
2
, . . . , i
n
#)
L
n
Assume A does not accept (i
1
, . . . , i
n
#)
, ( j
1
, . . . , j
n
#)
with permutations i
1
, . . . , i
n
j
1
, . . . , j
n
The runs
) = R Show; Inf (
) = S R S =
So A has n! states.
Assume q R S . Build -word with innitely many occ. of i
1
. . . i
n
, j
1
. . . j
n
Inf () = R S , not successful.
i
1
. . . i
k
j
1
. . . j
k
get cycle in input word. Contradiction!
17
3 Monadic Theory of one successor (S1S)
We consider transition systems.
P
1
, P
2
P
1
P
2
p
i
denote properties of the states
arrows = possible behaviour of the system.
Associate boolean vector to properties
p
i
is true i-th component is 1
_
1
1
_
_
1
0
_
_
0
1
_
_
0
0
_
Execution of such a system yields an -word over B
m
eg: =
_
1
1
__
1
0
__
0
1
__
1
0
__
0
0
_
evolvement of single property over time is the projection to the corresponding row
Express speciication for the behaviour of the system by expressing specication for -words over B
n
Use S1S for this: variables s
i
t . . . for time points, positions
variables X, Y, Z . . . sets of positions, 0 constant, successor
< earlier, = , + boolean connectors + quanti-
cation
Example:
Constant: At position 3, p
1
holds. (X
1
) = X
1
(
,..,
0
=3
)
Reactivity: Sometimes p
1
holds.
2
(X
1
) = tX
1
(t)
Recurrence: again and again p
1
holds: ts > t : X
1
(s)
Request - Response: Whenever p
1
holds, p
2
holds afterwards.
s(X
1
(s) t(t > s X
2
(t))
18
CHAPTER 3. MONADIC THEORY OF ONE SUCCESSOR (S1S) 19
3.1 Formal Syntax
Variables: s, t, . . .
Second-order variables: X, Y, X
1
, X
2
. . .
Terms: constant 0, rst-order variables, term
term
Atomic formulas: X(), < , = with , terms.
S1S-formulas are obtained from the atomic formulas by using boolean connectives and quantication.
3.2 Semantics
Use N as universe for rst-order variables
Use 2
N
as universe for second-order variables
The interpretation of
is +1
<= less than on N
Use standard semantics
Write
(N, 0, +1, <, P
1
, . . . , P
n
) (X
1
. . . X
n
) where X
1
. . . X
n
are the free variables od
if is true in these semantics if the free variable X
i
is interpreted as P
i
We need to specify only P
1
. . . P
n
=
P
For P
1
. . . P
n
N we dene (
P)( (B
n
)
by ((i)9
j
= 1 i i P
j
Then we write (
P) (X
1
. . . X
n
Denition
For S1S-formula (X
1
. . . X
n
) dene L() = { ((B)
n
| (X
1
. . . X
n
)}
20.12.05
3.2.1 Connection from S1S to B uchi-automata
S1S: s, t, . . . positions of -words.
X, Y, . . .sets of positions
0,
)
, , , , , ,
Formula (X
1
, . . . , X
n
) satised in a model (N, 0,
, <, P
1
, . . . , P
n
) -word over {0, 1}
= t X
2
(s) X
2
(t) X
1
(t
))
s(X
2
(s) X
2
(s
) X
1
(s
))
L {0, 1}
n
S1S-denable exists S1S-formula (X
1
, . . . , X
n
) s, t for any ({0, 1}
n
)
: L
(X
1
, . . . , X
n
)
Theorem 7 (B uchi 1960) An -language L ({0, 1}
n
)
))(Y
2
(s)
X(s) Y
1
(s
)) (Y
2
(s) X(s) Y
3
(s
)) (Y
3
(s) X(s) Y
3
(s
))]
st(s < t Y
3
(t)))
General Case A = (Q, {0, 1}
n
, q
1
, , F) Q = {q
1
, . . . , q
m
}
(X
1
, . . . , X
n
) : Y
1
. . . Y
m
(Partition(Y
1
, . . . Y
m
)Y
1
(0) s
_
(q
i
,a,q
j
(Y
i
(s)X
a
(s)Y
j
(s))st(s <
t
_
q
i
F
Y
i
(t))
Partition (Y
1
, . . . , Y
m
) :
_
m
i=1
Y
i
(s) s
_
ij
(Y
i
(s) Y
j
(s))
For a = (b
1
, . . . , b
n
) b
1
{0, 1} write X
a
(s) for (b
1
)X
1
(s) (b
n
)X
n
(s) where b
i
=
_
_
empty b
i
= 1
b
i
= 0
[] From S1S-Formulas to b uchi-automata
Simplify formalism S1S to S1S
0
with second order variables only.
S1S
0
has new atomic formulas :
S ing(X) for X is a singleton
S ucc(X, Y) for X = {s}, Y = {t} with s
= t
X Y
Lemma S1S formulas can be rewritten as S1S
0
-formulas
Proof Apply the following steps: Eliminate 0: X(=) s(X(s) tt
= s)
Eliminate iterations of
X(s
) t(s
= t X(t
))
Eliminate <: s < t t is in successor closure of s
X(X(s
) z(X(z) X(z
)) X(t))
Get S1S-formulas with atomic formulas s
= t X(s) only
From such formulas obtain an equivalent S1S
0
formula.
Example: Xst(s = t
, X(s))
XS (S ing(S ) T(S ing(T)S ucc(T, S )S X) Lemma Each S1S
0
formula (X
1
, . . . , X
n
)canbe
transformed into an equivalent B uchi-automaton.
Proof by induction on S!S
0
-formulas.
20
CHAPTER 3. MONADIC THEORY OF ONE SUCCESSOR (S1S) 21
Atomic formulas S ing(X
1
)
1
0 0
S ucc(X
1
, X
2
)
_
1
0
_
_
0
0
_
_
0
0
_
_
0
1
_
X
1
X
2
For induction step assume that only connectives remain (, , have been elimi-
nated)
Consider (X
1
, . . . X
m
), assume by ind B uchi automaton A for
Use B uchi-aut. complementation to nd automaton for
:
1
(X
1
. . . )
2
(X
1
. . . ), assuming B uchi aut. A
1
, A
2
. Use union automation of A
1
, A
2
Consider X(X
1
, . . . , X
m
, X) assuming B uchi-aut. A
over {0, 1}
m+1
Find autom. over {0, 1}
m
Example: (X
1
, X)
_
0
0
_
_
1
1
_
_
0
1
_
_
0
1
_
New automaton reads only rst component ans messes second comp. with this simulating
given automaton.
Implementation: Delete second components in the given automaton:
1
0
10.1.06
From S1S-formulas to B uchi-automaton (X
1
, . . . , X
n
) A
over = {0, 1}
n
such that for each
({0, 1}
n
)
(X
1
, . . . , X
n
) A
accepts
Illustration (X
1
) : s(X
1
(s) X
1
(s
))
First Step: Rewriting as S1S
0
-Formula:
st(X
1
(s) s
= t X
1
(t))
X
2
X
3
(X
2
X
1
S ucc(X
2
, X
3
) X
3
X
1
)
.,,.
(X
1
,X
2
,X
3
)
21
22 CHAPTER 3. MONADIC THEORY OF ONE SUCCESSOR (S1S)
X
2
= {s}, X
3
= {t}
Automaton for X
2
X
1
S ucc(X
2
, X
3
)
(1,1,0) (0,0,1)
(0/1,0,0,)
(0/1,0,0)
formula equivalent to A
, <, 0) A
has a successful run (state sequence with infenitely many visits of nal state)
Hence: For each S1S-sentence one can decide whether it is true in (N,
m, <, 0)
Example:
stt < s false (take s=0)
X (X(0) s(X(s) X(s
, <, 0) is decidable
Background: G odels result on undecidability of rst-order arithmetic (for the structure (N, +, , 0, 1, <)
Example:
x(x < y z
1
z(z
1
z
2
= y z
1
= 1 z
2
= 1)
.,,.
y is prime
There are innitely many primes.
xy(x < y y is prime y + 1 + 1 is prime There are ininitely many twin primes.
Remark:
Remak (G odel): The full second-order theory (with quantication over relations) of (N,
, <, 0) is unde-
cidable.
Proof:
By second-order denitions of + ans
x +y = z each relation wich contains (0, x) and is closed under successor in both components mus
contain (y, z)
R((0, x) R (s, t)((s, t) R (s
, t
) R) (y, z) R)
x y = z analogously, using +
22
CHAPTER 3. MONADIC THEORY OF ONE SUCCESSOR (S1S) 23
Decidability? (Tarstei) What about monadic quantication? (Quantiers over sets only) Solution by
B uchi.
Th(N, +, <, 0, 1) Th(N, , <, 0, 1) decidable (Presburger, Skolem)
Consequence 3 Monadic theory of a structure (N,
, <, 0, P) A
accepts
p
p
(i) =
_
_
1 i P
0 i P
P primes: 001101010001
dots
Example:
For P = primes st(s < t P(t) P(t
, succ
0
, succ
1
, ) succ
0
(w) = w0 and succ
1
(w) = w1
Introduce monadic second order language as before with succ
0
, succ
1
instead of
.
S 2S is the corresponding logical system.
Theorem 9 (Rabin, 1969) MTh({0, 1}
, succ
0
, succ
1
, ) is decidable.
Format of the grid: G
2
= (N N, succ
1
, succ
2
, (0, 0))
succ
1
(x, y) = (x + 1, y) succ
2
(x, y) = (x, y + 1)
Theorem 10 (Seese, 1975) Mth(G
2
) is undecidable
Proof:
Use reduction of the halting problem for Turing machines.
Task: Given TM M, construct sentence
M
s.t. M halts started on empty tape G
2
M
Use TM on left-bounded tape
TM-computation is sequence of congurations C
0
, C
1
, C
2
, . . .
Convention: Repeat halting conguration
Halting signalled by stop state q
s
Idea Express existence of halting computing computation of M by requiring a corresponding labelling
od G
2
C
0
q
0
. . . q
0
1Rq
1
C
1
1 q
1
. . . q
1
1Nq
0
C
2
1 q
0
1 . . .
For construction of
M
use work-alphabet {a
0
, . . . , a
n
} and M-states q
0
, . . . , q
k
Introduce X
0
, . . . , X
n
, Y
1
, . . . , Y
k
X
i
= set of positions where a
i
occurs
Y
j
= set of positions where q
j
occurs
M
: X
0
, . . . , X
n
Y
1
, . . . , Y
k
(Partition (X
0
, . . . , Y
k
)
rst row corresponding to inital conf. (empty tape) [Y
0
(0, 0) y(S
+
2
((0, 0), y) X
0
(y))]
each successor row corresponds to successor conguration of preceeding row
xY
k
(x)
For () with down condition on 2 4 boxes of grid.
q
0
1 q
1
Because the Turing Maching is
24
CHAPTER 3. MONADIC THEORY OF ONE SUCCESSOR (S1S) 25
deterministic: For each labelling wich starts in the rst row and wich continues in admissible windows,
a stop state will be reached.
25
4 Model-Checking and Temporal Logics
Model-Checking-Problem: Given Structure/System S YS , specication S PEC .
Does S YS satisfy S PEC?
Plan: Formalisation/ automata-theoric approach.
1. Kripke structures as system models
2. Basic specications
3. Formal specication languages
[S 1S ]: model-checking is very hard(O(2)
2
2
.
.
.
2
(exp. k times), non elementary
Introduce temporal logic LTL, show that M.C. is PSPACE-complete
4. Use automata to solve the m.c. problem
1. Kripke Structures:
Let p
1
. . . p
n
atomic propositions (base state properties)
A Kripke structure over p
1
. . . p
n
is a tuple M = (S, R, ) where
S is a nite set of states
R is a transition relation, R S S ((s
1
, s
2
R: the system can go from s
1
to state s
2
)
is a labelling function, : S S
p
1
...p
n
p
i
(S ): the base property p
i
is true at state s.
Example: trac light, three atomic propositions:
p
1
red light is on
p
2
yellow light is on
p
3
green light is on
S
1
p
1
S
2
p
1
, p
2
S
3
p
3
S
4
p
2
Notations:
a) A pointed K.S. is a K.S. M = (S, R, ) with an initial state s S
26
CHAPTER 4. MODEL-CHECKING AND TEMPORAL LOGICS 27
b) Usually, we write (s) as a bit vector (B)
n
:
_
_
b
1
.
.
.
b
n
_
_
: b
i
= 1 i p
i
(S )
c) Convention we dont allow...
Denition
1) A Path through a K.S. M = (S, Q, )(M, S ) is an ininite sequence of states s
0
, s
1
, s
2
. . . with:
s
0
= s
(s
i
, s
i+1
) R for all i N
2) Label sequences for a path s
0
s
1
s
2
. . . is the -word (s
0
)(s
1
) . . .
3) The language of (M, S ) is the set of label sequences of paths through (M, S ), we write L(M, s)
(B)
for L()
and check wether L(A
M,s
) L(A
)
Formulation of given often in linear time temporal logic LTL (in fact, subsystem of S1S).
Plan: Introduce LTL
Sketch translation from LTL B uchi aut.
Solve MC Problem
27
28 CHAPTER 4. MODEL-CHECKING AND TEMPORAL LOGICS
4.0.1 LTL
Basic sequence properties (over two state properties p
1
, p
2
)
Guaranteed property: sometime p
1
becomes true (E-aut.) [Fp
1
]
Safety property: alwys p
1
is true (A-aut.) [Gp
1
]
Periodicity property: Initially p
1
is trie , and p
1
is true precisely every third moment. (A-aut.) [p
1
Xp
1
XXp
1
G(p
1
XXXp
1
)]
Obligation property: Sometimes p
1
is true, and p
2
is never true (SW-aut.) [Fp
1
Fp
2
Fp
1
Gp
2
]
Recurrence property: Again and again, p
1
is true (B uchi-condition) [GFp
1
]
Request-response property: Always when p
1
holds, then sometime later p
2
holds [G(p
1
XFp
2
]
Until property: Always when p
1
holds, sometime later p
1
holds and in the meantime p
2
holds. [G(p
1
X(p
2
Up
1
))]
Fariness property: If p
1
is true again and again, so is p
2
[GFp
1
GFp
2
]
Fomalisations with temporal operators:
X next F sometimes
G always U until
Remark:
All formulas can be expressed by B uchi automata over {0, 1}
2
Periodicity:
_
0
_
_
1
_ _
0
_
obligtion:
_
1
0
_
_
0
0
_
_
0
_
recurrence:
_
0
_
_
1
_
_
1
_
_
0
_
28
CHAPTER 4. MODEL-CHECKING AND TEMPORAL LOGICS 29
LTL-Syntax
LTL-formulas over p
1
. . . p
n
are dened inductively as follows:
p
i
ist LTL formula (i = 1, . . . , n)
If , are LTL-formulas, then also , , , , [, ] suces
If , are LTL-formulas, then also X F G U
In -sequences over = {0, 1}
n
Notation:
For ({0, 1}
n
)
, = (0)(1)
i
= (i)(i + 1)(i + 2) . . .
((i))
j
= j-th component of (i)
Satisfaction relation
i
is dened inductively:
i
p
j
((i))
j
= 1
i
not
i
similarly for , ,
i
X
i+1
i
F j i
j
i
G
f orall j i
j
i
U j i(
j
k(i k < j
k
))
Example:
GFp
1
(0
0
GFp
1
j 0
j
Fp
1
jk j
k
p
1
.,,.
((k))
1
=1
innitely often p
1
is true
Evaluation of LTL-formulas
: F(p
1
X(p
2
Up
1
))
Expension of
=
_
1
0
_ _
0
1
_ _
1
1
_ _
0
0
_ _
1
0
_ _
0
1
_ _
0
1
_ _
0
1
_
. . .
p1 0 1 0 1 0 1 1 1 . . .
p
2
1 0 0 1 1 0 0 0 . . .
p
2
Up
1
1 0 1 1 1 0 0 0 . . .
X(p
2
Up
1
0 1 1 1 0 0 0 0 . . .
p
1
X(p
2
Up
1
) 0 1 0 1 0 0 0 0 . . .
F(p
1
X(p
2
Up
1
)) 1 1 1 1 0 0 0 0 . . .
Theorem 11 (Main Theorem) An LTL formula over p
1
. . . p
n
can be transformed into a B uchi automaton
A
over = {0, 1}
n
such that for all
j
=
j
1
: ((i))
j
= 1 ((i))
j
1
= 0
j
=
j
1
j
2
: ((i))
j
= 1 ((i))
j
1
or (i))
j
2
= 1
j
= X
j
1
: ((i))
j
= 1 ((i + 1))
j
1
= 1
j
=
j
1
U
j
2
: ((i))
j
= 1 ((i))
j
2
= 1 (((i))
j
1
=
1 (((i))
j
2
= 0 in the last case (U-Formula): there is no k s.t. for i > k ((i))
j
= 1 but ((i))
j
2
= 0. 7.2.06
4.0.2 LTL B uchi automata
Comaprison LTL - FO (rst order logic over -words)
Example:
G(p
1
X(p
2
Up
1
)) p
1
at time x X
1
(x)
s (X
1
(s) t (s < t X
1
(t) r(s < r < t X
2
(r)))
Theorem 12 LTL and FO are of same expressive Power.
Proof:
LTL FO: easy by induction
FO LTL: Difcult. (superexponential blowup in formula length)
Intuition: FO-Quantication can be restricted to intervals [s, t] (r(s < r < t . . . ))
Illustration for LTL: p
1
X(p
2
Fp
3
)Up
1
)
Theorem 13 a) An LTL-formula with m distinct subformulas can be translated into a B uchi automaton
with O(2
m
) states.
b) An FO-formula with m connectives is translatable to B uchi aut with m
_
_
2
m
.
.
.
2
states
30
CHAPTER 4. MODEL-CHECKING AND TEMPORAL LOGICS 31
Translation LTL B uchi automata via alternating B uchi automata (ABA)
Idea of alternating automaton: Allow existential (or-) branching as in nondet. aut. and universal (and-)
branching.
Example:
q
0
q
1
q
2
a b
a,b
a
b
Run tree on input
b a b b a a b
. . .
q
0
q
0
q
0
q
0
q
0
q
0
q
0
q
0
q
0
q
1 f f
q
1
q
2
q
2
q
2
q
2
. . .
Nondetdermin-
ism generates different run trees (for each nondet. choice a new run tree).
Alt. B uchi automaton accepts iff exists run tree on such that all branches of it are successful (end
in tt or visit nal state ininitely often)
Theorem 14 An LTL-formula can be translated into an Alt. B uchi automaton where the set of states is the
set of subformulas (with f f , tt)
IllustrationFGp
1
(input alphabet: = {0, 1})
FGp
1
GP
1
tt
f f
0 0
1
0
1
31
32 CHAPTER 4. MODEL-CHECKING AND TEMPORAL LOGICS
0 0 0 0 0 0
.
.
.
Second Step: Transformation of ABA into standard B uchi automaton
As states use sets of ABA-states, updated according to the growth of ABA run tree(s)
Comparison of LTL (or FO) with B uchi automata (or S1S)
Theorem 15 B uchi automata are strictly more expressive then LTL
Example:
L
0
= (00)
is not LTL-denable.
q
0
q
3
q
1
1
0 0
1
L = (10)
is LTL-denable.
Proof:
Proof strategy
Introduce property non-counting for -languages L
Show that each LTL-def -language has this property
L
0
= (00)
(oo)
: xy
n
L
0
, xy
n+1
L
0
32
CHAPTER 4. MODEL-CHECKING AND TEMPORAL LOGICS 33
4.1 Beyond reular -languages
Scale of complexity for -languages:
Level 1: -languages of form L = W
L ex. prex in W, W
)
General construction: Borel hierarchy
Level 1
1
class of L = W
with W
1
: class of complements of
1
-languages
Level (n+1)
(n+1)
: class of countable unions
_
i
L
i
with L
i
n
n+1
class of countable intersections
_
i
L
i
with L
i
n
Remark:
2
= class of languages limW
33
Contents
1 Introduction 3
1.1 The Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 B uchi automata and regular -languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Towards characterization of B uchi recognizable -languages . . . . . . . . . . . . . . . . . 5
1.4.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Complementation of B uchi automata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Acceptance Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6.1 Strict inclusion claims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6.2 Deciding the levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6.3 Landwebers Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7 Weak automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Determinization 13
3 Monadic Theory of one successor (S1S) 18
3.1 Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.1 Connection from S1S to B uchi-automata . . . . . . . . . . . . . . . . . . . . . . . 19
3.3 The binary Tree and the two-dimensional Grid . . . . . . . . . . . . . . . . . . . . . . . . . 24
4 Model-Checking and Temporal Logics 26
4.0.1 LTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.0.2 LTL B uchi automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.1 Beyond reular -languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
34