Question: Suppose that we are given a set of n objects where the size $s _ i$ of the $ textit { i } $th
Suppose that we are given a set of n objects where the size $si$ of the $textiti$th object satisfies $$ $si$ $$ We wish to pack all the objects into the minimum number of unitsize bins. Each bin can hold any subset of the items whose total size does not exceed In other words, we are trying to find a function f: $n$ $rightarrow$ $k$ so that $sumi:fij$ $si$ $leq$ for all j $epsilon$ $k$ and our goal is to minimize k Let S $sumin$ $si$
a Prove that the optimal number of bins required is at least $S$
The firstfit algorithm considers each object in turn from to n and places it in the first bin that can accommodate it If there is no such bin, then we create a new bin for it and make it the last bin. Note that this defines an ordering over bins based on when we created them, so "first" and "last" make sense.
b Prove that the firstfit algorithm leaves at most one bin at most half full. In other words, all bins but one are mote than half full.
c Prove that the firstfit algorithm is a approximation to bin packing.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
