0% found this document useful (0 votes)
51 views10 pages

Module 1 Part 2

The document discusses converting a non-deterministic finite automaton (NFA) with epsilon transitions to an equivalent deterministic finite automaton (DFA). It provides an example NFA and shows the steps to find the epsilon closures and construct the transition table and diagram for the equivalent DFA.

Uploaded by

suju ki vines
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views10 pages

Module 1 Part 2

The document discusses converting a non-deterministic finite automaton (NFA) with epsilon transitions to an equivalent deterministic finite automaton (DFA). It provides an example NFA and shows the steps to find the epsilon closures and construct the transition table and diagram for the equivalent DFA.

Uploaded by

suju ki vines
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

BRAINWARE UNIVERSITY

[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

A string is accepted by an NFA if there is some sequence of possible moves that will put the
machine in the final state at the end of the string.

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

Example Convert the following NFA with epsilon to equivalent DFA


Solution Consider the following NFA for conversion of NFA with epsilon to DFA −

To convert this NFA with epsilon, we will first find the ε-closures, as given below −
• ε-closure(q0) = {q0, q1, q2}
• ε-closure(q1) = {q1, q2}
• ε-closure(q2) ={q2}
Let us start from ε-closure of start state, as mentioned below −
When, ε-closure(q0) = {q0, q1, q2}, we will call this state as A.
Now, let us find transition on A with every input symbol, as shown below −
δ'(A, a) = ε-closure (δ(A, a))
= ε-closure (δ(q0, q1,q2), a))
= ε-closure (δ(q0, a) ∪ δ(q1,a) U δ(q2,a) )
= ε-closure (ΦUq1 ∪q2)
= ε-closure(q1)
= {q1, q2} let us call it as state B
δ'(A, b) = ε-closure(δ(A,b))
= ε-closure(δ(q0, q1,q2), b))
= ε-closure(δ(q0, b) ∪ δ(q1,b) U δ(q2,b) )
= ε-closure(q0 U Φ∪q0)
= ε-closure(q0)
= {q0, q1, q2} its nothing but state A
δ'(B, a) = ε-closure(δ(B,a))
= ε-closure(δ(q1,q2), a))
= ε-closure(δ(q1,a) U δ(q2,a) )
= ε-closure(q1 ∪q2)
= ε-closure(q1)
= {q1, q2} its nothing but state B
δ'(B, b) = ε-closure(δ(B,b))
= ε-closure(δ(q1,q2), b))
= ε-closure(δ(q1,b) U δ(q2,b) )

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)


BRAINWARE UNIVERSITY
[PCC-CSM404] [Formal Language and Automata Theory]

= ε-closure(Φ∪q0)
= ε-closure(q0)
= {q0,q1, q2} its nothing but state A
Hence, the transition table for the generated DFA is as follows −
States\inputs a b

A B A

B B A
The DFA diagram is as follows −

• As, A={q0,q1,q2} in which the final state q2 lies. Hence, A is the final state.
• In B ={q1,q2} the state q2 lies. Hence, B is also the final state.

2023-24 ,EVEN (Department of CSE, Brainware University, Barasat)

You might also like