Skip to main content
Log in

Analysis of the Karmarkar-Karp differencing algorithm

  • Published:
The European Physical Journal B Aims and scope Submit manuscript

Abstract

The Karmarkar-Karp differencing algorithm is the best known polynomial time heuristic for the number partitioning problem, fundamental in both theoretical computer science and statistical physics. We analyze the performance of the differencing algorithm on random instances by mapping it to a nonlinear rate equation. Our analysis reveals strong finite size effects that explain why the precise asymptotics of the differencing solution is hard to establish by simulations. The asymptotic series emerging from the rate equation satisfies all known bounds on the Karmarkar-Karp algorithm and projects a scaling n c ln n, where c = 1/(2 ln 2) = 0.7213 .... Our calculations reveal subtle relations between the algorithm and Fibonacci-like sequences, and we establish an explicit identity to that effect.

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.

Institutional subscriptions

Similar content being viewed by others

References

  1. N. Karmarkar, R.M. Karp, The differencing method of set partitioning. Technical Report UCB/CSD 81/113, Computer Science Division (University of California, Berkeley, 1982)

    Google Scholar 

  2. S. Mertens, C. Moore, The Nature of Computation (Oxford University Press, Oxford, 2008)

    Google Scholar 

  3. M.R. Garey, D.S. Johnson, Computers and Intractability. A Guide to the Theory of NP-Completeness. edited by W.H. Freeman (New York, 1997)

  4. H. Bauke, S. Mertens, A. Engel, Phys. Rev. Lett. 90, 158701 (2003)

    Article  ADS  Google Scholar 

  5. R.C. Merkle, M.E. Hellman, IEEE Trans. Info. Th. 24, 525 (1978)

    Article  Google Scholar 

  6. S. Mertens, Phys. Rev. Lett. 84, 1347 (2000)

    Article  ADS  Google Scholar 

  7. C. Borgs, J. Chayes, B. Pittel, Rand. Struct. Alg. 19, 247 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  8. B. Derrida, Phys. Rev. Lett. 45, 79 (1980)

    Article  ADS  MathSciNet  Google Scholar 

  9. B. Derrida, Phys. Rev. B 24, 2613 (1981)

    Article  ADS  MathSciNet  Google Scholar 

  10. H. Bauke, S. Mertens, Phys. Rev. E 70, 025102(R) (2004)

    Article  ADS  Google Scholar 

  11. A. Bovier, I. Kurkova, Commun. Math. Phys. 263, 513 (2006)

    Article  MATH  ADS  MathSciNet  Google Scholar 

  12. A. Bovier, I. Kurkova, J. Stat. Phys. 126, 933 (2007)

    Article  MATH  ADS  MathSciNet  Google Scholar 

  13. I. Kurkova, Elect. J. Probability 13, 5 (2008)

    MathSciNet  Google Scholar 

  14. B. Yakir, Math. Oper. Res. 21, 85 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  15. J. Kleinberg, É. Tardos, Algorithm Design (Addison Wesley, Boston, 2006)

    Google Scholar 

  16. D.S. Johnson, C.R. Aragon, L.A. McGeoch, C. Schevron, Operations Research 39, 378 (1991)

    Article  MATH  Google Scholar 

  17. W. Ruml, J.T. Ngo, J. Marks, S.M. Shieber, J. Opti. Th. Appl. 89, 251 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  18. R.E. Korf, Art. Intell. 106, 181 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  19. R.H. Storer, S.W. Flanders, S.D. Wu, Annals of Operations Research 63, 465 (1996)

    Article  MATH  Google Scholar 

  20. G.S. Lueker, Oper. Res. Lett. 6, 285 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  21. The GNU Multiple Precision Arithmetic Library. http://gmplib.org

  22. TRNG — portable random number generators for parallel computing. http://trng.berlios.de

  23. W. Feller, An Introduction to Probability and Its Applications, 2nd edn. (John Wiley & Sons, 1972) Vol. 2

  24. N.J.A. Sloane, The on-line encyclopedia of integer sequences http://www.research.att.com/~njas/sequences

  25. C. Moore, P. Lakdawala, Phys. D 135, 24 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  26. C.M. Bender, S.A. Orszag, Advanced Mathematical Methods for Scientists and Engineers (McGraw-Hill, New York, 1978)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to S. Boettcher.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Boettcher, S., Mertens, S. Analysis of the Karmarkar-Karp differencing algorithm. Eur. Phys. J. B 65, 131–140 (2008). https://doi.org/10.1140/epjb/e2008-00320-9

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1140/epjb/e2008-00320-9

PACS

Navigation