CS 311 Sample Final Examination

Similar documents
Homework Assignment 6 Answers

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

Please give details of your answer. A direct answer without explanation is not counted.

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

CSCE 551 Final Exam, Spring 2004 Answer Key

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

Midterm II : Formal Languages, Automata, and Computability

CS21 Decidability and Tractability

CSE 105 THEORY OF COMPUTATION

3130CIT Theory of Computation

V Honors Theory of Computation

CpSc 421 Final Exam December 15, 2006

I have read and understand all of the instructions below, and I will obey the University Code on Academic Integrity.

Answers to the CSCE 551 Final Exam, April 30, 2008

Computability and Complexity

Theory Bridge Exam Example Questions

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

Announcements. Using a 72-hour extension, due Monday at 11:30AM.

CSCE 551 Final Exam, April 28, 2016 Answer Key

Exam Computability and Complexity

Student#: CISC-462 Exam, December XY, 2017 Page 1 of 12

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

Final exam study sheet for CS3719 Turing machines and decidability.

CSE 105 THEORY OF COMPUTATION

Theory of Computation

1 Showing Recognizability

Computability Theory

Lecture 24: Randomized Complexity, Course Summary

SCHEME FOR INTERNAL ASSESSMENT TEST 3

CSE 555 Homework Three Sample Solutions

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

452 FINAL- VERSION E Do not open this exam until you are told. Read these instructions:

Final Exam Version A December 16, 2014 Name: NetID: Section: # Total Score

Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3

Theory of Computation (IX) Yijia Chen Fudan University

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Part I: Definitions and Properties

Intro to Theory of Computation

TURING MAHINES

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CS154 Final Examination

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA)

CS154 Final Examination

Solutions to Old Final Exams (For Fall 2007)

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

Introduction to Turing Machines. Reading: Chapters 8 & 9

DM17. Beregnelighed. Jacob Aae Mikkelsen

Languages, regular languages, finite automata

Name: Student ID: Instructions:

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Decidability (What, stuff is unsolvable?)

CS 154 Introduction to Automata and Complexity Theory

Computability and Complexity CISC462, Fall 2018, Space complexity 1

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

6.045 Final Exam Solutions

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

The Unsolvability of the Halting Problem. Chapter 19

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

16.1 Countability. CS125 Lecture 16 Fall 2014

SE 3310b Theoretical Foundations of Software Engineering. Turing Machines. Aleksander Essex

Johns Hopkins Math Tournament Proof Round: Automata

Turing Machine Variants

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

Reducability. Sipser, pages

Pumping Lemma for CFLs

Decidable and undecidable languages

VTU QUESTION BANK. Unit 1. Introduction to Finite Automata. 1. Obtain DFAs to accept strings of a s and b s having exactly one a.

(Note that these points are to give a relative sense of the weights on the final exam and have no bearing on extra credit points)

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

CMPT 710/407 - Complexity Theory Lecture 4: Complexity Classes, Completeness, Linear Speedup, and Hierarchy Theorems

CSE 355 Test 2, Fall 2016

Approximation Algorithms

How to Pop a Deep PDA Matters

Theory of Computation

CSCC63 Worksheet Turing Machines

Automata and Computability. Solutions to Exercises

Foundations of

CSE 105 THEORY OF COMPUTATION

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

NP, polynomial-time mapping reductions, and NP-completeness

5 3 Watson-Crick Automata with Several Runs

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

From Fundamentele Informatica 1: inleverdatum 1 april 2014, 13:45 uur. A Set A of the Same Size as B or Larger Than B. A itself is not.

