Question: You have n items with weights x 1 , x 2 , . . . . . xn , where 0 x _ i 1

You have n items with weights x1,x2,.....xn, where 0x_i1 for all i, arriving one item at a
time. You want to pack them in the minimal number of bins, where each bin can hold a maximum
weight of 1. As each item comes in, you must immediately assign it to a bin without knowing the
weights of future items. Consider the strategy that assigns the arriving item to the last bin that has
been opened if it fits, and open a new bin otherwise. Show that this strategy achieves a competitive
ratio of 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!