<<

VOLUME 54, NUMBER 8 LETTERS 25 FEBRUARY 1985

Undecidability and Intractability in Theoretical Stephen Wolfram The Institute for Advanced Study, Princeton, New Jersey 08540 (Received 26 October 1984) Physical processes are viewed as computations, and the difficulty of answering questions about them is characterized in terms of the difficulty of performing the corresponding computations. Cel­ lular automata are used to provide explicit examples of various formally undecidable and computa­ tionally intractable problems. It is suggested that such problems are common in physical models, and some other potential examples are discussed.

PACS numbers: 02.90.+p, O1.70.+w, OS .90.+m

There is a close correspondence between physical tine equations.2 One expects in fact that universal processes and computations. On 6ne hand, theoretical computers are as powerful in their computational capa­ models describe physical processes by computations bilities as any physically realizable system can be, so that transform initial data according to algorithms that they can simulate any physical system.3 This is representing physical laws. And on the other hand, the case if in all physical systems there is a finite den­ computers themselves are physical systems, obeying sity of information, which can be transmitted only at a physical laws. This paper explores some fundamental finite rate in a finite-dimensional space.4 No physically consequences of this correspondence.! implementable procedure could then short cut a com­ The behavior of a physical system may always be putationally irreducible process. calculated by simulating explicitly each step in its evo­ Different physically realizable universal computers lution. Much of theoretical physics has, however, appear to require the same order of magnitude times been concerned with devising shorter methods of cal­ and information storage capacities to solve particular culation that reproduce the outcome without tracing classes of finite problems.5 One computer may be each step. Such shortcuts can be made if the computa­ constructed so that in a single step it carries out the tions used in the calculation are more sophisticated equivalent of two steps on another computer. Howev­ than those that the physical system can itself perform. er, when the amount of information n specifying an in­ Any computations must, however, be carried out on a . stance of a problem becomes large, different comput­ computer. But the computer is itself an example of a ers use resources that differ only by polynomials in n. physical system. And it can determine the outcome of One may then distinguish several classes of problems.6 its own evolution only by explicitly following it The first, denoted P, are those such as arithmetical through: No shortcut is possible. Such computational ones taking a time polynomial in n. The second, irreducibility occurs whenever a physical system can denoted PSPA CE, are those that can be solved with act as a computer. The behavior of the system can be polynomial storage capacity, but may require exponen­ found only by direct simulation or observation: No tial time, and so are in practice effectively intractable. general predictive procedure is possible. Computa­ Certain problems are "complete" with respect to tional irreducibility is common among the systems in­ PSPA CE, so that particular instances of them corre­ vestigated in and computation theory} spond to arbitrary PSPACE problems. Solutions to This paper suggests that it is also common in theoreti­ these problems mimic the operation of a universal cal physics. Computational reducibility may well be computer with bounded storage capacity: A computer the exception rather than the rule: Most physical that solves PSPACE-complete problems for any n must questions may be answerable only through irreducible be universal. Many mathematical problems are amounts of computation. Those that concern idealized PSPA CE-complete. 6 (An example is whether one can limits of infinite time, volume, or numerical precision always win from a given position in chess.) And since can require arbitrarily long computations, and so be there is no evidence to the contrary, it is widely con­ formally undecidable. jectured that PSPACE;t!P, so that PSPACE-complete A diverse set of systems are known to be equivalent problems cannot be solved in polynomial time. A final in their computational capabilities, in that particular class of problems, denoted NP, consist in identifying, forms of one system can emulate any of the others. among an exponentially large collection of objects, Standard digital computers are one example of such those with some particular, easily testable property. "universal computers": With fixed intrinsic instruc­ An example would be to find an n-digit integer that tions, different initial states or programs can be de­ divides a given 2n-digit number exactly. A particular vised to simulate different systems. Some other ex­ candidate divisor, guessed nondeterministically, can be amples are Turing machines, string transformation tested in polynomial time, but a systematic solution systems, recursively defined functions, and Diophan- may require almost all 0 (2 ft) possible candidates to be

© 1985 The American Physical Society 735 VOLUME 54, NUMBER 8 PHYSICAL REVIEW LETTERS 25 FEBRUARY 1985

