100% found this document useful (1 vote)
272 views53 pages

PDF Mathematics in Computing 2nd Edition O'Regan G Download

ebook

Uploaded by

norelelabed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
272 views53 pages

PDF Mathematics in Computing 2nd Edition O'Regan G Download

ebook

Uploaded by

norelelabed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Full download test bank at ebook textbookfull.

com

Mathematics in computing 2nd

CLICK LINK TO DOWLOAD

https://textbookfull.com/product/mathematics-
in-computing-2nd-edition-oregan-g/

textbookfull
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Complex Variables A Physical Approach with Applications


Textbooks in Mathematics 2nd Edition Steven G. Krantz

https://textbookfull.com/product/complex-variables-a-physical-
approach-with-applications-textbooks-in-mathematics-2nd-edition-
steven-g-krantz/

Mathematics of Finance An Intuitive Introduction


Undergraduate Texts in Mathematics Saari Donald G

https://textbookfull.com/product/mathematics-of-finance-an-
intuitive-introduction-undergraduate-texts-in-mathematics-saari-
donald-g/

Bird s basic engineering mathematics 8th Edition John O


Bird

https://textbookfull.com/product/bird-s-basic-engineering-
mathematics-8th-edition-john-o-bird/

Mathematics and Computing Debdas Ghosh

https://textbookfull.com/product/mathematics-and-computing-
debdas-ghosh/
Understand Mathematics Understand Computing Discrete
Mathematics That All Computing Students Should Know
Arnold L. Rosenberg

https://textbookfull.com/product/understand-mathematics-
understand-computing-discrete-mathematics-that-all-computing-
students-should-know-arnold-l-rosenberg/

Mathematics in Material Science First Edition G. Udhaya


Sankar & C. Ganesa Moorthy

https://textbookfull.com/product/mathematics-in-material-science-
first-edition-g-udhaya-sankar-c-ganesa-moorthy/

Theory and Computation in Hydrodynamic Stability 2nd


Edition W. O. Criminale

https://textbookfull.com/product/theory-and-computation-in-
hydrodynamic-stability-2nd-edition-w-o-criminale/

A First Course in Systems Biology 2nd Edition Eberhard


O. Voit

https://textbookfull.com/product/a-first-course-in-systems-
biology-2nd-edition-eberhard-o-voit/

Using & Understanding Mathematics: A Quantitative


Reasoning Approach (7th Edition) Jeffrey O. Bennett

https://textbookfull.com/product/using-understanding-mathematics-
a-quantitative-reasoning-approach-7th-edition-jeffrey-o-bennett/
Undergraduate Topics in Computer Science

Gerard O’Regan

Mathematics
in Computing
An Accessible Guide to Historical,
Foundational and Application Contexts
Second Edition
Undergraduate Topics in Computer
Science

Series Editor
Ian Mackie, University of Sussex, Brighton, UK

Advisory Editors
Samson Abramsky , Department of Computer Science, University of Oxford,
Oxford, UK
Chris Hankin , Department of Computing, Imperial College London, London, UK
Mike Hinchey , Lero – The Irish Software Research Centre, University of
Limerick, Limerick, Ireland
Dexter C. Kozen, Department of Computer Science, Cornell University, Ithaca,
NY, USA
Andrew Pitts , Department of Computer Science and Technology, University of
Cambridge, Cambridge, UK
Hanne Riis Nielson , Department of Applied Mathematics and Computer Science,
Technical University of Denmark, Kongens Lyngby, Denmark
Steven S. Skiena, Department of Computer Science, Stony Brook University, Stony
Brook, NY, USA
Iain Stewart , Department of Computer Science, Durham University, Durham, UK
‘Undergraduate Topics in Computer Science’ (UTiCS) delivers high-quality
instructional content for undergraduates studying in all areas of computing and
information science. From core foundational and theoretical material to final-year
topics and applications, UTiCS books take a fresh, concise, and modern approach
and are ideal for self-study or for a one- or two-semester course. The texts are all
authored by established experts in their fields, reviewed by an international advisory
board, and contain numerous examples and problems, many of which include fully
worked solutions.
The UTiCS concept relies on high-quality, concise books in softback format,
andgenerally a maximum of 275–300 pages. For undergraduate textbooks that arelikely
to be longer, more expository, Springer continues to offer the highly regardedTexts in
Computer Science series, to which we refer potential authors.

More information about this series at http://www.springer.com/series/7592


Gerard O’Regan

Mathematics
in Computing
An Accessible Guide to Historical,
Foundational and Application Contexts
Second Edition

123
Gerard O’Regan
SQC Consulting
Mallow, Cork, Ireland

ISSN 1863-7310 ISSN 2197-1781 (electronic)


Undergraduate Topics in Computer Science
ISBN 978-3-030-34208-1 ISBN 978-3-030-34209-8 (eBook)
https://doi.org/10.1007/978-3-030-34209-8
1st edition: © Springer-Verlag London 2013
2nd edition: © Springer Nature Switzerland AG 2020
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with respect to the material contained
herein or for any errors or omissions that may have been made. The publisher remains neutral with regard
to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To
My dear aunts Mrs. Rita Lowry and
Mrs. Kitty Butler
and
In memory of my late uncle Moses Fenton.
Preface

Overview

The objective of this book is to give the reader a flavour of mathematics used in the
computing field. We emphasize the applicability of mathematics rather than the
study of mathematics for its own sake, and the goal is that the reader will appreciate
the rich applications of mathematics to the computing field. This includes appli-
cations to the foundations of computing; to error detection and correcting codes
with finite field theory; to the field of cryptography with the results of number
theory; to the modelling of telecommunication networks with graph theory; to the
application of discrete mathematics and proof techniques to the software correct-
ness field (especially safety-critical systems using formal methods and model
checking); to language theory and semantics; and to computability and decidability.

Organization and Features

The first chapter introduces analog and digital computers, and the von Neumann
architecture which is the fundamental architecture underlying a digital computer.
Chapter 2 discusses the foundations of computing, and we describe the binary
number system and the step reckoner calculating machine that were invented by
Leibniz. Babbage designed the difference engine as a machine to evaluate poly-
nomials, and his analytic engine provided the vision of a modern computer. Boole
was an English mathematician who made important contributions to mathematics
and logic, and his symbolic logic is the foundation for digital computing.
Chapter 3 provides an introduction to fundamental building blocks in mathe-
matics including sets, relations and functions. A set is a collection of well-defined
objects and it may be finite or infinite. A relation between two sets A and B
indicates a relationship between members of the two sets and is a subset of the
Cartesian product of the two sets. A function is a special type of relation such that
for each element in A there is at most one element in the co-domain B. Functions
may be partial or total and injective, surjective or bijective.

vii
viii Preface

Chapter 4 presents a short introduction to algorithms, where an algorithm is a


well-defined procedure for solving a problem. It consists of a sequence of steps that
takes a set of values as input and produces a set of values as output. An algorithm is
an exact specification of how to solve the problem, and it explicitly defines the
procedure so that a computer program may implement the solution in some pro-
gramming language.
Chapter 5 presents the fundamentals of number theory and discusses prime
number theory and the greatest common divisor and least common multiple of two
numbers.
Chapter 6 discusses algebra and we discuss simple and simultaneous equations,
including the method of elimination and the method of substitution to solve
simultaneous equations. We show how quadratic equations may be solved by
factorization, completing the square or using the quadratic formula. We present the
laws of logarithms and indices. We discuss various structures in abstract algebra,
including monoids, groups, rings, integral domains, fields and vector spaces.
Chapter 7 discusses sequences and series and permutations and combinations.
Arithmetic and geometric sequences and series are discussed, and we discuss
applications of geometric sequences and series to the calculation of compound
interest and annuities.
Chapter 8 discusses mathematical induction and recursion. Induction is a com-
mon proof technique in mathematics, and there are two parts to a proof by induction
(the base case and the inductive step). We discuss strong and weak induction, and
we discuss how recursion is used to define sets, sequences and functions. This leads
us to structural induction, which is used to prove properties of recursively defined
structures.
Chapter 9 discusses graph theory where a graph G = (V, E) consists of vertices
and edges. It is a practical branch of mathematics that deals with the arrangements
of vertices and edges between them, and it has been applied to practical problems
such as the modelling of computer networks, determining the shortest driving route
between two cities and the travelling salesman problem.
Chapter 10 discusses cryptography, which is an important application of number
theory. The codebreaking work done at Bletchley Park in England during the
Second World War is discussed, and the fundamentals of cryptography, including
private- and public-key cryptosystems, are discussed.
Chapter 11 presents coding theory and is concerned with error detection and
error correction codes. The underlying mathematics includes abstract mathematics
such as group theory, rings, fields and vector spaces.
Chapter 12 discusses language theory and includes a discussion on grammars,
parse trees and derivations from a grammar. The important area of programming
language semantics is discussed, including axiomatic, denotational and operational
semantics.
Preface ix

Chapter 13 discusses computability and decidability. The Church–Turing thesis


states that anything that is computable is computable by a Turing machine. Church
and Turing showed that mathematics is not decidable. In other words, there is no
mechanical procedure (i.e. algorithm) to determine whether an arbitrary mathe-
matical proposition is true or false, and so the only way is to determine the truth or
falsity of a statement is try to solve the problem.
Chapter 14 discusses matrices including 2  2 and general n  m matrices.
Various operations such as the addition and multiplication of matrices are con-
sidered, and the determinant and inverse of a square matrix are discussed. The
application of matrices to solving a set of linear equations using Gaussian elimi-
nation is considered.
Chapter 15 presents a short history of logic, and we discuss Greek contributions
to syllogistic logic, stoic logic, fallacies and paradoxes. Boole’s symbolic logic and
its application to digital computing are discussed, and we consider Frege’s work on
predicate logic.
Chapter 16 provides an introduction to propositional and predicate logic.
Propositional logic may be used to encode simple arguments that are expressed in
natural language and to determine their validity. The nature of mathematical proof
is discussed, and we present proof by truth tables, semantic tableaux and natural
deduction. Predicate logic allows complex facts about the world to be represented,
and new facts may be determined via deductive reasoning. Predicate calculus
includes predicates, variables and quantifiers, and a predicate is a characteristic or
property that the subject of a statement can have.
Chapter 17 presents some advanced topics in logic including fuzzy logic, tem-
poral logic, intuitionistic logic, undefined values, theorem provers and the appli-
cations of logic to AI. Fuzzy logic is an extension of classical logic that acts as a
mathematical model for vagueness. Temporal logic is concerned with the expres-
sion of properties that have time dependencies, and it allows temporal properties
about the past, present and future to be expressed. Intuitionism was a controversial
theory on the foundations of mathematics based on a rejection of the law of the
excluded middle, and an insistence on constructive existence. We discuss three
approaches to deal with undefined values, including the logic of partial functions;
Dijkstra’s approach with his cand and cor operators; and Parnas’s approach which
preserves a classical two-valued logic.
Chapter 18 discusses the nature of proof and theorem proving, and we discuss
automated and interactive theorem provers. We discuss the nature of mathematical
proof and formal mathematical proof. Chapter 19 discusses software engineering
and the mathematics to support software engineering.
Chapter 20 discusses software reliability and dependability, and covers topics
such as software reliability and software reliability models; the Cleanroom
methodology, system availability, safety and security-critical systems; and
dependability engineering.
Chapter 21 discusses formal methods, which consist of a set of mathematical
techniques to rigorously specify and derive a program from its specification. Formal
methods may be employed to rigorously state the requirements of the proposed
x Preface

system; they may be employed to derive a program from its mathematical speci-
fication; and they may provide a rigorous proof that the implemented program
satisfies its specification. They have been mainly applied to the safety-critical field.
Chapter 22 presents the Z specification language, which is one of the most
widely used formal methods. It was developed at Oxford University in the U.K.
Chapter 23 discusses automata theory, including finite-state machines, push-
down automata and Turing machines. Finite-state machines are abstract machines
that are in only one state at a time, and the input symbol causes a transition from the
current state to the next state. Pushdown automata have greater computational
power, and they contain extra memory in the form of a stack from which symbols
may be pushed or popped. The Turing machine is the most powerful model for
computation, and this theoretical machine is equivalent to an actual computer in the
sense that it can compute exactly the same set of functions.
Chapter 24 discusses model checking which is an automated technique such that
given a finite-state model of a system and a formal property, then it systematically
checks whether the property is true or false in a given state in the model. It is an
effective technique to identify potential design errors, and it increases the confi-
dence in the correctness of the system design.
Chapter 25 discusses probability and statistics and includes a discussion on
discrete and continuous random variables, probability distributions, sample spaces,
sampling, the abuse of statistics, variance and standard deviation and hypothesis
testing. The application of probability to the software reliability field is discussed.
Chapter 26 discusses complex numbers and quaternions. Complex numbers are
of the form a + bi where a and b are real numbers, and i2 = −1. Quaternions are a
generalization of complex numbers to quadruples that satisfy the quaternion for-
mula i2 = j2 = k2 = −1.
Chapter 27 provides a very short introduction to calculus and provides a
high-level overview of limits, continuity, differentiation, integration, numerical
analysis, Fourier series, Laplace transforms and differential equations.
Chapter 28 is the concluding chapter in which we summarize the journey that we
have travelled in this book.

Audience

The audience of this book includes computer science students who wish to obtain
an overview of mathematics used in computing, and mathematicians who wish to
get an overview of how mathematics is applied in the computing field. The book
will also be of interest to the motivated general reader.
Preface xi

Acknowledgements

I am deeply indebted to friends and family who supported my efforts in this


endeavour. My thanks to the team at Springer for suggesting this new edition and
for their professional work. A special thanks to my aunts (Mrs. Rita Lowry and
Mrs. Kitty Butler) who are always a pleasure to visit in Co.Tipperary and Co.Cork,
and who have clearly shown that it is possible to be over 90 and yet to have the
energy and sense of fun of teenagers.

Cork, Ireland Gerard O’Regan


Contents

1 What Is a Computer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Analog Computers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Digital Computers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Vacuum Tubes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 Transistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 Integrated Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.4 Microprocessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 von Neumann Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Hardware and Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Foundations of Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Step Reckoner Calculating Machine . . . . . . . . . . . . . . . . . . . . 14
2.3 Binary Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 The Difference Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5 The Analytic Engine—Vision of a Computer . . . . . . . . . . . . . 19
2.5.1 Applications of Analytic Engine . . . . . . . . . . . . . . . . 21
2.6 Boole’s Symbolic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.6.1 Switching Circuits and Boolean Algebra . . . . . . . . . . 25
2.7 Application of Symbolic Logic to Digital Computing . . . . . . . 27
2.8 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3 Overview of Mathematics in Computing . . . . . . . . . . . . . . . . . . . . . 31
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 Set Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 Set-Theoretical Operations . . . . . . . . . . . . . . . . . . . . 35
3.2.2 Properties of Set-Theoretical Operations . . . . . . . . . . . 37

xiii
xiv Contents

3.2.3 Russell’s Paradox . . . . . . . . . . . . . . . . . . . . . . . . . . . 38


3.2.4 Computer Representation of Sets . . . . . . . . . . . . . . . . 40
3.3 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3.1 Reflexive, Symmetric and Transitive Relations . . . . . . 42
3.3.2 Composition of Relations . . . . . . . . . . . . . . . . . . . . . 44
3.3.3 Binary Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.3.4 Applications of Relations to Databases . . . . . . . . . . . 47
3.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.5 Application of Functions to Functional Programming . . . . . . . 53
3.5.1 Miranda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.6 Number Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.7 Automata Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.8 Graph Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.9 Computability and Decidability . . . . . . . . . . . . . . . . . . . . . . . 58
3.10 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4 Introduction to Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.2 Early Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.2.1 Greatest Common Divisors (GCD) . . . . . . . . . . . . . . 63
4.2.2 Euclid’s Greatest Common Divisor Algorithm . . . . . . 63
4.2.3 Sieve of Eratosthenes Algorithm . . . . . . . . . . . . . . . . 65
4.2.4 Early Cipher Algorithms . . . . . . . . . . . . . . . . . . . . . . 66
4.3 Sorting Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.4 Binary Trees and Graph Theory . . . . . . . . . . . . . . . . . . . . . . . 71
4.5 Modern Cryptographic Algorithms . . . . . . . . . . . . . . . . . . . . . 72
4.6 Computational Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5 Number Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.2 Elementary Number Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.3 Prime Number Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.3.1 Greatest Common Divisors (GCD) . . . . . . . . . . . . . . 86
5.3.2 Least Common Multiple (LCM) . . . . . . . . . . . . . . . . 87
5.3.3 Euclid’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.3.4 Distribution of Primes . . . . . . . . . . . . . . . . . . . . . . . . 89
5.4 Theory of Congruences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.5 Binary System and Computer Representation of Numbers . . . . 95
5.6 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Contents xv

5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
6 Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.2 Simple and Simultaneous Equations . . . . . . . . . . . . . . . . . . . . 100
6.3 Quadratic Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.4 Indices and Logarithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6.5 Horner’s Method for Polynomials . . . . . . . . . . . . . . . . . . . . . 107
6.6 Abstract Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
6.6.1 Monoids and Groups . . . . . . . . . . . . . . . . . . . . . . . . 108
6.6.2 Rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
6.6.3 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
6.6.4 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
7 Sequences, Series and Permutations and Combinations . . . . . . . . . 117
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
7.2 Sequences and Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
7.3 Arithmetic and Geometric Sequences . . . . . . . . . . . . . . . . . . . 119
7.4 Arithmetic and Geometric Series . . . . . . . . . . . . . . . . . . . . . . 120
7.5 Simple and Compound Interest . . . . . . . . . . . . . . . . . . . . . . . 121
7.6 Time Value of Money and Annuities . . . . . . . . . . . . . . . . . . . 123
7.7 Permutations and Combinations . . . . . . . . . . . . . . . . . . . . . . . 124
7.8 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
7.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
8 Mathematical Induction and Recursion . . . . . . . . . . . . . . . . . . . . . 131
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
8.2 Strong Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
8.3 Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
8.4 Structural Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
8.5 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
8.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9 Graph Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9.2 Undirected Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
9.2.1 Hamiltonian Paths . . . . . . . . . . . . . . . . . . . . . . . . . . 147
9.3 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
9.3.1 Binary Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
9.4 Graph Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
9.5 Graph Colouring and Four-Colour Problem . . . . . . . . . . . . . . 150
xvi Contents

9.6 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152


9.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
10 Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
10.2 Breaking the Enigma Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.3 Cryptographic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
10.4 Symmetric-Key Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.5 Public-Key Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
10.5.1 RSA Public-Key Cryptosystem . . . . . . . . . . . . . . . . . 168
10.5.2 Digital Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
10.6 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
10.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
11 Coding Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
11.2 Mathematical Foundations . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
11.3 Simple Channel Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11.4 Block Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
11.4.1 Error Detection and Correction . . . . . . . . . . . . . . . . . 176
11.5 Linear Block Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
11.5.1 Parity Check Matrix . . . . . . . . . . . . . . . . . . . . . . . . . 180
11.5.2 Binary Hamming Code . . . . . . . . . . . . . . . . . . . . . . . 180
11.5.3 Binary Parity Check Code . . . . . . . . . . . . . . . . . . . . . 182
11.6 Miscellaneous Codes in Use . . . . . . . . . . . . . . . . . . . . . . . . . 182
11.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
11.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
12 Language Theory and Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . 185
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
12.2 Alphabets and Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
12.3 Grammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
12.3.1 Backus–Naur Form . . . . . . . . . . . . . . . . . . . . . . . . . . 190
12.3.2 Parse Trees and Derivations . . . . . . . . . . . . . . . . . . . 191
12.4 Programming Language Semantics . . . . . . . . . . . . . . . . . . . . . 193
12.4.1 Axiomatic Semantics . . . . . . . . . . . . . . . . . . . . . . . . 193
12.4.2 Operational Semantics . . . . . . . . . . . . . . . . . . . . . . . . 195
12.4.3 Denotational Semantics . . . . . . . . . . . . . . . . . . . . . . . 196
12.5 Lambda Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
12.6 Lattices and Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Contents xvii

12.6.1 Partially Ordered Sets . . . . . . . . . . . . . . . . . . . . . . . . 199


12.6.2 Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
12.6.3 Complete Partial Orders . . . . . . . . . . . . . . . . . . . . . . 203
12.6.4 Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
12.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
12.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
13 Computability and Decidability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
13.2 Logicism and Formalism . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
13.3 Decidability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
13.4 Computability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
13.5 Computational Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . 218
13.6 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
13.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
14 Matrix Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
14.2 Two  Two Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
14.3 Matrix Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
14.4 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
14.5 Eigenvectors and Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
14.6 Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
14.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
14.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
15 A Short History of Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
15.2 Syllogistic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
15.3 Paradoxes and Fallacies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
15.4 Stoic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
15.5 Boole’s Symbolic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
15.5.1 Switching Circuits and Boolean Algebra . . . . . . . . . . 242
15.6 Frege . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
15.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
15.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
16 Propositional and Predicate Logic . . . . . . . . . . . . . . . . . . . . . . . . . . 247
16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
16.2 Propositional Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
16.2.1 Truth Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
xviii Contents

16.2.2 Properties of Propositional Calculus . . . . . . . . . . . . . . 252


16.2.3 Proof in Propositional Calculus . . . . . . . . . . . . . . . . . 253
16.2.4 Semantic Tableaux in Propositional Logic . . . . . . . . . 256
16.2.5 Natural Deduction . . . . . . . . . . . . . . . . . . . . . . . . . . 258
16.2.6 Sketch of Formalization of Propositional
Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
16.2.7 Applications of Propositional Calculus . . . . . . . . . . . . 261
16.2.8 Limitations of Propositional Calculus . . . . . . . . . . . . . 262
16.3 Predicate Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
16.3.1 Sketch of Formalization of Predicate Calculus . . . . . . 265
16.3.2 Interpretation and Valuation Functions . . . . . . . . . . . . 267
16.3.3 Properties of Predicate Calculus . . . . . . . . . . . . . . . . 268
16.3.4 Applications of Predicate Calculus . . . . . . . . . . . . . . . 268
16.3.5 Semantic Tableaux in Predicate Calculus . . . . . . . . . . 269
16.4 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
16.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
17 Advanced Topics in Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
17.2 Fuzzy Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
17.3 Temporal Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
17.4 Intuitionistic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
17.5 Undefined Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
17.5.1 Logic of Partial Functions . . . . . . . . . . . . . . . . . . . . . 281
17.5.2 Parnas Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
17.5.3 Dijkstra and Undefinedness . . . . . . . . . . . . . . . . . . . . 284
17.6 Logic and AI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
17.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
17.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
18 The Nature of Theorem Proving . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
18.2 Early Automation of Proof . . . . . . . . . . . . . . . . . . . . . . . . . . 296
18.3 Interactive Theorem Provers . . . . . . . . . . . . . . . . . . . . . . . . . 298
18.4 A Selection of Theorem Provers . . . . . . . . . . . . . . . . . . . . . . 300
18.5 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
18.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Contents xix

19 Software Engineering Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . 303


19.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
19.2 What Is Software Engineering? . . . . . . . . . . . . . . . . . . . . . . . 306
19.3 Early Software Engineering Mathematics . . . . . . . . . . . . . . . . 311
19.4 Mathematics in Software Engineering . . . . . . . . . . . . . . . . . . . 314
19.5 Software Inspections and Testing . . . . . . . . . . . . . . . . . . . . . . 315
19.6 Process Maturity Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
19.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
19.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
20 Software Reliability and Dependability . . . . . . . . . . . . . . . . . . . . . . 319
20.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
20.2 Software Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
20.2.1 Software Reliability and Defects . . . . . . . . . . . . . . . . 321
20.2.2 Cleanroom Methodology . . . . . . . . . . . . . . . . . . . . . . 323
20.2.3 Software Reliability Models . . . . . . . . . . . . . . . . . . . 324
20.3 Dependability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
20.4 Computer Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
20.5 System Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
20.6 Safety-Critical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
20.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
20.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
21 Overview of Formal Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
21.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
21.2 Why Should We Use Formal Methods? . . . . . . . . . . . . . . . . . 335
21.3 Industrial Applications of Formal Methods . . . . . . . . . . . . . . . 337
21.4 Industrial Tools for Formal Methods . . . . . . . . . . . . . . . . . . . 338
21.5 Approaches to Formal Methods . . . . . . . . . . . . . . . . . . . . . . . 339
21.5.1 Model-Oriented Approach . . . . . . . . . . . . . . . . . . . . . 339
21.5.2 Axiomatic Approach . . . . . . . . . . . . . . . . . . . . . . . . . 341
21.6 Proof and Formal Methods . . . . . . . . . . . . . . . . . . . . . . . . . . 341
21.7 Mathematics in Software Engineering . . . . . . . . . . . . . . . . . . . 342
21.8 The Vienna Development Method . . . . . . . . . . . . . . . . . . . . . 343
21.9 VDM♣, the Irish School of VDM . . . . . . . . . . . . . . . . . . . . . 344
21.10 The Z Specification Language . . . . . . . . . . . . . . . . . . . . . . . . 345
21.11 The B-Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
21.12 Predicate Transformers and Weakest Preconditions . . . . . . . . . 347
21.13 The Process Calculi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
21.14 Finite-State Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
21.15 The Parnas Way . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
21.16 Model Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
xx Contents

21.17 Usability of Formal Methods . . . . . . . . . . . . . . . . . . . . . . . . . 351


21.18 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
21.19 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
22 Z Formal Specification Language . . . . . . . . . . . . . . . . . . . . . . . . . . 355
22.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
22.2 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
22.3 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
22.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
22.5 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
22.6 Bags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
22.7 Schemas and Schema Composition . . . . . . . . . . . . . . . . . . . . 364
22.8 Reification and Decomposition . . . . . . . . . . . . . . . . . . . . . . . . 367
22.9 Proof in Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
22.10 Industrial Applications of Z . . . . . . . . . . . . . . . . . . . . . . . . . . 369
22.11 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
22.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
23 Automata Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
23.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
23.2 Finite-State Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
23.3 Pushdown Automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
23.4 Turing Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
23.5 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
23.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
24 Model Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
24.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
24.2 Modelling Concurrent Systems . . . . . . . . . . . . . . . . . . . . . . . 387
24.3 Linear Temporal Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
24.4 Computational Tree Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
24.5 Tools for Model Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
24.6 Industrial Applications of Model Checking . . . . . . . . . . . . . . . 390
24.7 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
24.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
25 Probability and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
25.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
25.2 Probability Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
25.2.1 Laws of Probability . . . . . . . . . . . . . . . . . . . . . . . . . 395
25.2.2 Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Contents xxi

25.3 Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400


25.3.1 Abuse of Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . 400
25.3.2 Statistical Sampling . . . . . . . . . . . . . . . . . . . . . . . . . 401
25.3.3 Averages in a Sample . . . . . . . . . . . . . . . . . . . . . . . . 402
25.3.4 Variance and Standard Deviation . . . . . . . . . . . . . . . . 403
25.3.5 Bell-Shaped (Normal) Distribution . . . . . . . . . . . . . . . 403
25.3.6 Frequency Tables, Histograms and Pie Charts . . . . . . 406
25.3.7 Hypothesis Testing . . . . . . . . . . . . . . . . . . . . . . . . . . 407
25.4 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
25.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
26 Complex Numbers and Quaternions . . . . . . . . . . . . . . . . . . . . . . . . 411
26.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
26.2 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
26.3 Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
26.3.1 Quaternion Algebra . . . . . . . . . . . . . . . . . . . . . . . . . 418
26.3.2 Quaternions and Rotations . . . . . . . . . . . . . . . . . . . . 422
26.4 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
26.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
27 Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
27.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
27.2 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
27.2.1 Rules of Differentiation . . . . . . . . . . . . . . . . . . . . . . . 431
27.3 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
27.3.1 Definite Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
27.3.2 Fundamental Theorems of Integral Calculus . . . . . . . . 437
27.4 Numerical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
27.5 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
27.6 The Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
27.7 Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
27.8 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
27.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
28 Epilogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
List of Figures

