An Out-of-Core Branch and Bound Method for Solving the 0-1 Knapsack Problem on a GPU

  • Jingcheng Shen
  • Kentaro Shigeoka
  • Fumihiko Ino
  • Kenichi Hagihara
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10393)

Abstract

In this paper, we propose an out-of-core branch and bound (B&B) method for solving the 0–1 knapsack problem on a graphics processing unit (GPU). Given a large problem that produces many subproblems, the proposed method dynamically swaps subproblems out to CPU memory. We adopt two strategies to realize this swapping-out procedure with minimum amount of CPU-GPU data transfer. The first strategy is a GPU-based stream compaction strategy that reduces the sparseness of arrays. The second strategy is a double buffering strategy that hides the data transfer overhead by overlapping data transfer with GPU-based B&B operations. Experimental results show that the proposed method can store 33.7 times more subproblems than the previous method, solving twice more instances on the GPU. As for the stream compaction strategy, an input-output separated scheme runs \(13.1\%\) faster than an input-output unified scheme.

Keywords

Out-of-core computation Branch and bound Knapsack GPU 

References

  1. 1.
    Martello, S., Toth, P.: Knapsack Problems: Algorithms and Computer Implementations. Wiley, Chichester (1990)MATHGoogle Scholar
  2. 2.
    Land, A.H., Doig, A.G.: An automatic method of solving discrete programming problems. Econometrica 28(3), 497–520 (1960)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Lin, J., Storer, J.A.: Processor-efficient hypercube algorithms for the knapsack problem. J. Parallel Distrib. Comput. 13(3), 332–337 (1991)CrossRefGoogle Scholar
  4. 4.
    Eckstein, J., Phillips, C.A., Hart, W.E.: PICO: an object-oriented framework for parallel branch and bound. Stud. Comput. Math. 8, 219–265 (2001)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Goux, J.-P., Kulkarni, S., Yoder, M., Linderoth, J.: Master-worker: an enabling framework for applications on the computational grid. Cluster Comput. 4(1), 63–70 (2001)CrossRefGoogle Scholar
  6. 6.
    Tanaka, Y., Sato, M., Hirano, M., Nakada, H., Sekiguchi, S.: Performance evaluation of a firewall-compliant Globus-based wide-area cluster system. In: Proceedings of HPDC 2000, pp. 121–128 (2000)Google Scholar
  7. 7.
    Boyer, V., Baz, D.E., Elkihel, M.: Solving knapsack problems on GPU. Comput. Oper. Res. 39(1), 42–47 (2012)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Boukedjar, A., Lalami, M.E., El-Baz, D.: Parallel branch and bound on a CPU-GPU system. In: Proceedings of PDP 2012, pp. 392–398 (2012)Google Scholar
  9. 9.
    Lalami, M.E., El-Baz, D.: GPU implementation of the branch, bound method for knapsack problems. In: Proceedings of IPDPSW 2012, pp. 1769–1777 (2012)Google Scholar
  10. 10.
    Pedemonte, M., Alba, E., Luna, F.: Towards the design of systolic genetic search. In: Proceedings of IPDPSW 2012, pp. 1778–1786 (2012)Google Scholar
  11. 11.
    Luebke, D., Humphreys, G.: How GPUs work. Computer 40(2), 96–100 (2007)CrossRefGoogle Scholar
  12. 12.
    Ino, F., Munekawa, Y., Hagihara, K.: Sequence homology search using fine grained cycle sharing of idle GPUs. IEEE Trans. Parallel Distrib. Syst. 23(4), 751–759 (2012)CrossRefGoogle Scholar
  13. 13.
    Mitani, Y., Ino, F., Hagihara, K.: Parallelizing exact and approximate string matching via inclusive scan on a GPU. IEEE Trans. Parallel Distrib. Syst. 28, 1989–2002 (2017)CrossRefGoogle Scholar
  14. 14.
    Carneiro, T., Muritiba, A.E., Negreiros, M., de Campos, G.A.L.: A new parallel schema for branch-and-bound algorithms using GPGPU. In: Proceedings of SBAC-PAD 2011, pp. 41–47 (2011)Google Scholar
  15. 15.
    Dantzig, G.B.: Discrete variable extremum problems. Oper. Res. 5(2), 266–277 (1957)MathSciNetCrossRefGoogle Scholar
  16. 16.
    Bell, N., Hoberock, J.: Thrust: A Productivity-Oriented Library for CUDA. Morgan Kaufmann, San Mateo (2011). Chap. 26. http://thrust.github.io/ Google Scholar
  17. 17.
    Rennich, S.: CUDA C/C++ Streams and Concurrency, Nvidia GTC express (2011). http://on-demand.gputechconf.com/gtc-express/2011/presentations/StreamsAndConcurrencyWebinar.pdf
  18. 18.
    Martello, S., Pisinger, D., Toth, P.: New trends in exact algorithms for the 0-1 knapsack problem. Eur. J. Oper. Res. 123(2), 325–332 (2000)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Martello, S., Pisinger, D., Toth, P.: Dynamic Programming and Tight Bounds for the 0-1 Knapsack Problem, Datalogisk Institut København: DIKU-Rapport, Datalogisk Institut, Københavns Universitet (1997)Google Scholar
  20. 20.
    CUDA Toolkit Documentation: Nvidia (2017). http://docs.nvidia.com/cuda/index.html

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Jingcheng Shen
    • 1
  • Kentaro Shigeoka
    • 2
  • Fumihiko Ino
    • 1
  • Kenichi Hagihara
    • 1
  1. 1.Graduate School of Information Science and TechnologyOsaka UniversitySuitaJapan
  2. 2.Hitachi High-Technologies CorporationTokyoJapan

Personalised recommendations