 # Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)

## Presentation on theme: "Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)"— Presentation transcript:

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) 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 ?

Vertex cover problem DECISION 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 ?

Vertex cover problem DECISION 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 ?

Vertex cover problem DECISION 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

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

Vertex cover problem OPTIMIZATION 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

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

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

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

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

Algorithm 1: pick a vertex v with the largest degree, put v in S, remove v and adjacent edges from G, repeat  n/2 

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

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 

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 =

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)

Vertex cover problem OPTIMIZATION 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

Hamiltonian cycle problem Hamiltonian cycle in (undirected) graph G=(V,E) C=u 1,u 2,...,u n, such that every vertex v  V occurs in C exactly once u i,u i+1  E for i=1,...,n-1 u 1,u n  E

Hamiltonian cycle problem Hamiltonian cycle in (undirected) graph G=(V,E) C=u 1,u 2,...,u n, such that every vertex v  V occurs in C exactly once u i,u i+1  E for i=1,...,n-1 u 1,u n  E

Hamiltonian cycle problem Hamiltonian cycle in (undirected) graph G=(V,E) C=u 1,u 2,...,u n, such that every vertex v  V occurs in C exactly once u i,u i+1  E for i=1,...,n-1 u 1,u n  E NP-complete 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

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

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 ?

Metric TSP INSTANCE: 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 ?

Metric TSP d(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)

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

Metric TSP compute the d(u,v) compute MST T weight(T)  OPT 2-approximation algorithm

Euler tour when can a graph be drawn without lifting a pen, and without drawing the same edge twice?

Euler tour when can a graph be drawn without lifting a pen, and without drawing the same edge twice? if we want to end where we started?

Metric TSP compute the d(u,v) compute MST T find a min-weight perfect matching on odd-degree vertices of T weight(T)  OPT weight(M)  OPT/2 1.5-approximation algorithm

Optimization problems INSTANCE FEASIBLE SOLUTIONS c: SOLUTIONS  R + OPT= min c(T) T  FEASIBLE SOLUTIONS  APPROXIMATION ALGORITHM INSTANCE  T c(T)  OPT

PTAS Polynomial-time approximation scheme polynomial-time (1+  )-approximation algorithm for any constant  >0 FPTAS Fully polynomial-time approximation scheme (1+  )-approximation algorithm running in time poly(INPUT,1/  )  APPROXIMATION ALGORITHM INSTANCE  T c(T)  OPT

Download ppt "Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)"

Similar presentations