Download presentation
Presentation is loading. Please wait.
Published byTheodore Barnett Modified over 9 years ago
1
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015
2
Finite deterministic automata initial state accepting state transition [Adapted from P.Drineas]
3
Finite deterministic automata [Adapted from P.Drineas] Finite Automaton (FA) : set of states : input alphabet : transition function : Q× Q : initial state : set of accepting states L(M) = set of all words accepted by M
4
Finite non-deterministic automata [Adapted from P.Drineas] A word is accepted by NFA, if there exists an accepting path from the initial state to a final state
5
Finite non-deterministic automata [Adapted from P.Drineas] Set of states, i.e. Input aplhabet, i.e. Transition function : Q×( P(Q) Initial state Accepting states L(M) = set of all words accepted by M
6
Some basic results the class of languages accepted by NFAs with -transitions is the same as the class of languages accepted by NFAs without -transitions the class of languages accepted by NFAs is the same as the class of languages accepted by DFAs q3q3 q1q1 q2q2 0,1 1 0, q4q4 0,1 1 [Adapted from S.Yukita] Nondeterministic finite automaton M
7
Some basic results [Adapted from S.Yukita] q 010 q 000 q 100 00 q 110 q 011 q 001 q 101 q 111 1 0 1 0 0 1 0 1 1 01 1 Deterministic finite automaton equivalent to M
8
Some basic results Nondeterministic finite automaton M [Adapted from R.Downey, M.Fellows]
9
Some basic results Corresponding deterministic finite automaton M [Adapted from R.Downey, M.Fellows]
10
Some basic results NDF with transitions [Adapted from R.Downey, M.Fellows]
11
Some basic results Corresponding NDF without transitions [Adapted from R.Downey, M.Fellows]
12
Regular expressions [Adapted from R.Downey, M.Fellows]
13
Regular languages [Adapted from R.Downey, M.Fellows]
14
Regular languages = languages accepted by DFA/NFA [Adapted from R.Downey, M.Fellows]
15
Regular languages = languages accepted by DFA/NFA [Adapted from R.Downey, M.Fellows]
16
Regular languages = languages accepted by DFA/NFA [Adapted from R.Downey, M.Fellows]
17
Regular languages = languages accepted by DFA/NFA [Adapted from R.Downey, M.Fellows]
18
Congruences [Adapted from R.Downey, M.Fellows]
19
Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
20
Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
21
Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
22
Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
23
Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
24
Myhill’s congruence [Adapted from R.Downey, M.Fellows]
25
Myhill’s congruence Proof. L has f.i. L has f.i. Obvious (from definitions) L has f.i. L has f.i. ??? Assume the contrary. Then there are infinite number of L equivalence classes x 1,x 2,x 3,... Consider all pairs u,v that can be used to show nonequivalence of x i and x j for some i j by considering ux i v and ux j v. If there is finite number of choices of u in such pairs then there will be u for which we will have an infinite number of L equivalences classes in form ux i. Otherwise u 1,u 2,u 3,... will form an infinite set of L equivalences classes.
26
Pumping Lemma [Adapted from R.Downey, M.Fellows]
27
Myhill’s congruence [Adapted from R.Downey, M.Fellows]
28
Construction of automata [Adapted from R.Downey, M.Fellows]
29
Construction of automata [Adapted from R.Downey, M.Fellows]
30
Construction of automata [Adapted from R.Downey, M.Fellows]
31
State minimization [Adapted from R.Downey, M.Fellows]
32
State minimization [Adapted from R.Downey, M.Fellows]
33
State minimization - example [Adapted from R.Downey, M.Fellows]
34
Regular grammars A right regular grammar is a formal grammar (N, Σ, P, S) such that all the production rules in P are of one of the following forms: A → a - where A is a non-terminal in N and a is a terminal in Σ A → aB - where A and B are in N and a is in Σ A → ε - where A is in N and ε denotes the empty string, i.e. the string of length 0. In a left regular grammar all rules obey the forms: A → a - where A is a non-terminal in N and a is a terminal in Σ A → Ba - where A and B are in N and a is in Σ A → ε - where A is in N and ε is the empty string. Both right and left grammars generate regular languages
35
Automata and parameterized algorithms [Adapted from J.Flum,M.Grohe]
36
Tree automata [Adapted from R.Downey, M.Fellows]
37
Tree automata [Adapted from R.Downey, M.Fellows]
38
Tree automata [Adapted from R.Downey, M.Fellows]
39
Tree automata [Adapted from R.Downey, M.Fellows]
40
Tree automata [Adapted from R.Downey, M.Fellows]
41
Tree automata [Adapted from R.Downey, M.Fellows]
42
Tree grammars [Adapted from R.Downey, M.Fellows]
43
Tree grammars [Adapted from R.Downey, M.Fellows]
44
Tree grammars - example [Adapted from R.Downey, M.Fellows]
45
Tree grammars - example [Adapted from R.Downey, M.Fellows]
46
Normalized tree grammars [Adapted from R.Downey, M.Fellows]
47
Normalized tree grammars [Adapted from R.Downey, M.Fellows]
48
Kleene’s theorem for trees [Adapted from R.Downey, M.Fellows]
49
Kleene’s theorem for trees [Adapted from R.Downey, M.Fellows]
50
Regular tree expressions [Adapted from R.Downey, M.Fellows]
51
Regular tree expressions [Adapted from R.Downey, M.Fellows] X Y is still forgotten
52
Regular tree expressions [Adapted from R.Downey, M.Fellows]
53
Kleene’s theorem for trees (II) [Adapted from R.Downey, M.Fellows]
54
Kleene’s theorem for trees (II) Unfortunately the definition of M(V,j,k) is never clearly explained... The current best guess is that M( ,j,k) refers to RE for reaching state j when processing trees with leaves labelled from . For V Q the labels are correspondingly from the set V . The final RE is union of all M( ,j,n+1) for j F. Initial M( ,j,0) is union of RE of both type a and type a 1 a... a a s. M(V,j,0) additionally allows for q i instead of a i. [Adapted from R.Downey, M.Fellows]
55
Kleene’s theorem for trees (II) [Adapted from R.Downey, M.Fellows]
56
Equivalence relation for tree languages [Adapted from R.Downey, M.Fellows]
57
Trees - Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
58
Trees - Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
59
Trees - Myhill-Nerode theorem [Adapted from R.Downey, M.Fellows]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.