GATE 2013: Clarity about unit productions

How to solve ? Clarity about unit productions

 

Image icon Screenshot from 2015-01-31 17:20:29.png

2Comments
Arvind Rawat @arvind.rawat 2 Feb 2015 12:39 pm

Ans is (B). To have maximum number of reduce moves, all the productions will be of the type A → αβ (where α and β could be terminals or non-terminals).

Kalpish Singhal @kalpishsinghal 21 Mar 2015 09:38 pm

Ans will be B

A->BC

B->aa

C->bb

now suppose string is aabb

then 

A->BC(reduction 3)

->aaC(reduction 2)

->aabb (reduction 1)

n = 4 

and number of reductions are 3 so n-1