Automata and Formal Languages II
Tree Automata Peter Lammich SS 2015
1 / 161
Automata and Formal Languages II Tree Automata Peter Lammich SS - - PowerPoint PPT Presentation
Automata and Formal Languages II Tree Automata Peter Lammich SS 2015 1 / 161 Overview by Lecture Apr 14: Slide 3 Apr 21: Slide 2 Apr 28: Slide 4 May 5: Slide 50 May 12: Slide 56 May 19: Slide 64 May 26: Holiday
1 / 161
2 / 161
3 / 161
4 / 161
5 / 161
q0 qF
6 / 161
7 / 161
8 / 161
9 / 161
10 / 161
11 / 161
12 / 161
13 / 161
14 / 161
15 / 161
A t′ rewrites a node in the tree
16 / 161
17 / 161
l
l → ql
l ) to list (ql)
18 / 161
19 / 161
20 / 161
21 / 161
22 / 161
23 / 161
24 / 161
25 / 161
26 / 161
27 / 161
28 / 161
29 / 161
30 / 161
31 / 161
32 / 161
33 / 161
1 L(A) is non-empty, iff ∃t ∈ L(A).height(t) ≤ |Q| 2 L(A) is infinite, iff ∃t ∈ L(A).|Q| < height(t) ≤ 2|Q|
1 Remove duplicate states of accepting run repeatedly 2 =
34 / 161
35 / 161
36 / 161
37 / 161
1), . . . , (qn, q′ n)) → (q, q′) |
1, . . . , q′ n) → q′ ∈ ∆2}
38 / 161
39 / 161
40 / 161
41 / 161
42 / 161
43 / 161
44 / 161
45 / 161
46 / 161
47 / 161
f, ∆′):
f = Qf
p ∈ Q′
p1, . . . , qr pk) → qr ∈ ∆′
p ∈ ∆′
ε → q ∈ ∆′
48 / 161
ε → q.
p ∈ ∆′, qi ∈ Q (use IH)
49 / 161
50 / 161
51 / 161
52 / 161
f, ∆′) be a DFTA with L = L(A′)
f, ∆), with the rules
53 / 161
54 / 161
55 / 161
56 / 161
57 / 161
58 / 161
1 L is a regular tree language 2 L is the union of some equivalence classes of a finite-index congruence 3 ≡L is of finite index
59 / 161
60 / 161
1 L is a regular tree language 2 L is the union of some equivalence classes of a finite-index congruence 3 ≡L is of finite index 1 → 2
2 → 3
3 → 1
61 / 161
62 / 161
1 Start with P = {Qf, Q \ Qf} 2 Refine P. Let P′ be the new value. Set qP′q′, if
3 Repeat until no more refinement possible 4 Define Amin := (Qmin, F, Qminf, δ), where
63 / 161
64 / 161
65 / 161
66 / 161
67 / 161
68 / 161
1, . . . , q′ n) ∈ ∆ =
1 ∧ . . . ∧ qn = q′ n
69 / 161
70 / 161
71 / 161
72 / 161
G t′
73 / 161
G C[n]
74 / 161
1 Remove unproductive non-terminals
2 Remove unreachable nonterminals
75 / 161
76 / 161
77 / 161
78 / 161
79 / 161
80 / 161
81 / 161
82 / 161
83 / 161
84 / 161
85 / 161
86 / 161
n times
1 ]
87 / 161
88 / 161
i|qi∈QF T(i, n, ∅)
89 / 161
90 / 161
91 / 161
92 / 161
93 / 161
94 / 161
95 / 161
τ
τ
x=y
τ
96 / 161
97 / 161
a
98 / 161
a
a
l
a1
an
99 / 161
a
a
a
γ
τ
100 / 161
101 / 161
τ
τ
x=y
τ
τ
τ
τ
x=y
102 / 161
a
a
a
a
a
a
a
a
a
a
τ
τ
103 / 161
a
a
a
a
a
τ
104 / 161
a
τ
τ
105 / 161
106 / 161
l
107 / 161
108 / 161
l
l
l
l
l
l1
l2
l
l
l1
l2
109 / 161
110 / 161
111 / 161
112 / 161
113 / 161
a
a
a
a
114 / 161
115 / 161
116 / 161
a
a
a
a
117 / 161
a
118 / 161
119 / 161
120 / 161
a
τ
τ
a
a
τ
a
a
121 / 161
a
a
a
a
122 / 161
a
a
a
a
a
a
a
a
a
a
a
a
a
a
τ
τ
123 / 161
l
124 / 161
125 / 161
s
s1
s2
126 / 161
127 / 161
128 / 161
129 / 161
130 / 161
131 / 161
132 / 161
133 / 161
134 / 161
i=1...m
j=1...3 lij is called clause
135 / 161
136 / 161
137 / 161
138 / 161
1γ0 1, p0 2γ0 2, ∆)
1γ0 1, p0 2γ0 2: Initial states of left and right PDS
139 / 161
a
a
a
a
140 / 161
a
a
l
1w′ 1, p′ 2w′ 2, L′)
l1
1w′ 1 ∧ p2w2 l2
2w′ 2 ∧ (l1, l2, L) l
141 / 161
1γ0 1, p0 2γ0 2)
l
1w′ 1, p′ 2w′ 2, L′)
1w′ 1 ∧ c(t2) = p′ 2w′ 2
l
142 / 161
143 / 161
144 / 161
145 / 161
146 / 161
147 / 161
148 / 161
149 / 161
150 / 161
a
a
151 / 161
a
a
152 / 161
153 / 161
a
a
a
a
a
l
l
154 / 161
155 / 161
l
156 / 161
157 / 161
158 / 161
159 / 161
✿✿✿
✿✿✿
✿✿
160 / 161
161 / 161