SlideShare a Scribd company logo
10
Most read
21
Most read
22
Most read
Convert RE to DFA
1
a
2 b
4
5 6
c
7
𝜀
𝜀
𝜀
8
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
Dstates
𝜀
Transition table of DFA
Given RE = (ab+c)*
Equivalent NFA-ε is:
Convert RE to DFA
𝜀
NFA States
DFA
State
Next State
a b c
Dstates
Transition table of DFA
Initial state of NFA is {9}
Ε-closure(9)={9,7,1,5,10} ------
Where A is the initial state of DFA
A
Mark state A
1
a
2 b
4
5 6
c
7
𝜀
𝜀
𝜀
8
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A   
Dstates
𝜀
Next need to find transition of (A,a) (A,b) (A,c)
Compute 𝜀-closure(move(A, a))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A
Dstates
𝜀
δ( A,a) = δ( (9,7,1,5,10),a) = {2}
=Ε-closure(2) = {2} ------ B
Compute 𝜀-closure(move(A, a))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B
{2} B
Dstates
𝜀
δ( A,a) = δ( (9,7,1,5,10),a) = {2}
Ε-closure(2) = {2} ------ B
Compute 𝜀-closure(move(A, b))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B -
{2} B
Dstates
𝜀
Compute 𝜀-closure(move(A, c))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B -
{2} B
Dstates
𝜀
δ( A,c) = δ( (9,7,1,5,10),c) = {6}
Ε-closure(6) = {6,8,10,7,1,5} ------ C

Mark move(A, c)) C
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B
{6,8,10,7,1,5} C
Dstates
𝜀
Compute 𝜀-closure(move(B, a))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B -
{6,8,10,7,1,5} C
Dstates
𝜀

Compute 𝜀-closure(move(B, b))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B -
{6,8,10,7,1,5} C
Dstates
𝜀
δ( B,b) = δ( (2,b) = {4}
Ε-closure(4) = {4,8,10,7,1,5} ------ D

Mark (move(B, b))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A  B - C
{2} B  - D
{6,8,10,7,1,5} C
{4,8,7,1,5,10} D
Dstates
𝜀
Mark - (move(B, c))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C
{4,8,7,1,5,10} D
Dstates
𝜀
Compute 𝜀-closure(move(C, a))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B
{4,8,7,1,5,10} D
Dstates
𝜀
B
δ( C,a) = δ( (6,8,10,7,1,5)),a) = {2}
Ε-closure(2) = {2} ------
Mark (move(C, b))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B -
{4,8,7,1,5,10} D
Dstates
𝜀
Compute 𝜀-closure(move(C, c))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B -
{4,8,7,1,5,10} D
Dstates
𝜀
δ( C,c) = δ( (6,8,10,7,1,5)),a) = {6}
Ε-closure(6) = {6,8,10,7,1,5} ------ C
Mark (move(C, c))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B - C
{4,8,7,1,5,10} D
Dstates
𝜀
Compute 𝜀-closure(move(D, a))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B - C
{4,8,7,1,5,10} D
Dstates
𝜀
δ( D,a) = δ( (6,8,10,7,1,5)),a) = {2}
Ε-closure(2) = {2} ------ B
Mark (move(D, a))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B - C
{4,8,7,1,5,10} D B
Dstates
𝜀
Mark (move(D, b))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B - C
{4,8,7,1,5,10} D B -
Dstates
𝜀
Compute 𝜀-closure(move(D, c))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B - C
{4,8,7,1,5,10} D B
Dstates
𝜀
C
( D,c) = δ( (4,8,7,1,5,10)),c) = {6}
Ε-closure(6) = {6,8,10,7,1,5} ------
Mark (move(D, c))
1
a
2 b
4
5 6
c
7
𝜀
𝜀
8
𝜀
𝜀
9 𝜀 𝜀
𝜀
10
NFA States
DFA
State
Next State
a b c
{9,7,1,5,10} A B - C
{2} B - D -
{6,8,10,7,1,5} C B - C
{4,8,7,1,5,10} D B - C
Dstates
𝜀
Resultant DFA is
a
B
c
a b
A a D
c
C
c
Transition table Transition diagram is

More Related Content

PPTX
4-Regular expression to Deterministic Finite Automata (Direct method)-05-05-2...
PPT
NFA or Non deterministic finite automata
PPTX
Automata theory - NFA ε to DFA Conversion
PDF
Master theorem
PPT
Nondeterministic Finite Automata
PPTX
Bellman ford algorithm
PPT
Bellman Ford's Algorithm
PPTX
Introduction TO Finite Automata
4-Regular expression to Deterministic Finite Automata (Direct method)-05-05-2...
NFA or Non deterministic finite automata
Automata theory - NFA ε to DFA Conversion
Master theorem
Nondeterministic Finite Automata
Bellman ford algorithm
Bellman Ford's Algorithm
Introduction TO Finite Automata

