Homework 3 - CSCI 2400 - Models of Computation Homework 3...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSCI 2400 - Models of Computation Homework 3 Solutions Problem 1 (25 points) Give a regular expression that describes the following language: L = { a n b m : n + m = 3 k , k } . Solution: ( aaa ) * ( aab + abb + ) ( bbb ) * Problem 2 (75 = 5x15 points) Show that the following languages are not regular: L 1 = { a n 3 : n } Solution L 1 : This language can be shown to be not regular by using the pump- ing lemma, and the Proof by Contradiction proof technique. Assume the language is regular, and attempt to find a contradiction. For the pumping lemma to hold, there must m 1 such that w L 1 with | w | m , there a partition xyz of w subject to the constraints | y | 1 and | xy | m , such that i 0, xy i z L 1 . For any arbitrary value of m , let us look at the string a m 3 . This string is clearly of length m for all m 1, and it is clearly L 1 . Further, for any arbitrary partition xyz of this string, let us look at the string xy 2 z which must be L 1 for the pumping lemma to hold. | xy 2 z | = m 3 + k , where 1 k m . The length of this string | xy 2 z | cannot equal | a n 3 | for any n : m 3 < m 3 + k < ( m +1) 3 = m 3 + 3 m 2 + 3 m + 1 Thus xy 2 z negationslash L 1 , which is a contradiction. L 1 is not regular....
View Full Document

This homework help was uploaded on 04/07/2008 for the course CSCI 2400 taught by Professor Carothers during the Spring '08 term at Rensselaer Polytechnic Institute.

Page1 / 3

Homework 3 - CSCI 2400 - Models of Computation Homework 3...

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

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