Upload
others
View
18
Download
0
Embed Size (px)
Citation preview
Countable sets
Consider the set of even numbers E = {0, 2, 4, 6, . . .}.Are there fewer or greater elements than in the set of natural numbers?
If a function is both one-to-one and onto, then we say it is bijective, or acorrespondence.
If a set S has a correspondence with the natural numbers, i.e. f : N → S, we say thatthe set is countable.
f(a) = 2a is a correspondence, f : N → E.
Any subset of N is countable: sort the subset, and map the ith number in N to theith element in the sorting.
The set of all TMs is countable! Each one can be encoded as a unique integer.Sort the TM descriptions, and map from the naturals.
Countable sets
Consider the set of even numbers E = {0, 2, 4, 6, . . .}.Are there fewer or greater elements than in the set of natural numbers?
If a function is both one-to-one and onto, then we say it is bijective, or acorrespondence.
If a set S has a correspondence with the natural numbers, i.e. f : N → S, we say thatthe set is countable.
f(a) = 2a is a correspondence, f : N → E.
Any subset of N is countable: sort the subset, and map the ith number in N to theith element in the sorting.
The set of all TMs is countable! Each one can be encoded as a unique integer.Sort the TM descriptions, and map from the naturals.
Countable sets
Consider the set of even numbers E = {0, 2, 4, 6, . . .}.Are there fewer or greater elements than in the set of natural numbers?
If a function is both one-to-one and onto, then we say it is bijective, or acorrespondence.
If a set S has a correspondence with the natural numbers, i.e. f : N → S, we say thatthe set is countable.
f(a) = 2a is a correspondence, f : N → E.
Any subset of N is countable: sort the subset, and map the ith number in N to theith element in the sorting.
The set of all TMs is countable! Each one can be encoded as a unique integer.Sort the TM descriptions, and map from the naturals.
Countable sets
Consider the set of even numbers E = {0, 2, 4, 6, . . .}.Are there fewer or greater elements than in the set of natural numbers?
If a function is both one-to-one and onto, then we say it is bijective, or acorrespondence.
If a set S has a correspondence with the natural numbers, i.e. f : N → S, we say thatthe set is countable.
f(a) = 2a is a correspondence, f : N → E.
Any subset of N is countable: sort the subset, and map the ith number in N to theith element in the sorting.
The set of all TMs is countable! Each one can be encoded as a unique integer.Sort the TM descriptions, and map from the naturals.
Countable sets
Consider the set of even numbers E = {0, 2, 4, 6, . . .}.Are there fewer or greater elements than in the set of natural numbers?
If a function is both one-to-one and onto, then we say it is bijective, or acorrespondence.
If a set S has a correspondence with the natural numbers, i.e. f : N → S, we say thatthe set is countable.
f(a) = 2a is a correspondence, f : N → E.
Any subset of N is countable: sort the subset, and map the ith number in N to theith element in the sorting.
The set of all TMs is countable! Each one can be encoded as a unique integer.Sort the TM descriptions, and map from the naturals.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.
A finite length string can be regarded as a unique integer:use a binary representation of the same string.
A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.
A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.
Represent a language using an ω-string:The ith bit is 1 iff the string corresponding to integer i is in the language.
Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.
Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.
Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.
Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.
Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:
[j ∈ N ][ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]
ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bit
Falseω̄ is not the jth item in the list.
∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.
∀j ∈ N : ω̄ is not the jth item in the list.
The set of all languages is uncountable
ω-string is a string of infinite length over {0, 1}.A finite length string can be regarded as a unique integer:
use a binary representation of the same string.A language can be seen as a set of integers.Represent a language using an ω-string:
The ith bit is 1 iff the string corresponding to integer i is in the language.Example: for L = {1, 11, 111}, ω = 10100010000000 · · ·
Claim
Let L be the set of all languages. L is uncountable
Suppose L were countable.Then there is a correspondence f : N → L.Sort the elements of L according to the correspondence.Let ωi by the ω-string representing the ith language in the sorted list.
Define ω̄ as follows. The ith bit of ω̄ =
{0 if the ith bit of ωi = 1
1, if the ith bit of ωi = 0
ω̄ does not appear in this sorted list:[j ∈ N ]
[ω̄ is the jth item in the list ]ω̄ differs from ωj in the jth bitFalse
ω̄ is not the jth item in the list.∀j ∈ N : ω̄ is not the jth item in the list.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.Sort the resulting list of integers.This yields a correspondence between N → LL is countable.False
∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]
Assign to each L ∈ L the smallest integer corresponding to a TM that recognizesit.
Sort the resulting list of integers.This yields a correspondence between N → LL is countable.False
∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.
Sort the resulting list of integers.This yields a correspondence between N → LL is countable.False
∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.Sort the resulting list of integers.
This yields a correspondence between N → LL is countable.False
∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.Sort the resulting list of integers.This yields a correspondence between N → L
L is countable.False
∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.Sort the resulting list of integers.This yields a correspondence between N → LL is countable.
False∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.Sort the resulting list of integers.This yields a correspondence between N → LL is countable.False
∃L ∈ L : L is not recognized by any TM.
Some languages are not recognizable
Theorem
There exists a language L ∈ L that is not recognized by any Turing Machine.
Suppose otherwise, towards a contradiction:[∀L ∈ L : L is recognized by some Turing Machine]Assign to each L ∈ L the smallest integer corresponding to a TM that recognizes
it.Sort the resulting list of integers.This yields a correspondence between N → LL is countable.False
∃L ∈ L : L is not recognized by any TM.
An unrecognizable language: Notation
Recall, every TM can be described using an integer:Write the transition function out as a binary string.Interpret this binary string as an integer.
Does every integer represent a valid TM? No!We can write it in binary, but it might not correctly encode δ.
Nevertheless, we will consider every integer as representing a TM.If it does not correctly encode a TM, we will say the language of that TM is ∅.Bin(i) denotes the binary representation of i ∈ N .Mi is the TM described by Bin(i).Note: 〈Mi〉 = Bin(i).Sometimes we want to refer to the string representing machine M without knowing i.Sometimes we want to think of the set of all i ∈ N and the machines they represent.
An unrecognizable language: Notation
Recall, every TM can be described using an integer:Write the transition function out as a binary string.Interpret this binary string as an integer.
Does every integer represent a valid TM? No!We can write it in binary, but it might not correctly encode δ.
Nevertheless, we will consider every integer as representing a TM.If it does not correctly encode a TM, we will say the language of that TM is ∅.Bin(i) denotes the binary representation of i ∈ N .Mi is the TM described by Bin(i).Note: 〈Mi〉 = Bin(i).Sometimes we want to refer to the string representing machine M without knowing i.Sometimes we want to think of the set of all i ∈ N and the machines they represent.
An unrecognizable language: Notation
Recall, every TM can be described using an integer:Write the transition function out as a binary string.Interpret this binary string as an integer.
Does every integer represent a valid TM? No!We can write it in binary, but it might not correctly encode δ.
Nevertheless, we will consider every integer as representing a TM.If it does not correctly encode a TM, we will say the language of that TM is ∅.
Bin(i) denotes the binary representation of i ∈ N .Mi is the TM described by Bin(i).Note: 〈Mi〉 = Bin(i).Sometimes we want to refer to the string representing machine M without knowing i.Sometimes we want to think of the set of all i ∈ N and the machines they represent.
An unrecognizable language: Notation
Recall, every TM can be described using an integer:Write the transition function out as a binary string.Interpret this binary string as an integer.
Does every integer represent a valid TM? No!We can write it in binary, but it might not correctly encode δ.
Nevertheless, we will consider every integer as representing a TM.If it does not correctly encode a TM, we will say the language of that TM is ∅.Bin(i) denotes the binary representation of i ∈ N .Mi is the TM described by Bin(i).
Note: 〈Mi〉 = Bin(i).Sometimes we want to refer to the string representing machine M without knowing i.Sometimes we want to think of the set of all i ∈ N and the machines they represent.
An unrecognizable language: Notation
Recall, every TM can be described using an integer:Write the transition function out as a binary string.Interpret this binary string as an integer.
Does every integer represent a valid TM? No!We can write it in binary, but it might not correctly encode δ.
Nevertheless, we will consider every integer as representing a TM.If it does not correctly encode a TM, we will say the language of that TM is ∅.Bin(i) denotes the binary representation of i ∈ N .Mi is the TM described by Bin(i).Note: 〈Mi〉 = Bin(i).Sometimes we want to refer to the string representing machine M without knowing i.Sometimes we want to think of the set of all i ∈ N and the machines they represent.
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉
If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.
But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD]
[M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]
〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)
M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)
FalseM does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉
〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)
M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)
False¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An unrecognizable language
LD = {Bin(i) | i ∈ N ∧Mi does not accept Bin(i)}
Theorem
LD is not recognizable.
Suppose M recognizes LD. Consider whether M accepts x = 〈M〉If it does, then x ∈ LD, because M should only accept strings in the language.But, if M accepts x = 〈M〉, then, by the definition of LD, x is NOT in the language!
[∃M : M recognizes LD][M accepts 〈M〉]〈M〉 ∈ LD (By definition of “accepts”)M does not accept 〈M〉 (By definition of LD)False
M does not accept 〈M〉〈M〉 /∈ LD (By Definition of “not accept”)M accepts 〈M〉 (By Definition of LD)False
¬∃M : M recognizes LD
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]
Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
False
M∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False
¬∃MU : MU decides LU
An undecidable language
Recall: We can build a universal TM that recognizes the following language:LU = {〈M〉0x | TM M accepts input x}
Theorem
LU is not decidable
[∃MU : MU decides LU ]Define M∗, which on input 〈M〉, runs MU
(〈M〉0〈M〉
)and flips the output bit.
[M∗(〈M∗〉
)= 1]
MU
(〈M∗〉0〈M∗〉
)= 0 (By definition of M∗)
M∗(〈M∗〉
)= 0 (By definition of MU )
FalseM∗(〈M∗〉
)= 0
MU
(〈M∗〉0〈M∗〉
)= 1 (By definition of M∗)
M∗(〈M∗〉
)= 1 (By definition of MU )
False¬∃MU : MU decides LU
An undecidable language
Behavior of MU , if it were to exist:
〈M1〉 〈M2〉 〈M3〉 〈M4〉 . . . . . .
M1 : accept accept reject reject . . . accept
M2 : accept reject reject reject . . . reject
M3 : reject accept reject accept . . . accept
......
......
.... . . reject
M∗ : reject accept accept reject . . . ???
......
......
......
. . .
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.
LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]
Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.
∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False
¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language Lhalt = {〈M〉0x |M(x) terminates }
Theorem
The language Lhalt is undecidable.
We reduce the problem of deciding LU to the problem of deciding Lhalt.LU = {〈M〉0x | TM M accepts input x}¬∃MU : MU decides LU
[∃Mhalt : Mhalt decides Lhalt]Define MUMU (〈M〉0x) :
1. Simulate Mhalt(〈M〉0x).
2. If it outputs 0, halt and output 0.
3. If it outputs 1, simulate M on input x until it halts. Output whatever M outputs.∃MU : MU decides LU
False¬∃Mhalt : Mhalt decides Lhalt
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.
Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]
Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.
M ′ :I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.
I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.
Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False
¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language L∅ = {〈M〉 |M rejects all strings }
Theorem
The language L∅ is undecidable.
We reduce the problem of deciding Lhalt to the problem of deciding L∅.Lhalt = {〈M〉0x |M(x) terminates }¬∃Mhalt : Mhalt decides Lhalt
[∃M∅ : M∅ decides L∅]Define MhaltMhalt(〈M〉0x) :
1. Write down a description of a TM M ′ that modifies the behavior of M as follows.M ′ :
I On input y 6= x, reject.I On input y = x, run M(y) and output whatever it outputs.
2. Run M∅(〈M ′〉). Reverse the value of its output.Mhalt decides Lhalt
False¬∃M∅ : M∅ decides L∅
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.
L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]
Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.
M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅
False¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ
Reducing one computation to another
Consider the language LEQ = {〈M1〉0〈M2〉 | L(M1) = L(M2)}
Theorem
The language LEQ is undecidable.
We reduce the problem of deciding L∅ to the problem of deciding LEQ.L∅ = {〈M〉 |M rejects all strings }¬∃M∅ : M∅ decides L∅
[∃MEQ : MEQ decides LEQ]Define M∅M∅(〈M〉) :
1. Construct the description of a Turing machine M ′ that rejects all strings.
2. Run MEQ(〈M〉, 〈M ′〉), and output whatever it outputs.M∅ decides L∅False
¬∃MEQ : MEQ decides LEQ