For Σ={a,b} the regular expression r = (aa)*(bb)*b denotes , ISRO 2017
2017
For Σ={a,b} the regular expression r = (aa)*(bb)*b denotes , ISRO 2017
- A.
Set of strings with 2 a’s and 2 b’s
- B.
Set of strings with 2 a’s 2 b’s followed by b
- C.
Set of strings with 2 a’s followed by b’s which is a multiple of 3
- D.
Set of strings with even number of a’s followed by odd number of b’s
Attempted by 119 students.
Show answer & explanation
Correct answer: D
The regular expression r = (aa)*(bb)*b consists of two concatenated parts.
(aa)* generates strings with an even number of 'a's, including zero.
(bb)*b generates strings with an odd number of 'b's, as it concatenates an even count of b's with a single b.
Since the expression is a concatenation, all 'a's must precede all 'b's. Therefore, the language consists of strings with an even number of a's followed by an odd number of b's.