# Lecture 21 Approximation Algorithms Introduction.

## Presentation on theme: "Lecture 21 Approximation Algorithms Introduction."— Presentation transcript:

Lecture 21 Approximation Algorithms Introduction

Earlier Results on Approximations Vertex-Cover Traveling Salesman Problem Knapsack Problem

Performance Ratio

Constant-Approximation c-approximation is a polynomial-time approximation satisfying: 1 < approx(input)/opt(input) < c for MIN or 1 < opt(input)/approx(input) < c for MAX

Vertex Cover Given a graph G=(V,E), find a minimum subset C of vertices such that every edge is incident to a vertex in C.

Vertex-Cover The vertex set of a maximal matching gives 2-approximation, i.e., approx / opt < 2

Traveling Salesman Given n cities with a distance table, find a minimum total-distance tour to visit each city exactly once.

Traveling Salesman with triangular inequality Traveling around a minimum spanning tree is a 2-approximation.

Traveling Salesman with Triangular Inequality Minimum spanning tree + minimum-length perfect matching on odd vertices is 1.5- approximation

Minimum perfect matching on odd vertices has weight at most 0.5 opt.

Lower Bound 1+ε 11

Traveling Salesman without Triangular Inequality Theorem For any constant c> 0, TSP has no c- approximation unless NP=P. Given a graph G=(V,E), define a distance table on V as follows:

Contradition Argument Suppose c-approximation exists. Then we have a polynomial-time algorithm to solve Hamiltonian Cycle as follow: C-approximation solution < cn if and only if G has a Hamiltonian cycle

Knapsack

2-approximation

PTAS A problem has a PTAS (polynomial-time approximation scheme) if for any ε > 0, it has a (1+ε)-approximation.

Knapsack has PTAS Classify: for i < m, c i < a= c G, for i > m+1, c i > a. Sort For

Proof.

Time

Fully PTAS A problem has a fully PTAS if for any ε>0, it has (1+ε)-approximation running in time poly(n,1/ε).

Fully FTAS for Knapsack

Pseudo Polynomial-time Algorithm for Knapsak Initially,

Time outside loop: O(n) Inside loop: O(nM) where M=max c i Core: O(n log (MS)) Total O(n M log (MS)) Since input size is O(n log (MS)), this is a pseudo-polynomial-time due to M=2 3 log M

Lecture 3 Complexity of Approximation L-reduction Two subclass of PTAS Set-cover ((ln n)-approximation) Independent set (n -approximation) c