Consider the regular expression R = (a + b)* (aa + bb) (a + b)*Which o...
R = (a+b)*(aa+bb)(a+b)*
having NFA
Equivalent DFA :
which is equivalent Transition graph [ by removing transition from q1 to q2 and q2 to q1 but does not effect on language ..be careful ]
That is equivalent to
which is equivalent to
which is equivalent to
so equivalent regular expression is [a(ba)*(a+bb) + b(ab)*(b+aa)](a+b)* so option C is answer.
View all questions of this test
Consider the regular expression R = (a + b)* (aa + bb) (a + b)*Which o...
Regular Expression Equivalence:
Regular expressions are used to define a set of strings. Two regular expressions are said to be equivalent if they define the same set of strings. In other words, two regular expressions are equivalent if they generate the same language.
Given Regular Expression:
R = (a b)* (aa bb) (a b)*
To find the regular expression that defines the same language as R, we need to simplify the given regular expression.
Simplification of Given Regular Expression:
R = (a b)* (aa bb) (a b)*
= (a b)* aa (a b)* U (a b)* bb (a b)*
= (a(ba)* b(ab)*)* aa (a b)* U (a(ba)* b(ab)*)* bb (a b)*
= (a(ba)* b(ab)*)* (aa bb) (a b)*
The above regular expression generates the same language as R. Therefore, the correct option is C.
Explanation:
Option A generates strings of the form a(ba)*, b(ab)* followed by either a or b. This does not cover all the strings generated by R.
Option B generates strings of the form a(ba)* or b(ab)*, zero or more times, followed by a or b, zero or more times. This covers all the strings generated by R, but also generates additional strings that are not generated by R.
Option C generates strings of the form a(ba)* or b(ab)*, zero or more times, followed by either aa or bb, followed by a or b, zero or more times. This covers all the strings generated by R and generates no additional strings.
Option D generates strings of the form a(ba)* or b(ab)*, zero or more times, followed by either aa or bb, followed by a or b, zero or more times. This covers all the strings generated by R, but also generates additional strings that are not generated by R.
Consider the regular expression R = (a + b)* (aa + bb) (a + b)*Which o...
R = (a+b)*(aa+bb)(a+b)*
having NFA
Equivalent DFA :
which is equivalent Transition graph [ by removing transition from q1 to q2 and q2 to q1 but does not effect on language ..be careful ]
That is equivalent to
which is equivalent to
which is equivalent to
so equivalent regular expression is [a(ba)*(a+bb) + b(ab)*(b+aa)](a+b)* so option C is answer.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).