Approximation Algorithms (1)

Southgiri·2025년 6월 20일

SNUON Algorithm

목록 보기
5/7

Approximation Ratios

  • The cost CC of the solution produced by the algorithm is within a factor of ρ(n)\rho(n) of the cost CC^* of an optimal solution

  • max(CC,CC)ρ(n)max(\displaystyle{{C^*}\over{C}},\displaystyle{{C}\over{C^*}}) \leq \rho(n)

  • For maximization problem, 1CCρ(n)1\leq \displaystyle{{C^*}\over{C}} \leq \rho(n)

  • For minimization problem, 1CCρ(n)1\leq \displaystyle{{C}\over{C^*}} \leq \rho(n)

  • If an algorithm achieves an approximation ratio of ρ(n)\rho(n), call it ρ(n)\rho(n)-approximation algorithm

  • 1-approximation algorithm = optimal solution

  • A large approximation ratio may return a solution that is much worse than optimal

Approximation Scheme

  • An approximation scheme for an optimization problem is an approximation algorithm
  • Takes as input not only an instance of the problem, but also ϵ>0\epsilon > 0
  • such that for any fixed ϵ\epsilon, the scheme is an (1+ϵ)(1+\epsilon)-approximation algorithm

Polynomial-time approximation scheme

  • Running time can increase very rapidly as ϵ\epsilon decreases
  • e.g.) a scheme with O(n2/ϵ)O(n^{2/\epsilon}) time
  • If ϵ\epsilon decreases by a constant factor,
    the running time to achieve the desired approximation should not increase by more than a constant factor

Fully polynomial-time approximation scheme

  • Running time is polynomial both in 1/ϵ1/\epsilon and in the size nn of the input instance
  • Any constant factor decrease in ϵ\epsilon comes with a constant factor increase in the running time
  • e.g.) a scheme with O((1/ϵ)2n3)O((1/\epsilon)^2n^3) time

Vertex Cover Problem

  • Though we can't find the optimal solution in polynomial time,
    we can effectively find a vertex cover that is near-optimal
  • A vertex cover size is guaranteed to be no more than twice the size of an optimal vertex cover
  • Running time is O(V+E)O(|V|+|E|)
  • Example

  • Approximated solution is {b,c,e,f,d,g}\{b,c,e,f,d,g\}
  • Optimal solution is {b,d,e}\{b,d,e\}

Approximation algorithm is a polynomial-time 2-approximation algorithm

  • 모든 edge 는 선택되거나 제거되기 때문에 모든 edge 는 한 번씩만 봄
  • The set CC is a vertex cover, since the algorithm loops until every edge in G.EG.E has been covered by some vertex in CC
  • Let AA represent the set of edges that are included in CC
  • An optimal vertex cover CC^* must include at least one endpoint of each edge that is included in CC
  • CA|C^*| \geq |A|
    • CC^*AA 를 모두 커버해야하기 때문에 AA 의 edge 중 하나의 vertex 는 무조건 가짐
  • Each iteration picks an edge for which neither endpoint is in CC,
    C=2A|C|=2|A| and C2C|C| \leq 2|C^*|
    • AA 는 항상 이전에 보지 못한 vertex 들의 edge 를 선택하기 때문에 개수는 CC 의 절반

0개의 댓글