Computability Summary

Similar documents
Rice s Theorem and Enumeration

Recursively Enumerable Languages, Turing Machines, and Decidability

Elementary Recursive Function Theory

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

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

Theory of Computation, Homework 3 Sample Solution

Recursive and Recursively Enumerable Languages

CpSc 421 Final Solutions

CS21 Decidability and Tractability

Computer Sciences Department

Outline. Language Hierarchy

The Big Picture. Chapter 3

Enumerations and Turing Machines

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

Variants of Turing Machines

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

Material from Recitation 1

CS 531: Notes II. January 31, 2014

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

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

Universal Turing Machine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice s Theorem Decidability Continued

Elementary Recursive Function Theory

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

Closure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007.

t!1; R 0! 1; R q HALT

From Theorem 8.5, page 223, we have that the intersection of a context-free language with a regular language is context-free. Therefore, the language

Examples of P vs NP: More Problems

Theory of Programming Languages COMP360

CISC 4090 Theory of Computation

CSE 105 THEORY OF COMPUTATION

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

5.2: Closure Properties of Recursive and Recursively Enumerable Languages

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

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

Turing Machine Languages

CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9

Theory of Computations Spring 2016 Practice Final

Reducibilities relations with applications to symbolic dynamics

Static Program Analysis Part 1 the TIP language

Lambda Calculus and Computation

English for Computer Science

Languages and Strings. Chapter 2

THE HALTING PROBLEM. Joshua Eckroth Chautauqua Nov

Today, we will dispel the notion that Java is a magical language that allows us to solve any problem we want if we re smart enough.

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

Regular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal.

Computability via Recursive Functions

Problems, Languages, Machines, Computability, Complexity

Topology I Test 1 Solutions October 13, 2008

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

pp Variants of Turing Machines (Sec. 3.2)

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

ECS 120 Lesson 16 Turing Machines, Pt. 2

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

Computation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer

2. Computability. Exercise Prove that the following function g g(x) = 1 if Ifx is finite 0 otherwise Is not computable.

Lecture 15: The subspace topology, Closed sets

Languages and Automata

Equivalence of NTMs and TMs

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

Exam 2. cs3102: Theory of Computation. Class 20: Busy Beavers

Formalizing the Halting Problem in a Constructive Type Theory

Computability Theory XI

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

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

UNIT I PART A PART B

Theory of Languages and Automata

CSC-461 Exam #2 April 16, 2014

DISTRIBUTIVE LATTICES

CS210 THEORY OF COMPUTATION QUESTION BANK PART -A UNIT- I

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

6.045 Final Exam. Name: Please write your name on each page. This exam is open book, open notes.

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

Infinity and Uncountability. Countable Countably infinite. Enumeration

Computability and Complexity

THEORY OF COMPUTATION

In this section we will study problems for which we can prove that there is no algorithm solving them.

CSE 403: Software Engineering, Fall courses.cs.washington.edu/courses/cse403/16au/ Static Analysis. Emina Torlak

Theory of Computer Science

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Final Course Review. Reading: Chapters 1-9

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

Computability and Complexity Sample Exam Questions

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

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

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

Regular Expressions & Automata

Automata & languages. A primer on the Theory of Computation. The imitation game (2014) Benedict Cumberbatch Alan Turing ( ) Laurent Vanbever

Multiple Choice Questions

Chapter 3 Complexity of Classical Planning

Lecture 18: Turing Machines

Theory of Computations Spring 2016 Practice Final Exam Solutions

Lecture 3: Tilings and undecidability

Non-context-Free Languages. CS215, Lecture 5 c

Operational Semantics 1 / 13

Discrete Mathematics Lecture 4. Harper Langston New York University

A Note on the Succinctness of Descriptions of Deterministic Languages

Turing Machines, continued

λ calculus is inconsistent

Transcription:

Computability Summary

Recursive Languages The following are all equivalent: A language B is recursive iff B = L(M) for some total TM M. A language B is (Turing) computable iff some total TM M computes B. A language B is decidable iff B = L(m) for some decision method m. A language is recursive iff it is computable. A language is recursive iff it is decidable. Note: iff = if and only if

Recursively Enumerable Languages The following are equivalent: A language B is RE iff B=L(M) for some TM M. A language B is recognizable iff B=L(m) for some recognition method m. A language is RE iff it is recognizable.

RE Languages L u = {(p,in) p is a recognition method and in L(p)} We have shown that L u is not decidable We can show that it is recognizable, for each (p,in) L u we can apply the run method: run(p,in) which will halt if in L(p) This means the property of p-accepts-in is not decidable. L h = {(p,in) p is a recognition method that halts on in} We have shown that L h is not decidable We can show that it is recognizable, for each (p,in) L h we can apply the run method: run(p,in) which will halt if in L(p) This means the property of p-halts-on-in is not decidable.

Theorem 18.6: Rice s Theorem For all nontrivial properties α, the language {p p is a recognition method and L(p) has property α} is not recursive. To put it another way: all nontrivial properties of the RE languages are undecidable Some examples of languages covered by the Rice s Theorem

Rice s Theorem Examples L e = {p p is a recognition method and L(p) is empty} L r = {p p is a recognition method and L(p) is regular} {p p is a recognition method and L(p) is context free} {p p is a recognition method and L(p) is recursive} {p p is a recognition method and L(p) = 1} {p p is a recognition method and L(p) 100} {p p is a recognition method and hello L(p) } {p p is a recognition method and L(p) = Σ*}

What Nontrivial Means A property is trivial if no RE languages have it, or if all RE languages have it Rice s theorem does not apply to trivial properties such as these: {p p is a recognition method and L(p) is RE} {p p is a recognition method and L(p) Σ*}

Languages That Are Not RE We ve seen examples of nonrecursive languages like L h and L u Although not recursive, they are still RE: they can be defined using recognition methods (but not using decision methods) Are there languages that are not even RE? Yes, and they are easy to find

Theorem 18.9 If a language is RE but not recursive, its complement is not RE. Proof is by contradiction Let L be any language that is RE but not recursive Assume by way of contradiction that the complement of L is also RE Then both L and its complement have recognition methods; call them lrec and lbar We can use them to implement a decision method for L

Theorem 18.9, Continued If a language is RE but not recursive, its complement is not RE. boolean ldec(string s) { for (int j = 1; ; j++) { if (runlimited(lrec,s,j)) return true; if (runlimited(lbar,s,j)) return false; } } For some j, one of the two runlimited calls must return true So this is a decision method for L This is a contradiction; L is not recursive By contradiction, the complement of L is not RE

Closure Properties So the RE languages are not closed for complement But the recursive languages are Given a decision method ldec for L, we can construct a decision method for L s complement: boolean lbar(string s) {return!ldec(s);} That approach does not work for nonrecursive RE languages If the recognition method lrec(s) runs forever,! lrec(s) will too

Examples L h and L u are RE but not recursive By Theorem 18.9, their complements are not RE: L u L h These languages cannot be defined as L(M) for any TM M, or with any Turing-equivalent formalism

The Big Picture

Recursive When a language is recursive, there is an effective computational procedure that can definitely categorize all strings Given a positive example it will decide yes Given a negative example it will decide no A language that is recursive, a property that is decidable, a function that is computable All these terms refer to total-tm-style computations, computations that always halt

RE But Not Recursive There is a computational procedure that can effectively categorize positive examples: Given a positive example it will decide yes Given a negative example it may decide no, or may run forever A property like this is called semi-decidable Like the property of (p,s) L h If p halts on s, a simulation can answer yes If not, neither simulation nor any other approach can always answer with a definite no

Not RE There is no computational procedure for categorizing strings that gives a definite yes answer on all positive examples Consider (p,s) L h One kind of positive example would be a recognition method p that runs forever on s But there is no algorithm to identify such pairs Obviously, you can t simulate p on s, see if it runs forever, and then say yes