Turing Machines CS 105: Introduction to Computer Science.

Slides:



Advertisements
Similar presentations
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Advertisements

CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
CS5371 Theory of Computation
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Based on Slides by Zeph Grunschlag from Columbia University www1.cs.columbia.edu/~zeph/3261/L14/L14.ppt Basic Computability Reading Material: J. Savage,
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Lecture 5 Turing Machines
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
AUTOMATA THEORY VIII.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Turing Machines A more powerful computation model than a PDA ?
Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described.
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Turing Machines Chapter Plan Turing Machines(TMs) – Alan Turing Church-Turing Thesis – Definitions Computation Configuration Recognizable vs. Decidable.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Lecture 1 Computation and Languages CS311 Fall 2012.
Halting Problem Introduction to Computing Science and Programming I.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
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.
September1999 CMSC 203 / 0201 Fall 2002 Week #15 – 2/4/6 December 2002 Prof. Marie desJardins.
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
CS 3240: Languages and Computation
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
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,
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility Some slides are in courtesy.
Turing Machine Model Are there computations that no “reasonable” computing machine can perform? –the machine should not store the answer to all possible.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
Theory of Computation Automata Theory Dr. Ayman Srour.
Universal Turing Machine
Introduction to Computing Science and Programming I
Pumping Lemma Revisited
CSE 105 theory of computation
Turing Machines (At last!).
Chapter 3: The CHURCH-Turing thesis
فصل سوم The Church-Turing Thesis
Jaya Krishna, M.Tech, Assistant Professor
Turing Machines (TM) Deterministic Turing Machine (DTM)
CSE 105 theory of computation
CO Games Development 2 Week 21 Turing Machines & Computability
Turing Machines Everything is an Integer
CSE 105 theory of computation
Presentation transcript:

Turing Machines CS 105: Introduction to Computer Science

Some Interesting Questions u What is a computer? What is computation? u Are there problems that some computers can solve but others can’t? u Are there problems that no computer can solve?

What is a Computer? u That’s a tough question. u We want to talk about the fundamental properties of computation. u We need a model that captures the essential and throws out the rest.

What is Computation? u Mapping an input to an output. u For the sake of concreteness: mapping a binary input to a binary output. u Problems describe a particular mapping we are interested in. u Decision problems are a subset of all problems - map from inputs to 0 or 1.

First model of computation: Finite State Automata… A B

Finite State Automata u A fixed number of states. u The machine moves from one state to another in response to inputs. u If it ends in an ACCEPT state it accepts, otherwise it rejects. (We’re just considering decision problems for now.) u Let’s see some examples…

FSA Example A B Triangle indicates start state. Double circle indicates accepting state. What happens on input ?

FSA Example A B

FSA Example A B

FSA Example A B

FSA Example A B

FSA Example A B

FSA Example A B ACCEPT!

The Turing Machine u Problems with the FSA as a model of computation?? –Does an input string have matched parentheses? E.g., 01(0(10)101)110(1 u With a slight modification we get the Turing machine. u First described in 1937 by Alan Turing

How does it work?... Tape Read/Write Head Control Device Current State: Rules:

What can it do? u Write a character to the current tape cell u Move Read/Write Head one cell to the left or right u Go into a new state... Tape Read/Write Head Control Device Current State: Rules:

How does it decide what to do? Behavior is based on: u Input: the character in the current tape cell u State: the current state... Tape Read/Write Head Control Device Current State: Rules:

Let’s see one in action... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 1 Rules: 1001

What are current state and input?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 1 Rules: 1001

Which rule will the TM follow?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 1 1

Write to the tape... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 1 1

Move right or left... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 1 1

Go to new state: Done with rule... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 1 1

What are current state and input?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 1 Rules: 1001

Which rule will the TM follow?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R

Write to the tape... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 2 11

Move right or left... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 2 11

Go to new state: Done with rule... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R 2 11

What are current state and input?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules:

Which rule will the TM follow?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R

Write to the tape... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R

Move right or left... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R

Go to new state: Done with rule... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules: | 1 R

What are current state and input?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules:

Which rule will the TM follow?... Tape Read/Write Head Control Device Current State: State Symbol | Write Move State 1 1 | 1 R | 1 R | 1 R 2 Rules:

Is the Turing Machine The Right Model? u The Church Turing Thesis: –Any reasonable model of computation is equivalent to the Turing machine. u “Equivalence” here refers to what can be computed, not how fast it can be done. u Not something that can be proved.

Why do we believe it? u Every TM extension to make it “more powerful” (e.g., multiple-tape TMs) has been shown to be equivalent to the basic Turing Machine. u Other models of computation have been shown to be weaker (e.g., Finite State Machines) or equivalent.

What is the significance of the Church-Turing Thesis? u Church-Turing Thesis: Anything you can do on any computer you can do with a Turing Machine. u So, no computer is more “powerful” (can compute more) than a TM.

Is my computer LESS powerful than a Turing Machine? u No. u Given an infinite input device (infinite tape, infinite number of floppies, infinite keyboard input), you can simulate a TM. u Therefore, anything that can be computed on a TM can be computed on your computer.

The Important Implication u If there’s anything that we CAN’T do with a Turing Machine then... we can’t do it on any computer now or in the future.

Are there things we can’t compute on a Turing Machine? YES An Example: The Halting Problem

Last Words. u Turing machines are –Hard to program. –Easy to prove things about. u If we can prove something about the capabilities of Turing machines, we can immediately apply it to all computers.

Regular Expressions u Another formalism for selecting strings to accept or reject. u Intimately related to FSAs u Practical applications in searching through strings.

Three Operators u Union: (0+1) –accepts/matches either 0 or 1. u Concatenation: 01 –matches 0 followed by 1 u Repetition: 0* –Matches any number of zeros (including 0)

Examples u These operators can be applied to regular expressions: –(0+1)*1 (matches any string that ends in a 1) –(0+1)(0+1))* (matches any even length string)