首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 296 毫秒
1.
It is known that online knapsack is not competitive. This negative result remains true even if items are removable. In this paper we consider online removable knapsack with resource augmentation, in which we hold a knapsack of capacity R?1 and aim at maintaining a feasible packing to maximize the total profit of items packed into the knapsack. Both scenarios that removal of accepted items is allowed and is not allowed are investigated. We evaluate an online algorithm by comparing the resulting packing to an optimal packing that uses a knapsack of capacity one. Optimal online algorithms are derived for both the weighted case (items have arbitrary profits) and the unweighted case (the profit of an item is equal to its size).  相似文献   

2.
本文介绍了属于NP难问题的无界背包问题的一种新的精确算法,基于问题的几何结构通过二分搜索方法不断减小解空间,最终直接求出问题的最优效益值和最佳装包方案。当待装入包中的物品数量固定时,算法的时间复杂性为线性时间,初步解决了求解当前呈指数增长背包实例时存在的困难,实验中各种数据实例证明与常用的MTU2和EDU相比,该新算法在理论上是可行的。  相似文献   

3.
收缩背包问题是标准背包问题的一个扩展,其中背包的容量为所装物品数量的非增函数。本文提出了基于分子生物技术的求解收缩背包问题的DNA算法,首先将其约束条件进行分解;然后设计一系列与物品重量相对应的寡聚核苷酸片断及其链接模板,在链接酶的作用下将它们进行链接反应,生成代表任意物品组合的DNA链;再通过基本的生物操
作筛选出可行解;最后比较各个可行解对应的目标函数值,进而得到最优解。  相似文献   

4.
The setup knapsack problem can be viewed as a more complex version of the well‐known classical knapsack problem. An instance of such a problem may be defined by a set of n items that is divided into m different classes For each class, only one item is considered as a setup item. The aim of the problem is to pack a subset of items in a knapsack of a predefined capacity that maximizes an objective function. In this paper, we analyze the sensitivity of an optimal solution depending on the variation of the profits or weights of arbitrary items. The optimality of the solution at hand is guaranteed by establishing the sensitivity interval that is characterized by both lower and upper values (called limits). First, two cases are distinguished when varying the profits: perturbation of the profit of an item (either ordinary or setup item) and, variation of the profits of a couple of items containing both setup and ordinary items belonging to the same class. Second, two cases are studied, where the perturbation concerns the weights: the variation is relied on the weight of an item and, the case of the variation of the weights of a subset of items. The established results are first illustrated throughout a didactic example, where both approximate and exact methods are used for analyzing the quality of the proposed results. Finally, an extended experimental part is proposed in order to evaluate the effectiveness of the proposed limits.  相似文献   

5.
In this paper, we propose a method to solve exactly the knapsack sharing problem (KSP) by using dynamic programming. The original problem (KSP) is decomposed into a set of knapsack problems. Our method is tested on correlated and uncorrelated instances from the literature. Computational results show that our method is able to find an optimal solution of large instances within reasonable computing time and low memory occupancy.  相似文献   

6.
We are concerned with a variation of the standard 0–1 knapsack problem, where the values of items differ under possible S scenarios. By applying the ‘pegging test’ the ordinary knapsack problem can be reduced, often significantly, in size; but this is not directly applicable to our problem. We introduce a kind of surrogate relaxation to derive upper and lower bounds quickly, and show that, with this preprocessing, the similar pegging test can be applied to our problem. The reduced problem can be solved to optimality by the branch-and-bound algorithm. Here, we make use of the surrogate variables to evaluate the upper bound at each branch-and-bound node very quickly by solving a continuous knapsack problem. Through numerical experiments we show that the developed method finds upper and lower bounds of very high accuracy in a few seconds, and solves larger instances to optimality faster than the previously published algorithms.  相似文献   

7.
H. Shachnai  T. Tamir 《Algorithmica》2001,29(3):442-467
We study two variants of the classic knapsack problem, in which we need to place items of <e5>different types</e5> in multiple knapsacks; each knapsack has a limited capacity, and a bound on the number of different types of items it can hold: in the <e5>class-constrained multiple knapsack problem (CMKP)</e5> we wish to maximize the total number of packed items; in the <e5>fair placement problem (FPP)</e5> our goal is to place the same (large) portion from each set. We look for a perfect placement, in which both problems are solved optimally. We first show that the two problems are NP-hard; we then consider some special cases, where a perfect placement exists and can be found in polynomial time. For other cases, we give approximate solutions. Finally, we give a nearly optimal solution for the CMKP. Our results for the CMKP and the FPP are shown to provide efficient solutions for two fundamental problems arising in multimedia storage subsystems. Received June 1, 1998; revised December 5, 1998.  相似文献   

