Performance Ratio Analysis of Greedy Algorithms for Vertex Cover and Box Packing - Prof. K, Assignments of Computer Science

Problems and hints for analyzing the performance ratio of greedy algorithms for the vertex cover problem in graph theory and the box packing problem in combinatorial optimization. The algorithms aim to find near-optimal solutions with a guaranteed ratio to the optimal solution.

Typology: Assignments

Pre 2010

Uploaded on 09/17/2009

koofers-user-25k
koofers-user-25k 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 1510 Approximiation Algorithms Problems
1. Consider the vertex cover problem, that is, given a graph Gfind a minimal cardinality collection Sof
vertices with the property that every edge in Gis incident to a vertex in S.
Consider the following algorithm:
(a) Pick an arbitrary edge e= (v, w) from G
(b) Add vand wto S
(c) Remove vand wand all incident edges from G
(d) Go to step a.
Show that the performance ratio of this algorithm is at most 2.
HINT: First consider why the size of any matching (a collection of edges such that no pair are incident
on a common vertex) is a lower bound on the size of the vertex cover.
††
2. Give an example instance of the vertex cover problem where the above algorithm does not give an
optimal solution.
3. In this problem you have nboxes b1,...,bnthat you wish to load onto ktrucks. You know the integral
weight in kilograms wiof each box bi. You goal is to minimize the weight on more heavily loaded
truck.
Consider the obvious greedy algorithm that considers the boxes in an arbitrary order, and always places
the box under consideration into the least heavily loaded truck. Show that this algorithm guarantees
that the weight on the more heavily loaded truck is at most 2 times optimal. That is this algorithm
has performance ratio of at most 2.
††
4. In this problem you have nboxes b1,...,bnthat you wish to load onto two trucks. You know the
integral weight in kilograms wiof each box bi. You goal is to minimize the weight on more heavily
loaded truck.
Consider the obvious greedy algorithm that considers the boxes in an arbitrary order, and always places
the box under consideration into the least heavily loaded truck. Show that this algorithms guarantees
that the weight on the more heavily loaded truck is at most 3
2times optimal. That is this algorithm
has performance ratio 3
2.
††
5. Give an example of an instance to the above problem where the load on the more heavily loaded truck
is fifty percent larger than the load on the more heavily loaded truck in the optimal solution.
6. In this problem you have nboxes b1,...,bnthat you wish to load onto two trucks. You know the
integral weight in kilograms wiof each box bi. You goal is to minimize the weight on more heavily
loaded truck.
Consider generalizations of the obvious greedy algorithm that considers the boxes in an arbitrary order,
and always places the box under consideration into one of the trucks based on some rule that relies
only on the load of the two trucks at that time. Show no such algorithm can have performance ratio
strictly better than 3
2.
††
pf2

Partial preview of the text

Download Performance Ratio Analysis of Greedy Algorithms for Vertex Cover and Box Packing - Prof. K and more Assignments Computer Science in PDF only on Docsity!

CS 1510 Approximiation Algorithms Problems

  1. Consider the vertex cover problem, that is, given a graph G find a minimal cardinality collection S of vertices with the property that every edge in G is incident to a vertex in S. Consider the following algorithm:

(a) Pick an arbitrary edge e = (v, w) from G (b) Add v and w to S (c) Remove v and w and all incident edges from G (d) Go to step a.

Show that the performance ratio of this algorithm is at most 2. HINT: First consider why the size of any matching (a collection of edges such that no pair are incident on a common vertex) is a lower bound on the size of the vertex cover. ††

  1. Give an example instance of the vertex cover problem where the above algorithm does not give an optimal solution. †
  2. In this problem you have n boxes b 1 ,... , bn that you wish to load onto k trucks. You know the integral weight in kilograms wi of each box bi. You goal is to minimize the weight on more heavily loaded truck. Consider the obvious greedy algorithm that considers the boxes in an arbitrary order, and always places the box under consideration into the least heavily loaded truck. Show that this algorithm guarantees that the weight on the more heavily loaded truck is at most 2 times optimal. That is this algorithm has performance ratio of at most 2. ††
  3. In this problem you have n boxes b 1 ,... , bn that you wish to load onto two trucks. You know the integral weight in kilograms wi of each box bi. You goal is to minimize the weight on more heavily loaded truck. Consider the obvious greedy algorithm that considers the boxes in an arbitrary order, and always places the box under consideration into the least heavily loaded truck. Show that this algorithms guarantees that the weight on the more heavily loaded truck is at most 32 times optimal. That is this algorithm has performance ratio 32. ††
  4. Give an example of an instance to the above problem where the load on the more heavily loaded truck is fifty percent larger than the load on the more heavily loaded truck in the optimal solution. †
  5. In this problem you have n boxes b 1 ,... , bn that you wish to load onto two trucks. You know the integral weight in kilograms wi of each box bi. You goal is to minimize the weight on more heavily loaded truck. Consider generalizations of the obvious greedy algorithm that considers the boxes in an arbitrary order, and always places the box under consideration into one of the trucks based on some rule that relies only on the load of the two trucks at that time. Show no such algorithm can have performance ratio strictly better than 32. ††
  1. In this problem you have n chickens with weights b 1 ,... , bn grams that you wish to pack into packages. Each package must contain at least L grams of chicken so you don’t get sued for false advertising. The goal is to do this by maximizie the number of packages that you fill to L or more grams. Consider the obvious greedy algorithm that considers the chickens in an arbitrary order, and adds the chickens to the same package until that package is full. Show that the performance ratio of this algorithm is 2. That is, that this algorithm fills at least 1/2 as many bags as optimal.