Combinatorial Optimization - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Combinatorial Optimization

Description:

But we have time to generate half of them... In fact, it is recommended to only study the s. Combinatorial Optimization. Masters OR ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 19
Provided by: jvandek
Category:

less

Transcript and Presenter's Notes

Title: Combinatorial Optimization


1
DP(4) Optimization Knapsack revisitited
0 1 2 3
4 c-1 c
. . . . . . .
. . . . . . .
. x xci . .
. . . . . . .
n n-1 i1 i 1 0
. . . . . . .
. . . . . .
. . . . . . .
. . . . . . .
Now the arc length equals wi
2
Combinatorial Optimization
  • Chapter 17
  • Approximation Algorithms

3
Consider again DP4 for Knapsack
  • Suppose that we dont have time to generate all
    the pseudopolynomially many columns of the graph.
    But we have time to generate half of them.
  • What we could do is take the binary
    representation bj of each cj and discard the last
    bit. We denote the result as dj dj ? 2 cj/
    2 (This is equivalent to rounding them down to
    the nearest even number.)
  • Suppose we solve the thus generated Knapsack
    problem. Let T be its optimal solution and let
    d be its value
  • d ?j?T dj.

4
.
  • Let S be the optimal solution to the original
    problem, and c the corresponding cost.
  • Then it must hold that
  • c ?j?S cj ?j?T cj
  • ?j?T dj (d) ?j?S dj
  • ?j?S (cj -1) ?j?S cj - n.

5
Approximation ratio
  • Thus we derive that ?j?T cj ?j?S cj - n.
  • c - ?j?T cj n (bounds the absolute error)
  • Finally we may write that regarding the relative
    error
  • c - ?j?T cj n
  • -------------- --
  • c c

6
Extension
  • Now suppose that we discard the last k bits from
    every cj. Then dj dj ? 2k cj /2k .
  • Moreover, we get that
  • c ?j?S cj ?j?T cj
  • ?j?T dj (d) ?j?S dj
  • ?j?S (cj (2k-1-1) ?j?S cj - n 2k-1.

7
Extension (2)
  • And we find that
  • ?j?T cj ?j?S cj - n 2k-1.
  • c - ?j?T cj n 2k-1
  • Finally we may write that
  • c - ?j?T cj n 2k-1
  • -------------- --
  • c c

8
Conclusions
  • Thus we can choose an ? and subsequently select k
    such that the dynamic programming algorithm finds
    a solution f with value c(f) such that (c -c(f))
    / c lt ?.
  • Moreover, if we choose ? such that the generated
    graph is polynomial in the input size, than we
    have what is called a polynomial approximation
    algorithm.

9
Approximation
  • Definition 17.1 Let A be an optimization problem,
    and let a be an algorithm for P. On instance I,
    let fa(I) be the solution of algorithm a, and
    denote by f an optimal solution. Then a is
    called an ? approximation algorithm for A if and
    only if
  • fa(I) - f
  • ------------- ?
  • f
  • For all instances I.

10
Approximating TSP
  • Definition Hamilton Circuit. Given a graph
    G(V,E), does G contain a cycle, that is a
    sequence of edges that enters and leaves edge
    node in V exactly once?
  • Theorem. There is no ? approximate polynomial
    algorithm for TSP, unless P NP.

11
Approximating TSP (2)
  • Proof. Let G(V,E) be an instance of Hamilton
    Circuit. We construct an instance of TSP on the
    same set of nodes, and whose distance matrix is
    defined as follows dij1 if (i,j) ? E, 2 ?V
    otherwise.
  • Now suppose there exists an ? approximate
    algorithm a for TSP. It would have to find a
    solution with length l such that
  • (l-copt)/copt ?.
  • But then copt ? l-copt and thus copt (?1)
    l. Now if G contains a Hamilton Cycle, then copt
    V, and hence l V(?1).

12
Approximating TSP (3)
  • The length l of the solution provided by a cannot
    contain an arc of length 2 ?V if a tour of
    length V exists, because then
  • l V-1 2 ?V gt (?1)V.
  • Thus a would have to find the optimal tour
    whenever G(V,E) has a Hamilton Circuit, and this
    tour would form a Hamilton Circuit in G. Then, a
    would allow us to solve Hamilton Circuit in
    polynomial time. Since Hamilton Circuit is
    NP-Complete, this cannot be the case unless PNP.

13
Approximating TSP
  • Thus the TSP is hard to solve with a worst case
    performance guarantee in polynomial time.
  • However in practice, prospects are not that bad.
    First of all, many practical TSPs satisfy the
    triangly inequality cij cjk cik.
    Approximation algorithms with finite worst case
    performance are known for this case.
  • Moreover, even if the worst case performance is
    quite bad, algorithms may still function very
    well in practice. Worst case instance can be
    quite pathological.

14
Approximating Node Cover
  • Remember A node cover is a subset of the U of
    the nodes, such that for each edge (u,v), u ? U,
    and/or v ? U.
  • Algorithm Stupid
  • U ? Ø
  • Select a random edge (u,v)
  • U ? U u v.
  • Eliminate u and v and all edges incident to them
    from G.
  • If E Ø return U, else go to step 2.

15
Approximating Node Cover (2)
  • Theorem Stupid is a 1-approximate algorithm for
    Node Cover.
  • Proof. It is easy to check that the thus
    constructed set U is a node cover edges are
    deleted once they are covered, and the process
    continues until all edges are deleted.
  • Now consider all selected edges (u,v). Clearly,
    in the optimal solution at least one of the nodes
    u and v is selected. Stupid selects both. Thus
    the number of nodes K in the cover of Stupid is
    twice the number selected edges, and an optimal
    cover contains a number N of nodes that is at
    least the number selected edges.
  • Thus (K-N)/N (2N-N)/N 1.
  • Notice that Stupid runs in O(V), and thus in
    polynomial time.

16
Approximation Node Cover (3)
  • Algorithm Smart
  • U ? Ø
  • Select a node v with maximum degree
  • U ? U v.
  • Eliminate v and all edges incident to them from
    G.
  • If E Ø return U, else go to step 2.

17
Chapter Reading
  • We have done 17.1, and parts of 17.3 (and even
    17.4)
  • You may skip the rest.
  • In fact, it is recommended to only study the
    slides.

18
Exercises
  • What is the approximation ratio of SMART?
  • Suppose that you have a polynomial time
    ?-approximate algorithm for Node Cover. Does that
    also imply a polynomial time d-approximate
    algorithm for Independent Set, for some finite d
    gt0?
  • Suppose that you have a ?-polynomial time
    approximate algorithm for Clique. Does that also
    imply a polynomial time d-approximate algorithm
    for Independent Set, for some finite d gt0?
Write a Comment
User Comments (0)
About PowerShow.com