Professional Documents
Culture Documents
The two popular methods for converting a given DFA to its regular expression are-
1. Arden’s Method
2. State Elimination Method
Arden’s Theorem-
Arden’s Theorem is popularly used to convert a given DFA to its regular expression.
It states that-
Conditions-
Steps-
To convert a given DFA to its regular expression using Arden’s Theorem, following steps are
followed-
Step-01:
Form a equation for each state considering the transitions which comes towards that state.
Add ‘∈’ in the equation of initial state.
Step-02:
Bring final state in the form R = Q + RP to get the required regular expression.
Important Notes-
Note-01:
Arden’s Theorem can be used to find a regular expression for both DFA and NFA.
Note-02:
PRACTICE PROBLEMS BASED ON CONVERTING DFA
TO REGULAR EXPRESSION-
Problem-01:
Find regular expression for the following DFA using Arden’s Theorem
Solution-
Step-01:
A = ∈ + B.1 ……(1)
B = A.0 ……(2)
Step-02:
B = (∈ + B.1).0
B = ∈.0 + B.1.0
B = 0 + B.(1.0) ……(3)
B = 0.(1.0)*
Thus, Regular Expression for the given DFA = 0(10)*
Find regular expression for the following DFA using Arden’s Theorem-
Solution-
Step-01:
q1 = ∈ ……(1)
q2 = q1.a ……(2)
q3 = q1.b + q2.a + q3.a …….(3)
Step-02:
q2 = ∈.a
q2 = a …….(4)
R=Q+RP
R=QP*
q3 = (b + a.a)a*
Problem-03:
Find regular expression for the following DFA using Arden’s Theorem-
Solution-
Step-01:
Step-02:
q2 = q1.a.b* …….(3)
q1 = ∈ + q1.b + q1.a.b*.a
q1 = ∈.(b + a.b*.a)*
q1 = (b + a.b*.a)*
Thus, Regular Expression for the given DFA = (b + a.b*.a)*
Problem-04:
Find regular expression for the following DFA using Arden’s Theorem-
Solution-
Step-01:
Step-02:
q1 = (a + b.(b + a.b)*.a.a)*
The two popular methods for converting a DFA to its regular expression are-
1. Arden’s Method
2. State Elimination Method
This method involves the following steps in finding the regular expression for any given DFA-
Step-01:
Thumb Rule
The initial state of the DFA must not have any incoming edge.
If there exists any incoming edge to the initial state, then create a new initial state having
no incoming edge to it.
Example-
Step-02:
Thumb Rule
If there exists multiple final states in the DFA, then convert all the final states into non-
final states and create a new single final state.
Example-
Step-03:
Thumb Rule
The final state of the DFA must not have any outgoing edge.
If there exists any outgoing edge from the final state, then create a new final state having
no outgoing edge from it.
Example-
Step-04:
In the end,
NOTE
PRACTICE PROBLEMS BASED ON CONVERTING DFA
TO REGULAR EXPRESSION-
Problem-01:
Solution-
Step-01:
Step-02:
Step-03:
Step-04:
From here,
NOTE-
If we first eliminate state B and then state A, then regular expression would be = (01)*0.
This is also the same and correct.
Problem-02:
Solution-
Step-01:
There exist multiple final states.
So, we convert them into a single final state.
Step-02:
Step-03:
Step-04:
Step-05:
From here,
Problem-03:
Solution-
Step-01:
Step-02:
Step-03:
Step-04:
From here,
Problem-04:
Solution-
Step-01:
Step-02:
Step-03:
Step-04:
Step-05:
Step-06:
From here,
Regular Expression = b*(aa*(bb*+∈)+∈)
We know, bb* + ∈ = b*
Problem-05:
Solution-
Step-01:
Since initial state A has an incoming edge, so we create a new initial state qi.
Since final state A has an outgoing edge, so we create a new final state qf.
Step-02:
Step-03:
Step-04:
From here,
Problem-06:
Solution-
From here,
Regular Expression = a
Problem-07:
Solution-
Step-01:
Step-02:
Step-03:
From here,
Final exam
Attendance: 5
Mid term: 30
Class performance: 10
Assignment 1 : 10
1. Moore Machine
2. Mealy Machine
Assignment 2 : 15
Make a question from any topics from the syllabus which we
have completed in this semester and write the answer.
Final Exam: 30
Total 100