Open In App
Related Articles

GATE | GATE-CS-2007 | Question 31

Improve Article
Improve
Save Article
Save
Like Article
Like

Which of the following languages is regular? 

(A)

{wwR|w ∈ {0,1}+

(B)

{wwRx|x,w∈{0,1}+}

(C)

{wxwR|x,w∈{0,1}+}

(D)

{xwwR|x,w∈{0,1}+}


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
Please comment below if you find anything wrong in the above post

Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.

Last Updated : 01 Oct, 2021
Like Article
Save Article
Previous
Next
Similar Reads