+ All Categories
Home > Documents > Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun...

Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun...

Date post: 30-May-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
28
BU CS 332 – Theory of Computation Lecture 16: Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020
Transcript
Page 1: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

BU CS 332 – Theory of Computation

Lecture 16:• Mapping Reducibility Reading:

Sipser Ch 5.3

Mark BunMarch 25, 2020

Page 2: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 2

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐓𝐌?

𝐂𝐅𝐆?

Page 3: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

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

Page 4: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

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 decidable2. Using  as a subroutine, construct an algorithm 

deciding 3. But  is undecidable. Contradiction!

3/30/2020 CS332 ‐ Theory of Computation 4

Page 5: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Equality Testing for TMs

Theorem:  is undecidableProof: 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  on input 3. If  accepts, accept. Otherwise, reject.

This is a reduction from  to 3/30/2020 CS332 ‐ Theory of Computation 5

Page 6: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Equality Testing for TMs

Theorem:  is undecidableProof: 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  on input 3. If  accepts, accept. Otherwise, reject.

This is a reduction from  to 3/30/2020 CS332 ‐ Theory of Computation 6

Page 7: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 7

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐂𝐅𝐆?

Page 8: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Context‐free language testing for TMs

Theorem:  is undecidableProof: 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  on input 3. If  accepts, accept. Otherwise, reject

This is a reduction from  to 3/30/2020 CS332 ‐ Theory of Computation 8

Page 9: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Context‐free language testing for TMs

Theorem:  is undecidableProof: 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  accept2. Run TM  on input 3. If  accepts, accept.”

2. Run  on input 3. If  accepts, accept. Otherwise, reject

This is a reduction from  to 3/30/2020 CS332 ‐ Theory of Computation 9

Page 10: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Mapping Reductions

3/30/2020 CS332 ‐ Theory of Computation 10

Page 11: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

What’s wrong with the following “proof”?Bogus “Theorem”:  is not Turing‐recognizableBogus “Proof”: Suppose for contradiction that there exists arecognizer  for  . We construct a recognizer for  :

On input  :1. Run  on input 2. If  accepts, reject. Otherwise, accept.

This sure looks like a reduction from  to 3/30/2020 CS332 ‐ Theory of Computation 11

🚩🚩Warning🚩🚩

Page 12: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

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

Page 13: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Computable FunctionsDefinition:A function  ∗ ∗ is computable if there is a TM which, given as input any  ∗, halts with only  on its tape.

Example 1: 

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

3/30/2020 CS332 ‐ Theory of Computation 13

Page 14: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Mapping ReductionsDefinition: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

Page 15: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

DecidabilityTheorem: 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  on input 3. If  accepts, accept. Otherwise, reject.

3/30/2020 CS332 ‐ Theory of Computation 15

Page 16: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

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

Page 17: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Old Proof: Equality Testing for TMs

Theorem:  is undecidableProof: 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  on input 3. If  accepts, accept. Otherwise, reject.

This is a reduction from  to 3/30/2020 CS332 ‐ Theory of Computation 17

Page 18: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

New Proof: Equality Testing for TMs

Theorem:  hence  is undecidableProof: 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

Page 19: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

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 recognizerfor  as follows:

On input  :1. Compute 2. Run  on input 3. If  accepts, accept. Otherwise, reject.

Page 20: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

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

Page 21: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Recognizability and 

3/30/2020 CS332 ‐ Theory of Computation 21

Page 22: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Consequences of 

1. Since  is undecidable,  is also undecidable

2. implies Since  is unrecognizable,  is unrecognizable

3/30/2020 CS332 ‐ Theory of Computation 22

Page 23: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

itself is also unrecognizable

3/30/2020 CS332 ‐ Theory of Computation 23

Theorem: 𝐴 hence  is unrecognizableProof: 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

Page 24: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

More on Reductions and Undecidability

3/30/2020 CS332 ‐ Theory of Computation 24

Page 25: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 25

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐂𝐅𝐆?

Page 26: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

is undecidable

Theorem:  hence  is undecidableProof idea: “Computation history method”On input  :1. Construct a CFG  such that:

∗ does not accept 

2. Output3/30/2020 CS332 ‐ Theory of Computation 26

Page 27: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Problems in language theory

3/30/2020 CS332 ‐ Theory of Computation 27

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐂𝐅𝐆decidable

𝐃𝐅𝐀decidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐓𝐌undecidable

𝐂𝐅𝐆undecidable

Page 28: Lecture 16 - cs-people.bu.eduLecture 16: • Mapping Reducibility Reading: Sipser Ch 5.3 Mark Bun March 25, 2020. Problems in language theory 3/30/2020 CS332 ‐Theory of Computation

Undecidable problems outside language theoryPost 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


Recommended