Consider the following grammar \(𝐺\): \(π‘†β†’π΄βˆ£π΅ \\ π΄β†’π‘Žβˆ£π‘ \\ π΅β†’π‘βˆ£π‘\)…

PYQ UGC NET 2018

Consider the following grammar 𝐺𝐺:

π‘†β†’π΄βˆ£π΅π΄β†’π‘Žβˆ£π‘π΅β†’π‘βˆ£π‘π‘†β†’π΄βˆ£π΅ \\ π΄β†’π‘Žβˆ£π‘ \\ π΅β†’π‘βˆ£π‘

whereΒ {𝑆,𝐴,𝐡}\{𝑆,𝐴,𝐡\}Β is the set of non-terminals,Β {π‘Ž,𝑏,𝑐}\{π‘Ž,𝑏,𝑐\}Β is the set of terminals.

Which of the following statement(s) is/are correct?

𝑆1𝑆_1: 𝐿𝑅(1)𝐿𝑅(1)Β can parse all strings that are generated using grammar 𝐺𝐺.

𝑆2𝑆_2: 𝐿𝐿(1)𝐿𝐿(1)Β can parse all strings that are generated using grammar 𝐺𝐺.

Choose the correct answer from the code given below:

  1. A.

    Only 𝑆1𝑆_1

  2. B.

    Only 𝑆2𝑆_2

  3. C.

    Both 𝑆1𝑆_1Β and 𝑆2𝑆_2

  4. D.

    Neither 𝑆1𝑆_1Β nor 𝑆2𝑆_2

Attempted by 165 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…