Approximation Algorithm

15
1 Approximation Algorithm Prepared by: Lamiya El_Saedi

description

Approximation Algorithm. Prepared by: Lamiya El_Saedi. Introduction:. There are many hard combinatorial optimization problems that can ’ t be solved efficiently using backtracking or randomization. - PowerPoint PPT Presentation

Transcript of Approximation Algorithm

Page 1: Approximation  Algorithm

1

Approximation Algorithm

Prepared by:Lamiya El_Saedi

Page 2: Approximation  Algorithm

2

Introduction:

There are many hard combinatorial optimization problems that can’t be solved efficiently using backtracking or randomization.

The alternative way for talking some of these problem is to devise an approximation algorithm.

Page 3: Approximation  Algorithm

3

The approximation is depend on the reasonable solution that approximations as optimal solution

There is a performance bound that guarantees that the solution to a given instance will not be far away from the neighborhood of the exact solution.

Page 4: Approximation  Algorithm

4

A marking characteristic of approximation algorithms is that they are fast, as they are mostly greedy heuristics.

The proof of correctness of greedy algorithm may be complex.

In general, the better the performance bound the harder it becomes to prove the correctness of an approximation algorithms.

Page 5: Approximation  Algorithm

5

Basic Definition:

Combinatorial optimization

problem

A set DII of instances

For each I in DII

There is SII(I) of Candidate solution

For each solution σ

In SII(I) there is

A value fII(σ)Called the solution

value of σ

Page 6: Approximation  Algorithm

6

Note:

Page 7: Approximation  Algorithm

7

Cont.

In simple word: assume that: DII={I1,…,In} SII(Ii)={σ1,…, σn} fII(σi)={v1,…,vn} fII(σ)=A(I)

Page 8: Approximation  Algorithm

8

Subset-sum problem: Is a special case of the Knapsack problem in which the

item values are identical to their sizes.

Ex: I= {I1,I2,I3,I4} S= {1,2,3,4} V= {1,2,3,4} C (Knapsack capacity)= 5

The objective is to find a subset of the items that maximizes the total sum of their sizes without exceeding the Knapsack capacity.

Page 9: Approximation  Algorithm

9

Subset-sum algorithm:

Page 10: Approximation  Algorithm

10

Cont.

Time complexity of algorithm is exactly the size of the table Θ(nC) as filling each entry requires Θ(1) time.

Page 11: Approximation  Algorithm

11

Cont. When I apply the example by using subset-

sum algorithm the results appear like this:

012345

0000000

s1011111

s2012333

s3012345

s4012345

Page 12: Approximation  Algorithm

12

Cont.

So, from the table: OPT(4)={1} <4 OPT(3)={1,2} <3 OPT(2)={0} <2 does not exist in DII

OPT(1)= {0} <1 does not exist in DII

Page 13: Approximation  Algorithm

13

Now:

We develop an approximation algorithm

for some positive integer k.

Page 14: Approximation  Algorithm

14

Page 15: Approximation  Algorithm

15