
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Problem set 5 for cs 172 - computability and complexity, a university course offered in the fall of 2003. The problem set includes three programming problems related to pushdown automata (pda) and context-free grammars (cfg). Problem 1 asks for a pda and cfg for three given languages: palindromes (l1), a language of words with twice as many 0's as 1's (l3), and a regular expression language (l2). Problem 2 asks to construct a pda recognizing the intersection of the languages recognized by a given pda (a) and a dfa (b).
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

CS 172 — Fall 2003 Problem Set # Computability and Complexity Due October 1, 2003
Problem 5.1. (10 points) For the following three languages Li over the alphabet { 0 , 1 }, give both a PDA that recognizes Li and a CFG that generates Li.
Problem 5.2. (5 points) Show that the intersection of a context-free language and a regular language is always context-free. That is, given a PDA A and a DFA B, construct a PDA C so that L(C) = L(A) ∩ L(B).