Unit I-Session 11and 12
Unit I-Session 11and 12
Ms. Archna Goyal, Dr. Preeti Rathi & Dr. Vandna Batra
Faculty
School of Engineering & Technology(SOET)
K. R. Mangalam University
Unit I
Introduction to Formal Proof
Session 11 and 12
1 0
q0 q1 q2
1
Solution:
For the given transition diagram first we construct
transition table Input
State
0 1
q0 q0 q1
q1 q1, q2 q1
q2 q2 q1, q2
Example 1
Now we will obtain δ' transition for state q0.
1. δ'([q0], 0) = [q0]
2. δ'([q0], 1) = [q1]
The δ' transition for state q1 is obtained as
1. δ'([q1], 0) = [q1, q2] (new state generated)
2. δ'([q1], 1) = [q1]
The δ' transition for state q2 is obtained as:
1. δ'([q2], 0) = [q2]
2. δ'([q2], 1) = [q1, q2]
Example 1
Now we will obtain δ' transition on [q1, q2].
1. δ'([q1, q2], 0) = δ(q1, 0) ∪ δ(q2, 0)
= {q1, q2} ∪ {q2}
= [q1, q2]
2. δ'([q1, q2], 1) = δ(q1, 1) ∪ δ(q2, 1)
= {q1} ∪ {q1, q2}
= {q1, q2}
= [q1, q2]
The state [q1, q2] is the final state as well because it contains
a final state q2. The transition table for the constructed DFA
will be:
Example 1
The transition table for the constructed DFA will be:
Input
State
0 1
q0 q0 q1
q1 q1, q2 q1
*q2 q2 q1, q2
*[q1,q2] q1, q2 q1, q2
Example 1
The Transition diagram will be:
Example 2
Convert the following NFA to DFA
M = {q0, q1, q2}, = {a, b}, , initial = {qb}, F = {q2}
Input
State
a b
q0 q0, q1 q2
q1 q0 q1
q2 ɸ q0, q1
Solution:
For the given transition table first we construct
transition diagram
Example 2
Now we will obtain δ' transition for state q0.
1. δ'([q0], a) = [q0, q1] (new state generated)
2. δ'([q0], b) = [q2]
The δ' transition for state q1 is obtained as
1. δ'([q1], a) = [q0]
2. δ'([q1], b) = [q1]
The δ' transition for state q2 is obtained as
1. δ'([q2], a) = [ɛ]
2. δ'([q2], b) = [q0, q1]
Example 2
Now we will obtain δ' transition on [q0, q1].
1. δ'([q0, q1], a) = δ(q0, a) ∪ δ(q1, a)
= {q0, q1} ∪ {q0}
= [q0, q1]
2. δ'([q0, q1], b) = δ(q0, b) ∪ δ(q1, b)
= {q2} ∪ {q1}
= [q1, q2]
The state [q1, q2] is the final state as well because it contains a
final state q2.
The transition table for the constructed DFA will be:
Example 2
Now we will obtain δ' transition on [q1, q2].
1. δ'([q1, q2], a) = δ(q1, a) ∪ δ(q2, a)
= {q0} ∪ {ɛ}
= [q0]
2. δ'([q1, q2], b) = δ(q1, b) ∪ δ(q2, b)
= {q1} ∪ {q0, q1}
= [q0, q1]
The transition table for the constructed DFA will be:
Example 2
The transition table for the constructed DFA will be:
Input
State
a b
q0 q0, q1 q2
q1 q0 q1
*q2 ɛ q0 , q 1
[q0, q1] q0 q1, q2
*[q1, q2] q0 q0, q1
Example 2
The Transition diagram will be:
Review of Session
In previous session, We discussed:
Introduction to conversion techniques: subset construction
method and powerset construction method.
Step-by-step explanation of how to convert an NFA to a DFA
using each technique.
Demonstration of the conversion process with examples.
Explanation of how to systematically construct the equivalent
DFA states and transitions based on the NFA's behavior.
Exercise
1. Convert the following NFAs to DFAs.
1.
2.
Input
State
3. 0 1
q0 {q0, q1} q0
q1 q2 q1
q2 q3 q2
*q3 ɸ q3
Support Material references
Reference Book
• "Introduction to Automata Theory, Languages, and Computation"
by Hopcroft
• "Theory of Computer Science: Automata, Languages and
Computation" by K L P Mishra
Website References
• MIT OpenCourseWare - Introduction to the Theory of
Computation:
Website: MIT OCW - 6.045J / 18.400J
• Sipser's "Introduction to the Theory of Computation" Resources:
Website: Michael Sipser's Resources
• GeeksforGeeks Theory of Computation:
Website: GeeksforGeeks - Theory of Computation
• Coursera - Automata Theory Specialization:
Website: Automata Theory Specialization
Support Material references
Youtube Channels
• Theory of Computation THE GATEHUB
https://www.youtube.com/watch?v=p1oqDS0fayc&list=PL1
QH9gyQXfgsUBfYUR0WirJASgif4pHVX&index=1