, Volume 70, Issue 1, pp 76–91 | Cite as

Online Unweighted Knapsack Problem with Removal Cost

  • Xin Han
  • Yasushi Kawase
  • Kazuhisa Makino


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.


Knapsack problem Online algorithms Competitive ratio 


  1. 1.
    Ashwinkumar, B.V.: Buyback problem - approximate matroid intersection with cancellation costs. In: Automata, Language and Programming. Lecture Notes in Computer Science, vol. 6755, pp. 379–390. Springer, Berlin (2011) CrossRefGoogle Scholar
  2. 2.
    Ashwinkumar, B.V., Kleinberg, R.: Randomized online algorithms for the buyback problem. In: Internet and Network Economics. Lecture Notes in Computer Science, vol. 5929, pp. 529–536. Springer, Berlin (2009) CrossRefGoogle Scholar
  3. 3.
    Babaioff, M., Hartline, J.D., Kleinberg, R.D.: Selling banner ads: online algorithms with buyback. In: Proceedings of the 4th Workshop on Ad Auctions (2008) Google Scholar
  4. 4.
    Babaioff, M., Hartline, J.D., Kleinberg, R.D.: Selling ad campaigns: online algorithms with cancellations. In: Proceedings of the 10th ACM Conference on Electronic Commerce, pp. 61–70 (2009) Google Scholar
  5. 5.
    Biyalogorsky, E., Carmon, Z., Fruchter, G.E., Gerstner, E.: Research note: overselling with opportunistic cancellations. Mark. Sci. 18(4), 605–610 (1999) CrossRefGoogle Scholar
  6. 6.
    Constantin, F., Feldman, J., Muthukrishnan, S., Pál, M.: An online mechanism for ad slot reservations with cancellations. In: Proceedings of the Twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1265–1274 (2009) CrossRefGoogle Scholar
  7. 7.
    Han, X., Makino, K.: Online minimization knapsack problem. In: Approximation and Online Algorithms. Lecture Notes in Computer Science, vol. 5893, pp. 182–193. Springer, Berlin (2010) CrossRefGoogle Scholar
  8. 8.
    Han, X., Makino, K.: Online removable knapsack with limited cuts. Theor. Comput. Sci. 411, 3956–3964 (2010) CrossRefzbMATHMathSciNetGoogle Scholar
  9. 9.
    Iwama, K., Taketomi, S.: Removable online knapsack problems. In: Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 2380, pp. 293–305. Springer, Berlin (2002) CrossRefGoogle Scholar
  10. 10.
    Iwama, K., Zhang, G.: Optimal resource augmentations for online knapsack. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques. Lecture Notes in Computer Science, vol. 4627, pp. 180–188. Springer, Berlin (2007) CrossRefGoogle Scholar
  11. 11.
    Kellerer, H., Pferschy, U., Pisinger, D.: Knapsack Problems. Springer, Berlin (2004) CrossRefzbMATHGoogle Scholar
  12. 12.
    Lueker, G.S.: Average-case analysis of off-line and on-line knapsack problems. J. Algorithms 29(2), 277–305 (1998) CrossRefzbMATHMathSciNetGoogle Scholar
  13. 13.
    Marchetti-Spaccamela, A., Vercellis, C.: Stochastic on-line knapsack problems. Math. Program. 68, 73–104 (1995) zbMATHMathSciNetGoogle Scholar
  14. 14.
    Noga, J., Sarbua, V.: An online partially fractional knapsack problem. In: Proceedings of 8th International Symposium on Parallel Architectures, Algorithms and Networks, pp. 108–112 (2005) CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  1. 1.Software SchoolDalian University of TechnologyDalianChina
  2. 2.University of TokyoTokyoJapan
  3. 3.Kyoto UniversityKyotoJapan

Personalised recommendations