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 360 final exam questions from Spring 2007 The following questions appeared on the CS 360 final exam for Spring 2007. (The usual exam cover sheet, formatting, and point values have been removed.) 1. Define a language A ⊆ { 0, 1 } ∗ as follows: A = { w ∈ { 0, 1 } ∗ : w contains the substring 000, but does not contain the substring 0000 } . Give the state transition diagram of a DFA that recognizes A . 2. Consider the following NFA N : q 1 q 2 1 0, 1 (a) Give the state transition diagram of a DFA that recognizes the language L ( N ) . (b) Give an NFA with two states that recognizes L ( N ) . 3. Consider the following language over the alphabet { } : B = { n : either n is odd or n = 2 k for some integer k ≥ 1 } . Prove that B is not regular. 4. Let C be the following language: C = { x ∈ { 0, 1 } ∗ : x does not contain either of the substrings 011101 or 1100 } . Prove that C is a contextfree language....
View
Full
Document
This note was uploaded on 09/22/2011 for the course CS 360 taught by Professor Johnwatrous during the Spring '08 term at Waterloo.
 Spring '08
 JohnWatrous

Click to edit the document details