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 ?
- A.
(i), (ii), and (iii)
- B.
(ii), (v), and (vi)
- C.
(ii), (iii), and (iv)
- D.
(i), (iii), and (iv)
Attempted by 66 students.
Show answer
Correct answer: C
The worked solution is available to enrolled students.
Video solution available to enrolled students.
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…