karp reductions – definition
DESCRIPTION
SIP 250, AB 42. Karp reductions – Definition. f. Karp Reductions – Ilustrated. B. F(A). A. F( *-A ). * - A. * - B. *. *. Reducing. Reductions and Efficiency. HAMPATH p HAMCYCLE. u. Check list. Closeness Under Reductions: Definition. Observation. SIP 250, AB 88. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/1.jpg)
1
Karp reductions –DefinitionSIP 250, AB 42
A is polynomial-time reducible to B(denote ApB)
If there exists
a
poly-time-computable
function f:**
s.t. for every
wwA f(w)B
![Page 2: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/2.jpg)
2
Karp Reductions –Ilustrated
*
A
* - A
f
* - B
B
*
F(A)
F(*-A)
![Page 3: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/3.jpg)
3
Don’t Panic
Come up with a reduction-function f
Show f is polynomial time computable
• wA f(w)B• wA f(w)B
Prove f is a reduction, i.e., show:
• We’ll use reductions that, by default, would
be of this type, which is called:
• Polynomial-time mapping reduction
• Polynomial-time many-one reduction
• Polynomial-time Karp reduction
!
Reducing
![Page 4: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/4.jpg)
4
Reductions and Efficiency
Polynomial-time algorithm for A
fPolynomial-time algorithm for BW f(W)
f(w)B wA
f(w)B wA
![Page 5: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/5.jpg)
• A directed graph G=(V,E)
Hamiltonian Path Instance:
• Is there a path in G, which goes through every vertex exactly once?
Decision Problem:
5
![Page 6: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/6.jpg)
• a directed graph G=(V,E).
Hamiltonian Cycle Instance:
• Is there a simple cycle in G that paths through each vertex exactly once?
Decision Problem:
6
![Page 7: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/7.jpg)
G p G
uVEuVEVf ,,
HAMPATH p HAMCYCLE
• Given a Hamiltonian path (v0,…,vn) in G, (v0,…,vn,u) is a Hamiltonian cycle in G’
Completeness:
• Given a Hamiltonian cycle (v0,…,vn,u) in G’, removing u yields a Hamiltonian path.
Soundness:
7
u
![Page 8: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/8.jpg)
8
Check list
Come up with a reduction-function f
Show f is polynomial time computable
• wHAMPATH f(w)HAMCYCLE • wHAMPATH f(w)HAMCYCLE
Prove f is a reduction, i.e., show:
?
![Page 9: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/9.jpg)
A complexity class C is closed under poly-time reductions if:
• L is reducible to L’ and L’C L is also in C.
9
Closeness Under Reductions: Definition
L ≤p L’
C
C
![Page 10: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/10.jpg)
10
Observation
• P, PSPACE and EXPTIME are closed under polynomial-time Karp reductions
Theorem:
• Do it yourself !!
Proof:
![Page 11: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/11.jpg)
11
Log-space ReductionsSIP 250, AB 88
A is log-space reducible to B(denote ALB)
If there exists
a
log-space-computable
function f:**
s.t. for every
wwA f(w)B
• L, P, PSPACE and EXPTIME are closed under log-space reductions.
Theorem:
i.e., log-space
TM that outputs
f(w) on input w
f is a log-space reduction of A to B
![Page 12: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/12.jpg)
• For a class C of decision problems and a language L, L is C-complete if LC and L’C L’ is reducible to L.
Definition: C-complete
• If C,C’ are closed under reductions and L is complete for classes C, C’ C=C’
Theorem:
Completeness
![Page 13: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/13.jpg)
• Assuming an efficient procedure that decides B, construct one for A.
Cook Reduction:
13
Cook reduction
Karp is a special case of Cook
reduction:
It allows only 1 call to B,
whose outcome must be
outputted as is.
![Page 14: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/14.jpg)
14
Oracle machines
An oracle Turing machine M has one extra “query tape” and three special states qquery,qyes,qno.
To execute M we specify a language O {0,1}*, that is used as the “oracle”.
When MO enters qquery, it either moves to qyes or qno according to whether the string on the query tape belongs to O or not.
An oracle call counts as one step.
![Page 15: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/15.jpg)
• L’ is polynomial-time Cook reducible to L, if L’ PL.
Cook Reduction:
15
Cook reduction - II
![Page 16: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/16.jpg)
16
Cook reduction: an example
Claim: L* PL
Proof: On input x {0,1}n, Create a graph G=(V,E) with n vertices and an edge (i,j) E iff xi+1,..,xj L.
Solve the directed stConnectivity for G=(V,E),s=0,t=n.
Let L be a languageL* = { x | x=x1..xk , xi L }
![Page 17: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/17.jpg)
17
Diagonalization yet again
Claim: For every oracle O, PO ≠EXPO.Proof: Same proof. Simulating machine simulates also the oracle calls.
Coroolary: If there exists an oracle O such that AO =BO, then one cannot separate A from B with a diagonalization argument.Prove: PPSPACE =PSPACEPSPACE
![Page 18: Karp reductions – Definition](https://reader038.vdocuments.pub/reader038/viewer/2022102617/5681423f550346895dae622f/html5/thumbnails/18.jpg)
Discussed types of reductions:• Cook vs. Karp reductions• Poly-time vs. log-space
Defined:• “completeness”
18
Summary
Fin
d
L and C s.t. L is C-complete