in Others edited by
190 views
0 votes
0 votes

 

What is the safest order while simplifying Context Free Grammar?

  1. Elimination of $\varepsilon$-productions, Unit productions and then Useless symbols \& productions.
  2. Elimination of useless symbols \& productions, $\varepsilon$-productions and then Unit productions.
  3. Elimination of Unit productions, $\varepsilon$-productions and then Useless symbols and productions.
  4. Elimination of $\varepsilon$-productions, Useless symbols and productions and then Unit productions.

(Option $1[39629]) 1$
(Option $2[39630]) 2$
(Option $3[39631]) 3$
(Option $4 [39632]) 4$

Answer Given by Candidate: $2$

in Others edited by
by
190 views

1 Answer

0 votes
0 votes

$(A)$ 

  1. Elimination of ε-productions (A): ε-productions can potentially introduce new unit productions into the grammar, so it’s usually better to eliminate these first.
  2. Elimination of unit productions (B): The removal of unit productions could potentially make a previously useful production into a useless one, so it’s better to handle unit productions before dealing with useless ones.
  3. Elimination of useless symbols & productions (C): This is typically done last, as the previous elimination steps could potentially create new useless symbols or productions that need to be eliminated.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

64.3k questions

77.9k answers

244k comments

80.0k users