1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

39
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    221
  • download

    2

Transcript of 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Page 1: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

1

Introduction to Computability Theory

Lecture13: Mapping Reductions

Prof. Amos Israeli

Page 2: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

So far, we presented several reductions:

From to , from to , from to , from to , and several other.

Each of these reductions had some special form not shared with the others. Can we generalize?

Mapping Reductions

2

TMHALTTMA

TMREGULARTMA TMEQTME

TMHALT TMA

Page 3: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Mapping reductions constitute the generalization we are looking for. They are always in a specified form which:

1. Preserves the intrinsic difficulty of finding a reduction.

2. Ease the “red tape” requirements.

Mapping Reductions

3

Page 4: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

In other words: Assume we want to prove that B is undecidable by reduction from A that is known to be undecidable.

If our reduction has the form of a Mapping reduction then the proof is complete. Nothing else is required.

Mapping Reductions

4

Page 5: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

The idea of a mapping reduction is very simple: If the instances (candidate elements) of one language, say A, are mapped to the instances of another language, say B, by a computable mapping M in a way that iff , then a decider for B can be used to devise a decider for A.

Mapping Reductions

5

AI BIM

Page 6: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

The sought for decider for A works as follows:

Upon input I do:

1. Compute .

2. Use the decider for B to determine whether .

3. If accept - otherwise - reject.

Mapping Reductions

6

IM

BIM

BIM

Page 7: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

This scheme works but there is one delicate point here. Can you see where it is?

The mapping must be computable.

Given the input I, your ordinary Turing machine must be able to compute .

For this we need the notion of Computable Functions.

Mapping Reductions

7

IM

IM

Page 8: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Let be an alphabet: A function is a computable function if there exists a TM, M such that for every , if M computes with input w, it halts with on its tape.

Computable Functions

8

**: f

*w

wf

Page 9: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

1. Let m and n be natural numbers, let be a string encoding of m and n, and let be the string representing their sum. The function , is computable.

2. The function is a computable function.

Can you devise TM-s to compute f and g?

Examples of Computable Functions

9

nmnmf ,

rwwg

nm,

nm

Page 10: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

3. Let be an encoding of TM M and let be an encoding of another TM M’ satisfying:1. .2. TM M’ never makes four consecutive steps in the same head direction.The function t defined below is computable:

Examples of Computable Functions

10

M

'MLML

TM any of ecodingnot is if

TM of ecoding an is if '

M

MMMMt

'M

Page 11: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

In the reduction from to - TM M from the input to was modified by TM S, the decider to TM s.t. all ending computations on M would become accepting computations on .

Since was carried out by TM S, it is obviously a computable function.

Use of Comp. Func. for Reductions

11

1M

wM ,

TMHALT TMA

TMHALT

1M

1MMf

Page 12: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Another example is the reduction from to - TM M from the input to , was modified by TM S, to TM s.t. is regular iff . Once again, this is a computable function.

Now we turn to define mapping reductions:

Use of Comp. Func. for Reductions

12

2M

TMAwM ,

TMA

TMREGULAR

TMA

2ML

wM ,

Page 13: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Let A and B be two languages over . A computable function is a mapping reduction from A to B if the following holds: For each , iff . The function f is called reduction of A to B. The arguments of the reduction are often called instances.

Mapping Reductions

13

**: f

*

AI *I BIf

Page 14: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If there exists a mapping reduction from A to B, We say that A is mapping reducible to B and denote it by .

A pictorial illustration of a mapping reduction appears in the next slide.

Mapping Reductions

14

BA m

Page 15: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

.

A Pictorial Illustration of_______

15

BA f

A

A Af

Af

f

Page 16: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Assume that .

Can we say something about the relationship between and ?

Answer: Yes

An Observation about__and_____

16

A

A Af

Af

f

A B

A B

BA m

BA m

Page 17: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If language A is mapping reducible to language B, then a solution for B, can be used to derive a solution for A. This fact is made formal in the following theorem:

Using Mapping Reductions

17

Page 18: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If and B is decidable, then A is decidable.

Theorem

18

BA m

Page 19: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Let M be a decider for B and let f be the reduction from A to B. Consider TM N:

N=“On input w :

1. Compute .

2. Run M on and output whatever M outputs. “

Clearly N accepts iff . QED

Proof

19

wf

wf

Bw

Page 20: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If and A is undecidable, then B is undecidable.

