Unit 2
Unit 2
Replace r by {a} and s by {b}. The left side becomes all strings of a's and b's (mixed),
while the right side consists only of strings of a's (alone) and strings of b's (alone). A string
like ab is in the language of the left side but not the right.
4. List out the methods that are used for converting DFA to RE.
The three methods are:
1. Regular Expression Equation Method
2. Arden’s Theorem
3. State Elimination Technique
KEY ANSWER
KEY ANSWER
(i) https://www.youtube.com/watch?v=TkqcPh0BFUw
(ii) To prove that the language L = {0^n 1^(n+1) | n > 0} is not regular, we can use the
language, there exists a pumping length p such that any string s ∈ L with |s| ≥ p can be
Pumping Lemma for regular languages. The Pumping Lemma states that if L is a regular
1. |xy| ≤ p
2. |y| > 0
3. Construct the regular expression corresponding to the state diagram given in the following.
KEY ANSWER
Regular expression
q1=q10+q21
q2=q21+q30
q3=q10+q21
Now,
q1=q10+1(q21+q30)
q1=q10+1(q21+0(q10+q21))
q1=q10+q211+q1001+q2011
q1=(q211+q201)+q1(0+001)
R=Q+RP
By Arden theorem,
q1=(0+001)*
q2=(0+001)*0=r1
q3=(0+001)*1=r2
r=r1+r2
KEY ANSWER
q1 = ε.(0)*
q1 = 0* (ε.R*= R*)
Substituting the value into q2, we will get
q2 = 0* 1 + q2 1
q2 = 0* 1 (1)* (R = Q + RP → Q P*)
r = q1 + q2
= 0* + 0* 1.1*
r = 0* + 0* 1+ (1.1* = 1+)