1 Combinatorial Dominance Analysis The Knapsack Problem Keywords: Combinatorial Dominance (CD) Domination number/ratio (domn, domr) Knapsack (KP) Incremental.

Slides:



Advertisements
Similar presentations
Dynamic Programming 25-Mar-17.
Advertisements

Approximation algorithms for geometric intersection graphs.
NP-Completeness.
Approximation Algorithms
Greedy Algorithms Greed is good. (Some of the time)
NP-Complete Problems Polynomial time vs exponential time
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Combinatorial Algorithms
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Greedy vs Dynamic Programming Approach
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
1 -1 Chapter 1 Introduction Why Do We Need to Study Algorithms? To learn strategies to design efficient algorithms. To understand the difficulty.
1 Approximation Algorithms CSC401 – Analysis of Algorithms Lecture Notes 18 Approximation Algorithms Objectives: Typical NP-complete problems Approximation.
Approximation Algorithms
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2006 Lecture 7 Monday, 4/3/06 Approximation Algorithms.
Dean H. Lorenz, Danny Raz Operations Research Letter, Vol. 28, No
Polynomial time approximation scheme Lecture 17: Mar 13.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
1 NP-Complete Problems Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph, the length.
1 Combinatorial Dominance Analysis Keywords: Combinatorial Optimization (CO) Approximation Algorithms (AA) Approximation Ratio (a.r) Combinatorial Dominance.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
1 NP-Complete Problems (Fun part) Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph,
Approximation Algorithms
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Approximation schemes Bin packing problem. Bin Packing problem Given n items with sizes a 1,…,a n  (0,1]. Find a packing in unit-sized bins that minimizes.
1 Approximation Through Scaling Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Design Techniques for Approximation Algorithms and Approximation Classes.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
Chapter 15 Approximation Algorithm Introduction Basic Definition Difference Bounds Relative Performance Bounds Polynomial approximation Schemes Fully Polynomial.
Genome Rearrangements Unoriented Blocks. Quick Review Looking at evolutionary change through reversals Find the shortest possible series of reversals.
Approximation Algorithms
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Although this may seem a paradox, all exact science is dominated by the idea of approximation. Bertrand Russell Approximation Algorithm.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Linear Program Set Cover. Given a universe U of n elements, a collection of subsets of U, S = {S 1,…, S k }, and a cost function c: S → Q +. Find a minimum.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
A Unified Continuous Greedy Algorithm for Submodular Maximization Moran Feldman Roy SchwartzJoseph (Seffi) Naor Technion – Israel Institute of Technology.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
Algorithms for hard problems Introduction Juris Viksna, 2015.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Spring 2008The Greedy Method1. Spring 2008The Greedy Method2 Outline and Reading The Greedy Method Technique (§5.1) Fractional Knapsack Problem (§5.1.1)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 The instructor will be absent on March 29 th. The class resumes on March 31 st.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
Approximation Algorithms based on linear programming.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Linear program Separation Oracle. Rounding We consider a single-machine scheduling problem, and see another way of rounding fractional solutions to integer.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Approximation Algorithms
The Theory of NP-Completeness
Computability and Complexity
Coverage Approximation Algorithms
Lecture 11 Overview Self-Reducibility.
Lecture 11 Overview Self-Reducibility.
Polynomial time approximation scheme
Presentation transcript:

1 Combinatorial Dominance Analysis The Knapsack Problem Keywords: Combinatorial Dominance (CD) Domination number/ratio (domn, domr) Knapsack (KP) Incremental Insertion (II) Local Exchange (LE) PTAS Optimal Head - Greedy Tail (GRT) Presented by: Yochai Twitto

2 Overview Background On approximations and approximation ratio. Combinatorial Dominance What is it ? Definitions & Notations. The Knapsack Problem simple Algorithms & Analysis Incremental Insertion Local Exchange PTASing “ Optimal head - greedy tail ” algorithm Summary

3 Overview Background On approximations and approximation ratio. Combinatorial Dominance What is it ? Definitions & Notations. The Knapsack Problem simple Algorithms & Analysis Incremental Insertion Local Exchange PTASing “ Optimal head - greedy tail ” algorithm Summary

