Computer Science EngineeringModerate
Context-free grammars correspond to which type in the Chomsky hierarchy?
- A. Type 2
- B. Type 0
- C. Type 1
- D. Type 3
Correct answer: A. Type 2
Type 2 grammars have a single non-terminal on the left of every production, i.e. context-free grammars.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- Which of the following languages over {a, b} is NOT regular?
- An NFA has 5 states. By subset construction, the equivalent DFA needs at most how many states?
- Context-free languages are NOT closed under which operation?
- Which of the following languages requires a nondeterministic pushdown automaton (cannot be accepted by a deterministic PDA)?
- If both a language L and its complement are recursively enumerable, then L is
- Left recursion must be eliminated from a grammar before it can be used with