Which one of the following pairs of languages is generated by G1 and G2, respectively?

Consider the following context-free grammars:
    G1:S→aS|B,B→b|bBG1:S→aS|B,B→b|bB
    G2:S→aA|aB, A→aA|B|∈, B→bB|∈G2:S→aA|aB, A→aA|B|∈, B→bB|∈
Which one of the following pairs of languages is generated by G1 and G2, respectively?

(A)  {ambn|m>0{ambn|m>0 or n>0}n>0} and {ambn|m>0{ambn|m>0 or n>o }
(B) ​ ​​{ambn|m>0{ambn|m>0 and n>0} and {ambn|m>0{ambn|m>0 or n ≥0 }
(C)  {ambn|m>0{ambn|m>0 or n > 0} and {ambn|m>0{ambn|m>0  and n > 0}
(D)  {ambn|m>0{ambn|m>0 and n>0} annd {ambn|m>0{ambn|m>0 or n > 0}

 

how to solve this type of question?

1Comment
karmjit joshi @karmjitjoshi
7 Feb 2017 06:56 pm

sumitverma sir?