# hw6 - Problem 5. Unrestricted grammars , UG, are...

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

ECS 120: Introduction to Theory of Computation Homework 6 Problem 1. Prove that L a = { a i b j c k : j = max { i,k }} is not context free. Problem 2. Show that the following languages are context-free by designing push-down automata that recognize them. (a) The complement of the language L = { a n b n | n 0 } (b) { w # x | w R is a substring of x for w,x ∈ { 0 , 1 } * } Problem 3. Find a decision procedure which determines if a given CFG (with alphabet { a,b } ) accepts at least one string which contains exactly 4 b ’s. (you can assume that you have procedures that can convert PDAs into CFGs and CFGs into PDAs) Problem 4. Give the “syntax” (a something-tuple) for a two-stack, deterministic, push- down automaton (a 2S/PDA). Explain the intended meaning for your transition function.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Problem 5. Unrestricted grammars , UG, are generalizations of Context Free Grammars, where the left hand side is not restricted to being a single nonterminal symbol any-more. Each rule of an UG is a non-empty string of variables and/or terminals on the left and any string of variables and/or terminals on the right. Formally, the production rules of an UG are dened as R ( V ) + ( V ) * . For example, AbC b is a valid rule in some UG. It is known that UGs generate exactly all languages that can be recognized by a Turing Machine. In this problem, you are asked to give an UG for the language { a n b n c n | n } . 1...
View Full Document

## This note was uploaded on 04/29/2010 for the course ECS 222 taught by Professor Mr. during the Spring '10 term at UC Davis.

Ask a homework question - tutors are online