Computer Science, asked by sheelaranisp084, 8 months ago

For simplification of a context free grammar, which of the following operations can be skipped and also identify the order for the same. a) Removal of null or lambda productions. b) Removal of useless productions c) Removal of unit productions d) None of the mentioned​

Answers

Answered by nidaeamann
0

Answer:

Option a and b

Explanation:

A context free grammar is used in order to generate several models of grammar, and this can be done by even taking useless production in grammar or redundant models even.

However when it comes to simplification of context free grammar, then we first take out these, which are useless production, redundant ones and the null or lambda productions

Answered by kirtisingh01
0

Simplifying Context Free Grammars

  • The meaning of setting free punctuations (CFGs) permits us to build up a wide assortment of sentence structures. More often than not, a portion of the creations of CFGs are not helpful and are excess. This happens on the grounds that the meaning of CFGs doesn't limit us from making these excess creations.  
  • By disentangling CFGs we expel all these excess creations from a syntax , while keeping the changed punctuation comparable to the first language. Two punctuations are called comparable in the event that they produce a similar language. Streamlining CFGs is important to later change over them into Normal structures.  
  • Kinds of repetitive creations and the technique of evacuating them are referenced beneath.  

Futile creations – The creations that can never partake in induction of any string , are called pointless creations. Thus , a variable that can never partake in determination of any string is known as a pointless variable. For eg.  

S - > abS | abA | abB  

A - > cd  

B - > aB  

C - > dc  

  • In the model above , creation 'C - > dc' is futile on the grounds that the variable 'C' will never happen in induction of any string. Different creations are written so that variable 'C' can never came to from the beginning variable 'S'.
Similar questions