Turing-Machines. Computability and Logic

Similar documents
6.080 / Great Ideas in Theoretical Computer Science Spring 2008

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Computability Theory

Notes on Complexity Theory Last updated: August, Lecture 1

CAs and Turing Machines. The Basis for Universal Computation

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

3. Mathematical Induction

CHAPTER 7 GENERAL PROOF SYSTEMS

Turing Machines: An Introduction

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

Handout #1: Mathematical Reasoning

Computational Models Lecture 8, Spring 2009

The Halting Problem is Undecidable

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Mathematical Induction

3515ICT Theory of Computation Turing Machines

Regular Languages and Finite Automata

Introduction to Theory of Computation

NP-Completeness and Cook s Theorem

Turing Machines, Part I

Universal Turing Machine: A Model for all Computational Problems

Super Turing-Machines

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Oracle Turing machines faced with the verification problem

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Properties of Stabilizing Computations

Basics of Counting. The product rule. Product rule example. 22C:19, Chapter 6 Hantao Zhang. Sample question. Total is 18 * 325 = 5850

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Computation Beyond Turing Machines

Lecture 2: Universality

Turing Machines, Busy Beavers, and Big Questions about Computing

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

24 Uses of Turing Machines

On the Structure of Turing Universe: The Non-Linear Ordering of Turing Degrees

How To Understand The Relation Between Simplicity And Probability In Computer Science

Hilberts Entscheidungsproblem, the 10th Problem and Turing Machines

There is no degree invariant half-jump

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Reading 13 : Finite State Automata and Regular Expressions

1 Definition of a Turing machine

How To Understand The Theory Of Computer Science

6.080/6.089 GITCS Feb 12, Lecture 3

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

Introduction to Turing Machines

Theory of Computation Chapter 2: Turing Machines

SECTION 10-2 Mathematical Induction

Hypercomputation: computing more than the Turing machine

Tom wants to find two real numbers, a and b, that have a sum of 10 and have a product of 10. He makes this table.

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Section 1.4 Place Value Systems of Numeration in Other Bases

8 Primes and Modular Arithmetic

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Automata and Formal Languages

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Cartesian Products and Relations

Properties of Real Numbers

Introduction to computer science

Automated Theorem Proving - summary of lecture 1

Computer Science 281 Binary and Hexadecimal Review

Automata and Computability. Solutions to Exercises

4.6 The Primitive Recursive Functions

The Classes P and NP

5544 = = = Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1

Correspondence analysis for strong three-valued logic

Polynomial Invariants

1. The RSA algorithm In this chapter, we ll learn how the RSA algorithm works.

Kenken For Teachers. Tom Davis June 27, Abstract

Binary Adders: Half Adders and Full Adders

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

Lecture 13 - Basic Number Theory.

Finite Automata and Formal Languages

Basic Proof Techniques

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

The Refutation of Relativism

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Proseminar on Semantic Theory Fall 2013 Ling 720. Problem Set on the Formal Preliminaries : Answers and Notes

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Biinterpretability up to double jump in the degrees

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Computing exponents modulo a number: Repeated squaring

So let us begin our quest to find the holy grail of real analysis.

OHJ-2306 Introduction to Theoretical Computer Science, Fall

Master of Arts in Mathematics

Universality in the theory of algorithms and computer science

Introduction to Automata Theory. Reading: Chapter 1

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Turing Machines and Understanding Computational Complexity

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

The Settling Time Reducibility Ordering and 0 2 Setting

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

TECH. Requirements. Why are requirements important? The Requirements Process REQUIREMENTS ELICITATION AND ANALYSIS. Requirements vs.

Chapter 1. Computation theory

Math 4310 Handout - Quotient Vector Spaces

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Transcription:

Turing-Machines Computability and Logic

Metalogic Halting Problem Turing Machines Automated Theorem Proving Computer Science Computability Theory Decidability of Logic Logic Recursive Functions Decidability of Arithmetic Axiomatization Godel Results Arithmetization Math Arithmetic

Central Question Given any statement about mathematics, is it true or is it false? Example: Goldbach Conjecture: Every even number greater than 2 is the sum of two prime numbers. True or false?

Decision Problem The decision problem for mathematics is to find a way to decide whether some statement about mathematics is true or false. Each domain has their own decision problem(s).

Decision Procedures?? Mathematical Statement P True False P being a procedure can be understood as P being some kind of systematic method, or algorithm

