cm0081 undecidable problems about turing machines

Post on 25-Jan-2017

235 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Automata and Formal Languages - CM0081Undecidable Problems About Turing Machines

Andrรฉs Sicard-Ramรญrez

Universidad EAFIT

Semester 2018-1

Reductions

DefinitionLet ๐‘ƒ1 and ๐‘ƒ2 be two problems. A reduction from ๐‘ƒ1 to ๐‘ƒ2 is a Turingmachine that takes an instance of ๐‘ƒ1 written on its tape and halts with aninstance of ๐‘ƒ2 that have the same answer (i.e. a reduction is an algorithm).

yes

no

yes

no

๐‘ƒ1 ๐‘ƒ2

Undecidable Problems About Turing Machines 2/28

Reductions

Theorem (9.7.a)If there is a reduction from ๐‘ƒ1 to ๐‘ƒ2 then if ๐‘ƒ1 is undecidable then so ๐‘ƒ2.(Hint: Suppose the ๐‘ƒ2 is decidable and find a contradiction).

Theorem (9.7.b)If there is a reduction from ๐‘ƒ1 to ๐‘ƒ2 then if ๐‘ƒ1 is not recursively enumerablethen so ๐‘ƒ2. (Hint: Suppose the ๐‘ƒ2 is recursively enumerable and find acontradiction).

Undecidable Problems About Turing Machines 3/28

Reductions

Theorem (9.7.a)If there is a reduction from ๐‘ƒ1 to ๐‘ƒ2 then if ๐‘ƒ1 is undecidable then so ๐‘ƒ2.(Hint: Suppose the ๐‘ƒ2 is decidable and find a contradiction).

Theorem (9.7.b)If there is a reduction from ๐‘ƒ1 to ๐‘ƒ2 then if ๐‘ƒ1 is not recursively enumerablethen so ๐‘ƒ2. (Hint: Suppose the ๐‘ƒ2 is recursively enumerable and find acontradiction).

Undecidable Problems About Turing Machines 4/28

Turing Machines that Accept the Empty Language

NotationHenceforth, weโ€™ll regard strings as the Turing machines they represent.

Two languagesLe = {๐‘€ โˆฃ ๐ฟ(๐‘€) = โˆ…},

Lne = {๐‘€ โˆฃ ๐ฟ(๐‘€) โ‰  โˆ…}.

Undecidable Problems About Turing Machines 5/28

Turing Machines that Accept the Empty Language

Theorem (9.8)Lne is recursively enumerable,

ProofConstruction of a non-determinist TM to accept Lne:โ€ 

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.8].Undecidable Problems About Turing Machines 6/28

Turing Machines that Accept the Empty Language

Theorem (9.8)Lne is recursively enumerable,

ProofConstruction of a non-determinist TM to accept Lne:โ€ 

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.8].Undecidable Problems About Turing Machines 7/28

Turing Machines that Accept the Empty Language

Theorem (9.9)Lne is not recursive.

Undecidable Problems About Turing Machines 8/28

Turing Machines that Accept the Empty Language

Proof.1. Reduction from Lu to Lne where the pair (๐‘€, ๐‘ค) is converted in ๐‘€ โ€ฒ,

such that ๐‘ค โˆˆ ๐ฟ(๐‘€), if only if, ๐ฟ(๐‘€ โ€ฒ) โ‰  โˆ….

2. The key is to have ๐‘€ โ€ฒ ignore its input.โ€ 

3. Lne is not recursive by Theorem 9.7.a.

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.9].Undecidable Problems About Turing Machines 9/28

Turing Machines that Accept the Empty Language

Proof.1. Reduction from Lu to Lne where the pair (๐‘€, ๐‘ค) is converted in ๐‘€ โ€ฒ,

such that ๐‘ค โˆˆ ๐ฟ(๐‘€), if only if, ๐ฟ(๐‘€ โ€ฒ) โ‰  โˆ….2. The key is to have ๐‘€ โ€ฒ ignore its input.โ€ 

3. Lne is not recursive by Theorem 9.7.a.

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.9].Undecidable Problems About Turing Machines 10/28

Turing Machines that Accept the Empty Language

Proof.1. Reduction from Lu to Lne where the pair (๐‘€, ๐‘ค) is converted in ๐‘€ โ€ฒ,

such that ๐‘ค โˆˆ ๐ฟ(๐‘€), if only if, ๐ฟ(๐‘€ โ€ฒ) โ‰  โˆ….2. The key is to have ๐‘€ โ€ฒ ignore its input.โ€ 

3. Lne is not recursive by Theorem 9.7.a.

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.9].Undecidable Problems About Turing Machines 11/28

Turing Machines that Accept the Empty Language

Theorem (9.10)Le is not recursively enumerable. (Hint: Le is the complement of Lne).

Undecidable Problems About Turing Machines 12/28

Riceโ€™s Theorem

Set of the recursively enumerable languagesREL = {๐ฟ โˆฃ ๐ฟ is recursively enumerable }.

