Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A context free language is called ambiguous i... Start Learning for Free
A context free language is called ambiguous if
  • a)
    It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)
  • b)
    It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)
  • c)
    Both (a) and (b)
  • d)
    None of the mentioned
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
A context free language is called ambiguous ifa)It has 2 or more than ...
When two or more Left and right most derivative occur the grammar turn ambiguous.
View all questions of this test
Most Upvoted Answer
A context free language is called ambiguous ifa)It has 2 or more than ...
Ambiguous Context-Free Language

Definition:
A context-free language is said to be ambiguous if the grammar generating the language has two or more than two parse trees for a single string.

Explanation:
An ambiguous grammar is that grammar where the same string can be derived in more than one way. Due to this, there can be more than one parse tree for the same string. An ambiguous grammar is known to be a context-free grammar, but not all context-free grammars are ambiguous.

Example:
Consider the grammar for the language L = {a^n b^n | n ≥ 1}:

S → aSb | ab

The string “aabbb” can be derived by both of the following two parse trees:

S → aSb → aaSbb → aab b → aabb
S → ab → aabb

Thus, the grammar is ambiguous.

Conclusion:
An ambiguous grammar is not useful in practical applications because it creates confusion while parsing. Therefore, it is necessary to convert the ambiguous grammar to an unambiguous grammar.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer?
Question Description
A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer?.
Solutions for A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A context free language is called ambiguous ifa)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)b)It has 2 or more than 2 left derivations for some terminal string ѡ є L (G)c)Both (a) and (b)d)None of the mentionedCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev