33
Vertex cover problem V such that for every {u,v} E uS or vS (or both)

Vertex cover problem

  • Upload
    mohawk

  • View
    33

  • Download
    1

Embed Size (px)

DESCRIPTION

Vertex cover problem. S  V such that for every {u,v}  E u  S or v  S (or both). Vertex cover problem. S  V such that for every {u,v}  E u  S or v  S (or both). Vertex cover problem. S  V such that for every {u,v}  E u  S or v  S (or both). - PowerPoint PPT Presentation

Citation preview

Page 1: Vertex cover problem

Vertex cover problemS V such that for every {u,v} E uS or vS (or both)

Page 2: Vertex cover problem

Vertex cover problemS V such that for every {u,v} E uS or vS (or both)

Page 3: Vertex cover problem

Vertex cover problemS V such that for every {u,v} E uS or vS (or both)

OPTIMIZATION VERSION: INPUT: graph G OUTPUT: vertex cover S of minimum-size

DECISION VERSION: INSTANCE: graph G, integer k QUESTION: does G have vertex cover of size k ?

Page 4: Vertex cover problem

Vertex cover problemDECISION VERSION: INSTANCE: graph G, integer k QUESTION: does G have vertex cover of size k ?

complement of a graph G G

vertex cover S in G V-S is _________ in G ?

Page 5: Vertex cover problem

Vertex cover problemDECISION VERSION: INSTANCE: graph G, integer k QUESTION: does G have vertex cover of size k ?

complement of a graph G G

vertex cover S in G V-S is clique in G ?

Page 6: Vertex cover problem

Vertex cover problemDECISION VERSION: INSTANCE: graph G, integer k QUESTION: does G have vertex cover of size k ?

complement of a graph G G

vertex cover S in G V-S is clique in G ?

Clique Vertex Cover Vertex Cover is NP-complete

Page 7: Vertex cover problem

Vertex cover problemOPTIMIZATION VERSION: INPUT: graph G OUTPUT: vertex cover S of minimum-size

Page 8: Vertex cover problem

Vertex cover problemOPTIMIZATION VERSION: INPUT: graph G OUTPUT: vertex cover S of minimum-size

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

Algorithm 2: find a maximal matching M in G, for each {u,v}M put both u,v in S

Page 9: Vertex cover problem

Algorithm 2: find a maximal matching M in G, for each {u,v}M put both u,v in S

k edges|S| = 2k

Page 10: Vertex cover problem

Algorithm 2: find a maximal matching M in G, for each {u,v}M put both u,v in S

k edges|S| = 2k OPT k

Page 11: Vertex cover problem

Algorithm 2: find a maximal matching M in G, for each {u,v}M put both u,v in S

k edges|S| = 2k

OPT k|S| 2 OPT

2-approximation algorithm

Page 12: Vertex cover problem

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

n

Page 13: Vertex cover problem

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

n/2

Page 14: Vertex cover problem

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

Page 15: Vertex cover problem

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

n/2 n/3

Page 16: Vertex cover problem

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

n/k k=2

n=

Page 17: Vertex cover problem

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

n/k k=2

n (n/k – 1) (n ln n) – 2n =(n ln n)

k=2

n

OPT = n

Algorithm 1 has approximation ratio (ln n)

Page 18: Vertex cover problem

Vertex cover problemOPTIMIZATION VERSION: INPUT: graph G OUTPUT: vertex cover S of minimum-size

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat

Algorithm 2: find a maximal matching M in G, for each {u,v}M put both u,v in S 2-approximation

ln n)-approximation

Page 19: Vertex cover problem

Hamiltonian cycle problemHamiltonian cycle in (undirected) graph G=(V,E) C=u1,u2,...,un, such that every vertex vV occurs in C exactly once ui,ui+1 E for i=1,...,n-1 u1,un E

Page 20: Vertex cover problem

Hamiltonian cycle problemHamiltonian cycle in (undirected) graph G=(V,E) C=u1,u2,...,un, such that every vertex vV occurs in C exactly once ui,ui+1 E for i=1,...,n-1 u1,un E

Page 21: Vertex cover problem

Hamiltonian cycle problemHamiltonian cycle in (undirected) graph G=(V,E) C=u1,u2,...,un, such that every vertex vV occurs in C exactly once ui,ui+1 E for i=1,...,n-1 u1,un E

NP-complete problem

Page 22: Vertex cover problem

Travelling salesman (TSP)INSTANCE: complete graph with edge weights G=(V,E,w)

SOLUTION: hamiltonian cycle C in G

OBJECTIVE: sum of the weights of the cycle C

Page 23: Vertex cover problem

Travelling salesman (TSP)INSTANCE: complete graph with edge weights G=(V,E,w)

SOLUTION: hamiltonian cycle C in G

OBJECTIVE: sum of the weights of the cycle C

Page 24: Vertex cover problem

Travelling salesman (TSP)INSTANCE: complete graph with edge weights G=(V,E,w)

SOLUTION: hamiltonian cycle C in G

OBJECTIVE: sum of the weights of the cycle C

Is there an approximation algorithm ?

Page 25: Vertex cover problem

Metric TSPINSTANCE: complete graph with edge weights G=(V,E,w)

SOLUTION: cycle C in G, repeated vertices,edges allowed

OBJECTIVE: sum of the weights of the cycle C

Is there an approximation algorithm ?

Page 26: Vertex cover problem

Metric TSPd(u,v) = cheapest way of getting from u to v

d(u,v) = d(v,u)d(u,v) d(u,w)+ d(w,u)

Page 27: Vertex cover problem

Metric TSPcompute the d(u,v)compute MST T weight(T) OPT

Page 28: Vertex cover problem

Metric TSPcompute the d(u,v)compute MST T weight(T) OPT

2-approximation algorithm

Page 29: Vertex cover problem

Euler tourwhen can a graph be drawn withoutlifting a pen, and without drawing thesame edge twice?

Page 30: Vertex cover problem

Euler tourwhen can a graph be drawn withoutlifting a pen, and without drawing thesame edge twice?

if we want to end where we started?

Page 31: Vertex cover problem

Metric TSPcompute the d(u,v)compute MST Tfind a min-weight perfect matching on odd-degree vertices of T

weight(T) OPTweight(M) OPT/2

1.5-approximation algorithm

Page 32: Vertex cover problem

Optimization problemsINSTANCE

FEASIBLE SOLUTIONS

c: SOLUTIONS R+

OPT= min c(T)T FEASIBLE SOLUTIONS

APPROXIMATION ALGORITHM INSTANCE T

c(T) OPT

Page 33: Vertex cover problem

PTASPolynomial-time approximation schemepolynomial-time (1+)-approximation algorithm for any constant >0

FPTASFully polynomial-time approximation scheme

(1+)-approximation algorithm running in time poly(INPUT,1/)

APPROXIMATION ALGORITHM INSTANCE T

c(T) OPT