12.07.2015 Views

Context-Free Grammars - Chomsky Normal Form - Hampden ...

Context-Free Grammars - Chomsky Normal Form - Hampden ...

Context-Free Grammars - Chomsky Normal Form - Hampden ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Homework Review<strong>Context</strong>-<strong>Free</strong><strong>Grammars</strong> -<strong>Chomsky</strong><strong>Normal</strong> <strong>Form</strong>Robb T.KoetherHomeworkReview<strong>Chomsky</strong><strong>Normal</strong> <strong>Form</strong>New start symbolEliminate all ε-rulesEliminate all unitrulesEliminate all mixedrulesEliminate all longrulesDerivations inCNFSolution(o) Now X can be replaced with either a or b(p) Therefore, X n and X m can be any string in Σ ∗ .(q) Thus, the language is the set of all strings of the formuavbw or ubvaw, where u, v, w ∈ Σ ∗ and |u| = |w|.(r) It is not hard to see that this is the complement of theset {ww R | w ∈ Σ ∗ }.TheMembershipProblem forCFGsAssignment

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!