|
In recent years the subject of computer programming has been recognized as a discipline whose mastery
is fundamental and crucial to the success of many engineering projects and which is amenable to
scientific treatement and presentation. It has advanced from a craft to an academic discipline. The initial
outstanding contributions toward this development were made by E.W. Dijkstra and C.A.R. Hoare.
Dijkstra's Notes on Structured Programming [1] opened a new view of programming as a scientific
subject and intellectual challenge, and it coined the title for a "revolution" in programming. Hoare's
Axiomatic Basis of Computer Programming [2] showed in a lucid manner that programs are amenable to
an exacting analysis based on mathematical reasoning. Both these papers argue convincingly that many
programmming errors can be prevented by making programmers aware of the methods and techniques
which they hitherto applied intuitively and often unconsciously. These papers focused their attention on
the aspects of composition and analysis of programs, or more explicitly, on the structure of algorithms
represented by program texts. Yet, it is abundantly clear that a systematic and scientific approach to
program construction primarily has a bearing in the case of large, complex programs which involve
complicated sets of data. Hence, a methodology of programming is also bound to include all aspects of
data structuring. Programs, after all, are concrete formulations of abstract algorithms based on particular
representations and structures of data. An outstanding contribution to bring order into the bewildering
variety of terminology and concepts on data structures was made by Hoare through his Notes on Data
Structuring [3]. It made clear that decisions about structuring data cannot be made without knowledge of
the algorithms applied to the data and that, vice versa, the structure and choice of algorithms often
depend strongly on the structure of the underlying data. In short, the subjects of program composition
and data structures are inseparably interwined.
Yet, this book starts with a chapter on data structure for two reasons. First, one has an intuitive feeling
that data precede algorithms: you must have some objects before you can perform operations on them.
Second, and this is the more immediate reason, this book assumes that the reader is familiar with the
basic notions of computer programming. Traditionally and sensibly, however, introductory programming
courses concentrate on algorithms operating on relatively simple structures of data. Hence, an
introductory chapter on data structures seems appropriate.
|
|