Information about Approximation Algorithms

A talk about approximation algorithms I gave for a theoretical course.

Many problems with practical signiﬁcance are NP-complete. Unlikely to ﬁnd a polynomial-time solution algorithm (nobody knows). 2

Work around NP completeness • Small Inputs: stay with exponential algorithm! • Often special cases are solvable in polynomial time. • Find a near-optimal solution in polynomial time that is good enough. 3

Approximation Algorithms • For a lot of practical applications near-optimal solutions are perfectly acceptable. • Algorithms that return near-optimal solutions for a problem are called approximation algorithms. • Want to study polynomial time approximation algorithms for NP-complete problems. 4

What is ‘’good enough’’? For an approximation algorithm A of input of size n the cost of solution produced by A is C Approximation Ratio of A is p(n) C C∗ max , ∗ C ≤ p(n) C 5

An approximation algorithm with ratio p(n) is called a p(n)-approximation algorithm. 6

List of 21 Problems that are NP-complete Richard Karp, 1972 . . . • CLIQUE • SET PACKING • VERTEX COVER • SET COVERING • FEEDBACK NODE SET • FEEDBACK ARC SET • KNAPSACK • PARTITION • MAX-CUT . . . 7

Vertex Cover Problem 8

Vertex Cover a subset U of all vertices V, such that every edge in E is covered. b c d a e f g Covered Edge an edge e = (vi, vj) is covered if ei or ej is chosen. 9

Minimum Vertex Cover Problem Input: a Graph G = (V, E) Output: the smallest subset U ⊆ V such that ∀e = (vi , vj ) ∈ E, i = j vi ∈ U or vj ∈ U 10

b c d a e f g Input: G 11

b c d a e f g 12

b c d a e f g 13

b c d a e f g Output: C = {b, d, e} 14

Greedy-Vertex-Cover(G) 1 C = {} 2 do chose v in V with max deg 3 C = C + {v} 4 remove v and every edge 5 adjacent to v 6 until all edges covered 7 return C 15

b c d a e f g 16

b c d a e f g 17

b c d a e f g 3 possible choices here determines the outcome 18

b c d a e f g 19

b c d a e f g 20

b c d a e f g Goodness of solution depends on the (random) choices made. 21

Approx-Vertex-Cover(G) 1 C = {} 2 E’ = E[G] 3 while E’ != {} 4 do let (u,v) be some e in E’ 5 C = C + {u, v} 6 remove from E’ every edge 7 incident to either u or v 8 end do 9 end while 10 return C 22

Approx-Vertex-Cover(G) 1 C = {} 2 E’ = E[G] 3 while E’ != {} 4 do let (u,v) be some e in E’ 5 C = C + {u, v} 6 remove from E’ every edge 7 incident to either u or v 8 end do 9 end while 10 return C O(|V | + |E|) 23

b c d a e f g C = {} E = {(a-b), (b-c), (c-e), (c-d),(e-f),(e-d), (f-d), (d-g)} 24

b c d a e f g C = {} E = {(a-b), (b-c), (c-e), (c-d),(e-f),(e-d), (f-d), (d-g)} 25

b c d a e f g C = {b, c} E = {(e-f),(e-d), (f-d), (d-g)} 26

b c d a e f g C = {b, c} E = {(e-f),(e-d), (f-d), (d-g)} 27

b c d a e f g C = {b, c, e, f} E = {(d-g)} 28

b c d a e f g C = {b, c, e, f} E = {(d-g)} 29

b c d a e f g C = {b, c, e, f, d, g} E = {} 30

C = {b, c, e, f, d, g} |C| = 6 = 2 · 3 ≤ 2 · |C ∗ | the algorithm found a 2-approximation. b c d a e f g 31

Approx-Vertex-Cover(G) 1 C = {} 2 E’ = E[G] 3 while E’ != {} 4 do let (u,v) be some e in E’ 5 C = C + {u, v} 6 remove from E’ every edge 7 incident to either u or v 8 end do 9 end while 10 return C C is a vertex cover of G Proof: The algorithm loops until every edge in E’ = E[G] has been covered (removed) by some vertex in C. 32

