Computer Sciences > GATE 2026 SET-2 > Theory of Computation
Which of the following grammars is/are ambiguous?
A
S → aSb | ε
B
E → E + E | E * E | id
C
S → aS | Sa | ε
D
S → aS | ε

Correct : b,c

Similar Questions

Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s,p,q,r}, with s being th...
#952 MCQ
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions: Which one of the fo...
#956 MCQ
Consider the context-free grammar G below: S -> aSb | X X -> aX | Xb | a | b where S and X are non-terminals, and a and b are terminal symbols. The starting non...
#974 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......