Question: Which of the following is/are true?

Question:
Which of the following is/are true?

Answer: A. L={10,01,001,010} has no prefix property; C. We can make every ambiguous regular grammar unambiguousa) L = {10, 01, 001, 010}, a string is prefix of another string in some language hence violation of prefix property. b) NO, some grammars are inherently…

  1. A.

    L={10,01,001,010} has no prefix property

  2. B.

    We can always remove ambiguity from every ambiguous CFG

  3. C.

    We can make every ambiguous regular grammar unambiguous

  4. D.

    Grammar is ambiguous if there exist two or more LMD or RMD for every string present in language

Attempted by 53 students.

Show answer & explanation

Correct answer: A, C

a) L = {10, 01, 001, 010}, a string is prefix of another string in some language hence violation of prefix property.

b) NO, some grammars are inherently ambiguous.

c) For regular grammars, it is possible because regular languages are unambiguous.

d) NO, grammar is ambiguous if there exists at least one string for which we get two or more LMDs or RMDs.


Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…