868 views

Which of the following are not regular?

1. Strings of even number of a’s
2. Strings of a’s , whose length is a prime number.
3.  Set of all palindromes made up of a’s and b’s.
4.  Strings of a’s whose length is a perfect square.
1. (a) and (b) only
2. (a), (b) and (c) only
3. (b),(c) and (d) only
4. (b) and (d) only

$A) L = \{a^{^{2n}} | n>= 0 \} \\ B) L = \{a^{^{p}} | p \ is \ prime \} \\ C) L = \{ww^{r} | w \epsilon (a+b)* \} \\ D) L = \{a^{n^{2}} | n>=1 \}$

A is regular , B, C and D are not regular

Hence option 3) is correct

3

because a is re

b is not re because their in no fix pattern

c is not re because it is cfl

d is not re because their is no fix pattern we can write
by

A : (aa)* it is regular

B: ap where P is prime ..it is not even CFL ,as we can't make a PDA for this..So it is Never a regular

C:set of palindrome is Not regular.

D:Whose length is perfect square is not a CFL itself, so no question of being Regular

so B,C,D is not Regular

b , c and d all are not regular
by

1 vote