请教一个算法的问题
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 13 楼,当前显示第 10 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:Bird (等级:5 - 略有小成,发帖:759) 发表:2006-03-03 19:10:03  10楼 
本来想打电话问你的,不过明天我有考试,你说你看见了就简单得作答一下子呗
oh....
first fit is 2-approximate...to show that,
We first show that all bins (最多1个例外) at the end will be at least half full
Say each bin has capacity P
The intuition is that, at each instance in the packing process, if there's already a less-than-half full bin, the next item will either
1. settle in a new empty bin, if it's weight > P/2, or
2. settle in that less-than-half full bin
Either case, # of less-than-half full bins remains at most one....you can continue the proof...


For the second part, I dunno how to attack it...will try if i get more time
这风却是年年都有
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 13 楼,当前显示第 10 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码