======================================================================
Method to convert -nfa to dfa:
consider -nfa: ( Q, , , q0, F)
and equivalent dfa = (2Q,, ', q, F') where q = -closure(q0) , '(q,a) = -closure((q,a))
=====================================================================
(1) In the given -nfa, = {a}
-closure(q0) = { q0}
So, initial state of DFA is {q0}.
'({q0},a) = -closure((q0,a)) = -closure(q1) = {q0, q1,q2}
'({q0, q1,q2},a) = -closure{q0, q1,q2} = {q0, q1,q2}
So, equivalent DFA is:
a | |
{q0} | {q0, q1,q2} |
{q0, q1,q2} F | {q0, q1,q2} |
Regular expression corresponding to above DFA is a+.
(b) Given, (q0,a) = { q0, q1 }
(q1,b) = { q1, q2} // since (q1,a) is not given, then assume its
(q2,a) = {q2}
where initial state is q0 and final state is q2 in the given nfa.
Conversion from nfa to equivalent dfa:
({q0},a) = { q0,q1}
({q0},b) = //trap state
({q0,q1},a) = {q0,q1}
({q0,q1},b) = { q1,q2}
({q1,q2},a) = {q2}
({q1,q2},b) = {q1,q2}
({q2},a) = {q2}
({q2},b) =
so, equivalent DFA is:
a | b | |
{q0} | {q0,q1} | |
{q0,q1} | {q0,q1} | {q1,q2} |
{q1,q2} F | {q2} | {q1,q2} |
{q2}F | {q2} |
(c) Given, (q0,a) = { q0, q1 }
(q1,b) = { q1, q2} // since (q1,a) is not given, then assume its
(q2,a) = {q2}
(q1,) = {q1,q2}
where initial state is q0 and final state is q2 in the given nfa.
Conversion from the given -nfa to its equivalent dfa:
-closure(q0) = {q0}
({q0},a) = -closure({ q0,q1}) = {q0,q1,q2}
({q0},b) = //trap state
({q0,q1,q2},a) = -closure({q0,q1,q2}) = {q0,q1,q2}
({q0,q1,q2},b) = -closure({ q1,q2}) = {q1,q2}
({q1,q2},a) = -closure({q2}) = {q2}
({q1,q2},b) = -closure({q1,q2}) = {q1,q2}
({q2},a) = -closure({q2}) = {q2}
({q2},b) =
So, equivalent DFA is:
a | b | |
{q0} | {q0,q1,q2} | |
{q0,q1,q2}F | {q0,q1,q2} | {q1,q2} |
{q1,q2}F | {q2} | {q1,q2} |
{q2}F | {q2} |
1. Use the construction of Theorem 2.2 to convert the nfa in Figure 2.10 to a...
6. (a) Use Thompson's construction to convert the above regular expression 1(0/1) *101 into an NFA (7 points) (b) Convert the NFA of part (&) into a DFA using the subset construction (points)
3. Convert the NFA of figure 1 to a DFA. The start state is q0, the accepting set is F = {q3}, and “epsilon” means . Convert the NFA of figure 1 to a DFA. The start state is qo, the accepting set is F q3 and "epsilon" means E.
2. (a) Using Thompson's construction, construct an NFA that recognizes the same language as defined by the following regular expression (1 010) *1 (b) Using the subset construction, convert the NFA into a DFA. Optimize the resulting DFA by merging any equivalent states
5.[10 points] Convert the following NFA to equivalent DFA E 1 a a, b 5.[10 points] Convert the following NFA to equivalent DFA E 1 a a, b
40 points) Use Theorem 5.5.3 and Example 6.1.1 to convert the following regular expression into an NFA-X. Apply the full steps for converting a regular expression to an NFA-X. Do not simplify the machine by removing A transitions or making other changes. Do not construct the machine "directly". For your convenience, it is acceptable to label machines corresponding to segments of the regular expression and use them in subsequent drawings (see class examples). (a Ub)*bba* b*
FOR the regular expression r= (a+b)*abb (1) Find the NFA without ε-moves for r. (2) Convert the resulted NFA in (1) into DFA (3) Find minimized DFA for the result in (2)
Convert from NFA to DFA, ive been seeing different ways of doing this so if you know more than one method please feel free
Here is a nondeterministic finite automaton: 0 0 0,1 A B cal 1 0 Convert this NFA to a DFA, using the "lazy' version of the subset construction Which of the following sets of NFA states becomes a state of the DFA constructed in this manner? (B.CD) (A,B,D) (B) (AD)
(10pts)Use the subset construction to build a DFA that recognizes the language recognized by the following NFA. Clearly show your steps so that it is clear that you used the subset construction. 2 90