CSE 105 THEORY OF COMPUTATION

Similar documents
CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Lecture 12: Mapping Reductions

CSE 105 Theory of Computation

Decidability and Undecidability

CSE 105 Theory of Computation

Computation Histories

Computability and Complexity

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

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

1 Showing Recognizability

CSCE 551 Final Exam, Spring 2004 Answer Key

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

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

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

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

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

Computability Theory

Non-emptiness Testing for TMs

Reducability. Sipser, pages

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

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

Intro to Theory of Computation

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

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

CS154, Lecture 10: Rice s Theorem, Oracle Machines

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

Decidability (intro.)

Decidable Languages - relationship with other classes.

CPSC 421: Tutorial #1

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

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y

CpSc 421 Homework 9 Solution

ACS2: Decidability Decidability

CSE 105 THEORY OF COMPUTATION

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

Intro to Theory of Computation

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

Lecture Notes: The Halting Problem; Reductions

V Honors Theory of Computation

CSE 105 THEORY OF COMPUTATION

Decidability (What, stuff is unsolvable?)

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

Turing Machines Part III

Computational Models Lecture 9, Spring 2009

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

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

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

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2

Introduction to Languages and Computation

Computability Crib Sheet

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

Decidable and undecidable languages

4.2 The Halting Problem

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

Computational Models Lecture 8 1

Homework Assignment 6 Answers

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

SD & Turing Enumerable. Lecture 33: Reductions and Undecidability. Lexicographically Enumerable. SD & Turing Enumerable

Computational Models Lecture 8 1

Computability and Complexity

Theory of Computation (IX) Yijia Chen Fudan University

Turing Machines, diagonalization, the halting problem, reducibility

Computational Models Lecture 8 1

Midterm II : Formal Languages, Automata, and Computability

TURING MAHINES

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

Introduction to Turing Machines. Reading: Chapters 8 & 9

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

CSE 555 Homework Three Sample Solutions

CS5371 Theory of Computation. Lecture 15: Computability VI (Post s Problem, Reducibility)

There are two main techniques for showing that problems are undecidable: diagonalization and reduction

CSE 105 THEORY OF COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Chapter 3: The Church-Turing Thesis

CS20a: Turing Machines (Oct 29, 2002)

Computability Theory

Reductions in Computability Theory

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

Undecidable Problems and Reducibility

A non-turing-recognizable language

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

CS20a: Turing Machines (Oct 29, 2002)

Lecture 13: Foundations of Math and Kolmogorov Complexity

Computable Functions

Turing Machines. Lecture 8

Problems, and How Computer Scientists Solve Them Manas Thakur

Turing Machine Recap

The Unsolvability of the Halting Problem. Chapter 19

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

Limits of Computability

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Transcription:

CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/

Today's learning goals Sipser Ch 5.1, 5.3 Define and explain core examples of computational problems, including A **, E **, EQ **, HALT TM (for ** either DFA or TM) Explain what it means for one problem to reduce to another Define computable functions, and use them to give mapping reductions between computational problems

A TM = {<M,w> M is a TM and w is in L(M) } Define the TM N = "On input <M,w>: 1. Simulate M on w. 2. If M accepts, accept. If M rejects, reject. M 1 M 2 M 4 A. N rejects <M 1, 0> B. N accepts <M 2 > C. N rejects <M 4, 1> D. N recognizes A TM E. More than one of the above.

A TM A DFA = {<B,w> B is a DFA and w is in L(B) } Decider for this set simulates arbitrary DFA A TM = {<M,w> M is a TM and w is in L(M) }

Diagonalization proof: A TM not decidable Sipser p. 207 Assume, towards a contradiction, that it is. Call M ATM the decider for A TM : M ATM N For every TM M and every string w, Computation of M ATM on <M,w> halts and accepts if w is in L(M). Computation of M ATM on <M,w> halts and rejects if w is not in L(M).

Diagonalization proof: A TM not decidable Sipser 4.11 Assume, towards a contradiction, that M ATM decides A TM Define the TM D = "On input <M>: 1. Run M ATM on <M, <M>>. 2. If M ATM accepts, reject; if M ATM rejects, accept."

Diagonalization proof: A TM not decidable Sipser 4.11 Assume, towards a contradiction, that M ATM decides A TM Define the TM D = "On input <M>: 1. Run M ATM on <M, <M>>. 2. If M ATM accepts, reject; if M ATM rejects, accept." Which of the following computations halt? A. Computation of D on <M 1 > B. Computation of D on <M 4 > C. Computation of D on <D> D. All of the above. E. None of the above.

Diagonalization proof: A TM not decidable Sipser 4.11 Assume, towards a contradiction, that M ATM decides A TM Define the TM D = "On input <M>: 1. Run M ATM on <M, <M>>. 2. If M ATM accepts, reject; if M ATM rejects, accept." Consider running D on input <D>. Because D is a decider: either computation halts and accepts or computation halts and rejects

Diagonalization proof: A TM not decidable Sipser 4.11 Assume, towards a contradiction, that M ATM decides A TM Define the TM D = "On input <M>: 1. Run M ATM on <M, <M>>. Diagonalization??? Self-reference "Is <D> an element of L(D)?" 2. If M ATM accepts, reject; if M ATM rejects, accept." Consider running D on input <D>. Because D is a decider: either computation halts and accepts or computation halts and rejects

A TM Sipser p. 207 A TM = {<M,w> M is a TM and w is in L(M) } Define the TM N = "On input <M,w>: 1. Simulate M on w. 2. If M accepts, accept. If M rejects, reject." N is a Turing machine that recognizes A TM. No Turing machine decides A TM.

A TM Sipser p. 210 Recognizable Not decidable Fact (Theorem 4.22): A language is decidable iff it and its complement are both recognizable. Corollary 4.23: The complement of A TM is unrecognizable.

Decidable Recognizable (and not decidable) Co-recognizable (and not decidable) A DFA A TM A TM C E DFA EQ DFA Give algorithm! Diagonalization

Do we have to diagonalize?

Idea Sipser pp. 215-216 If problem X is no harder than problem Y and if Y is easy then X must also be easy

Idea Sipser pp. 215-216 If problem X is no harder than problem Y and if X is hard then Y must also be hard

Idea Sipser pp. 215-216 If problem X is no harder than problem Y and if Y is decidable then X must also be decidable If problem X is no harder than problem Y and if X is undecidable then Y must also be undecidable

Idea Sipser pp. 215-216 If problem X is no harder than problem Y and if Y is decidable then X must also be decidable If problem X is no harder than problem Y and if X is undecidable then Y must also be undecidable Problem X is no harder than problem Y means Can convert questions about membership in X to questions about membership in Y

Mapping reduction Sipser p. 235 Problem A is mapping reducible to problem B means there is a computable function f: Σ* Σ* such that for all strings x in Σ* x is in A iff f(x) is in B

Mapping reduction Sipser p. 235 Problem A is mapping reducible to problem B means there is a computable function f: Σ* Σ* such that for all strings x in Σ* x is in A iff f(x) is in B Computable function? A function f: Σ* Σ* is computable iff there is some Turing machine such that, for each x, on input x halts with exactly f(x) followed by all blanks on the tape

Computable functions (aka maps) Which of the following functions are computable? A. The string x maps to the string xx. B. The string <M> (where M is a TM) maps to <M > where M is the Turing machine that acts like M does, except that if M tries to reject, M goes into a loop; strings that are not the codes of TMs map to ε. C. The string x maps to y, where x is the binary representation of the number n and y is the binary representation of the number 2 n D. All of the above. E. None of the above.

Next time How do reductions help us determine decidability / undecidability / recognizability / unrecognizability?