Karp reductions – Definition

18
1 Karp reductions – Definition IP 250, AB 42 A is polynomial-time reducible to B (denote A p B) If there exists a poly-time- computable function f:** s.t. for every w wA f(w)B

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 Presentation

Transcript of Karp reductions – Definition

Page 1: Karp reductions – Definition

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

2

Karp Reductions –Ilustrated

*

A

* - A

f

* - B

B

*

F(A)

F(*-A)

Page 3: Karp reductions – Definition

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

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

• 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

• 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

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

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

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

10

Observation

• P, PSPACE and EXPTIME are closed under polynomial-time Karp reductions

Theorem:

• Do it yourself !!

Proof:

Page 11: Karp reductions – Definition

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

• 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

• 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

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

• L’ is polynomial-time Cook reducible to L, if L’ PL.

Cook Reduction:

15

Cook reduction - II

Page 16: Karp reductions – Definition

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

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

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