Polynomial Time Reduction

- Take any instance Ia in A and map to an instance Ib in B
- f runs in polynomial time
- Ia is yes instance ⇔ f(Ia)

Longest Increasing Subsequence
Let the problem in LIS be A([1,5,3,2],2) yes
Let the problem in LCS be B([1,5,3,2],[2,3,4],2)
Let (L,k) be an instance of LIS, construct an isntance of LCS as fllows
Let L′ be the sorted list from L in increasing order, then (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≤pB
Thoery: the ≤p relation is transitive. That is if A≤pB, B≤pc, then A≤pC

- Proof that this runs in polynomial time
Suppose f runs in O(na), g runs in O(nb)
∣IA∣
f(IA)=O(na)
A≤pB,B≤pA

Clique
Consider the following graph

{1,2,3} is a clique
Independent set <G,k>
{2,4},{3,4}
Vertex cover <G,k>
{1,2},{1,3}
Theory: Clique is ≤p for independent set
Proof:
Clique instance I=<G,k>
Let G be the component graph of G. Then I′=<G,k> is an instance of IS
- Polynomial time V
- Yes => Yes. If I has a clique, V′≤V of size k
Then for every u,v∈V′, (u,v)∈E. Therefore, (u,v)∉E. This proves that V′ is an IS of size k for I′
- I is no => I′ is no
- I′ is yes => I is yes
Suppose V′ is a size k clique for G
Theory: IS ≤p Clique
- Can be proved using the same method by reversing the function
Theory: VC≤pIS, IS≤pVC
Lemma: In graph G=<V,E>, S≤V is a VC iff V∖S is an IS
Proof: (<=)
If V∖S is IS, then any edge (u,v) can't have both u,v in V∖S. That is, at least one of u,v in S
Thus, S is VC
(=>)
If S is VC, for any (u,v)∈E, one of u,v is in S. That is, we can't have both u,v in V∖S. Therefore, V∖S is IS
VC↔IS
<G,k>↔<G,n−k>
HP: path
HC: cycle
Theorem: HP≤pHC

G has HP ⇔ G′ has a HC
Theorem: HC≤pHP
