MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The productionsE->E+EE->E-EE
A
generate an inherently ambiguous language
B
generate an ambiguous language but not inherently so
C
are unambiguous
D
can generate all possible fixed length valid computation for carrying out addition, subtraction, multipication and division, which can be expressed in one expression
Explanation: 

Detailed explanation-1: -Since there exists at least one unambiguous grammar which generates language L. Therefore, L is not an inherently ambiguous language.

Detailed explanation-2: -b) Non removable ambiguity (or inherent ambiguity) : This is the situation when every grammar that generates a given language, say L, is ambiguous then we say the language is inherently ambiguous..

Detailed explanation-3: -A grammar is said to be ambiguous if there exists more than one leftmost derivation or more than one rightmost derivation or more than one parse tree for the given input string. If the grammar is not ambiguous, then it is called unambiguous. If the grammar has ambiguity, then it is not good for compiler construction.

Detailed explanation-4: -Explanation: A context free language for which no unambiguous grammar exists, is called Inherent ambiguous language.

There is 1 question to complete.