CSE 105 THEORY OF COMPUTATION

Similar documents
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

CSE 105 Theory of Computation

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

CSE 105 Theory of Computation

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

ACS2: Decidability Decidability

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

1 Showing Recognizability

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

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

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

CSE 105 THEORY OF COMPUTATION

Intro to Theory of Computation

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

Decidability and Undecidability

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

Lecture Notes: The Halting Problem; Reductions

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

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

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

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

CSE 105 THEORY OF COMPUTATION

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

Reducability. Sipser, pages

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2

Computational Models Lecture 8 1

Computational Models Lecture 8 1

Decidability (intro.)

CPSC 421: Tutorial #1

Computability and Complexity

Computational Models Lecture 8 1

Decidability (What, stuff is unsolvable?)

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSCE 551 Final Exam, Spring 2004 Answer Key

Lecture 12: Mapping Reductions

V Honors Theory of Computation

Computability Theory

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

Decidable Languages - relationship with other classes.

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

CSE 105 THEORY OF COMPUTATION

16.1 Countability. CS125 Lecture 16 Fall 2014

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

Decidable and undecidable languages

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

Theory of Computation (IX) Yijia Chen Fudan University

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

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

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

CSE 311: Foundations of Computing I Autumn 2014 Practice Final: Section X. Closed book, closed notes, no cell phones, no calculators.

CSE 105 THEORY OF COMPUTATION

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

4.2 The Halting Problem

Computation Histories

Non-emptiness Testing for TMs

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

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

Intro to Theory of Computation

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

CSE 105 THEORY OF COMPUTATION

TURING MAHINES

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

Turing Machines Part III

Computational Models Lecture 9, Spring 2009

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CS20a: Turing Machines (Oct 29, 2002)

The Unsolvability of the Halting Problem. Chapter 19

MTAT Introduction to Theoretical Computer Science

CS 361 Meeting 26 11/10/17

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

Computability and Complexity

CpSc 421 Final Exam December 15, 2006

Decidability: Church-Turing Thesis

A non-turing-recognizable language

Undecidable Problems and Reducibility

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

CSCI3390-Lecture 6: An Undecidable Problem

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

Turing Machine Recap

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

Exam Computability and Complexity

Name: Student ID: Instructions:

Computability Crib Sheet

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

Answers to the CSCE 551 Final Exam, April 30, 2008

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

Turing Machines, diagonalization, the halting problem, reducibility

Computability Theory

CSE 311 Lecture 28: Undecidability of the Halting Problem. Emina Torlak and Kevin Zatloukal

CpSc 421 Final Exam December 6, 2008

Computable Functions

Transcription:

CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/

Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use counting arguments to prove the existence of unrecognizable (undecidable) languages. Use diagonalization in a proof of undecidability.

Computational problems A computational problem is decidable iff the language encoding the problem instances is decidable. In Siper 4.1: The computational problems below A DFA, A NFA, A REX, A CFG E DFA, E NFA, E REX, E CFG EQ DFA, EQ NFA, EQ REX, EQ CFG are all decidable

Undecidable? There are many ways to prove that a problem is decidable. How do we find (and prove) that a problem is not decidable?

Counting arguments Before we proved the Pumping Lemma We proved there was a set that was not regular because Uncountable Countable All Regular Sets All sets of strings

Reminder: countable/ uncountable Sets A and B have the same size A = B means there is a function between them that is both one-to-one and onto. Countable (finite or same size as N) Uncountable N, Z, Q R Σ* { infinite sequences over Σ} The set of all TMs P( Σ*) Sipser p. 202-204

Reminder: countable/ uncountable Sets A and B have the same size A = B means there is a function between them that is both one-to-one and onto. What type of elements are in the set P( Σ*)? A. Strings B. Regular expressions C. Languages D. Sets of regular expressions E. I don t know Sipser p. 202-204

Counting arguments Uncountable Countable All Turingrecognizable sets All sets of strings Why is the set of Turing-recognizable languages countable? A. It's equal to the set of all TMs, which we showed is countable. B. It's a subset of the set of all TMs, which we showed is countable. C. Each Turing-recognizable language is associated with a TM, so there can be no more Turing-recognizable languages than TMs. D. More than one of the above. E. I don't know.

Counting arguments Uncountable Countable All Turingrecognizable sets All sets of strings Is the set of Turing-decidable sets countable?

Satisfied? Maybe not What's a specific example of a language that is not Turing-recognizable? or not Turing-decidable? Idea: consider a set that, were it to be Turing-decidable, would have to "talk" about itself, and contradict itself!

A TM Recall A DFA = {<B,w> B is a DFA and w is in L(B) } A TM = {<M,w> M is a TM and w is in L(M) } What is A TM? A. A Turing machine whose input is codes of TMs and strings. B. A set of pairs of TMs and strings. C. A set of strings that encode TMs and strings. D. Not well defined. E. I don't know.

A TM 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." Which of the following statements is true? A. N decides A TM B. N recognizes A TM C. N always halts D. More than one of the above. E. I don't know

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) } Decider for this set simulates arbitrary TMs. What happens when it simulates itself?

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 <X> where X is TM which accepts string w if first character is 0 and loops otherwise. B. Computation of D on <Y> where Y is TM with L(Y) =Σ* C. Computation of D on <D> D. All 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 Recognizable Not decidable Fact (from discussion section): A language is decidable iff it and its complement are both recgonizable. Corollary: The complement of A TM is unrecognizable.

Do we have to diagonalize? Next time (after exam): comparing difficulty of problems.

Next time: Exam 2 Bring ID, note card Check seat maps before coming to class