tested. A computer that could follow arbitrarily many necessary to input this specification. However, the computational paths in parallel could solve such prob­ evolution of a universal computer CA for a polynomial lems in polynomial time. For actual computers that al­ in t steps can implement any computation of length t. low only boundedly many paths, it is suspected that no As a consequence, its evolution is computationally ir­ general polynomial time solution is possible. 5 Nev­ reducible, and its outcome found only by an explicit ertheless, in the infinite time limit, parallel paths are simulation with length 0 (t): exponentially longer irrelevant, and a computer that solves NP-complete than for the first two in Fig. 1. problems is equivalent to other universal computers.6 One may ask whether the pattern generated by evo­ The structure of a system need not be complicated lution with a CA rule from a particular seed will grow for its behavior to be highly complex, corresponding to forever, or will eventually die OUt. 11 If the evolution is a complicated computation. Computational irreduci­ computationally irreducible, then an arbitrarily long bility may thus be widespread even among systems computation may be needed to answer this question. with simple construction. Cellular automata (CA) 7 One may determine by explicit simulation whether the provide an example. A CA consists of a lattice of pattern dies out after any specified number of steps, sites, each with k possible values, and each updated in but there is no upper bound on the time needed to time steps by a deterministic rule depending on a find out its ultimate fate.12 Simple criteria may be neighborhood of R sites. CA serve as discrete approx­ given for particular cases, but computational irreduci­ imations to partial differential equations, and provide bility implies that no shortcut is possible in general. models for a wide variety of natural systems. Figure 1 The infinite-time limiting behavior is formally unde­ shows typical examples of their behavior. Some rules cidable: No finite mathematical or computational pro­ give periodic patterns, and the outcome after many cess can reproduce the infinite CA evolution. steps can be predicted without following each inter­ The fate of a pattern in a CA with a finite total mediate step. Many rules, however, give complex pat­ number of sites N can always be determined in at most terns for which no predictive procedure is evident. kN steps. However, if the CA is a universal computer, Some CA are in fact known to be capable of universal then the problem is PSPACE-complete, and so pre­ computation, so that their evolution must be computa­ sumably cannot be solved in a time polynomial in N. 13 tionally irreducible. The simplest cases proved have One may consider CA evolution not only from finite k = 18 and R = 3 in one dimension,s or k = 2 and seeds, but also from initial states with all infinitely R = 5 in two dimensions.9 It is strongly suspected that many sites chosen arbitrarily. The value aU) of a site "c1ass-4" CA are generically capable of universal com­ after many time steps t then in general depends on putation: There are such CA with k = 3, R = 3 and 2.\ t ~ Rt initial site values, where .\ is the rate of in­ k = 2, R = 5 in one dimension.lo formation transmission (essentially Lyapunov ex­ Computationally, irreducibility may occur in systems ponent) in the CA.9 In c1ass-1 and -2 CA, information that are not full universal computers. For inability to remains localized, so that .\ = 0, and a (t) can be found perform, specific computations need not allow all com­ by a length O(logt) computation. For c1ass-3 and -4 putations to be short cut. Though c1ass-3 CA and oth­ CA, however, .\ > 0, and aU) requires an O( r) com­ er chaotic systems may not be universal computers, putation.14 most of them are expected to be computationally ir­ The global dynamics of CA are determined by the reducible, so that the solution of problems concerning possible states reached in their evolution. To charac­ their behavior requires irreducible amounts of compu­ terize such states one may ask whether a particular tation. string of n site values can be generated after evolution As a first example consider finding the value of a for t steps from any (length n + 2.\ t) initial string. site in a CA after t steps of evolution from a finite ini­ Since candidate initial strings can be tested in 0 (t) tial seed, as illustrated in Fig. 1. The problem is speci­ time, this problem is in the class NP. When the CA is fied by giving the seed and the CA rule, together with a universal computer, the problem is in general NP­ the logt digits of t. In simple cases such as the first two complete, and can presumably be answered essentially shown in Fig. 1, it can be solved in the time 0 (logt) only by testing all 0 (k" + 2At) candidate initial II FIG. 1. Seven examples of patterns generated by repeated application of various simple rules. The last four are probably computationally irreducible, and can be found only by direct simulation.

736 VOLUME 54, NUMBER 8 PHYSICAL REVIEW LETTERS 25 FEBRUARY 1985

strings. 15 In the limit t -+ 00, it is in general undecid­ with a dimension above some value, may be undecid­ able whether particular strings can appear. 16 As a able. consequence, the entropy or dimension of the limiting Computationally complex problems can arise in set of CA configurations is in general n)t finitely com­ finding eigenvalues or extremal states in physical sys­ putable. tems. The minimum energy conformation for a poly­ Formal languages describe sets of states generated mer is in general NP-complete with respect to its by CA. 17 The set that appears after t steps in the evo­ length.21 Finding a configuration below a specified en­ lution of a one-dimensional CA forms a regular formal ergy in a spin-glass with particular couplings is similar­ language: each possible state corresponds to a path ly NP-complete. 22 Whenever the stationary state of a through a graph with aU) < 2kRI nodes. If, indeed, the physical system such as this can be found only by length of computation to determine whether a string lengthy computation, the dynamic physical processes can occur increases exponentially with t for computa­ that lead to it must take a correspondingly long time.5 tionally irreducible CA, then the "regular language Global properties of some models for physical sys­ complexity" aU) should also increase exponentially, in tems may be undecidable in the infinite-size limit Oike agreement with empirical data on certain class-3 CA,17 those for two-dimensional CA). An example is and reflecting the "irreducible computational work" whether a particular generalized Ising model (or sto­ achieved by their evolution. chastic multidimensional CA23 ) exhibits a phase tran­ Irreducible computations may be required not only sition. to determine the outcome of evolution through time, Quantum and statistical mechanics involve sums but also to find possible arrangements of a system in over possibly infinite sets of configurations in systems. space. For example, whether an x x x patch of site To derive finite formulas one must use finite specifica­ values occurs after just one step in a two-dimensional tions for these sets. But it may be undecidable wheth­ CA is in general NP-complete.18 To determine wheth­ er two finite specifications yield equivalent configura­ er there is any complete infinite configuration that sat­ tions. So, for example, it is undecidable whether two isfies a particular predicate (such as being invariant finitely specified four-manifolds or solutions to the under the CA rule) is in general undecidablel8: It is Einstein equations are equivalent (under coordinate equivalent to finding the infinite-time behavior of a reparametrization).24 A theoretical model may be con­ universal computer that lays down each row on the lat­ sidered as a finite specification of the possible behavior tice in turn. of a system. One may ask for example whether the There are many physical systems in which it is consequences of two models are identical in all cir­ known to be possible to construct universal computers. cumstances, so that the models are equivalent. If the Apart from those modeled by CA, some examples are models involve computations more complicated than electric circuits, hard-sphere gases with obstructions, those that can be carried out by a computer with a and networks of chemical reactions. 19 The evolution fixed finite number of states (regular language), this of these systems is in general computationally irreduci­ question is in general undecidable. Similarly, it is ble, and so suffers from undecidable and intractable undecidable what is the simplest such model that problems. Nevertheless, the constructions used to describes a given set of empirical data. 25 find universal computers in these systems are arcane, This paper has suggested that many physical systems and if computationally complex problems occurred are computationally irreducible, so that their own evo­ only there, they would be rare. It is the of this lution is effectively the most efficient procedure for paper .that such problems are in fact common.20 Cer­ determining their future. As a consequence, many tainly there are many systems whose properties are in questions about these systems can be answered only by practice studied only by explicit simulation or exhaus­ very lengthy or potentially infinite computations. But tive search: Few computational shortcuts (often stated some questions answerable by simpler computations in terms of invariant quantities) are known. may still be formulated. Many complex or chaotic dynamical systems are ex­ This work was supported in part by the U. S. Office pected to be computationally irreducible, and their of Naval Research under Contract No. N00014-80-C- behavior effectively found only by explicit simulation. 0657. I am grateful for discussions with many people, Just as it is undecidable whether a particular initial particularly C. Bennett, G . Chaitin, R. Feynman, state in a CA leads to unbounded growth, to self­ E. Fredkin, D. Hillis, L. Hurd, 1. Milnor, N. Packard, replication, or has some other outcome, so it may be M. Perry, R. Shaw, K. Steiglitz, W. Thurston, and undecidable whether a particular solution to a differen­ L. Yaffe. tial equation (studied say with symbolic dynamics) even enters a certain region of phase space, and whether, say, a certain n-body system is ultimately iFor a more informal exposition see: S. Wolfram, Sci. stable. Similarly, the existence of an attractor, say, Am. 251 , 188 (1984) . A fuller treatment will be given else-

