wk15. vertex cover and approximation algorithm by lin, jr-shiun choi, jae sung

10
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Upload: sherman-robbins

Post on 20-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

WK15. Vertex Cover and Approximation Algorithm

By Lin, Jr-Shiun

Choi, Jae Sung

Page 2: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Vertex Cover

Definition

A set of vertices in an undirected graph where every edge connects at least one vertex. The vertex cover problem is to find a minimum size set and is NP-complete. (NIST)

Page 3: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Vertex Cover

Example

Determine the smallest subset of vertex that “Cover” the graph on the right.

1

2

3

4

5

Page 4: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Vertex Cover

Example

Determine the smallest subset of vertex that “Cover” the graph on the right.

ANS: { 1, 3, 4 }

1

2

3

4

5

Page 5: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Approximation Algorithm

Minimization problem if F , C > 1 such that you can find a solution which is

<= CA in polynomial time. then this is a approximation solution

Maximization problem if F , C >< 1 such that you can find a solution which is

>= CA in polynomial time. then this is a approximation solution

Page 6: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Approximation Algorithm for Vertex Cover Algorithm

1. choose a edge A, kick out all edges which connect to 2 ends of A ( include A).

2. choose other edges and repeat step1 until all edges are kick out.

vertex-cover that is atmost twice the size of an optimal cover (rmuhamma)

Page 7: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Euclidean TSP

Example TempP

Approx T

MST

Page 8: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Euclidean TSP

Let Optimal TSP = T

Let MST = M

(TSP=spanning tree that visits all vertex)

M should be smaller than T

T >=M

TempP=2m

Approx T <=2M<=2T

Approx T <= (1+ X )T

X is any small number, e.g. 0.000001

Page 9: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Approximation Algorithm for TSP TSP is general graph that can not be

approximated.

Claim: an algorithm can solve it.

we will show that approximation algorithm can be used to solve the Hamiltonian cycle problem

G T’<= CT

Page 10: WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung

Approximation Algorithm for TSP

GAdd

weight

Approximation Algorithm

CN+1

CN+1 <= CT5N+1<=5T (N= # of Vertex)26<=5T