hw3_solution

hw3_solution - CS150 Homework 3 Due 5/15 Problem 1....

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

View Full Document Right Arrow Icon
CS150 Homework 3 Due 5/15 Problem 1. (Exercise 4.1.1 (d) (f), 10 points) Prove that the following are not regular languages. (d) { 0 n 1 m 2 n | n and m are arbitrary integers } . (f) { 0 n 1 2 n | n 1 } (d) Proof. Assume the language L is regular, let p be the pumping-lemma constant. Pick w = 0 p 12 p . Then when we write w = xyz , we know that | xy | ≤ p , and therefore y consists of only 0’s. Thus, xz , which must be in L if L is regular, consists of fewer than p 0’s, followed by a 1 and exactly p 2’s. That string is not in L , so we contradict the assumption that L is regular. / (f) Proof. Assume the language L is regular, let p be the pumping-lemma constant. Pick w = 0 p 1 2 p . Then when we write w = xyz , we know that | xy | ≤ p , and therefore y consists of only 0’s. Thus, xz , which must be in L if L is regular, consists of fewer than p 0’s, followed by exactly 2 p 1’s. That string is not in L , so we contradict the assumption that L is regular. / 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 2. (Exercise 4.1.2 (c), 10 points) Prove that the following are not regular languages. (e) The set of strings of 0’s and 1’s that are of the form
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/31/2008 for the course CS 150 taught by Professor Jiang during the Spring '07 term at UC Riverside.

Page1 / 5

hw3_solution - CS150 Homework 3 Due 5/15 Problem 1....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online