Algorithms for hard problems Automata and tree automata
Algorithms for hard problems Automata and tree automata Juris Viksna, 2020
Finite deterministic automata initial state accepting state transition state [Adapted from P. Drineas]
Finite deterministic automata Finite Automaton (FA) : set of states : input alphabet : transition function d: Q× Q : initial state : set of accepting states [Adapted from P. Drineas] L(M) = set of all words accepted by M
Finite non-deterministic automata A word is accepted by NFA, if there exists an accepting path from the initial state to a final state [Adapted from P. Drineas]
Finite non-deterministic automata Set of states, i. e. Input aplhabet, i. e. Transition function d: Q×( ) P(Q) Initial state Accepting states L(M) = set of all words accepted by M [Adapted from P. Drineas]
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 0, 1 q 1 1 q 2 0, q 3 1 q 4 Nondeterministic finite automaton M [Adapted from S. Yukita]
Some basic results 0 q 000 1 q 100 0 q 010 0 q 110 1 0 0 1 q 001 q 101 1 q 011 1 q 111 1 Deterministic finite automaton equivalent to M [Adapted from S. Yukita]
Some basic results [Adapted from R. Downey, M. Fellows] Nondeterministic finite automaton M
Some basic results [Adapted from R. Downey, M. Fellows] Corresponding deterministic finite automaton M
Some basic results NDF with transitions [Adapted from R. Downey, M. Fellows]
Some basic results Corresponding NDF without transitions [Adapted from R. Downey, M. Fellows]
Regular expressions [Adapted from R. Downey, M. Fellows]
Regular languages [Adapted from R. Downey, M. Fellows]
Regular languages = languages accepted by DFA/NFA [Adapted from R. Downey, M. Fellows]
Regular languages = languages accepted by DFA/NFA [Adapted from R. Downey, M. Fellows]
Regular languages = languages accepted by DFA/NFA [Adapted from R. Downey, M. Fellows]
Regular languages = languages accepted by DFA/NFA [Adapted from R. Downey, M. Fellows]
Congruences [Adapted from R. Downey, M. Fellows]
Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Myhill’s congruence [Adapted from R. Downey, M. Fellows]
Myhill’s congruence Proof. L has f. i. Obvious (from definitions) 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 xi and xj for some i j by considering uxiv and uxjv. 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 uxi. Otherwise u 1, u 2, u 3, . . . will form an infinite set of L equivalences classes.
Pumping Lemma [Adapted from R. Downey, M. Fellows]
Myhill’s congruence [Adapted from R. Downey, M. Fellows]
Construction of automata [Adapted from R. Downey, M. Fellows]
Construction of automata [Adapted from R. Downey, M. Fellows]
Construction of automata [Adapted from R. Downey, M. Fellows]
State minimization [Adapted from R. Downey, M. Fellows]
State minimization [Adapted from R. Downey, M. Fellows]
State minimization example [Adapted from R. Downey, M. Fellows]
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 A → a. B A→ε - where A is a non-terminal in N and a is a terminal in Σ - where A and B are in N and a is in Σ - 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 A → Ba A→ε - where A is a non-terminal in N and a is a terminal in Σ - where A and B are in N and a is in Σ - where A is in N and ε is the empty string. Both right and left grammars generate regular languages
Automata and parameterized algorithms [Adapted from J. Flum, M. Grohe]
Tree automata [Adapted from R. Downey, M. Fellows]
Tree automata [Adapted from R. Downey, M. Fellows]
Tree automata [Adapted from R. Downey, M. Fellows]
Tree automata [Adapted from R. Downey, M. Fellows]
Tree automata [Adapted from R. Downey, M. Fellows]
Tree automata [Adapted from R. Downey, M. Fellows]
Tree grammars [Adapted from R. Downey, M. Fellows]
Tree grammars [Adapted from R. Downey, M. Fellows]
Tree grammars - example [Adapted from R. Downey, M. Fellows]
Tree grammars - example [Adapted from R. Downey, M. Fellows]
Normalized tree grammars [Adapted from R. Downey, M. Fellows]
Normalized tree grammars [Adapted from R. Downey, M. Fellows]
Kleene’s theorem for trees [Adapted from R. Downey, M. Fellows]
Kleene’s theorem for trees [Adapted from R. Downey, M. Fellows]
Regular tree expressions [Adapted from R. Downey, M. Fellows]
Regular tree expressions X Y is still forgotten [Adapted from R. Downey, M. Fellows]
Regular tree expressions [Adapted from R. Downey, M. Fellows]
Kleene’s theorem for trees (II) [Adapted from R. Downey, M. Fellows]
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. . . aas. M(V, j, 0) additionally allows for qi instead of ai. [Adapted from R. Downey, M. Fellows]
Kleene’s theorem for trees (II) [Adapted from R. Downey, M. Fellows]
Equivalence relation for tree languages [Adapted from R. Downey, M. Fellows]
Trees - Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Trees - Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
Trees - Myhill-Nerode theorem [Adapted from R. Downey, M. Fellows]
- Slides: 59