4 Background NP complexity class. AA and quality of approximations. The classical approximation ratio analysis.

5 NP If P ≠ NP, then finding the optimum of NP-hard problem is difficult. If P = NP, P would encompass the NP and NP-Complete areas.

6 Approximations So we are satisfied with an approximate solution. Question: How can we measure the solution quality ? Solutions quality line OPT Infeasible Near optimal

7 Solution Quality Most of the time, naturally derived from the problem definition. If not, it should be given as external information.

8 The classical Approximation Ratio (For maximization problem) Assume 0 ≤ β ≤ 1. A.r. ≥ β if the solution quality is greater than β·OPT Solutions quality line OPT Infeasible Near optimal ½ OPT

9 Overview Background On approximations and approximation ratio. Combinatorial Dominance What is it ? Definitions & Notations. The Knapsack Problem simple Algorithms & Analysis Incremental Insertion Local Exchange PTASing “ Optimal head - greedy tail ” algorithm Summary

10 Combinatorial Dominance What is a “ combinatorial dominance guarantee ” ? Why do we need such guarantees ? Definitions and notations.

11 What is a “ combinatorial dominance guarantee ” ? A letter of reference: “ She is half as good as I am, but I am the best in the world …” “ she finished first in my class of 75 students …” The former is akin to an approximation ratio. The latter to combinatorial dominance guarantee.

12 What is a “ combinatorial dominance guarantee ” ? (cont.) We can ask: Is the returned solution guaranteed to be always in the top O(n) best solutions ? Solutions quality line OPT Infeasible Near optimal top O(n)

13 Why do we need that ? Assume an problem for which all solutions are at least a half as good as optimal solution. Then, 2-factor approximating the problem is meaningless.

14 Corollary The approximation ratio analysis gives us only a partial insight of the performance of the algorithm. Dominance analysis makes the picture fuller.

15 Definitions & Notations Domination number: domn Domination ratio: domr

16 Domination Number: domn Let P be a CO problem. Let A be an approximation for P. For an instance I of P, the domination number domn( I, A ) of A on I is the number of feasible solutions of I that are not better than the solution found by A.

17 domn (example) STSP on 5 vertices. There exist 12 tours If A returns a tour of length 7 then domn( I, A ) = 8 4, 5, 5, 6, 7, 9, 9, 11, 11, 12, 14, 14 (tours lengths)

18 Domination Number: domn Let P be a CO problem. Let A be an approximation for P. minimum For any size n of P, the domination number domn( P, n, A ) of an approximation A for P is the minimum of domn( I, A ) over all instances I of P of size n.

19 Domination Ratio: domr Let P be a CO problem. Let A be an approximation for P. sol( I )feasible Denote by sol( I ) the number of all feasible solutions of I. minimum For any size n of P, the domination ratio domn( P, n, A ) of an approximation A for P is the minimum of domn( I, A ) / sol( I ) taken over all instances I of P of size n.

20 Overview Background On approximations and approximation ratio. Combinatorial Dominance What is it ? Definitions & Notations. The Knapsack Problem simple Algorithms & Analysis Incremental Insertion Local Exchange PTASing “ Optimal head - greedy tail ” algorithm Summary

21 The Knapsack Problem Instance: Multiset of integers Capacity Find:

22 Simple Algorithms & Analysis Incremental Insertion (II) Arbitrary order Increasing order Decreasing order (Greedy) Local Exchange (LE) PTASing “ Optimal Head – Greedy Tail ” (GRT)

23 II – Arbitrary Order Go over the elements (arbitrary order) Insert an element if the capacity not exceeded Theorem:

24 Proof Suppose the weights are Let be any locally optimal solution We may assume Otherwise, is optimal 

25 Proof (cont.) Let be the largest index of a weight not belonging to  Since is locally optimal

26 Proof (cont.) Denote by the interval For any solution not containing Either Or That is, the number of solutions with total weight in is at most

27 Proof (cont.) Solutions of weight at least are infeasible. Solution weighted not more than are not better than 

28 Proof (cont.) Blackball instance: II can lead to Which is locally optimal blackball

29 Proof (cont.) Taking the first item and omitting at least one of the rest is better. Hence And we finished...

30 II – Increasing Order No Gain! That was our blackball … In the previous proof.

31 II - Decreasing Order (Greedy) No drastic gain! Blackball instance B: blackball

32 II - Decreasing Order (Greedy) Greedy(B)  Weight: Any solution taking Exactly two elements from Any of the last elements is better!

33 II - Decreasing Order (Greedy)

34 Simple Algorithms & Analysis Incremental Insertion (II) Arbitrary order Increasing order Decreasing order (Greedy) Local Exchange (LE) PTASing “ Optimal Head – Greedy Tail ” (GRT)

35 Local Exchange (LE) Assume is a solution Allowed operations: Insert a new element x to Exchange x by y x belongs to y not belongs to x < y

36 Local Exchange Theorem:

37 Proof Suppose the weights are Let be any locally optimal solution We may assume Otherwise, is optimal 

38 Proof (cont.) Let be the largest index of a weight not belonging to  Since is locally optimal

39 Proof (cont.) Denote by the interval For any solution not containing Either Or That is, the number of solutions with total weight in is at most And there are at least outside

40 Proof (cont.) Let be the number of items belonging to among the first k -1 items Let be the number of items not belonging to among the first k -1 items How many solution pairs are of weight not belonging to ?

41 Proof (cont.) We saw that All solutions obtained by dispensing of some items from And the one obtained from them by adjoining the ’ th item not belong to the interval

42 Proof (cont.) So For each of the solutions obtained from by adjoining one of the items of Both the obtained solution And the one obtain by adjoining it the ’ th item not belong to the interval

43 Proof (cont.) So Since our solution can not be improved by local exchange Each of the n-k solutions obtained by removing one of the last n-k items not belong to the interval Adding each of them the ’ th item we get infeasible solutions

44 Proof (cont.) So

45 Proof (cont.) Blackball instance: LE can lead to Which is locally optimal blackball

46 Proof (cont.) Taking the first item and omitting at least two of the rest is better. Hence: And we finished... b(n)

47 Simple Algorithms & Analysis Incremental Insertion (II) Arbitrary order Increasing order Decreasing order (Greedy) Local Exchange (LE) PTASing “ Optimal Head – Greedy Tail ” (GRT)

48 PTASing There exist a PTAS for Knapsack That is, it is possible to approximate the optimal solution to within any factor c >1 In time polynomial in n and 1/(c -1) We ’ ll see

49 Theorem 1 Let be an instance of KP Denote the weight of optimal solution by Assume H is a factor-c approximation for KP Then

50 Proof Assume that the elements of optimal solution are labeled such that Let ’ be the smallest integer such that

51 Proof (cont.) Let Observe that

52 Proof (cont.) Also note that Since The weight of every element of is not more than the weight of any element of is a c -approximated solution to

53 Proof (cont.) Let is minimized for Since

54 Proof (cont.) Note that our solution dominate united with any of the non-empty subsets of Since they are not feasible Since is optimal

55 Proof (cont.) Note that our solution dominate all subset of Since the weight of each is not more than And our solution weight is at least

56 Proof (cont.) Summing both terms, the number of solution dominated is Minimizing the left-hand term we get the result.

57 Theorem 2 For every c >1 there exist a KP instance and a solution thereof of total weight dominating only solution.

58 Proof Blackball instance: can return a solution consisting of items blackball

59 Proof (cont.) Such solution dominates all solutions consisting of up to item It also dominates all infeasible solution i.e: solution consisting of more than items. Those are the only solution it dominates

60 Proof (cont.) Hence Employing Stirling ’ s formula we obtain the theorem

61 Simple Algorithms & Analysis Incremental Insertion (II) Arbitrary order Increasing order Decreasing order (Greedy) Local Exchange (LE) PTASing “ Optimal Head – Greedy Tail ” (GRT)

62 Optimal Head – Greedy Tail

63 Optimal Head – Greedy Tail

64 Optimal Head – Greedy Tail

65 Optimal Head – Greedy Tail

66 Optimal Head – Greedy Tail

67 Optimal Head – Greedy Tail

68 Optimal Head – Greedy Tail

69 Optimal Head – Greedy Tail

70 Optimal Head – Greedy Tail

71 Summary

72 Combinatorial Dominance Analysis The Knapsack Problem