Polynomial Time Reduction

  • Take any instance IaI_a in A and map to an instance IbI_b in B
  • f runs in polynomial time
  • IaI_a is yes instance \Leftrightarrow f(Ia)f(I_a)

Longest Increasing Subsequence

Let the problem in LIS be A([1,5,3,2],2)A([1, 5, 3, 2], 2) yes

Let the problem in LCS be B([1,5,3,2],[2,3,4],2)B([1, 5, 3, 2],[2, 3, 4], 2)

Let (L,k)(L, k) be an instance of LIS, construct an isntance of LCS as fllows

Let LL' be the sorted list from LL in increasing order, then (L,L,k)(L, L', k) is an instance of LCS

  • Need to prove it runs in polynomial time
  • Need to prove that a yes will be mapped to a yes and a no will be mapped to a no

ApBA\leq_p B

Thoery: the p\leq_p relation is transitive. That is if ApBA\leq_p B, BpcB\leq_p c, then ApCA\leq_p C

  • Proof that this runs in polynomial time

Suppose ff runs in O(na)O(n^a), gg runs in O(nb)O(n^b)

IA|I_A|

f(IA)=O(na)f(I_A)=O(n^a)

ApB,BpAA\leq_p B, B\leq_p A

Clique

Consider the following graph

{1,2,3}\{1, 2, 3\} is a clique

Independent set <G,k><G, k>

{2,4},{3,4}\{2, 4\},\{3, 4\}

Vertex cover <G,k><G, k>

{1,2},{1,3}\{1, 2\}, \{1, 3\}

Theory: Clique is p\leq_p for independent set

Proof:

Clique instance I=<G,k>I=<G, k>

Let G\overline{G} be the component graph of GG. Then I=<G,k>I'=<\overline{G}, k> is an instance of IS

  • Polynomial time VV
  • Yes => Yes. If I has a clique, VVV'\leq V of size kk

Then for every u,vVu, v\in V', (u,v)E(u, v)\in E. Therefore, (u,v)E(u, v)\notin \overline{E}. This proves that VV' is an IS of size kk for II'

  • II is no => II' is no
  • II' is yes => II is yes

Suppose VV' is a size kk clique for GG

Theory: IS p\leq_p Clique

  • Can be proved using the same method by reversing the function

Theory: VCpISVC\leq_p IS, ISpVCIS\leq_p VC

Lemma: In graph G=<V,E>G=<V, E>, SVS\leq V is a VCVC iff VSV\setminus S is an ISIS

Proof: (<=)

If VSV\setminus S is ISIS, then any edge (u,v)(u, v) can't have both u,vu, v in VSV\setminus S. That is, at least one of u,vu, v in SS

Thus, SS is VCVC

(=>)

If SS is VCVC, for any (u,v)E(u, v)\in E, one of u,vu, v is in SS. That is, we can't have both u,vu, v in VSV\setminus S. Therefore, VSV\setminus S is ISIS

VCISVC \leftrightarrow IS

<G,k><G,nk><G, k>\leftrightarrow <G, n-k>

HP: path

HC: cycle

Theorem: HPpHCHP\leq_p HC

GG has HP \Leftrightarrow GG' has a HC

Theorem: HCpHPHC\leq_p HP

results matching ""

    No results matching ""