Properties (subsets) of the recursively enumerable languagesProperty ๐‘ƒ of REL: ๐‘ƒ โŠ† REL.

Example (Trivial properties)๐‘ƒ (๐ฟ) = โˆ… or ๐‘ƒ(๐ฟ) = REL.

Example๐‘ƒ (๐ฟ): ๐ฟ is a language regular.

Undecidable Problems About Turing Machines 13/28

Riceโ€™s Theorem

Set of the recursively enumerable languagesREL = {๐ฟ โˆฃ ๐ฟ is recursively enumerable }.

Properties (subsets) of the recursively enumerable languagesProperty ๐‘ƒ of REL: ๐‘ƒ โŠ† REL.

Example (Trivial properties)๐‘ƒ (๐ฟ) = โˆ… or ๐‘ƒ(๐ฟ) = REL.

Example๐‘ƒ (๐ฟ): ๐ฟ is a language regular.

Undecidable Problems About Turing Machines 14/28

Riceโ€™s Theorem

Set of the recursively enumerable languagesREL = {๐ฟ โˆฃ ๐ฟ is recursively enumerable }.

Properties (subsets) of the recursively enumerable languagesProperty ๐‘ƒ of REL: ๐‘ƒ โŠ† REL.

Example (Trivial properties)๐‘ƒ (๐ฟ) = โˆ… or ๐‘ƒ(๐ฟ) = REL.

Example๐‘ƒ (๐ฟ): ๐ฟ is a language regular.

Undecidable Problems About Turing Machines 15/28

Riceโ€™s Theorem

Set of the recursively enumerable languagesREL = {๐ฟ โˆฃ ๐ฟ is recursively enumerable }.

Properties (subsets) of the recursively enumerable languagesProperty ๐‘ƒ of REL: ๐‘ƒ โŠ† REL.

Example (Trivial properties)๐‘ƒ (๐ฟ) = โˆ… or ๐‘ƒ(๐ฟ) = REL.

Example๐‘ƒ (๐ฟ): ๐ฟ is a language regular.

Undecidable Problems About Turing Machines 16/28

Riceโ€™s Theorem

Theorem (Riceโ€™s theorem, 9.11)Every non-trivial property of REL is undecidable.

How to prove Riceโ€™s theorem?We identify a property ๐‘ƒ by the Turing machines ๐‘€ such that ๐ฟ(๐‘€) โˆˆ ๐‘ƒ .

Theorem (Riceโ€™s theorem (second version))If ๐‘ƒ โŠ† REL is a non-trivial property then

๐ฟ๐‘ƒ = {๐‘€ โˆฃ ๐ฟ(๐‘€) โˆˆ ๐‘ƒ}

is undecidable.

Undecidable Problems About Turing Machines 17/28

Riceโ€™s Theorem

Theorem (Riceโ€™s theorem, 9.11)Every non-trivial property of REL is undecidable.

How to prove Riceโ€™s theorem?We identify a property ๐‘ƒ by the Turing machines ๐‘€ such that ๐ฟ(๐‘€) โˆˆ ๐‘ƒ .

Theorem (Riceโ€™s theorem (second version))If ๐‘ƒ โŠ† REL is a non-trivial property then

๐ฟ๐‘ƒ = {๐‘€ โˆฃ ๐ฟ(๐‘€) โˆˆ ๐‘ƒ}

is undecidable.

Undecidable Problems About Turing Machines 18/28

Riceโ€™s Theorem

Theorem (Riceโ€™s theorem, 9.11)Every non-trivial property of REL is undecidable.

How to prove Riceโ€™s theorem?We identify a property ๐‘ƒ by the Turing machines ๐‘€ such that ๐ฟ(๐‘€) โˆˆ ๐‘ƒ .

Theorem (Riceโ€™s theorem (second version))If ๐‘ƒ โŠ† REL is a non-trivial property then

๐ฟ๐‘ƒ = {๐‘€ โˆฃ ๐ฟ(๐‘€) โˆˆ ๐‘ƒ}

is undecidable.

Undecidable Problems About Turing Machines 19/28

Riceโ€™s Theorem

Proof: Case โˆ… โˆ‰ ๐‘ƒ .1. Let ๐ฟ be a language and ๐‘€๐ฟ be a Turing machine such ๐ฟ โ‰  โˆ…,

๐ฟ โˆˆ ๐‘ƒ and ๐ฟ = ๐ฟ(๐‘€๐ฟ). Reduction from Lu to ๐ฟ๐‘ƒ where the pair(๐‘€, ๐‘ค) is converted in ๐‘€ โ€ฒ such that:โ€ 

i) ๐ฟ(๐‘€ โ€ฒ) = โˆ… (i.e. ๐‘€ โ€ฒ โˆ‰ ๐ฟ๐‘ƒ ) if ๐‘ค โˆ‰ ๐ฟ(๐‘€) andii) ๐ฟ(๐‘€ โ€ฒ) = ๐ฟ (i.e. ๐‘€ โ€ฒ โˆˆ ๐ฟ๐‘ƒ ) if ๐‘ค โˆˆ ๐ฟ(๐‘€).

