Reductions (Section 5.1) Héctor Muñoz-Avila. Summary of Previous Lectures The Halting problem is undecidable: –HALT = { | M is a Turing machine, w  

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.
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
Variants of Turing machines
Lecture 19. Reduction: More Undecidable problems
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
The Recursion Theorem Sipser – pages Self replication Living things are machines Living things can self-reproduce Machines cannot self reproduce.
Turing -Recognizable vs. -Decidable
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
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.
FLAC Lecture 19 Turing Machines and Real Life * Reductions Mihai Budiu March 3, 2000.
1 Lecture 10 Proving more specific problems are not recursive Reduction technique –Use subroutine theme to show that if one problem is unsolvable, so is.
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.
CS21 Decidability and Tractability
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
CS355 – The Mathematics and Theory of Computer Science Reducibility.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
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.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
MA/CSSE 474 Theory of Computation Enumerability Reduction.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
SNU OOPSLA Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
Decidability.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
The Acceptance Problem for TMs
Recursively Enumerable Languages
The Halting Problem.
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidable Languages Costas Busch - LSU.
Undecidable problems:
Computability and Complexity
Halting Problem.
Proposed in Turing’s 1936 paper
CSCI 2670 Introduction to Theory of Computing
CS21 Decidability and Tractability
Theory of Computability
Theory of Computability
Instructor: Aaron Roth
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
More undecidable languages
Decidability continued….
Theory of Computability
Algorithms CSCI 235, Spring 2019 Lecture 37 The Halting Problem
Presentation transcript:

Reductions (Section 5.1) Héctor Muñoz-Avila

Summary of Previous Lectures The Halting problem is undecidable: –HALT = { | M is a Turing machine, w   *, M halts on input w} The proof involved a paradox

Proving that Other Problems are Undecidable We use the reductions method –A is reduced into B (written: A ≤ red B) –Implies: deciding B is at least as hard as as deciding A This method requires that we know at least one problem to be undecidable Reductions are also used to prove intractability –E.g., NP-completeness

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A Example?

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A Example 1: when we use software libraries to solve a problem A SolutionA() { } Software library solutionB1() solutionB2() solutionB3()

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A Example 1: when we use software libraries to solve a problem A SolutionA() { … solutionB2() …. } Software library solutionB1() solutionB2() solutionB3()

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A Example 2: How to use a solution of B to solve A if: –A = “find the largest number among an array of integers array[1..n]” –B = “find the smallest number among an array of integers array[1..n]”

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A Example 3: How to use a solution of B to solve A if: –A = “find if there is a zero in an array of integers array[1..n]” –B = “determine the product of all numbers in an array of integers array[1..n]” (e.g., if array[…] contains 2, 3, 7 then the result will be 42.

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A Relations: Assume A is undecidable, is B undecidable? Assume A is decidable, is B decidable? Assume B is decidable, is A decidable? Assume B is undecidable, is A undecidable?

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A If B is decidable Then A is decidable

Intuition A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A If B is decidable Then A is decidable If A is undecidable Then B is undecidable

Example: Dead-Code Problem Given a program P, an input w for P, and a line of code i in P, will P ever execute line I when running with input w?

Example: Dead-Code Problem Given a program P, an input w for P, and a line of code i in P, will P ever execute line I when running with input w? P(w) { if (w == 1) then println(“yes”) else printlin(“no”) }

Example: Dead-Code Problem Given a program P, an input w for P, and a line of code i in P, will P ever execute line I when running with input w? P(w) { Foo() if (w == 1) then println(“yes”) else printlin(“no”) } Foo()

Example: Dead-Code Problem We are going to show HALT ≤ red DEAD-Code Hence, DEAD-Code is undecidable Lets construct a decider M H for HALT assuming a decider M D for DEAD-Code is available

Example: Do-Nothing Problem Given a program P, will P reject every input w?

Example: Do-Nothing Problem Given a program P, will P reject every input w? P(w) { return reject }

Example: Do-Nothing Problem Given a program P, will P reject every input w? P(w) { Foo() return accept } Foo()

Example: Do-Nothing Problem We are going to show HALT ≤ red Do-Nothing Hence, Do-Nothing is undecidable Lets construct a decider M H for HALT assuming a decider M DN for Do-Nothing is available

Summary of the Previous Lecture (I) A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A If B is decidable Then A is decidable If A is undecidable Then B is undecidable

Summary of the Previous Lecture (II) A ≤ red B if I can use a decider for B (assuming one exists) to construct a decider for A Implies: deciding B is at least as hard as as deciding A We proved: HALT ≤ red DEAD-Code HALT ≤ red Do-Nothing Hence, DEAD-Code and Do-Nothing are undecidable

Observations HALT is recognizable Dead-Code is recognizable We can easily proof this Is there a problem that is not recognizable?

Equivalence Given two programs P, P’ are they equivalent? –For every input w, P(w) = P(w’) –For example, if P and P’ return either true or false then: For every input w, P(w) is true iff P(w’) is true

Equivalence Given two programs P, P’ are they equivalent? –For every input w, P(w) = P’(w) The following 2 programs receive as input an array of integers (a[1..n] in the left and A[0..MAXDIN] in the right). Are they equivalent?

Equivalence Given two programs P, P’ are they equivalent? –For every input w, P(w) = P(w’) So what you think is Equivalence decidable?

Equivalence Given two programs P, P’ are they equivalent? –For every input w, P(w) = P(w’) We can prove that HALT ≤ red Equivalence Lets construct a decider M H for HALT assuming a decider M E for Equivalence is available Hence, Equivalence is not decidable As it turns out Equivalence is not even recognizable

HALT ≤ red Equivalence M H :- on input M aux1 :- on input x 1. reject M aux2 :- on input x 1. Run M on input w 2. reject 1. Run M E on 2. if accept then accept else reject

The AI Question Héctor Muñoz-Avila

Informally Can we construct a machine that exhibits “human level” intelligence?

We Certainly Have Come a Long Way Many AI paradigms are constructed from our understanding of how humans think –E.g., case-based reasoning: recall past experiences –Neural networks: simulate connectionism of brain cells

previous cases General Knowledge New Case Problem Retrieved Case New Case Solved Case Tested/Repaired Case Learned Case Jerry’s Knowledge Driving Cases Allentown to NYC? (Allentown, NYC) (Allentown, Jersey City) (Allentown, NYC) (Allentown, Jersey City, NYC) (Allentown, most of the way to JC, using by pass highway, NYC) (Allentown, most of the way to JC, using bypass highway, NYC) Driving from Allentown to NYC? 34

We Certainly Have seen Impressive Examples of Machine’s Capabilities

Impressive But… Could humans “solve” HALT? –E.g., “Crowdsourcing” Humans have been able to solve problems that are difficult for computers

And Now You Understand the Limitations of Computation

What is your opinion?