0 0 votes Eliminate all useless productions S->a|aA|B|C, A->aB|λ, B->Aa C->cCD , D->ddd also eliminate all λ productions from S->AaB|aaB, A->λ, B->bbA|λ Theory of Computation + – Sanjay Sharma 6.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 2 2 votes Useless production are those which cannot generate terminal Here C is useless So, after removing useless production grammar will be S-> a | aA | B A-> aB | ⋋ B -> Aa Eliminating ⋋ production from 2nd grammar it will be S->a|aa|aB|aaB, B->bb srestha answered May 26, 2016 • selected May 26, 2016 by Praveen Saini srestha comment Share Follow See all 2 Comments 2 2 Comments reply ManojK commented May 26, 2016 reply Follow flag B -> bbA | ⋋ Second Grammar production. 1 1 replyShare srestha commented May 26, 2016 reply Follow flag yes tnks 1 1 replyShare Please log in or register to add a comment.
2 2 votes First one : S->a|aA|B A->aB B->Aa|a Epsilon production also removed Second one : S->aB|aaB|a|aa B->bb Prasita Mukherjee answered May 26, 2016 Prasita Mukherjee comment Share Follow See all 2 Comments 2 2 Comments reply Sanjay Sharma commented May 26, 2016 reply Follow flag A-> aB | ⋋ will remain as it is in first grammar otherwise how we terminate the string 0 0 replyShare Prasita Mukherjee commented May 27, 2016 reply Follow flag It will go to production B and then get terminated if production A is reached from S. 0 0 replyShare Please log in or register to add a comment.