This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 341: Foundations of Computer Science II Prof. Marvin Nakayama Homework 3 1. Give NFAs with the specified number of states recognizing each of the following languages. In all cases, the alphabet is = { , 1 } . (a) The language { w *  w ends with 00 } with three states. (b) The language { w *  w contains the substring 0101 , i.e., w = x 0101 y for some x,y * } with five states. (c) The language { w *  w contains at least two s, or exactly two 1 s } with six states. (d) The language { } with one state. (e) The language * 1 * * with three states. 2. (a) Show by giving an example that, if M is an NFA that recognizes language C , swapping the accept and nonaccept states in M doesnt necessarily yield a new NFA that recognizes C . (b) Is the class of languages recognized by NFAs closed under complement? Ex plain your answer. 3. Use the construction given in Theorem 1.39 to convert the following NFA N into an equivalent DFA. 1 2 3 a a a,b b 4. Give regular expressions that generate each of the following languages. In all cases, the alphabet is = { a, b } ....
View
Full
Document
This note was uploaded on 01/22/2011 for the course CIS 341 taught by Professor Nakayama during the Fall '10 term at NJIT.
 Fall '10
 Nakayama
 Computer Science

Click to edit the document details