2. ๐ฟ๐‘ƒ is not recursive by Theorem 9.7.a.

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.10].Undecidable Problems About Turing Machines 20/28

Riceโ€™s Theorem

Proof: Case โˆ… โˆ‰ ๐‘ƒ .1. Let ๐ฟ be a language and ๐‘€๐ฟ be a Turing machine such ๐ฟ โ‰  โˆ…,

๐ฟ โˆˆ ๐‘ƒ and ๐ฟ = ๐ฟ(๐‘€๐ฟ). Reduction from Lu to ๐ฟ๐‘ƒ where the pair(๐‘€, ๐‘ค) is converted in ๐‘€ โ€ฒ such that:โ€ 

i) ๐ฟ(๐‘€ โ€ฒ) = โˆ… (i.e. ๐‘€ โ€ฒ โˆ‰ ๐ฟ๐‘ƒ ) if ๐‘ค โˆ‰ ๐ฟ(๐‘€) andii) ๐ฟ(๐‘€ โ€ฒ) = ๐ฟ (i.e. ๐‘€ โ€ฒ โˆˆ ๐ฟ๐‘ƒ ) if ๐‘ค โˆˆ ๐ฟ(๐‘€).

2. ๐ฟ๐‘ƒ is not recursive by Theorem 9.7.a.

โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.10].Undecidable Problems About Turing Machines 21/28

Riceโ€™s Theorem

Proof: Case โˆ… โˆ‰ ๐‘ƒ .1. Let ๐ฟ be a language and ๐‘€๐ฟ be a Turing machine such ๐ฟ โ‰  โˆ…,

๐ฟ โˆˆ ๐‘ƒ and ๐ฟ = ๐ฟ(๐‘€๐ฟ). Reduction from Lu to ๐ฟ๐‘ƒ where the pair(๐‘€, ๐‘ค) is converted in ๐‘€ โ€ฒ such that:โ€ 

i) ๐ฟ(๐‘€ โ€ฒ) = โˆ… (i.e. ๐‘€ โ€ฒ โˆ‰ ๐ฟ๐‘ƒ ) if ๐‘ค โˆ‰ ๐ฟ(๐‘€) andii) ๐ฟ(๐‘€ โ€ฒ) = ๐ฟ (i.e. ๐‘€ โ€ฒ โˆˆ ๐ฟ๐‘ƒ ) if ๐‘ค โˆˆ ๐ฟ(๐‘€).

2. ๐ฟ๐‘ƒ is not recursive by Theorem 9.7.a.โ€ Figure from Hopcroft, Motwani and Ullman [2007, Fig. 9.10].

Undecidable Problems About Turing Machines 22/28

Riceโ€™s Theorem

Proof: Case โˆ… โˆˆ ๐‘ƒ .1. By the previous case, ๐‘ƒ is undecidable, i.e. ๐ฟ๐‘ƒ is undecidable.2. ๐ฟ๐‘ƒ = ๐ฟ๐‘ƒ .3. Suppose ๐ฟ๐‘ƒ is decidable then ๐ฟ๐‘ƒ would be also decidable

(contradiction).4. Therefore, ๐ฟ๐‘ƒ is undecidable.

Undecidable Problems About Turing Machines 23/28

Riceโ€™s Theorem

All the problems about Turing machines that involve only the languagethat the TM accepts are undecidable.

ExamplesIs the language accepted by the TM empty?Is the language accepted by the TM finite?Is the language accepted by the TM regular?Is the language accepted by the TM context-free language?Does the language accepted by the TM contain the string โ€œhelloworldโ€?Does the language accepted by the TM contain all the even numbers?

Undecidable Problems About Turing Machines 24/28

Riceโ€™s Theorem

All the problems about Turing machines that involve only the languagethat the TM accepts are undecidable.

ExamplesIs the language accepted by the TM empty?Is the language accepted by the TM finite?Is the language accepted by the TM regular?Is the language accepted by the TM context-free language?Does the language accepted by the TM contain the string โ€œhelloworldโ€?Does the language accepted by the TM contain all the even numbers?

Undecidable Problems About Turing Machines 25/28

Riceโ€™s Theorem

Riceโ€™s theorem does not imply that everything about Turing machines isundecidable.

ExampleIt is decidable if a Turing machine has five states.

Undecidable Problems About Turing Machines 26/28

Riceโ€™s Theorem

Riceโ€™s theorem does not imply that everything about Turing machines isundecidable.ExampleIt is decidable if a Turing machine has five states.

Undecidable Problems About Turing Machines 27/28

References

Hopcroft, J. E., Motwani, R. and Ullman, J. D. (2007). Introduction toAutomata theory, Languages, and Computation. 3rd ed. Pearson Education.

Undecidable Problems About Turing Machines 28/28

top related