Complexity Theory Turing Machines

Similar documents
CS21 Decidability and Tractability

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Lecture notes on Turing machines

CS151 Complexity Theory. Lecture 1 April 3, 2017

Introduction to Turing Machines

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Computability Theory. CS215, Lecture 6,

HIS LEGACY. 100 Years Turing celebration. Gordana Dodig Crnkovic, IDT Open Seminar. Computer Science and Network Department Mälardalen University

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

Computability and Complexity

Fundamentals of Computer Science

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University

Acknowledgments 2. Part 0: Overview 17

Turing Machines and the Church-Turing Thesis

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Theory of Computation

258 Handbook of Discrete and Combinatorial Mathematics

A Universal Turing Machine

CSci 311, Models of Computation Chapter 9 Turing Machines

TURING MAHINES

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

1 Computational problems

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Turing Machines, diagonalization, the halting problem, reducibility

Complexity Theory Part I

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

Turing machines and linear bounded automata

Introduction to Turing Machines. Reading: Chapters 8 & 9

where Q is a finite set of states

1 Showing Recognizability

Universal Turing Machine. Lecture 20

Chapter 7 Turing Machines

ECS 120 Lesson 15 Turing Machines, Pt. 1

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Computation Histories

CS 525 Proof of Theorems 3.13 and 3.15

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1

Turing Machines Part One

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

(a) Definition of TMs. First Problem of URMs

Chapter 3: The Church-Turing Thesis

Most General computer?

The Turing machine model of computation

COMPUTATIONAL COMPLEXITY

Turing Machines. Lecture 8

SE 3310b Theoretical Foundations of Software Engineering. Turing Machines. Aleksander Essex

Lecture 12: Mapping Reductions

Finite State Machines 2

Opleiding Informatica

Lecture 14: Recursive Languages

Decidability: Church-Turing Thesis

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions

Theory of Computation. Theory of Computation

Decidable Languages - relationship with other classes.

CSCI3390-Lecture 6: An Undecidable Problem

Part I: Definitions and Properties

The tape of M. Figure 3: Simulation of a Turing machine with doubly infinite tape

Turing machines and linear bounded automata

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

1 Unrestricted Computation

CISC 876: Kolmogorov Complexity

Chapter 2 Algorithms and Computation

CS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

Notational conventions

Understanding Computation

Lecture 13: Turing Machine

The Church-Turing Thesis

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

highlights proof by contradiction what about the real numbers?

Automata Theory CS S-12 Turing Machine Modifications

Theory of Computation

Variants of Turing Machine (intro)

The Power of One-State Turing Machines

Turing machines and linear bounded automata

Chapter 1 Welcome Aboard

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

Undecidable Problems and Reducibility

Theory of Computer Science

CSE 105 THEORY OF COMPUTATION

Turing Machines. Nicholas Geis. February 5, 2015

Complexity Theory Part I

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

15-251: Great Theoretical Ideas in Computer Science Lecture 7. Turing s Legacy Continues

Lecture 1: Course Overview and Turing machine complexity

CSCI3390-Lecture 16: NP-completeness

Theory of Computation

Transcription:

Complexity Theory Turing Machines Joseph Spring Department of Computer Science 3COM0074 - Quantum Computing / QIP QC - Lecture 2 1

Areas for Discussion Algorithms Complexity Theory and Computing Models Turing Machines Random Access Machines Circuits / Logic Gates 1 Asymptotic Notation Complexity Classes Tractable v Intractable Problems QC - Lecture 2 2

Models We commence with the following models: The Turing Machine Model fundamental model of computation The Circuit Model most useful in the study of quantum computation and then consider the: energy resources required to perform computations QC - Lecture 2 3

Turing Machines Basic elements a program like an ordinary computer a finite state control acts like a stripped-down microprocessor, coordinating the other operations of the machine a tape acts like a computer memory a read-write tape-head points to the position on the tape currently readable/writable QC - Lecture 2 4

Turing Machines - Finite State Control acts like a stripped-down microprocessor, co-ordinates the other operations of the machine consists of two internal states q s, and q h a starting and halting states a finite set of internal states q 1, q n, n may vary for n sufficiently large the power of the machine is unaffected in any essential way w.l.o.g. n may be considered as a fixed constant provides temporary storage off-tape central place where all processing for machine is carried out QC - Lecture 2 5

Turing Machines - Tape One dimensional object Infinitely long Infinite number of tape squares, numbered 0,1,2,3, The squares each contain a symbol drawn from an alphabet, Γ, containing a finite number of different symbols. For example: Γ= { 0, 1, b, } where b denotes 'a blank square' and denotes the left hand edge of the tape QC - Lecture 2 6

Turing Machines - Tape Initially Tape commences with the diamond symbol, a finite number of 0 s and 1 s, and an infinite number of blanks Read-write head accesses one square at a time Machine starts At square number 0, containing the symbol With finite state control in state q s Computation Proceeds one step at a time according to a program If current state is q h then the computation halted and output is the current (non blank) contents of the tape QC - Lecture 2 7

Turing Machines - Program Program for a Turing Machine A finite ordered list of program lines of the form: < q, x, q, x, s > where: q, q are states from the set of internal states x, x are symbols from the alphabet s takes the value: +1 tape head move the right - 1 tape head moves to the left 0 tape head stands still QC - Lecture 2 8

Turing Machines - Procedure On each machine cycle: Turing machine looks through program lines in order, searching for a line: < q, x,.,.,. > such that the internal state of the machine is q and symbol being read from the tape is x If there does not exist such a line, then internal state is changed to q h and the machine halts there exists such a line, then the line is executed QC - Lecture 2 9