Approx-Vertex-Cover(G) 1 C = {} 2 E’ = E[G] 3 while E’ != {} 4 do let (u,v) be some e in E’ 5 C = C + {u, v} 6 remove from E’ every edge 7 incident to either u or v 8 end do 9 end while 10 return C C is at most 2 times C* Proof: Let A be the set of edges picked by algorithm step 4. C* must include at least one endpoint of each edge in set A. No two edges share an endpoint, since all adjacent edges are deleted after picking in line 6. Thus no two edges in A are covered by the same vertex in C*. |C ∗ | ≥ |A| 33

Approx-Vertex-Cover(G) 1 C = {} 2 E’ = E[G] 3 while E’ != {} 4 do let (u,v) be some e in E’ 5 C = C + {u, v} 6 remove from E’ every edge 7 incident to either u or v 8 end do 9 end while 10 return C C is at most 2 times C* Proof: Each execution of line 4 picks an edge for which neither of the endpoints are in C already. |C| = 2 · |A| |C ∗ | ≥ |A| 34

Can we do better? 35

Maximal Matching b c d a e f g Input: a graph G=(V, E) Output: a maximal subset E’ of E, such that no two edges share a common vertex. 36

The approximation algorithm produces a maximal matching 37

Alternative Formulation of Vertex Cover b c d a e f g Input: a graph G=(V, E) Output: the endpoints of a maximal matching 38

In Bipartite Graphs: Maximal Matching = Minimal Vertex Cover Stated as König’s Theorem in 1914, proven in 1916. 39

Complete bipartite Graph with n vertices 40

Is a tight example, has maximal matching of n. 41

Hence |C| = 2n. So 2 is a tight bound! 42

No better algorithm than the 2-approximation algorithm for computing the vertex cover in polynomial time is known so far. 43

A parallel algorithm to compute the 2-approximate minimum vertex cover in O(log3|E|) with O(|V|+|E|) processors was discovered in 2006. 44

Set Cover Problem 45

The Set Cover Problem Input: a ﬁnite Set X Output: a family F of subsets of X, such that every element of X belongs to at least one subset in F: X = ∪S∈F S 46

Set X S1 S4 S2 S6 S3 S5 Subsets S1, S2, S3, S4, S5, S6 47

Set X S1 S4 S2 S6 S3 S5 Minimum-Size Cover: S3, S4, S5 48

Greedy-Set-Cover(G) 1 U = X 2 C = {} 3 while U != {} do 4 select an S in F 5 that maximizes |S ∩U| 6 U = U-S 7 C = C ∪{S} 8 end while 9 return C O(|X| · |F |) 49

Greedy-Set-Cover is an (ln |X|+1)-approximation algorithm. 50

Can we do better? 51

Open research question 52

Discussion 53

In computer science and operations research, approximation algorithms are algorithms used to find approximate solutions to optimization problems.

Read more

Preface This book is designed to be a textbook for graduate-level courses in approximation algorithms. After some experience teaching minicourses in the ...

Read more

Vijay V. - Approximation Algorithms jetzt kaufen. ISBN: 9783540653677, Fremdsprachige Bücher - Kombinatorik

Read more

Interesting discrete optimization problems are everywhere, from traditional operations research planning problems, such as scheduling, facility location ...

Read more

LP: 5: SWS: 2+1+1: Ort & Zeit: Lecture: Tuesday, 15:00 - 16:30 Room PK 4.4 Exercises: Thursday, 09:45 - 11:15, Room PK 4.4, start: TBA. Small Tutorial: TBA.

Read more

Review: Approximation Algorithms User Review - Goodreads. the best you can do for approximation algorithms. it's pretty readable and complete. Read full review

Read more

Approximation Algorithms Approximation Algorithms 1 VIJAY V. VAZIRANI VAZIRANI Approximation Algorithms VIJAY V. VAZIRANI. Created Date: 9/23/2002 6:47:42 ...

Read more

From the reviews: "Approximation algorithms is an area where much progress has been made in the last 10 years. The book under review is a very good help ...

Read more

Approximation Algorithms [Vijay V. Vazirani] on Amazon.com. *FREE* shipping on qualifying offers. Covering the basic techniques used in the latest research ...

Read more

Approximation Algorithms for NP-hard problems edited by Dorit S. Hochbaum, more info. mailing list ; There is a mailing list. We will distribute the ...

Read more

## Add a comment