CS 345: Chapter 9 Algorithmic Universality and Its Robustness

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

Variants of Turing machines
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
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.
Programming Languages Wrap-up. Your Toolkit Object-oriented Imperative Functional Logic.
Recap CS605: The Mathematics and Theory of Computer Science.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Theory of Computation What types of things are computable? How can we demonstrate what things are computable?
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
Turing Machines CS 105: Introduction to Computer Science.
AUTOMATA THEORY VIII.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
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)
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.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
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.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Lecture 16b Turing Machines Topics: Closure Properties of Context Free Languages Cocke-Younger-Kasimi Parsing Algorithm June 23, 2015 CSCE 355 Foundations.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
Finite-State Machines Fundamental Data Structures and Algorithms Peter Lee March 11, 2003.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Recall last lecture and Nondeterministic TMs Ola Svensson.
1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity.
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
Computability. Turing Machines Read input letter & tape letter, write tape letter, move left or right.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
8. Introduction to Turing Machines
Linear Bounded Automata LBAs
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pumping Lemma Revisited
Pushdown Automata.
CSE 105 theory of computation
OTHER MODELS OF TURING MACHINES
CSE322 The Chomsky Hierarchy
Chapter 3: The CHURCH-Turing thesis
Jaya Krishna, M.Tech, Assistant Professor
8. Introduction to Turing Machines
CS21 Decidability and Tractability
Recall last lecture and Nondeterministic TMs
Decidability and Tractability
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Sub: Theoretical Foundations of Computer Sciences
Theoretical Foundations of Computer Sciences
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Presentation transcript:

CS 345: Chapter 9 Algorithmic Universality and Its Robustness The Simplest Machines that Get It Done

Search For Simplicity The beginning of this chapter focuses on reducing an algorithm to its simplest components. Part of the purpose of this is to find a model of computation that is general in nature. Note that is driven partly by the nature of the mathematician.

Also, by removing the dependency on a particular machine, language, technology, an algorithm can be examined in its essential form. A common model of computation in theoretical computer science was developed by Alan Mathison Turing (1912 - 1954) Turing developed the concept of a Universal – Algorithm Machine. Today, we call this model a Turing Machine (TM).

Turing Machines Although a Turing Machine (TM) has an elegant mathematical definition, we can visualize one as a physical entity. Tape for input and output Read/Write head Finite-State Machine for control Example: EVEN-EVEN, PALINDROME

Turing Machine TM = (Q, , , , q0, , F) Q = a finite set of internal states  = a finite set of symbols: the input alphabet.  = a finite set of symbols: the tape alphabet. : Q Q  { L, R }, a transition function q0  Q is the initial state. is a blank symbol and  F  Q is a set of halt states. It is assumed that     {}

EVEN-EVEN Determines if a string of a’s and b’s have an even number of both. Uses 4 states S1: read even a’s and even b’s S2: read even a’s and odd b’s S3: read odd a’s and even b’s S4: read odd a’s and odd b’s If you HALT in S1, there are an even number of a’s and b’s

EVEN-EVEN a S1 S3 a b b b b a S2 S4 a

PALINDROME Uses 8 states Read first letter of input, remember it, then erase it. Go to other end of input, check that it is same letter. If same letter, erase it, go to beginning of input and repeat process. If not, then crash

PALINDROME 8 a/a R b/b R a/a L b/b L #/# L a/# L 2 3 4 #/# R #/# R 1 b/# R #/# R #/# L b/# L #/# R 5 6 7 a/a R b/b R a/a L b/b L

Programming A Turing Machine We can think of a TM as a primitive type of computer that executes a fixed program. The program is stored within the TM’s state-transition diagram. The input is coded as a linear set of strings created from the input alphabet and stored on the tape. 1

A TM can be used to solve a decision problem by having one halt state for “yes” and one for “no”. For a non-decision problem, a TM can use special marks to indicate its output or erase its tape leaving only its output. A TM has very limited actions and is very tedious to program for even trivial problems. However, we can ask, “exactly what can be solved by a TM?” 2

The Church-Turing Thesis Which algorithmic problems can be solved by a TM? Any algorithmic problem for which we can find an algorithm that can be programmed in some programming language, any language, running on some computer, any computer, even one that has not been built yet, but can be built, and even one that will require unbounded amounts of time and memory space for ever-larger inputs is solvable by a Turing Machine. A TM is capable of solving any effectively solvable algorithmic problem. 3

The Church-Turing Thesis is not a theorem. The Church-Turing Thesis equates the mathematically precise notion of solvable by a Turing Machine with the informal, intuitive notion of solvable effectively, which refers to real computers and languages. Although it sounds like wild speculation, it is a deep and far-reaching statement put forward by two of the most respected pioneers of theoretical computer science.

Computability is Robust models of a universal computer Alonzo Church: Lambda Calculus Alan Turing: Turing Machines Emil Post: Production Systems Stephen Kleene: Recursive Functions A consequence of the Church-Turing Thesis is that all these formalisms have been shown to be equivalent 4

Another meaning for robustness is that the class of computable, effectively solvable, or decidable algorithmic problems remains the same even when we change the computer model or the programming language. This means that all programming languages that have the same capabilities of a TM are equivalent in terms of the problems they can solve. This robustness applies even to variants of a TM

Variants of a Turing Machine Movement: Left, Right, No movement One-way infinite tape. Multiple tapes: multiple read/write heads or movement in multiple dimensions Transducers and Acceptors The equivalence of these different variations is shown by demonstration how one type of machine can simulate another.

Simulation as Reduction To say one model of computation can simulate another is to say there is a reduction from one model to another. An interesting concept is that one TM can simulate another. That is, a TM can take for input an encoded TM and its input and run the encoded TM on the given input. This is similar to what an interpreter does.

A Turing Machine can be encoded using strings of 0 and 1 A Turing Machine can be encoded using strings of 0 and 1. In this manner, a TM can be associated with a number. This number is called its Gödel number and the process of encoding a TM as a number is called the Gödelization of a TM. The TM that takes for input the encoding of any other TM together with its input and simulates the second TM running on its input is called the Universal Turing Machine.

The UTM was designed by Turing in 1936 and is not only the foundation of all Computer Theory, but it was also the conceptual archetype of the early computers.

TM’s and P vs. NP A TM is very inefficient for even trivial tasks. However, a TM is only polynomially less efficient than even the most sophisticated computers Therefore, we can define a problem to belong to P if it can be solved by a deterministic TM in polynomial time

A problem belongs to NP if it can be solved in polynomial time by a nondeterministic Turing Machine Turing Machine for Lower Bound Proofs Turing Machine with one-way tape or Finite Automata Finite Automata with a Push Down Stack or PDA Turing Machine with a bounded tape (not infinite) or LBA

Languages and Machines The study of formal languages looks at the relationship between types of languages and the type of machine that can recognize or accept that language. For example, the type of language recognized by a FA is called a regular language

As part of this language, a FA can recognize when there are an even number of a’s and b’s in a string, but it cannot tell if there are the same number of a’s and b’s A FA cannot count because it has no memory only states and there is a finite number of states. The matching of machine’s, languages, and grammars is known as the Chomsky Hierarchy after linguist Noam Chomsky

Chomsky Hierarchy

One area where this study of formal languages and machines is important is for compiler construction Another area is Natural Language Processing. FA are used to represent many processes. Note, figure 9.14 on page 247. If you know what a DFD is, this figure might look similar. A FA is used by the scanner of a compiler to recognize tokens.

A simple FA for recognizing an identifier in Java Letter or Digit Letter Underscore Letter or Digit A simple FA for recognizing an identifier in Java