
“9781284077247˙CH01” — 2015/8/20 — 10:41 — page2—#2
2 Chapter 1 Introduction to the Theory of Computation
these concerns. We will study various automata, see how they are related
to languages and grammars, and investigate what can and cannot be done
by digital computers. Although this theory has many uses, it is inherently
abstract and mathematical.
Computer science is a practical discipline. Those who work in it often
have a marked preference for useful and tangible problems over theoretical
speculation. This is certainly true of computer science students who are
concerned mainly with difficult applications from the real world. Theoreti-
cal questions interest them only if they help in finding good solutions. This
attitude is appropriate, since without applications there would be little in-
terest in computers. But given this practical orientation, one might well
ask “why study theory?”
The first answer is that theory provides concepts and principles that
help us understand the general nature of the discipline. The field of com-
puter science includes a wide range of special topics, from machine design
to programming. The use of computers in the real world involves a wealth
of specific detail that must be learned for a successful application. This
makes computer science a very diverse and broad discipline. But in spite
of this diversity, there are some common underlying principles. To study
these basic principles, we construct abstract models of computers and com-
putation. These models embody the important features that are common
to both hardware and software and that are essential to many of the special
and complex constructs we encounter while working with computers. Even
when such models are too simple to be applicable immediately to real-world
situations, the insights we gain from studying them provide the foundation
on which specific development is based. This approach is, of course, not
unique to computer science. The construction of models is one of the es-
sentials of any scientific discipline, and the usefulness of a discipline is often
dependent on the existence of simple, yet powerful, theories and laws.
A second, and perhaps not so obvious, answer is that the ideas we will
discuss have some immediate and important applications. The fields of
digital design, programming languages, and compilers are the most obvious
examples, but there are many others. The concepts we study here run
like a thread through much of computer science, from operating systems to
pattern recognition.
The third answer is one of which we hope to convince the reader. The
subject matter is intellectually stimulating and fun. It provides many chal-
lenging, puzzle-like problems that can lead to some sleepless nights. This is
problem solving in its pure essence.
In this book, we will look at models that represent features at the
core of all computers and their applications. To model the hardware of a
computer, we introduce the notion of an automaton (plural, automata).
An automaton is a construct that possesses all the indispensable features
of a digital computer. It accepts input, produces output, may have some
temporary storage, and can make decisions in transforming the input into