What's hot (20)

PPT
Breadth first search and depth first search
PDF
Theory of Computation Lecture Notes
PDF
Lecture: Context-Free Grammars
PPT
pushdown automata
PPTX
Longest Common Subsequence
PDF
NFA to DFA
PPTX
language , grammar and automata
PPTX
Regular expressions
PPT
Virtual memory
PDF
Longest common subsequence
PPTX
1.7. eqivalence of nfa and dfa
PPTX
Backtracking
PDF
Automata theory
PPTX
Moore Mealy Machine Conversion
PPTX
NFA Converted to DFA , Minimization of DFA , Transition Diagram
PPTX
Regular Expression to Finite Automata
PPTX
6-Practice Problems - LL(1) parser-16-05-2023.pptx
PPTX
Bellman ford algorithm
PDF
Formal Languages and Automata Theory unit 3
PPTX
Longest Common Subsequence (LCS) Algorithm
Breadth first search and depth first search
Theory of Computation Lecture Notes
Lecture: Context-Free Grammars
pushdown automata
Longest Common Subsequence
NFA to DFA
language , grammar and automata
Regular expressions
Virtual memory
Longest common subsequence
1.7. eqivalence of nfa and dfa
Backtracking
Automata theory
Moore Mealy Machine Conversion
NFA Converted to DFA , Minimization of DFA , Transition Diagram
Regular Expression to Finite Automata
6-Practice Problems - LL(1) parser-16-05-2023.pptx
Bellman ford algorithm
Formal Languages and Automata Theory unit 3
Longest Common Subsequence (LCS) Algorithm
Ad

Similar to Automata theory - RE to DFA Conversion (20)

PPT
Nfa vs dfa
PDF
Sesión de aprendizaje de Radicación Algebra pre u ccesa007
PPT
Ai4 heuristic2
PPTX
Running Free with the Monads
PDF
Lecture 17- F19.pdf
PPT
finitw automata2, Computer theory computure science
PPT
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
PPTX
kmaps
PDF
Nondeterministic Finite Automata AFN.pdf
DOCX
Mid-Term ExamName___________________________________MU.docx
PPT
Kmaps0ooooooooooooooooooooooooo42015.ppt
PDF
Ch03 lexical analysis nfa_2_dfa_2019
PPT
Lecture 03 lexical analysis
PPT
Strongly Connected Components
PPT
Kmaps.ppt
PPT
PPT
Kmaps.ppt
PDF
TOC_Solutions-Adi.pdf
PDF
TOC_Solutions-Adi.pdf
PDF
TOC Solutions-Adi.pdf
Nfa vs dfa
Sesión de aprendizaje de Radicación Algebra pre u ccesa007
Ai4 heuristic2
Running Free with the Monads
Lecture 17- F19.pdf
finitw automata2, Computer theory computure science
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
kmaps
Nondeterministic Finite Automata AFN.pdf
Mid-Term ExamName___________________________________MU.docx
Kmaps0ooooooooooooooooooooooooo42015.ppt
Ch03 lexical analysis nfa_2_dfa_2019
Lecture 03 lexical analysis
Strongly Connected Components
Kmaps.ppt
Kmaps.ppt
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
TOC Solutions-Adi.pdf
Ad

More from Akila Krishnamoorthy (12)

PPTX
Automata Theory - Turing machine
PPTX
Automata theory - Push Down Automata (PDA)
PPTX
Automata theory -RE to NFA-ε
PPTX
Automata theory - NFA to DFA Conversion
PPTX
Automata theory -- NFA and DFA construction
PPTX
Intro to automata theory
PPTX
Automata theory -Conversion of ε nfa to nfa
PPTX
Automata theory - CFG and normal forms
PPTX
PPTX
CLR AND LALR PARSER
PPTX
Linear data structure concepts
PPTX
Keypoints c strings
Automata Theory - Turing machine
Automata theory - Push Down Automata (PDA)
Automata theory -RE to NFA-ε
Automata theory - NFA to DFA Conversion
Automata theory -- NFA and DFA construction
Intro to automata theory
Automata theory -Conversion of ε nfa to nfa
Automata theory - CFG and normal forms
CLR AND LALR PARSER
Linear data structure concepts
Keypoints c strings

Recently uploaded (20)

PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Construction Project Organization Group 2.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Digital Logic Computer Design lecture notes
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Welding lecture in detail for understanding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Construction Project Organization Group 2.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Digital Logic Computer Design lecture notes
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Lecture Notes Electrical Wiring System Components
Embodied AI: Ushering in the Next Era of Intelligent Systems
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
UNIT 4 Total Quality Management .pptx
Internet of Things (IOT) - A guide to understanding
Welding lecture in detail for understanding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Operating System & Kernel Study Guide-1 - converted.pdf
bas. eng. economics group 4 presentation 1.pptx

Automata theory - RE to DFA Conversion

  • 1. Convert RE to DFA 1 a 2 b 4 5 6 c 7 𝜀 𝜀 𝜀 8 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c Dstates 𝜀 Transition table of DFA Given RE = (ab+c)* Equivalent NFA-ε is:
  • 2. Convert RE to DFA 𝜀 NFA States DFA State Next State a b c Dstates Transition table of DFA Initial state of NFA is {9} Ε-closure(9)={9,7,1,5,10} ------ Where A is the initial state of DFA A
  • 3. Mark state A 1 a 2 b 4 5 6 c 7 𝜀 𝜀 𝜀 8 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A    Dstates 𝜀 Next need to find transition of (A,a) (A,b) (A,c)
  • 4. Compute 𝜀-closure(move(A, a)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A Dstates 𝜀 δ( A,a) = δ( (9,7,1,5,10),a) = {2} =Ε-closure(2) = {2} ------ B
  • 5. Compute 𝜀-closure(move(A, a)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B {2} B Dstates 𝜀 δ( A,a) = δ( (9,7,1,5,10),a) = {2} Ε-closure(2) = {2} ------ B
  • 6. Compute 𝜀-closure(move(A, b)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - {2} B Dstates 𝜀
  • 7. Compute 𝜀-closure(move(A, c)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - {2} B Dstates 𝜀 δ( A,c) = δ( (9,7,1,5,10),c) = {6} Ε-closure(6) = {6,8,10,7,1,5} ------ C 
  • 8. Mark move(A, c)) C 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B {6,8,10,7,1,5} C Dstates 𝜀
  • 9. Compute 𝜀-closure(move(B, a)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - {6,8,10,7,1,5} C Dstates 𝜀 
  • 10. Compute 𝜀-closure(move(B, b)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - {6,8,10,7,1,5} C Dstates 𝜀 δ( B,b) = δ( (2,b) = {4} Ε-closure(4) = {4,8,10,7,1,5} ------ D 
  • 11. Mark (move(B, b)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A  B - C {2} B  - D {6,8,10,7,1,5} C {4,8,7,1,5,10} D Dstates 𝜀
  • 12. Mark - (move(B, c)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C {4,8,7,1,5,10} D Dstates 𝜀
  • 13. Compute 𝜀-closure(move(C, a)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B {4,8,7,1,5,10} D Dstates 𝜀 B δ( C,a) = δ( (6,8,10,7,1,5)),a) = {2} Ε-closure(2) = {2} ------
  • 14. Mark (move(C, b)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - {4,8,7,1,5,10} D Dstates 𝜀
  • 15. Compute 𝜀-closure(move(C, c)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - {4,8,7,1,5,10} D Dstates 𝜀 δ( C,c) = δ( (6,8,10,7,1,5)),a) = {6} Ε-closure(6) = {6,8,10,7,1,5} ------ C
  • 16. Mark (move(C, c)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - C {4,8,7,1,5,10} D Dstates 𝜀
  • 17. Compute 𝜀-closure(move(D, a)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - C {4,8,7,1,5,10} D Dstates 𝜀 δ( D,a) = δ( (6,8,10,7,1,5)),a) = {2} Ε-closure(2) = {2} ------ B
  • 18. Mark (move(D, a)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - C {4,8,7,1,5,10} D B Dstates 𝜀
  • 19. Mark (move(D, b)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - C {4,8,7,1,5,10} D B - Dstates 𝜀
  • 20. Compute 𝜀-closure(move(D, c)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - C {4,8,7,1,5,10} D B Dstates 𝜀 C ( D,c) = δ( (4,8,7,1,5,10)),c) = {6} Ε-closure(6) = {6,8,10,7,1,5} ------
  • 21. Mark (move(D, c)) 1 a 2 b 4 5 6 c 7 𝜀 𝜀 8 𝜀 𝜀 9 𝜀 𝜀 𝜀 10 NFA States DFA State Next State a b c {9,7,1,5,10} A B - C {2} B - D - {6,8,10,7,1,5} C B - C {4,8,7,1,5,10} D B - C Dstates 𝜀
  • 22. Resultant DFA is a B c a b A a D c C c Transition table Transition diagram is