Presentation is loading. Please wait.

Presentation is loading. Please wait.

Approximation Algorithms Department of Mathematics and Computer Science Drexel University.

Similar presentations


Presentation on theme: "Approximation Algorithms Department of Mathematics and Computer Science Drexel University."— 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 {a 1,…,a n } with a i  (0,1]  SOLUTION: Partition {B 1,…,B k } 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 V 1 and V 2  MEASURE: Cardinality of the cut, i.e., the number of edges with one endpoint in V 1 and one endpoint in V 2

8 The Algorithm:  Polynomial-time 2-approximation algorithm for MAXIMUM CUT begin V 1 :=ø; repeat if exchanging one node between V 1 and V 2 =V- V 1 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 V 1 o= # of edges outside V 1  m=c+i+o, that is, i+o=m-c For any node v,  i(v)= # of edges between v and a node in V 1  o(v)= # of edges between v and a node not in V 1

10 Proof:  V 1 is a local optimum: for any v  V 1, i(v)-o(v)  0 and, for any v not in V 1, o(v)-i(v)  0.  Summing over all nodes in V 1, we have 2i-c  0  Summing over all nodes not in V 1, 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.

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|/log k |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|/k j. Consequently, there is at least log k |W| iterations for inner loop, i.e. |V[i]| is at least log k |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 log k |U| (the vertices receiving color i).  During the iterations for which |U|  |V|/log k |V|, we have log k |U|  (1 /2)log k |V|.  As a result the first time |U| < |V|/log k |V| we have only used at most 2|V|/log k |V| in outer-loop.  To color the left-over |V|/log k |V|,we will use at most |V|/log k |V| new color.  The is the algorithm uses at most 3|V|/log k |V| colors for G.

16 Finally:  The algorithms uses 3n/log opt n, that is equal to 3n log 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 set S.  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 c i do c’ i := c i ; repeat i:=index of c’ with maximum cardinality; insert c i in C’; U := U-{elements of c’ i }; delete all elements of c i from all c’; until U:=ø 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 a 1,...,a |C’| be the sequence of indices obtained by the algorithm  Let c j i be the surviving part of c i before index a j has been chosen  The intersection of c i and c j a j is equal to c j i - c j+1 i  l i denote largest index j such that c j i is not empty

20 Theorem 1:  For any i,  H (| c i |)   1  j  | C’ | (| c i  c j a j |/| c j a j |) where H(n) =  1  i  n (1/ i ).  Proof:

21 Theorem 2: For any set cover C’’,  c i  C’’  1  j  |C’| (| c i  c j a j |/| c j a j |)  | C’ | Proof:

22 Finally:


Download ppt "Approximation Algorithms Department of Mathematics and Computer Science Drexel University."

Similar presentations


Ads by Google