...
GATE 2014 [Set-3]
April 4, 2025
GATE 2014 [Set-3]
April 4, 2025
GATE 2014 [Set-3]
April 4, 2025
GATE 2014 [Set-3]
April 4, 2025

GATE 2014 [Set-3]

Question 25

The length of the shortest string NOT in the language (over Σ = {a b,} of the following regular is expression is ______________.

     a*b*(ba)*a* 

A
3
B
4
C
5
D
6
Question 25 Explanation: 
The regular expression generate all the strings of length 0 , 1 and 2
{ϵ, a, b, aa, ab, ba, bb}
Let’s check all the string of length 3.
The given regular expression generates {aaa, aab, aba, abb, baa, bba, bbb}
But it doesn’t generate the string “bab”, hence the shortest string not generated by regular expression has length 3 (string “bab”).
Correct Answer: A
Question 25 Explanation: 
The regular expression generate all the strings of length 0 , 1 and 2
{ϵ, a, b, aa, ab, ba, bb}
Let’s check all the string of length 3.
The given regular expression generates {aaa, aab, aba, abb, baa, bba, bbb}
But it doesn’t generate the string “bab”, hence the shortest string not generated by regular expression has length 3 (string “bab”).

Leave a Reply

Your email address will not be published. Required fields are marked *