Open In App
Related Articles

GATE | GATE-CS-2007 | Question 31

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

Last Updated : 01 Oct, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads