in Theory of Computation edited by
7,861 views
21 votes
21 votes

Consider the following languages:

  • $L1=\left\{ww \mid w \in \{a,b\}^*\right\}$
  • $L2=\left\{ww^R \mid w \in \{a,b\}^*, w^R \text{ is the reverse of w} \right\}$
  • $L3=\left\{0^{2i} \mid \text{ i is an integer} \right\}$
  • $L4= \left\{ 0^{i^2} \mid \text{ i is an integer} \right\}$

Which of the languages are regular?

  1. Only $L1$ and $L2$
  2. Only $L2, L3$ and $L4$
  3. Only $L3$ and $L4$
  4. Only $L3$
in Theory of Computation edited by
7.9k views

1 comment

L3: By default, we have to assume i is a positive integer(including 0) as the number of zeros(string length) can never be negative.
0
0

5 Answers

23 votes
23 votes
Best answer
$L1=\{ww \mid w \in \{a,b\}^*\}\qquad$CSL

$L2=\{ww^R \mid w \in \{a,b\}^*,w^R \text{ is the reverse of w}\}\qquad$Palindrome, so CFL

$L3=\{0^{2i} \mid i \text{ is an integer}\}\qquad$Linear power and regular expression can be stated as $(00)^*$

$L4=\{0^{i^2} \mid i \text{ is an integer}\}\qquad$Non-linear power, so CSL

Therefore, answer is option D.
edited by

4 Comments

it is CSL
0
0

@satbir

Is this argument correct

Pallindrome, so CSL

I know since its palindrome. Hence, you can use stack but saying that way doesn't seem logically correct.

Don' you think so?

0
0

Its correct.

all Palindrome strings can be detected with help of 1 stack.

hence it is a CFL

all CFL are CSL

so it should be correct.


Why do you think it is incorrect ?

0
0
4 votes
4 votes

L1 -> This is CSL

L2 -> This is CFL.

L3 -> This is regular. Regular expression (00)*

L4 -> This is CSL.

Answer -> D

1 vote
1 vote
ans is D. only L3 is regular

1 comment

Plz explain how L3 is regular..?
0
0
1 vote
1 vote

L1, L2 are not Regular because we can't compare strings in Finite Automata. L1 is CSL, L2 is CFL

L3 is Regular because strings generated by L3 are even no of 0's.

L4 is not Regular because we can't design FA.

2 Comments

L = w.(w reverse)* | w € {a, b}*?

Please solve this... Is it regular or non regular??
0
0
0
0
Answer:

Related questions