Undecidability II: More problems via reductions Lecture 21 - - PowerPoint PPT Presentation

undecidability ii more problems via reductions
SMART_READER_LITE
LIVE PREVIEW

Undecidability II: More problems via reductions Lecture 21 - - PowerPoint PPT Presentation

Algorithms & Models of Computation CS/ECE 374, Spring 2019 Undecidability II: More problems via reductions Lecture 21 Thursday, April 4, 2019 L A T EXed: December 27, 2018 08:26 Chan, Har-Peled, Hassanieh (UIUC) CS374 1 Spring 2019


slide-1
SLIDE 1

Algorithms & Models of Computation

CS/ECE 374, Spring 2019

Undecidability II: More problems via reductions

Lecture 21

Thursday, April 4, 2019

L

A

T EXed: December 27, 2018 08:26 Chan, Har-Peled, Hassanieh (UIUC) CS374 1 Spring 2019 1 / 29

slide-2
SLIDE 2

Turing machines...

TM = Turing machine = program.

Chan, Har-Peled, Hassanieh (UIUC) CS374 2 Spring 2019 2 / 29

slide-3
SLIDE 3

Reminder: Undecidability

Defjnition 1

Language L ⊆ Σ∗ is undecidable if no program P, given w ∈ Σ∗ as input, can always stop and output whether w ∈ L or w / ∈ L. (Usually defjned using TM not programs. But equivalent.

Chan, Har-Peled, Hassanieh (UIUC) CS374 3 Spring 2019 3 / 29

slide-4
SLIDE 4

Reminder: Undecidability

Defjnition 1

Language L ⊆ Σ∗ is undecidable if no program P, given w ∈ Σ∗ as input, can always stop and output whether w ∈ L or w / ∈ L. (Usually defjned using TM not programs. But equivalent.

Chan, Har-Peled, Hassanieh (UIUC) CS374 3 Spring 2019 3 / 29

slide-5
SLIDE 5

Reminder: Undecidability

Defjnition 1

Language L ⊆ Σ∗ is undecidable if no program P, given w ∈ Σ∗ as input, canalways stop and

  • utput whether w ∈ L or w /

∈ L. (Usually defjned using TM not programs. But equivalent.

Chan, Har-Peled, Hassanieh (UIUC) CS374 3 Spring 2019 3 / 29

slide-6
SLIDE 6

Reminder: The following language is undecidable

Decide if given a program M, and an input w, does M accepts w. Formally, the corresponding language is ATM =

  • M, w
  • M is a TM and M accepts w
  • .

Defjnition 2

A decider for a language L, is a program (or a TM) that always stops, and outputs for any input string w ∈ Σ∗ whether or not w ∈ L. A language that has a decider is decidable. Turing proved the following:

Theorem 3

ATM is undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 4 Spring 2019 4 / 29

slide-7
SLIDE 7

Reminder: The following language is undecidable

Decide if given a program M, and an input w, does M accepts w. Formally, the corresponding language is ATM =

  • M, w
  • M is a TM and M accepts w
  • .

Defjnition 2

A decider for a language L, is a program (or a TM) that always stops, and outputs for any input string w ∈ Σ∗ whether or not w ∈ L. A language that has a decider is decidable. Turing proved the following:

Theorem 3

ATM is undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 4 Spring 2019 4 / 29

slide-8
SLIDE 8

Reminder: The following language is undecidable

Decide if given a program M, and an input w, does M accepts w. Formally, the corresponding language is ATM =

  • M, w
  • M is a TM and M accepts w
  • .

Defjnition 2

A decider for a language L, is a program (or a TM) that always stops, and outputs for any input string w ∈ Σ∗ whether or not w ∈ L. A language that has a decider is decidable. Turing proved the following:

Theorem 3

ATM is undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 4 Spring 2019 4 / 29

slide-9
SLIDE 9

Part I Reductions

Chan, Har-Peled, Hassanieh (UIUC) CS374 5 Spring 2019 5 / 29

slide-10
SLIDE 10

Reduction

Meta defjnition: Problem A reduces to problem B, if given a solution to B, then it implies a solution for A. Namely, we can solve B then we can solve A. We will done this by A = ⇒ B.

Defjnition 4

  • racle ORAC for language L is a function that receives as a word

w, returns TRUE ⇐ ⇒ w ∈ L.

Defjnition 5

A language X reduces to a language Y, if one can construct a TM decider for X using a given oracle ORACY for Y. We will denote this fact by X = ⇒ Y.

Chan, Har-Peled, Hassanieh (UIUC) CS374 6 Spring 2019 6 / 29

slide-11
SLIDE 11

Reduction

Meta defjnition: Problem A reduces to problem B, if given a solution to B, then it implies a solution for A. Namely, we can solve B then we can solve A. We will done this by A = ⇒ B.

Defjnition 4

  • racle ORAC for language L is a function that receives as a word

w, returns TRUE ⇐ ⇒ w ∈ L.

Defjnition 5

A language X reduces to a language Y, if one can construct a TM decider for X using a given oracle ORACY for Y. We will denote this fact by X = ⇒ Y.

Chan, Har-Peled, Hassanieh (UIUC) CS374 6 Spring 2019 6 / 29

slide-12
SLIDE 12

Reduction

Meta defjnition: Problem A reduces to problem B, if given a solution to B, then it implies a solution for A. Namely, we can solve B then we can solve A. We will done this by A = ⇒ B.

Defjnition 4

  • racle ORAC for language L is a function that receives as a word

w, returns TRUE ⇐ ⇒ w ∈ L.

Defjnition 5

A language X reduces to a language Y, if one can construct a TM decider for X using a given oracle ORACY for Y. We will denote this fact by X = ⇒ Y.

Chan, Har-Peled, Hassanieh (UIUC) CS374 6 Spring 2019 6 / 29

slide-13
SLIDE 13

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-14
SLIDE 14

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-15
SLIDE 15

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-16
SLIDE 16

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-17
SLIDE 17

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-18
SLIDE 18

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-19
SLIDE 19

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-20
SLIDE 20

Reduction proof technique

1

B: Problem/language for which we want to prove undecidable.

2

Proof via reduction. Result in a proof by contradiction.

3

L: language of B.

4

Assume L is decided by TM M.

5

Create a decider for known undecidable problem A using M.

6

Result in decider for A (i.e., ATM).

7

Contradiction A is not decidable.

8

Thus, L must be not decidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 7 Spring 2019 7 / 29

slide-21
SLIDE 21

Reduction implies decidability

Lemma 6

Let X and Y be two languages, and assume that X = ⇒ Y. If Y is decidable then X is decidable.

Proof.

Let T be a decider for Y (i.e., a program or a TM). Since X reduces to Y, it follows that there is a procedure TX|Y (i.e., decider) for X that uses an oracle for Y as a subroutine. We replace the calls to this oracle in TX|Y by calls to T. The resulting program TX is a decider and its language is X. Thus X is decidable (or more formally TM decidable).

Chan, Har-Peled, Hassanieh (UIUC) CS374 8 Spring 2019 8 / 29

slide-22
SLIDE 22

The countrapositive...

Lemma 7

Let X and Y be two languages, and assume that X = ⇒ Y. If X is undecidable then Y is undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 9 Spring 2019 9 / 29

slide-23
SLIDE 23

Part II Halting

Chan, Har-Peled, Hassanieh (UIUC) CS374 10 Spring 2019 10 / 29

slide-24
SLIDE 24

The halting problem

Language of all pairs M, w such that M halts on w: AHalt =

  • M, w
  • M is a TM and M stops on w
  • .

Similar to language already known to be undecidable: ATM =

  • M, w
  • M is a TM and M accepts w
  • .

Chan, Har-Peled, Hassanieh (UIUC) CS374 11 Spring 2019 11 / 29

slide-25
SLIDE 25

The halting problem

Language of all pairs M, w such that M halts on w: AHalt =

  • M, w
  • M is a TM and M stops on w
  • .

Similar to language already known to be undecidable: ATM =

  • M, w
  • M is a TM and M accepts w
  • .

Chan, Har-Peled, Hassanieh (UIUC) CS374 11 Spring 2019 11 / 29

slide-26
SLIDE 26

On way to proving that Halting is undecidable...

Lemma 8

The language ATM reduces to AHalt. Namely, given an oracle for AHalt one can build a decider (that uses this oracle) for ATM.

Chan, Har-Peled, Hassanieh (UIUC) CS374 12 Spring 2019 12 / 29

slide-27
SLIDE 27

On way to proving that Halting is undecidable...

Proof of lemma

Proof.

Let ORACHalt be the given oracle for AHalt. We build the following decider for ATM.

Decider-ATM

  • M, w
  • res ← ORACHalt
  • M, w
  • // if M does not halt on w then reject.

if res = reject then

halt and reject. // M halts on w since res =accept. // Simulating M on w terminates in finite time. res2 ←Simulate M on w.

return res2.

This procedure always return and as such its a decider for ATM.

Chan, Har-Peled, Hassanieh (UIUC) CS374 13 Spring 2019 13 / 29

slide-28
SLIDE 28

The Halting problem is not decidable

Theorem 9

The language AHalt is not decidable.

Proof.

Assume, for the sake of contradiction, that AHalt is decidable. As such, there is a TM, denoted by TMHalt, that is a decider for

  • AHalt. We can use TMHalt as an implementation of an oracle for

AHalt, which would imply by Lemma 8 that one can build a decider for ATM. However, ATM is undecidable. A contradiction. It must be that AHalt is undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 14 Spring 2019 14 / 29

slide-29
SLIDE 29

The same proof by fjgure...

M, w M, w TMHalt Simulate M

  • n w

accept reject reject accept reject reject Turing machine for ATM accept

... if AHalt is decidable, then ATM is decidable, which is impossible.

Chan, Har-Peled, Hassanieh (UIUC) CS374 15 Spring 2019 15 / 29

slide-30
SLIDE 30

Part III Emptiness

Chan, Har-Peled, Hassanieh (UIUC) CS374 16 Spring 2019 16 / 29

slide-31
SLIDE 31

The language of empty languages

1

ETM =

  • M
  • M is a TM and L(M) = ∅
  • .

2

TMETM: Assume we are given this decider for ETM.

3

Need to use TMETM to build a decider for ATM.

4

Decider for ATM is given M and w and must decide whether M accepts w.

5

Restructure question to be about Turing machine having an empty language.

6

Somehow make the second input (w) disappear.

7

Idea: hard-code w into M, creating a TM Mw which runs M

  • n the fjxed string w.

8

TM Mw:

1

Input = x (which will be ignored)

2

Simulate M on w.

3

If the simulation accepts, accept. If the simulation rejects, reject.

Chan, Har-Peled, Hassanieh (UIUC) CS374 17 Spring 2019 17 / 29

slide-32
SLIDE 32

The language of empty languages

1

ETM =

  • M
  • M is a TM and L(M) = ∅
  • .

2

TMETM: Assume we are given this decider for ETM.

3

Need to use TMETM to build a decider for ATM.

4

Decider for ATM is given M and w and must decide whether M accepts w.

5

Restructure question to be about Turing machine having an empty language.

6

Somehow make the second input (w) disappear.

7

Idea: hard-code w into M, creating a TM Mw which runs M

  • n the fjxed string w.

8

TM Mw:

1

Input = x (which will be ignored)

2

Simulate M on w.

3

If the simulation accepts, accept. If the simulation rejects, reject.

Chan, Har-Peled, Hassanieh (UIUC) CS374 17 Spring 2019 17 / 29

slide-33
SLIDE 33

Embedding strings...

1

Given program M and input w...

2

...can output a program Mw.

3

The program Mw simulates M on w. And accepts/rejects accordingly.

4

EmbedString(M, w) input two strings M and w, and

  • utput a string encoding (TM) Mw.

5

What is L(Mw)?

6

Since Mw ignores input x.. language Mw is either Σ∗ or ∅. It is Σ∗ if M accepts w, and it is ∅ if M does not accept w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 18 Spring 2019 18 / 29

slide-34
SLIDE 34

Embedding strings...

1

Given program M and input w...

2

...can output a program Mw.

3

The program Mw simulates M on w. And accepts/rejects accordingly.

4

EmbedString(M, w) input two strings M and w, and

  • utput a string encoding (TM) Mw.

5

What is L(Mw)?

6

Since Mw ignores input x.. language Mw is either Σ∗ or ∅. It is Σ∗ if M accepts w, and it is ∅ if M does not accept w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 18 Spring 2019 18 / 29

slide-35
SLIDE 35

Embedding strings...

1

Given program M and input w...

2

...can output a program Mw.

3

The program Mw simulates M on w. And accepts/rejects accordingly.

4

EmbedString(M, w) input two strings M and w, and

  • utput a string encoding (TM) Mw.

5

What is L(Mw)?

6

Since Mw ignores input x.. language Mw is either Σ∗ or ∅. It is Σ∗ if M accepts w, and it is ∅ if M does not accept w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 18 Spring 2019 18 / 29

slide-36
SLIDE 36

Emptiness is undecidable

Theorem 10

The language ETM is undecidable.

1

Assume (for contradiction), that ETM is decidable.

2

TMETM be its decider.

3

Build decider AnotherDecider-ATM for ATM: AnotherDecider-ATM(M, w) Mw ← EmbedString (M, w) r ← TMETM(Mw).

if r = accept then return reject

// TMETM(Mw) rejected its input

return accept

Chan, Har-Peled, Hassanieh (UIUC) CS374 19 Spring 2019 19 / 29

slide-37
SLIDE 37

Emptiness is undecidable...

Proof continued

Consider the possible behavior of AnotherDecider-ATM on the input M, w. If TMETM accepts Mw, then L(Mw) is empty. This implies that M does not accept w. As such, AnotherDecider-ATM rejects its input M, w. If TMETM accepts Mw, then L(Mw) is not empty. This implies that M accepts w. So AnotherDecider-ATM accepts M, w. = ⇒ AnotherDecider-ATM is decider for ATM. But ATM is undecidable... ...must be assumption that ETM is decidable is false.

Chan, Har-Peled, Hassanieh (UIUC) CS374 20 Spring 2019 20 / 29

slide-38
SLIDE 38

Emptiness is undecidable...

Proof continued

Consider the possible behavior of AnotherDecider-ATM on the input M, w. If TMETM accepts Mw, then L(Mw) is empty. This implies that M does not accept w. As such, AnotherDecider-ATM rejects its input M, w. If TMETM accepts Mw, then L(Mw) is not empty. This implies that M accepts w. So AnotherDecider-ATM accepts M, w. = ⇒ AnotherDecider-ATM is decider for ATM. But ATM is undecidable... ...must be assumption that ETM is decidable is false.

Chan, Har-Peled, Hassanieh (UIUC) CS374 20 Spring 2019 20 / 29

slide-39
SLIDE 39

Emptiness is undecidable...

Proof continued

Consider the possible behavior of AnotherDecider-ATM on the input M, w. If TMETM accepts Mw, then L(Mw) is empty. This implies that M does not accept w. As such, AnotherDecider-ATM rejects its input M, w. If TMETM accepts Mw, then L(Mw) is not empty. This implies that M accepts w. So AnotherDecider-ATM accepts M, w. = ⇒ AnotherDecider-ATM is decider for ATM. But ATM is undecidable... ...must be assumption that ETM is decidable is false.

Chan, Har-Peled, Hassanieh (UIUC) CS374 20 Spring 2019 20 / 29

slide-40
SLIDE 40

Emptiness is undecidable via diagram

M, w EmbedString accept reject accept reject AnotherDecider-ATM Mw TMETM

AnotherDecider-ATM never actually runs the code for Mw. It hands the code to a function TMETM which analyzes what the code would do if run it. So it does not matter that Mw might go into an infjnite loop.

Chan, Har-Peled, Hassanieh (UIUC) CS374 21 Spring 2019 21 / 29

slide-41
SLIDE 41

Part IV Equality

Chan, Har-Peled, Hassanieh (UIUC) CS374 22 Spring 2019 22 / 29

slide-42
SLIDE 42

Equality is undecidable

EQTM =

  • M, N
  • M and N are TM’s and L(M) = L(N)
  • .

Lemma 11

The language EQTM is undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 23 Spring 2019 23 / 29

slide-43
SLIDE 43

Proof

Proof.

Suppose that we had a decider DeciderEqual for EQTM. Then we can build a decider for ETM as follows: TM R:

1

Input = M

2

Include the (constant) code for a TM T that rejects all its

  • input. We denote the string encoding T by T.

3

Run DeciderEqual on M, T.

4

If DeciderEqual accepts, then accept.

5

If DeciderEqual rejects, then reject.

Chan, Har-Peled, Hassanieh (UIUC) CS374 24 Spring 2019 24 / 29

slide-44
SLIDE 44

Part V Regularity

Chan, Har-Peled, Hassanieh (UIUC) CS374 25 Spring 2019 25 / 29

slide-45
SLIDE 45

Many undecidable languages

1

Almost any property defjning a TM language induces a language which is undecidable.

2

proofs all have the same basic pattern.

3

Regularity language: RegularTM =

  • M
  • M is a TM and L(M) is regular
  • .

4

DeciderRegL: Assume TM decider for RegularTM.

5

Reduction from halting requires to turn problem about deciding whether a TM M accepts w (i.e., is w ∈ ATM) into a problem about whether some TM accepts a regular set of strings.

Chan, Har-Peled, Hassanieh (UIUC) CS374 26 Spring 2019 26 / 29

slide-46
SLIDE 46

Proof continued...

1

Given M and w, consider the following TM M′

w:

TM M′

w:

(i)

Input = x

(ii)

If x has the form anbn, halt and accept.

(iii)

Otherwise, simulate M on w.

(iv)

If the simulation accepts, then accept.

(v)

If the simulation rejects, then reject.

2

not executing M′

w!

3

feed string

  • M′

w

  • into DeciderRegL

4

EmbedRegularString: program with input M and w, and

  • utputs
  • M′

w

  • , encoding the program M′

w.

5

If M accepts w, then any x accepted by M′

w: L(M′ w) = Σ∗.

6

If M does not accept w, then L(M′

w) = {anbn | n ≥ 0}.

Chan, Har-Peled, Hassanieh (UIUC) CS374 27 Spring 2019 27 / 29

slide-47
SLIDE 47

Proof continued...

1

anbn is not regular...

2

Use DeciderRegL on M′

w to distinguish these two cases.

3

Note - cooked M′

w to the decider at hand.

4

A decider for ATM as follows. YetAnotherDecider-ATM(M, w)

  • M′

w

  • ← EmbedRegularString (M, w)

r ← DeciderRegL

  • M′

w

  • .

return r

5

If DeciderRegL accepts = ⇒ L(M′

w) regular (its Σ∗) =

⇒ M accepts w. So YetAnotherDecider-ATM should accept M, w.

6

If DeciderRegL rejects = ⇒ L(M′

w) is not regular =

⇒ L(M′

w) = anbn =

⇒ M does not accept w = ⇒ YetAnotherDecider-ATM should reject M, w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 28 Spring 2019 28 / 29

slide-48
SLIDE 48

Proof continued...

1

anbn is not regular...

2

Use DeciderRegL on M′

w to distinguish these two cases.

3

Note - cooked M′

w to the decider at hand.

4

A decider for ATM as follows. YetAnotherDecider-ATM(M, w)

  • M′

w

  • ← EmbedRegularString (M, w)

r ← DeciderRegL

  • M′

w

  • .

return r

5

If DeciderRegL accepts = ⇒ L(M′

w) regular (its Σ∗) =

⇒ M accepts w. So YetAnotherDecider-ATM should accept M, w.

6

If DeciderRegL rejects = ⇒ L(M′

w) is not regular =

⇒ L(M′

w) = anbn =

⇒ M does not accept w = ⇒ YetAnotherDecider-ATM should reject M, w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 28 Spring 2019 28 / 29

slide-49
SLIDE 49

Proof continued...

1

anbn is not regular...

2

Use DeciderRegL on M′

w to distinguish these two cases.

3

Note - cooked M′

w to the decider at hand.

4

A decider for ATM as follows. YetAnotherDecider-ATM(M, w)

  • M′

w

  • ← EmbedRegularString (M, w)

r ← DeciderRegL

  • M′

w

  • .

return r

5

If DeciderRegL accepts = ⇒ L(M′

w) regular (its Σ∗) =

⇒ M accepts w. So YetAnotherDecider-ATM should accept M, w.

6

If DeciderRegL rejects = ⇒ L(M′

w) is not regular =

⇒ L(M′

w) = anbn =

⇒ M does not accept w = ⇒ YetAnotherDecider-ATM should reject M, w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 28 Spring 2019 28 / 29

slide-50
SLIDE 50

Proof continued...

1

anbn is not regular...

2

Use DeciderRegL on M′

w to distinguish these two cases.

3

Note - cooked M′

w to the decider at hand.

4

A decider for ATM as follows. YetAnotherDecider-ATM(M, w)

  • M′

w

  • ← EmbedRegularString (M, w)

r ← DeciderRegL

  • M′

w

  • .

return r

5

If DeciderRegL accepts = ⇒ L(M′

w) regular (its Σ∗) =

⇒ M accepts w. So YetAnotherDecider-ATM should accept M, w.

6

If DeciderRegL rejects = ⇒ L(M′

w) is not regular =

⇒ L(M′

w) = anbn =

⇒ M does not accept w = ⇒ YetAnotherDecider-ATM should reject M, w.

Chan, Har-Peled, Hassanieh (UIUC) CS374 28 Spring 2019 28 / 29

slide-51
SLIDE 51

Rice theorem

The above proofs were somewhat repetitious... ...they imply a more general result.

Theorem 12 (Rice’s Theorem.)

Suppose that L is a language of Turing machines; that is, each word in L encodes a TM. Furthermore, assume that the following two properties hold.

(a)

Membership in L depends only on the Turing machine’s language, i.e. if L(M) = L(N) then M ∈ L ⇔ N ∈ L.

(b)

The set L is “non-trivial,” i.e. L = ∅ and L does not contain all Turing machines. Then L is a undecidable.

Chan, Har-Peled, Hassanieh (UIUC) CS374 29 Spring 2019 29 / 29