All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · December 2022 Shift 1

Which of the following is an ε-free grammar?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. Type-1

Explanation

Type-1 (context-sensitive) grammars are non-contracting (|α| ≤ |β|), so they have no ε-productions (apart from the special S → ε). Type-0, Type-2 and Type-3 grammars may contain A → ε. (Some published keys print Type-3, but regular grammars allow ε-productions.)

More Theory of Computation and Compilers questions