Approximation Algorithm Prepared by Lamiya ElSaedi 1 Introduction
Approximation Algorithm Prepared by: Lamiya El_Saedi 1
: Introduction o There are many hard combinatorial optimization problems that can’t be solved efficiently using backtracking or randomization. o. The alternative way for talking some of these problem is to devise an approximation algorithm. 2
o o 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. 3
o o o 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. 4
: Basic Definition Combinatorial optimization problem For each solution A set DII of instances For each There is I in DII SII(I) of Candidate solution In σ SII(I) there is A value f. II(σ) Called the solution value of σ 5
: Note 6
. Cont o In simple word: assume that: DII={I 1, …, In} SII(Ii)={σ1, …, σn} f. II(σi)={v 1, …, vn} f. II(σ)=A(I) 7
: Subset-sum problem o o Is a special case of the Knapsack problem in which the item values are identical to their sizes. Ex: I= {I 1, I 2, I 3, I 4} 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. o 8
: Subset-sum algorithm 9
. Cont o Time complexity of algorithm is exactly the size of the table Θ(n. C) as filling each entry requires Θ(1) time. 10
. Cont o When I apply the example by using subsetsum algorithm the results appear like this: 0 1 2 3 4 5 0 0 0 0 s 1 0 1 1 1 s 2 0 1 2 3 3 3 s 3 0 1 2 3 4 5 s 4 0 1 2 3 4 5 11
. Cont o 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 12
: Now o We develop an approximation algorithm for some positive integer k. 13
14
15
- Slides: 15