Skip to main content

UKP5: A New Algorithm for the Unbounded Knapsack Problem

  • Conference paper
  • First Online:
Experimental Algorithms (SEA 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9685))

Included in the following conference series:

  • 1078 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 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

  1. Andonov, R., Poirriez, V., Rajopadhye, S.: Unbounded knapsack problem: dynamic programming revisited. Eur. J. Oper. Res. 123(2), 394–407 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

    Article  MathSciNet  MATH  Google Scholar 

  3. Delorme, M., Iori, M., Martello, S.: Bin packing and cutting stock problems: mathematical models and exact algorithms. In: Decision Models for Smarter Cities (2014)

    Google Scholar 

  4. Garfinkel, R.S., Nemhauser, G.L.: Integer Programming, vol. 4. Wiley, New York (1972)

    MATH  Google Scholar 

  5. Gilmore, P.C., Gomory, R.E.: A linear programming approach to the cutting-stock problem. Oper. Res. 9(6), 849–859 (1961)

    Article  MathSciNet  MATH  Google Scholar 

  6. Gilmore, P.C., Gomory, R.E.: A linear programming approach to the cutting stock problem-Part II. Oper. Res. 11(6), 863–888 (1963)

    Article  MathSciNet  MATH  Google Scholar 

  7. Hu, T.C.: Integer programming and network flows. Technical report, DTIC Document (1969)

    Google Scholar 

  8. Huang, P.H., Tang, K.: A constructive periodicity bound for the unbounded knapsack problem. Oper. Res. Lett. 40(5), 329–331 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  9. Iida, H.: Two topics in dominance relations for the unbounded knapsack problem. Open Appl. Math. J. 2(1), 16–19 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  10. Martello, S., Toth, P.: An exact algorithm for large unbounded knapsack problems. Oper. Res. Lett. 9(1), 15–20 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  11. Pisinger, D.: Algorithms for knapsack problems (1995)

    Google Scholar 

  12. Poirriez, V., Yanev, N., Andonov, R.: A hybrid algorithm for the unbounded knapsack problem. Discrete Optim. 6(1), 110–124 (2009)

    Article  MathSciNet  MATH  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Henrique Becker .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics