PTAS for Bin-Packing.

Slides:



Advertisements
Similar presentations
NP-Completeness.
Advertisements

Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Fast Algorithms For Hierarchical Range Histogram Constructions
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Combinatorial Algorithms
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
PTAS for Bin-Packing. Special Cases of Bin Packing 1. All item sizes smaller than Claim 1: Proof: If then So assume Therefore:
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.
Approximation Algorithms
Polynomial time approximation scheme Lecture 17: Mar 13.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
Improved results for a memory allocation problem Rob van Stee University of Karlsruhe Germany Leah Epstein University of Haifa Israel WADS 2007 WAOA 2007.
Round and Approx: A technique for packing problems Nikhil Bansal (IBM Watson) Maxim Sviridenko (IBM Watson) Alberto Caprara (U. Bologna, Italy)
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.
© 2010 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property. Case Studies: Bin Packing.
Packing Rectangles into Bins Nikhil Bansal (CMU) Joint with Maxim Sviridenko (IBM)
Chapter 8 Maximum Flows: Additional Topics All-Pairs Minimum Value Cut Problem  Given an undirected network G, find minimum value cut for all.
The bin packing problem. For n objects with sizes s 1, …, s n where 0 < s i ≤1, find the smallest number of bins with capacity one, such that n objects.
Introduction to Algorithms: Brute-Force Algorithms.
BIN SORTING Problem Pack the following items in bins of size Firstly, find the lower bound by summing the numbers to be packed.
2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 7: Labeling.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Notes are from D. R. Wilton, Dept. of ECE
Greedy algorithms: CSC317
Approximating Set Cover
The Subset-sum Problem
8.3.2 Constant Distance Approximations
Bin Packing First fit decreasing algorithm
As the last CC-list represents Maximum Compatible Classes we conclude:
Algorithm Design Methods
Weighted Interval Scheduling
Set Topology MTH 251 Lecture # 8.
Computational Molecular Biology
Analysis and design of algorithm
Multi - Way Number Partitioning
Computability and Complexity
Distinct Distances in the Plane
Selection in heaps and row-sorted matrices
James B. Orlin Presented by Tal Kaminker
Prepared by Chen & Po-Chuan 2016/03/29
Additive Combinatorics and its Applications in Theoretical CS
Hidden Markov Models Part 2: Algorithms
The Subset Sum Game Revisited
Alternating tree Automata and Parity games
3.5 Minimum Cuts in Undirected Graphs
Bin Packing First fit decreasing algorithm
CONDITIONAL PROBABILITY
Advanced Algorithms Analysis and Design
Advanced Algorithms Analysis and Design
Polynomial time approximation scheme
Minimum Spanning Tree Algorithms
Dynamic Programming Merge Sort 1/18/ :45 AM Spring 2007
Recurrences (Method 4) Alexandra Stefan.
Bin Packing First fit decreasing algorithm
Bin Packing First fit decreasing algorithm
Algorithm Design Methods
Algorithm Design Methods
Topic: Divide and Conquer
David Kauchak cs161 Summer 2009
Ch09 _2 Approximation algorithm
CS 6310 Advanced Design and Analysis of Algorithms Rajani Pingili
The Complexity of Approximation
Bin Packing Michael T. Goodrich Some slides adapted from slides from
Algorithm Design Methods
Algorithms Tutorial 27th Sept, 2019.
Presentation transcript:

PTAS for Bin-Packing

Special Cases of Bin Packing 1. All item sizes smaller than Claim 1: Proof: If then So assume Therefore:

But for since and Therefore:

2. Assume that there are only k different sizes (k fixed). Claim 2: Optimum number of bins can be found in time: Proof: For every subset of items compute the optimal number of bins it can be packed in. Total number of subsets is Why? Sort items by size: size size size

Number of different such tuples: Denote a subset by a k-tuple of the number of elements of each size in the subset. Number of different such tuples: Compute optimal number of bins for each subset using dynamic programming. Find subsets that can be packed in 1 bin Find subsets that can be packed in 2 bins … Find subsets that can be packed in OPT bins (Note OPT can not exceed n)

Number of values per iteration: Number of iterations: n IMPLEMENTATION: 1.Sort subsets by sums of sizes. Those with sum not exceeding 1 are packed in a single bin. Call them 1-bin subsets. 2.For all pairs of 1-bin subsets, consider their union. Every union that is not a 1-bin subset is a 2-bin subset. If entire set is packed – done. o/w continue to next step. . . .

i+1. For all pairs consisting of a 1-bin subset and an i-bin subset, consider their union. If it is not an i-bin subset or less , then it is a (i+1)-bin subset. If entire set is packed – done. o/w continue to next step. . . . Time: We consider all pairs at every step, thus time per step. At most OPT steps. OPT Conclude:

3. Conclude: Given and Assume that all items have size then (By claim 1). 4. Assume that all items have size Claim 2: There exists a packing algorithm PA for which Proof: Consider the following approximation algorithm.

Fix k (we will later decide the value of k) 1.Sort I in non-decreasing order. Split into groups of k elements each. 2. Pack group G1 in at most k bins. 3. Change all numbers in to largest number in group. Call new item set I’.

EXAMPLE: G1 G2 G3 G4 I: 10 9 8 7 7 6 6 6 5 3 2 I’: 7 7 7 6 6 6 3 3 4. Find OPT(I’) (by Claim 2).

Lemma: OPT(I’) ≤ OPT(I) Proof: Consider I” constructed as: Discard For change every element in group to smallest. EXAMPLE: G1 G2 G3 G4 I: 10 9 8 7 7 6 6 6 5 3 2 I’: 8 8 8 6 6 6 5 5 5 Clearly OPT(I’) ≤ OPT(I) (since I” has less elements and they are smaller)

OPT(I’) ≤ OPT(I“) ≤ OPT(I) Why? I’ may have less elements. ( , and all other sets are equal sized in both) I’ has smaller total sum. ( ) Conclude: OPT(I’) ≤ OPT(I“) ≤ OPT(I)

Algorithm Running Time: Approximation Factor: PA(I) ≤ OPT(I)+k NOW CHOOSE: Therefore: (1+ε) OPT(I)+1

What about the time? But for all i, so: Thus Algorithm Running Time: Since ε is fixed, this is a polynomial.

Algorithm for the General Case: Split items into two sets: small (≤ε/2) and large (>ε/2). 2. Handle large items as in Claim 4. 3. Use FF to pack small items into remaining spaces of large item bins. When all such space is used, open new bins using FF. Time: Clearly polynomial. Approximation Factor: Case 1: All large item bins are filled, and new ones opened. Case 2: Not all large item bins are filled.

Case 1: The situation is: This is the case of claim 1, so approximation is (1+ε) OPT(I)+1 Case 2: Let IL be the set of large items. The number of bins produced by our algorithm is: OPT(I’)+k ≤ =(1+ε) OPT(I)+1