468 views
1 votes
1 votes

1 Answer

0 votes
0 votes
  1. S-->AB

          A-->aA|bA|e

          B-->abB|e

this grammar is generating

(a+b)* {a^n b^n | n>=0}


S-->AaB

A-->aC|e

B-->aB|bB|e

C-->aCb|e

this grammar is generating

[a.{a^n b^n | n>=0}]*.a.(a+b)*


S-->AB

A-->aA|e

B-->aBb|e

this grammar is generating

a*. {a^n b^n | n>=0}

only 3rd is generating CFL not Regular.

Related questions

0 votes
0 votes
1 answer
1
Abhishek3301 asked Feb 6
10 views
Number of states in a minimal deterministic finite automata that accepts the language L = {(a + b) a* b*} What should be the answer to this question?
0 votes
0 votes
1 answer
3
0 votes
0 votes
2 answers
4
jugnu1337 asked Sep 3, 2023
345 views
FIND the no of 2 state dfa with the designated initial state possible over {a,b,c} which accept empty language is equal to