451 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
2
0 votes
0 votes
2 answers
3
jugnu1337 asked Sep 3, 2023
329 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