1 / 17

Tight Bounds for Online Class-constrained Packing

Tight Bounds for Online Class-constrained Packing. Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir The Technion IIT. Problem Definition. We need to pack items into bins. All items have the same (unit) size. Each item has a color (type). All the bins have the same capacity.

hirame
Download Presentation

Tight Bounds for Online Class-constrained Packing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

  4. Optimization Goals: 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. 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 Noptdenote 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·Nopt bins.

  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. c=2 v=5 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.

  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, =a1,a2,.. of length n,such that k, ak{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. Possible optimal packing Online Class-constrained Packing, An Example of CCBP. First-fit Algorithm: Put an arriving item in the leftmost bin that can accommodate it.  = v = 5 c = 2 First-fit packing

  8. Results :Deterministic Algorithms for CCBP • For a sequence, , of length n, let k = M/c -1 and h = n/v -1. • Sc,v(k,h) = the set of input sequences with k,h. • Lower Bound: For any deterministic algorithm, rd(Sc,v(k,h))  1+ (k+1- kc+1/v)/(h=1). (asymptotically, rd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. bad bins Lower Bound for Deterministic Algorithms Theorem: for any deterministic algorithm A,rA 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. v = 10 c = 3 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  .

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

  11. Upper Bound for First-fit Theorem:rff2. Proof: LetS1be the set of full bins (v items);S2is 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 S2 (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, Nff = |S1|+|S2|. From Claim 2, |S2|M/c.Also,|S1|n/v. Since Nopt max( n/v , M/c ) we get a 2-approximation.

  12.  = r= v/c Next-fit packing ( 15/2 bins) Optimal packing (3 bins) 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·NOPT bins. This is not the case for class-constrained packing: v=5 c=2

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

  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. The Online Class-Constrained Multiple Knapsack Problem Performance measure: number of items packed by the algorithm A number of items packed by an optimal algorithm rA() = • OurResults: • For any v  c, and any deterministic algorithm, Ad, for CCMK, rd 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, Ad, for temporary CCMK, and any 0, rd.

  16. Related Work • Online bin packing (items with arbitrary sizes) • rff1.7 (Johnson and Demers, 1974) • rA 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. Possible optimal packing 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. Theorem: rcs < 2  = Color-sets v = 5 c = 2 color-sets packing

More Related