1 Approximation Through Scaling Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.

Slides:



Advertisements
Similar presentations
Weighted Matching-Algorithms, Hamiltonian Cycles and TSP
Advertisements

Approximation algorithms for geometric intersection graphs.
Algorithm Design Methods Spring 2007 CSE, POSTECH.
Lectures on NP-hard problems and Approximation algorithms
Class-constrained Packing Problems with Application to Storage Management in Multimedia Systems Tami Tamir Department of Computer Science The Technion.
Approximation Algorithms
Knapsack Problem Section 7.6. Problem Suppose we have n items U={u 1,..u n }, that we would like to insert into a knapsack of size C. Each item u i has.
An Introduction to Computational Complexity Edith Elkind IAM, ECS.
Chapter 5 Fundamental Algorithm Design Techniques.
Merge Sort 4/15/2017 6:09 PM The Greedy Method The Greedy Method.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Lecture 21 Approximation Algorithms Introduction.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Greedy vs Dynamic Programming Approach
Parameterized Approximation Scheme for the Multiple Knapsack Problem by Klaus Jansen (SODA’09) Speaker: Yue Wang 04/14/2009.
1 Approximation Algorithms CSC401 – Analysis of Algorithms Lecture Notes 18 Approximation Algorithms Objectives: Typical NP-complete problems Approximation.
1 Combinatorial Dominance Analysis The Knapsack Problem Keywords: Combinatorial Dominance (CD) Domination number/ratio (domn, domr) Knapsack (KP) Incremental.
Polynomial time approximation scheme Lecture 17: Mar 13.
Optimization problems INSTANCE FEASIBLE SOLUTIONS COST.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
1 Combinatorial Dominance Analysis Keywords: Combinatorial Optimization (CO) Approximation Algorithms (AA) Approximation Ratio (a.r) Combinatorial Dominance.
Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)
Dynamic Programming 0-1 Knapsack These notes are taken from the notes by Dr. Steve Goddard at
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
1 The Greedy Method CSC401 – Analysis of Algorithms Lecture Notes 10 The Greedy Method Objectives Introduce the Greedy Method Use the greedy method to.
Improved results for a memory allocation problem Rob van Stee University of Karlsruhe Germany Leah Epstein University of Haifa Israel WADS 2007 WAOA 2007.
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.
Approximation Algorithms for Knapsack Problems 1 Tsvi Kopelowitz Modified by Ariel Rosenfeld.
Chapter 15 Approximation Algorithm Introduction Basic Definition Difference Bounds Relative Performance Bounds Polynomial approximation Schemes Fully Polynomial.
Approximation Algorithms
Speaker: Yoni Rozenshein Instructor: Prof. Zeev Nutov.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
Computer Science Day 2013, May Distinguished Lecture: Andy Yao, Tsinghua University Welcome and the 'Lecturer of the Year' award.
Partitioning Graphs of Supply and Demand Generalization of Knapsack Problem Takao Nishizeki Tohoku University.
Although this may seem a paradox, all exact science is dominated by the idea of approximation. Bertrand Russell Approximation Algorithm.
The Greedy Method. The Greedy Method Technique The greedy method is a general algorithm design paradigm, built on the following elements: configurations:
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
1 Chapter 11 Approximation Algorithms Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
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.
Spring 2008The Greedy Method1. Spring 2008The Greedy Method2 Outline and Reading The Greedy Method Technique (§5.1) Fractional Knapsack Problem (§5.1.1)
PTAS(Polynomial Time Approximation Scheme) cont. Prepared by, Umair S. March 25 th, 2009.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Approximation algorithms
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
8.3.2 Constant Distance Approximations
Approximation Algorithms
Chart Packing Heuristic
Merge Sort 7/29/ :21 PM The Greedy Method The Greedy Method.
Approximation algorithms
Seminar on Dynamic Programming.
Introduction to Approximation Algorithms
Approximation Algorithms
Approximation Algorithms
Computability and Complexity
Introduction to Approximation algorithms
Prepared by Chen & Po-Chuan 2016/03/29
The Subset Sum Game Revisited
Merge Sort 11/28/2018 2:18 AM The Greedy Method The Greedy Method.
The Greedy Method Spring 2007 The Greedy Method Merge Sort
Merge Sort 11/28/2018 2:21 AM The Greedy Method The Greedy Method.
Merge Sort 11/28/2018 8:16 AM The Greedy Method The Greedy Method.
Approximate Algorithms
Introduction to Algorithms Second Edition by
Approximation Algorithms
Merge Sort 1/17/2019 3:11 AM The Greedy Method The Greedy Method.
Polynomial time approximation scheme
Merge Sort 5/2/2019 7:53 PM The Greedy Method The Greedy Method.
Seminar on Dynamic Programming.
Presentation transcript:

1 Approximation Through Scaling Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

2 C-approximation  Optimization problem: output has a value that we want to maximize or minimize  An algorithm A is an C-approximation algorithm, if for all inputs X, we have that (with OPT the optimal value)  value(A(X)) / OPT ≤ C (minimisation), or  OPT / value(A(X)) ≤ C (maximisation)

3 PTAS  A Polynomial Time Approximation Scheme is an algorithm, that gets two inputs: the “usual” input X, and a real value >0.  For each fixed >0, the algorithm  Uses polynomial time  Is an (1+)-approximation algorithm

4 FPTAS  A Fully Polynomial Time Approximation Scheme is an algorithm, that gets two inputs: the “usual” input X, and a real value >0, and  For each fixed >0, the algorithm  Is an (1+)-approximation algorithm  The algorithm uses time that is polynomial in the size of X and 1/.

5 Example: Knapsack  Given: n items each with a positive integer weight w(i) and integer value v(i) (1 ≤ i ≤ n), and an integer B.  Question: select items with total weight at most B such that the total value is as large as possible.

6 Dynamic Programming for Knapsack  Let P be the maximum value of all items.  We can solve the problem in O(n 2 P) time with dynamic programming:  Tabulate M(i,Q): minimum total weight of a subset of items 1, …, i with total value Q for Q at most nP  M(0,0) = 0  M(0,Q) = ∞, if Q>0  M(i+1,Q) = min{ M(i,Q), M(i,Q-v(i+1)) + w(i+1) }

7 Scaling for Knapsack  Take input for knapsack  Throw away all items that have weight larger than B (they are never used)  Let c be some constant  Build new input: do not change weights, but set new values v’(i) = v(i) / c   Solve scaled instance with DP optimally  Output this solution: approximates solution for original instance

8 The Question is….  How do we set c, such that  Approximation ratio good enough  Polynomial time

9 Approximation ratio  Consider optimal solution Y for original problem, value OPT  Value in scaled instance: at least OPT/c – n  At most n items, for each v(i)/c - v(i)/c  <1  So, DP finds a solution of value at least OPT/c –n for scaled problem  So, value of approximate solution for original instance is at least c*(OPT/c –n) = OPT - nc

10 Setting c  Set c = P/(2n)  This is a FPTAS  Running time:  Largest value of an item is at most P/c = P / (P/(2n)) = 2n/.  Running time is O(n 2 * 2n/) = O(n 3 /)  Approximation: … next

11 -approximation  Note that each item is a solution (we removed items with weight more than B).  So OPT ≥ P.  Algorithm gives solution of value at least: OPT – nc = OPT – n( P / (2n) ) = OPT – /2 P  OPT / (OPT – /2 P)≤ OPT / (OPT – /2 OPT) = 1/(1-/2) ≤ 1+

12 Comments  Technique works for many problems .. But not always …