Consider the grammar given below S → x B | y A A → x | x S | y A A B → y | y S…

GATE · 2007 · IT

Consider the grammar given below


S → x B | y A

A → x | x S | y A A

B → y | y S | x B B


Consider the following strings.


(i) xxyyx

(ii) xxyyxy

(iii) xyxy

(iv) yxxy

(v) yxx

(vi) xyx

Which of the above strings are generated by the grammar ?

  1. A.

    (i), (ii), and (iii)

  2. B.

    (ii), (v), and (vi)

  3. C.

    (ii), (iii), and (iv)

  4. D.

    (i), (iii), and (iv)

Attempted by 70 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…