ECS 120: Automata Theory and Formal Languages. UC Davis Phillip Rogaway December 13, ECS 120 Final { Fall 1995

CS 361 Meeting 26 11/10/17

Transcription:

Name: CS 311 Sample Final Examination Time: One hour and fifty minutes This is the (corrected) exam from Fall 2009. The real exam will not use the same questions! 8 December 2009 Instructions Attempt all questions. Write your answers on the exam paper. You can use the remainder of this sheet and the back side of the exam for scratch space. If you use your own plain paper for scratch work, please hand in your scratch paper with your exam. You can bring with you into the exam room a single double-sided crib sheet of lettersized paper with your own notes. No textbooks, or lecture notes, will be permitted. Hand in your crib sheet with your answers. You probably will not have enough time to answer all of the questions: you are strongly advised to spend the first 10 minutes or so reading through the whole paper, and strategizing where to spend your time. The number of points for each question is given. Do not turn this page until you are instructed to do so. 1

2 Question 1: Regular Languages 3 points 1. Give a regular expression generating the language that consists of all sequences of as and bs whose penultimate character is an a. 4 points 2. Draw a state diagram for an NFA with exactly 3 states that accepts the language of part 1. 8 points 3. Give a DFA that accepts the language of part 1. Remember to specify the start state and the accepting states.

3 Question 2: Context-free Languages 5 points 1. Let L = {(ab) n (a + b) 2n n 0}. Draw the state diagram for a PDA accepting L. (Recall that a PDA state diagram has transition labels of the form x, P Q where x is an input symbol or ɛ, and P and Q are stack symbols or ɛ.) 6 points 2. If A and B are languages, define A B = {xy x A and y B and x = y }. For example, language L from part 1 of this question can be written as (ab) (a + b). Show that if A and B are any two regular languages, then A B is context-free.

4 Question 3: Non-Context-free Languages 8 points 1. Let language L = {wcw w {a, b} }. Use the pumping lemma to show that L is not context-free.

5 8 points 2. Give the fully detailed state diagram for a Turing Machine M that decides language L from part 1 of this quesiton. (Recall that a Turing Machine state diagram has transition labels of the form x y, L or x y, R where x and y are tape symbols.) 4 points 3. Let L = {ww w {a, b} }. Give a high-level description of how to build a Turing Machine M that decides L using machine M from part 2 as a sub-component.

6 Question 4: Computability Note: Recall that Turing-recognizable means the same thing as Recursively Enumerable (RE) and Turing-decidable means the same thing as Recursive. 4 points 1. Carefully explain the difference between a Turing-recognizable language and a Turingdecidable language. 14 points 2. Let A T M = { M, w M is a Turing machine and M accepts w}. Give a careful proof, from first principles, that A T M is not Turing-decidable.

7 7 points 3. Let A HALT = { M, w M is a Turing machine and M halts on input w}. Show that A HALT is not Turing-decidable. Use a reduction argument; you may assume the result of part 2 and the existence of a Universal Turing Machine that recognizes A T M.

8 Question 5: Computational Complexity 5 points 1. Give careful definitions of the classes P and NP. 6 points 2. Let REG be the class of all regular languages. Show that REG P. 3. Let SAT be the usual Boolean satifiability problem and FOO be some other problem. Consider the following four possible proofs: (a) Proof of a polynomial-time reduction from SAT to FOO. (b) Proof of a polynomial-time reduction from FOO to SAT. (c) Proof of a O(100 n )-time algorithm for deciding SAT. (d) Proof of a O(n 100 )-time algorithm for deciding FOO. 4 points Which two proofs, taken together, would make their author rich and famous? Explain.

9 Question 6: The Language Hierarchy Let Σ = {0, 1}. Consider the following eight classes of languages over Σ: ALL = P(Σ ) T R = Turing-recognizable T D = Turing-decidable NP P CF = Context-Free REG = Regular F IN = Finite Each class is a superset of the next one, and all inclusions except P NP are known to be proper. Situate each of the following languages as low as you can in the hierarchy (e.g., if a language is in P but is not context-free, the answer is P ). 1. {0 n 1 n 0 n n 2} 2. {0 n 1 n n 2} 3. {0 n 1 n n 2} 4. Σ {ɛ} 5. { M M is a TM that accepts a regular language} 6. { M, w M is a TM that does not halt on input w} 7. { M M is a TM}