- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
The bin packing problem The bin packing problem For n objects with sizes s1, …, sn where 0 si≤1, find the smallest number of bins with capacity one, such that n objects can be packed into bins. or find a minimum set partition such that the sum of objects in every set is less than 1. Can we partition n objects into two sets such the sum of objects in one set is equal to that of objects in another set? The First Fit Strategy Place the next object in the list S into the first bin which has not been completely filled into which it will fit. When bins are filled completely they are closed and if an object will not fit into any currently open bin, a new bin is opened. The First Fit Decreasing Strategy First sort the objects in decreasing order of sizes and then run the FF algorithm BinPackFirstFit(S, n, bin) 1 initialize all b[j] as 0.0 // space used up in bin j 2 for i←1 to n do 3 for j←1 to n do 4 if b[j]+s[i]≤1.0 then 5 B[i]← j 6 b[j]← b[j]+s[i] 7 break 8 j←1 9 while (b[j]!=0) do 10 j← j+1 11 return For example, given objects 0.4, 0.2, 0.4, 0.8, 0.2, 0.2, 0.5, 0.3. FFD sorts them in decreasing order 0.8, 0.5, 0.4, 0.4, 0.3, 0.2,0.2, 0.2 and then allocates to the first bin that fits 0.8 0.2 0.5 0.4 0.2 0.2 0.4 0.3 Note that this is not optimal: the objects would fit into 3 bins. Lemma Let S = (s1, …, sn) be an input I, in non-increasing order, for the bin packing problem and let OPT(I) be the optimal number of bins for S. All of the objects placed by FFD in extra bins (i.e., bins with index larger than OPT(I)) have size at most 1/3. Proof Let i be the index of the first object placed by FFD in bin OPT(I)+1. Si must be no larger than 1/3. Suppose Si 1/3. Then S1 ,…, Si-1 1/3, and are placed in bins Bj for 1≤j≤OPT(I), at most two objects each bin. For some k ≥ 0,the first k bins hold one object each, and bins Bk+1, …, BOPT hold two objects each. Si 1/3 can not fit even by an
您可能关注的文档
- 高级统计学1章节.ppt
- 高级统计学2章节.ppt
- 第十章节完整性new.ppt
- 高级统计学3,4章节.ppt
- 高级统计学5,6章节.ppt
- 第十章节中央银行g36课件.ppt
- 高级统计学7章节.ppt
- 第十章曲线积分与曲面积分第十章第3节格林公式及应用1章节.ppt
- 高健康技术和疾病的根除课件.ppt
- 第十章曲线积分与曲面积分第十章第3节格林公式及应用2章节.ppt
- 算法高级教程3.6Theknapsackproblem.ppt
- 算法高级教程3.7RandomapproximationAlgorithms.ppt
- 算法高级教程3.8ApproximationAlgorithmsbasedonlinearprogramming.ppt
- 算法高级教程3.9hardnessofapproximation.ppt
- 鸟的天堂精品课件二.ppt
- 算法高级教程3.10.1Onlinecachingproblem.ppt
- 鸟的天堂精品课件三.ppt
- 算法高级教程3.10.2OnlineBipartiteMatching.pptx
- 算法高级教程3.10Onlinealgorithms.ppt
- 鸟的天堂精品课件一.ppt
文档评论(0)