737 VOLUME 54, NUMBER 8 PHYSICAL REVIEW LETTERS 25 FEBRUARY 1985 where. IIThis is analogous to the problem of whether a computer 2E.g., The Undecidable: Basic Papers on Undecidable Propo­ run with particular input will ever reach a "halt" state. sitions, Unsolvable Problems, and Computable Functions, edited 12The number of steps to check ("busy-beaver function") by M. Davis (Raven, New York, 1965), or 1. Hopcroft and in general grows with the seed size faster than any finite for­ J. Ullman, Introduction to Automata Theory, Languages, and mula can describe (Ref. 2). Computations (Addison-Wesley, Reading, Mass., 1979). I3Cf. C. Bennett, to be published. 3This is a physical form of the Church-Turing hypothesis. 14Cf. B. Eckhardt, 1. Ford, and F. Vivaldi, Physica Mathematically conceivable systems of greater power can be (Utrecht) 130,339 (1984). obtained by including tables of answers to questions insolu­ 15The question is a generalization of whether there exists ble for these universal computers. an assignment of values to sites such that the logical expres­ 4Real-number parameters in classical physics allow infinite sion corresponding the t-step CA mapping is true (cf. information density. Nevertheless, even in classical physics, V. Sewelson, private communication). the finiteness of experimental arrangements and measure­ 16L. Hurd, to be published. . ments, implemented as coarse graining in statistical mechan­ I7S . Wolfram, Commun. Math. Phys. 96,15 (1984). ics, implies finite information input and output. In relativis­ 18N. Packard and S. Wolfram, to be published. The tic , finite density of information (or equivalent problem of covering a plane with a given set of quantum states) is evident for free fields bounded in phase tiles is considered.in R. Robinson, Invent. Math. 12, 177 space [e .g., 1. Bekenstein, Phys. Rev. 0 30,1669 (1984)]. It (1971). is less clear for interacting fields, except if space-time is ulti­ 19E.g., C. Bennett, Int. 1. Theor. Phys. 21, 905 (1982); mately discrete [but cf. B. Simon, Functionallnregration and E. Fredkin and T. Toffoli, Int. J. Theor. Phys. 21, 219 Quantum Physics (Academic, New York, 1979), Sec. II I. 9]. (1982); A. Vergis, K. Steiglitz, and B. Dickinson, "The A finite information transmission rate is implied by relativis­ Complexity of Analog Computation" (unpublished). tic causality and the manifold structure of space-time. 2oConventionai computation theory primarily concerns 5It is just possible, however, that the parallelism of the possibilities, not probabi·lities. There are nevertheless some path integral may allow quantum mechanical systems to problems for which almost all instances are known to be of solve any NPproblem in polynomial time. equivalent difficulty. But other problems are known to be 6M. Garey and D. Johnson, Computers and Intractability: much easier on average then in the worst case. In addition, A Guide to the Theory oj NP-Completeness (Freeman, San for some NP-complete problems the density of candidate Francisco, 1979) . solutions close to the actual one is very large, so approxi­ 7See S ... Wolfram, Nature 311, 419 (1984); Cellular Auto­ mate solutions can easily be found [So Kirkpatrick, C. Gelatt, mata, edited by D. Farmer, T. Toffoli, and S. Wolfram, Phy­ and M. Vecchi, Science 220, 671 (1983)]. sica 100, Nos. I and 2 (1984), and references therein. 21Compare Time Warps, String Edites, and Macromolecules, 8A. R. Smith, 1. Assoc. Com put. Mach. 18,331 (1971) . edited by D. Sankoff and J. Kruskal (Addison-Wesley, 9E. R. Banks, Massachusetts Institute of Technology Re­ Reading, Mass., 1983). port No. TR-81, 1971 (unpublished). The "Game of Life," 22F. Barahona, 1. Phys. A 13,3241 (982). discussed in E. R. Berlekamp, 1. H. Conway, and R. K. Guy, 23E. Domany and W. Kinzel, Phys. Rev. Lett. 53, 311 Winning Ways Jor Your Mathematical Plays (Academic, New (1984) . York, 1982). is an example with k = 2, R = 9. N. Margolus, 24See W. Haken, in Word Problems, edited by W. W. Physica (Utrecht) 100,81 (984), gives a reversible exam­ Boone, F. B. Cannonito, and R. C. Lyndon (North-Holland, ple. Amsterdam, 1973). lOS . Wolfram, Physica (Utrecht) 100, 1 (984), and to be 25G. Chaitin, Sci. Am. 232, 47 (1975), and IBM 1. Res. published. Dev. 21, 350 (1977); R. Shaw, to be published.

738