# ISRO | ISRO CS 2017 | Question 21

• Last Updated : 16 Mar, 2018

For Σ={a,b} the regular expression r = (aa)*(bb)*b denotes

(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

Answer: (D)

Explanation: We can approach this question by making refutations for wrong options:
Option 1: Set of strings with 2 a’s and 2 b’s :
clearly it is wrong as the given regular expression can accept aaaabbb.
Option 2: Set of strings with 2 a’s 2 b’s followed by b
Again it is wrong as aaaabbb is a violation in this case also.
Option 3: Set of strings with 2 a’s followed by b’s which is a multiple of 3
It is wrong as aaaab is accepted by the expression.
Option 4: Set of strings with even number of a’s followed by odd number of b
Clearly it is correct as no violation exists in this case.
So, correct option is (D)

Quiz of this Question

My Personal Notes arrow_drop_up