- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Construct NFA for the following language and convert it into DFA using the algorithm - L = (aa+ (bb*)c*)
Solution
NFA for the above language will be −
Conversion from NFA to DFA −
ε − closure(0) = {0, 1, 4} = A
For State A
For input symbol a | For input symbol b | For input symbol c |
---|---|---|
∴ Ta = {2} | ∴ Tb = {5} | Tc = ∅ |
∴ ε − closure (Ta) = ε − closure (2) = {2} = B | ∴ ε − closure (Tb) = ε − closure (5) = {5, 6, 8, 9, 11, 12} = C | ∴ ε − closure (∅) = ∅ = D |
For State B
For input symbol a | For input symbol b | For input symbol c |
---|---|---|
∴ Ta = {3} | ∴ Tb = {} | Tc = {} |
∴ ε − closure (3) = = {3, 12} = E | ∴ ε − closure (Tb) = { } = ∅ = D | ∴ ε − closure (Tc) = ∅ = D |
For State C
For input symbol a | For input symbol b | For input symbol c |
---|---|---|
∴ Ta = {} | ∴ Tb = {7} | Tc = {10} |
∴ ε − closure (Ta) = ∅ = D | ∴ ε − closure (7) = { 7, 8, 6, 9, 11, 12} = F | ∴ ε − closure (10) = {10, 9, 11, 12} = G |
For State E
∴ Ta = ∅ | ∴ Tb = ∅ | Tc = ∅ |
∴ ε − closure (Ta) = ∅ = D | ∴ ε − closure (Tb) = ф = D | ∴ ε − closure (Tc) = ф = D |
For State F
∴ Ta = ∅ | ∴ Tb = {7} | Tc = {10} |
∴ ε − closure (Ta) = ∅ = D | ∴ ε − closure (Tb) = = ε − closure (7) = {7,8,6,9,12} = F | ∴ ε − closure (10) = {10, 9, 11, 12} = G |
For State G
∴ Ta = ∅ | ∴ Tb = {7} | Tc = {10} |
∴ ε − closure (ф) = ф = D | ∴ ε − closure (ф) = ф = D | ∴ ε − closure (10) = G |
For State D
D = ∅
Ta = Tb = Tc = ∅
ε − closure (Ta) = ε − closure (Tb) = ε − closure (Tc) = ф = D
Transition Table and Diagram for DFA will be −
(Initial State)
a | B | c | Here | |
A | B | C | D | A = {0,1,4} |
B | E | D | D | B = {2} |
C | D | F | G | C = {5,6,8,9,11,12} |
D | D | D | D | D = ∅ |
E | D | D | D | E = {3, 12} |
F | D | F | G | F = {7,8,6,9,11,12} |
G | D | D | G | G = {10,9,11,12} |
- Related Articles
- Construct a ∈-NFA for the language L = (a* + b*)
- Construct ∈-NFA of Regular Language L = b + ba*
- Construct ∈-NFA of Regular Language L = {ab,ba}
- Construct ∈-NFA of Regular Language L = (00)*1(11)*
- Construct ∈-NFA of Regular Language L = 0(0+1)*1
- Construct ∈-NFA of Regular Language L = (0+1)*(00+ 11)
- State the worst case number of states in DFA and NFA for a language?
- Convert NFA to DFA and explain the difference between them
- Construct a TM for the language L= {ww : w ∈ {0,1}}
- What is the difference between DFA and NFA?
- How to convert from NFA to DFA in TOC?
- C Program to construct a DFA which accepts L = {aN | N ≥ 1}
- Construct a Turing Machine for language L = {0n1n2n | n≥1}
- Construct a Turing Machine for language L = {ww | w ∈ {0,1}}
- Explain with an example how to convert NFA to DFA.

Advertisements