Corollary

20

BA m

Page 21: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

The previous corollary is our main tool for proving undecidability.

Notice that in order to prove B undecidable we reduce from A which is known to be undecidable to B. The reduction direction is often a source of errors.

A similar tool is used in Complexity theory.

Discussion

21

Page 22: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

On the previous lecture we proved that

is undecidable.

Now, we prove this theorem once more by demonstrating a mapping reduction from to .

Revisited

22

wMwMHALTTM on haltsTM that a is ,

TMHALTTMA

TMHALT

Page 23: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Theorem

The language

Is undecidable.

Revisited

23

TMHALT

wMwMHALTTM on haltsTM that a is ,

Page 24: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Proof

The proof is by reduction from . In the next slide we show that . By the previous corollary it follows that is undecidable.

Revisited

24

TMmTM HALTA TMA

TMHALT

TMHALT

Page 25: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

The mapping reduction is presented by TM F :

F=“On input :

1. Construct TM M’ .

M’=“On input x:

1. Run M on x.

2. if M accepts accept.

3. If M rejects, enter a loop.”

2. Output .”

Mapping Reduction from to__

25

wM ,

wM ,'

TMHALTTMA

Page 26: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

It is not hard to see that iff . In other words: . Since is undecidable, the previous corollary implies that is undecidable too.

Proof (cont.)

26

TMAwM ,

TMHALTwM ,'

TMmTM HALTA TMA

TMHALT

Page 27: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

What happens if the input does not contain a valid description of a TM?

By the specification of we know that in this case . Therefore in this case TM F should output any string s satisfying .

The Halting Problem Revisited

27

wM ,

TMA

TMAwM ,

TMHALTs

Page 28: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Theorem

The language

Is undecidable.

Revisited

28

TMEQ

NLMLNMNMEQTM and s-TM are and ,

Page 29: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Proof

The proof is by reduction from which is known to be undecidable. In the next slide we show that . By the previous corollary it follows that is undecidable.

Revisited

29

TMmTM EQE

TME

TMEQ

TMHALT

Page 30: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Let be an encoding of a TM that rejects all its inputs. The mapping f is defined as follows:

For each instance of , , .

It is not hard to verify that

Meaning: . QED

Mapping Reduction from to__

30

M

rMLMLML

TMEQTME

rM

TME rMMMf ,

TMrTM EQMMEM ,

Page 31: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If and B is Turing recognizable, then A is Turing recognizable.

Theorem

31

BA m

Page 32: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Let M be a decider for B and let f be the reduction from A to B. Consider TM N:

N=“On input w :

1. Compute .

2. Run M on and output whatever M outputs.”

Clearly N accepts iff . QED

Proof

32

wf

wf

Bw

Turing Recognizer

N recognizes B.

- if M halts,

Page 33: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If and A is not Turing recognizable, then B is not Turing recognizable.

Corollary

33

BA m

Page 34: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Theorem

is neither Turing recognizable nor co-Turing recognizable.

Reminder

A language L is co-Turing recognizable if its complement, , is Turing recognizable.

The Status of______

34

TMEQ

TMEQ

L

Page 35: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

If by a mapping f, then by the same mapping it holds that . Since we know that is not Turing recognizable, we can prove that language A is not Turing recognizable by reducing to .

Proof

35

TMA A

BA m

BA m

TMA

Page 36: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Now we use the previous remark and prove that is not Turing recognizable, by showing that .

Since , we conclude that and since we know that is not Turing recognizable we conclude that so is .

Proof

36

TMEQ

TMMTM EQA

TMMTM EQA

TMMTM EQA TMA

TMEQ

Page 37: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

F=“ on input , where M is a TM:

1. Construct that accepts on any input and

that accepts if M accepts w.

2. Output .

It is not hard to see that F computes a reduction from to .

Proof

37

1M

TMA TMEQ

wM ,

2M

21, MM

Page 38: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

G=“ on input , where M is a TM:

1. Construct that rejects on any input and that accepts if M accepts w.

2. Output .

It is not hard to see that G computes a reduction from to .

Proof

38

1M

TMA TMEQ

wM ,

2M

21, MM

Page 39: 1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.

Since we conclude that is not Turing recognizable.

Since we conclude that is not co-Turing recognizable, hence is not Turing recognizable.

QED

Proof

39

TMEQTMMTM EQA

TMMTM EQA TMEQ

TMTM EQEQ