{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw6sol

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

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

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 The language L = L ( M ) described in problem 1 is a set of string over the 7 symbol alphabet Σ = { 0 , 1 , A, [ , ] , >, ; } . Consider the function φ (0) = 000 , φ (1) = 001 , φ ( A ) = 010 , φ ([) = 011

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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
Ask a homework question - tutors are online