Computer
Computer
Theoretical computer science treats any computational subject for which a good model can be
created. Research on formal models of computation was initiated in the 1930s and 1940s by
Turing, Post, Kleene, Church, and others. In the 1950s and 1960s programming languages,
language translators, and operating systems were under development and therefore became
both the subject and basis for a great deal of theoretical work. The power of computers of
this period was limited by slow processors and small amounts of memory, and thus theories
(models, algorithms, and analysis) were developed to explore the efficient use of computers as
well as the inherent complexity of problems. The former subject is known today as algorithms
and data structures, the latter computational complexity.
The focus of theoretical computer scientists in the 1960s on languages is reflected in the
first textbook on the subject, Formal Languages and Their Relation to Automata by John
Hopcroft and Jeffrey Ullman. This influential book led to the creation of many language-
centered theoretical computer science courses; many introductory theory courses today con-
tinue to reflect the content of this book and the interests of theoreticians of the 1960s and early
1970s.
Although the 1970s and 1980s saw the development of models and methods of analysis
directed at understanding the limits on the performance of computers, this attractive new
material has not been made available at the introductory level. This book is designed to remedy
this situation.
This book is distinguished from others on theoretical computer science by its primary focus
on real problems, its emphasis on concrete models of machines and programming styles, and
the number and variety of models and styles it covers. These include the logic circuit, the finite-
state machine, the pushdown automaton, the random-access machine, memory hierarchies,
the PRAM (parallel random-access machine), the VLSI (very large-scale integrated) chip, and
a variety of parallel machines.
1
2 Preface
The book covers the traditional topics of formal languages and automata and complexity
classes but also gives an introduction to the more modern topics of space-time tradeoffs, mem-
ory hierarchies, parallel computation, the VLSI model, and circuit complexity. These modern
topics are integrated throughout the text, as illustrated by the early introduction of P-complete
and NP-complete problems. The book provides the first textbook treatment of space-time
tradeoffs and memory hierarchies as well as a comprehensive introduction to traditional com-
putational complexity. Its treatment of circuit complexity is modern and substantative, and
parallelism is integrated throughout.
terministic and nondeterministic space complexity classes and shows that the nondeterministic
space classes are closed under complements.
Circuit complexity is the topic of Chapter 9. Methods for deriving lower bounds on circuit
size and depth are given for general circuits, formulas, monotone circuits, and bounded-depth
circuits. This modern treatment of circuit complexity complements Chapter 2, which derives
tight upper bounds on circuit size and depth.
Space–time tradeoffs are studied in Chapter 10 using two computational models, the
branching program and the pebble game, which capture the notions of space and time for
many programs for which branching is and is not allowed, respectively. Methods for deriving
lower bounds on the exchange of space for time are presented and applied to a representative
set of problems.
Chapter 11 examines models for memory hierarchy systems. It uses the pebble game with
pebbles of multiple colors to designate storage locations at different levels of a hierarchy, and
also employs block and RAM-based models. Again, lower bounds on performance are derived
and compared with the performance of algorithms. This chapter also has a brief treatment of
the LRU and FIFO memory-management algorithms that uses competitive analysis to com-
pare their performance to that of the optimal algorithm.
The book closes with Chapter 12 on the VLSI model for integrated circuits. In this model
both chip area A and time T are important, and methods are given for deriving lower bounds
on measures such as AT 2 . Chip layouts and VLSI algorithms are also exhibited whose perfor-
mance comes close to matching the lower bounds.
An advanced course on circuit complexity can be assembled from Chapter 2 on logic cir-
cuits and Chapter 9 on circuit complexity. The former describes efficient circuits for a variety
of functions while the latter surveys methods for deriving lower bounds to circuit complexity.
The titles of sections containing advanced material carry an asterisk.
Acknowledgments
The raw material for this book is the fruit of the labors of many hundreds of people who have
sought to understand computation. It is a great privilege to have the opportunity to convey
this exciting body of material to a new audience.
Because the writing of a book involves years of solitary work, it is far too easy for authors
to lose sight of their audience. For this reason I am indebted to a number of individuals who
have read my book critically. José G. Castaños, currently a Brown Ph.D. candidate and my
advisee, has been of immense help to me in this regard. He has read many drafts of the book
and has given me the benefit of his keen sense of what is acceptable to my readers. José has
also served as a teaching assistant for the undergraduate theory course for which this book
was used and contributed importantly to the course and the book in this capacity. Dimitrios
Michailidis, also a Brown Ph.D. candidate, has also been a great help; he has read several
drafts of the book and has spotted many errors and lacunae. Bill Smart, a third Brown Ph.D.
candidate, also carefully read the first nine chapters. I have also benefited greatly from the eval-
uations done for my publisher by Richard Chang, University of Maryland, Baltimore County;
Michael A. Keenan, Columbus State University; Philip Lewis, State University of New York,
Stony Brook; George Lukas, University of Massachusetts at Boston; Stephen R. Mahaney, Rut-
gers University; Friedhelm Meyer auf der Heide, University of Paderborn, Germany; Boleslaw
Mikolajczak, University of Massachusetts, Dartmouth; Ramamohan Paturi, University of Cal-
ifornia, San Diego; Professor Gabriel Robins, and Jeffery Westbrook, AT&T Labs–Research.
Others, including Ray Greenlaw of the University of New Hampshire, read an early version of
the manuscript for other publishers and offered valuable advice. Gary Rommel of the Eastern
Connecticut State College and the Hartford Graduate Center provided feedback on classroom
use of the book. Finally, I am indebted to students in my undergraduate and graduate courses
at Brown whose feedback has been invaluable.
I very much appreciate advice on the content and organization of the book provided by
many individuals including my faculty colleagues the late Paris Kanellakis, Philip Klein, and
Franco Preparata as well as Akira Maruoka, a visitor to Brown. Together Franco and I also
produced the brief analysis of circuit depth given in Section 2.12.2. Alan Selman offered
valuable comments on Chapter 8. Akira Maruoka and Johan Håstad read and commented on
the sections of Chapter 9 containing their work. Alan Selman and Ken Regan provided help
in identifying references and Allan Borodin commented on many of the chapter notes. I wish
to thank Jun Tarui for suggesting that I consider rewriting my 1976 book, The Complexity of
Computing, which led to my writing this book. I also extend my sincere thanks to Andy Yao for
his generous comments on the book for the publisher. Many others contributed to this book
in one way or another, including Chuck Fiduccia, Paul Fischer, Bill McColl, Tony Medeiros,
Mike Paterson, Eric Rudder, Elizabeth and Kevin Savage, Mark Snir, and many students in my
courses.
I express my gratitude to Carter Shanklin, Executive Editor for Corporate & Professional
Publishing at Addison Wesley Longman, for his confidence in me and this project. I also thank
Preface 5
Alwyn Velásquez for his attractive design of the book, Patricia Unubun, Production Editor on
this project, for her secure guidance of the book in its final stages, and Dimitrios Michailidis,
an expert in LATEX, for his preparation of the macros used to typeset the book and his very
close reading of the complete, formatted document, for which I am most appreciative. I offer
my sincere thanks to Katrina Avery for her high-quality copyediting, Rosemary Simpson for
her excellent index which is a great addition to this book, and Cynthia Benn for her careful
proofreading of the manuscript. The attractive cover of this book was designed by Michael
LeGrand and Scott Klemmer, two very talented juniors at Brown University.
Finally, this book would not have been written without the loving support of my wife
Patricia and our young sons, Christopher and Timothy. Their patience and understanding
for my long absences during the four and one-half years this project was in process is deeply
appreciated.