Title: Reductions
1Reductions
2Problem is reduced to problem
If we can solve problem then we can solve
problem
3Definition
Language is reduced
to language There is a computable function
(reduction) such that
4Recall
Computable function
There is a deterministic Turing machine
which for any string computes
5Theorem
If a Language is reduced to b
Language is decidable Then is
decidable
Proof
Basic idea
Build the decider for using the decider for
6Decider for
Reduction
YES
Input string
YES
accept
accept
compute
Decider for
(halt)
(halt)
NO
NO
reject
reject
(halt)
(halt)
END OF PROOF
7Example
is reduced to
8We only need to construct
Turing Machine for reduction
DFA
9Let be the language of DFA Let be
the language of DFA
Turing Machine for reduction
DFA
construct DFA by combining and
so that
10(No Transcript)
11Decider for
Reduction
Input string
YES
compute
YES
Decider
NO
NO
12Theorem (version 1)
If a Language is reduced to b
Language is undecidable Then is
undecidable
(this is the negation of the previous theorem)
Proof
Suppose is decidable
Using the decider for build the decider for
Contradiction!
13If is decidable then we can build
Decider for
Reduction
YES
Input string
YES
accept
accept
compute
Decider for
(halt)
(halt)
NO
NO
reject
reject
(halt)
(halt)
CONTRADICTION!
END OF PROOF
14Observation In order to prove that some
language is undecidable we only need to
reduce a known undecidable language to
15State-entry problem
Input
Question
Does
enter state
while processing input string ?
Corresponding language
16Theorem
is undecidable
(state-entry problem is unsolvable)
Proof
Reduce (halting problem) to
(state-entry problem)
17Halting Problem Decider
Decider for
state-entry problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, if is
decidable, then is decidable
A contradiction! since is undecidable
18We only need to build the reduction
Reduction
Compute
So that
19Construct from
special halt state
halting states
A transition for every unused tape symbol
of
20special halt state
halting states
halts on state
halts
21halts on input
Therefore
halts on state on input
Equivalently
END OF PROOF
22Blank-tape halting problem
Input
Turing Machine
Question
Does
halt when started with
a blank tape?
Corresponding language
23Theorem
is undecidable
(blank-tape halting problem is unsolvable)
Proof
Reduce (halting problem) to
(blank-tape problem)
24Halting Problem Decider
Decider for
blank-tape problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, If is
decidable, then is decidable
A contradiction! since is undecidable
25We only need to build the reduction
Reduction
Compute
So that
26Construct from
no
Tape is blank?
yes
Run
Write on tape
with input
If halts then halt
27no
Tape is blank?
yes
Run
Write on tape
with input
halts on input
halts when started on blank tape
28halts on input
halts when started on blank tape
Equivalently
END OF PROOF
29Theorem (version 2)
If a Language is reduced to b
Language is undecidable Then is
undecidable
Proof
Suppose is decidable
Then is decidable
Using the decider for build the decider for
Contradiction!
30Suppose is decidable
reject
Decider for
(halt)
accept
(halt)
31Suppose is decidable
Then is decidable
(we have proven this in previous class)
Decider for
NO
YES
reject
accept
Decider for
(halt)
(halt)
YES
NO
accept
reject
(halt)
(halt)
32If is decidable then we can build
Decider for
Reduction
YES
Input string
YES
accept
accept
compute
Decider for
(halt)
(halt)
NO
NO
reject
reject
(halt)
(halt)
CONTRADICTION!
33Alternatively
Decider for
Reduction
NO
Input string
YES
reject
accept
compute
Decider for
(halt)
(halt)
YES
NO
accept
reject
(halt)
(halt)
CONTRADICTION!
END OF PROOF
34Observation In order to prove that some
language is undecidable we only need to
reduce some known undecidable language to or to
(theorem version 1)
(theorem version 2)
35Undecidable Problems for Turing Recognizable
languages
Let be a Turing-acceptable language
All these are undecidable problems
36Let be a Turing-acceptable language
37Empty language problem
Input
Turing Machine
Question
Is
empty?
Corresponding language
38Theorem
is undecidable
(empty-language problem is unsolvable)
Proof
Reduce (membership problem) to
(empty language problem)
39membership problem decider
Decider for
empty problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, if is
decidable, then is decidable
A contradiction! since is undecidable
40We only need to build the reduction
Reduction
Compute
So that
41Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
42Tape of
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
43Tape of
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
44During this phase this area is not touched
working area of
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
45Simply check if entered an accept state
altered
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
46Now check input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
47The only possible accepted string
t r o y
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
48accepts
does not accept
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
49Therefore
accepts
Equivalently
END OF PROOF
50Let be a Turing-acceptable language
51Regular language problem
Input
Turing Machine
Question
Is
a regular language?
Corresponding language
52Theorem
is undecidable
(regular language problem is unsolvable)
Proof
Reduce (membership problem) to
(regular language problem)
53membership problem decider
Decider for
regular problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, If is
decidable, then is decidable
A contradiction! since is undecidable
54We only need to build the reduction
Reduction
Compute
So that
55Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If has the form
accepts ?
then accept
56not regular
accepts
does not accept
regular
write on tape
skip input string
run on input
yes
If has the form
accepts ?
then accept
57Therefore
accepts
is not regular
Equivalently
END OF PROOF
58Let be a Turing-acceptable language
59Size2 language problem
Input
Turing Machine
Does have size 2?
Question
(accepts exactly two strings?)
Corresponding language
60Theorem
is undecidable
(regular language problem is unsolvable)
Proof
Reduce (membership problem) to
(size 2 language problem)
61membership problem decider
Decider for
size2 problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, If is
decidable, then is decidable
A contradiction! since is undecidable
62We only need to build the reduction
Reduction
Compute
So that
63Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
642 strings
accepts
does not accept
0 strings
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
65Therefore
accepts
has size 2
Equivalently
END OF PROOF
66RICEs Theorem
Undecidable problems
This can be generalized to all non-trivial propert
ies of Turing-acceptable languages
67Non-trivial property
A property possessed by some
Turing-acceptable languages but not all
is empty?
Example
YES
NO
NO
68More examples of non-trivial properties
is regular?
YES
YES
NO
has size 2?
NO
NO
YES
69Trivial property
A property possessed by ALL
Turing-acceptable languages
has size at least 0?
Examples
True for all languages
is accepted by some Turing machine?
True for all Turing-acceptable languages
70We can describe a property as the set of
languages that possess the property
If language has property then
is empty?
Example
YES
NO
NO
71Example
Suppose alphabet is
has size 1?
NO
YES
NO
NO
72Non-trivial property problem
Input
Turing Machine
Does have the non-trivial property ?
Question
Corresponding language
73Rices Theorem
is undecidable
(the non-trivial property problem is unsolvable)
Proof
Reduce (membership problem) to
or
74We examine two cases
Case 1
Examples
is empty?
is regular?
Case 2
Example
has size 2?
75Case 1
Since is non-trivial, there is a
Turing-acceptable language such that
Let be the Turing machine that accepts
76Reduce (membership problem) to
77membership problem decider
Decider for
Non-trivial property problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, if is
decidable, then is decidable
A contradiction! since is undecidable
78We only need to build the reduction
Reduction
Compute
So that
79Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
80For this phase we can run machine that accepts
, with input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
81accepts
does not accept
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
82Therefore
accepts
Equivalently
83Case 2
Since is non-trivial, there is a
Turing-acceptable language such that
Let be the Turing machine that accepts
84Reduce (membership problem) to
85membership problem decider
Decider for
Non-trivial property problem decider
Reduction
YES
YES
Decider
Compute
NO
NO
Given the reduction, if is
decidable, then is decidable
A contradiction! since is undecidable
86We only need to build the reduction
Reduction
Compute
So that
87Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
88accepts
does not accept
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
89Therefore
accepts
Equivalently
END OF PROOF