Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Determining computational complexity from characteristic ‘phase transitions’


Non-deterministic polynomial time (commonly termed ‘NP-complete’) problems are relevant to many computational tasks of practical interest—such as the ‘travelling salesman problem’—but are difficult to solve: the computing time grows exponentially with problem size in the worst case. It has recently been shown that these problems exhibit ‘phase boundaries’, across which dramatic changes occur in the computational difficulty and solution character—the problems become easier to solve away from the boundary. Here we report an analytic solution and experimental investigation of the phase transition in K -satisfiability, an archetypal NP-complete problem. Depending on the input parameters, the computing time may grow exponentially or polynomially with problem size; in the former case, we observe a discontinuous transition, whereas in the latter case a continuous (second-order) transition is found. The nature of these transitions may explain the differing computational costs, and suggests directions for improving the efficiency of search algorithms. Similar types of transition should occur in other combinatorial problems and in glassy or granular materials, thereby strengthening the link between computational models and properties of physical systems.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Figure 1: The SAT/UNSAT phase transition for the (2 + p) SAT problems for a range of values of p and N.
Figure 2: Theoretical and experimental results for the SAT/UNSAT transitions in the (2 + p)-SAT model.
Figure 3: The median computation cost (number of backtracks) of proving a formula SAT or UNSAT in the (2 + p)-SAT model for a range of values of p.
Figure 4: Backbone fractions as a function of α for 2-SAT and 3-SAT.

