BU CS 332 Theory of Computation Lecture 16: Reading: Mapping - - PowerPoint PPT Presentation

β–Ά
bu cs 332 theory of computation
SMART_READER_LITE
LIVE PREVIEW

BU CS 332 Theory of Computation Lecture 16: Reading: Mapping - - PowerPoint PPT Presentation

BU CS 332 Theory of Computation Lecture 16: Reading: Mapping Reducibility Sipser Ch 5.3 Mark Bun March 25, 2020 Problems in language theory undecidable decidable decidable


slide-1
SLIDE 1

BU CS 332 – Theory of Computation

Lecture 16:

  • Mapping Reducibility

Reading: Sipser Ch 5.3

Mark Bun March 25, 2020

slide-2
SLIDE 2

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 2

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐔𝐍

?

𝐃𝐆𝐇

?

slide-3
SLIDE 3

Reductions

A reduction from problem to problem is an algorithm for problem which uses an algorithm for problem as a subroutine If such a reduction exists, we say β€œ reduces to ”

3/30/2020 CS332 ‐ Theory of Computation 3

slide-4
SLIDE 4

Reminder: Using reductions to prove undecidability

If reduces to and is undecidable, then is also undecidable Proof template:

  • 1. Suppose to the contrary that

is decidable

  • 2. Using

as a subroutine, construct an algorithm deciding

  • 3. But

is undecidable. Contradiction!

3/30/2020 CS332 ‐ Theory of Computation 4

slide-5
SLIDE 5

Equality Testing for TMs

  • Theorem:

is undecidable

Proof: Suppose for contradiction that there exists a decider for

. We construct a decider for as follows:

On input : 1. Construct TMs

, as follows:

  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject. This is a reduction from

to

  • 3/30/2020

CS332 ‐ Theory of Computation 5

slide-6
SLIDE 6

Equality Testing for TMs

  • Theorem:

is undecidable

Proof: Suppose for contradiction that there exists a decider for

. We construct a decider for as follows:

On input : 1. Construct TMs

, as follows: = =

  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject. This is a reduction from

to

  • 3/30/2020

CS332 ‐ Theory of Computation 6

slide-7
SLIDE 7

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 7

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐃𝐆𝐇

?

slide-8
SLIDE 8

Context‐free language testing for TMs

  • Theorem:

is undecidable

Proof: Suppose for contradiction that there exists a decider for

. We construct a decider for as follows:

On input : 1. Construct a TM as follows:

  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject This is a reduction from

to

  • 3/30/2020

CS332 ‐ Theory of Computation 8

slide-9
SLIDE 9

Context‐free language testing for TMs

  • Theorem:

is undecidable

Proof: Suppose for contradiction that there exists a decider for

. We construct a decider for as follows:

On input : 1. Construct a TM as follows: = β€œOn input ,

  • 1. If
  • accept
  • 2. Run TM
  • n input
  • 3. If

accepts, accept.”

  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject This is a reduction from

to

  • 3/30/2020

CS332 ‐ Theory of Computation 9

slide-10
SLIDE 10

Mapping Reductions

3/30/2020 CS332 ‐ Theory of Computation 10

slide-11
SLIDE 11

What’s wrong with the following β€œproof”? Bogus β€œTheorem”:

is not Turing‐recognizable

Bogus β€œProof”: Suppose for contradiction that there exists a recognizer for

. We construct a recognizer for :

On input :

  • 1. Run
  • n input
  • 2. If

accepts, reject. Otherwise, accept. This sure looks like a reduction from

to

  • 3/30/2020

CS332 ‐ Theory of Computation 11

πŸšͺπŸšͺWarningπŸšͺπŸšͺ

slide-12
SLIDE 12

Mapping Reductions: Motivation

  • 1. How do we formalize the notion of a reduction?
  • 2. How do we use reductions to show that languages are

unrecognizable?

  • 3. How do we protect ourselves from accidentally

β€œproving” bogus theorems about recognizability?

3/30/2020 CS332 ‐ Theory of Computation 12

slide-13
SLIDE 13

Computable Functions

Definition: A function

βˆ— βˆ— is computable if there is a TM

which, given as input any

βˆ—, halts with only

  • n

its tape. Example 1: Example 2: = where is a TM, is a string, and is a TM that ignores its input and simulates running

  • n

3/30/2020 CS332 ‐ Theory of Computation 13

slide-14
SLIDE 14

Mapping Reductions

Definition: Language is mapping reducible to language , written

  • if there is a computable function

βˆ— βˆ— such that for

