AnswersH5 - University of Central Florida School of Computer Science COT 4210 Spring 2004 Prof Rene Peralta Homework 5:answers to selected problems

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

View Full Document Right Arrow Icon
University of Central Florida School of Computer Science COT 4210 Spring 2004 Prof. Rene Peralta Homework 5:answers to selected problems 1. Construct an extended PDA for the language given by the following grammar S aBB + bAA A bAB + a B aBA + b answer: 2. Consider the language L generated by the following grammar. S AT + BR + λ W AT + BR + a + b T WA + a R WB + b A a B b (a) Find a minimum-length string in L which satisfies the pumping lemma for CFLs. answer: The idea is to find a shortest derivation tree that repeats a variable along a path from the root to a leaf. In the derivation tree below, we see that 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
S aaTa T aTa We also know T a . Thus the strings aa i aa i are in the language for all i 0. This illustrates the general technique to solve this problem (yielding the candidate answer “aaaa”). In this particular language, however, the strings a i a i are in the language for all i 0 (because of the rule S λ ). So the answer is “aa”.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2011 for the course COT 4210 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 3

AnswersH5 - University of Central Florida School of Computer Science COT 4210 Spring 2004 Prof Rene Peralta Homework 5:answers to selected problems

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

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