Given Grammar G: S->aA A->a| A B->B The number of productions to be removed immediately as Unit productions:

Given Grammar G:
S->aA
A->a| A
B->B
The number of productions to be removed immediately as Unit productions:
A. 0
B. 1
C. 2
D. 3
 
Answer: C
Explanation: The productions in the format A-> A are removed immediately as they produce self and that is not a terminal or will not lead to a string. Hence, it is removed immediately.
 

Tìm kiếm

Back
Top