文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>knapsack problem, solved in python

knapsack problem, solved in python

时间:2008-10-12  来源:rockins

Knapsack problem can be described as follows: given n objects, whose weights are w[1], w[2], ..., w[n], respectively. There's a knapsack whose maximum capability is W. The question is: how to select objects from the n objects, so that the selected objects can be fitted in the knapsack?
Theoretically, dynamic progamming can solve knapsack problem in polynomial time. Inspired by this conclusion, I developed a proof-of-concept programme in Python, and here it is:


if __name__ == '__main__':
    knapsackTest()

相关阅读 更多 +
排行榜 更多 +
Meme的毒药游戏手机版下载

Meme的毒药游戏手机版下载

休闲益智 下载
野兽战争模拟器手机版下载

野兽战争模拟器手机版下载

策略塔防 下载
山海经卡牌射击手游下载

山海经卡牌射击手游下载

飞行射击 下载