Reductions - PowerPoint PPT Presentation

About This Presentation
Title:

Reductions

Description:

has size 2? Undecidable problems ... is undecidable Decider for YES NO state-entry problem decider Decider Compute Reduction YES NO Given the reduction, if ... – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 90
Provided by: Costas84
Learn more at: http://www.cs.rpi.edu
Category:

less

Transcript and Presenter's Notes

Title: Reductions


1
Reductions

2
Problem is reduced to problem
If we can solve problem then we can solve
problem
3
Definition
Language is reduced
to language There is a computable function
(reduction) such that
4
Recall
Computable function
There is a deterministic Turing machine
which for any string computes
5
Theorem
If a Language is reduced to b
Language is decidable Then is
decidable
Proof
Basic idea
Build the decider for using the decider for
6
Decider for
Reduction
YES
Input string
YES
accept
accept
compute
Decider for
(halt)
(halt)
NO
NO
reject
reject
(halt)
(halt)
END OF PROOF
7
Example
is reduced to
8
We only need to construct
Turing Machine for reduction
DFA
9
Let 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)
11
Decider for
Reduction
Input string
YES
compute
YES
Decider
NO
NO
12
Theorem (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!
13
If 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
14
Observation In order to prove that some
language is undecidable we only need to
reduce a known undecidable language to
15
State-entry problem
Input
  • Turing Machine
  • State
  • String

Question
Does
enter state
while processing input string ?
Corresponding language
16
Theorem
is undecidable
(state-entry problem is unsolvable)
Proof
Reduce (halting problem) to
(state-entry problem)
17
Halting 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
18
We only need to build the reduction
Reduction
Compute
So that
19
Construct from
special halt state
halting states
A transition for every unused tape symbol
of
20
special halt state
halting states
halts on state
halts
21
halts on input
Therefore
halts on state on input
Equivalently
END OF PROOF
22
Blank-tape halting problem
Input
Turing Machine
Question
Does
halt when started with
a blank tape?
Corresponding language
23
Theorem
is undecidable
(blank-tape halting problem is unsolvable)
Proof
Reduce (halting problem) to
(blank-tape problem)
24
Halting 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
25
We only need to build the reduction
Reduction
Compute
So that
26
Construct from
no
Tape is blank?
yes
Run
Write on tape
with input
If halts then halt
27
no
Tape is blank?
yes
Run
Write on tape
with input
halts on input
halts when started on blank tape
28
halts on input
halts when started on blank tape
Equivalently
END OF PROOF
29
Theorem (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!
30
Suppose is decidable
reject
Decider for
(halt)
accept
(halt)
31
Suppose 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)
32
If 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!
33
Alternatively
Decider for
Reduction
NO
Input string
YES
reject
accept
compute
Decider for
(halt)
(halt)
YES
NO
accept
reject
(halt)
(halt)
CONTRADICTION!
END OF PROOF
34
Observation 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)
35
Undecidable Problems for Turing Recognizable
languages
Let be a Turing-acceptable language
  • is empty?
  • is regular?
  • has size 2?

All these are undecidable problems
36
Let be a Turing-acceptable language
  • is empty?
  • is regular?
  • has size 2?

37
Empty language problem
Input
Turing Machine
Question
Is
empty?
Corresponding language
38
Theorem
is undecidable
(empty-language problem is unsolvable)
Proof
Reduce (membership problem) to
(empty language problem)
39
membership 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
40
We only need to build the reduction
Reduction
Compute
So that
41
Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
42
Tape of
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
43
Tape of
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
44
During this phase this area is not touched
working area of
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
45
Simply check if entered an accept state
altered
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
46
Now check input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
47
The only possible accepted string
t r o y
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
48
accepts
does not accept
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
49
Therefore
accepts
Equivalently
END OF PROOF
50
Let be a Turing-acceptable language
  • is empty?
  • is regular?
  • has size 2?

51
Regular language problem
Input
Turing Machine
Question
Is
a regular language?
Corresponding language
52
Theorem
is undecidable
(regular language problem is unsolvable)
Proof
Reduce (membership problem) to
(regular language problem)
53
membership 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
54
We only need to build the reduction
Reduction
Compute
So that
55
Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If has the form
accepts ?
then accept
56
not regular
accepts
does not accept
regular
write on tape
skip input string
run on input
yes
If has the form
accepts ?
then accept
57
Therefore
accepts
is not regular
Equivalently
END OF PROOF
58
Let be a Turing-acceptable language
  • is empty?
  • is regular?
  • has size 2?

59
Size2 language problem
Input
Turing Machine
Does have size 2?
Question
(accepts exactly two strings?)
Corresponding language
60
Theorem
is undecidable
(regular language problem is unsolvable)
Proof
Reduce (membership problem) to
(size 2 language problem)
61
membership 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
62
We only need to build the reduction
Reduction
Compute
So that
63
Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
64
2 strings
accepts
does not accept
0 strings
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
65
Therefore
accepts
has size 2
Equivalently
END OF PROOF
66
RICEs Theorem
Undecidable problems
  • is empty?
  • is regular?
  • has size 2?

This can be generalized to all non-trivial propert
ies of Turing-acceptable languages
67
Non-trivial property
A property possessed by some
Turing-acceptable languages but not all
is empty?
Example
YES
NO
NO
68
More examples of non-trivial properties
is regular?
YES
YES
NO
has size 2?
NO
NO
YES
69
Trivial 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
70
We can describe a property as the set of
languages that possess the property
If language has property then
is empty?
Example
YES
NO
NO
71
Example
Suppose alphabet is
has size 1?
NO
YES
NO
NO
72
Non-trivial property problem
Input
Turing Machine
Does have the non-trivial property ?
Question
Corresponding language
73
Rices Theorem
is undecidable
(the non-trivial property problem is unsolvable)
Proof
Reduce (membership problem) to

or
74
We examine two cases
Case 1
Examples
is empty?
is regular?
Case 2
Example
has size 2?
75
Case 1
Since is non-trivial, there is a
Turing-acceptable language such that
Let be the Turing machine that accepts
76
Reduce (membership problem) to

77
membership 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
78
We only need to build the reduction
Reduction
Compute
So that
79
Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
80
For 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
81
accepts
does not accept
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
82
Therefore
accepts
Equivalently
83
Case 2
Since is non-trivial, there is a
Turing-acceptable language such that
Let be the Turing machine that accepts
84
Reduce (membership problem) to

85
membership 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
86
We only need to build the reduction
Reduction
Compute
So that
87
Construct from
Tape of
input string
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
88
accepts
does not accept
write on tape
skip input string
run on input
yes
If
accepts ?
then accept
89
Therefore
accepts
Equivalently
END OF PROOF
Write a Comment
User Comments (0)
About PowerShow.com