Transcript
Page 1: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 1

Reducibility

Page 2: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 2

Problem is reduced to problemA B

If we can solve problem thenwe can solve problem

BA

B

A

Page 3: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 3

If is undecidable then is undecidable

If is decidable then is decidableB A

A B

Problem is reduced to problemA B

Page 4: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 4

Example: the halting problem

is reduced to

the state-entry problem

Page 5: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 5

The state-entry problem

Inputs: M•Turing Machine

•State q

Question: Does M

•Stringw

enter state q

on input ?w

Page 6: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 6

Theorem:

The state-entry problem is undecidable

Proof: Reduce the halting problem to

the state-entry problem

Page 7: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 7

state-entryproblem decider

M

w

q

YES

NO

entersM q

doesn’t enterM q

Suppose we have a Deciderfor the state-entry algorithm:

Page 8: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 8

Halting problemdecider

M

w

YES

NO

halts onM w

doesn’t halt onM w

We want to build a deciderfor the halting problem:

Page 9: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 9

M qw

State-entryproblemdecider

Halting problem decider

YES

NO

YES

NO

M

w

We want to reduce the halting problem tothe state-entry problem:

Page 10: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 10

M qw

Halting problem decider

YES

NO

YES

NO

M

w

ConvertInputs ?

We need to convert one problem instanceto the other problem instance

State-entryproblemdecider

Page 11: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 11

Convert to :M

•Add new state q

•From any halting state of add transitions to q

M q

halting statesSinglehalt state

M

M

M

Page 12: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 12

M halts on input

M halts on state on input q

if and only if

w

w

Page 13: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 13

Generate

M M

w

M qw

Halting problem decider

YES

NO

YES

NO

State-entryproblemdecider

Page 14: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 14

Since the halting problem is undecidable,the state-entry problem is undecidable

END OF PROOF

We reduced the halting problemto the state-entry problem

Page 15: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 15

Another example:

the halting problem

is reduced to

the blank-tape halting problem

Page 16: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 16

The blank-tape halting problem

Input: MTuring Machine

Question: Does M halt when started with

a blank tape?

Page 17: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 17

Theorem:

Proof:Reduce the halting problem to the

blank-tape halting problem

The blank-tape halting problem is undecidable

Page 18: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 18

blank-tape halting problemdecider

M

YES

NO

halts onblank tape

M

doesn’t halton blank tape

M

Suppose we have a decider for the blank-tape halting problem:

Page 19: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 19

halting problemdecider

M

w

YES

NO

halts onM w

doesn’t halt onM w

We want to build a deciderfor the halting problem:

Page 20: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 20

M

w

Blank-tapehalting problemdecider

Halting problem decider

YES

NOwM

YES

NO

We want to reduce the halting problem tothe blank-tape halting problem:

Page 21: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 21

M

w

Blank-tapehalting problemdecider

Halting problem decider

YES

NOwM

YES

NO

We need to convert one problem instanceto the other problem instance

ConvertInputs ?

Page 22: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 22

wMConstruct a new machine

• When started on blank tape, writesw

• Then continues execution like M

wM

Mthen write w

step 1 step2

if blank tape executewith input w

Page 23: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 23

M halts on input string

wM halts when started with blank tape

if and only if

w

Page 24: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 24

Generate

wMM

w

blank-tapehalting problemdecider

Halting problem decider

YES

NOwM

YES

NO

Page 25: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 25

Since the halting problem is undecidable,the blank-tape halting problem is undecidable

END OF PROOF

We reduced the halting problemto the blank-tape halting problem

Page 26: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 26

Does machine halt on input ?

Summary of Undecidable Problems

Halting Problem:

M w

Membership problem:

Does machine accept string ?M w

Page 27: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 27

Does machine enter state on input ?

Does machine halt when startingon blank tape?

Blank-tape halting problem:

M

State-entry Problem:

Mw

q

Page 28: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 28

Uncomputable Functions

Page 29: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 29

Uncomputable Functions

A function is uncomputable if it cannotbe computed for all of its domain

Domain Valuesregion

f

Page 30: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 30

An uncomputable function:

)(nfmaximum number of moves untilany Turing machine with stateshalts when started with the blank tape

n

Page 31: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 31

Theorem:Function is uncomputable)(nf

Proof:

Then the blank-tape halting problem is decidable

Assume for contradiction that is computable)(nf

Page 32: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 32

Decider for blank-tape halting problem:

Input: machineM

1. Count states of : M m

2. Compute )(mf

3. Simulate for steps starting with empty tape

M )(mf

If halts then return YES otherwise return NO

M

Page 33: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 33

Therefore, the blank-tape haltingproblem is decidable

However, the blank-tape haltingproblem is undecidable

Contradiction!!!

Page 34: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 34

Therefore, function in uncomputable)(nf

END OF PROOF

Page 35: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 35

Undecidable Problems for

Recursively Enumerable Languages

Page 36: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 36

• is empty?L

L• is finite?

L• contains two different strings of the same length?

Take a recursively enumerable language L

Decision problems:

All these problems are undecidable

Page 37: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 37

Theorem:

For any recursively enumerable language Lit is undecidable to determine whether is empty L

Proof:

We will reduce the membership problemto this problem

Page 38: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 38

empty languageproblemdecider

M

YES

NO

Suppose we have a decider for theempty language problem:

Let be the TM withM

)(ML

)(ML

empty

not empty

LML )(

Page 39: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 39

membershipproblemdecider

M

w

YES

NO

acceptsM w

rejectsM w

We will build the decider for the membership problem:

Page 40: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 40

YES

NO

M

w

NO

YES

Membership problem decider

wM empty languageproblemdecider

We want to reduce the membership problem tothe empty language problem:

Page 41: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 41

YES

NO

M

w

NO

YES

Membership problem decider

wM empty languageproblemdecider

We need to convert one problem instanceto the other problem instance

Convertinputs ?

Page 42: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 42

Construct machine : wM

When enters a final state, compare with w

M

Accept only if ws

wM executes the same as with M

On arbitrary input strings

s

Page 43: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 43

Lw

)( wML is not empty

if and only if

}{)( wML w

Page 44: Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Courtesy Costas Busch - RPI 44

construct

wM

YES

NO

M

w

NO

YES

Membership problem decider

wM

END OF PROOF

empty languageproblemdecider


Top Related