COMPUTER SCIENCE AND ENGINEERING
THEORY OF COMPUTATION
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
(ab)*a and a (ba)*
|
|
(a + b)* ab* a (a + b)*
|
|
b* ab* a (a + b)*
|
|
all of these
|
Detailed explanation-1: -Solution: A string in this language must have at least two a’s. Since any string of b’s can be placed in front of the first a, behind the second a and between the two a’s, and since an arbitrasry string of b’s can be represented by the regular expression b*, b*a b*a b* is a regular expression for this language. Ex.
Detailed explanation-2: -Regular Expressions are an algebraic way to describe languages. Regular Expressions describe exactly the regular languages. If E is a regular expression, then L(E) is the regular language it defines. For each regular expression E, we can create a DFA A such that L(E) = L(A).
Detailed explanation-3: -Language of all those strings having multiple a’s and b’s, Set of strings of a’s and b’s of any length including the null string. So L = , a, b, aa, ab, bb, ba, aaa……..
Detailed explanation-4: -Every string in language is ending with aa. Therefore, it is ending with aa. Hence option 2 is correct.