final exam solutions

Final exam solutions - CS 360 final exam questions from Spring 2007 The following questions appeared on the CS 360 final exam for Spring 2007(The

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: 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 context-free 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.

Page1 / 2

Final exam solutions - CS 360 final exam questions from Spring 2007 The following questions appeared on the CS 360 final exam for Spring 2007(The

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