Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE-CS-2007 | Question 31
  • Last Updated : 24 Feb, 2014

Which of the following languages is regular?
gatecs2007Q33
(A) A
(B) B
(C) C
(D) D


Answer: (C)

Explanation:
(C) Strings which are the part of this language are either 0w0 or 1w1 where w is any string in {0, 1}* .
Thus, language given in option (C) is regular.

 
All other languages accept strings which have a palindrome as their substring.

(A) Strings intersect with 0*110* .

(B) Strings intersect with 0*110*1 .

(D) Strings intersect with 10*110* .

According to pumping lemma, languages given option (A), (B) and (D) are irregular.

 
Thus, option (C) is the answer.

 
Please comment below if you find anything wrong in the above post.


Quiz of this Question

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :