660 views
1 votes
1 votes

Let L denote the languages generated by the grammar S → S0S0 | 00.
Which of the following is TRUE?

  1. L = 0+
  2. L is regular but not 0+
  3. L is context free but not regular
  4. L is not context free

C is the given answer but I got B

L={00(2),000000(6),0000000000(10)...}

number of zeros inside the bracket

 

Is it correct?

1 Answer

1 votes
1 votes
Yes. It is correct.

Related questions

0 votes
0 votes
1 answer
1
set2018 asked Dec 10, 2017
2,054 views
1)S1 is regular but not S22)S2 is regular but not S13)S1 and S2 are not regular4)S1 and S2 are regular
2 votes
2 votes
3 answers
2
techbrk3 asked Nov 12, 2017
1,982 views
$(a^+)^∗=(a^∗)^+$$(a^+)^+=aa^+$$(a^∗)^∗=a^∗$$aa^+ +a=a^+$
0 votes
0 votes
1 answer
3
Akriti sood asked Dec 18, 2016
921 views
Consider the following statements :S1: Variables/function calls have nested lifetime in case of stack allocation.S2: Variables/function calls have arbitrary lifetime in c...
0 votes
0 votes
1 answer
4
sajalsjddn asked May 29, 2016
889 views
(A) Each one can simulate the other(B) The turing machines always halts which represents all C programs(C) The C programs that always halt can simulate all turing machine...