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

Similar documents
Introduction to Turing Machines

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines

Theory of Computation (IX) Yijia Chen Fudan University

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 14 : Turing Machines

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

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

Computability Theory. CS215, Lecture 6,

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

The Turing machine model of computation

Fundamentals of Computer Science

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Theory of Computation

Handouts. CS701 Theory of Computation

Languages, regular languages, finite automata

7.1 The Origin of Computer Science

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

Computational Models Lecture 7, Spring 2009

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

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

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

Intro to Theory of Computation

The Unsolvability of the Halting Problem. Chapter 19

Computability Theory

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

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

Decidability: Church-Turing Thesis

The roots of computability theory. September 5, 2016

Most General computer?

Turing Machines Part III

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Computational Models Lecture 8 1

Computational Models Lecture 8 1

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

Computability and Complexity

CSCE 551 Final Exam, Spring 2004 Answer Key

17.1 The Halting Problem

Decidability (intro.)

Lecture 13: Turing Machine

NPDA, CFG equivalence

Decidable Languages - relationship with other classes.

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

BBM402-Lecture 11: The Class NP

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Church s undecidability result

Nondeterministic finite automata

UNRESTRICTED GRAMMARS

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Turing Machines. Lecture 8

Computational Models - Lecture 6

Computational Models Lecture 8 1

Propositions as Types

CS154, Lecture 13: P vs NP

Computability Theory

Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

Foundations of

CSCE 551 Final Exam, April 28, 2016 Answer Key

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

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

Turing Machines Part One

CS154, Lecture 13: P vs NP

The Church-Turing Thesis

CSE 105 THEORY OF COMPUTATION

Turing Machine Recap

1 More finite deterministic automata

The decision problem (entscheidungsproblem), halting problem, & Turing machines. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

CS21 Decidability and Tractability

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

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Problems, and How Computer Scientists Solve Them Manas Thakur

Ogden s Lemma for CFLs

Chapter 3: The Church-Turing Thesis

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

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

CSE 105 Theory of Computation

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Introduction to Turing Machines. Reading: Chapters 8 & 9

Properties of Context-Free Languages. Closure Properties Decision Properties

CSE 105 THEORY OF COMPUTATION

Turing Machines. Fall The Chinese University of Hong Kong. CSCI 3130: Formal languages and automata theory

Decidability (What, stuff is unsolvable?)

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CST Part IB. Computation Theory. Andrew Pitts

Theory of Computer Science

CS4026 Formal Models of Computation

COM364 Automata Theory Lecture Note 2 - Nondeterminism

Pumping Lemma for CFLs

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

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

Final exam study sheet for CS3719 Turing machines and decidability.

Introduction to the Theory of Computing

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

CS 154 Introduction to Automata and Complexity Theory

Time to learn about NP-completeness!

Transcription:

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

An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a problem 1 Polynomial equation with integer coefficients 2 Statements with and 2 / 17

An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a problem The name algorithm comes from 9th Century Iranian mathematician Muḥammad ibn Mūsā al Khwārizmī 1 Polynomial equation with integer coefficients 2 Statements with and 2 / 17

An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a problem The name algorithm comes from 9th Century Iranian mathematician Muḥammad ibn Mūsā al Khwārizmī In the 17th century, German mathematician Gottfried Leibniz wanted to build a machine that could determine if mathematical statements were true or false 1 Polynomial equation with integer coefficients 2 Statements with and 2 / 17

An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a problem The name algorithm comes from 9th Century Iranian mathematician Muḥammad ibn Mūsā al Khwārizmī In the 17th century, German mathematician Gottfried Leibniz wanted to build a machine that could determine if mathematical statements were true or false In 1900, German mathematician David Hilbert posed a list of 23 open problems, the tenth asks for a general algorithm by which any Diophantine equation 1 could be solved 1 Polynomial equation with integer coefficients 2 Statements with and 2 / 17

An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a problem The name algorithm comes from 9th Century Iranian mathematician Muḥammad ibn Mūsā al Khwārizmī In the 17th century, German mathematician Gottfried Leibniz wanted to build a machine that could determine if mathematical statements were true or false In 1900, German mathematician David Hilbert posed a list of 23 open problems, the tenth asks for a general algorithm by which any Diophantine equation 1 could be solved In 1928, Hilbert posed 3 more problems, the third of which became known as Hilbert s Entscheidungsproblem (decision problem). It asks for an algorithm which takes as input a statement in first-order logic 2 1 Polynomial equation with integer coefficients 2 Statements with and 2 / 17

Formalizing algorithms In 1933, Austrian-American mathematician Kurt Gödel and French mathematician Jacques Herbrand 3 defined the class of general recursive functions; these were designed to be intuitively computable 3 Herbrand had actually died at age 23 several years earlier 4 Functional programming owes much to λ-calculus and lambdas and closures in many programming languages derive from this 3 / 17

Formalizing algorithms In 1933, Austrian-American mathematician Kurt Gödel and French mathematician Jacques Herbrand 3 defined the class of general recursive functions; these were designed to be intuitively computable In 1936, American mathematician Alonzo Church defined the λ-calculus as a model of computable functions 4 3 Herbrand had actually died at age 23 several years earlier 4 Functional programming owes much to λ-calculus and lambdas and closures in many programming languages derive from this 3 / 17

Formalizing algorithms In 1933, Austrian-American mathematician Kurt Gödel and French mathematician Jacques Herbrand 3 defined the class of general recursive functions; these were designed to be intuitively computable In 1936, American mathematician Alonzo Church defined the λ-calculus as a model of computable functions 4 Independently, in 1936, English mathematician Alan Turing defined his machines 3 Herbrand had actually died at age 23 several years earlier 4 Functional programming owes much to λ-calculus and lambdas and closures in many programming languages derive from this 3 / 17

Formalizing algorithms In 1933, Austrian-American mathematician Kurt Gödel and French mathematician Jacques Herbrand 3 defined the class of general recursive functions; these were designed to be intuitively computable In 1936, American mathematician Alonzo Church defined the λ-calculus as a model of computable functions 4 Independently, in 1936, English mathematician Alan Turing defined his machines Church and Turing proved that all three of these models of computation are equivalent: A function is λ-computable iff it is computable by a Turing machine iff it is general recursive 3 Herbrand had actually died at age 23 several years earlier 4 Functional programming owes much to λ-calculus and lambdas and closures in many programming languages derive from this 3 / 17

Church Turing thesis The Church Turing thesis is that the intuitive notion of an algorithm (called an effectively calculable function ) is equivalent to a Turing machine 4 / 17

Hilbert s problems Hilbert framed his tenth problem in 1900 and his Entscheidungsproblem in 1928 as a positive: Give an algorithm to solve the problems As late as 1930, he didn t seem to realize that there would be any unsolvable problems 5 / 17

Hilbert s problems Hilbert framed his tenth problem in 1900 and his Entscheidungsproblem in 1928 as a positive: Give an algorithm to solve the problems As late as 1930, he didn t seem to realize that there would be any unsolvable problems Unfortunately (depending on your point of view), both of these problems don t have general solutions 5 / 17

Types of problems There are several types of problems we could consider, consider the problem of paths in a weighted, undirected graph G between two vertices u and v Decision Is there some path between u and v in G of distance at most k? Search What is the length of the shortest path between u and v in G? Counting How many paths between u and v in G have distance at most k? In this course, we re concerned with the simplest of these: decision problems 6 / 17

Decision problems as languages We can frame decision problems as membership in a language. What language corresponds to the decision problem: Is there some path between u and v in graph G of distance at most k? 7 / 17

Decision problems as languages We can frame decision problems as membership in a language. What language corresponds to the decision problem: Is there some path between u and v in graph G of distance at most k? { G, u, v, k G = (V, E) is an undirected graph, u, v V, and there is a path from u to v of distance at most k} G, u, v, k means some fixed representation of the graph G, vertices u and v, and natural number k 7 / 17

Representation For the rest of the course, we re going to be working with languages whose elements are representations of mathematical objects like integers graphs finite automata regular expressions CFGs PDAs Turing machines finite sets of mathematical objects finite, ordered lists of mathematical objects We need some way to represent these as strings over some alphabet 8 / 17

Explicit representation Most of the time, we won t give an explicit representation We ll mostly assume some representation exists and we can convert from one representation to another easily 9 / 17

Example: Graph representation As a mathematical object, an undirected graph 5 is a pair G = (V, E) where V a finite set of vertices E a finite set of pairs of vertices We can specify the graph in a number of ways and easily convert between them Vertex and edge lists G = (V, E) where V = {1, 2, 3, 4, 5} and E = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 1), (1, 3), (2, 4), (3, 5)} 2 1 3 5 4 5 Review Sipser, chapter 0 as needed 10 / 17

Example: Graph representation As a mathematical object, an undirected graph 5 is a pair G = (V, E) where V a finite set of vertices E a finite set of pairs of vertices We can specify the graph in a number of ways and easily convert between them Vertex and edge lists G = (V, E) where V = {1, 2, 3, 4, 5} and E = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 1), (1, 3), (2, 4), (3, 5)} Adjacency matrix a ij = 1 if (i, j) E 2 1 3 5 4 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 5 Review Sipser, chapter 0 as needed 10 / 17

Example: Graph representation As a mathematical object, an undirected graph 5 is a pair G = (V, E) where V a finite set of vertices E a finite set of pairs of vertices We can specify the graph in a number of ways and easily convert between them Vertex and edge lists G = (V, E) where V = {1, 2, 3, 4, 5} and E = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 1), (1, 3), (2, 4), (3, 5)} Adjacency matrix a ij = 1 if (i, j) E 2 1 3 5 4 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 Adjacency list: [{2, 3, 5}, {1, 3, 4}, {1, 2, 4, 5}, {2, 3, 5}, {1, 3, 4}] 5 Review Sipser, chapter 0 as needed 10 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k integers 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 integers integers separated by 1s 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 Σ = 1 1 1 2 1 1 n 1 = 101001 10 n 1 integers integers separated by 1s integers separated by 1s 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 Σ = 1 1 1 2 1 1 n 1 = 101001 10 n 1 δ(q, t) = r = q 1 t 1 r = 0 q 10 t 10 r integers integers separated by 1s integers separated by 1s 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 Σ = 1 1 1 2 1 1 n 1 = 101001 10 n 1 δ(q, t) = r = q 1 t 1 r = 0 q 10 t 10 r δ = 11 δ(1, 1) = r 11 11 11 δ(q, s) = r qs 11 integers integers separated by 1s integers separated by 1s 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 Σ = 1 1 1 2 1 1 n 1 = 101001 10 n 1 δ(q, t) = r = q 1 t 1 r = 0 q 10 t 10 r δ = 11 δ(1, 1) = r 11 11 11 δ(q, s) = r qs 11 q 0 = 0 q 0 integers integers separated by 1s integers separated by 1s integer 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 Σ = 1 1 1 2 1 1 n 1 = 101001 10 n 1 δ(q, t) = r = q 1 t 1 r = 0 q 10 t 10 r δ = 11 δ(1, 1) = r 11 11 11 δ(q, s) = r qs 11 q 0 = 0 q 0 integers integers separated by 1s integers separated by 1s integer F = 1 f 1 1 f 2 1 1 f k 1 integers separated by 1s 11 / 17

Explicit representation for a DFA Consider M = (Q, Σ, δ, q 0, F ) where Q = {1, 2,..., m}, Σ = {1, 2,..., n}, and F = {f 1, f 2,..., f k } Build it up piece by piece using the alphabet Σ = {0, 1} k = 0 k Q = 1 1 1 2 1 1 m 1 = 101001 10 m 1 Σ = 1 1 1 2 1 1 n 1 = 101001 10 n 1 δ(q, t) = r = q 1 t 1 r = 0 q 10 t 10 r δ = 11 δ(1, 1) = r 11 11 11 δ(q, s) = r qs 11 q 0 = 0 q 0 integers integers separated by 1s integers separated by 1s integer F = 1 f 1 1 f 2 1 1 f k 1 integers separated by 1s M = 111 Q 111 Σ 111 δ 111 q 0 111 F 111 11 / 17

Explicit representation 1 1 2 Consider the simple DFA: 1 2 2 Q = 1 0 1 00 1 Σ = 1 0 1 00 1 δ = 11 01010 11 0100100 11 0010100 11 0010010 11 q 0 = 0 F = 1 00 1 M = 111 101001 Q 111 101001 Σ 111 110101011010010011001010011001001011 δ 111 0 111 1001 111 q 0 F 12 / 17

Representations of other objects We re not going to bother giving explicit representations of other objects But we could if we really needed to and that s enough for our purposes 13 / 17

Taking representations as inputs to TMs We re going to be dealing with languages like A DFA = { M, w M is a DFA, w is a string and w L(M)} This language is related to the acceptance problem for DFAs which involves testing if the DFA M accepts a string w 14 / 17

Taking representations as inputs to TMs We re going to be dealing with languages like A DFA = { M, w M is a DFA, w is a string and w L(M)} This language is related to the acceptance problem for DFAs which involves testing if the DFA M accepts a string w Theorem The language A DFA is decidable. 14 / 17

Taking representations as inputs to TMs We re going to be dealing with languages like A DFA = { M, w M is a DFA, w is a string and w L(M)} This language is related to the acceptance problem for DFAs which involves testing if the DFA M accepts a string w Theorem The language A DFA is decidable. Proof. Let s build a TM to decide A DFA. M = On input B, w where B is a DFA and w is a string, 1 Simulate B on input w. 2 If the simulation ends in an accept state, accept. If it ends in a nonaccepting state, reject. 14 / 17

Some notes about that construction First, the form of the construction: M = On input, 1 First step. 2 Second step. 3 Last step. Your constructions should follow exactly this form 15 / 17

Some notes about that construction First, the form of the construction: M = On input, 1 First step. 2 Second step. 3 Last step. Your constructions should follow exactly this form Second, note that the input to this TM is supposed to be a representation of a DFA and a string The representation is not the same thing as the mathematical object If M is a DFA, then M is a string TMs take strings as input, nothing else 15 / 17

How does this construction actually work? First, the TM M is going to check that the input is a valid representation of a DFA and a string Which representation is that? Then, it needs to simulate the DFA by keeping track of the DFA s initial state and how much of the input it has read so far Initially, the DFA starts in its initial state and it has read none of the input so far The simulation proceeds step by step where M needs to compare the current state and the next input symbol to the representation of δ to find the next state 16 / 17

Next time We ll discuss some more decidable languages related to the acceptance problem for other models of computation The emptiness problem for models of computation (E.g., is the language of a DFA the empty language?) The equivalence problem for models of computation (E.g., do two DFAs have the same language?) Later, we ll discuss some related problems (and languages) that are not decidable! 17 / 17