Skip to main content

A Dynamic Approach for the Online Knapsack Problem

  • Conference paper
Modeling Decisions for Artificial Intelligence (MDAI 2014)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 8825))

Abstract

The online knapsack problem (OKP) is a generalized version of the 0-1 knapsack problem (0-1KP) to a setting in which the problem inputs are revealed over time. Whereas the 0-1KP involves the maximization of the value of the knapsack contents without exceeding its capacity, the OKP involves the following additional requirements: items are presented one at a time, their features are only revealed at their arrival, and an immediate and irrevocable decision on the current item is required before observing the next one. This problem is known to be non-approximable in its general case. Accordingly, we study a relaxed variant of the OKP in which items delay is allowed: we assume that the decision maker is allowed to retain the observed items until a given deadline before deciding definitively on them. The main objective in this problem is to load the best subset of items that maximizes the expected value of the knapsack without exceeding its capacity. We propose an online algorithm based on dynamic programming, that builds-up the solution in several stages. Our approach incorporates a decision rule that identifies the most desirable items at each stage, then places the fittest ones in the knapsack. Our experimental study shows that the proposed algorithm is able to approach the optimal solution by a small error margin.

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

Access this chapter

Subscribe and save

Springer+ Basic
€32.70 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Indonesia)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 39.58
Price includes VAT (Indonesia)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 48.00
Price excludes VAT (Indonesia)
  • 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Albers, S.: Online algorithms: a survey. Mathematical Programming 97(1-2), 3–26 (2003)

    MathSciNet  MATH  Google Scholar 

  2. Papastavrou, J.D., Rajagopalan, S., Kleywegt, A.J.: The dynamic and stochastic knapsack problem with deadlines. Management Science 42, 1706–1718 (1996)

    Article  MATH  Google Scholar 

  3. Mahdian, M., Nazerzadeh, H., Saberi, A.: Online optimization with uncertain information. ACM Trans. Algorithms 8, 2:1–2:29 (2012)

    Google Scholar 

  4. Marchetti-Spaccamela, A., Vercellis, C.: Stochastic on-line knapsack problems. Mathematical Programming 68, 73–104 (1995)

    MathSciNet  MATH  Google Scholar 

  5. Lueker, G.S.: Average-case analysis of off-line and on-line knapsack problems. In: SODA 1995: Proceedings of the Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 179–188. Society for Industrial and Applied Mathematics (1995)

    Google Scholar 

  6. Iwama, K., Taketomi, S.: Removable online knapsack problems. In: Widmayer, P., Triguero, F., Morales, R., Hennessy, M., Eidenbenz, S., Conejo, R. (eds.) ICALP 2002. LNCS, vol. 2380, pp. 293–305. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  7. Iwama, K., Zhang, G.: Optimal resource augmentations for online knapsack. In: Charikar, M., Jansen, K., Reingold, O., Rolim, J.D.P. (eds.) APPROX and RANDOM 2007. LNCS, vol. 4627, pp. 180–188. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  8. Han, X., Makino, K.: Online minimization knapsack problem. In: Bampis, E., Jansen, K. (eds.) WAOA 2009. LNCS, vol. 5893, pp. 182–193. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  9. Han, X., Kawase, Y., Makino, K.: Online knapsack problem with removal cost. In: Gudmundsson, J., Mestre, J., Viglas, T. (eds.) COCOON 2012. LNCS, vol. 7434, pp. 61–73. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  10. Zhou, Y., Chakrabarty, D., Lukose, R.: Budget constrained bidding in keyword auctions and online knapsack problems. In: Papadimitriou, C., Zhang, S. (eds.) WINE 2008. LNCS, vol. 5385, pp. 566–576. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Babaioff, M., Immorlica, N., Kempe, D., Kleinberg, R.D.: A knapsack secretary problem with applications. In: Charikar, M., Jansen, K., Reingold, O., Rolim, J.D.P. (eds.) APPROX and RANDOM 2007. LNCS, vol. 4627, pp. 16–28. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  12. Papastavrou, J.D., Kleywegt, A.J.: The dynamic and stochastic knapsack problem. Operations Research 46, 17–35 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  13. Papastavrou, J.D., Kleywegt, A.J.: The dynamic and stochastic knapsack problem with random sized items. Operations Research 49, 26–41 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  14. Kramer, A.D.I.: Delaying decisions in order to learn the distribution of options. PhD thesis (2010)

    Google Scholar 

  15. Pisinger, D.: A minimal algorithm for the 0-1 knapsack problem. Operations Research 45(5), 758–767 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  16. Pisinger, D.: Core problems in knapsack algorithms. Operations Research 47, 570–575 (1999)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Ben-Romdhane, H., Ben Jouida, S., Krichen, S. (2014). A Dynamic Approach for the Online Knapsack Problem. In: Torra, V., Narukawa, Y., Endo, Y. (eds) Modeling Decisions for Artificial Intelligence. MDAI 2014. Lecture Notes in Computer Science(), vol 8825. Springer, Cham. https://doi.org/10.1007/978-3-319-12054-6_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-12054-6_9

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-12053-9

  • Online ISBN: 978-3-319-12054-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics