Advanced Automata Theory Neterministic Finite Automata nfa Lecture
![Advanced Automata Theory Neterministic Finite Automata (nfa) Lecture #9 Advanced Automata Theory Neterministic Finite Automata (nfa) Lecture #9](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-1.jpg)
![Language & nfa Language & nfa](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-2.jpg)
![Let is be an nfa. The string accepted/recognized by M if The language accepted Let is be an nfa. The string accepted/recognized by M if The language accepted](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-3.jpg)
![Examples Examples](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-4.jpg)
![Example #1 Design an nfa for the following language L: The nfa does the Example #1 Design an nfa for the following language L: The nfa does the](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-5.jpg)
![In the later case the nfa switches to state q 1, and then it In the later case the nfa switches to state q 1, and then it](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-6.jpg)
![If there are more than 2 remaining symbols the nfa will stay in state If there are more than 2 remaining symbols the nfa will stay in state](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-7.jpg)
![Example #2 Design an nfa for the following language L: The nfa does the Example #2 Design an nfa for the following language L: The nfa does the](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-8.jpg)
![In state q 1, the machine read b it will go back to state In state q 1, the machine read b it will go back to state](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-9.jpg)
![Based on this discussion, the nfa, M can be designed as: q 1 b Based on this discussion, the nfa, M can be designed as: q 1 b](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-10.jpg)
![Example #3 Design nfas for the following languages L 1 and L 2, where Example #3 Design nfas for the following languages L 1 and L 2, where](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-11.jpg)
![The nfa recognizes L 1: b a q 0 q 1 The nfa recognizes The nfa recognizes L 1: b a q 0 q 1 The nfa recognizes](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-12.jpg)
![L 1 can be combined with L 2 to have L 3 = L L 1 can be combined with L 2 to have L 3 = L](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-13.jpg)
![nfa & Language nfa & Language](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-14.jpg)
![Example #4 Consider the following nfa, with Σ = {0, 1} 1 q 0 Example #4 Consider the following nfa, with Σ = {0, 1} 1 q 0](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-15.jpg)
![Example #5 Consider the following nfa, with Σ = {0, 1} q 2 0 Example #5 Consider the following nfa, with Σ = {0, 1} q 2 0](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-16.jpg)
![What is the language that can be accepted/recognized by the nfa. ∩ L(M) = What is the language that can be accepted/recognized by the nfa. ∩ L(M) =](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-17.jpg)
![Nondeterministic Finite Automata with transitions nfa-ε Nondeterministic Finite Automata with transitions nfa-ε](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-18.jpg)
![nfa. Let us consider the following two simple nfas , M 1 and M nfa. Let us consider the following two simple nfas , M 1 and M](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-19.jpg)
![Can the tow machines be combined into one machine M that accepting Concatenation of Can the tow machines be combined into one machine M that accepting Concatenation of](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-20.jpg)
![So the combined nfas , of M 1 and M 2 can be shown So the combined nfas , of M 1 and M 2 can be shown](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-21.jpg)
![Definition: nfa A nondeterministic finite automata nfa 5 -tuples : , where finite sets, Definition: nfa A nondeterministic finite automata nfa 5 -tuples : , where finite sets,](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-22.jpg)
![ε-closure of a set of states Let, and let S be subset of Q. ε-closure of a set of states Let, and let S be subset of Q.](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-23.jpg)
![Algorithm to calculate ε(S) 1. Start with T = S. 2. Make a sequence Algorithm to calculate ε(S) 1. Start with T = S. 2. Make a sequence](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-24.jpg)
![The definition of ε-closure help in defining recursively. Recursive definition of Let, be an The definition of ε-closure help in defining recursively. Recursive definition of Let, be an](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-25.jpg)
![](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-26.jpg)
![Example example Consider the following nfa-ε 0 ε q 1 1 1 q 3 Example example Consider the following nfa-ε 0 ε q 1 1 1 q 3](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-27.jpg)
![1. What is ε(S) if S = {q 5}? 2. What is if For 1. What is ε(S) if S = {q 5}? 2. What is if For](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-28.jpg)
![In the next iteration there is no more change. Therefore, ε(S) = {q 5, In the next iteration there is no more change. Therefore, ε(S) = {q 5,](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-29.jpg)
![For = {q 5, q 7, q 0 , q 1, q 2} For = {q 5, q 7, q 0 , q 1, q 2}](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-30.jpg)
![Example #6 Consider the following nfa-ε, with Σ = {0} ε q 1 0 Example #6 Consider the following nfa-ε, with Σ = {0} ε q 1 0](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-31.jpg)
![The language that accepted by this nfa: L(M) = k {0 | k is The language that accepted by this nfa: L(M) = k {0 | k is](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-32.jpg)
![dfa vs. nfa • In a dfa, at every state , for every symbol dfa vs. nfa • In a dfa, at every state , for every symbol](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-33.jpg)
![dfa vs. nfa • In a dfa, transition arrows are labeled by symbols from dfa vs. nfa • In a dfa, transition arrows are labeled by symbols from](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-34.jpg)
![Equivalence of dfa and nfa Every nfa has an equivalent dfa Let M = Equivalence of dfa and nfa Every nfa has an equivalent dfa Let M =](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-35.jpg)
![Conversion of a nfa to dfa The conversion can be carried out as follows: Conversion of a nfa to dfa The conversion can be carried out as follows:](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-36.jpg)
![](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-37.jpg)
![′ δ (R, a) is the set of all states that can be reached ′ δ (R, a) is the set of all states that can be reached](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-38.jpg)
![It can be concluded that, if A is a language, then A is regular It can be concluded that, if A is a language, then A is regular](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-39.jpg)
![Example Given the equivalent following dfa. nfa-ε, determine its Example Given the equivalent following dfa. nfa-ε, determine its](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-40.jpg)
![](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-41.jpg)
![Then the equivalent dfa will given by Then the equivalent dfa will given by](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-42.jpg)
![Example Consider the following nfa, N = (Q, Σ, δ, q, F), whose δ Example Consider the following nfa, N = (Q, Σ, δ, q, F), whose δ](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-43.jpg)
![Then, the nfa is: ε a q 0 q 1 a, b a q Then, the nfa is: ε a q 0 q 1 a, b a q](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-44.jpg)
![Example: Given the following nfa N, that accepts all words that begin with a Example: Given the following nfa N, that accepts all words that begin with a](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-45.jpg)
![Consider the following nfas N, with Σ = {0, 1} q 2 0 1 Consider the following nfas N, with Σ = {0, 1} q 2 0 1](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-46.jpg)
![Consider the following nfas N, with Σ = {0, 1} 0 ε q 1 Consider the following nfas N, with Σ = {0, 1} 0 ε q 1](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-47.jpg)
![Note: as general, nfas are more compact, they require fewer states to recognize a Note: as general, nfas are more compact, they require fewer states to recognize a](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-48.jpg)
- Slides: 48
![Advanced Automata Theory Neterministic Finite Automata nfa Lecture 9 Advanced Automata Theory Neterministic Finite Automata (nfa) Lecture #9](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-1.jpg)
Advanced Automata Theory Neterministic Finite Automata (nfa) Lecture #9
![Language nfa Language & nfa](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-2.jpg)
Language & nfa
![Let is be an nfa The string acceptedrecognized by M if The language accepted Let is be an nfa. The string accepted/recognized by M if The language accepted](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-3.jpg)
Let is be an nfa. The string accepted/recognized by M if The language accepted or recognized by M is the set L(M) of all strings accepted by M. For any language by M if L = L(M) is recognized
![Examples Examples](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-4.jpg)
Examples
![Example 1 Design an nfa for the following language L The nfa does the Example #1 Design an nfa for the following language L: The nfa does the](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-5.jpg)
Example #1 Design an nfa for the following language L: The nfa does the following: If it is in the start state q 0 and reads the symbol 1, then it either stay in q 0 or guesses this symbol is the third symbol from the right in the input string
![In the later case the nfa switches to state q 1 and then it In the later case the nfa switches to state q 1, and then it](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-6.jpg)
In the later case the nfa switches to state q 1, and then it verifies there are indeed two remaining symbols in the input string. This means the nfa switches to state q 2, and state q 3 (accept state) base on the next 2 input symbols (11) (from the input string).
![If there are more than 2 remaining symbols the nfa will stay in state If there are more than 2 remaining symbols the nfa will stay in state](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-7.jpg)
If there are more than 2 remaining symbols the nfa will stay in state q 3, after reading the next two symbols. Then, the nfa, M is given by: 0, 1 q 0 1 q 1 0, 1 q 2 0, 1 q 3
![Example 2 Design an nfa for the following language L The nfa does the Example #2 Design an nfa for the following language L: The nfa does the](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-8.jpg)
Example #2 Design an nfa for the following language L: The nfa does the following: If it is in the start state q 0 and reads the symbol a, it goes to state q 4 as final accepting state.
![In state q 1 the machine read b it will go back to state In state q 1, the machine read b it will go back to state](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-9.jpg)
In state q 1, the machine read b it will go back to state q 0, after that if the machine encountered a then it will go to the final accepting state q 4, otherwise it will either goes to state q 1 or state q 2. At state q 2, if the machine encountered b it will go to state q 3. if the machine reads a at q 3 it will go to state q 0 and it there is one more symbol and it is an a, the machine will go to state q 4, so that string will be accepted.
![Based on this discussion the nfa M can be designed as q 1 b Based on this discussion, the nfa, M can be designed as: q 1 b](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-10.jpg)
Based on this discussion, the nfa, M can be designed as: q 1 b b a q 0 a b q 2 b q 3 q 4
![Example 3 Design nfas for the following languages L 1 and L 2 where Example #3 Design nfas for the following languages L 1 and L 2, where](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-11.jpg)
Example #3 Design nfas for the following languages L 1 and L 2, where Then, combine the two machines in one nfa that accepts L 1 and L 2.
![The nfa recognizes L 1 b a q 0 q 1 The nfa recognizes The nfa recognizes L 1: b a q 0 q 1 The nfa recognizes](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-12.jpg)
The nfa recognizes L 1: b a q 0 q 1 The nfa recognizes L 2: a p 0 b p 1
![L 1 can be combined with L 2 to have L 3 L L 1 can be combined with L 2 to have L 3 = L](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-13.jpg)
L 1 can be combined with L 2 to have L 3 = L 1 L 2, i. e. L 3 = {a}{b}*{a}*{b}, then M 3 can be shown as follows a b q 0 a q 1 a, b q 2 b L(M) = {a}{b}*{a}*{b} b q 4
![nfa Language nfa & Language](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-14.jpg)
nfa & Language
![Example 4 Consider the following nfa with Σ 0 1 1 q 0 Example #4 Consider the following nfa, with Σ = {0, 1} 1 q 0](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-15.jpg)
Example #4 Consider the following nfa, with Σ = {0, 1} 1 q 0 0 q 1 1 q 2 1 What is L(M)? L(M) = {0}{1}*{0}*{1}U{1} q 3
![Example 5 Consider the following nfa with Σ 0 1 q 2 0 Example #5 Consider the following nfa, with Σ = {0, 1} q 2 0](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-16.jpg)
Example #5 Consider the following nfa, with Σ = {0, 1} q 2 0 1 0 0 0 q 0 0, 1 q 1 1 0, 1 q 3 1 0 q 4
![What is the language that can be acceptedrecognized by the nfa LM What is the language that can be accepted/recognized by the nfa. ∩ L(M) =](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-17.jpg)
What is the language that can be accepted/recognized by the nfa. ∩ L(M) = * * {0} {01} {1} * {1} {0}
![Nondeterministic Finite Automata with transitions nfaε Nondeterministic Finite Automata with transitions nfa-ε](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-18.jpg)
Nondeterministic Finite Automata with transitions nfa-ε
![nfa Let us consider the following two simple nfas M 1 and M nfa. Let us consider the following two simple nfas , M 1 and M](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-19.jpg)
nfa. Let us consider the following two simple nfas , M 1 and M 2 that accepting the two languages: , respectively over the alphabet 1 q 0 0 M 1 q 1 0 p 0 1 M 2 p 1
![Can the tow machines be combined into one machine M that accepting Concatenation of Can the tow machines be combined into one machine M that accepting Concatenation of](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-20.jpg)
Can the tow machines be combined into one machine M that accepting Concatenation of two the languages Union of two the languages The answer is yes only, we may need to add a new transition that doesn’t affect the behavior of the two machines, then comes the definition Nondeterministic Finite Automata, with which known as nfa- . of the transition,
![So the combined nfas of M 1 and M 2 can be shown So the combined nfas , of M 1 and M 2 can be shown](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-21.jpg)
So the combined nfas , of M 1 and M 2 can be shown as: 0 1 q 0 0 q 1 ε p 0 M 1 1 q 0 ε 1 0 ε p 0 0 M 2 q 1 M 1 1 M 2 p 1
![Definition nfa A nondeterministic finite automata nfa 5 tuples where finite sets Definition: nfa A nondeterministic finite automata nfa 5 -tuples : , where finite sets,](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-22.jpg)
Definition: nfa A nondeterministic finite automata nfa 5 -tuples : , where finite sets, and Same as for the nfa an extension of , is a are need to be defined for precise definition of accepting a string by nfa-
![εclosure of a set of states Let and let S be subset of Q ε-closure of a set of states Let, and let S be subset of Q.](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-23.jpg)
ε-closure of a set of states Let, and let S be subset of Q. the ε- closure of S is the set ε(S) defined as follows 1. Every elements of S is an element of ε(S); 2. 3. For any , every element of No other element of Q are in ε(S) is in
![Algorithm to calculate εS 1 Start with T S 2 Make a sequence Algorithm to calculate ε(S) 1. Start with T = S. 2. Make a sequence](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-24.jpg)
Algorithm to calculate ε(S) 1. Start with T = S. 2. Make a sequence of passes, in each pass considering and adding to T all elements of , that are not all ready in T. 3. Stop after any pass in which T does not change.
![The definition of εclosure help in defining recursively Recursive definition of Let be an The definition of ε-closure help in defining recursively. Recursive definition of Let, be an](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-25.jpg)
The definition of ε-closure help in defining recursively. Recursive definition of Let, be an nfa-ε. The function 1. For every 2. For every can be defined as:
![](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-26.jpg)
![Example example Consider the following nfaε 0 ε q 1 1 1 q 3 Example example Consider the following nfa-ε 0 ε q 1 1 1 q 3](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-27.jpg)
Example example Consider the following nfa-ε 0 ε q 1 1 1 q 3 0 q 5 ε ε q 0 ε q 2 1 0 q 4 q 7 0 q 6 0 ε
![1 What is εS if S q 5 2 What is if For 1. What is ε(S) if S = {q 5}? 2. What is if For](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-28.jpg)
1. What is ε(S) if S = {q 5}? 2. What is if For the ε-closure, ε(S): After one iteration T = {q 5, q 7} After two iterations T = {q 5, q 7, q 0} After three iterations T = {q 5, q 7, q 0 , q 1, q 2}
![In the next iteration there is no more change Therefore εS q 5 In the next iteration there is no more change. Therefore, ε(S) = {q 5,](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-29.jpg)
In the next iteration there is no more change. Therefore, ε(S) = {q 5, q 7, q 0 , q 1, q 2}
![For q 5 q 7 q 0 q 1 q 2 For = {q 5, q 7, q 0 , q 1, q 2}](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-30.jpg)
For = {q 5, q 7, q 0 , q 1, q 2}
![Example 6 Consider the following nfaε with Σ 0 ε q 1 0 Example #6 Consider the following nfa-ε, with Σ = {0} ε q 1 0](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-31.jpg)
Example #6 Consider the following nfa-ε, with Σ = {0} ε q 1 0 0 q 2 q 0 ε q 4 0 q 3 0 0 q 5 What is the language that accepted by this nfa.
![The language that accepted by this nfa LM k 0 k is The language that accepted by this nfa: L(M) = k {0 | k is](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-32.jpg)
The language that accepted by this nfa: L(M) = k {0 | k is multiple of 2 or 3}
![dfa vs nfa In a dfa at every state for every symbol dfa vs. nfa • In a dfa, at every state , for every symbol](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-33.jpg)
dfa vs. nfa • In a dfa, at every state , for every symbol , there is a unique –transition i. e. there is a unique such that . • This is not necessarily so in an nfa. At any state, an nfa may have multiple a- transitions, or none.
![dfa vs nfa In a dfa transition arrows are labeled by symbols from dfa vs. nfa • In a dfa, transition arrows are labeled by symbols from](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-34.jpg)
dfa vs. nfa • In a dfa, transition arrows are labeled by symbols from Σ; in an nfa, they are labeled by symbols from i. e. an nfa may have ε-transitions. • Non-determinism may be thought of as a kind of parallel computation where in several processes can be running concurrently.
![Equivalence of dfa and nfa Every nfa has an equivalent dfa Let M Equivalence of dfa and nfa Every nfa has an equivalent dfa Let M =](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-35.jpg)
Equivalence of dfa and nfa Every nfa has an equivalent dfa Let M = (Q, Σ, δ, q, F) be a nfa. There exist a dfa N, such that: L (M ) = L (N )
![Conversion of a nfa to dfa The conversion can be carried out as follows Conversion of a nfa to dfa The conversion can be carried out as follows:](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-36.jpg)
Conversion of a nfa to dfa The conversion can be carried out as follows: Let N = (Q, Σ, δ, q, F) be a nfa, an equivalent dfa, M can be defined as: M = (Q', Σ, δ', q', F'), where each component of M can be defined as: Q' = P(Q),
![](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-37.jpg)
![δ R a is the set of all states that can be reached ′ δ (R, a) is the set of all states that can be reached](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-38.jpg)
′ δ (R, a) is the set of all states that can be reached (in the nfa) by first following a transition labeled a from a state in R and then following 0 or more ε transitions
![It can be concluded that if A is a language then A is regular It can be concluded that, if A is a language, then A is regular](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-39.jpg)
It can be concluded that, if A is a language, then A is regular iff there exist a ndf that accepts/recognizes A. , The equivalency can be shown through the state diagram of both M and N. Therefore L(M) = L(N).
![Example Given the equivalent following dfa nfaε determine its Example Given the equivalent following dfa. nfa-ε, determine its](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-40.jpg)
Example Given the equivalent following dfa. nfa-ε, determine its
![](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-41.jpg)
![Then the equivalent dfa will given by Then the equivalent dfa will given by](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-42.jpg)
Then the equivalent dfa will given by
![Example Consider the following nfa N Q Σ δ q F whose δ Example Consider the following nfa, N = (Q, Σ, δ, q, F), whose δ](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-43.jpg)
Example Consider the following nfa, N = (Q, Σ, δ, q, F), whose δ is given by: The state diagram for N can be shown as
![Then the nfa is ε a q 0 q 1 a b a q Then, the nfa is: ε a q 0 q 1 a, b a q](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-44.jpg)
Then, the nfa is: ε a q 0 q 1 a, b a q 2 b What is the equivalent dfa, M?
![Example Given the following nfa N that accepts all words that begin with a Example: Given the following nfa N, that accepts all words that begin with a](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-45.jpg)
Example: Given the following nfa N, that accepts all words that begin with a string of 0’s followed by a string of 1’s. 0 q 0 ε 1 q 1 What is the equivalent dfa M?
![Consider the following nfas N with Σ 0 1 q 2 0 1 Consider the following nfas N, with Σ = {0, 1} q 2 0 1](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-46.jpg)
Consider the following nfas N, with Σ = {0, 1} q 2 0 1 0 0 0 q 0 0, 1 q 1 1 0, 1 q 3 1 0 What are the equivalent dfa Ms? q 4
![Consider the following nfas N with Σ 0 1 0 ε q 1 Consider the following nfas N, with Σ = {0, 1} 0 ε q 1](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-47.jpg)
Consider the following nfas N, with Σ = {0, 1} 0 ε q 1 1 1 q 3 0 q 5 ε ε q 0 ε q 2 1 0 q 4 q 7 0 What are the equivalent dfa Ms? q 6 0 ε
![Note as general nfas are more compact they require fewer states to recognize a Note: as general, nfas are more compact, they require fewer states to recognize a](https://slidetodoc.com/presentation_image_h/19dd55f416f3a0984bf2e6fe41387215/image-48.jpg)
Note: as general, nfas are more compact, they require fewer states to recognize a language compare to dfas.
Finite automata
Non finite subordinate clause
Learning objectives for finite and non finite verbs
Learning objectives for finite and non finite verbs
How to find finite and nonfinite verbs
Finite and non finite
Contoh soal dan jawaban tata bahasa reguler
String matching with finite automata
Finite automata dikelompokkan menjadi
Lexical analysis finite automata
Dfa diagram generator
Fsa dinyatakan dalam 5 tupel, kecuali
Automata
Let fa3 be an fa corresponding to fa1+fa2
Output berasosiasi dengan state adalah untuk
Automata calculator
Finite automata
Informal picture of finite automata
Aturan produksi adalah
Limitations of finite state machine
Finite automata
Deterministic finite state automata
Gambarlah diagram transisi untuk nfa berikut
Finite automata
Finite alphabet
Deterministic finite automata adalah
Finite automata with epsilon transitions
01:640:244 lecture notes - lecture 15: plat, idah, farad
Advanced inorganic chemistry lecture notes
Dfa to nfa
Gtg
Central concepts of automata theory
Bidirectional transducers in automata theory
Formal languages and automata theory tutorial
Automata theory tutorial
Cyk algo
Automata theory
Automata theory
Automata theory
Length of a string in automata theory
Automata theory tutorial
Pushdown automata
Csci 3130
Automata theory
Why we study automata theory
Reverse of a string in automata theory
Csci3130
Natural language processing
Bayesian decision theory lecture notes