Skip to main content

How to Solve NP-Complete Problems

  • Chapter
  • First Online:
Book cover Limits of Computation

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

Abstract

There are hundreds of important problems that have been shown to be NP-complete. If we believe that P \(\ne \) NP, then no efficient algorithms exist to solve them. In this chapter we discuss how this affects the working programmer. As many of these NP-complete problems are relevant to business and industry, one needs coping strategies, which are the topic of this chapter. It is discussed what exact and approximation algorithms, can achieve and how parallelism and randomisation might help. Some new complexity classes will be defined along the way. The effectivity of the presented strategies are evaluated for the Travelling Salesman problem. Finally, it is discussed how the fact that there are no efficient algorithms known to factorise a number can be viewed as good news.

If there are no known feasible algorithms for NP-complete problems how do we deal with them in practice?

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    In the literature one also finds the synonym tractable.

  2. 2.

    This terminology has been use in Chap. 5 of the popular science book “Computers LTD” [20].

  3. 3.

    The class of function problems corresponding to NP is usually called NPO for NP-optimisation problem.

  4. 4.

    The term “approximation algorithm” has been introduced in [24] (according to [25]).

  5. 5.

    Vazirani opens with this quote [50, Preface]:

    Although this may seem a paradox, all exact science is dominated by the idea of approximation.

    Bertrand Russell (1872–1970)

  6. 6.

    Independent Set is explained in Exercise 1.

  7. 7.

    More details, also about the history of this theorem can be found e.g. in [4].

  8. 8.

    One can drop r from the input by running the algorithm probabilistically over a uniformly distributed random bit vector r.

  9. 9.

    Sanjeev Arora, Uriel Feige, Shafi Goldwasser, Carsten Lund, László Lovász, Rajeev Motwani, Shmuel Safra, Madhu Sudan, and Mario Szegedy won the 2001 Gödel Prize for the PCP theorem and its applications to (hardness of) approximation.

  10. 10.

    See Exercise 12 in Chap. 20.

  11. 11.

    Better a program executed in parallel.

  12. 12.

    The Coppersmith-Winograd algorithm [12] does it in \(\mathop {}\mathopen {}\mathscr {O}\mathopen {}\left( n^{2.376}\right) \) but is only better for extremely large matrices and thus not used in practice, nor are recent slight improvements by Stothers or Williams.

  13. 13.

    We don’t present details in this introductory book but this will be covered in many textbooks listed in the appendix.

  14. 14.

    Chip manufacturers have to go down this route as Moore’s law is reaching its limits, as further miniaturisation of processors leads to transistors of almost atomic size and thus to unwanted and interfering quantum effects. We’ll say more about that in Chap. 23.

  15. 15.

    Michael Oser Rabin (born September 1, 1931), is an Israeli computer scientist who won the Turing-Award in 1976.

  16. 16.

    This paper has an amazing citation count of over 34,000—more than any other publication cited in this book.

  17. 17.

    The decision problem versions are mainly for complexity class analysis and not for practical purposes.

  18. 18.

    Actually the capital plus one city from each state of the United States had been chosen, which had only 48 states at the time since Alaska and Hawaii joined the United States only in 1959.

  19. 19.

    At the time of writing.

  20. 20.

    They actually show this result for other NP-complete problems as well, not just TSP.

  21. 21.

    Called PTAS reduction as it preserves the property that a problem has a polynomial time approximation scheme (PTAS).

  22. 22.

    In order to model points on a plane choose \(d=2\) (two-dimensional vector space) and in order to model points in space choose \(d=3\).

  23. 23.

    Sanjeev Arora (born January 1968) is an Indian American theoretical computer scientist who won the Gödel Prize twice: in 2001 for his work on probabilistically checkable proofs and again in 2010 for the discovery of the PTAS for EuclideanTSP.

  24. 24.

    Joseph S.B. Mitchell is an American mathematician working in computational geometry and distinguished SUNY professor. He won the Gödel prize for the discovery of the PTAS for EuclideanTSP in 2010.

  25. 25.

    Including research bases in Antarctica.

  26. 26.

    Length 7,515,772,212.

  27. 27.

    They won the Turing Award in 2002.

  28. 28.

    Bailey Whitfield ‘Whit’ Diffie (born June 5, 1944) is an American cryptographer who also worked for Sun Microsystems. He is one of the inventors of public-key cryptography for which he has won several prizes.

  29. 29.

    Martin Edward Hellman (born October 2, 1945) is an American cryptographer, and one of the inventors of public key cryptography for which he won numerous awards.

  30. 30.

    Ralph C. Merkle (born February 2, 1952) is a computer scientist and was a PhD student of Martin Hellman. He is one of the inventors of public key cryptography, for which he was awarded numerous prizes.

  31. 31.

    The Institute of Electrical and Electronics Engineers (IEEE) has granted its 100th Milestone Award to the three scientists and a plaque has been also revealed at Cheltenham in 2010.

