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 unambiguous — 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…
- A.
L={10,01,001,010} has no prefix property
- B.
We can always remove ambiguity from every ambiguous CFG
- C.
We can make every ambiguous regular grammar unambiguous
- 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.