Similar content being viewed by others


  1. Cook, S. A. in Proc. 3rd Annu. ACM Symp. on Theory of Computing 151–158 (Assoc. Comput. Machinery, New York, (1971).

    Google Scholar 

  2. Garey, M. & Johnson, D. S. Computers and Intractability: A Guide to the Theory of NP-completeness (Freeman, San Francisco, (1979).

    MATH  Google Scholar 

  3. Papadimitriou, C. Computational Complexity (Addison-Wesley, Readings, (1994).

    MATH  Google Scholar 

  4. Fu, Y. T. & Anderson, P. W. Application of statistical mechanics to NP-complete problems in combinatorial optimization. J. Phys. A 19, 1605–1620 (1985).

    Article  ADS  Google Scholar 

  5. Mézard, M., Parisi, G. & Virasoro, M. A. Spin Glass Theory and Beyond (World Scientific, Singapore, (1987).

    MATH  Google Scholar 

  6. Cheeseman, P., Kanefsky, B. & Taylor, W. M. in Proc. 13th Int. Joint Conf. on Artificial Intelligence (IJCAI-91) (eds Mylopoulos, J.&Reiter, R.) 331–337 (Morgan Kaufmann, San Mateo, California, (1991).

    Google Scholar 

  7. Mitchell, D., Selman, B. & Levesque, H. in Proc. 10th Natl. Conf. on Artificial Intelligence (AAAI-92) 440–446 (AAAI Press/MIT Press, Cambridge, Massachusetts, (1992).

    Google Scholar 

  8. Kirkpatrick, S. & Selman, B. Critical behavior in the satisfiability of random Boolean expressions. Science 264, 1297–1301 (1994).

    Article  ADS  MathSciNet  CAS  Google Scholar 

  9. Selman, B., Mitchell, D. & Levesque, H. Generating hard satisfiability problems. Artif. Intell. 81, 17–29 (1996).

    Article  MathSciNet  Google Scholar 

  10. Hogg, T., Huberman, B. A. & Williams, C. (eds) Frontiers in problem solving: phase transitions and complexity. Artif. Intell. 81(I&II)(1996).

  11. Hayes, B. Can't get no satisfaction. Am. Sci. 85, 108–112 (1996).

    ADS  Google Scholar 

  12. Gross, D. & Mezard, M. The simplest spin glass. Nucl. Phys. B 240, 431–452 (1984).

    Article  ADS  MathSciNet  Google Scholar 

  13. Aspvall, B., Plass, M. F. & Tarjan, R. E. Alinear-time algorithm for testing the truth of certain quantified Boolean formulas. Inf. Process. Lett. 8, 121–123 (1979).

    Article  Google Scholar 

  14. Goerdt, A. Athreshold for unsatisfiability. J. Comput. System Sci. 53, 469–486 (1996).

    Article  MathSciNet  Google Scholar 

  15. Chvàtal, V. & Reed, B. Mick gets some (the odds are on his side). Proc. 33rd IEEE Symp. on Foundations of Computer Science 620–627 (IEEE Computer Soc. Press, New York, (1992).

  16. Friedgut, E. Sharp thresholds of graph properties and the K-SAT problem. J. Am. Math. Soc (in the press).

  17. Beame, P., Karp, R., Pitassi, T. & Saks, M. in Proc. ACM Symp. on Theory of Computing (STOC98) 561–571 (Assoc. Comput. Machinery, New York, (1998).

    MATH  Google Scholar 

  18. Monasson, R. & Zecchina, R. Entropy of the K-satisfiability problem. Phys. Rev. Lett. 76, 3881–3885 (1996).

    Article  ADS  MathSciNet  CAS  Google Scholar 

  19. Monasson, R. & Zecchina, R. The statistical mechanics of the random K-satisfiability model. Phys. Rev. E 56, 1357–1370 (1997).

    Article  ADS  MathSciNet  CAS  Google Scholar 

  20. Monasson, R. & Zecchina, R. Tricritical points in random combinatorics: the 2+p SAT case. J. Phys. A 31, 9209–9217 (1998).

    Article  ADS  CAS  Google Scholar 

  21. Achlioptas, D., Kirousis, L., Kranakis, E. & Krizanc, D. in Proc. Workshop on Randomized Algorithms in Sequential, Parallel and Distributed Computing (RALCOM 97), 1–10 (1998).

    Google Scholar 

  22. Davis, M. & Putnam, H. Acomputing procedure for quantification theory. J. Assoc. Comput. Machinery 7, 201–215 (1960).

    Article  MathSciNet  Google Scholar 

  23. Selman, B. & Kirkpatrick, S. Critical behavior in the cost of K-satisfiability. Artif. Intell. 81, 273–295 (1996).

    Article  MathSciNet  Google Scholar 

  24. Gomes, C. P., Selman, B. & Crato, N. in Principles and Practice of Constraint Programming (CP97) (ed. Smolka, G.) 121–135 (Lect. Notes in Comput. Sci., Vol. 1330, Springer, Heidelberg, (1997).

    Book  Google Scholar 

  25. Kirkpatrick, T. R., Thirumalai, D. & Wolynes, P. G. Scaling concepts for the dynamics of viscous liquids near an ideal glassy state. Phys. Rev. A 40, 1045–1054 (1989).

    Article  ADS  CAS  Google Scholar 

  26. Angell, A. C. Formation of glasses from liquids and biopolymers. Science 267, 1924–1935 (1995).

    Article  ADS  CAS  Google Scholar 

  27. Bouchaud, J.-P., Cates, M. E., Ravi Prakash, J. & Edwards, S. F. Hysteresis and metastability in a continuum sandpile model. Phys. Rev. Lett. 74, 1982–1985 (1995).

    Article  ADS  CAS  Google Scholar 

  28. Jacobs, D. J. & Thorpe, M. F. Generic rigidity percolation: the pebble game. Phys. Rev. Lett. 75, 4051–4054 (1995).

    Article  ADS  CAS  Google Scholar 

  29. Moukarzel, C. & Duxbury, P. M. Stressed backbone and elasticity of random central-force systems. Phys. Rev. Lett. 75, 4055–4058 (1995).

    Article  ADS  CAS  Google Scholar 

  30. Kirkpatrick, S. & Toulouse, G. Configuration space analysis of traveling salesman problems. J. Phys. (France) 46, 1277–1292 (1985).

    Article  Google Scholar 

  31. Schneider, J., Froschhammer, C., Morgenstern, I., Husslein, T. & Singer, J. M. Searching for backbones—an efficient parallel algorithm for the traveling salesman problem. Comput. Phys. Commun. 96, 173–188 (1996).

    Article  ADS  CAS  Google Scholar 

  32. Kirousis, L., Kranakis, E. & Krizanc, D. in Proc. 4th European Symp. on Algorithms 27–38 (Springer, Berlin, (1996).

    Google Scholar 

  33. Dubois, O. & Boufkhad, Y. Ageneral upper bound for the satisfiability threshold of random K-SAT formulas. J. Algorithms 24, 395–420 (1997).

    Article  MathSciNet  Google Scholar 

  34. Kamath, A., Motwani, R., Palem, K. & Spirakis, P. Tail bounds for occupancy and the satisfiability threshold conjecture. Random Struct. Algorithms 7, 59–89 (1995).

    Article  MathSciNet  Google Scholar 

  35. Frieze, A. & Suen, S. Analysis of two simple heuristics on a random instance of K-SAT. J. Algorithms 20, 312–335 (1996).

    Article  MathSciNet  Google Scholar 

  36. Crawford, J. & Auton, L. in Proc. 11th Natl. Conference on Artificial Intelligence (AAAI-93) 21–27 (AAAI Press/MIT Press, Cambridge, Massachusetts, (1993).

    Google Scholar 

Download references


S.K. thanks the Laboratories of Theoretical and Statistical Physics at Ecole Normale Superieure for a visiting professorship in 1998, during which this work was completed. B.S. is an Alfred P. Sloan research fellow and is supported by an NSF Faculty Early Career Development Award. During the early phase of this research, B.S. was at AT&T Bell Laboratories.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Scott Kirkpatrick.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Monasson, R., Zecchina, R., Kirkpatrick, S. et al. Determining computational complexity from characteristic ‘phase transitions’. Nature 400, 133–137 (1999).

Download citation

  • Received:

  • Accepted:

  • Issue Date:

  • DOI:

This article is cited by


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing