the design and analysis of computer algorithms aho, hopcroft ullman 1974 01 11 Cấu trúc dữ liệu và giải thuật

479 30 0
the design and analysis of computer algorithms aho, hopcroft   ullman 1974 01 11 Cấu trúc dữ liệu và giải thuật

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

THE DESIGN AND ANALYSIS OF COMPUTER ALGORITHMS Alfred V Aho Bell Laboratories John E Hopcroft Cornell University Jeffrey D U II man Princeton University A " Addison-W~ley Publishing Company Reading Massachusetts · Menlo Park California London · Amsterdam · Don Mills Ontario · Sydney CuuDuongThanCong.com PREFACE "' The study of algorithms is at the very heart of c.:omputer science:- Irr; -redeht years a number of significant advances in the field of algorithms· have b'f'en made These advances have ranged from the development off~s,te,r; algori,th~~ such as the fast Fourier transform to the startling discovery of-q:rtain r)atur.~I problems·for which all algorithms are inefficient These results have kindled considerable interest in the study of algorithms and the area of algorithm design and analysis has blossomed into a field of intense interest The intent of this book is to bring together the fundamental results in this area, so the unifying principles and underlying concepts of algorithm design may more easily be taught THE SCOPE OF THE BOOK To analyze the performance of an algorithm some model of a computer is necessary Our book begins by formulating several computer models which are simple enough to establish analytical results but which at the same time accurately reflect the salient features of real machines These models include the random access register machine the random access stored program machine, and some specialized variants of these The Turing machine is introduced in order to prove the exponential lower bounds on efficiency in Chapters, I and 11 Since the trend in program design is away from machine language, a high.: level language called Pidgin ALGOL is introduced as the main vehicle for describing algorithms The complexity of a Pidgin ALGOL program is related to the machine models The second chapter introduces basic data structures and programming techniques often used in efficient algorithms It covers the use of lists pushdown stores queues trees and graphs Detailed explanations of recursion divide-and-conquer and dynamic programming are giv~n along with examples of their use Chapters to provide a sampling of the diverse areas to which the fundamental techniques of Chapter :! can be applied Otfr eh1phasis i"n these··chap~ ters is on developing algo1:ithms that are a·symp.toti.caUy: th:e · m1ost' ~ffiti'ent known Because of thiS' emphasis some of the algorithms presented are.suitable only for inputs whose size is much larger than what is currently encoun· ·· iii CuuDuongThanCong.com :" _· iv PREFACE tered in practice This is particularly true of some of the matrix multiplication algorithms in Chapter 6, the SchOnhage-Strassen integer-muitiptication algorithm of Chap~er and some of the polynomial and integer algorjthms of Chapter , On the o~her hand, most of the sorting algorithms of Chapter 3, the scarchirig algorithms of Chapter 4, the graph a.lgorithms of Chapter 5, the fast Fourier transform of Chapter 7, and the string-matching algorithms of Chapter are widely used, since the sizes of ,inputs which these algorithms are efficient are sufficiently s_maH to be encountered in many practical situations Chapters I0 through 12 discuss lower bounds on computational complexity The inherent computational difficulty of a problem is of universal interest both to program design and to an understanding of the nature of computation In Chapter IO important class of problems, the NP-complete problems, is studied All problems in this class are equivalent in computaqonal difficulty in that if one problem in the class has an efficient (polynomial ti-~e-~ound_ed) solution, then all problems in the class have efficient sol.µtions Since -this class of problems contains many practically important and wellstudied problems, such as the integer-programming problem and the traveling salesman problem, there is good r~ason to suspect that no problem in this class can be solved efficiently Thus, if a program designer knows that the problem for which he is trying to find an effiC:ient algorithm is in this class then he may very well be content to try heuristic approaches to the problem In spite of the overwhelming empirical evidence to the contrary, it is still an open question whether NP-complete problems admit of efficient solutions In Chapter 11 certain problems are defined for which we can actually prove that no efficient algorithms exist The material in Chapters I and 11 draws heavily on the concept of Turing machines introduced in Section~ 1.6 and 1.7 · · In the final chapter of the book w.~ relate concepts of computational difficulty to notions of linear independence in vector spaces The material in this ~hapter provides techniques for proving lower bounds for much simpler problems than those considered in Chapters I and 11 for an CuuDuongThanCong.com PREFACE v THE USE OF THE BOOK This: book is intended as a first course in the design and analysis of algorithms The emphasis is on ideas and ease of un~erstanding rather than implementation details or progra~ming tricks Informal, intuitive ~xplanations are often used in place of long tedious proofs The book is self-contained and assumes no specific background iri mathematics or programming languages However, a certain amount of maturity in being able to handle mathematical concepts is desirable, as is some exposure to a higher-level programming language such as FORTRAN \or ALGOL Some knowledge of linear algeb~a is needed for a full understanding of Chapters 6; 7, 8, and 12 This book has been used in graduate and undergraduate c'ourses in algorithm design In a one-semester course most of Chapters 1-5 and 9-10 were covered, aiong with a smattering of topics from the remaining chapters In introductory courses the emphasis was on material from Chapters 1~5 but Se·ctions 1.6, 1.7, 4.13, 5.11, and Theorem 4.5 were generally not covered The book can also be used in more advanced courses emphasizing the th~ory of algorithms Chapters 6-12 could serve as the foundation for such a course Numerous exercises have been provided at the end of each chapter to provide an instructor with a wide range of homework problems The exercises are graded according to difficulty Exercises with no stars are suitable for introductory courses, singly starred exercises for more advanced courses, and doubly starred exercises for advanced graduate courses The bibliographic notes at the end of every chapter attempt to point to a published source for each of the algorithms and results contained in the text and the exercises ACKNOWLEDGMENTS The material in this book has been derived from class notes for courses taught by the authors at Cornell, Princeton, and Stevens Institute ofTechnoiogy The authors would like to thank the many people who have criticaily read various portions of the manuscript and offered many helpful suggestions In particular we would like to thank Kellogg Booth, Stan Brown, Steve Chen, Allen Cypher CuuDuongThanCong.com vi PREFACE Arch Davis, Mike Fischer Hania Gajewska Mike Garey Udai Gupta Mike Harrison Matt Hecht, Harry Hunt Dave Johnson Marc Kaplan, Don Johnson, Steve Johnson, Brian Kernighan Don Knuth, Richard Ladner, Anita LaSalle, Doug Mcllroy, Albert Meyer, Christos· Papadimitr~ou, Bill Plauge~ John Savage, Howard Siege!, Ken Steiglit;::, Larry Stockmeyer, Tom Szymanski, and Theodore Yen Special thanks go to Gemma Carnevale, Pauline Cameron Hannah Kresse, Edith Purser, and Ruth Suzuki for their cheerful and careful typing of the manuscript The authors are also grateful to Bell Laboratories and Cornell Princeton, and the University of California at Berkeley for providing facilities for the preparation of the manuscript June 1974 CuuDuongThanCong.com A V A J.E H J D U CONTENTS M_odels of Computation l l l 1.4 l l J.8 Algorithms and their complexit:,i Random access machines Computational complexity of RAM programs A stored program model Abstractions of the RAM · A primitive model of computation: the Turing machine Relationship between the Turing machine and RAM models Pidgin ALGOL-a high-level language 2.] 2.2 2.3 Design of Efficient Algorithms 2.7 2.8 2.9 Data structures: lists, queues, and stacks Set representations , Graphs· Trees · Recursion Divide-and-conquer Balancing Dynamic programming Epilogue 3 3.2 3.3 3.4 3.5 3.6 Sorting and Order Statist~cs The sorting problem Radix sorting Sorting by comparisons Heapsort-an O(n log n) comparison sort Quicksort-an O(n log n) expected time sort Order statistics Expected time for order statistics 4.1 4.2 4.3 4.4 4.5 4.6 Data Structures for Set Manipulation Problems Fundamental operations on sets Hashing Binary search , Binary search trees Optimal binary search trees A simple disjoint-set union algorithm 2.4 2.5 2.6 vii CuuDuongThanCong.com l2 15 19 25 3J 33 44 49 50 52 55 60 65 67 69 76 77 86 87 92 97 100' 108 111 113 ] 15 ] 19 124 CONTENTS viii 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 6.1 6.2 6.3 6.4 6.5 6.6 7.1 7.:? 7.3 7.4 7.5 Tree structures for the UNION-FIND problem Applications and extensions of the UNION-FIND algorithm Balanced trP.e schemes Dictionaries and priority queues Mergeable heaps Concatenable queues Partitioning Chapter summary I:?9 139 145 148 152 155 157 162 Algorithms on Graphs Minimum-cost spanning trees Depth-first search Biconnectivity Depth-first search of a directed graph Strong connectivity Path-finding problems A transitive closure algorithm A shortest-path algorithm Path problems and matrix multiplication Single-source problems Dominators in a directed acyclic graph: putting the concepts together 172 176 179 187 189 195 199 200 201 207 209 Matrix Multiplication and Related Operations Basics Strassen's matrix-multiplication algorithm Inversion of matrices LUP decomposition of matrices Applications of LUP decomposition Boolean matrix multiplication :?26 230 232 233 240 242 The Fast Fourier Transform and its Applications The discrete Fourier transform and its inverse The fast Fourier transform algorithm The FFT using bit operations Products of polynomials The Schonhage-Strassen integer-multiplication algorithm CuuDuongThanCong.com 252 257 265 269 270 CONTENTS Integer ond Polynomial Arithmetic The similarity between integers a.nd polynomials integer multiplication and division 8.3 Polynomial multiplication and division 8.4 Modular arithmetic 8.5 Modular polynomial arithmetic and polynomial evaluation 8.6 Chinese remaindering 8.7 Chinese remaindering and interpolation of polynomials 8.8 Greatest common divisors and Euclid's algorithm 8.9 An asymptotically fast algorithm for polynomial GCD's 8.10 Integer GCD's 8.11 Chinese remaindering revisited 8.12 Sparse polynomials 8.1 8.2 9.1 9.2 9.3 9.4 9.5 10 I 0.1 I 0.2 I 0.3 I 0.4 I 0.5 I 0.6 11 I 1.1 11.2 11.3 11.4 ix 278 279 286 289 292 294 298 300 303 308 310 311 Pattern-Matching Algorithms Finite automata and regular expressions Recognition of regular expression patterns Recognition of substrings Two-way deterministic pushdown automata Position trees and substring identifiers 318 326 329 335 346· NP-Complete Problems Nondeterministic Turing machines The classes (J' and K(J' Languages and problems NP-completeness of the satisfiability problem Additional NP-complete problems Polynomial-space-bounded problems 384 395 Some Provably Intractable Problems Complexity hierarchies The space hierarchy for deterministic Turing machines A problem requiring exponential time and space A nonelementary problem 406 407 410 419 CuuDuongThanCong.com 364 372 374 377 CONTENTS JI 12 12 I 12.2 12.3 12.4 12.5 12.6 12 Lower Bounds on Numbers of Arithmetic Operations Fields Straight-line code revisited A matrix formulation of problems A row-oriented lower bound on multiplications A column-oriented lower bound on multiplications A row-and-column-oriented bound on multiplications Preconditioning 428 429 432 432 435 439 442 Bibliography 452 Index 463 CuuDuongThanCong.com MODELS OF COMPUTAl-ION CHAPTER CuuDuongThanCong.com 456 BIBLIOGRAPHY HARTMANIS, J., AND J E HOPCROFT [1971] "An overvie.w of the theory of computational complexity," J ACM 18:3, 444-475 HARTMAN IS, J., P M LEWIS II, AND R E STEARNS [ 1965] "Classification of computations by time and memory requirements," Proc IFIP Congress 65, Spartan, N.Y., 31-35 HARTMANIS, J., AND R E STEARNS [1965) "Oh the computational complexity of algorithms," Trans Amer Math Soc 117, 285-306 HECHT, M S [I 973] "Global data flow analysis of computer programs," Ph.D Thesis, Dept of Electrical Engineering, Princeton University HEINDEL, L E., AND E HOROWITZ [1971) "On decreasing the computing time for modular arithmetic," Conference Record, IEEE 12th Annual Symposium on ·Switching and Automata Theory, 126-128 HENNIE, F c., AND R E STEARNS [1966) machines," J ACM 13:4, 533-546 "Two tape simulation of multitape HIRSCHBERG, D S [ 197 3] "A linear space algorithm for computing maximal common subsequences," TR-138, Computer Science Labora.qry, Dept of Electrical Engineering, Princeton University, Princeton, N J · HOARE, C A R [1962] "Quicksort," Computer] 5:1 10-15 HOHN, F E [1958) Elementary Matrix Algebra, Macmillan, New York HOPCROFT, J.E [1971) "Ann log n algorithm for minimizing states in a finite automaton," in Kohavi and Paz [1971), pp 189-196 HOPCROFT, J.E., AND R M KARP [1971) "An algorithm for testing the equivalence of finite automata," TR-71-114, Dept of Computer Science, Cornell University, Ithaca, N Y HOPCROFT, J.E., AND L R KERR [1971) "On minimizing the number of multiplications necessary for matrix multiplication," SIAM J Applied Math 20: l, 30-36 HOPCROFT, J.E., AND J MUSINSKI [1973) "Duality in determining the comple~ity of noncommutative matrix multiplication," Proc 5th Annual ACM Symposium pn Theory of Computing, 73-87 HOPCROFT,J E., AND R E TARJAN (1973a] "Efficient planaritytesting,"TR 73-165, Dept of Computer Science, Cornell University, Ithaca, N.Y., also J ACM, to appear HOPCROFT, J E., AND R E TARJAN [1973b] components," SIAM J Computing 2:3 "Dividing a graph into triconnected · HOPCROFT, J.E., AND R E TARJAN [1973c] "Efficient algorithms for graph manipulation," Comm ACM 16:6, 372-378 HOPCROFT, J.E., AND J D ULLMAN [1969] Formal Languages·and Their Relation to Automata, Addison-Wesley, Reading, Mass HOPCROFT, J E • AND J D ULLMAN [1973] ··set merging algolithins," SIAM J Computing, 2:4, 294-303 HoPcRoFT, J.E., AND J K WONG [1974] "A linear time algorithm for isomorphism of planar graphs," Proc 6th Annual ACM Symposium on The.ory of Computing, 172-184 CuuDuongThanCong.com BIBLIOGRAPHY 457 HOROWITZ, E [ 1972) "A fast method for interpolation using preconditioning." Information Processing Letters 1:4, 157-163 HORVATH, E C (1974) "Some efficient stable sorting algorithms,'" Proc 6th Annual ACM Symposium on Theory of Computing, 194-215 Hu, T C [ 1968) "A decomposition algorithm for shortest paths in a network." Operations Res 16, 91-102 Hu, T C., AND A C TUCKER (1971] Applied Math 21:4, 514-532 "Optimum binary search trees." SIAM J HUNT, H B., III [I 973a] "On the time and tape complexity of languages," Proc 5th Annual ACM Symposium on Theory of Computing, 10-19 See also TR-73-182, Dept, of Computer Science, Cornell University, Ithaca, N.Y HUNT, H B., III [I 973b] "The equivalence problem for regular expressions with intersection is not polynomial in tape," TR 73-156, Dept of Computer Science, Cornell University, Ithaca, N.Y HUNT, H B., III (1974] "Stack languages, Rice's theorem and a natural exponential complexity gap," TR-142, Computer Science Laboratory, Dept of Electrical Engineering, Princeton Univ~rsity, Princeton, NJ HUNT, H B., Ill, AND D J ROSENKRANTZ (1974] "Computational parallels between the regular and context-free languages," Proc 6th Annual ACM Symposium on Theory of Computing, 64-74 IBARRA, H (1972) "A note concerning nondeterministic tape complexities," J ACM 19:4, 608-612 IBARRA, H., AND S K SAHNI [1973] "Polynomial complete fault detection problems," Technical Report 74-3, Computer, Information and Control Sciences, University of Minnesota, Minneapolis JONES, N D [1973] "Reducibility among combinatorial problems in log n space," Proc 7th Annual Princeton Conference on Information Sciences and Systems, 547-551 JOHNSON, D B [1973) "Algorithms for shortest paths," Ph.D Thesis, Dept of Computer Science, Cornell University, Ithaca, New York JOHNSON, S C [I 974) "Sparse polynomial arithmetic," Bell Laboratories, Murray Hill, NJ KARATSUBA, A., ANDY OFMAN (1962) "Multiplication of multidigit numbers on automata," Dok/ Akad Nauk SSSR 145, 293-294 (in Russian) KASAMI, T ( t 96j] "An efficient recognition and syntax algorithm for context-free languages," Scientific Report AFCRL-65-758, Air Force Cambridge Research Laboratory, Bedford Mass KARP, R M [I 972) "Reducibility among combinatorial problems," in Miller and Th3.tcher [ ! 972] pp 85- I 04 KARP, R M., R E MILLER, AND A L ROSENBERG [ i 972) "Rapid identification of repeated patterns in strings trees and arrays,'' Proc 4th Anmwl ACIH Symposium 011 Theory of Computing, I 25-J 36 CuuDuongThanCong.com B BIBLIOGRAPHY EDEM, z [ 1974] "On the number of multiplications and divisions required to compute certain rational functions," Proc 6th Annual ACM Symposium 011 Theory of Computing, 334-341 ERR, L R [ 1970] "The effect of algebraic structure on the computational complexity of matrix multiplications," Ph.D Thesis, Cornell University, Ithaca, N.Y IRKPATRICK, D [ 1972] "On the additions necessary to compute certain functions," Proc 4th Annual ACM Symposium 011 Theory of Computing, 94-101 IRKPATRICK, D [1974] "Determining graph properties from matrix representations," Proc 6th Annual ACM Symposium on Theory of Computing, 84-90 ISLITSYN, S S [ 1964] "On the selection of the kth element of an ordered set by pairwise comparison," Sibirsk Mat Zh S, 557-564 LEENE, S C [1956] "Representation of events in nerve nets and finite automata," in Automata Studies (Shannon and McCarthy, eds.), Princeton University Press, pp 3-40 .NUTH, D E [1968] Fundamental Algorithms, Addison-Wesley, Reading, Mass ilUTH, D E [1969] Seminumerical Algorithms, Addison-Wesley, Reading, Mass ilUTH, D E [1971] "Optimum binary search trees," Acta Informatica 1, 14-25 :NUTH, D E [1973a] Sorting and Searching, Addison-Wesley, Reading, Mass ••• :NUTH, D E [1973b] Norway "Notes on pattern matching," University of Trondheim, :NuTH, D E., AND V R PRATT [ 1971] "Automata theory can be useful," Stanford University; Stanford, California ~OHAVI, Z., AND A PAZ (eds.) [1971] Theory of Machines and Computations, Academic Press, New York ~USKAL, J B., JR [1956] "On the shortest spanning subtree of a graph and the traveling salesman problem," Proc Amer Math Soc 7:1, 48-50 ~UNG, H T [1973] "Fast evaluation and interpolation," Dept of Computer -Science, Carnegie-Mellon University, Pittsburgh JEWIS, P M., II, R E STEARNS,ANDJ HARTMANIS [1965] "Memory bounds for recognition of context-free and context-sensitive languages," Conference Record, IEEE 6th Annual Symposium on Switching Circuit Theory and Logic Design, 191-202 JIPSON, J [ 1971 ] "Chinese remainder and interpolation algorithms," Proc 2nd Symposium on Symbolic and Algebraic Manipulation, 372-391 JIU, C L [1968] Introduction to Combinatorial Mathematics, McGraw··Hill, New York JIU, C L [1972] "Analysis and synthesis of sorting algorithms," SIAM J Corr.puring 1:4, 290-304 VIACLANE, s AND G BIRKHOFF [1967] Algebra, Macmillan, New York VlcNAUGHTON, R., AND H YAMADA fl960] "Regular expressions and state graphs for automata." IRE Trans on Electronic Computers 9:1, 39-47 Reprinted in Moore (1964], pp 157-174 CuuDuongThanCong.com BIBLIOGRAPHY 459 MEYER, A R [ 1972) "Weak monadic second order theory of successor is not elementary recursive." Project MAC Report MIT Cambridge, Mass MEYER, A R., AND L STOCKMEYER [ 1972) "The equivalence problem for regulm expressions with squaring requires exponential space." Conference Record, IEEE 13th Annual Sympo.~ium 011 Sll'itchi11g a11d Automata Theory, 125-129 MEYER, A R., AND L STOCKMEYER [ 1973) "Nonele~entary word problems in automata and logic," Proc AMS Symposium 011 Complexity of Computatio11, April 1973 MILLER, R E., AND J W; THATCHER (eds.) (1972] Complexity of Computer Computations, Plenum Press, New York MINSKY, M [ 1967) Computation: Finite and Infinite Machines, Prentice-Hall Englewood Cliffs, N J MOENCK, R (1973] "Fast Computation of GCD's," Proc 5th Annual ACM Symposium on Theory ofComputi11g, 142-151 MoENCK, R., AND A B BORODIN [ 1972) "Fast modular transforms via division," Conference Record, IEEE 13th A11nual Symposium on Switching and Automata Theory', 90-96 MooRE, E F (ed.) [1964) Sequendal Machines: Selected Papers, Addison-Wesley, Reading, Mass MORGENSTERN, J [1973) "Note on a lower bound of the linear complexity of the fast Fourier transform," J ACM 20:2, 305-306 MORRIS, R [1968) "Scatter storage techniques," Comm ACM 11:1, 35-44 MORRIS, J H., JR., AND v R PRATT (1970] "A linear pattern matching algorithm," Technical Report No 40, Computing Center, University of California, Berkeley MoTZKIN, T S [1955) "Evaluation of polynomials and evaluation of rational functions," Bull Amer Math Soc 61, 163 MUNRO, I [ 1971) "Efficient determination of the transitive closure of a directed graph," lnformatio11 Processing Letters 1:2, 56-58 MURAOKA, Y., AND D J KUCK [1973) "On the time required for a sequence of matrix products," Comm ACM 16:1, 22-26 NECIPORUK, E I [1966) "A Boolean function," Dok/ Akad Nauk SSSR 169:4 (in Russian) English translation in Soviet Math Dok/ (1966), 999-1000 NICHOLSON, P J (1971) "Algebraic theory of finite Fourier transforms," J Computer and System Sciences 5:5, 524-547 NIEVERGELT, J.' AND E M REINGOLD (1973) "Binary search trees of bounded balance," SIAM J Computing 2:1, 33-43 OFMAN, Y (1962) •·on the algorithmic complexity of discrete functions." Dok/ Akad Nauk SSSR 145, 48-51 (in Russian) English translation in ScH'ic•t Physics Dok/ (1963), 589-591 OSTROWSKI, A M [ 1954) "On two problems in abstract algebra connected with Homer's rule," Studies Presemed to R 1·011 Mises, Academic Press N Y PAN, V Y (1966) "Methods of computing values of polynomials." Russian Mathematical Surveys 21:1 105-136 CuuDuongThanCong.com 460 BIBLIOGRAPHY PATERSON, M S., M J FISCHER, AND A R MEYER [1974] "An improved overlar argument for on-line multiplication," Project MAC Technical Memorandum 40 MIT, Cambridge, Mass POHL, I [1972] "A sorting problem and its complexity," Comm ACM 15:6 462-464 PRATT, T W [ 1975] Programming Language Design and Implementation, to appear Prentice-Hall, Englewood Cliffs N.J PRATT, V R [1974] "The power of negative thinking in multiplying Boolean matrices," Proc 6th Annual ACM Symposium on Theory of Computing, 80-83 PRATT, V R., AND F F YAO [ 1973] "On lower bounds for computing the ith largest element," Conference Record, IEEE 14th Annual Symposium on Switching and Automata Theory, 70-81 PRIM, R C [ 1957] "Shortest connection networks and some generalizations," Bell System Technical J., 1389-1401 RABIN, M [1963] "Real-time computation," Israel J Math 1, 203-211 RABIN, M [1972] "Proving simultaneous positiVfty of linear forms," J Computer and System Sciences 6:6, 639-650 RABIN, M 0., AND D Scorr [1959] "Finite automata and their decision problems," IBM J Research and Development 3, 114-125 Reprinted in Moore [1964], pp 63-91 RABIN, M 0., AND S WINOGRAD [1971] "Fast evaluation of polynomials by rational preparation," IBM Technical Report RC 3645, Yorktown Heights, N.Y RABINER, L R., AND C M RADER (eds.) [1972] Press, New York Digital Signal Processing, IEEE RABINER, L R., R w SCHAFER, AND c M RADER [1969] "The chirp z-transform and its applications," Bell System Technical J 48:3, 1249-1292 Reprinted in Rabiner and Rader [1972], pp 322-328 RADER, C M [ 1968] "Discrete Fourier transform when the number of data points is prime," Proc IEEE 56, 1107-1108 REINGOLD, E M [ 1972] "On the optimality of some set algorithms," J A CM 19:4 649-659 ROGERS, H., JR [ 1967] Theory of Recursive Functions and Effective Computability, McGraw-Hill, New York ROUNDS, W C [ 1973] "Complexity of recognition in intermediate level languages." Conference Record, IEEE 14th Annual Symposium on Switching and Autof'la/a Tlieury, 145-158 · RUNGE, C., AND H KONIG [1924] Die Grundlehren der marhematischen Wissenschajten, v 11 Springer, Berlin SAHNI, S K [ 1972] "Some related problems from n~twork flows, game theory and integer prog_ramming," Cunference Record IEEE 13th Amwal Symposium on Sll"itclti11g and A utomara Theory, 130-138 SAVIT~H W J [1970] "Relationship between nondeterministit: and deterministic tape complexities." J Computer and System Sciences 4:2 177-192 CuuDuongThanCong.com BIBLIOGRAPHY 461 SAVITCH, W J [ 197 I] "Maze recognizing automata." Proc 4th Annual ACM Symposium on Theory of Computing, 151-156 SCHON HAGE, A [I 971] "Schnelle Berechnung von Kettenbruchentwicklungen." A eta Informatica 1, 139-144 SCHON HAGE, A., AND v STRASSEN [ 1971 ) "Schnelle Multiplikation grosser Zahlen," Computing 1, 281-292 SEIFERAS, J J., M J FISCHER, AND A R MEYER [1973) "Refinements of nondeterministic time and space hierarchies," Conference Record, IEEE 14th Annual Symposium on Switching and Automata Theory, I 30-137 SETHI, R [1973) "Complete register allocation problems," Proc 5th Annual ACM Symposium on Theory of Computing, 182-195 SHEPHERDSON, J c., AND H E STURGIS [1963] "Computability of recursive functions," J ACM 10:2, 217-255 SIEVEKING, M [1972] "An algorithm for division of power series," Computing 10, 153-156 -SINGLETON, R C [1969] "Algorithm 347: An algorithm for sorting with minimal storage." Comm ACM 12:3, 185-187 ~ SLOANE, N J A [1973] A Handbook of Integer Sequences, Academic Press, N.Y SPIRA, P M [ 1973] "A new algorithm for finding all shortest paths in a graph of positive arcs in average time O(n log n)," SIAM J Computing 2: l, 28-32 SPIRA, P M., AND A PAN [1973] "On finding and updating shortest paths and spanning trees," Conference Record, IEEE 14th Annual Symposium on Switching and Automata Theory, 82-84 STEARNS, R E., AND D J ROSENKRANTZ [1969] "Table machine simulation," Conference Record, IEEE 10th Annual Symposium on Switching and Automata Theory, I 18-128 STOCKMEYER, L [1973] "Planar 3-colorability is polynomial complete," SIGACT News 5:3, 19-25 STOCKMEYER, L., AND A R MEYER [1973] "Word problems requiring exponential time," Proc 5th Annual ACM Symposium on Theory of Computing, 1-9 STONE, H S [I 972] Introduction to Computer Organization and Data Structures, McGraw-Hill, New York STRASSEN, V [1969] "Gaussian elimination is not optimal," Numerische Mathematik 13, 354-356 STRASS£N, V [1974) "Schwer berechenbare Polynome mit rationalen Koeffizienten," SIAM J Computing TARJAN, R E [19i2] "Depth first search and linear graph algorithms," SIAM J Computing 1:2, 146-160 TARJAN, R E [1973a] "Finding dominators in directed graphs," Proc 7th An~ual Princeton Conference on Information Sciences and Systems, 414-418 TARJAN, R E [1973b] "Testing flow graph reducibility," Proc 5th Annual J!fCM Symposium on Theory of Computing, 96-107 ,~ CuuDuongThanCong.com 462 BIBLIOGRAPHY TARJAN, R E [1974] "On the efficiency of a good but not linear set merging algorithm," J ACM, to appear THOMPSON, K [1968] "Regular expression search algorithm," Comm ACM 11:6, 419-422 TRAUB, J F (ed.) [ 1973] Complexity of S,equelltial and Parallel Numerical Algorithms, Academic Press, New York TURING, A M [ 19 6] "On computable numbers, with an application to the Entsc/1eidu11gsproblem," Proc Lo11do11 Mathematical Soc Ser 2, 42, 230-265 Corrections, ibid., 43 O 93 7), 544-546 ULLMAN, J D [1973] "Polynomial complete scheduling problems," Proc 4th Symposium 011 Operating System Principles, 96-10 I ULLMAN, J D [1974] "Fast algorithms for the elimination of common subexpressions," Acta Informatica, 2:3, 191-213 VALIANT, L G [1974] "General context-free recognition in less than cubic time." Dept of Computer Science, Carnegie-Mellon University, Pittsburg, Pa VARI, T M "Some complexity results for a class of"foeplitz matrices," unpublished memorandum, York Univ., Toronto, Ontario, Canada WAGNER, R A [1974] "A shortest path algorithm for edge-sparse graphs." Dept of Systems and Information Science, Vanderbilt University, Nashville, Tennessee WAGNER, R A., AND M J FISCHER [ 197 4] "The string-to-string correction problem," J ACM 21:1, 168-173 WARSHALL, S [1962] "A theorem on Boolean matrices," J ACM 9:1, 11-12 WEINER, P [1973] "Linear pattern matching algorithms," Conference Record, IEEE 14th Annual Symposium on Switching and Automata Theory, 1-11 WILLIAMS, J W J [1964] "Algorithm 232: Heapsort," Comm ACM 7:6, 347-348 WINOGRAD, S [1965] "On the time required to perform addition," J ACM 12:2, 277-285 WINOGRAD, S [1967] "On the time required to perform multiplication," J ACM 14:4, 793-802 WINOGRAD, S [ l 970a] "On the number of multiplications necessary to compute certain functions," Comm Pure and Applied Math 23, 165-179 WINOGRAD, S [1970b] "On the multiplication of x matrices," IBM Research Report RC267, January 1970 WINOGRAD, S [1970c] "The algebraic complexity of functions," Proc lnternatilmal Congress of Matlzcmatida11s ( 1970), vol 3, 283-288 WINOGRAD, S [ 1973] "Some remarks on fast multiplication of polynomials." in Traub [ 1973], pp 181-196 YOUNGER, D H [ 1967] "Recognition of context-free languages in time 11 ," /11j(m1wtion and Control 10:2, 189-208 CuuDuongThanCong.com INDEX Aanderaa, S 0., 315 Acceptance, by a finite automaton, 143, 320 by a RAM, by a Turing machine, 27, 364-366 by a 2DPDA, 338 Accepting state, see Final state Accumulator, 6, 15 Activation record, see Stack frame Active multiplication, 436, 442 Actual parameter, see Parameter Address, 6, 15 Adel'_son-Vel'skii, G M., 166, 169 Adjacency list, 51-52, 177 Adjacency matrix, 50-51 Adjacent vertex, 50 Admissible triple, 266, 274 Aho, A V., 169, 197, 210, 223, 316, 361, 376 Alphabet, 8, 318 Ancestor, 53 And-or multiplication, 315, 358 Antisymmetric, 76 Arc, see Edge Argument, see Parameter Arithmetic complexity, 6, 20-22, 429-450; see also OA Arlazarov, V L., 250 Array, 45, 47, 49, 52, 87-88, 104, 114, 124-125,239 Articulation point, 179-187 Assignment statement, 34-35 Associative operation, 196 Asymptotic time/space complexity, see Time complexity, Space complexity Aux:iliary tree, 351-357 Available space, see Free list AVL tree, 146, 152, 166-167, 169 Back.edge, 177, 179, 188 Balance (of a vertex/tree), 167 Balanced tree, 118, 13", 145-146; see also 2-3 tre~ AVL tree, Bounced balance tree Balancing, 65-67, 109 Bart~e, T., 250 Base conversion, 314 Basis theorem, 434 Bellman, R E., 74 Below (relation on surface configurations), 341 Berge, C., 74, 223 CuuDuongThanCong.com Biconnected component, 180 Biconnectivity, 179-187, 222-223 Bilinear form, 446 Binary search, 113-114, 147, 163-164, 377 Binary search tree, 115-123, 145, 163, 166167, 169 Binary tree, 53-57, 86-87, l 14;seealso Binary search tree Birkhoff, G., 250 Bit operation, see OB Bit vector, 23-24, 49, 51, 243-247 Blank, 27 Blattner, W 0., 403 Block, 34, 36 Bluestein, L I., 316 Blum, M., 41, 105 Book, R V., 403, 425 Boolean function/expression, 22, 40, 375, 379,448 Boolean matrix, 206, 242-247, 449 Borodin, A B., 41, 315-316, 450 Bottom marker, 336-337 Bounded balance tree, 167, 169 Branching, 6, 20, 24;see also goto statement Brown, W S., 316 Bruno, J L., 403 Bubblesort, 77, 102 Bucket, 77 Bucket sort, 77-78; see also Radix sort Bunch, J., 250 Burkhard, W A., 74 Call, see Procedure Call-by-name, 37-38 Call-by-reference, 38 Call-by-value, 37 Capacity (of a graph), 44 Cardinality (of a set), 50 Casting out nines, 266, 2'/4 Catalan numbers, 73 Charactenstic vector, 49 Chester, D., 361 Chinese remaindering, '29~300, 31 Q-311 Chomsky normal form, 74 Chromatic number, see Colorability Circulant, 275 Clique,375-378,384-387 Closed (under an operation), 196 Closed semiring, 195-206, 220, 226-227 lti4 INUl::A :Josure (of a closed semiring element), 197, 202-206 :NF, see Chomsky normal form :oarsest partition, 15 :ocke, J., 74 :oefficicnt, 254, 442-443 :ollins, G E., 316 :olorability (of a graph), 378, 392-394, 401 :olumn rank, 433, 436 :ombinational logic circuit, see Logic circuit :omment statement, 34, 38 :ommutativc operation, 196 :ommutative ring, 227, 247, 252, 429 :ompact position/auxiliary tree, 357, 360 :omparison, 24-25, 60-61, 66, 86-87, 9293, 100-101, 104-105, 114, 119-120, 168 :omplement graph, 387 · :omplementation (of regular sets), 358, 395400, 410-419 :omplete binary tree, 54 :omplete problem, for ¥&'-TIME, see NPcomplete problem for &'-SPACE, 395, 399-400, 403 :omplete subgraph, 375;see also Clique :omplex numbers, 252 :omposite edge, 213 :omputational complexity, see Space complexity, Time complexity :omputer word, 4, 6, 14, 24 :oncatenable queue, 147, 155-157 :ONCATENATE, 147, 155, 163 :oncatenation, of languages, 318-319 of lists, 47, 145 of sets, 196 of strings, 318, 349 :::onfiguration, see Instantaneous description, Surface configuration :::onjunctive normal form, 383-384 :::onnectedgraph, 55, 172, 176-177 :::onnectedness (of graphs), 222-223 :::onstable, R L., 425 ::on text-free grammar/language, 74, 360-361 :::ontext-sensitive grammar/language, 403 :::onvolution, 254-257, 263, 268-269 :::ook, S A., 41, 315, 361, 403-404, 425, 450 :::ooley, J.M., 276 :::ost (of a path), 195 :::ost function, 109 :::rane, C A., 169 :::ross edge, 181-182, 188 :::utset, 401 :::ycle (of a graph}, 50, 180 :::YCJ.E, 411 :::yclic difference, 275 CuuDuongThanCong.com Danielson, G C., 276 Dantzig, G B., 403 Data base, 111, 124, 163, 168 Data structure, 44-55, 108; see also Array, Graph, List, Queue, Stack, Tree Data type, 33-34 Davis, M., Decision tree, 24-25, 86-87, 92-93, 100-101, 223 Degree, of a polynomial, 279, 442 of a vertex, 50 DELETE, 108-113, 115-118, 124, 135, 145-147, 151, 154, 163, 165, 167 Dense polynomial, 311, 314 Dependence, see Linear independence Depth (of a vertex), 53, 141-143 Depth-first numbering, 179 Depth-first search, 176-195, 223 Depth-first spanning tree/forest, 177, 189 DEQUEUE, 48 Derivative, 299, 314, 316 Descendant, 53 55 Determinant, fi8-229, 241, 248, 250, 448 Deterministic finite automaton, 143-145, 162, 319,323-327,330-336,348,361 Deterministic Turing machine, see Turing machine DFA, see Deterministic finite automaton Diagonalization, 406-408 Dictionary, I 08, 111, 146-153 Difference equation, see Recurrence equation Dijkstra, E.W., 223 Dijkstra's algorithm, 207-209 Dinic, E A., 250 Directed acyclic graph, 52, 70, 209-219, 447, 450 Directed graph, 50-52, 187-195, 191!-201, 207-223,378 Directed Hamilton circuit, 378, 389-392 Discrete Fourier transform, 252-276, 300, 311, 448 Disjoint-set union, 49; see also UNION Distributive operation, 196 Divetti, L., 403 Divide-and-conquer, 60-66, 72, 97, 1.20, 249, 257,291, 295,369 Division, of intege~:;, 280, 286, 289 of polynomials, 259-260, 286, 288-289~ 315-316 Dominator, 210-217, 223 Doubly linked list, 47, 52 DTM, see Tudng m.achine Dual (of a computation), 446 Dynamic programming, 67-69, 120 INDEX Edge, 50 Ehrenfeucht, A., 361 Elementary function, 419, 422 Elgot, C C., 41 Emptiness (of regular sets), 419-4 25 Empty set, 319 Empty string, 143, 318-319 Endmarker, 336-337 ENQUEUE,48 Enumeration, 407 €-transition, 324, 327 Equivalence class/relation, 180, 189, 432 Equivalencing, 141-143 Equivalent regular expressions, 319, 403, 419 Equivalent states/automata, 143-145, 162 Euclidean algorithm, 294, 300-301 Euler circuit, 219 Evaluation of a polynomial, 21, 254, 294, 316,428-429,438,442-444,449-450 Eve; J., 450 Even, S., 223, 404 Even permutation, 228, 241 Exact cover, 379, 393-394 Expected complexity, 12 Expected depth, 92 Expected time complexity, 12, 92-95, 100102, 112, 118, 163, 243 Exponential function, 26 Extended Euclidean algorithm, 301-303, 310 Extended regular expression, 410, 415, 419-423 Extension field, 429 External name, 125-127 External path length, 168 External sort, 77 Failure function, 330-334 Faradzev, I A., 250 Father, 53 Feedback edge set, 378, 388-389 Feedback vertex set, 378, 387-389 FFT, see Discrete Fourier transform Fiduccia, C M., 276, 450 Field 227, 428-429; see also Finite field Final state, i, 143-144, 319 FIND, 108, 124-14S, 163, 16S Finite automaton, see Deterministic finite automaton, Nondct.termmiiltic fii:iite automaton Finite control, 26, 143;"3 l Finite field, 26S Fischer, M.J., 74, 169, 223, 2SO, 275, 361, 404,425 Flow problem, 401 Floyd, R W., 1OS, 223, 450 CuuDuongThanCong.com 465 for statement, 34-35, 39 Ford, L R., I 05 Forest, 5:!, 129, 134, 141-142 Formal parameter, see Parameter Forward edge, 188 Four Russians' algorithm, 243-247 Fourier transform, sec Discrete Fourier transform Frazer, W D., I 05 Free list, 46 Function, 7-8, 30, 37 Furman, M E., 223 Gale, D., 105.Galler, B A., 169 Garey, M R., 223, 403-404 Garsia, A., 450 GCD, see Greatest common divisor Gentleman, W M., 276, 316 Gilbert, E N., 169 Global variable, 37, 39 Godbole, S.S., 74 Good, I J., 276 goto statement, 34, 36 Graham, R L., 105 Graph, 50-52, 5; see also Directed graph, Tree, Undirected graph Grasselli, A., 403 Gray, J N., 361 Greatest common divisor, of integers, 300303, 308-311, 316 of polynomials, 303-308, 316 Hadian, A., 105 Hall, A D., 316 Hamilton circuit, 378, 392 Harary, F., 74, 223 Harper, L H., 450 Harrison, M A., 361 Hartmanis, J., 41, 169, 425 Hashing, 111-113, 145, 163, 169 Hasing function, 112-113 Head (of an edge), 50 Heap,87-90, 104, 110, 152, 174;seeaLso Mergeable heap Heapsort, 87-92, 105 Hecht, M S., 210 Height (of a vertex/tree), 53, l 30·· 131, 146, 167 Heindel, L E., 316 Hennie, F C., 42S Hierarchy, see Time hierarchy, Space hicr.uc!ly Hirschberg, D S., 361 · Hoare, C A R., I OS titi INUl:A :ohn, F E., 250 :omomorphism, I 4-41 S !opcroft, J.E., 9, 41, 169, 197, 222-223, 250,361,403,425,431,450 [orner's rule, 21, 438-439 lorowitz, E., 316 lorvath, E C., 1OS lu, T C., 169, 223 lunt, H B., III, 403-404, 425 barra, H., 361, 403, 425 D, see Instan taneoius description dentity (under an operation), 196 dentity matrix, 202, 227 r statement, 34-35 mmediate dominator, 210 mmediate predecessor (of a surface configuration), 341 ndeterminate, 429 ndexing,.6 ndirectaddressing, 6-7, IS-17,20, 39 nitial state, 27, 143, 319, 337 nitialization, SO, 71 norder traversal, S4-S 7, 11 S nput/output, 6, 38 nput symbol, 27, 143, 336-337 :nputtape, S, 7-8, 27, 143, 336-337 :nput variable, 20-21 :NSERT, 108-113, l lS-118, 124, 13S, 14S1Sl, 163, 16S, 167 Insertion sort, 1OS Instantaneous description, 29, 320, 337, 340, 364-36S,379,396,41S Instruction, of a RAM, 6-8 of a RASP, IS Integers, operations on, see Division, Greatest common divisor, Modular arithmetic, Multiplication, Reciprocal, Square Internal name, I 2S-l 27 Internal path length, 168 Internal sort, 77 Interpolation of polynomials, 2S4, 299-300, 316 Intersection, 49-SO, 410 Intractable problem, 364, 406-42S Inverse, of the discrete Fourier transform, 2S4 of a matrix, 228-229, 232-233, 241-242, 248, 2S0,2S3 of a ring element, 226, 428 Isomorphism, of graphs, 400, 401 oi trees, 84-86 Johnson, I> B., 222-223 Johnson, D S., 403-404 · Johnson, S C., 31 S-316 CuuDuongThanCong.com Johnson S M., I OS Jones, N D., 403 Karatsuba A., 74 Karp, R M., lOS, 316, 361, 403-404 Kasami, T., 74 Kedem, Z., 4SO Kerr, L R., 222, 2SO, 431, 4SO Kislitsyn, S S., I OS Kleene, S C., 223 Kleene closure, 318-319 Knapsack problem, 401 Knuth, D E., 74, lOS, 169, 316, 361, 4SO Konig, H., 276 Kronrod, M A., 2SO Kruskal, J B., Jr., 222 Kruskal's algorithm, 17 Kuck, D J • 74 Kung, H T., 31S-316 Label, of a path, 197 of a statement, 6, 34, 36 Labeled tree, 8~ Lagrangian interpolation formula, 294 Lanczos, C., 276 Landis, Y M., 166, 169 Language, 7-9, 27, 74, 143, 318, 33S-336, 338,366,374 LCM, see Least common multiple Leaf, S3 Least common multiple, 31 S Left-dual, 446 Left son, S3 Left subtree, S3 Length, of a path, SO of a regular expression, 322 of a string, 318 Length-preserving homomorphism, 414-41 S Level (of a vertex), S3, 84 Lewis, P A., 276 Lewis, P M., II, 41, 169, 42S Lexicographic order, 78 Lexicographic sort, 78-84 Linear bounded automaton, 403 Linear equation, see Simultaneous linear equations Linear independence, 432-433, 43S, 443 · Linear order, 76 Linked list, see Ust Lipson, J., 316 List, 44-47, l 2S-l 27;see auo Adjacency list, Queue, Stack Literal, S Liu, C L., 74, lOS INDEX Local variable, 38-39, 58 Location counter, 7-8, 15-16 Logarithmic cost criterion, 12-14, 16-18, 31-33,373,424 Lo~cc~cuit,22-23,40,448 LOW, 184-186 Lower triangular matrix, see Triangular matrix LOWLINK, 190-19 LU decomposition, 233, 235, 249 LUP decomposition, 234-242, 250 MacLane, S., 250 Main diagonal, 229 Marriage problem, see Stable marriage problem Matrix, operations on, see Determinant, Inverse of a matrix, Multiplication of matrices, Transpose Maximum, finding the, 60-61, 73 Mcilroy, M D., 169 McKellar, A C., 105 McNaughton, R., 223 Median, see Order statistics MEMBER, 108-122, 124, 145-147, 151, 163, 165 Memory (of a RAM or RASP), 6, 15 Memory map, 7, 15 Mergeable heap, 147, 152-155 Mergesort, 66-67, 73, 87, 312 Meyer, A R., 223, 250, 275, 403-404, 425 Miller, R E., 361 MIN, 108, 115-118, 139-141, 145-147, 152, 154, 163, 165, 167 Minimization (of finite automata), 162 Minimum, finding the, 60-61, 73 Minimum-cost spanning tree, see Spanning tree Minsky, M., 41 Modular arithmetic, 26~-268, 271, 289-300, 316 Moenck, R., 315-316 Monie polynomial, 303 Monoid, 196 Moore, E F., 169 Morgenstern, J., 275, 450 Morris, J H., 361 Morris, R., 169 Motzkin, T S., 450 " description Move, see Instantaneous Multigraph, 219 Multihead 2DPDA, 359 Multiplication, of complex numbers, 430431, 440-441 of integers, 62-64, 268-274, 279-280, 283, 286,291,310-311,315,431-432,445 of matrices, 20, 67-69, 201-206, 223, 228- CuuDuongThanCong.com 467 250,431,438-439,444-446,449 of polynomials, 254-255, 269, 279, 286, 288,293,308, 311~314 Multiplicative operation, 441-442 Multitape Turing machine, see Turing machine Multivariate polynomial, 278, 314 Munro, I., 223, 316 Muraoka, Y., 74 Muszinski, J., 450 NDFA, see Nondeterministic finite automaton NDTM, see Nondeterministic Turing machine Neciporuk, B: I., 450 Negative cost cycle, 220-22.1, 223 Negative wrapped convolution, 25 6-257, 263 Next-move funt:tion, 27, 143, 319, 337, 365 Nievergelt, J., 169 Node, see Vertex Nondeterministic finite automaton, 197, 319329, 36 l, 399 Nondeterministic pushdown automaton, 360361 Nondeterministic RAM/RASP, 313 Nondeterministic Turing machine, 364-373, 395,424 Nonsingular matrix, 229, 232-233, 235, 242, 249 Nonterminal, 74 NP-complete problem, 373-394, 400-403 %.9'-TIME, 372-395, 403 (order of magnitude), A (order of magnitude under the straightline code model), 22, 279 OB (order of magnitude under the bitwise computation model), 22, 279 Dav (order of magnitude under the bit vector model), 24, 247 Oc (order of magnitude under the decision tree model), 25 OTM (order of magnitude under the Turing machine model), 31 Odd permutation, 228, 241 Off-line algorithm, 109, 139-141, 165, 169, 216,442 Ofman, Y., 74 · 1DPDA, see One-way pushdown automaton 1NPDA, see One-way pushdown automaton One-way pushdown automaton 360 ·;.,: On-line algorithm, 109 -I 69, 442 '· • ;""! (""; •• ~-: ! ! Operand, 6-7 · ·· ' Operation code, 6, 8, 15 Optimization problem, 377 Order statistics, 76, 97-105 ' { Ordered tree, 53 Ostrowski, A M., 450 Out-degree, SO;see also Degree Output tape, S-8, 30 Output variable, 20-21 Package placement problem, 401 Palindrome, 28, 339-340, 358 Pan, A., 222 Pan, V Y., 450 Parameter, 36-38, 58 Partial FIND, 136-139 Partial order, 76 Partial recursive function, Partition problem, 366, 401 Partitioning, 157-162, 168 Paterson, M S., 169, 275, 361 Path, SO Path compression, 131-133, 142, 165 Pattern, 326 Pattern matching, 318-361 Permutation, 72, 77, 103-104 Permutation matrix, 229, 235, 239, 241 PF, see Partial FIND Pidgin ALGOL, 33-39 Planar graph, 401 Pohl, I., 74 Polynomial, operations on, see Derivative, Division, Evaluation, Greatest common divisor, Interpolation, Modular arithmetic, Multiplication, Reciprocal, Square Polynomial complete, see NP-complete Polynomial reducibility, 373-374 Polynomial transformation, 373-374 Polynomially related, 25 POP, 47, 337 Position (in a string), 346 Position tree, 34 7-357, 360-361 Positive closure, 318-319 Positive definite matrix, 249 Positive wrapped convolution, 256-257, 263 Postorder traversal, 54-SS Power series, 278-279 Power set, 197 Pratt, T W., 74 Pratt, V R., 105, 361, 450 Preconditioning, 295, 442-445, 449-450 Predecessor (of a surface configuration), 341-346 Prefix, 318, 326-327 Preorder traversal, 54-55, 84, 179, 189, 213 Prim, R C., 222 Principal root of unity, 252 Principal submatrix, 229 CuuDuongThanCong.com Priority queue, 147-152, 174 Probability distribution, 92, 95 Problem, 374 Procedure, 34, 36-38, 58-60 Production, 74 Proper ancestor/descendant, 53 @I-SPACE, 395-400, 411 #-SPACE, complete, see Complete problem for &'-SP ACE @'-TIME, 372-374, 395, 411 PUSH, 47, 337 Pushdown store, see Stack Queue, 48 Quicksort, 92-97, 103, 105 Rabin, M 0., 41, 169, 222, 361, 425, 450 Rabiner, L R., 276, 316 Rader, C M., 276, 316 Radix conversion, see Base conversion Radix sort, 77-86 RAM, see Random access machine Random access machine, 5-24, 26, 31-33, 39-40, 336, 361, 373, 424 Random access stored program machine, 15-19,33,39-40,58,373 Rank, of a matrix, 229 of a vertex, 134-135 Rao, M R., 403 RASP, see Random access stored program machine read statement, 34, 38 Real numbers, 196, 227 Reckhow, R A., 41, 425 Reciprocal, of integers, 280-286 of polynomials, 286-288 Recurrence equation, 60, 64-65, 72-73 Recursion, 55-60, 67 Recursive language, Recursively enumerable language, Reducibility (of a flow graph), 223 Reflexive relation, 76, 180 Reflexive and transitive closure, see Transitive closure Register, 6-7, 15 Regular expression/set, 223, 318-329, 358, 395, 401, 403;seeatro Finite automaton Rehashing, 113 Reingold, E M., 169 Remainder, 257, 259-260;.see atro Euclidean algorithm Remainder sequence, 300 repeat statement, 34-35 Re~du~289,291,293 INDEX Return address, 58-59 return statement, 34, 37, 59 rev, 259 Reversal (of a string), 339 Right son, 53 Right subtree, 53 Ring, 226-227, 230, 243, 247, 253 Rivest, R L., 105 Robinson, A., 41 Rogers, H., Jr., Root, of a strongly connected component, 189-192 of a tree, 52-53, 210 of unity, 252 Rooted tree, see Tree Rooted undirected tree, 55 Rosenberg, A L., 361 Rosenkrantz, D J., 169, 403, 425 Rounds, W C., 403, 425 Row rank, 433 Runge, C., 276 Sahni, S K., 403, 425 Sande, G., 276 Satisfiable Boolean expression, 376-386 Savage, J.E., 450 Savitch, W J., 403 Scatter storage, see Hashing Schafer, R W., 316 Scheduling problem, 402 Schonhage,A.,250,276,316 Schonhage-Strassen algorithm, 272-274 Scope (of a variable), 34, 38-39 Scott, D., 361 Seiferas, J J., 425 Semiextended regular expression, 410-419 Semiring, see Clost'd semiring Set, 49-50, 108-111, 378 Set cover, 378, 392 Sethi, R., 403 Shepherdson, J.C., 41 Shifting network, 447 Shortest path, 195, 200-201, 220, 222-223, 250,403 Sieveking, M., 315 Simple path, 50 Simulation, 40 Simultaneous linear equations, 233, 242, 250 Single-source shortest path problem, 207-209, 220-223 Single-tape Turing machine, 371-372 400, 407,423-424 Sinil'eton, R c • 1o·s Size (of a problem), 2-4 CuuDuongThanCong.com 469 SIZE, 279 Skeletal DFA, 330 Sloane, N J A., 74 · Sobel, M., 105 Son, 53, 178 Sorting, 24-25, 65-67, 76-97, 102-105, 163, 168, 174-175,311-312 Source, 207 Space complexity, 2, 12, 19, 30-31, 33, 40, 367,370,372,407-410,417-419,422 Space hierarchy, 406-410, 424-425 Space-constructible function, 369, 400, 408409, 423 Spanning tree/forest, 109-111, 154-155, 172176, 2l7-218, 223 Sparse polynomial, 278, 311-313; 316 Spira, P M., 222-223 SPLIT, 108, 145, 147, 155-157, 163 Square, of integers, 280, 284-286 of polynomials, 286, 288, 312-313 Square root, 314 Stable marriage problem, 71 Stable sort, 105 Stack, 47, 58-59, 185-186, 191-193, 336337, 370 Stack frame, 58-59, 370 Standard encoding, 375-376, 378 Start state, see Initial state State, 26, 143, 319, 337 State transition function, see Next-move function Stearns, R E., 41, 169, 425 Steiglitz, K., 316 Stirling's approximation, 87 Stockrneyer, L., 403-404, 425 Stone, H S., 74 Straight-line program, 19-22, 429-430 Strassen, V., 250, 276, 450 Strassen's algorithm, 230-232 String, 79-84, 318 · String with don't cares, 358 Strong connectivity, 189-195 Strongly connected component, 189 Sturgis, H E., 41 Subgraph isomorphism problem, 400 Submatrix, 229 Subsequence, 361 Substring, 318, 329-335, 338-339, 346, 348-349 Substring identifier, 347-357 Subtree, 53 Suffix, 318 Surface configuration, 340-346 Symbol table, 111, 141, 165 470 INDEX Symbolic address, 20 Symmetric relation, 180 Tail (of an edge), 50 Tape,5, 26-27, 143,336-337 far1an, R E., 105, 169, 22.2-LH Tautology, 400 Terminal, 74 Terminator, 340 Text editing, 326 Text string, 326 Thompson, K., 361 3-satisfiability, 384, 392-393 Time complexity, 2-4, 12-14, 16-19, 22, 3033, 35-36, 38, 59-60, 367, 372, 423-425 Time hierarchy, 406, 423-425 Time-constructible function, 367, 423-424 Toeplitz matrix, 249, 275, 444-445 Topological sort, 70 Total order, see Linear order Towers of Hanoi, 71 Transition diagram, 320-321 Transitive closure, 100, 195, 199-200, 219220, 223,324 Transitive reduction, 219-220 Transitive relation, 6, 180 Transpose (of a matrix), 229, 447 Traveling salesman problem, 401, 403 Traversal (of a tree), 54-55 Tree, 52-55, 84-86, 129-139, 141-143, 165,448 Tree edge, 177, 188 Triangular matrix, 229, 232-233, 249 Tritter, A., 169 Tucker, A C., 169 Tukey, J W., 276 Turing, A M., 41 Turing machine, 25-33, 39, 368, 370, 395, 403, 407-410, 415, 423-425;see also Nondeterministic Turing machine 2DPDA, see Two-way deterministic pushdown automaton 2NPDA, see Nondeterministic pushdown automaton 2-3 tree, 146-157, 163, 174 Two-way deterministic pushdown automaton, 335-346,360-361 CuuDuongThanCong.com U (Boolean expression), 380, 383 Ullman, J D., 9, 41r 169, 197, 210, 223, 316,361,376,403-404 Undirected graph, 50-52, 172-187, 218-223, 378 Un(HrectP

Ngày đăng: 30/08/2020, 16:47

Tài liệu cùng người dùng

Tài liệu liên quan