|
|
|
|
Chapter 7 in the textbook: |
|
Games for SO, application to reachability |
|
Buchi’s theorem |
|
Star Free Languages |
|
Tree automata |
|
|
|
|
Proof |
|
Part 1: regular languages µ MSO |
|
|
|
Every regular language is in 9MSO
[in class] |
|
|
|
Every regular language is in 8 MSO
[in class] |
|
|
|
|
MSO µ regular languages |
|
This is harder: let f 2 MSO. Need to show that the set {M | M ² f} is
regular |
|
|
|
Proof 1 (not in the book): induction on f [in
class] |
|
|
|
Proof 2 (from the book): using types [in class] |
|
|
|
|
Corollary
Over strings, 9 MSO = 8 MSO = MSO |
|
|
|
Does this hold in general ? |
|
|
|
|
Consider s = {<} |
|
|
|
A structure M = a string in {1}* = a
number |
|
|
|
|
|
|
Proposition Hamiltonean path on undirected
graphs is not definable in MSO |
|
|
|
|
|
Proof in class |
|
|
|
|
Let S = {a,b,c}
(can be larger in general) |
|
A regular language is defined by the
grammar:
E ::= ;
E ::= e | a
| b |
c
E ::= E [ E
E ::= E.E
E ::= E* |
|
A star-free regular language:
drop E*,
add E (need overline, not
underline) |
|
|
|
|
Which of the following are star-free ? |
|
|
|
|
|
|
|
|
|
|
|
Theorem
L is star-free iff it is in FO.
L is regular iff it is in MSO |
|
|
|
|
|
A ranked alphabet is a set S and r : S ! N |
|
For a 2 S, r = r(a) ¸ 0 is it’s rank; also write
ar |
|
Rank(S)=max(r(a) | a 2 S) |
|
|
|
A ranked tree T is a tree labeled with symbols
in S s.t. each node x labeled with a has exactly r(a) children |
|
|
|
|
Notations: |
|
|
|
Trees(S) |
|
|
|
A tree language is L µ Tree(S) |
|
|
|
This generalizes languages over strings (why ?) |
|
|
|
|
Symbolic expressions:
S =
{a,b,c,f1,g2,h2,k3} |
|
|
|
|
A = (S, Q, q0, d, F) where:
q0
2 Q, F µ Q
d is a set of
tuples of the form: |
|
(w, a, q) w 2 Q*,
a 2 S, q 2 Q, s.t. |w| = r(a) |
|
|
|
Execution: given a tree T, A executes
bottom up or top down [show in
class] |
|
A language L µ Tree[S] is a regular tree
language iff there exists A s.t. L = {T | T accepted by A} |
|
|
|
|
Example: S = {0,1,:, Æ, Ç} |
|
|
|
A = (S, Q, q0, d, F) |
|
Q = {false, true} |
|
q0 = (not needed) |
|
F = { true } |
|
d = (e,
0, false), (e, 1, true)
(false, :,
true), (true, :, false)
(false.false, Æ,
false), …, (true.true, Æ, true)
(false.false, Ç,
false), …, (true.true, Ç, true) |
|
|
|
|
Let’s restrict to Rank(S) = 2
easy to generalize |
|
Let s = {<, (Pa)a 2
S, succ1, succ2} |
|
Consider only structures in STRUCT[s] that are
trees, where < is the ancestor-descendant relation, and succ1,
succ2 are the left and right child respectively |
|
|
|
|
|
|
Theorem A set of trees is definable in MSO iff
it is regular |
|
|
|
Proof: almost identical to Buchi’s theorem |
|
|
|
What are star-free regular tree languages ? |
|