GFG App
Open App
Browser
Continue

# ISRO | ISRO CS 2017 | Question 21

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

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