首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 背包问题动态规划算法JAVA 给定n种物品和一背包。物品i的重量是wi,其价值为vi,背包的容量为c。问应如何选择装入背包中的物品,使得装入背包中物品的总价...

背包问题动态规划算法JAVA 给定n种物品和一背包。物品i的重量是wi,其价值为vi,背包的容量为c。问应如何选择装入背包中的物品,使得装入背包中物品的总价...

资 源 简 介

背包问题动态规划算法JAVA 给定n种物品和一背包。物品i的重量是wi,其价值为vi,背包的容量为c。问应如何选择装入背包中的物品,使得装入背包中物品的总价值最大? 在选择装入背包的物品时,对每种物品i只有两种选择,即装入背包或不装入背包。不能将物品i装入背包多次,也不能只装入部分的物品i。因此,该问题称为0-1背包问题。-Knapsack problem dynamic programming algorithm for a given n species JAVA goods and one backpack. Item i is the weight of wi, the value for vi, knapsack capacity c. Question should be how to choose the items into the backpack, the backpack into the total value of the largest items? In the selection of the items into the backpack, for each of the items i have only two choices, that is loaded or not loaded backpack backpack. Items should not be many times i load backpack can not only part of the goods loaded i. Therefore, the problem known as the 0-1 knapsack problem.

文 件 列 表

0-1背包问题(JAVA).txt
VIP VIP
0.182489s