Soundness and Completeness A decision procedure P is sound with regard to some domain D iff: For any statement S about domain D: If P returns True, then S is true If P returns False, then S is false A decision procedure P is complete with regard to some domain D iff: For any statement S about domain D: If S is true, then P returns True If S is false, then P returns False

The Axiomatic Method Define a set of axioms A D that capture basic truths about some domain D, and see whether some statement S about domain D follows from A D

The Hope 1. There exists a set of axioms A such that all, and only, mathematical truths are logical consequences of A 2. There exists a decision procedure P for deciding whether or not some mathematical statement S is a logical consequence of A

The Really Exciting Prospect If 1 and 2 are true, and assuming we can implement P on a computer (which, assuming such a P exists, is quite likely, since it s all formal logic!): Proving or disproving mathematical claims can be completely automated!

Decision Procedure for Logical Consequence?? Entscheidungsproblem (German for Decision Problem) A, S P True (S follows from A) False (S does not follow from A)

Alan Turing, 1936 Published On Computable Numbers, with an application to the Entscheidungsproblem his Turing-machines paper! Argued that the Entscheidungsproblem is unsolvable There is no sound and complete systematic method for deciding whether some (first-order logic) argument is valid or not (combined with Godel s work on the arithmetization of logic, this implies that there is also no decision procedure for arithmetic, let alone all of mathematics) Required Turing to consider all possible systematic methods, i.e. computations or symbol-manipulating algorithms but how?

Computations A computation is a symbol-manipulation algorithm. Example: long division. Not every algorithm is a computation Example: furniture assembly instructions

Computers A computer is something that computes, i.e. something that performs a computation, i.e. something that follows a systematic procedure to transform input strings into output strings. Humans can take the role of a computer. Of course, this does require that the human is able to understand and perform the operations, i.e. that the human can indeed execute the algorithm. If this is so, we call the computation effective. Modern computers have mechanized the process of computation Are there mechanical computations that no longer can be performed by humans, i.e. that are no longer effective?

The Scope and Limits of Effective Computation In his 1936 paper, Turing tried to figure out what the basic elements are of any effective computation or at least to what elements any kind of computation can always be reduced to.

States and Symbols Take the example of multiplication: we make marks on any place on the paper, depending on what other marks there already are, and on what stage in the algorithm we are (we can be in the process of multiplying two digits, adding a bunch of digits, carrying over). So, when going through an algorithm we go through a series of stages or states that indicate what we should do next (we should multiply two digits, we should write a digit, we should carry over a digit, we should add digits, etc).

A Finite Number of Abstract States The stages we are in vary between the different algorithms we use to solve different problems. However, no matter how we characterize these states, what they ultimately come down to is that they indicate what symbols to write based on what symbols there are. Hence, all we should be able to do is to be able to discriminate between different states what we call them is completely irrelevant! Moreover, although an algorithm can have any number of stages defined, since we want an answer after a finite number of steps, there can only be a finite number of such states.

A Finite Set of Abstract Symbols Next, Turing pointed out that the symbols are abstract as well: whether we use 1 to represent the number 1, or to do so, doesn t matter. All that matters is that different symbols can be used to represent different things. What actual symbols we use is irrelevant! Also, while we can use any number of symbols, any finite computation will only deal with a finite number of symbols. So, all we need is a finite set of symbols.

A String of Symbols While we can write symbols at different places (e.g. in multiplication we use a 2-dimensional grid), symbols have a discrete location on the paper. These discrete locations can be numbered. Or, put another way: we should be able to do whatever we did before by writing the symbols in one big long (actually, of arbitrarily long size) string of symbols.

Reading, Writing, and Moving between Symbols During the computation, we write down symbols on the basis of the presence of other symbols. So, we need to be able to read and write symbols, but we also need to get to the right location to read and write those symbols. With one big long symbol string, however, we can get to any desired location simply by moving left or right along this symbol string, one symbol at a time.

The Scope and Limits of Effective Computation VI Turing thus obtained the following basic components of effective computation: A finite set of states A finite set of symbols One big symbol string that can be added to on either end An ability to move along this symbol string (to go left or right) An ability to read a symbol An ability to write a symbol This is a Turing machine!

Church-Turing Thesis The Church-Turing Thesis is that anything that we can figure out using any kind of systematic method can be figured out using a Turing-machine. In short: anything that is effectively computable is Turingcomputable Note: we can t mathematically prove this Thesis, since we can t mathematically prove whether the mathematical definition of Turing-computability captures the conceptual notion of computability but we can provide (and have!) lots of evidence in its favor: so far, we have not a single example of a systematic method that we can follow that figures things out that Turing-machines cannot!

Turing Machines Demo

Computing Things Using a Turing-Machine Remember that we want computations to figure something out, i.e. we want to compute something. E.g: Compute the answer to some question Compute the solution to a problem The things we want to compute can often (always) be stated as functions (e.g. question answer. Or: problem solution) So: we have a machine that transforms input symbol strings into output symbol strings, and we want to use that to compute a function from some domain to some other domain. But that means that to compute a function, we need to interpret what the machine is doing. See next slide!

Computing Functions x f y Syntactic Computation Semantic Computation c (encode) I M O Machine doing its thing Figuring Stuff Out d (decode)

Machines as Functions We can, and it is in fact useful to, treat any Turing-machine M as a function But it would be a function that maps input configurations to output configurations. In other words, M : TC TC

Representations and Configurations OK, so to use a Turing-machine to compute a function, we need to specify how we are going to represent the input to the function on the input tape but we also need to specify where the read/write head is! Indeed, one could regard the position of the read/write head as part of the representation, in that the same tape could represent different things, depending on the position of the head on that tape though this is highly irregular Let s call the contents of the tape, together with the position of the read/write head, the (tape) configuration of the Turing-machine. Let TC be the set of all possible tape configurations Oh, and let TM be the class of all Turing Machines

Representing Natural Numbers From now on, we are going to focus on functions from (any number of) natural numbers to natural numbers. E.g Addition Multiplication Successor OK, so we need some representation of numbers! Decimal? Binary? Unary? all are ok but some are more computation-friendly than others!

Standard Representation 1 One standard way to encode numbers using a Turingmachine is to use unary representation: To represent the number n, we use a block of n consecutive 1 s If we have multiple numbers, we separate them by 0 s (or blanks) Also, for the input and output, standard practice is to require that the read/write head is on the left-most 1 of the left-most block of 1 s So: let us define [n 1,n 2,, n m ] as the configuration of having a block of n 1 consecutive 1 s on the tape, followed by a 0, followed by a block of n 2 consecutive 1 s, followed by a 0,, followed by a block of n m consecutive 1 s, on an otherwise blank (=0) tape, and with the read-write head on the left-most 1 of the left-most block of 1 s

Computing the Successor Function As an example, let us use a Turing-machine to compute the successor function, i.e. s(n) = n+1, using the just defined convention. That is, we want a Turing-machine that for any n, transforms input configuration [n] into output configuration [n+1] OK, this will do (0 is start state, 2 is halting state): <0,1,L,1> (in state 0, if you see a 1, move left and go to state 1) <1,0,1,2> (in state 1, if you see a 0, write a 1, and move to state 2) Let us call this machine M s

More Formally Notice that machine M s does something with *any* input configuration, whether it is of the form [n] or not. But, relevant to what we want to show, we have that in particular: M s n = n + 1 Let us define encoding c: N TC: c(n) = [n] Finally, let us define decoding c: TC N: n d T = uuuuuuuuu ii T = [n] ooooooooo It is now easy to see that for any n N: d(m(c(n))) = n + 1 This is why we can say that machine M s computes function s

Using M to compute f OK, so it seems that in general, we have the following definition: Machine M computes function f : X Y iff: There exists an encoding c and decoding d such that for all x X and y Y: if f(x) = y, then d(m(c(x))) = y

Whoops!! With this definition, *every* function whose domain is enumerable is computable. by the null machine! (i.e. the machine that does nothing, i.e. for which M(i) = i) Proof: For c, pick any injective function. Now define d as: d(o) = f(c -1 (o))! (alternative proof: pick c in such a way that it already encodes the answer as part of its encoding of the question this is called Bramming )

Reasonable Representations Brammings are not reasonable representations! We want reasonable representations. But how to define this?

Transformable Encodings The encoding can be done in may reasonable ways. It does not matter which one we pick, because a Turing machine can always translate one such encoding into another (Sipser) But how do we know this is true? Maybe there is some reasonable encoding that is not transformable into other reasonable encodings. And if we define a reasonable encoding as one that is transformable into ( what?! How to avoid a circular definition here?!) then that puts the cart before the horse!

Effective Encodings Probably the best thing we can do is to say that encodings should be effective, i.e. that humans should be able to perform the encoding.

Church-Turing Thesis, Revisited We can now a bit more careful about the Church-Turing Thesis: Anything that is effectively figure-out-able, is figure-out-able using a Turing-machine and using effective representation conventions