8.
In this paper, we study the online unweighted knapsack problem with removal cost. The input is a sequence of items u 1,u 2,…,u n , each of which has a size and a value, where the value of each item is assumed to be equal to the size. Given the ith item u i , we either put u i into the knapsack or reject it with no cost. When u i is put into the knapsack, some items in the knapsack are removed with removal cost if the sum of the size of u i and the total size in the current knapsack exceeds the capacity of the knapsack. Here the removal cost means a cancellation charge or disposal fee. Our goal is to maximize the profit, i.e., the sum of the values of items in the last knapsack minus the total removal cost occurred. In this paper, we consider two kinds of removal cost: unit and proportional cost. For both models, we provide their competitive ratios. Namely, we construct optimal online algorithms and prove that they are best possible.  相似文献   

9.
0-1背包问题作为经典的NP完全问题一直得到广泛的关注和研究.研究发现,经典回溯算法在解决0-1背包问题时的算法时间复杂度较高,尤其是在物品数量较多时,短时间内不能得到问题的解,导致算法的适用性较差.虽然经典贪心算法和现阶段涌现出的大量新型算法能够极大地缩减算法的运行时间,但普遍是以牺牲算法的准确性为代价的,不能保证可...  相似文献   

10.
The 0–1 knapsack problem has been extensively studied in the past years due to its immediate applications in industry and financial management, such as cargo loading, stock cutting, and budget control. Many algorithms have been proposed to solve this problem, most of which are heuristic, as the problem is well-known to be NP-hard. Only a few optimal algorithms have been designed to solve this problem but with high time complexity. This paper proposes the cost-optimal parallel algorithm (COPA) on an EREW PRAM model with shared memory to solve this problem. COPA is scalable and yields optimal solutions consuming less computational time. Furthermore, this paper implements COPA on two scenarios – multicore CPU based architectures using Open MP and GPU based configurations using CUDA. A series of experiments are conducted to examine the performance of COPA under two different test platforms. The experimental results show that COPA could reduce a significant amount of execution time. Our approach achieves the speedups of up to 10.26 on multicore CPU implementations and 17.53 on GPU implementations when the sequential dynamic programming algorithm for KP01 is considered as a baseline. Importantly, GPU implementations outstand themselves in the experimental results.  相似文献   

11.
Dynamic Programming Revisited: Improving Knapsack Algorithms   总被引:1,自引:1,他引:0  
U. Pferschy 《Computing》1999,63(4):419-430
The contribution of this paper is twofold: At first an improved dynamic programming algorithm for the bounded knapsack problem is given. It decreases the running time for an instance with n items and capacity c from to , which is the same pseudopolynomial complexity as usually given for the 0--1 knapsack problem. In the second part a general approach based on dynamic programming is presented to reduce the storage requirements for combinatorial optimization problems where it is computationally more expensive to compute the explicit solution structure than the optimal solution value. Among other applications of this scheme it is shown that the 0--1 knapsack problem as well as the bounded knapsack problem can be solved in time and space. Received: October 15, 1998; revised March 10, 1999  相似文献   

12.
In this paper, the two-dimensional cutting/packing problem with items that correspond to simple polygons that may contain holes are studied in which we propose algorithms based on no-fit polygon computation. We present a GRASP based heuristic for the 0/1 version of the knapsack problem, and another heuristic for the unconstrained version of the knapsack problem. This last heuristic is divided in two steps: first it packs items in rectangles and then use the rectangles as items to be packed into the bin. We also solve the cutting stock problem with items of irregular shape, by combining this last heuristic with a column generation algorithm. The algorithms proposed found optimal solutions for several of the tested instances within a reasonable runtime. For some instances, the algorithms obtained solutions with occupancy rates above 90% with relatively fast execution time.  相似文献   

13.
We present algorithms for the following three-dimensional (3D) guillotine cutting problems: unbounded knapsack, cutting stock and strip packing. We consider the case where the items have fixed orientation and the case where orthogonal rotations around all axes are allowed. For the unbounded 3D knapsack problem, we extend the recurrence formula proposed by [1] for the rectangular knapsack problem and present a dynamic programming algorithm that uses reduced raster points. We also consider a variant of the unbounded knapsack problem in which the cuts must be staged. For the 3D cutting stock problem and its variants in which the bins have different sizes (and the cuts must be staged), we present column generation-based algorithms. Modified versions of the algorithms for the 3D cutting stock problems with stages are then used to build algorithms for the 3D strip packing problem and its variants. The computational tests performed with the algorithms described in this paper indicate that they are useful to solve instances of moderate size.  相似文献   

14.
Many problems can be formulated by variants of knapsack problems. However, such models are deterministic, while many real-life problems include some kind of uncertainty. Therefore, it is worthwhile to develop and test knapsack models that can deal with disturbances. In this paper, we consider a two-stage stochastic multiple knapsack problem. Here, we have a multiple knapsack problem together with a set of possible disturbances. For each disturbance, or scenario, we know its probability of occurrence and the resulting reduction in the sizes of the knapsacks. For each knapsack we decide in the first stage which items we take with us, and when a disturbance occurs we are allowed to remove items from the corresponding knapsack. Our goal is to find a solution where the expected revenue is maximized. We use branch-and-price to solve this problem. We present and compare two solution approaches: the separate recovery decomposition (SRD) and the combined recovery decomposition (CRD). We prove that the LP-relaxation of the CRD is stronger than the LP-relaxation of the SRD. Furthermore, we investigate numerous column generation strategies and methods to create additional columns outside the pricing problem. These strategies reduce the solution time significantly. To the best of our knowledge, there is no other paper that investigates such strategies so thoroughly.  相似文献   

