Approximation Algorithms - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Approximation Algorithms

Description:

... algorithms must be polynomial. 2. Formally - minimization. Let A be an approximation algorithm. ... Greedy algorithm. Choose the first center arbitrarily ... – PowerPoint PPT presentation

Number of Views:165
Avg rating:3.0/5.0
Slides: 22
Provided by: idc3
Category:

less

Transcript and Presenter's Notes

Title: Approximation Algorithms


1
Approximation Algorithms
  • Given an optimization problem
  • Let OPT be the cost/value of an optimal solution
  • Minimization problems
  • For R 1. A solution of cost at most ROPT for
    any input is called An R-approximation.
  • Maximization problems
  • For R 1. A solution of cost at least ROPT
    for any input is called An R-approximation.
  • The approximation algorithms must be polynomial

2
Formally - minimization
  • Let A be an approximation algorithm. Let A(I) be
    the cost of A on input I, and let OPT(I) be the
    optimal cost on input I.
  • A has an approximation ratio R if for all inputs
    I we have
  • Similarly for maximization
  • For randomized approximation algorithms we need

3
Graphs
  • Vertices V
  • Edges E
  • We discuss undirected graphs
  • Absolute approximation ratios

4
Metric space
  • Complete graph
  • Distances between vertices
  • is the distance between vi and vj
  • Triangle inequality
  • Symmetry d(i,j)d(j,i)
  • d(i,i)0

5
The k-center problem
  • Given a graph G and a distance function find a
    set with at most k vertices
    such that
  • is minimal
  • Application the closest ATM

6
Example
  • We would like to choose at least one vertex of
    every cluster

7
Greedy algorithm
  • Choose the first center arbitrarily
  • At every step, choose the vertex that is furthest
    from the current centers to become a center
  • Continue until k centers are chosen
  • Analysis
  • Claim The greedy algorithm has approximation
    ratio 2 for the k center problem

8
Proof for k1
  • The distance from every point to the center
    chosen by the optimal solution X is at most OPT
  • The distance between the
  • chosen center and any
  • point, even if we go
  • through X, is at
  • most 2OPT

9
Proof
  • Note that the sequence of distances from a new
    chosen center, to the closest center to it (among
    previously chosen centers) is non-increasing
  • Consider the point that is furthest from the k
    chosen centers
  • We need to show that the distance from this point
    to the closest center is at most 2OPT
  • Assume by negation that it is gt2OPT

10
Proof continued
  • We assumed that the distance from the furthest
    point to all centers in gt2OPT
  • This means that distances
  • between all centers
  • are also gt2OPT
  • We got k1 points
  • with distances gt2OPT
  • between every pair

11
Proof continued
  • Each point has a center of the optimal solution
    with distance ltOPT to it
  • There exists a pair of points with the same
    center X in the optimal solution
  • The distance between
  • them is at most 2OPT
  • Contradiction

12
Vertex Coloring
  • Problem definition
  • Use a minimum number of colors to give a color
    to each vertex, such that no edge has a single
    color. This minimum number is called the
    chromatic number
  • For any planar graph this number is at most 4,
    but deciding whether it is 3 or 4 is NPC

13
Approximating vertex coloring
  • For general graphs this is a difficult problem
  • It is hard to approximate the chromatic number
    with approximation ratio of at most for
    every fixed , unless NPZPP
  • Note that the chromatic number is between 1 (a
    set of singletons) and V (a complete graph)
  • We consider several special cases

14
Additive approximation
  • Instead of we request
  • Example Edge coloring of graphs (Vizing)
  • Two edges of the same vertex need to get distinct
    colors
  • Given a graph, color its edges using a minimal
    number of colors, such that any two adjacent
    edges have distinct colors
  • Let D be the max. degree, then it is possible to
    color using D1 colors (it is NPC to decide if D
    colors are enough, it can never be less than D
    colors)

15
Graphs of max degree D
  • We can easily color the vertices using D1 colors
  • (Coloring the edges is actually more difficult)
  • Consider the vertices in some order, we can
    always find a free color to give to the next
    vertex
  • This method can be used in algorithms

16
3 colorable graphs
  • If in such a graph some vertex has degree D then
    we can find an independent set of size at least
    D/2 (the independent set can all get the same
    color)
  • The spanning subgraph of all neighbors of such a
    vertex is 2 colorable
  • We can color it using 2 colors by BFS (two colors
    for odd and even levels)
  • We choose the larger color set, it is independent
    and has size at least D/2

17
Coloring 3 colorable graphs
  • We see the algorithm of Wigdorson that uses
  • colors (nV)
  • There exists and algorithm that uses O(n3/14)
    colors
  • We use the previous idea as a function

18
The algorithm
  • As long as there exists a vertex of degree at
    least
  • , find an independent set of size at
    least
  • , color it with a new color and remove it
  • from the graph
  • When no such high degree vertex is left, color
    the rest using new colors

19
Analysis
  • Total number of colors
  • At most sets were removed (since nV)
  • We get the following number of colors

20
Achromatic number
  • Goal give a valid coloring of the vertices (i.e
    each color gives an independent set) with a
    maximum number of colors.
  • Every two color sets of vertices must share an
    edge (i.e. cannot be combined into one color)
  • Hard to approximate within a factor of 2-
  • Approximation of ratio
  • Results of Kortsarz Krauthgamer

21
The difference between chromatic and achromatic
  • An almost complete bipartite graph (only the
    horizontal edges are missing)
  • We can use one color for each part (left and
    right) - two colors
  • Or we can use a color for every pair - V/2
    colors
Write a Comment
User Comments (0)
About PowerShow.com