文件名称:d
介绍说明--下载内容均来自于网络,请自行研究使用
【问题描述】:
设有一个背包可以放入的物品重量最重为s,现有n件物品,它们的重量分别为w[0]、 w[1]、w[2]、…、w[n-1]。问能否从这n件物品中选择若干件放入此背包中,使得放入的重量之和正好为s。如果存在一种符合上述要求的选择,则称此背包问题有解(或称其解为真);否则称此背包问题无解(或称其解为假)。试用递归方法设计求解背包问题的算法。
-【Descr iption of the problem: There is a backpack of items can be placed the most weight of the weight of s, the existing n items, and their respective weights for w [0], w [1], w [2], ..., w [ n-1]. N asked whether items from a number of pieces of select Add this backpack makes Add the weight of and an opportunity for s. If there is a selection of these requirements, then to solve the knapsack problem (or its solution is true) or that no solution of this knapsack problem (or its solution to be false). Trial designed recursive algorithm for solving knapsack problem.
设有一个背包可以放入的物品重量最重为s,现有n件物品,它们的重量分别为w[0]、 w[1]、w[2]、…、w[n-1]。问能否从这n件物品中选择若干件放入此背包中,使得放入的重量之和正好为s。如果存在一种符合上述要求的选择,则称此背包问题有解(或称其解为真);否则称此背包问题无解(或称其解为假)。试用递归方法设计求解背包问题的算法。
-【Descr iption of the problem: There is a backpack of items can be placed the most weight of the weight of s, the existing n items, and their respective weights for w [0], w [1], w [2], ..., w [ n-1]. N asked whether items from a number of pieces of select Add this backpack makes Add the weight of and an opportunity for s. If there is a selection of these requirements, then to solve the knapsack problem (or its solution is true) or that no solution of this knapsack problem (or its solution to be false). Trial designed recursive algorithm for solving knapsack problem.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
背包问题
........\背包问题.cpp
........\背包问题.cpp