CS381-2002fa-prelim2 - x iff x S ' ' 2. Use the pumping...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS381 Second Mid Term Friday Nov 8, 2002 Fall 2002 Olin 155 9:05-9:55 This is a 50-minute in class closed book exam. All questions are straightforward and you should have no trouble doing them. Please show all work and write legibly. Thank you. 1. (a) Give a context-free grammar for the language } ' ' * ) ( | { s b and s a of number equal an has x and b a x x + (b) For each variable in the grammar describe the strings that can be generated from the variable by a statement such as s b and s a of number equal an has
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x iff x S ' ' 2. Use the pumping lemma to prove that the language )*} ( | { b a w ww + is not a context-free language. 3. (a) What is the meaning of a symbol of the form [qAp] in the conversion of a pda to a cfg? (b) Suppose ) , , ( A a q contains ) , ( 2 1 k A A A s L . What productions does this give rise to in the grammar? (c) Suppose ) , , ( A a q contains ) , ( s . What productions does this give rise to in the grammar?...
View Full Document

This homework help was uploaded on 01/29/2008 for the course CS 3810 taught by Professor Hopcroft during the Fall '07 term at Cornell University (Engineering School).

Ask a homework question - tutors are online