ChomskyNFclarification.docx - Chomsky Normal Form...

This preview shows page 1 - 3 out of 3 pages.

Chomsky Normal Form – Clarification of the last step. After removing A  and A B production rules in the given CFG, we will have have a grammar with production rules of the form A a , or A C 1 C 2 C 3…… C n where the C’s are non-terminal symbols in the original grammar. In the last step we have to introduce additional variables to reduce the length of the right hand sides of the productions when necessary (that is when one has more than two non-terminal symbols). For the above case we introduce new variables D 1 D 2 D 3 ……. as follows: A C 1 D 1 D 1 C 2 D 2 ……….. D n-2 C n-1 C n As an example, we replace the rules S ABC A CCD by S A D 1 D 1 BC A C D 2 D 2 CD For the example we discussed in the class, after removing A
Image of page 1

Subscribe to view the full document.

Image of page 2
Image of page 3
  • Fall '15
  • Narendragoel
  • Context-free grammar, AAG, variables D1 D2, AB production rules

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern