Upload
boyce
View
40
Download
1
Embed Size (px)
DESCRIPTION
Applied Computer Science II Chapter 5: Reducability. Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany. Overview. Examine several other undecidable problems Reducibility - PowerPoint PPT Presentation
Citation preview
Applied Computer Science IIChapter 5: Reducability
Prof. Dr. Luc De Raedt
Institut für InformatikAlbert-Ludwigs Universität Freiburg
Germany
Overview
• Examine several other undecidable problems
• Reducibility– Basic method to relate two problems to one
another in the light of “(un)solvability”– Reducibility is used for various types of
“unsolvability”, cf. complexity
• Mapping reducibility• The Post Correspondence Problem PCP
Reducability to compute
: map onto problem for
1. to map onto ( )
2. to compute ( )
3. return ( )
determine whether an NFA accepts
Assume you do not know an alg
w A
B
w f w
f w B
f w B
A w
Goal
Method
Example
Method
orithm that decides whether
an NFA accepts a string, but that you have an algorithm called that
decides whether a DFA accepts a string
You can obtain one using reduction
1. Transfor
P
m < , where is NFA into < ( ),
2. Run on < ( ),
3. Return answer of
A w A dfa A w
P dfa A w
P
Reductions
and proofs by contradiction
To show that is not solvable
Suppose you know that is not solvable.
Reduce to
Conclude that is not solvable
(because solvability would imply that can be s
A
B
B A
A
A B
Reductions
olved)
Undecidable problems from language theory
{ , | is a TM and halts on input }
is undecidable
173
TM
TM
HALT M w M M w
HALT
p
Theorem
Proof
Computable functions
• Cf. Loop-programs
• Examples : – f(<m,n>)=m+n– f(<M>) = M’ where M’ accepts the same
language as TM M except that it does not move its head against the left “wall”; if M is not a TM then return epsilon
* *A function : is if
there is a deterministic Turing Machine that on every
input halts with just
com
( ) on its tape.
putablef
T
w f w
If and is decidable, then is decidable
Let be a decider for
and the reduction from to
mA B B A
M B
f A B
Theorem
Proof
If and is undecidable, then is undecidablemA B A BCorollary
TM m TMA HALTTheorem
{ | is a TM and L( ) }
is undecidable ( )
174
TM
TM TM m TM
E M M M
E A E
p
Theorem
Proof
{ | is a TM and L( ) is a regular language}
is undecidable ( )
175
TM
TM TM m TM
REGULAR M M M
REGULAR A REGULAR
p
Theorem
Proof n
*
Recognize {0 1 | 0} if does not accept
and otherwise
n n M w
{ 1, 2 | 1 and 2 are TMs and ( 1) ( 2) }
is undecidable ( )
TM
TM TM m TM
EQ M M M M L M L M
EQ E EQ
Theorem
Reductions via computation histories
• Deterministic versus non-deterministic machines
• From now on we focus on deterministic machines
1 1
1
Let be a TM and a string
An for is
a sequence of configurations ,..., where is the starting configuration
of on ,
a
each corresponds to a legal transition,
a
ccepting computation history
n
m
i i
M w
M
C C C
M w C C
rejecting computation histor
d is an accepting configuration
A is similar except that it ends in
a rejecting configurat
y
ion.
mC
Linear bound automaton
Only limited memory available
A l is a restricted type of TM
where the tape head is not permitted to move off the portion
of the tape
inear bounde
containing t
d automato
he in
n
put.
LBA
• LBAs are quite powerful, e.g.
Deciders for , , , are all LBAsDFA CFG DFA CFGA A E E
{ , | is an LBA that accepts } is decidable
Let be an LBA with states, symbols in its tape alphabet,
There are exactly . . distinct configu
contra
ration
st
s of
this w
f
ithLB
n
T
A
MA
A M w M w
M q g
q n g M
Theorem
Lemma
or a tape of length n
• So, LBAs are fundamentally different than TMs !
{ | is an LBA and L( ) }
is undecidable ( )
179 180
LBA
LBA TM LBA
E M M M
E A E
p
Theorem
Proof
{ | is an accepting computation history of on }B v v M w
*
is undecidable
{ | is a CFG and ( ) }
CFG
CFG
ALL
ALL G G L G
Theorem
{ | is an instance of the Post correspondence problem
with a match that starts with the first domino}
MPCP P P
TM mA MPCPTheorem
0 1
#1. Put into P' as the first domino
# ... #
2. For every , and every , , where
if ( , ) ( , , ) put into P'
3. For every , , and every , , where
n
reject
reject
q w w
a b q r Q q q
qaq a r b R
br
a b c q r Q q q
if ( , ) ( , , ) put into P'
4. For every
put into P'
# #5. put and into P'
# #
6. For every
put and into P'
7
accept accept
accept accept
cqaq a r b L
rcb
a
a
a
a
aq q a
q q
. Finally, add
##
#acceptq
mMPCP PCPTheorem
Transitivity implies that is undecidablePCP
If and is Turing recognizable, then is Turing-recognizable
Let be a TM for
and the reduction from to
mA B B A
M B
f A B
Theorem
Proof
If and is not Turing recognizable,
then is not Turing recognizable
Usually, will be
Note also that if and only if
m
TM
m m
A B A
B
A A
A B A B
Corollary
Theorem 5.24 is neither Turing recognizable
nor co-Turing recognizable
1.
2.
TM
TM m TM
TM m TM
EQ
A EQ
A EQ
Theorem
Proof
Conclusions
• Examine several other undecidable problems
• Reducibility– Basic method to relate two problems to one
another in the light of “(un)solvability”– Reducibility is used for various types of
“unsolvability”, cf. complexity
• Mapping reducibility• The Post Correspondence Problem PCP