in Theory of Computation retagged by
1,406 views
0 votes
0 votes

The CFG $S \to aS\mid bS\mid a\mid b$ is equivalent to 

  1. $(a+b)$
  2. $(a+b)(a+b)^*$
  3. $(a+b)(a+b)$
  4. all of these
in Theory of Computation retagged by
by
1.4k views

3 Comments

B is the correct answer
0
0
S->(a+b)*S/a/b

(a+b)*(a+b)

B is correct
0
0
option B is the answer
0
0

1 Answer

4 votes
4 votes
(A)-does not generate strings  $babb,abb$ etc.  but CFG generates it.(This option generates only 1-length strings)

(B)- is the answer

(C)-it only generates 2-length strings and other strings generated by the CFG are not generated by this regular expression.

So, B is correct.
Answer:

Related questions