Assignment4

Assignment4 - A → aBS | B B → Aaab | C → cCDA D →...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COT 4420: Introduction to Formal Languages and Automata Fall 09 1 Assignment 4 Posted on Oct 28, due on Nov 16 There are 6 problems. Maximum total is 65 points There are two bonus problems and each is worth 1% extra credit in the final score. Only complete solutions of the bonus problem will de considered. 10 points 1. Find a context-free grammar for the following language L = { a n b m : n < m-1 and n 0, m > 1} 10 points 2. Show a derivation tree for the string ababbb with the grammar S AB | λ A aB B Sb 10 points 3. Consider the derivation tree below: Find a context-free grammar G for which this is the derivation tree of the string aab . Then find two more sentences of L(G). 15 points 4. Consider the grammar represented by the productions: S a | aaA | BbC | Aba
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A → aBS | B B → Aaab | λ C → cCDA D → ddd Solve the following parts, in the following order : • (5 pts) Remove λ- productions. Show the resultant grammar. • (5 pts) Remove unit productions. Show the resultant grammar. • (5 pts) Remove useless productions S S S a λ a b COT 4420: Introduction to Formal Languages and Automata Fall 09 2 10 points 5. Transform the grammar with productions S → bbAA A → aAB B → ABa | A | λ into Chomsky normal form Note: remove first the λ-productions and unit-productions. 10 points 6. Convert the grammar S → ABb | a A → aaA | B B → bAb into Greibach normal form. Bonus 1 Show that the following grammar is ambiguos: S → aSbS | bSaS | λ Bonus 2 Find an s-grammar for L(aab*a + aba*b)...
View Full Document

This note was uploaded on 11/16/2009 for the course COT 4420 taught by Professor Staff during the Spring '08 term at FAU.

Page1 / 2

Assignment4 - A → aBS | B B → Aaab | C → cCDA D →...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online