Essential Discrete Mathematics for Computer Science 1st Edition Harry Lewis 2024 Scribd Download
Essential Discrete Mathematics for Computer Science 1st Edition Harry Lewis 2024 Scribd Download
com
https://textbookfull.com/product/essential-discrete-
mathematics-for-computer-science-1st-edition-harry-lewis/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/discrete-mathematics-for-computer-
science-1st-edition-jon-pierre-fortney/
textboxfull.com
https://textbookfull.com/product/ideas-that-created-the-future-
classic-papers-of-computer-science-1st-edition-harry-r-lewis/
textboxfull.com
https://textbookfull.com/product/imaginary-mathematics-for-computer-
science-1st-edition-vince/
textboxfull.com
https://textbookfull.com/product/logic-lecture-notes-for-philosophy-
mathematics-and-computer-science-andrea-iacona/
textboxfull.com
Discrete Mathematics 8e Richard Johnsonbaugh
https://textbookfull.com/product/discrete-mathematics-8e-richard-
johnsonbaugh/
textboxfull.com
https://textbookfull.com/product/the-beauty-of-mathematics-in-
computer-science-1st-edition-jun-wu/
textboxfull.com
https://textbookfull.com/product/journey-into-discrete-
mathematics-1st-edition-owen-byer/
textboxfull.com
https://textbookfull.com/product/discrete-mathematics-with-ducks-
second-edition-belcastro/
textboxfull.com
https://textbookfull.com/product/discrete-mathematics-and-
applications-2nd-edition-ferland/
textboxfull.com
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page i — ©#1Princeton University Press, 2018
i Please do not circulate. i
ESSENTIAL DISCRETE
MATHEMATICS FOR
COMPUTER SCIENCE
−
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page ii — ©#2
Princeton University Press, 2018
i Please do not circulate. i
−1
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page iii —©#3
Princeton University Press, 2018
i Please do not circulate. i
ESSENTIAL DISCRETE
MATHEMATICS FOR
COMPUTER SCIENCE
−
PR I NC ETON U N I V E R SI T Y PR E S S ∼ PR I NC ETON A ND OX FOR D 0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page iv — ©#4
Princeton University Press, 2018
i Please do not circulate. i
Copyright
c 2019 by Harry Lewis and Rachel Zax
press.princeton.edu
LCCN
ISBN 978-0-691-17929-2
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page v — ©#5Princeton University Press, 2018
i Please do not circulate. i
−
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page vi — ©#6
Princeton University Press, 2018
i Please do not circulate. i
−1
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page vii —© #7
Princeton University Press, 2018
i Please do not circulate. i
−
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page viii —© #8
Princeton University Press, 2018
i Please do not circulate. i
−1
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page ix — ©#9
Princeton University Press, 2018
i Please do not circulate. i
CONTENTS
Preface xi
4 Strong Induction 39
5 Sets 49
6 Relations and Functions 59
8 Structural Induction 79
9 Propositional Logic 89
17 Connectivity 173
18 Coloring 179
22 Counting 233
23 Counting Subsets 243 −
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page x — ©#10
Princeton University Press, 2018
i Please do not circulate. i
x contents
24 Series 261
26 Probability 297
Index 381
−1
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:40 — page xi — ©#11
Princeton University Press, 2018
i Please do not circulate. i
PREFACE
This introductory text treats the discrete mathematics that computer scien-
tists should know but generally do not learn in calculus and linear algebra
courses. It aims to achieve breadth rather than depth and to teach reasoning
as well as concepts and skills.
We stress the art of proof in the hope that computer scientists will learn to
think formally and precisely. Almost every formula and theorem is proved
in full. The text teaches the cumulative nature of mathematics; in spite of the
breadth of topics covered, seemingly unrelated results in later chapters rest
on concepts derived early on.
The text requires precalculus and occasionally uses a little bit of calculus.
Chapter 21, on order notation, uses limits, but includes a quick summary of
the needed basic facts. Proofs and exercises that use basic facts about deriva-
tives and integrals, including l’Hôpital’s rule, can be skipped without loss of
continuity.
A fast-paced one-semester course at Harvard covers most of the material
in this book. That course is typically taken by freshmen and sophomores as
a prerequisite for courses on theory of computation (automata, computabil-
ity, and algorithm analysis). The text is also suitable for use in secondary
schools, for students of mathematics or computer science interested in
topics that are mathematically accessible but off the beaten track of the
standard curriculum.
The book is organized as a series of short chapters, each of which might
be the subject of one or two class sessions. Each chapter ends with a brief
summary and about ten problems, which can be used either as homework
or as in-class exercises to be solved collaboratively in small groups.
Instructors who choose not to cover all topics can abridge the book in
several ways. The spine of the book includes Chapters 1–8 on foundational
concepts, Chapters 13–18 on digraphs and graphs, and Chapters 21–25 on
order notation and counting. Four blocks of chapters are optional and can
be included or omitted at the instructor’s discretion and independently of
each other:
• Chapters 9–12 on logic;
−
• Chapters 19–20 on automata and formal languages; 0
1
i i
i i
i i
xii preface
−1
0
1
i i
i i
i i
ESSENTIAL DISCRETE
MATHEMATICS FOR
COMPUTER SCIENCE
−
0
1
i i
i i
i i
−1
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 1 — ©#1Princeton University Press, 2018
i Please do not circulate. i
Chapter 1
How do we know that a computer program produces the right results? How
do we know that a program will run to completion? If we know it will
stop eventually, can we predict whether that will happen in a second, in
an hour, or in a day? Intuition, testing, and “it has worked OK every time
we tried it” should not be accepted as proof of a claim. Proving something
requires formal reasoning, starting with things known to be true and con-
necting them together by incontestable logical inferences. This is a book
about the mathematics that is used to reason about the behavior of computer
programs.
The mathematics of computer science is not some special field. Com-
puter scientists use almost every branch of mathematics, including some
that were never thought to be useful until developments in computer science
created applications for them. So this book includes sections on mathemat-
ical logic, graph theory, counting, number theory, and discrete probability
theory, among other things. From the standpoint of a traditional mathemat-
ics curriculum, this list includes apples and oranges. One common feature
of these topics is that all prove useful in computer science. Moreover, they
are all discrete mathematics, which is to say that they involve quantities that
change in steps, not continuously, or are expressed in symbols and structures
rather than numbers. Of course, calculus is also important in computer sci-
ence, because it assists in reasoning about continuous quantities. But in this
book we will rarely use integrals and derivatives.
.
One of the most important skills of mathematical thinking is the art of
generalization. For example, the proposition
6 is true, but very specific (see Figure 1.1). The sides of lengths 1 and 2 would
Figure 1.1. Can there be a triangle have to join the side of length 6 at its two ends, but the two short sides −
with sides of lengths 1, 2 and 6? together aren’t long enough to meet up at the third corner. 0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 2 — ©#2Princeton University Press, 2018
i Please do not circulate. i
Well, so what? Put two people together and they may or may not have
been born on the same day of the week. Yet there is something going on
here that can be generalized. As long as there are at least eight people, some
two of them must have been born on the same day of the week, since a week
has only seven days. Some statement like (1.1) must be true, perhaps with
a different pair of names and a different day of the week. So here is a more
general proposition.
In any group of eight people, some two of them were born on the
same day of the week.
But even that isn’t really general. The duplication has nothing to do with
properties of people or days of the week, except how many there are of each.
For the same reason, if we put eight cups on seven saucers, some saucer
would have two cups on it. In fact there is nothing magic about “eight” and
“seven,” except that the one is larger than the other. If a hotel has 1000 rooms
and 1001 guests, some room must contain at least two guests. How can we
state a general principle that covers all these cases, without mentioning the
irrelevant specifics of any of them?
First, we need a new concept. A set is a collection of things, or elements.
−1
The elements that belong to the set are called its members. The members of
0
a set must be distinct, which is another way of saying they are all different
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 3 — ©#3Princeton University Press, 2018
i Please do not circulate. i
from each other. So the people mentioned in (1.1) form a set, and the days
of the week form another set. Sometimes we write out the members of a set
explicitly, as a list within curly braces {}:
When we write out the elements of a set, their order does not matter—in any
order it is still the same set. We write x ∈ X to indicate that the element x is
a member of the set X. For example, Charlie ∈ P and Thursday ∈ D.
We need some basic terminology about numbers in order to talk about
sets. An integer is one of the numbers 0, 1, 2, . . . , or −1, −2, . . . . The real
numbers are all the numbers on the number line, including √ all the integers
and also all the numbers in between integers, such as 12 , − 2, and π . A num-
ber is positive if it is greater than 0, negative if it is less than 0, and nonnegative
if it is greater than or equal to 0.
For the time being, we will be discussing finite sets. A finite set is a set that
can (at least in principle) be listed in full. A finite set has a size or cardinality,
which is a nonnegative integer. The cardinality of a set X is denoted |X|.
For example, in the example of people and the days of the week on which
they were born, |P| = 8 and |D| = 7, since eight people are listed and there
are seven days in a week. A set that is not finite—the set of integers, for
example—is said to be infinite. Infinite sets have sizes too—an interesting
subject to which we will return in our discussion of infinite sets in Chapter 7.
Now, a function from one set to another is a rule that associates each
member of the first set with exactly one member of the second set. If f is
a function from X to Y and x ∈ X, then f (x) is the member of Y that the
function f associates with x. We refer to x as the argument of f and f (x)
as the value of f on that argument. We write f : X → Y to indicate that f is
a function from set X to set Y. For example, we could write b : P → D to
denote the function that associates each of the eight friends with the day of
the week on which he or she was born; if Charlie was born on a Thursday,
then b(Charlie) = Thursday.
A function f : X → Y is sometimes called a mapping from X to Y, and f
is said to map an element x ∈ X to the element f (x) ∈ Y. (In the same way, a
real map associates a point on the surface of the earth with a point on a sheet
of paper.)
Finally, we have a way to state the general principle that underlies the
example of (1.1):
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 4 — ©#4Princeton University Press, 2018
i Please do not circulate. i
? pigeonholes and every pigeon goes into a pigeonhole, then some pigeonhole
must have more than one pigeon in it. The pigeons are the members of X and
the pigeonholes are the members of Y (Figure 1.3).
We will provide a formal proof of the Pigeonhole Principle on page 34,
once we have developed some of the basic machinery for doing proofs. For
now, let’s scrutinize the statement of the Pigeonhole Principle with an eye
X Y
Figure 1.3. The Pigeonhole
toward understanding mathematical language. Here are some questions we
Principle. If |X| > |Y| and f is any might ask:
function from X to Y, then the
1. What are X and Y?
values of f must be the same for
some two distinct members of X. They are finite sets. To be absolutely clear, we might have begun the
statement with the phrase, “For any finite sets X and Y,” but the
assertion that f is a function from X to Y makes sense only if X and Y
are sets, and it is understood from context that the sets under
discussion are finite—and we therefore know how to compare their
sizes.
2. Why did we choose “x1 ” and “x2 ” for the names of elements of X?
We could in principle have chosen any variables, “x” and “y” for
example. But using variations on “X” to name elements of the set X
suggests that x1 and x2 are members of the set X rather than the set Y.
So using “x1 ” and “x2 ” just makes our statement easier to read.
3. Was the phrase “such that x1 = x2 ” really necessary? The sentence is
simpler without it, and seems to say the same thing.
Yes, the “x1 = x2 ” is necessary, and no, the sentence doesn’t say the
same thing without it! If we didn’t say “x1 = x2 ,” then “x1 ” and “x2 ”
could have been two names for the same element. If we did not
stipulate that x1 and x2 had to be different, the proposition would not
have been false—only trivial! Obviously if x1 = x2 , then f (x1 ) = f (x2 ).
That is like saying that the mass of Earth is equal to the mass of the
third planet from the sun. Another way to state the Pigeonhole
Principle would be to say, “there are distinct elements x1 , x2 ∈ X such
that f (x1 ) = f (x2 ).”
One more thing is worth emphasizing here. A statement like “there are
elements x1 , x2 ∈ X with property blah” does not mean that there are exactly
two elements with that property. It just means that at least two such elements
exist for sure—maybe more, but definitely not less.
.
Mathematicians always search for the most general form of any principle,
because it can then be used to explain more things. For example, it is equally
obvious that we can’t put 15 pigeons in 7 pigeonholes without putting at least
3 pigeons in some pigeonhole—but there is no way to derive that from the
−1
Pigeonhole Principle as we stated it. Here is a more general version:
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 5 — ©#5Princeton University Press, 2018
i Please do not circulate. i
Theorem 1.3. Extended Pigeonhole Principle. For any finite sets X and Y
and any positive integer k such that |X| > k · |Y|, if f : X → Y, then there are at
least k + 1 distinct members x1 , . . . , xk+1 ∈ X such that f (x1 ) = . . . = f (xk+1 ).
|X|
|Y|
values of x.
Proof. Let m = |X| and n = |Y|.If n | m, then this is the Extended Pigeonhole
Principle with k = m m
n − 1 = n − 1. If n m, then again this is the Extended
Pigeonhole Principle with k = m n − 1, since that is the largest integer less
|X|
than |Y| . ■
.
Once stated in their general form, these versions of the Pigeonhole Prin-
ciple seem to be fancy ways of saying something obvious. In spite of that,
we can use them to explain a variety of different phenomena—once we −
figure out what are the “pigeons” and the “pigeonholes.” Let’s close with an 0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 6 — ©#6Princeton University Press, 2018
i Please do not circulate. i
We’ll prove this theorem in Chapter 4, but make some use of it right now.
The prime decomposition of a number n is that unique product
e
n = pe11 · . . . · pkk , (1.6)
where the pi are primes in increasing order and the ei are positive integers.
e
For example, 180 = 22 · 32 · 51 , and there is no other product pe11 · . . . · pkk
equal to 180, where p1 < p2 < . . . < pk , all the pi are prime, and the ei are
integer exponents.
The prime decomposition of the product of two integers m and n com-
bines the prime decompositions of m and of n—every prime factor of m · n
is a prime factor of one or the other.
where the pi are prime. But then p must be one of the pi , and each pi must
appear in the unique prime decomposition of either m or n. ■
18 = 21 · 32 (exponents of 2, 3, 5 are 1, 2, 0)
1 1
10 = 2 · 5 (exponents of 2, 3, 5 are 1, 0, 1)
2 2 1
−1 180 = 2 · 3 · 5
0 = 21+1 · 32+0 · 50+1 .
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 7 — ©#7Princeton University Press, 2018
i Please do not circulate. i
“Arbitrarily large” means that for every n > 0, there is a prime number
greater than n.
Proof. Pick some value of k for which we know there are at least k primes,
and let p1 , . . . , pk be the first k primes in increasing order. (Since p1 = 2,
p2 = 3, p3 = 5, we could certainly take k = 3.) We’ll show how to find a prime
number greater than pk . Since this process could be repeated indefinitely,
there must be infinitely many primes.
Consider the number N that is one more than the product of the first k
primes:
N = (p1 · p2 · . . . · pk ) + 1. (1.9)
“Between a and b inclusive” means including all numbers that are ≥ a and
also ≤ b—so including both 2 and 40 in this case.
Solution to example. Observe first that there are 12 prime numbers less than
or equal to 40: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, no two of which share
a factor greater than 1. Let’s define P to be this set of 12 prime numbers. −
(We needed to specify that m ≥ 13, because the claim would be false with 0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 8 — ©#8Princeton University Press, 2018
i Please do not circulate. i
Chapter Summary
Problems
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:41 — page 9 — ©#9Princeton University Press, 2018
i Please do not circulate. i
1.2. Let f (n) be the largest prime divisor of n. Can it happen that x < y but
f (x) > f (y)? Give an example or explain why it is impossible.
1.3. Under what circumstances is x = x − 1?
1.4. Imagine a 9 × 9 square array of pigeonholes, with one pigeon in each
pigeonhole. (So 81 pigeons in 81 pigeonholes—see Figure 1.4.) Suppose that all
at once, all the pigeons move up, down, left, or right by one hole. (The pigeons
on the edges are not allowed to move out of the array.) Show that some pigeon-
hole winds up with two pigeons in it. Hint: The number 9 is a distraction. Try
some smaller numbers to see what is going on.
1.5. Show that in any group of people, two of them have the same number of
friends in the group. (Some important assumptions here: no one is a friend of
him- or herself, and friendship is symmetrical—if x is a friend of y then y is a
friend of x.)
1.6. Given any five points on a sphere, show that four of them must lie within a
Figure 1.4. Each pigeonhole in a closed hemisphere, where “closed” means that the hemisphere includes the circle
9 × 9 array has one pigeon. All that divides it from the other half of the sphere. Hint: Given any two points on a
simultaneously move to another sphere, one can always draw a “great circle” between them, which has the same
pigeonhole that is immediately
circumference as the equator of the sphere.
above, below, to the left, or to the
right of its current hole. Must some 1.7. Show that in any group of 25 people, some three of them must have
pigeonhole wind up with two birthdays in the same month.
pigeons?
1.8. A collection of coins contains six different denominations: pennies, nick-
els, dimes, quarters, half-dollars, and dollars. How many coins must the
collection contain to guarantee that at least 100 of the coins are of the same
denomination?
1.9. Twenty-five people go to daily yoga classes at the same gym, which offers
eight classes every day. Each attendee wears either a blue, red, or green shirt to
class. Show that on a given day, there is at least one class in which two people
are wearing the same color shirt.
1.10. Show that if four distinct integers are chosen between 1 and 60 inclusive,
some two of them must differ by at most 19.
1.11. Find a k such that the product of the first k primes, plus 1, is not prime,
but has a prime factor larger than any of the first k primes. (There is no trick for
solving this. You just have to try various possibilities!)
1.12. Show that in any set of 9 positive integers, some two of them share all of
their prime factors that are less than or equal to 5.
1.13. A hash function from strings to numbers derives a numerical hash value
h(s) from a text string s; for example, by adding up the numerical codes for the
characters in s, dividing by a prime number p, and keeping just the remainder.
The point of a hash function is to yield a reproducible result (calculating h(s)
twice for the same string s yields the same numerical value) and to make it likely
that the hash values for different strings will be spread out evenly across the
possible hash values (from 0 to p − 1). If the hash function has identical hash −
values for two different strings, then these two strings are said to collide on that 0
1
i i
i i
i i
hash value. We count the number of collisions on a hash value as 1 less than the
number of strings that have that hash value, so if 2 strings have the same hash
value there is 1 collision on that hash value. If there are m strings and p possible
hash values, what is the minimum number of collisions that must occur on the
hash value with the most collisions? The maximum number of collisions that
might occur on some hash value?
−1
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:42 — page 11 —©#1Princeton University Press, 2018
i Please do not circulate. i
Chapter 2
If there are more pigeons than pigeonholes and every pigeon goes
into a pigeonhole, then some pigeonhole must contain more than
one pigeon.
But suppose your friend did not believe this statement. How could you
convincingly argue that it was true?
You might try to persuade your friend that there is no way the opposite
could be true. You could say, let’s imagine that each pigeonhole has no more
than one pigeon. Then we can count the number of pigeonholes, and since
each pigeonhole contains zero or one pigeons, the number of pigeons can be
at most equal to the number of pigeonholes. But we started with the assump-
tion that there were more pigeons than pigeonholes, so this is impossible!
Since there is no way that every pigeonhole can have at most one pigeon,
some pigeonhole must contain more than one pigeon, and that is what we
were trying to prove.
In this chapter, we’ll discuss how to take informal, specific arguments
like this and translate them into formal, general, mathematical proofs. A
proof is an argument that begins with a proposition (“there are more pigeons
than pigeonholes”) and proceeds using logical rules to establish a conclusion
(“some pigeonhole has more than one pigeon”). Although it may seem easier
to write (and understand!) an argument in plain English, ordinary language
can be imprecise or overly specific. So it is clearer, as well as more general,
to describe a mathematical situation in more formal terms.
For example, what does the statement
mean? It might mean that for every person in the world, there is someone
whom that person loves—so different lovers might have different beloveds.
In semi-mathematical language, we would state that interpretation as −
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:42 — page 12 —©#2Princeton University Press, 2018
i Please do not circulate. i
But there is another interpretation of (2.1), namely that there is some special
person whom everybody loves, or in other words,
There is a big difference between these interpretations, and one of the pur-
poses of mathematical language is to resolve such ambiguities of natural
language.
The phrases “for all,” “for any,” “for every,” “for some,” and “there exists”
are called quantifiers, and their careful use is an important part of mathe-
matical discourse. The symbol ∀ stands for “for all,” “for any,” or “for every,”
and the symbol ∃ stands for “there exists” or “for some.” Using these symbols
saves time, but in writing mathematical prose they can also make statements
more confusing. So we will avoid them until we discuss the formalization of
quantificational logic, in Chapter 12.
Quantifiers modify predicates, such as “A loves B.” A predicate is a tem-
plate for a proposition, taking one or more arguments, in this case A and B.
On its own, a predicate has no truth value: without knowing the values of
A and B, “A loves B” cannot be said to be either true or false. It takes on a
truth value only when quantified (as in (2.2) and (2.3)), or when applied to
specific arguments (for example, “Romeo loves Juliet”), and may be true for
some arguments but false for others.
Let’s continue with a simple example of a mathematical statement and its
proof.
Theorem 2.4. Odd Integers. Every odd integer is equal to the difference
between the squares of two integers.
First, let’s make sure we understand the statement. An odd integer is any
integer that can be written as 2k + 1, where k is also an integer. The square of
an integer n is n2 = n · n. For every value of k, Theorem 2.4 says that there are
two integers—call them m and n—such that if we square them and subtract
one result from the other, the resulting number is equal to 2k + 1. (Note the
quantifiers: for every k, there exist m and n, such that . . . .)
An integer m is said to be a perfect square if it is the square of some integer,
so a compact way to state the theorem is to say that every odd integer is the
difference of two perfect squares. It is typical in mathematics, as in this case,
that defining just the right concepts can result in very simple phrasing of
general truths.
The next step is to convince ourselves of why the statement is true. If the
reason is not obvious, it may help to work out some examples. So let’s start
−1 by listing out the first few squares:
0
1
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:42 — page 13 —©#3Princeton University Press, 2018
i Please do not circulate. i
02 = 0
12 = 1
22 = 4
32 = 9
42 = 16.
We can confirm that the statement is true for a few specific odd integers,
say 1, 3, 5, and 7:
1 = 1 − 0 = 12 − 0 2
3 = 4 − 1 = 2 2 − 12
5 = 9 − 4 = 3 2 − 22
7 = 16 − 9 = 42 − 32 .
After these examples we might notice a pattern: so far, all of the odd integers
are the difference between the squares of two consecutive integers: 0 and 1,
then 1 and 2, 2 and 3, and 3 and 4. Another observation—those consecutive
integers add up to the target odd integer: 0 + 1 = 1, 1 + 2 = 3, 2 + 3 = 5,
and 3 + 4 = 7. So we might conjecture that for the odd integer 2k + 1, the
integers that should be squared and subtracted are k + 1 and k. Let’s try that:
(k + 1)2 − k2 = k2 + 2k + 1 − k2 ,
which simplifies to 2k + 1.
So our guess was right! And by writing it out using the definition of an
odd integer (2k + 1) rather than looking at any specific odd integer, we’ve
confirmed that it works for all odd integers. It even works for negative odd
integers (since those are equal to 2k + 1 for negative values of k), although
the idea was inspired by trying examples of positive odd integers.
This chain of thought shows how we might arrive at the idea, but it’s too
meandering for a formal proof. The actual proof should include only the
details that turned out to be relevant. For instance, the worked-out examples
don’t add anything to the argument—we need to show that the statement is
true all the time, not just for the examples we tried—so they should be left
out. Here is a formal proof of Theorem 2.4:
Proof. Any odd integer can be written as 2k + 1 for some integer k. We can
rewrite that expression:
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:42 — page 14 —©#4Princeton University Press, 2018
i Please do not circulate. i
Before examining the substance of this proof, a few notes about its style.
First, it is written in full sentences. Mathematical expressions are used for
precision and clarity, but the argument itself is written in prose. Second,
its structure is clear: it starts with the given assumption, that the integer is
odd, and clearly identifies when we have reached the end, by noting that m
and n are the two integers that we sought. Third, it is rigorous: it gives a
mathematical definition for the relevant term (“odd integer”), which forces
us to be precise and explicit; and each step of the proof follows logically and
clearly from the previous steps.
Finally, it is convincing. The proof gives an appropriate amount of detail,
enough that the reader can easily understand why each step is correct, but
not so much that it distracts from the overall argument. For example, we
might have skipped writing out some of the arithmetic, and stated just that
2k + 1 = (k + 1)2 − k2 .
But this equality is not obvious, and a careful reader would be tempted
to double-check it. When we include the intermediate step, the arithmetic
is clearly correct. On the other hand, some assumptions don’t need to be
proven—for example, that it is valid to write
2k + 1 = (k2 + 2k + 1) − k2 .
This relies on the fact that if we move the terms around and group them
in different ways, they still add up to the same value. In this context, these
rules seem rather basic and can be assumed; proving them would distract
the reader from the main argument. But in a text on formal arithmetic, these
properties might themselves be the subject of a proof. The amount of detail
to include depends on the context and the proof ’s intended audience; as a
rule of thumb, write as if you are trying to convince a peer.
Let’s return now to the substance of the above proof. First, it is construc-
tive. The statement to be proved merely asserts the existence of something:
it says that for any odd integer, there exist two integers with the prop-
erty that the difference of their squares is equal to the number we started
with. A constructive proof not only demonstrates that the thing exists, but
shows us exactly how to find it. Given a particular odd integer 2k + 1,
the proof of Theorem 2.4 shows us how to find the two integers that have
the property asserted in the statement of the theorem—one is k + 1 and the
other is k. For example, if the odd integer we wanted to express as the differ-
ence of two squares was 341, the proof shows that we can subtract 1 from 341
and divide by 2, and that integer and the next larger integer are the desired
−1 pair—170 and 171. This is easy to check:
0
1 1712 − 1702 = 29241 − 28900 = 341.
i i
i i
i i
Copyright
“525-76072_ch01_1aP” — 2018/10/6 — 14:42 — page 15 —©#5Princeton University Press, 2018
i Please do not circulate. i
There was no real need to check this particular case, but doing so makes us
more confident that we didn’t make an algebraic mistake somewhere.
In general, a procedure for answering a question or solving a problem is
said to be an algorithm if its description is sufficiently detailed and precise
that it could, in principle, be carried out mechanically—by a machine, or
by a human being mindlessly following instructions. A constructive proof
implicitly describes an algorithm for finding the thing that the proof says
exists. In the case of Theorem 2.4, the proof describes an algorithm that,
given an odd integer 2k + 1, finds integers m and n such that m2 − n2 =
2k + 1.
Not every proof is constructive—sometimes it is possible to show that
something exists without showing how to find it. Such a proof is called
nonconstructive. We will see some interesting examples of nonconstructive
proofs—in fact, the proof of the Pigeonhole Principle will be nonconstruc-
tive, since it cannot identify which pigeonhole has more than one pigeon.
But computer scientists love constructive arguments, because a construc-
tive proof that something exists yields an algorithm to find it—one that a
1 A stronger meaning of the term “con- computer could be programmed to carry out.1
structive” is used in the school of con- One final note about Theorem 2.4. The proof not only is constructive,
structive mathematics, which disallows
any mathematical argument that does but proves more than was asked for. It shows not just that every odd integer
not lead to the construction of the thing is the difference of two squares, but that every odd integer is the difference of
that the argument says exists. In con- the squares of two consecutive integers, as we noted while working through
structive mathematics it is impermissi-
ble to infer from the fact that a statement
the examples. After finishing a proof, it is often worth looking back at it to
is demonstrably false that its negation is see if it yields any interesting information beyond the statement it set out to
necessarily true; the truth of the nega- prove.
tion has to be demonstrated directly.
For example, constructive mathemat- .
ics disallows proofs by contradiction
(explained below) and arguments like A common goal in mathematical proof is to establish that two state-
that of Problem 2.14. Computer scien- ments are equivalent—that one statement is true in all the circumstances
tists prefer arguments that yield algo-
rithms, but generally don’t insist on in which the second statement is true, and vice versa. For example, consider
“constructive proofs” in the strict sense the statement
used by constructive mathematicians.
For us, to show something is true it suf-
The square of an integer is odd if and only if the integer itself is
fices to show that its negation is not true.
odd.
i i
i i
Exploring the Variety of Random
Documents with Different Content
of the world, and things which are despised hath God chosen, yea,
and things that are not, to bring to nought things that are.” And why?
That no flesh should glory in his presence.
It was this, no doubt, that made the Puritans of the last century
such burning and shining lights. When cast out by the black
Bartholomew-act, and driven from their respective charges to preach
in barns and fields, in the highways and hedges, they in an especial
manner wrote and preached as men having authority. Though dead,
by their writings they yet speak: a peculiar unction attends them to
this very hour; and for these thirty years past I have remarked, that
the more, true and vital religion hath revived either at home or
abroad, the more the good old puritanical writings, or the authors of
a like stamp who lived and died in communion of the church of
England, have been called for. Among these may be justly reckoned
those great luminaries, Bishop Jewel, Usher, Andrews, Hall,
Reynolds, Hopkins, Wilkins, Edwards, who, notwithstanding a
difference of judgment in respect to outward church-government, all
agreed (as their printed works manifestly evince) in asserting and
defending the grand essential truths for which the Puritans, though
matters of an inferior nature were urged as a pretext, chiefly
suffered, and were ejected. The impartial Doctor Hodges therefore
(late provost of Oriel College in Oxford) in his elaborate treatise
intitled Elihu, hath done himself honour in saying, that “the old
Puritans and Presbyterians in general, till a division happened lately
among them, deserve praise for their steady and firm adherence to
the principal and fundamental doctrines of christianity.” Their works
still praise them in the gates; and without pretending to a spirit of
prophecy, we may venture to affirm, that they will live and flourish,
when more modern performances, of a contrary cast,
notwithstanding their gaudy and tinselled trappings, will languish and
die in the esteem of those, whose understandings are opened to
discern what comes nearest to the scripture standard.
Christian reader,
Thy soul’s well-wisher in our common Lord,
George Whitefield.
L E T T ER
TO THE
Reverend Dr. D U R E L L,
L E T T ER
TO THE
Reverend Dr. D u r e l l.
London, April 12, 1768.
Reverend Sir,
But what was all this divine apparatus, this divine preaching, this
divine oratory intended for? The following verses inform us: the
hearers of those wonderful things, the spectators of this
transcendently amazing scene, “were pricked to the heart, and were
made to cry out, Men and brethren, what shall we do? And the same
day were added to this infant church about three thousand souls.”
Here were proofs, substantial, incontestable proofs, of the reality of
the resurrection and ascension, and likewise of the efficacy of the all-
powerful intercession of their once crucified, but now exalted Lord;
not only substantial and incontestable, but at the same time entirely
suitable to the nature of his mission, who in the days of his flesh, by
his doctrines and miracles declared, that his only design in coming
into our world, was to save sinners.
But alas! how is this general joy damped, and the pleasing
prospect almost totally eclipsed, by a late melancholy scene
exhibited in that very place, from whence, as from a fountain, many
of their preachers frequently and expresly pray, that pure streams
may for ever flow, to water the city of the living God? You need not
be told, reverend Sir, what place I mean: it was the famous university
of Oxford. Nor need I mention the scene exhibited; it was a tribunal,
a visitatorial tribunal, erected in Edmund-Hall; six pious students,
who promised to be the salt of the earth, and lights of the world,
entire friends to the doctrines and liturgy of our church, by a citation
previously fixed upon the college door, were summoned to appear
before this tribunal. They did appear; and, as some were pleased to
term it, were tried, convicted, and to close the scene, in the chapel of
the same hall, consecrated and set apart for nobler purposes, had
the sentence of expulsion publicly read and pronounced against
them.
The sick, the lame, the blind, the lepers that came to our Lord
for healing, wanted no book to teach them how to express their
wants. Though some were only poor beggars, and others, as the
self-righteous Scribes and Pharisees superciliously chose to term
them, “Gentile dogs,” yet, conscious of their wants, and having a
heart-felt sense of their distress, “out of the abundance of their
hearts their mouths spake;” and the compassionate Emmanuel, who
came to heal our sicknesses and bear our infirmities, sent them
away with a “Go in peace, thy faith hath made thee whole: be it unto
thee even as thou wilt.”
What spirit then must those be of, Reverend Sir, who have lately
joined in pronouncing the sentence of expulsion against six religious
students, not only for having been of trades, and praying extempore,
but for reading and singing hymns also? His Royal Highness the late
Duke of Cumberland, was of a very different disposition, for when
abroad in Germany, in one of our late wars, (as I was informed by a
person then on guard) hearing one evening, as he was passing by, a
company of soldiers singing at some little distance in a cave, he
asked the centinel what noise that was; and being answered, that
some devout soldiers were singing hymns; instead of citing them to
appear before their officers, ordering them to the whipping post, or
commanding them to be drummed out of the regiment; acting like
himself, he only pleasingly replied, “Are they so? Let them go on
then, and be as merry ♦as they can.” In this he acted wisely; for he
knew, and found by repeated experience, as did other commanding
officers, that singing, nay, and praying extempore too, in these
private societies, did not hinder, but rather fitted and animated these
devout soldiers to engage, and to fight their country’s battles in the
field. And it may be presumed, that if these students had not been
expelled for singing hymns, and praying extempore, they certainly
would not have been less, but in all probability much better prepared
for handling the sword of the Spirit, the word of God, and fighting
therewith, either from the press or the pulpit, the battles of the Lord
of hosts.
♦ removed duplicate word “as”
What indeed, but weep and lament! And weep and lament indeed
they must, especially when they hear further, that meeting in a
religious society, giving a word of exhortation, or expounding and
commenting a little now and then upon some portion of scripture, are
not the least of the accusations for which some of these young
worthies had the sentence of expulsion pronounced against them.
What thanks, reverend Sir, he may meet with from the whole
university, I know not; but one thing I know, that he will receive no
thanks for that day’s work from the innumerable company of angels,
the general assembly of the first-born, which are written in heaven,
or from God the judge of all, in that day when Jesus, the Mediator of
the new covenant shall come in his own glory, in the glory of the
Father, and his holy angels, and gather in his elect from all the four
corners of the world.
But what a mercy is it, reverend Sir, that we live under a free
government, under a King whose royal grandfather repeatedly
declared (and he was as good as his word through a long and
glorious reign) that there should be no persecution in his time; under
a King who in his first most gracious and never to be forgotten
speech from the throne, gave his people the strongest assurances
“that it was his fixt purpose, as the best means to draw down the
divine favour on his reign, to countenance and encourage the
practice of true religion and virtue, and maintain the toleration
inviolable.”
You need not be apprized, Reverend Sir, that a design for the
establishment of episcopacy in our islands and plantations, hath
been long upon the tapis; and that it hath been, in part at least, the
subject of annual sermons for several years last past. No longer ago
than in the year 1766, the present Bishop of Landaff insisted upon
the necessity and expediency of it in the most explicit manner; nay,
his Lordship carries the matter so far, as to assure us that this point,
the establishment of episcopacy, being obtained, “the American
church will go out of its infant state; be able to stand upon its own
legs, and without foreign help support and spread itself: and then this
society will have been brought to the happy issue intended.”
Whether these assertions of his Lordship, when weighed in a proper
balance, will not in some degree be found wanting, is not for me to
determine. But supposing the reasoning to be just, and his
Lordship’s assertions true, then I fear it will follow, that a society,
which since its first institution hath been looked upon as a society for
propagating the Gospel, hath been all the while rather a society for
propagating Episcopacy in foreign parts: and if so, and if it ever
should appear, that our Right Reverend Archbishops and Bishops do
in the least countenance and encourage the unscriptural
proceedings at Edmund-Hall, how must it increase the prejudices of
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com