Turing Machines - Procedure Execution of a program line < q, x, q, x, s > Internal state of machine is changed from q to q The symbol x is overwritten with the symbol x Tape head moves left (s = -1), right (s = +1) or doesn t move (s = 0) according to the value that symbol s takes QC - Lecture 2 10

Turing Machines - Example 1. < q s,, q 1,, +1 > 2. < q 1, 0, q 1, b, +1 > 3. < q 1, 1, q 1, b, +1 > 4. < q 1, b, q 2, b, -1 > 5. < q 2, b, q 2, b, -1 > 6. < q 2,, q 3,, +1 > 7. < q 3, b, q h, 1, 0 > QC - Lecture 2 11

Turing Machines - Example The above example computes the constant function f(x) = 1 whatever value is given to the machine as input the output from the machine is 1 Turing machines: (can be thought of as) machines that compute functions from the non negative integers to the non negative integers f : N N by x 1, x N QC - Lecture 2 12

Turing Machines - Example Input represented by the initial state of the tape Output represented by the final state of the tape QC - Lecture 2 13

Turing Machines Questions Is it possible to build up more complicated functions using Turing machines? Example Can we construct a TM to add two numbers together? What class of functions is it possible to compute using a Turing Machine? What of multiple tape TM s and the Universal TM? QC - Lecture 2 14

Turing Machines Response It turns out that single tape TM s can be used to: Carry out all basic arithmetic operations search through text represented as a string of bits on the tape simulate all the operations performed on a modern computer (see Church-Turing Thesis) Simulate multiple tape TM s There exists a Universal TM that can simulate any other TM QC - Lecture 2 15

Turing Machines As you read around the literature you find various definitions for Turing Machines See for example: Gennady Berman et al; Introduction to Quantum Computers, World Scientific, 1998 (ISBN 981-02-3490-2) P Linz; An Introduction to Formal Languages and Automata, Jones & Bartlett, 1997 (ISBN 0-7637-0296-X) QC - Lecture 2 16

Berman et al; Turing Machine Example given in lecture QC - Lecture 2 17

Turing Machine Formal Definition More formally we can define a Turing Machine M by M = ( Q, Σ, Γ, δ, q,, F ), 0 where Q is the set of internal states, Σ is the input alphabet, Γ is a finite set of symbols called the tape alphabet, δ is the transition function, is a special symbol called blank, q0 Q is the initial state F Q is the set of final states Peter Linz p231 QC - Lecture 2 18

Turing Machine - Definition It is assumed that the input alphabet is a subset of the tape alphabet excluding the blank And that the transition function is defined as Current state of control unit Σ Γ \ { } δ : Q Γ Q Γ { L, R} Current tape symbol being read New state of control unit New tape symbol Move symbol, L or R QC - Lecture 2 19

Linz - Turing Machine Examples given in lecture QC - Lecture 2 20

Church-Turing Hypothesis The class of functions computable by a Turing machine corresponds exactly to the class of functions which we would naturally regard as being computable by an algorithm Nielson and Chuang p125 QC - Lecture 2 21

Church-Turing Hypothesis Asserts Equivalence between a rigorous mathematical concept a function computable by a Turing Machine an intuitive concept what it means to be computable by an algorithm That the TM model of computation provides a good foundation for computer science captures the intuitive notion of an algorithm in a rigorous definition QC - Lecture 2 22

Church-Turing Hypothesis Note This is a hypothesis, an assumption It has not been proven Plays same role in computer science as do the basic laws of physics and chemistry Empirical by nature Repeated failure to invalidate the hypothesis strengthens our confidence in its truth QC - Lecture 2 23

Turing Machines - Questions 1. Present algorithms to Convert a number from fahrenheit to centigrade Display the larger of two numbers Sort ten numbers according to size 2. Complete the table outlining the sequence of positions and instructions for addition using the Berman TM? 3. What would be the appropriate table for the addition of 2 and 3 using the Berman TM? 4. Reformulate the addition program given for the Berman TM in terms of the first TM. Appropriate modifications may be employed QC - Lecture 2 24

Universal Turing Machine 5. Consider the following argument: A Turing machine is a special purpose computer. Once the transition function is defined, the machine is restricted to carrying out one particular type of computation. Digital computers are general purpose machines that can be programmed to different jobs at different times. Consequently Turing Machines cannot be considered equivalent to general purpose digital machines This objection can be overcome by designing a reprogrammable Turing Machine called a Universal Turing Machine. How? QC - Lecture 2 25

Summary Algorithms Complexity Theory and Computing Models Turing Machines Random Access Machines Circuits / Logic Gates 1 Asymptotic Notation Complexity Classes Tractable v Intractable Problems QC - Lecture 2 26

References Nielson and Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2002 (ISBN 0-521-63503-9) Gennady Berman et al; Introduction to Quantum Computers, World Scientific, 1998 (ISBN 981-02-3490-2) Jozef Gruska, Quantum Computing, McGraw-Hill, 1999 (ISBN 0-07709- 503-0) Mika Hirvensalo, Quantum Computing, Springer, 2001 (ISBN 3-540- 66783-0) Dirk Bouwmeester, Artur Ekert, Anton Zeilinger (Eds.), The Physics of Quantum Information, Springer, 2000 (ISBN 3-540-66778-4) Byron and Fuller, Mathematics of Classical and Quantum Physics, Dover, 1992 (ISBN 0-486-67164-X) Roger Penrose, Shadows of the Mind, Vintage, 1995 (ISBN 0-09-958211-2) Julian Brown, Minds, Machines and the Multiverse The Quest for the Quantum Computer, Simon & Schuster, 2000 (ISBN 0-684-81481-1) QC - Lecture 2 27