1 / 22

Approximation Algorithms

Approximation Algorithms . Department of Mathematics and Computer Science Drexel University. Today’s Lecture:. Simple Algorithm for Bin-Packing Maximum Cut Approximation algorithm for graph coloring Approximation algorithm for set cover. The Bin-Packing Problem:.

tess
Download Presentation

Approximation Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Approximation Algorithms Department of Mathematics and Computer Science Drexel University

  2. Today’s Lecture: • Simple Algorithm for Bin-Packing • Maximum Cut • Approximation algorithm for graph coloring • Approximation algorithm for set cover

  3. The Bin-Packing Problem: • INSTANCE: Finite set I of rational numbers {a1,…,an} with ai (0,1] • SOLUTION: Partition {B1,…,Bk} of I into k bins such that the sum of the numbers in each bin is at most 1 • MEASURE: Cardinality of the partition, i.e., k

  4. The Algorithm: • Polynomial-time 2-approximation algorithm for MINIMUM BIN PACKING (Next Fit algorithm) begin for each number a if a fits into the last open bin then assign a to this bin else open new bin and assign a to this bin return f end.

  5. Theorem: • Number of bins used by the algorithm is at most 2A, where A is the sum of all numbers. • Proof: • For each pair of consecutive bins, the sum of the number included in these two bins is greater than 1. • Each feasible solution uses at least A bins • Best case each bin is full (i.e., the sum of its numbers is 1). • Performance ratio is at most 2.

  6. Tightness: • Let I={1/2,1/2n,1/2,1/2n,…,1/2,1/2n} contain 4n items.

  7. Maximum Cut: • INSTANCE: Graph G=(V,E) • SOLUTION: Partition of V into disjoint sets V1 and V2 • MEASURE: Cardinality of the cut, i.e., the number of edges with one endpoint in V1 and one endpoint in V2

  8. The Algorithm: • Polynomial-time 2-approximation algorithm for MAXIMUM CUT begin V1:=ø; repeat if exchanging one node between V1 and V2 =V- V1 improves the cut then perform the exchange; until a local optimum is reached; return f end.

  9. Theorem: • We prove that any local optimum contains at least half of the m edges • Notation: • c= # of edges of the cut • i= # of edges inside V1 • o= # of edges outside V1 • m=c+i+o, that is, i+o=m-c • For any node v, • i(v)= # of edges between v and a node in V1 • o(v)= # of edges between v and a node not in V1

  10. Proof: • V1 is a local optimum: for any vV1, i(v)-o(v)  0 and, for any v not in V1, o(v)-i(v)  0. • Summing over all nodes in V1, we have 2i-c  0 • Summing over all nodes not in V1, we have 2o-c  0 • That is, i+o-c  0 • That is, m-2c  0 • That is, c m/2

  11. Graph Vertex Coloring: • Given a graph G=(V,E), on n vertices and m edges, find a mapping from vertex set to k-colors such that no two end-points of an edge will receive the same color. • The Decision problem: • Given an instance of GVC, and an integer k* , is it possible to k* color the vertices of the graph? • Optimization problem: • Given an instance of GVC, find the smallest possible value for k* , for which a vertex coloring of G exists. • Input-dependent Optimization problem: • Same assumptions as optimization version, except we would like to use as few colors as possible to find the actual mapping.

  12. The Algorithm: • The following is a polynomial-time n/logn-approximation algorithm for MINIMUM GRAPH COLORING begin i:=0; U:=V; while U ødo begin i:=i+1;V[i]:=ø;W:=U;H:=graph induced by W; while W  ø do begin v=node of minimum degree in H; insert v inV[i]; delete v and its neighbors from W; U:=U-V[i] end end end.

  13. What is the Algorithm doing? • During each iteration, we will look at the left over from the graph U (initially U denotes the vertex set of G) and try to use a new colors to color a sub graph W. • Once we are done with sub-graph W, it will be removed from the graph, i.e. the graph is shrinking after this step, (U=U-V[i]). • But we will need to use new colors for the rest of U. • The inner loop will identify all vertices receiving a particular color “i”. • The outer-loop will identify number of required colors for whole G.

  14. Performance Guarantee: • To begin with, if we know the graph is k-colorable, and we show the algorithm uses at most 3|V|/logk|V| colors: • At any iteration of the inner loop, H the induced graph on vertex set W is k-colorable (since the whole graph is k-colorable). • By pigenwhole principle, it contains an independent set of at least |W|/k nodes of degree at most |W|(k-1)/k. • As a result at least |W|/k nodes will be carried to next iteration of inner loop, i.e., during j-the iteration of inner loop the size of the set is at least |W|/kj . Consequently, there is at least logk|W|iterations for inner loop, i.e. |V[i]| is at least logk|U|

  15. Continued: • Observe that U is a shirking set, starts with the whole V and eventually becomes empty. • At each step, the size of U goes down by at least logk|U| (the vertices receiving color i). • During the iterations for which |U|  |V|/logk|V|, we have logk|U|(1 /2)logk|V|. • As a result the first time |U| < |V|/logk|V| we have only used at most 2|V|/logk|V| in outer-loop. • To color the left-over|V|/logk|V|,we will use at most |V|/logk|V| new color. • The is the algorithm uses at most 3|V|/logk|V| colors for G.

  16. Finally: • The algorithms uses 3n/logoptn, that is equal to 3nlog OPT/log n. • The perfoamnce gurantee of the algorithm is: 3n/log n.

  17. Minimum Set-Cover: • INSTANCE: Collection C of subsets of a finite setS. • SOLUTION: A set cover for S, i.e., a subset C’ of C such that every element in S belongs to at least one member of C’ • MEASURE: |C’|

  18. Johnson’s algorithm : • Polynomial-time logarithmic approximation algorithm for MINIMUM SET COVER begin U:=S; C’:=ø; for any ci do c’i := ci ; repeat i:=index of c’ with maximum cardinality; insert ci in C’; U := U-{elements of c’i }; delete all elements of ci from all c’; untilU:=ø end.

  19. Performance Guarantee: • We prove that the performance ratio of the algorithm is at most ∑1 ik (1/i) where k is the maximum cardinality of the sets in C • Let a1 ,...,a|C’| be the sequence of indices obtained by the algorithm • Let cji be the surviving part of ci before index aj has been chosen • The intersection of ci and cjaj is equal to cji - cj+1i • li denote largest index j such that cji is not empty

  20. Theorem 1: • For any i, • H(|ci|) 1 j |C’|(|ci Icjaj |/|cjaj|) whereH(n)= 1 i n(1/i). • Proof:

  21. Theorem 2: For any set cover C’’, ci C’’1 j  |C’|(|ciIcjaj|/|cjaj|)  |C’| Proof:

  22. Finally:

More Related