all strings

βˆ—, we have

3/30/2020 CS332 ‐ Theory of Computation 14

slide-15
SLIDE 15

Decidability

Theorem: If

  • and

is decidable, then is also decidable Proof: Let be a decider for and let

βˆ— βˆ— be a

mapping reduction from to . Construct a decider for as follows: On input :

  • 1. Compute
  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject.

3/30/2020 CS332 ‐ Theory of Computation 15

slide-16
SLIDE 16

Undecidability

Theorem: If

  • and

is decidable, then is also decidable Corollary: If

  • and

is undecidable, then is also undecidable

3/30/2020 CS332 ‐ Theory of Computation 16

slide-17
SLIDE 17

Old Proof: Equality Testing for TMs

  • Theorem:

is undecidable

Proof: Suppose for contradiction that there exists a decider for

. We construct a decider for as follows:

On input : 1. Construct TMs

, as follows: = β€œOn input 𝑦, = β€œOn input 𝑦,

1. Ignore 𝑦

  • 1. Ignore 𝑦 and accept”

2. Run 𝑁 on input π‘₯ 3. If 𝑁 accepts, accept. Otherwise, reject.”

  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject. This is a reduction from

to

  • 3/30/2020

CS332 ‐ Theory of Computation 17

slide-18
SLIDE 18

New Proof: Equality Testing for TMs

  • Theorem:

hence is undecidable

Proof: The following TM computes the reduction: On input : 1. Construct TMs

, as follows: = β€œOn input 𝑦, = β€œOn input 𝑦,

1. Ignore 𝑦

  • 1. Ignore 𝑦 and accept”

2. Run 𝑁 on input π‘₯ 3. If 𝑁 accepts, accept. Otherwise, reject.”

  • 2. Output
  • 3/30/2020

CS332 ‐ Theory of Computation 18

slide-19
SLIDE 19

Mapping Reductions: Recognizability

3/30/2020 CS332 ‐ Theory of Computation 19

Theorem: If

  • and

is recognizable, then is also recognizable Proof: Let be a recognizer for and let

βˆ— βˆ— be a

mapping reduction from to . Construct a recognizer for as follows: On input :

  • 1. Compute
  • 2. Run
  • n input
  • 3. If

accepts, accept. Otherwise, reject.

slide-20
SLIDE 20

Unrecognizability

Theorem: If

  • and

is recognizable, then is also recognizable Corollary: If

  • and

is unrecognizable, then is also unrecognizable Corollary: If

  • , then

is unrecognizable

3/30/2020 CS332 ‐ Theory of Computation 20

slide-21
SLIDE 21

Recognizability and

3/30/2020 CS332 ‐ Theory of Computation 21

slide-22
SLIDE 22

Consequences of

  • 1. Since

is undecidable, is also undecidable

2.

  • implies
  • Since

is unrecognizable, is unrecognizable

3/30/2020 CS332 ‐ Theory of Computation 22

slide-23
SLIDE 23

itself is also unrecognizable

3/30/2020 CS332 ‐ Theory of Computation 23

  • Theorem: 𝐡

hence is unrecognizable

Proof: The following TM computes the reduction: On input : 1. Construct TMs

, as follows: = β€œOn input 𝑦, = β€œOn input 𝑦,

1. Ignore 𝑦

  • 1. Ignore 𝑦 and accept”

2. Run 𝑁 on input π‘₯ 3. If 𝑁 accepts, accept. Otherwise, reject.”

  • 2. Output
slide-24
SLIDE 24

More on Reductions and Undecidability

3/30/2020 CS332 ‐ Theory of Computation 24

slide-25
SLIDE 25

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 25

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐃𝐆𝐇

?

slide-26
SLIDE 26

is undecidable

  • βˆ—

Theorem:

  • hence

is undecidable

Proof idea: β€œComputation history method”

On input : 1. Construct a CFG such that:

βˆ—

does not accept

  • 2. Output

3/30/2020 CS332 ‐ Theory of Computation 26

slide-27
SLIDE 27

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 27

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐃𝐆𝐇

decidable

𝐄𝐆𝐁

decidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐔𝐍

undecidable

𝐃𝐆𝐇

undecidable

slide-28
SLIDE 28

Undecidable problems outside language theory

Post Correspondence Problem (PCP):

3/30/2020 CS332 ‐ Theory of Computation 28

Domino:

  • . Top and bottom are strings.

Input: Collection of dominos. Match: List of some of the input dominos (repetitions allowed) where top = bottom Problem: Does a match exist? This is undecidable