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 L′L' 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

A≤pBA\leq_p B

Thoery: the ≤p\leq_p relation is transitive. That is if A≤pBA\leq_p B, B≤pcB\leq_p c, then A≤pCA\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)

A≤pB,B≤pAA\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, V′≤VV'\leq V of size kk

Then for every u,v∈V′u, v\in V', (u,v)∈E(u, v)\in E. Therefore, (u,v)∉E‾(u, v)\notin \overline{E}. This proves that V′V' is an IS of size kk for I′I'

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

Suppose V′V' 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: VC≤pISVC\leq_p IS, IS≤pVCIS\leq_p VC

Lemma: In graph G=<V,E>G=<V, E>, S≤VS\leq V is a VCVC iff V∖SV\setminus S is an ISIS

Proof: (<=)

If V∖SV\setminus S is ISIS, then any edge (u,v)(u, v) can't have both u,vu, v in V∖SV\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 V∖SV\setminus S. Therefore, V∖SV\setminus S is ISIS

VC↔ISVC \leftrightarrow IS

<G,k>↔<G,n−k><G, k>\leftrightarrow <G, n-k>

HP: path

HC: cycle

Theorem: HP≤pHCHP\leq_p HC

GG has HP ⇔\Leftrightarrow G′G' has a HC

Theorem: HC≤pHPHC\leq_p HP

results matching ""

    No results matching ""