O((logn)2) Time Online Approximation Schemes for Bin Packing and Subset Sum Problems

  • Liang Ding
  • Bin Fu
  • Yunhui Fu
  • Zaixin Lu
  • Zhiyu Zhao
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6213)


Given a set S = {b 1, ⋯ , b n } of integers and an integer s, the subset sum problem is to decide if there is a subset S′ of S such that the sum of elements in S′ is exactly equal to s. We present an online approximation scheme for this problem. It updates in O(logn) time and gives a (1 + ε)-approximation solution in \(O((\log n+{1\over \epsilon^2}{(\log{1\over\epsilon})^{O(1)}})\log n)\) time. The online approximation for target s is to find a subset of the items that have been received. The bin packing problem is to find the minimum number of bins of size one to pack a list of items a 1, ⋯ , a n of size in [0,1]. Let function bp(L) be the minimum number of bins to pack all items in the list L. We present an online approximate algorithm for the function bp(L) in the bin packing problem, where L is the list of the items that have been received. It updates in O(logn) updating time and gives a (1 + ε)-approximation solution app(L) for bp(L) in \(O((\log n)^2+({1\over \epsilon})^{O({1\over\epsilon})})\) time to satisfy app(L) ≤ (1 + ε)bp(L) + 1.


Approximation Scheme Online Algorithm Approximation Solution Large Item Small Item 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading (1974)zbMATHGoogle Scholar
  2. 2.
    Applegate, D., Buriol, L., Dillard, B., Johnson, D., Shore, P.: The cutting-stock approach to bin packing: Theory and experiments. In: Proceedings of Algorithm Engineering and Experimentation (ALENEX), pp. 1–15 (2003)Google Scholar
  3. 3.
    Batu, T., Berenbrink, P., Sohler, C.: A sublinear-time approximation scheme for bin packing. Theoretical Computer Science 410, 5082–5092 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Brown, D.: A lower bound for on-line one-dimensional bin packing problem. Technical Report 864, University of Illinois, Urbana, IL (1979)Google Scholar
  5. 5.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. The MIT Press, Cambridge (2001)zbMATHGoogle Scholar
  6. 6.
    Csirik, J., Imreh, B.: On the worst-case performance of the nkf bin-packing heuristic. Acta Cybern. 9(2), 89–90 (1989)zbMATHGoogle Scholar
  7. 7.
    Csirik, J., Johnson, D., Kenyon, C., Orlin, J., Shore, P., Weber, R.: A self organizing bin packing heuristic. In: Goodrich, M.T., McGeoch, C.C. (eds.) ALENEX 1999. LNCS, vol. 1619, pp. 246–265. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    Csirik, J., Johnson, D., Kenyon, C., Orlin, J., Shore, P., Weber, R.: On the sum-of-squares algorithm for bin-packing. In: Proceedings of the 22nd annual ACM symposium on theory of computing (STOC), pp. 208–217 (2000)Google Scholar
  9. 9.
    Fernandez de la Vega, W., Lueker, G.S.: Bin packing can be solved within 1+epsilon in linear time. Combinatorica 1(4), 349–355 (1981)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Gilmore, M., Gomory, R.: A linear programming approach to the cutting-stock problem-part ii. Operations Research 11(6), 863–888 (1963)CrossRefzbMATHGoogle Scholar
  11. 11.
    Gilmore, M., Johnson, D.: A linear programming approach to the cutting-stock problem. Operations Research 29(6), 1094–1104 (1981)MathSciNetGoogle Scholar
  12. 12.
    Ibarra, O.H., Kim, C.E.: Fast approximation algorithms for the knapsack and sum of subset problems. J. ACM 22(4), 463–468 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Johnson, D.: Near-Optimal Bin Packing Algorithms. PhD thesis, Massachusets Institute of Technology, Department of Computer Science, Cambridge (1973)Google Scholar
  14. 14.
    Johnson, D.S.: Fast algorithms for bin packing. Journal of Computer and System Sciences 8(3), 272–314 (1974)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Kellerer, H., Mansini, R., Pferschy, U., Speranza, M.: An efficient fully polynomial approximation scheme for the subset-sum problem. Journal of Computer and System Sciences 66(2), 349–370 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Lee, C.C., Lee, D.T.: A simple on-line bin-packing algorithm. Journal of ACM 32(3), 562–572 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Liang, F.: A lower bound for on-line bin packing. Information processing letters 10, 76–79 (1980)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Mao, W.: Tight worst-case performance bounds for next-k-fit bin packing. SIAM J. Comput. 22(1), 46–56 (1993)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Ramanan, P., Brown, D.J., Lee, C.C., Lee, D.T.: On-line bin packing in linear time. J. Algorithms 10(3), 305–326 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Seiden, S.S.: On the online bin packing problem. Journal of ACM 49(5), 640–671 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Yao, A.: New algorithms for bin packing. Journal of ACM 27(2), 207–227 (1980)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Liang Ding
    • 1
  • Bin Fu
    • 1
  • Yunhui Fu
    • 1
  • Zaixin Lu
    • 1
  • Zhiyu Zhao
    • 2
  1. 1.Department of Computer ScienceUniversity of Texas-Pan AmericanEdinburgUSA
  2. 2.Department of Computer ScienceUniversity of New OrleansNew OrleansUSA

Personalised recommendations