Fig. 1.1 Vannevar Bush with the differential analyser . . . . . . . . . . . . . . 3


Fig. 1.2 Replica of transistor. Public domain . . . . . . . . . . . . . . . . . . . . . 6
Fig. 1.3 von Neumann architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Fig. 1.4 Fetch/execute cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Fig. 2.1 Replica of step reckoner at Technische Sammlungen
Museum, Dresden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Fig. 2.2 Decimal to binary conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Fig. 2.3 Charles Babbage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Fig. 2.4 Difference engine no. 2. Photo public domain . . . . . . . . . . . . . 20
Fig. 2.5 Lady Ada Lovelace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Fig. 2.6 George Boole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Fig. 2.7 Binary AND operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Fig. 2.8 Binary OR operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Fig. 2.9 NOT operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Fig. 2.10 Half adder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Fig. 2.11 Claude Shannon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Fig. 3.1 Bertrand Russell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Fig. 3.2 Reflexive relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Fig. 3.3 Symmetric relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Fig. 3.4 Transitive relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Fig. 3.5 Partitions of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Fig. 3.6 Composition of relations S o R. . . . . . . . . . . . . . . . . . . . . . . . . 45
Fig. 3.7 Edgar Codd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Fig. 3.8 PART relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Fig. 3.9 Domain and range of a partial function . . . . . . . . . . . . . . . . . . 50
Fig. 3.10 Injective and surjective functions . . . . . . . . . . . . . . . . . . . . . . . 52
Fig. 3.11 Bijective function (one to one and onto) . . . . . . . . . . . . . . . . . . 52
Fig. 4.1 Euclid of Alexandria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Fig. 4.2 Primes between 1 and 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Fig. 4.3 Caesar Cipher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Fig. 4.4 Insertion sort example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Fig. 4.5 Merge sort example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Fig. 4.6 Sorted binary tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Fig. 5.1 Pierre de Fermat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

xxiii
xxiv List of Figures

Fig. 5.2 Pythagorean triples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79


Fig. 5.3 Square numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Fig. 5.4 Rectangular numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Fig. 5.5 Triangular numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Fig. 5.6 Marin Mersenne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Fig. 5.7 Leonard Euler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Fig. 6.1 Graphical solution to simultaneous equations . . . . . . . . . . . . . . 102
Fig. 6.2 Graphical solution to quadratic equation . . . . . . . . . . . . . . . . . . 105
Fig. 9.1 Königsberg seven bridges problem . . . . . . . . . . . . . . . . . . . . . . 142
Fig. 9.2 Königsberg graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Fig. 9.3 Undirected graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Fig. 9.4 Directed graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Fig. 9.5 Adjacency matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Fig. 9.6 Incidence matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Fig. 9.7 Travelling salesman problem. . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Fig. 9.8 Binary tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Fig. 9.9 Determining the chromatic colour of G. . . . . . . . . . . . . . . . . . . 151
Fig. 9.10 Chromatic colouring of G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Fig. 10.1 The Enigma machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Fig. 10.2 Bletchley Park. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Fig. 10.3 Alan Turing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Fig. 10.4 Replica of Bombe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Fig. 10.5 Symmetric-key cryptosystem. . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Fig. 10.6 Public-key cryptosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Fig. 11.1 Basic digital communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Fig. 11.2 Encoding and decoding of an (n,k) block . . . . . . . . . . . . . . . . . 175
Fig. 11.3 Error-correcting capability sphere . . . . . . . . . . . . . . . . . . . . . . . 177
Fig. 11.4 Generator matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Fig. 11.5 Generation of codewords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Fig. 11.6 Identity matrix (k  k) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Fig. 11.7 Hamming code B (7, 4, 3) generator matrix . . . . . . . . . . . . . . . 181
Fig. 12.1 Noam Chomsky. public domain . . . . . . . . . . . . . . . . . . . . . . . . 189
Fig. 12.2 Parse tree 5  3 + 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Fig. 12.3 Parse tree 5  3 + 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Fig. 12.4 Denotational semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Fig. 12.5 Pictorial representation of a partial order . . . . . . . . . . . . . . . . . 200
Fig. 12.6 Pictorial representation of a complete lattice . . . . . . . . . . . . . . . 203
Fig. 13.1 David Hilbert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Fig. 13.2 Kurt Gödel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Fig. 13.3 Alonzo Church . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Fig. 14.1 Example of a 4  4 square matrix . . . . . . . . . . . . . . . . . . . . . . 222
Fig. 14.2 Multiplication of two matrices . . . . . . . . . . . . . . . . . . . . . . . . . 226
Fig. 14.3 Identity matrix In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Fig. 14.4 Transpose of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
List of Figures xxv

Fig. 14.5 Determining the (i, j) minor of A . . . . . . . . . . . . . . . . . . . . . . . 228


