Removing identical variables in CFG Unit Productions
In you example the production A-&gt;AA can not be removed. If that production is removed then the language described by the grammar will change. But in case of a production like A-&gt;A, the removal will not affect the language described by the Grammar.