Skip to main content
Log in

On а Recursive-Parallel Algorithm for Solving the Knapsack Problem

  • Published:
Automatic Control and Computer Sciences Aims and scope Submit manuscript

Abstract

In this paper, we offer an efficient parallel algorithm for solving the NP-complete Knapsack Problem in its basic, so-called 0-1 variant. To find its exact solution, algorithms belonging to the category “branch-and-bound methods” have long been used. To speed up the solving with varying degrees of efficiency, various options for parallelizing computations are also used. We propose here an algorithm for solving the problem, based on the paradigm of recursive-parallel computations. We consider it suited well for problems of this kind, when it is difficult to immediately break up the computations into a sufficient number of subtasks that are comparable in complexity, since they appear dynamically at run time. We used the RPM_ParLib library, developed by the author, as the main tool to program the algorithm. This library allows us to develop effective applications for parallel computing on a local network in the .NET Framework. Such applications have the ability to generate parallel branches of computation directly during program execution and dynamically redistribute work between computing modules. Any language with support for the .NET Framework can be used as a programming language in conjunction with this library. For our experiments, we developed some C# applications using this library. The main purpose of these experiments was to study the acceleration achieved by recursive-parallel computing. A detailed description of the algorithm and its testing, as well as the results obtained, are also given in the paper.

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.

Fig. 1.
Fig. 2.

Similar content being viewed by others

REFERENCES

  1. Garey, M.R. and Johnson, D.S., Computers and Intractability: A Guide to the Theory of NPCompleteness, San Francisco: W. H. Freeman and Co, 1979.

    MATH  Google Scholar 

  2. Kellerer, H., Pferschy, U., and Pisinger, D., Knapsack Problems, Berlin: Springer, 2004.

    Book  MATH  Google Scholar 

  3. Martello, S. and Toth, P., Knapsack Problems Algorithms and Computer Implementation, New York: Wiley, 1990.

    MATH  Google Scholar 

  4. Cormen, T., Leiserson, Ch., Rivest, R., and Stein, C., Introduction to Algorithms, The MIT Press, 2001.

    MATH  Google Scholar 

  5. Land, A.H. and Doig, A.G., An autmatic method of solving discrete programming problems, Econometrica, 1960, vol. 28, pp. 497–520.

    Article  MathSciNet  MATH  Google Scholar 

  6. Pisinger, D., An expanding-core algorithm for the exact 0-l knapsack problem, Eur. J. Oper. Res., 1995, vol. 87, no. 1, pp. 175–187.

    Article  MATH  Google Scholar 

  7. Pisinger, D., A fast algorithm for strongly correlated knapsack problems, Discrete Appl. Math., 1998, vol. 89, nos. 1–3, pp. 197–212.

    Article  MathSciNet  MATH  Google Scholar 

  8. Dantzig, G.B., Discrete variable extremum problems, Oper. Res., 1957, vol. 5, pp. 266–277.

    Article  MathSciNet  Google Scholar 

  9. Posypkin, M.A. and Sigal, I.Kh., Combined parallel algorithm for solving the knapsack problem, Proceedings of the Fourth International Conference Parallel Computations and Control Problems, 2008, pp. 177–189.

  10. Vasilchikov, V.V., Sredstva parallelnogo programmirovaniya dlya vychislitelnykh sistem s dinamicheskoi balansirovkoi zagruzki (Combined Parallel Algorithm for Solving the Knapsack Problem), Yaroslavl: Yarosl. Gos. Univ., 2001.

  11. Vasilchikov, V.V., Kommunikatsionnyi modul’ dlya organizatsii polnosvyaznogo soedineniya kompyuterov v lokalnoi seti s ispolzovaniem .NET Framework, Svidetel’stvo o gosudarstvennoi registratsii programmy dlya EVM No. 2 013 619 925 (A Communication Module for Organizing a Fully-Connected Connection of Computers in a Local Network Using the .NET Framework, Certificate of State Registration of Computer Program No. 2 013 619 925), 2013.

  12. Vasilchikov, V.V., Biblioteka podderzhki rekursivno-parallelnogo programmirovaniya dlya .NET Framework, Svidetel’stvo o gosudarstvennoi registratsii programmy dlya EVM No. 2013619926 (A Library of Support for Recursive- Parallel Programming for .NET Framework, Certificate of State Registration of Computer Program No. 2 013 619 926), 2013.

  13. Vasilchikov, V.V., On the recursive-parallel programming for the .NET framework, Autom. Control Comput. Sci., 2014, vol. 48, no. 7, pp. 636–641.

    Google Scholar 

  14. Vasilchikov, V.V., On optimization and parallelization of the little algorithm for solving the travelling salesman problem, Autom. Control Comput. Sci., 2017, vol. 51, no. 7, pp. 551–557.

    Article  Google Scholar 

Download references

ACKNOWLEDGMENTS

This work was supported by initiative program VIP-004 (state registration number АААА-А16-116070610022-6).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to V. V. Vasilchikov.

Additional information

The article was translated by the authors.

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Vasilchikov, V.V. On а Recursive-Parallel Algorithm for Solving the Knapsack Problem. Aut. Control Comp. Sci. 52, 810–816 (2018). https://doi.org/10.3103/S014641161807026X

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.3103/S014641161807026X

Keywords:

Navigation