搜索资源列表
背包问题之贪婪算法求解C语言源代码
- 其实原来的程序也是采用了贪婪算法,不过下面程序中的beibao1函数采用了贪婪算法的另一种写法,beibao函数是以前的代码,用来比较两种算法-fact, the original procedure is used in the greedy algorithm, but the procedures below beibao1 function of the greedy algorithm used another way, beibao function of the previous
0-1bagsourcecode
- 0-1背包问题的C++源代码: 设有一个背包,可以放入重量为S。现有n件物品,重量分别为S1,S2,···,Si (0<i<n+1)均为正数,从这n件物品中
questionofback
- 经典背包问题的一种解法,c语言编写的,比较小的程序-classic knapsack problem of a solution, c language, the procedure is relatively small
huisu
- 回溯(b a c k t r a c k i n g)是一种系统地搜索问题解答的方法。为了实现回溯,首先需要为问题定义一个解空间( solution space),这个空间必须至少包含问题的一个解(可能是最优的)。在迷宫老鼠问题中,我们可以定义一个包含从入口到出口的所有路径的解空间;在具有n 个对象的0 / 1背包问题中(见1 . 4节和2 . 2节),解空间的一个合理选择是2n 个长度为n 的0 / 1向量的集合,这个集合表示了将0或1分配给x的所有可能方法。当n= 3时,解空间为{ ( 0
beibaotanxin
- 普通背包问题的贫心算法C语言解法,在Windows系统下Wintc编写-ordinary knapsack problem of poor heart algorithm C language method, in the Windows system under preparation Wintc
01BEIBAOdongtai
- 0-1背包问题的动态规划算法C语言实现.Windows系统下 Wintc环境编写-0-1 knapsack problem of the dynamic programming algorithm C language. Windows systems Wintc Central Habitat prepared
beibaoJAVA
- 背包问题动态规划算法JAVA 给定n种物品和一背包。物品i的重量是wi,其价值为vi,背包的容量为c。问应如何选择装入背包中的物品,使得装入背包中物品的总价值最大? 在选择装入背包的物品时,对每种物品i只有两种选择,即装入背包或不装入背包。不能将物品i装入背包多次,也不能只装入部分的物品i。因此,该问题称为0-1背包问题。
beibao
- 关于背包的装载能力,用C++设计的程序,是著名的背包问题,相信大家在做实验报告时会遇到
test
- 0-1背包问题:给定n种物品和一背包.物品i的重量是wi,其价格是vi,背包的容量为C
0_1bag
- 0 1背包问题的C++实现代码,比较简单,希望大家可以借鉴。
beibao
- 0-1背包问题(0-1 Knapsack Problem)的定义为:设集合 代表m件物品,正整数 分别表示第 件物品的价值与重量,那么0-1背包问题KNAP(A,c)定义为,求A的子集,使得重量之和小于背包的容量c,并使得价值和最大。
Algorithm
- c++经典小程序。包括河内塔 费式数列 巴斯卡三角形 三色棋 老鼠走迷官(一) 老鼠走迷官(二) 骑士走棋盘 八个皇后 八枚银币 生命游戏 字串核对 双色、三色河内塔 背包问题(Knapsack Problem) 数、运算 蒙地卡罗法求 PI Eratosthenes筛选求质数 超长整数运算(大数运算) 长 PI 最大公因数、最小公倍数、因式分解 完美数 阿姆斯壮数 最大
几个c实用程序
- 背包问题、设计彩色框、全屏幕模拟时钟、五子棋、迷宫问题等5个c程序。
knappara
- 本程序实现0-1背包问题的遗传算法的并行计算,mpi+c语言-This procedure achieved 0-1 knapsack problem genetic algorithm parallel computing, mpi+ c language
exp3
- 著名的0-1背包问题 C++实现 矩阵显示过程-Well-known 0-1 knapsack problem C++ Realization process matrix display
exp4
- 部分背包问题(不同于0-1背包) C++实现-Part knapsack problem (as distinct from 0-1 knapsack) C++ Achieve
c
- 用回溯法求解0—1背包问题,并输出问题的最优解。-Retrospective method with 0-1 knapsack problem, and output the optimal solution of the problem.
bag
- C语言编译的,使用堆栈的方法实现背包问题的解法,详细说明在里面-C language compiler, using the stack method to achieve solution knapsack problem, detailing inside
0-1
- 用于解决0/1 背包问题动态规划详解及C代码,清晰明确,简单易学-Planning the Xiangjie and C code used to solve the 0/1 knapsack problem dynamic, clear, and easy to learn
hh
- 加界限回溯背包问题C++源代码。实现结果真确-Plus boundary backtracking knapsack problem C++ source code. Achieve accurate results