hw4 - L = { i 1 j | i,j ≥ 0 and i 6 = j } . b. The...

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

View Full Document Right Arrow Icon
CS 181 — Winter 2006 Problem Set #4 Formal Languages and Automata Theory Due February 6, 2008 Problem 4.1. (10 points) 1. Show that if all productions of a CFG G are of the form A wB or A w for variables A,B V and strings of terminals w Σ * , then L ( G ) is regular. 2. Are context free languages closed under reverse? Problem 4.2. (10 points) For each of the following languages, state if they are regular or not regular, and justify your answer. a. The language
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: L = { i 1 j | i,j ≥ 0 and i 6 = j } . b. The language L 10 for the lexicographically first 10 strings of the language L . c. The language M = { xy ∈ { , 1 } * | the number of in x is the same as the number of in y } . Problem 4.3. (10 points) Give a context-free grammar for the language { i 1 j 2 k | i,j,k ≥ 0 and either i = j or i = k } . Is this language regular (justify)?...
View Full Document

This note was uploaded on 06/03/2008 for the course CS 181 taught by Professor Rupak during the Winter '08 term at UCLA.

Ask a homework question - tutors are online