Fig. 15.1 Zeno of Citium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Fig. 15.2 Gottlob Frege . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Fig. 16.1 Gerhard Gentzen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Fig. 17.1 Conjunction and disjunction operators . . . . . . . . . . . . . . . . . . . 282
Fig. 17.2 Implication and equivalence operators . . . . . . . . . . . . . . . . . . . 282
Fig. 17.3 Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Fig. 17.4 Finding index in array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Fig. 17.5 Edsger Dijkstra. Courtesy of Brian Randell . . . . . . . . . . . . . . . 285
Fig. 17.6 John McCarthy. Courtesy of John McCarthy . . . . . . . . . . . . . . 287
Fig. 18.1 Idea of automated theorem proving. . . . . . . . . . . . . . . . . . . . . . 295
Fig. 19.1 David Parnas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Fig. 19.2 Waterfall lifecycle model (V-model) . . . . . . . . . . . . . . . . . . . . . 308
Fig. 19.3 SPIRAL lifecycle model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Fig. 19.4 Standish group report—estimation accuracy . . . . . . . . . . . . . . . 310
Fig. 19.5 Robert Floyd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Fig. 19.6 Branch assertions in flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . 312
Fig. 19.7 Assignment assertions in flowcharts . . . . . . . . . . . . . . . . . . . . . 312
Fig. 19.8 C. A. R. Hoare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Fig. 19.9 Watts Humphrey. Courtesy of Watts Humphrey . . . . . . . . . . . . 316
Fig. 21.1 Deterministic finite-state machine . . . . . . . . . . . . . . . . . . . . . . . 350
Fig. 22.1 Specification of positive square root . . . . . . . . . . . . . . . . . . . . . 356
Fig. 22.2 Specification of a library system . . . . . . . . . . . . . . . . . . . . . . . . 357
Fig. 22.3 Specification of borrow operation . . . . . . . . . . . . . . . . . . . . . . . 358
Fig. 22.4 Specification of vending machine using bags . . . . . . . . . . . . . . 364
Fig. 22.5 Schema inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Fig. 22.6 Merging schemas (S1 _ S2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Fig. 22.7 Schema composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Fig. 22.8 Refinement commuting diagram . . . . . . . . . . . . . . . . . . . . . . . . 368
Fig. 23.1 Finite-state machine with output . . . . . . . . . . . . . . . . . . . . . . . . 375
Fig. 23.2 Deterministic FSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Fig. 23.3 Non-deterministic finite-state machine. . . . . . . . . . . . . . . . . . . . 376
Fig. 23.4 Components of pushdown automata . . . . . . . . . . . . . . . . . . . . . 378
Fig. 23.5 Transition in pushdown automata . . . . . . . . . . . . . . . . . . . . . . . 378
Fig. 23.6 Transition function for pushdown automata M . . . . . . . . . . . . . 379
Fig. 23.7 Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Fig. 23.8 Transition on Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Fig. 24.1 Concept of model checking . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Fig. 24.2 Model checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Fig. 24.3 Simple transition system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Fig. 24.4 LTL operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Fig. 25.1 Carl Friedrich Gauss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Fig. 25.2 Standard unit normal bell curve (Gaussian distribution) . . . . . . 404
Fig. 25.3 Histogram test results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
xxvi List of Figures

Fig. 25.4 Pie chart test results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407


Fig. 26.1 Argand diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Fig. 26.2 Interpretation of complex conjugate . . . . . . . . . . . . . . . . . . . . . 414
Fig. 26.3 Interpretation of Euler’s formula . . . . . . . . . . . . . . . . . . . . . . . . 415
Fig. 26.4 William Rowan Hamilton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Fig. 26.5 Plaque at Broom’s Bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Fig. 26.6 Quaternions and rotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Fig. 27.1 Limit of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Fig. 27.2 Derivative as a tangent to curve . . . . . . . . . . . . . . . . . . . . . . . . 426
Fig. 27.3 Interpretation of mean value theorem . . . . . . . . . . . . . . . . . . . . 427
Fig. 27.4 Interpretation of intermediate value theorem . . . . . . . . . . . . . . . 428
Fig. 27.5 Isaac newton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Fig. 27.6 Wilhelm Gottfried Leibniz . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Fig. 27.7 Local minima and maxima . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Fig. 27.8 Area under the curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Fig. 27.9 Area under the curve—lower sum . . . . . . . . . . . . . . . . . . . . . . 435
Fig. 27.10 Bisection method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
What Is a Computer?
1

Key Topics
Analog computers
Digital computers
Vacuum tubes
Transistors
Integrated circuits
von Neumann architecture
Generation of computers
Hardware
Software

1.1 Introduction

It is difficult to think of western society today without modern technology. We have


witnessed in recent decades a proliferation of high-tech computers, mobile phones,
text messaging, the Internet, the World Wide Web and social media. Software is
pervasive, and it is an integral part of automobiles, airplanes, televisions and mobile
communication. The pace of change is relentless, and communication today is
instantaneous with technologies such as Skype, Twitter and WhatsApp.
Today, people may book flights over the World Wide Web as well as keeping in
contact with friends and family members around the world. In previous generations,
communication involved writing letters that often took months to reach the

© Springer Nature Switzerland AG 2020 1


G. O’Regan, Mathematics in Computing, Undergraduate Topics
in Computer Science, https://doi.org/10.1007/978-3-030-34209-8_1
2 1 What Is a Computer?

recipient. However, today’s technology has transformed the modern world into a
global village, and the modern citizen may make video calls over the Internet or
post pictures and videos on social media sites such as Facebook and Twitter. The
World Wide Web allows business to compete in a global market.
A computer is a programmable electronic device that can process, store and
retrieve data. It processes data according to a set of instructions or program. All
computers consist of two basic parts, namely, hardware and software. The hard-
ware is the physical part of the machine, and the components of a digital computer
include memory for short-term storage of data or instructions; an arithmetic/logic
unit for carrying out arithmetic and logical operations; a control unit responsible for
the execution of computer instructions in memory; and peripherals that handle the
input and output operations. Software is a set of instructions that tells the computer
what to do.
The original meaning of the word ‘computer’ referred to someone who carried
out calculations rather than an actual machine. The early digital computers built in
the 1940s and 1950s were enormous machines consisting of thousands of vacuum
tubes. They typically filled a large room but their computational power was a
fraction of the personal computers and mobile devices used today.
There are two distinct families of computing devices, namely, digital computers
and the historical analog computer. The earliest computers were analog not digital,
and these two types of computer operate on quite different principles.
The computation in a digital computer is based on binary digits, i.e. ‘0’ and ‘1’.
Electronic circuits are used to represent binary numbers, with the state of an
electrical switch (i.e. ‘on’ or ‘off’) representing a binary digit internally within a
computer.
A digital computer is a sequential device that generally operates on data one step
at a time, and the earliest digital computers were developed in the 1940s. The data
are represented in binary format, and a single transistor (initially bulky vacuum
tubes) is used to represent a binary digit. Several transistors are required to store
larger numbers.
An analog computer operates in a completely different way to a digital com-
puter. The representation of data in an analog computer reflects the properties of the
data that are being modelled. For example, data and numbers may be represented by
physical quantities such as electric voltage, whereas a stream of binary digits is used
to represent them in a digital computer.

1.2 Analog Computers

James Thompson (who was the brother of the physicist Lord Kelvin) did early
foundational work on analog computation in the nineteenth century. He invented a
wheel-and-disc integrator, which was used in mechanical analog devices, and he
worked with Kelvin to construct a device to perform the integration of a product of
two functions. Kelvin later described a general-purpose analog machine (he did not
1.2 Analog Computers 3

build it) for integrating linear differential equations. He built a tide predicting
analog computer that remained in use at the Port of Liverpool up to the 1960s.
The operations in an analog computer are performed in parallel, and they are
useful in simulating dynamic systems. They have been applied to flight simulation,
nuclear power plants and industrial chemical processes.
Vannevar Bush developed the first large-scale general-purpose mechanical
analog computer at the Massachusetts Institute of Technology. Bush’s differential
analyser (Fig. 1.1) was a mechanical analog computer designed to solve sixth-order
differential equations by integration, using wheel-and-disc mechanisms to perform
the integration. The mechanization allowed integration and differential equations
problems to be solved more rapidly. The machine took up the space of a large table
in a room and weighed about 100 tonnes.
It contained wheels, discs, shafts and gears to perform the calculations. It
required a considerable setup time by technicians to solve an equation. It contained
150 motors and miles of wires connecting relays and vacuum tubes.
Data representation in an analog computer is compact, but it may be subject to
corruption with noise. A single capacitor can represent one continuous variable in
an analog computer. Analog computers were replaced by digital computers shortly
after the Second World War.

Fig. 1.1 Vannevar Bush with the differential analyser


4 1 What Is a Computer?

1.3 Digital Computers

Early digital computers used vacuum tubes to store binary information, and a
vacuum tube may represent the binary value ‘0’ or ‘1’. These tubes were large and
bulky and generated a significant amount of heat. Air conditioning was required to
cool the machine, and there were problems with the reliability of the tubes.
Shockley and others invented the transistor in the late 1940s, and it replaced
vacuum tubes from the late 1950s onwards. Transistors are small and consume very
little power, and the resulting machines were smaller, faster and more reliable.
Integrated circuits were introduced in the early 1960s, and a massive amount of
computational power could now be placed on a very small chip. Integrated circuits
are small and consume very little power, and may be mass-produced to a very
high-quality standard. However, integrated circuits are difficult to modify or repair,
and are nearly always replaced on failure.
The fundamental architecture of a computer has remained basically the same
since von Neumann and others proposed it in the mid-1940s. It includes a central
processing unit which includes the control unit and the arithmetic unit, an input and
output unit, and memory.

1.3.1 Vacuum Tubes

A vacuum tube is a device that relies on the flow of an electric current through a
vacuum. Vacuum tubes (thermionic valves) were widely used in electronic devices
such as televisions, radios and computers until the invention of the transistor.
The basic idea of a vacuum tube is that the current passes through the filament,
which then heats it up so that it gives off electrons. The electrons are negatively
charged and are attracted to the small positive plate (or anode) within the tube.
A unidirectional flow is thus established between the filament and the plate. Tho-
mas Edison had observed this while investigating the reason for breakage of lamp
filaments. He noted an uneven blackening (darkest near one terminal of the fila-
ment) of the bulbs in his incandescent lamps and noted that current flows from the
lamp’s filament and a plate within the vacuum.
The first generation of computers used several thousand bulky vacuum tubes,
with several racks of vacuum tubes taking up the space of a large room. The
vacuum tube used in the early computers was a three-terminal device, and it con-
sisted of a cathode, a grid and a plate. It was used to represent one of two binary
states, i.e. the binary value ‘0’ or ‘1’.
The filament of a vacuum tube becomes unstable over time. In addition, if air
leaks into the tube then oxygen will react with the hot filament and damage it. The
size and unreliability of vacuum tubes motivated research into more compact and
reliable technologies. This led to the invention of the transistor in the late 1940s.
The first generation of digital computers all used vacuum tubes, e.g. the
Atanasoff–Berry computer (ABC) developed at the University of Iowa in 1942;
1.3 Digital Computers 5

Colossus developed at Bletchley Park, England in 1944; and ENIAC developed in


the United States in the mid-1940s.

1.3.2 Transistors

The transistor is a fundamental building block in modern electronic systems, and its
invention revolutionized the field of electronics. It was smaller, cheaper and more
reliable than the existing vacuum tubes.
The transistor is a three-terminal, solid-state electronic device. It can control
electric current or voltage between two of the terminals by applying an electric
current or voltage to the third terminal. The three-terminal transistor enables an
electric switch to be made which can be controlled by another electrical switch.
Complicated logic circuits may be built up by cascading these switches (switches
that control switches that control switches, and so on.).
These logic circuits may be built very compactly on a silicon chip with a density
of over a million transistors per square centimetre. The switches may be turned on
and off very rapidly (e.g. every 0.000000001 s). These electronic chips are at the
heart of modern electronic devices.
The transistor (Fig. 1.2) was developed at Bell Labs after the Second World
War. The goal of the research was to find a solid-state alternative to vacuum tubes,
as this technology was too bulky and unreliable. Three Bell Labs inventors
(Shockley, Bardeen and Brattain) were awarded the Nobel Prize in physics in 1956
in recognition of their invention of the transistor.
William Shockley was involved in radar research and anti-submarine operations
research during the Second World War, and after the war he led the Bell Labs
research group (that included Bardeen and Brattain) that aimed to find a solid-state
alternative to the glass-based vacuum tubes.
Bardeen and Brattain succeeded in creating a point-contact transistor in 1947
independently of Shockley who was working on a junction-based transistor.
Shockley believed that the points contact transistor would not be commercially
viable, and his junction point transistor was announced in 1951.
Shockley formed Shockley Semiconductor Inc. (part of Beckman Instruments)
in 1955. The second generation of computers used transistors instead of vacuum
tubes. The University of Manchester’s experimental Transistor Computer was one
of the earliest transistor computers. The prototype machine appeared in 1953, and
the full-size version was commissioned in 1955. The invention of the transistor is
discussed in more detail in (O’Regan 2018).

1.3.3 Integrated Circuits

Jack Kilby of Texas Instruments invented the integrated circuit in 1958. His
invention used a wafer of germanium, and Robert Noyce of Fairchild Semicon-
ductors did subsequent work on silicon-based integrated circuits. The integrated
Another random document with
no related content on Scribd:
REFERENCES
Chapter VIII

271
The Western Gleaner or Repository for Arts, Sciences, and
Literature, Pittsburgh, Pa., August, 1814, vol. ii, pp. 173–
175.
272
Pittsburgh Gazette, June 28, 1800.
273
Pittsburgh Gazette, December 4, 1801.
274
Tree of Liberty, October 18, 1800.
275
Pittsburgh Gazette, March 20, 1801.
276
Tree of Liberty, June 13, 1801.
277
Pittsburgh Gazette, December 4, 1801.
278
Tree of Liberty, August 7, 1802.
279
Pittsburgh Gazette, December 4, 1801; Tree of Liberty,
August 7, 1802.
280
Pittsburgh Gazette, December 17, 1813.
281
Pittsburgh Gazette, March 27, 1812.
282
The Navigator, Pittsburgh, 1814, pp. 258–259.
283
John Mellish: Travels in the United States of America in the
years 1806–1807–1809–1810 and 1811, Philadelphia,
vol. ii., p. 58.
284
Christian Schultz, Jun.: Travels on an Inland Voyage, New
York, 1810, p. 133.
CHAPTER IX
THE BROADENING OF CULTURE

Cramer’s business prospered. His was the only establishment in


Pittsburgh where the sale of books was the predominant feature. He
285
had long called it the “Pittsburgh Bookstore.” Oliver Ormsby,
whose store was in the brick house on Water Street, at the westerly
side of Chancery Lane, sold “Dilworth’s and Webster’s Spelling
books, testaments, and Bibles in Dutch and English, primers, toy
286 287
books, and a variety of histories, novels, etc.” William Christy
288
and John Wrenshall kept a few books, a special feature of the
latter’s business being the sale of Dr. Jonathan Edwards’s Sermons,
but compared with Cramer’s stock, the supply of books in other
hands was insignificant. Cramer was also practically the only
publisher of books in the borough. After he had been publishing for a
few years, others began the business, but their books were few in
number and generally unimportant in character. Cramer’s
advertisements were sometimes amusing. He sold his goods for
money, or in trade, and in making the announcement employed the
axiomatic language of “Poor Richard.” This was one of his naïve
notices: “I hope the ladies and all good girls and boys will not forget
to fetch me all the clean linen and cotton rags they possibly can.
Save the smallest pieces and put them in a rag bag; save them from
the fire and the ash heap. It is both honorable and profitable to save
289
rags, for our country wants them.”
He added new lines to his business. Articles which tended to
elevate and refine the standard of living were introduced. Wall
papers had been in use in the East to a limited extent since 1769,
and were no longer rare in good homes. In the West they were
scarcely known until Cramer advertised his “large stock of hanging
290
or wall papers.” He sold stationery, writing paper, Italian and hot-
pressed letter paper, wafers, quills, camel-hair pencils, inkstands,
sealing wax, red and black ink powders. Card playing was one of the
leading social diversions and he had the best English and American
playing cards. Patent medicines were largely used and Cramer
found it profitable to supply the demand. He had books of
instructions for the flute, the violin, the piano-forte, and books of
songs. His stock of English dictionaries included those of Nathan
Bailey, Dr. Samuel Johnson, Thomas Sheridan, and John Walker.
For the German population he had books in the German language,
which he often designated as “Dutch” books. He sold German
almanacs, German Bibles and testaments. Many of the German
churches, both in Pittsburgh and in the surrounding settlements, had
schools attached to their churches, where the German language was
taught in connection with English studies. For these schools Cramer
supplied the books. Ever since the cession of Louisiana to the United
States there had been a great increase in the students of the French
language among Americans, who intended either to engage in
commerce with the people of that territory, or expected to settle
291
there. The liberally advertised easy methods of learning French
induced many persons to engage in its study. For these Cramer kept
French books. He also sold Greek and Latin schoolbooks, Greek
and Latin dictionaries, and Spanish grammars.
In the early years Cramer had no press of his own. A printing
office being located at either end of the block in which he was
established, he divided his work between them. The Almanacs were
printed by John Israel, and the Navigators, by John Scull. Business
increased and he deemed it advisable to do his own printing, and on
August 14, 1805, announced that he had “received a press, and a
very handsome assortment of new type, for the purpose of printing
such literary and ecclesiastical works as may be most in
292
demand.” His publications now became more numerous and
pretentious.
He was too active to limit his energies to his business. In 1803,
he became Secretary of the Mechanical Society, and thenceforth
devoted much attention to the office, which he held for several years.
He was not an active politician, but was warmly attached to the
Republican party, and moreover had the respect of the entire
community. In 1811, when a division took place in the Republican
party in Allegheny County, and two tickets were placed in the field,
his standing was such, that he was named as a member of the
293
committee selected to bring about harmony. Like the modern
successful business man, he had a desire for the free life and clear
skies of the country, and he engaged in farming and sheep-raising.
When he died he had on the plantation of his brother-in-law, Josiah
Clark, in Washington County, a flock of one hundred and twenty-
eight sheep.
In 1808, the partnership with John Spear began, and the firm
became known as Cramer & Spear. The establishment, however,
continued to be called “Zadok Cramer’s Bookstore”; sometimes it
was advertised as “Zadok Cramer’s Classical, Literary, and Law
Bookstore.” In 1810, William Eichbaum was taken into the firm. He
had served a seven years’ apprenticeship in bookbinding with
Cramer, and with Cramer & Spear, and was the son of William
Eichbaum, the elder. It may be that young Eichbaum was the “active
youth of good morals and respectable character, wanted to learn the
bookbinding and stationery business,” for whom Cramer had
294
advertised on November 6, 1802. The firm was now Cramer,
Spear & Eichbaum, and continued as such until 1818, the year of the
death of Elizabeth Cramer, the widow of Zadok Cramer, when
Eichbaum withdrew and the firm was again changed to Cramer &
Spear.
Cramer had traveled extensively, first in pursuit of information for
his Navigators, and later in search of health. He went down the Ohio
295
in 1806. In 1810, he was in Kentucky. When the New Orleans, the
first steamboat that ran on the Western rivers was being operated
between Natchez and New Orleans, he descended the Mississippi
River in it twice, from the former to the latter place. Much of the
information in regard to the New Orleans, its structure, cost,
earnings, and length of time required between river points, is to be
296
found in the Navigators.
It would be impossible at this late day to compile a complete list
of Cramer’s publications, nor would it serve any useful purpose. He
published many schoolbooks, particularly for children in the primary
grades. His Pittsburgh and New England primers, and the United
States Spelling Book, were famous in their day. Ecclesiastical books
were in great demand, and Cramer met it. Catechisms were used as
books of primary instruction and were printed in many forms; there
were Larger Catechisms, Shorter Catechisms, the Mother’s
Catechism, and the Child’s Catechism. For the Germans he
published in German, The Shorter Catechism of Dr. Martin Luther.
The religious books that came from his press would form an endless
list. Among those having a bearing on the history of that time was,
The Marks of a Work of the Spirit, together with Remarks Respecting
the Present Astonishing Work of God, and Revival of Religion in the
297
Western Country, by J. Hughes of West Liberty. “J. Hughes,” was
the Rev. James Hughes, pastor of the Presbyterian churches at
Lower Buffalo in Washington County, and West Liberty in the
adjoining county of Ohio in Virginia, and one of the trustees of the
recently established Jefferson College, the pioneer college of the
West.
Cramer lived and flourished in an age when many of the
publications sent out in the name of religion contained the merest
drivel, or were elaborations of theories in regard to matters infinite
held by narrow-minded controversialists. The press was flooded with
them. There were publications bearing such depressing titles as The
Happy Voyage Completed, and The Sure Anchor Cast. Cramer
realized that in publishing works of this character he might be
misunderstood. This sentiment was evident in the advertisement of
at least one of his publications. On that occasion he prefaced his
notice by stating: “On the recommendation of some pious friends, we
contemplate printing, A Token for children, Being an exact account of
the Conversion, holy and exemplary Lives and Joyful Deaths of
298
several young children!”
The most pretentious of his works was religious in character, and
was published in 1807. It was A Dictionary of the Holy Bible by the
Rev. John Brown of Haddington, in Scotland, of which two editions
were printed. It was a noteworthy achievement to be accomplished
on the frontier, hundreds of miles from the center of civilization. Many
difficulties had to be overcome, not the least of which was the delay
299
occasioned by the difficulty in procuring a regular supply of paper.
The work was in two large octavo volumes, and was illustrated with
engraved pictures and maps that are still desired by collectors.
Heading the list of subscribers, was the name of President Jefferson,
of whom Cramer appears to have been an ardent admirer. In 1810,
the firm published the Select Remains of the Rev. John Brown, the
author of the Dictionary.
Cramer’s publications covered a wide range. In 1808 The
Lawyer, by George Watterson, appeared, which was imbued with the
current prejudice against lawyers, and presented a sorry spectacle of
the legal profession. The same year, a map of Pittsburgh was
published, which, if in existence to-day, would be of great interest.
One of his most valuable contributions to the literature of travel, was
Sketches of a Tour to the Western Country in 1807–1809, by F.
Cuming, published in 1810. It contained according to Reuben Gold
300
Thwaites, a “picture of American life in the West at the beginning
of the nineteenth century that for clear-cut outlines and fidelity of
presentation has the effect of a series of photographic
representations.” Another work of value was Views of Louisiana, by
Judge Henry M. Brackenridge, published in 1814. Cramer had met
Brackenridge in New Orleans, in December, 1811, while on one of
his visits to that city, and arranged with him there for the
301
publication. In 1813, The Poetical Works of Oliver Goldsmith were
brought out.
One of the most important ventures of Cramer’s entire publishing
experience, the fruition of which he did not live to see, was The
Western Gleaner or Repository for Arts, Sciences, and Literature. It
was a monthly magazine of sixty-four pages. The first number
appeared in December, 1813, four months after Cramer’s death.
Compared with magazines of the present time, it was not of the
highest order of literary merit. In its day, however, it ranked with the
best magazines published. The excellent literary taste of the editor
also appears from an incident which occurred during the early life of
the magazine. The Pittsburgh Gazette published a communication
from a disappointed aspirant for literary fame, signing himself
“Recluse,” whose poem in fourteen stanzas entitled “The Two
Roses,” had been declined by the Western Gleaner. “Recluse”
referred sarcastically to the “uncommonly profound and very
discerning editor of the Western Gleaner.”
That the editor of the Western Gleaner was more “discerning”
than the editor of the Pittsburgh Gazette, which published
“Recluse’s” effort, along with his letter, is evident from a perusal of
the poem. The first stanza, which is also the best, reads:

“The sweetest rose that ever bloomed,


Was one that, with insidious sip,
Beneath Eliza’s smiles presumed,
302
To pilfer fragrance from her lip.”

The same persistency which procured the publication of “The Two


Roses” in the Pittsburgh Gazette, enabled “Recluse” a few years
later to find a publisher for a volume of his poetry, in which “The Two
303
Roses” was one of the gems.
In one of the numbers of the magazine Judge Hugh Henry
Brackenridge contributed a poem, descriptive of his feelings on
revisiting Pittsburgh, called “On a Circuit at This Place.”

“What is there in this spot of earth


Repellant to all zest of mirth,
Heart-felt by me,
And which on being seen again,
The Hill, the River and the Plain
304
To sadden, all agree!”

Cramer realized that books having a local interest would find a


ready sale. One of these was Judge Hugh Henry Brackenridge’s
Modern Chivalry; another was his Incidents of the Insurrection in
Western Pennsylvania, which was an effort to vindicate himself for
his course in the Whisky Insurrection. Judge Addison’s impeachment
in 1803, by the Republican General Assembly, had created profound
interest in Pittsburgh. The account of the trial was immediately
published in Lancaster, then the capital of the State, and eagerly
read. Another book of local interest was Colonel James Smith’s
Captivity among the Indians Westward of Fort Pitt in the Year 1755,
published at Lexington, Kentucky, in 1799.
Although a Republican himself, Cramer’s mercantile instincts led
him to sell books written in opposition to that party. A little volume of
poems was of this class. David Bruce, a Scotchman living in the
adjacent village of Burgettstown, whom Cramer designated as “an
ingenious Scotch poet of Washington County,” had published in
1801, in Washington, Pennsylvania, a book which, while mainly
political in character, had considerable merit. Bruce was a strong
Federalist, and his volume was dedicated to Judge Addison. To the
Republicans, Brackenridge, Gallatin, McKean, and other more or
less local celebrities, Bruce’s references were disparaging. To
Brackenridge he addressed the cynical lines:

“When Whisky-Boys sedition sang,


An’ anarchy strod owre the lan’
When Folly led Rebellion’s ban’
Sae fierce an’ doure,
Fo’ks said ye sleely lent a han’
305
To mak the stoure.”
A book of the same character, but covering a wider range, and of
a higher literary tone, was The Echo. It had a local interest in that it
contained a number of clever satirical references to Judge Hugh
Henry Brackenridge. In the latter part of the eighteenth century,
Hartford was the literary center of Federalistic ideas. They were
promulgated by a group of young authors known as the “Hartford
Wits.” Included in the coterie was Richard Alsop, who was the
principal writer of The Echo. The Echo had originally appeared
serially, but in 1807, the parts were collected and published in a
volume. The allusions to Brackenridge indicated a keen sense of
humor and considerable poetic spirit. An article written by
Brackenridge had appeared in 1792 in the National Gazette of
Philadelphia, then recently established as the organ of the
Republicans, in which he urged savage reprisals against the Indians,
who were causing trouble west of Pittsburgh. To this screed, The
Echo made the mocking reply:

“I grant my pardon to that dreaming clan,


Who think that Indians have the rights of man;
Who deem the dark skinn’d chiefs those miscreants base,
Have souls like ours, and are of human race;
And say the scheme so wise, so nobly plann’d.
For rooting out these serpents from the land,
To kill their squaws, their children yet unborn,
To burn their wigwams, and pull up their corn;
By sword and fire to purge the unhallow’d train,
And kindly send them to a world of pain,
Is vile, unjust, absurd:—as if our God
One single thought on Indians e’er bestow’d,
To them his care extends, or even knew,
306
Before Columbus told him where they grew.”

On another occasion when Brackenridge was a candidate for


Congress, he published in the Aurora an appeal to the electors of his
Congressional District in which he animadverted harshly on the
educational accomplishments of General John Woods, his Federalist
opponent. This presented another opportunity for the clever writers
of The Echo to burlesque a leading Republican. The Echo gibed:

“But, to return to Woods,—to speak my mind,


His education was of narrow kind;
Nor has he since to learning much applied,
But smil’d with calm contempt on pedant pride.
His mental powers, howe’er, superior shine,
His genius glows with energy divine.
But when with mine in competition plac’d.
How low his powers, his genius sinks debas’d,
Has not my genius shone with peerless ray,
And o’er Ohio pour’d the blaze of day?
Have not my writings spread abroad my name,
And bards consign’d me to immortal fame?
Then shall John Woods with me presume to vie,
307
The brightest star that decks the western sky?”

Cramer’s books covered the entire range of literary endeavor


and among them were a majority of the contemporary publications.
The French Revolutionary movement was well represented. A work
coming under this designation was the Life and Campaigns of
General Count Alexander Suwarrow, which was of interest also
because Suwarrow’s title to fame rested at least partly on the fact
that he was the originator of the high tasseled-boot, much worn both
in military and civil circles after the year 1800. There was a flood of
Bonapartist literature. A book of this class which had a local interest
was the Life of General Jean Victor Moreau. After being exiled from
France on account of conspiring against Napoleon, this officer had
come to the United States in 1805, and made a tour of the Ohio and
Mississippi Valleys. Having passed through Pittsburgh, his name
was well known there. Works of travel were numerous. Conspicuous
in biography were the lives of Washington, Franklin, and Kotzebue,
the German playwright and novelist, then at the height of his career.
There were histories of various European countries, and William
Winterbotham’s History of the American United States. The History
of Women, if at hand to-day, would be of interest to that large body
of women who are making such herculean efforts to obtain greater
rights for their sex. Among the notable books of the day was Thomas
Jefferson’s Notes on the State of Virginia. Two editions had been
published prior to Jefferson’s becoming President. After the election
in 1800, the work was republished in a large octavo volume, for
308
which Cramer was agent in Pittsburgh. Another book which
attracted considerable attention was the History of John Adams,
Esquire, late president of the United States, by John Wood. It was a
rank Republican account of a most interesting period. It was printed
and ready for publication in December, 1801, but was suppressed at
the instigation of Aaron Burr, as being incorrect and libelous. The
book was finally published in 1802. A companion-piece to Wood’s
book, was the one by James Cheetham, which gave an account of
the suppression. It was entitled, A Narrative of the Suppression by
Col. Burr of the History of the Administration of John Adams, by a
Citizen of New York.
Philosophy was not neglected. Representative of that science
were William Enfield’s History of Philosophy, William Smellie’s
Philosophy of Natural History, Francis Hutchinson’s System of Moral
Philosophy, and Count Volney’s Law of Nature. Books relating to
trades, included the Miller and Millwright’s Guide; the Young
Carpenter’s Assistant; the New System of Gardening; the Dictionary
of Husbandry; Washington’s Letters to Arthur Young; the English
Gardener; and Elements of Architecture. Freemasonry was
described in William Preston’s Illustrations of Masonry. Among books
relating to the professions, those pertaining to divinity were most
numerous. The Methodists had increased in numbers and were in
better standing in the community. John Wrenshall was addressed as
the “Rev.” John Wrenshall, and Cramer began to sell the Memoirs of
George Whitfield, the famous exponent of Methodism. Law books
were a close second to those of divinity. There were books on state,
national, and international law. In medicine there were books for
family use, and books for physicians.
Belles-lettres and poetry formed an important department.
Predominant in belles-lettres were the writings of Addison, Steele,
and Pope in the Spectator, and its successors, the Guardian, and
the Tattler; Dr. Johnson, in his “Rambler”; and Salmagundi, when it
appeared in 1807. Junius’s Letters; the works of Lawrence Sterne;
the Posthumous Works of Jonathan Swift; and Peter Pindar’s Satires
were other books in this department. In the selection of plays, those
of Kotzebue were prominent. The English plays were represented by
George Colman, the younger’s, The Poor Gentleman, a comedy
produced in Covent Garden in 1801, and by Thomas Morton’s,
Speed the Plough, produced in 1798. Because of its authorship, The
Battle of Bunker Hill, by Judge Hugh Henry Brackenridge, had a
local interest. In the realm of poetry, were the poems of John
Pomfret, Robert Burns, Dr. Thomas Brown, Alexander Pope, John
Milton, Thomas Moore, Allan Ramsay, and Robert Southey. In this
class was Thomas Campbell’s The Pleasures of Hope; James
Beattie’s The Minstrel; Samuel Rogers’s Pleasures of Memory;
William Cowper’s Beauties of Cowper, and The Task; Joel Barlow’s
The Vision of Columbus; Robert Bloomfield’s, The Farmer’s Boy,
and A Song; James Thomson’s Seasons. Zaida, by Kotzebue;
Charlotte Temple, by Mrs. Susanna Rowson, and Don Quixote were
popular romances. In colonial days, and in the early days of the
republic, little stitched pamphlets, called chapbooks, because largely
circulated by itinerant vendors, or chapmen, were much in vogue.
Books in this form for children had a large circulation, and Cramer
carried an interesting list.
Cramer’s upright nature often led him to express opinions that
were contrary to the views obtaining in publications of his firm.
Cuming in his Tour of the Western Country, in the reference to
Pittsburgh had written: “Amusements are also a good deal attended
to, particularly the annual horse races.” On this observation Cramer
commented in a note: “We are sorry to have to acknowledge that
horse racing contrary to the express law of the State, has been more
or less practiced within the vicinity of this place for a few years back;
but we are pleased with the prospect of having it totally abolished by
the influence of its evident impropriety, danger, and wickedness,
309
operating on the minds of the more thoughtful and judicious.”
That Cramer was not alone in condemning the horse races is
apparent from a communication which had appeared in the
310
Pittsburgh Gazette six years earlier. This writer designated the
races as “a fruitful seminary of vice.” He declared that the “schools
and shops are shut up or deserted, and the youth of both sexes run
to harm, folly, and debauchery.... The money, too, which ought to be
expended in the honest maintenance of families and the payment of
debts is squandered on sharpers, gamblers and sutlers.”
If some fact or custom was referred to, which Cramer considered
morally wrong, or which might disparage Pittsburgh in the eyes of
the world at large, he spoke out vigorously in opposition. In the
311
Navigator for 1811, the statement was made that there were “two
or three whisky distilleries in the town.” This was immediately
followed in the text by a disapproval of distilleries, and a quaint
homily on the evils of intemperance. “We cannot say anything in
praise of these,” Cramer wrote. “Whisky as a medicine is good, that
is, to take it only when the system requires it and no more than is
sufficient to perform the part of a gentle stimulant; but to drink it as is
now universally practiced, is destructive of health, strength, morals,
religion, and honesty; and is a serious national calamity, in which
man sinks in the estimation of himself, and becomes an abhorrence
in the eyes of God.”
Cramer’s career was short. He had never been robust, and close
attention to business had undermined his constitution; consumption
developed. He attempted in vain to obtain relief in southern travel,
and died on August 1, 1813, just before reaching his fortieth year, at
Pensacola, Florida, while on the way to Havana, the journey having
been recommended by his physician. In Pensacola his remains were
buried and there they lie in an unmarked grave. To the last he was
planning new business projects, and preserved his cheerfulness to
the end. Not once was he known to be fretful or ill-natured. He left
his widow and one child, a daughter, Susan. The firm was continued
for many years, first by the widow, in conjunction with John Spear,
and after her death on May 5, 1818, by the daughter. The affairs of
the partnership were not wound up until July 6, 1835.
In early life the daughter married Dr. J. B. Cochran in Pittsburgh.
Becoming a widow, she removed to Beaver, Pennsylvania, with her
three children. Her children were Zadok Cramer Cochran, James
Spear Cochran, and Mary Cochran. After their mother’s death in
1854, the children removed to Coatesville, Pennsylvania. From
Coatesville they went to Freeport, Illinois. Here the two sons
engaged in teaching and conducted an academy. James later took
up the study of the law, and was admitted to the Bar. Drifting into
politics he was elected to the State Senate. The two brothers are
both dead, but the sister is still living, being the wife of Joseph
Emmert, of Freeport, Illinois.
REFERENCES
Chapter IX

285
Tree of Liberty, August 7, 1802.
286
Pittsburgh Gazette, October 10, 1800.
287
Tree of Liberty, January 16, 1802.
288
Tree of Liberty, October 8, 1803.
289
Pittsburgh Gazette, April 19, 1808.
290
Tree of Liberty, May 21, 1803.
291
Pittsburgh Gazette, January 9, 1801.
292
The Commonwealth, August 14, 1805.
293
The Commonwealth, September 29, 1811.
294
Tree of Liberty, November 6, 1802.
295
The Navigator, Pittsburgh, 1814, pp. 272–277.
296
The Navigator, Pittsburgh, 1814, pp. 31–32.
297
Tree of Liberty, June 4, 1803.
298
The Pittsburgh Magazine Almanac for 1810.
299
The Pittsburgh Magazine Almanac for 1807.
300
Reuben Gold Thwaites: Fortescue Cuming, Sketches of a
Tour to the Western Country in 1807–1809, Cleveland,
Ohio, 1904, p. 9.
301
H. M. Brackenridge: Views of Louisiana, Pittsburgh, 1814,
p. 4.
302
Pittsburgh Gazette, January 28, 1814.
303
The Recluse: The Art of Domestic Happiness and Other
Poems, Pittsburgh, 1817, pp. 1–317.
304
The Western Gleaner or Repository for Arts, Sciences, and
Literature, Pittsburgh, 1814, vol. ii., pp. 185–186.
305
David Bruce: Poems entirely in the Scottish Dialect,
originally written under the signature of the Scots-
Irishman, Washington, 1801, p. 46.
306
The Echo, pp. 32–39.
307
The Echo, pp. 150–151.
308
Tree of Liberty, January 24, 1801.
309
F. Cuming: Sketches of a Tour to the Western Country in
1807–1809, Pittsburgh, 1810, p. 231.
310
Pittsburgh Gazette, October 16, 1801.
311
The Navigator, Pittsburgh, 1811, p. 63.
INDEX

Adams, George, 114, 128


Adams, Henry, 81
Adams, John, 165;
History of, 200
Addison, Alexander, Judge, impeachment of, 47–48, 139, 195;
Federalist, 131, 132
Adgate & Co., 104
Allegheny County, 22, 23
Allegheny County Courts, 157
Allegheny County Militia, 74, 75
Almanacs, 4, 165, 172;
Cramer’s, 172–174;
“Common,” 174;
“Magazine,” 174
Alsop, Richard, 197
Amberson, Beelen, & Anshutz, 152
American Coast Pilot, 182
Amusements, 67–74, 186, 203
Arnold, actor, 70
Ash, Thomas, 181
Ashton, Capt. Joseph, 95, 151
Ashton & Denny, 152
Audrian, Peter, 49
Aurora, newspaper, 51

Baird, Thomas, 96, 128, 130


Baldwin, Henry, 96, 141, 148, 149;
attacked by Pentland, 145, 146
Balls, 68, 72;
for Gen. Lee, 69
Bank of Pennsylvania, branch, 93, 116
Baptists, 95
Barker, Abner, 116, 117, 132
Barker, Jeffe, 116, 117
Barker, Jeremiah, 117, 132
Barrett, William, 121
Bartholf, Francis, Baron de Belen, 152
Bates, Edward, 145
Bates, Frederick, 143, 145, 148
Bates, James, 145, 148
Bates, Tarleton, 96, 131, 141 ff.;
duel, 142–150
Bausman, Elizabeth, marriage, 125
Bausman, Jacob, 30;
varied career, 41–42
Bausman, Nicholas, 41
Bayard, Colo. Stephen, 5
Beaujolais, Count of, 111
Bedford County, 2
Beelen, Anthony, 96, 150, 152
Beelen, Francis, 152
Beltzhoover, Melchoir, 41
“Black Charley,” 39
Blunt, Edmund, American Coast Pilot, 182
Boat yards, 8, 40, 92
Books, in households, 14;
sale of, 14, 15, 27;
interest in, 27;
most popular, 169–171;
Cramer’s publications, 189 ff.;
contemporaneous history, 190;
of local interest, 195–196;
contemporary publications, 199;
in Cramer’s bookstore, 199 ff.
Bookstores, 95;
first, 27;
Cramer’s “Pittsburgh Bookstore,” 116, 163, 186, 188, 199 ff.;
Christy’s and Wrenshall’s, 184
Boyd, John, 15, 16
Brackenridge, Henry M., Judge, recollections of Grant’s Hill, 71;
account of horse racing, 73;
on the Court of Allegheny County, 118;
Views of Louisiana, 193
Brackenridge, Hugh Henry, Judge, 49, 71;
author, 26, 195, 197, 198, 202;
Modern Chivalry, 26;
political leader, 55;
Fourth of July speech, 56;
Justice of Supreme Court, 58;
opposed to Brison, 58 ff.;
and the Tree of Liberty, 62–63;
and the Whisky Insurrection, 81, 106, 124, 195;
Freemason, 95;
residence, 97, 115;
antagonizes soldiers, 115–116;
candidate for Congress, 125, 198;
attacks on, 133–134;
and impeachment of Addison, 139;
settles Gilkison’s affairs, 163;
Bruce’s lines to, 196;
satires on, in The Echo, 197–198
Braddocksfield, 119
Brantz, Lewis, notes on Pittsburgh, 9, 30
Breweries, 78, 92
Brickyards, 31, 92

You might also like