An Overview of Computational Complexity
Total Page:16
File Type:pdf, Size:1020Kb
lURING AWARD LECTURE AN OVERVIEW OF COMPUTATIONAL COMPLEXITY ~]~F.~ A. COOK University of Toronto This is the second Turing Award lecture on Computational Complexity, The first was given by Michael Rabin in 1976.1 In reading Rabin's excellent article [62] now, one of the things that strikes me is how much activity there has been in the field since. In this brief overview I want to mention what to me are the most important and interesting results since the subject began in about 1960. In such a large field the choice of ABSTRACT: An historical overview topics is inevitably somewhat personal; however, I hope to of computational complexity is include papers which, by any standards, are fundamental. presented. Emphasis is on the fundamental issues of defining the 1. EARLY PAPERS intrinsic computational complexity The prehistory of the subject goes back, appropriately, to Alan of a problem and proving upper Turing. In his 1937 paper, On computable numbers with an and lower bounds on the application to the Entscheidungs problem [85], Turing intro- complexity of problems. duced his famous Turing machine, which provided the most Probabilistic and parallel convincing formalization (up to that time) of the notion of an computation are discussed. effectively (or algorithmically) computable function. Once this Author's Present Address: notion was pinned down precisely, impossibility proofs for Stephen A. Cook, Department of Computer computers were possible. In the same paper Turing proved Science, that no algorithm (i.e., Turing machine) could, upon being Universityof Toronto, given an arbitrary formula of the predicate calculus, decide, Toronto, Canada M5S 1A7. in a finite number of steps, whether that formula was satisfia- Permission to copywithout fee ble. all or part of this materialis granted providedthat the After the theory explaining which problems can and can- copies are not made or not be solved by computer was well developed, it was natural distributedfor direct to ask about the relative computational difficulty of computa- commercialadvantage, the ble functions. This is the subject matter of computational ACM copyrightnotice and the title of the publicationand its complexity. Rabin [59, 60] was one of the first persons (1960) date appear, and notice is given to address this general question explicitly: what does it mean that copyingis by permissionof to say that f is more difficult to compute than g? Rabin the Associationfor Computing suggested an axiomatic framework that provided the basis for Machinery. To copy otherwise, or to republish,requires a fee the abstract complexity theory developed by Blum [6] and and/or specificpermission. others. ©1983 ACM 0001-0782/83/ A second early (1965) influential paper was On the compu- 0600-0401 75¢. tational complexity of a/gorithms by J. Hartmanis and R. E. Stearns [37]. 2 This paper was widely read and gave the field its rifle. The important notion of complexity measure defined by the computation time on multitape Turing machines was introduced, and hierarchy theorems were proved. The paper also posed an intriguing question that is still open today, ls Michael Rabin and Dana Scott shared the Turing Award in 1976. 2 See Harlmanis [36] for some interesting reminiscences. June1983 Volume26 Number6 Communications of the ACM 401 11JRING AWAlW LECTU~ any irrational algebraic number (such as x/2) computable in each operation involving an integer has unit cost, but inter- real time, that is, is there a Turing machine that prints out the gets are not allowed to become unreasonably large (for exam- decimal expansion of the number at the rate of one digit per ple, their magnitude might be bounded by some fixed poly- 100 steps forever. nomial in the size of the input). Probably the most mathemat- A third founding paper (1965) was The intrinsic computa- ically satisfying model is Sch6nhage's storage modification tional difficulty of functions by Alan Cobham [15]. Cobham machine [69], which can be viewed either as a Turing ma- emphasized the word "intrinsic," that is, he was interested in chine that builds its own storage structure or as a unit cost a machine-independent theory. He asked whether multiplica- RAM that can only copy, add or substract one, or store or tion is harder than addition, and believed that the question retrieve in one step. Sch6nhage's machine is a slight generali- could not be answered until the theory was properly devel- zation of the Kolmogorov-Uspenski machine proposed much oped. Cobham also defined and characterized the important earlier [46] (1958), and seems to me to represent the most class of functions he called ~." those functions on the natural general machine that could possibly be construed as doing a numbers computable in time bounded by a polynomial in the bounded amount of work in one step. The trouble is that it decimal length of the input. probably is a little too powerful. (See Section 3 under "large Three other papers that influenced the above authors as number mutiplication.") well as other complexity workers (including myself) are Returning to Cobham's question "what is a step," I think Yamada [91], Bennett [4], and Ritchie [66]. It is interesting to what has become clear in the last 20 years is that there is no note that Rabin, Stearns, Bennett, and Ritchie were all stu- single clear answer. Fortunately, the competing computer dents at Princeton at roughly the same time. models are not wildly different in computation time. In gen- eral, each can simulate any other by at most squaring the 2. EARLY ISSUES AND CONCEPTS computation time (some of the first arguments to this effect Several of the early authors were concerned with the ques- are in [37]). Among the leading random access models, there tion: What is the right complexity measure? Most mentioned is only a factor of log computation time in question. computation time or space as obvious choices, but were not This leads to the final important concept developed by convinced that these were the only or the right ones. For 1965--the identification of the class of problems solvable in example, Cobham [15] suggested "... some measure related to time bounded by a polynomial in the length of the input. The the physical notion of work [may] lead to the most satisfac- distinction between polynomial time and exponential time tory analysis." Rabin [60] introduced axioms which a com- algorithms was made as early as 1953 by yon Neumann [90]. plexity measure should satisfy. With the perspective of 20 However, the class was not defined formally and studied until years experience, I now think it is clear that time and space-- Cobham [15] introduced the class _L~of functions in 1964 (see especially time--are certainly among the most important Section 1). Cobham pointed out that the class was well de- complexity measures. It seems that the first figure of merit fined, independent of which computer model was chosen, given to evaluate the efficiency of an algorithm is its running and gave it a characterization in the spirit of recursive func- time. However, more recently it is becoming clear that paral- tion theory. The idea that polynomial time computability lel time and hardware size are important complexity meas- roughly corresponds to tractability was first expressed in print ures too (see Section 6). by Edmonds [27], who called polynomial time algorithms Another important complexity measure that goes back in "good algorithms." The now standard notation P for the class some form at least to Shannon [74] (1949) is Boolean circuit of polynomial time recognizable sets of strings was introduced (or combinational) complexity. Here it is convenient to as- later by Karp [42]. sume that the function f in question takes finite bit strings The identification of P with the tractable (or feasible) prob- into finite bit strings, and the complexity C (n) of f is the size lems has been generally accepted in the field since the early of the smallest Boolean circuit that computes f for all inputs of 1970's. It is not immediately obvious why this should be true, length n. This very natural measure is closely related to com- since an algorithm whose running time is the polynomial n 1~° putation time (see [57a], [57b], [68b]), and has a well devel- is surely not feasible, and conversely, one whose running oped theory in its own right (see Savage [68a]). time is the exponential 2~1" is feasible in practice. It seems Another question raised by Cobham [15] is what consti- to be an empirical fact, however, that naturally arising prob- tutes a "step" in a computation. This amounts to asking what lems do not have optimal algorithms with such running is the right computer model for measuring the computation times? The most notable practical algorithm that has an expo- time of an algorithm. Multitape Turing machines are com- nential worst case running time is the simplex algorithm for monly used in the literature, but they have artificial restric- linear programming. Smale [75, 76] attempts to explain this tions from the point of view of efficient implementation of by showing that, in some sense, the average running time is algorithms. For example, there is no compelling reason why fast, but it is also important to note that Khachian [43] the storage media should be linear tapes. Why not planar showed that linear programming is in P using another algo- arrays or trees? Why not allow a random access memory? rithm. Thus, our general thesis, that P equals the feasible In fact, quite a few computer models have been proposed problems, is not violated. since 1960. Since real computers have random access memo- ries, it seems natural to allow these in the model.