• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | Quiz for Sudo GATE 2021 | Question 49

Consider the following grammars G1 and G2 respectively. Grammar - G1:
A1 → A2A3
A2 → A3A1 | b
A3 → A1A1 | a
Grammar - G2:
S → AA | 0
A → SS | 1
Consider the following statements regarding above grammars: (I): This grammar is not left recursive and equivalent to grammar - G1:
A1 → A2A3
A2 →  A3A1 | b
A3 → a | bA3A1 | aK | bA3A1K 
k → A1A3A1 | A1A3A1K
(II): This grammar is not left recursive and equivalent to grammar - G2:
S → A A | 0
A → 0S | 1 | 0SK | 1K
K → AS | ASK
Note - This question is multiple select questions (MSQ).

(A)

Statement (I) is correct

(B)

Statement (II) is correct

(C)

Statement (I) is not correct

(D)

Statement (II) is not correct

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments