Understanding Computation

Similar documents
Turing Machines. Lecture 8

Most General computer?

CSCI3390-Lecture 6: An Undecidable Problem

A non-turing-recognizable language

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 20. To Infinity And Beyond: Countability and Computability

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

Turing Machine Recap

The roots of computability theory. September 5, 2016

258 Handbook of Discrete and Combinatorial Mathematics

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

A Little History Incompleteness The First Theorem The Second Theorem Implications. Gödel s Theorem. Anders O.F. Hendrickson

1 Reals are Uncountable

CISC 876: Kolmogorov Complexity

Computability Theory. CS215, Lecture 6,

Hilbert s problems, Gödel, and the limits of computation

Decidability: Church-Turing Thesis

Harvard CS 121 and CSCI E-207 Lecture 6: Regular Languages and Countability

Lecture Notes: The Halting Problem; Reductions

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Computational Models Lecture 8 1

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

The Search for the Perfect Language

Turing Machines, diagonalization, the halting problem, reducibility

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

1 Acceptance, Rejection, and I/O for Turing Machines

1 Computational Problems

CST Part IB. Computation Theory. Andrew Pitts

The Legacy of Hilbert, Gödel, Gentzen and Turing

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

Logic and Computation

Great Theoretical Ideas

1 Showing Recognizability

Introduction to Logic and Axiomatic Set Theory

Informal Statement Calculus

Hilbert s problems, Gödel, and the limits of computation

Great Theoretical Ideas in Computer Science. Lecture 5: Cantor s Legacy

Notes for Lecture Notes 2

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

Computational Models Lecture 8 1

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

Computation. Some history...

Computability, Undeciability and the Halting Problem

Church s undecidability result

CS 455/555: Mathematical preliminaries

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

Opleiding Informatica

Theory of Computation

Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not.

Section 3.1: Direct Proof and Counterexample 1

A Universal Turing Machine

17.1 The Halting Problem

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

CSCE 551: Chin-Tser Huang. University of South Carolina

Computational Models Lecture 8 1

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Creative Objectivism, a powerful alternative to Constructivism

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

MAGIC Set theory. lecture 1

AN INTRODUCTION TO COMPUTABILITY THEORY

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

Introduction to Turing Machines

CSE 311: Foundations of Computing. Lecture 27: Undecidability

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Logic: The Big Picture

Introduction to the Theory of Computing

Foundations of Computer Science Lecture 23 Languages: What is Computation?

CSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality

Computability Theory

Turing Machines Part One

CS3719 Theory of Computation and Algorithms

Marie Duží

Farewell (for now) to modular arithmetic...

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction

The Limit of Humanly Knowable Mathematical Truth

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

Limits of Computability

15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

Gödel s Theorem: Limits of logic and computation

CS6901: review of Theory of Computation and Algorithms

Turing Machines (TM) The Turing machine is the ultimate model of computation.

GTI. Undecidability. Total Recall 3. Halting. Undecidability. A. Ada, K. Sutner Carnegie Mellon University. Spring 2018

Time-bounded computations

Institute for Applied Information Processing and Communications (IAIK) Secure & Correct Systems. Decidability

What Is a Language? Grammars, Languages, and Machines. Strings: the Building Blocks of Languages

We introduce one more operation on sets, perhaps the most important

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Reductions in Computability Theory

Decidable Languages - relationship with other classes.

Lecture 13: Foundations of Math and Kolmogorov Complexity

Predicate Logic - Undecidability

Computability and Complexity

Axiomatic set theory. Chapter Why axiomatic set theory?

Decidability. William Chan

Gödel s Incompleteness Theorems

Transcription:

Understanding Computation 1

Mathematics & Computation -Mathematics has been around for a long time as a method of computing. -Efforts to find canonical way of computations. - Machines have helped with calculations. Can we use machines to reason too? calculemus! Formal Logic: Reasoning made into a calculation 2

Mathematics & Computation Formal systems based on axioms and logic: for machines & modern mathematicians Foundational problem: Formalism or Intuitionalism? Are mathematics a formal language or a fairy tale with numbers that exist in human mind only? Formalists: How to choose one s axioms? They should not give rise to contradictions! Early 1900s: Crisis in mathematical foundations Contradictions discovered while attempting to formalize notions involving infinite sets 3

David Hilbert Proposed solution to the foundational crisis of mathematics, when attempts to clarify the foundations of mathematics were found to suffer from paradoxes and inconsistencies. As a solution, Hilbert proposed to ground all existing theories to a finite, complete set of axioms, and provide a proof that these axioms were consistent. He proposed that the consistency of more complicated systems, such as real analysis, could be proven in terms of simpler systems. Ultimately, consistency of all mathematics could be reduced to basic arithmetic. 4

Hilbert s Program. A formalization of all mathematics; in other words all mathematical statements should be written in a precise formal language, and manipulated according to well defined rules. Completeness: a proof that all true mathematical statements can be proved in the formalism. Consistency: a proof that no contradiction can be obtained in the formalism of mathematics. This consistency proof should preferably use only reasoning about finite mathematical objects. 5

Mathematics & Computation Mechanized math Beyond just philosophical interest! Can resolve stubborn open problems Replace mathematicians with mathe-machines! 6

Goldbach s Conjecture Every even number > 2 is the sum of two primes 7 Letter from Goldbach to Euler dated 7 June 1742

Collatz Conjecture Program Collatz (n:integer) while n > 1 { if Even(n) then n n/2 else n 3n+1 } Conjecture: Collatz(n) halts for every n > 0 8

Kurt Gödel German logician, at age 25 (1931) proved: 1) No matter what (consistent) set of axioms are used, a rich system will have true statements that can t be proved 2) A system powerful enough to encode addition and multiplication of integers can not prove its own consistency, so it certainly cannot be used to prove the consistency of anything stronger with certainty Hilbert s Program can t work! Shook the foundations of mathematics philosophy science everything 9

Alan Turing British mathematician cryptanalysis during WWII arguably, father of AI, CS Theory several books, movies Mathematically defined computation 10 Invented Turing Machines at 23 (1936). Turing machines can compute everything that is computable. He proved that The Halting Problem has no general algorithm (it is not possible to decide whether a turing machine will ever halt)

Halting Problem Given program P, input w: w P Will P(w) halt? 11

Why would we care about the Halting Problem? Suppose halting problem had an algorithm... Program P() n 4 forever: if found-two-primes-that-sum-to(n) then n n + 2 else halt Does P halt? Solves Goldbach conjecture! 12

Why would we care about the Halting Problem? Does Find-proof halt on w? Is w a provable theorem? w Program Find-proof(w) p empty-string forever p successor(p) if Verify-proof(w,p) then halt 13

Alas! There is no program that solves the Halting Problem! No use trying to find one! How can there be problems that can t be solved? What is a problem? What is a program? 14

Computation Problem: To compute a function F that maps each input (a string) to an output bit Program: A finitely described process taking a string as input, and outputting a bit (or not halting) P computes F if for every x, P(x) outputs F(x) and halts Too restrictive? Enough to compute functions with longer outputs too: P(x,i) outputs the i th bit of F(x) Enough to model interactive computation too: P*(x,state) outputs (y,new_state) 15

Computation Problem: To compute a function F that maps each input (a string) to an output bit Program: A finitely described process taking a string as input, and outputting a bit (or not halting) P computes F if for every x, P(x) outputs F(x) and halts A program is a finite bit string Programs can be enumerated listed sequentially (say, lexicographically) so that every program appears somewhere in the list The set of all programs is countable. 16 1 ε 2 0 3 1 4 00 5 01 6 10 7 11 8 000 9 001 10 010 11 011 12 100

Computation Problem: To compute a function F that maps each input (a string) to an output bit Program: A finitely described process taking a string as input, and outputting a bit (or not halting) P computes F if for every x, P(x) outputs F(x) and halts A function assigns a bit to each finite string Corresponds to an infinite bit string The set of all functions is uncountable! 17 As numerous as, say, real numbers in [0,1] 1 ε 0 2 0 0 3 1 1 4 00 0 5 01 1 6 10 1 7 11 0 8 000 0 9 001 1 10 010 1 11 011 0 12 100 1

Computation Problem: To compute a function F that maps each input (a string) to an output bit Program: A finitely described process taking a string as input, and outputting a bit (or not halting) P computes F if for every x, P(x) outputs F(x) and halts There are uncountably many functions! But only countably many programs Almost every function is uncomputable! 18

Uncomputable Problems But that doesn t tell us why some interesting problems are uncomputable If interesting has a finite description in English, then only countably many interesting problems! Proving that there are uncountably many real numbers: Diagonalization argument by Cantor Showing Halting Problem to be uncomputable: a similar argument (later) 19

Strings 20

Why Strings? Algorithms manipulate sequences : arrays, lists, text, graphs.. All of the inputs and outputs represented by finite string of symbols. 21

Definitions for strings alphabet Σ = finite set of symbols string = finite sequence of symbols of Σ length of a string w is denoted w. empty string is denoted ε. e.g., Σ = {0,1}, Σ = {α, β,, ω}, Σ = set of ascii characters ε =?0 cat =3 Variable conventions (for this lecture) a, b, c,... elements of Σ (i.e., strings of length 1) w, x, y, z,... strings of length 0 or more A, B, C,... sets of strings 22

What is a string? Formally, string = ε string = ax, where a is an element of Σ and x is a string. Length of string w is w = 0 if w= ε w =1+ x, if w= ax, where a is an element of Σ and x is a string. 23

Much ado about nothing ε is a string containing no symbols. It is not a set. {ε} is a set containing one string: the empty string ε. It is a set, not a string. Ø is the empty set. It contains no strings. 24

Concatenation & its properties xy denotes the concatenation of strings x and y (sometimes written x y) w z = z if w= ε w z = a (x z) if w= ax We can derive two properties: Associative: (uv)w = u(vw) and we write uvw. Identity element ε : εw = wε = w (proof follows) 25

Theorem: wε = w Proof: By induction Inductive proof Let w be an arbitrary string. Assume for all strings x such that x < w that xε=x (Inductive Hypothesis). There are two cases: -Base case: w = 0: i.e., w= ε. Then: wε = εε = ε = w -Inductive step w=ax Then: wε = (ax)ε = a(xε) = ax = w 26

First, mindlessly write the green text. Then fill in the red text. And then start thinking 27

Inductive Definitions Often operations on strings are formally defined inductively ε R = ε (au) R = u R a w R (w reversed) inducting on length If w = 0, w R = ε Well-defined: u < w a Σ, u Σ* If w 1, w R = u R a where w = au 28 e.g. (cat) R = (c at) R = (at) R c = (a t) R c = (t) R a c = (t ε) R ac = ε R tac = tac