Spread the love Welcome back! You need to know everything from how to filter out scams on sites like Alibaba to the best ways to order product samples , as well as all kinds of specific, previously unknown business terms and abbreviations. Having your price or shipping terms wrong can turn your first order into a massive disaster! You can easily incur unexpected charges that you never accounted for, which can totally ruin your projected margins and chances of being profitable on eBay or Amazon.
|Published (Last):||26 December 2012|
|PDF File Size:||18.80 Mb|
|ePub File Size:||10.8 Mb|
|Price:||Free* [*Free Regsitration Required]|
Since we love to prove things, we must first prove that we can restrict the structure of our grammars--without losing any expressiveness i. So, how do we do that? Bn for that B. So clearly, any derivation in G1 is also a derivation in G.
Therefore, we have built a grammar in G1 for any grammar in G. All we said is that you can pick out an arbitrary A-production from a random grammar--and that if you apply this transformation to the grammar, you will get back an equivalent grammar. The easiest thing to do is rename the variables in V for example, make their names now be A1, A NB Some orderings are easier to work with than others, but any ordering will work. Do this first for A1, then for A2, and so on, till you reach An.
Note that after applying this algorithm for a particular variable, all of the productions for A1 up to Ai will be only be the forms shown by cases 1,2,3. Then again working your way up the numbering scheme apply the second algorithm to all of the productions of the form in case 3. This leaves all productions to have RHS which either begin with a terminal, or with a higher numbered variable. Now An-1 will have the same property, do it for An-2, and continue down to A1.
Finally we have to take care of the B-productions, but notice that, due to the structure of algorithm 2, the RHS of any B-production must start with an A-variable. And, we just made it so that all of the A-productions have terminals as the leftmost symbol of their RHS. So, we can just substitute the A-productions in to the B-productions, and now every production will be of the appropriate form.
Greibach Normal Form & CFG to GNF Conversion Computer Science Engineering (CSE) Video | EduRev
Alternate Educational Experience for March 19, 1998
Subscribe to RSS
Converting Context Free Grammar to Greibach Normal Form