wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the context-free grammers over the alphabet { a, b, c } given below. S and T are non- terminals.
G1:SaSbT,TcTϵ
G2:SbSaT,TcTϵ
The language L(G1)L(G2) is


A
Recursive but not context-free
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Finite
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Not finite but regular
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Context-free but not regular
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C Not finite but regular
G1:SaSbT,TcTϵ

G2:SbSaT,TcTϵ

L(G1)={ancmbnm,n0}

L(G2)={bncmanm,n0}

L(G1)L(G2)={ancmbn}{bncman}

= {cmm0}

= c

Since the only common strings will be those strings with only 'c' , since in the first language all the other strings start with 'a' and in the second language all the other strings start with 'b'.

Clearly the intersection is not finite but regular.

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Construction of CFG Part - 2
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon