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

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

Decidability (intro.)

CSE 105 THEORY OF COMPUTATION

Intro to Theory of Computation

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

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

2017/08/29 Chapter 1.2 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

ACS2: Decidability Decidability

Theory of Computation (IX) Yijia Chen Fudan University

CSE 105 THEORY OF COMPUTATION

1 Showing Recognizability

Decidability (What, stuff is unsolvable?)

Computability Theory

Intro to Theory of Computation

acs-07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

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

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

Decidability and Undecidability

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

Theory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable

CSE 105 THEORY OF COMPUTATION

2017/08/31 Chapter 1.2 & 1.3 in Sipser Ø Announcement:

Computational Models Lecture 8 1

CSE 105 THEORY OF COMPUTATION

Computational Models Lecture 8 1

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

Turing Machines Part III

Reducability. Sipser, pages

Decidable Languages - relationship with other classes.

Decidable and undecidable languages

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

Computational Models Lecture 8 1

Computability Theory. CS215, Lecture 6,

Computational Models Lecture 7, Spring 2009

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Computability Theory

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

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

Computability and Complexity

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

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

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

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

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

Lecture Notes: The Halting Problem; Reductions

CSE 105 Theory of Computation

CSE 105 Theory of Computation

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

Decidability: Church-Turing Thesis

V Honors Theory of Computation

TURING MAHINES

CS20a: Turing Machines (Oct 29, 2002)

16.1 Countability. CS125 Lecture 16 Fall 2014

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

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

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

Introduction to Turing Machines

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Chapter 3: The Church-Turing Thesis

The Church-Turing Thesis

CSE 105 THEORY OF COMPUTATION

Turing Machines. Human-aware Robotics. 2017/10/17 & 19 Chapter 3.2 & 3.3 in Sipser Ø Announcement:

CPSC 421: Tutorial #1

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

CSE 105 THEORY OF COMPUTATION

CS20a: Turing Machines (Oct 29, 2002)

CS21 Decidability and Tractability

CSE 105 THEORY OF COMPUTATION

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

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

CpSc 421 Final Exam December 15, 2006

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5.

Homework Assignment 6 Answers

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2

Variants of Turing Machine (intro)

Exam Computability and Complexity

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Turing Machines Part II

Turing Machines. Lecture 8

Lecture 12: Mapping Reductions

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

CSE 105 THEORY OF COMPUTATION

Computation Histories

Non-emptiness Testing for TMs

Decidability. Overview. Preliminaries to Halting Problem. Decidable Problems of Regular Languages. Decidable Problems of Context-Free Languages

Turing Machines Part One

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

Announcements. Using a 72-hour extension, due Monday at 11:30AM.

CSE 105 THEORY OF COMPUTATION

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

Transcription:

Decidability 2017/10/31 Chapter 4.1 in Sipser Ø Announcement: q q q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/decidability.pdf Happy Hollaween! Delayed grading for o HW4 group part o Project #1 1

Performance analysis Overall average: 78.5% out of a total of 26.5 graded Midterm 1 average: 59.3% HW average: 86.2% Quiz average: 96.0% 78.5% x 108 = 84.8 2

Performance analysis 28 13 15 6 6 2 2 > 61 > 71 > 81 > 92 > 102 3

Last chapter The church-turing thesis o o Turing machines q Definition of TM q Computation of TM q Design of TM Variants of TMs o Multitape TM o Nondeterminstic TM o Enumerators FA (DFA & NFA) express Regular Expressions (RE) CFL Recursively enumerable 4

Theory of computation Automata Theory abstract machines Computation Computability Theory fundamental capabilities and limitations of abstract machines Complexity Theory why certain problems are harder than others 5

What are algorithms? Ø A process that can be determined in finite number of operations. Why finite? Alonzo Church s lambda-calculus Alan Turing s machines (Turing machine) lambda-calculus M decider Accept Reject 6

What are algorithms? Ø A process that can be determined in finite number of operations. Why finite? Alonzo Church s lambda-calculus Alan Turing s machines (Turing machine) lambda-calculus These two representations are equivalent! M decider Accept Reject 7

Theory of computation decider Automata Theory abstract machines Computation Computability Theory fundamental capabilities and limitations of abstract machines Complexity Theory why certain problems are harder than others 8

Theory of computation decider Automata Theory Hilbert s tenth problem Computation abstract machines Computability Theory fundamental capabilities and limitations of abstract machines Complexity Theory why certain problems are harder than others 9

Why do we care? decider D1 Hilbert s tenth problem D Computation Ø Identify problems that are too hard o change the problem Ø Understand limitations of computers 10

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems about RLs 11

Acceptance of DFA Does a DFA accept a given string (the acceptance problem)? problem is solvable algorithmically == the corresponding language is decidable M Accept Reject 12

Acceptance of DFA Does a DFA accept a given string (the acceptance problem)? 13

Acceptance of DFA Does a DFA accept a given string (the acceptance problem)? Implementation level? M Accept Reject (Q,,,q0,F) 14

Acceptance of DFA Does a DFA accept a given string (the acceptance problem)? Encoding of B is (Q,,,q0,F) Check whether input string is a valid finite automaton Simulate B on w TM keeps track of the current state of B and current position on w. Updates are done through δ When having processed the last input symbol, check whether the state is accepting. 15

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems about RLs 16

Acceptance of NFA Does a NFA accept a given string? M on input <B, w>: Simulate B nondeterminstically using NTM If the simulation accepts, accept; else, reject. Incorrect since the machine may not stop 17

Acceptance of NFA Does a NFA accept a given string? 18

Acceptance of NFA Does a NFA accept a given string? <B, w> <C, w> Convert NFA to DFA M N Accept Reject Converting NFA to DFA must be done in finite steps always! 19

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems about RLs 20

Generation of RE Does an RE generate a string w? M on input <R, w>: 1. Try a possible instantiation of the regular operations so that the strings are in shortlex order (how do we do this?) 2. Compare with w. If match, accept; else, continue to 1. 3. If the length of string generated is longer than w, reject Works but clumsy 21

Generation of RE Does an RE generate a string w? M on input <B, w>: Simulate B nondeterminstically If the simulation accepts, accept; else, reject. 22

Outline for today Decidability next class: o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs o Context-free languages q Acceptance of CFG q Test emptiness of CFG Reading assignment for the o Sipser Sec. 4.1 - Quiz link will be sent out; due date is before the beginning of the next class Ø Goals: o Learn about several solvable problems about RLs 23

Last time Decidability o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs o Context-free languages q Acceptance of CFG q Test emptiness of CFG lambda-calculus M decider solvability == decider Accept Reject Ø Goals: o Learn about several solvable problems about RLs 24

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems 25

Test emptiness of RL Is the language of a DFA empty? M on input <A>: For each w in Σ* in shorlex order: Simulate A with w as the input If the simulation accepts, reject Accept Incorrect since the machine would not stop 26

Test emptiness of RL Is the language of a DFA empty? M on input <A>: For each w order in shorlex order: Simulate A with w in If the simulation accepts, reject Accept. 27

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems 28

Test equivalence of RLs Are the languages of DFA A and B the same? M on input <A, B>: Keep track of the current states of A and B For each state in the possible current states for A (unchecked), collect all possible next states from the state If there is no a matched state (unchecked) in B s current states (based on its transition structure), reject; otherwise, mark the state in A and the matched state in B as checked and continue Accept if no more states can be checked Incorrect since A and B can have different structures! 29

Test equivalence of RLs Are the languages of DFA A and B the same? L(A) = L(B) if and only if L(C) is empty 30

Test equivalence of RLs Are the languages of DFA A and B the same? 31

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems 32

Acceptance of CFG Can a string w be generated by a CFG? How to contruct a Turing machine to decide A CFG? 33

Acceptance of CFG Can a string w be generated by a CFG? What about A PDA? 34

Acceptance of CFG Can a string w be generated by a CFG? What about A PDA? 35

Outline for today Decidability o o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs Context-free languages q Acceptance of CFG q Test emptiness of CFG Ø Goals: o Learn about several solvable problems 36

Acceptance of CFG Is the language generated by a CFG empty? How to construct a Turing machine for E CFG 37

Acceptance of CFG Is the language generated by a CFG empty? What about EQ CFG? 38

Put RL and CFL in scope 39

Undecidability 2017/11/2 Chapter 4.2 in Sipser 40

Undecidability decider Computation Computation Hilbert s tenth problem Recognizable but undecidable languages 41

Undecidability decider Computation Computation Hilbert s tenth problem Unrecognizable languages? 42

Undecidability decider Computation Computation Hilbert s tenth problem Unrecognizable languages? complement of D 43

Undecidability Ø A language is co-turing-recognizable if it is the complement of a Turing-recognizable language. Computation Hilbert s tenth problem Unrecognizable languages? complement of D 44

Non Turing-recognizable Claim: There are an infinite number of languages that are not Turing recognizable 45

Countably infinite {1, 2, 3, } and {2, 4, 6, }, which one has a bigger size? one-to-one onto 46

Diagonalization {1, 2, 3, } and {2, 4, 6, }, which one has a bigger size? Rational numbers is also countable (countably infinite) m/n 47

Diagonalization {1, 2, 3, } and {2, 4, 6, }, which one has a bigger size? Rational numbers is also countable (countably infinite) m/n Is every infinite set countable? 48

Uncountable Ø If such a mapping exists, For any x in R, there must exist a n such that f(n) = x 49

Uncountable Ø If such a mapping exists, For any x in R, there must exist a n such that f(n) = x 50

Uncountable Ø If such a mapping exists, For any x in R, there must exist a n such that f(n) = x x!= f(n) for all n 51

Uncountable Ø If such a mapping exists, For any x in R, there must exist a n such that f(n) = x x!= f(n) for all n why doesn t this work for rational numbers? 52

Non Turing-recognizable Claim: There are an infinite number of languages that are not Turing recognizable Ø Σ * is countable so is the number of Turing machines! Ø The set (power set) of languages for Σ * is uncountable Claim: There are an infinite number of languages that are not Turing recognizable In fact, it is uncountable! why? 53

Non Turing-recognizable Claim: There are an infinite number of languages that are not Turing recognizable Ø Σ * is countable so is the number of Turing machines! Ø The set (power set) of languages for Σ * is uncountable Claim: There are an infinite number of languages that are not Turing recognizable In fact, it is uncountable! why? Ø Way more problems cannot be solved (or even recognized) by TMs than those that can! 54

Undecidable languages Let us now return to reality Hilbert s tenth problem any other problems? Ø Finding them can help us determine other problems 55

Undecidable languages? 56

Undecidable languages is undecidable! <M> D <M, w> H w M Accept Accept Reject Reject Loop Reject Accept 57

Undecidable languages is undecidable! <M> D <M, <M>> H <M> M Accept Accept Reject Reject Loop Reject Accept 58

Undecidable languages is undecidable! <D> D <D, <D>> H <D> D Accept Accept Reject Reject Loop Reject Accept 59

Undecidable languages is undecidable! <D> D <D, <D>> H <D> D Accept Accept Reject Reject Loop Reject Accept Notice any issues? Check out the recursion theorem 6.1 60

Undecidable languages M on w where w = <Mi> H on <Mi, w> where w = <Mj> D on <M> 61

Outline for today Decidability next class: o Regular languages q Acceptance of DFA q Acceptance of NFA q Generation of RE q Test emptiness of RL q Test equivalence of DFAs o Context-free languages q Acceptance of CFG q Test emptiness of CFG Undecidability Ø Goals: o Learn about several solvable problems Reading assignment for the o Learn about undecidability and non turing recognizable languages o Sipser Sec. 6.1 - Quiz link will be sent out; due date is before the beginning of the next class o Second (and last project) based on this o HW6 62