CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.

Slides:



Advertisements
Similar presentations
Formal Models of Computation Part III Computability & Complexity
Advertisements

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Introduction to Computability Theory
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Tutorial CSC3130 : Formal Languages and Automata Theory Tu Shikui ( ) SHB 905, Office hour: Thursday 2:30pm-3:30pm
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Announcements Homework – HW8 due Tues 5/29 11am – HW5 grades are out Monday is Memorial Day; no office hours, etc. – Go see a parade, or some fireworks,
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Tutorial: Reduction from A TM Proofs Dr. Cynthia Lee CSE 105, UCSD Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee,
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 20 Last time Mapping reductions Computation history method Today Computation history method.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSCI 2670 Introduction to Theory of Computing
This statement is false.
CSE 105 Theory of Computation
Busch Complexity Lectures: Reductions
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Reducibility The Chinese University of Hong Kong Fall 2010
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CSE 105 theory of computation
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidability of logical theories
CSCI 2670 Introduction to Theory of Computing
Reducability Sipser, pages
CSCI 2670 Introduction to Theory of Computing
More undecidable languages
CS21 Decidability and Tractability
Decidability of logical theories
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSE 105 theory of computation
Theory of Computability
More undecidable languages
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSE 105 theory of computation
Intro to Theory of Computation
Intro to Theory of Computation
Presentation transcript:

CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Based on a work at Permissions beyond the scope of this license may be available at

REDUCTIONS More examples!!!!11 2

Thm. T = { | M is a TM and both “101” and “111” are in L(M)} is undecidable Proof by contradiction: (Reduce from A TM.) Assume T is decidable by TM M T. Use M T to construct TM X that decides A TM. X( ): – Construct Z(m): If m != “111” and m != “101” then reject. Else: Run M(w), if it accepts then accept. If it rejects then reject (might loop in which case obviously Z loops). – Run M T ( ). If it accepts then accept, otherwise reject. But A TM is undecidable, a contradiction. So the assumption is false and T is undecidable. QED. 3 What is L(Z)? (a) Σ * (b) {“101”, “111”} (c) empty set if M(w) rejects, and {“101”,”111”} if M(w) accepts. (d) Σ * if M(w) accepts, and {“101”,”111”} if M(w) does not accept

We showed that if we have a solution to T, then we have a solution to A TM. What did we show exactly? a)A TM reduces to T. b)T reduces to A TM. c)T and A TM reduce to each other. d)None of the above or more than one of the above. 4 We just did a reduction!

Thm. T = { | M is a TM that accepts w R whenever it accepts w} is undecidable Proof by contradiction: (Reduce from A TM.) Assume T is decidable by TM M T. Use M T to construct TM X that decides A TM. X( ): – Construct Z(m): If m != “01” and m!= “10” then reject If m == “01” accept ??? – Run M T ( ). If it accepts then accept, otherwise reject. But A TM is undecidable, a contradiction. So the assumption is false and T is undecidable. QED. 5 How do we finish Z? (a)Run M(w), if it accepts then accept. If it rejects then reject (might loop in which case obviously Z loops). (b)Run M(w), if it accepts then reject. If it rejects then accept (might loop in which case obviously Z loops).

We showed that if we have a solution to T, then we have a solution to A TM. What did we show exactly? a)A TM reduces to T. b)T reduces to A TM. c)T and A TM reduce to each other. d)None of the above or more than one of the above. 6 We just did a reduction!

MYSTERY_LANG ≤ A CFG Which of the following is true (given the above statement is true): a)You can reduce from MYSTERY_LANG to A CFG. b)MYSTERY_LANG is decidable. c)A decider for A CFG (if it exists) could be used to decide MYSTERY_LANG. d)All of the above 7

A TM ≤ MYSTERY_LANG Which of the following is true (given the above statement is true): a)You can reduce from A TM to MYSTERY_LANG. b)MYSTERY_LANG is undecidable. c)A decider for MYSTERY_LANG (if it exists) could be used to decide A TM. d)All of the above 8

MYSTERY_LANG ≤ A TM Which of the following is true (given the statement above is true): a)MYSTERY_LANG is undecidable. b)A decider for A TM (if it exists) could be used to decide MYSTERY_LANG. c)All of the above 9

MAPPING REDUCTIONS Some more formalities…. 10

Our reductions so far: A ≤ B – Build a decider for A using a decider for B – No restrictions on what you can do with the decider for B – Does not generalize to recognizability To prove recognizability (or co-recognizability, or lack thereof) by reductions, we need a specific type of reduction called a mapping reduction 11

Mapping reductions A ≤ m B First definition (there are 2 equivalent ones): – A special type of reduction – Build a TM for A using a TM for B…but: Can only use B once Cannot do anything after running B Must use B’s output directly with no modification 12

This is a mapping reduction E TM ≤ m EQ TM – E TM = { | L(M) = {} } – EQ TM = { | L(M 1 ) = L(M 2 ) } Let M EQ decide EQ TM M ETM ( ): – Let M x be a TM that rejects all strings – Run M EQ ( ) If M EQ accepts, then accept. If it rejects, then reject. 13 Only uses M EQ once Uses M EQ output with no modification Doesn’t do anything after running M EQ

Is this is a mapping reduction? A TM ≤ m HALT TM ? – A TM = { | M accepts w } – HALT TM = { | M halts on w) } Let M halt decide HALT TM M ATM ( ): – Run M halt ( ). If it rejects, then reject. – Run M(w). If it accepts, then accept. If it rejects, then reject. a)YES, it’s a mapping reduction b)NO, it’s not a mapping reduction 14

Mapping reductions: a second definition A ≤ m B Second definition: – There is a function f: Σ* -> Σ* – If f(x) = y, then: y is in B if and only if x is in A. – f is computable by a TM that always halts – We say that f maps strings in A to strings in B Note that A ≤ m B also implies A ≤ m B 15

What is the function f corresponding to this mapping reduction? E TM ≤ m EQ TM – E TM = { | L(M) = {} } – EQ TM = { | L(M 1 ) = L(M 2 ) } Let M EQ decide EQ TM M ETM ( ): – Let M x be a TM that rejects all strings – Run M EQ ( ) If M EQ accepts, then accept. If it rejects, then reject. a)f( ) = b)f( ) = c)f( ) = d)f( ) = 16

Thm.: EQ TM is not recognizable A TM = { | M accepts w } EQ TM = { | L(M 1 ) = L(M 2 ) } f( ) = where: – M 1 = “On any input, reject” – M 2 = “On any input, run M on w. If it accepts, accept.” Which mapping reduction does this f give? a)A TM ≤ m EQ TM b)EQ TM ≤ m A TM c)A TM ≤ m EQ TM d)EQ TM ≤ m A TM 17

We showed: A TM ≤ m EQ TM We know: A TM is NOT co-recognizable. – We showed this in a previous lecture We showed: A TM is mapping reducible to EQ TM. – We can “co-recognize” A TM by applying f and “co- recognizing” EQ TM – This means: if EQ TM is co-recognizable, then A TM is co-recognizable. – We know A TM is not co-recognizable, though. – Contradiction! EQ TM is NOT co-recognizable. – The same as: EQ TM is NOT recognizable. 18

Thm.: EQ TM is not co-recognizable A TM = { | M accepts w } EQ TM = { | L(M 1 ) = L(M 2 ) } f( ) = where: – M 1 = “Accept” – M 2 = “On any input, run M on w. If it accepts, accept.” Which mapping reduction does this f give? a)A TM ≤ m EQ TM b)EQ TM ≤ m A TM c)A TM ≤ m EQ TM d)EQ TM ≤ m A TM 19

We showed: A TM ≤ m EQ TM We know: A TM is NOT co-recognizable. – We showed this in a previous class We showed: A TM is mapping reducible to EQ TM. – We can “co-recognize” A TM by applying f and “co- recognizing” EQ TM – This means: if EQ TM is co-recognizable, then A TM is co-recognizable. – We know A TM is not co-recognizable, though. – Contradiction! EQ TM is NOT co-recognizable. 20

So, we did TWO mapping reductions A TM ≤ m EQ TM We have shown: There is a language ( EQ TM ) that is not recognizable and also not co-recognizable! In general: to show that a language L is NOT recognizable – Give a mapping reduction from A TM to L. Pro tip: Use A TM as the stock “language that’s recognizable but not co-recognizable” 21 x 2