517 views
7 votes
7 votes
Which of the following languages is/are regular? (Mark all the appropriate choices)
  1. $L = \{xww_R \mid w,x \in ({a+b})^+\}$
  2. $L = \{xww \mid w,x \in ({a+b})^*\}$
  3. $L = \{xwyw \mid w,x,y \in ({a+b})^+\}$
  4. $L = \{wxw_R\mid w,x \in ({a+b})^+\}$

1 Answer

Best answer
4 votes
4 votes

A - non determinism required to guess the start of $w$ as it cannot be empty string. $L$ is NCFL.

B - $x$ can include all strings in $\Sigma^*$ when $w = \epsilon.$ So, $L$ reduces to $(a+b)^*$ which is regular.

C - this is all strings of length at least $4$ over $\{a,b\}$ where the last letter repeats in between the second and third last. Regular

D - this is all $3$ length strings over $\{a,b\}$ starting and ending with same letter. Regular.

So, correct answer: B;C;D

Reference: https://gatecse.in/identify-the-class-of-a-given-language

selected by
Answer:

Related questions