Download presentation

Presentation is loading. Please wait.

Published byJosiah Phillipps Modified over 4 years ago

1
Tight Bounds for Online Class- constrained Packing Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir The Technion IIT

2
2 Problem Definition We need to pack items into bins. All the bins have the same capacity. Each bin can accommodate items from a bounded number of colors. All items have the same (unit) size. Each item has a color (type).

3
3 Notations n - number of items in the instance. M - number of distinct colors in the instance. v - bins capacity. c- number of compartments in a bin. (The bin can accommodate v items of c distinct colors) Example of class-constrained packing n=15, M=5 v = 5, c = 2

4
4 Class-constrained bin-packing (CCBP): Pack all the items in a minimal number of bins. Class-constrained multiple knapsack (CCMK): Given m knapsacks (bins), pack as many items as possible in the bins. Optimization Goals: For CCBP, max( n/v, M/c ) is a lower bound for the number of required bins. Performance measure (for CCBP): For an instance I, let N opt denote the number of bins used by an optimal algorithm to pack all the items of I. An algorithm is r-competitive if it packs all the items of I at most r·N opt bins.

5
5 Applications Multimedia on Demand Systems: The system receives requests for broadcasts of M movies. The requested movie should be transmitted by a shared disk. Each disk has limited load capacity, v, and limited storage capacity, c. Production Planning: Each device possesses some amount, v, of a shared resource and can be set to c distinct configurations. There are M distinct products. c=2 v=5

6
6 Online Class-constrained Packing : The items arrive one at a time. In each step we get one unit size item of some color. We need to pack this item without any knowledge of the subsequent items. Formally, the instance is given as a sequence, =a 1,a 2,.. of length n, such that k, a k {1,..,M}. Online CCBP: use a minimal number of bins to pack all the items in. Online CCMK: Maximize the number of packed items in (arriving items may be rejected).

7
7 Online Class-constrained Packing, An Example of CCBP. = First-fit Algorithm: Put an arriving item in the leftmost bin that can accommodate it. First-fit packing Possible optimal packing v = 5 c = 2

8
8 Results :Deterministic Algorithms for CCBP For a sequence,, of length n, let k = M/c -1 andh = n/v -1. S c,v (k,h) = the set of input sequences with k,h. Lower Bound: For any deterministic algorithm, r d (S c,v (k,h)) 1+ (k+1- kc+1/v )/(h=1). (asymptotically, r d 2). This bound is achieved by first-fit. Another simple algorithm (color sets), achieves r 2. An a-priori knowledge of n, M does not help.

9
9 Lower Bound for Deterministic Algorithms Theorem: for any deterministic algorithm A, r A 2. Proof: The adversary constructs the sequence,, online such that some bins include v items from few colors and some bins include c items from c distinct colors. The idea: repeat in items of the same color. Switch to the next color whenever an item is packed in one of the bad bins. This color will not be repeated anymore in. bad bins v = 10 c = 3

10
10 The packing of the algorithm An optimal packing: The rear colors spread among the bins A closer analysis of the adversarys strategy yields a lower bound that depends on the ratios n/v and M/c.

11
11 Upper Bound for First-fit Theorem: r ff 2. Proof: Let S 1 be the set of full bins (v items); S 2 is the set of occupied bins (c distinct colors). Claim 1: Each bin (except maybe for the last one) is either full or occupied. Claim 2: Each bin in S 2 (except maybe for the last one) contains the last item of each of its c colors. (any additional appearance of a color can fit into this bin). From Claim 1, N ff = |S 1 |+|S 2 |. From Claim 2, |S 2 | M/c. Also, |S 1 | n/v. Since N opt max( n/v, M/c ) we get a 2-approximation.

12
12 Next-fit Algorithm Next-fit algorithm: Put an arriving item in the currently active bin. Open a new bin if the active bin cannot accommodate this item. For traditional online bin-packing, it is known that Next-fit uses as most 2·N OPT bins. This is not the case for class-constrained packing: = Next-fit packing ( 15/2 bins) Optimal packing (3 bins) r= v/c v=5 c=2

13
13 Class-constrained Packing of Temporary Items Items are packed for a bounded time interval (that is unknown in advance) The sequence consists of 1.arrival of an item a of color i {1,..,M}. 2.departure of an item that was packed earlier. We consider two models: 1.A departure is associated with a specific item (of specific color, placed in specific bin). 2.A departure is associated with a color; thus, we may choose which item of that color to remove.

14
14 Results for CCBP of Temporary Items For any deterministic algorithm, r v/c. For all any-fit algorithms, r v/c (An any-fit algorithm opens a new bin only when no open bin can accommodate the new item). When departure events are associated with colors, for all any fit algorithms r min(v/c, c-1). The color-sets algorithm has r=v (the worst possible). An a-priori knowledge of n, M does not help.

15
15 The Online Class-Constrained Multiple Knapsack Problem Our Results: For any v c, and any deterministic algorithm, A d, for CCMK, r d c/v. This ratio is achieved by any greedy algorithm (reject only items that cannot fit to any knapsack). For any v c, any deterministic algorithm, A d, for temporary CCMK, and any 0, r d. Performance measure: number of items packed by the algorithm A number of items packed by an optimal algorithm r A ( ) =

16
16 Related Work Online bin packing (items with arbitrary sizes) r ff 1.7 ( Johnson and Demers, 1974 ) r A 1.54 for deterministic algorithms (Van Vliet,1996) Offline class-constrained packing ( Shachnai and Tamir, 2001 ). Data placement ( Golubchik, Khanna, Khuller, Thurimella, and Zhu, 2000 ). Scheduling tasks with unknown durations ( Azar, Broder and Karlin, 1994 ).

17
17 = color-sets packing Possible optimal packing v = 5 c = 2 The Color-sets Algorithm The algorithm: Partition (online) the M colors in into M/c color-sets. Pack the items of each color- set greedily. Color -sets Theorem: r cs < 2

Similar presentations

OK

© 2009 IBM Corporation 1 Improving Consolidation of Virtual Machines with Risk-aware Bandwidth Oversubscription in Compute Clouds Amir Epstein Joint work.

© 2009 IBM Corporation 1 Improving Consolidation of Virtual Machines with Risk-aware Bandwidth Oversubscription in Compute Clouds Amir Epstein Joint work.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google