第19讲 approximation algorithms 算法导论课件

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
FPTAS (Fully PTAS): The same as above + time is bounded by a polynomial in both the size of instance I and 1/ε.
11
A Dilemma!
We cannot find C*, how can we compare C to C*? How can we design an algorithm so that we can compare C to C*
A vertex cover of an undirected graph G = (V, E) is a subset V ' ⊆ V such that if (u, v) ∈ E, then u ∈ V ' or v ∈ V ' (or both). A vertex cover for G is a set of vertices that covers all the edges in E. As a decision problem, we deBiblioteka Baiduine
Eg: Set Cover, Bin Packing
Need to find a near-optimal solution:
Heuristic Approximation algorithms:
This gives us a guarantee approximation ratio
3
The vertex-cover problem
10
Performance ratios for approximation algorithms
PTAS (Polynomial Time Approximation Scheme): A (1 + ε)-approximation algorithm for a NP-hard optimization П where its running time is bounded by a polynomial in the size of instance I.
9
Performance ratios for approximation algorithms
An algorithm that returns near-optimal solutions in polynomial time
Approximation Ratio ρ(n):
Define: C* as a optimal solution and C is the solution produced by the approximation algorithm max (C/C*, C*/C) <= ρ(n) Maximization problem: 0 < C <= C*, thus C*/C shows that C* is larger than C by ρ(n) Minimization problem: 0 < C* <= C, thus C/C* shows that C is larger than C* by ρ(n)
12
Dealing with Hard Problems
What to do if: Divide and conquer Dynamic programming Greedy Linear Programming/Network Flows …
Exponential time algorithms for small inputs. E.g., (100/99)n time is not bad for n < 1000.
Polynomial time algorithms for some (e.g., average-case) inputs
Depending on the problem, an optimal solution may be defined as one with maximum possible cost or one with minimum possible cost; that is, the problem may be either a maximization or a minimization problem.
Polynomial time algorithms for all inputs, but which return approximate solutions
8
Performance ratios for approximation algorithms
Suppose that we are working on an optimization problem in which each potential solution has a positive cost, and we wish to find a near-optimal solution.
VERTEX-COVER = {〈G, k〉 : graph G has a vertex cover of size k}. Best known algorithm: O(kn + 1.274k)
6
Traveling Salesman Problem
Traveling SalesmanProblem (TSP)
Approximation Algorithm 近似算法
1
Approximation algorithm Optimal algorithm
Approximation problem
2
Why Approximation Algorithms
Problems that we cannot find an optimal solution in a polynomial time
Input: undirected graph with lengths on edges Output: shortest cycle that visits each vertex exactly once
Best known algorithm: O(n2n) time.
7
Dealing with Hard Problems
相关文档
最新文档