Abstract
In this paper we present UKP5, a novel algorithm for solving the unbounded knapsack problem. UKP5 is based on dynamic programming, but implemented in a non traditional way: instead of looking backward for stored values of subproblems, it stores incremental lower bounds forward. UKP5 uses sparsity, periodicity, and dominance for speeding up computation. UKP5 is considerably simpler than EDUK2, the state-of-the-art algorithm for solving the problem. Moreover, it can be naturally implemented using the imperative paradigm, differently from EDUK2. We run UKP5 and EDUK2 on a benchmark of hard instances proposed by the authors of EDUK2. The benchmark is composed by 4540 instances, divided into five classes, with instances ranging from small to large inside each class. Speedups were calculated for each class, and the overall speedup was calculated as the classes speedups average. The experimental results reveal that UKP5 outperforms EDUK2, being 47 times faster on the overall average.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The UKP5 implementation is at codes/cpp/ and two versions of PYAsUKP are at codes/ocaml/. The pyasukp_site.tgz is the version used to generate the instances, and was also available at http://download.gna.org/pyasukp/pyasukpsrc.html. A more stable version was provided by the authors. This version is in pyasukp_mail.tgz and it was used to solve the instances the results presented in Table 1. The create_*_instances.sh scripts inside codes/sh/ were used to generate the instance datasets.
- 2.
Given by the time application, available at https://www.archlinux.org/packages/extra/x86_64/time/. The bash internal command was not used.
References
Andonov, R., Poirriez, V., Rajopadhye, S.: Unbounded knapsack problem: dynamic programming revisited. Eur. J. Oper. Res. 123(2), 394–407 (2000)
Belov, G., Scheithauer, G.: A branch-and-cut-and-price algorithm for one-dimensional stock cutting and two-dimensional two-stage cutting. Eur. J. Oper. Res. 171(1), 85–106 (2006)
Delorme, M., Iori, M., Martello, S.: Bin packing and cutting stock problems: mathematical models and exact algorithms. In: Decision Models for Smarter Cities (2014)
Garfinkel, R.S., Nemhauser, G.L.: Integer Programming, vol. 4. Wiley, New York (1972)
Gilmore, P.C., Gomory, R.E.: A linear programming approach to the cutting-stock problem. Oper. Res. 9(6), 849–859 (1961)
Gilmore, P.C., Gomory, R.E.: A linear programming approach to the cutting stock problem-Part II. Oper. Res. 11(6), 863–888 (1963)
Hu, T.C.: Integer programming and network flows. Technical report, DTIC Document (1969)
Huang, P.H., Tang, K.: A constructive periodicity bound for the unbounded knapsack problem. Oper. Res. Lett. 40(5), 329–331 (2012)
Iida, H.: Two topics in dominance relations for the unbounded knapsack problem. Open Appl. Math. J. 2(1), 16–19 (2008)
Martello, S., Toth, P.: An exact algorithm for large unbounded knapsack problems. Oper. Res. Lett. 9(1), 15–20 (1990)
Pisinger, D.: Algorithms for knapsack problems (1995)
Poirriez, V., Yanev, N., Andonov, R.: A hybrid algorithm for the unbounded knapsack problem. Discrete Optim. 6(1), 110–124 (2009)
Acknowledgments
We are very thankful to Vincent Poirriez for providing us the codes of a stable version of PYAsUKP, and answering our questions about the paper [12]. We are thankful to the CNPq (Conselho Nacional de Desenvolvimento CientÃfico e Tecnológico) for the financial support.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Becker, H., Buriol, L.S. (2016). UKP5: A New Algorithm for the Unbounded Knapsack Problem. In: Goldberg, A., Kulikov, A. (eds) Experimental Algorithms. SEA 2016. Lecture Notes in Computer Science(), vol 9685. Springer, Cham. https://doi.org/10.1007/978-3-319-38851-9_4
Download citation
DOI: https://doi.org/10.1007/978-3-319-38851-9_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-38850-2
Online ISBN: 978-3-319-38851-9
eBook Packages: Computer ScienceComputer Science (R0)