Theory Of Computation MCQ

1:

Consider the grammar
                             S ---> PQ | SQ | PS
                             P ---> x
                             Q-->   y

To get a string of n terminals, the number of productions to be used is

A.

n2

B.

n + 1

C.

2n

D.

2n - 1

 

Answer : D

Explanation :

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.