SECTION A (40 marks)

Similar documents
TAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function

Enumerations and Turing Machines

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

The Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems

CS 531: Notes II. January 31, 2014

Cardinality of Sets. Washington University Math Circle 10/30/2016

Introduction to the Theory of Computation, Sipser, PWS, ISBN X, 1996

Outline. Language Hierarchy

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar

CS6160 Theory of Computation Problem Set 2 Department of Computer Science, University of Virginia

CSE 120. Computer Science Principles

Theory of Languages and Automata

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

Material from Recitation 1

To illustrate what is intended the following are three write ups by students. Diagonalization

Name: CS 341 Practice Final Exam. 1 a 20 b 20 c 20 d 20 e 20 f 20 g Total 207

Presented By : Abhinav Aggarwal CSI-IDD, V th yr Indian Institute of Technology Roorkee. Joint work with: Prof. Padam Kumar

Recursively Enumerable Languages, Turing Machines, and Decidability

Infinity and Uncountability. Countable Countably infinite. Enumeration

CS 125 Section #4 RAMs and TMs 9/27/16

Slides for Faculty Oxford University Press All rights reserved.

Elementary Recursive Function Theory

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

1. [5 points each] True or False. If the question is currently open, write O or Open.

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

Turing Machine as Transducer. Turing Machines. Computation with Turing Machines. Computation with Turing Machines. Computation with Turing Machines

SET DEFINITION 1 elements members

4 Generating functions in two variables

2 Review of Set Theory

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy

CS 125 Section #10 Midterm 2 Review 11/5/14

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

Computability and Complexity

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Chapter 3: Propositional Languages

We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack.

CS 275 Automata and Formal Language Theory. First Problem of URMs. (a) Definition of the Turing Machine. III.3 (a) Definition of the Turing Machine

The Big Picture. Chapter 3

Theory Bridge Exam Example Questions Version of June 6, 2008

Turing Machines. A transducer is a finite state machine (FST) whose output is a string and not just accept or reject.

arxiv: v1 [cs.cc] 9 Jan 2015

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability.

Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D.

THEORY OF COMPUTATION

CISC 4090 Theory of Computation

Introduction to Computers & Programming

6.045J/18.400J: Automata, Computability and Complexity. Practice Quiz 2

Formal languages and computation models

Computer Sciences Department

(a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the

COMP 382: Reasoning about algorithms

Lecture 5: The Halting Problem. Michael Beeson

Final Test in MAT 410: Introduction to Topology Answers to the Test Questions

Reducibilities relations with applications to symbolic dynamics

Theory of Computation

CpSc 421 Final Solutions

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

Set and Set Operations

CSC-461 Exam #2 April 16, 2014

6. Advanced Topics in Computability

Log-Space. A log-space Turing Machine is comprised of two tapes: the input tape of size n which is cannot be written on, and the work tape of size.

a- As a special case, if there is only one symbol, no bits are required to specify it.

CSE 105 THEORY OF COMPUTATION

Variants of Turing Machines

Lambda Calculus and Computation

Recursive and Recursively Enumerable Languages

Theory of Computations Spring 2016 Practice Final Exam Solutions

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

CS402 - Theory of Automata Glossary By

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS

CHAPTER 4. COMPUTABILITY AND DECIDABILITY

CT32 COMPUTER NETWORKS DEC 2015

Computability, Cantor s diagonalization, Russell s Paradox, Gödel s s Incompleteness, Turing Halting Problem.

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017

Multiple Choice Questions

Turing Machine Languages

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

CS21 Decidability and Tractability

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

LIMITATIONS OF COMPUTING. Introduction to Computer Engineering 2015 Spring by Euiseong Seo

THEORY OF COMPUTATION

CMSC Theory of Algorithms Second Midterm

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.

We ve studied the main models and concepts of the theory of computation:

CSCI 270: Introduction to Algorithms and Theory of Computing Fall 2017 Prof: Leonard Adleman Scribe: Joseph Bebel

CSE Qualifying Exam, Spring February 2, 2008

CS61A Lecture 38. Robert Huang UC Berkeley April 17, 2013

Sets and set operations. Lecture 5 ICOM 4075

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

Constraint Satisfaction Problems (CSPs)

2.1 Sets 2.2 Set Operations

8.1 Polynomial-Time Reductions

Does this program exist? Limits of computability. Does this program exist? A helper function. For example, if the string program is

Time Complexity of an Algorithm

Theory of Programming Languages COMP360

Skyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table.

Exercises Computational Complexity

DISCRETE MATHEMATICS

Transcription:

OLLSCOIL NA héireann, MÁ NUAD NATIONAL UNIVERSITY OF IRELAND, MAYNOOTH THIRD COMPUTER SCIENCE AND SOFTWARE ENGINEERING EXAMINATION FEBRUARY 2002 PAPER SE307 COMPUTATION AND COMPLEXITY THEORY Dr. P. Stevens, Prof. R. Reilly, Mr. T. Naughton. Answer ALL QUESTIONS from Section A and any TWO questions from Section B. Use a MCQ Answer Sheet for Section A enter your name, student ID, and module code. Negative marking will be applied for Section A (2 marks for a correct answer, -0.5 for an incorrect answer, 0 for no attempt). Time Allowed: 2 hours. SECTION A (40 marks) 1. Consider Turing machine of the form, where is a set of tuples [2 marks] of the form, and where all symbols have their usual meaning. Which of the following conditions must be true for to be a valid Turing machine? (a) (b) has exactly two tapes, even if one is not used # (c) is finite (d) "! for each tuple in 2. Consider from Question A.1. Which of the following conditions must be true for [2 marks] to be a valid Turing machine? (a) if some Turing machine accepts a word $ then accepts $ (b) each %'&)(+* is a valid input (c) halts on at least one input SE307 Page 1 of 6 FEBRUARY 2002

3. Consider from Question A.1. Which of the following conditions must be true for [2 marks] to be a universal machine? (a) &! (b) & L R S for each tuple in (c) #! for each tuple in (d) #! 4. Consider from Question A.1. Under which of the following restrictions will [2 marks] definitely not be a universal machine? (a) & L R for each tuple in (b) & L S for each tuple in (c) (d) is finite is finite 5. Alice has a personal computer with ( Mbytes of memory. Which of the following [2 marks] will increase the power (in terms of computability) of her computer? (a) adding more memory (b) increasing the clock speed of her processor (c) adding MMX (multimedia instructions) to her processor 6. Consider a finite alphabet, and a finite word over called $. Consider also a [2 marks] language over called. Which of the following is true for some, $, and? (a) $ (b) $ & & (c) 7. Consider a finite alphabet, and a finite word over called $. Consider also a [2 marks] language over called. Which of the following is true for all, $, and? (a) $ (b) $ & & (c) SE307 Page 2 of 6 FEBRUARY 2002

8. The infinite set of all words over an alphabet is denoted [2 marks] (a) (b) (c) (d) (+* 9. Given a countably infinite set of subsets of a set (such that each "& [2 marks] ) it can be said that (a) #! ( (b) # ( (c) (d) (, where must be finite means the cardinality of 10. Which of the following is not one of the unrestricted models of computation? [2 marks] (a) TMs with only one tape (b) -tape TMs with a finite set of symbols (c) -tape TMs whose tapes are infinite in one direction only (d) RAMs with a fixed number of registers (e) RAMs with fixed sized registers 11. Which of the following languages is not recursively enumerable? [2 marks] (a) a, b, c (b) the odd integers (c) the prime numbers (d) the halting Turing machines 12. Which of the following languages is not recursive? [2 marks] (a) a, b, c (b) the odd integers (c) the prime numbers (d) the halting Turing machines SE307 Page 3 of 6 FEBRUARY 2002

13. Consider a 2-tape Turing machine # # [2 marks] + that operates on binary strings. As usual, the head of the first tape will be positioned at the beginning of the input and the second tape will be blank. is 00 00 R R 00 01 R R 00 09 S S 01 00 R R 01 00 R S 01 09 S S What would be written on the second tape when halts on input 010110? (a) 01001 (b) 01010 (c) 01011 (d) will not halt on that input 14. Consider from Question A.13. What would be written on the second tape when [2 marks] halts on input 11101? (a) 110 (b) 1101 (c) 101 (d) will not halt on that input 15. Given the Complete1.eps diagram below, depicting sets and elements &, &, [2 marks] &, which of the following statements is false? b a X Y Z c (a) is -hard (b) is -hard (c) is -complete (d) is -hard SE307 Page 4 of 6 FEBRUARY 2002

16. What would be the implications if an -complete problem was found to have an [2 marks] exponential upper bound? (a) # (b) #! (c) the RAM model would be thrown out of the class of reasonable machines (the first machine class) (d) it would lend weight to the Invariance thesis (e) there are no implications 17. What would be the implications if an -complete problem was found to have an [2 marks] exponential lower bound? (a) # (b) #! (c) the RAM model would be thrown out of the class of reasonable machines (the first machine class) (d) it would lend weight to the Invariance thesis (e) there are no implications 18. What is required in order to prove that -hard problem is -complete? [2 marks] Assume that problem is known to be -complete. (a) find the polynomial reduction (b) show that a solution to can be verified in polynomial time (c) show that the solution to an instance of can be used to solve an instance of 19. You want to find an algorithmic solution for problem. You know that is in. [2 marks] Should you look for an efficient algorithm for? (a) yes, because we only suspect that -complete problems are difficult (b) no, because the existence of has not been proved (c) yes, because #! -complete (d) no, because the -complete problems are outside (e) yes, because the -complete problems are outside 20. Is the problem of writing out the factorial of a number in unary -complete or [2 marks] -hard (e.g. # for # )? (a) -hard, because it cannot be solved efficiently (b) -complete, because it cannot be solved efficiently (c) -complete, because it can be verified, but not solved, in polynomial time (d) it is both -complete and -hard (e) it is neither -complete nor -hard SE307 Page 5 of 6 FEBRUARY 2002

SECTION B (30 marks) 1. (a) Prove that the set of prime numbers is countable. [7 marks] (b) Explain the relationship between countable sets and computability. For example, why is it important for a language to be countable if it is to be accepted? [8 marks] 2. (a) Show how a reduction could be used to prove nonmembership of a class. [4 marks] (b) The European Space Agency (ESA) wants to avoid the software fault that caused the Arianne 5 rocket to fail. If they can ensure that variables will not overflow during program execution, then the rocket should not fail next time. They intend to check each function in the rocket s software separately. In order to ease the checking process, they have made the following simplifications to library functions: (i) function calls take only one argument, (ii) all variables are integers, (iii) there are no other function calls within a function, and (iv) the values of arguments are limited to a small finite range. Prove that, despite their simplifications, the problem of determining if a variable overflows in even one such function is unsolvable. [11 marks] 3. (a) problems are unsolvable. Make three (3) concise points about the va- [6 marks] lidity of the interpretation (or interpretations) of this statement. (b) -complete problems are the easiest of intractable problems. Do you agree with this statement? Explain your reasoning. (c) Define a language that is -hard. [5 marks] [4 marks] SE307 Page 6 of 6 FEBRUARY 2002