hw6sol

hw6sol - CSE 105: Introduction to the Theory of Comptuation...

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

View Full Document Right Arrow Icon
CSE 105: Introduction to the Theory of Comptuation Fall 2010 Problem Set 6 Instructor: Daniele Micciancio Due on: Fri. Nov 19, 2010 Problem 1 Consider a context free grammar G over the alphabet { 0 , 1 } . Any such a grammar can be described as a string of symbols (very much like computer programs can be stored in text files) over the alphabet Σ = { 0 , 1 ,A, [ , ] ,>, ; } , where grammar variables are represented as elements of an array A [ n ] . Prove that the set of all context free grammars as described above is regular by giving a DFA M for it. Solution: The set of context free grammars is accepted by the following DFA: Alternatively, this set can be described by the regular expression “(A[(0+1)*]>(0+1+A[(0+1)*])*;)*”. The given automaton was obtained from the regular expression, using jflap, by converting it first to an NFA, then removing non-determinism to get a DFA, and finally simplifying the result. Problem 2
Background image of page 1

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

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

This note was uploaded on 08/31/2011 for the course CSE 105 taught by Professor Paturi during the Fall '99 term at UCSD.

Page1 / 2

hw6sol - CSE 105: Introduction to the Theory of Comptuation...

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