Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2007 | Question 31

Improve Article
Save Article
  • Last Updated : 01 Oct, 2021
Improve Article
Save Article

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

Answer: (C)

(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

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!