15.
The knapsack problem is well known to be NP-complete. Due to its importance in cryptosystem and in number theory, in the past two decades, much effort has been made in order to find techniques that could lead to practical algorithms with reasonable running time. This paper proposes a new parallel algorithm for the knapsack problem where the optimal merging algorithm is adopted. The proposed algorithm is based on anEREW-SIMD machine with shared memory. It is proved that the proposed algorithm is both optimal and the first without memory conflicts algorithm for the knapsack problem. The comparisons of algorithm performance show that it is an improvement over the past researches.  相似文献   

16.
文中提出考虑时间因素的0-1背包调度问题这一具有NP难度的组合优化问题。给定n个物体(每个物体i的重量为wi,连续加工时间为ti),以及一个容量为S的背包,要求给出一个调度方案(物品的放入顺序和放入时间),使得任意时刻放入背包的物品总重量不超过背包容量,每个物体需放入背包连续加工时长ti后才能取出,该问题是求使所有物体均加工完毕的时间尽可能短的调度方案。提出了3种求解算法:迭代动态规划算法、基于分枝限界的完备算法和遗传进化算法。迭代动态规划算法使用动态规划策略放置尽可能多的未加工物体到背包中,然后每次迭代取出加工完成的物品后再使用动态规划放入尽可能多的剩余未加工物品,直至所有物品被加工完成。基于分枝限界的完备算法通过定义上下界及剪枝操作,有效地降低了算法的计算复杂度。遗传进化算法将一个物品装填序列定义为个体,并定义了相应的适应度、选择、交叉与变异操作。在所设计的3组共计36个算例上的实验结果表明,迭代动态规划算法可以很快求出高质量的解,基于分枝限界的完备算法对小规模算例有很好的效果,遗传算法在处理几百个物体的算例时能在1500s内得到比动态规划算法更好的结果。  相似文献   

17.
收缩背包问题的并行分枝界限算法   总被引:1,自引:0,他引:1  
收缩背包问题(collapsing knapsack problem,CKP)是0-1背包问题的变体,其中背包的容量为所装物品数量的非增函数,针对并行计算的需求,在对CKP问题分解的基础上,给出了求解每个子问题的权分枝界限算法,提出了基于MIMD-DM的收缩背包问题的并行分枝界限算法;并在曙光1000上设计和实现了该算法,以消息传递方式来解决子算法最优解的播送问题,同时给出了子问题的求解顺序,讨论了问题求解过程中的递归深度和系统的通信开销对加速比曲线的影响。  相似文献   

18.
In this paper, the design of a time-efficient and processor-efficient parallel algorithm for the integral knapsack problem is considered. A parallel integral knapsack algorithm is presented, which is adaptive to all parameters, especially to the maximum size of items. The parallel complexity of another important packing problem, the integral exactly-packing problem, is also considered. An optimal O(log n log m) time, parallel integral exactly-packing algorithm is given. Since the partition problem has a constant time, constant processor reduction to the exactly-packing problem, our parallel integral exactly-packing algorithm can be used for job scheduling, task partition, and many other important practical problems. Moreover, the methods and techniques used in this paper can be used for developing processor-efficient and time-efficient parallel algorithms for many other problems. Using the new parallel integral knapsack algorithm, the previously known parallel approximation schemes for the 0–1 knapsack problem and the binpacking problem, by E. W. Mayr and P. S. Gopalkrishnan, are improved upon significantly.  相似文献   

19.
Four scenarios are proposed concerning cooperative behavior for inventory policies between suppliers and retailers: no information is shared; the supplier is dominant during negotiations with retailers; the retailer is dominant during negotiations with suppliers; and the supplier and retailer cooperate. Unlike other studies, we consider deteriorating items and permit completed backorders, with a fixed service rate, in the models for these four scenarios. We explore the optimality of these models and present a procedure to find the optimal solution. Numerical examples are provided to illustrate the procedure, which are also used for sensitivity analysis. The results show that the cooperation scenario with information sharing is the best way to reach a win–win position. However, some compensation programs might be required to persuade suppliers or retailers to cooperate when one of them faces a loss of profits in a cooperative scenario.  相似文献   

20.
On a class of branching problems in broadcasting and distribution   总被引:1,自引:0,他引:1  
We introduce the following network optimization problem: given a directed graph with a cost function on the arcs, demands at the nodes, and a single source s, find the minimum cost connected subgraph from s such that its total demand is no less than lower bound D. We describe applications of this problem to disaster relief and media broadcasting, and show that it generalizes several well-known models including the knapsack problem, the partially ordered knapsack problem, the minimum branching problem, and certain scheduling problems. We prove that our problem is strongly NP-complete and give an integer programming formulation. We also provide five heuristic approaches, illustrate them with a numerical example, and provide a computational study on both small and large sized, randomly generated problems. The heuristics run efficiently on the tested problems and provide solutions that, on average, are fairly close to optimal.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号