Any string of terminals that can be generated by the following context free…

PYQ UGC NET 2021

Any string of terminals that can be generated by the following context free grammar (where S is start nonterminal symbol) 

S→XYX→0X∣1X∣0Y→Y0∣Y1∣0S \rightarrow XY \\ X \rightarrow 0X |1X|0 \\ Y \rightarrow Y0|Y1|0

  1. A.

    has at least one 1

  2. B.

    should end with 0

  3. C.

    has no consecutive 0’s or 1’s

  4. D.

    has at least two 0’s

Attempted by 71 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…