Skip to main content
Log in

An experimental study of random knapsack problems

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

The size of the Pareto curve for the bicriteria version of the knapsack problem is polynomial on average. This has been shown for various random input distributions. We experimentally investigate the number of Pareto points for knapsack instances overn elements whose profits and weights are chosen at random according to various classes of input distributions. The numbers observed in our experiments are significantly smaller than the known upper bounds. For example, the upper bound for so-called uniform instances isO(n 3). Based on our experiments, we conjecture that the number of Pareto points for these instances is only Θ(n 2). We also study other structural properties for random knapsack instances that have been used in theoretical studies to bound the average-case complexity of the knapsack problem.

Furthermore, we study advanced algorithmic techniques for the knapsack problem. In particular, we review several ideas that originate from theory as well as from practice. Most of the concepts that we use are simple and have been known for at least 20 years, but apparently have not been used in this combination. Surprisingly, the result of our study is a very competitive code that outperforms the best previous implementationCombo by orders of magnitude for various classes of random instances, including harder random knapsack instances in which profits and weights are chosen in a correlated fashion.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. E. Balas and E. Zemel. An algorithm for large zero-one knapsack problems.Operations Research, 28:1130–1154, 1980.

    MATH  MathSciNet  Google Scholar 

  2. R. Beier, Probabilistic Analysis of Combinatorial Optimization Problems. Ph.D. thesis, Universität des Saarlandes, 2004.

  3. R. Beier and B. Vöcking. Random knapsack in expected polynomial time. InProceedings of the 35th Annual ACM Symposium on Theory of Computing (STOC 2003), pages 232–241, San Diego, CA, 2003.

  4. R. Beier and B. Vöcking. Probabilistic analysis of knapsack core algorithms. InProceedings of the 15th Annual Symposium on Discrete Algorithms (SODA 2004), pages 461–470, New Orleans, LA, 2004.

  5. G. B. Dantzig. Discrete variable extremum problems.Operations Research, 5:266–277, 1957.

    MathSciNet  Google Scholar 

  6. M. E. Dyer and A. M. Frieze. Probabilistic analysis of the multidimensional knapsack problem.Mathematics of Operations Research, 14(1):162–176, 1989.

    MATH  MathSciNet  Google Scholar 

  7. M. Ehrgott.Multicriteria Optimization. Springer-Verlag, New York, 2000.

    MATH  Google Scholar 

  8. M. Ehrgott and X. Gandibleux.Multiple Criteria Optimization: State of the Art Annotated Bibliographic Surveys. Volume 52 of International Series in Operations Research and Management Science. Kluwer, Boston, MA, 2002.

    MATH  Google Scholar 

  9. M. R. Garey and D. S. Johnson,Computers and Intractability. Freeman, San Francisco, CA, 1979.

    MATH  Google Scholar 

  10. A. Goldberg and A. Marchetti-Spaccamela. On finding the exact solution to a zero-one knapsack problem. InProceedings of the 16th ACM Symposium on Theory of Computing (STOC), pages 359–368, 1984.

  11. E. Horowitz and S. Sahni. Computing partitions with applications to the knapsack problem.Journal of the ACM, 21(2):277–292, April 1974.

    Article  MATH  MathSciNet  Google Scholar 

  12. H. Kellerer, U. Pferschy, and D. Pisinger.Knapsack Problems. Springer, New York, 2004.

    MATH  Google Scholar 

  13. G. S. Lueker. On the average difference between the solutions to linear and integer knapsack problems. InApplied Probability—Computer Science, the Interface, volume 1, pages 489–504. Birkhäuser, Basel, 1982.

    Google Scholar 

  14. S. Martello, D. Pisinger, and P. Toth. Dynamic programming and strong bounds for the 0–1 knapsack problem.Management Science, 45(3):414–424, 1999.

    Article  Google Scholar 

  15. S. Martello, D. Pisinger, and P. Toth. New trends in exact algorithms for the 0–1 knapsack problem.European Journal of Operational Research, 123:325–332, 2000.

    Article  MATH  MathSciNet  Google Scholar 

  16. K. Mehlhorn and M. Ziegelmann. Resource constrained shortest paths. InProceedings of the 8th Annual European Symposium (ESA 00), pages 326–337, LNCS 1879. Springer, Berlin, 2000.

    Google Scholar 

  17. G. Nemhauser and Z. Ullmann. Discrete dynamic programming and capital allocation.Management Science, 15(9):494–505, 1969.

    MathSciNet  Google Scholar 

  18. D. Pisinger. Algorithms for Knapsack Problems. Ph.D. thesis, DIKU, University of Copenhagen, 1995.

  19. H. M. Weingartner and D. N. Ness. Methods for the solution of the multi-dimensional 0/1 knapsack problem.Operations Research, 15(1):83–103, 1967.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rene Beier.

Additional information

This research was supported in part by the EU within the 6th Framework Programme under Contract 0019007 (DELIS), by DFG Grant Vo889/2-1, and by a postdoctoral fellowship by the German Academic Exchange Service (DAAD).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Beier, R., Vöcking, B. An experimental study of random knapsack problems. Algorithmica 45, 121–136 (2006). https://doi.org/10.1007/s00453-005-1193-7

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-005-1193-7

Key Words

Navigation