Approximation Algorithms for NP-Hard Problems: Minimum Spanning Tree and Vertex Cover - Pr, Study notes of Algorithms and Programming

Approximation algorithms, which offer provable solution quality and run time bounds for optimization versions of np-hard problems. The minimum spanning tree problem and vertex cover problem, providing definitions, approximation ratios, and algorithms. It also explains the concept of polynomial time approximation schemes, fully polynomial-time approximation schemes, and fixed ratio approximation.

Typology: Study notes

Pre 2010

Uploaded on 07/23/2009

koofers-user-zbq
koofers-user-zbq 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 501: Advanced Algorithms Fall 2008
Lecture 2 September 2
Lecturer: Tanya Berger-Wolf Scribe: Harjinder Singh Dhadda
2.1 Overview
In the last lecture we discussed the decision version and optimization versions of NP problems
and the difficulty is solving them in polynomial time. We also discussed, how we can sacrifice
either the exact optimal solution or restrict the range of allowed inputs, to solve them in
polynomial time.
In this lecture we will continue our discussion on solving NP-hard problems in polynomial
time. We will study how we can efficiently solve them by sacrificing the exact solution and
settling for a near-optimal solution. By efficient solution, we mean polynomial time. Such
algorithms that return near-optimal solutions for optimization versions of NP problems, in
polynomial time, are called Approximation Algorithms.
2.2 Main Section
In practice, near-optimality is often good enough. So Approximation Algorithms are increas-
ingly being used for solving problems where no exact polynomial-time algorithms is known.
Unlike heuristics, which usually only find reasonably good solutions, Approximation Algorithms
offer provable solution quality and provable run time bounds.
We first formally define the notions of an optimization problem and an approximation
algorithm.
2.2.1 Definition: 1
An optimation problem,Q, consists of:
Input Instances A set of input instances D={I}.
Feasible Solutions Each instance IDhas a set of feasible solutions,S(I).
Cost Function A polynomial time computable cost function for each solution:
C:SR
2-1
pf3
pf4
pf5

Partial preview of the text

Download Approximation Algorithms for NP-Hard Problems: Minimum Spanning Tree and Vertex Cover - Pr and more Study notes Algorithms and Programming in PDF only on Docsity!

CS 501: Advanced Algorithms Fall 2008

Lecture 2 — September 2

Lecturer: Tanya Berger-Wolf Scribe: Harjinder Singh Dhadda

2.1 Overview

In the last lecture we discussed the decision version and optimization versions of NP problems and the difficulty is solving them in polynomial time. We also discussed, how we can sacrifice either the exact optimal solution or restrict the range of allowed inputs, to solve them in polynomial time. In this lecture we will continue our discussion on solving NP-hard problems in polynomial time. We will study how we can efficiently solve them by sacrificing the exact solution and settling for a near-optimal solution. By efficient solution, we mean polynomial time. Such algorithms that return near-optimal solutions for optimization versions of NP problems, in polynomial time, are called Approximation Algorithms.

2.2 Main Section

In practice, near-optimality is often good enough. So Approximation Algorithms are increas- ingly being used for solving problems where no exact polynomial-time algorithms is known. Unlike heuristics, which usually only find reasonably good solutions, Approximation Algorithms offer provable solution quality and provable run time bounds. We first formally define the notions of an optimization problem and an approximation algorithm.

2.2.1 Definition: 1

An optimation problem,

, consists of:

  • Input Instances – A set of input instances D = {I}.
  • Feasible Solutions – Each instance I ∈ D has a set of feasible solutions, S(I).
  • Cost Function – A polynomial time computable cost function for each solution:

C : S → R

  • Objective –

is specified to be either a minimization problem or a maximization problem. The objective is to find the solution s ∈ S, such that cost function C(s) is optimal.

Here, | I | denotes the size of instance I. To make the definitions clear, we will illustrate them in the context of the following problems:

Problem: Minimum Spanning Tree

  • Input Instances – A weighted graph G = (V, E), W : E → R+.
  • Feasible Solutions – A set of spanning trees {T}.
  • Cost Function – Cost function C is the sum of weighted edges of spanning tree T.

C =

e∈T

W(e)

  • Objective – The objective is to minimize C.

Problem: Minimum Vertex Cover

  • Input Instances – An undirected graph G = (V, E).
  • Feasible Solutions – Subsets V′^ of V, such that each edge in E has at least one end point(vertex) in V′.

V′^ ⊆ V, such that if (u, v ) ∈ E, then u ∈ V′or v ∈ V′^ or both.

  • Cost Function – Cost function C is the number of vertices in V′.
  • Objective – The objective is to minimize C.

2.2.2 Definition: 2

Given an approximation algorithm A for problem

, we define the approximation ratio of A as ρ(| I |). For any input of size | I |, the cost C(SA) of the solution produced by the algorithm A should be within a factor of ρ(| I |) of cost C(OPT) of an optimal solution.

max

C(SA)

C(OP T )

≤ ρ(| I |)(for minimization problems and ρ(| I |) ≥ 1)

schemes are used for solving Knapsack problem, Bin Packing problem, Scheduling problems etc..

  • Fully polynomial-time approximation scheme – A fully polynomial-time approxima- tion scheme(FPTAS) is an approximation scheme for which the running time is polynomial both in 1/ and in the size | I | of the input instance. For example, a FPTAS might have a running time of O((1/)^2 | I |^3 ). In such a scheme, a con- stant factor decrease in  will result in only a constant increase in running time. FPTAS can be used to approximate Subset-Sum problem in polynomial time.
  1. Fixed Ratio Approximation – As the name suggests, these approximation algorithms have a fixed value of approximation ratio ρ, for any input I. A bound is defined for the value of ρ for all input instance. For maximization problems, the ρ is less than or equal to 1 and for minimization problems, the value of ρ is greater than or equal to 1.

0 < ρ ≤ 1 for maximization problem.

ρ ≥ 1 for minimization problem. For example we can have a approximation algorithm for a maximization problem as: at least 1 / 2 approximation, i.e., the value of ρ is bounded by 1/2 from bottom and 1 from top. Similarly a minimization problem can have a solution as: at most 2 approximation, i.e., ρ is bounded by 2 from top and 1 from bottom. Few problems for which fixed ratio approximable algorithm exists include Vertex Cover, Metric TSP and Steiner Tree.

  1. NPO hard 1 – These cover the class of problems for which no approximation is known within any non-trivial approximation ratio | I |^1 −^ .In other words, no polynomial time algorithm can guarantee that any solution computed will be even slightly far from a worse one, unless P = NP. Examples includes Graph coloring, Clique Problem and TSP (with constraint for triangle inequality removed).

2.2.4 Designing Approximation Algorithm

The two basic requirements for designing an Approximation Algorithm are:

  1. Idea –Foremost, an idea,in right direction, is needed for solving the problem.
  2. Quality Guarantee –Once we have a strong idea, we need to establish bounds about the quality of solutions produced by the designed algorithm. This step is needed as an Approximation Algorithm must offer a provable solution quality. (^1) NPO Problems: http://www.lamsade.dauphine.fr/∼bazgan/Papers/mfcs03.pdf

As we discussed earlier, the ρ, defined as ratio of cost of Approximation Algorithm(C(SA)) by cost of optimal solution(C(SOP T )), provides a guarantee about the quality of the approx- imation algorithm. Now the issue is that we do not know the optimal cost. So instead we’ll need to find a bound for the cost of optimal solution,C(SOP T ). Lets take the case of a minimization problem. Let B be the lower bound for the cost of optimal solution.

C(SOP T ) ≥ B

Let A be the approximation algorithm used and the corresponding cost be C(SA). We define f, such that f · B defines the worst case cost value for approximation algorith A, i.e.

C(SA) ≤ f · B

Then: C(SA) C(SOP T )

≤ f

Lets take the example of vertex cover^2 , to illustrate the above idea. A vertex cover problem is defined as: Input: G = (V,E) Feasible Solution: S ⊆V ,s.t.,∀(u, v ) ∈ E then u ∈ {S} or v ∈ {S} or both. Cost Function: count of vertices in S,| V C | = | S | Objective: Minimize | S | To find bounds, we will consider a similar problem, the Maximal Matching problem. The Maximal Matching^3 is a Matching^4 in which no new edge can be added. By property,there is no edge left in graph, without having atleast one end point covered in Maximal Matching. Hence adding any edge to a Maximal Matching will destroy the matching(one end point will be shared between two edges). Let MM be the maximal set of disjoint edges in G(set of edges in Maximal Matching). Let | V COP T | represent the optimal solution to vertex cover problem. Then we claim:

Claim 1. 2 | MM | ≥ | V COP T | ≥ | MM |.

Proof: And now we prove the above claim. Firstly every edge in MM has to be covered by a vertex in VC otherwise the vertex cover will not cover all the edges in graph. To cover every edge in MM, we select one vertex from each edge in MM. Since no vertex occurs twice in a MM, | V COP T | is at least size of | MM |. That is:

| V COP T | ≥ | MM | (^2) Vertex Cover Problem: http://www.cs.huji.ac.il/∼dinuri/mypapers/vc.pdf (^3) Algotithm for Maximum Matching: www.cs.berkeley.edu/∼karp/greatalgo/lecture05.pdf (^4) Matching definition: www.cs.dartmouth.edu/∼ac/Teach/CS105-Winter05/Notes/kavathekar-scribe.pdf

References

  1. http://pages.cs.wisc.edu/∼shuchi/courses/880-S07/scribe-notes/lecture01.pdf
  2. http://en.wikipedia.org/wiki/ApproximationAlgorithm
  3. http://www.nada.kth.se/∼viggo/wwwcompendium/
  4. http://qwiki.stanford.edu/wiki/ComplexityZoo