This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CPSC 313 — Midterm Test February 26, 2004 Name: Lecture Section: Lab Section: Please DO NOT write your ID number on this page. Instructions: Answer all multiple choice questions in part A on the score card using pencil . Answer all questions in part B in the space provided. No Aids Allowed. This test is out of 25. Duration: 90 minutes ID Number: Section Question Score Possible score A 16 9 B 1 10 2 6 Total: 25 Total: 1 ID Number: Part A  Multiple Choice Answer all multiple choice questions on the score card using pencil . Each question is worth 1.5 marks. 1. Let L 1 = { w ∈ { a, b } *  w has the same number of a ’s and b ’s } . Which of the following statements is true? (a) Since L ( a * b * ) is a regular language and since L 1 ⊆ L ( a * b * ), L 1 is regular by the closure properties of regular languages. (b) L 1 is not a regular languages since, after fruitlessly trying for several hours to create a FA that would accept L 1 , I have come to the conclusion that no such FA exists. Therefore L 1 is not a regular language. (c) L 1 is a regular language since the following DFA accepts L 1 . q Start 1 q 5 q 2 q 4 q 3 q a b a b a a b b a b a,b (d) L 1 is not a regular language, which can be shown using the pumping lemma and choosing w = a n b n and i = 2. 2. Let M 2 = ( Q, Σ , δ, q , F ) be some epsilon nondeterministic finite automaton. Choose the most correct statement below....
View
Full
Document
This note was uploaded on 10/19/2008 for the course CPSC 313 taught by Professor Na during the Spring '08 term at University of Calgary.
 Spring '08
 NA

Click to edit the document details