 2004 SDU 1 Algorithm Informally speaking, an algorithm is a collection of simple instructions for carrying out a task. Example:  Elementary arithmetic.

Slides:



Advertisements
Similar presentations
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
Lecture 5 Turing Machines
CHAPTER 3 The Church-Turing Thesis
CHAPTER 4 Decidability Contents Decidable Languages
Foundations of (Theoretical) Computer Science
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Graphical representation –Formal.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Formal Definition –Equivalence.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
More Theory of Computing
Introduction Chapter 0. Three Central Areas 1.Automata 2.Computability 3.Complexity.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
The class P Section 7.2 CSC 4170 Theory of Computation.
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Chapter 11 Theory of Computation. © 2005 Pearson Addison-Wesley. All rights reserved 11-2 Chapter 11: Theory of Computation 11.1 Functions and Their Computation.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
The Church-Turing Thesis Chapter 3 Giorgi Japaridze Theory of Computability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
Recursively Enumerable and Recursive Languages
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
CS 461 – Oct. 28 TM applications –Recognize a language √ –Arithmetic √ –Enumerate a set –Encode a data structure or problem to solve Two kinds of TMs –Decider:
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 ? ?
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
Theory of Computation Automata Theory Dr. Ayman Srour.
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.
The Church-Turing Thesis
CSC 4170 Theory of Computation The class P Section 7.2.
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
CSC 4170 Theory of Computation The class P Section 7.2.
CSE 105 theory of computation
Predicates Predicate: A Boolean (yes-no) function. Example:
Chapter 9 TURING MACHINES.
فصل سوم The Church-Turing Thesis
Theory of Computability
The Church-Turing Thesis
Theory of Computability
Presentation transcript:

 2004 SDU 1 Algorithm Informally speaking, an algorithm is a collection of simple instructions for carrying out a task. Example:  Elementary arithmetic algorithms for adding and multplying etc.  Algorithms for computing students’ grades.  Algortihms for classes scheduling. We need a strict mathematical definition of an algorithm. The above “definition” obviously does not qualify.

 2004 SDU 2 Algorithms should deal with strings The structure of an algorithm: Input(s) Output or Input(s) Yes (accept) or No (reject) The attempt to formalize the notion of algorithm should start from strictly specifying what kind of objects can be inputs/outputs. These are going to be only.strings No loss of generality: non-string objects can be easily represented with strings. A tuple of such objects can also be represented with a (one single) string. After all, computers exclusively deal with strings --- strings over the alphabet {0,1} !

 2004 SDU 3 Encoding Encoding numbers: 0,1,2,3,…,34,…, or 0,1,10,11,…,100010,… Encoding pairs of numbers: (4,2), (1,3), …, or 4#2, 1#3,…, or aaaabb, abbb, … Encoding --- representing objects as strings in some standard way. There are usually many ways to encode; as one encoding can be easily (algorithmically) converted into another, it does not matter which encoding we choose. Encoding people: “David Stewart”, “Dongfei Wei”, …, or “Stewart, David”, “Wei, Dungfei”, or , … If O is an object, will stand for a (the) encoding of O.

 2004 SDU Consider the graph in figure 1 Figure 1 a connected graph The encoding of a graph as a string is a list of nodes followed by a list of edges. Each node is a decimal number, and each edge is a pair of decimal numbers that represent the nodes that edge connects. Example encoding: the graph in Figure 1 is encoded by the string: = (1, 2, 3, 4) ((1, 2), (2, 3), (3, 1), (1, 4)) Encoding a graph

 2004 SDU 5 Algorithmically solvable problems vs language recognition Thus, 1.Every problem for which we are trying to design a yes/no algorithm is of the type “Is string w in language L?”, --- the sort of problems solved by TMs. E.g., the problem of graph connectedness is the problem w  {u | u is the encoding of a graph G and G is connected}? Every problem for which we are trying to design an algorithm that produces an output is of the type “What string is the value of function f for string w?”, --- the sort of problems solved by TMOs. E.g., the problem of adding two numbers is the problem f(w)=? where f is the function defined by f( )=

 2004 SDU 6 The Church-Turing thesis (the intuitive notion of) Algorithm = Turing machine The Church-Turing thesis: It can never been mathematically proven! Importance: Without the Church-Turing thesis, you can never prove that a certain problem has no algorithmic solution. Example - Hilbert’s 10th problem (see page 142).

 2004 SDU 7 A turning point We continue to speak of Turing machines, but our real focus is on algorithms. Question: what is the right level of detail to give when describing a Turing machine algorithm? The three possibilities are: 1.Formal description: Spell out in full all 7 components of a Turing machine. This is the lowest, most detailed level of description. 2.Implementation description: Use English prose to describe the way Turing machine moves its head and the way it stores data on its tape. No details of state transitions are given. 3.High-level description: Use English prose to describe the algorithm, ignoring the implementation model. No need to mention how machine manages its head and tape.

 2004 SDU 8 Encoding an object Here we set up a format and notation for describing Turing machine while approaching decidability or computability theory. Definition: An algorithm is a TM in the standard representation: 1.The input to a Turing machine is always a string ; 2.If we want an object, other than a string as input, we must first represent that object as a string. 3.If we have several objects O 1, O 2, …, O k, we denote their encoding into a string by.

 2004 SDU 9 Description of a TM A Turing machine algorithm is described with an indented segment of text in quotes. The algorithm is broken into stages, each stage involving many individual steps of computation. The block structure of the algorithm is indicated by further indentation The first line of the algorithm describes the input which is a string w If the input is the encoding of an object such as the Turing machine first implicitly test whether the input properly encodes O and rejects if it does not. Example. A = { | G is a connected undirected graph} A TM deciding A is: M = “on input, the encoding of a graph G: 1.Select the first node of G and mark it; 2.Repeat the following stage until no new nodes are marked: 3. For each node in G, mark it if it is attached by an edge to a node that is already marked; 4.Scan all the nodes of G to determine whether they all are marked. If they are, accept; otherwise reject.”

 2004 SDU 10 M computes on G 1 1. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 2. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 3. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 4. (1,2,3,4)((1,2),(1,3),(1,4),(2,3))

 2004 SDU 11 M computes on G 1 1. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 1 2. (1,2,3,4)((1,2),(1,3),(1,4),(2,3))

 2004 SDU 12 M computes on G 1 1. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 1 2. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 1 3. (1,2,3,4)((1,2),(1,3),(1,4),(2,3))

 2004 SDU 13 M computes on G 1 1. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 1 2. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) 1 3. (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) (1,2,3,4)((1,2),(1,3),(1,4),(2,3)) Accept

 2004 SDU 14 M computes on G 1 1. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 2. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 3. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 4. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 5. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 6. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 7. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 8. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) 1 0. (1,2,3,4,5,6)((1,2),(1,3),(1,4),(2,3),(5,6)) Reject