Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2014-(Set-3) | Question 65

  • Last Updated : 11 Oct, 2021

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

a*b*(ba)*a*

(A) 2
(B) 3
(C) 4
(D) 5


Answer: (B)

Explanation: All the strings that can be generated till length-2 are definitely present in this language.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

Now, let’s look at the strings of length-3; {aaa, aab, aba, abb, baa, bab, bba, bbb} . String “bab” cannot be generated from given language. so, the string “bab” is the shortest string not acceptable by given regular expression.



Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!