Disjoint Unions

Disjoint Unions
Unions and Difficulty
●
●
As you saw on Problem Set Six, the union
of two “hard” problems doesn't have to
be a “hard” problem.
For example: ATM ∉ co-RE, ATM ∉ RE, but
ATM ∪ ATM = Σ* is regular.
Disjoint Unions
●
●
Let L₁ and L₂ be languages over {0, 1}.
The disjoint union of L₁ and L₂, which we
denote L₁ ⊎ L₂, is the set
0L₁ ∪ 1L₂
●
Mechanically:
●
Prepend a 0 to all strings in L₁.
●
Prepend a 1 to all strings in L₂.
●
Take the union of the two resulting languages.
Solving L₁ ⊎ L₂
●
●
Intuitively, any machine for L₁ ⊎ L₂ must
be capable of solving L₁ and L₂.
Why?
●
●
If the machine's input is 0w, the machine
needs to figure out whether w ∈ L₁.
If the machine's input is 1w, the machine
needs to figure out whether w ∈ L₂.
Disjoint versus Normal Unions
●
If L₁ and L₂ are “hard” languages, then their union
L₁ ∪ L₂ can be an “easy” language because there's
no information about where each string comes
from.
●
●
Deciding ATM ∪ ATM is easy because we never need to
determine which language a particular string belongs to.
If L₁ and L₂ are “hard” languages, then their
disjoint union L₁ ⊎ L₂ will also be a “hard”
language because each string remembers where it
comes from.
●
If it starts with 0, it comes from L₁.
●
If it starts with 1, it comes from L₂.
Monster Problems
●
We know that ATM ∉ co-RE.
●
We know that ATM ∉ RE.
●
Consider this language:
ATM ⊎ ATM
●
Is this language RE?
●
Is this language co-RE?
ATM ⊎ ATM ∉ RE
●
●
Claim: ATM ⊎ ATM ∉ RE.
Proof idea: Show that if ATM ⊎ ATM ∈ RE, then
ATM ∈ RE, which we know isn't true.
●
Suppose ATM ⊎ ATM ∈ RE. Let R be a recognizer for it.
●
What does this TM do?
M
M==“On
“Oninput
inputw:
w:
Run
RunRRon
oninput
input1w.
1w.(This
(Thisstep
stepmight
mightloop
loop
ifif1w
⊎⊎AATM.).)
1w∉∉AATM
TM
TM
IfIfRRaccepts
accepts1w,
1w,then
thenM
Maccepts
acceptsw.
w.
IfIfRRrejects
rejects1w,
1w,then
thenM
Mrejects
rejectsw.”
w.”
●
This is a recognizer for ATM!
ATM ⊎ ATM ∉ co-RE
●
Claim: ATM ⊎ ATM ∉ co-RE.
●
Proof idea: What is the following language?
ATM ⊎ ATM
●
If w ∉ ATM ⊎ ATM and w starts with 0, then w ∉ ATM.
●
If w ∉ ATM ⊎ ATM and w starts with 1, then w ∉ ATM.
●
Overall, we see that complement of A TM ⊎ ATM is
(ATM ⊎ ATM) ∪ {ε}
ATM ⊎ ATM ∉ co-RE
●
●
●
Claim: ATM ⊎ ATM ∉ co-RE.
Proof idea: Show that the complement of ATM ⊎ ATM (that
is, the language (ATM ⊎ ATM) ∪ {ε}), is not an RE
language.
Suppose (ATM ⊎ ATM) ∪ {ε} ∈ RE and let R be a recognizer
for it. What does this TM do?
M
M==“On
“Oninput
inputw:
w:
Run
RunRRon
oninput
input0w.
0w.(This
(Thisstep
stepmight
mightloop
loop
ifif0w
⊎⊎AATM ∪∪{ε})
0w∉∉AATM
{ε})
TM
TM
IfIfRRaccepts
accepts0w,
0w,then
thenM
Maccepts
acceptsw.
w.
IfIfRRrejects
rejects0w,
0w,then
thenM
Mrejects
rejectsw.”
w.”
●
This is a recognizer for ATM!
The Limits of Computability
ATM ⊎ ATM
co-RE
LD
HALT
R
RE
LD
ADD
ATM
HALT
ATM
0*1*
There is a TM M
where M rejects w
iff w ∉ L
There is a TM M
where M accepts w
iff w ∈ L