References

  1. Agrawal, M., Kayal, N., Saxena, N.: PRIMES is in P. Ann. Math. 160(2), 781–793 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  2. Applegate, D.L., Bixby, R.E., Chvátal, V., Cook, W.J.: The Traveling Salesman Problem: A Computational Study. Princeton University Press, Princeton (2007)

    Google Scholar 

  3. Arora, S.: Polynomial time approximation schemes for Euclidean traveling salesman and other geometric problems. J. ACM 45(5), 753–782 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  4. Arora, S.: The approximability of NP-hard problems. In Proceedings of Symposium on Theory of computing, pp. 337–348. ACM (1998)

    Google Scholar 

  5. Arora, S., Safra, S.: Probabilistic checking of proofs: a new characterization of NP. J. ACM 45(1), 70–122 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  6. Arora, S., Lund, C., Motwani, R., Sudan, M., Szegedy, M.: Proof verification and hardness of approximation problems. J. ACM 45(3), 501–555 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  7. Arora, S., Barak, B.: Computational Complexity: A Modern Approach. Cambridge University Press, Cambridge (2009)

    Google Scholar 

  8. Bellman, R.: Dynamic programming treatment of the travelling salesman problem. J. Assoc. Comput. 9, 61–63 (1962)

    Article  MathSciNet  MATH  Google Scholar 

  9. Christofides, N.: Worst-case analysis of a new heuristic for the travelling salesman problem. Report 388, Graduate School of Industrial Administration, Carnegie Mellon University (1976)

    Google Scholar 

  10. Concorde Home Page. Available via DIALOG. http://www.math.uwaterloo.ca/tsp/concorde (2015). 19 June 2015

  11. Cook, W.J.: In Pursuit of the Traveling Salesman: Mathematics at the Limits of Computation. Princeton University Press, Princeton (2012)

    Google Scholar 

  12. Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. J. Symb. Comput. 9, 251–280 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  13. Dantzig, G., Fulkerson, R., Johnson, S.: Solution of a large-scale traveling-salesman problem. J. Op. Res. Soc. Am. 2(4), 393–410 (1954)

    MathSciNet  Google Scholar 

  14. Diffie, W., Hellman, M.E.: New directions in cryptography. IEEE Trans. Inf. Theory 22(6), 644–654 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  15. Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Commun. ACM 51(1), 107–113 (2008)

    Article  Google Scholar 

  16. Dekel, E., Nassimi, D., Sahni, S.: Parallel matrix and graph algorithms. SIAM J. Comput. 10(4), 657675 (1979)

    MathSciNet  MATH  Google Scholar 

  17. Feige, U., Goldwasser, S., Lovász, L., Safra, S., Szegedy, M.: Interactive proofs and the hardness of approximating cliques. J. ACM 43(2), 268–292 (1996) (Preliminary version in Proc. of FOCS91)

    Google Scholar 

  18. Gill, J.: Computational complexity of probabilistic Turing machines. SIAM J. Comput. 6(4), 675–695 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  19. Gomory, R.E.: Outline of an algorithm for integer solutions to linear programs. Bull. Amer. Math. Soc. 64(5), 275–278 (1958)

    Article  MathSciNet  MATH  Google Scholar 

  20. Harel, D.: Computers LTD: What they Really Can’t Do. Oxford University Press, Oxford (2000)

    Google Scholar 

  21. Held, M., Karp, R.M.: A dynamic programming approach to sequencing problems. J. SIAM 10, 196–210 (1962)

    MathSciNet  MATH  Google Scholar 

  22. Held, M., Karp, R.M.: The traveling salesman problem and minimum spanning trees, part II. Math. Program. 1, 6–25 (1971)

    Article  MathSciNet  MATH  Google Scholar 

  23. Helsgaun, K.: An effective implementation of the Lin-Kernighan traveling salesman heuristic. Eur. J. Op. Res. 126, 106–130 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  24. Johnson, D.S.: Approximation algorithms for combinatorial problems. J. Comput. Syst. Sci. 9, 256–278 (1974)

    Article  MathSciNet  MATH  Google Scholar 

  25. Johnson, D.S.: The NP-completeness column: an ongoing guide—the tale of the second prover. J. Algorithms 13, 502–524 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  26. Johnson, D.S.: A brief history of NP-completeness 1954–2012. In: Götschel, M. (ed.) Optimization Stories, Book Series, Vol. 6, pp. 359–376, Documenta Mathematica (2012)

    Google Scholar 

  27. Helsgaun, K.: LKH-2 Website. Available via DIALOG. http://www.ruc.dk/keld/research/LKH/. Accessed 20 June 2015

  28. Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P.: Optimization by simulated annealing. Science 220(4598), 671–680 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  29. Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G., Shmoys, D.B. (eds.): The Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization. Wiley, New York (1985)

    Google Scholar 

  30. Levy, S.: The Open Secret. Wired Issue 7.04. Available via DIALOG. http://archive.wired.com/wired/archive/7.04/crypto.html (1999). Accessed 19 June 2015

  31. Lin, S., Kernighan, B.W.: An effective heuristic algorithm for the traveling-salesman problem. Op. Res. 21(2), 498–516 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  32. Milestones in the Solutions of TSP Instances. Available via DIALOG. http://www.math.uwaterloo.ca/tsp/history/milestone.html (2015). Accessed 20 June 2015

  33. Miller, G.L.: Riemann’s hypothesis and tests for primality. In: Proceedings of Seventh Annual ACM Symposium on Theory of Computing, pp. 234–239. ACM (1975)

    Google Scholar 

  34. Mitchell, J.: Guillotine subdivisions approximate polygonal subdivisions: a simple polynomial-time approximation scheme for geometric TSP, k-MST, and related problemsd. SIAM J. Comput. 28(4), 1298–1309 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  35. Mulder, S.A., Wunsch II, D.C.: Million city traveling salesman problem solution by divide and conquer clustering with adaptive resonance neural networks. Neural Netw. 16(5–6), 827–832 (2003)

    Article  Google Scholar 

  36. Nash, J.C: The (Dantzig) simplex method for linear programming. Comput. Sci. Eng. 2(1), 29–31 (2000)

    Google Scholar 

  37. Optimal 85,900-City Tour. Available via DIALOG. http://www.math.uwaterloo.ca/tsp/pla85900/index.html (2015). Accessed 20 June 2015

  38. Papadimitriou, C.H.: The Euclidean traveling salesman problem is NP-complete. Theor. Comput. Sci. 4(3), 237–244 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  39. Papadimitriou, C.H., Vempala, S.: On the approximability of the traveling salesman problem. Combinatorica 26(1), 101–120 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  40. Rabin, M.O.: Probabilistic algorithm for testing primality. J. Number Theory 12(1), 128–138 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  41. Rivest, R.L., Shamir, A., Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 21(2), 120–126 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  42. Rutenbar, R.: Simulated annealing algorithms: an overview. IEEE Circuits Devices Mag. 5(1), 19–26 (1989)

    Article  Google Scholar 

  43. Sahni, S., Gonzalez, T.: P-complete approximation problems. J. ACM 23(3), 555–565 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  44. Scheier, B.: Applied Cryptography. Wiles, New York (1996)

    Google Scholar 

  45. The Traveling Salesman Problem. Available via DIALOG. http://www.math.uwaterloo.ca/tsp/index.html (2015). Accessed 19 June 2015

  46. TSPLIB. Available via DIALOG. http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/ (2015). Accessed 19 June 2015

  47. Williamson, D.P., Shmoys, D.B.: The Design of Approximation Algorithms. Cambridge University Press, Cambridge (2011)

    Google Scholar 

  48. Woeginger, G.J.: Exact algorithms for NP-hard problems: A survey. In: Juenger, M., Reinelt, G., Rinaldi, G. (eds.) Combinatorial Optimization—Eureka! You shrink! LNCS, vol. 2570, pp. 185–207. Springer, Berlin (2003)

    Google Scholar 

  49. World TSP. Available via DIALOG. http://www.math.uwaterloo.ca/tsp/world/ (2015). Accessed 20 June 2015

  50. Vazirani, V.V.: Approximation Algorithms. Springer, Berlin (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bernhard Reus .

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Reus, B. (2016). How to Solve NP-Complete Problems. In: Limits of Computation. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-27889-6_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27889-6_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27887-2

  • Online ISBN: 978-3-319-27889-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics