A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. The context free grammar for the language

L= {anbm  | n ≤ m+3,n ≥ 0 ,m≥ 0 } : is
a. S → aaa; A → aAb | B, B →  Bb |  λ 
b. S → aaaA | λ ; A → aAb | B; B →  Bb |  λ ;
c. S → aaaA | aaA | λ ; A → aAb | B; ​B →  Bb |  λ ;
d. S → aaaA | aaA | aA |  λ ; A → aAb | B; ​B →  Bb |  λ ;
Answer:S → aaaA | aaA | λ ; A → aAb | B; ​B →  Bb |  λ ;

Similar Questions:



View All Questions on: Theory of Computation(TOC)


Start The Conversation: