Predicates Predicate: A Boolean (yes-no) function. Example:

Slides:



Advertisements
Similar presentations
Computing functions with Turing machines
Advertisements

The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CHAPTER 3 The Church-Turing Thesis
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
 2004 SDU 1 Algorithm Informally speaking, an algorithm is a collection of simple instructions for carrying out a task. Example:  Elementary arithmetic.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
Turing Machines- Cont. Theory of Computation Lecture 11 Tasneem Ghnaimat.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Chapters 11 and 12 Decision Problems and Undecidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Finite Automata.
The NP class. NP-completeness
The Acceptance Problem for TMs
Recursively Enumerable Languages
The Halting Problem.
Complexity & the O-Notation
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
CSE 311 Foundations of Computing I
Reductions.
Undecidable Problems Costas Busch - LSU.
MA/CSSE 474 Decision Problems Languages, Machines, Computation
CSE 105 theory of computation
LIMITS OF ALGORITHMIC COMPUTATION
Turing Machines 2nd 2017 Lecture 9.
Introduction to Computer Programming
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
Other Models of Computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Jaya Krishna, M.Tech, Assistant Professor
Decidable Languages Costas Busch - LSU.
Decidability Turing Machines Coded as Binary Strings
Decidability Turing Machines Coded as Binary Strings
Time Complexity We use a multitape Turing machine
Turing acceptable languages and Enumerators
Undecidable problems:
CLASSES P AND NP.
Theory of Computability
CSE S. Tanimoto Turing Completeness
Instructor: Aaron Roth
Instructor: Aaron Roth
MA/CSSE 474 Theory of Computation
Theory of Computability
Turing Machines Everything is an Integer
MA/CSSE 474 Theory of Computation
Presentation transcript:

Predicates Predicate: A Boolean (yes-no) function. Example:

Computable Predicates A predicate P : X → {0,1} is called computable (or recursive) if there is a Turing Machine M that decides P: M on input x (in X) accepts if P(x)=1 M on input x (in X) rejects if P(x)=0.

P(n) is computable On input any natural number given in unary describe a TM that decides whether this number is zero (i.e the empty string) or not. High level program: If the tape is empty accept else reject Turing Machine: □ → □ , R q0 qf

Decidable Languages: Characteristic function The characteristic function χΑ of a set A is a predicate defined as follows: A language (set of strings) is decidable (or recursive) if its characteristic function is decidable. Example: The language 1+ over the alphabet Σ={1} is decidable since predicate P is computable.

Recursive (Decidable) Languages The fact that a language is decidable means that we can use a Turing Machine to decide membership in the language. Example: L = {anbn , n≥0} is a decidable language because there is a Turing Machine that, given any string in Σ* it decides whether the string belongs in L or not.

Yes-No Problems as predicates Ideally we would like to use Turing Machines (a computer in general) for problem solving. A yes-no problem is really a predicate: for a given input decide whether the answer is yes or no (1 or 0). If we are able to create a Turing Machine to solve a problem then this problem can be worked out in a mechanical way (by the use of a computer).

Structures as TM input In order to be able to construct a TM for a specific predicate (a yes-no problem) we should be first able to express the given structure as a proper input in the TM tape. Example: If we are given a number then we can simply have as input the number (if efficiency is not an issue we prefer the number in unary, since this format is more convenient for Turing Machines).

Structures as TM input Example: For input the number 6 … … … … … … 1 1 1 1 1 1 In unary … … 1 1 In binary … … In decimal 6

Structures as TM input Example 2: If we are given more than one numbers we might want to express the input as a k-tuple: Example: (2, 4) x1 x2 xk … … 1 1 … 1 1 … 1 … 1 … 1 head … … 1 1 1 1 1 1

Structures as TM input Reminder: A graph G(V,E) is a structure containing a set of vertices V and a relation between vertices which is represented by the existence of an edge between them (set E). Example: A graph with 4 vertices numbered 1,2,3,4 and with the edges (1,2), (1,3), (2,4) 1 2 3 4

Structures as TM input We can represent a graph in a TM tape as a tuple of the vertices followed by a tuple of the edges: Example: For the graph of the figure we can have as input … … ( 1 2 3 4 ) ( 1 2 $ 1 3 $ 2 4 ) head 1 2 3 4

From low level to high level description As we move on to more complicated problems and structures we might want to avoid presenting all the dirty details for the actual creation of the Turing Machine. Imagine for example that you want to examine whether a polynomial has integer roots!!! A high-level description of a Turing Machine is a list of instructions which we are confident enough that a Turing Machine can actually perform with some effort.

Combining Turing Machines We first create Turing Machines which perform several prespecified tasks (the previously mentioned “instructions”). We then combine many machines to build larger ones capable of doing more complicated things. We might also find fruitful to consider some of the equivalent variants of TM (like multitape TM) instead of the one we presented.

Combining Turing Machines For example, in the creation process of the TM deciding whether a polynomial has integer roots we might want to use the predicate We already argued that this is a computable predicate, thus this task can be performed by a Turing Machine.

Things you can’t instruct a Turing Machine to do When creating high-level instructions we have to be extra careful about the fact that a Turing Machine can loop for ever, making it not capable of deciding a problem. For instance, a tempting solution for the previous example would be to try all possible integers n and check whether p(n) = 0. However this procedure will never stop if the answer is no for every n, resulting in a Turing Machine running forever.

High level description of a TM Proper high-level instructions include: Move the head to the end of the input Replace every 1 with a 0 which are easily implemented in the low level but also: If x = y do … If vertices u, v are connected do … which might need a whole new Turing Machine to take care of them.