Professional Documents
Culture Documents
Second
Mathematics
Discrete
for
Scientists
Computer
and
Mathematicians
L
Joe
Mott
Kandel
Abraham
P. Baker
Theodore
The
Department
Florida
State
of Mathematics
University
and ComputerScience
Delhi-110
2008
Prftefe
001
Efcoi
This
Indian
DISCRETE
by
Edition\342\200\224Rs. 3547.00)
FOR COMPUTERSCIENTISTS
Abraham Kandel and Theodore P. Baker
MATHEMATICS
L. Mott,
Joe
350.00
Reprint\342\200\224Rs.
U.S.
(Original
Theodore
1986
\302\251
and
this
by mimeograph
in
AND
MATHEMATICIANS,
2nd Ed.
ISBN-978-81
-203-1502-0
Published
New
New
by
Asoke
Delhi-110001
Delhi-110015.
K.
Ghosh,
and
Printed
Prentice-Hall
by V.K.
of
India
Batra
Private
at Pearl
Offset Press
Private
Circus,
Limited,
Contents
Preface,vii
xiii
Acknowledgments,
A Note
to the
Reader, xiv
1
Foundations,
1.1
Basics, 1
1.2
Sets
1.3
1.4
and
1.5
Fundamentals
1.6
Logical Inferences,
1.7
of
of
Methods
and Problem-Solving
of Proof
Methods
Some
of Sets,
Operations
Logic,
45
of an
Proof
Strategies, 17
33
1.8
1.9
and
First Order
Rulesof Inference
1.10
Mathematical
Logic
for
Implication, 60
Methods
Other
of Proof,
Propositions,
Quantified
79
97
Induction, 103
Elementary Combinatorics,125
2.1
Basics
2.2
Combinations and
2.3
2.4
of
126
Counting,
of
Enumeration
Permutations, 143
and
Combinations
147
Permutations,
Repetitions,
162
2.5
2.6
Permutations
Enumerating
Binomial Coefficients, 189
2.7 The
and
Binomial
2.8
Multinomial
with
Constrained
Repetitions,
172
,
Theorems,
201
211
The Principle of Inclusion-Exclusion,
RecurrenceRelations,
237
Functions
3.1
Generating
3.2
Calculating
3.3
Coefficients
of Sequences,
of
Generating
237
Functions,
247
Recurrence Relations,264
v
3.4
3.5
3.6
RecurrenceRelations,
Solutionsof Inhomogeneous
and
4.1
Relations
Equivalence
4.4
Ordering
4.6
Directed
Relations, Lattices,
on
Operations
Paths and
Relations,
and
5.2
Isomorphisms
428
437
and
Subgraphs,
449
Trees,
Spanning
5.5
Directed
Trees, 498
5.6
Binary
Trees,
5.7
Planar
5.8
Graphs, 523
Euler'sFormula,530
5.10
395
437
BasicConcepts,
5.9
Matrices,
Sorting,
Topological
Application:
Graphs,
5.4
Adjacency
5.1
5.3
and Enumerations,362
379
Closures,388
Graphs
4.9
349
Relations,
4.7 Directed
4.8
331
Graphs,
4.3
4.5
507
Euler
and
Multigraphs
Circuits,
535
5.11 ChromaticNumbers,558
5.12
6
Four-Color
The
Boolean
569
Problem,
577
Algebras,
6.1
Introduction,
6.2
Boolean
6.3
BooleanFunctions,588
6.4
306
331
Digraphs,
and
and Generating
Roots, 300
of Characteristic
Method
The
Relations
4.2
by Substitution
Relations
Recurrence
Solving
Functions,280
Switching
577
Algebras,
578
Mechanisms,
6.5
Minimization
6.6
Applications
595
of Boolean Functions,605
to
Digital
Computer
Design, 613
Contents
7
Network
7.1
631
Graphs as ModelsofFlowof Commodities,
Flows,
7.3
Maximal
7.4 The
631
Flows,
7.2
7.5
636
Max
Flows and
Flow-Min
Cut
Theorem,
659
Representation
and
8.1
Fuzzy
8.2
Possibility
8.3
Application
Sets,
739
Manipulation
of Imprecision,
699
699
Theory, 715
of
735
Bibliography,
Index,
vii
Fuzzy
Set Theory
to Expert
Systems,720
Preface
Thistextis
an
computer
for a sophomore
undergraduate
is appropriate
level
use
for
intended
concurrently
data
of
study
first
the
with
structures
mathematics
student
calculus course.
or junior course,and
be
can
science
adjusted
student
of
or a
course
preliminary to the
in programming
course
number
the
to fit a one-term
can take this
of
algorithms.
with
the
A
first
although it would
desirable.
be
Our
assumption
the text in certain
about background
has dictatedhow
in
of
power
series
written
have
we
avoided
3, we have
Chapter
by representing
the
geometric
series
00
i-o
as
the
multiplicative
inverse of
considered powerseriesfrom
analytical
viewpoint.
Likewise,
1 -
a strictly
in Chapter
aX;
algebraic
4, we avoid
in
other
rather
reference
words,
we have
than the
to limits
when
IX
and the
exercises11
the asymptotic
behavior of functions
but if students
understand limits, then
discuss
we
notation,\"
4.2.1
Section
will
for
Machinery,
Computing
in
12
the discussion.
streamline
greatly
The Association
\"big
and
CUPM,
and others
have
recommendedthat a computersciencecurriculum
a discrete
include
mathematics
course that introduces the student
to logical
and algebraic
structures and to combinatorial mathematicsincluding
enumeration
methods
and graph theory. This text is an attempt to satisfy
that
recommendation.
we expect
who are
Furthermore,
mathematicians
Therefore, we
training.
in
algorithms
have
would
suppressed
purposely
language,
writing
will
be
or
by
many
although on occasionsit
applications
attempted
discussed
computer
a discrete
mathematics
needs of
several
majors.
in
have
computer
programming
been
easier to do so.
believe
We
meet
science.
for
mathematical topics are quite useful
computer
students
need
to
well. In particular,computerscience
of graph
understand
be
theory will
topics
graph theory, since many
in a data structures course.Moreover,they
need
mathematical
applied
as a proof technique and to understandrecursion,Boolean
induction
for digital
to
circuit design, logic and other proof
algebra
prepare
to be able to prove correctness of algorithms,and recurrence
techniques
Besides
relationsto analyze
that, computer science students
algorithms.
needto seehow some real life problems can be modeledwith graphs (like
and
minimal
spanning trees in Section 5.4, schedulingproblems
graph
in Section 5.11, and networkflow problems
in Chapter
7).
coloring
will
as a modeling
use graphs
Mathematics majors, on the otherhand,
tool, and they will benefit from a study of recurrence relationsto
of differential
understand
solutions
equations. But morethan
computer
a good
that, discretemathematicsprovides
training
ground for the
Many apparently
science students as
and
mathematics student to learn to solve problems
take
proofs. For this reason,mathematicsmajorsshould
in their program of studies, preferably
mathematics
quite
early
courses
research
mathematics
defined
course.
and
because
before
those
spirit
of mathematical
and
more than
perhaps
In graph
theory,
grasped
correct
discrete
proofs.
Discretemathematicsembodies
the
scientific
to make
xi
Preface
be constructed
and
chapters.
Chapter 3
Chapter1
Chapter
Chapter
Chapter
Chapter 6
-\342\226\272
Chapter
Chapter
Chapter 8
isintroductory
as
and
Chapter 1,ofcourse,
as needed depending on the background
discussed
much
or as
of
the
little
be
it can
of
students.
Most
been
to the material of Sections1.1,1.2,and
exposed
in Section 1.3of equivalence
the
definitions
relations,
except
possibly
of
and
one-to-one
and onto functions.
relations,
composition
We
recommend
at the minimum, Section 1.7 (Methods of
covering,
Proof
1.6
which
of an
contain
Implication)
introductory
1.7 is
Section
built.
thorough
understanding
of
proof
by
definitions
for
5. In
Chapter
We have
we have
5.2.
5.1 and
Sections
with
in Chapter
given
made severalsignificant
from
changes
7 on
edition. First
the first
network flows
8
chapters,
Chapter
Chapter
on representation and manipulationof imprecision.
Next,we have added
we have
several exercises in almost every section of the book. Moreover,
consolidated two separate sectionson partial
orders
into one in this
second edition (Section4.4), and we have removed the material on fuzzy
1 of the first edition and incorporated
sets
from
that
with
other
Chapter
on expert systems into Chapter 8. We have
material
rewritten
other
sections including the sectionon methodsof proofin Chapter
1, Section
3.6 on solutions of inhomogeneousrecurrencerelationsin Chapter
3, and
The most notable change
Sections 5.1 through 5.6of Chapter5 on graphs.
in Chapter 5 is that we have consolidated
trees and minimal
spanning
into
and
have
trees
one
section
we
introduced
breadth-first
spanning
searchand depth-first
as
well.
search
trees
spanning
Finally, we have added chapter reviews at the end of each chapter.
5 has
a review for Sections 5.1to 5.6and
then
one for Sections
Chapter
5.7 to 5.12. Thesereviews
contain
and problems
from actual
questions
classroomtests that we have given in our own classes.
There are severalpossiblecourse
For mathematics
students
syllabi.
two
added
and
mathematics
and
majors
science majors
so we follow
this
syllabus:
I:
Discrete
Sections 1.5 to
and
computer
DiscreteII:
Chapters
1.10of
5 (at
Chapter
3,4,
Chapter
1 (Section
least Sections
7, and
selected
1.9 is
5.1 to 5.6)
optional), Chapter 2,
time
permits.
of
section, and as a general rule the level
routine to the moderately
difficult,
although
some proofs may present a challenge.In the early
we include
chapters
to
many worked-out examples and solutionsto the exercises
hoping
enable
confidence.
the student to check his work
and
Later in the
gain
book we make greaterdemandson the student;
in particular,
we expect
the studentto beable to make some proofs by the end of the text.
Exercises
difficulty
follow each
from the
ranges
Acknowledgments
our
express
to the
awarded
has
Foundation
To our
us.
given
have
for
an earlier
from
taught
improvement
version
a heartfelt
we say
thank you.
at Reston
staff
editorial
The
thank them.
Publishing
have
been
a great
we
help and
Portionsof
in Chapter
the
material
8 are based on recent work
by Lofti
A. Zadeh [50], Maria Zemankova-Leechand Abraham
Kandel
[52],
in the fields
L. Applebaum
and E. H. Ruspini
and
researchers
many
[46],
of
set
fuzzy
and
Dalya
wrote
and
theory
Peli
Pelled,
Chapter
are due
Kandel
8.
who
We wish to expressour gratitudeto severalpeople
helped
with
the
we want
, Finally,
for
their
writing
patience
this
to
and
express
our love
encouragement
book.
XIII
In
then
each
and
book, sections are numbered by chapter
section number 4.2meansthat it is the second section
of Chapter 4. Likewise
are numbered by chapter,
that
We
included
theorems,
example
every
acknowledge
at the
Reader
the
of this
chapter
section. Thus,
means the
Theendof
to
Note
theorem
our
section,
corollaries,
and
and examples
definitions,
sequence
so that
example 4.2.7
is the
end of the
book a bibliography
which
references
many,
for
all, of the booksthat have been a great help to us. A bracket,
instance
[25], means that we are referringto the articleor book number
25 in the bibliography.
An
asterisk
that the problem beside which
the
asterisk
(*) indicates
is generally more difficult
the
of the
than
other
problems
appears
but not
section.
Joe L.
Mott
Abraham
Kandel
Theodore
P. fiaker
Foundations
1.1
BASICS
of
One
The
sets.
the important
tools in modern mathematics is
notation, terminology, and conceptsof set theory
the
theory
of
are
helpful
in
can
branch
of mathematics
any branch of mathematics. Every
of sets
of objects of one kind or another.For
be considered as a study
with sets of numbers and operationson
is concerned
example,
algebra
sets whereas
those
The study
analysis deals mainly with sets of functions.
of sets and theirusein the foundations
of mathematics
was begun in the
latter part ofthe nineteenth
century
by Georg Cantor (1845-1918). Since
has
unified
then, set theory
many seemingly disconnected ideas. It has
to their logical
helpedto reducemany mathematical
concepts
an
and systematic way and helped to clarify
foundations in
the
elegant
between
mathematics
and philosophy.
relationship
What
do the following
have in common?
studying
\342\200\242
a crowd
\342\200\242
a herd
of people,
of animals,
of flowers,
of children.
\342\200\242
a bunch
\342\200\242
a
group
In each casewe
Rather
than
are
use
and
with
dealing
a different
a collection
word
for
the
collectionof
objects,
called
of the
set are
elements
(or
in)
the
well-defined
members)
of objectsofa certaintype.
it is
Thus
a
set is a
one word \"set.\"
of the set. The
the elements
each
type
of collection,
set.
Chapter 1:Foundations
to realize that a set may
itself
It is important
be an element
of some
a line
is a set of points; the set of all lines in the
other set. Forexample,
plane is a set of setsof points.In fact a set can be a set of sets of sets and
so
The
on.
theory
dealing
to fuzzy
set
This
with
begins
chapter
of several
introduction
In this
(abstract)
conventional)
or
which
theory
the
with
manner is called(abstract
their
the
properties.
of relations
and
chapter we also introducethe basicconcepts
of the material.
necessary for understanding the remainder
The chapter
also describes different methodsof proof\342\200\224including
shows
how to use these techniques in proving
mathematical
induction\342\200\224and
results
related
to the content of the text.
the applications of the
2-8
The materialin Chapters
represents
in this
these concepts and
Understanding
chapter.
conceptsintroduced
functions
1.2 SETS
AND
OF
OPERATIONS
most
for
preparation
good
SETS
element of A.\" In
element of A.\"
There
1.
set.
2.
are
analogous
Describe
a set
Describe
a set
used to
3. Describea setA
by
Elements
\"is an
for
for
\"x
will
element
\"x is an
is not an
describea set.
the properties of the
by describing
by listing
write
we
situations,
five ways
computer
membersof the
its elements.
its characteristic
Ijla(x)
Ijla(x)
1 if
= Oif
function,
x G
A,
x $
A,
set,
of
describingthe contextfor the duration
If the discussionrefersto dogs only, for
discourseis the classof dogs.In elementary
sometimes
which
is
defined as
the discussion.
then the
example,
algebra
universe of
or number
theory,
Sets and
Section 1.2
of Sets
Operations
a set by
5. Describe
complement,
on some
etc.)
an
operation
(such
as union,
Example
intersection,
other sets.
the
all
nonnegative
Let
the
denote
set. Then
the set
can
in the
be described
following
ways:
1.
{x | x
2.
{0,1,2,3,4,5}.
3.
pA(x)
is a nonnegative
(l for x
= 0,1,..
integer lessthan
or
equal
to 5}.
.,5,
0 otherwise.
4. A = {xi+l = x( + 1, i = 0,1,.. .,4,
5. This part is left to the reader an
operations sets are discussed.
where
as
x0
= 0}.
exercise
to be
on
reads:
by
{x | property
formula.
a recursive
In this section,
and the relations
on sets
operations
begin
with
the
following
definitions.
If A
A
is a
B. If
of B, we say A is contained
a proper subsetof B,then we
subset
A is
said
said
to be
to be
element
a
a
of
in B. Symbolically, we write
A is strictly contained in
say
Chapter
1: Foundations
denoted
Bt
by
properties.
1.
and C be sets.
following
A.
has the
of sets
containment
The
B.
A, B,
Let
2. IfACBandBCCthenACC.
3. If A C B and B C C, then A C C.
4. If A C B and
then
B(\302\243C,
A^C,
where
\"is not
means
\302\243
contained
in.\"
The statement
fact, we have both
the same
B have
A =
We
not rule
B does
and B
ACjB
Two sets A
if and
elements. Thus we
1.2.2.
Definition
write
define
that
B C
only if (abbreviated
the following:
iff)
B are
and
equal
iff
C B
A. In
A
and B
and
CA.
B.
Therefore, we have
the
principle.
following
Principle.
show
that eachelementof
A
set
is called
no elements
containing
by 0. For example,given
denoted
numbers,the setof
x +1 0 is an empty
all
set
set,
all positive
the equation
which
numbers
positive
null
or
U of
U satisfying
x in
numbers
positive
universal
the
can
set
is a subset
of every set. In other
satisfy this equation. The empty
A
in 0;
for
A.
This
is
because
there
no elements
0
C
are
words,
every
in
A.
It
to
is
to
element
0
note
that
therefore, every
belongs
important
the
sets
0 and {0} are very
different
sets.
The former has no elements,
union,
from
shall
describe
now
intersection.
given sets. We
and
element
0.
set
containing
a single
shall also
the
study
relationships
sets
these
among
operations.
of U.
BIt is
A-{x|xG
of
complement
is equal
0, and that
A}.
to A.
AUfi
Band*
and
and
B is
.,An are
Sets and
Section 1.2
\342\200\242
\342\200\242
AXUA2U^
objects
UAn,orby
x\302\243B).The
which
belong
belong
to at
least one
\\jAj.
7-1
The intersection
1.2.5.
G A and
Definition
Pi B = {x\\x
which
objects
of Sets
Operations
sets
two
of
of n sets /lx,A2,.
intersection
to every one of them, and
B is
and
. .,
An IS
is denoted
by
n a2
ax
... n
An,
or
p|
;-i
a,-.
of two
intersection
and
as
sets are
follows:
Intersection
Union
AU
Idempotent:
Associative:
It should
be notedthat, in
U B)
(A
Definition
B is
difference
We
have a
can
1.2.6.
= {x\\x
of two sets
Definition
do not
= A
AU B = BU A
A U (B U C) = (A
Commutative:
C\\
A =
- B C\\ A
(B D C) =
A C\\ B
B) U
(A
B) D
general,
H C
(B
H C).
sets
theorems
the following
show
easily
from
the
definitions
if
they
of
and complement.
Theorem 1.2.1.
Let
Laws).
(Distributive
A, Bf
and C be threesets.
Then,
A and
union, intersection,
c u (a
u B)
- (c n
n b)
(c
A)
a) n
(c
n b),
(c u b).
Chapter
1: Foundations
1.2.2.
Theorem
(DeMorgan's Laws).LetA
(A
(A O
B,
B) = A
B.
B)
and
B be
two sets.
Then,
John
to use a diagram,calleda Venn diagram
[after
of the set
to visualize the various
properties
universal
set is represented
operations.
The
by a large rectangulararea.
within
universe
are represented by circular areas. A
this
Subsets
in Figure
1-1.
and their Venn diagrams is given
summary of set
operations
Venn
the
the
laws can be_establishedfrom
diagram.
DeMorgan's
_If
A represents A and the area outside B represents B, the
area
outside
It is often helpful
Venn (1834-1883)],
proofis immediate.
U
Let
be
our
universe;
applying DeMorgan's
B =
Set
(A H
B )=U-
(A
set
of set
- (A
H B) U
(A
B)
Venn Diagram
complement
The relatrye
complement
of set B with
respect
A-
A U
to set A
The union
A and B
of sets
The intersection
sets A
of
AH B
and B
*V\\
The symmetrical
difference
sets A and
of
A B
B
Figure 1-1.
Venn
diagram
U (A
BCA
The absolute
B)
Symbol
Operation
Set B is contained
in
laws, A
of set
operations.
can
be
\302\243).
Sets and
Section 1.2
1.2.2.
Example
A
(A
- B) = A
= A
(A Pi B)
Pi (A
= AC)
(by definition
(AU B)
P(A) =
Symbolically,
{X|X
Let
1.2.3.
Example
be
Let
is the family
P(A),
B),
(by distributive
by
\302\243),
DeMorgan),
(by
= 0 U (AC) B)
= AC)B
Definition1.2.8.
of A
(by definition of A
OB)
= (AC)A)U(Ar)B)
denoted
of Sets
Operations
(by
D A=
(by
U X
A special
be sets.
themselves
a given
law),
0),
= X).
set. The
of sets suchthat
class of
power set of A,
C
iff
P(A).
\302\243
A}.
The
{a,b,c}.
power set
of A
is as
follows:
= {{0},{a},{6},{c},{a,6},{6,c},{c,a},{a,6,c}}.
P(A)
1.
List
in the
elements
the
following sets.
numbers
prime
less
- 12
than
or equal
= 0},where IR
to 31.
represents
the
set of
real numbers.
in the word SUB
SETS.
(c) The setofletters
2. Russell's paradox:Show
that
set K, such that K = {S\\ S is a set
such that S tf. S], does not exist.
set
is uniqtie.
3. Prove that the empty
4. Cantor's paradox: Showthat set A, such that A = {S | S i$ a set},
not exist.
does
5. Let U -
- {1,5}, B {1,2,3,4,5},
A
sets.
the
following
(a)
A OB.
(b)
(c)
(A
U
U
(B
B)
C).
H (A
U C).
(e)
UB.
Determine
and C = {2,5}.
{1,2,3,4},
Chapter 1: Foundations
6.
Ay B,
Let
B) n
(A U
n B)
(A
disprove:
(B U C) C A
(A
B.
the complementof
7. Use
or
n (a
b)
u o
is
U
(A
8.
of real
sets
are
A*
B)
U (A
H (B
numbers defined
A0
Ak
{a\\a<l
{a | a
U C)).
as
< 1}
+ 1AU
1,2,....
Provethat
9. List
a <
10. Let A
where
of the
elements
the
1 <
12 and 3 < b
be
<
set {a/b:
with
9}.
a set.
are there in A?
11.
A has k
If set
of
in P(A).
elements
12. The
13.
that
Prove
is a
that
16. If
{0,1} and
x {1} x B.
(a)
(b) (Bx
A)
of A.
A.
A U (B - A) = B.
B
{l,a},determinethe sets
15. Prove
=
subset
O
\302\243
B implies
(BxA).
Section
Relations
1.3
Selected
for Section
Answers
2. It is
Functions
and
1.2
observed
lead
must
\"set\"
C must
themselves as members.Thisisa contradiction.
Hence
be
But then C containsasa member
an
extraordinary
set (namely
C itself), which contradicts the definition
C
whereby
was to contain ordinary sets only.
in either
Thus
case we see that
of the
the assumption of the mereexistence
set C has led us to a
extraordinary.
contradiction.
3.
that
included
are
0X
are two
in every set,
there
that
Suppose
empty sets,
0xC
RELATIONS
AND
0 x and
and
2.
Since
0 x, which
and
implies
02.
1.3
2k elements
the
binomial
if
has
theorem
k elements.
discussed
(A
in
FUNCTIONS
are ordered
our main concern is sets whose
elements
an ordered pair we mean that each set is specified by two
in a prescribed
order. The ordered pair of a and 6, with first
objects
also
define
that
coordinate a and secondcoordinateb, isthe set (a,6).
We
(a,b) = (c,d) iff a - c and b = d. We are now in a position to define the
In
this
section
pairs. By
Cartesianproduct
of
sets
A and
B.
1: Foundations
1.3.1.
Definition
of A
product
B is
and
Ax
An =
A2 x
Example 1.3.1.
A =
B =
product
Cartesian
the
of
relationshipis required
the
between
Thus, frequently
product set but only in
ordered
pair.
Cartesian
way well
rc}.
ordered n-tuple.
= {a,6}.Then,
the
product
x
Bis
objects
just
entire
the
is in
some
defined.
n-ary relation is
n =
subset
1, a subset # of
R from
relation
\\(x,y)
x and
y are
1.3.3.
by dom
dom R
The range
{y\\y
of
all
the
points
inside a
and x2
y2 <
1}
numbers.
A and
of/?, denotedby
ran R
a subset
set
the
real numbers
Let R be a
R, is defined:
{x\\xEl
B is
to
- 1, 2,...,
In case
a,- \302\243E
Ai9 i
(0,2), (1,0),(1,1),(1,2),(2,0),
(2,2)}.
(2,1),
Cartesian product
in a
(a,6)
and B
defined as
An is
an)
More
6GB}.
(l,a), (1,6),(2,a),(2,6)},
{(0,a), (0,6),
{(0,0) (0,1),
1.3.2.
Example
Cartesian
= {0,1,2}
Let
\302\243E
A and
Al9A2,...,
called an
an) is
a2,...,
(ax,
sets
Cartesian
The
sets.
two
= {(a,6)\\ a
{(ax, a2,...,
\342\200\242
\342\200\242
\342\200\242
x
The expression
be
Let A and B
defined asAxB
G B
ran
relation from
(xfy)
some
R, is
and (x,y)
(E
R for
to B.
The domain
y (E B\\.
defined:
\302\243E
R for
some
jc
A}.
of
Section
Relations
1.3
and ran R
coordinates in R and
dom RCA
Clearly,
of first
set
11
Functions
and
B. Moreover,
the
range
coordinates R.
in
(x,y) G
write
sometimes
We
x R y
as
to
relates
R be a relation
Definition 1.3.4.
on A. R is an equivalence
relation A if the following conditions are satisfied:
Let
on
is symmetric).
(R
G A
x>y,z
# =
{(*,y)\\x,y
N
\302\243E
is, N
that
numbers,
x 4- y
and
is transitive).
CR
is even}.
is an
definition
(2,3) G
and
(3,2)
$ R; and
but
R,
(2,1) $ i?.
other
the
(6,a)
Therelation
i?
and
(3,1)
G #,
in
1.3.5 is
example
Let
positive
reflexive
since if
to part
transitive
1^3.
be
Let
the
not antisymmetric
set of
(1) of
symmetric
since
since (2,3) G
(2,3),
(3,1),
on A.
relation if (a9b) G
because(1,3)G R
R be the relation
y = xz, where z is
someinteger.Then R is
y. Thus, (x,y) G R iff
R is transitive
since any integer x in N divides
itself.
Moreover,
= su, where
u and 1;are
s and s divides t, then s = ru and \302\243
divides
is not
not
an antisymmetric
is called
a = b.
but certainly
Example 1.3.6.
the setof
integers).
x divides
is
(4,2), (2,4),
{(1,3),
according
R on a set A
G R implies
relation
and
finally,
similarly,
hand,
(2,1)} is reflexive
Q: R;
(1,1)
but
R9
(3,1)
On
because
1.3.4,
if a
so
that
r divides
\302\243.
Finally,
/? is
in
12
Chapter
1: Foundations
=
general
in
\302\2616,
but,
case, since
this
a and
are
integers,
positive
a = b.
to the equivalence
a positive
integer.
we shall
time,
as congruence
to
known
relation
Now if a is a given
a = b mod n.
[a] denote
let
integer,
that
of
representative
the
class.
congruence
if n = 5, then there
[0]
{5fe
{5fe
Each integer
{5fe
only
a is
class
such
(or
called a
is any
kn\\k
different
congruence
integer}. In
for the
classes
G A}
l|fe G A}
2|fe(E
[31={5fe + 3|fe(E
[4]
integers b
congruence
= {a +
\\k
[1] = {5k +
[2]
a and
Thus, [a]
are five
particular,
relation congruencemodulo5, namely,
4|feG
one
A}
A}
A}
of these
determined
when
equivalence
an integer
classes
is divided
Functions
Definition1.3.5.
and
b G
B define
For
any
relation
R from
to
B and
the sets
R-l = {(y,x)eBxA\\(x9y)eR}
R(a)
{yGB\\(a9y)\302\243R}
R-\\b)-{xeA\\(x9b)ER}
for any
aG
Section 1.3
Relations and
~l is itselfa relationfrom B
set R
x under R -1 iff x relates to y under
to A
The
to
on the
xRy
by
iff x
divides
y, then R'1 is the relationwhere
multiple of d. The set R(a) contains
elementa is related
R and
under
R(a) may
In general,
where, by definition, y
R. Thus,ifR
is the
if R
Likewise,
can be
be either empty
or
13
Functions
< y,
is the
relation
relates
defined
d.
defined
by xRy iff x
c is an integral
cR~ld
means
all elements
of B to which the
of
integers
A to B, then
for each a G A, not only is R(a)
is a function from
one element.
precisely
nonempty, but, morethan that, R(a) contains
in
the
Let us reiterate this observation in another way
following
definition of function. The words
transformation,
mapping,
and
are among these words that are sometimes
correspondence,
operator
usedas
Definition
denoted
by /,
1. dom/
1.3.6.
from A
= Ay
/ is
words,
2.
for
synonyms
function.
Let
to
B is
B be
and
a relation
each a G A,
at each a G A.
is, for
that
defined
two nonempty
from A
(a,b)
to
B such
G /for
sets.
function,
that:
some b G
B. In other
If (x,y)
G /
/ and
under
if
Moreover,
/ is
we write y
a function
- f{x).
A to
from
B, we
B.
write f:A \342\200\224\342\226\272
An alternate
can
be given in terms
approach to the notion of function
of a rule of assignment.In this version,
a function
from A to B is a rule
x in A a unique
that assignsto eachelement
element y in B where/(*) = y
to denote this correspondence. This is essentiallythe sameas
is written
in such a
above
definition
since the term \"rule\"
can
the
be interpreted
= y},
rule / determines the relation {(x,y)G A x B\\f{x)
that
each
way
=
and conversely. Thus, if the rule y
Sx is defined on the set of real
then
the function is the set {(x,y)| x and y are real numbers
and
numbers,
y = 3x}.
To be sure,if / is a function from A to B, and if b G B, ^fehen the set
This,
contain
several
elements.
f~l(b)
may be either empty or may
observation motivates the following
two
definitions.
Definition
f(xi)
1.3.7.
function
f:A
=
to be one-to-one
one-to-one iff for each
\342\200\224\342\226\272
B is
x2. Thus,
said
/ is
~l(b)containsexactlyoneelement.
Ifwe describe/
~l{b) as the set of preimages of b,
for each b G ran /, b has precisely
one preimage.
G ran
if
= y
/, /
then
/is
one-to-one
if
14
Chapter 1:Foundations
B is onto
iff
ran
f:A \342\200\224\342\226\272
/ = B. In other
words,
/ is onto iff / _1(b) is nonempty for each b (E B. To put it another
B has some preimage
in A.
way, / is onto if each b \302\243E
\342\200\224\342\226\272
B is both
one-to-one and onto, then the inverse
If the function
f:A
B to A. In this
and thus is a function
from
relation
single-valued,
/\"Ms
A function
1.3.8.
Definition
function
onto
one-to-one,
correspondence betweenA
function f:A
If a
function.If/ is not
not
usually
we call it
one-to-one,
B, then it is said to
onto
necessarily
a function
is a set, two functions / and g from
Since
words,
/ = g iff
they are equal as sets.In other
1.3.8. Let A
Example
(r,2),
{(r,l),
fl(r)
(\302\243,2)}is
a relation
{r,s9t},
from
/ = {(r,l),(5,2), (\302\243,2)}is a
one-to-onesince/ -1(2)= {s,t}. Likewise,
the empty set.
The
equal if
B are
A into
for each
= g(a)
f(a)
- {1,2,3},and C = (r,5,\302\243,u}. R
B but i? is not a function
since
the
to
/ is
B but
to
not
_1(3)
0,
= {(r,l),
Definition1.3.9.
B
/ is
A to
from
(\302\243,2),(u,3)}
from
function
function
function
from
to
a many-to-one
be into B.
= {1,2}.
The set
On
one-to-one
B.
and
\342\200\224\342\226\272
B is
called a
\342\200\224\342\226\272
B is
f:A
C. The
Let
composition
be
a relation
from
to
B and
of i? and S, denotedby
i?S, is the
by aRSc
iff
there
to c
a relates
is an
i?
relation
S a
\342\200\242
S or
element
under RS iff
simply
6GB
a relates
to c under S.
GB x C servesas an
for establishing
a correspondence
between the sets A and C.
intermediary
For instance, suppose that A is a set of hospital patients, B is a list of
C is a list of treatments. Suppose,moreover,that
and
R
symptoms,
relates
a patient to his symptoms,and S relates
to appropriate
symptoms
Then RS relates a patient to a treatmentappropriate
treatments.
for
his
Of course, a given patient may
have
several
and
symptoms.
symptoms
each may have several treatmentsso that
be several
there
may
treatments
associated
with a patient
under RS.
to some
6GB
ThesetB
in
under
the
where
composition
6, in
turn, relates
of R
x B
and S
Section
Relations
1.3
15
Functions
and
to
A.
1 and
(R
S(y)
= y2 are functions
= (x + l)2
= S(R(x))
\342\200\242
S)(x)
1.
Let
relation
. (a) R
by
k}.
&}.
{(j,k)\\(j-k)2\302\243A}.
- {(jjk)\\j/k is a prime}.
be the relationfrom A
defined
by
\"x
is less
the relation
R be
Let
divides
R =
(d) #
2. Let #
3.
A for
{(jyk)\\j
(b) R =
(c)
Construct
pictorial descriptions of the
the following cases.
= {1,2,3,4,5,6}.
R on
than
defined
natural numbersN = {1,2,3,...}
is, let R = {(x,y) | x G N, y E N, x + 2y
is
in the
2y = 10,\"that
\"* +
which
{1,2,3,4,5} to B = {1,3,5}
y.\" Write i? as a set of orderedpairs.
10}. Find
(a) the
(b)
domainand rangeofR
A\"1
4. Prove
that if i? is an antisymmetric
so is
relation
\"\\
is a symmetricrelation,then R D R _1 = R.
6. Showthat if R is an antisymmetric relation and R* is an
R U #*?
about
so is R H #*. What
antisymmetric relation,
in the
Euclidean
7. Let L be the setof lines
plane and let R be the
to y.\" Is R a symmetric
in L defined by \"x is parallel
relation
relation? Why? Is R a transitive relation?
5.
Prove
that
if R
Is R
to
y\"
a transitive
in
to
parallel
Is
7.
Exercise
is
relation?
y\"
by
i? a
the
sentence
\"x
is
symmetric relation?
pairs(a,a) G
that the
x A, i.e.,
relation
on
C D.
H R-1
if R
antisymmetric
of A
line
A. Prove
A be
a set
in
antisymmetric?
11.
A =
Let
12.
exampleof a relationR
{l,2,3}. Give an
neither symmetric
nor
that i?
A such
is
antisymmetric.
relation R
where
in
is
power
for any
so is Rk
symmetric,
>
&
0,
R.
relation
of the
B is a one-to-one
13. If/:A \342\200\224\342\226\272
A is
correspondence, prove that/ _1:JB \342\200\224\342\226\272
correspondence.
14. If f:A \342\200\224+
B and
C are
both one-to-one
g:B \342\200\224\342\226\272
correspondences,
\342\200\242
prove that / g is a one-to-one correspondence.
15. Showthat the function
/ from the reals into the reals defined
by
=
1
x3
and
find / _1.
-f is a one-to-one,ontofunction
f(x)
a one-to-one
16.
x A
b:A
function
a binary
Moreover,
commutativeif
operation
for all
(x,y)
called
is
\302\243E
A
A. Which
of the
on the
operations
binary
a binary
b on the set
called
= b(y,x)
b(x,y)
following
\342\200\224\342\226\272
A is
commutative?
- y
= x
b(x,y)
(a)
(b) b{x,y)=x2+
y2
b(x,y)
(c)
two
2.)
17.
- (x
b(x9y)
(d)
A
+ y)/2
forallx,;y,z
exercise16areassociative?
18.
a set
b on
operation
binary
b(x,b(y,z)) = b(b(x9y)9z)
is
said
to be
associative
of the
A. Which
of the
Which
x2 4- y2
if
operations in
by
xRy
iff
(a) 0<x<l,0<y<l
(b) -1 <x
<
1,
-l<y<l
(c)
-1 <jc <l,0<y<l
(d)
x arbitrary,
19. Which
of
(a)
f(x)
(b)
f{x)
the
0 < y
< 1
are one-to-one?
functions
following
= x 4- 1
where
Which
where
integers},
{positive
{integers}.
= x2 where
' whereA
{real
^/(positive
integers},
- {1,2,3,4}
onto?
A
--=
where
- {integers/,
and
S =
{(1,3), (2,4),
numbers}.
and R =
{(1,2),(2,3),(3,4),
(4,2), (4,3)},then computeR.S,S-R,
20. If
are
(4,2)}
and
R2.
Section
1.4
21.
If
= {a,b,c,d},determineif
= {1,2,3,4} and B
are one-to-one
Strategies
Problem-Solving
the
*7
following
or onto.
functions
(a) /={(l,a),(2,a),(3,6),(4,d)}
= {(l,d),(2,6),(3,a),(4,a)}
(b)
(c) /i =
{(l,d),(2,6),(3,a),(4,c)}
22. Supposethat
are
a,b,c
where a
integers,
c. Prove that a
a divides
and
dividesbx
^ 0. Supposea divides
cy where x and y are any
integers.
23.
Show
(a)
(c)
that the
3 and 24
modulo
7.
11
and-64
7.
modulo
congruent
24. Suppose
25.
iff
Selected
Answers
3.
(a)
= 6c.
ad
+ 2y
set of x
solution
The
(b)
x and
by interchanging
R -1 is found
{2,4,6,8}
\\(x,y)
\\x
subset
Any
in
of the
in which
\"diagonal
(a,6) G
and the
G N,y
={(1,8), (2,6)
number
infinite
the domainof R
R'1 -
10.
= 10is R
{(2,4),
(4,3),
of elements
range of J?
G N,
y in
2x + y
is
(6,2), (8,1)}
in N. Thus,
{4,3,2,1}.
the definition
-
of R;
10}
(3,4), (4,2)}.
line\" of
implies
A, that
= 6
is, any
is both
relation
symmetric and
anti-symmetric.
1.4 SOMEMETHODS
OF
PROOF
AND
PROBLEM-SOLVING
STRATEGIES
of presenting
a
known methods of
here are a few basic
task
of the
What
we offer
proof and problem-solving
strategies.
hints with some examples
of the application of these hints. We expect
to refresh your
to these suggestionsfrom
time
to time
you to return
memory as you are developing
your ability to solve problems.Shouldyou
18
Chapter
1: Foundations
G.
Polya,
How
[33],
Patterns
[34]
are
to Solve it [32],
in Plausible
reading,
delightful
it
only
some
the word
signifies
\"solve
assignment.
Problem
is part
science and part art but is mostly
hard
It
work.
solving
science in that there are severaloft-repeated
to
principles
applied
varied
or rules
types of problems. It is also an art because
principles
cannot be applied mechanically
but
involve
the skill of the student.
an athletic
Moreover,just as in playing
game or a musicalinstrument,so
alsoin problem
this skill can only be learnedby imitation
and
solving
and
are the
We contend that interest, effort,
practice.
experience
will be your
the reader
you
primary factors to solvingproblems.Thus,
own best teacher. Any solution
that
effort
you have obtained by your own
or one that you have
and insight,
with keen, intelligent
followed
a pattern for you, a modelthat you can imitate
with
become
concentration,
may
success in solving similar problems.
each problem with an attitude
We
ask
of research, to
you to approach
at
but also to seek out the key
ideas
and
not only solvethe problem
hand,
that made the solutionpossible.
The generalproblem-solving
techniques
in this section and throughout the book will never
never
methods
taught
for lack of relevant knowledgeor intelligenteffort.
Our
compensate
can take you only so far; you have to go the rest of the way
discussion
on
is a
your
own.
with
in
the
problem,
a position
to
gain
information,
have the
of
you
the
simply
require
familiar
critical insight.Without
insight,
method
is
largely useless.
Section
Methods
Some
1.4
of Proof
and
19
Strategies
Problem-Solving
will learn
attack. We will give some more hints on this, but generally
you
best by experience, so for a while your best plan may be to imitate what
seen others do. It therefore becomesnecessary
have
for
to
you
you
solutions
and record, for future
understand
suitable for
reference,
imitation.
before
But
been
done.
analyze
major
what
has
parts:
the
The
part.
of an Argument
Basic Elements
there
speaking
Generally
that
argument
either
exclude
(2) grounds,
of
basic elementsof
these
reference.
how
they
an
are:
(1) goals,
Let
us briefly
are connected
together.
1. Goals.
analyzing
is
there
argument,
conclusion
are
we
When
some
to
which
we
and criticizing
asked
always
step
in
of the
destination is.
2. Grounds.
kind
of
clarified
the goal, we must consider what
to
refers
to arrive at that goal.The termgrounds
If goals represent
claim.
the
facts relied on to support a given
if
we
are
then
Even
are
the
destination,
point.
analyzing
grounds
starting
we must ask ourselves where we
someone else's solution
or argument
would
whether we can see how to take the same
and determine
begin
and
so
end
the goal has been achieved.
that
steps
by
agreeing
o
n
kind
what
of
may
Depending
goal is under discussion,thesegrounds
of
common
matters
comprise
knowledge, experimentalobservations,
or may
not
established
claims, or other factual data that may
previously
have been given in the probleni.
3. Warrants.Knowing
an argument is founded is,
on what
grounds
nevertheless,only one step toward the destination. Next we must check
whether
these
do provide genuine support for each
grounds
really
individual
assertion
and are not just a lot of irrelevant information
Having
information
the specific
is required
20
Chapter
1: Foundations
having nothing to
do with
The
assertion.
the
may be
grounds
conclusion; the
true but
grounds may
issue at hand.
and
the
the
Given
goal, the questionis: How do you
starting
point
from
these
the
move
The reasonsor
grounds to that conclusion?
justify
warrants.
In
as
are
the
on
offered
the
justification
focusing
principles
or
on
but
the attention is not somuchon the starting
warrants,
point
goal
the correctnessof each step along the way.
about
Thus there are two concerns
the warrants cited in an argument:
and
are
Are
reliable
they applicable? Frequently in a mathematical
they
is
some
known formula, some commonly
the
warrant
accepted
argument
in this
an established
Thus,
fact,
theorem, or a rule of logicalinference.
in
of
warrant
be
the
not
but
the
the
event,
reliability
may
question,
or
is
all
asto
whether
not
warrant
the
crucial.
the
more
question
applies
if the warrant
even
is applicable, its correctapplicationisstill
Moreover,
required.The laws of algebra may apply but there arerestraintson their
for instance, one cannot divide by zero.
application;
no
have
on the
bearing
information yet
4.
theorem,
no
have
or
formula,
to the
relevancy
Aside
of reference.
Frame
principle
the
from
serves as
that
an argument
in
an
argument,
interlocking
we
web of
and
assumptions,
to in
the argument;
can be
connectedto the
being
Working
rule,
fact,
particular
grounds for
need to
The conclusionsarrived
on correct
based
be
if
only
in
offered
conclusion
by
by
justified
Forward
in high
The student probably has seen presentationsof arguments
school plane geometry that were patternedafterthe model
ofexposition
in Euclid's
written about 300 B.C. In the Euclidean
Elements,
presented
from
exposition, all arguments proceedgenerallyin the samedirection:
the
toward the goals by way
of reliable
warrants.
grounds
Any new
assertion has to be correctlyproved
from
the given hypothesis
or from
in foregoing
propositionscorrectly proved
steps. It is not enough that
correctstatementsare listed, but they must be listed in logicalorder,
eachleading
into
the next. All statements
should be connectedtogether
and
precept,
into
organized
precept
this method
a well-adapted
upon
precept,
of presentation\342\200\224working
forward\342\200\224and
on occasion
be
We
upon
call
one can
Section 1.4
Some
Methods
of Proof
this
discover solutionsfollowing
schemeby the following diagram:
Grounds
and Problem-SolvingStrategies
pattern.
We
illustrate
21
the general
Goals
Warrants
Perform
Given
or
data
hypothesis
Unknowns
conclusion
allowable
variations,
draw inferences
Working
Figure
Forward
1-2.
follow
We emphasize that in relating a proof or a solutionmost writers
model and work forward from
the
to the
Euclidean
hypothesis
a natural
conclusion. As a consequence, there may
be
bias to work
forward in discoveringa solution,but this bias is often inappropriate in
problem solving because the orderin which we discover details is very
often exactly oppositefrom the order in which we relate those details.
is gained after focusing attention on the
the
critical
Frequently,
insight
on the conclusion
rather than the hypothesis.
goal,focusing
the
discovery
least four
and grounds).
2. Experimentation.
In this stageyou may want to examine special
cases of the problem,replaceconditions
ones, consider
equivalent
by
or
or contradiction),
logical alternatives (like arguing by contrapositive
decompose the problem into parts and work on it case by case. In general
and reduce the complexity of
the
terms,attemptto reformulate
problem
the
problem.
3. Incubation.
After becoming thoroughly familiar
it may take some time for these
to germinate.
ideas
with
the
problem,
22
Chapter
1: Foundations
As
over steps 1 and 2 again and rethinkthe problem.
probably should focus your attention on the goal and
\342\200\242
the
Clarify
the following
the problem.
of
complexity
\342\200\242
Reduce
the
\342\200\242
Focus
on the
to get
you
there
at
come
any
moment,
so be
soonas possible.
suggestions:
problem.
\342\200\242
Reformulate
Perhaps
includes
advice
our
Thus,
it
how
point.
Revelation.
4.
prepared to write
rule
a general
the problem.
goal.
comments
more
few
will
be helpful
to understand our
suggestions.
times
Many
can be
problem
mathematical problem
by
finding
translated
an
problems\"in a collegealgebracourseserve
be
The complexity of a problem may
considerspecial
askedto
the
fewer
cases,
variables,
as
one
from
in
to solve.
equation
words
to a
The \"word
an example.
reduced
etc. For
in a variety of ways;
instance, suppose we are
disjoint
Inductive
number
union of two
Reasoning
special
this
attention,
process,
namely,
we need
to
and
clarify the meaningofspecialization
generalization.
is passing from the considerationof a restrictedset
Generalization
of observations) to a more comprehensive
a small
number
set
(usually
if
For
the
more
restricted
set.
a
instance, proposition
containing
original
holds for all triangles and rectangles,there may
a generalization
be
for
all
i
f
holds
for
the integers 2,3,
holding
polygons.Likewise, something
and
it
all
hold
for
5, 7, 29,
59, may
prime integers.
the focus from a larger
Specialization reversesthe process
by
changing
set to a smallersetofobjects,say, for example, from the set of polygons
down
to the subset
of triangles, from the setof primeintegers
down
to a
subset of one or more specific
n
or
from
a
down
to
general integer
primes,
a specificvalue of n. In specialization, we examine special,more
manageablecases.
A good heuristic
approach is to set any integer
parameters
Section
Some Methodsof
1.4
patterns
It
the
of
magnitude
23
Strategies
and
look for a pattern. Thus the
reduced to simpler casesand certain
more easily observed.
make a diagram or tabulate several
in
sequence
may be
problem
relationships
to
beneficial
be
may
and Problem-Solving
Proof
observations.
In
particular,
table
may
to
addition
successive
useful.
is sometimes
observations
As we
emerging,
and
pattern is no merecoincidence,
therefore
we
that this
suspect
a generalization
may
conjecture
that
account
will
of our
limits
later).
If
the
method
will have
need
to analyze
of caution
of inductive
to be sufficient
to
and interpret
is needed
reasoning is to be fruitful,
a conclusion,
and
make
the
then
evidence
the investigator
will
a word
the evidencecorrectly.Therefore,
more
a clearly
Example1.4.1.
few
integer
greater
2. Each
new
computations
than 3 can
computation
might
be written
lead us
as
the
in agreement
to conjecture
a prime
sum of
with
the
plausibility
conjecture and we becomemoreconfident
is not a proof. Indeed
about
the possibility
of its validity. But confidence
the fact that the conjectureholds
for
the first 63 odd integers does not
127.
in fact, the conjecture fails for the integer
for,
guaranteevalidity,
You might ask how do we see that 127 is a counter example?We have
at least two options: first, we could consider/(p) = 127- p,for all primes
value
is ever a power of 2 for some
p less than 127, and investigateif f(p)
conjecture adds
to the
24
Chapter 1: Foundations
Or secondly,
of p.
there are
powers
table
following
thus that
n
- 127-
g(n)
2\"
3(41)
7(14)
5(25)
2(63)
Example
Conjecturea
general
we have
Suppose
for the
7(9)
5(19)
3(37)
valid
to
the
conjecture.
conjectures.
For
problem:
following
sum
\"
above
2!
3!
\"\"'
(n
+ 1)!
of the positive
integer n. (Recall that n\\
by specializing successivevalues
2 \342\200\242
1.)
of n(n \342\200\224
is the product
1)...
of the sum Tx = 1/2,
If we allow n to be 1, 2, 3, or 4, we get the values
=
=
=
We note that in each case the
119/120.
23/24,T4
5/6, T3
T2
numerator
is one less than the denominator. Moreover,the denominators
If not, then T5
are
coincidental?
2!, 3!, 4!, and 5!. Is this
respectively
should be (6!-
l)/6!.
In
-T
fact,
5
4
5!
6!
We
note
each
equal
other
one
observation.
to [(n
Analysis-Synthesisand
6!
- ?19-
6!
\"
6!
6!
*\342\226\240
'
feature:
Now we
+ 1)! -
this conjecture.
119
Working
1)!.
Backward
The methodencompasses
two
stages.
The
first
to
guide
the
we suppose
Basically,
its characteristics.
like: If A, then S.
stage\342\200\224the
analysis\342\200\224is
Section
Some Methods of
1.4
the
work so to
laboratory
the
constitutes
In the
granted,
start
from
second
is to be concluded,takeit for
conclusionuntil we reach
what
from the
inferences
draw
and
The
devised.
proof.
analysis stage, we
is
plan is actually
the
stage\342\200\224the
synthesis\342\200\224is where
in the analysis
what
was
discovered
25
Strategies
something
known,
already
considered in
admittedly
to the
relation
Example 1.4.3.
that
we want to prove: If n is a positive
Suppose
6n+2
72n+1
is
divisible
+
integer
by 43, then M = 6n+3 + 72n+3
is divisible by 43. Here we may not have
how to proceed from the
idea
any
N
M is divisible
is
43
divisible
show
43.
that
to
that
grounds
by
by
we
could
to
and
assume
However,
attempt
employ analysis-synthesis
that M is divisible by 43. ThenM - N,M - 2N, M - 3N, etc., are all
divisibleby 43. What we would hope is that in the analysis
we could
stage
that
such
Determine
Assume
characteristics
of a
Draw
inferences
solution
solution
Analysis
Hypothesis
characteristics
of a
or
forward
solution
help
Solution
Work
conclusion
determine
the direction of
inferences
Synthesis
Figure 1-3.
Diagram
of analysis-synthesis
method
of problem solving.
26
1: Foundations
Chapter
43, then
we
could
Let us
proposition.
- kN
the process
reverse
in the
M - N = 6n+3
72n+3
= 6n+2(6-
- (6n+2 +
1) +
+
6n+2(5)
72n+1(48).
= 6n+2(5)
+ 72n+1(43)
72n+1(5)
72n+1)
72n+1(72- l)
At first
M-N
the
consider
first
notice
we
- 5N +
that
the
72n+1(43).
divisible by 43.
M - 6N = 72\"+1(43)
is something
obviously
Now we are preparedto presentthe synthesis
stage.
- 72n+1(43) and N are divisible
M = 6N +
Since M - QN
43,
by
is
43.
divisible
72n+1(43)
by
in
The method of working backward is similar to analysis-synthesis
is focused on the goal.However,
that
attention
backward
differs
working
in the way the goal is consideredin relation
to the given information. In
the analysis
of analysis-synthesis,
the goal is consideredto be part
stage
of the given information,
and we attempt to derive consequences
from
in
with
of
the
the
direction
inferenceis
the
Thus,
goal
conjunction
givens.
from
the
to some new statements. In working
backward,
goal statement
the goal is not considered to be a pieceofgiven
We start
information.
with the goal, but insteadof drawing
inferences
from
to
we
it,
try
guess a
Therefore,
taken
would imply the
that,
precedingstatementor statements
together,
are
in the frame of
statement.
there
theorems
or
facts
Frequently,
goal
referencethat will give such statements
that imply the goal statement.
the
a proof of an implication\"IfA, then B\" is
Thus,
person
formulating
\"I
to
think
like
canprove B if I can prove C; I can prove C
this:
supposed
D if I can prove E. But I can prove
E from
if I can prove D; I can prove
A.\"
Prove
Conclusion B
recall
A-
3rd
2nd
, 1st
observation
observation
observation
backward
to prove
\"If
A, then
B\".
SomeMethods
Section 1.4
Example 1.4.4.
of Proof
the
Prove
and Problem-Solving
statement
following
27
Strategies
by working
backward.
of length
a and b and hypotenuseof
T
then
is
an
isosceles
equal
lengthc,
triangle.
a = b by showing the equivalent
show a = b. But we can prove
We
must
facta -6 = 0.Tobesure, a - b - Oiff (a - b)2 = a2 - 2ab + b2 - 0. So we
a2 - 2a 6 + b2 = 0 or equivalently,
can prove a - b = 0 by showing
that
a2 + b2 = 2ab. The Pythagorean theorem states that a2 + b2 = c2, so to
prove a2 + b2 = 2ab we need only show c2 = 2ab or, equivalently, that
c2/4 = ab/2. But recallthat the area of T is ab/2. Thus, by hypothesis,
= c2/4. Therefore, the proof is completedand
know
that a =
we
ab/2
If
the
right
has
b.
triangle
T,
sides
with
to c2/4,
area
Example 1.4.5.
Recall
that
for
integers
-
n, where
n, then
n is
a, b, and rc, where
k is some integer. Then
a + c = b + d mod rc by
backward.
working
(b + d) =\342\226\240
prove a + c = b + d mod n if we can show (a + c) \342\200\224
=
x.
But
(a + c) (b + d) (a b) + (c d), and we
integer
k and / are integers, since
c - d = n - I where
know that a - b = n \342\200\242
k and
k + n \342\200\242
/ =
a = b mod n and c = d mod n. Thus, (a + c) - (b + d) = n \342\200\242
x
fc
/
\342\226\241
is
we
need.
and
the
the
that
n(k + I)
integer +
integer
We can
\342\200\242
* for
some
Fallacies
What
argument
whether
is convincing. An
the argument
one can perceive any flaws in
argument
is accepted
as a
valid
case
that
original
no
the
overlooked
assertion,
possibility
but on
provides
occasion, the
results
of the
in
a new
as a proof.
is then
argument being devised,which
accepted
all
all are not agreed as to what makesan argumentconvincing,
While
and
all
be
considered
that
cases
an
must
issue
justification
agree
of
must be given for every
all would agree that, both
conclusion.
Moreover,
28
Chapter
1: Foundations
Fallaciesare
this
and
main
their
from
serves
of fallacies:
similarity
types
1. Fallacies
or
Ambiguity
of
are
that
arguments
comes
persuasiveness
be
should
fallacies
persuasive
because of
are flawed
that
arguments
terms.
Fallacies
2.
an
unacceptable
at all
appeal
arise when
of ambiguity
Fallacies
senses. The
different
ambiguity may
in
used
often a result of
but is
intentional
be
not
be confused
should
of language. Ambiguity
The question \"Is there a pitcher in the room?\"
is ambiguous,
because
the pitcher in question could be a containeror a
But the statement \"I will come to see you sometime this
baseball
player.
is vague,
time
because
it fails to tell us preciselywhat
the visit
afternoon\"
will take place.
of ambiguity
There are many fallacies
but we will mention
just two: the
the
feature
imprecise
with
however.
vagueness,
of
fallacy of equivocationand the fallacy
The fallacy of equivocation occurs when
morethan onesensein
midstream, so to
switch
from
\"Our
speak. The sentence
shelf
the
in
team
Another
sense
one
needs
This
or other punctuation,careless
positioning
phrases, and the like. The Reader'sDigest
examples of such ambiguities.
occurs
Amphiboly
formulated,
\"X
equation
parentheses.
we
whether
(5
fallacy
of
rise to the
fallacy
of
of qualifying
often
prints
mathematical
problems because a problem
to some syntactical ambiguity. Thus
owing
is
the
3x5
+ 10\" is ambiguous as it
The calculation may yield X = 25or X
=
insert
of
words or
humorous
omission
grammar:
parentheses
as X
= (3 x 5)
stands, lack of
= 45, depending
for
on
10
or as
X = 3
10).
Practice
pitfalls
in
so
the
a comma
inadequately
in
to another
a new pitcher
kitchen\" commits
the
equivocation.
amphiboly.
or phrase is used in
result that its various
with the
argument
You cannot
confused.
are
senses
a single
amphiboly.
a word
identifying
grammatical
to which ambiguities can
goes unrecognized.Onceidentified,
rewriting and reformulating.
ambiguities can
lead if
such
their
help us to avoid
presence
can
fallacies
in an
the
argument
be eliminated by
Section
Methods
Some
1.4
of Proof
and
Strategies
Problem-Solving
assumptions,
(2)
29
but
hasty
Circular Reasoning
The
of
fallacy
We
this
commit
begging
fallacy
by advancing
are
parts
corresponding
of congruent
triangles!
the
integer
1987
is prime
of begging
the
the question,
because it is not compositecommits
fallacy
\"The
root of 2 is irrational becauseit is not
as does the sentence
square
rational.\"On the other hand, the statement \"1987is primebecause1987
is not divisible by any of the integers 2 through 1986\"doesnot beg the
of
and is accepted as a fully
documented
proof,
provided,
question
of the integers 2
that
none
course, that indeed it has been verified
1987.
through 1986divides
begging
Question
the
definition
following
A dog
definitions:
is a
canine animal.
is
Horsemanship
Distillation
is the
an
equestrian
skill.
process of distilling.
30
Chapter
1: Foundations
Each
be
defined.
Anyone
expect
matter,
is meant
what
know
will
by distilling.
concludethat
specific
the proposed
N, the
the pairs of
integer
prime
every
considered
have
if
19, and 29and 31.Of course,
= 9 is not prime and refutes
13,17 and
and
7,11
for
we
we consider
few
too
are not
that
examples
class.
whole
the
of
representative
conjecture based on
from
or (2) drawa conclusion
instances
or hasty
to conclusions\"
of \"jumping
a general
(1) make
we
generalization
when
+ 2
conjecture.
The
of false
fallacy
\"after
means
literally
party,
false
of false
fallacy
about a
The
of causality;
attributions
flat was
cause also
phenomenon.
given
maintained
for
are
we
of science
when
A political
this.\"
simply
abounds
that
the
mistaken
with
earth
such
was
is held by somethough
sailed around the world.
even now it
and
centuries,
dispelled
occurs when
history
The
upswing
indicating
cause
that took
what policy brought
economic
an
without
office
took
on accountof
this, therefore
other.
propter hoc
hoc ergo
is post
be the
to
the
before
happened
Magellan
1.
n = 40 is a counterexampleto
is a prime for each integer n.
that
Show
n -f 41
2. Find
prime for
each
3. Show that
odd
integer
positive
(C>
79n +
1601 yields a
509 is a counterexample
to the conjecture
that
every
greater than 3 is the sum of a prime and a power of 2.
\342\200\242
2
\342\200\242
3
\342\200\242
3
3
\342\200\242
5
n2
n\"
integer
4. Conjecturea generalformula
1
. 1
' ' '
1,,, '
the conjecturethat
the
for
following
1
n(n
(2n
- l)(2n
+ 1)
4 1)
1)
4
1 \342\200\242
4 \342\200\242
7
' '
' +
(3\302\273
2)(3n
3 sums:
Section 1.4
SomeMethods
Conjecturea generalformula
and (c).
5.
Conjecture
and Problem-Solving
of Proof
for the
formula
general
results
the
includes
that
sum 1
4-
(2m
in (a),
5 +
- 1).
(b),
\342\200\242
\342\200\242
\342\200\242
+
of the
terms
successive
31
Strategies
11,31,41,61,71,101,131,....
the expressions
7. Consider
10
+ 12
11
1 = 0 + 1,
2 + 3 + 4 = 1 + 8,
5 + 6 + 7 + 8 + 9 = 8 +27,
13 + 14 + 15 + 16 = 27 + 64.
by these
law
8.
in
three
first
The
3) are all
examples
and express it
prime integers?
9.
is divisible by
lists
of positive
d(n)
10
123456789
122324243
Looking over
with
which
lln+3
122n+3
133.
divisible by 133then
+ 122n+1 is
if lln+2
that
Verify
d(n)
is an
we
even integer.
positive integern
this
are
11
12
13
are
struck
14
4
by the
Continuethe tableup
15
16
frequency
to
n =
11.
the
Identify
(a) Pearls
She
is a
in the
of fallacy
type
are
(b)
(c)
David
After
following statements:
soft.
pearl.
is telling
Melinda
insulted
Mad peopleshould
Hence, Anne
should
be
be put
in a
hospital.
the
number
by d(ri).
the only positive
25.
32
Chapter
1: Foundations
The Democrats
(d)
(e) Peopleshould
high
the
removed,
is right.
what
do
the
for
( f) Nodesigning
are
persons
of trust.
deserving
(g)
is illegal.
people
Killing
Hence,
(h)
(i)
All
(j) I
members
exercise
see
never
will
should
they
Hence,
(k)
(1)1
is illegal.
punishment
capital
People in the
If you
is legalizedkilling.
punishment
Capital
to doctors.
went
he is insane.But he
the insaneneveradmit they are insane.
walked under a ladder.
hit
was
must
truck.
by a
(m)
work
nations
because
be sane
vital
that
together.
Godexists.
(n) Life makes sensebecause
Godexists because if He didn't life would be nonsense.
if sufficient reason is
break-ins
are legitimate
(o) Governmental
given.
National security
break-in.
is
In mattersof
national
legitimate,
at
Make
n -f 11
least
Find
where n
reasoning
4 integers.
Hint:
conjecture that Mp
to the
counterexample
integersarethe sum
(c)
should never
government
a break-in.
four conjectures
conjectures.
13.
for a governmental
Therefore,
12.
the
security,
reason
a sufficient
to
of
consider
2P
1 is
p.
of
formulate
the
n2
squares
2,
prime integers
first.
Section
1.5
Selected
Fundamentals
of Logic
33
Answers
11.(a)
Ambiguity.
the question.
(b)
Begs
(c)
Ambiguity.
(d)
False
(e)
Ambiguity.
cause.
(f) Ambiguity.
(h)
False
(i)
False cause.
(j
cause.
False
(k)
Begs the
(m)
Begs
(n)
Begs the
question.
(1) Falsecause.
the
question.
question.
1.5 FUNDAMENTALS
OFLOGIC
we can
before
Now
in some
discuss,
what we mean by
complete
inferences.
valid
the
inference
we must
assuming
logic and
not our intention heretodiscussa
we
It is
but rather
of several
in logic
statements
course
formulate
understand
about
are
inference.
purpose.
Sentences
as declarative,
exclamatory,
our
attention
to those declarative
imperative.
sentencesto which it is meaningful to assign one and only one of the truth
values \"true\"
or \"false.\"
We call such sentences propositions.
Of
not all sentences
are propositions because,for one thing, not
course,
all sentences are declarative. But we also rule out certain semantical
is false.\" For if we consider
\"This
sentence
paradoxes like the sentence:
this sentencetrue, then we must determine
from the content of the
if we
it false, then it turns
sentence
that it is false, and likewise,
consider
are
usually
classified
We
interrogative,or
confine
out to be true.
For
definiteness
let
us list
our assumptions
about propositions.
34
Chapter
1: Foundations
p,
1.
Assumption
proposition
For
every
p is true
either
Assumption2.
For every
of Contradiction.
Law
The
true and
is both
proposition p,
false.
are
Propositions
if...
if and
and
then
to
proceed
then
proposition,
give the
\"p is not
statement:
is a
Einstein
genius,
or
is not
Einstein
a genius.
which
changes
negation
sense
is meant,
one
two
connectives combine
proposition
proposition
to form a
but, in our
usage, if
no
indication
is given,
we shall
or.
\"p implies
q\"
or
\"if p
then
q\"
is represented
as p
\342\200\224\342\226\
Section
Fundamentals of Logic
1.5
and is calledan
the
or consequent
of
the
We define
implication.
that is false only when the antecedent
p is true and
is
false.
It
be
beneficialto
q
might
emphasizethe cases
is
true
or
false
the
truth
table
that
implication
by
following
all possible truth values
for
and
and
the
p
q separately
the conclusion
a proposition
called
or a conditional.
or antecedent
implication
hypothesis,
premise,
35
\342\200\224\342\226\272
as
the
consequent
when
the
contains
corresponding
values
truth
for p
\342\200\224+
Let
T denote
p-+q
q.
\"true\"
and
F denote
\"false.\"
P
T
statement
about
example considerthe following
geometrical
triangle are equal,then the triangle is a right
occur in geometry and in
others
that
triangle. This proposition,likemany
other branchesof mathematics,
is a conditional
statement.
The
As an
objects:
If two angles of a
antecedent
and
the
consequent
are, respectively:
According
propositionseems
to
our
understanding
that
1:Foundations
valid
that, nevertheless,
of implication
principles
are sometimes
considered paradoxical.
(a)
A false
(b)
A true
antecedent p impliesany
consequent q is impliedby
To illustrate
If 1981is a leapyear,
Isaac
then
q;
proposition
p.
proposition
any
discovered
Newton
is true:
the following
that
claiming
America.
If (p) IsaacNewton
sevendays in a week.
Here, since q
is true, we
discovered
that
know
p is trueor false.
the
Normally
inherent
\342\200\224\342\226\272
is
a premise
between
relationship
true,
uses implication
language
English
then
America,
(q) there
regardless
are
of whether
to indicatea causalor
not
need
emphasize
be related
by using
propositions
two
When
to
not
any of
propositions
the truth
confuse
the connectives.
The proposition
be expressed
p\342\200\224+q
may
p implies q
ifptheng
if q
only
p is
a sufficient conditionfor
necessary condition
q is a
qifp
q follows
from p
for
as:
and
effect
Section 1.5
37
of Logic
Fundamentals
q provided p
ofp
q is a consequence
q
whenever
The
biconditional
of p
converse
p
\302\253-*is
(?
conditional
the
q\342\200\224+pand
of the conditionals p \342\200\224\342\226\272
<? and
g \342\200\224\302\273
p. The
the
conjunction
can be
biconditional
\"p if and
\342\200\224\342\226\272
q
p, we see thatp
\302\253-*is
symbol
the
\342\200\224\342\226\272
is
and
p\342\200\224*q
read
\"if
words
and
only
if.\"
the
Thus,
table
of
only if q.\" By consultingthe truth
+-*(? is true whenp and q have the same
Notice
we
that
are
as
are
connectives
different
{T,F}
into
Negation
{T,F}.
example, disjunctionV
each
variables
elements
four
namely,
{T,F}2 into
from
function
talking
not as sentencesbut
of these
=
of the two values independently, there are 2x2x2x2
16
from {T9F}2into \\T,F}.
functions
possible
A propositional
is a function whose variablesare
function
propositions. Thus,
there
are only 16 propositional functions of two variables.
of several variables involving
But therecan be propositional
functions
connectives.
For example, the proposition [(p Aq)V ~r]\302\253-*
many
p may
of the three
be viewed as a function
variables p, qf and r and involves the
four connectives~, V, A, and +-*. Then as a function of three variables
into
We list all the
(~r) +-+ p maps the 8 points of \\TyFf
{T,F}.
(pAq)V
in the following
values of this function
truth table:
either
pAq
F
F
F
F
F
T
T
F
F
F
F
F
F
F
F
T
F
T
In constructing
truth
~r
(pA<7)V(~r)
[pA<7)V~r)\302\253-
F
T
F
T
T
\342\226\240
F
T
F
tables, it is
useful to
follow
these
two
conventions.
1.
Place
all propositional
variables in the
left-mostcolumns.
-p
38
Chapter
1:Foundations
truth
Assign
0 represent
Let
of the
the
number of propositionalvariables.(Forexample,
assignment
to
the
and r in the above example
values TFTtop,q,
binary
corresponds
number 1 0 1.)
take on
the
are
functions
Two
and
propositions,since
same if they
truth
the
at
table
and
range
then
w6
function
Q are
and
propositionsP
all possible
truth
whose
function
if
P and
tautology. A
value
is always
neither a
for
is a
or absurdity
contradiction
that is
somewhat
two
that
say
become
frequently
and
equivalent
is a
tautology
\"functions\"
false, such as p
tautology
nor
example,
for
p V ~p
is a
propositional function
-p.
contradiction
propositional
is called
contingency.
of
constructing
an
a propositional
abbreviated
that a propositionalfunction
of the truth
lines
table, one which makes
makes it false. To determine if a
that
another
tautology, it is only
which
functions
function
the
necessary
to check
the propositiontrue
those lines
could be false; or
proposition
we need only
are equivalent
can be false.
function
propositional
and
is a
to showthat
two
propositional
each
Section 1.5
1.5.2.
Example
39
of Logic
Fundamentals
r)] is
\342\200\224\342\200\224 \342\200\224\342\226\272
V
r]
~q)
[p
(q
tautology.
Sincethis propositioninvolves
3 variables,
table would
8 lines, but we will
require
appeal
an implication
table. The one casewhere
is
antecedentis
r)] is
(q
pqr
pA~q
TFF
Since the
bea
table
p is true and
and
r are
both
case:
this one
addresses
r]
[(PA-C7) \342\200\224
[(pA^-f]-[p->(QVf)]
proposition must
case, the
in this
tautology.
of Two
Functions
Propositional
Let us now
p
F
F
false when
truth
[p-+(qVr)]
false is
is false.
consequent
\342\200\224\342\226\272
V
[p
consequent
the
but
true
list
3 4
5 6
functions of 2 variables.
16 propositional
F
F
T
T
T
the
Variables
F T F
T F F
F F F
T T T
9
T
10
11
F
T
T
F
13
12
'
F
F
T
F
15 16
14
F
T
F
F
F
F
F
F
of the
find
the representation
Examining this table, we readily
connectiveswe have already defined: disjunction (V) is in column 2,
in column
4, ~p is in
conjunction (A) is in column 8, p is represented
column 13,q is in column 6, and ~q in column 11;column1is \"universally
and thus
false\"
and so is a tautology, and column 16is \"universally
true\"
in column 5
a contradiction. Moreover,p \342\200\224\342\226\272
q is represented
represents
\342\200\224*
in column 3.
while the converseofp \342\200\224*
p, is represented
q, or q
these
6 columns? It would seem plausiblethat
What
of the
remaining
also represent
ways of combining propositions.That is indeedthe case,
mentioned.
in fact
some are just the negation of columnsalready
and
as column 2 represents the disjunction
pVg, column 15 represents
Thus,
or-(pV^).
nondisjunction
column
Column 7 represents p <-\342\226\272
q, and
+-+
is at the same time the truth
q and
denote ~(p
columns
\302\253-\342\226\272
5 and
q)
by p
*-/\342\200\224*
q.
3, respectively.
for
\342\200\224/-\302\273p
~(q-\302\273p).
Columns
10 represents
for
table
12 and
We shall write p
the
14 are
the negationof
exclusive
or. We
the negationsof
- (p
\342\200\224/\342\200\224
q for
\342\200\224and
q)
40
Chapter 1: Foundations
see that an understanding for ~, V, A, and \342\200\224\342\226\272
gives
an understanding
of all 16 propositional functions of 2 variables, and
all 16
sincep \342\200\224\342\226\272
to (~p) V q, in fact, ~, V, and A generate
q is equivalent
we have
now
functions. Let us list thesefunctions
with
the assignments
should
you
Thus,
made.
pVq
\"True\"
T
T
p+-l-+q
F
~(pAq)
F
T
T
T
-+q
q
T
F
T
F
T
F
P\"
F~
T
F
T
Propositions
~q
-*P
T
T
T
F
of 2
Connectives
The
-/-
7\"
~P
\342\226\240*q
q-
-/-
F
T
F
F
F
F
F
F
T
T
P~q
F
F
T
F
F
F
~(PVq)
F
F
. F
pAq
\"False\"
F
F
F
2 propositions,
between
it is possible to
Now, using all the connectives
more
than
16 such propositions. It follows, then, that
thereareseveral
Let us list some of the equivalences.
equivalences.
generate many
1.
(~p) A (~q)\\
laws)
(DeMorgan's
Vq)^
~(p
= (~p)
(p\342\200\224\342\226\272
q)
5. (p
\342\200\224 =
q)
(~p)
(~q
(~q)\\
(Lawof doublenegation)
(Law of implication)
V q
\342\200\224
of contrapositive)
(Law
~p)
in
DeMorgan's laws are useful
conjunctions.For example,
suppose
forming
and
negations
q are
and
of disjunctions
the following
propositions:
p:
God
makes
q: It rains
in
little green
apples.
in the
Indianapolis
The negationofpVq
is:Itis
false
or it rains in Indianapolisin
since -(pVg) =
God doesn't
summer time.
the
God
that
summer
w6 see
that the
it doesn't
(~p)
(~g),
negation of p V
rain
q is
also:
in Indianapolis
in
Section
1.5.3.
Example
when p V
precisely
(~p)
first
the
Verify
if (~p)
Conversely,
is true
(-g)
<?) is true.
then p
of p
a proposition,
The
law of
\342\200\224\342\226\272
is
\342\200\224*
q.
of
contrapositive
= P
~(~p)
converse
The
s3
\342\200\224+
and q
have
is
(~p)
(?, we
to p \342\200\224*
g.
of p \342\200\224*
<? is q
and
(~p)
\342\200\224\342\226\272
are
(~q)
\342\200\224The
F
T
F
F
F
T
F
~Q
~~P
\342\200\224*
of p
opposite
p.
F
T
since
(~q) \342\200\224\342
\342\200\224*
q (sometimes
which
is
(~g),
(~p)
to g \342\200\224\342\226\272
p. The
following
are
and
equivalent
q\342\200\224+p
q-+p
(~<7)-*(~p)
T
T
(-P)^(-Q)
F
T
T
F
T
T
T
of an
diagrams.
Converse
q^p.
qP\342\200\224
q.
If
for q.
p is sufficient
for p.
is
necessary
q
q, then
the converse).
p.
for p.
q is sufficient
p is necessary for q.
Contrapositive
Opposite
(~P)-M~<7).
not p, then not q
its
\342\200\224*
Implication
If
is
table and
and
~(~q)
and p V q
truth
implicationwill
p, then
case
equivalent.
P~+q
<7
If
is true
q)
In this
the contrapositive of
see that
\342\200\224*is
false
same
the
~(~p)
of p
the proppsition
<?)
the contrapositive of q \342\200\224\342\226\272
thus equivalent
p, and
truth table shows that p \342\200\224\342\226\272
q and
(~g) \342\200\224*
(~p)
the inverse
called
are
propositions.
(~q)
and ~(~(?)
is equivalent
(~p)
false.
then ~q \342\200\224*
is called the contrapositive
~p
contrapositive states that p \342\200\224*
q and
are equivalent
contrapositive
The
are
is true.
(~q)
If p
law. ~(p
DeMorgan
both p and q
or when
false
q is
41
of Logic
Fundamentals
1.5
(equivalent to
(~<7)-(~P).
not q, then not p
If
the
implication).
(equivalent
to
42
Chapter 1:Foundations
Converse
Theorem
q-^p
Q
P\342\200\224
If triangle
and
triangle
II
If
sides
the corresponding
I and
II are
similar,then
sides of
corresponding
II are proportional,
triangles I and
are
of triangles
the
and
triangle
triangle
II
are
then
similar.
True
proportional.
True
Contrapositive
Opposite
If
triangle
~p-+~q
and triangle
sides of
II
not
are
If
corresponding
I and
triangles
II
not
are
the
triangles I
then
proportional.
sides of
corresponding
and II are not
I and
triangle
proportional,
II
are
not
similar.
True
True
Converse
Theorem
Q-+P
Q
P\342\200\224
If the
ABCD is a
quadrilateral
square,
then
ABCD
quadrilateral
the
sides
are equal.
ABCD
of quadrilateral
of
sides
the
If
quadrilateral
False
True
Opposite
Contrapositive
~p-+~q
If
'
the
then the
square,
~q-+~p
ABCD is
quadrilateral
of quadrila-
side%
not
sides of quadrilateral
are not equal, then
the
quadrilateral
is not a square.
ABCD
If the
not
equal.
ABCD
True
False
converse
is true!
of a
theorem is not
Summary
-, V,
and
\342\200\224\342\226\272,
+-+,
A,
let
us remember
the
following:
1.
Either
2.
It is
p is
not possible
(Thus,
if an
both
found to
for
assumption
both
be true, then we
q is
true,
then p
say
be true simultaneously.
situation where p and
~p to
leads to a
and
both).
that
must
the assumption
be false.)
q must
be true.
~p
are
has led to a
Section 1.5
Fundamentals
4. If
q is
particular,
43
false,
if
of Logic
A q
similarly, if p A
5. If p V q is false, then p must be falseand so must
q.
V
in
6. If p
Hence,
q is true, then at least one of p, g is true.
particular, if p V q is true and p is false, then g must be true; and,
be true.
(Note,
similarly, if p V q is true and q is false, then p must
conclude
however, that if p V q is true and if p is true, we cannot
that q is true or that it is false.)
be true. (Note, however,
7. If p \342\200\224*
q is true and p is true, then g must
is
if p \342\200\224
is
could
be
true
or false.)
and
true
q true, p
q
be false.
8. If p \342\200\224*
q is true and q is false, then p must
\342\200\224\302\273
9. If p
then either p is false or q is true, or both. (Note
g is true,
that
that we cannot in this caseconcludeexplicitly
p is false and q
is true.)
be false.
10. If p \342\200\224*
q must
q is false, then p must be true and
11. If p \302\253-*
is
and
the
value.
must
have
same
truth
true, p
g
g
12. If p \302\253-*
values.
truth
g is false, then p and g have
opposite
Exercises
1.5
for Section
1.
for the
tables
truth
Construct
2. Provethe
(a)
are
following
following:
V (~r)).
((~p)
(pVq)A
g.
(g A
r).
tautologies:
^(pVg)V[MA(/]Vp.
(b) [(p-g)A(r-s)A(pVr)]-(gVs),
{[p
\342\200\224 \342\200\224
(q
r)]
r)]
-((/V
(e) {[pV9)-r]A
3.
Consider
David
(-(?)}
(~p)}
(p
-*
\342\200\224
V q)
(g
r].
r).
\342\200\224
r).
the propositions:
p: David is playing
g:
[(p
\342\200\224
pool,
is inside.
s:
David
to music.
is listening
Translate
the
p, q, r, s, ~,
V,
(b) Neitheris
following
A, and
is
David
sentences
into
symbolic
notation
using
only.
parentheses
playing
pool or he is inside.
playing
pool, nor is he doing his homework.
Foundations
(c)
(d)
(e)
David
is playing
David
is inside
4.
the
Using
q, r, and s of Exercise
acceptableEnglish.
of p,
specifications
(~p)
(a)
the
3 translate
r).
(b) pV(qA
(c) ~((~p)Ar).
[~r V s].
Vq]A
[(~p)
(d)
(a)
If he
If
the
\342\200\224*
in
q,
equivalent
form,
q.
fails to
s].
5. Restate
(~p)
[(~r)
triangle
follow
is not
ABC
on time,
is isosceles,
commission.
then I am in trouble.
lose his
he will
orders,
finished
and
B are
equal.
the
refund
money,
(e) If
lines AB
angles
6. Restate
are
and
CD
are
parallel,
not
will
anymore.
then the
shop
there
alternate interior
equal.
..
.\":
ABCD
be a
condition that a given
quadrilateral
a
is
it
be
that
parallelogram.
rectangle
A sufficient
condition
that ABCD be a rectangle is that it be a
(a) A necessary
(b)
square.
(c)
(d)
(e)
necessary
sufficient
that it be
(b)
sufficient
condition
that
divisible by 18.
condition
7. State
(a)
that
condition
a given
integer n be divisible
by
9 is
a given
integer n be divisible
by
9 is
that it is divisible by 3.
for n
by
to be divisibleby
9 is
that
the sum
of
9.
Section 1.6
Selected
1.
1.5
for Section
Answers
45
Inferences
Logical
(a)
pVq
F
F
T
T
F
F
T
T
F
F
T
T
T
T
T
T
F
F
F
T
T
T
T
T
F
T
~r
[(pV<7)A~r]- + q
~r
(pVq)A
F
F
T
F
T
F
T
F
T
\342\226\240
F
F
T
T
3. (a) pVq
A (~r)
(~p)
(b)
(c) p A (~r)
(d)
MAgAr
5. (d)
(e) Lines
are
angles
and
AB
there anymore.
or the alternateinterior
not shop
I will
or
not parallel
are
equal.
(Converse) If
7. (a)
CD
\\AB\\2
- | AC
|SC|2
is
triangle.
right
(Opposite) If
triangle ABC
a right
not
is
triangle, then | AB |2
\\BC\\2*\\AC\\\\
If | AB |2 +
(Contrapositive)
| BC |2
\\ AC
|2, then
ABC is not
triangle
a right triangle.
1.6 LOGICAL
INFERENCES
have
We
statements
part
said
that a
appear
of the
an
represent
as grounds,
which
statements
frame of reference.Otherstatements
may
someassertions
must
the
be
inferred
to
from
be true
those that
be
given
in the
as part
of
argument. But
have occurredearlierin
proof.
Thus,
deriving
which
assumed,
logical
conclusions
conclusions
or previously
implication.
or
rules
of
may be inferred
using
established.
A proposition
46
Chapter
1: Foundations
of p,
implies a propositionq, and q is a logical
consequence
\342\200\224\342\226\272
is
for
true
all
of
the
truth
p
q
possible
implication
assignments
of p and qy that
Much care must betaken
values
is, if p \342\200\224*
q is a tautology.
not
to confuse
The
(or conditional) with
implication
logical
implication.
conditional
is only a way of connecting
the two propositions p and q,
whereasif p logically implies q then p and q are related to the extent that
T then so does q. We
value
do note
whenever p has the truth
that every
is
an
but
not
all
(conditional),
logical implication
implication
p logically
if
the
implicationsare
implications.
logical
again,
true.
is
antecedent
we recall that
the
Moreover,
is true and the
in
the work involved
is
or
a
is
not
All
we
logicalimplication.
checking
need
do is check all possiblecasesin which
the antecedent
is true to see if
the
If
also
is
the
is
true.
this
t
hen
the
case,
consequent
implication
p \342\200\224\342\226
q
we would
draw the same
is, in fact, a logical implication. (Of
course,
conclusionif we checked all possible cases where the consequentis false
in those cases that the antecedentis alsofalse.)
and
determined
will
The word inference
be used to designate a set of premises
a
conclusion
by
regardless of whether or not the
accompanied
suggested
us,
to shorten
then,
a conditional
whether
of
conclusionis a logicalconsequence
premises.
and valid inferences.
faulty inferences
the
Thus,
We
say that
the
be
\342\200\224\342\226\272
of premises)
(conjunction
that is, if
can
implicationas follows:
as an
written
are
there
inference
Each
(conclusion).
is valid
this inference
implication
is a
if
the
implication
is a
tautology,
if the
conclusion
is a
conclusion
also is
true there.
of
It is important not to confusethe validity
of its conclusion.
Thefact that the conclusion
necessarilytruecanbeseen from the following
If Joe
reads TheDaily
Joe readsTheDaily
Worker,
Worker.
then
Therefore,
an inference
of a
argument:
a communist.
he is a communist.
he is
Section 1.6
Logical
If p
Worker\"
and q is
Daily
the above inference is valid
q)]
implies q (we need only checkthe truth
(p \342\200\224\342\226\272
logically
and p \342\200\224+
But the conclusion of the above
q is true).
not be true, for Joe may
be a propaganda
for
interpreter
represents
substituted
because
A
p
need
argument
is
\"he
for
[p
when
table
47
Inferences
then
communist,\"
premises
true.
are
conclusion
and
The most
inference.
in
Rule 1. Ifthe statement
Fundamental
we
circumstances,
accept
Symbolicallywe
.*. to
symbol
stand
have
q as
true.
the
following
for \"hence\" or
as true,
pattern,
rules
of
as true,
and
fundamental
is assumed
then, in these
\"therefore\":
:.q
In
this
line
horizontal
presentation
are the
It is
If it is 11:00o'clockin
Tallahassee,
then
it is
10:00 o'clock in
New
Orleans.
Then,
by
the
rule
of detachment
It is 10:00o'clock
in
New
we must
conclude:
Orleans.
It
emphasizing.
distinction
is essentially
48
Chapter
1: Foundations
rule
of the
substitute
can
we
detachment
of
propositional
the
rule
any degree of complexity.For example,
the
us
to
make
where
inference,
following
permit
propositionabove
the
line as
horizontal
functions of
would
of detachment
we assume
the
premises:
pA(9Vr)
[pA(qVr)]->sA[(~t)
.*.
The
sides
respectively,
equal,
A'B'C,
triangle
u]
V u]
is typical in
geometry:
and the included angle of triangle ABC
to two sides and the included
angle
(q) triangle ABC is congruentto triangle
of argument
line
following
s A [(~t)
are
of
A'B'C.
The
words
argument as
that
appear.
the
the
as follows:
completed argument would
appear
Since p is true and p \342\200\224*
q is true (by a special caseofa previous
in the
framework
of geometry), hence q is
theoremestablished
true (by
Another rule
of detachment).
rule
the
q
true.
accepted
In pattern
law of
rule.
transitive
Fundamental Rule 2.
\342\200\224\342\200\242\342\200\242
r are
called the
is commonly
inference
of
or the
hypothetical
syllogism
two
the
Whenever
implications
as true,
\342\200\224*
and
\342\200\224*
r as
form, we write:
p-^q
:.p-+r
This
rule
is a
valid
rule of
(p
is a
tautology.
The transitive
\342\200\224A
q)
(q
-* r) -*
to a
rule can be extended
as follows:
p-^q
q
\342\200\224
r
r\342\200\224*s
.\\p
\342\200\224
s
(p -*
larger
r)
number
of implications
49
Logical Inferences
1.6
Section
Most argumentsin
rules of inference,with
DeMorgan's
laws.
thoroughly
There are
in
ones
the
nothing
valid
following
will
You
limitations.
than a
more
we
Therefore,
other
based
uses
occasional
in understanding
versed
mathematics
inferences;
rules
fundamental
in the
of Inference
Rule
Tautological
1. p
.'. P
Related
of Inference
Name
Form
\342\200\224
addition
(PV<7)
2. pAq
(pA
g)
\342\200\224
simplification
[pA
(p
\342\200\224
q
g)]\342\200\224
modus ponens
\342\200\242*.
P
3. P
P\342\200\224
Q
\342\200\242'.
Q
4. ~q
(p
NA
\342\200\224
q)]-+
modus
~p
tollens
p-+q
.\\
~p
5. pVq
[(pV<7)A~p]--
disjunctive
syllogism
~P
\342\200\242#.
Q
6. p-+q
l(p-*q)A(q-+r)]-+lp^r]
hypothetical
syllogism
q-+r
.'. p-+r
7.
conjunction
.*. P
8.
(p
A q
\342\200\224
q)A
(r-+s)
l(p\342\200\224q)A
(pV
s)A
(r\342\200\224
r)]-\302\273[qV
constructive
s]
p V r
/. qV
9.
dilemma
(p\342\200\224q)A
(r\342\200\224s)
s) A
[(p\342\200\224\342\226\272
q) A (r\342\200\224
(-qV
~s)]\342\200\224*
[~p
V ~r]
destructive
dilemma
-QV-S
~pV ~r
them
rules,
in
DeMorgan's
as fundamental
rules.
the
above
laws, and
50
Chapter
1: Foundations
Rule
Fundamental
DeMorgan's laws.
3:
Fundamental Rule 4:
of
Law
contrapositive.
these
can summarize
constitute
rules
Fallacies
Theijeare threeforms
1. The
of
fallacy
of
inferences
faulty
affirming
the
that we will
(or
consequent
now discuss:
the
affirming
converse).
2.
The
of denying the
non sequitur fallacy.
fallacy
3. The
The fallacy
of
affirming
the
antecedent (orassuming
consequent
the
is presented in
opposite).
the
following
form:
\342\200\224
Fallacy
-\"\342\226\240
P
the following
Consider
If the price of
is
Inflation
rising.
This
thoughp q
gold
surely
argument:
is rising,
then inflation
the
Therefore,
coming.
is surely coming.
price of gold is
is
faulty
q are true,
\342\200\224\302\273
and
Q
P \342\200\224
\342\200\224
.\\ ~q
Fallacy
Section 1.6
LogicalInferences
the
Since
opposite
of p
opposite.
The
the
affirming
\342\200\224+
is
\342\200\224*
~p
converse
~g,
this
fallacy
need
p-+q
\342\200\224\342\226\272
p is equivalent
of
q\342\200\224+p
51
is the same as
not hold if p \342\200\224*
to q \342\200\224\342\226\272
p we
:.q
This is like
the
of
pattern
Of course,
\342\200\224*
omitted.
the
if this
detachment
premise is known
law of
For example,consider
the
If Socrates
is a
Socrates
Therefore,
This
is a
be
the
would
premise
the
correct,
premise
be ~q
\342\200\224\342\2
instead
argument:
man.
Socrates is mortal.
is
argument
valid
because
the
argument:
consider
However,
the
with
to
it follows
is a man.
Socrates
Therefore,Socratesis
mortal.
the conclusion
may be thought to follow
of \"man\"
does so only becauseof the meanings
Here
from
the premise,
and \"mortal,\" not
but it
by mere
inference.
Let
us
put
the
arguments
in symbolic
form:
p-^q
.-. q
The
second
has the
form:
.\\q
argument
has
the
Chapter
1: Foundations
It is
same
the
this
not share
has
triangle
three
arguments
many
argument with
second
the
argument
of the
does
second form
not regard
we would
which
are
There
quality.
any other
it valid;
makes
valid. However,
sides.
Here
this
considerit a valid
argument.
what remains
that
Notice
the form:
has
argument
of
bare logical bones,the mereform
in
common
have
regardless
arguments may
is the
sentences.It is
inference, deduction
precisely
has
for
in an
more
their
that
form
this
to do
with
the
argument
of the
enables us
the
forms
this
way
content of the
to analyze the
of the
propositions
not
the following
meanings.
To illustrate
in
which many
or
If a baby is hungry, then the baby cries. If the baby is not mad, then he
if a baby
does not cry. If a baby is mad, then he has a red face.Therefore,
is hungry, then he has a red face.
The
statements
basic
be represented
with
the
following
symbols:
baby is hungry,
h: a
c:
may
a baby
cries,
r: a
baby
Then the
has
a red
face.
form:
h\342\200\224+c
m\342\200\224\302\273r
.*. fe \342\200\224
r
We
see
contrapositive
that
h-+c
c\342\200\224\342\226\272
m
m\342\200\224+r
.-.
h-+r'
Section 1.6
LogicalInferences
the
final form,
this
In
the
of
form
is nothing
argument
Consider
Nixon will
If Tulsa
will be
Nixon
T: Tulsavotes
representations:
reelected,
for
the
of
form
and
Nixon,
is:
argument
R~
\342\200\224
R
/.
Now -J?
him.
reelected.
A: Tulsa
The
be
air base.
votes for
reelected.
lose its
only if Tulsa
Nixon will be
Therefore,
will
Tulsa
if and
reelected
be
more than
argument:
following
is not reelected,then
If Nixon
53
\342\200\224+
~A
and
canbe
\342\200\224*
R are
so that
equivalent
to:
simplified
R~
A
\342\200\224
R
.-. R
We suspect
neither
nor
T is
has
been
consider
could
\342\200\224*
R to see that we do not have
of [(A \342\200\224*
R) A (R *-* T)]
a valid
thus that the inferenceis invalid. Nevertheless,
have
been
If Tulsa
In words:
T,
Tulsa
votes
for Nixon.
argument:
If a pair of anglesA
angles
A and
and
B are
B are
right angles,
equal.
a pair
a tautology
inference
\342\200\224\342\226\272
or
Consider the
The
committed
the truth
of angles
E: the anglesA
and
and
B are
B are
equal.
right angles,
since
table
and
would
54
Chapter 1:Foundations
of the form:
an argument
have
therefore
We
R-+ E
Obviously,
affirming
is faulty; in fact, it
this argument
the consequent.
of
Exercises
each
first
as
in the
blanks
the
Complete
is in
the
with
considered.)
N is
If the year N is a leapyear,
then
The number 1984isa multipleof four.
a multiple
of four.
Hence,...
2.
are to be continued,
interest rates
If high
industry
High interest
will
be
then
the
housing
hurt.
rates are to
Hence,...
If
is Thursday,
today
be continued.
ten days
ten
from
is Thursday.
Today
Hence,...
If today
is Thursday,
days
now
will
be
Monday.
is Thursday.
Today
Hence,...
1984is a leapyear.
Hence1984is
Therefore,
7.
If two
election
presidential
If today
I will go to
are
triangles
go
year.
to church.
church.
congruent,
then the
equiangular.
The
8.
are congruent.
two triangles
Hence,...
If the triangle
is
isosceles,
then
the triangle
angles.
Hence,
the
triangle
has
two equal
angles.
Section 1.6
Logical
If triangles
9. (a)
then
congruent,
angle A'.
(b) Triangles
A =
angle
are congruent.
A'B'C
and
ABC
55
Inferences
(c) Hence,...
10.
(a)
....
(b)
Price controls
(c) Hence,
the
are to be adopted.
11. Completethe
eachsetis conformity
in
blanks
with
in
1. (a) TriangleABC
is
be saved
will
country
the following
the transitive
from inflation.
sets of
triangle
implies
equilateral
propositions so that
rule.
ABC is
equiangular.
Triangle
(c)
Hence,...
If x is greater than y,
(b) If u is lessthan vf then
2. (a)
3.
1960
If
was a
....
(c) If 1960
z is
leap year,
= 60\302\260.
less than v.
greater than w.
u is
than
(c) Hence,...
(a)
implies angleA
is equiangular
ABC
(b)
then 1964was
a leap
year.
(b)
York
New
If
(a)
time
Denver
(b)
a leap
was
4.
If Denver
time is two
San Francisco
5.
slower
New
than
time,
then
New York
time.
York
(c) Hence,...
III.
Determine
If the
is guilty\" implies
\"Z is under
\"X
Since
(a)
innocent\"
faulty.
hours slowerthan
implies
\"Y
is
innocent,\"
and
each
of the following inferences is
whether
which
will
inference is valid, produce someevidence
a combination
its validity. If the inferenceis faulty,
produce
a fallacy,
or indicate a fallacy.
values that will confirm
1. If today
Today
2.
is David's
is January
birthday,
24.
then today
The
days are
the
nights
valid
or
confirm
of truth
crime.
guilty.
becoming longer.
are
nights
Hence,
not
is
\"Y
is January 24.
If the
Hence,the clientis
3.
(b)
shorter
becoming
are becoming
if the days
shorter.
are becominglonger.
Foundations
a =
If angle
4.
angle /?,
AB and
lines
the
then
The
5.
Theearthis
6. If
not
spherical.
is not
the moon
Hence,
BC are equal.
= BC.
AB
know
We
spherical.
7.
8.
David
final
the
passes
99\302\260.
are expensive.
diamonds
Hence,
9. AB is parallel to EF or CD
AB is parallel to EF.
Hence,
is not
CD
to EF.
parallel
10. AB is parallelto EF or CD
CD is not parallelto EF.
A
12.
to EF.
is parallel
is parallel
to EF.
truth.
guilty and B is not telling
it is false that \"A is guilty
or B is telling
AB
Hence,
11.
to EF.
is parallel
the
is not
Hence,
Either
Mack
Mike
is not
is not
guilty or
truth.
telling the
the truth.\"
is studying
If Lowell
theologyand Greek.
is not
Lowell
14.
required
for the
to take
then
ministry,
he
is required
to take
Greek.
a special
call
session.
The Senate
a
Hence,
15. The
governor
will
call
a special
session only
if
the
Senate
cannot
the
governor
reach a
compromise.
If a majority of the Cabinetare in
will
call
a special
The Senate
a majority
Hence,
16. The
then
agreement,
session.
governor
reach a
will
call
compromise.
a special
session only
if
the
Senate
cannot
Section 1.6
If a majority of the Cabinetare in
will call a specialsession.
The Senate
reach
a
governor
a compromise.
reach
can
Hence, a majority
17. The governor will
the
then
agreement,
57
Inferences
Logical
of the Cabinetarenot
in
agreement.
only if the
session
a special
call
Senate cannot
compromise.
If a majority
of the Cabinet are in
will call a specialsession.
The Senate
the
governor
a compromise.
reach
can
then
agreement,
Hence, the
18.
The
new
car.
a nice
have
also
They
IV.
in the
in the
blanks
following arguments by
using
1. Ifitis
not
sun will
out.
the
raining,
come
not
/? are
CD
and
law of
come out.
Hence,...
2. If lines AB
the
then alternate
are parallel,
equal.
But angles
Hence,...
a and /?
not
are
equal.
3. If the graphsareisomorphic,
their
then
degree
spectrum
will be
the
same.
Theirdegree
different.
are
spectra
Hence,...
then
the graph G is bipartite,
The graph G is not two-colorable.
G is
4. If
two-colorable.
Hence,...
C is on the perpendicular
bisector
is equidistantfrom A and B.
Hence, if C is not...
5. If
6. If Joedoes
graduate.
not
Hence, Joe...
pass
the
language
of
the
line segment
AB, then
then he
requirement,
does not
if
7. If
the graphs
are isomorphic,then
they
have
the
same number
edges.
The
graphs
have
numbers
different
of edges.
Hence,...
8. If Melindais late,then
Hence, if...
she
will
be placed
on restrictions.
of
58
Chapter
1: Foundations
is valid
whether each of the following
inference
V. Determine
patterns
a combination
of
indicate
or invalid. If the inferencepattern is invalid,
If the inference
truth values which will produce a counterexample.
which will confirm its validity.
some
evidence
patternis valid, produce
1. r\342\200\224+s
2.
.-.
3.
r\342\200\224\342\226\272
s
~r
rVp
'
.-. s
6. ~f-* ~r
5. (pA<7)-*~f
p-+(r-+s)
~s
~r^>~p
wV
iv\342\200\224\342\226\272p
f\342\200\224>w
/.iv
(ivVr)-^^
7. ~r-*
(s \342\200\224
~f)
.'. (p A<7)
P^Q
2l
9. ~r
8. p
p^q
p\342\200\224<7
~p^s
-IV
.*.
.-.
~p
.-. f^p
10. ~p
11.
p^q
P-^q
q-+
~r
Hence,if
14.
15.
If wages
the
cup
it is
then
water,
is styrofoam,
triangles
given
Therefore,
the
not sold in
then
then Joe
triangles
are
are
can carry
it.
increases.
If thereisa depression,
cannot
wages
if
a
there
is
Thus,
depression,buying
The given triangles are similar.
If the
similar.
are
balls
is in Florida.
Tallahassee
Hence,
golf
be raised.
cannot
increase.
mutually
equiangular,
mutually
equiangular.
then they
are
Section 1.6
16. If
Hence,
VI.
Verify
symbols
59
Inferences
Logical
assistant.
assistant.
into
translating
by
If Joe
VII.
the
that
Verify
is valid by
argument
following
inference:
If Clifton
Hence,
Selected
Answers
I. 1. (c)
2.
(c)
conclusion.
No
Hence, the
5. (a)
If 1984 is a leapyear,
8.
The
(b)
triangle
(c) Henceif
II. 2.
III.
a bicycle.
rides
Clifton
x is
hurt.
a presidential
election year.
than y,
the
then z is greaterthan
w.
consequent.
the antecedent*
syllogism.
disjunctive
Valid;
it is
be
is isosceles.
of affirming
Fallacy of denying
12.
then
greater
1. Fallacy
5.
French.
18. Nonsequitur.
IV. 3.
8. Hence, if
not late.
V. 1.
are
not
isomorphic.
Valid
(1)
(2)
~s-*~r
\342\200\224>5
(3) ~s
(4)
~r
premise
Rule 4
premise
by
(2), (3),
Rule 1.
restrictions,
then
she is
Chapter
1: Foundations
5. Invalid.
the
but
following sets of
conclusion is
the
false.
p
T
~t
F
T
T
F
F
T
T
T
F
T
7. Valid
(1) -rVu;
(2)
~w
(3)
~r
premise
premise
by (1) and
(4) (~r)
(2),disjunctivesyllogism
\342\200\224(s\342\200\224~t) premise
and Rule
1.
and Rule
2.
(5)
s-+~t
by
(6)
~p-+8
premise
(7)
~p\342\200\224~t
by
(8)
t-+p
(3), (4),
(5),
(6),
10. invalid.
OF PROOF OF AN
METHODS
IMPLICATION
the
define
which valid
inferences
to
ways\342\200\224first,
are
based.
Now in this
validate
common
nine
warrants
and, second,to supply
drawn in each step ofa proof.
The
methods
nine
referred
frequently
known methods of
of proof
and
in two basic
inference
patterns
methods for proving implications,
for the conclusions
justification
that we
to by name,
proof\342\200\224they
just
which to build.
provide
a good
they
are
all of
the
foundation
upon
must
skeleton
emphasize
outline
patterns.
form
that
that
what we
Section
Brief
1.
of the
descriptions
proof
regardless
Thus, the construction
of a trivial
implicationp q true
3. Direct proofofp
\342\200\224
If
q.
\342\200\224\342\226\272
of p
proof
shown to
p is
q.
direct proof of
of a
construction
\342\200\224*
The
\342\200\224\342\226
<?
from
information
available
assuming
the frame
that
showing
q requires
proposition q.
for any
\342\200\224\342\226\272
is
by
61
Implication
of p \342\200\224\342\226\272
q. If it is possible to establishthat q is true,
of p, the implication
of the truth value
p \342\200\224\342\226\272
q is true.
Trivial
then,
begins
of an
of Proof
Methods
1.7
to be
is shown
true by
valid
inference.
4.
Indirect
implication p
Consequently,
we
\342\200\224\342\226\272
the
the fact
(~p)
\342\200\224\342\226\272
(~p).
contradiction.
q by
laws and
DeMorgan's
\342\200\224is true
q
that p
~p.
(^q)
true by a direct
is
true.
Thus, an indirect
~~q
that
from
iff
(~q)
of proof exploits
the equivalence of
is false. Thus, a
is false,
(~q)
so that
step
was
(b)
false
(Pi V p2
the different
\342\200\224
q by
. V
If p
cases.
pn)
\342\200\224
can
true.
is in the form
be established
and
\342\200\242>
pn
<?,- \342\200\242
is
given
. V pa,
separately
by proving
Pi
implications:
Pi ~^Q,P2-^
is
in
\342\200\224\342\226\272
is
6. Proof ofp
that
leads
us to
and therefore
the
then
proof by
\342\200\224
to
as follows:
is constructed
contradiction
q by
\342\200\224\342\226\272
[derived
V q]
the
from
information
\342\200\224\342\226\272
to
assumption
basis
the
on
5. Proofofp
establishing
be shown to be
\342\200\224\342\226\272
as follows:
implication ^q
of p
implication is likely
proof proceedingfrom
q proceeds
proof of p \342\200\224\342\226\272
(b)
to the
the truth
establish
The
of contrapositive).
proof
(direct
equivalent
can
this last
Of course,
of p
proof
\342\200\224\342\226\272
is
-> q.
V p2 V
. .
1: Foundations
method
The
thestatement
cases is valid
of proof by
V p2)
(px
\342\200\224*
and
(px
q)
of cases.
7. Proof by elimination
or in constructing a proof we
are
n =
when
\342\200\224
\342\200\224*
are
equivalent.
q)
in solving
a problem
two alternatives: either
Frequently
with
confronted
example, because
2, for
A (p2
on to
go
that q is
true.
To be sure,this
disjunctive
extendedto any
[{(Pi
a proof by
Likewise,
on the
V q]
pj
q,
be
\342\200\224
\342\200\242
\342\200\242
\342\200\242
(~pj]
based
form
following tautology:
In other
r, and if
that p
conclude
is a
third
Suppose,
form p
statement
then
r).
(p
two possible
conclusions q or
fact,
we may
r.
a proof
of
\342\200\224\342\226\272
V
(pA-g)-*r.
proposition (p
prove, sinceonewould
instead
q is
form
\342\200\224 \342\200\224
implies
thatp
of the
a statement
The second
{~q)\\
impliesthe otherconclusion
there
Finally,
situation,
~q)
have
at least
two premises p
\342\200\224>
r is
the onepremise
p.
potentially simpler to
and ~q with
which
to
for
that
we wish to prove the following
statement
example,
number X: If X2 - 5X + 6 = 0, then X = 3 or X - 2.Then,
we
this by assuming X2 - 5X + 6 = 0 and X # 3 and then
accomplish
a real
for
could
that
demonstrating
= 2.
however, a proof by
further
assume
and
DeMorgan's
The next
contradiction
p A
law), and
(~q)
(~r)
proof
of
A q)
\342\200\224>
r are
equivalent.
two
\342\200\224*
(<?
r)
by
proof by contradiction;
of p \342\200\224*
(q V r) would
go one step
(since
by
-(<? V r) = (~g) V (~r)
to
a contradiction.
another
method of proof is actually
just
of cases,but we separate
it out for better recall.
(p
of
law
it can
of course,
and,
A (~p2)
(~px)
{[p-((/V r)] A
work
\342\200\224
(~p)]
of cases:
number
. . . V
is nothing
proof
[(p V q)
finite
p2
of
method
syllogism:
propositions
Therefore,
form
of elimination
\342\200\224 \342\200\224
a proof of
(q
r)
and
the conditional
Section
of Proof
Methods
1.7
be constructed
can
p\342\200\224+(q-+r)
of an
as follows:
63
Implication
other
and
information.
p is true if and
proof into two
of course,
we prove q \342\200\224\342\226\272
p. We may,
only
a proposition
break
the
that
we
then
halves: we prove p \342\200\224\342\226\272
q, and
choose any methodof proof to prove eitherhalf.
of direct
Examples
direct
of
examples
proofs.
wish
to prove the statement: If X
= 0, then X = 3 or X = 2. Now since
we are discussing
numbers, the frame of referenceshould includeallthe
rulesof algebra.A direct proof of the statement proceeds as follows:
X2 - 5X + 6 = 0. Using
Assume
of algebra, we have X2 - 5X +
rules
the
=
=
6
(X
3)(X 2) 0. It is known (a fact from the frame of reference)
that if the product of two numbers
is zero then one or the otherofthe two
= 0orX-2
=0. ButX - 3 = 0
factors
must
be zero. Hence, X-3
=
=
=
X = 3 or X = 2.
2 0 impliesX 2. Thus,
\342\226\241
implies X 3, and X
1,7.1.
Example
is a number suchthat
a2
- 5X
X2
we
+ 6
If an integer a
divisible by 3.
1.7.2.
Example
then
Supposethat
1 is
is suchthat
2 is
divisible by 3,
\"a
the
statement
we give a direct proof. Here we let
Again
\"a2
3\"
we
is an integer such that a
and
let
divisible
q represent
by
3\"
1 is divisible by 3.\"Next, we translate
what
\"divisible
means.
Since
by
- 2 = 3k, wherek is
a - 2 is divisible
by 3, we know that a
- 2is
Therefore,
then
a2
is divisible by 3 sincea +
(a + l)(a - 1) - 3(k + l)(a
+ 1
- 1=
If a
1.7.3.
Example
p represent
someinteger.
1 =
- 2) + 3 = 3(k +
1) is divisible by 3.
(a
b is
1),
and
\342\226\241
an even
integer.
Let us recallthat
integer.
Likewise,
an
an
odd
has
integer
has
the
integer
even
the form
form 2m + 1, where
is an
64
Chapter 1:Foundations
since
Therefore,
integer.
we know that a
in a
respectively.But then,a +
even integersincek + m +
Before
b =
the antecedent,
assume
can
+ 1,
2m
(2k +
1 is
more examples
some
giving
direct proof we
= 2k + 1 and
of proofs,let us
a well-known
recall
result called
a is
course,
by b if and
divisible
Exampleofa proof
of
only if
r given by
remainder
the
the
equivalence.
same
the
remainder
when
by n.
\342\200\224
bis
divisible
namely,p\342\200\224+qand
proofs,
let us
First,
q\342\200\224+
p.
means.
If we
apply the
divisionalgorithm,then
a =
nqx +
rx,
where
just asserts
-
asince
rx
(m(?! +
\342\200\224
=
r2
r^
- (nq2 +
0. Therefore,
r2)
- q2)
n(qx
\342\200\224
b is
divisible
(rx
r2) =
by n since
gx
n((?i
q2)
\342\200\224
is
q2
an
integer.
equal
r2.
\342\226\241
Section
of Proof of an
Methods
1.7
remainder
has
We know that a
= (10)<7X
a +
Therefore,
integers.
a +
we conclude
integer.
and b
are
when divided by
2 and
b =
(I0)q2
6 = (lO)^ + <?2)
divisible
is
has remainder2
10, then a + b is
that a
such
integers
8, respectively,
by 10.
divisible
and
If a
1.7.5.
Example
and b
4-
8,
+ 8)
4- (2
10 since
by
65
Implication
qx and
where
= (lO)^
+
qx
+ q2
+
<?2
are
<?2
1),
1 is
an
\342\226\241
by contrapositive.
of proofs
Examples
and odd
of even
concepts
We
b is
or
even
Then
to prove
\342\200\224\342\226\272
~p.
By DeMorgan's
are
we
familiar
b is
a and
integers
even, then
even.
be the proposition\"ab
Let p
even.\"
instead ~q
uses the
integers.
eithera is
to illustrate
now
wish
first example
Our
contrapositive.
is
let q be \"a
and
even\"
\342\200\224\342\226\272
but
is even or b is
we prove
by contrapositive
qf
is complete.
\342\226\241
1.7.7.
Example
<7X
the
be
by DeMorgan's
a > nin and
6>
bea prime.
Thisis
would be
n1/2.
then
But
true
6,
if we
n1/2.\"
Then
of inequalities, we know
from properties
n is not the product of a and
\342\226\241
since,
\"6 <
let us assumethat
6.
= ra.
Hence,
1.7.8.
Example
contrapositive
a and
integers
or
assume
a smallerfactor of n.
is also readily
its
smallest
verified
factor
p >
a factor
by
1 must
that
\342\226\241
for
an
two facts go together to provide the foundation
of a given
to find the smallest prime divisor
positive integer n
a
assume
and hence determinewhether
that
or not n is itself a prime. We
list of all primes lessthan
or equal
to the square root of n is available.
The
above
algorithm
smallest
divisor
prime
Input: a positiveintegern.
Output:
The
smallest
prime
divisor of
n.
of n.
66
Chapter
1: Foundations
Method:
Examples of proofs
contradiction.
by
We
in the
prove
13
has
1.7.9.
Example
birthdays
this
people
proposition
and no pair
by assumingthat theroom
by contradiction
of people have
their
in the
birthdays
in some
is born
person
their
same
assuming
be 13
must
Example
randomly
of3
positioned
around
consecutively
Let us give
a proof
Let X{ represent
we are to prove:
either
.,10
are
Suppose that the 10 integers1,2,..
a circular wheel. Show that the sum of someset
numbers
is at least 17.
positioned
1.7.10.
by contradiction.
X2 +
or
X2
+ X3
X3
X10+
and
Xx
Then
17,
X2 >
second
wheel.
> 17,
X4 >
the
17
positions
are consecutive
on a
Section
of Proof
Methods
1.7
of an
If, on
is
the
67
Implication
then
false,
by
following
statements:
4- X2
Xx
X2 +
since each
Moreover,
But the
integers,
inequality
is <16
sum Xx
4- X2
which we
becomes
is a
this
Example
white, blue,
balls, 15white
Let
X10)
^ (10)(16).
10
positive
last
the
gold
> 15, X3
> 4, X4
the number
respectively,
represent,
Xi,X2,Xs,X4iX5
12, X2
fact,
rather
\342\200\242
\342\200\242
\342\200\242
4-
contradiction.
17.
\342\200\242
\342\200\242
4- \342\200\242
4- X10 is just the sum of the first
can observe is equal to 55. Therefore,
165 =
Clearly,
X2
17,
<
X2
17,
we discoverthat
these inequalities,
all of
of
X4 <
X, is an integer,in
inequalities
3(XX
Xx
X10 4- Xx +
and
sum
X3
+ X3 <
>
of red, white,
chosen.
We are to prove
10, or X5 > 4. Suppose,on
that either
the
contrary,
\342\200\242
\342\200\242
4-
thatX1<ll,X2<14,X3<3,X4<9,andX5<3.ThenX14-X24-\342\200\242
other
hand, the sum Xx +
X5 < 11 4- 14 4- 3 4- 9 4- 3 = 40. But, on the
\342\200\242
\342\200\242
of balls
chosen. Thus,
4- X5 = 41, since this is thetotal number
X2 4- \342\200\242
a result,
as
the
we have arrived at the contradiction41 < 40 and,
conclusion is verified. \342\226\241
the
principle.
Let mum2i..
objectsare put
objects,
The same
1.7.12.
Example
pigeonhole
or the
.,mn
be
into
n boxes,
positive
second box
contains at least mn
objects.
integers.
If
mx
4- m2
4-
\342\200\242
\342\200\242
\342\200\242
4-
mn
- n 4- 1
68
Chapter
1: Foundations
\"the ith box contains at least mt
\342\200\242
\342\200\242
the
statement
+ m2 4- \342\200\242
+ mn p represent
\"mx
objects,\"
n 4- 1 objects are put into n boxes.\" Then we are asked to prove:p \342\200\224*
\342\200\242
\342\200\242
\342\200\242
v Qn)- We do this by contradiction,that is, we assume
p
(Qi v 92 v
. . . V qn).
V
V
q2
and~(gx
A
~(qx V q2 V . . . V qn) = (~qx) A (~g2) A ...
ByDeMorgan'slaws,
A
A
A
A
Thus
we
are
Now
assumingp (~(?i)
(~g2)
(~qn).
-*</,
(~gj.
in other words, the
the ith box contains lessthan m, objects;
means
that
ith box containsat most mt - 1 objects. But since we are assumingthe
of all the statements
conjunction
~qh we are assumingthat the first box
1
I objects,
has at most mx \342\200\224
and the second box containsat most m2 \342\200\224
\342\200\224
and
1
nth
box
at
most
then
the
contains
But
mn
objects,...,
objects.
- 1)
\342\200\242
\342\200\242
all n boxes contain at most (mx - 1) + (m2 - 1) 4- \342\200\242
4- (mn
\342\200\242
\342\200\242
\342\200\242
Sincethis
last
number
is
to
+
+
+
n, we
m2
mn
objects.
equal mx
\342\200\242
\342\200\242
see that all n boxescontainat mostmx + m2 + \342\200\242
+ mn - n objects, and
in that
hence the statementp is contradicted
not all of the mx + m2 +
\342\200\242
\342\200\242
\342\200\242
been
distributed.
This contradiction
+ mn - n + 1 objects have
the
is
valid.
\342\226\241
proves
pigeonholeprinciple
Let
<7i
statement
the
represent
and let
of
or more.
pigeons
1.7.13
Example
the
contains
is
average
at least
If
Another form of the pigeonhole
principle.
some
then
pigeons per hole,
pigeonhole
and
some pigeonhole
contains at most A
pigeons
number of
A
pigeons.
is almost
proof
and m,
is the
similar.)
the
total
number
is a
contradiction
of
the floor of
A)
A)
L9.7J = 9. In
since
mx
4- m2
4-
<
m2
= the
Ar
total
. .,and
number
\342\200\242
\342\200\242
\342\200\242
4- m\342\200\236also
is necessarily
an integer,
us use the notation (called
integerx > A and L A J (called
x < A. Thus, T9.71 = 10 and
a pigeonhole
integer.
Let
A and
mn < n
of pigeons.
the ceiling
mx <
that
\342\200\242
\342\200\242
\342\200\242
4-
version
of the
pigeonhole
Section
Methods
1.7
can be
principle
If
is
contains
LAJ
the
of an
of Proof
69
Implication
stated:
number
average
at least
f~Al
of pigeons
and
pigeons
per hole,then
some
some
pigeonhole
contains at most
pigeonhole
pigeons.
of the
Applications
principle.
pigeonhole
then some
1 pigeonsaredistributed
n
among
In general,if k is
then some hole containsat least3 pigeons.
pigeonholes,
n pigeonholes,
an integer and kn + 1 pigeonsaredistributed
then
among
This follows since the average
some hole containsat leastk + 1 pigeons.
number of pigeonsperhole is k + 1/rc and \\k 4- 1/rcl = k + 1.
2. In any group of 367 people there must be at leastonepair with the
1. If n
hole
same
are distributed
2 pigeons. If 2rc +
1 pigeons
least
at
contains
among n pigeonholes,
birthday.
impliesa
4.
a matching
finding
5 individual
socks in 4 holes
pair.
matching
group of
In a
a drawer,
in
born
in
the
same
month.
5. If 401letters
delivered
receivedat most8 letters.
to 50
were
6.
50
Suppose
that
student
column
students,
some
most
8 students,
are arranged
chairs
10columns.Suppose
(one
chair,
per
41
students
are seated
apartments,
pigeonhole
principle
at
4 students.
The
the average number
most
because
of studentsperrow
is 8.2
and the
Tosee
taken
let a, be the number of pills the patienthas
through
why,
of the ith day. Since the patient takes at least one pill per day and
\342\200\242
\342\200\242
< 45. Also,
at most 45 pills in 30 days, we have
1 < ax < a2 < \342\200\242
a30
\342\200\242
\342\200\242
<
< \342\200\242
<
14
14
14
to
of
each
these
4+
a2
adding
inequalitiesgives ax
<
=
14
14
45
59.
now
have
60
We
444a30
integers: aua2y.. .,a3o,Gi 14,
between
a2 4- 14,.. .,a30 4- 14. Moreover, these numbersall liein the range
1 and 59. Thus, we have 60 pigeons in 59 pigeonholes, so there must
be 2
of these numbers that are equal.Sincealfa2,..
are
all
and
different
.,a30
the end
70
Chapter 1:Foundations
14,.. .,a304- 14 are all different, it must be that one of au
to one of the integers ax + 14, a2 4- 14,.. .,a304- 14. In
=
i
other words, there are i and J suchthat
a,
a, + 14. Thus, betweendays
and y, the patient takes exactly 14pills.
8 distinct
8. If*i>*2v \342\200\242
integers, then there is somepair of these
'9xsare
with the same remainder when divided by 7.
integers
are
the
If each integer is divided by 7 and their remainders
recorded,
for these remainders are 0,1, 2, 4, 5, and 6. Thus, we
only possibilities
from 0 to 6.
7 possibilities
the
have 8 remaindersto bedistributedamong
In otherwords, it is like distributing 8 pigeons among 7 pigeonholes.We
there
are at least 2 pigeons in somehole or in this
conclude
that
which
are
tliere are at least 2 of the remainders
framework,
equal.
in yet another
Let us rephrase what we have
way. The division
proved
algorithm impliesthat the set of integers can be partitioned into 7
ax
14, a2 4-
a2,..
is
.,a30
equal
3,
congruence
classes)
which
we
denote
iff
is
which
by
the
are
pigeonhole
class. By
must
have
the same
the definition of congruenceclass,these2 integers
remainder when divided by 7.
This latter
approach, while in fact the sameasthe former,nevertheless
a slightly
requires
deeper technical understanding becauseof the appeal
of congruence
to congruences.
The
class is useful in the next
concept
example.
9.
this
Given
set
any
whose
set
of 7
sum or
Section
of Proof
Methods
1.7
by 10.
divisible
However,
{[2],[8]}
pigeonholes,
if
Examples of proofs
to recall
the definition
have
Before
cases.
by
need
71
Implication
for example,
we
of an
what
accomplished
we give
of the absolutevalue
we
of a
real number.
If x
If a
1.7.14.
Example
x | >
4, then x2
>
16.
At
first
this proof
may not
in the
definition
of
if x
> 4, then
glance,
are hidden
absolute
> 4.
\342\200\224x
Therefore,
(-*)(-*)
>42 = 16.
by
3, then
>
42 =
16. Likewise, if
1.7.15.
Example
divisible
x2
\342\200\224
x >
4, then
x2 =
\342\226\241
a2
1 or
a - 2 is
a2
An example
1.7.16.
of a proof by elimination
of
Suppose that we are to prove:If p isan odd prime, then p has the
form
6m + 1 or 6rc + 5 or p = 3.
6 into p, then we
we see that if we divide
the
division
By
algorithm,
have
6 possibilities
for remainders, namely, 0, 1, 2, 3, 4, or 5.
only
we conclude that either p = 6n, p = 6n + 1, p = 6n + 2, p =
Therefore,
=
6m
some of these casesmay
6m + 4, or p = 6rc + 5. Nevertheless,
+ 3, p
be eliminated
since p is an odd prime.The cases
p = 6n, 6m + 2, 6n + 4
can be eliminatedsincep is
case
and
the
p = 6n + 3 can be
=
=
eliminatedexceptfor the special case n 0 or p 3,for in all other cases
Example
cases.
odd,
p would be divisible
As
proof.
a final
example,
by
3 and
not prime.
\342\226\241
72
Chapter
1: Foundations
(i) If a is a primeinteger,then
be, thena
(ii)
b or
divides
if a
divides
a divides
c. [p
of two integers
the product
\342\200\224*
\342\200\224\342\226\272
r V
s)]
(q
to:
By conditional proof (i) canbechanged
the product of two integers be,
If a is a prime integerand a divides
b or a divides c. [(p A q) \342\200\224\342\226\272
thena divides
(r V s)]
of cases (ii) can be
Not only is this so, but also by elimination
reducedto
(iii)
to prove:
are
we
An example
1.7.17.
Example
that
proving:
a is
If
~r)
divides
b, then
the product
of
a divides c. [(p A
two
q
\342\200\224*].
of the
used valid inference patterns to changethe form
But we have not proved
(i) to another equivalent form
(iii).
we have just reformulated the problem.We
(iii)
yet;
anticipate
anything
will be easier to prove since we can use the three premises, but
and details still have to be supplied in orderto
additional
facts
nevertheless,
we
Now
have
proposition
(iii).
prove
actually
complete the
proof of (iii)assuming
the
has in his arsenal
reader
common divisor of two integers
d and e,
dx + ey, wherex and y are
as a linear
combination
in Chapter 4.)
(This fact will be proved
integers.
this
extra
With
we prove (iii). Sincea is primeand a does not
weapon,
b is 1. Hence, there are
divide b, the greatest commondivisor
of a and
x and
integers
y such that 1 = ax + by. But then if we multiply this
equation by c, we have c = acx + bcy and clearly a divides acx since a is a
a divides
be since this is one of the premises
factor.Moreover,
of the
a divides acx and bcy, so a divides
their
sum\342\200\224or in
Thus,
proposition.
other
words, a divides c\342\200\224andthis is what we were to prove. \342\226\241
Let us
Exercises
for
the
greatest
1.7
Section
casesto
(a)
prove
Every odd
and
algorithm
the
by cases
proof
or elimination of
following:
odd
integer
is of
4rc
+ 1
or 4rc
the form 8n
+ 3.
1.
Sn or 3rc + 1.
The square of any integer is eitherofthe form
of the form 9n, 9n + 1, or
is either
(d) The cubeof any integer
(c)
9m
+ 8.
(e) The
(f)
Any
Conclude
equation
x3
that
Illy3
= 5 has
no integer solutions.
n >
integer
+ 5.
Section
of Proof
Methods
1.7
(g)
(h)
Ifp = p\\
+ pi
4-
then
(j) If integer
case 64
with
2.
Give
prove
direct
x is
or In + 1.
for the
proofs
then one
1(c).
divisible by 3.
12& +
the form
p2 has
is simultaneously
= 82 = 43), verify
an
form In
use
73
Implication
are primes,
andp3
wherep,px,p2,
p2,
of themisthe prime3.Hint:
If x is an integer, then x3 -
of an
1, wherek is an
following: For
integers a, b, c, and
d,
that
a divides a.
(a) a divides 0; the integer1 divides
a; and
(b) a divides 1 iff a = 1 or a = -1.
If a divides
b and c dividesd, then ac divides
bd.
(c)
(d) a divides b and b divides a iff a = b or a = -b.
b and
b is not zero, then | a | < | b |.
(e) If a divides
a divides
bx + cy for
If a divides b and a divides c, then
(f)
(h)
If a
If a
(i)
a divides b iff
(g)
ac
divides
be, where
6c.
a2 divides
c #
0.
an
integer
a,
squareof
an
odd
integer
is of
24
divides
the form
a (a2
8n +
- 1). Hint:the
1.
If a
and b are
oneofthe
numbers
is greater
than
r/n.
74
Chapter 1:Foundations
7.
certain2-digitdecimal
thenthetens
of n is 1.
If the product of a
by contradiction:
n by 5 is a 2-digit number,
Prove
integer
8. (a) If
n are
and
mn > m
(b) If m and
each integers
> 2, prove
digit
that
contradiction
by
n.
10. Use
(a)
x and
y.
divisibleby
(b)
Given
n +
9.
1 distinct integers,then
is divisible
pair of them
positive integer n.
is some
there
by the
(c)
Given
them
37
integers,
positive
have the
that
these sectors.
(a)
Show
that
assigned
there
numbers
are
is at
3 consecutive
least
are 5
77.
consecutive
sectors
is at least 122.
13.Show that among n + 1 positive integers lessthan
there are 2 consecutiveintegers.
whose
or
equal
sum
of
to 2rc
Section
that for an
14. Show
contains only
M3
0 and
digits
- 555 ...
.Mn
555,..
arbitrary integeriV,
the
5\342\200\224the decimal
5-
is a
there
5. (Hint:
+
(5)10n
75
Implication
of N that
multiple
ConsiderMx
(5) Iff1\"1 +
has N
of MN
expansion
of an
of Proof
Methods
1.7
. .
5, M2 - 55,
. + 5 \342\200\242
10 +
5s. Then
the
apply
principle.)
pigeonhole
12 days.
Show
was used
for
at least 17hours.
16.
direct
Give
15y =
either x or y
17. If n is a positive
A positive
n.
proper divisors.Give
18. Give
integer
a prime.
a contradiction
number.(Hint:Use
that the
proof
is even
x2
19. Use a
if 0 < d < n
d is a proper divisor
n is perfect if n is the sum of its
of the following:A
argument
a contrapositive
is not
integer
perfect
5x
an integer.
is not
an integer
integer,
and d divides
if x and y
that
proof
116, then
the
valid
following
inferences:
(a)
(b) ~p
q-+t
s\342\200\224+r
qV
\342\200\224\342\200\224
(q
~w)
~s\342\200\224+q
~t
.*. w\342\200\224+s
20.
argument to
a contrapositive
Use
the
verify
valid
following
inference:
w\342\200\224+
(r\342\200\224+s)
.-. (w
21.
Use the
A r)
\342\200\224*
s
pigeon-hole principle to
is divisible
by n.
showthat one of
any
consecutive
integers
a rationalnumber
to show
principle
must,
after
sections
concentric
disk,
100 of
is divided
the sections
into 200
are painted
24.
red
the
some
Given
100
20
French,
and 17English
books,
guaran-
76
Chapter
1: Foundations
at least
tee that
(a) 10
one
of
books
language
Englishwere chosen?
25.If
are
there
pairs of
different
104
were chosen?
4 Italian,
German,
party of 30 people,then
show
people who
some
that
know
person
20 Russian, or 8
each other at a
has 6 or fewer
acquaintances.
26.
Show
27.
that
sum, or
of
them
whose
divisibleby
the
other.
A student
heads.
31.
that
Prove
91001
32.*
unique.
(c) Adjacent
primes
(d)
primes
Quadruple
c + 2 - d.
Find
another
Thus,
set
are
primes
11,13,17,19
of quadruple
b such
that
that b - a + 1.Find
no other pair exists.
a,b>c,d where a + 8 =
a set of quadruple
are
primes.
6+6=
primes.
if the
number
(e) Show that in a set of quadrupleprimesa,b,c,d
in fact
a + 4 is a multipleof 15.
a + 4 is as largeas 15,then
Section
Methods
1.7
33.
(a) Give
the
that
Show
(b)
34.
a direct argumentthat
of
sum
reciprocals
28 and 496
if
of all
of Proof
n is
of an
77
Implication
a perfect
divisors of n is 2.
sum of 5 integersxl9x29x3yxA9x5
is 14, and if each 0 < x{< 3,
5
2.
that
the
and
proof
integers are 3,3,3,3,
give
If counters are placed on 14 squaresof a bingo
board (which
5 columns
of squares), then
consists of 5 parallel rows
and
row
or
2 adjacent
that
some
some
column
contains
prove
If the
(a)
a direct
(b)
squares with
35.
counters.
triple of
An ordered
positive integers(a,b,c)
called
is
Pythagoreantriple
triple.
Pythagorean
36. Given
n pigeons
is a
What
(a)
every
same
of
number
pigeons?
(b)
box?Hint:
is, if
the
chosen
the
Use
pigeonhole
fewer
than
n pigeons
pigeonholes, then
some
pigeonhole
37. Let S be a
of
square
side
each
hole
is
to be
in order
entire
length
1 unit.
Choose any
five
points
Pu..
smaller number?
38. Let
for
.,an
aua2>..
39. Let p be a
of
power
for
40.
(a)
be
n (not
pair of integers
\342\200\242
\342\200\242
\342\200\242
+ am is divisible
some
different
prime
p whose
- 1,2,..
necessarily distinct)
k and m where 1 < k
by n.
last two
integers. Showthat
<
m <
n, ak +
ak+i
.,100.
is ab.
Hint:Look
at
possible
squares
8n
modulo
+ 7
8.
is a
sum of 3 squares.
78
Chapter 1:Foundations
41.
If a
is an
k is a divisor
of all
set
is, where a
that
positive
integers k where
if
divisors
integers D(a) D D(b)isthe setofall positive
common
to both a and b.
(a) Give a direct proof that if a or b is not zero,then D(a) f) D(b)
is bounded above by some integerM. That is, for each x G
D(a) p| D(b), x < M.
Then
(b) Supposethat a = bq 4- r, where a,6,g, and r areintegers.
=
a
direct
that
D(6) O D(r).
D(a) C\\ D(b)
proof
give
divisor
of a and b, where a
(c) Let us define the greatestcommon
and b are not both zero as the largest integerin D(a) C\\ D(b).
b
of a and
Prove then that the greatestcommondivisor
a
b
is
that
and
are
not
both
zero)
(where
unique positive
h are
a and
integerd
that
such
6,
0,
Euclidean
the
for finding
algorithm
divisor.)
42. In
calendar
any
there
be.
can
how many
determine
year,
What
is the smallest number
43. If the
of 10 nonnegative
somesetof of these integers
of 5 of them is at least37.
sum
Selected
11. Let
Xi
1.7
Section
for
Answers
distance
implies
x2 4-
+
+
hour.
xl2 =
10
x2 +
\342\200\242
\342\200\242
\342\200\242
4-
x12
- 61.
\342\200\242
\342\200\242
\342\200\242
4-
xn
Xi
If
4- x2
< 12
x2 4- xz <
*n +
xl2
<
12
12.
- 71
Section
1.8
Order
First
and Other
Logic
79
Methods of Proof
\342\200\242
\342\200\242
\342\200\242
+
< 12
2(x2 +
\342\200\242
\342\200\242
\342\200\242
4-
< 122
+ 2(x2
+ *i2
*i
*n)
xn)
\342\200\242
11 =
132
which implies
15.
4- x4
Then 102
xx
4\"
17
1/
X\\2 <
xl2 <
\342\200\242
\342\200\242
\342\200\242
4-
4- x2 4-
of hours
< 17
x5 4- x6 <
X\\\\
number
17,and
xx + x2 <
x3
the
\342\200\242
17 =
102. This
contradiction
4- x2
4-
> 17
xA > 17
the 200possible
alignments.
number
and
For
or
or
rotate
each
the
The
sum of the counts for the 200 possible
be
must
becauseeachof the 200 sections on the
20,000,
alignments
inner disk will match its corresponding
section on the outer diskin
100
of
we
have
the
to
Thus,
20,000
exactly
alignments.
pigeons
in
200
holes.
the
We
conclude
that
hole
must
have
at
some
place
matches.
of
least 100pigeons.
25.If
each
has
person
l/2(7)(30) 105
=
1.8
FIRST
To
this
down
simple
discover
more acquaintances,
ORDER
them
7 or
pairs.
blocks.
By this
argument.
propositions
as
building
arguments,
and regardingthese
breaking
means we
were
Nevertheless,
to
there
able
80
Chapter 1: Foundations
are
let
that
arguments
us consider
All
are
mathematicians
Joe is
would
we try to
get
an
rational.
a mathematician.
Therefore,Joeis
We
sucha treatment.Forexample,
rational.
argument
of the
this argument
regard
intuitively
the
of
argument
as a valid
as we
form:
if
but
argument,
P
Q
.-.
to what
According
we have
learned
far, this
thus
is not a valid
form.
But,
in
case, not
fact,
the
upon the
of the
and
parts of the sentences
short,
upon
the
is valid
argument
form
upon
of the
content
and the
but
argument,
the form of
argument
this
in
depends,
validity
sentences.
and G
represents
In case
as the
of
content
the
emphasizes
in
of
\"is gossipy.\"
sentence\"Thenumberwhose
square
have
is
-1
For instance, in
a choice.
is not
real,\"
represent
\"the
be
\"is
symbolized
and
real\"
let
could
we
the
S
number
as S(i).
then
the
Section 1.8
Order
First
1. In all
cases, if
rational.
2.
\"a
Always
be translated into
sentences.
simple
more than subject-predicate analysis to
mathematicians
are rational.\" We might,
is a
person
in
the
form
\342\200\224\342\226\2
q.
mathematician,
mathematician\"
is a
person
can also
sentences
the constituent
to write
attempt
example,
could say:
We
\"All
like
sentences
symbolize
for
81
Methods of Proof
and Other
Logic
implies
\"that
is
person
rational.\"
glance, we may
At first
p
\342\200\224*>
q.
However,
the phrase
all
\"in
are two
cases\"
indicates
the p
Second,
implication.
and q
a mathematician\"
is
and q
themselves
not
could
here
of proposition,
definition
to our
propositions according
statements
are not unlike the form
or
differences. First, the word \"always\"
an
that more is beingassertedthan
just
these
think
there
\"that
we
the sentence
then, we
write
\"a
is
person
be
be
\"a
person
can we
is a
person
How
rational.\"
is
person
p would
for
a mathematician\"
we
can
how
as
\"x
is
is a true proposition.
mathematician\"
We
course, we
can
have
\"x
is
shows.
definition
following
sentence
the
to
refer
Of
example of an open propositionin one variable.
of more than one variable as the
open
propositions
as an
mathematician\"
Definition
1.8.1. An open
variables from a set Uis a function
(or
proposition
f:Un
\342\200\224+
{T,F},
in n
predicate)
Un denotes the
where
for
Thus,
generally
speaking,
an open
proposition
is a declarativesentence
which
1.
contains
one or
more variables,
2. is not a proposition(exceptin
singletonset),
the
trivial
case
when the
set U is a
and
3.
produces
specific
a proposition
element
when each of
from the
set U.
82
Chapter
1: Foundations
Some
1.
examples
of open
rational
number.
is a
2. y >
5.
3. x +
5.
climbed Mount
4. x
propositionsare:
5. Heis
Everest.
lawyer
a computer
she is
and
scientist.
not specified
We
have
the universe of discoursein any of the above but
in (1), (2),
for the universe
we would presumablychoosesetsofnumbers
assertions
such as \"Joe > 5.\"
and (3)to avoid meaningless
of sentences, let us introduce
Just as in our subject-predicate
analysis
that open propositions are functions
of
functional
notation
to emphasize
and
that
we
when
values
to
the
variables
we
variables,
assign specific
of function
obtain \"values\" of this function, the latter \"values\"
being
that
are
or
W
e
either
true
false.
the following
might
adopt
propositions
notation for the indicatedpropositions:
number.
a rational
x is
R(x):
G(y): y>5.
S(x,y): x +y
x climbed
E(x):
5.
Mount Everest.
L(x): x is a lawyer.
y is
C(y):
a computer
scientist.
Then we
see
that
true.
R( V2)
is false, R
is true,
can be
G(x).
R(x)-+
But still we
sentences
roleof word
like
the
not
have
\"all
been
able to
\"all\"
in these
are rational.\"
mathematicians
sentences.
called
quantifiers.
Consider
the
following
statements:
1. All isosceles
are equiangular.
triangles
2. Some parallelogramsare squares.
3. There are some real numbers that are not
rational numbers.
Section
Order Logic
First
1.8
83
of Proof
Methods
Other
and
5.
cannot
birds
Some
6. Not
are
All smokers
7.
9. Each
Not
with
flirting
8. There
10.
fly.
persons.
danger.
even prime
integer.
rectangleis a parallelogram.
angle
every
trisected by ruler
can be
and compass.
After
and some,
same
the
meaning.
For all x,
For every x,
For each x,
All
such that
such that
x are
x is
Every
Eachx is
that
such
The
quantifier
denote
the following
by
x. It
we
and
represents
shall
each of
phrases:
that
an x such
exists
There
quantifier,
There is an x suchthat....
x
some
For
There
Some
is at
x is
that....
such
For a given
discourse,F(x) is
least one x the
symbol
x is
we
even
had
prime\"
already
or
true,\"
universe
read \"there
(like, for
in
3!
F(x)
proposition
open
write
can
we
mathematician)
For
can be
write
of discourse
we can
cryptically:3! x,P(jc).
each
3 x,
F(x)\"
3!
P(x) as
above
the universe
meaning
of
\"there is at
F(x) is true.\"The
\"there
is one and
sentence \"there is one and only
[x is an even prime].\"Moreover,if
or
the
example,
\"
x in
such that
is a unique x suchthat\"
written
designated
\"
example, x is a
\"for
x,
the openproposition\"x
sentence
could
be written
is
an
even
even more
1:
Foundations
then
Now
denotes the
if M(x)
R(x) denotes
the sentence\"x
are
mathematicians
is
sentence \"x
as \"For all x, if
rational\"
as
is
we can
rational\"
For
x is
all x,
a mathematician\"
write the
and
sentence \"All
a mathematician,
then x
M(x)
as Vx,
\342\200\224\342\226\272
or
R(x),
[M(x)-fl(x)].
be
rephrasing
is at
\"there
respectively.
Still
sentences,
1.
when
speaking
generally,
we should
pay attention
the subject,
2. the
predicate,
3.
the
4.
the quality,
quantifiers,
and
5. the universeof
By
the
we mean that we
quality
satisfiesthe
discourse.
property
in the predicate.
is P [predicate]\" the
S is not P\" the quality
described
For example, in a
quality is affirmative
is negative.
The universe
a
role
when
plays
significant
analyzing sentences.In fact,
P
P is defined as the subset
for a given
set
the
truth
of
open proposition
of the
universe
of
x
such
that
all
P(x) is true. Then to say that
consisting
the quantified statement \"Vjc, P(x)\"
is true is the same as assertingthat
the
truth
set of P is equal to the entireuniverse.
The
statement
\"3x,
if
is
true
for
the
truth
set
is
The
P(x)\"
\"Vx,
sentence, example,
nonempty.
x > 2\" is true if, in fact, the universe consistsof numbersall greaterthan
this sentence is false if there
is some object in the universe that is
2, but
not greaterthan 2. Thus, if the universe includes the number 0, then the
\"
The sentence
(x > 2)\" is true
sentence,
3x,
\"Vx, x > 2\" is false. Likewise
if the
sentence
universe
but
the
isfalse if the
the
number
includes,
5,
say,
universe
consists of, say, only negative integers.
sentencelike \"all
whereas
in the
[subject]
sentence
\"all
Section
Order Logic
First
1.8
are
Of course,thereisthe possibility
of x in
value
any
modifier
the
using
course,
exist
[~F(x)]
open proposition
the
use
F(x) is
symbol
universe
of
negation
quantifiers
of x in the
values
the
discuss
will
universe.
and then we
any
3, we
and
can
proposition F(x).
each x in the universe, F(x) is
the open
involving
\"for
means
expressions
For example,Vx,
a given
the universe
\"~[ 3x9F(x)]\"
the truth
but
upon the
that
propositions become
value of the
open
quantified
heavily
depends
proposition
quantified
that
examples
85
of Proof
Methods
Other
and
F(x) is
false
true\".Let
quantified
eight
statements
the
list:
following
Abbreviated
Sentence
Vx,F(x)
~[3x,F(x)]
at least one
none true
Vx,[~F(x)]
all
3x,[~F(x)]
at least
~~{3x,[~F(x)]}
none
~{Vx,[F(x)]}
not
all
true
~{Vx,[~F(x)]}
not
all
false
\"all
false\"
\"not
all
\"not
the
means
means
two
have
the
same
one
least
\"at
where the
one false
false
as \"none false,\"
same as \"none true,\"
the same as \"at least one
true\"
Thus, the
false
the same
means
\"all
true\"
true
we concludethat
some thought
after
Now
true
all
3x,F(x)
Meaning
meaning.
into
false,\"
and
true.\"
four
We list
of two each,
groups
these
four
types
equivalences:
\"all
true\"
\"all
false\"
\"not
all
\"not all
* {~[3jc,
{Vx,F(jc)}
{Vx,[~F(x)]}
true\"
false\"
{~[Vx,
~F{x)]}
- {~[3x,F(x)]}
F(x)]} =
{3x,[~F(x)]j
= {3x,
{~[Vx,{~F(x)}]}
F(x)}
\"nonefalse\"
\"nonetrue\"
\"at
least
\"at
least
false\"
one true\"
one
as
86
Chapter 1:Foundations
information about the negationof this
the first statement we have Vx, F(x), its
and is equivalent to
negation ~[Vx, F(x)] occursin the third statement
of \"all true\"
is \"at least one false.\"The
3x,[~F(x)]. Thus,the negation
is \"all false\" and its negation is the fourth
secondstatement
statement
The
also provide
In
statement.
equivalences
of quantified
type
to \"at least
is equivalent
We list these facts as follows:
true.\"
one
which
Statement
\"all
true\"
\"at
least
Negation
one false\"
\"all false\"
one true\"
least
\"at
\"at least
Vx,F(x)
3x,[~F(x)]
3x,[~F(x)]
Vx,[~F(x)]
3x,F(x)
Vx,F(x)
3x,F(x)
Vx,[~F(x)]
\"all
true\"
\"at
least
\"all
false\"
one false\"
one true\"
We
quantifies.
Revisited
Laws
DeMorgan's
F(x)
open proposition
just the conjunction of
\"
3 x, F(x)\"
the sentence
is just the
Likewise,
many
propositions.
\"
disjunctionof many
In
other
and
F(x)\"
\"Vx,
words,
propositions.
3x, F(x)\" are
the
the
of
all
the
a
nd,
just
conjunction respectively,
disjunction
propositionsF(x)
x runs through all the elementsofthe universe.
where
if the universe consists of only a, 6,c,and d, then Vx, F(x)
For
instance,
means the sameas F(a) A F(b) A F(c) A F(d).
In the light of thesecomments,
we
conclude
that the rule for negating a
DeMorgan'slaws.Again,
F(a)
A F(b)
F(b)
A F(c)
same
F(b)
as
V
3x, ~F(x).
F(c)
a glorified version of
than
- {a,b,c,d},then Vx, F(x) and, therefore, ~[Vx,F(x)] = ~[F(a) A
more
universe
the
A F(d),
F(c)
A F(d)].
same as hF(a)]
if
An
is really
But, by DeMorgan'slaw,
[~F(b)]
[~F(c)]
Likewise, if U
this
V [~F(d)l,
= {a,6,c,d},
then
last
expression
3x,
F(x)
= F(a)
VF(d),sothat
~[3x,F(x)]
= ~[F(a)
- [~F(a)] A
=
Vx,
[~F(b)]
(where
[~F(x)]
obtained
V F(c)
F(b)
from
V F(d)]
A [~F(c)]
the third
DeMorgan's
is the
A [~F(d)]
expression is
law).
Section
1.8
Order
First
and Other
Logic
87
Methods of Proof
We
that
seen
proposition.
The
Is True
Statement
Vx,F(x)
if for
all c,
for
if
Is
3x,F(x)
one c,
at least
for
if
if for
all c,
for
if
if
From this
at least
for
if
one c,
if
F(c) is false.
chart we
more
observe
all c,
for
at least
one c,
F(c) is true.
F(c) is false.
3x,[~F(x)]
one c,
false.
F(c) is false.
F(c) is true.
Vx,[~F(x)]
at least
F(c)is
F(c) is true.
False
for
all c,
F(c) is true.
techniques:
proof
1. Proof
2.
Proof
by
exhaustion.
of the
statement
which F(x)
x for
values
with
found
3. Proof
sufficient
x (all
all
F(x).
property
by counterexample.
to
a specific
exhibit
F(c) is false.This
one
assertion Vx,
statement
Vx,
Proof
of assertions
existence
proofs
nonconstructive.
and
In
F(x).
value
actual
To
is false, it is
that
Vx, F(x)
in
that
c
the
universesuch
example
to the
c is called a counterexample
fact, a counterexample disproves the
show
F(x).
of the
proofs
Constructive
form
3x,
are
are referred
F(x)
classified
proofs
as either
actually
to as existence
constructive or
exhibit
a value
for
88
Chapter
1: Foundations
rather
is true or sometimes,
which F(c)
specifies a process(algorithm)for
A
existence
nonconstructive
without
most
proof
some
previous
For example,
and
yu
of
real numbers,
specified
construct
to
points. Suppose xu
at specified
values
specific
shows how
formula
interpolation
with
\342\200\242
->yn are
y2>-
the
polynomial
P(X)
this real
with
any polynomial
root. But the proof
is nonconstructive.
theorem
Lagrange's
polynomial
Then
a real
have
to find
how
say
that
asserts
must
odd degree
this theoremdoesnot
this
result.
there is a theoremthat
and
coefficients
real
that the
it shows
contradiction;
leads to
is true
F(x)}
proof
a value.
a value c
involves a proof by
commonly
c, the
exhibiting
such
establishes
proof
to find
how
indicating
than
obtaining
(X \" Xj)
]T [il
l<i<n L
X2)(X - x2)(xx -
(X
'
(xl
%i
i*j
- Xl)(X -*,)...
(X
xn)
y2
*
\342\200\242
\342\200\242
(X2
*i)(*2 *3>
(*2
Xn)
- Xl)(X - x2) . \342\226\240
\342\226\240
(X
(X
\342\226\240
\342\226\240
\342\200\242
(X
X3)
Xn)
- xn)
\342\200\242
\342\200\242
\342\200\242
(x,
x3)
(X
\342\200\224
(Xn
*\342\200\236_,)
\342\200\224 \342\200\242
\342\200\224
\342\200\242
\342\200\242
Xi)(Xn
X2)
(Xn
Xn_i)
is the
unique
i.
= 5,
y2 =
-6,
y3
= 2.
Then,
wv.
PW
\"
- 4) (5) +
1)(X - 3)
- 3)(1
(1
(X - 1)(X - 4) / e^
- 1)(3 - 4) (-6)
(3
(X-3KX-4)
-
(X
(4 - 1)(4-
(X2
- IX
3)
+ 12)fel + (X2
5X +
4)(3)
\302\251
(X2
- 4X
+ 3)
\302\251
is a polynomial
we know
such
Lagrange's
polynomial that
construction.
that
P(J)
==
interpolation
5, P(3)
-6, and
P(4) - 2.Thus,
attains specificvalues
at
specified
the
points
existence
by
once
of a
Section
First Order
1.8
Logic and
make a proof
following proposition:
To show how to
Thereare
P(X) = 2X8
To
this
prove
some
need
we
by exhaustion
that
theorem
X1 +
enable
the
us to
is
theorem.
roots
rational
the
we consider
to the polynomial
8X4 + X2 - 5.
we cannot
will
This is provided by
numbers.
rational
89
of Proof
Methods
exhaustion,
by
roots
rational
no
Other
root
polynomial
of P(X)
with
has the
a0 and
an.
1 +
example
1 + 1+
1 +
we have
= 7.
p(5)
+ 1
1,2
In fact, it
- 1,
p(l)
+ 1,2 +
+ 1
2 +
1, 3
p(2) =
2, p(3) -
this
the
However,
Thus,
the
conjecture,
credence
adds
conjecture
we
to
that
has been
calculation
2, 4
3,p(4)- 5,
p(5)
positive
prime integer.
To test
p(6) = 11
+ 1,
+ 1,
and 5,
n,p(n)
is a
is easy to establishthat
Foreach
to prove the conjecture:
and attempt
+ 1
calculate
p(6)
the conjecture,
7,
integer
with
So far we have considered
multiple
quantifiers.
existential
those
in
which
universal
and
sentences
the
only
quantifiers
in
occur
which
the quantifiers
shall
cases
now consider
appear singly. We
in
in combinations. These combinationsbecomeparticularly
important
the
For
the case of sentences involving
one
variable.
than
more
example,
can
be
fact
that
the
of two real numbers is a real number
product
Sentences
written:
(Vx) (Vy)
[x G
A y
G R
\342\200\224
xy
G R].
90
Chapter 1:Foundations
In
if P(x,y)
general,
(Vy) P
(Vx)
If
always works
P (x,y)
(3y)
(3x)
(Vy)(Vx)P(x,y)
(3y)(Vx)P(x,y)
(Vy)(3x)P(x,y)
(3y)(3x)P(x,y)
left
from
the universal
both
be careful
must
(x,y)
(3x)(Vy)P(x,y)
involves
sentence
quantifiers, one
x and
variables
two
the
exist:
possibilities
about the
order in which
they
to
For instance,
of the
right.)
are
written.
(One
sentences
two
real numbers:
concerning
(Vx) (3y) [x
+y
( 3y)
5],
(Vx) [x
+ y = 5],
sentence
while the second is false. The first
first
is true,
says that if x
is any real number,then there exists a real number y such that the sum of
that every
sentence
5 - x. The second
x and y is 5. Of course,y is just
says
5 - y, where y is somefixed
real number x is equal to the samenumber,
sentence says, in effect, that all real
second
the
real number.
Thus,
the
There
logical
between
relationships
same predicate
if the
is
sentences
each
in
involved
\342\200\242'
(Vx)(3y)
i^
quantifiers
We depict
these
diagram:
(Vy)(Vx)
(Vx)(Vy)
(3y)(Vx)
two
with
sentence.
^(3x)(Vy)
^i(Vy)(3x)
\342\226\240\342\231\246\342\226\272\342\200\242
(3*)(3y)
Oy)(3x)
What
this diagram
among
relationships
sentences
involving
quantifiers.
(x,y)
(Vy)
logically
(x,y)
implies (3y)
example,
(Vx) P
list:
is that
are logically
(x,y).
Let
us
restate
all the
Section
1.8
(x,y) ~ (Vy)
(x,y) \342\200\224
(3y)
\342\200\224
(x,y) (3 x)
(Vx) (Vy) P
(Vx) (Vy) P
(Vy) (Vx) P
(Vx)
(3y) (Vx) P (x,y) \342\200\224
(3x) (Vy) P (x,y) \342\200\224
(Vy)
Methods
Other
91
of Proof
P (x,y)
(Vx)
P (x,y)
(Vy) P (x,y)
(Vx)
(3y)
P (x,y)
(3x)
P (x,y)
(Vx)(3y)P(x,y)-*(3y)(3x)P(x,y_)
(Vy)(3x)P(x,y)-(3x)(3y)P(x,y)
(3y)(3x)P(x,y)~(3x)(3y)P(x,y)
The
of
negation
sentence
any
involving
by systematically
accomplished
with only
Thus,
-r.
F =
Letting
\302\253
negating
asked to
H(x,y)].
sentence
(F-
some
implies
F(x,y), etc., we
[~(3y)
(3x)
be
can
a sentence
Suppose
your were
the following
form:
VH)]
~[(Vx)(3y)(F-G
has
[P(x,y) -* G(x,y)
(Vx) (3y)
one quantifier
more than
GV
find
the
H)]
-(3x)(Vy)[~(F-GvlrY)]
= (3x)(Vy)[FA~(GV#)]
Therefore,
the
with
of
work
= (3x)(Vy)[FA(~G)A(~if)]
of a few tautologies and rulesof logic,the
sentence becomes almost mechanical.
knowledge
a complicated
negating
1.
All
the
can
birds
following
and
variables,
quantifiers,
(a)
of
each
Translate
statements
predicate
symbols.
fly.
(b)
All babies
(c)
Some
f)
men
are giants.
(g) Somemenarenot
All men
(h)
giants.
are giants.
(j
There
is a
student
Foundations
(k)
x is
an odd
(1)
For
all
(m)
For
each
integers
integer
(n) Thereis an
(o)
Not
(q)
Some numbers
(s)
Not every
(u)
x is
actor
every
(p) Somenumbers
(r) Notall
(t) If
2.
Let
x is
xy
integer
odd and x
is prime.
rational.
are
are
numbers
graph is planar.
students
are lazy, then all students
rational implies that x is real.
universe
consist of all integers and let
some
the
P(x):
Q(x):
x is
is a
are lazy.
prime,
positive,
E(x): x is even,
N(x): x is
3.
divisible
by
9,
a perfect square,and
is greater than 2.
S(x):
x is
G(x):
in symbolic
form.
Then expresseachofthe following
x
x
is
even
or
is
a
(a)
perfectsquare.
x is a prime and x is divisibleby 9.
(b)
2.
(c) x is a prime and x is greaterthan
x
If
is
a
t
han
thenx
is
(d)
prime,
greater 2.
If
x
is
a
is
and
not even.
thenx
(e)
prime,
positive
Translate each of the following
into symbols,
sentences
first using
no existentialquantifier,
and
second
no
universal
using
quantifier.
(a) Not all carshave carburetors.
(b) Some people are either religiousor pious.
(c) No
are
dogs
intelligent.
are illogical.
(e)
Every
number
(f)
Some
numbers
is negative
are not real.
either
(c)
(d)
Vx,
(e)
3x,
1 #0].
[x2-x[2x2
3x + 1
- llx
+
(f) 3x,
(g) 3x,[x2-3
[15jc2
0].
- 0].
2 = 0].
is a
tree,
sentences
where
the
Section
1.8
Other
Methods
of Proof
93
(h)
(i) 3x,
{x is
10} A
>
[{x2
even}].
(1)
= y]}.
Vy,{3x,[x2
= y]}.
(m) 3y,{Vx,[x2
5.
the
Write
6.
through
(a)
the
Write
universal or
(i) in Exercise 4.
(as
negations
sentences
of the
negations
existential propositions) of
quantifiers.
For
by
4.
(g)
For each
(h)
Vx,
(j)
There
= 25
x2
that
x2
= 9.
the
7. Consider
x such
integer
{-5,0,1,2,3,4,5,6,7,8,9,10}.
P(x): < 5.
x2
x>3.
R (x): x is a
Q(x):
S(x):
Find
x2
the truth
(a) P(x) V
(b)
sets of:
Q(x).
A#0c).
P(x)
(c) [~P(x)]
(d)
multiple of 2.
25.
Q(x).
A [~Q(x)].
P(x)
(e) ~{[~P(x)] A
(f)
[~Q(x)]l
A [-/?(*)]}.
[~P(x)]v{Q(x)
(g) S(x).
(h) S(x) A
(i)
Q(x).
A [~Q(*)].
S(*)
(j) [P(*)aQ(*)]aS(*).
8.
the
of
Which
neither?
(a)
(,b)
x <
2.
1<
2.
(c) Heis
following
baseball
player.
are propositions,
open propositions, or
Foundations
Jackson is a baseballplayer.
(d) Reggie
(e) 2
3 =
2.
3 +
WOW!
(h)
There
is an
integer x suchthat
9.
the
Using
such
P(5)
= 0.
that
P(l)
25 =
integer
+ y = 5.
construct a polynomial
= 420,P(3) -
360,P(4)
a polynomial
construct
to
0.
y such that x
formula,
interpolation
= 360, P(2)
Lagrange
P(x)
is a
x2
and
195,
whose graph
(-1,1),
(0,1), (1,1), and (2,-5).
passesthrough the points
11. If xl9 x29..., xn are distinct real numbers and if
,
,l m
'
- *,)(X -
_ (X
x2)..
.(X
- xi+1).. .(X
x^HX
(X,:-
xn)
- xn)
.(X;
that
states
formula
interpolation
xi+l)..
P(X)
Yl Li(X)yi
i-i
P(*i) =
for
yi
each
such
that
i.
(a) Prove
P(X)
by the
by
(a)
P(X)
_
L4(X)
= LX(X)
interpolation
since
can be
and
formula,
- 5L4(X)
L3(X)
P(X)
second,
(X+1)(X)(X-1)
(2 +
6(x3\" x)
1-
then
Since
1)
=
X3-X
y,
But
S6e that
'We
\342\200\2246\342\200\224
+ x
-x3
- 6L4(X)
L4(X).
= 1
+ L3(X) + L4(X) - 1.
+ L2(X)
computed easily by computingonly
LX{X)
1)(2)(2
p(x)
+ L2(X) +
the
+ 1
Lagrange
following
table
interpolation
of values:
Section
First Order
1.8
(c) Compute
Logic and
the
following
Methods
table
95
of Proof
of values:
Xi
Other
yi
(d) Derive
the
of values:
3'
Xi
table
following
yi
(e) If xt
for i =
= i
f]iL,.(X)-Xand
i-l
i-l
Can
generalize?
you
12. Derive
can be
degree of P(X).
13.
not
continue
However,v
14.
(a)
X3
yi
1 1
2X
of ones neednot
the
continue;
interpolation
1 substantially
any
value
polynomial
reduces the
following table:
Xi
yi
a sequence
of the
roots
+ 1
11X2+
X2
of
the specialchoicev =
rational
all
Find
that
conclude
Thus
for the
P(X)
Derive
4 5
Xi
a string
that
observe
Thus
table:
6X
17X
+ 2
following polynomials:
Foundations
15.
Problem)
Squares
(Magic
a 3
x 3
square and
problemis to
the
numbers
across
sumof
the
place
each row, down each column, and along eachdiagonal
is the same.
Such an arrangement is calleda magicsquare.
First
discover
what each row sum (and thereforewhat
each
(a)
column
and diagonal sum) must be.
in the second
row and second
(b) Observethat 9 cannotbeplaced
column.Neithercan 9 be placed in any corner position.Why?
in
Thus
there
are only 4 legitimate positions for 9. Moreover,
in the
tiles
the
the
1 through
digits
9. The
squares so that
location
there
is a limited number of
observe
that 5 must occupy
the
positions
observe
second
row and second column position. Finally,
that
1, 5, and 9 must occurin the same row or column.
to find all 8 magic squares using the
(c) Use proof by exhaustion
1
9.
Note
that any one of these can be
digits
through
transformed
into
other by either a rotation or a
any
any legitimate
for
for
9,
8. Next
7, and
6,
reflection.
(d)
the magic
Change
8. Indicate how to
(e) Indicate
(f)
such
all
0 through
11.
through
all 3 x
Find
(g) Indicate
3 magicsquaresusing
to
how
5x5
generate
any
9 consecutive
magic squares
integers.
is
of the
two
integers in eachrow,
is the
diagonals
of
sum
the
the magicsum
integers1,2,..
is
.,rc2
2x2
16. Define a
as
entries,
and does
Can
an n
Find a 4 x 4
Latin squareas an
n
through
of
the
each
+ l)/2.
n(n2
magic squares.
1,2,.. .,16.
integers
in
same. The
square.
magic
Show that
x n
table that
so in such a
the
that
no
integer
(b) Find
(c)
both 2x2
Use proof by
Latin
25
Hint: consider
17.
you
odd?
the integers1,2,...,n2
the sum s
sucha
(h)
magic
all 3 x
find
to
how
squares problem to
find
Latin
each
squares.
exhaustion to
find
all
12
3x3
Latin squares.
Section 1.9
for Quantified
of Inference
Rules
Propositions
97
squares.
Vx,[B(x)->F(x)].
(b)
~[Vx, (B(x)
(d)
3x9[B(x)Al(x)].
or 3x, (B(x)A
-FW)]
[~F(x))).
(j) 3x,[S(x)AM(x)A~H(x)].
(k) 0(x)AP(x).
(1)
Let
(n)
3x, [0(x)
be the
universe
the
(0(x)
A P(x)).
AP(x)].
(p) 3x,[iV(x)Afl(x)].
(r)
~[Vx,
(s)
~[V*,(G(*)
(c)
Vx,
(d)
Vx, [\302\243(*)-/(*)];-[
(f)
~[V*,
(c)
Write
or 3x,
R(x)]]
[N(x)-+
[N(jc)
~R(x)].
\342\200\224P(*))].
\342\200\224
[D(x)
{D(x)
3 *,{\302\243(*) A
~[ 3x9
-/(*)];
[N (*) \342\200\224
/?(*)]];
3x,
/(*)}].
-/(*)}].
A ~fl(x)].
[N(jc)
Let
as follows:
sentence
the
\302\2437
be
of graphs.
universe
the
C(x):
complete,
jB(x): x is bipartite,and
x is
P(x):
The negation
planar.
is:
3xy[C(x)AB(x)A(P(x)]
1.9 RULESOF
FOR
INFERENCE
Additional
involving
open
and
propositions
quantifiers.
we
describe
rules
four
be added
includethe four
to or
rules
form
Vx,
P(x)
will
from
Universal
an
assertions
prove
of these
treatment
some of
illustrate
of inference
is assumed
to
careful
when the
deleted
Fundamental Rule 5.
the
PROPOSITIONS
QUANTIFIED
rules
we have
We continue
our list to
already discussed:
Specification.
If a
statement
quantifier
of
can
98
Chapter 1: Foundations
be
to obtain
dropped
This rulemay
be
an
object
arbitrary
universe.
c in the
as
represented
Vs,P(s)
..Pic)
Thus,supposethe
denotes
is the
universe
\"x is
statement
the
then
sentence
the rule of
\"Vx, Mix),99 that is, \"allmen aremortal,\"
ismortal.\"
universal specification allowsus to conclude\"Socrates
the
next rule says that what is true for arbitrary
stated
Informally
in
universe
is
true for all objects. This rule permits the
the
objects
the
Fundamental Rule 6.
Pic) is true
quantifier
may
c of
Pic) for
.\\Vx,
This rule holds
universe.
The next
rule, informally
we
then
Fundamental
Pic)
is true.
all c
In
symbols,
this
universal
rule
true,
may
'
then
This rule
to this
Existential
7.
Rule
there
c in
the
says
stated,
refer
is
P(x)
someobject
assumedto be
If
then the
be prefixed
a statement
Generalization.
the universe,
Universal
element
each
for
is an
Specification.
element c in
If 3x,
Pix) is
the universesuchthat
.'. Pic)
for some
'
Notethat the element c is not arbitrary (as it was in Rule 5), but must
be one for which
is true. It follows from the truth of 3 x> Pix) that at
Pix)
least one suchelementmust exist, but nothing more is guaranteed. This
on the proper
if we
use of this rule. For example,
know
placesconstraints
that 3x, Pix) and 3x, Qix) areboth
then
we can conclude Pic) A
true,
^
is true for some elements c and d of the universe,
but
as a general
Qid)
rule
we cannot
conclude that Pic) A Qic) is true. For example, suppose
that the universeis the setofintegers
is the sentence \"x is even\"
and
Pix)
while Qix) is the sentence \"x is odd.\" Then
3x, Pix) and 3x, Qix) are
both
A Qic) is false for every
but Pic)
c in the universe of integers.
true,
Section
c in
element
some
8. Existential
the universe, then
Rule
Fundamental
for
for
of Inference
Rules
1.9
Quantified
99
Propositions
have
for
Pic)
some
.:3x,P(x)
inference.
An
quantifiers is
the
of
because
beyond
are involved,
of proofs
is more
construction
care required in the application of the rulesof
of proofs involving
into the subtleties
exploration
our intention,
but we shall give a few simple examples to
When quantifiers
complicated
rules.
illustrate the applicationofthe above
in order to draw conclusionsfrom
quantified
Generally
speaking,
the
need
to remove quantifiers properly, argue with
premises, we
and then properly prefix the correctquantifiers.
propositions,
All
are
men
All kings
fallible.
are men.
Therefore,all
is
kings
are
fallible.
Let M(x)
\"x
the argument
Consider
1.9.1.
Example
a king,\"
argument is symbolized:
Vx,
Vx,
[M(x)
[K(x)
\342\200\224
F(x)]
\342\200\224
M(x)]
.\342\200\242.Vx,[K(x)-F(x)]
A formal
resulting
proof is as follows:
Reasons
Assertion
1. Vx,
[M(x)-+ F(x)]
2.
M(c)-+F(c)
3. Vx, [K(x)-\302\273M(x)]
4! K(c)-^M(c)
5.
[/C(x)
Step 1 and
Premise
\342\200\224
F(x)]
Step
Rule
Step 3 and
Steps
K(c)\342\200\224>F(c)
6. Vx,
Premise
2 and
5 and
Rule5
4
Rule
Rule
and
100
Chapter
1: Foundations
1.9.2.
Example
Symbolize
validity:
Lions
animals.
are dangerous
there
Therefore,
animals.
dangerous
Represent
is
\"x
dangerous,\"
Then the
respectively.
Vjc,[L(jc)-DW]
3x,L(x)
.-. 3xD(x).
A
formal
is as
proof
follows:
Reasons
Assertion
1.
Premise 2
3xtL(x)
2. L(a)
Exercises
Premise 1
5. D(a)
6. 3x, D(x)
Steps 2 and
Step 5 and
in the
a conclusion
Obtain
Step3 and
Rule 7
Rule
4, Rule
Rule
1.9
for Section
1.
1 and
Step
\302\2611
or
\302\2612
are
No rational
to the
roots
equation X2
- 2 = 0, then
roots.
It is
(b) Somenegative
following:
rational
\302\261
1 or
are
numbers
\302\2612
are
rational
roots
of the
equation.
numbers.
Hence,...
(c)
Some politicians
All
corrupt
persons
are corrupt.
should
be sentenced
Hence,...
(d)
(e)
All
Democrats
All
squares
are not
conservative.
All rectangles
All
parallelograms
Hence,...
rectangles.
are parallelograms.
are
quadrilaterals.
to prison.
its
Section 1.9
for Quantified
of Inference
Rules
Propositions
101
of the following
2. Prove or disprovethe validity
arguments:
is a plant or an animal.
(a) Every living
thing
David's dog is alive and it is not a plant.
Hence, David's
(b)
hearts.
have
animals
All
No
mathematicians
All
ignorant
are ignorant.
are haughty.
people
who can
is despised
Nobody
Illogicalpeople
are
of
Students
A
student
not mathematicians.
manage a crocodile.
despised.
cannot
babies
Hence,
(d)
are
people
can do
intelligence
average
intelligence
average
without
arithmetic.
is not a capable
student.
(e)
do arithmetic.
cannot
students
Your
Someintegersare
of
powers
2.
some rational
Therefore,
Some rational
(g)
All
of
3.
are unsatisfactory.
excuses
Some
2.
numbers.
rational
are
integers
of
(f)
Hence, some
clear
explanations.
[Lewis
Carroll]
(h)
Therefore,
(i)
animals.
dogs are
Some
All
are
dogs
dogs
are cats.
carnivorous.
are dogs.
Some animals
Therefore,some
are
animals
carnivorous.
that
define sets. Use
following propositions involve
predicates
these
sets.
Use
the properties to concluderelationshipsbetween
Venn diagrams to check the validity
of the arguments.
3. The
(a)
cigarettes
are
hazardous
All
Smokums
are
cigarettes.
Hence, all
(b)
scientists
Some
(c)
to health.
All
All
some
scientists
Some astronauts
Hence,some
engineers.
are not
astronauts.
scientists.
are
astronauts
engineers.
are engineers.
engineers
are
scientists.
102
Chapter 1: Foundations
Therefore,
mammals.
are
humans
All
are vertebrates.
humans
Some
(d)
some mammals
(e) Nomothersare
are vertebrates.
males.
are politicians.
males
Some
(f)
Somepoliticiansare
females.
not
some
Hence,
(g)
All
are
doctors
Some doctors
Hence,
some
(h)
All
All fathers
(i)
graduates,
males.
are fathers.
are
students
males.
are males.
Some
fathers.
are
students
Hence,
not college
are
golfers
Some students
Hence,all
mothers.
graduates.
college
are
fathers
are not
politicians
are males.
some students
(a)
Let
the universe
P(x):
A(x): x is
and
let
a plant.
an
x has
H(x):
things,
animal
a heart
a: David's dog
Thenthe inferencepatternis:
Vjc,
V A(x)].
[P(x)
~P(a).
Vx,[A(x)-+H(x)].
Hence, if (a).
The proofof
(1)
Vjc,
validity
V A(x)]
[P(x)
(4) i A
(5)
A(a)
(a)
Vjc,
following:
Premise
Premise
(2) ~~P(a)
(3) P(a)
is the
From
(1) and
Universal Specification
From
(2) and
Premise
syllogism
Section
(6) A (a)
(7) H(a)
Specification
(4), (6),and
Rule
Inference
INDUCTION
MATHEMATICAL
the
with
involves
aspect
then
deducing
general rule by
may arrive at a conjecture that we
at
for a
a conjecture
integersn.
we
the truth of
in verifying
useful
is
that
on the
and
main
aspects
and
experimentation\342\200\224we
inductive
to
believe
be true
for all
The Principle
is true
positive
now.
technique
statement
we
Frequently
reasoning.
we can
before
then
But
to verify
need
of inquiry
inductive. As we
certain statements as
accepting
other statements
on the basisof
The
inductive
aspect,
for facts by observation
inferences.
valid
(1)
3. (b),
1.10
(5) and
\342\200\224if
(a)
103
Induction
Mathematical
1.10
which,
for
each
for
P(n)
is true.
1. P(l)
implies
P(k
-f
1).
(1) and (2) by (1') P(n0) is true, and (2') For all k > n0,
is true for all n > n0, and
+ 1), then we can prove
P(n)
the starting
point n0, or basis of induction, may be any integer\342\200\224positive,
or zero. Normally
we expect to prove P(k) \342\200\224+
+ 1) directly
P(k
negative,
so there are 3 steps to a proof using
the
of mathematical
principle
If one
replaces
implies
P(k)
P(k
induction:
(ii) (Inductive
(iii) (Inductive
We
emphasize
assumingwhat
the inductive
hypothesis is
be proved; it is just part of proving
that
is to
P(k)-+
P(k +
l).
> n0.
basis
the
of the
not tantamount to
the
implication
104
Chapter
1: Foundations
methodof
principle of mathematicalinductionisa reasonable
(1) tells us that P(l) is true. Then
(2) and the fact
using
that part (1)tellsus that P(l) is true, we conclude P(2) is true. But then
in this way
that P (2 + 1) = P(3)istrue,
and
so on. Continuing
(2) implies
we would ultimately reach the conclusion
is true for any fixed
that
P(n)
Now the
proof
for
part
ofmathematical
positiveintegern. The principle
the game we played as childrenwhere
we would
if
over
fell
one
it would
collide with
Then
part (2)ofthe principle.
we
what
Then
fall
down\342\200\224like
the
would
would
next
the
is much like
up dominos so that
in line. This is like
induction
stand
domino
conclusion
n.
integers
on the
1.10.1. Let us use this approach
of
Example
problem
for
the sum of the first n positive integers.Let
determining a formula
\342\200\242
\342\200\242
values
for S(n) and
4- n. Let us examine a few
S(n) = 1 + 2 + 3 + \342\200\242
list them in the following
table:
S(n)
10
15
21
28
of guessing a formula
S (ra) may not be an easy one and
for
sure-fire approach for obtaining a formula. Nevertheless,
one
observe
the following
pattern:
task
The
there
is no
might
2 = 1-2
2S(1)=
2S(2)= 6
2-3
2S(3)
= 12
= 3-
2S(4)
= 20
= 4- 5
2S(5) = 30 = 5- 6
2S(6)
This leads
= n(n
+ 1) or that
S(n) -
\"(\"
X).
this
formula.
Let P(n)
us use mathematicalinductionto prove
statement: the sum S(n) of the first n positive integers is equalto,
Now let
n(n
= 6 -
us to conjecturethat
2 S(n)
be the
42
4- l)/2.
Section
Mathematical Induction
1.10
1.
Since S(l) -
of Induction.
Basis
true for
1(1
105
the formula
l)/2,
is
= 1.
2. Inductive
Hypothesis.
n = k, that is, that S(k) = l +
= fe(fe +
2+...+fe
is
true
for
l)/2.
S(k +
by the inductive
= k(k 4- l)/2
S(k)
1) = S(k) +
(fc
1) =
(k
(k +
we have
hypothesis,
1) +
(fe
1) =
(k +
1)
(^
l)
+ 2)
1) (k
2
was
true for
+ 1. So, by assumingthe formula
the
formula
holds for k + 1, and the proofis
of mathematical
the
induction.
by
principle
complete
is based
The principle of mathematicalinduction
on a result that may
one of the axioms for the set of positive integers. This
be
considered
integers; its
of positive integers
the
of
positive
set
contains a leastpositiveinteger.
Example1.10.2.
and
Find
cubes,
that
is, l3
We consider
4- 23
the first
for the
cases:
few
13 =
13+
l3 +
l3
a formula
prove
\342\200\242
\342\200\242
\342\200\242
4- n3.
1 =
12
23
= 9
23
4- 23
= 32
33 =
36
4- 33 4- 43
62
100
= 102
[S(l)]2
= l2,
[S(2)]2 =
32, [S(3)]2\302\253
62,
[S(4)]2
\302\253
102,
and
[S(5)]2
= 152.
106
Chapter
1: Foundations
then that l3
We conjecture
this
verify
1. Basis of Induction.Since
n =
4- n*
23
+ l)/2]2.
[n(n
= [1
l3
(1 +
for
holds
l.
3. Inductive Step.
l3
show
replace
23
+ (*
23
4-
4-
(*
1)
n =
4-
l3
4-
23
+ 1; that is,
4- (*
+ k3
4-
\\k2
+1)2
Uk +
1
the
formula
D3
k2
14
\"*
21 2
(k +1)2
+ (* +
to
41
+ 1)
- (* +1)2
+1
4fc +
k(k
l)3
(*+\302\273\"[g)'
(k
of
and
k.
+ 2)/2]2.
\342\200\242
\342\200\242
\342\200\242
+ k3
\342\200\242
\342\200\242
\342\200\242
4- k3
+ k
Hence,
for n = k
holds
+ l)3 - [(* 4-
for
holds
Now l3
4-
+ 23
\342\200\242
\342\200\242
\342\200\242
4- k3
formula
the
Show
l3
Let us
induction:
by mathematical
formula
1) (k + 2)12
2
holds for
mathematicalinductionfor
all
1.10.3. Prove
Example
l2\"*1 is divisible by 43 for each
4-
positive
by
and
integers
integer
principle of
n.
induction
mathematical
positive
by the
thus
that
6'n+2
4-
n.
2. Next we suppose
6k+2 4- 72*+1= 43* for
that
3. Then we showthat, on thebasisofthe inductive
72(fe + l) + l
6*+3 + 7^+3 is divisible
by 43.
some
integer
hypothesis,
But
43.
this
x.
6
*+3
showed
Section
induction
mathematical
72n+1 is
by 43
divisible
n.
integer
1.10.4.
Example
prime integers.
1. P(l) is
2.
P(k)
al9 a2,
...,
is not
divisible
by
3 are
than n
integers.
primes.
is true.
since P(k)
- axa2
divisibleby
a new
k +
be
ak+l
ak,
is guaranteed
existence
Now N
2 and
more
are
there
than n prime
are more
there
proposition:
since
true
Assume
3. Let
is
6n+2
107
Induction
Mathematical
1.10
prime
...ak
any
afc+2.
ak+l +
of the
In
1- H
primes ar
either
+
a\302\243
1.
case there
primes.
1.10.5.
Suppose the Postal Departmentprints
stamps. Prove that it is possibleto makeup any
n-cents using only 5- and 9-centstampsfor n > 35.
Example
and 9-cent
postageof exactly35centscan be
5-
only
of
postage
made
with
up
seven
5- and
9-cent
possibilities
to
consider:
In case
(a),
the
number
of 5-cent
only
involved
stamps is at
5-cent
in
stamps, or
makeup
the
>
of
35.
we can
108
Chapter
1: Foundations
Example
Let P(n)
statement: 3n >
P(4) is true because34
be the
for
all
n >
integers
4, 3n
n3.
>
n3.
= 81 > 43 = 64.
>
is true for n
Assume
P(n)
4, that is, assumeSn > n3 for n > 4.
We
we
4 1) is true on the basisof our assumption.
P(n
Thus,
prove
must
(n + l)3 = n3 4 3n2 4
prove 3n+1 > (n + l)3. Let us rewrite
3m + 1 = n3(l 4 3/n 4 3/n2 + 1/n3). Since the inductive hypothesis
also prove that
us that
3n > n3, we would be doneif we could
gives
3 > 1 + 3/n 4 3/n2 4 1/n3 for n > 4. We now prove this. Observe
= 1 4 3/n 4 3/n2
as n
that the function
4
1/n3 decreases
f(n)
n is smallest.
In other words
increases, so then /(n) is largestwhen
/ (4) is the largestvalue of / (n) when n ranges over the integers
than or equal to 4. Since
greater
1. First,
2.
3.
Prove that
1.10.6.
(4)
3/4 4- 3/42 4-
1 +
1/43
= 125/64
>
3n3 >
= (n
n3(l 4
3/n 4
3/n2
4
4
1/n3)
Recursion
In
programming
computer
execution of
a procedure
is usually
the evaluation
of a function or the
achieved at machine-languagelevel by
the name
of a
use
where
it is
be
a set,
a function,
of \"previous\"values. Thus, a
objects would
we give
speaking,
defined
recursive
in terms
sublists.
beneficial
routine
subroutine
of applying
will
applied
function
terms of
be in
terms
to a
list of
recursion to
or an algorithm in
the definition
the
another
to have
a
is called a
calls
itself
/ from
integers
each
of/at
is
positive
k where
Section
Mathematical
1.10
we are
the mechanism
Conceivably,
defined
a function. Thus, if the object
fact, a function we say that the function
the
function
is defined
The sequence
can
(0 T(0) = 1
T(n
(ii)
+ 1)
= 3T(n)
for
3n
It is clear
that
all
for
The
the two
of
property
\"defined\"
T(n
= 3n
T(n)
clear that
+ 1)
actually
definition
by the
define
is,
in
definition.
for
can
example,
all integers
n >
be defined
as follows:
the
Here part (ii) embodies
feature of \"self-reference\".
not be
not
recursive
is well-defined
recursively
1,3,9,27,..., 3n,...,
formula
T(n)
be defined
recursively
the
explicitlyby
by the
well-defined.
in fact,
is,
describingmay
109
Induction
integers
salient
n >
feature
0.
of recursion,
namely, the.
satisfies
conditions
self-reference
\302\253
3T(n)
cases
where
no
explicit
formula
is known.
from a set S
The Recursion Theorem. LetF bea given function
set
into S. Let s0 be a fixed element
of
of S, and let N denote the
\342\200\224\342\226\272
S
function
is
a
Then
there
f:N
nonnegative
unique
integers.
satisfying
110
Chapter
1: Foundations
1. /(0)=s0,and
2. f(n + 1) = F( f (n))
n G
all integers
for
a proof
can
theorem in an excellent
on page 74 of [15]. Another
of this
[16] or
written
N.
rule.
generating
parts
Example1.10.7.
may
initial
the
called
be
relation or
ofthe theorem.
for the conclusion
us
of a
existence
the
obtain
is
the recurrence
called
are necessary
Let
to
is
induction
and
RecursionTheorem
(i) MO)-9
for
n >
all
= 5Mn)
+ l)
h{n
(ii)
+ 24
0.
In
it
cases
many
explicit formula
for
5k
+ 24
k.
to obtain from
a recurrence
term of a sequence; in fact
is possible
the
for all
general
relation
an
Chapter 3 is
Let
us
familiar.
1.
list
several
defined functions
recursively
defined
some of
which
are
quite
function
/(0)-l
2. f(n
is just
+ l)/(n)foralln>0
!)-(*
the factorialfunction
if a
Likewise,
and d
/ (n)
are
n\\.
numbers
given
then
the
recursively
defined
function
1. A(0) = a
2.
A(n
1)
- A(n)
+ d for
all
n >
A (n) = a + nd.
the function
is usually
called the
Moreover,the sequenceof numbers
{A(n)}^-0
arithmetic progression with initial term a and common
difference
d.
On the other
hand, if multiplication is used in the above
definition
instead of addition we get the geometric progression
= adny and in this case d is calledthe commonratio.
G (n)
is just
Section
The famous
Fibonaccisequenceis defined
l.F0-l-Fl
2. Fn+1 =
To
Fn
for all
recursively:
integers n >
number
Fibonacci
a new
find
Fn_x
111
Induction
Mathematical
1.10
1.
simply add
F2 = F, + F0= 2
F3
= F
2 +
Ft
= 3
F4 = F3 + F2 -
In
this
because
n
- 1. A
relation
recurrence
and
discuss this
of
form
stronger
existence
have
we
example
the
uniqueness
5,etc.
for Fn+1 is
sequencein greaterdetailin
3.
Chapter
likethe Fibonacci
This
mathematical
principleof mathematical
induction.
Strong MathematicalInduction:
Let
which, for
for
all
each integern,
if there
integers
positive
may
be
is an
integer q
>
principle
induction
but,
statement
be
P(n)
true or
either
need
we
sequence
that
1. P(l),
2.
When
As
in
the
integers
1 <, i
<k
case of
be modified
integer different
from
as before,
just
Thus,
all
1.
by
mathematical
strong
induction.
1. Basis of Induction.
P(l),
P(2),...,
2. Strong InductiveHypothesis.
k > q.
integers i suchthat 1 < i < k,
3. Inductive
Showthat
P(k 1) is
Step.
strong
hypothesis.
Show
Assume
P(i)
is
true
for ail
where
true
on the
basisof the
inductive
In
allowed
a proof
using the
to assume
principle of mathematicalinduction
in
we
using
are
strong
112
Chapter 1: Foundations
we assume not only P(k) but also P(k - 1),
well, to establish P(k + 1).
induction is a natural choicefor proofs
in which
the properties of elementsin the (n + l)th step depend on the properties
in several previous steps.
of elements
generated
To illustrateproofs
mathematical
by strong
induction, let us consider
induction
mathematical
P(k
2),.. .,P(1) as
mathematical
Strong
-
the
examples.
following
each positive
that for
Prove
1.10.8.
Example
nth
the
n,
integer
function
unique
(1) 6(0)
defined
function
First, it is easy
- 1) -
to
- 5 is the
= 2(3n)
b(n)
by
b(n)
(2)
that the
Prove
1.10.9.
Example
Sb(n
that
check
2) for n
b(n) =
> 2.
2(3n) - 5 does,in
satisfy
the
relations
(1)
fact,
relations
Next, we
that
claim
if a(n)
is any other
and (2),
function
LetP(n)
for
satisfying
be the
all
nonnegative
n by strong
1. Basis of induction.
is true. This is immediate
and P(l)
P(0)
since know 6(0) = -3 and 6(1) = 1 we are assuming a (0) = -3 and
= 6(0) and a(l) - 6(1).
a(l) - 1.
a(0)
Show
we
and
Thus,
2. Strong inductivehypothesis.
Assume
0<i <k
0 < i
<
k >
where
3. Induction
+
6(fe
1. In
> 1.
where
1).
By
1 >
0.
is
P(i)
1) = 4a (ft)
= 6 (ft) and a
1)
is true
- 3a (ft
(ft
1) =
all
all
integers
a(fe + 1) =
by the strong
or that
But
-1).
6 (ft
for
true
1) since
ft
>
1 and
Section 1.10
Induction
Mathematical
+ 1)
Thus,a(/2
result is proved by
and the
1.10.10.
Example
- 4(2(3*)- 5) - 3(2(3*\"1) - 5)
- 5
- (8)(3*)- (6K3*-1)
- (8)(3*) - 2(3*)- 5
(6)(3*)
b(k
- 2(3*+1)-
1)
induction.
that if
Prove
Fn
is
the
nth Fibonacci
then
for
all
n >
integers
0.
Likewise
Sothe
when n =
for n
- 0 and n = 1.
Strong inductivehypothesis.
Now
\"-^[P-tT-P-tTI
for
each
Inductive
integer
step.
= 0,
1,
is valid
formula
k where
113
0<k
< rc.
Prove that
'\".-il^r-P-rTl
for
n >
1, assume
number,
114
Chapter
1: Foundations
To expedite
a=
and
we know that
Then since
Fn+l
^n =
-F
+ Fn_x and
Fn
[<*n+1
and
&n+1]
V5
by
the
inductive
Fn+x
that
it follows
hypothesis,
[an+1
~fE
bn+l
- bn]
an
+ l)-6n(6
-^[an(a
D].
Now
1
a + 1 = 1+V5.3+V5
+
and
so that
a + 1 = a2.Likewise,
= \342\200\224
[an(a
Fn+l
=
ar23+V5
+ 1
\342\200\224
= b2. Therefore,
+ l)]
+ l)-bn(b
= -t= [an+2
6n+2] and
V5
1.10.11.
In section 5.6 we shall have
occasion
to consider
Example
= 2 and V(n + 1) = V(n) +
the function V(n) where V(0) = 1 and V(l)
- 1) + 1 for all n > 1. We wish to showthat V{n) =
- 1 for all
V(n
Fn+2
integers n > 0.
Basis of induction.
When
Likewise,
Strong
V(l)
= 2
inductive
<
n.
and F3 = 3 hypothesis.
= 0,
=
V(0) =
1 and F2
1 =
- 1 = 1.
2.
For n >
1, assumeV(fc)
Ffe+2
- 1
Section
Mathematical Induction
1.10
Inductive
1 = (Fn+2
1 by definition of Fn+3.
V(n) +
V(n
Fn+3
expression
for
Exercises
for
1)- +
we
Fn+2
1) +
Fn+3
+ Fn+1
1 =Fn+2
closed
1.10
Section
I. Use mathematicalinduction
to
prove
is true for all positive integers n.
statements
1. ir+2
2. If an
- 6an_2 for
5an_x
each of
that
the
following
by 133.
is divisible
122n+1
4-
n > 2 and a0
12 and
- 29, then an
ax
+ 7(2n).
5(3n)
3. I2 +
32 +
22
= m(m +
\342\200\242
\342\200\242
\342\200\242
+ n2
1)
\342\200\242
3 +
\342\200\242
5 +
(2n
for n
(2n +
-1)
= n/(n
>: 1.
l)/3.
4- 1).
(2n + 1) -
- 1)
\342\200\242
\342\200\242
\342\200\242
7 + \342\200\242
+
l)/6
(2m
\342\200\242
\342\200\242
4. I2 + 32 + 52 + \342\200\242
+ (2m - l)2 = m(2m
\342\200\242
\342\200\242
5. 1/(1)(2) + l/(2)(3) + \342\200\242
4- 1)
4- l/n(n
6. 1
V(n 4- 1) =
- 1=
1. Now
(Fn+l - 1) +
we have
since
Now
1) -
V(n +
Prove
step.
115
n(4n2
6n
D/3.
7. I3 + 33 +
2 + 2
8. 1 \342\200\242
9. 1
53 +
\342\200\242
\342\200\242
\342\200\242
+
(2m
\342\200\242
3 +
- l)3
= n2
\342\200\242
\342\200\242
\342\200\242
4 + \342\200\242
+
n(n
\342\200\242
\342\200\242
\342\200\242
4 4- \342\200\242
3 \342\200\242
4-
\342\200\242
2 \342\200\242
3 4-
n(n
(2n2
1).
= n(n + 1) (n +
1) (n + 2) = n(n +
+ 1)
+
2)/3.
1)
(n
+ 2)
(n 4- 3)/4.
10. I2-
II.
- 42
4- 32
22
- (-l)\"\"1
\342\200\242
\342\200\242
\342\200\242
(-ir-V
y is
xn
x2n+1
12. x 4- y is a factor of the polynomial
13. n(n2 4- 5) is an integermultipleof 6.
14.
15.
n(n2
3m5
16. an
1) (3n
4- 5m3
(1) a0
an
4- y2n+1.
4- 2) is an integermultipleof 24.
In is divisible by 15 for each positive
1 is the unique
function defined by
integer
n.
11,
-
3a\342\200\236_!
2ah_2 for n
yn.
6,
ax =
(2)
4-
= 5(2n) 4-
n(n + l)/2.
initial
with
n/2 [2a
4-
(n
l)d].
x >
of
the
term
> 2.
-1, (1 4first
x)n
> 1
4- nx.
n terms of an arithmetic
and common difference
d is
116
Chapter 1:Foundations
n terms
the sum of the first
of a geometric progression
a and common ratio r # 1isa [(rn - l)/(r - 1)] =
term
that
Show
19.
initial
with
a[(l-r\/(l-r)].
20.
Let
table
formula
for
23. Supposethat
that
each
integer
9.
24. Showthat
by
joining
collinear,
26.
g(n) ==
1. *(0)
27.
be paid
can
%n
>
is the
unique
- 10
1)
JL +
VT+V2
>
10, 2n
each integern
>
4, 3n
29. For
n
30. For
integer
31. Foreachinteger
each
> 2,
>
n3
5, 4n
>
1.
r-
V^>V\"
+ 64.
1 >
n2 +
n.
rc4.
32.
For
each
integer
n >
33.
For
each
integer
n >
9, n\\
34.
For each
>
by
> n3.
> T
+
n >
for
--,
defined
function
1)
- lg(n)
J-
2, the
in the
distinct
points
is n(n \342\200\224
l)/2.
+ (7)2n
by 9.)
divisible
*(1) = 29
g(n
by
a system
2.
valid
describing
n2.
positive integern
(3)5n
pattern
! > 2n.
T >
5,
of
example,
4, n
have
debt
integer
any
3n. (For
>
is
formula
we
any
>
polygon.
a
3, and then conjecture
Dn in
convex
n-sided
an
of
for n >
of Dn
values
of
mathematical
2 A,)
Show
of diagonals
number
the
be
Dn
Make a
4n.
Fibonacci
number
Fn is
less than
Section 1.10
an = 2n
(1) a0 =
35.
ax
an =
(2)
36.
Suppose
-
&n
1 is
3a\342\200\236_x
that
+
bn
2an_2 for
II.
function
6n_3 for all
integers n.
1 and
an
1.
Recursion
the
Apply
do in
=
\302\243(0)
3. k(0)
fe(n
integers n >
+ 1
yJSan_l
for n >
an_2
4-
bx
1,
b2
1.Provethat an
for
an_3
2, 63
4. Provethat 6n
n >
= 3, and
<
< 7/2
2n for
for all
3. Prove that
an
<
0.
Theorem
= 3g(n)2+
1) =
7 /i(n)3
7 for
- 3 for
=1
+
defined by
to verify
recursive
2. /i(0) - 3
/i(n
+ 1)
g(n
>
i^ the
4-
bn_2
rc
positive integers n.
38. Leta0 = ax = a2 = 1 and an
(4/3)n for each integer n >
definitions
by
all positive
ax
defined
function
^n-i
37. Let
the unique
117
Induction
Mathematical
1) =
ylSk(n)2 +
n >
n >
0.
0.
7*(n) - 3 for
n >:
0.
is known
as the
III. Perhaps the oldest recordednontrivial
algorithm
Euclidean Algorithm. This algorithm computesthe greatestcommon
of 2 nonnegative
divisor
integers,
integers. If a and b are nonnegative
d such that d
then gcd(a,b) is defined as the largestpositive
integer
divides both a and 6.If a > b > 0, then the Euclidean algorithm is based
upon
the
facts:
following
(a) gcd(a,b) = a if b = 0
(b) gcd(afb) =gcd(b,r) if 6 * 0
and a = b q + r where0 < r < 6.
Thus
the
the above
common
greatest
division
of 22 and 8 canbefound
gcd(22,8)
= gcd(8fi)
Find the
greatest commondivisors
(a) 81and
36
118
144 and
(c) 1317and 56
(d) 10,815
and
(e)
applying
510 and
6489
374.
\302\243cd(6,2)
= 2.
gcd{2fi)
(b)
by
of
the
following
pairs of
integers.
118
Chapter
1: Foundations
IV.
Number
Theory
1.10.4
we
1. (a) In example
either
a
or is
prime
proof of
fact
this
the
used
divisible
by
integers.
positive
a > 1 is a
(a) to concludethat every integer
of
product primeintegers.
(c) Write 1235 and 5124 as products of primes.
Prove
that the
(d) (The FundamentalTheoremof Arithmetic.)
factorization of an integer a > 1 into a product
of primes is
of factors.
Hint: use
unique except for rearrangement
(b)
Extend
the proof in
contradiction
and
well-ordered
property.
.,pk are distinct primes
px,p2,..
the
if
are
of n =
then the number of positive divisors
integers,
positive
Hint:
each
\342\200\242
is
Note
that
+
+
+
D1)..
l)(e2
.(ek
(ex
PeiPe2- -Pkk
1
2
or
or
or
times
a
of
0
or
as
factor
will
e,
appear
prime pt
...
any positive
2. If
of
division
of Example1.10.4
was
3.
For
n <
4. (a)
1 added
E(p)
... p)
each
integer
n\\.
Show
integer
consider
Hint:
each
that
prime
q =
n\\
is of
the
Modify
such
that
1, and
form
n.
(c)
(Theproof
by Euclid.)
published
all Euclidian
Find
p <
first
n.
the
proof
many
infinitely
of Example
of the
primes
4rc
1, where
4rc
than k primes of the form
+ 3 for any
k.
Hint:
are
positive integer
SupposePi,p2,...,p* k primes of
- 1 and use exercises
the form in + 3. Consider4pxp2..
.pk
and
4(b).
1(a),4(a),
6rc + 1 or 6n + 5.
(d) Show that each prime is of the form
Show
that
the
of
two
(e)
product
integers of the form 6rc + 1,
where n is an integer, is again ofthat form.
1.10.4 to show that there are
the
of Example
(f) Modify
proof
form
6rc 4- 5.
of
the
infinitely
many
primes
- 2
Show
that
there
are
(g)
infinitely many primes p suchthat
p
is not a prime. Hint:useexercise
4(f).
there
are
more
119
Induction
Mathematical
5. The
and 50.
6. Let
>
of m
7.
n =
0,1,2.
Prove
the
that
where a
every
and
value
quadratic
are
of n.
integers,
g(n)
polynomial
take on
cannot
n2
an
+ 6,
prime values
there is an integern0
for
such
m = g(n0) > 1 and g(n) > m for all values of n > n0. Then
observethatg(n0 + m) - g(n0) is divisible by m.
The sameideas of proof prove that for any nonconstant
that
g(x)
polynomial
such
that
g(k)
with
integer
is not
coefficients
prime. The
only
there is a
other
technical
value
fact
required
to complete
Theorem
of Section
120
Chapter
1: Foundations
rem
that for
to observe
divisible
always
any integersm
m. Choosen0
is divisible by
and
+ m)1 -
n0, (n0
concludethatg(n0 +
by m. Then
according
hint given
the
to
is
nl0
- g(n0)
m)
for
quadratic polynomials.
8.
A positive
integer
can
be arbitrarily
integers.
For
instance,
integers.
composite
sequence of 7 consecutivecompositeintegers.
integer n, find an integer a (dependingon n)
such that none of a, a + 1, a + 2,.. .,a + n - 1 is a prime
(a)
Find a
(b)
Given
a positive
integer.In other
9.
find
words,
of n consecutive
sequence
(c)
(d)
Prove
(a)
(b)
divides 211-
is a
= 2.
then a
(e) Prove
positive integersuch
if 2n
that
(Thus,
1.
if a
that
all positivedivisions
sum of
is the
an
that
(2n
1)
of N
\342\200\224
1 is
prime,
- N is perfect.
different
from
N.)
of the
primes
if
2k
1 is
form
2n
1 for
prime, then n
an integer
n.
= 0 or n = 2k
(c)
The
Show
that Fl9F2,F39
11.
for
some
integer
and F4
are
Prove
that
(d)
Prove
that
the prime
the prime
primes.
n2
+ 1
n2
of (b) is unique.
you found in (a) is not unique.
Section
1.10
Selected
Answers
3.
Inductive
1 +292
i2 j.
121
Induction
Mathematical
4-
step:
/
_l rc
\342\200\242
\342\200\242
\342\200\242
4- \342\200\2362
+,
+ 1) =
(n \302\2611^2
4- 1)
4- l)(2rc
n(n
+ 1) + 6(n +
+ l)(2ra
n(n
+ ,(n + ^2
1)J
)
D:
(n + l)[(n)(2i
i + 1) + 6(n
D]
l)[2n2 + In + 6]
(n
6
(n +
Inductive
5.
11
1-2
4-
2)(2n + 3)]
step:
+
2-3
!)[(\302\273
\342\200\242
\342\200\242
\342\200\242
4- \342\200\224
n(n
4- 1
4-
n(n
(n
4-
4-
(n
1)
4-
, (rc 4- l)(n
2)
l)(n
+ 2)
+ l)(n
+ 2)
4-
2)
n2 4- 2rc 4- 1
(n +
l)(n
\"
2)
(n +
l)(n 4 1)
(n +
l)(n 4 2)
=n + 1
n
13.
4-
for n - 1
Inductive hypothesis: Supposen(n2
True
5)
t is
where
6\302\243,
some
integer.
Inductive step:
.(n
where
l)((n
+ l)2
multiple
- (n + l)(n2
- (n + l)(n2
= n(n2 4- 5)
- 6t 4- 3[(n)(n
+ 6)
+ 2n
4- 5
4-
3rc2
4- 2n 4- 1)
4- 3(rc
+ l)
+ 2]
4- 2)
- 6(* +
s),
3rc2 4- 3(rc
integer
4- 5)
of 6.
for
any
2]
is
122
Chapter
1: Foundations
26.
n >
integers
induction.
(a)
of induction.
Basis
(1) and
(2). We show
0 by strong
mathematical
satisfying
sequence
= 10 = /
Clearly g(0)
fill
(b)
Inductive
0 < i
hypothesis.
1.
= /
thatg(t)
Suppose
and
(0)
(i) for
~ f (k
that
(c) InductionStep.
g (k + 1)
>
k
Since
1, k + 1+ >2sothat/(fc + l)-7/(*)
Show
But
inductive
by the
then
f(k +
integers
- 10/(k-
1).
(7)2*
/(fc)-*(*)-(3)5*+
1) - g(fe - 1)
5* + 7
1) = 7(3 \342\200\242
(3)5*\"'
\342\200\242
2*)
= 5*-!(7
10
\342\200\242
3 \342\200\242
5
= 5*-!(3 . 52)
- 3
1).
all
hypothesis
and / (k
But
- 29
g(l)
\342\200\242
5*+1 +
(7)2*\"'.
10(3
\342\200\242
5*\"1 +
\342\200\242
+
2*_1(72
3)
\342\200\242
2*\"1)
.2-10-7)
\342\200\242
2*-1(22
\342\200\242
2*+1 =
7)
g(k
+ 1),
III.
(c)
Since
+ 29
= (23)(56)
1317
56 -
(1)(29)
27
29 = (1)(27)
+ 2
27 = (13)(2)+ 1
gcd(1317,56) = gcd(56,29)
=
2-(2)(l)
gcd(29,21)
=gcd(2,l)
gcd(21,2)
-gcd(l,0)
-1.
1.
and
converse
Write.the
(a) If < y
(b) If p is
x
congruent
the contrapositive
and y<)t,
then x = y.
odd
then
an
to
prime,
5 modulo
6.
p is
of the
statements.
congruent to 1 modulo 6 or
Section 1.10
(a) x is an integer or y is
(b) In order for a relation
be
for an
it be divisible
3. Write a nontrivial
(b) No
x >
(a) 3n >
(b) / (n)
not
are
by
for
of each of
transitive.
and /(*) -
Euclidian
the
7/(n
1)
- 12/(n
follows:/(0) = 7,
2)
for
all
algorithm
at a party
pairs
Prove that
15 people.
of
to find
the GCD
integers
+
5(4n)
(greatest common
and 4410.
924
of
7 or
knows
greenor 12
M&M's?
orange
10.
recursively as
defined
/ is
function
2.
divisor)
that
is sufficient
m and n
then
m/ny
- 26,
7. Use
9.
6, it
6. Supposea
n >
it
3.
5. Prove by mathematicalinductionthat
(a) 4n > 3\" for all integers n > 1.
(b) 2n\"x (3\" + 4n) > T for all integers n >
5n > n5 for integers n > 6.
(c)
/(I)
it is necessarythat
V2
Disprove
2 and
negation
relations
(d) If
integer.
to be asymmetric,
integer n to be divisible
by
(a) Some
(c)
an
antisymmetric.
In order
(c)
\"If...
form.
then...\"
4.
equivalent statement in
2. For
123
Induction
Mathematical
Tell
(a)
whether
If there
March.
banks
(b) If
not
will
is
an
reflexive.
R
equivalence
is
an equivalence
(c) If xy = 0, then
in March.
reflexive
then R is transitive
relation,
but not transitive. Therefore, R is
relation.
x
= 0
or y =
0. x = 0. Therefore,
y
0.
and
not
124
Chapter 1:Foundations
12.
the
of n is
6 or 8.
If the units
of n2
digit
The
13.
positive
or 6.
digit
the
that
Suppose
of the
digit
is 4
units
argument:
and perfect,then
of n2
is not
circumference
the
units
digit
into
40
are
integers 1 through
randomly
of 4
assigned to these sectors.Provethat thereisat leastone group
is 82 or more.
consecutive sectors whose sum of assignednumbers
14. Suppose that no pine tree has more than 9000 pine cones and that
in Leon County. What is the largest
trees
there are 6,381,400
pine
integerthat can be used for n in the following assertion?Thereare
sectors
40
at
least
and
n pine
that the
trees in Leon
County
with
the
same
number
of pine
cones.
2+
\342\200\242
\342\200\242
\342\200\242
+ n
(l/8)(2n
(l/8)(4n2
the
truth
= (l/8)(2n
n. \"If 1
+ l)2 for all positive
integers
- (1/8)(2m + l)2, then l + 2+...+n
+ n + l
+
+ (* + l) - (l/8)(4n2+ 4n
+ 1 + 8n + 8)
l)2
+ 12m + 9) - (l/8)(2n + 3)2 - (l/8)(2(n
+ 1) + l)2.Thus,
of the statement for n impliesits truth for n + 1.\"
\342\200\242
\342\200\242
\342\200\242
4- n
Elementary
Combinatorics
INTRODUCTION
of computers to problems,onenormally
needs
to
and
approximately, how much storage will be required
of
about how many operations are necessary.A major
component
be determining
the number of items
estimating the storage needed may
of a particular type that have to be stored. Similarly, a knowledgeof how
the computation
involves will help in assessing the
many
operations
of program
execution
time, and thereby aid in determiningthe
length
able to answer such questionsof
potentialcostofthe computation.
Being
the form \"How many?\", is important if one attempts to compare
of computation
or even to decide whether or not a
different
methods
For
know,
most
applications
at least
is feasible.
computation
given
to determine
by the methods and concepts
are (n - 1)!- (n - l)(n - 2) . . . (3)(2)(1)
and
different
of visiting
each of n cities exactly onceby starting
ways
each trip at a given
the most straightforward
Furthermore,
finishing
city.
the
round trip would be to list all (n - 1)!routes
shortest
way of finding
and
each
route.
Such a
calculate
the total distance associated with
has the
or \"exhaustive
process of \"completeenumeration\"
searching\"
of using such an
virtue of being easily programmed,
but
the
problems
of cities is not small. For
algorithm become apparent if the number
the
for a single route requiresn additions
total
distance
instance,finding
and
total
number of
the
since there are (n - 1)! different
routes,
to
additions is n\\ Thus, if there are 50 cities, 50!is approximately
equal
3 x 1064,and even if the computer
109 additions per second,it
performs
in
For example,
we will
this
that
chapter
be
able
there
12G
Chapter
Combinatorics
2: Elementary
1047 years
than
more
take
will
by
required
this algorithm.
required only
be
n2
after
found
could
algorithm
operations,
only
by the
1 second
than
another
mere exhaustive
be found that
than
better
algorithms
shortestroutecould
be performed less
in
to perform
years
50! operations.
the topicof
this
n -digit
the reader
but
etc.,
form,
plates,
or
numbers,
should keep in
would
words
certain form,
require
settings suchas
of
number
the
of prescribed
of words
number
the
to make an
algorithms entail is
very elementary
plates of a
of license
number
the
counting
will use
We
chapter.
for one
necessary
work that
computer.
BASICSOF COUNTING
If
is a
set, let
us use | X
| to denote
in X.
of elements
number
the
problems.The
its parts;
principles
elementary
first
it is at
principle
onceimmediateand
we need
elementary,
the details.
SumRule:
the
|S2|+.
union
of
The
of
principle
nonempty
disjoint
counting.
disjunctive
subsets
Su..
then
.,S\342\200\236,
clear on
If a set X is
- | Sx | +
|X |
\342\200\242
\342\200\242
+|SJ.
must
We emphasize
that the subsets SUS2>..
.,Sn
\342\200\242
\342\200\242
common. Moreover, sinceX = Sx U S2 U \342\200\242
US,,
profound
only be
will
were
.,S\342\200\236
be
needed\342\200\224the
allowed
principle
no elements in
each element of X is
.,Sn is a partition
SUS29*.
to
have
overlap,
of inclusion
then a
more
and
exclusion.
se,
We
will
discuss
Section
Basics of Counting
2.1
127
If Ei9...
J5n are mutually exclusive events, and Ex can happen
ex ways,
E2 cart happen e2ways,..., En can happen
en ways, then Ex or E2 or... or
\342\200\242
\342\200\242
can
4- en ways.
En
ex + e2 4- \342\200\242
happen
exclusive
events
Ex and E2 mean
Again we emphasize that mutually
that Ei or 2?2 can happen but both cannot happen simultaneously.
The sum rule can also be formulated in terms of choices:If an object
in ex ways and an object can be selected
canbeselected
a reservoir
from
in e2 ways, then the selection
from
ofone object from
a separate
reservoir
either one reservoir or the othercan be made
in ex + e2 ways.
Example 2.1.1. In
how
can we draw a heart or a spade
many
ways
of playing cards? A heart
or an ace? An ace or a
2 through 10? A numbered
card or a king?
king? A
Since there are 13hearts
and
13 spades
we may draw a heart ora spade
in
13 + 13 = 26 ways; we may drawa heartor an ace
in 13 4- 3 = 16ways
since
there
are only 3 aces that are not hearts.We may draw an ace or a
10 in each
2 through
king in 4 4- 4 = 8 ways. There are 9 cardsnumbered
of 4 suits, clubs,diamonds,hearts,or spades,
so we may choose a
numbered card in 36 ways. (Note: we are counting acesas distinctfrom
numbered
in 36 4*
cards.)
Thus, we may choose a numbered cardora king
an
from
4 =
deck
ordinary
card
numbered
40 ways.
Howmany
2.1.2.
Example
two
distinguishable
rolled? Howmany
can
ways
pair
ways
outcome
(1,3).
can
we get
a sum of 4 or of
dice (say
of a
Then
other
8 when
is white)
are
we see
are
the sum
only ones
the
4. Likewise,we
Perhaps
at
differences
this
between
it
stage
the words
128
Chapter
Combinatorics
2: Elementary
Example
2.1.3.
How many
can
ways
indistinguishable dicearerolled?
An
even
we get
sum?
(4,4),
of 8 by the
dice are similar,
a sum
obtain
since the
the
differentiated
Su
Cartesian
,Sn
product
are
Sx
illustrate Sx x
Sx
S2by
of elementsin the
II-Lx
13,
|. That
is,
\342\200\242
. \342\200\242
xSJ-IISLJSJ.
a tree
diagram
and
{aua2,az,a4,a5}
Figure
counting.
sequential
|SxxS2x
Let us
of
principle
sets,
nonempty
2-1
(see Figure
S2 =
\\bub2,b3}.
2-1) where
If
Section
Basics of Counting
2.1
that
Observe
the 5 elements
stage
there
129
corresponding
are 3 branches
giving
to
in
of 15
x S2 can be
U (a5 x S2),
a total
the
in
branches
second
stage.
More generally,
bu..
rule
We
the
are
,ybm
follows
by
can
if
au..
m distinct
induction.
mathematical
reformulate
the product
can happen ex,e2,...,
,En
EuE2f...
sequence of eventsEx
\342\200\242
ex
e2 .....
en ways.
first,
followed
\342\226\241
Example
how
many
ways can they fall? If 5 distinguishabledicearerolled,
if 100 distinguishable
dice are
are there? How many
outcomes
how
many
possible
tossed?
fall
can
(event
Ex) in 6 ways and the second
= 36 outcomes when 2 dice are
rolled.Also the third, fourth, and fifth die each have 6 possible outcomes
so there are6 \342\200\242
6 \342\200\242
6 \342\200\242
6 \342\200\242
6 = 65 possible
outcomes when all 5 dice are
The first
E2) in 6
die
can
fall (event
6 = 62
ways. Thus, there are6 \342\200\242
130
Chapter
Combinatorics
2: Elementary
are
Likewise there
tossed.
6100
outcomes
possible
when
100 dice
are
tossed.
Example 2.1.5.
of a certain state
How many
different
can be manufactured if repetition of letters and digits are allowed?
plates
can be repeated? (c)
(b) How
many plates are possible if only the letters
if only the digits can be repeated?
How
How
are possible
(d)
many
many
at all?
are possible if no repetitions are allowed
require3
and 10 possibilitiesfor
3 letters
(c) 26
by 4
followed
104 since
(a) 263 \342\200\242
Answers,
\342\200\242
24 . 104.
25 \342\200\242
of 4
\342\200\242
25 - 24
9?
10
plates
digits, (a)
are 26
there
each
(a) Howmany
2.1.6.
Example
(d) 26
license
the
that
Suppose
letters
English
digits,
- 9 - 8
3-digit
- 7.
numbers
be repeated?
There are 73 such 3-digit numbers in (a) since eachof the3 digits can be
with 7 possibilities. Likewise,the answer
to question
6 \342\200\242
5
(b) is 7 \342\200\242
since
there are 7 possibilities for the hundreds
but
once
one
is
digit
digit
usedit is not available
for the tens digit (since no digit can be repeated
in
this
Thus
are
6
for
there
the
tens
and
only possibilities
problem).
digit,
then for the samereasonthere
are
for the units digit.
only 5 possibilities
filled
of combinatorial
problems call for the
rule and the productrule,perhapseven a repeated
the
speaking,
application of both principles.Generally
solution
the
Frequently
applicationof
the sum
both
intermixed
and
Let us
illustrate
2.1.7.
Example
that
involve
We
can
plates
1, 2,
form
or 3
plates
a few
3 letters
26 .
followed
exclusive
104 +
262
examples.
different
license
plates
are there
104 ways,
followed by 4 digits in 26 \342\200\242
104 ways,
and plates with
followed by 4 digits in 262 \342\200\242
These separate events are
104 ways.
by 4 digits in 263 \342\200\242
that
there
so we can apply the sum ruleto conclude
. 104 + 263 . 104- (26+ 262
+ 263)104
plates with 1, 2,
we have
to
Now we can use what
learned
by 4 digits.
with 2 letters
mutually
are
with
these
two
into small,
itself is easy
or 3 letters followed
solve the nextquestion.
Section
Basics
2.1
different
1, 2,
by
3, or
are there
plates
4 digits?
131
of Counting
the
using
digits
already seen in
We have
three-digit
Likewise,
7-6-5
(b)
are
there
that
\342\200\242
6
2-digit
possible
no
is allowed?
repetition
there are
no
no
product rule, we
that
see
we may
two-digit
numbers, 7-6-5
numbers,
numbers,
and
The
ruleto see
there
that
7-6-5-4-3-2
7 integers to
be 7. Applying
7 +
+ 7-6-5-4-3-2-1
7-6 +
6 = 42
numbers, 7 \342\200\242
four-digit
\342\200\242
4 \342\200\242
6 \342\200\242
5 \342\200\242
3 \342\200\242
2
six-digit
events
7-6-5
different
work
the
numbers,
exclusive
mutually
are
to
so we can form
seven-digitnumbers.
one-digit
forming
the
numbers,
7-6-5-4-3-2-1
of
6, 8,
4, 5,
three-digit numbers,7-6-5-4
five-digit
events
only
have
form 7 one-digit
\342\200\242
4 \342\200\242
6 \342\200\242
5 \342\200\242
3
digit numbers,etc.,are
problem
or three-digit
and we have
are allowed
repetitions
in this
specified
numbers,
two-digit
numbers,
1, 3,
are allowed?
repetitions
7-6-5
and 9 if
since
(b) that
2.1.6
Example
possible.
numbers
see
2.1.8.
Example
formed
numbers
7-6-5-4
we can
7-6.5-4-3
form under
the
Example2.1.9.
evenand have
9.)
For
no
How
repeated
many
digits?
three-digit
(Here we
number
to consider.
132
Chapter2: Elementary
Combinatorics
\342\200\242
numbers
that end
digit can be repeated. Hence there are9 8 three-digit
not end in 0. Then there are4 choices
does
in 0. Now supposethe number
this
for the last digit (2,4,6, or 8); when
is specified, then there are
digit
for
first
8
the
since
the
with
cannot
number
digit,
only
possibilities
begin
0. Finally, there are 8 choicesfor the second
are
and
therefore
there
digit
that
do not end in 0. Accordingly since thesetwo
cases
8-8-4 numbers
are mutually
9-8
even three-digit
+ 8-8-4
exclusive, the sum rule gives
numberswith
Indirect
no
digits.
repeated
Counting
It is sometimesbeneficial
some combinatorial
to solve
problems by
the complement
of a set. We will
that
is,
counting indirectly,
by
counting
this more when we consider the principleof inclusion
and
discuss
but for now let us list a few examples.
exclusion
us determine, by counting indirectly,
integers less than 109that contain the
Let
2.1.10.
Example
of nonnegative
number
the
like 000002578
a representation
course,
9 positions
can
consider
8, or 9.
are
There
are 109 -
there
99
to be filled with
1.
digit
containthe
9-digitnumbers.
is actually a 4-digitnumberso
digit
Of
we
1.
digit
Example
cards and
be
drawn
We
2.1.11
a deck
of 52
Suppose that we draw a card from
replaceit beforethenextdraw. In how many ways can 10 cards
so that
the tenth card is a repetition of a previous
draw?
draw 10cardssothat
10th
the
as follows.
this
analyze
indirectly. First we
this by counting
answer
ways we can
card
the
count
is not
10th
card
the
of
number
a repetition. We
will be. This can
then each
be donein 52 ways. If the first 9 draws are different
from
this,
51 cards. Thus, there are 519ways to
of the 9 draws can be chosen
from
draw the first 9 cards different from the 10th card. Hencethere are
ways
(519)(52)
the previous
to choose
9 draws.
cards where
the
there are
10th
card
replacements.
Example
2.1.12.
In how many
them
are
different
5210- (519)(52)
ways
cards with
row so
10 cards with
Hence,
5210
ways
from any of
to
not next
10
draw
to draw
10
in a
Section
of Counting
Basics
2.1
133
10!ways
of seating
all 10 people. Thus, by indirect counting,
the number of ways of seating
the 10 people where the
certain pair of people (say, A and B) are seated nextto eachother.If we
then
there
are 9 total entities to arrange
treat
the pair A B as one entity,
in 9!ways. But A and B can be seated nextto eachother in 2 different
orders, namely A B and B A. Thus, there are (2)(9!) ways of seating all 10
to our problem
people whereA and B are next to each other. The answer
then is 10! - (2)(9!).
There are
need
we
count
only
One-to-OneCorrespondence
There
is,
another
finally,
technique
that is
in counting.
used
often
In
single elimination
2.1.13.
Example
some
players remaining
no
are
player\342\200\224there
players
victory
problem
until
is: how
this
left
someone
player
of
the
in a
any player
in a
victory for
tournament,
as possible,
pairs
the
but if there
receives
in this
single
ends
match
round
is an odd numberof
for
automatic
played
every
In each
ties.
entered
wins the
in
tournament.
The
total?
approach
are
is to
134
Chapter
Combinatorics
2: Elementary
there must
Consequently,
100
been
have
of losers.
one
player.
100 matches
and hence
losers
start
the
At
undefeated
of the
One
generalized.
Any
that
starts
with
single
n contestants
Determine
2.1.14.
Example
the
will
and
problem
tournament
elimination
require
- 1
elements.
Let Sn be the
calculate the value
Sn for a
few values of n to
sn
16
Then
elements.
we
determinea conjecture.
if
where the set contains the 3 elements
then
a,b,c>
the 3 singleton
total of 8 subsets includingthe empty
sets:
set,
3 subsets with 2 elements
each: {a,M,{a,c},{6,c}, and finally, the
{a},{6},{c},
entire set {ayb,c}. From this meager information, we conjecture that, in
to the reader).
general,Sn = 2n (a fact perhaps already familiar
Now let us give a proof that Sn = 2n. We could prove the result by
but we shall apply the productruleand the idea
mathematical
induction,
of one-to-one correspondence. Let V = {xlfx2,..
.,xj denote the entire set.
Then if T is any subset of V, assign the rc-digit binary sequence
G T and yt = 0 if xt $ T. In this manner we
- ->yn) where
y{ = 1 if xt\342\200\242
(yi>y2v
to each subset of V. For
associate a unique rc-digit
sequence
binary
if T = {jc1,jc3,jc5},
then the associatedn-digit
is
instance,
binary
sequence
(1,0,1,0,1,0,0,..
.,0) indicating xx G T, x3 G T, x5 G T but that the other
n 3 elements are not in T. Moreover,to eachn-digit
binary
sequence
is a unique subset of V. For
the binary
there
example,
sequence
For example,
n = 3
is a
there
We
understand
(0,1,1,0,0,1,0,.. .,0) correspondsto the subset {x2,x3,x6}.
that we have establisheda one-to-one
between
the
correspondence
of all n-digit binary
of subsets
of V and the collection
collection
sequences.Thereare clearly 2n n-digit binary sequences so that there are,
then
2n subsets
likewise,
of V.
to Computer Science
Applications
of n variables is defined by
0 or 1 to eachofthe 2n n -digit binary
How many Boolean functions of n variablesarethere?
2-valued
assignment
of
a value
Boolean
function
of either
the
numbers.
Section
Basics
2.1
are 2
Since there
rc-tuples,
by the rule
to
ways
assign
to each of
a value
of product thereare
2-2
135
of Counting
the
2n
binary
22\"
T factors
n -digit
binary numbers
Binary
are
as the truth
in tabular form
Number
Value
0000
0001
0010
0011
0
1
0101
0111
0
1
1000
1001
0
0
0
0
0
0
0
1010
1011
1100
1101
1110
1111
2-valued
after
unchanged
How
many
all the
self-dual
there?
Partitionthe set of
Boolean
Boolean
n -tuples
into
function
2n
binary
where
table below.
is a truth
table
0110
self-dual
in the
given
0100
functions
Boolean
the
truth
2n_1
each
blocks,
block
a self-dual
In constructing
containing an n-tuple and its l's complement.
the
value
block
a
fixes
a
to
either
memberof
value
function,
assigning
value
that must be given to the other member.
So,independent
there are 22\"_l
assignments may
be made for only 2n~l of the 2n rc-tuples.
Thus,
n
variables.
different
of
self-dual
Boolean
functions
Boolean
to
computer
functions
and
functions,
scientists
and
self-dual
who study
logic design.
It is
136
Chapter
Combinatorics
2: Elementary
therefore
important
Further
them.
enumerate
well
in
to
as
6.
Chapter
Factorials
Frequently it is useful to
For
2.1.1.
Definition
...3.2.
(n-l)(n-2)
Also define
0! = 1.Notethat
Thus,
4! = 4
\342\200\242
2 \342\200\242
3 \342\200\242
6! = 6
\342\200\242
4 \342\200\242
5 \342\200\242
3 \342\200\242
2 \342\200\242
1,
7.6.5.4.3.2.1
relation
n\\
rather
n[(n
6! =
than
Exercises
\342\200\224-\342\200\224
3-2-1
3!
6,
4!-
6! =
720,
7!
us to computethe values
362,880,
of
n! for
small n
2! = 2,
5!- 120,
24,
= 5,040,
10! =
the factorials.
1!-1,
0!-l,
9! -
720 but
evaluating
- 1)!] enables
\342\200\242
1,
3!
in factorial form
- 1
1!
7!
\342\200\236
\342\200\236
K
A
\342\200\242
\342\200\242
\342\200\242
4 = \342\200\224
and
such as
or 7.6.5.4.
6.5.4.3.2.1,
4.3-2-1,
for products
notation
a simple
have
3,628,800,
8!
=
11!
40,320,
- 39,916,800.
1.
How
many
seven
digits,
possible
telephone
the first two of
be between
2.
manufactured
3.
company
are
(repetitions
combination
produces
of three numbers
allowed)?
from
0 to
Section
2.1
Basics
tion no
5,6,8,
9 if
and
(b) Howmany
(c) Howmany
(d)
(e)
5.
How
How
repetitions
repetitions
in (b)
those
if no
if
many
of those
many
of those
How many
in
can
to be
(a)
How
ways are
a deck of
many
replacement) from
(b)
(d)
there to
52?
and a woman
are
who
not
select 2 cards(without
is an
at least
ace?
an
is an
8. How many
9. How
many integers
between 1 and
one 9?
10.
a, b, c, d,
letters
ways
card
first
the
(e)
(f)
(g) neithercardis
(h)
the
How many
(c)
using
4000?
used?
7.
How many
a combination.
be attained?
can be formed
are allowed?
are allowed?
137
of Counting
How
license
different
many
plates
ace?
distinguishable
104
contain
dice
exactly
to yield
one 8
and
repetitions):
letters:
consonants?
(a)
are
(b)
are vowels?
(d)
How
many
and
the
5-letter
middle
words
or
last
only appear
138
Chapter 2: Elementary
Combinatorics
12.
(a)
(b)
13.
Do (a)-(d)
(e)
How
with
many
5?
one
exactly
palindrome
How
are there
numbers
7-digit
many
not
are
zeroes
backward.
or
the
English
alphabet?
are five
14. There
roads
from
different
roads
to City
City
from
City
C, and three
to
different
B, three
City
that
roads
different
directly from A to C.
(a) How many different ways are thereto gofrom
different
(b) Howmany
ways are there from A to
How
different
(c)
many
ways are therefrom A to
A to
C via
go
JB?
C altogether?
C and
then back
to A?
(d)
How
(e)
15.
16.
different
many
to A
visit
that
How
B both
different
many
from A to C
and
going
coming?
trips are there that go from
trips
are there
and back
A
to
again
C via
namecanbe
repeated)?
17.
takes
9 positions on
on a road
players
are
There
25
(a)
how
many
(b)
how
many
pitchers
different
different
18.
teams
batting
can he field?
orders can
he make if
his batting
(c)
9th
has
10
position
of
he
order?
how
can the coach field if he has 4 catchers,
10
teams
many
pitchers, 7 infielders,and 4 outfielders?
In a certain programming language,an identifieris a sequence
ofa
first
character
must
a
certainnumber
the
be
of characters
where
Section
Basics
2.1
the
(a)
are there
identifiers
many
up
may be
characters
remaining
of length 5?
to 8
an identifier
of Pascal
implementations
from
139
of Counting
characters
the
with
above
restrictions.
people if
the
are distinguishable?
telegrams
the
that
(c) Rework (a) under the assumption
indistinguishable?
20. A shoe store has 30 styles of shoes.If eachstyle is
different lengths, 4 different widths, and 6 different
many kinds of shoes must be keptin stock?
21.
A chain
next
each
week
have
people
has 750
A company
2 people with
23.
first
the
a letter
available
colors,
are
in 12
how
so on.
and
people,
who received
person
telegrams
the
received
letters
same
after 10 weeks?
year?
pair
there
be at
must
least
of initials.
store
tire
tubeless
24.
How
integers
many
(a)
have
no
digits
(b)
have
no
digits
25.In
how
a row
(a)
(b)
(c)
many
8?
different
orders
can 3 men
and 3 women
be
seated
in
of 6 seats if
of the seats?
must be filled by
men occupy the first 3 seats and women
anyone
may
the
first and
sit in any
last seats
men?
occupy
the
last three
seats?
Chapter2: Elementary
27.
Combinatorics
2 adjacentstripeshave
can this
in yellow,
stripes
be done sothat no
color?
same
the
6 vertical
are
language
on
on
the
the
grouped
together.
left.
left
and
the 12
German books
on
the number
Determine
books
from
different
subjects.
how
many
integers
(b) are
even?
(c)
are
odd?
the digit 7?
(d) contain
(e) are
(f)
(g)
100?
than
greater
are greater
are divisible
7?
by 5?
order?
(h) have their digits in strictly
increasing
32. Prove by mathematical induction that one-halfof the 6n outcomes
n distinguishable dice have
of rolling
an even
sum.
choose
a
can
we
black
33. (a) In how many
ways
square and a white
board?
on
x
8
chess
an
8
square
(b) In how many ways can we choose a black squareand a white
must not belong to
square on a chess board if the two squares
the samerow
34.
(a) In
an
(b) In (a)
diamond
ordinary
how
column?
how many
from
or
ways
can
deck
as the club?
and the spade has the samevalue
can be made to beama red,a yellow,
35. Each of n different
posts
li^ht
the
or a green
by
light. How many different signalscan be beamed
of light posts?
array
Basicsof
Section2.1
141
Counting
3 initials.
same
38.
railroad
10 seats,
has
compartment
the
facing
engine
and
facing away
engine.
passengers, 4 prefer to facethe
3
face
from
to
the
and 3 have no
away
engine, prefer
engine,
In
how
can
the
preference.
many
ways
passengers be seated
Of 10
the
from
39.
(a)
(b)
40.
distributes
mother
How
1. 8
at most
no restriction
chosen
from
on
10
2.1
Section
\342\200\242
8 \342\200\242
9 \342\200\242
104.
2.
263
7.
(a)
52
(b)
4
4 \342\200\242
47.
1 . 48 +
\342\200\242
103.
\342\200\242
51.
\342\200\242
4.
(c)
(f)
48
52
(g)
(h)
receives
child
each
one apple?
for
Answers
10.
done if
How
can this be done if there
is
ways
many
the numberof applesa child can receive?
How many ways can a committeeof k peoplebe
people if k can be 1,2,3,...,or 10?
Selected
9.
ways
many
5 different
can this be
12 \342\200\242
47.
\342\200\242
47.
- 48
\342\200\242
51
\342\200\242
47.
\342\200\242
3 \342\200\242
82.
(a)
(b)
(2
\342\200\242
263 \342\200\242
104.
\342\200\242
10 +
\342\200\242
102 +
\342\200\242
103 +
\342\200\242
104)(26
+ 262
+ 263).
\342\200\242
263.
(b)
52
\342\200\242
263.
(c)
52
\342\200\242
213.
(d)
262
(e) 32
5
18
- 21B +
\342\200\242
213
\342\200\242
5 \342\200\242
214 +
\342\200\242
20 \342\200\242
24 \342\200\242
5
23 \342\200\242
22;
\342\200\242
4 . 21
21
\342\200\242
20 \342\200\242
19 +
-
20
- 19
18
52 . 213.
\342\200\242
4 \342\200\242
5
24 \342\200\242
23 \342\200\242
22;
\342\200\242
21 . 20
- 17.
19 . 18
\342\200\242
4 \342\200\242
21 \342\200\242
20 \342\200\242
19;
+ 5 . 21 . 20. 19.
142
Chapter 2: Elementary
14.
Combinatorics
\342\200\242
3 =
(a)
15.
+ 3 = 18.
(b) 15
(c) 182.
(d)
152.
(e)
15
- 45.
45.
\342\200\242
3 + 3 \342\200\242
15 + 152
\342\200\242
3
(f) 3
(g) 15
\342\200\242
15 =
(h) 15
- 182 -
32
15 . 18
+ 3
. 15.
\342\200\242
8.
15.
15-8
5 +
5.4 + 5.4.3
16.
300
17.
(a)
251/16!
(b)
(15!/7!)
(c)
18.
3 + 3-
+ 15-
(i)
\342\200\242
2.
+ 5.4.3.2.1.
+ 5.4.3.2
300
\342\200\242
299
+
300
15
\342\200\242
\342\200\242
299
298.
\342\200\242
\342\200\242
10.
\342\200\242
7 \342\200\242
4 \342\200\242
4 \342\200\242
2.
10 \342\200\242
6 \342\200\242
5 \342\200\242
3 \342\200\242
26
of length 5.
to count
\342\200\242
36\" identifiers
(b) Here we
asked
are
1,
or
2 etc.,
are 26 + 26 \342\200\242
36 +
26
\342\200\242
362 +
210.
19. (a)
(b) 210(10!).
give
11;
(c)
first boy
the
0, 1, 2,...,
10
telegrams
and
the
rest
to
20. 30
21.
\342\200\242
12 \342\200\242
4 \342\200\242
6.
10 +
10 +
(a)
(b)
23.
10
24.
(a)
\342\200\242
\342\200\242
\342\200\242
+ 1010.
\342\200\242
\342\200\242
\342\200\242
+ 1052.
\342\200\242
3 \342\200\242
2 \342\200\242
2.
36.
(b) 3
25.
102+ 103+
102 + 103+
\342\200\242
45.
= 720.
(a)-6!
(b) 3
\342\200\242
2 \342\200\242
4! =
144.
(d)
2(3!)2
= 72.
36 = 72.
(e) 2(3!)2 = 2 \342\200\242
26. There are 24 = 4!such
numbers.
Each
these
24
numbers
is (6)(17)
of the
\342\200\242
(1111).
digit
digits
Section
Combinations
2.2
27.
color for
Choose the
of the
one
be
can
first
the
3 colorsexcludingthe colorofthe
35.
The number is 4 \342\200\242
10 .
143
Permutations
stripe
3 remaining
any of
28.
and
second
stripe,
and
so on.
29. (a) 5!
(b)
2.2
6!/2
PERMUTATIONS
AND
COMBINATIONS
the objects.
A
of n
permutation
r of the
objects.
simply defining
the
mentioned
not
have
these
example,
element
may
it
words,
may
of the
usage
n objects
Some
terms
these
clarify
say
more
appear
be that the n
about
anything
definitions
definitions.
r-combinations
word.
are:
aaa,aabyaacyabc.
taken r at a time
selection of r of
permutation
n objects
unordered
of
is an
The
5 objects
the
from
the 3-combinations
are:
3-permutations
aaa, aab,
aca,
which selections
of these 5 objects
caay
cba.
objects
(2)
144
Chapter
Combinatorics
2: Elementary
and c canbechosen
The numbers
to five
up
3, 2, and
this
in
be selected
b can
times,
at most twice,
times.
example
be
will
called
repetition
numbers.
\342\200\242
\342\200\242
of {3\342\200\242
The 3-combinations
c] are:
a, 2
b, 5
2.2.2.
Example
aab, aac,
aaa,
ccc,ccb,
ebb.
cca,
In orderto
\342\200\242
of {3 \342\200\242
a, 2
b, 2 -
The 3-combinations
2.2.3.
Example
are:
abb, abc,
aaa,
aab, aac,
cca,
ccb,
ccd,
c,
d}.
an object
include
the
case
where
can be
Example2.2.4.
The
of
3-combinations
{oo
a, 2
\342\200\242
oo
b,
. c\\
are the
If
the
selections
where each object has oo as its
we
as
then
selections
with
repetition
designate such selections
r
In
of
i
n
unlimited
a
this
case
selection
particular,
repetitions.
objects
will be called r-combinations with
unlimited
and
ordered
repetitions
any
with unlimited
arrangement of these r objectswill be an r-permutation
are
we
considering
number
repetitions.
ofa,b,c,dwith
Example 2.2.5. The3-combinations
repetitions
are
the
of
3-combinations
{oo
a\\
oo
b,
oo
such 3-combinations,namely:
aaa,
aac,
aab,
aad,
cca,
ccb, ccd,
ddd, dda,
ddb, ddc,
abc,abd,acd,bed.
c,
oo
unlimited
. d\\.
There
are 20
Section
and Permutations
Combinations
2.2
145
with
unlimited
Moreover, there are 43 = 64 of 3-permutations
repetitions
4 ways
since the first position can be filled
(with a, 6, c, or d), thesecond
positioncanbefilled 4 ways, and likewise for the third position.
We
leave
a,b,c,d
with
The
to make a list of
the student
it to
unlimited
of
so
{\302\253>
a,
we tabulate
oo
6,
oo
c,
oo
. d\\
concreteness.
We
might,
combinations
chosen 0 or
Repetitions
aa
ab
ab, ba
ac
ac, ca
ad
ad,
da
bb
bb
be
be, cb
bd
bd,db
cc
cc
cd
cd,dc
dd
dd
10
16
that
constraints
We
list some
can be placed on
more examples just
for example,
\342\200\242
.
.
The 3-combinations of {<\302\273
d}
c, 1
a, \302\253>
6, 1 \342\200\242
be chosen only an even number of times are the
3of a,b,c,d where a can be chosenup to 3 times, b can be
2 times, and c and d can be chosen at most once.The
2.2.6.
can
Unlimited
aa
With
Repetitions
. c}
b9 oo
where
present such a
do not
2-Permutations
Unlimited
Of course,
these are not the only
are
endless.
selections;the possibilities
for
of
following table.
them in the
2-Combinations
With
3-permutations
repetitions.
2-permutations
formidablelist and
64
all
3-combinations
subjectto
these
constraints
aaa,aac,aadybba,bbctbbd,acd.
are:
146
Chapter 2: Elementary
Combinatorics
As another
3
example,
a can
\342\200\242
1 \342\200\242
where
c}
b,
8-combinations
combinations
place
up different
regardlessof
tion
You
selections.
on
constraints.
the
according
constraints
to our
objects
interested in two
once.
most
can just
an r-permutation.
constitute
would
at
an
be an
major
infinite
have already
unlimited
repetitions,
types:
with
described\342\200\224combinations
and
permutations
we are
of constraints,
variety
primarily
one we
the other
we
now
describe.
without
repetitions.
r objects
of
selections
and
arrangements
We remind
are
of the
you that
example,
considering
each
number is
when
repetition
we mean that in a
but,
if
it is
chosen,
given
r-combinations
1 unlessotherwise
an
selection
then in this
of {a,6,c,d}
element
we will
and,
designated,
need not
that
mean
of course,
be chosenat all,
selectionthis elementcannot
chosen
be
again.
2.2.7.
Example
objects a,6,c,d.
2-Combinations
Without
Repetitions
from
the
2-Permutations
Without
Repetitions
ab
ab, ba
ac
ac, ca
ad
ad, da
be
be, cb
bd
bd,
cd
cd, dc
12
db
four
Section 2.3
without
There are six2-combinations
a total
two 2-permutations giving
repetitions.
of
there are
without
to each
and
repetitions
of twelve
2-permutations
repetitions in
unlimited
with
2-combinations
147
and Permutations
of Combinations
Enumeration
without
of
repetitions
Example 2.2.5 includedthe six 2-combinations
2.2.7 and as well 4 other
2-combinations
where repetitions
Example
with
unlimited
actually occur. Likewise, the sixteen2-permutations
included the twelve 2-permutationSwithout
repetitions.
repetitions
3-Combinations
3-Permutations
Without Repetitions
Without
abc
abct acb,
abd
abd,
acd
bed
Repetitions
bac, bca,cab,cba
bda, dab,
bad,
adb,
dba
acd, adc,cad,cda,dac,dca
bed,
cdb, dbc,
cbd,
bde,
deb
24
without
Notethat to eachofthe3-combinations
there
repetitions
will
we
are 6
show
2.2
ExercisesforSection
1.
List
all
of {oo .
5-combinations
2. List
all
64
a,
of {oo .
3-permutations
oo
a,
oo
6,
oo
. c},
b,
oo
b is
where
c,
oo
chosen an
. d}.
\342\200\242
of {2\342\200\242
all 3-combinations and 4-combinations
c}.
a, 6, 3
.
\342\200\242
oo
of
5-combinationsof
the number
Determine
{l a,
b, oo . c,
\342\200\242
number
of
for
formula
the
a
1 d}. More generally,
develop
whose
letters
of a collectionof
r-combinations
aua2,...,ak
repetition
numbers
are each either 1 or oo.
3. List
4.
2.3
OF
ENUMERATION
COMBINATIONS
Generalformulas
for
now be presented.At
and
combinations
We
permutations
enumerating
this
time,
without
AND PERMUTATIONS
and permutations
combinations
we will only list formulas for
repetitions
or with
unlimited
will
repetitions.
to
give
general
148
Chapter 2: Elementary
Combinatorics
numberof r-permutationsofn
elements
(Enumerating r-permutations
without
denote the
Let P(n9r)
combinations
for enumerating
techniques
selections.
the
without
repetitions.
2.3.1.
Theorem
repetitions).
(n - r +
- 1)
= n(n
P(n,r)
1)
(n
r)\\
of an
are n distinct objects, the first
position
in
n
can
be
filled
This
the
second
done,
ways.
position
may
r-permutation
1 ways
since no repetitions are allowedand there are
be filled in n \342\200\224
- 1
be filled in n - 2 ways
n
can
objects left to choosefrom. The third
and soon until the rth position is filled in n - r + 1ways (see Figure 2-2).
that
By applying the product rule,we conclude
there
Since
Proof.
of
- l)(n
= n(n
P(n,r)
this
to r
reference
explicit
are to be arranged;thus
objectswe
mean
the
case r
permutations
of
n\\
-^
\342\226\241
- n\\.
made, we
we
talk
that
all the objects
the permutations of n
assume
about
= n.
+ 1).
that
- r)\\'
is not
when
4! =
(n
becomes
formula
P(nfn)
When
- r
\342\200\242
n\\
(n
= rc,
it follows
factorials,
P(n,r)
When r
2)
n\\ permutations
3!
= 6
{a,6,c,d}.
permutations
The number
of n
distinct objects.
of {a,b>c}.
There are
of 2-permutations of
Fill
Fill
Fill
Fill
first
second
third
rth
position
position
position
position
Event 3
Event
Event
Event
Figure
2-2
Section
2.3
5!/(5- 2)!
= 20.
The number of
a,b,c,ci, and e at mostonceis P(5,5)= 120.
\302\273
5
the letters
using
149
and Permutations
of Combinations
Enumeration
. 4
5-letter
Example
no repeated
contain
arranged
ways
many
must always
the 3
of arranging
other, we treat
to each
X. Then
how
3 men
if the
a row
in
next
In
2.3.3.
Example
7 women
and 3 men be
other?
men. Since the 3 men always
stand
to each
next
stand
them as a singleentity,
which
the women,
,W7 represents
W1,Wr2,...
can
we denote
by
the
in
Example 2.3.4. In
alphabet be
letters
a
ways
many
there
6?
and
20! ways
then
the
with
2.3.5.
Example
digits
that
There
unit
how
so
arranged
are there
appear consecutively
in
either
repetition
1 and
2 do
of
not
order?
Number
Class
(i)
1 nor
Neither
as a digit
(ii)
1, but
2, but
(iv)
Both
Class
7!
2 appears
not 2, appears
6P(7,5)
as a digit
(iii)
of Permutations
in the
6P(7,5)
not 1, appears
2 appear
(2)(7)(4)P(6.3)+
1 and
(4)(7)(6)(3)P(5,2)
Total
7! +
(2)(6)P(7.5)
P (5,2)
150
Chapter 2: Elementary
Combinatorics
us explain
Let
in
count the elements
how to
class
1. The
position 2 in 4
Hence,thereare
for
ways; then
thereare
P(6,3)
3. The integer 1
in this
immediately to
digits
digit
2). Likewise,
category.
different from the
2 cannot appear
a position
in
appears
ten thousands
in 7
3
in this category.
tens digit is not
the
hence
numbers
(7)4
the
other
the
fill
numbers
P(6,3)
(7)4
(iv).
hundred
Hence,
digit.
the
left
in
placed
in 7 ways,
or to
tens
the
from
in any
of the remaining
ways. The integer2 can be placed
in
a 2-permutation
3
and
other2
are
thenthe
digits
ways
positions
of the remaining 5 integers. Hence,thereare (4) (7) (6) (3) P(5,2)
numbers in this category.
in 6
are
there
Thus,
+ (4)(7)(6)(3)P(5,2)
(2)(7)(4)P(6,3)
rule,
there are
P(7,6) + (2)(6)P(7,5)+
(56)P(6,3)
four classes.
the
in all
elements
sum
the
(Look for
(504)P(5,2)
The permutations we
linear permutations
insteadof
objects
have
for
in a
arranging
Example
themselves
line, we arrange
them in a circle,then
the
2.3.6. In how
5 children
can
ways
many
arrange
a ring?
in
Hence,
the
the 4
counting
decreases.
of permutations
number
are
considering
are
objects
being
been
the
indirect
shorter
solution.)
position
of child
Cx is
to particular
the
are in
that
Theorem2.3.2.
objects
in
a circle.
There
are
arrangements
(n
counts.
of
Therefore,
the
remaining
keeping Cx
children.
1)! permutations^ of n
distinct
Section
2.3
and Permutations
of Combinations
Enumeration
151
Figure 2-3
As we did beforediscussing
\"permutation\" for \"linear
S is
a set
is the
with
unless
elements,
the word
would result.
we will use
permutations,
ambiguity
of r-combinations of n
number
for each element.Thus,
repetition
is the number of subsets of S with
C(n,r)
the
denote
is the
Or in the
r elements.
exactly
circular
permutation\"
number
of r -combinations
number
read
made.
C(n,r)
\"n
the
obtain a formula
Theorem
as
for
r\" to
choose
terms
C(nyr)
by dividing
by r!
2.3.3. (Enumeratingr-combinations
without
repetitions).
C (n,r)
Example
a deck
from
n\\
P(n,r)
r!
2.3.7.
In how many
of 52 cards?
r\\(n
r)\\
152
Chapter
Combinatorics
2: Elementary
of52cards.Thus
is essentiallya 5-combination
Each hand
52
52!
C(52,5)
. 49
\342\200\242
51 . 50
. 48
5.4.3.2.1
5! 47!
52
such hands.
\342\200\242
51 \342\200\242
49 \342\200\242
2 =
10 \342\200\242
2.3.8. (a)
Example
2,598,960
How
5-card
many
hearts?
to
hearts
13
Since there
of 13objects.
5-combination
choose
are
C(13,5)
5-card
(c)
How
from, each
a total of
only of
such hand is a
. 9
10
5.4.3.2.1
L(lSfb)=w&r
- 13
consist
hands
rm.
(b) How
For each
is
there
Thus,
are
there
\342\200\242
11 \342\200\242
9 =
1,287.
Answer. C(13,2)
C(13,3).
(d)
How
many
hands
5-card
of a
3 cards
and
different suit?
Fora
Thus,
ways.
3 tens
suits there
C(4,2)
are 2C(13,2)C(13,3)ways
other.
the
are 2C(13,2)
there
two of
that
Recall
of 2
choice
fixed
from one
a kind
are calledthreeofa
there
Thus
choose
kind.
to
We can
2 queens,
are 13 \"kinds\"
etc. Similarly,
a deck of 52
in
cards.
(e)
How
many
Answer.
(f)
How
C(4,2)
many
hands
5-card
contain
C(4,3).
5-card hands
contain exactly
of
one
kind and
3 of
another kind?
Choosethe
choose the
first
kind
choose 2
13 ways,
and
choose
of the
3 of
first
kind
Hence
there
are (13) C(4,2) (12) C(4,3) 5-cardhands
kind and 3 of another kind.
ways.
C(4,2)
ways,
2 of
one
Section
Example
chosen
from
(a) In
2.3.9.
and
of Combinations
Enumeration
2.3
how
of 5
a committee
can
ways
many
153
Permutations
be
9 people?
Answer.
C(9,5) ways.
(b) Howmany
C(9,5) +
Answer.
of 5
committees
or more
C(9,6) + C(9,7)+
can be chosenfrom
9 people?
+ C(9,9).
C(9,8)
can a committee
of 5 teachersand 4 students
be
(c) In how many
ways
from 9 teachers and 15students?
The
teachers
can be selected in C(9,5) ways while the studentscan be
in C(9,5)
in C(15,4) ways so that the committeecan be formed
chosen
C(15,4) ways.
in (c) be formed if teacher
A
can the committee
(d) In how many
ways
refuses to serve if student B is on the committee?
We
this
the
answer
by counting indirectly. First we count
question
number
of committees where both A and B are on the committee. Thus,
there are only 8 teachers
from which 4 teachers are to be
remainirg
there
chosen.Likewise,
are only 14 students
remaining from which 3
more students
are to be chosen.Thereare C(8,4)
committees
C(14,3)
containing both A and B, and hence there are
chosen
C(9,5) C(15,4)committees
do not
that
have both A
C(14,3)
C(8,4)
and
B on
and 5 different
consonants,
How many
(a)
Answer. C(5,3)C(21,5)8!
(Choose
consonants,
and
(b)
then
arrange
many
How
many
(d)
How
many
words contain
the letters
contain
the letters
How
many
contain
How
many
begin
such
contain
while
there
the
with
begin with
Example 2.3.11.
class
are
5 vowels
3 different
in the
vowels
the
vowels,
choose
the
How
and
with
the 8 letters.)
(c)
(e)
(f)
the committee.
There
are
25 females
154
Chapter
Combinatorics
2: Elementary
committeeof 10be
femalesand 3 juniorson
there
that
so
chosen
and
of
Number
Male
Female
Male
Female
3
2
1
0
0
1
the
junior-
Seniors
Juniors
Thus,
are exactly
committee?
us draw a
constitution
Let
senior
the
2
3
4
5
number of ways
total
column:
is the
Ways
of Selecting
C(30,0) C(35,3)
C(30,1)
C(25,5) C(20,2)
C(35,1) C(25,3)
C(30,2)
C(30,3)C(35,0)C(25,2)
sum
C(20,3)
C(25,4)
C(35,2)
of
the
terms
C(20,4)
C(20,5)
in the
last
+
C(30,0)C(35,3)C(25,5)C(20,2)+ C(30,l)C(35,2)
C(20,3)
+
C(30,2)
C(35,l) C(25,3) C(20,4)
C(30,3)C(35,0)C(25,2)C(20,5).
C(25,4)
ExercisesforSection
2.3
1.
2. How many
no
if
how
(a)
In
(b)
In how
are
are
ways
15people
3.
and
P(8,5)
Compute
person
C(6,3).
there to distribute
is to receive more
each
together?
(c) In how many ways can they sit in a row if the girls are to sit
together and the boys do not sit together?
4. Solve Exercise 3 in the caseof m boys and g girls (leave your
5.
(a)
Find
number
the
seated
in
row
of ways in
if the
seats.
(b)
Find the
if boy
A and
sit in adjacentseats.
Find
if boy A
the number
of ways to seat themalternately
(c)
B
in
seats.
must
not
sit
girl
adjacent
6. Find the number of ways in which 5 children canridea toboggan
1 of the 3 oldest childrenmust
drive?
girl B are to
and
if
Section
2.3
155
Permutations
(c) 0,1,2,
3 are
and
9.
1 are
0 and
(b)
is composed of 5
8 scientists
of
group
adjacent.
psychologistsand 3
sociologists.
(a)
10.
how
many
In how
(b)
consists
hand
bridge
of 13
that
has
deck
of
an
ordinary
52 cards.
bridge hands
can a -person
are there?
hearts?
11. How
many 4-digit
digits?
12. In how
(b) In
ways can 10
10 chairs?
many
(a) In a
telephone numbershave
people arrange
one
or more
repeated
themselves
of
row
a row of 7 chairs?
(c) In a circleof10
chairs?
A collection
13.
In
(a)
(b)
(c)
14.
how
many
10
(a)
How
(b)
How
15?
many
exactly
15
with
who has 9
from
a man
buys 3 cows, 8 pigs, and 12chickens
does the farmer
choices
How
cows, 25 pigs,and 100chickens.
many
have?
that
the
16. Supposethereare 15 red balls and 5 white balls. Assume
balls
are distinguishable
and that^
sample of 5 balls is to be
15.
'
farmer
selected.
(a)
How
many
samples
of 5
156
Chapter
2: Elementary
Combinatorics
(c)
17.
How
samples
many
(a) exactly3
(b)
18.
books,17
French
(a) Howmany
(b)
(c)
How
books including
50 distinguishable
and
15
books,
Spanish books.
2
can
books
be selected?
ways
can
3
books
be
selected that there
ways
are
there
Suppose
correct?
are
answers
3 answersare correct?
at least
many
18 English
so
is 1
book
is missing?
language
ways
can
a team
of 5 be chosenfrom
10
players
so as
(b) include
20.
(c) beginwith
(d)
5-letter
a?
with 6?
begin
6?
in
English books, 6
books
can be
the same language are
5 different
which
of
Russia^
together.
22.
How
many
words
9-letter
can be
vowels,
(a)
repetition
Allowing
A committee
ways
many
of letters?
repetition?
are there
3 women,and 3 men?
of people but equal numbersof women
6 people and at least 3 are women?
6 people
including Mr. A?
(a) 6 people,
(b)
(c)
(d)
any
number
and
men?
157
and Permutations
of Combinations
Enumeration
be on
both
cannot
the
committee?
3 of each
6 people,
the committee?
(f)
friends of whom
15 close
has
man
(a) In
how many
ways
women.
6 are
3 or
he invite
can
party?
(b) In how
more of
his
to a
friends
can he invite 3 or
ways
same number of men
many
the
wants
be on
both
cannot
if he
as
women?
certain collegehas
and
3 statisticiansfrom
psychologists,
5-member
committees
(a) How many
this
(b)
of a
dean
The
to form
can the
dean appoint
formed that
have
at
the
and
C,
How
1 of
most
How many
number of
so that
the
5-member committees can be formed
chemists is greaterthan or equal to the number of
(a
4 aces?
(b
4 of a kind?
(c
exactly
(d
a full
(i
(J
the
a pair
another
kind)?
(Here
the ace
values)?
card.)
1 pair?
of the samekind?
no cards
one
suit)?
(a set of 5 cards in
flush (a set of 5 consecutive
straight
a flush
cards
(m)
an
(n
(p:
2 of
and
exactly
a royal flush
(o
lowest
or
highest
(t
(1
is greater
a spade
(a straight
flush
with
ace-high
flush?
ace-high
full
than
2 pairs?
at
committes
of psychologists
psychologistsand the number
of statisticians?
or equal to the number
How many 5-card poker hands have
(g
(h:
have
Professor P,
can be
psychologist,
5-member
many
that
committee?
the
(f
from
pool?
Professor
(e
10 chemists, 7
a committee.
of
pool
which
house
spade
with
flush?
3 aces
and another
3 of a kind (without
another
pair)?
3 aces (and no other aceor pair)?
pair?
in
one
card)?
suit)?
can be
Chapter
Combinatorics
2: Elementary
(a)
exactly
(b)
one
pair,
(c) at least
(d)
least
at
(no 3
pair
or 2
hand have
of a kind or 2 pairs)?
a 6-card
can
ways
one
pairs, or 3 of a kind, or 4
1 cardof eachsuit?
1 of each of the 4
a kind?
of
cards:
honor
queen, and
ace, king,
jack?
of
number
of an ordinary
29. Compute
of 365
no
of the
clubs?
the
each of
from
chosen
be
the 12months
days?
English alphabet if
of
of the
letters
the
combinationmore
appear in a
is to
letter
2 times.
than
30.
one club
at least
and
are all
diamonds
as clubs?
diamonds
diamond
booksbe distributed
ways can 30 distinguishable
C
so
and
that
among
receive exactly twice as many
books
as C?
(a) A
at
least
twice
as many
(b) C receives at least 2 books,B receives
at least 3 times as many
books as C, and A receives
books
as
In how many
3 people
A,J3,
B together
and
B?
a 52-card
deck are
there that
have
all hearts?
(a)
4 cards in two
(i)
the
suit?
5 in
suits,
a third
in
fourth
the
suit?
5 cardsin onesuit,
(j)
4 in
another,
3 in a
third, and 1 in
jack,
queen,
a fourth
suit?
(k)
10,
(m)
(n)
another
Determine
(a)
There
whether
are
C(4,2)
or not
5-card
are C(52,5)- C(36,5)
eachof the honor cards (ace, king,
(b) There
ace)?
suit?
(o) exactly3suits?
32.
king, or
kings?
hands
with
are correct.
least
2 aces.
at least
one of
Section2.3
C(39,5)5-cardhands
suits.
Thus,
the
choose
deck,
cards
suits.
(40)
(44)
that contain
cards
because
matching
all
remove
ways,
kings from
hands
5-card
no other
and
in
C(4,2)
card
another
all
remove
only spades,
3 suits, there are
one card in
kind, choose
ways,
of
C(4,3)
159
contain
that
choice
contain
that
are
there
and Permutations
of Combinations
Enumeration
cards
from
(e)
in a 20-gameseasonsincewe
can
the games
choose
for wins in
(lose or tie) in
C(20,7) ways and then thereare 2 possibilities
are
313 team
the other 13 games.Therefore,
there
C(20,7)
records with at least 7 wins.
33. A man has 5 female and 7 male friends and his wife has 7 female
and 5 male friends.In how many
ways can they invite 6 malesand 6
and wife are to invite 6 friends each?
femalesif husband
34. Ajar contains 10 counters numbered 1,2,.. .,10. Someoneremoves
3 of the countersfrom
the
jar.
exactly
9?
(b)
at least
9?
How many
ways
will
sum
the
of the
20 distinguishable
balls of which 6 are red, 6 are
blue. We draw out 5 balls with at least one red ball,
replace them, and then draw 5 balls with at most one white one.
How
ways can this be done?
many
35. A
contains
bag
36. How
many
.,30 so
1,2,..
37.
How
the
integers
20 days?
answer 12 of 15 questionson
does the studenthave
is to
student
many choices
(a)
can a
ways
many
for
day
38.
8 are
and
white,
an
examination.
How
in all?
two
or
questions?
the
second
question
both?
(d)
if
(e)
if he
he
must
answer
3 of the first
least 3 of the first
exactly
must answer at
5 questions?
5 questions?
but not
160
Chapter 2: Elementary
Combinatorics
many
people can sit on each sideofa boat.How
ways can one
select a crewfor the boat if out of 30 candidates 10preferthe port
no preference?
side, 12 prefer the starboard side, and 8 have
39.
Four
40.
A coin
is tossed 12times.How
outcomes
many
are possible
(a) in all?
(b)
with
exactly
(c)
with
at
(d)
with
a head
(e)
with
the
3 heads?
3 heads?
on the fifth
same
number
most
seventh
and
of heads
toss?
as tails?
P(15,10).
3.
(a)
11!.
(b) 2!6!5!.
(c) 5-6!5!.
6. 3
7.
\342\200\242
4!.
(a)
19!.
(b) 10!9!.
9. (a) C(8,5).
(b)
10.
C(3,2).
C(5,3)
(a) C(52,13)
(b) C(13,6)C(13,5)C(26,2).
11.104-P(10,4).
13.
(a)
C (100,10)
(b)
C (92,6)
C (8,4)
(c) C(92,6)
C(8,4)
14. (a)
C(8,5).
C(92,5)
215.
(b) C(15,6).
15. C(9,3)
C(25,8)
C(100,12).
16.
(a)
C(20,5).
(b)
C(15,5).
(c) C(15,3)
C(5,2).
18.
(b)
415
(a)
C(50,2).
(b)
18
(315 +
314C(15,1)+ 313C(15,2)).
\342\200\242
17 \342\200\242
15.
<\302\253>
G'Kf)
(}8)(\.")
(i')G5)
Recall
+ G8)(i5)
C(\302\273,r)
(\.
\342\231\246
(i8)(!5)
\342\231\246
GfKi7)
Section 2.3
161
and Permutations
of Combinations
Enumeration
C(8,4).
(c)
C(8,5).
21. 4!5!6!3!7!.
\302\253.w
\302\273)
fflffl
25. (a)
*\342\200\242-.-(!\342\200\242)-(?).(5B)
0\302\251
\342\231\246
...
00-
C(20,5).
-
a7)(?)+(Dd)+a7)\302\251
\302\253=)
(i\302\260)
<* (f)
(a)
\342\231\246
fflffl
0\302\251
\302\253\302\273>
26.
(jB)
(J)
a8)
a8) - (D
(i0)
a7)-
- a8)-
\342\231\246
(no\342\231\246e0)\302\251+g\302\260)G)\302\256+a0)\302\251\302\251-
\342\200\242
48.
*>(!3)\302\251-^
<c)63)0\302\251-\302\253.
(l )(2/(3
other3
(h) (g3)(4)5
(i)
(j)
(ch\302\260ose
)^^3
kinds,
choose
the
the
choose
kind,
the pair,
choose the
3 cards),
= 52 \342\200\242
44 \342\200\242
48 \342\200\242
40 \342\200\242
36/5!
) (choose
fijfc
card in 10 ways).
the top
the
suit).
\302\251(10).
<\302\253(?)-4.
(J3)
\302\253(f)
(3/(1)
the
pair
(2)
(ck\302\260ose
12 ways
the
3 aces
L) ways,
choose the
kind
for
162
Chapter
Combinatorics
2: Elementary
(o) (j j
(p) L) (2 )
erer
There
3 of that
a kind,
\342\200\242
4
(choose
kind, choose2other
5th cards),
4th and
3 aces,
(choose
(4)
(4)
5th
and
29.
the
pick
kinds,
2/4
y^J
cards).
(?)\342\200\242
are C(26,6)
combinations
C(25,4) combinationswith
6 letters
all
with
distinct; C(26,l)
and 4 other letters,etc.
+ C(26,3).
C(24,2)
of letters
1 pair
Total:C(26,6)
+ C(26,l)
C(25,4)
C(26,2)
of Books
Number
24
2
2
2
3
23
22
21
21
C(28,4)
+ C(30,2)
C(28,5)
C(30,2)
C(30,2)
C(28,7)
ENUMERATING
Number
eHas
C(30,2)
2.4
of Books
A Has
of Books
Number
CHas
C(28,6) +
C(27,6).
C(30,3)
COMBINATIONS
REPETITIONS
Now let
combinations with
us turn our
unlimited
r-permutations
denote the
of
number
repetitions.
That
r-combinations
and
attention to countingpermutations
of
is, if aua2,
...
,an
2.4.1
{oo
al9
oo
a2,...,
designating)
r-permutations
titions).
U(n,r)
so
(without
(Enumerating
n objects,
the
are
of
r-permutations
and
repetitions.
with
objects
nr
with
the number of
and let V(n,r)
unlimited
with
we are
counting
\342\200\242
<\302\273
aj.
in examples
unlimited
repe-
Section
2.4
Combinations
Enumerating
and
Proof.
filled
in n
= nr.
U(n,r)
rule,
product
be
163
with Repetitions
Permutations
so by
ways and
the
she can
many
2.4.2.
Example
be predicted. How
Answer. Choose28
remaining22games
with
forecasts
Example 2.4.3.
dot and a dash.What
lettersof
the
different
Since
there
tie)
exactly 28
can
transmit
two different
signals: a
of these
alphabet
are
two choices
of length
sequences
or,
predictions.
telegraph
length
English
Answer.
forecasts.
28 correct
exactly
lose
can contain
C (50,28)
results
correct
2 wrong
has
games (win,
forecasts
different
many
correct results?
of
or
if he
blank?
325.
Answer:
are to
true
or false questions
on an
can
a
student
do
the
examination
ways
different
less is 2 + 22 + 23 + - - \342\200\242
+ 2n = 2n+1 - 2.If n - 4
this
total
is 30, which is enough to encode
the
letters
of the English
the digits
the
To encode
alphabet, but not enough to alsoencode
digits.
we need to allow sequences
of length
up to 5 for then there are possibly
25+1 - 2 = 62 total sequences.
in Morse code all letters are
is why
(This
transmittedby sequences
of four or fewer characters while all digits are
of length
sequences
transmitted
by
n or
sequences
of length
5.)
correspondence
with
Example
exactly
six
sequences
2.4.4.
l's?
Answer.
we
The key to this problemis that
number by choosingthe subsetof 6 positionswhere
can
specify
the
l's
a binary
go (or
the
164
Chapter
2: Elementary
Combinatorics
subset of
4 positionsfor
such
the
O's).
binary
the formula
recall that
We might
P (n,r) by
for
formula
to
difficult
permutation result
C(10,6) = C(10,4)-
210
(when
V(n9r)
of
by dividing
repetitions gave rise to r!
unlimited
repetitions is
cannot
U(n,r)
repetition,
combinations
was obtained
C(n,r)
without
obtain\342\200\224we
unlimited
for
different
since
appropriate
factor
for
r-combination
each
r! since
permutations.The
allowed) is more
with
n\\
permutations.
by
For
an
not in
will
repetition
the
divide
simply
example,
general
the 3-
3-
to 3 different
permutations while the
rise
to
6
gives
permutations.
is an understandable explanation of
what
we believe
with unlimited repetitions, we
combinations
enumerating
abc
combination
To
there are
Thus,
numbers.
the
give
for
formula
different ways.
,an so that selections are made
al9a2,
\342\200\242
.
oo
oo .
will be of the form
r-combination
from
{oo
an}.
ax,
a2, ...,
Any
\342\200\242
\342\200\242 \342\200\242
are
the
where
numbers,
...,
au x2
a2,...,
an]
xu
xn
{xi
xn
repetition
\342\200\242
\342\200\242
= r.
and xx + x2 + \342\200\242
each xt is nonnegative,
4- x\342\200\236
Conversely,
any
\342\200\242
\342\200\242
\342\200\242
xx 4- x2 4sequence of nonnegative integers xu x2,..., xn where
\342\200\242
4- xn - r corresponds to an r-combination{xx \342\200\242
xn \342\200\242
al9 x2
a2,...,
aj.
the
reformulate
will
in several
problem
...,
oo
xn =
\342\200\242
\342\200\242
\342\200\242
+
We
The number
the number
an\\ equals
r in nonnegative integers.
observation:
First
. a2,
...
next
the
believe
of
r-combinations
makes it easier to
formulation
problem.
Secondobservation.
The
solutions
xn = r
\342\200\242
\342\200\242
\342\200\242
+
+ x2+
ofXi
r indistinguishable
interpreting
number
box
contains
xx
{oo
x2
alyoo
4-
conceptualizethe
integral
of nonnegative
of
of solutions of
of placing
ways
see
this
by just
xk balls.
indistinguishable
observation:
balls
in
n numbered
Section
2.4
associate a
165
with Repetitions
Permutations
boxes
by reversing
the above
process
Perhaps
an
will
example
be instructive.
Suppose r = 7 and n = 10 in
of
7-combinations
we
axaxaxaAaAasas
... +
xl0
{<\302\273.ax,
the
associate
to the
7. Then
the
that
above,
.
<\302\273\342\200\242
a2, ...,<\302\273
solution
a10}.
(3,0,0,2,0,0,0,2,0,0) of xx
solution (3,0,0,2,0,0,0,2,0,0)
we
x2 +
the
associate
distribution
balls
4, and
box
in
associatedthe
\342\200\242 \342\200\242
\342\200\242
{3 \342\200\242
a3,1
a5,1
a6, 2
a9}.
7-combination
The number
observation.
Fourth
- 1 4- r,r). For
l's and r 0's is~C(n
just as in Example2.4.4,we have
be
n - 1 4- r positions and we need
choose which r positions will
only
\342\200\224
l's.
n
are
filled
the
1
a
and
then
0,
by
by
occupied
remaining
positions
We summarize:
Theorem 2.4.2.
with
r-combinations
(Enumerating
unlimited
repetitions).
= the
V(n,r)
of r-combinations of n
number
distinct objectswith
unlimited repetitions
= the
Xx
= the
C(n
(n
oo
an} is
Of
solutions to
boxes
Remark.
...,
integral
nonnegative
= r
. . . 4- x\342\200\236
number
numbered
= the
of
number
4- x2 4-
course,
the same
1 one's
and r zeros.
1)
.
of r-combinations of {\302\253>
the number
ax, oo . a2,
\342\200\242
of {r \342\200\242
as the numberofr-combinations
al9r
a2,
\342\200\242
\342\226\240
\342\226\240
\342\200\242
>r
an}.
The
following
examples
will clarify
166
Chapter
Combinatorics
2: Elementary
a3,
oo
of{oo
(a) The numberof 4-combinations
- 1 + 4,4) = C(8;4) = 70.
2.4.5.
Example
oo
a4,
oo
oo
alf
a2,
a5} is C(5
repetitions
x4
13
=
316,251.
of ways of placing10similarballsin
number
(d) The
is C(6
- 1 + 10,10)
-
of binary
number
(e) The
boxes
6 numbered
C(15,10)
5,5)- C(15,5)3,003.
3,003.
numbers with
l's
ten
five 0's
and
is C(10 +
Other
though
problems
2.4.2.
Theorem
2.4.6.
(a) How many
10
similar
coins?
tossing
Example
Answer. Thisis
the
Answer.
This is the same as
there
are
numbered boxes.Therefore
How
C(ll,10)
ways
many
can
10
placing
C(15,10)
boxes
two
10 similar
tossing
into 6
balls
similar
- 3,003
possibilities.
books be placedon
20 similar
by
= 11.
from
different outcomesare possible
(c)
balls into
10 similar
- 1 + 10,10)
=
by
are possible
outcomes
different
as placing
same
\"heads\"
labeled
couched in different
different
shelves?
Answer.
(d)
Out
how many
C(5
- 1 + 20,20)-
C(24,20).
of pennies, nickels,dimes,and
10
coins
can
beselected?
ways
of a
large supply
C(4 - 1 + 10,10)=
10
similar
balls in 4 numbered
placing
Answer.
and
\"nickels,\"\"dimes,\"
chosenfrom
Answer.
First,
that
since
boxes
is equivalent
this
labeled
in
to
\"pennies,\"
\"quarters.\"
varieties
8 different
immaterialso
C(13,10)
quarters,
we
order
observe
does
box
with
a dozen
doughnuts
of doughnuts?
that
relative
not count.
positions
Therefore, this
Section
2.4
Secondly, a
problem.
and
Combinations
Enumerating
with
Permutations
Now let
us considera slight
unlimited
of
variety
repetitions.
above examples.
of the
variation
one
of
dozen
167
Repetitions
of placing
ways
is nonempty.
of
box
20
boxes.
balls
remaining
into
5 boxes
unlimited
with
By Theorem
repetitions.
(b)
>
with
to
solutions
4- x2 4-
x3
+ x4
4- x5 =
the numberofintegral
>
there to xx
whereby
enumerate
yt
solutions are
2?
we can
Here
problem
boxes
integral
many
20 where eachxt
know
We
0.
of yx
solutions
that there
are
4- y2
10,10)
where
each
C(14,10)
such
= 10
y4 4- y5
4- y3 4-
C(5 - 1
solutions.
(c) How
20 wherexx
many
> 3,
x2 >
2, xz >
First, distribute3ballsin
in
box
4, and
boxes with
number
0. There
0 balls in
unlimited
of
integral
are C(5
(d) Howmany
20 where
are there
solutions
integral
4, x4
>
Th&t
repetition.
of
integral
>
xx > - 3, x2
yx
4- y2 4-
= C(9,5)
5,5)
solutions
0, xz
4- x2 4-
xz
4- x4
4- x5 =
balls in box
solutions
- 1 4-
6, and
1, 2
box
to xx
x5 > 0?
5 balls
such solutions.
are there
> 4, x4 > 2, xb
>
to
2?
xx
^^
4-
xz
4- x4
4- xh
168
Chapter 2: Elementary
Combinatorics
we interpret
Here
the
placing -3 balls in box1 as actually
increasing
20 to 23. Then placing 4 in box 3, and
total number of balls from
2 in each
=
15 balls. Thus, we have C(5 of boxes 4 and 5, leaves
4- 15,15)
only
15 where each y( > 0.
C(19,15) solutions of yr+ y2 + y3 + ^4 + Vs
These ideas can be incorporatedto prove
the
theorem.
following
xn
Theorem
2.4.3.
= r where each xt
= the
=
-
C(r
suppose
ru
r2,..., rn
... 4- xn
of
ways
numberedboxeswhere
at least r2 balls in the
nth box
-l
Finally
consider the
Example
2.4.8.
solutionsto the
there
integers.
- r
where
- rx
rn,
rn,n
Enumerate
xx
...
the number
Then
X\\
rx
in the
balls
and at least rn
- rt 1).
r2
of
and
balls into n
first box,
r similar
least
r2,...,
...
in the
balls
- rj
example.
following
inequality
distributing
are at
second box,...,
- r2
+ r-r!-r2-...+
are
4- x2 4-
= the number of
C(n
- 1).
- 1, n
- C(n -
4-
boxes
integral solutionsofxx
...
number
numbered
- 1
C(n
Likewise,
x2 4-
of xx 4-
>
4- x2
4- x3 4- x4 4- x5 <
integral
19.
solutions.
From
this
the number
But
are
counting
or 19
of these
is also
between
an alternate
0 and
Section
2.4
are C(6 -
2.4.2, there
Theorem
and
Combinations
Enumerating
solutions.Hence
we have
what
from
C(24?5)
Exercises
19,5)
1.
C(24,5)
19
+ *,k)
C(4
\302\243
'k-0
= EC(fe
+ 4,4).
*-0
2.4
Section
for
169
Repetitions
- C(24,19) such
we
concludethat
already seen,
19
with
Permutations
quarterback
Thecoachis
runs
called.
are there?
distributions
2. In how
5 similar
can
ways
many
books be placedon
different
shelves?
3. How many
dice?
are
dominos
(b) doubleblank
n indistinguishable
six?
nine?
double
to
in a
there
to double
blank
double
rolling
5. In
(a)
indistinguishable?
(b)
distinguishable?
6. How many
xb
= 50
7. Find the
of
number
integerssatisfying
8.
How
many
(a) equal to
(b) less
each
yt
> 0.
Find
X3
distinct
between
triples
4- *3 < 15.
x2
4-
xz
+ x4
of nonnegative
of
a sum
7?
y$
- 2 where
= 22
x3 4- x4
4- y4
4- x2 4-
5.
> 4.
of
number
10.
4- X4 4 X5
the
xx
1,000 inclusivehave
1 and
-2, andx3
11.
equation
all C(5,3)
where each xt
10. Find
Then
to the
7?
than
Find
there
of
integers?
xx + x2
integers
digits
9.
are
solutions
in nonnegative
kinds
nonnegative
y2 4- y3
+
x2 +
- 3 where eachyt
x3 = 8 wherexx > 3,
integral solutions to
xx
>
0.
x2 >
x2 +
170
Chapter 2: Elemenfary
12.
Combinatorics
Find the
where xx
of
number
integerssatisfying
14. How
the
(a) equal to
4- x3
(xux2,x^) of
triples
xx 4- x2 4- x3 < 6.
distinct
inequality
1 and
between
integers
many
digits
4- x2
4-
xA
50,
nonnegative
1,000 inclusivehave
a sum
of
10?
(b) lessthan
10?
is it true that
= r has no integral
xx 4- x2 4- x3
<
<
4
5
and
x2,
xlf
x3?
16. Forwhat values of r is it true that xx 4- x2 4- x3 4- x4 = r has no
with
7 < xu 8 < jc2, 9 < x3,10 < x4?
integralsolutions
17. A bag of coins contains 10 nickels, 8 dimes, and 7 quarters.
that
the coins of any one denominationare
Assuming
15.
values of r
For what
solutions
2 <
where
from
ways can 6 coinsbe selected
are
makea
thereto
selection
o
f
coins
many ways
worth of identical pennies, $1.00worth
of identical
$1.00 worth of identical dimesif a total of
(a) 10 coins are selected?
how
indistinguishable,in
many
18. How
(b)
bag?
from
nickels,
$1.00
and
are selected?
coins
20
the
19.
How
ways
many
adjacent
are there
to arrange a
deck of 52 cardswith
no
hearts?
balls
into
6 different
students?
4 different
doughnuts to
many
can
ways
the
distributedto students
of doughnut?
each
kinds of doughnuts be
different
student receives at least 2of
if each
the
kind
22.
(a)
%i
(b)
x^l;
(c)
(d)
23.
xx
xt
>
>
solutionsare thereofxx
4- *2 4~ \302\2433
4\" X4 4~ X5 =
0;
2, x2
> L
> 3, x3 >
4, x4
>
2, x5
> 0;
a communication
Six distinct symbols are transmittedthrough
A total of 12 blanks are to be inserted
between
channel.
of symbols.
with at least 2 blanks between every
pair
symbols
how many ways can the symbols
blanks
be arranged?
and
the
In
Section 2.4
24.
wishes to give
A teacher
is to be worth
25. In how
more
2 or
171
Repetitions
a total
points?
wear 5
a lady
can
ways
many
with
examination
an
test be given
can the
ways
many
and Permutations
Combinations
Enumerating
rings on 4
her
of
fingers
hand?
m < n. In how many
where
26. Let m and n be positive
ways
integers
where
order is
can n be written as a sum of m positive
integers
= 14-2 + 1 =
4 = 1 + 1+2
taken into account? (Note that
in
2 + 1 + 1sothat 4 can be written as a sumof 3 positive
integers
3 ways.)
27. In how
pomegranate,
distributed
3 people?
How many
(a)
12 similar
partition
among
is the
(b) What
coins into 5
batches?
nonempty
28.
we
can
ways
many
numbered
to
answer
if each
(a)
1 plum,
be
person receives
exactly 4
fruits?
29.
4 red
blue
balls
30. How
(a)
distribute
can we
ways
many
boxes?
9 numbered
into
9 numbered boxeswhere
white ball?
(b) into
31.
How
1 and
between
integers
many
How
among
1. C(60+ 20 -
3. C(n + 6 (a)
C(8,2).
(b)
C(ll,2).
5. (a)
1,60)
(60
into
balls
20 numbered
boxes).
l,n).
C(10 -
5,5).
105.
(b)
9. For
yt
of
sum
2.4
for Section
Answers
4.
the
one
2 fruits?
exactly
Selected
at least
can 5
ways
many
distributed
be
contains
10,000,000 have
32.
box
each
a solution (yu
Xi = y( +
or
10. For
xx
5. Then
yx + y2
solution
4, then
y2i y3,
x2 +
xx
y4) where yl + y2 + y3 + y4 =
+ x2 + x3 + x4 = 22.
y3
x3 = 8.
3, let yl
xx
3, y2 = x2
2, let xt
+ 2, y3
5 =
x3
172
Chapter
Combinatorics
2: Elementary
11. C(10
12.
C(50
13.
Count
14.
of
number
the
2,3,4, 5
and
Let xx =
units digit, x2
(a)
*2 + *3
(b) Count
1,4
sum.
= tens
number
the
Count
- 1) - C(54,3).
solutions for xx + x2 + x3 = n where n = 0,1,
-
- 0,1, 2, 3,4,5,6,7, 8,
19. Let nonheartsbe dividers
to determine
n where n
cells
which
in
nonhearts
to
x2 + x3
xY +
sum.
9 and
a heart.
13!39! ways,
place
C(40,13)
which the
cells of
xx
and
first
nonempty.
20.
the 2
Choose
be empty;
place
of 4 remaining
in each
1 ball
~~
~~
boxes.
Then
21.
boxes to
the
distribute
remainder,
(o) (
\302\253(20+^\342\226\240')(1!t,S ~l)?i+A
-1)-
i)r+d-
-w+i<\302\273(u+,i-
).
ig
-1)-
22.
(0 (g).
<\302\253
(!o)-
23.
Fill
boxes
2 or
with
ways.Thenarrange
24.
2.5
6 symbols
the
2,2)
(I)
Total6!
('\302\247\342\226\240
\302\251
PERMUTATIONS
ENUMERATING
WITH CONSTRAINED
REPETITIONS
There
are,
repetitions
of
and
course,
intermediate
selections
with
cases between
unlimited
repetition
selections
of
the
with
no
objects.
Section2.5
are some
permutations
selection
a particular
What
repetitions.
on this
with Constrained
Permutations
Enumerating
of r objects
formula
where there
of
number
the
for
of r objects.
selection
given
is a
desire
we
173
Repetitions
2.2.3 we listed
exampleis in order.Recallthat in Example
\342\200\242
\342\200\242
\342\200\242
all 3-combinationsof {3 \342\200\242
1
In
the following table we
d}.
b, 2
c,
a, 2
will
list
all permutations
of each of these 3-combinations:
Perhaps an
of
3-combinations
{3
\342\200\242
a, 2 \342\200\242
b, 2 \342\200\242
c, 1 -
The
number
aaa
3 (aab,
aab
aac
aad
bba
bbd
bbc
cca
ccb
ccd
abc
abd
acd
bed
14
(See Example
We
each
for a
2.2.7
that in
note
3-combination
of
3-permutations
d\\
aba, baa)
3
3
3
3
3
3
3
3
6
6
6
6
52
3 permutations
the above table there corresponded
and
where one object wasrepeatedtwice
another
to
was
6 permutations
there
were
once. While, on the other hand,
3
3-combination
where
distinct
to
each
were
objects
corresponding
selected. We ask: is therea ruleherethat holds in general? The answer is
example.
yes, and we begin to explain why by considering the following
repeated
How many
2.5.1
Example
letters
a, 6,
a, a,
and c?
This is
for
5-combination{3
permutations.
the
asking
\342\200\242
1
Now
consider
lettersa
were
a,
a particular
that
distinct,
number
\342\200\242
1
b,
of 5-permutations
x be the
c}.
\342\200\242Let
permutation,
is, if they
of the particular
number of such
If the
this
174
Chapter 2: Elementary
Combinatorics
give rise
would
permutation
to 3!different
namely;
permutations;
axa2bca3
a2axbca3
a2a3bcai
a3a2bcal
aiajbca2
a3aibca2
These
Likewise
to the
correspond
each
permutation
the
of
permutations
letters
there
But
\\alya2ia^b,c\\.
Example2.5.2
2
How
\342\200\242
of {3 \342\200\242
a, 4
6,
are there
10-permutations
many
are 5!
= 20.
\342\200\242
1 \342\200\242
d}?
c,
permutations
Hence,
{aua29a39bub2yb3yb4ycuc29d}.
(2!) (4!)
(3!)* - 10!orx -
12,600.
us give
(the aJs),
C(10,3)
(Note
the
C(l,l)
C(3,2)
C(7,4)
of certain
cancellation
nonnegative
...,
at
are
^^L
factorials.)
notation.
such that n
integers
moreover, that au
t distinct
Suppose
qx
4-
q2
objects.
that
qX9q29...,
qt
...
4\342\200\242\302\245
qt. Suppose,
Let P(n;quq2,
...
,qt)
Section
2.5
Permutations
Enumerating
the number
denote
Constrained
175
Repetitions
n-combination
of the
n-permutations
of
with
{ql
\342\200\242
au
q2
\342\200\242
\342\200\242
\342\200\242
- \342\200\242
y Qt
\302\2532,
aj.
Armed
following
2.5.1
Theorem
(Enumerating n-permutationswith
prove
the
constrained
repetitions).
P{n\\qu...,qt)
...qt\\
qx\\q2\\
C(n - qlfq2)
-qi'-q2...-
= Cin^i)
...C(m
were all
qx ax's
each old
permutation would
corresponding
to
the
row. If
qx
q2,q3)
Qt-uQt)
Proof.
If the
C(n
were
a2s
there
reasoning
number
the
q2
would
give
of ways
we know
However,
the theorem.
be
qx\\
since
permutations
{q^x
new
permutations
in a
of arranging the qx distinct
objects
by distinct objects, then by similar
If we repeat this
(qjjx
permutations.
all replaced
be
(q2\\)
to
rise
quantities
and
we will
distinct
have (qt\\)...
of n
permutations
solving
for x gives
(q2\\)
distinct
(qjjx
objects.
the qx positions
is obtained as follows. First choose
from the remainingn - qx positions, choose q2 positions
for the a2'sand so on. Note that at the last we will have left n \342\200\224
qx
=
\342\200\242
\342\200\242
so C(n
to fill with the qt a/s,
<?2 \342\200\242
qx
q2...
Qt-i
Qt positions
-Qt-uQt) = C(qt,qt).
The last equality
follows because both numbers
of
the
theorem
or we can obtain it by
of permutations,
representthe samenumber
second
The
for the
equality
a^s; then
cancelingfactorialsas in Exaipple2.5.2.
2.5.3.
Example
TALLAHASSEE
The number
is
of arrangementsof lettersin
P(ll; 3, 2, 2, 2,1,1)
this
since
equals
\342\200\242
1 \342\200\242
The
if,
T and
T).
end
with
\342\226\241
the
word
1L
3!2!2!2!1!1!
\342\200\242
\342\200\242
\342\200\242
the number of permutations of {3 \342\200\242
A, 2
L, 2
S,
E, 2
that
with
number
of arrangements of these
begin
E is 9!/3!l!2!2!l!.
letters
Chapter2: Elementary
176
Combinatorics
In how many
2.5.4.
Example
to 5
other3
will
5 books
have
will
be given
books
4 books
each and
the
each?
* Example 2.5.5.
number
of
ways of
number
\342\200\242
2 \342\200\242
2 \342\200\242
1 \342\200\242
4 \342\200\242
3 \342\200\242
3 \342\200\242
The
a,
b,
Selection
(1)
(2) 4
From
5-Combinations
Each Selection
12
alike and
(5)
3 alike,
20
4C(6,2)=
2 alike,
C(6,2)5
-5L.6
12-5-60
5!
20 . 10= 200
60-20= 1,200
3!1!1!20
5!
= 75
. 30
75
= 2,250
30
2!2!1!
alike and
6C(6,3) =
120
different
All
1 different
and
(7)
of
Number
5-Permutations
5!
60
others alike,
(6) 2
g}.
alike
others different
j
the following
4!1!
alike, 2
others
(4)
/,
as in
5!
1 different
(3) 3
e,
of Arrangements
Number of
5 alike
All
classified
be
to the
Number
of
Types
d,
c,
table. Theremay
rise
and the
of 5-combinations
number
the
of {5
5-permutations
different
give
Find
5!
2MMM!
C(7,5)= 21
5 different
120-60 = 7,200
60
5!
21
120
\342\200\242
120 =
2,520
1MMMM!
309
Total
13,431
{5 \342\200\242
a}].
(1) can
except
possibly
how we
arrived at
explain.
be made in only
1 way
[namely
by
the
selection
Section
Enumerating
2.5
Selection (2)
Permutations
with
Constrained
choose
the
Repetitions
4 alike
177
in 2 ways
\342\200\242
\342\200\242and
choose3 alike letters [either{3 \342\200\242
once
a}, {3 \342\200\242
6}, {3
d}, or {3
g}],
these have been chosenthereare6 different
letters
from which 2 must be
chosen.
Make selection(5) as follows. First, note that there are only 6 letters
numbers >2 (only /has repetitionnumber
with repetition
the
1). Choose
2
in
2 different letters that are eachto have
number
C(6,2)
repetition
ways. Now after choosingthese2 lettersthere are 5 letters that remain (/
This can
from which to choose the 1different
letter.
can now be included)
can
be made in C (6,2)5 = 75 ways.
be done in 5 ways.Thus,selection
(5)
in much the same way as was selection
5.
Selection
(6) is explained
in 6 ways.
There are 6
Choose the letter that is to be repeatedtwice
from
which
3 are to be chosen.Thus,selection
distinct lettersremaining
be made in 6C(6,3) - 120ways.
can
(6)
there
are 7
because
Selection
(7) can be made in C(7,5) = 21 ways
distinct letters
from
5 are
which
to be
chosen.
Ordered
problems.
very
of combinatorial
us, therefore,
interpret
essence
Let
mathematics
accomplished.
S denote
the set of 1,000rugs.By attaching
a tag bearing one of the
Let
numbers 1, 2, or 3 to eachof the rugs, the manufacturer has defined a
\342\231\246
function
is {1,2,3}. This function
/ whose domain is S and whose
range
three
of S:
defines the following
subsets
Al-{aeS\\f(a)-l],
A2
|a\302\243S|/(a)
A3^(aGS|/(a)
- 2}, and
= 3|.
178
Chapter
Combinatorics
2: Elementary
The sets
(a)
Ax
(b)
Ai
the
have
AlyA2,A3
A3 =
=
0 for
Aj
A2 U
properties:
following
form
an (unordered)
partition
of S. But,
a definite orderingon the sets themselves,
for the manufacturer may want to charge more for the higher
quality
form
a (3-part)
ordered
rugs. Thus, the ordered triple of sets(AUA2,A3)
the ordered
partition of S. Of course,
triple (A2,Al9A3) gives rise to a
want
different
ordered
of S (for example the manufacturer may
partition
to charge
more for rugs of quality grade 2), even
this
would
though
constitute the same unordered partition of S.
That
is to
\342\231\246more
than
2.5.1.
Definition
be
a positive
integer.
of S,
t subsets
can be
there
this,
Au
...,
Let S
be a set with
t-part
partition
At such
that
S = Ax
Ai Pi Aj
A2 U
= 0
and let t
elements,
set S is a set [Al9...,At) of
distinct
of the
\342\200\242
\342\200\242
\342\200\242
U
At
for
i * j.
following one.
An
there
ordered
is a
(AX,A2,
form a
...
partition of S.
Example 2.5.6.
of S = {a,6,c,d}
Ax
whereas
(A3yAlfA2)f(AuA3fA2)
same
3 subsets.
form
{a,6},
A2 =
{c},A3
{d} form
a 3-part
partition
(AlfA2fA3)y(A2fAlfAs)y(A2fA3fAl)y(A39A29Al)9
6 different
these
of S, for example,
Of course, there areother3-partpartitions
Bx = {a,c},
=
=
is nothing in our definition to exclude the
{d}. There
B2 {6},and B3
as one of the subsets, so Cx = {ayb,c)> C2 = {d}, and C3 = 0 is
set
empty
another 3-part partition of S.
in ordered
interested
We
are
partitions of certain types. For this
we usually
reason,
specify the numbers of elementsof the subsetsin the
ordered
Thus, by an ordered partition of S of type
partition.
(qi,q2,
... ,qt), we mean an ordered partition (Au..., At) of S where | A, | == q( for
Section
2.5
with Constrained
Permutations
Enumerating
A2
^M
<ii
<il-\\
<7i
elements
elements
each i.
We
might
Figure 2-4.
depict
all
List
<ii
n =
have
must
we
ordered
elements
2-4
a partition of S of type
Example 2.5.7.
'
elements
Figure
179
Repetitions
(<?!,
...,
qt) as
of S
partitions
qx
q2
\342\200\242
\342\200\242
\342\200\242
+
4-
illustrated in
= {a,b,c,d}of type
(1,1,2).
Of course,
many\"
rather
Theorem
of
number
|S|
({a},{&},{c,d})
({bUaUc,d})
({a},{c},{6,d})
({c},{a},{6,d})
({a},{d},{6,c})
({d}f{aUb,c})
({bUd{a,d})
({cUbUa,d})
({b},{d},{a,c})
({dUb},{a,c})
({cUdUa,b})
({d},{c},{a,6}).
we have
than
list
often we
of all.\"
2.5.2.
ordered
most
that
learned
\"a
partitions
= nis
n\\
P(n;ql9...yqt)
qx\\q2\\.
Proof.
subset
C(n - 91,92)ways,
(quQ2y
\342\200\242
. . ,Qt)
etc.
is
Cin.q^Cin
number
in Example
of ordered
Then
the
number
- ql9q2)
.qt\\'
to
elements
for
the
of ordered
\342\200\242
\342\200\242
\342\200\242
C(n
the first
occupy
subset in
second
partitions of type
-
qx
q2
. .
\342\226\241
the
could use Theorem2.5.2to compute
=
=
n
for
here
S
of
of
(1,1,2)
{a9b,c,d}
type
partitions
2.5.7 we
180
Chapter
Combinatorics
2: Elementary
4, <?!-
1,
q2
1, and
- 2. Thus,thereare
q2
- 12
4!/l!l!2!
such ordered
partitions.
South,
of 13
\"hand\"
many
the 52
can
ways
52I/13!4
(b) In how
in a
cards.
(a) Howmany
Answer.
(usually called
are
order
eachdealt a
specified
four players
bridge,
(Here order
will one
ways
counts.)
player be dealt all four
Choose
the player to receive the kings
the
partition
remaining cards. There are 4(48!/9!l3!3)
C(39,13) C(26,13) C(13,13) ways.
Answer.
deals
(c) In
many
other6hearts?
Answer. Choose
7 hearts
the
other
6 hearts
North
will
how
to South) in
be dealt 7
for North
C(13,7)ways;
In
how
many
ways
will
North
and
kings?
4 ways;
then
= 4C(48,9)
in
(and automatically
then
partition
players?
the
kings?
Number
for
of kings
North
South
2^
of hands
Number
48!
9!13!3
cu
48!
CK1)12!10M3!2
n ( a o\\v
CK2)
CU 1)
48!
111*13!'
48'
C(4,1)12!10!13!2
48!
9!13!3
the
remaining
have together
South
give
all
four
Section
Permutations
Enumerating
2.5
48!
48!
v '
2C(4,l)-^-,
9!13!3
complex
have
the same
Theorem 2.5.3.
follows
unordered
(Enumerating
deals
the
recall
Here
ways
many
team
first
has 3
the third
members,
teams each
cell
of
(a) In how
2.5.9.
Example
the number
to t\\
rise
disregarding
into 6 teamswhere
of equal
partitions
from
immediately
of thet subsetsgives
bridge
subsets
all
number of elements.
t. Then
size). Let S bea set with n elements where n = q \342\200\242
unordered partitions of S of type (q,q,... ,q) is 1/tl (n\\/(q\\Y).
that t equals the number of subsets.
This
much more
of unordered partitions is a
give a formula only in the casethat
will
We
matter.
11!213!2
number
the
Determining
48'
48'
+ C(4,2)
v ' '
'12!10!13!2
181
Repetitions
number of dealsis
The total
Answer.
Constrained
with
for
the
of ordered
number
fifth,
partitions
and
sixth
of type
are
P(14;3,2,3,2,2,2)
14!
3!2!3!2!2!2!
14!
3!22!4
such ways.
many ways cari 12 of the 14peoplebe distributed
has
first team has 3 members,the second
the
where
5, and
In
(b)
teams
how
into
the third
has 4 members?
to
of ways to choose the 12people
number of orderedpartitions of type
are C(14,12) (12!/3!5!4!)such ways.
Answer. First
count
be
into
placed
(3,5,4).
(c)
teams
There
In
how
of 4
C(14,12)
count
then
many ways
each?
Answer.
then
teams,
First,
count
the
number
count the
number
number
of unordered
such
(12!/4!33!)
ways.
the
into
182
Chapter2: Elementary
Combinatorics
In how
(d)
the first
fifth,
and
Answer. 14!/(3!22!4)
the
(Count
(e) In how
many
Answer.
ways
(f) In
how
many
with
teams
ways
2 teams
order
us be clearhow
2 each?
3 each
rise to 2!
partition
gives
and 4! arrangementsof the 4
this
can 14
have 3 eachand 4
problem
calls for
that
partitions.)
2 each.)
with
some
of ordered
fourth,
2!4! becauseeachunordered
in
third,
when
14!/(2!4!3!22!4)
(We divide by
teams
can 14
3 each
have
teams
two
number
6 teams
into
and the
is,
(3,3,2,2,2,2),
other
types
of
this kind
will
(g) In how
in
some
order
teams have
these
make
the concept
many
ways
2 teams
same
clear.
1 membereach?
Answer. (7!/2!3!2!)
(14!/3!22!3l!l!)
Some
Hints
we have
Section 2.5
Repetitions
183
r-combinations,
or
with Constrained
Permutations
Enumerating
r-permutations,
counting
partitions.
arrangement. Nevertheless,not
problems
these
use
counts (a permutation
that order
reference
to
order
the
all
some for
words;
words\342\200\224the
phrased
It
want
mentioned
or
assigned
is in
sets
of
are
objects
this context
where
the number
to n cells.
enumerate
to
objectscanbe
problem).
involved either
many
as distribution
objects and we
that suggest
make no
and
sometimes
arrangements
the context
rather than being
additional
clues. Frequently in combination
two
explicitly or implicitly.
phrases
others
while
for
fail-safe,
explicitly.
and permutationproblems
we
Thus,
use
may
problem)
in the definition
for permutation
is
or combination
word
key
word
permutation
example,
a combination
(probably
key
distributed
are
problems
we
have
of ways in which
these
r
For example,we may wish to count the number of ways of assigning
to n teams.
balls to n boxes, r cardsto n hands,or r players
in others
In some applications the objectsare indistinguishable;
they
are distinguishable; the cellsmay be distinguishable,
they are
(maybe
cells may be
or the
numbered or equivalently ordered in someway),
identical.
Type
Order
Counts
Set of r
of
Theorem
Repetition
Name
Allowed
Objects
Reference
Number
Yes
Distinguishable
None
r-permutation
P(n,r)
2.3.1
No
Indistinguishable
None
r-combination
C(n,r)
2.3.3
Yes
Distinguishable
Unlimited
r-permutation
with
2.4.1
nr
unlimited
repetition
No
Indistinguishable
Unlimited
r-combination
with
C(n +
r- 1,r)
2.4.2
unlimited
repetition
Yes
Constrained
Ordered
partition
No
Constrained
Unordered
partition
Figure 2-5
P{n\\qu-
-,Qt)
2.5.1
&
2.5.2
No general
formula
184
Chapter
Combinatorics
2: Elementary
that
is,
if elements
frequently
to be
are
elements
which
permutations or
of ways
number
The
of choosing/arranging
2-5.
in Figure
illustrated
for
counting
subsets of a set to
next whether
determine
of partitions
combinations,
assigned.
After determining
the
nevertheless,
problems;
or more
two
r objects from
is
objects
1.
Use
to calculate
2.5.2.
Theorem
(a) P(10;4,3,2,l)
2.
(b)
P(10;3,3,2,2)
(c)
P(16;4,7,0,3,2).
to celebrate
of the store
store
has 25 flags to hang along the front
a special occasion.If thereare 10 red flags, 5 white flags, 4 yellow
flags, and 6 blueflags, how many distinguishable
ways can the flags
be displayed?
3.
In how
(a)
many ways
(b) 2 teamsof 4
(c)
into
of 2 each?
4 teams
one
3 teams
each?
with
1 student,
one with
2 students,
and onewith
students?
4. From
the
from
antipollution
requirements.
ways
can
many
ways
can the
(b) In how
10 automobiles
exactly
5.
that
Suppose
Florida
many
ways
can 24
there
are
State
5 singlerooms,5 double
how
be made?
selections be made sothat
the selections
Section
2.5
Permutations
Enumerating
6. Suppose
has
elements.
,An) are there
distinct
...
185
Repetitions
1 element?
exactly
7. In how many
(b) if the
sized apples,
share 15 different
3 boys
can
ways
5?
takes
if each
(a)
Constrained
with
youngestboy
and the
7 apples
gets
other
two
get
boys
each?
8.
(a) If the
(b)
*(d)
different colors.
(c)
of 6
blocks
has
child
selects
child
these
of
numberscan be
of the
arrangements
formed
arranging
by
letters of
(a) Mississippi.
Tennessee.
(b)
11.
How
7
anagrams
many
of
\342\200\242
1 \342\200\242
5 \342\200\242
1 \342\200\242
5 \342\200\242
1 \342\200\242
3 \342\200\242
4 \342\200\242
7 \342\200\242
9 \342\200\242
5 \342\200\242
tl
a,
12. How
d,
c,
e,
h,
g,
i,
m,
is, if
(that
xt
n,
= the
o,
with at
of balls
6 boxes
into
number
the
are distinguishable?
balls
\342\200\242
\342\200\242
of {8 \342\200\242
are there
13. How many
c} in which
6, 7
a, 6
arrangements
a?
each a is on at least onesideofanother
are there without any pair of
numbers
14. How many ft -digit
binary
Mexican
(a)
Compute
the digits
How
the number of
1,2, and 3 with
of these
is divisible
many
integer
stands
and
a Mexican
10
between
a Canadian
side.
10-digitnumbers which
the
exactlytwice,
(b)
invariably
Canadianand in which
an American
in which
Canadians
numbers
by 9 iff
2 appearing
digit
contain
in each
only
number
an
by
9.)
17.
(a) In
how many
100 so
ways
that their
can
3 of the
we choose
sum is divisible
by
3?
numbers from
1 to
186
Chapter 2: Elementary
Combinatorics
how many
In
(b)
ways can
positiveintegersso
18. In how
choose
sum
can we distribute
ways
balls into 6 different
many
10 blue
and
we
their
that
3 out of 3rc
is divisible by 3?
successive
10 red balls,10white
boxes (any box may
balls,
be left
empty)?
19.
chess
player
bishops,
of
rows
(a) if
packages
two
2 packages
and
3 each,
contain
21. In
can
knights,
each?
books
Solve problem
(b)
can we
ways
many
chess pieces(2
each
1 package
messages be deliveredby 3
is
The
order
messenger
messenger boy left unemployed?
in which a messenger delivershis message
is immaterial.
22.How many ways can 12 white pawns and 12blackpawns be placed
on the black squares of an 8 x 8 chess board?
23. Given the integers 1,2,3, ... ,15, two groups are selected; the first
group contains5 integersand the second group contains 2 integers.
In how many ways can the selection be made if (a) unlimited
but
a group
is allowed or (b) repetition is allowed
repetition
contains either all odd integersorall even
and, moreover,
integers
if one group contains even integers,thenthe othergroup
contains
is allowed,
and
only odd integers, and vice versaor (c)no repetition
the smallest number of the first group
is larger
than the largest
numberof the secondgroup?
how
5 different
can
ways
many
boys if no
24.
sells 20
A shop
different
flavors
4 ice
can a customerchoose
of
ice
cream.
cones
cream
if they
cone)
of different
(a)
are all
(b)
not necessarily
contain
only 2 or
contain
3 different
are
(c)
(d)
25. Howmany
bridge
flavors?
of different
3 flavors?
deals
flavors?
flavors?
are there
in which
the spades?
26.In
how
many
committeeswhere
division
division
can 10
ways
each
committee
committees
into committees
into
27. Considerthe
word
there
(a) altogether?
TALLAHASSEE.
How
many
arrangements
are
Section
2.5
Permutations
Enumerating
no two
(b) where
(c) where
with
A appear
letters
Constrained
187
Repetitions
together?
E are
letters
the
and
together
together?
(d) of 4
taken from
letters
the
of
TRIANNUAL.
(a)
How many
arrangements
(b)
How
9-letter
many
separated by
(c)
How
6-letter
many
exactly
TRIANNUAL
29.
TALLAHASSEE?
of
letters
the
from
N's?
no
with
and U
T, I,
letters
colorsbe assigned
each
to
52 cards
distribute
among 4
of 3 suits and 4
of each
3 cards
gets
player
houses?
the
ways can we
players where
of the
cards
fourth
suit?
we
black
place
bishops,2 rooks,1
an 8 x 8 chess board.
and
queen,
(a)
How
many
of the
(b)
How
ways
can 16
ways
can the
chessboard?
many
and
1 king
pieces be placedon
the
first
pieces be placedon
the
entire
two rows
board?
if the
6-letter words can be formed
letters
are taken
no letter can appear more
from a set of 20 different
and
letters
than twicein a word?
the number of 10-digitintegersthat
contain
(a) Compute
only the
the
3 appearing
exactly twice in each
digits 1, 2, 3 with
digit
33.
integer,
(b)
34.
How
many
of the
3 yellow
different
35. How
many
each half
ways
can we
10!6!5!4!
5. P(24;l,l,l,l,l,2,2,2)2)2,3,3,3).
6. P(n;l,l,...
divide a
is to contain2 kings?
,1) -
n\\.
white
of 4
ball,
9?
by
and
of these
1 blue
ball,
balls.
deck of 52 cardsinto
2 halves
if
188
Chapter
Combinatorics
2: Elementary
7-
(a)
15!
15!
(b) 7!4!2
12.
k =
For
(a)
balls
remaining
xx
x2 = fc,
(
boxes
. ) ways.
1 and
(box
fc
ways to
=
X)
(k+*)
to
)
into the remainingboxes.
ways
The
\302\261(*
(b)
are (* J
2 boxes. (
first
the
in
0,1,2,3,4 there
+1)
0,1,2,3,4.
For each
box 2).
Total
ft
balls
the
distribute
is
total
(V)
Choose
k balls
place
4 choices
each.
f:(1l)2k410-k.
(b)
17.
(b)
is.
+ (34)
<a> 2P1)
3(2)
ft)'.
(>\342\200\242+$-\302\273)\342\200\242\342\200\242
19. P(16;2,2,2,2,2,2,l,l,l,l)
,20.
+ (^(33),
16!
-^.
20!
(a)
5!(4!)5
20!
(b)
2!23!24!5!2'
3
messagesare partitioned
Hence3(5!/3!l!l!)
+ 3(5!/2!2!l!)
21. The
\342\204\242
99
into
cells
of sizes
3,1,1 or
2,2,1.
32!
(12!)28!
(Note: there
not
have
a pawn
on them.)
Section2.6
- 1+
(a) C(15
23.
are
There
(b)
5,5)
8 odd
are to
there
- 1 + 2,2) =
C(15
(^) (^).
and 7 even integersto choosefrom,
rjj9
either
+ flljgjways.
the 2
since
and
chosenin^gj
(c)
189
Coefficients
Binomial
groups are
determined oncethe 7
are
integers
selected.
24. (a)
(b)
(2\302\273)
1 +
4) .(23)
(20-
<c>ra-H)-2o
(d)
2.6
There
are
cones
with
g) ways
to choose 3 flavors
exactly 3 flavors
times
3 ways
to
fill
=3( A
COEFFICIENTS
BINOMIAL
In this
section we will
some
present
coefficients.In formulas
arising
computer science,the binomial
for
that a facility
manipulating
from
basic
the
coefficients
involving binomial
analysis of algorithms in
occur
over and over again, so
identities
is a necessity. Moreover,different
in
rise to formulas that are different
of binomial coefficients reveal that they are, in
them
often give
approaches
to problems
appearance
yet identities
study
of identities
mathematics
we
and
Combinatorial
will
Reasoning
The
C(n,r)
symbol
factorial.In
other
has
words,
two
C(n,r)
meanings:
represents
r objects
as well,
190
Chapter2:Elementary
Combinatorics
on
proof. Roughly speaking, a combinatorialproofwill be based
a set into subsets in a certainprescribed
manner
and
then
decomposing
an
the number of ways of selecting these subsets,while
counting
proof will be patterned mainly on the manipulation of
algebraic
factorials. We
are
feel, as a general rule, that combinatorialproofs
preferable
and
in that they are intuitive,
instructive,
easy to remember. While
algebraic
than
combinatorial
proofs, they have an
algebraic proofsare moreformal
of
advantage in that verifications can be madeeven when understanding
an
awareness
of
the combinatorial meaning is missing.Nevertheless,
both proofs is probably necessary for a thorough
of the
understanding
meaning of an identity.
Let us give an example of how combinatorial reasoningcanbeused.
we have
that
is
fact,
enumerates
elements
(n2)\\/(n\\)n+1
this
for
the
the
form
very
to solve the
n2
hand,
of one's solution
problem.
roads from A to
from A to C.
Howmany different
are there from A to C and back to A that
visit B
trips
at least once? The answer (ab)c + c(ab)
+ (ab)2 could be arrived at by
counting first, the abc trips from A to C via B that return directly to A;
then
the trips directly from A to C and that return via B and,
counting
those
(ab)2 trips that go and returnvia B.
finally,
counting
a different
are
B9 b different
roads
directly
Of course,
there are a total of ab + c trips from A to C and thus
(ab + c)2from A to C and back to A, and there are c2 trips that go directly
to C and return directly
from
C back to A. Thus the difference(ab + c)2
- c2
represents the number of trips that visit B at least once.
Another approach couldobservethat thereare(ab)(ab
from
+ c) trips
A
to
return to A
B that
C via
anyway.
c(ab) +
of
course,
(ab)2,
(ab
there
Moreover,
there
are (ab)(ab
that
are c(ab)
+ c) +
trips to go
c(ab)
trips
expressions: (ab)c +
+ c(ab) are the same.
all 3
+ c)
What
we wish
of the expression
to point out here isthat the form
suggests
the combinatorial reasoningusedto obtain
solution.
the
This point of view will be very
when
beneficial
you are called upon to
some
identities
binomial coefficients.
verify
involving
Section2.6
Some
Identities
of Combinatorial
Examples
fact
by
>y factorials.
Representation
(1)
191
Coefficients
Binomial
r\\{n-r)\\
for
every
proved
pair of
in Theorem
integers n and
2.3.4.
C(n,r)
was
C(n,n-r).
A combinatorial
is easy
to see because when we
proof of this identity
n - r
chooser objectsfrom n objects there are n - r objectsleft.These
\342\200\224
to every
Hence
r) -combination.
objects can be consideredas $n (n
- r) -combination
r-combination automaticallythereis an associated
(n
and conversely.In other words
the same number of
there
are precisely
which
is just what identity (2)
r-combinationsas (n - r)-combinations
states.
a proof
Alternatively,
using factorials follows from the factorial
because
representation
n
since
- r).
But
C(nyn
(3)
integers
The
C(nyr)
= nl/(n
C(n,n
- r) =
- (n -
Newton's
n > r >
r)
r,
\342\200\224
r)\\rl
(n -
we have
while
(n
(n
C(n,r) C(ryk)
Identity:
k > 0.
r))l(n
- (n =
r)\\
r))\\
r! and
C(n
C(n,k)
- k,r
C(n,r)
k)
for
side
left-hand
a set
of r
(3a) C(n,r)r-
of course,
of constants from
and then
nC(n
if r
the
counts
objects
1; in
l,r
- 1).
other
binomial
coefficients:
a rule
for the
removal
192
Chapter 2: Elementary
Combinatorics
Another
Here
of
C(nyr +
(3d)
1.
Newton
Isaac
This
other
the
rth
the
\342\200\224
r
+ 1
(4a)
r-
for
formulas
interpretation.
in arranging n
first
the
1 objects in
r - 1
arranging
position.
the
while
ways. Thus,
- P(n,r
P(n,r)
some
l,r - 1)
first
- 1) ways
> r + 1>
we observe
hand,
attained.by
filling
C(n,r).
n ways
alsobe
n
Then,
from
because
holds
identity
positions.
then
P(n,r
and 1, respectively.
for integers n
C(n,r)
1)]
a combinatorial
with
nP(n -
P(n,r) =
position
On
+ 1
discovered
compute C(rc,r+1)
along
permutations
r)/(r
be instructive
might
(4)
1) = [(n (1646-1727)
how to
it shows
It
C(n,r).
r)
we have:
course,
Sir
= (n -
identity (3) by
r and k in
replace
C(n,r).
+ 1)
1) (r
C(n,r
case of
special
(3c)
- 1)
- l,r
C(n
(n/r)
(3b)
we seethat
- 1) (n -
1).
associated
very useful; it is commonly
although an equivalentversionwas known
The
result is
following
Blaise Pascal (1623-1662),
M. Stifel (1486-1567).
with
by
Let
us
give
an exercise.
xe
S.
(For
S might
example,
(A) those
consist of n - 1 women
into
two
factorial
easy
one of
and
proof
as
1 male.)
classes:
that
l,r - 1).
Distinguish
objects.
of S canbedivided
(B) thoseselections
in
+ C(n -
a combinatorial
r-combinations
objects
- l,r)
C(n
to
choose
l,r - 1)
ways.
include
not
r
In
x.
- 1 objectsfrom
(B),
we choose
the
remaining
r objects
from
- 1
the
193
Binomial Coefficients
2.6
Section
Number
Row
n =
n=
C(0, 0)
C(l, 1)
C(1,0)
* =
n =
C(3,
C(3,0)
C(3,3)
C(3f 2)
1)
C(4,1)
C(4,0)
C(2,2)
C(2,1)
C(2,0)
C(4, 2)
| C(4,3)
C(4f4)
\342\200\242v
n
C(5,0)
C(5,2)
1)
C(5,
Figure 2-6.
C
C(5f4)
C(5, 3) 1
C(5,5)
Pascal's triangle.
remaining
person.
the
gives us an alternate methodfor determining
numerical values
of C(n,r).
For example, if we know C(4,0), C(4,l), C(4,2),
and
C(4,3),
C(4,4), we can determine C(5,l), C(5,2),C(5,3),and
C(5,4)
simply
by addition.
= C(n,n)
= 1 for all
C(rc,0)
Using identity (5) and the fact that
This
identity
nonnegative integers n,
rows in the
successive
build
can
we
binomialcoefficients,calledPascal'striangle
(Figure
What
Pascal's identity says is that the numbers
found by adding the two nearest
coefficients
binomial
For instance,
is
C(5,3)
it.
above
Since
C(4,3)- 6 +
Let's list
6 and C(4,3)= 4
we
entered.
or,
* =
8-
21
28
with
in other
n = 8 by
numerical
values
56
row
7 and
/\\
/\\
/\\
70
using
21
35
35
56
the
on the nth
number
is C(n,r).
row are
row along
words, the rth number on the nth
The
rth
the
in the
10.
binomial coefficients
the rth diagonalis C(n,r)
n =
on
of the
row
of the two
sum
the
C(4,2) =
table of
2-6).
28
Chapter 2: Elementary
Combinatorics
h =
n=
n =
Numbers
Diagonal
*-1
13
\342\226\272
1
*\342\200\242
1
\302\253=2
r=
Numbers
Row
*\342\226\240
, =
*~14
n=4
n =
/i =
10
15
\342\226\272
\342\226\272
1
2-7.
Figure
entered.
Pascal's
We might
with
triangle
note that
15
21
35
35
21
10
20
15
\342\226\272
1
the numerical
values of the
on
the
C(n,0) =
the
number
second
binomial
extreme
coefficients
0 on
the
1 - C(n,n).
corresponding
diagonal
from
Conditions.
Boundary
Likewise
to r =
the diagonalcorresponding
(6).
extreme
right.
same
the
This is
to r = 1 always
has
the
row
is true for the oppositediagonal
because,
C(n,l)
=
Indeedthereis
proceed
from
the
symmetry
left to right
- C(n,n
- 1).
property
Section
2.6
Table of Binomial
Figure 2-8
n
0
1
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
10
11
12
13
14
15
Coefficients
C(nfi)
C(nt5)
C(nA)
C(nt3)
C(/i,8)
C(nj)
C(/?,9)
C(/i,10)
3
6
10
10
20
15
35
35
21
56
84
70
56
126
126
210
330
252
462
792
15
21
28
36
120
45
11
78
165
220
285
55
12
66
13
14
15
495
1287
2002
3003
715
91
364
1001
105
455
1365
1
7
36
210
120
45
10
462
330
165
55
11
924
792
495
220
66
1716
1287
286
3003
3432
5005
6435
715
2002
5005
16
120
560
1820
4368
8008
11440
17
136
680
2380
6188
12376
19448
18
18
19
19
20
20
190
1001
3003
12870 11440 8008
24310 24310 19448
3003
6435
816
171
the Table
from
use the
1716
17
153
1
9
28
84
16
C(20,11)
195
Coefficients
Binomial
relation
43758
48620
43758
75582
92378
92378
125970
167960
184756
= C(ntn
C(ntr)
r)
167,960
from the
Thus,
because
we
know approximately
need
only
binomial
coefficients in Pascal's triangle
from symmetry.
Thus, if we have
computed
C(20,10)then by
we
symmetry
C(20,8),C(20,13) C(20,7),
=
row
on
20. Thus,
we can
of
take
first
1 in row
the
Pascal's
on a
number immediately
For example,
the
(see
by symmetry
or the
triangle
below
of the
have,
say,
the
last
The
out
this
that
same
explanation
yes as shown
in
Figure
to
left
diagonal.
with
2-8.
other
we
diagonal
number directly
10 + 20+ 35+
for
next column). Is therea mathematical
the
answer is
84 in
from
on a
number
row
termsof
the
the
known
with
diagonal of Figure 2-8starting
1 + 4 + 10+ 20 + 35 equalsthe 70
8 directly
below the 35 of row 7. Check
For
instance, by adding more
diagonals.
have 1 + 4 +
56
+ 84 = 210 (the
in
are
Figure 2-8).
table of Figure2-8:
diagonal (proceedingdownward
entries
3. Then we
of
values
C(20,0),
C(20,l),
..., and
= C(20,9), C(20,12)=
know C(20,ll)
and the rest of the binomialcoefficients
in
a tabular
form by omitting those
obtain
about
all numbers
right) is the
list more
can
we
Note oneotherthing
the
etc.,
- r).
= C(n,n
C(n,r)
below
this?
196
Chapter 2: Elementary
Combinatorics
Summation.
Diagonal
(8)
C(n,0) +
C(n +
+ C(n
1,1)
+ 2,2)
+ . .
C(n
+ r,r)
= C(n
a combinatorial
us give
Let
distribute r indistinguishable
proof by
the
counting
number
+r
4-
l,r)
of ways
to
boxes.Thiscan
bedone in C(n + r + l,r) = C(n 4- 2
l,r) ways.But the ballsmay
also
be distributed
as follows: For each0 < k < r, distributek ofthe balls
in the
n
1
in the
first
last box. This can
+ boxes, and thenthe remainder
be done in 2\302\243_0C(n 4- &,&) ways.
An
can be made by repeated applications of Pascal's
alternate
proof
In this proof we start with
4- r 4- l,r) = C(n + ryr)
+
C(n
(5).
identity
4- r,r
C(n
1) and then decomposeC(n + r,r - 1) into
C(n 4- r - lV - 1) + C(n + r - l,r - 2).This gives C(n + r + l,r) =
C(n + r,r) 4- C(rc 4- r - l,r - 1)4- C(n + r - l,r - 2).Again decompose
=
the last term by Pascal's identity and combineto get C(n
+ r + l,r)
C(n + r,r) + C(n + r
1) + C(n 4- r 2,r -2) +
l,r
can be continued
until the last term is
4- r - 2,r - 3).This
C(m
process
C(n,0).The
balls
is the
sum
into
n 4+ r -
2 numbered
one desired.
following
(9)
Row Summation.
C(n,0) +
C(n,l)
\342\200\242
\342\200\242
\342\200\242
+
C(n,r)
4-
\342\200\242
\342\200\242
\342\200\242
4-
C(n,n)
- 2n.
This
just
elements
means
and this
of S respectively
...,
and
of a set S with
n
that there is a total of 2n subsets
number is also the sum of the number of all the subsets
1 element, 2 elements,..., r elements,
with
0 elements,
n elements.
is that
we have n people to be
place none in the first bus and all n in the
secondbus in C(rc,0) ways; we can put 1 in the first bus and all n - 1 in
the secondbus in C(n,l) ways, and so on, until we placeall n peoplein the
is a total of 2n ways
first bus and none in the secondin C(n,n)ways.
There
to do this since each of the peoplecanbeplaced
two
ways.
Another
way of
buses.
can
Section
2.6
Row
(10)
Summation.
Square
C(n,0)2+ C(n,l)2+
each
for
\342\200\242
\342\200\242
\342\200\242
4-
C(n,r)2
triangleisthe middle
To verify this, let Sbe
of
counts
the
(10)
B of
of n men
A and
a set
have
the
Pascal's
with 2n elements.
Then the right-hand side
n-combinations
of S. Now partition S into two
S where A and B have n elements each. (We might
and n women,for example.)
Then
an n-combination
a
subsets
+ C(n,n)2= C(2n,n)
of
squares
2nth row.
the
of
in
number
identity
. .
+ .
n.
integer
positive
This just
197
Coefficients
Binomial
set
the
hence
C(2n,n),
After observing
sameideasto
is proved.
identity
obtain
general
we
see
that
we could
use the
identity.
(10a)
C(m,0)C(n,0) + C(m,l)C(n,l)
m > n > 0.
C(m 4- n,n) for integers
4-
\342\200\242
\342\200\242
\342\200\242
4-
C(m,n)C(n,n)
Here we
and a
of A
r-combinations
(n
(since
has
m members),
and C(n,n
- r) = C(n,r)
- r)-combinations
there
the
r-combination of A and an (n - r)-combinationof B. Apply
as r = 0,1,..., n to get the identity.
binomial
coefficient
The sum of all numbers includinga given
numbers above it in a column in Pascal's triangle(orin Figure
number in the next columnand in the nextrow.
(11)
Column
Summation.
any positive
l,r)
integer n>ir.
4-
\342\200\242
\342\200\242
\342\200\242
4-
C(n,r)
= C(n
4- l,r
each
for
4-
1)
sum
2-8)
r,
of an
union
rule
and all
is the
198
Chapter
Combinatorics
2: Elementary
Following
counts in 2
different
inequality
*i
use
can
We
+ *2
Pascal's
identity
= rP(n
- l,r -
- r
^n
xr+i
to obtain a
correspondingidentity
for
permutations.
P(n,r)
(12)
1)
P(n
l,r).
from
This can be obtained
(5) just by multiplying by r!.
identity
- l,r - 1)
- l,r)]
For P(n,r) - r!
C(n
r\\[C(n
r! C(n
1) + r! C(n
1)! C(n
l,r)
l,r - 1)]
r[(r
easily
4-
C(n9r)
-Xyr
- l,r)
r! C(n
Of course,
that identity
= rP(n
- l,r - 1)
P(n
l,r).
there is a combinatorialmeaning
(5) was obtained
by dividing
classes:(a) thoseselections
include
selections
did
not
included
that
for
Recall
(12).
identity
all r-combinations
fixed element x or
into two
(b) those
ways].
are
There
many
let us move
Let us showhow
for now
Pascal's
but
triangle,
combinatorial
identities.
Note
n(n +
Evaluate
2.6.3.
Example
that
we observe
Exercises
we have
for Section
1.
2 +
3 +
... + n.
+
C(n
1,2)
Example2.6.4.
Here
so that
C(k,l)
the sum
(a)
the
Evaluate
that k2
+
- k(k -
2JJ.!
COM)
l2 + 22
1)+
+ 32 +
= 2C(fe,2)
= 2C(n
... +
n2.
Therefore,
+ C(fe,l).
+ 1,3) + C(n +
C(k,r) = 0 if
k <
1,2)
by
(11).
r.
2.6
k* - k(k
+
6C(fe,3).
6C(fe,2)
Show
sum
that
- 1)
(k
2) + 3fe2
2fe
C(k,l)
Section2.6
(b)
(c)
\342\200\242
\342\200\242
J3 + 23 + \342\200\242
+ n3.
k4
fact
that
the
k(k
Using
fe4
for
4- 6fc, derive a formula
199
Coefficients
Binomial
Evaluate
1)
(k
like
2) (k
- 3) + 6fc3 - life2
of binomial
(a) in terms
coefficients.
2. Use
summation
column
the
(11) and
identity
r = 1, 2, and
3 to
the formulas
derive
(a) 1 + 2 +
\342\200\242
\342\200\242
\342\200\242
4- n
= n(n
4- l)/2,
\342\200\242
\342\200\242
2 4- 2 . 3 4- 3 \342\200\242
4 4- \342\200\242
4- n(n
(b) 1 \342\200\242
4- 1)
= n(n
(n 4-
1) (n 4- 2) -
4- 1) (n 4-
2)/3,
and
(c)
\342\200\242
2 \342\200\242
3 4-
(n
(2
\342\200\242
\342\200\242
\342\200\242
3 \342\200\242
4- \342\200\242
4-
Use identity
(a)
C(n 4+
C(n
(n)
4)
n(n
4-
1)
(n 4- 3)/4.
4- 2)
identity
(11)
4- m,r)
= C(n
summation
the diagonal
from
(8).
that
(11) to verify
\342\200\242
\342\200\242
4- C(n
l,r) 4- \342\200\242
1, r + 1).
+ m + l,r + 1) -
(b) In particular,
n-l
X!
C(fe
4- 2,2)
- C(n
4-
2,3)
or
n-l
2-3 + 3.4+..\342\200\242
1.2 +
5.
We
such
a proof
2,2)
= C(n
4- 2,3).
that
+n(n
+ l)=-(n)(n
+ l)(n
+ 2).
to make
wish
that z
(a)
Prove
(b)
These
(l)*-y,
(2)
x <
y, and
(3)*>y.
the
first
type
and
200
Chapter
Combinatorics
2: Elementary
- C(10,3)
C(5,3)
C(10,5)
(d)
C(n,r);
C(rv);
C(5,5)
(f)
C(n,0)
(g)
+ C(6,5)
+ C(7,5)
+ C(n,l)
\342\200\242
\342\200\242
\342\200\242
+
C(n,n)
8.
\342\200\242
2 \342\200\242
3 +
r,t
+
C(r
(n
(n - 1) n.
n,r)
\\
m + n)l
(r +
+ n,m)
C(m
;\342\200\224\342\200\224\342\200\224
rlmlnl
that
Show
(b)
sum
the
- 2)
\342\200\242
\342\200\242
\342\200\242
3 \342\200\242
4 + \342\200\242
+
that
Show
(a)
+ C(5,5)2 -
+ C(5,4)2
C(5,3)2
\"
5 (r!)2in
- r)!2
'
C(2^>
a combinatorialargumentto explainwhy
9. Give
- P(n,n
- 2P(n,n
(a)
P(n,n)
(b)
P(n,n)
(c)
(3n)
(e)
[(n!)2]!/[(n!)!]n!+1
is an
(n!)3
!/3!
- 1),
- 2),
integer,
areintegers,
(d) (3n)!/3!nand (3n)!/3fl
(f) (*!)!/{[(*by a
Show
10.
C(2n,2)
(a)
is an
is
l)!]!}n
an
(c)
r)
men
and
- l,r).
= nC(n
C(n,r)
=
+ 3
3C(n,3)
C(3n,3)
integer.
women.)
(b) (n
integer, and
\342\200\242
+ C(n,l)3.
C(n,2)
C(n,l)
2C(n,2)
C(n,3)
C(2n,l)
+ C(2n,2)
C(n,l).
C(4,l)
C(3,2) C(n,l)2
C(n,2)
C(n,2f + C(4,l)C(3,l)C(n,l)
C(ra,3)
11. Show by
C(4,l)
+ C(4,2)
C(n,4).
(n -r)C(n + r-
l,r)
C(n,r)
= nC(n
r-
l,2r) C(2r,r)
1.
7.
Since
(A
(fc
\302\243
9. (a)
k3 =
22_i
(b)
- 2) (fe
- l)fc = 6 \302\243C(fc,3)
Designateoneofthen distinct
are P(n,n - 1)ways to
6C(\302\253
as a
objects
arrange
the
1,4)
by (11).
There
- 1 objectsinto n
special object.
Section
The
2.7
and
Binomial
Theorems
Multinomial
201
(e)
2.7
THE
of two
sum
The binomial
few
cases
elements.
n!
BINOMIAL
Any
of unordered
number
the
Count
elementswhereeachpart has
unlike
symbols, such
as x +
the
powers
theoremis a formula
for
theorem should
of this
correspondence
Pascal's
with
be familiar
in
theorem
binomial
triangular
triangle:
x + y
x2 + 2xy +
+ 3x2y
x3
x4 +
4x3y
the
x and
The
: .
y3
4- y4
y)1
(* +
y)3
(x 4-
y)4
Pascal's
we find
...
\342\200\242
\342\200\242
\342\200\242
+
(J)
/*
coefficients C(n,r)
4- C(n,2)
xn~ly
. + C(n,n)yn
binomial
(x +
says.
4- C(n,l)
+ (5)x-y
xn~ryr
y)\302\260
be
a positive
y,
- C(n,0)xn
4- C(nfr)xn-ryr
(?)
(* +
(The BinomialTheorem).Let
Theorem
2.7.1.
integer. Then for all
(x 4- y)n
y2
+ 4ry3
alone
theorem
binomial
- (* + y)2
+ 3xy2
6x2y2
is just what
of a
the
to
a binomial.
called
is
y,
(j)
xn~2y*
xn 4-
4-
\342\200\242
\342\200\242
\342\200\242
(j) xn~ly
C(n,r)x-y.
\302\243
r-0
I'M
of
receive
their
name
from their
a binomial.
202
Chapter
Combinatorics
2: Elementary
remain.
each
factor,
2.7.1.
Example
(X +
y)\302\253
+ C(8,2)*Y
+ C(8,l)*7y
C(8,0)x8
+ C(8,3)*Y4-
+ C(8,5)*Y
C(8,4)*V
+ C(8,7)xy74- C(8,8)y8
(2.7.1)
= x8 4- 8x7y 4- 28*Y +
56xV + 70*y
4- 56*V
4- 28*y 4- 8xy7 4- ys;
C(6,0)(2a)6 4- C(6,l)(2a)5(56) + C(6,2)(2a)4(56)2
4- C(6,3)(2a)3(56)3
+ C(6,4)(2a)2(56)4
(2.7.2)
4- C(6,5)(2a)(56)5 + C(6,6)(56)6.
4- C(8,6)*Y
(2a 4-
56)6
Letx - 2a
and
(2a
- 26a6
4-
5b)6
= 56
4- 6
4- 15
2.7.1. Then
in Theorem
-
25
+ 15
. 5a56
\342\200\242
22 \342\200\242
54a264
1,the
becomes
formula
and
(x
4-
prove
y)n+1
becomes
(x+y)
\\t
that
(x
(x 4-
4- 20
52a462
55a65 +
4-6-2.
clearly true. We
. 24 .
. 53a363
5666.
on n.
induction
mathematical
4- C(l,l)y -x + y,
y)1 = C(l90)x
. 23
and
If n
this
is
positive integer n
n
4- 1. We write
it is true when n is replaced by
4- y) (x 4- y)n and by the inductive hypothesis this
= *
C(n,r)*-y)
is
true
(^ C(n,r)*-yj
= C(n,0)jcri+14-
r-l
4- \302\243C(n,r)xn-y+1
r-0
for a
(E
C(n,r)x\"-y)
C(n,r)x,1-r+y
4- C(n9n)yn+l.
Section2.7
If we set r = k -
k runs from
the
in
1 to
(X
y)\302\273+i
x^1
as r runs from
variable is immaterialsonow
and the
above, then
term
third
rc, 2?:J
of the dummy
letter
the
Now
C(n,r
0 to
- 1,
l)xn+l~kyk.
k by
replace
l)xn+1~ryr and
- l)]xn+1-ryr+ yB+1.
+ C(n,r
\302\243[C(n,r)
203
Theorems
and Multinomial
Binomial
The
r-l
But
Pascal's
using
(X
= x^1
+ y)^1
+f
C(n
l,r)jcn+1-ryr
yn+1
r-l
or
n+1
y)n+l =
(x +
X]C(n
l,r)xn+1-y.
r-0
the
formula is
mathematical
induction.
Thus
for
the theorem
1 and
is
by
proved
\342\226\241
can be
theorem
binomial
The
true
forms:
(x
+ y)n
C(n,n
\302\243
r-0
r)jcn\"V
C(n,r)*yi-r
\302\243
r-0
C(n,n
\302\243
r-0
C(nyn
interchanging x
The
case y =
with
1 occurs
Replacing
l)n
x by
(1
n.
the symmetry
two
other
The
2.7.1 and
r - 0, 1, ...,
property
follow
by
y.
special case.
(x
Theorem
from
r) for
r)xry\"-r
C(n,r)xn-r
\302\243
r-0
\342\200\224
x we
be
a positive
r-0
- 21 C(n,r)xr.
r-0
C(*,r)(-*)r
C(*,r)(-l)r*'.
\302\243
r-0
it as
- r>*n\"r
c(*>*
\302\243
r-0
have
-*)\302\273-\302\243]
integer.
recording
204
Chapter2:Elementary
Some
Combinatorics
Identities
More
\342\200\242
\342\200\242
- 2n has already
The identity C(n,0) + C(n,l) + \342\200\242
4- C(n,n)
been
but it also follows
(9)
proved by a combinatorial argument in identity
x = y = 1.
from the binomialtheoremby setting
\342\200\224
=
1 in the binomial
If we set x *= 1 and y
theorem, then we seethat
(13)
C(n,0)
+ C(n,2)
C(n,l)
\342\200\242
\342\200\242
\342\200\242
+
triangleis zero.
also
can
We
this as
write
C(n,0) + C(n,2)+
S be
Let
\342\200\242
\342\200\242
\342\200\242
-
(9),
identity
+ C(n,3)
C(n,l)
C(n,4)
the common
the left.By
= 0.
members
of the
sum
C(n9n)
(-l)n
the right-hand
Add
sums.
2S = 2n
....
S = 2n~\\
or
side to
we
Therefore,
have
This
identity
with
n elements,
then
\342\200\242
\342\200\242
\342\200\242
=
C(n,4)
\342\200\242
\342\200\242
\342\200\242
= T~\\
+ C(n,3)
C(n,l)
If S is a set
combinatorial
interpretation.
an even
the number of subsetsof S with
number
of
this equals
the number of subsets of S with
an odd
following
3C(n,3)
- n2n~l
\342\200\242
\342\200\242
\342\200\242
nC(n,n)
for eadi
positiveintegern.
Tosee
this
rC(n,r)
(3a),
nC (n,n)
(n
n[C
we
use
Newton's
- nC(n
nC(n -
1,0) +
- identity
1),
- l,r
1,0)+
\342\200\242
\342\200\242
. +
C(n
- l,n
and
give
proof as an
a proof
using the
exercise.
identity (9).by
+
lC(n,l)
1,1) +
- 1)]-
(9) to
(3) and
nC(n
n2n~l
obtain
l,l)/2
by
\342\200\242
\342\200\242
\342\200\242
-f
- 1) =
(9). Likewise
identity
the identity:
+ C(n
identity
2) +
- l,n
2C(n,
\342\200\242
\342\200\242
\342\200\242
+
Identity. C(n +
. +
r=>0.
We
nC(n
+
C(n
(15a) C(n - 1,0)/1
l)ln (2n
l)/n.
C(n
l,n
(16) Vandermonde's
l) + . .
C(n,l) C(m,r \342\200\224
so
m,r)
- l,2)/3 +
=
integers
binomial theorem; we
leave
C(n,0)
n > r
...
C(m,r)
a combinatorial
Section
and
The Binomial
2.7
Multinomial
205
Theorems
First,
theorem
...,
- k) -
C(m,r
C(n,k)
51
But,
as
have
we
4-
m,r),
so
follows.
In summary
ways
C(n,r) C(m,0).
observed,
already
-1)+...+
C(m,r
C(n,l)
the identity
C(m,r)
C(nfi)
obtained
have
we
identities in a
combinatorial
variety
of
of
the use
including
1. combinatorial
reasoning;
2.
of binomial
representation
3. Pascal's
for
identity
The
coefficients;
induction; and
4. mathematical
5. the
coefficients by factorials;
binomial
theorem.
binomial
Theorem
Multinomial
unlike things xx
unlike
things
is a
trinomial,
n\\
=
\342\200\242
\342\200\242
> Qt)
<?2, \342\200\242
\342\200\224j\342\200\224j
-7
P\\n\\qu
where
n. It
and
qu
q2,...,
are
qt
nonnegative
ordered
partitions
of
a set
with
integers
of n elements
qx
multinomial
\342\200\242
\342\200\242
4- q2 4- \342\200\242
4- qt
coefficients
Recall
206
Chapter
Combinatorics
2: Elementary
4*
X3 4- 0X1X2 4* 3xxX3
The coefficient of x 2X3,
proof
2.7.1
Theorem
of
remaining
C(2,2) = 3 ways.
x\\ +
0X2X3 4- 0X1X2X3.
for
and x3
the
from
in C(3,l)
this
choose
could
we
words
special
4-
3X? x2
x\\
as we did in the
can be discovered
x2 from one factor
example,
by choosing
In other
2 factors.
some
consider
x\\
Perhaps
to find
wish
will be
example
must be
C(18,4) C(14,5)C(9,6)C(3,3)
This is not surprisingfor
are
We
letters:
of
such
we
can
number
the
calculating
-^^
the problem in
formulate
of ways of
Moreover,
{4-x1,5-x2,6-x3,3-x4}.
another way.
18
arranging the following
we know that the number
is
arrangements
P(18:4W)
4!^3!-
2.7.2
Theorem
integer. Then
for
(The Multinomial
all
qt) x?1 x%
2P(n;<7i,...,
...,
x2,
xu
\342\200\242
\342\200\242
\342\200\242
where
xf
have
(xx
the summation
a positive
n be
Let
Theorem).
xt we
4-
4- x2
\342\200\242
\342\200\242
\342\200\242
xt)n
of nonnegative integersqifq2f ..., qt where qx 4- q2 4There are C(n 4- t - l,rc) terms in the expansionof (xx
\342\200\242
\342\200\242
\342\200\242
4
qt
4-
4- x2
= n.
\342\200\242
\342\200\242
\342\200\242
4-
xt)\\
Proof.
The coefficient
of
x\\x
xq22
\342\200\242
xu
q2
\342\200\242
\342\200\242
\342\200\242
xQtf is
\342\200\242
x2,
...,
the
qt
number
\342\200\242
xt}y
P(n\\quq2y. ..,qt).
The number of
xf
xf
\342\200\242
\342\200\242
\342\200\242
is
xf
terms
as follows: each
of n objects with repetitions
4- t - l,rc) ways to do this.
is determined
a selection
of ways
therefore,
of
it is
t distinct
Section
2.7
X\302\247
X4
(a) In
2.7.2.
Example
Xj
(xx
x2
4-
4- x5)10the
+ x4
x3
207
Theorems
Multinomial
of
coefficient
X5 IS
= 12,600.
P(10;2,0,l,3,4)
(*! +
(b) In
X5)10.
X3 +
X2
(2x
coefficient
X4
4-
3y
of
x\\
-f
*?>
- C(14,10)
1,10)
we let
5z)8,
- 1,001termsin
expansion
P(3;3,0,0)x3+
x3
P(3;l,2,0)
z3 + 3x2z -
8y3 +
(-2y)z2
4- P(3;0,l,2)
(-2y)2z
P(3;0,2,l)
P(3;l,l,l) x {-2y)z
-\\2xyz.
12y2z -
+ P(3;0,0,3)z3
x (-2y)2
(-2)V
P(3;0,3,0)
P(3;2,l,0)x2(-2y)
+
+
the
=
2x, x2 = -3y, x3 = 62, and thenthe
- 560. Thus, the coefficient
of x3y3 z2 is
xx
x\\ is P(8;3,3,2)
23(-3)3(5)2P(8;3,3,2)
- 2y,+ zf =
(c)
(x
P(3;2,0,l)x2z
P(3;l,0,2)xz2
=\342\200\224^
4-
6x2y
12ry2
4 3xz2
+
+
+
4
6yz2
2.7.2.
Corollary
\342\200\242
\342\200\242
\342\200\242
> <7t)
Q2>
the
where
quq2,...,
integers
Just let 1 = xt = x2
Proof.
x, in
are tn
Theorem
\302\243-part
ordered
2.7.2.
partitions
\342\226\241
of a
set
n elements.
Example
2.7.3.
Find the
n distinct
elements.
a set
\342\200\242
- \342\200\242
=
that there
states
2.7.2
Corollary
S with
with
S is
of
partitions
number of 3-partunorderedpartitions
of
We know the number of 3-partordered
3n.
of a set
unordered
partitions
in
this
Pn(3)
example.
of which
One 3-part unordered partition of
there are 3
{S,0,</>}
- 1
and
each
of
the
From
(</>,S,0),
(0,</>,S).
Pn(3)
orderings: (S,0,</>),
=
3
unordered
there are
1) 4Thus,
3n,
3!(Pn(3)
Let Pn(t)
We are
n elements.
with
of
asked to
t-part
find
S is
other
3!orderings.
partitions
= (3nl
andPn(3)
Exercises
+ l)/2.
1.
2.
What
Using
3. (a)
is the
Figure
coefficient
of x3y7 in (x 4- y)10? in
2-8 complete
of
that
(2x -
Pascal's
3n =
9y)10?
triangle.
2?_o C(n,r)
2\\
208
Chapter
Combinatorics
2: Elementary
sum
the
2?_0 C(nfr)
for
tr
number
real
any
(b)
the numberoftermsin
the
ly
4-
expansion
7. (a) UsePascal'sidentity
4- 1)
C(2n,n
4-
to
- ly
4-
the equation
for
combinatorial
argument
C(2n 4- 2,n
1).
C(2n,n
= 2[C(2n,n) 4- C(2n,n -
of 2n
a set
Consider
4- 1)
2,n
8. Obtain relationsby
and
4-
4-
ql9
qx
4-
1)
1)].
give
in (a).
of xk in the
coefficients
the
equating
where
that
that
prove
4-
2C(2n,n)
C(2n
(b) Therefore
(c)
- w)25.
3z
of (x
- u;)25.
3*
6.
in (x -
Determine
(c) Determine
4-
following:
(a)
(1 4- x)n
(b) (1
4-
- (1
=
x)n+2
(1 4-
C(n,n)xn);
(c)
(1
= (1
4- x)n+z
4- x)
4- 3x 4-
3x2
4- xz)
...
4- C(n,n)xn);
.
C(n,l)*
. +
(2;_o C(n9r)xr).
9. Prove that:
- C(2n,0)
\342\200\242\342\200\242\342\200\242'
+
4- C(n,l)
[C(n,0)
C(n,n)]2
C(2n,2n).
4-
10.
(a) Show
that
>
for
2, C(n,l)
= 0.
(-l)n-1nC(n,n)
(c)
n2n~2;
(e)
11.
(a)
4- 3C(n,l)
4- 5C(n,2) + .
C(n9n)
- (n 4- 1) 2\".
Verify
that
C(n,2)
C(n,n) - 1 4-
(1 4-
Consider
4-
...
(b) Verify
-(-1)\302\273.
(n
4-
2nC(n,n)
C(n,0) -
4- 2C(n,3)
- 2)
. .
. . . =* 2C(n,2)
term is nC(n,n)].
- 2C(n,l) 4-
that
3C(n,3)
of C(nfl)
Verify
C(n,0)
4-
4- 5C(n,5)
3C(n,3)
+ l)CM?
(-ir(n
(d)
value
the
is
What
4-
- 2C(n,2)
\342\200\242
\342\200\242
\342\200\242
=
4- C(2n,l)
\342\200\242\342\200\242\342\200\242
4-
4- 3C(n,4)
4-
. +
. .
3C(n,2)
..+
(2n
\342\200\242
\342\200\242
\342\200\242
4-
(n
1)
1)
2n\"x.
4- 22C(n,2)
2C(n,l)
= 3\".
2C(n,l)
4-
22C(n,2)
4-
\342\200\242
\342\200\242
\342\200\242
4-
(-l)n2nC(n#)
Section
The Binomial
2.7
(c) Verify
for
formula
for
and
3nC(n,n)
209
Theorems
Multinomial
and
+ 3C(n,l)
+ 32C(n,2) + . .
- 3C(n,l) + 32C(n,2)+ . .
C(n,0)
C(n,0)
+
+
(-l)nSnC(n,n).
a factorial
Give
12.
identity.
sum 1 + 2 C(n,l) +
+ l) C(n9r)
by
breaking
eachof
is an
which
14.
(a)
*>w
1) C(n,r)
(r
sum into
2 sums,
section,
+ C(n,2)
+ 2C(n,l)
C(n,0)
this
+ 2C(n,3)
that
Observe
(1 +
in this
identity
...
Newton's
(b)
and,
(l-*>w_
C(n>0)
+ C(n,2)x2
\342\200\242
\342\200\242
\342\200\242
+
C(n,q)x*,
where
( n if n is
(7
= J
+ C(n,2)
for q -
the
16.
Show
n if
a combinatorial
Sbe
set
union
the
that
n is
odd.
that
15. Give
even
\342\200\224
1 if
n is
\342\200\242
\342\200\242
\342\200\242
+
C(n,g)
even
.
is odd.
1 if n
proof of Vandermonde's
of m men and n women.)
product
(Hint: consider
k objects.)
19.
n-
r objects
from
(b) Among
The
number
Stirling
number
elements
of
indistinguishable
3n + 1 objects,n
20.
the
t-part
to
where each
them
n of
select
of the
unordered
of
qt)
...,
integers
Find
(Hint:
the
first
then select
objects.)
are indistinguishable.
Find
+ 1 objects.
kind, S(n,t), denotesthe
these 3n
second
partitions
cell is nonempty
k\\.
by
of a
(that
set
with
is, each
distinct
Show
210
Chapter
Combinatorics
2: Elementary
by an
Pascal's
of
(5)
identity
\342\200\224 Observe
the boundary
that S(n,t) = S(n \342\200\224
1,\302\243 1) + tS(n
l,t).
=
=
of
the
conditions S(n,l)
S(n,n) 1. Then following
pattern
for n = 1,2,3,4,5.
of S(n,t)
Pascal's triangle list the values
21. Let T(nyt)
denote
the number
of ordered t-part partitions of a set
of n distinct
elements
where
each cell is nonempty. Show that
- l9t)]. List the values
of T(n,t)
+ T(n
1)
T(n,t) = t[T(n = T(n,t).
for n = 1,2,3,4,5. Note that t\\ S(n,t)
l),t -
22. Let
of t where
values
of unordered
of a set with
partitions
number of cellsis not specified,
that
number of t-part
is the
P(n)
where the
elements
distinct
unorderedpartitions
and
21
to
possible
= 2^x
P(n)
resultsof Problem20
all
for
n
is
ordered
Q(n)
compute
S(n,t).
partitions for all
t-part
- SJ.x T(n,t). Use the
P(n) and Q(n) for n =
1,2,3,4,5.
23. In
24.
the
that
Verify
= C(n,r
+ 2,r) - 2C(n + l,r) + C(n,r)
+
+
+
+
(b) C(n 3,r) 3C(rc
3C(n
2,r)
l,r) -
(a)
C(n
and
(c)
in
distinguishable
of the
order
(-D;
2?_0
C(n + q
C(gj)
- 2);
= C(n,r
C(n,r)
- j,r) = C(n,r -
q)
where
- 3);
a
g is
positive integer.
25. (a)
combinatorial
Give
identity
qiA2 ~
(b)
27.
Stirling
S(n,2)
the
1;
the
1).
l,q2,qz)
P(n
for
(1 4- x)2n.
induction the
numbers of the secondkind:
= 2\"-1 - 1 for n > 1.
by mathematical
Prove
(a)
xn in
proof for
formula
(10)
of
an algebraic
- l;qx -
P(n;quq2,q3)
and
l^a) + P(n;quq2,q3-
a similar
State
proof
= P(n
two
following
formulas
- 1) = C(n,2)
for n > 1.
28. (a) Provethat if p is a prime integer and k is an integersuch
0 < k < p, then p divides
C(p,k).
2P - 2.
(b) Use (a) to conclude that the primep divides
for
(b) S(n,n
Selected
that
3.
7.
(a)
Consider
(c)
Choose
the
binomial
a committee
expansion of
of n + 1 from
(1 + 2)n.
the
2n
2 people by
2.7
choosing n + 1men,orn
- 1men
or n
1 woman,
and
men
211
Theorems
and Multinomial
Binomial
The
and
women.
C(n + l,k) -
8. (a)
(b)
C(ra
2,k)
+ 3,k) -
(c) C(n
C(n,k
1) +
C(m.A:)
C(h,k).
+ 2C(n,&-
- C(n,&)
1)+
3C(n,k
C(n,k
+ 3C(n,&-
- 1)
2).
+
2)
C(n,k
3).
10.
1)
C(n,
(a)
- 2C(n,
n [C(n
- 1,
(-1)\"\"1
C(n
0)
2) + 3C(n,3) +
C(n - 1, 1) +
- 1, n
- 1)]
n)xnf.
2n)
n) =
(-D'^nCin,
1, 2) +
identity (13).
C(n
0 by
x2n
Then in
\342\200\242
\342\200\242
\342\200\242
+
\342\200\242
0 =
+ C(2n,
\342\200\242
\342\200\242
\342\200\242
+
\342\200\242
\342\200\242
+ l)C(n,n)
1) + 3C(n, 2) \342\200\242
(-l)\"(i\302\273
\342\200\242
. \342\200\242
(-1)\"-1
n)
C(\302\253,0)
C(n,2)
C(n,
C(n,l)
[C(n,l)
= 0 by identity (13)and 10 (a).
\342\200\242
\342\200\242
n C(n,n)]
(-1)\"
2C(n,2)\342\200\242
(c) C(n, 0)
2C(n,
14.
(1 + x)n
(1
- C(n,0)+ C(n,l)x+
- x)n - C(n,0)-
(1 +
x)n + (1 -
x)n
C(n,l)x+
C(n,n)xn
\342\200\242
\342\200\242
\342\200\242
+
+ C(ra,2)x2
n
Let x = 1 in
the
above
and we
2nl
1 for
24. See
is even
n is odd
C(ra,2)
\\
\342\200\242
\342\200\242
\342\200\242
\342\200\224
1 if
expression
C(nfi)
where
4- C(n,q)xQ
( n if n
C{n,n)xn
(-1)\"
= C(n,0)
\342\200\242
\342\200\242
\342\200\242
+
get
\342\200\242
\342\200\242
C(n,q)
\342\200\242/+
for
n >
= 0.
exercise 8.
Section
2.1
the sum
we discussed
not disjointwe
commonly
sometimes
called
must
called
the
the
sieve
refine
of disjoint
the
principle
method).
rule by
sets.
which
we
However,
of the sum
statement
of inclusion-exclusion
count the
if the sets are
can
rule to a rule
(it is
212
Chapter2: Elementary
Combinatorics
B are subsetsof
If A and
Statement:
First
set
universe
some
t/,
then
Thisis
in
of
elements
the
a Venn
from
clear
fairly
counting
of A P) B twice.
But it is also clearthat
and
(2.8.1)
+ |B|-|AnB|.
|AUB|-|A\"|
elements
n B
B9 A
Pi
B is
and
|AUS| = |Ans|
since
two
Pi
that by the
B, so
sum rule,
(2.8.2)
+ |AnB|4-|Ans|
A
and
nB| + |AnB|and|\302\243|
\302\243
B) U (A
+ A H B|.
(A O
|AnB|
see
we
\302\243),
that
is
equations
|A|
The
O B) -
U (A
Pi B)
(A
|A| = |A
of the 3 disjointsets
the union
+ |B|
= |An :B| + | AH
of
combination
B|
+|
(2.8.2)
Equations
and
(2.8.3)
+ AHBI.
TOBI
(2.8.3) gives
the desired
result:
|AUB|
Of course, if
Since
this
sets
equation
The
equals
D B
|A|
+ |B|-|An\302\243|.
= 0,
number
the
of
elements
number
with
either
of elements with
Figure 2-9
rule.
of properties,we
of the
properties A
property
plus
translate
or
the
Section2.8
The
elements with
both
elementsthat satisfy
number of
will suffice
example
simple
Example 2.8.1.
French and 50can speak
properties
to illustrate
while
Russian,
and Russian.How
members
faculty
many
Russian?
If F is
the
of faculty
set
who speak
20-
that
number of
this statement.
can speak
members
faculty
can
only 20
speak
200
that
Suppose
minus
the
A and B.
property
can speak
French and R
| F | = 200, | R
which
213
of Inclusion-Exclusion
Principle
by the
both French
either French or
the
- 50
is
|
set of faculty
and | F O R | -
formula
is 200 +
50 -
230.
The
solving
offers an alternative
described below.
of inclusion-exclusion
principle
combinatorial
some
problems
of 10
so
that
method of
included?
B will be
professors.
A
252
third
solution
committees
includeProfessor and
A
A2
Professor
inclusion-exclusion.Among
the
of
be
the
set
committeesthat
A2
JB, respectively.
| = C (8,3) -
56,it
follows
Since | Ax
that
C(9,4)
| Ax U A2 |
- 126 +
214
Chapter
Combinatorics
2: Elementary
If
for
jb
3 subsets of
the
examining
Venn
can
illustrated in Figure
diagram
find
2-10.
that
see
(A O
B O C)
(A
b n
c) u
B O
C) U
(\"J n
C = (A
3 sets.
C are any
C | by
B U
We
A =
B,
A,
|A U
we can
Likewise
exclusion
(A
(A
Pi B
\"C)
b n
c> u
B O
C) U
O B
(A
(J n' b
(A
we
U (ADBDC),
no u
B O
Therefore
O C)
C) U
use
can
jb n
o,
B O
C).
(A
(A
rule to
the sum
compute:
|A|
\\b\\-\\a
|AnBnc|
b n
c\\
\\a
nb
+ |AnBnc|,
+ |AnBnc|
AnBnc|
n c\\ +
\\Xnb n
(2.8.4)
c\\
\\a
n b
n c\\,
(2.8.5)
\\c\\-\\a n En
c\\
\\a
n5n
c\\
\\a
b n
c\\
\\a
nb
n c\\,
(2.8.6)
Figure
2-10
Section
2.8
\\A\\ +
\\B\\
+ |AnBnc|
first 7 of these
the next 2 give
The
c\\ + \\a n
b\\
\\a
_But
like
would
we
B H C| +
ci
+ |AnBnc|
+ |AnBnc|
+ iAOBnci
lAnsnci
+ |AnBnc|
sets make up A
Pi C/Thus,
A
c\\
have
|AUBU C|
and
B,
|A|
C, the
C\\
how
many
Let F be
who speak
know
from
eithef
speak
the
set
of faculty
members
following
who speak
and Spanish,
French, Russian,
French,
faculty
|R |-
be
the
that speak
50,| S | -
that
speak
20 that
Spanish,
or Russian or Spanish?
that
note
C|
IAHBH
French
speak
10 speak
only
French
|C|
\\B\\
n C|
|C|-|AnB|-|A
Russianand Spanish,while
|A|
French,
next 2 make up A H
+ |C| = |A UBU
\\B\\
complements.We
H C| so that we have the
C are
CI
|An\302\243nc|.
free of
|B| +
-|BH
U B
|A
an expression
B n C| = |B
2.8.1. If A,
n c\\.
n b
\\a
we
J5 U
wehave|A|
theorem.
Theorem
+ \\An5nc\\
+ |AnBnc|
By rearrangingterm^
|AnB|-|Anc|-|AnBnc|.
|A n
have:
+ \\AnBnc\\
\\c\\-\\An5nc\\
+ |a nen
J5, and
and (2.8.6),we
(2.8.4), (2.8.5),
Equations
Adding
215
speak
35 that speak
and Spanish,
set of
faculty
Spanish.
100,
|
FC)
R \\ -
We
20
216
Chapter 2: Elementary
Combinatorics
then by Equation
laws, and
DeMorgan's
(2.8.1),we
UB|
nB|-|TU\"B|-|l/|-|A
= |[/|-{|A|
1,000
|Anfl|.
If in Example 2.8.1thereare
2.8.4.
are 1,000 -\\F\\-\\R\\ + \\F C) R\\ = 1,000 R | = 1,000 - 230 = 770people
who
speak
1,000
Example
there
(2.8.8)
+ |B|-|AnB|}
-|tf|-|A|-|fl|
then
altogether,
have
\\F
faculty
French
nor Russian.
Likewise, if
laws and
A,
subsets of
C are
and
B,
\\A
HBH
UBU
C\\-\\A
C\\
C\\
+ \\C\\-\\AClB\\
(2.8.9)
-\\a nc\\-\\BD
=
DeMorgan's
apply
UBU
\\U\\-\\A
+ \\B\\
-\\U\\~{\\A\\
|[/|-|A|-|B|-|C|4-|AnS|
50
can
we
Uf
\\a
Thus in Example2.8.2there
- 100 + 20 + 60 + 35-10
c\\ +
are
\\b
- 245
1,000
do
who
faculty
nb
c\\-\\a
n c\\.
200-
either of the
languages.
Example2.8.5. In
the
course, 208
computer
following
were
taking
were
course,
mathematicscourses
kindsof courses, 150
Let
and
and
M =
How
many
course
but
(c) Howmany
mathematics
mathematics
76 were
and computer
statistics
taking
of students
at
260
obtained:.
survey
was
programming
48
mathematics,
information
programming,
computer
were
{students
taking
taking
programming,62were taking
none of
30 were
taking all 3
the 3 courses.
statistics},
taking
programming}.
computer
students weresurveyed?
students were taking a statistics and a mathematics
a computer
not
were
taking
course?
course?
and a computercoursebut
programming
a statistics
not
Section 2.8
The
were
taking
not a
but
mathematics
course
(e)
were
many
mathematics
were
statisticscourseor
course?
programming
computer
The
Venn
217
of Inclusion-Exclusion
Principle
2-11
in Figure
illustrated
diagram
be helpful
also
will
but
course
not
in our
analysis.
= 76,|SnC| =
WeknowthatlSl = 260,|Mh208,|Chl60,|SnMl
=
=
C
sowe can
|- 150;
C|
62,|SnM.n
C| 30,and|SUMU
48,|MO
in
2
of the
of
8
the
students
number
of
insert the
regions
immediately
Venn diagram, the regions S D M O C and S U M U C.
(a)
The
of students
number
total
|[/| = |SUMUC|
-\\s\\ +
=
(b)
We are
\\s n m n
|MO
+ |SUMUC|
n c\\-\\m
n m\\-\\s
\\c\\-\\s
n c\\
+ is n m n c\\ + isTJmTJci
260 + 208 + 160- 76 - 48 - 62 + 30+ 150=
622.
asked to find:
c\\
CO
m-
s n mn
\\s
76
- 30 = 46.
\\m\\
surveyed:
|sn
c|-|sn
S| = |MH C|-|Mn
c\\
cnM|
\\s
\\s n
mn
= 48-30 = i8.
CO S|
Figure 2-11
m\\
62-30
= 32.
c\\
218
Chapter
Combinatorics
2: Elementary
Is
( 46\\
Figure
\\
150
2-12
Thus,
parts(e),
(f),
and
HM
(e)\\S
\\S
(g).
C\\
|Mnsnc_|
|cnsnM|
we can fill
in Fig
in
\\SnCDM\\-
166.
\\m\\
ioo
iMnsnci
\\Mncns\\
\\cnsnM\\ -
_
- \\cnsr)M\\
-
- |c|
ig)\\cnsnM\\
illustrated
- 46
260
(f)IAfnsnci
Thus,
- ISHMHCI - 18 - 30-
- |S|
nU\\
O MO
80
for all
numbers
the
diagram
2-13.
proceed
to
If
inclusion-exclusion.
elementsthat satisfy
Let us list a few
a general
\342\200\242
\342\200\242
none
facts
give
of the
that
are
properties.
will be
useful. Suppose A,
B,
Ai are
subsets
of
U.
1. |A| = |[/|-|A|(countingindirectly).
2. |Brelative
A\\
|J3 n
complements).
A| =
|S- (AOB)|
|B|
- |A
H B| (counting
Section
2.8
2-13
Figure
3. I^H
U
\\Ai
A2H
...
A2 U
\342\200\242
\342\200\242
\342\200\242
U
- IAx
DAn\\
219
U A2U
\342\200\242
\342\200\242
\342\200\242
| U\\-
UAj-
An|(countingbyDeMorgan'slaw).
2.8.1.
(General statement of the principleof inclusionare finite subsets of a universal set U, then
Theorem
If Ai
exclusion).
...
|axua2u
UAj
EK-l-ZK-nA;.|
*-l
ij
+ DA-HA;-nAJ
(2.8.10)
\342\200\242
\342\200\242
\342\200\242
+
\342\226\240
\342\226\240
(-l)n-1\\A1DA2.
the second
where
{1,2,...,
integers
tions
{i,j,k} of
states
\\AX
U A2U
For = 4 there
the theorem
n
DAn\\,
A3U
24
1 =
15 terms and
that
A4\\
\\Ai\\ +
\\A2\\
\\A3\\ +
\\Ai\\
-lA.nAjl-lA.riAal-lAxn^l
-|A2nA3|-|A2nA4|-|A3nA4|
+ \\Ai n a2 n a3\\ + \\At n a2 n
a3 + n a4| + \\a2
n
-\\At
A2n a3d a4\\.
+
In
general
there
are
|Ai
(j) +
\342\200\242
\342\200\242
+
(jj)
(g) + (3) + \342\200\242
(2.8.10).
a3 n
a4\\
2\"
a4|
1 terms
on the
220
Chapter
2:
Combinatorics
Elementary
on the number n of
=
n
subsetsAt. The theorem is obviously true for
1,and we have indicated
holds
for
why the theorem holds for n = 2 and n = 3. Assumethe theorem
of U. Suppose, then, that we have n + 1 sets Al9A2f ...,
any n subsets
holds
with n replaced by n+1. We will
use
An,An+1. We show the formula
for 2 sets repeatedly in the proof.
the result
ConsiderAx U A2 U ... U An U An+1 as the union of the sets Ax U
A2 U
theorem
The
Proof.
by induction
proved
An+1. Then
An and
\342\200\242
\342\200\242
\342\200\242
U
I^UAjU.
be
will
\342\200\242
\342\200\242
\342\200\242
-UAJUAJ
U^UiO-KAiU.
= |AtUA2U.
.UAj
-|(AXUA2U.
Use
that intersection
the fact
+ |An+1|
\342\200\242
(2.8.11)
\342\200\242
.UAn)PiAn+1|
\342\200\242
\342\200\242
\342\200\242
|(AXUA2U
UAn)DAn+l\\
-|
(A! H An+l)
U (A, O
O An+1)|.
\342\200\242
\342\200\242
\342\200\242
U
An+1)
(An
|AXUA2U . .
- | (Ax
We can
(2.8.12),
. UAj
U
An+1)
|An+1|
O An+1)
(A2
\342\200\242
. . U
(An H
An+1)
|.
(2.8.12)
equation
namely,
\342\200\242
\342\200\242
\342\200\242
|AXUA2U
EI^HAJ
UAJ-JlA,-!-
+ JLlAiHAjHA^
+ ..
(2.8.13)
. + (-l)-1
\\AlnA2n..
\342\200\242
ha\342\200\236|
and
I (a,
| a;
\302\243
\342\226\240-i
An+1 |
-\302\243
u
a\342\200\236+1)
n An+1
a,-
(An n
\342\200\242..
u
n <a,
|
a\342\200\236+1)
An+ly\\
>j
\302\243 |
...
(a2 n
u
a\342\200\236+1)
(A,
n An+1)
(-d-^kax
D(AnnAn+1)|.
(A,-
n
a\342\200\236+1)
An+1) n
(A2
(a*
n
n An+1) |
n
a\342\200\236+1)
...
(2-ai4)
Section
of Inclusion-Exclusion
The Principle
2.8
C\\
Aj
like
|AXUA2U
O An+l)
(At
t-l
\342\200\242
\342\200\242
\342\200\242
UAnUAn+1|
i,j,k<n
ij^n
...
+ (-Dn-1\\A1nA2n
...
(-lriA.nA.n
that
observe
sum is takenover
/,
nAn\\
...
+ T.\\Air)AjnAn+1\\+
Now
...
+ X] lA-nAynAj+
Zl^nA,|
EKI-
we have
D An+l,
Ak
(2.8.13)
Equations
Substituting
simplifications
221
\\An+l\\-it\\Ai
(2.8.15)
r\\An+1\\
1-1
nAnnAn+1|.
2?.x |At-
Pi
{ij} of
the first
where
An+1|),
sum
J, the
over
taken
is
be simplified
X]1 a,, n
where
the
the
second
{1,2,...,rc}
the
and
{i,
j,
can
to 2)tJ>* | A, D Aj H Ak | where
be simplified
{1,2,...,n,n 4-1},
over all 3-combinationsof {1,2,...,rc,n4- l}. Other similar
can
simplifications
also be made. Thus, Equation (2.8.15)becomes
n 4-
1} of
this
sum
is taken
|A,UA2U
*
EI
+
where
...
second
the
\342\200\242
\342\200\242
\342\200\242
UAnUA\342\200\236+1|
I*
\302\243
n.A,-1
+ EI
a,
n a
(2.8.16)
h\\
nAn+1|,
+(-iriA1nA2...
sum is
Ai
4- l},
of {1,2, ,n 4- l},
the third sum is taken over all 3-combinations
is
so on. In other
(2.8.16)
just Equation (2.8.10)
Equation
and
\342\200\242
\342\200\242
\342\200\242
words,
replaced
by n
4- 1.
The theorem,then,
Let
us give
is proved
an alternate
induction.
by mathematical
must show
with
for
A2 U
additional
\342\226\241
We
clarity.
An is counted
\342\200\242
\342\200\242
\342\200\242
U
exactly
(2.8.10).
U
A2 U
An is
\342\200\242
\342\200\242
\342\200\242
U
in exactly
of
222
Chapter
2:
Combinatorics
Elementary
the
sets,
Am+1,...,
2,..., m, in other
are C(m,2)pairsofsetsAhAj
x is
Likewise,
are
in both
3-combinations
C(m,3)
x is
where
At, A;,
| A,
and
At
A* where x G
- C(m,2)+ C(m,3)
C(m,2)+
and
expression
yields 0 - (1 -
(-l)mC(m,m).
since there
(2.8.17)
is 1. Expanding (1 -
l)m
the fact
Use
\342\200\242
\342\200\242
\342\200\242
4-
C(m,0)
l)m
- C(m,l) +
that C(m,0) -
1,
and
all
transpose
last
A, |.
since there
times.
(-l)m-1C(m9m)
this
that
theorem
binomial
the
1,
\342\200\242
\342\200\242
\342\200\242
+
P) A J
2-Li
(\302\243
x G
A\342\200\236
.,Am).
(namely 3-combinationsof the sets AUA2,..
x is counted
side,
manner, we seethat on the right
C(m,l)
A;.
Pi A;
2|At
| for
the
Pi A;|
x
i =
and
Am,
y?J times in
C(m,2) timesin
be counted
x will
Furthermore,
x G
A2,...,
be counted
will
words,
change
the
2.8.1
Corollary
|AxnA2n
|\302\243/|-El^l
... uaj
El^nA;-|
(2.8.18)
\342\200\242
\342\200\242
\342\200\242
-H\\AinAJnAk\\+
i,j,k
DAtn.-.nAt
+ (-i)n\\A,
count the
+ x24-*\302\253-+xn = r
to
2.4.2
Theorem
with
x1
xl + x2
4<x2<7
+ x3 = 20
J
and
know
We
that
U\\
C(20
each
-2<x3<9.
(xl9
-2-4
- {(xux2,x3)
used
together
i, the
us give
solution
x{ are
an
example.
to
(2.8.19)
where
(2.8.19)
\342\200\236
x2y x3)
+ 2+
where 2
< xu 4
3-1,3-1)-
Let
Ax
be
number of integralsolutions
where for
integers
Count the
2.8.6.
Example
by
can
G (7|x!>6}
< x2,
~ 2
< xz.
C(18,2).
Section2.8
The
A2
A3
We wish to
(Ax
A2 U
By the
|AX U
A2
{(xux2,xs)
{(xx ,x2
count the
,x3)
E t/|x2
> 8}
\302\243
U
> 10}.
of
number
| xz
elements
Ax D
in
A2
Now Ax
is
A3
A3).
U A2 U A3)| = |
principle of inclusion-exclusion
|(AX
=
U A3|
H A2| - |AX
| V\\
{| Ax| + |A2| + |A3|
|AX
-|A2nA3|
\342\200\224
2 <
223
of Inclusion-Exclusion
Principle
+ |AxnA2nA3|}.
the set of solutions of Equation (2.8.19)
where
6 <
U\\
xu 4
A3|
< jc2,
x3.
set
is the
A2
Similarly,
-6-4
C(20
Thus,|Ax|=
+ 2 + 3-1,3-1) = C(14,2).
of solutions of Equation (2.8.19)where
8<x2,-2<x3.
Therefore,!
A21
C(20
= C(20
A31
Likewise,|
2 <
xu
= C(14,2).
2-8 + 2 + 3-1,3-1)
- 2 - 4 - 10 + 3 - 1,3-
1)-
C(6,2).
set of solutionswhere
8 < x2, \342\200\224
2 < x3.
+ 2 + 3-1,3-1) = C(10,2).
Thus| Ax H A2| = C(20 -6-8
6 4 - 10 + 3 - 1,3- 1)= C(2,2),and
C(20
Likewisel
Ax Pi A3|=
=
H
C(20 2 8 10+ 3 - 1,3 - 1) - C(2,2).
|A2
A3|
= 0 since 20doesnot exceed
6 + 8 + 10.
Moreover,
| Ax Pi A2 Pi A31
=
+ C(10,2)
Therefore,| (Ax U A2 U A3) | C(18,2) 2C(14,2)C(6,2)
Now
Ax D A2
is the
6 < xx,
+ 2C(2,2).
be
\342\200\242\342\200\242
In how many ways can the letters {5 \342\200\242
c]
6,3
a, 4
that all the lettersof the samekind
are
not in a single
2.8.7.
Example
so
arranged
block?
letters.
Let Ax be
of these
Let U bethe setof12!/[5!4!3!]
permutations
of the letters wherethe5 a's are in a single block, A2 the
arrangements
and
where the 4 b's are in a singleblock,
A3 the
arrangements
the 3 c's are in one block.Then,
arrangements where
the
,A|_A4!3!'' lAl-iL
Ul-M
11
5!3!
\"
5!4!'
|A1nA2|-||,|A1nAa|-||,|A8n>4,|-^,
I
A,
O A2D
Aal-3!.
Thus,
|AinA2nA3l
12!
5!4l3l-te
/8!
9!
10!\\ 5! 6!
+
5!3l 5!4l)
3!
i!
7!
5!-3!-
224
Chapter
2: Elementary
Combinatorics
Example
mysteries of
2.8.8.
(The sieve of Eratosthenes).One of the great
mathematics is the distribution
of prime
integers
among the
We now
compute how
1 and
between
integers
many
remain
after the first 4
divisibleby 2,3,5, or 7, that is, how many integers
The
of
Eratosthenes'
s
ieve
method.
is
solved
problem
using the
steps
principleofinclusion-exclusion.
Let
be the
Ax
be
the
set of
by
2, 3,
5, and 7,
Pi
Ax n
x is
compute
We know
that
|Al|_L\342\204\242
(where
Au
LxJ
means the
500,
lA,!-11\"000
'\"\"
'
|A3|
1,000=
^-
200,
|A4| =
[\302\261^j=142,
,000
1^0^1
|A2nA3|
= 166
[^j=66,
100,
A2, A3,
A4
respectively. Thus,
by
6,
11 ^ x < J.,000and
D A2 H A3 D A41.
Section2.8
The
225
of Inclusion-Exclusion
Principle
M.n*|-[!g!j-47.
= 23,
lA.nA.n^i-^J-g,
Then,
I
Ax
U A2
A3
A41 =
500 +
333 + 200+
- 100 -
+ 33 +
71-
66
+ 14
23
142
47
+ 9
166
- 28
4
= 772.
Thus,
| A,
Example2.8.9.
to be relatively
prime
positive integer,<t>(n)
A2
A3 O
1,000
- 772 = 228.
Two
0-function).
(Euler's
if 1
A4\\
positive
only commonpositive
is the
integers
are said
is a
If n
divisor.
such
that
those in none
O
An | = |
U\\
is the
of integers x
number
x are
n and
of
the
| Ax U
subsets
A2
AUA2,
... , Ak,
\342\200\242
\342\200\242
\342\200\242
multiples of d in U.Hence
UAJ.
If d
so
</>(n) = | Ax
divides
rc, then
A2
there
\\At\\-^,\\AinAj\\-^,...,\\AlnAan...nAh\\-
\342\200\242
\342\200\242
\342\200\242
are n/d
^.
226
Chapter 2: Elementary
Combinatorics
principle of inclusion-exclusion,
by the
Thus,
0(n)-*-\302\243\302\243+
TTp
Thus, in this
(1/3)][1-
to
equal
= 2
30
since
formula
+ '
\342\200\242
\342\200\242
+
p-
(-\302\273*P pU
the product
\342\200\242
3 \342\200\242
5,
0(30)
- (1/2)] [1 -
= 30[1
(2/3) (4/5) - 8.
principle of inclusion-exclusion there is a
applicatipns
the
so that all the sets A, have
the
same
about
symmetry
properties
number of elements, the intersectionof any pair of sets have the same
number of elements,and so on. That is,
In
(1/5)]
30(1/2)
of the
many
04-041-
14
\342\200\242
\342\200\242
\342\200\242
of
1-combinations
\342\200\242
\342\200\242
41,
As |
the
sets,
C(n,2)
4|
U4|-n|4|-C(n,2)|A,0
O A2
+ C(ra,3)14
4-04I-.-
-I40
UA2U
|4-i
-I4H4I.
Then since
14
I4J,
141
I4I-|A2|
14 0 41-14 0 41'
\342\200\242
. \342\200\242
(2.8.20)
\342\200\242
\342\200\242
\342\200\242
(-D\"-Il4n4n
oaj,
and
I4040
+ C(n,2) 14
+
there
in
# 1, i2
.,n\\.
2,...,
C(n,3)
14
O 41
+ ..
(2.8.21)
OAJ.
(Derangements).
natural
and
in
Among the
permutations of
called
some,
its
O A2
\342\200\242
\342\200\242
\342\200\242
2.8.10.
Example
{1,2,..
4|-|t/|-\302\273|4l
O 41
(-l)\302\273|A1OA,0
are
{1,2,...,n}
integersappears
if i!
\342\200\242
\342\200\242\342\200\242
0
Section
The Principle of
2.8
that
we note
illustrations
As
derangement,
and
(2,1);
namely
227
Inclusion-Exclusion
=
0, D2 = 1 because there is one
=
2 because (2,3,1)and (3,1,2)arethe
D3
Dx
derangements.
only
for
to derive a formula
can be achieved by
want
We
This
n.
integer
Dn
exclusion.
U be
Let
the
of {1,2,^..,n]such
Dn =
HAJ.
A2D
\\AlC\\
The
\342\200\242
\342\200\242
\342\200\242
,,n}. For
of {1,2,..
permutations
(bub2f:. .,bn)
permutations
A2
be
the set
i/Then
An. Therefore
all of the form
\342\200\242
\342\200\242
\342\200\242
H
in
permutations
each i, let At
b, =
that
are
Ax
way we
<
n, the
see that | At
in
(1,2,.. .,k9bk+u...,6n)where
Thus,
|AX
Ax
nAj=(n-
OA2n
conditions
the
is a
permutation
An\\ =
\\U\\-\\AXUA2U
4-
\342\200\242
\342\200\242
\342\200\242
U
- 2)!
C(n,2)(n
(n
a ^-combination
in (2.8.20),
2)!.
k where
of {k 4-
form
1,..
.,n}.
generally,
|Atl D
of {1,2,.. .,n}.
more
and
\342\200\224In
of the
Ak are
k)\\y
prevailing
\\
integer
\342\200\242
\342\200\242
\342\200\242
D
1^2,.. .,ifc}
Thus, we have
A2
A2
.,6n)
(6/5+1,..
P)
= (n
Aj\\
permutations
so that | Ax
.fbn)
(1,2,63,..
so that
1)!
n\\-C(n,l)(n-
+ (-l)nC(n,n)
\"ra!\"l!
n\\
n\\
n\\
2!-3!+'
(-\302\273<
Thus,
(2.8.22)
In particular,
D, =
5!
1!+ 2!
on. In how
can the
ways
many
5!.
4!
be distributed
books
+
3!
distributed
to
44.
to n students. Suppose
students again later
the
student
no
will
Answer: The
second
first
time Dn ways.
time
are distributed
n\\Dn
books
the
(\302\253!)2
l!
2!
ways
n\\
is given
+ {-IT-.
n\\,
ways,
by
the
228
Chapter
2: Elementary
Combinatorics
Example 2.8.12.
from 1to 10inclusive,
the
the
satisfying
of
number
of the
derangements
that the
condition
integers
set of elementsin
is:
5 places
first
Findthe
some order,
(a) 1,2,3,4,5, in
(b) 6,7,8,9,10,some
in
order.
Answer,
(a) The integers 1,2, 3,4, and 5 can be placed into the first
5 places in D5 ways; the last 5 integers 6, 7, 8, 9,and 10 can be placed in
the last 5 places in D5 ways. Hence, the answer is D5 . D5 = 1936. (b) Any
so
arrangement of 6, 7, 8,9,and 10 in the first 5 places is a derangement
there
are 5! possibilities;
the same is true for the integers
and 5 in
1,2,3,4,
the last 5 places.Hence,
are
there
(5!)2 = 14,400 such derangements.
1.
certain
these2
center
can
in
program
2.
computer
47
these
languages?
given
in
and
COBOL
can
program
in Exercise
1,
COBOL
5 in FORTRAN,
in none of these 3
COBOL,
12 in
languages?
3.
insurance
An
company
claimed
to have
which
796
bought
auto
insurance,
667
fire
347 bought
bought
580
bought
auto
insurance,
and
fire insurance,
and
291 bought life and fire insurance,
263 bought auto, life, and fire insurance.
of
why the state insurance commissionorderedan audit
Explain
the company's records.
4. An advertising
has 1,000 clients. Suppose that T is the set
agency
ofclients that use television advertising, R is the set of clients that
who
use newspaper
use radio advertising, and N is the setofclients
advertising.
Suppose that \\T\\ = 415, |A| - 350, \\N\\ - 280, 100
Section 2.8
The
Principle
(a)Find|Tnfl (1
229
of Inclusion-Exclusion
and
radio,
N\\.
How
(b)
not
use radio
many clients
television?
but
use radio
not
advertising
and^do
advertising?
(d) Pind|rn/?nN|.
5. In a
800
of
survey
were
was found:
voters,
educated,
college
families,
300
325
were registered
high-income
165
Democrats,
from
were
registered
college
educated,
Let
families,and were registeredDemocrats.
E =
/=
{voters
were
from
D = {voters
who
were
registered
different
Venn
1<
7.
of the
regions
6. How many
<
Xi
How
8. How
< 6,
3 < x2
<
Democrats}.
<
+
<
x2 4- x3
9?
from
to
squares,perfect
the numberof integers
nor
cubes,
9. Find
divisibleby
of
integers
10.
none
of 5,6,
divisible
by
x34-x4 = 20if
<
solutions
are there of xx
7, 5 < x3 < 8, and 2
x4
many integers
of elements in the 8
the number
< xz
< 7,1
integral
many
2 < xx
< x2
families}
high-income
diagram.
solutions
integral
6,1
list
and
diagram
from high-income
college educated}
who
Draw a
and were
families
high-income
were
94
Democrats,
4- x4 =
20 if
neither perfect
1 and
between
1,000 inclusive that are
and 8. Note that the intersection
ofthe set
6 with the set of integersdivisible
by 8 is the
(d)
such
that no
place.
a 1
and
be
in the
natural
do not
end with
position.
10.
230
Chapter
2: Elementary
Combinatorics
11.
which the
S in
permutationsof
deranged is
A
is made
code
simple
with
letter
every
13.
Prove
that
14.
Eight
people
Dn
nDn_x
(- l)n
on
How
floor.
for n >
many
2.
elevator
an
enter
dischargespassengers
the fifth
...
by permuting
replaced by
being
can be
codes
different
floor
successive
each
different
The elevator
until it empties
\342\200\242\342\200\242
\342\200\242
how
c] be arranged
b, 2
ways can the letters {4 a, 3
many
that all the lettersofthe samekind are not in a single block?
bookbinder
In how
cloth.
used
one book?
17.
so
brown
is to bind 10 different booksin red,blue,and
many ways can hedothis if each color of cloth is to be
least
at
for
on
15.In
16. A
C(r,l)(n
- r)L
(-IYC(r,r)(n
12.
n\\
A is
At
many
ways
can their
hat?
his
own
(b) at least 1ofthemenreceives
men
own
hats?
2
of
the
their
at
least
receive
(c)
13-card
(a) onecardin
(b)
one void
bridge
suit?
each
How
21. (a)
How
the
rooms
many
ofthe
22.
there
at
with
integers
1, 2,
digits
(b) Howmany
card
are
ways
many
different
of 52
suit?
least
suit?
20.
have at
hands
a deck
each
of
digits
Three Americans,
a row. How many
least
cards
(honor
are aces,
to assign 20 different
in each room?
kings, queens,
people
to
1 person
between
1 and
106inclusive includeall of
3, and 4?
the
numbers
between
1 and 106inclusiveconsist
alone?
1, 2, 3\342\200\2364
be
seated
so that,
in
Section 2.8
The
(a) no 3 countrymen
231
of Inclusion-Exclusion
Principle
sit together?
may sit
together?
take
a quiz. Then for the purposeof grading,
23. Thirty
students
the
asks the students to exchange papers so that
teacher
no
one is
can this be done?
grading his own paper. Howmany
ways
24. In how many ways can each of 10 people selecta left glove and a
so that
no person
right glove out of a total of 10 pairs of gloves
selects a matchingpair of gloves?
(b)
25.
2 countrymen
no
of a chessboard
are painted 8 different
colors.
The
of each row are paintedall 8 colors
and
no 2 consecutive
In how many
squares in one column can be paintedthe samecolor.
ways can this be done?
The
squares
squares
26. How
mean
27.
How
before
M's,
How
integers
both
many
How
between 1 and
30. Suppose
letters the
a person
that
friends
to dinner
bedoneso
prime
integer
to
prime
iff
of MISSISSIPPI
1 is
50?
the only
with
no
pair
same?
10 friends
with
every
of the word
or both A's
\302\243?
50 are relatively
to the
are there
arrangements
many
of consecutive
the
M's before
or both
/
we
just immediatelybefore.)
*29.
c, or c
before
before, not
arrangements
with
many
MATHEMATICS
28.
before b, or b
anywhere
are there
arrangements
many
either a
with
night
for
invites a different
10 days.
subset
of 3
at least once?
of
3
a's, 3 b% and 3 c's
many
arrangements
the
without
3
consecutive
same?
letters
(a)
no adjacent
letters the same?
(b) having
32. Same problemas 31for 3 a's, 3 b% 3 c's, and 3 d's.
in a
n letters and their correspondingenvelopes;
33. A secretary
types
at
the
she then puts the lettersinto
fit of temper,
envelopes
so that
the letters
random. How many ways could she have
placed
that
31.
34.
all
friends
are included
are there
How
how
many
letters the
same?
35. Use
the
primes
principle
between
of inclusion
exclusion
41 and 100 inclusive.
to count
the number of
232
Chapter
Combinatorics
2: Elementary
there
are
or
may
of thirty
Each
38.
students is taking an
examination
another
examine
a student in a subject.
examinations be scheduled without
In
a
how
different
subject
5 minutes
and
to
can
the
ways
many
student
39.
two
in
subjects.
to
required
being
different
three
digits?
41. How
can
numbers
4-digit
many
number
k different
123,143?
42.
exactly
numbers
6-digit
if the
1,223,145,345
can be composed
of the
in
digits
the
row?
How
44.
many
number
row?
45. (a)
In how
11,223,344
if
46.
(b)
Solve
Use
the
part
sieve
of
47
2. 100-
35 +
47
35
1. 100
4. (a)
- 41.
- 20 + 23 + 12+ 1123
= 39.
75.
T| = 80
(c) |rn^nfl|-i75.
I
T n
R n
N\\
(b) \\RHNn
(d)
the
in
number
2.8
Section
for
Answers
same
the
(a) for
200.
Selected
can
ways
many
of
| T
U R
N\\
1,000
- 625 = 375.
Section
of Inclusion-Exclusion
The Principle
2.8
233
5.
325
55
90 \\
\\
4.5
9\"4
71 V/
nL61
99
Figure 2-14
\302\253\342\226\240
PS)
PS)
= 217.
9. 1,000
10.
(a)
(c) 10!-
(d) 10! -
Z>26.
48
15.
+ (>,
+
(3)9!
(>.
\302\2518!
\302\2517!
(!)
25+ 41) - 8 -
(!)
2l
310
(3)210 +
17. (a) Ac
(b)
- (!)
600.
+ Qz,,.
0.
\302\2516!
\302\2515!.
I 3!2!
4!3!2!
10!
(c) 10! -
'Ml)
\342\231\246
+ 8!.
4! 5! 6!
16.
(!)
- 7!.
(3)8!
(f)9!+
- (2)9!
10!
(e)
14.
\302\251
+ (33 +
+ 125)
166
C(10,6)D6.
,b,0.
12.
(200
C3 - PS
(1)
3!
3 ways.
D10.
D10
<(1) +
10D9.
\302\253PD-\302\253P3-
o1
4!-3!
4!2!
871.
4!3!/
A2 the
234
Chapter
2: Elementary
Combinatorics
*\302\253(S)-G)\302\256*G)(S)-G)-
20. 320
21. (a)
(b)
\342\200\242
220 +
106+
. 86 43 + 44 + 45
42 +
22. There
9!
are
3.
+ 6
. 96
. 76 + 66.
of
permutations
- 4)/3.
the 9 people. If Au
46 =
(47
A2,
A3 is the
3 Mexicans
and
3 Americans
set of permutations with
together,
and
3
Canadians
together,
together,respectively^henJA,
\\At H
Aj\\
Ax H A2 H A3| = (3!)4.
- (3!)4.
+
3(3!)25!
\342\200\242
2!8!
+ 27(2!)27! + 3 . 3!7!
. 3!(2!)25! - 9
27
+
3!3!5!,|
9! - 3 . 3!7!
(b) 9! - 9
A*.
24.
(10!)D10.
paintedDs
Hence
ways.
REVIEW FOR
A2
| =_3!7!,
D A3| -
the
row
Each
number
(3!)4.
of ways
after
the first
can be
is 8!(D8)7.
CHAPTER
1.
C\\
- 27(2!)36!
- 18. 3!2!6!
+
(3!)22!4!
3(3!)25!
23.
Thus,|Ax
How many
(a) there
must
2. How
occur
together?
many ways
are there to
the
arrange
letters
of the
word
MATHEMATICS?
Consider
(a)
How many
(b)
How
many
(c)
How
many
Give
words
5 vowels
with
consonants.
different
4.
and
10-letter
only
a combinatorial
c?
(5n)\\/5lnn\\
is an
integer.
5. In a classof 10girls
and
6 boys,
how many
be selected?
(a) ways can a committeeof5 students
be chosen?
(b) ways can a committeeof 5 girls and 3 boys
contain
(c) ways can a committee be selectedthat
students?
3,
5 or
Section2.8
The
Principle
235
of Inclusion-Exclusion
each?
(h)
each have
second team
and the
3 each
have
be divided
students
the
can
ways
4 students,
fifth
has
team
team
and
the
fourth teams
with
3 of each sex but
(i) committees of 6 students canbeformed
G
B
and
on
cannot
both
be
the
committee?
boy
girl
6.
is a multiple choicetestwith
but only 1 correctanswer
to each
20 questions
with
test
each question
for
5 answers
question.
How
How
many
integral
many
ways
8.
How
can 20
indistinguishable
of xx
- 20
books be arrangedon
shelves?
different
9. How many
(c)
10. (a)
(b)
1 pair?
exactly
(o) -(\")
(c)
theorem to
the binomial
Use the
(*)
prove
O-o.
-\302\251\342\200\242\342\200\242\342\200\242\342\231\246<-\302\273\342\226\240
[(S)+ft)+---+fc)r-g(^).
(d)
Give
a combinatorial
proof that
236
Chapter
Combinatorics
2: Elementary
that
(e) Prove
C(n + 4,r) -
C(n,r)
- 1)
4C(n,r
4C(n,r-3)
of inclusion-exclusion
11. Use principle
400.
of primeintegersless
2)
to determine
the
the number
than
12.
the number
Find
have
at
one
least
card in
each suit.
14. Use
notation
the
(a)
of
of the
permutations
do not
letters
same
the
that
letters of
appear together.
\"
for (n * + r)
to stand
TOMTOM so
. Then
prove
(;)-(\302\253_-1) (V)
15.
different
How
many
word
CONNECTICUT
(a)
With
no two
that
words
have
C's adjacent?
(b) If thereareonly
(c) If there is exactly
16. Suppose
are there
arrangements
four
one
letters
in each
consonant
arrangement?
each pair of vowels?
6-letter
alphabet. How many
between
a 15-letter
we
have
exactly 3 consecutive letters the same?
Recurrence
Relations
3.1
OF
FUNCTIONS
GENERATING
SEQUENCES
3.1.1. The
Example
(1,2,4,8,16,..
br =
b9 = 2,
bi0
3,
b0
if5<r<9
3
4
ifll<r
= bx =
br = 4
and
{2r}\"_0
is
the
sequence
where
if0<r<4
(0
is the sequence
where
sequence
sequenceB = {6r};_0
.,2r,...); the
ifr=10
b2 = b3
for
all
b4
0, b5 =
r >
subscripts
b6 =
b7
11 thus,
b8 =
B =
r + 1
C {Cr}^0> where Cr =
The sequence
(0,0,0,0,0,2,2,2,2,2,3,4,4,...).
D
value
the
each
of r, is the sequence (1,2,3,4,5,...),
sequence
=
r2
is
each
the
r, dr
{dr)r-owhere,
sequence(0,1,4,9,16,25,...).
=
for
and
for
The
we
letter
another
will
sequence
denoted
be interested
use
for
the subscript
the
do
237
238
Chapter
Relations
3: Recurrence
4- x2
*i
where n is a fixed
ar be
the number
xn =r
\342\200\242
\342\200\242
\342\200\242
4-
constraints. Of
let
each
of
(3.1.1)
xt
to certain
is subject
recall
from Section
the constraints
are only that each x, > 0,then
we know
instance,
=
=
1
In
other
+
C(n
r,r).
C(n
ar
words,
1,0) 1, ax =
a0
=
=
a
nd
In
so
on.
this
will
+
there
be infinitely
C(rc,l)
n, a2 C(n
1,2),
case,
of
nonzero
the
A.
terms
many
sequence
However,if each xt is restricted so that 0 < x, < 1,then in particular
distribute
more than n balls into n
+ l becausewe cannot
ar = 0ifr>n
boxesif each box can contain at most 1 ball.Hence,in this case,
If,
for
that
if0<r<n
\\C(n,r)
ar =
Likewise if
for
ar
0 <
previous chapter
exclusion
will
a0
be
+ 1
< r.
this
thus far. By comparing
developed
case n =
if
xt <
< 2rc is
if r
you
required.
might
realize
In fact,
with
problem
that
the
the reader
may
Example
2.8.6 in the
principle of inclusionwant
to verify
that, in
3,
=
=
1, ax
C(7,5)
= 3, a2 - C(4,2),a3 = C(5,3)
- 3C(4,2), a6 = C(8,6)
- 3,
a4 - C(6,4)-
- 3C(5,3)
+ 3.
9,
a5
values
course,
for xt
Since
old and familiar:multiplication of polynomials.
polynomials
only
caninvolve
involve finitely many nonzero terms and sequences
infinitely
nonzero
terms, we introduce the conceptof generating
many
for
that
a generalization
of the concept of polynomial,to allow
function,
will
be the most abstract
The use of generating functions
eventuality.
Section3.1
technique used in this textto solve
method is masteredit
spectrumofproblems.
To
the
... +
- 2\".o ar^r-
...
degree i,
term
the
and
are
coefficients
really
a0
what are
the
A(X)
A =
sequence
The
words
could
use,
that
term of
term. The
X1
symbol
is simply
power
for
are
function\"
word
The
coefficients.
of X
powers
by contrast,
symbol A
is the
a,X'
the constant
the
a0 + ax X
a formal
for this
aif and
this
broad
{ar}^0-
\"generating
A(X) generatesits
the fact
of interest;
is called
arXr
2\302\243_0
term
the
a0 is called
=
X\302\260
to apply to a
power
but once
problems,
method
easiest
A = {ar}\"_0, we
sequence
anXn
combinatorial
the
be
will
239
of Sequences
Functions
Generating
will
suppress
to
in
our
abstract
students
ar Xr and the concept of powerseriessome
2\"_0
in calculus courses. We emphasize
in our concept X
that
a numerical value if there
are infinitely
many
assigned
(X)
may
have
seen
will
never
be
we
nonzero coefficients in the sequencegenerated
A(X).
Therefore,
by
of
avoid having to discuss such topicsas convergence
and
divergence
in
often
discussed
calculus
courses.
power series, topics
If all of the coefficients
are
zero
from some point on, A(X) is just a
=
> k + 1, then A (X)
If
0
and
for
0
i
is a polynomial
a,
polynomial. ak ^
of degree k.
Example 3.1.2.
A(X)
The
= X>X',
r-0
B(X) = 2X5
2X6
\302\243>(X)
Y.(r
r-0
+ 2X8 +
+ 2X7
+ 4X12+
+ 4XU
C(X)
functions
generating
2X9
3X10
\342\200\242
\342\200\242
\342\200\242
+ l)Xr,
f>2)X'
r-0
generate the
sequencesA,
Definition 3.1.1.
formal
power
series.
Let
D of
C, and
B,
A(X)
We then
2T.0
define the
Example 3.1.1.
Xr,
\302\253r
following
B(X)
= 2S% bs
concepts.
Xs be 2
240
Chapter
3: Recurrence Relations
Equality:
= B
(X)
Multiplication
Sum:
productsa;
the
product
= ^^na}bk.
a; bk means
of
B(X) is obtainedby
it
coefficient
in B(X)y
by the
ax of X
coefficient
in A (X) and
Xn
of
bn
multiply
and so
of
formal
j and k is n. Sincethese
taking
see
the term Pn
that
the
of all
sum
of 2
product
take the
A (X)
= 2;.o (Car)Xr.
X\\
2;+/?.n
0.
C: CA(X)
number
the
where
correspond
subscripts
in
bk
each n >
- ^PBr,wherePn
time to
some
= bn for
an
scalar
A(X)B(X)
take
us
Let
iff
= 2S-o(\302\253\302\273
+ 6n)
+ B(X)
A(X)
Product:
by
(X)
possible
from
Xk
bk
Xn
by
B(X)
starting
A(X) and
in B(X);
then proceed to the
it by the coefficient bn_x of Xn_1
of
corresponding
increasing
decreasing
a0 of
of X in
X in
of
powers
powers
B(X) as follows:
n
Pn = Go&n
axbn_x
a2bn_2
\342\200\242
\342\200\242
\342\200\242
+
+ anb0
an_xbx
5Ia\302\273bn-r
\302\243-0
Thus,
A(X)
= a060
B(X)
(a0&i
\342\200\242
\342\200\242
\342\200\242
+
(a0bn
\302\253i^o)^
+ axb^;
(\302\253o^2+
+ a26n_2+
aA
+ a2b0)X2
\342\200\242
\342\200\242
\342\200\242
4-
anb0)Xn
\342\200\242
\342\200\242
\342\200\242
+ a8X8andB(X) =
moment
we are not assigning
64
b0 +
mean
that the coefficients are zero
any values to the coefficients\342\200\224we
just
for
the
of Xr in A (X) B (X) is
missing
powers of X), then the coefficient
found
the powers {X\302\260,
X3, X4, X8} from the first factor and
by considering
the powers
factor such that their sum is r.
{X\302\260,X4,X5,X8} in the second
X\302\260
Forinstance*
in the first
the
of X8 can be obtained by using
coefficient
factor and X8 in the second;X3 in the first and X5 in the second; X4in the
X4 in the second; or X8 in the first
in the
X\302\260
first
and
and
second factor.
is such that P8 of X8 in the product A (X)
B(X)
Thus, the coefficient
and (8,0) are the only
4- a3 65 4- a4 64 4- a8 b0f because
(0,8),(3,5),(4,4)
po b6
whose sum is 8.
and
B(X)
pairs of exponentsofA(X)
Example
If A(X) = a0 4- a3X3
X4 + b5 X5 4- 68 ^8 (wherefor the
3.1.3.
+ a4X4
Section3.1
241
of Sequences
Functions
Generating
5.
if a0
Thus,
= 2,
3, then P8 =
b8
(2) (8) = 16. Of
a3 -
-5,
(2)(3)
= 7,
a4
(-5)(8)
4-
course, we can
coefficients to seethat with these
A(X)B(X) = 6 -
+ 30X7 -
+ 16X5
9X4
15X3
- 15X11 +
4- 56X9
67X8
3X12+
24X13
9X16.
of A(X)
and
the case where all the nonzerocoefficients
However,
interest.
Note that in this case, P8 = a0 b6 4B(X) are 1 is of special
the
case,
a3 65 + a4 64 4- a8 b0 = 4, and P5 = 1. In particular,in this
of pairs
of exponents
coefficient of X8 in the product is just the number
of X8 in the product (1 + X3 4whose sum is 8, that
coefficient
is, the
X4 4- X8) (1 4- X4 4- X5 4- X8) is just the number of integral solutionsto
= 8, where ex and e2 represent
the equation
the exponents of A (X)
ex 4- e2
and B(X),
Hence ex can only be 0,3,4,or8 and e2 = 0,4,5, or
respectively.
We
(1
X3
4-
stumbled
4- X4
solution
of
(1
restrictions
(1
4- X4
4- X5
X4
4-
4- e2 = 5 with these
4- X3 4- X4 4- X8)
a clue
upon
4- X8)
to ex
X5 in (1
= 0,3,4,8
to the equation ex 4- e2 = r subjecttothe constraints
ex
=
of the factors in the product
and e2 0,4,5,8.Note that the exponents
reflect the constraints in the equation.Note alsothat we can view this
clue in two ways. We can compute
the coefficient of Xr by algebra and
the
of integral solutions to the equation ex 4- e2 = r
then discover
number
all solutions of the equation
subject to the constraints;or we can compute
and
then
discover
the coefficient of Xr.
subjectto the constraints
solutions
Generating FunctionModels
if we
wanted
to
Thus,
solutions
to an equation ex
we would expect that we
count the
4- e2
need
only
A(X)
on
number
= r with
ex and
of
integral
nonnegative
certain constraints on ex
find
the
B(X),
coefficient
where the
the exponents
and
e2,
of Xr in the
exponents of
of B(X) reflectthe
= 1
let A(X)
be 0,1, or 9,
<
<
1 4- X2 X4
B (X)
X X9. If e2 can only be even and 0 e2 8,
X6 4- X8. On the other
if ex can be any nonnegative integer
on
constraints
if ex
e2. Thus,
can only
then
then
4-
4-
number
we
let A(X)
= 1
of Jerms].
Likewise,
4-
value,
hand,
then
4-
4- X2...
[in this case, A(X)
if e2 can only take on the integral
has an infinite
values,
say,
242
Chapter 3: RecurrenceRelations
of 5, then we let B (X) that
are multiples
are
endless.
you seethat the possibilities
we can extend what we have
Moreover,
the
definition
than two variables e, because
1+
ax)
No doubt
X10 +
to
said
with more
of formal power
equations
of product
B(X) -
X5
J2bjX\\
\302\243>***.
Then
A(X)B(X)C(X)
f^PrXr
r-0
where
i+j+k~r
that
is, the
a, X1 from A
from
one term
reader
our rule:
Assume each
nonzero coefficient
Ai(X) is 1. Then
the
\342\200\242
\342\200\242
\342\200\242
A2(X)
can
An(X)
power series
the product AX(X)
as the number of
interpreted
\342\200\242
\342\200\242
to an equation
+
ex + e2 + \342\200\242
be
nonnegativeintegralsolutions
en =
formal
each
of
of Xr in
coefficient
e, are
determined
by
the
exponents
Of
this line of reasoning
course,
count the number of nonnegative
\342\200\242
\342\200\242
constraints
+
en = r with
^2 \342\200\242
generating
to
the
function
the
answer
0,3,8
are
only
those
(X)
integral solutionsto
A2(X)
ei9 then
each
on
whose
\342\200\242
\342\200\242
\342\200\242
An
(X)
an
a problem
ex +
equation
we can
coefficient
to
build a
of Xr is
problem,
3.1.4.
Example
because
the
Ax
can be reversed.Given
The
solutions
solutions
coefficient
of ex +
3
where
of
e2
4-
X9 in
is C(10,3)
(1 + X3 + X8)10
each e, 9
where
e10
\342\200\242
\342\200\242
\342\200\242
4-
values are
the
Section
3.1
Generating
243
of Sequences
Functions
is 10!/3!2!5!
3's, two 8's, and
X25
of
three
0's.
five
the number of
nonnegative integral solutionsof ex + e2 4- e3 4- e4 4- e5 = r where0 <
< 3, 0 <
e2 < 3, 2 < e3 < 6, 2 < eA < 6, e5 is odd, and 1 < e5 < 9. Let
ex
=
AX(X)
A2(X) = 1 + X + X2 + X3, A3(X) = A4(X) = X2 + X3 + X4 +
= X + X3 + X5 + X7
X5 + X6, and A5(X)
the generating
+ X9. Thus,
function we want is
3.1.5.
Example
A2(X)
AX(X)
A3(X)
Find a
generating
= (1
A5(X)
A4(X)
ar =
for
function
+X
+ X4 +
(X2 + X3
(X + X3
+ X3)2
X2
-t- X5
X5
X6)2
4- X7 +
X9).
equation
Example
is C(n,r).
3.1.7.
ar
- the
en = r
number of
where 0 < et
for
i.
Here
AX(X)
4- e2 4-
for
\342\200\242
\342\200\242
\342\200\242
4-
since there
A2(X)
is no upper bound
=
\342\200\242
\342\200\242
\342\200\242
An(X)
(1 4-
...
4-
= irC(n-l
(t^XkY
r-0
U-0
/
r,r)Xr.
In particular,
\302\273
2
Y.X\")
*-0
(oo
\302\260\302\260
=H(r
+ l)X',
r-0
and
r-0
(r 4- 2)(r
4-
the
on
constraint
X 4- X2
1)
4-
Xk
e/s,
we let
.. .)*.
Using
must be another
244
Chapter
Relations
3: Recurrence
= 2, C(n -
since for n
(r +
r,r)
= r
+ 1 and
for
= 3,
C(n
- 1 + r,r) =
+ l)/2.
(r
2)
3.1.8.
Example
ar =
for
boxes
n numbered
into
the number of
where each box
is nonempty.
we
namely,
e2 4-
en =
\342\200\242
\342\200\242
\342\200\242
4-
(2r.x
each et
r, where
>
1.
the generatingfunction
equal
Xr)n, which by Theorem 2.4.3must
in turn,
Then,
reader
(The
model
we
First
problem;
coefficients
we build
(X
C(r
2?_n
a combinatorial explanation
of Xr are all zero if 0 < r < rc - 1).
should
give
ar =
for
X2 +
- l,n
as to
\342\200\242
\342\200\242
\342\200\242
)n
- l)Xr.
the
why
of
the number
2 distinguishable
dice are tossed.
2
and
the first shows an even
(b) distinguishablediceare tossed
number and the secondshows an odd number.
6 specified
dice show an
(c) 10 distinguishable dice are tossedand
even numberand the remaining
4 show
an odd number.
(a)
+ X5)4.
X3
function
to count
Example 3.1.10. Find a generating
integral solutionsto el + e24- e3 = 10 if for each i, 0 < et.
Here
we
coefficient
a model for
can
take
of X10 in
the
two
(1 +
distribution
approaches.
X + X2
4- X3
of 10
Of course we
+
\342\200\242
\342\200\242
\342\200\242
But
)3.
of
the number
since
the
the equation
is
Section
3.1
Exercises
Generating
3.1
for Section
1.
function
to the equation ex
< 3 for each L
et\342\200\242
< 5 for each i.
et
Build
(a) 0 <
(b) 2 <
(c) 0 < exforeachi.
0 < ex < 6 and ex
(d)
is even;
a generating function
(a) the numberof ways
2. Write
number of ways
(b) the
of
supply
can
second
(d) the
of
dice.
3. In(l +
dimes and
unlimited
quarters.
formed
number of integersbetween
X5
from an
upon tossing50
want in (d) if
we
total of 100
50 dice?]
the
tossing
r coins
selecting
to know
upon
2 <
of obtaining
a total of r
do we
coefficient
[Which
ways
distinguishable
want
integral
letters
number
of
if:
appear
can
letter
remaining
of
pennies,
of r-combinations
letter
first
= the number
= r
e3
nickels,
isr.
of
+ e2 4-
balls.
7 white
balls,
(e) the
for ar
generating
solutions
(a)
245
of Sequences
Functions
999 whose
0 and
sum of digits
X9)10find
the coefficient
of X23.
of
X32.
4. Find the
5. (a) Find
revisedgeneratingfunction
6.
Find
a generating
function
distributing r similar
balls
second,third, fourth,
7*
(a)
Find
a generating
nonconsecutive
8.
(b)
Which
coefficient
(c)
Which
coefficient
Build
(b)
ar
into
the
numbered
number
of ways of
boxes where the
function
for ar
- the
number
distribute
(a)
generating
combinatorially.
for
of
select
ways
to
Chapter3: Recurrence
Relations
(c)
(d)
(e)
most
at
a multiple
a multiple of 100ballsin
9. Find
3 balls in
at least
and
3 boxes
first
a generating
5.
box
of r-combinations
number
the
for
function
of
{3.a,5.6,2.c}
10.
a generating
Build
making change
and half-dollar
11.
Find
function
a generating
ar
Selected
1. (a)
(1 + X +
X2
(c)
(X
(d)
(1 + X2
+ X2+
if0<r<2
if3<r<5
ifr>6
X5)3.
\342\200\242
\342\200\242
-)3.
(1 +X
where
{ar}\"_0
X3)3.
(b)
(X2 + X3 + X4 +
2. (a)
A =
sequence
3.1
Section
for
Answers
the
for
of
X*
X2
X'XX3
X3)(l
+ X5
+ X
+ X7)(X5 +
X6
X7).
\342\200\242
\342\200\242
\342\200\242
+
+ X
+ X5 +
X7)(l +
X5)(l
\342\200\242
\342\200\242
\342\200\242
+
X7).
\342\200\242
\342\200\242
\342\200\242
+X\"+
(b)
(1+
(c)
(1 + X2
\\n-2
(d) (X
(e)
3. (a)
+ .\". .
(1 +
X +
32 can
X9)3.
with
e10
one
with
5,
10!/l!2!7!.
be otained only
of
four
\342\200\242
\342\200\242
\342\200\242
4-
X32 is
those
\342\200\242
\342\200\242
\342\200\242
+ X\"
+X6)50;a10o.
is
coefficient
+ X3
\342\200\242
\342\200\242
\342\200\242
+
done only
(b)
-)4.
X12)(X
Solve ex + e2 4coefficient
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
+
4's,
with
three
9's, one
10!/3!l!6!.
+
no S's,
seven
e2 4-
16 where et = 0,4,8are
S's, no 4's, and eight O's;
e10 =
\342\200\242
\342\200\242
\342\200\242
+
Thus
the coefficient
is
Section3.2
6. (1 + X7.
+ X2.
\342\200\242
-)3(X
(a) (1 + X . . -)2 (X
as dividers for 7 boxes
5 boxes
other
-)4.
+ X2
of
(c)
Coefficient
of X\"-6.
X14.
X3)(l
of
(1 + X
(1 + X5
X2
-)5.
are nonempty.
the
Coefficient
+X
6 integers chosen
last box can be empty
of the
\342\200\242
\342\200\242
Think
where
(b)
11. 1
247
\342\200\242
and
9. (1 + X + X2 +
10. Findthe coefficient
Functions
of Generating
Coefficients
Calculating
+ X
Xm
in the
X2
\342\226\240
\342\200\242
\342\200\242
+
X5)(l
product of
Xm)
+ X10 + . .
X10 +
(1 +
X25
(1 +
X50
+ X100).
\342\200\242
+
X100)
\342\200\242
\342\200\242
\342\200\242
+
X20
X50
+ X75
+ 3X4
+ X2).
\342\226\240
\342\226\240
\342\200\242
+
(1 +
+ 3X3
+ X
X100)
+ X100)
+ 3X5.
3.2 CALCULATING
COEFFICIENTS
OF
FUNCTIONS
GENERATING
in building
to this point we have
been
interested
Up
primarily
to combinatorial
generating functions to determinesolutions
problems.
of
We now develop algebraictechniquesfor calculating
the coefficients
functions.
generating
we introduce
The most important
is that of division of
concept
formal powerseries.First let us discuss the meaning of 1/A(X).
have
series
B(X)
In particular,
if
a0
= 1,
b0
a0 # 0, then
so that
we
Xk such
2\302\243_0
bk
A(X)
has
X\" is
2\342\204\242_0
o\342\200\236
inverse
a formal
if there
that A(X)B(X)
= 1.
a multiplicative
inverse, then we
can
determine
the coefficients
is also
true.
see that
In fact, if
from the
X in A(X)B(X)
of
the coefficientsof successivepowers
these to the
definition of product of 2 power series,and then equating
we
1. Therefore,
series
coefficients of like powers of X in the power
have:
248
Chapter
Relations
3: Recurrence
a0b0 =
= 0
4- axb0
a0bx
a0b2 4- axbx
a063 4- axb2 4-
a0bn 4-
= 0
a2b0
= 0
4- a3b0
a26i
. . . +
axbn_x
we can
solve for b0
anb0 =
0,
and soon.
From
first
the
equation,
l/a0;
from
we
the second,
find
-axb0
61
third equation, we
in the
-ax
n\342\200\224 ~^~;
a0
a0
get
\342\200\224 \342\200\224
axbx
62 =
\342\200\224
\302\2602ao
ai
^2^0
a\\
a0
from the
we
fourth,
find
for
b3
this manner,we
Thus,
reader
the
iff
familiar
is doubtless
C(X)
Of
not
such
course,
be
the
that a0
is a
there
and we
for arbitrary
case that A (X)
# 0, then A(X)
of
of that
division
with
coefficients
extension
an
a formal
nothing morethan
a3b0
a0
that
inverse
a multiplicative
The
involving
can
solve
established
we
a2bx
into
substitute
can
We
expression
-axb2
b3
B(X)
of polynomials
= 1/A(X)
as
Xn
has
zero.
and, in
above is
idea.
C(X)
formal
are
power
series, we
power series
say that
formal
divides
has
is
C(X). However, if A (X) - 2\302\243_0
a>n Xn
a multiplicative
inverse B(X)
1/A(X)
Section
Coefficients
Calculating
3.2
and then
l/A(X)).
If A(X) - 2\302\243_0\302\253n
Xnf
zero, then let ak be the
of Generating
Functions
- C(X)B(X)
letD(X)
249
= (C(X)
of A(X)
is not
0, but some coefficient
nonzero coefficient of A(X), and A(X) term of AX(X),is nonzero.Then
where
in
a*, the constant
X*AX(X),
Xk is also a factor of
order
for A(X) to divide C(X) it must be'truethat
If
series.
C(X), that is, C(X) - X* CX(X) where CX(X) is a formal
power
X
this is the case,then cancel
the
common
of
A
from
both
and
(X)
powers
= CX(X)/AX(X)
and then we can find
C(X)
C(X)/A(X)
by using the
a0 =
and
first
Series
what we have
learned
to
= 1 - ,X. Let B(X) for 60,61,...,as above,we see
us use
Let
inverse
for
successively
A(X)
the multiplicative
determine
=
1/A(X)
S^o^X\".
Solving
that
&0-l-lf
a0
(-D(l)
-axbo
^-\"^r\342\200\224iir\"1'
,
-a^-a^o
b2
b3
a0
-alb2 -
a2bi
bt =
each
replace in the
If we
see
we
azb0
]T
have
we
an
called
expression
Xr.
above expressionX by
for the
(3.2.1)
aX
where
a is
a real number,
that:
(3.2.2,
j-^-M
the so
1,
1,
1 so that
1-X
then
- (0)(1)
=
-(-!)(!)
geometric
series
(with
common
ratio a).
250
Chapter
Relations
3: Recurrence
1; then we
let a
In particular,
so called
- X
- 1
\342\200\224^\342\200\224
=
\302\243(-DrXr
A
+
r_0
the
get
- X3
X2
... ,
(3.2.3)
series. Likewise,
geometric
alternating
4-
\342\200\224^\342\200\224=
(3.2.4)
J(-ira^
\342\200\242
Suppose that n is a positive integer.If Bl(X),B2(X),.,andBn(X)
\342\200\242
\342\200\242
inverses
of
and
multiplicative
AX(X),A2(X),. ,
An(X),
\342\200\242
\342\200\242
\342\200\242
is the multiplicative
inverse of
respectively, then
Bi(X)
B2(X)
Bn(X)
\342\200\242
\342\200\242
\342\200\242
.
.
.
Al(X)A2(X)
An(X)\342\200\224just multiply
A1(X)A2(X)
An(X) by
\342\200\242
\342\200\242
\342\200\242
= I for each
and use the facts that A( (X)Bi(X)
Bl(X)B2(X)
Bn(X)
is the multiplicative
inverse of A(X), then
, i. In particular,if B(X)
is the
of
inverse
this
(B(X))n
(A(X))n. Let us apply
multiplicative
observation
to A (X) = 1 - X.
n a positive integer,
For
are the
-i\342\200\224
The
first
the second
2?_0C(n -
could
C(n
4-
r,r) X'.
(3.2.5)
observed
X)n =
also be
- 1,0)
1 +
4-
C(n
\302\243
multiplicative
from
follows
equality
is the
Xk
2\302\243_0
X*)n
(J
(1
\342\200\2241\342\200\224=
\\i
Following this
obtain
J C(n
r_0
a;
4-
- 1 4-
pattern, replaceX
*
YVt
*
n
Yv.
by
E C(n
-
C(r\302\273
\302\243
aX
4-
in
identity:
(3.2.6)
r,r)(-l)'X'.
- 1
1 +
following
(3.2.5)
r,r)arXr,
r,r)( -a)'X'.
and (3.2.6) to
(3.2.7)
(3.2.8)
Section
Likewise,
replace X by
in
Xk
of Generating
Coefficients
Calculating
3.2
Y.Xkr
\342\200\224^\342\200\224k
\342\200\224
A
r\342\200\2360
= 1
for k a positiveinteger,
to get
(3.2.1)
Xk
251
Functions
X2k
\342\200\242
\342\200\242
\342\200\242
(3.2.9)
and
=
\342\200\224^
If a
(3.2.10)
E(-DrX*r.
is a nonzerorealnumber,
1
1/
a \\1-
- X
\\
,oo,,x
l^Xr
a 73
A/a/
and
is a
is a
ra
(1 +
(1 +
(1
(1
4-
X)n = 1 + (J) X
-
1 +
(J)
Xk
- X)n = 1 -
(l)
1-
(1)
- X*)\" =
The formulas
theorem.
r_0
X2
\342\200\242
\342\200\242
\342\200\242
+ Xn
\342\226\240
1~Xy
(3.2.13)
integer,
positive
X*)\302\273
\342\200\224
X
integer,
positive
1+
If
that we will
identities
Other
If
\342\200\224
a
X*
(j)
g)
(j)
g)
X2 +
\342\200\242
\342\200\242
\342\200\242
+
(J)
X2* +
X2 +
\342\200\242
\342\200\242
\342\200\242
+
(J)
X\"
X\"*
\342\200\242
\342\200\242
\342\200\242
+
X2* +
(3.2.14)
(-1)\"
(J)
(3.2.15)
X\"
(3.2.16)
X\"*
\342\200\242
\342\200\242
\342\200\242
+
(-1)\"(|J)
of
the
(3.2.17)
binomial
Chapter3: Recurrence
252
Use
of Partial
Relations
Fraction
Decomposition
compute C(X)/
how to
show
we
fractions.The readerwill
A(X) by using
=
that
is
from
a
of
recall
algebra
product linearfactors,A(X)
\342\200\242
\342\200\242
\342\200\242
if
and
is
of
(X
C(X) any polynomial
a2Y2
akYk,
an (X \342\200\224,ai)Tl(X
can be written as
C(X)/A(X)
degree less than the degree of A(X), then
the sum of elementaryfractionsas follows:
the
C(X)
An
A(X)
(X-a,)\"
and partial
identities
if A (X)
above
Al2
+ 7T7
rm
(X-a,)\"\"1
^21
(X
(X
+...+
numbers
)r'
the
find
equation
ax
(X
by
An,...
(X -
T(X -
a,)
.+ ...+
+
+
+
we
Akn
- a*)\"\"'
(X
(X-a*)'\302\273
To
A^
a2p~l
A>1\342\200\224
Alri
(X-\302\253x)
A22
,
T
- a2r
\342\200\242
\342\200\242
\342\200\242
+
both
multiply
\342\200\242
\342\200\242
\342\200\242
(X
a2 V2
to clear
ak )r\302\273
same
powers
the
resulting
Akr>
(X -
a,)
equations.
A few
Calculate
3.2.1.
Example
Since
X2
will illustrate
examples
5X
6- (X -
- ^.0 br
B(X)
3)
(X
A(X
1/(X2 - 5 X +
and (3.2.12) to see
1. Thus
(3.2.11)
we
3)
- 5 X + 6).
2), we
+ B/(X - 2).Thus,
A/(X
2) +
=
=
B
-1.
3
we find
Let
and we see that
- 1/(X
- 2). Then
use
6) = 1/(X -
- 3)
- 1/(X2
Xr
memory.
that
X2-5X
+6
3-X2-X
3(1-
- l/3r+1
2(1
X/3)
- X/2)
+ l/2r+1.
Thus,
X2-5X T6
+
^^\\~\302\245ri
\302\245^xr~^0(~\302\245ri
\302\245^)xr
Section
3.2
Coefficients of Generating
Calculating
if we
and
make the
substitution fc
= r
+ 5we
X5
X2this
what
and
5X
T6-g(-F*
1
5 and
= 0
1
3
k >
3N*-\302\243***
= d3 = d4
= d2
di
(1*.=
5
if
see that
says is that
final equality
do
so on.
'
r.o
Z.
X4
Since
(X + 2) we
5X
- 5
of
X +3
~X4-5_X2
+
4-
- 4) = (X -
1) (X2
1)
(X
X2-5X
+ 3
X4-5X2
+ 4
by
X4
X-1X
- 5X2
+ 2'
+ 1X-2X
+ 4 gives
+ B(X
+
D(X
- D(X
- 1)(X
Thus,
2)(X
2)
+ 1)(X -
involve
X = 1, then all terms of the right-handsidethat
= i/G.
X
1 vanish, and we have -1<= -6:\\orA
Similarly putting X - -1, X = 2, and X - -2, we find B
= -17/12.
-1/4, and \302\243>
Let
- 2)
1) (X
write
can
+ 3
X2
Vr
- 5 X2 + 4 = (X2
Multiplication
X2
253
Functions
the
2).
factor
= 3/2,
C =
254
Chapter 3: Recurrence
- 5X
X2
X4
Relations
+3
5X2 +
17
6(X - 1)
2(X
- X)\342\226\240+
1+ X^
3(1
12(X+
- X/2)
12(1 +
4(X
1)
2 I
- 2)
2)
17
4(1
X/2)J
Therefore,
<*r
-|
3(-1)r+2^5-Y(-1)r2^5.
to
be simplified
can
which
:r
12
After
in the
we see
examples
[1
(X/o,)]
-
[1
that it is desirableto
write
ri-l
(X/a,)]
5\302\253
\"T
[1-
Bk2
A(X) =
where
for
(X/a*)]\"
5*r,
[1 - (X/a,)]r\302\273-l
- (X/aA)]
axr (X - a2)r>
[1
an(X
constants
Bllf ..., Blri, ..., Bkl,
in this
form
This is desirablebecause
...
the
algebraic techniques.
ifriS\302\260dd-
Bt
-
B lr,
2^)
form,
By
(X/ai)]r<
2^(1+T)H(-5
these
doing
C(X)/A(X)
[1 -
R-3
is even
(3.2.1)
intermediate
stepof
applying
through
(3.2.11)
(3.2.8)
and
without
(3.2.12).
(X
...,
we can
having to
- a,)'*
B^
by
readily
resort to the
Section 3.2
Example
255
Functions
of Generating
Coefficients
Calculating
in
X20
(X3
X\"
\342\200\242
X5.
-)5.
x4 +
(x3 +
X3 from
by extracting
the expression
Simplify
x5.. .)b
Thus,
.. -)]5=
x15(x;xr)5
+ x+
[x3a
factor.
each
(1 the
of X5in 2\"_0
C(4
the coefficient
is
coefficient
we seek
C(4 + 5,5) = C(9,5).
+ r,r)Xr
Example 3.2.4.
(X2 + X3 +
(1 +
the
Calculate
X4
X15 in
of
coefficient
(X + X2 +
X5)
\342\200\242
\342\200\242
\342\200\242
that we can
+ X1B) Note
r,r)Xr.
fr0
of X20 in
coefficient
The
l +
X15]TC(5-
X)5
A(X)
X3 + X4 + X5 + X6 + X7)
A (X)
rewrite the expression
for
as
X2(l
+ X
+ X2
X +
(1 +
X3)
(1 +
(X)
\342\200\242
\342\200\242
\342\200\242
+
\342\200\242
\342\200\242
X + \342\200\242
+ X6)
- X7) (1 - X16)
v3 (1 X4) (1
15. = X
X15)
1-X
1-X
(1-X)
(1 - X7) (1 -
- X4)
(1
(1
X4)
(1
- X7)
(1 -
(1
the
of X12 in
coefficient
- X16)
X)3
Since
is the sameas
X16)
- X)3
(1
- X4)
(1 -
X7)
(1
- X16)
\\y C(r
2,r)X').
by
taking
coefficient
one
term
+ 2,r)X'
(l_X4)(l-X7)f;C(r
r-0
(1
- X4 -
X7
X11)
f;
C(r +
2,r)Xp.
256
Chapter
Relations
3: Recurrence
factors
and
the corresponding
Using the successive terms of the first
terms of the secondfactorsothat the sum of their exponents is 12,we see
- C(10,8) - C(7,5)+ C(3,1)
isthe coefficient
we seek.
thatC(14,12)
of Xr
Note that A (X) is a generating function such that the coefficient
3 numbered
counts the number of ways of distributing r similarballsinto
of balls between 2 and 5
number
boxes where the first box can have
any
between 1 and 7
inclusive, the secondbox can contain
any number
box
can
contain
inclusive, and the third
any number up to 15 balls.
FactoringX2 out of the first factor and X out of the secondfactor
amounted
to the combinatorial
strategy of placing2 balls in the first box
of X12 in
coefficient
the
and 1 in the second to begin with. Then finding
12
of distributing
of ways
A(X)/X3 amounted to counting the number
balls into 3 boxes where the first box could contain up to 3 balls, the
secondbox could contain up to 6 balls, and the lastup to 15 balls. Had we
2 we would have used the principleof
done this problemin Chapter
form of the answer suggests that that is
and
the
inclusion-exclusion,
preciselywhat is going on behind the scenes in all the algebraic
the
is the
manipulation.This
major reason for using generatingfunctions:
do the combinatorial reasoningfor
techniques
algebraic
automatically
us.
To
this
illustrate
2
Chapter
techniques.
let us
point
and compare
from
function
3.2.5.
Find the numberof ways of placing 20 similar balls
Example
into 6 numbered boxesso that the first box contains any number of balls
between 1 and 5 inclusive and the other 5 boxesmust contain2 or more
balls
each.
The integer-solution-of-an-equation-model
is: count the
to ex + e2 4- e3 + e4 + e5 + e6 = 20 where 1 < ex <
number of integral
solutions
~\"
5 and 2 < e2,e3,e4fe5,e6.
2 < et for i = 2,3,4,5,6.
we will count the solutions where 1 < ex and
First,
in
do this
1
2balls
We
ball
boxnumber
eachin the other 5
one,
by placing
and
then
number
of
the
to
distribute
the remaining
boxes,
ways
counting
9 balls into 6 boxeswith unlimited
are
There
C(14,9) ways to
repetition.
do this.
But
then
and 2 <
et
number
of
we wish
to discard
the number of
solutions
for
which
i =
C(9,4).
6 < ex
for
we consider
is:
generating
functions.
The
total
Section 3.2
(X +
X2
desire
We
+ X5) (X2 +
\342\200\242
\342\200\242
\342\200\242
X3
)5
\342\200\242
\342\200\242
X2 + X3 + X4) [X2 (1 + X + X2 \342\200\242
)]5
\342\200\242
. )5
X2 + X3 + X4) (X10) (1 + X + X2 \342\200\242
X(l
\342\200\242
Xn(l + X + X2 + X3 + X4) (1 + X + X2 . \342\200\242
)5.
+ X +
+ X +
= X(l
=
+ X4
X3
to compute
this
in
last product,
that
257
Functions
of Generating
Coefficients
Calculating
X9
of
in this
last product
is C(14,9)-
combinatorialreasoningfor
did the
the algebra
X3
but we
+ X4)
C(9,4).
Note
us.
Linearity
generating
function
C(X) =
= DA(X)
+ Ebr)Xr
&ar
\302\243
r-0
+ EB(X),
where
A(X)
and
X>rXr
B(X) = \302\243>rXr
r-0
r-0
are the
generating functions
Example
Since 1/(1
3.26.
- 2X
2)(r +
(1
1)\342\226\240
J
o
i
7
/
{Mr\302\260-o>respectively.
- 2X) generates
{2r}r.0
generates
and
{ar}\"_0
(r +
for
- 5X)3
generates
r-0
the sequence
3<2f_7(r
+ 2)(r +
l);
r-0
258
Chapter
Exercises
Relations
3: Recurrence
1.
the
Using
1(b)
Definition
generating
following
+ X2'
3X
1 +
1+
2X
X2'
3X
2. Write
(a)
the
for
11X+ 28X2'
(c)
of
equations
b0fbi,b2,b3,b4,b5
the formal
(d)
T^x>
for
powerseriesexpression
(g)
3^x'
(1 -
the
following:
5X)3'
(b)lT5x'
(e)arW'
(f)
(C)3TX'
(a)
(b)
(c)
4.
(3 +
xr
3. Use
(h)
(1 - X)8'
(\302\260(3
X)<
1 --
1
IX
12X2'
1 --
IX +
(X -
10X2'
(e)
X + 21
(1
3X
7X2
(d)
2)(X
+ 2
+
l)2'
1 - 7X + 3X2
3X)(1 - 2X)(1 + X)
(X-5)(2X + 3)'
Write
the
(a)
ar-(-l)r,
(b)
ar
function
generating
for the
(-m\\
(c) a,
= 5',
(e)
ar
= 6(r
(g)
a,
= (r
(h)
ar
(d) ar = r + 1,
+ 1),
+ 2)(r + 1),
(-l)'(r+2)(r + l)
2!
(i)
ar = 5r
(k)
ar
+ 2)(r
+ 1) 3r.
sequence
{ar)7-o
defined
by
Write an
expressionfor
following
generating
(a)
15
1 ^
(b)
7
3
~
77\342\200\224^7^
- X)2 (1 - 2X)3
(3 +
<b,
(1
(c)
13
3(X + 1) 12(X-
- 1
Find the
(a) (1 +
'
+ X)
(5
2X)2
-14~
2X'
3 +
8
(c)
8
+
yr\342\200\224^
(1
(1 - X)5'
2X
1 +
259
r^ +
ar is
A(X):
where
ar
functions
Functions
of Generating
Coefficients
Calculating
of
coefficient
X + X2
4(2
2)
+ X).
X10 in
\342\200\242
\342\200\242
\342\200\242
)2,
-X)3'
1
(1
-X)6'
1
(d)(TTxF
(e)
(f)
X4
\342\200\242
\342\200\242
\342\200\242
+ X
X4(l
+
Find
(X3
)\\
+ X2 + X3)(l +
+ X4)(l
+X +
X2
of X12in
-
X4
(1
Findthe
of
coefficient
(a) (1 + X +
(b) (1 + X +
(c) (X2 + X3
(X +
Find
X2 +
X14 in
X3)10,
+ X3 +
X2
+ X4
X2 +
X3
\342\200\242
\342\200\242
X4 + \342\200\242
+ X8)10,
+ X6 + X7)4.
X5
of
X20 in
X4
the coefficient
\342\200\242
\342\200\242
\342\200\242
+
Find the
X7 + X\"
- X)5
X2
(b)
+ X3
x12).
the coefficient
1-
(a)
+X2
\342\200\242
\342\200\242
+
X^XX20
+ X5)(X2
of X50
+ X21
coefficient of X25
(X2
+ X3
in
+ X4
+ X3 +
(X10
+ X11
\342\200\242
\342\200\242
\342\200\242
+
X45).
in
+ X6
X4
X6)7.
\342\200\242
\342\200\242
\342\200\242
f.
\342\200\242
\342\200\242
. +
X*)(X
260
Chapter 3: RecurrenceRelations
11.
of X12in
the coefficient
Find
(a)
(1
(f) (1 (g) (1 -
X2
- X)10'
(1 (1 -
(c)
(d) (1
X)10'
X2
(\302\273)
X)20,
(1
+ X)20,
(e) (1 +
4X)15,
(1 + X3)-4,
- 3X,
(h)
X5
(b)
4X)\"5,
(1
(j)
- X)4
- 2X)19.
-20
X)
12. Let ar
sequence
of
13. Let
(a) Finda10
(b)
a10in the
< 4 for
2 < Xx <
< X,
if 0
14. Find
generating
be obtained by tossing
for the
function
of ways to
the number
of nonnegative
number
= r.
X2 + X3
be
ar
find
Then
{ar}~_0-
that
100,
r can
sum
each
integral solutionsto
Xx
i.
50, 0 < X2
exercisenumbers listedbelow
<
25.
3.1:
Section
from
(a) 5(a)
(b) 6
(c) 7(a)
(d)
8(a)
(e)
8(c)
(f)
8(d)
(g) 8(e)
15. Use
balls
a large
from
selection
(a)
the
(b)
the
selection
(c)
the
selection
16.
How
many
sundaes
How
with
there
are
ways
if there
functions
generating
Write
the
obtaining
19. How
n when
each
chocolate
4 sundaes
most
enough
blue,
pink,
and green
X, must
have one
the
of
hotel
paint to
number of ways of
tossing 9 distinguishabledice.Then
many solutions
X4 = 12if
at
12
for
is only
function
a generating
sum
order
paint 3 rooms?
18.
to place an
to select 10
equation
find
Xx + X2
of values 1, 2, 3,or
4?
a25.
4- X3 +
Section
3.2
20.
Write a
generating
r letters
least onea,
from
{5
a,
c}
6,
one
least
at
ar, the
for
function
\342\200\242
6 \342\200\242
if
8 \342\200\242
each
at least
6, and
Find
c's.
two
a8.
number of ways to
where unlimited
select r objectsfrom n distinguishable
objects,
repetition is allowedand eachkind of object must appear an even
a single
for A(X) and
number of times.Derive
series expression
21. Find
the generatingfunction
261
Functions
an
find
each
case
for determining
function
generating
must appear
object
times.
Find
ar, the
for a12.
expression
23.
for
A(X)
in
M>A,T,RJ9X
once.
Find
24.
Let ar
number of ways
each
that is at least3.
form
(c) Finda20.
A set
of r balls is
to
selected
partition
has an
pile
function
a generating
Determine
which
a10.
denote the
but R,
any
a multiple of 3
for ar.
for
expression
an
from
r identical marbles
odd number of marbles
ar.
infinite
of red,
supply
white,
must
the condition that
blue, and gold balls.A selection
satisfy
of red
either the number
balls is even and the number of white
balls
is odd, or the number of blue balls is evenand the number
of
is odd.
balls
gold
Let
ar
denote
the
number
function
(a) Determinethe generating
(b) Determine an expressionfor ar.
(c)
for
of such
selections.
ar.
Finda13.
for
function
Selected
Answers
ar.
3+
+
3(1
X\\
ir)
3 U
3 to
\\
3/
262
Chapter3: Recurrence
Relations
(DffT\302\273'-?(,+fr-ss(-iw<r+iw6)'jr
*3- /(a)
^
1 - nv
7X
<CTV1
12X2
t*
(1
^JFTT^ - 3X)(1
3 21
-3
\342\200\224
= \"
OO
^
- 3X
4X)
- 4X
CO
4 Y. 4rXr
3rXr +
r-0
L (4r+1-
3r+1)Xr
r-0
(c)
A(X)
X + 21
(X
X - 5
+ 3)
5)(2X
2X
-\302\243[(-lH-f)1-
--(-i)ar-(-ir\342\200\224
(d)
/a\\
^v^
A(X)
7X2 +
3X + 2
= \342\200\224\342\200\224rr7^
- 2)(X
(X
+ l)2
1+
-
=
~
\342\200\224
X
(1
X'
(-1)'
\302\243
r-0
+ X)2
'
\342\200\224\342\200\224\342\200\224
(X +
2
X
l)2
X - 2
2__
X\\
- 2 t. (r +
D(-Dr
Xr
21.
r-0
r-0
- 2(r + l)(-l)r
LJ3(-l)r
2^)']X';
simplify,
5.
(e)
C-9/4)(3\")
o\342\200\236
(b)
ar
(d)
1-
= 3C(r
(4/3)
+ l,r)
(-1)\"
+ (7/3)(2n)
+ (11/12) (-1)\"
13/24 (1/2)\" +
8/3
(-l)r
9/8 (-1/2)\"
(2/3)'
(l\\xr
w
Section
3.2
6.
(a;
of
coefficient
(b)
jr-^
11.
X10 is
+ 2,r>
Or
\302\261
263
Functions
= 'jr(r + l)Xr;
= Y.C(r+l,r)X'
1Y.2
of Generating
Coefficients
Calculating
- t
X-
(r
+ 1>
2>'r
*i
(c) C(14,10)
(d)
= C(14,10)
(-1)10C(14,10)
+ X +
(e) [X3(l
X10 is
X2
the coefficient
coefficient = 5
(f)
C(8,6)
\342\200\242
\342\200\242
\342\200\242
=
)]2
of X4 in 1/(1 -
+ 9,r)
C(r
\302\243
X4)10
C(r
S;.0
of
+ l,r) Xr;
- C(3,l)
C(4,2)
(iirrxi
-
X)2
r-0
- [1 -
C(10,l)
X;C(r
+ 9,r)X<;
X4
\342\200\224
v4\\io
= (1
- X)2];coefficient
Xs [1/(1
y4\\10
=a-xr
Xr
C(10,2)
Xs
- C(10,3)X12
\342\200\242
\342\200\242
\342\200\242
+
X40]
r-0
coefficient of X14is C(23,9)- C(10,l)
C(19,10)
+ C(10,2)
C(10,3)C(ll,2)
C(15,6)
(b)
9. C(14,9) 10.
(a)
(b)
11.
C(23,14)
C(9,4)
- C(6,4)-
C(21,19)
- 7C(12,6)
C(17,H)
(a)
C(19,10)
(b)
C(16,7)
10C(14,5)
C(5,3)
+ C(7,2)C(7,l)
(c) C(20,12)
(d) C(20,12)
(e) C(31,12)
(g)
412C(15,12)
(j)
(-2)12C(19,12)
12. (X
+ X2 +
coefficient
X3
of
X100
X4
+ 38,38)C(50,2)-
+ Xs
C(49
32,32)
X50
C(50,3)
(1
X6)80 1/(1
49,44)
\342\200\242
.
C(50,l)
X)80;
+ C(49
264
Chapter
3: Recurrence Relations
15.
(a)
C(6,4)
(b)
C(12,10)
16. C(16,12)
17. The
- C(9,7)
of
coefficient
+ C(5,2)
C(ll,7)
C(5,l)
X20 in
(1 +
- 3C(20,16)
+ 3C(16,12)
X +
C(6,2)
X2
(2r% Xr)2
X3)3
is C(24,20)
C(12,8)
18.
+ X2 +
- (X
A(X)
Find the
X5)9
The expressions
for
in
Chapter
for
inadequate
An
face.
relations
(1
- X6)9(1 -
9C(18,1(\302\273
(1
X +
\342\200\242
\342\200\242
\342\200\242
X)\"9;
C(9,2)
C(12,4)
permutations,
2 are
combinations,
and partitions
tools for
counting
the
of finite
elements
must
X16 in
- C(24,16)
+ X6)9 = X9
RELATIONS
RECURRENCE
developed
of
coefficient
a25
3.3
X3
+ X4 + X5
= X9(1-X6)9(1-X)-9.
(sometimes
a sequence.
can be modeled
We
recurrence
and then we will
discuss
relations,
several common types of recurrencerelations.
of recurrence
relation beyond that of Section 1.10
discussion
A formal
within
difficult
is somewhat
the scope of this book but the concept
of
relations
is straightforward.
recurrence
combinatorial
Many
problems
can be solved by reducing
them
to analogous
problems involving a
smallernumberof objects,
and
the
salient
feature
of recurrence relations
of one
term
of a collection of numbersas a function
of
is the specification
of
a
we
terms
the
recurrencerelation
can
collection.
Using
preceding
n - 1 objects, then
a problem involving n objects to one involving
reduce
n
2 objects, and so on.By successive
of the
reductions
to one involving
a problem
number of objectsinvolved,
to eventually end up with
we hope
will be instructive.
that can be solved easily.Perhapsan example
with
methods
of solving
Science Application
A Computer
Suppose
that
number
of
valid
a given
expressions
in
programming
using only
Section
265
Recurrence Relations
3.3
+,\342\200\224,-=-,
x.
the syntax
that
Assume
of
Therefore,valid
expression
digit, and that 2
can be combined
4
the
arithmetic
by using
operations.
is a sequence of oneor moredigits
or of the
expression
form
A and
valid
expressions
a
of the
\302\251
B where
4
arithmetic
B are
end in a
valid
valid
Thus,
operations.
and
expressions
the operator
for instance,
1 4-
is
o is
one
a valid
symbols
a valid
form
expression.
number of digits.Thus,
a2 a3
we
can
determine
10ax4-
40a0
= 10(10)
10a2 4-
40ax
- 10(100)4-
40a2
- 10(1400)
that
4- 40(0)
= 100,
40(10)
= 1400,
a4 = 10a3 4-
4- 40(100)
= 18,000,and
so
on.
of a recurrence
Chapter 2) is anotherexample
l,r) 4- C(n - l,r - 1). Herea termin the n-th
in a preceding row. But
row of Pascal's triangle is determinedby 2 terms
this exampleis an example
of a r'ecurrence
relation involving the 2 integer
variables n and r. By and large we shall restrict our attention to
recurrencerelationsthat involve only one integer variable, so let us adopt
Pascal's
relation:
the
following
identity (see
= C(n -
C(nfr)
working
definition
of recurrence
relation.
266
Chapter
Relations
3: Recurrence
3.3.1.
Definition
for
n >
integer
any
A recurrence
is a formula that relates
relation
=
n-th
termof
a
A
the
1,
sequence
{ar}\"_0 to one or
an_x.
If sn denotes
relations.
of recurrence
the sum of the
Examples
first n positive integers,then (1) sn = n + sn_x. Similarly if d is a real
with common
number, then the nth term of an arithmetic
progression
difference d satisfiestherelation(2) an = an_x + d. Likewise if pn denotes
common
with
ratio
the nth term of a geometricprogression
r, then (3)
Pn = rPn-i- We list other examples as:
(4) an
3an_x
(5) an -
(6) an
(7)
an -
(8)
an
(9)
(10)
3an_x
(n
2a\342\200\236_2
2an_2
- 1) an_x
+
9an_x
- 0.
- n2 +
-
- 24an_3
26an_2
3(an_x)2
1.
- 1) an_2
(n
=
2a\342\200\236_2 n.
+ axan_2
an = aQan_x
a2 + (an_1)2=-l.
\342\200\242
\342\200\242
\342\200\242
4-
an_xaQ.
ck(n)
for
/(m)
of n is said
n >
an_k
functions
are not
degreek. If
is
coefficients.
If f(n)
is
. . +
c0
it
squared term.The
are
for
2; (7)
degree
linear
instance,
recurrence
is not
relations
(3),
(4),
(1), (2),
Relations
coefficients.
have
+ .
c1(n)an_1
as a
otherwise,
and (6)
it
homogeneous;
constant
integers.
nonnegative
where
fe,
...,
Ci(n),
c0(n),
known
are
c0(n) an
to be a linear
identicallyzero,then
relation
and
form
the
relation
recurrence
= 0.
= 5n.
homogeneous.
elementary
defined
one
enable
to solve all
enable
that will
techniques
constant
coefficients.
Relations
of Recurrence
In
will
algebra
to mean
solving
that we
find
an equation
all
those
- IX + 10
like X2
values
made
of X
the
0 was
which, when
equation
a trye
Section3.3
267
Relations
Recurrence
we determine
formula,
By factoring or by use of the quadratic
= 2 and X = 5 arethe only 2 values that solve the equation.
Supposenow that we are given the recurrence relation an - ban_x = 0
is meant
for n > 1 and are asked to solve it. We first ask: what
by a
this by recalling that a
solution of this recurrencerelation?We answer
into the
integers
sequenceA = {a J~_0 is a function from the nonnegative
the
recurrence
relation
does is describe a relation
real numbers. What
between the values
of this
function
at n and at n - 1. We ask then: is
domain
the set of nonnegative integers,
there a function, defined with
which makesthis equationtrue for every value of n? The answer is yes, as
is shown
by the function A = {aj~_0 where an = 5n for n > 0. For this
= 5n - 5(5n_1) = 0 for
n > 1, so that this
function
we have
an - 5an_x
function
satisfies
the
recurrence
relation. However, it is one of many
as a matter
of fact, if c is any constant the function {aj^0
solutions;
where an = c5n for n > 0 also satisfies the samerecurrence
relation
= c5n - 5c5n_1 = 0 for
>
n
1.
because
an
5an_x
Just as in algebra, recurrencerelationsmay have no solution. Equation
(10) above is an exampleofthis since there are no reaZ-valued functions /
- l))2 = -1 since the squares of real numbers
suchthat (f(n))2
+ (f(n
are always nonnegative.
statement.
that X
Definition 3.3.3.
a sequence
integers.
S if the values
relation
Example 3.3.1.
(a)
is a
A =
= {an}^0
that
Suppose
where an =
2n
the
satisfies
recurrence
an = 2an_x over
relation
constants, then
7an_x
an
10an_2
this expressionfor
an
- 7
an_x
= 0
= 2n\"2 d
2n\"2
the recurrence
into
= (cx 2n
+ 10 (cx
2n
the
satisfies
an
10 an_2
=d
+ c2 5n
cx 2n
2n\"2
7 d
c2 5n)
+ c2
2\"\"1
relation, we have
- 7 (cx
2n~l
+ c2
2n~2 +
c25n
5n\"2
bn~l)
5n\"2)
10 d
relation: an \342\200\224
recurrence
>
n
2. For by substituting
c2
(0) = 0.
c2 [52
7 c2 5\"-1 + 10 c2
- 7 (5) + 10]
5n~2
268
Chapter3: Recurrence
Relations
constants
for arbitrary
(c) Similarly
cx
and
10an_x
verification as an exercise.
Note
each
in
that
different
solutions,
we are
askedto find
a0 = 10
requirements
and ax =
41. Theseso-called
boundary
are
conditions
in addition
satisfied
be
must
that
recurrence
relation.
listed
whether there is such a solution amongthosealready
10 = a0 =
form an = cx 2n + c2 5n. If we set n = 0 and n = 1, then
=
+ c2 5\302\260
cx 2\302\260
cx + c2 and 41 = ax = cx 21 + c2 51 = 2 cx + 5 c2. Thus, the
constants cx and c2 satisfy the equations
Let
us see
of the
10 = cx
41 =
and
c2
2 cx
5 c2.
Solving these two equations for cx and c2, respectively, we find that cx = 3
and c2 = 7. Thus, an = (3) 2n + (7) 5n is a solution of the recurrence
the boundary
relation
that
satisfies
conditions.
If we are given
a recurrence
the nth term of a
relation
describing
=
A
a
of
terms
as
function
the
sequence
{ar}~_0
a0, ax,..., an_x, what we
of n alone as in (b)
desire is a closed-form expression for an in terms
above. But even if we do not have such a closed-formexpressionthe
is
still
recurrencerelation
For we can
very useful in computation.
compute
an
O'n-iy
in
\342\200\242
\342\200\242
\302\253\\
ao;
points is given
neecl
so
of an_x,...,
terms
and
provided the
so on,
the computation
that
of the
value
can be
sequence
the
for
if
coefficients,
will not
there
or more
we
conditions.
the boundary
boundary conditions
solution. In general,
and
constant
then
of an,
terms
relation
The above exampleis a linearrecurrence
in
at one
linear
if there
of
of a0 and ax gave
recurrence
relation
value
degree
rise
than k boundary
are fewer
if
the 2
unique
2 and
to a
of degree
k has
conditions,
k values
of the
words, if there is
anoAio+i>-
\342\200\242
are
\342\200\242>o^)+At_1
conditions.
the
some
given,
there
values
for a0,au..
^ak_x
that
such
n0
integer
then
will
be
a unique
these
satisfying
are
appropriate to calltheseinitialconditions.
given
and
the
values for
of the
solution
boundary
then it would
be
Section
269
Relations
Recurrence
3.3
Relation
The Fibonacci
In a book
1202
in
published
a problem
posed
Fibonacci,
a.d.
also known
of Pisa,
Leonardo
of determininghow
pairs
many
as
of rabbits
are
is the
born of one pair in one year. The problemposedby Fibonacci
that
there
is
one
of
rabbits, male
only
following. Initially, suppose
pair
and female,just born,and suppose,
month
each pair
that
further,
every
of
of rabbits that are over one month old produce a new pair of offspring
n
sexes.
Find
the
number
of
rabbits
12
and
after
after
months
opposite
months.
reproduce.
has
pair
of newly
pair
we have
2 months
After
are
cannot
reproducedagain.
reproduce
4 months
After
we have
we still
month
one
After
not
2 pairs of
After 3 months we
now reproduced.
born rabbits.
of rabbits sincethey
yet mature
enough to
have
5 pairs
of rabbits
3 pairs
rabbits
has
since
because
produced
the
a new
n > 0, let Fn
the third pair is still maturing.Foreach integer
the number
of pairs of rabbits alive
denote
at the
end of the nth month.
Here we mean that F0 = 1, the originalnumber of pairs of rabbits.Then
what
we have said is that F0 = 1 = Fu F2 = 2, F3 = 3, and F4 = 5.
Note that Fn is formed by starting with Fn_x pairs of rabbits alive last
month and adding the babiesthat can only come from the Fn_2 pairs alive
2 months ago. Thus, Fn = Fn_x + Fn_2 is the recurrencerelationand F0 =
Fx = 1 are the initial conditions.
pair, and
this
Using
the values
and
relation
already
computed
we
see that
^6 = F4
^6 = F5
Fn
F6
F8
F7
F9
_ F8
F10
Fn
=
=
F12 Thus,
12
after
continue
this
months
process
approach,even for
practicalespecially
if an
more
F9
Fw
^u
= 8,
+ F4 = 8 + 5 - 13,
+ F6 - 13 + 8 - 21,
+ F6 - 21'+ 13 = 34,
+ F7 = 34 + 21 = 55,
+ F8 = 55 + 34 = 89,
+ Fg = 89 + 55 = 144,
+ ^io - 144 + 89 - 233.
+
there
F3
+ 3
are 233
to compute
complicated
electronic
= 5
F36,
and
so on. Indeed
relations
recurrence
computer is used.
could
this numerical
is quite
270
Chapter
Relations
3: Recurrence
solution of this
an explicit
=
is
called
the
+
Fn
Fn_x
Fn_2
and the numbers Fn generated
Fibonacci
relation
the
Fibonacci
relation
by
=
=
1
conditions
are
called
with
the
initial
the
Fibonacci
Fx
F0
and the
numbers
numbers
is the
{Fn}^o
Fibonacci
numbers
Fibonacci
arise
sequence.
quite naturally in many
we will show
Shortly
recurrencerelation.
obtain
to
hovy
relation
The
sequenceof Fibonacci
combinatorial
Quarterly,
Fibonacci
The
is even
to research
primarily
numbers.
Fibonacci
and
There
settings.
devoted
stair-climbing
example.
can a person climb up a flight
(a) In how many
ways
can
one
at
most
person
stepat a time?
skip
climb n steps for a > 1.
can
the
Let an = the number of ways
person
Noteax = 1, and a2 = 2 (sinceonecan proceed one step at a time or take 2
steps in one stride).- Let us solve for an in terms of a fewer number of
steps. Supposethe persontakesonly 1 step on the first stride, there then
areleft n - 1 steps to climbfor which there are an_x ways to climbthem.
If, on the other hand, the person took 2 steps in the first stride, there are
n - 2 steps left for which
there
are an_2 ways to climb. Sincethereare
2
and
events are mutually
exclusive
we
these
these
only
possibilities
=
sum
rule
to
the
+
an_2.
apply
get an an_x
the
of
above
(b) Suppose we change the conditions
example and
assume that the personmay take either 1,2, or 3 steps in each stride.Find
of ways the person can climbn
a recurrence
for
the
number
relation
3.3.2.
Example
of
n steps
if the
steps.
= the
let an
Again
clear
that
an
= an_x
Numbers
Let
relation.
Fx
us
First
examine
we
following table
Fn. The
\342\200\242
\342\200\242
\342\200\242
4-
shows that S0 -
the
the
Fibonacci
sum Sn = F0 4- 1; S1 = 2 -
F2
F8-l;S2-4-F4-l:
n
Fn
13
21
Sn
12
20
33
54
Section3.3
Recurrence
This
leads us
(1) The
that
to conjecturethat:
+ 1 Fibonaccinumbersis onelessthan
- 1.
. . . +
Fn - Fn+2
first n
the
of
sum
is,
271
Relations
F0 + Fl
+ F2
Fn+2y
The proof
but
induction,
the
Write
^2
\342\200\224
Fx =
F3
\342\200\224
F2 =
F4
^o
F\\
F2
F3
= F5
Fn
= Fn+2
F3
FA
\342\200\224
Fn+i
we
telescopic
1.
we
Likewise
4- F2 +
(3) FI
+ FUFI+
Fx
F4
F2n = F2n+U
\342\200\242
\342\200\242
\342\200\242
4-
and
\342\200\242
\342\200\242
\342\200\242
+
F2R-FHFn+l.
If Fn
(General Solutionof the Fibonacci
Relation).
=
Fn
Fn_x 4- Fn_2 for n > 2, then thereare
3.3.1.
satisfies
constants
,._Cl(l\302\261*)are completely
constants
the
where
Thus, F0 +
have:
(2) F0
Theorem
the
of
property
to vanish.
Proof. Let
F(X)
note
Then
{Fn}\342\200\236_0.
sequence
F(X)
XF(X)
X'FiX)
F0
- F0X
= F0X2
F,
2-_0
<.(i^)-.
FnX\"
be the
generating
conditions.
function
for
that
X +
F2X* +
F3X3 +
\342\200\242
\342\200\242
\342\226\240
+
FnXn
\342\200\242
\342\226\240
\342\200\242
\342\200\242
\342\226\240
\342\226\240\342\226\240\342\226\2
\342\200\242
+ F,X2 + F2XZ
+ \342\200\242
+Fn_lXn+
\342\200\242
\342\200\242
\342\226\240
\342\226\240
\342\200\242
\342\200\242
+
+ Fn_2Xn
+ F1X3 +
272
Chapter
3: Recurrence Relations
Subtracting the
last 2 equationsfrom
- XF(X)
F(X)
X2
F(X)
+ (Fl -
- F0
first
the
gives:
+
F0)X
- F2
- Fn_x
- FJX3 +
(F3
(Fn
F0
(Fx
(F, - F0)X.
- F0
- F,
(F2
Fn_2)
- F0)X
F0)X2
\342\200\242
\342\200\242
\342\200\242
X\"+...
+ OX2+
OX3
\342\200\242
\342\200\242
\342\200\242
Thus,
fractions
the
and b - (1 -
F0+(Fl-F0)X
\"(1_(ui)X][1_(i^X]
on F0 and
conditions
initial
whatever
to give
applies
FiX)
Using
~ FQ)X
(Fl
i-x-x>
for
Thus,
+
F\302\260
F(.Y)
1-
(1 +
V5)X/2
for geometric
identities
- (1
- V5)X/2'
1-
- aX
6X
\302\2433
for
each
= (1
+ V5)/2
\302\2433
\302\243(C1a\302\273+
In other
if
then,
V5)/2
C2b\X\302\273")
X;FnX'1
n-0
words,
n >
0.
Of courseif
can find
c,
we
D
are
TshH
given
the initial
1 =
conditions thatF0 \302\253
and
c\302\253-^h-
Fl9 then
we
Section3.3
One
in this
so that,
is
of the
last observation is the relative
size
large n. Sinceb = (1 - V5)/2 is approximately
of this
consequence
numbers for
Fibonacci
273
Relations
Recurrence
-0.618,\"bn+1
gets
for
small
very
n so
large
that
is
Fn
by
approximated
for large n.
(1/V5)an+1
The Fibonacci
occur
numbers
in combinatorial
frequently
of Pascal's
upward from
running
diagonal
problems,
that states
triangle
as follows:
this
F0
F2
F,
FA
F5
F6
Figure 3-1
In particular,
C(n - 2,2)+
in
C(n
identity
- k,k)
=;
this we defineqn
k =
4-
C(n,0)
- 1,1)
C(n
C(n,0)
C(n,0)
4-
C(n
\342\200\242
\342\200\242
\342\200\242
4-
C(0,m).
qn-2
- C(n
4-
- 1,0)4-
C(n
+ C(n
- 1,1) 4-
\342\200\242
\342\200\242
\342\200\242
4-
C(n
Pascal's
identity,
- 2,1) 4-
\342\200\224
4-
...
C(0,n
4-
we can write
C(n - k - 1,^4-1)
m, then
r >
- k,k) 4-
C(n
C(n
- 3,1) 4-
C(m,r) = 0 if
\342\200\242
\342\200\242
\342\200\242
4-
show
qn satisfies
C(0,0) = 1 and
C(n
C(m,0)
4-
C(n
1,0) 4- 2,2)
4-
C(n
- 2)
C(n - 1,1)
- 1)
- \342\200\242
+ C(l,n
4- \342\200\242
- 1,1) 4- C(n - 2,2)
+ C(0,n) = 9\342\200\236.
the
qx
- k,k)
J .
n/2
Fn
rc/2.
To prove
qn
the
have
we
\342\200\242
\342\200\242
\342\200\242
4-
4-
[C(n
\342\200\242
\342\200\242
\342\200\242
4-
C(l,n
3,1)
- 1)
274
Chapter 3: RecurrenceRelations
Other
Models
Relation
Recurrence
in
Compound interest problemscanbe described
of recurrence
terms
relations.
Example
bank, let r
amount
particular,
=
thatan
(1 +
r)nP.
a recurrence
Example 3.3.4. The numberof derangements
satisfy
relation. Recall that a derangement of {1,2,.. .,rc} is a permutation
(ii,i2,.. -yin) where ix ^ 1, i2 ^ 2, ..., and in / n. Let Dn = the number of
derangementsof {1,2,.. .,rc}. (We derived a formula for Dn in Section
2.8.)
Example 3.3.5.
Find
recurrence
relation
for
an
the
number
of
distributed.
We
on
the same
use
the
first
day, we distribute
a $1 bill, then we
and
there
are an_x
n - 1
distribute
to
that.
do
If, on
ways
there
remains
the
bill,
are
to
the
other
Let us
follow this
analysisin onemoreexample.
an_2
ways
and
so
Section
3.3.6. Supposethat
Example
prize away
each
further
Suppose
day.
school
to give a
decides
principal
that the
275
Relations
Recurrence
3.3
distribute prizesworth
n dollars.
day, a $1prizeisgiven,
the first
the
could have been chosen
prize
of $1 prizes,and then there are n - 1
dollarsworth of
away later. Thusthereare 3 an_x ways
to do this. If, on the otherhand,
the
prize
given on the first day was a $4
are
5
choose
there
different
to
the prizeand an_A ways to
then
ways
prize
distribute the remaining prizes.Thus,an = 3 an_x + 5 an_4.
If, on
3 different kinds
to be given
prizes
of the
one
from
management,
Many problemsin the biological,
lead
sciences
social
and
Example3.3.7.
Lancaster
(The
engagein combat.Eacharmy
denote
Thus
an_1
the
during
armies,respectively,beforecombat
number
the
represents
an
on the
battle
two
nth
day.
Abn_i
and
bn_x
system
unknowns.
very
an_x
we have
Thus
day.
an =
much
Abn_x
bn
=
of
Likewise
constants
reminiscent
bn
bn_x
on
These
Ban_v
the different
and
of soldiers
beginningof each
let
at the
armies
first
and
bn
an
in the
men
and
begins,
the
of men in
number
of soldiers
number
of men
the number of
b0 denote
a0 and
Let
day.
and second
Two armies
still in combatat
of Combat).
Equations
the number
counts
the
nth
number
in the
A
and
bn
day.
of soldiers in each
other army at the
B such
constants
armies. Of
-Ban_x
the
represents
that
an_x
measure the
course, we can
bn_u
of two-linear equationsin
two
276
Chapter
Exercises
3: Recurrence Relations
1. In
of
each
the
In each
given.
recurrencerelation.
- an_x
= 0; an
- 1; an
C.
(a)
an
(b)
C.
an_x
=
= 2n + C.
2;
an
an
an_x
=
0; an = Cx + C22n.
an
3an_x + 2a\342\200\236_2
=
+
1; an = Cx + C22n - n.
2an_2
an
3an_x
=
+
7an_!
12an_2 0; an = CxSn + C24n.
an
- Q311 4- C24\" +
+
an
7an_x
12an_2 an
an
n +
(c)
(d)
(e)
(f)
1;
(g)
Of the
the initial
(a)
a0
= 5.
(b)
a0
- 6.
(c)
a0
- 6.
(d)
(e)
a0
a0
(f)
00
(g)
a0
ax
4,^
the
1, we will
give
solution
unique
conditions.
5, ax
= 4,
=
in Exercise
relations
recurrence
conditions.
initial
1/6.
19/6,
= 6.
- 6.
= 6.
ax =
31/6.
3. (a) Considera 1x
n chessboard.
we can color each square
Suppose
= the
ofthe chessboard
red
or white.
Let
number
of
no 2 red squares are
ways of coloringthe chessboard which
that
an satisfies,
adjacent. Finda recurrence
either
red, white,
Suppose now that eachsquarecanbe
or blue. Let
be the number
of ways of coloringthe squares
no two adjacent squares are coloredred.
so that
a
either
an
in
relation
(b)
colored
bn
Find
recurrence
satisfied
relation
by
bn.
Find
a recurrence
on a
6.
Find
n
a recurrence
chips
two gold
using
relation
garnet,
for the
that
no
Section
7. Let
Pn
the
be
of permutations
number
of m letters taken n
letters
recurrence relationfor
Find a
8. (a)
sequences with
no
9.
a recurrence
Find
(a)
that
sequences
for
Repeat
(b)
the
and
of n-digit
0,1,
binary
Fs.
(Ternary
sequences.
quaternary
sequences.
2, 3 for digits.
n-digit
Pn_2.
sequences use
sequencesuseonly
at
same.
the
being
number
of consecutive
triple
277
Relations
Recurrence
3.3
ternary
Quaternary
10. Supposethat
cut
would
circular
a pie,
recurrencerelationsatisfiedby
11.
Ruin)
(Gambler's
Suppose we
an.
the
toss
of a
coin; heads you win, tails I win. Each of us has a probability of 1/2
on each
of winning
flip of the coin. Suppose,further, that you have
that
$100 and I have $200 to begin with. Let Pn be th6 probability
you win all $300 when you have n dollars. Find a recurrence
relation
Pn.
involving
12.
(a)
Suppose
a coin
is flipped
until
2 heads
appear
for
a recurrence
relation
experimentstops.
experimentsthat end the nth flip or sooner.
(b) Repeat assuming the experiment
stops
Find
on
only
after
3 heads
appear.
13. If
14.
a4
15.
= 10.
Find a0.
and
starts
a chain letter by writing to 4 of his friends
denote
4
so
and
that
each
write
to
others
of
them
an
asking
chain
letter.
of letters written at the nth
the number
Find
and solve a recurrence relation involving
an. (Note:
a0 = 4.)
A
student
on.Let
stageofthe
278
Chapter
Relations
3: Recurrence
16. From
(a)
(b)
F0
Fo
= 0,Fx
17. Let F0
FnFn+2/+(-ir.
relation
Fn
...
+(-irFn.
holds for all integers n > 2,explain
be translated
to the relation Fn+2 ='
+ Fn_2
Fn_x
can
relation
that
Fn+i 4- Fn for
(a) Combine
it.
prove
F2n_x.
+ F2 +
(c)
and
then
and
\342\200\242
\342\200\242
- +
F0-Fx
how
sequence).
= l.
(b)
Fn+3 =
for Fn+3 in
that
Fn+2
Fn+1.
terms of Fn+l
Fn.
Express
Fn+4
(c) ExpressFn+3
19. (a) Find r, given
in
terms
in
terms
of Fn+l and
of Fn_x and
rc >
for
Fn_2
2.
5F317 +
3F316.
is, Ln =
That
sequence.
Ln_x
Ln_2
for
ways
of
\342\200\242
\342\200\242
+ L2 + \342\200\242
+ Ln = Ln+2 - 1.
\342\200\242
\342\200\242
for Lx + L3 + L5 + \342\200\242
4- L2n+l.
4- Lx
L0
a formula
Derive
Fn.
Fr = 2Fm 4- Fm.
Fs = 3F200 4- 2F199.
that
(b)
Fn
generalformula
(a) Fi + F3
(b)
C2 so that
1 =
of the
each
18: The
Cx and
constants
the
initial conditions.
following
- 2, Fx = 1 (the Lucas
the
satisfies
21.
22.
Find
a recurrence
a selection
making
Lucas
sequence:
the
from
pair of consecutivenumbers
the
(counting
of
number
1,2,3,..
selection).
23.
integers1,2,3,..
-,n
no integer
that
such
in
its position
from
removed
relation for
a recurrence
Find
first
at
with
may
least
one
be no
0's).
the
1 and
example,
the
in
the
thirteenth
the
pattern
of n-digit
quarternary
the
number
010 occurring
of
n-digit
at the nth
binary
digit. For
pattern
sequence
digits.
have
number
010
Section
Recurrence
3.3
Relations
279
(a) do
not
2 consecutive
contain
0's.
0's.
exactlyonepair of consecutive
Find a system of recurrence relationsfor the number
binary sequences that contain the pattern 010for the
(b) contain
29.
of n-digit
time at
first
the end.
3.
4.
5.
an
(b)
bn =
the
number
of ways
to pair off
2n
Section3.3
- an_x
(a)
for
matches.
for tennis
an_2
2bn_x +
2bn_2
on the
Let an = the number of ways to arrange the flags
flagpole
n-feet tall. If the first flag is 1 foot high, then there are an_x ways to
the flags on the othern - 1 feet of the pole.Sincethereare
arrange
3 colors
for the first flag, in this case, there are
to
3an_x
ways
arrange the pole. In casethe first flag is red, and hence, 2 feet high,
2 feet
there are an_2 ways to arrange the flags on the other n \342\200\224
of
the pole. Thus, an = 3an_! + an_2.
an
4an_i
6. If the first
+ 3an_2
4- 2an_4.
280
Chapter 3: Recurrence
Relations
relation is
the recurrence
Hence
ways.
Pn
(m
1)
[Pn_x
Pn-2].
If the first
9. (a)
sequences.
ternary
first digit
- 1)-digitternary
number of 0's. Sincethereare
of (n
number
are
there
is 0, thenwe
total
must
that
sequences
3n-1
- l)-digit such
2an_x (n
(n
an odd
- l)-digit ternary
sequences
the
count
have
an_x with
3n_1
an_x
start
10.
is an
relation
recurrence
8an_x
+ 9an_2-
ii. pn =
12.
17.
y2pnTl4-i/2pn+1.
= an_x + (n - 1).
=
(b)
an
an_x + C(n - 1,2).
(c) an = an_x + C(n - 1,3).
(a)
an
(a)
F2n
(b)
(-!)\302\273*;_!+
(c)
Fn_xFn+3
1.
1.
+ 3.
(c)
20. (b)
3.4
SOLVING
321.
L2n+2
2.
RECURRENCE
FUNCTIONS
GENERATING
We shall
and the
1.
consider four
next two
substitution
methods of Solving
sections:
(also called
2. generatingfunctions,
3.
characteristic
4. undetermined
roots,
iteration),
and
coefficients.
recurrence
relations
in this
Section
3.4
281
Relations
Recurrence
Solving
boundary
by
given
of this methodarebestdescribed
The mechanics
We used
this methodin
Example
in the nextthreeexamples.
1 by
of examples.
terms
in
the method
also illustrate
recurrence relation an
Solve the
3.4.1.
Example
n>
Let us
3.3.4.
an_x
+ f(n)
for
substitution.
<*i
a2
- a0
-
+ /(l)
ax +
a3 = a2
<*n
/(2)
/(3)
= (a0
- a0
+ /(I)
= a0
+ H
+ /(2)
4- /(I))
(a0
+ /(I)
+ /(2)
+ /(2)) 4-
/(3)
\342\200\242
\342\200\242
\342\200\242
+
4-
/(n)
Thus,
the sum
is just
a\342\200\236
More
ra
>
/(ft).
of the
/ (k)'splus
a0.
if c is a constant then we
same
the
way:
generally,
1 in
ax
a2 -
=
a3 =
ca0
+ /(l)
cch
+
+
c2a0
ca2
- c(ca0
/(2)
= c(c2a0
c3a0
+ c2/(D
ca^
+ f(n)
a\342\200\236
+
=
/(\302\273
cno0
solve
/ (n)
+
a\342\200\236
ca\342\200\236_!
+ /(D) + /(2)
+ /(2)
c/(l)
/(3)
can
+ c/(l)
+ c/(2)
+ /(2)) + /(3)
+ /(3)
- c^\"-1^ + c\"-2/(D
1)) +
+ cn-V(l)
\342\200\242
\342\200\242
\342\200\242
+ c/(\302\273-
2)
/(\302\273)
+ c\"-2/(2) +
\342\200\242
\342\200\242
\342\200\242
+
or
a\342\200\236-c\"ao
iy-*/(\302\253.
c/(n
- I)
/(\302\273).
for
282
Chapter 3: RecurrenceRelations
3.4.2.
Example
(The
disks of
n circular
and
the
of
number
transfer.
for the
moves
=
Let an be the number of moves required to transfer n disks.Clearly
a0
=
=
3. Let us find a recurrence relation that an satifies.
To
1, and a2
0, ax
n disks to another pegwe must
first transfer
the top n - 1disks
transfer
disk to the vacant peg, and then transfer
the
to a peg,transfer
the
largest
n - 1 disks to the peg which
now
contains
the largest peg. Thus an =
2 an_i + 1 for n > 1.
k in the formula of Example
Now
we use c = 2 and / (k) = 1 for
each
\342\200\242
\342\200\242
3.4.1.Then an = 2n a0 + 2n_1 4-( \342\200\242
since a0 = 0, we
4- 2* + 2 -t- 1. But
\342\200\242
\342\200\242
\342\200\242
2n~1 4for the sum of
have
4- 22 4- 2 4- 1, and using the formula
an
we
find
that
terms in a geometricprogression,
Example3.4.3.
A sequence
l-2n
\342\200\224\342\200\224
=
(Analysis
of
2n
is the
\342\200\242
Then
\342\200\242\342\200\242<&\342\200\236.
bx
way
to merge
sorted
is
order,
to
mean
of
the
heads
sorted list.
into one
them
combine
two sorted
that
the sequence
head of
one
procedure: Since the smaller
smallestof
Algorithm).
Mergesort
ndndecreasing
the
of numbers (blfb2,...,bn)
n > 0.
- 1 for
an =
2, is the
LIST
following
of the two
tjie
list
all
the
it is in
in the two
numbers
and place it
as the first
of LIST
LIST 2
LIST
LIST 2 have
no comparisoncan be made
be,
in
fact,
at most
m + k
no
be
m
and
when
\342\200\224
I
more
than
k numbers
either
comparisons.
with
an
element
of these
one
m +
k comparisonswhere
Moreover, since
lists is empty, therecan
if n is the total number
respectively.
of the
Thus,
of
lists and
from
Section
3.4
are at
most n -
283
Relations
to
comparisons
sorted lists.
the two
merge
Recurrence
there
then
lists,
Solving
Mergesortis a sortingalgorithm
sorts
\"halves\",
that
splits
half recursively,
each
4.)
Chapter
and
of the subdivisions
is shown
the input list {5,4,0,9,3,2,8,6,23,21}
An illustration
the
lists
of
merging
of
successively
the
the
in
the bottom
lists;
half illustrates
above.
as described
can be
sorting an input list by Mergesort
maximum
number
of
t
hat
the
comparisons are
by counting
us
the
To
do
this
let
make
the
that
assumption
simplifying
necessary.
of 2. Then
an upper bound an on
number n of items to be sortedisa power
the
number
of comparisons required to sort n items is given
the
by
of the
estimate
An
cost of
obtained
| 2,8,6,23,21
5,4,0,9,3
5, 4,0 | 9, 3
/
5
2 | 8
\\
4
\\/
\\
0,3,4,
23
2,8
23
\\/
21,23
\\/
2,6,8,
5,9
0, 2,3,4,5,6,8,9,
Figure
21
21
2,6,8
3,9
4,5
\\
\\/
\\/
\\/
0
21
4,5
\\
\\/
23
\\
/.\\
\\
4
\\
2, 8 | 6
9 | 3
| 0
6 | 23,21
\\
/
4
5,
2, 8,
3-2
21, 23
21,23
284
Chapter 3: RecurrenceRelations
relation:
recurrence
an =
The
first of
these
2 an/2
two
\342\200\224
for
4- (n
1)
equations
requiredtosort
comparisons
of
number
number
second
comparisons,
to
required
that the
halves.
The
(n - 1), requiredto mergethe
comparisons,
a
not
fact
that
element
does
the
equation expresses
sorting single
any
We can
repeatedly
comparisons.
=
=
22an/4
22an/4 + n
22[2an/8
that
we
have
2an/2 = n
2an/2
22an/4
-
22an/4
sides
and
an
that
= kn- (1 +
- kn - (2k -
\342\200\242=
kn
(n
(n)
nlog2
by
- 2
n-22,
- n
2kan/2>
- 2
-
22
- n
2k~\\
+ n-24-n-22+-\302\253-+n-
n-l
sequence of equations,cancelling
appropriate
=
at = 0, we have
an/2*
of this
noting
k >
- 1
23an/8 = n
2*~1a\342\200\236/2*-1
both
2k where
sequence of equations:
the following
an
+ n/4-l]
= 23an/8+
etc.,so
2an/2
summands,
number of
sum of the
the
most,
sort both halves and the
the fact
expresses
must
list
be, at
large
2an/2f
= 0
of
require
Summjng
2, where ax
n >
2...
2*-1)
1)
- 1)
-
(n
- 1).
2k~1
Section
3.4
Relations
Divide-and-Conquer
The
relation.
an
and usually
so-called\"divide-
of
+ /
can/d
special case of a
these relations
Frequently
algorithms
computer
is a
relation
recurrence
above
and-conquer\"
recursive
285
Relations
Recurrence
Solving
/ (n)
and
is some function
n.
of
can be solved
by substituting
method of solution for
how
to solve
that approach
showed
We
and
divide-and-conquer
To describe
n.
with
generating
recurrence
coefficients.
constant
with
relations
of d for
Functions
Solutions By Generating
functions
a power
the following
to understand
need
basic property.
If
functions.
2\302\243_0
an
the
Xn
then XA(X)
generates
(0,0,a0,ai,a2,...),and, in
where there are k zeros
generates
(0,a0,a!,a2,...);
sequence
general
.,0,a0,a!,a2,...)
(0,0,..
generates
XkA(X)
A(X)
beforea0.
Thus,
then
if
A(X)
multiplying
to
the
amounts
is the
generating
A(X)
by X
zerosin front.
This processis
formal
power
described
series
Xk
by
- X*
A(X)
an
\302\243
Xn
last expressionreplacen
expression
%7-k
bx
ar-k
. .
Xr
. =
bk = a0,
bk_lf
the new
bk+l
we
know
sequence
that
r, and
In this
Xr.
sequence{br}\"_0
and by 0 if n
an_k \\in>k
Forinstance,
(1,1,1,...),
k by
Xn+k.
an
\302\243
n-0
n-0
In the
variable in the
in the dummy
a change
as follows:
expressions
1/(1
{aJn-o
where
\\ir>k.
the old
generates
an
where
ar_k
< k.
- X) = 2\302\243_0
Xn
sequence
= 1
b0 =
Thus,
0 =
sequenceby
the sequence
for each n
> 0.
286
Chapter
Relations
3: Recurrence
Thus,
and
generates (0,1,1,1,...),
C(n
\302\243
77\342\200\224^
the sequence
generates
n-0
-AJ
r-2
Similarly,
(0,0,1,1,1,...).
generates
\342\200\224
4- l,n)
X\"
+ l)Xrt
(n
\302\243
so that
\342\200\242)
(1,2,3,4,-\342\200\242
I1
1 to
oo,
r-1
n-0
that
rXr
describes
2\"\342\200\236,
r
A)
the sequence
generates
from
\342\200\224
but
{r}~m0
conclusion
if r
- L
*L,
(n
1) *n+?
(r
\302\243
we
both
can
write
expressions
1) Xr
= r
Followingthis lineofthought
(1 ~
generates
X)
we see
further,
\342\200\236_0
that
\342\200\236_0
the sequence
\\{n
2) (n
+ 1)
/l
\\
2-3
\342\200\242
2
'
'
\\
3-4
2 \"'T
Section3.4
2/(1 -
and, therefore,
- (1
4- l)Lo
2,2
2X
n(1
equals
4,...).
in +
when r = 0, we
1)X\"+1
X)3
that
see
\"
=
write
l)(r)X'
(r
\302\243
\302\243l
(r)
Now since br
4,...).
we can
+ 1)
(r
\302\243
\302\2437
\342\200\242
-3,3
2,2
(n
2)
\302\243(r
Xp
- (r
l)(r)
1)X'
l)(r)X',
Likewise
l)r};_0.
2X
= \302\243>
2)(i\302\273+
tn=0
(1-X)3
DXn+2
\302\243(r)(r
1)X'
r-2
(r)(r
\302\243
r\302\253G
\342\200\242
\342\226\240
and the last sum
(0,0,1 \342\200\242
2,2
4,...),
3,3
sequence
- 1) is 0 when r =
oo
0 to
because the coefficient
r(r
combine
these
results to discover generating functions
the
generates
from
can
We
other
2) (n +
\342\200\242
(0,1
sequence
2X
taken
l)Xn generates{(n4-
then
But
\302\243J
(1 so that
(n +
+ 2)
(n
2\302\243_0
3,3
yT5
- A)
the
generates
X)3
\342\200\242
\342\200\242
\342\200\242
287
Relations
Recurrence
Solving
X
X(l + X)
(1 X)2 (1 - X)3
2X
- X)3
(1
the
No doubt
2)(n +
{(r 4- l)(r)
sequence
the readercanverify
3)(n
4-
6X
V~
- X)4
to
2)(r
Yi (n
6/(J
n\\/
.
3)(\302\273+
- X)4generates{(n
'
,
n\\/
2)(\302\273+
(r
\302\243
+ 2)(r
+ l)(r)X'
(r
\302\243
+ 2)(r
+ l)(r)X'
r-0
generates {(r+
4- l)(r)t.0;
= (0,1,4,9,...).
*\342\200\242
DlLo;
(1
{r2fc.o
Ho
4- l)/6}~_0;
2)(n
- tln *3)<\":2><n+\"
o
na0
{(n +
r}~_0
that
t cc+w
- A)
-i^.
{I
generates
for
For instance,
sequences.
generates
can be
0,1.
and
iwn+1
1)X\"
4- 3)(n
288
Chapter3: Recurrence
Relations
6X2
(1 -
]T (n
n-0
X)4
(r
\302\243
r-2
{(r +
generates
Since(r
2)(r + 1) -
3)(r
l)(r)(r
l)Xn+2
- l)t_0.
+ 2)(r + 1) - r3 + 6r2 + llr + 6 then r3
llr - 6 so that {r3}^0
is generated
by
X
X)
manner we
so on.
a similar
{r4)7-o>
6r2
+ 2)(n +
1)X'
l)(r)(r
6(X)(1 +
(1-X)3
6
(1-X)4
In
+ 3)(n
(1-X)2
can find
generating
(r +
6
XQ. + 4X + X2)
(1-X)~
(1-X)4
functions
for the
3)(r +
\"
sequences
and
{r5)7-o>
Now there
A(X) = 2\302\243_0an
properties
of
generating
.)>then A(X)
functions.
=
If
2\302\243_x
an Xn
a0
(a0,ai,a2,..
generates
\342\200\224 \342\200\224 X
= 2\342\200\236_2
Xn
^(X)
(0 ,a1,a2v \342\200\242
\342\200\242)>
^n
(Xi
clq
generates
\342\200\242
\342\200\242
\342\200\242
in
X
and,
ax
(0,0,a2,a3,...);
ak_x Xk~l =
general, A(X) a0
where there are k zerosbefore
(0,0,.. .,0,ak,ak+l...),
2\302\243_fc
anXn
generates
generates
ak.
then
dividing
this shifting
in the
property can be describedby a change
in
variable
the
If
n
1 by r,
series
we
dummy
power
expressions.
replace
=
Xn~l
then
becomes
which
(A(X)
a0)/X 2~=1 an
2\"_0 Gr+i Xr,
signifies
that the coefficient
an in the original
sequence is replacedby an+u that is,
to the left.
the sequence has been shifted
one
place
Likewise replace n - k by r, and the expression (A(X) - a0 - 2\302\243_fc
becomes
anXn~*
axX - ... - ak_1Xk~1)/Xk
2;.0 \302\253r+^r which
In
the
the
other
term
words,
sequence (ak,ak+uak+2,...).
an in
generates
the original sequenceis replacedby an+k for each n, indicating that the
=
A(X)
sequencehas been shifted k places to the left. Thus,for instance,
so
that
+
1/(1
X)2 generates(1,2,3,.
..)-{* lfe.0
X)2 1]/X
[1/(1
- {n + 2fe=0, and [1/(1 - X)2
1 - 2X]/X2
(2,3,4,...)
generates
generates (3,4,5,...)= {n + 3}~=0 similarly 2/(1 - X)3 generates{(n + 2)
(n + l))LoSothat
[2/(1 - X)3 - 2]/X generates [(n + 3)(n + 2)fc.0.
Let us combine
results
on the shifting property of generating
these
with
functions
the
different
identities for geometricseriesand
together
series
to obtain generating functions for a few familiar
other
sequences
(see Table 3-1).
Again
Section
3.4
Table3-1. Table
of Generating
Sequence
Functions
Generating
Function
MX)
(1)
C(k,n)
(2)
(1 +
*)*
.1
1-
(3)
a\"
(4)
(-1)\"
(5)
(-l)V-
(6)
kis a
(7)
C{k
(8)
C(k
- 1+
1 - aX
1
1
1
(-a)\"
C(k - 1 +
1 + a*
n, n)
fixed
positive
1 +
int\302\253
1
(1 -xf
n,
n))an
(1
n,ri)(-af
(1
1
+
aXf
1
(9)
(1 -
*)2
(10)
(\302\2531)
(n +
(12)
(\302\273+1)(\302\273)
(1-xf
2
+
2)(\302\253
1)
(1- Xf
2X
(1Xf
X(
(13)
+ X)
n*
(14)
(n+
(15)
(n
2)(/J+
3)(n+
+
(16)
/\302\2733
(17)
(n
2)(a
1)(#\302\273)
1)
(1
- xf
(1
-xf
(1
X(1 +
ex
-x)4
AX
X2)
(1 -xf
1
1)a\"
(1 -
aX)2
aX
(18)
na\"
(19)
ifa\"
(20)
ifa\"
(1 -
aX)2
1 + aX)
(1 -aXf
(aX)(\\ + 4aX +
(1
-\302\253*7
a2X2)
289
290
Chapter
3: Recurrence Relations
expressions for
IfA(X)
we
that
some
list
equivalent
reference.
ready
of Equivalent
Table
we encounter
functions
generating
Expressions
for
Functions
Generating
\302\243a\342\200\236Xn,then
n-0
= A(X)
X\"
a\342\200\236
\302\243
n-k
an_x
\302\243
n-k
= X(A(X)
Xn
Xn
a\342\200\236_2
\302\243
n-fc
an_3X\"
\302\243
n-fe
oo
Ok.xX*\"1,
OxX
ak_2X\"-\\
-a0-axX
- X2(A(X)
= X3(A(X)
oo
a0
a,_3X*-3),
o,X
a, X
- a*_4X*\"4),
\342\200\242
, .
\\
= X*(A(X)).
X>n_*Xn
n-k
to
solve
linear
recurrence
Now we are prepared to describehow
coefficients
the
use
of
relations with
constant
by
generating functions.
The processisbest
illustrated
Solve the
3.4.4.
Example
an
the
number
We
by
steps
7 an_x
of the
recurrencerelation
+ 10 an_2
Next
multiply
from 2 to
0 for
n >
2.
each term in
the recurrencerelationby
Xn
and
sum
oo:
anX\"
\302\243
n-2
3. Replace
procedure.
1. LetA(X) = 2Z_0anXn.
2.
examples.
- 7
f] c.xX\"
n-2
each infinite
sum
equivalentexpressions:
by
+ 10Y. <*n-2Xn
0-
n-2
an
expression
from
the
table of
Section
3.4
Solving
a,X] -
[A(X) -a0-
1X[A(X)
Relations
Recurrence
10X2[A(X)] =
a0] +
291
0.
4. Thensimplify:
+ 10X2) -
- IX
A(X)(1
a0
- 7a0X
axX
or
{
5.
i _
A(X)
Decompose
Cx and
where
>
6. Express
A(X)
7X +
as a
10X2
\"
(1 - 2X)(1-
5X)*
as the
7. Expressa\342\200\236
of Xn in A(X)
coefficient
otherseries:
an
Cx2n
the
the only possiblesolutionsto
(Thus, we seethat
+ C25n.
in Example
solutions
suggested
this
recurrence
3.3.1(b) were
relation).
8. Now
for
use
a0
0x4-02
the
= 10
two
equations
and
2CX
5C2
- 41,
292
Chapter
Relations
3: Recurrence
3.4.5.
Example
=
24a\342\200\236_3 0
for
oo
since
n > 3.
anXn
Then
o,nXn.
2~\342\200\2360
9 f]
by Xn and
multiply
+ 26 f]
an^Xn
the infinite
an_2X\302\273
24
sum from
sums by
a,X -
expressions:
equivalent
a2X2)
- 0.
an_3X\"
\302\243
n-3
n-3
n-3
- o0 -
(A(X)
+ 26an_2
9an_x
Thus,
n-3
Replace
n > 3.
- o0 - a,X)
9X(A(X)
+
- a0)
26X2(A(X)
- 24X3A(X)= 0.
Simplify:
- 9X
A(X)(1
+ 26X2
24X3)
a0 +
GlX +
a2X2
- 9aoX -
9aiX2
26aoX2
or
A(y.
AK*}-
Now
- 9X
are constants
+
_ a0
(ai -
9a0)X
- 9a t
(a2
1 - 9X + 26X2 -
26a0)X2
24X3
A(X)
L/i
=
1
- ^2X
- C, \302\2432nX\"
L/o
+ C2
(ci2n
\302\243
f]
that
there
3\"X\"
- 4X
+
n-0
+ c23n
so
v^a
1-
r\342\200\224^7
3X
n\302\2730
4X)
C3
4nX\"
\302\243
n-0
+ C34n)Xn.
Section
293
3.4
X + X2
MX) = (1 -
2X)(1
- 3X)(1 -
and C^l
4X)
3X)
Example 3.4.6.
Here we
JT
n-3
Solve
1/2,1/3,1/4,
case, an
- 8an_t
an
if A(X)
that
see
(1 -
C2(l
- X + X2.LetX =
in this
-4, and C3- 5/2.Thus,
-
(1
n-3
- 3/2 (2\")
axX
(3\") +
-4
-
5/2 (4n).
for n
21a\342\200\236_2 18a\342\200\236_3 0
> 3.
= 2^_0a\342\200\236Xn,
then
-
18 f]
- 0,
an_3Xn
n-3
n=3
- a0
(A(X)
and
- 4X)
(1
3X)
2X)(1
- 8 Y. an-iXn+ 21\302\243an_2X\"
anXn
C3
C2
C\\
- 2X)
(1
- 4X)
3X)(1
- 8X(A(X)
+ 21X2(A(X) -
a2X2)
a0
a0)
axX)
18X3A(X)
- 0,
or
,,\342\200\236.
\"
^
a0
since
But
are
- 8X
constants
C3/(l -
or an =
We
linear
Then
Cx2n
(ai
+ 21X2 -
CuC2fC3
3X)2.
C23n
18X3- (1-
2X)(1
= Cx/(1 A(X)
2^0 [Cx2n + C23n
+ C3(n + l)3n.
such
that
A(X)
3X)2 we
+
2X)
+ l,M)]Xn
C33nC(n
are
where
P(X)/Q(X)
the
with the
relationship
of
coefficients of the recurrencerelation.Moreover
note
the relationship
in the recurrence relation.
the powers of X in Q(X)with the subscripts
For instance,in Examples
the relations
+
3.4.4-3.4.6,
an - lan_x
=
=
0
and
+
+
21an_2
0, an
an
8an_x
10an_2
9an_x
26an_2
24an_3
= 0
the
denominator
Q(X)
18an_3
gave rise to A(X) = P(X)/Q(X),where
1 - 8X +
was equal to 1 - 7X + 10X2, 1 - 9X + 26X2 - 24X3,
and
21X2 - 18X3,respectively.
Let
us note
the form
(ax - 7a0)X,a0
4-
(ax
- 9a0)X
they
and
are
a0 +
a0 + (ax
294
Chapter
Relations
3: Recurrence
8a0)X
-\\-
+ 21a0)X2, respectively.Here,too,the
relation and the values
etc., determine
a09au
- 8ax
(a2
the recurrence
Solvean
3.4.7.
Example
12an_2 -
Qan_x +
P(X).
8an_3
of
coefficients
0 by
functions.
generating
the ideas
Following
P(X)
MX)-La'X'-Q(X)
-
+ (a2
6a0)X
+ (\302\253i
\302\253o
- 6X
+' 7:
- 2X
;\342\200\224^
(1
= C, \302\2432\"X\"
+ C2
+ C2(n
C,2\"
n-0
- ^2X)2
(1
f]
(\"
+
X)
+ 1)2\" +
12a0)X2
'
- 8X3
12X2
- 6at +
we
2X)3
use
that
+ C3
]T (ra
to
fractions
partial
such
2X)3
2\"X\"
+ 1]
(\"
2)j\"
C3
2)
2nX\"
2\"| Xn,
so that
\302\253.
Cl2\"
+ C2(n
+ 1)2\" +
(\"
+ 1}
2)i\"
C3
T.
Functions
Outline of the MethodofGenerating
1.
the
discovered
have
we
What
outline
method
relation
recurrence
A linear
given, which^without
form:
an
constants,
.
+
+ b !<*\342\200\236_!
ck #
2. LetA(X)
0, and n >
with
coefficients
constant
of generality,
loss
ckan_k
we assume
= 0,
general.Let
of degree
us
k is
are
k.
sum
anX
2\302\243_0
from
n, multiply
k to
oo, and
Section3.4
cxaQ)X +
295
Relations
Recurrence
Solving
\342\200\242
\342\200\242
\342\200\242
\342\200\242
4- \342\200\242
4- (ak_x
+ exak_2 4- \342\200\242
4=
.
.
.
1
4+
+
+
ck_xaQ)Xk~l
Q(X)
cxX
c2X2
c*X\\
to get the
back
Then,
A(X)
knowing P(X) and Q(X), transform
coefficients an (call this performing
the inverse transformation).
This canbeaccomplished
in one of several ways. We shall describe
(a2 4-
+ c2a0)X2
cxax
and
3.
two.
use partial
functions to
If the factorization
of
\342\200\224
\342\200\242
\342\200\242
\342\200\242
(1
then
<7*X),
familiar
is known,
Q(X)
<7iX)(l
q2X)
for
identities
and
series,
generating
that an is the sum of the coefficients
of known
series.
However, even when we cannot factor Q(X) if we are given initial
conditions we can solve for as many coefficients
of A(X) as we desire by
division
of
inverse
into
the
P(X) [or by finding
long
Q(X)
multiplicative
of Q(X) since the constanttermofQ(X)
is nonzero].
this
the process we have
and we affirm
described
is reversible
Actually
hence
following theorem.
in the
linearrecurrence
relation
= 0> where
Ck&h-k
is a
with
ck #
> k,
S^oOhX'1equalsP(X)/Q(X),whereP(X)
+ cxak_2
(a*-i
4-
4- (ax 4- cxaQ)X
Q(X) - 1 + cxX
- a0
and
\342\200\242
\342\200\242
\342\200\242
4-
ck_xaQ)Xk-x
\342\200\242
\342\200\242
\342\200\242
+
4+
ckXk.
Conversely,
given such
polynomialsP(X) and
relation
coefficients
of
is a
has
P(X)
sequence |oj;.0
= P(X)/Q(X).
a linear
satisfies
homogeneous
coefficients of degree k, where the
relation are the coefficients of Q(X).
\342\200\242
\342\200\242
where b0 * 0 and bk
4- bkXk
4- bxX
4- \342\200\242
constant
with
recurrence
if Q(X) - b0
the
In fact,
k> there
degree
where
Q(X),
0,
then
Q(X)
60
= 60
where
c,
6j/60
for
i >
A(X)
(1
(1 +
the
coefficients
cxX 4-
...
4-
b*/M*)
\342\200\242
\342\200\242
\342\200\242
4-
ckXk)
1. Then
\302\243p<xi
\342\204\242
Q(X)
and
4-
+ bJboX
of A(X)
1 4-
\342\200\242
\342\200\242
+ ckX
cxX 4- \342\200\242
are discoveredby
using
>
\342\226\240k
partial
fractions
and
296
Chapter3: Recurrence
Relations
of 1
factors
the
satisfiedby
+ cxX +
Much of the
theory
relations
with
recurrence
extensive
that
than
ckan_k
= 0.
relations,
table of generatingfunctions.
in the
summarized
Cxa^
\342\200\242
\342\200\242
\342\200\242
+
in particular linear
can
be developedusing such
coefficients,
But of course, this requires a much more
of sequences and their generating
functions
techniques.
of pairs
knowledge
is an +
recurrence
of
constant
function
generating
ckXk.
relation
the recurrence
Then
\342\200\242
\342\200\242
\342\200\242
+
of A(X)
coefficients
the
1.
the
Solve
(a)
an
relations
recurrence
4- n
following
an_
wherea0
an = an_ 4- n
(b)
4- n
(c) an
an_
=
4n(n
(d) an
an_
(e)
an
an = an_
(f)
(g)
an
(i)
an
a general
Write
- 1)
l/n(n
4-
4- 3m2
an-
an_
wherea0
1)
wherea0
4- 3m
4-3n
wherea0
4- n3n
where
for A(X)
expression
1.
1.
a0 = 1.
where
4-
7.
a0 = 1.
where
4- 1
4- 2n
an = an_
(h)
2.
an_
4-
a0 = 5.
where
by substitution.
where a0 = 2.
1.
a0 = 1.
= P(X)/Q(X)
the
specifying
coefficients
(c)
(d)
an
an
5an_x 4-
a0 = 1,ax
a0
8an_2 -
0,
2an_3 4- an_6
1, ax = a2
3. Solvethe
and
P(X)
4an_3
= 3, a3
recurrence
following
forVi >
= 0
a2 = 1; and
- 0 for n >
3,
6,
a4 =
a5 =
2.
relations
using
generating
functions.
(a)
an
> 1 and a0 = 1.
= 0 for n > 2 and a0 v = -3, c^
10.
4- ^uan_2
9an_x
x -t20an_2
- 5an_x
=
0 for n > 2, and a0 = 1, ax = -2
4- 6an_2
=
> 2 and a0 = 0, ax = 1.
4a\342\200\236_20 for n
= 0 for rc
3 and a0 = 0, ax = 1,
4- 9an_3
an_l
9an_2
-
6a
(b) an (c)
an
(d)
an
(e)
an
a2
(f) an (g)
= 0
for n
- 2.
3an_2
4- 2an_3
4- an_6
a\342\200\236
2a\342\200\236_3
a4 = a6.
1, ax
1, ax
0, a2
0 =
= 0.
a2 =
a3
Section
297
3.4
(h)
an
(i)
a\342\200\236
an_l
a2 =
-1.
- 16an_2 4- 20an_3-
33an_2 -
10an_x 4
=
-23.
a2
(a) an
5.
7an_l
an
(c)
an
(d)'
a\342\200\236
(e)
an
(f)
an
\302\253
0 for
(a)
&\342\200\236-/(*
(b)
6n =
(c)
6n
/(n4
/ (n
of
n\342\200\224like/
= 0, ax
=
1, ax
1,
==
1,
functions.
generating
using
and a0
> 3 and a0
n >
2.
0 for
n >
3.
for n >
0 for n >
3.
3.
= 0
=
the sequence
generates
anXrt
2^\342\200\2360
is somefunction
- 0
an
> 3
for n > 2.
for n > 2.
3an_x + 3a\342\200\236_2
an_3 +
9an_x
27an_2 27an_3
- 12an_3
lan_x + 16an_2
A(X)
= 0
12an_2
- 4an_x - 12an_2
5an_x + 6an_2
(b)
If
for n
= 0
36an_3
4. Find a generalexpression
for
0 for
{an}^_0>
(n) = n2 4 3rc 4
1, what
and
an =
/ (n)
generates
+1)?
2)?
- 2) for
n >
2 and
60 =
&i
- 0?
of the basiccombinatorial
in
science
is
procedures
computer
a
list
of
and
oneofthe
bestknown sorting algorithms
items,
sorting
is called bubble sort, so namedbecause
move
small
items
up the
in a liquid. The bubble sort
list the same way
bubbles
rise
as follows:
that an n-tuple A of
procedureis described
Suppose
of A. The
are given, where A(i) denotes the i-th entry
numbers
n-entries of A are to be sorted into nondecreasing order;thus, the
smallestentry is to be placed in A(l) and the largestisto be placed
in
The
sort procedure makes n - 1 passes
over
the
bubble
A{n).
where
a
starts
at
and
A,
A(n)
n-tuple
pass always
proceeds through
the unsortedportion
of A. Each
pass consists of a sequence of
6. One
each
steps,
of which
compares A(i)
with
A(i
1) and
interchanges
their values if they are in wrong relative order. Thus, if A(i) >
first pass starts
The
A(i 4- 1), then the entriesare interchanged.
1 and
i = n \342\200\224
with
until i = 1. At the end of the first pass,
continues
the smallest entry
into
the position
of A has been \"bubbled up\"
In
and
not
further.
second
need
be
considered
the
A(l)
pass, the
the
smallest
value of i ranges from n - 1 to 2, this pass \"bubbles\"
of A(2),.. .,A(n) into the secondposition.
Now
and
then
A(l)
A(2)
the
are in correct relative order. Finally,
the (n \342\200\224
after
l)th
pass,
the
values A(1),A(2),.. .,A(n - 1)areall in place, and consequently
n-+h
A
of
has
to
been
moved
the
position.
largest entry
Find a recurrencerelationfor
rc-1passesand solve this
7. Solvethe following
divide-and-conquer
in the
(a) an = 7an/3
where
4- 5
n = 3* and
ax
1.
the
number
relation
of comparisons
made
by substitution.
relations
by substitution:
298
Chapter 3: RecurrenceRelations
(b)
an =
2an/4 4- n
where n =
(c) an = an/2 +
1.
- 1
2n
where n = 2k
ax =
and
4k
ax =
and
1.
8. Verify by mathematicalinductionthat
is a
an
= Axn
a>n
= ^
A2
to
solution
an/d +
where
9. Show that
1) is
4-
(n)
C(logd
relation:
a*
where n
10. Show
=*
an
e (C
nlog'c
- 1)/(C
an = C an/d 4n = d*, C #
ax
(b)an
(0
the
generating
an =
- 1) is
the
solution
to
the
3\302\273
(i)n
-.-(-!)'
e for
and
= e.
that C(2n -
an = (4n ax = 1.
(a)
+ C
an/d
relation
recurrence
12. Give
the recurrence
and
dk
that
the solution to
6)an_x
function
for
for the
1)!
is
2 where
sequence {aj~_0if
the
solution
Section
3.4
Recurrence
Solving
(d)
= 3\"
an
+ 5\"
(e)a\342\200\236
299
Relations
3(^3)
5(i)\"-7(5)\302\273
+
2)5\"
(f)a\342\200\236=(ra
(g)
an =
(h) an
(i)
Selected
3)(ra
+ 2)(ra+l)
l)(ra)(ra
- 1)
7(ra
(ra
= ra23n
a\342\200\236
\"
a,
(b)
ra(ra
a\342\200\236
,(c) .
ra2(ra
=
a\342\200\236
D2
ra
(g)
(ra
a\342\200\236
3. (b)
<c>
A(X)
ra
nn+1
l)2
1 + 7X
1+
3X2
5X
- 5
11
\342\200\242
5\"
2
a\342\200\236
*\302\273
+ l)3
3\"+1 - 1
\342\204\242 =
o\342\200\236
(a)
---4----
(f)
(h)
- (ra +
a\342\200\236
=
1223
2ra +
ra
+ 7
+ 5
1111
1+--t
+ 1)
l)(2ra
-
1) +
+
(\302\273
(a)
2.
3.4
for Section
Answers
\342\200\242
4\"
-1
if
(d)
0
o\342\200\236
(e)
1/12
a\342\200\236
(f)
8/9
a\342\200\236
(h)
A(X)
-\302\253\"\302\253\342\226\240
ra
f- 2\"
a\342\200\236
is even,
{-3
+ 4
- 6/9
ra
\342\200\242
3\"
1/9
+ X=
-2/49
a\342\200\236
if
ra
r^x;
- 5(2\">
\"\342\226\240
4<3\">
is odd
(-3)\"}
(-2)\"
X
-i
r^ix
16X2 +
(2\") +
= -2/49 + 7/49
20X3 1 - 2X (1- 2X)2
7/49
(ra
1)2\"
- 5/49
\"
(-5)\"
5/49
1 +
5X'
300
Chapter
Relations
3: Recurrence
(i)
lU
1 ~
\"
A(X\\
9X
3X
an
(1
36X3
20
15
1-
- 3X)2
(1
15(3\")
1 \342\200\224
9X
\"
1 - 10X + 33X2 -
+
6(\302\253
- 4X)
- 3X)2(1
- 4X'
- 20(4\
l)(3n)
11. Let
(4 n
- 6ra\342\200\236_!
- 6)(4 n - 6)(4 n -
(4 n
- 6)(4 n
(4 n
a\342\200\236
(4 n
- (4 n since
a,
-
an
10)a\342\200\236_2
- 6)(4
(4 \302\273
10)(4
14)a\342\200\236_3
10)(4 n
= 1.
We rewrite
2\"\"1
(3)
(5)..
(2
4) (2
\342\200\224
and
2)
(2 n
5) (2)
.(2 n - 7)(2 n
2\"'1 (2 n
2\"-1(l)(2)... -
(2n- 2)!
(n
(2
1)!
THE METHODOF
This
learned
from
+
CiO\342\200\236-i
the
is nothing
method
\342\200\242
\342\200\242
\342\200\242
+
ckan_k
ra
5)(2
(2)
(1)
- 3)]
(4)
(2)
(6)..
.(2 n
- 6)
2)!
4)(2
- 2)
2)!
- 2)(n -
1)
(n - 1)!
1)!
1)!
ROOTS
CHARACTERISTIC
new method
- 7).. .(2)(3)
(n - 1)!(\302\273
C(2n-2,n-l)(n-
3.5
6)a\342\200\236_3
- 2)!
3)(n
{n
(2ra - 6)(2 n
(2)(4)...
we have
2\"-1(2 ra
o\342\200\236
2)
- 14).. .(6)(2)
and denominatorby
Multiply numerator
\342\200\224
- 10)(4(n -
this as:
- 3) (2)(2 n
[(1)
6)a\342\200\236_2
.(6) (2)^
14)..
6)(4
2(2 n
- 10)(4 -
1)-
- 6)(4 (n -
(4 n
of generating
= 0 where
of all that
we have
functions. If we want to solvean +
we can find A(X) =
0, then
ck =\302\243
k. Then the factors of
of degree
of
coefficients
of A(X).
Section 3.5
301
Roots
of Characteristic
Method
The
In Example
3.4.4 the denominator
But let us makeone observation:
Q(X) - 1 - IX + 10X2 and the general solution for an was an - C^\" +
because
C25rt
- 2X)(1 -
as (1
factors
Q(X)
reciprocals. To avoid
another
this
are
direct
in
C(t) = t2
- 5). Now
roots
and multiply
[1 - 7(1/0
by
4-
t2 to
10(lA2)]
polynomial, 2 and 5,
of this
the form
with
relationship
= t2
the
of their
powers
let us consider
X in Q(X) by lit
Q(l/t)
of
roots
the
that
Note
involve
relationship,
reciprocal
we replace
where
polynomial
5X).
solutions
the
an
= Cx2n
4-
4-
C2b\\
In Example 3.4.5
A(X)
\"
P(X)
Q(X)
- 2X)(1 -
(1
form
of the
again
that
the
- 9X
WO
and
P(X)
\"
solution
3X)(1-
24X3
4X)
was an
recurrence
that
for
+ 26X2
= Ci2
C20
C34\302\273.
Note
C(t) = t*
and these
the roots
= t3
Q{l/t)
to
1/4,
are
4)
of the
form
the
of
the roots
but
3)(t-
2, 3,4,
solution
for
On-
polynomial
recurrence
C(t) is
Note
\342\200\242
\342\200\242
= 0
4- \342\200\242
4- ckan_k
relation.
\342\200\242
\342\200\242
.(l-a,X)\\
Distinct
Roots
If the
Clot\"
4-
characteristic polynomal
of the solutions for
Ckotk where
\342\200\242
\342\200\242
\342\200\242
4-
to satisfy
distinct
has
form
general
the
roots
au..
homogeneous
constants which
.9ak9
equation
may
then
the
is an
be chosen
Example 3.5.1. To
characteristic
solve
an
equation is C(t) =
generalsolution IS
dn
= Ci
t2
6 4- L/2
302
Chapter
3: Recurrence Relations
= 5,
2, ax
equations
to find
Cx =
that
= 2
4- C2
Cx
and
C2 = -1,
3 and
the
and
- 5
4- 4C2
3CX
required
solution
4-
= 0
is an =
(3)3n -
4n.
ax
Solve
3.5.2.
Example
= 5.
an
5an_x
6an_2
where a0
= 2 and
Since
Cx 4- C2=
Solving these
equations,we
n >
all integers
= 5.
4- 3C2
2CX
Cx =
find
2
C2= 1.Thus,
1 and
an
= 2n
4-
3n
for
0.
Multiple Roots
In Example
3.4.7
to an
general
discovered
we
solution
form
= Cx
an
2n 4-
6an_x
C2 (n
4-
1)
= 0
8an_3
[(n 4-
4- C3
generating
by using
12 an_2 -
4-
for n
2) (n
4-
1)
because
2n]/2
Cx2n 4- C2(n
4-
1)2*
Cx2n
and
recombine,
l/2C3n22n.
D2y Dz
such that an
= Dx 2n
Example 3.5.3.
an
(b) an
(c)
an
46a\342\200\236_x
3an_x
9an_2
4- 3an_2
9an_2 4-
(ri
4- C22n
in another
21an_2 -
4- C3
2- as
4-
C3
(y)
2* 4- C32\"
example.
form
general
= 0,
the
Write
2)
= (Cx 4-
this
exhibit
(\" +
4- 0,^12*
we have an
In other words,
in general.Letus
(a)
4- C3
to
8 =
an_3
27an_3
= 0,
and
= 0.
of the
solutions to
Section
The Method
3.5
so
Dx
D2n
form an
is t3 - 3t2
is the
solution
solution in (b)
the general
4- D3n2.
that
303
Roots
of Characteristic
for
(b)
is an
in
Dx3\"
is
= (t -
+ D3n2ln
4- D2nln
Dxln
- 1
4- St
(a)
+ D2n3n.
- 9t2 + 271 - 27 =
the characteristicpolynomial
is \302\2433
(t - 3)3 so
=
solution
for
is
+
+
(c) an
Dx3n
D2n3n
general
Dsn23n. We
this
to
cases
to
where
the
characteristic
expect
generalize
In (c)
the
that
would
polynomial
several
has
3.5.4.
Example
roots.
multiple
recurrence relation is
homogeneous
solution
for
an is an = D,2n + D2n2n
2)2
(t
of
- 3)3 then
+ D4n3n +
linear
the general
D5n23n.(Of
- 3)3 - tb - 13t4 + 6713 - 171t2+ 216*- 108 we
- 13an_x 4- 67an_2
the recurrence relation must have
been
an
=
>
n
for
+ 216an_4
5.)
0,
108an_5
coursesince(t
that
see
(t
\342\200\224
171an_3
In generalwe
D33n
2)2 (t
the
have
3.5.1.
Theorem
of the
roots
distinct
the
Let
theorem.
following
characteristic
linear homogeneous
+
C(t)
polynomial,
\342\200\242
\342\200\242
\342\200\242
=
recurrence relation,an 4- cxan_x 44- ckan_k
0, where n > k and
<
#
fc.
Then
is
a
there
0, be alf a2y.. .,aswheres
ck
general solution for an
\342\200\242
\342\200\242
which
is of the form, Ux(n) + t/2(rc)
where Ui(n) =
4- \342\200\242
4- Us(n)
=
tk + cx tk~1
(A. + A, n
m, is
where
and
ck of the
\342\200\242
\342\200\242
\342\200\242
4-
4- A,
\342\200\242
\342\200\242
\342\200\242
4-
\"2 +
A^
Example3.5.5.
solution
general
(D6 4- D7n
Example
=
12a\342\200\236_3 0
4-
3.5.6.
for rc >
an
may
conditionsgive
D2rc
(t
+
polynomial
- 2)3 (t - 3)2(t - 4)3.
D3n2) 2n 4- (A 4- Dbn)
Then
3n +
D8n2)4n.
Solve the
3 with
the
The characteristicpolynomial
Thus,
is
is an = (Dx 4-
for a
characteristic
the
that
Suppose
linear homogenous
recurrence
relation
the
m\"1'-1) \302\253?
be written
the
system
- 7t2 4- I6t
is f
as
Cx2n
4- C33n.
C2rc2n
of equations
2CX
4CX
Cx 4- C3
+ 2C2 4- 3C3
4- 8C2 4- 9C3
- 12
= 4
= 8.
(t
- 2)2
But then
(t
- 3).
the initial
304
Chapter 3: RecurrenceRelations
This
of the
solution
unique
the solution Cx = 5, C2
recurrence relation
has
system
an
+ (3)(n2n)
(5)(2n)
Remark. The
C3 =
3, and
is
- (4)(3n).
have
we
methods
roots
the
described
of C(t),
1.
the
factor
and
Find
in
4 in
for
for
4an_3 = 0 for
n >
Section
relation
recurrence
of
a solution
3 of
(a)-(e)of Exercise
Section
5.
3.4.
an
4-
ban_x
to the
recurrence relations in
(b)
an
(c)
(d)
(e)
(f)
Bx + nB29
nB2 + n2Bz,
=
an
Bx 2n + B2 3n,
=
an
Bx 2n + B2 n2n,
=
an
Bx 2n + B2n2n + B3 n2
an
B, 2n + B2 n2n + B3 3n
=
recurrence
Bx +
6. Find Cl9C2,C3
C3 an-'s = 0 for
(a)
3.4.
Find
(a)
8an_2
3.
4. Find
characteristic
polynomial
of Section 3.4.
3
relations Exercise
2. Do the same Exercise
3. Do the same
the
aB-B13B
if
the
n >
2n,
4- B4
S5 6n.
an + Cx an_x
n3n +
recurrence
relation
3 has a general solutionof
+ B26n,
the
C2an_2
form
(b) an = Bx 3n + B2 ^3n,
(c) an = 5x3\" + B2 n3n + B3 2n.
7. Solve the following
relations
recurrence
using the characteristic
roots
(a) an - Zan_x - 4an_2 = 0 for n > 2 and, aQ = ax = 1;
(b) an - 4a\342\200\236_1
12an_2 = 0 for n > 2 and, a0 = 4, ax = 16/3;
(c) an
4an_! + 4an_2 = 0 for n > 2 and, a0 = 5/2, aj = 8;
= 0 and,
(d) an + 7an_x 4- 8a\342\200\236_2
7;
a0 = 2, ^
(e) an 4- 5an_x 4- 5an_2 = 0 and, a0 = 0, ax = 2 V5;
Section
Roots
3.5
(f)
an
a3
(g)
(h)
(i)
(j)
(k)
(1)
+ 10a\342\200\236_4
7a\342\200\236_2
- 16 V2
25
- 7, ax
0, a0
8 V2
+ 5
a\342\200\236
o\342\200\236_!6o\342\200\236_20
5on_! +
6a\342\200\236_20
a\342\200\236
(m)
+ a\342\200\236_i5a\342\200\236_2
+ 3a\342\200\236_3
a\342\200\236
(n)
6o\342\200\236
19an_!
15a\342\200\236_2 0
and
o0 =
where
0 and ox
2.
(d)
(f)
= t3
C(t)
- t3
- 1 = (t
16* - 12 -
3t
3t2
7t2
(a)
= t3-5t2 + 8t-4
= (t - l)2
at)
(b)
C(t)
3. C(t)
5.
C(t)
(t
6.
at)
(f)
C(t)
(a)
Cj
(b)
= (t
=
(t
- 2)2 (t
\\4n
0
an
(c)
-2n
a\342\200\236
(t
2)2
- 3)
- 1)
- 3)2{t - 6)
C2
C2
+
^6\"
o
(b)
2)2 (t
(t-
C2 = 18
-9
d - -6
an
l)3
(t -
3)
- 2)3
(c) Cj- -8
7. (a)
- l)3
C3
= 0
C3 = 0
C3 =
21
-18
\\(-\\)n
u
J(-2)n
o
3
+ -n2n
(e)0\342\200\236.2(z^r-2(zi_^)-
(f) C(t) = (t
an =
(t
V2)
3(V2)\302\273
= 41,
5(-
-1;
- -7;
c^- 0;
at= 1;
1;
a0 = 7 and 0!= 1;
0 where a0 - 0,at = 1,
where
a2
VB;
V5,
305
V2) (t V2)B + 7
V5)
(V5)B
(t
+
+
V5)
2(-
V5)B
-.
a2-
2;
Chapter 3: RecurrenceRelations
RECURRENCE
LINEAR
INHOMOGENEOUS
OF
SOLUTIONS
RELATIONS
an
the inhomogeneous
how to solve
+ . . . + ckan_k
learn
to
now
cxan_x
f (n)
for n > k,
illustration.
an_x =
- 1)where
3(n
n >1
and where
Let
Xn
by
A(X)
2^.o
sum
and
E anXn
n-1
Replace each
But
then
A(X)
3X7(1
A(X) = 2 S^o Xn
1)
for
n >
by an
(n
\302\243
l)Xn.
n-1
equivalent
X)3.
the inverse
functions,
recurrence relation
of the
we have
Then
- f] an.t Xn
n-1
sum
infinite
- oo -
A(X)
that
oo.
term
each
a\342\200\236Xn.
Multiply
from 1 to
X)\\
A{X) - a0/(l -
- X)2or
of
property
shifting
- 2,
a0
2 +
X)
generating
we have
3/2 (n) (n -
0.
3.6.2.
Example
recurrence relation
an
Let A(X)
by
and
Xn
solution
n >
to
the
2.
sum from
2 to
oo
to
get
anXn
\302\243
n-2
Replacing
a0
thp
2-.2
axX)
shifting
(n) (n
- 5
an-i
\302\243
^n
a^jX11
\302\243
n-2
sums by
- 5X(A(X) - a0)
the infinite
properties
+ 6
n-2
equivalent
4- 6X2
of generating
- l)Xn = 2X7(1-
X)3.
f]
n-2
expressions,
(n) (n-1)
we have
X\".
(A (X)
Section
3.6
(a,
+ (2X7(1 -
- 5a0)X
and
X)3)
(1 - 5X +
If
are
we
1-
- 3X
then
for constants
do +
1/3
that B
(1
X)3
Now
this
so forth,
3X)
-10
by
the
1) +
and
C(l
process
E =
inverse
- X)2
A(l
- 2X)
1 - 3X +
2X) =
5X2
(1
\" 10<2\"> +
21/4, we find
transformation
D(l
X3. Let
that
get the
3D +
we
and then
= 39/12,
process, we have
+
(|)
For
for the IHR above.
IHR by Xn, sum from
of the
if we
cxX
c2X2
c*X*) =
+....+
Y.f{n)Xn +
P(X),
n-fe
where
P(X;
= a0
+ (a! +
cxaQ)X
4-
\342\200\242
\342\200\242
\342\200\242
4-
(a*_!
4-
c^.2
\342\200\242
\342\200\242
\342\200\242
4-
let
k to oo,
we obtain
A(X)(1 +
(1 -
- 1,1/2,and
and get 6A
A
3X)
- X)3
3*
(t)
term
- 2X) (1 -
3X)
of X4
coefficient
works in general
each
6X2)\"
(1 -
5X
<^L\302\261i)_(10)2.
A(X) = ?Tn\342\200\236QanXnymultiply
and
2X2
(|(\342\200\236
3\302\273
+
5, then
6X2)
5a0)X
- 1, D = -10, and
- 19/4. Solve for the
= 3/2.Then
\"f +
find the
aY
3X)
C, D, and E. Thus,
equation
2E = 0, but sinceD A
5X
2X) (1 -
find
(<*i
(1 - t^
A, B,
(1 -
- X)
B(l
1 and
fractions,
by partial
a(x)-,v'
a0 =
can
we
then
ax
that
(1
- X3
2X)(1-
- X)3(l -
(1
But
5X2
for a0 and
example,
2X2
- X)3(l - 5X
6X2
5X
- 5X + 6X2) '
- X)3(l
(1
6X2)
conditions
initial
given
2X2
+ (a1-5a0)X
\342\200\236/V, a0
307
ck_xa0)Xk~\\
308
Chapter 3: RecurrenceRelations
for
Then,
= 1
Q(X)
+ cxX +
. +
ckX\\
Hf(n)X\302\273>
that
Note
= 0
ckan_k
Perhaps a few
more
examples
an
Let
(X)
- 2;_o
<*nXn-
^/^
does
what
Find
Q(X)
is a
k. But
Example 3.6.3.
recurrencerelation
1 tUL.
Q(X)
P(X)/Q(X)
for n >
A(X)
us a clue.
general
expression
+ 6an_2
=--
clan_l
solution to the
for a
n >
4n for
\342\200\242
\342\200\242
\342\200\242
+
represent?
f(n)Xn)/Q(X)
(2;_*
will give
5an_l
2.
Then
Y]4nXn
1-
jzj
6X2
5X
go
- 5a0)X
(Qi
- 5X
6X2
Now
4\302\273X\"=
\302\243
ra-2
by a
which
42X2
X] 4n-2Xn\"2,
n-2
becomes
= 42\342\200\224\302\245\342\200\224.
42X2X>X\302\273
tTo
- 4X
Therefore,
(,
W
4^
(1 - 4X)(1 -
- 5X +
homogeneous solutions
since
But
partial
6X2
have
+
+
5X
=
the
6X2)
- 2X) (1
(1
form
42X2
that
where
(fll
- 5a0)X
1-5X
+ 6X2
we
3X)
+ C23n.
see
\"
that
the
But likewise by
fractions
(1 - 4X)(1 - 2X)(1 so
Cx2n
a0
42X2/(1
bn = C4n
3X)
- 4X) (1 - 2X)
+ D2n + ESn for
(1
some
- 4X
+ Z - ^7 + 1 2X 1
3X
Section
D2n 4-
0, so the only
this
we compare
When
solve the
would
also
E3n
5an_i 4- 6an_2 =
of Inhomogeneous
Solutions
3.6
new
the
with
this function
(2\302\243.a/
h(n) isa
least
in this
Cf (n)
example,
+ h{n) where
HR.
the
of
solution
309
of/ (n).
Let us considerotherexamples
where we are to solvean \342\200\224
5ah
l 4
3.6.4.
Example
the case
us consider
example, let
Then, in this
case,we
2 = 2n.
obtain
P(X)
^2\"Xn
(1
For
6an
- 3X)(1 -
(1
2X)
- 3X)(1
-_2X)
Now
2nXn
JT
\302\2433
22X2
2^r
f^
2X
\342\200\224
f=o
(1
2X)2
- 3X)(1
2X)
Thus,
22X2
,,v,
Therefore,
using
P(X)
(1 - 3X)(1 fraction
a partial
decomposition
ABC
22X2
(1 - 3X)(1
Thus?
A3\"
- 3X)
22X2/(1
+ B2\"
(1
2X)2
(1 -
2X)2
Cin + 1)2\"=
AS\"
3X
generates
+
(B
- 2X)
we have
- 2X + (1 -
a sequence
+ C)2n
{6J
2X)2
^,0 where bn
+ Cn2n. Again
note
that
310
Chapter 3: RecurrenceRelations
+ (B
ASn
the
of
solution
relation
inhomogeneous
an
5an_l
Note that in
= 2n.
6an_2
of
was
form
the
had
the form C nf (n).
Cf (n), but in Example 3.6.4a particularsolution
is the
difference?
the
What
Upon reviewing
analysis of eachof these
=
4n
us
we
that
the
observe
factor (1 - 4X) in the
cases,
/ (n)
gave
of the expression
for A(X), and in this case4 was not a root
denominator
so no higher
of the characteristicpolynomial
power of (1 - 4X) occurred
in
of A(X). However, when / (n) = 2n, then
denominator
the
(1 - 2X)2
occurs in the denominatorof A(X) because 2 was a root of the
characteristic
polynomial.
(1)
Any
(2)
the
IHR
the
solution
and a solution of
discuss clue
Theorem 3.6.1.
an
+ c2an-2
+ c2an_2
cian-i
+
\302\253n
cian-i
relation.
Then
(2) If {a\342\200\236l}
~_0 is
+ a\"}
HR, then {a\342\200\236
^2>
Lo>
{a\"1}
{C^1 +
C2a\"2
is affected by
the
that
Suppose
\342\200\242
\342\200\242
\342\200\242
+
ckan-k
\"
of IHR, then
=0 are two solutions
of HR.
of
particular solution of IHR and {a\342\200\236}
*_0 *s a solution
n-o is a solution of IHR.
\\apn2)
a solution
a\342\200\2362}
~=0 is
{a\342\200\236l
(3) If
to
related
directly
1.
(1)
IHR
C(t).
polynomial
us first
of the
solution
a particular
solution
a particular
of
form
characteristic
Let
sum of
particular solution is
/ (rc);and
(3) the
is the
of the
both
HR;
of the
form
function
seem to be consistentin
There
are three
above examples:
{a\"2}
n-o*
\342\200\242
\342\200\242
\342\200\242
9 iann}
\342\200\242
\342\200\242
\342\200\242
Cma\"m}
n-o are
is a solution
~\342\200\2360
\342\200\242
\342\200\242
\342\200\242
9 ^m*
Proof.
a>n +
Ci<d
= /
equations
to get
the
for
a%
others
+
+ cl{a^_l
cxa^_x
+ a\")
(a\342\200\236
conclusion.
(rc), which is the desired
are similar.
Since
\342\200\242
\342\200\242
\342\200\242
+
cka%_k
+ a\")
- 0,
\342\200\242
\342\200\242
\342\200\242
Section
Solutions
3.6
The
of Theorem
import
for the
solution
IHR
falls
into
the
finding
complete
first,
parts:
311
and
discover
second,
generality, listing all possiblesolutions,
any
solution at all of the IHR itself.The sum of these two parts
particular
provides a general solution to the IHR and if appropriateinitial
are given,
the arbitrary constants in the solutionmay
conditions
be
Let us apply this conclusionto anotherexample.
determined.
Example3.6.5.
Find
the
solution
to the IHR: an complete
=
>
2.
7an_! + 10an_2 4n for n
We know that the solutionsto the HR:an - lan_x + 10an_2 = 0 are of
- 5) is the
the
form a? - Cx2n
+ C25n since C(t) - t2 - It + 10 - (t - 2)(t
characteristic polynomial.
The
main
now
problem
functions
generating
have
(-8)
Cx
36 =
C2 and
solution
and aY
The
Method
\342\200\224
lan_1
+ 10an_2
the
above
-32 +
2C\\
expression
+
4n
satisfying
to
(4)2n +
the
for
any
we
and
Simplying
these
two equations
5C2.
(12)5n is the
initial
conditions
unique
a0 = 8
36..
of Undetermined Coefficients
relation
called
undetermined
coefficients.
312
Chapter
Relations
3: Recurrence
rather
functions anymore,
based on our experience.
generating
Inhomogeneousrecurrence
/ (n)
where
other
generating
types
of functions
trial
solution
theIHR
/ (n)
where
others,
is a
-=
of known
reason for
and the
polynomial in
Of
rc.
can
we
increases
functions
types
guesses
(n)}~_0
/ (n)
one where
only
vocabulary of
than
{/
certain
with
relations
to solve
functions / (n) areeasier
that the generating functions for
educated
make
will
we
course,
solve the
that
function
as our
IHR
for exponentials.
= Dan, where D and a
-
areconstants.Let
\302\243>nX\".
n-0
we know
that
+ P(X)
D^anXn
-
A(X)
-\302\243=*
Q(X)
where
P(X)
= a0 +
(ax
c^X
+ .
. .
4-
(afc_!
+ cxak_2
+ .
and
Q(X)
- l
+ ClX +
\342\200\242
\342\200\242
\342\200\242
+
ckXk.
Now
D ]T
so that
by change
for
/ (n).
A(X)
Then
is
we shall
anXn
= DakXk
ak~kXn~\\
\302\243
of dummy variable,lettingr
J2 or kxn
=--
~ k,
. . +
ck_1a0)Xk
Section
Solutions
3.6
313
becomes
Thus,
D >
then
and
a\"X\"
by substituting
(1 -
DXkak +
A(X)
is
can
as to
question
k +
apply
aX)P(X)
- aX)Q(X)
(1
But
we have
A (X),
polynomial
= tk
C(t)
where
au a2,...,
ocs
- a,r (t
= (t
C(t)
distinct
the
are
Q(X) - (1 -
axX)ri
(1
1 ~
aX
ck
roots of
C(t). Thus,
- a2X)r>
... (1-
if a
+ 73
(1
\342\200\242
\342\200\242
+
\342\200\242\342\200\242\342\200\242(*asr
a2Y<
us write
itself. Let
presents
immediately
+ cxtk-1 +
asX)r.
i
form
\302\253
\302\245\342\226\240
1,
a{ for
has
the
. , ,s, then
2,..
the
777 +\342\200\242\342\200\242\342\200\242\342\226\240+\342\226\240
7777 + 71
777 -(-\342\200\242\342\200\242\342\200\242
- axX)
(1 - a,Xr (1- a2X)
+
(1 -
+ .
^
a2X)r2
. .
\302\243*!
4-
(1
- anX)
. .
^
(1 - cv,X)r
'
314
Chapter
3: Recurrence
we have
Relations
the value
7-3nforn>2.
- It
10
Substituting
- 7
10C3n~2
in
C3n\"2 (32
\342\200\242
32 or C -
we
C(t)
to
C(t)
solutions have
we take a trial
determined.
be
C3n -
7C3\"\"1
- 7 . 3 + 10)
in turn, implies
is ap -63/2. Thus, a particularsolution
that C(-2) - 7
(-63/2) 3n. Of course,the generalsolution
-
an
and
+ 10an_2 =
7an_l
relation gives
- 7 . 3\". This,
recurrence
the
\342\200\242
or
3n,
homogeneous
is not a root of
C is yet
the
C3n for an
Can,
a\342\200\236
form
characteristicpolynomial
from Example
3.4.5 that the
=
4(t
2) (t 5) and that the
a\" = Cx2n + C25n. Since 3
form
solution for ap = C3n where the constant
know
We
t2
the
of
C.
of
3.6.6.
Example
IHR
of the
solution
a particular
must determine
3\"
(~)
to
0,2\"
is
relation
this
+ C25\".
\342\200\242
\342\200\242
=
4- ckan_k
4- \342\200\242
Now if {a*1}^is a particularsolutionto an + c^.x
\342\200\242
\342\200\242
\342\200\242
4- c*an_fc
4\\a^)^Q is a particular solutionto an 4- c^.!
fx{n)andif
\342\200\242
\342\200\242
= f2(n)> then {a\302\243
-f
4- \342\200\242
a particular
solution to an 4- c^.i
4- a^Y^^is
=
fM) 4- /2(rc).
ckan-k
\342\200\242
3n 4-
to
an
- 7an_l
10an_2
4n.
to resolve
the problem into
\342\200\242
=
3n and
47an_l
an 10a\342\200\236_2 7
particular
finding
=
=
from
4n.
We
know
3n is
3.6.6
+
(-63/2)
10an_2
Example
thatc#
lan_x
=
We know from example 3.6.5 that a\342\200\2362
a solution of the first relation.
=
is a particular solution of the secondrelation.
(-8)4n
Therefore,
apn
is a particular solution to an - lan_x + 10an_2 =
4(-63/2)3*
(-8)4n
(7)3n 4- 4n.
To solve
solutions
Now,
C(t)9
and
modification.
Let
comments
to an
the
us suppose
a = at
when
4/v,
of the
characteristic polynomial
some
needs
argument
a as
of
we express
DakXk +d
as a sum of partial
there
fractions,
aX)m+1. Hence a particular solution
-aX)P(X)
will be
for
one term
the
IHR
of
the
form
C/(l
ap =
Section
CC(n + m,n)an.
But
~,
C(n
and
multiplicity
\342\200\242
\342\200\242
\342\200\242
4-
make
a better
where
Enman,
is a
if a is not a root of
2. ap = Cnman
is
the
4-
Cxan_x
= CC(rc
solution
of
C(t)
of
of the HR.
of the IHR,
of IHR
- Dan
Ckan_k
C(t).
polynomial
of IHR
solution
if
is a
root of
C(t)
of
m.
multiplicity
Example
2n. Since
=
a particular solution of an - 4an_l 4 4a\342\200\236_2
=
=
=
4t
4
t2
is
4
(t
2)2,2
polynomial C(t)
=
ap
Cn22n.
solution
is
thus
a
trial
2,
Substituting
relation, we obtain
3.6.8.
Find
the characteristic
is a rootofmultiplicity
the recurrence
-
Cn22n
4C(n
- l)2 2n~l
C2\"-2 [4m2 -
or
C[8]
- 22,
solution,and
- 2)2 2n\"2
4C(n
8(n - l)2 4
2)2] =
4(n
n22n/2
2\",
2\\
is a
an-
\342\200\224
2n
+ Cl2n
+ C2n2n
is the generalsolution.
exponentials.
degree m.
4 m,n)an
rules:
\342\200\242
\342\200\242
\342\200\242
4-
characteristic
a particular
n of
in
a\302\243
a is a root
is a solution
Prn_inm~l)an
solution
particular
+
1)
,
\342\200\242
\342\200\242
\342\200\242
4
the following
have
we
summary,
Thus,
(n 4
1)...
because
But
Pmnm)an.
an
into
m!
4- PiM 4
1. ap = Caa
m,n)
namely,let apn
In
m)(n +
m,rc)
m, (P0
can
we
Thus,
(n 4
4-
expanding
315
of Inhomogeneous
Solutions
3.6
Now
let
us suppose
/(*)-(P0
polynomials
that
+ Pi*+
\342\200\242
\342\200\242
\342\200\242
+Psns)an9
and
particular
316
Chapter
3: Recurrence
Relations
whereP, areconstants.
case.
to
Again
for
solution.
a particular
Let us
desire
We
we use
do this,
+ 6an_2 =
n24n
for
n >
can
we
solution
a particular
of
do in
general.
to
an
han_x
2. Let
n-0
Then
Y. n24nXn
- 5X
(a,
a0+
- 5a0)X
+ ex2
Now
- 42X2
nHnXn
\302\243;
n24\"-2Xn-2,
\302\243
n-2
n-2
and we
let r = rc
we have
2, then
]T n24nXn
n2X2
(r
\302\243
n-2
Let
so
us write
(r +
\\2 2)2
r-0
\342\200\2362
r2 + 4r
+ 4
as 2C(r
+ 2)2
4rXr.
that
42X2
(r
\302\243
+ 2)2
r-0
4rXr
- 42X2 2 ]T C(r +
2,r)4rXr
r-0
l,r) 4rXr +
+ J2C(r+
r-0
= 42X2
(1 -
+ (1
42X2[2
(1
4X)3
4rX'
\302\243
r-0
- 4X)2
- 4X) + (1 -
(1
4X)2]
- 4X)3
Thus,
A(X)~
42X2 [2
+ (1 + 4X)
(1-
+
4X)3
(1
(1
- 4X)2]
- 5X +
+ (1 6X2)
4XyP(X)
4X\\
Section3.6
where P(X) = a0
- 5a0)X.
(ax
F(X)
is a
Aiir\\
MX)
(1 --
Thus,
F(X)
A(X)-where
(1-4X)3(1-2X)(1-
polynomial of 4 or less. By
B
+
-\342\200\2243
4X)3
+
TTTTo
- 4X)2
(1 -
JZ
(1
317
of Inhomogeneous
Solutions
3X)
C
4X)
(1
Now
\342\200\224
D/(l
(1
3X)
recurrence
series
The
relation.
(1 -
- 2X)
+ E/(\\
2X)
that
we see
fractions,
partial
- 4X)3 + (1 -
B
+
- 4X
4X)2
= ]T [AC(n +
4- BC(n
2,m)
l,n)
4-
4-
C]
4nX\"
times 4n.
this
With
imitating
example
what
to the generalcase.By
can
obtain
the following
conclusions:
3.
apn
(A0 4- Axn
4-
\342\200\242
\342\200\242
\342\200\242
4-
A8ns)an
is a
ofthelHR:
+
an
Cxan_x
4-
\342\200\242
\342\200\242
\342\200\242
4-
Ckan_k
if
a is
4.
nm (A0
is a root
a\302\243
IHR
if
- (P0
particular solution
C{t)
4-
tk
\342\200\242
\342\200\242
is a particular solution of the
4- A8ns)an
4- Axn 4- \342\200\242
of C(t) of multiplicitym.
4- P8n8 is just
polynomial
case
a specialcaseofthe above
characteristic
Psn5)an
polynomial
The
Pxn 4-
\342\200\242
\342\200\242
\342\200\242
4-
characteristic
4-
Pxn
C(t).
with
whether
where
discussion
or not
f(n)
- P0
where
a =
1 is a root of the
318
Chapter
3: Recurrence Relations
Finda particular
of an - 2an_l +
= t2 - 2t 4- 1 rootof
(t - l)2of
Example 3.6.10.
solution
5 4- 3m. Since 1 is a
we use apn = An2 + Bn3
Upon
[A(n
C(t)
we have
substitution,
2)2 + B(rc - 2)3] =
6Bn = 5
have 2A
In particular,
3rc.
4-
- 5 and for
6B
constants
[An2
a particular
= 4n2
4- ^n3.
we have
noted
function
/ (n)
the
generally
l)3]
4-
6B)
0 we must
8 or A - 4
V2M3, and
4-
B.
and
the
Cx and C2 are
conditions.
by initial
- l)2 + B(n -
- 2[A(n
Bra3]
for
and solve
a solution
3n, and
5 +
be determined
can
that
multiplicity
as a candidate for
an_2
forms of
the
concerning
sum of different
said
is the
functions,
powers of n with
should be
function
each
that
/ (n).
Table 3-2.
Polynomial
C(a) * 0
a is a root
C(a) * 0
a is a root
C(1) * 0
1is a root
Da\"
Da\"
Dnsan
Dnsan
Dn8
Dns
Solution
C(t)
apn
Aan
of C(t)
of multiplicity
of C(t)
of multiplicity
of C
In each
Remark:
particular
of Particular
Form
Characteristic
f(n)
(t) of multiplicity
solution
is the
us apply
what we have
Arfan
if Dns
(A0 +
AAn
nT(A0
\342\200\242
\342\200\242
\342\200\242
+
+ .
+ .
ff(A0 + -
\342\200\242
\342\200\242
*
is replaced by
A9n9)an
. .
(A0 + AAn
of Table
types
^/i
+ A/i^a\"
\342\200\242
.
Ajff)
Ajfi\
[P0
4-
of the
\342\200\242
\342\200\242
\342\200\242
4-
Psn\302\260l
let
Now
9 wherea0
10 and
to several
examples.
relation
Solvethe recurrence
3.6.11.
Example
learned
ax =
an
- 6an_i
C(t)
= t2
4- 8an_2 =
25.
Qt
4- 8
of the homogeneous
the
solution
(t - 2) (t - 4). Therefore,
general
relationHR is:a% = Cx4n 4- C22n. Since the forcing function
has
the form
= A(l)n
= A as a trial particular
we use a\342\200\236
D(l)n and 1 is not a rootof C(t),
solution.
But
Thus,
an
then
Cx4n
after
4- C22n
substituting
4- 3.
a?n
= A
into the
IHR, we find
conditions
a0 = 10
= 3.
and
Section3.6
=
ax
4- 3
319
of Inhomogeneous
Solutions
= 4
4- C2 4-
4- C2
C2 =
and
3. Thus, an
(4)(4n)
4-
+ 3.
(3)(2n)
Solve an
3.6.12.
Example
+ 8an_2
6an_x
where
3n
a0
- 3
and
= 7.
ax
-9
Example 3.6.13.
ax
Solve
an
6an_x 4- 8an_2 =
where
n4n
a0
- 8
and
= 22.
- 6(n -
4- AlHn
n(A0
1)
4- Ax
(A0
- 24(n -
4- Axn)
16n(A0
term
the common
by canceling
1)
(A0
- 2)(A0
we
4n\"2,
Al(n-1))
4- 8(n
is an
this
Now
n = 0 we
obtain
and
the
4- 3AX
A0
Ax
that holds
expression
obtain
= 2.
1. Hence,
These equations
apn
n(-l
A0
(n
4- Ax
2)(A0
- 2))4n-2
n4n
the
4- rc)4n =
(n
- 2)) = 16n
particular for
and then for n = 1 we
solution
A0 = -1
unique
of n, in
values
4- Ax
have
4- Ax
is a
this
have
all
for
equation
simplified
since 4
1. Substituting
- 1)) 4W-X
(n
4- 8(n
But
4- Axn)4n
= 0,
n(n -
l)4n
is
a particular
solution.
But then
- l)4n
n(n
relation
- l)4n
4- Cx4n
conditions
4- (3)(4n) 4-
with
Solving
n(n
the initial
and
relation,
an
the
given
(5)(2n)
initial
Systems of Recurrence
Let
us
illustrate
the following
how we
example.
4give
is the unique
conditions.
solution
of
the
5. Hence,an =
solution to the recurrence
Relations
might solve a systemof
recurrence
relations
by
320
Chapter
3: Recurrence
Relations
Example
3.6.14.
Suppose that
First,
matrix
2x2
is the
>
In particular,
relations.
recurrence
0>n
An
and observethat
n >
for
this equality
2. (In fact,
for
holds
n >
convention
=
A\302\260
Thus,
=
An
an-i
bn-i
Cn-l
dn-i.
\"3-
ll
2J
'3a\342\200\236_x26\342\200\236_i
3C\342\200\236_!
2d\342\200\236
-i
From the
equality of matrices,we
(1)
Where
ax
- 3,
an
(3)
cn
-1,
bx
The recurrence
(2)
3an.!,
- 3c,,.!,
bn
(4)
cx = (0, and
dx
Cn^l
four
obtain
dn
a\342\200\236_ij
recurrence
2bn_x
2dn_x
relations:.
an_l9
- cn.u
2.
their
initial
conditions
that
an
3n for
n >
and cn
= 0
for n
> 1.
imply
Section3.6
321
of Inhomogeneous
Solutions
But
(6)
dn
- 2dn.l = 0.
= 2n
dn
> 1, and we
for n
solve.
relation (5) to
A
6n-26n_1=-(3'l-1)and
(6)
solution
the unique
has
(5)
solution
B =
particular
and
B3n,
3n
the
and
is
3n
are
the
with only
left
after substituting
initial condition
unique
solution
of
(5).
Therefore,
3\"
2n
3n
An
2n
and
oioo 9100_
3100\"
A100 =
2100
Solving
Recurrence
Nonlinear
Relations
relations
Sometimesnonlinearrecurrence
recurrenceby a substitution.
1 wherea0
be
made
3.6.15.
Example
n >
can
into a
2a2n_x
linear
1 for
2.
=
= 1
substitution
6n
a% This
changes the relation aj^~- 2a^_x
=
=
linear recurrence 6\342\200\236
1, and since a0
2bn
2, we see that b0 =
= 4.
By the technique of undetermined coefficients,we find that bn =
a\302\251
But in fact, since a0 = 2, an
an = \302\261
(5)(2n) - 1, and hencethat
V6^.
Let
to a
cannot
be
so
y[Fnt
an =
yj(5)(2n)
Likewise,
- 1.
takes the
determined
form
an
relations
recurrence
divide-and-conquer
appropriate substitutions.Generally,
Can/d
+ /(n)
can be
divide-and-conquer
where usually
the
values
solved using
relation
n are
of
a
an is really
by nonnegative integral powers of d. Now
of k.
function of n, but sincen = dk9 an can also be viewed as a function
When we change our perspectiveto viewing
of k, we say
an as a function
that We make a \"change of variables.\" Generally, what we do is this: let
=
> 0. Then therelationan = Can/d + f(n) is transformed
bk \342\200\224Onadk for k
322
Chapter
Relations
3: Recurrence
into the
and any
linear relation bk =
initial condition, ax
Of course, after
expression bk,
Let illustrate
7bk_x
a solution b% =
solution of the
a particular
b% =
form
the
characteristic
the
has
relation
homogeneous
reveals A
A3*. Substitution
an =
k > 1 and
- 2(3*) for
The linearrelationhas
relation
divide-and-conquer
= 5/2.
ax
> 1 and
the changeofvariablesbk
bk
Moreover,
the
Solve
n = 3* for k
We employ
- 0,
= 5/2
1,
- logdn.
an
7an/3
the transformed
a3*. Then
ax
=
d\302\260
a general
the
transformed
relation for
then solve for an using the fact that k
in the following example.
technique
Example 3.6.16.
relationis
solve
we
this
us
2m where
1.But for
we can
for
for k >
b0 = A.
Cbk_x + f(dk)
= A becomes
- b0.
polynomial
B7* for some
- 7 so that the
constant
JB.
inhomogeneousrelationtakes
=
so that
-3/2
&*=-~(3*)+B7\\
b0 =
condition
us to determine B = 4.
5/2 enables
Thus,
+ (4)(7*)'
6*^(3*)
Now let
the
facts
us give
a solution
that n = 3* and
for an in
terms of n
k = log3n.We
6*-all-(-|)(n)
from
Moreover,
properties
_
7iogs\302\273
Exercises
for
of logarithms,
niog37 so
that
1. Find a particularsolution
relations
(a)
an
(b)
an
then
use
that
(4)(7k\302\253l).
we know that
|L
(4)(niog37)
3.6
Section
recurrence
an
observe
3an_x
3an_x
using
to
the
the method
- 3n.
= n + 2.
following
inhomogeneous
of undetermined
coefficients.
Section3.6
c)
an
- 2n.
+ an_2
2anix
323
of Inhomogeneous
Solutions
- 4.
d) an- 2an_x
an_2
- 3\".
e) an- 3an^ + 2a\342\200\236_2
+
f) an - 3an_x
3an_!
g) <*\302\273
h) a\342\200\236
3an_j
2a\342\200\236_2
i)
an
3an_!
j)
an
3a\342\200\236_x 10a\342\200\236_2
k) an + 3an_! - 10an_2
1) aB - 10a,,.!+ 25an_2
(m) an + 6an_! + 12an_2
2.
the
Write
a) an
b)
g)
2an_
a\342\200\236
- 3n.
8an_3
h) an - lan.
- n.
\342\200\224
2n.
- 3\".
- 4n.
12a\342\200\236_2
+ 12an_2
the
the
general
in
relations
n4n.
solution
(the general homogeneous
plus
particular solution)of the recurrence
general solution
form of a
List
2.
Exercise
4. Suppose
<*n
Cxa^i
+ C2an_2
..
(a) Find
(b)
Find
.,Ck
Cl9C29..
CX,C2,..
.,C, if C(t)
List
(t -
(e) List
2)(t
- 4)(t
the
2)(t
the
general
4)2(t
general
(g)
C(t)
Same
as
3)(t
- 5).
C(t) -
case when
of a\"
for
the
case
when
C(t)
of
for the
case
when
C(t)
form
a^
5)3.
of
recurrence
the
a\"
- 5)3.
form
solution
3)(t- 5).
-
2)2(t
associated
the
for
of
- 5).
of
a particular
denotes
the
homogeneous
- 2)(t -
- (t -
form
(t - 2)5(t - 4)2(t
(f) List the general form
- (t
- (t
if C(t)
- f(n),
Ckan_k
associated
the
of
polynomial
relation.
k is
\342\200\242
+
not
2n.
+ 12an_2
lan\342\200\236
- 7an_
an
(2n.
-3.
2an_
an
1.
n +
c) a\342\200\236
2an_ -n2n.
+ 12an_2
d) a\342\200\236
7an_
e) an - lan_ + 12an_ _2
f)
*2
n2
general
for the
solve
3.
3.
- 2\\
+ 2a\342\200\236_2
- 5n + 3.
+ 2a\342\200\236_2
- 10an_2 - n + 1.
apn when
5)3.
f (n)
- 3n2 + 5n +
and
324
Chapter
3: Recurrence Relations
5.
where
/ (n)
= 5\".
where
/ (n)
2\".
the
Solve
recurrence
following
functions.
an
(a)
(b)
6.
=- n
- 2(n
an_i
an_!
2an_x
2an_x
a\342\200\236
(c)
(d)
n >
for
an
the
an
- 10an_!
25an_2
with
2.
1.
(homogeneous
plus particular
- 2n where a0 - 2/3and
- 3. Use
ax
solution
complete
to
Find
a0 -
- 10.
an
solutions)
7.
- 0.
1 and
an
Find
> 1 and a0
- 1)
an
(e)
(f)
for n
\342\200\224
a0
to an +
solution
complete
2a\342\200\236_1
n +
3 for n
> 1 and
- 3.
8. Suppose that
24a\342\200\236_3 5n
- 1, ax
\342\200\224
+
9a\342\200\236_1
an \342\200\224
26an_2
=
45.
Write
the
a2
generating
relation
the
satisfies
a\342\200\236
where a0
18,
function
A(X)-f>\342\200\236X\"
quotient of 2 polynomialsP(X)/Q(X).
the
recurrence
relations for a particular solution.
following
- 5an_! +
- n.
an
8a\342\200\236_2 4an_3
=
an
ban_x + 8an_2
4a\342\200\236_3 2n.
as a
9.
Solve
(a)
(b)
an
(d) an
- 5an_! +
- 50^.! +
(e)
(cj
an
10. Show
5an_x
that the
an
finding
n2n.
divide-and-conquerrelation
=
+ (n
2an/2
bfc
= 0
4an_3
- 3n.
8a\342\200\236_2 4a\342\200\236_3 1.
solved for n
solving the relation
then
4a\342\200\236_3
8a\342\200\236_2
can be
and b0
8an_2
by using
2*
by
2b*_i
\342\200\224
for
1)
2; and
the change
using
n >
ax
= 0
of variables
an = 2an/4
+ n for n
a^,
lforife^l
2*-
bk
to
= 4*
translate
>
4 and
c^ =
and
Section3.6
12.
13.
325
of Inhomogeneous
Solutions
this
relation
into a first order relation.Solve
by undetermined
coefficients and then find a4*.
recurrence relationsin Exercises7,
Solve the divide-and-conquer
10
of
Section
3.4
the
and
8,9,
by
changeof variables
technique.
Solve the recurrence relation an = b(an_x)2
for n > 1 and a0 - 1.
Here make the substitution bn = log2(an),
solve the linear
recurrence
for
then
find an.
relation
and
bni
inhomogeneous
substitution
wherec and
an
- n for n
3.
Hint:
make
a2
5an/2 4- 6an/4
1 and
Ax
CXogdin)
is a
A2(n)
solution to an
and n is a powerofd if
constants
e are
C is
solve
matches
2\\
the
02*.
d.
an
en,
number
of
the
where
to
n is a
powerof 2.
17.In
local
five
every
finally five
until
has
firm,
large
n salespeople,
and conquer
recurrencerelationsfor:
(a)
(b)
the
the
the
in
firm.
by making an appropriate
into linear recurrences with
relations
recurrence
following
substitutionto transform
the
relations
coefficients.
constant
(a)
of managers
number
president)
18. Solve
of different
number
the
4aTn
(b)
nan
(c)
a\\
(d)
an
(e)
an
- 2Va^ -
Ja~i
where
00
1.
0!-
2n where a0 = 10.
4- nan_x
an_x
= 0 where
a0 = 8. Hint: let bn
2a\342\200\236_!
- nan_i = n! for n > 1 wherea0 = 2.
wherea0
1 and
ax
log2an.
- 2.
Gn-2
(f)
5nan_! +
an +
=
(a\302\273-i)2 (a\302\273-2>3where
(g)
<*n
(h)
na\342\200\236
(i)
nan
(n (n 4-
2)a\342\200\236_!
relations.
= 0
l)an_2
a0
= 4
2n where
> 0, solve
(Assume
=
F\302\260
where
and ax -
a0
l)an_! = 2n where a0
. For n
19. LetF=
recurrence
6n(n -
for
a0
- 6 and ax
17.
4.
- 5.
=
1.
entries
the
of'F\" using
326
Chapter
3: Recurrence Relations
3 2
20. Let
n >
For
0 solve
using
recurrence
relations.
21. Solve
exercise 20 for
A =
matrix
the
6l
[4
[l
A = [2
matrix
the
5J
[l
\302\2601
3J
defined on N
23. Ackerman's function
is a function
the set of nonnegative integers,as follows:
x N, where
is
1
if m = 0
A(m - 1,1) ifn =0
- 1)) otherwise.
A(m
l,A(m,n
n +
A(m,n)
Then,
for
A(0,A(1,0))
A (1,1)
example,
A(0,A(0,1))
A(0,2) = 3.
(a)
= A(2,n -
then
definition
the
Use
1)+ 2
by solving
of Ackerman's
for
all
A(2,n) = 2m
(b)
As
in
(a),
show
n >
0.
that
A(3,n) =
24. Solvethe
3 for
divide-and-conquer
2n+3
3 for n
relations
> 0.
using
a change
of
variables.
(a)
(b)
(c)
(d)
(e)
25. (a)
an =
5an/2 4- 4 whereax =
= 4 where ax =
2an/z
0 and
n =
2k
for
k >
0.
Section
3.6
the balance
for
after
seven years?
and
balance
26.
Review
4log*n
27log\"1
for Sections
1.
2.
be
owed
principal,
the period
owed after n
periods.
k where
Find
(a)
(b)
327
= nk
nk.
2.8-3.6
all n -digit
decimal numbers, how many
0,1,8,9?
digits 2 and 5 but not the digits
At a theater 20 men check theirhats.In how
hats be returned so that
(a) no man receives his own hat?
Among
of them
many
contain
ways
the
can their
his
hat?
own
(b) at least oneofthe menreceives
least
at
of
the
men
receive
their
own
two
hats?
(c)
3. Find a recurrence relation for an, the number
of ways a sequenceof
l's and 3's can sum to n. For example, a4 - 3 since 4 can be
obtainedwith the following sequences: 1111 or 13 or 31.
4. Find a recurrence
for the number of n -digit quinary
relation
use
that
have an even number of 0's. (Quinary
sequences
sequences
only the digits 0,1,2,3, and 4.)
as the
5. Write a general expression for the generating function
A(X)
the
Q{X)
by specifying
quotient of two polynomialsP(X) and
coefficients of P(X) and Q(X) where
the
A(X)
generates
sequence an for n > 0 where a0 = 1, ax = 0, a2 = 1, and for n > 3, an
- 0.
satisfies the recurrencerelationan - ban_x + 8an_2 - 4an_3
6. Write the generalform
of the solutions
of the following:
=
0.
(a) an
9an_x + 14an_2
(b)
7.
&n
the
Write
(a)
an
(b)
an
(c)
an
6an_x
+ 9an_2
general
- 9an_x +
9an_x +
9an_x +
form
- 0.
of a
14an_2= 5(3n).
14an_2= 7n.
=
14a\342\200\236_2
3n2.
the divide
(n
\302\243
n-l
4- 2)(n
4- l)(n)X\\
+ 3
where ax -
328
Chapter
Relations
3: Recurrence
10. Find
a simple expressionfor
the
by
generated
sequence
5
X2
+ rz
+
^
(1-X)3\" (1-3X)3*
(1-2X)
1.
(a)
Try
ap
(b)
Let
ap
- An3\". Substitute
\342\200\242
2\" =
Try ap -
B, get
2A
to find
-
B - -7/4. Hence
- -1/2,
(c) a* - 4
(d)
An
a characteristic
1 is
Solve
for
2.
- A2\";
apn
(m)
a\302\243 (27/125)3\".
(a) a*
5)(t
and
find
- (7/4).
let
aj
root.
= An.
Solving get A
- 6B -
1,-37
17B
root,
- 6C
= 1.
= A.
(b)
ap
= An2\"
(d)
ap
= An
(f)
ap
(h)
Leta\302\243
since 2 is a characteristic
root.
+ B.
since
An3\"
12 = (t - 3)(t = n(Ara
root of C(\302\243)=
a characteristic
3 is
4).
t2
- 7t
A(X)
a\342\200\236X\"
\302\243
^-^L-
X
(1
(b) A(X) =
- Xf
1-
+ B)4\".
that
d - -12, C2
(b) C(t) = t* - I2tz + 51t2 - 92t + 60implies
60.
51, C3
-92, C4
(c) a^ = C12n+ C24n + C35\".
+ C3n22n
+ C4n32\" + C5ra42\"
+ C64n
(e) a* - C,2n + C2n2\"
+ C9n5n + C10ra25\".
C7\302\2534n + C85n
(a)
2n+2/9.
(g) ap -An24\".
5.
nZn.
solving,
- 2)
- 4/9; a* -
(1)
(e) ap = A2n.
4.
A,
2,
-3ra.
- -1/6,34A
B, and C.
get
coefficients,
root,
+ Bn
a\302\243 An2
try
1,3A
a* - (-n/2)
so ap
2n+2.
since
Ara2
= 1
- 2B -
x)3
(1
rj. Thus,
(n + l)(n)
a\342\200\236
2X2
+
+
X
(1
an
\342\200\224j;
- X)3
= 2
2
+
(n)(\302\273
1).
Linear
Solutions of Inhomogeneous
Section 3.6
(c) A(X)-z
1/2
- 4X)
2X)(1
:;
1 - 4X'
that A(X)
Observe
2X
!/2
(d)
1 - ^ + (1
1 - 2X
1 M
\342\200\236\342\200\236
= -2\"
a\342\200\236
\"
(f)
+ 1) +
2\"
(1-
3\"
-- 7X)
3X)(1
- 3X/
48 (r J_)_J__
an'
- In +
2\".
X2
-35
-35
48
- X)2
2XH1
(1-X)2 1-2X'
-
\342\226\240
A(X)
X2
_
- 7X + 7X2
- 2X)(1 - X)2
3
2
~(1-X)
Thus,
\342\200\224
3X
2
(1
- 2(n
+ -4n.
+
^ _ x^ (i
= 3
a\342\200\236
12
(ra +
(1
12(1-
1)3\"+
.-7X)
3X)2(1
+
3X)2
29
16 (1 -
29
\342\200\236\342\200\236
\342\200\224
7\".
16
<
2n+2
6.
a,
a.-\302\247F
~9~'
11
n
\342\200\236sn
16,
\302\273.
aia
\\nbn
_ (1
+ 9X
- 91X2)(1
-
(l _ 5X)(l
329
Relations
Recurrence
5X)
_ 9X + 26X2 _
X353
\342\200\242
24X3)
1
7X)
and
Relations
Digraphs
GRAPHS
DIRECTED
AND
RELATIONS
used
relations.
The connectives
Mathematical
induction, on
tools
which
based on orderingrelations.Applications
science
throughout
computer
and
inputs
in
attributes
outputs
databases,
languages.
This
will
then
begin
chapter
of mathematics.
All
virtually
of
relations.
rests, is
of mathematics
relations
are
functions
are
are found
and engineering,
including relations between
of computer
programs, relations betweendata
and relations
between symbols in computer
the
to a more detailedtreatmentofrelations.
We
relations and special propertiesof binary
relations,
is devoted
review
binary
look at some
by introducing
applications of binary
a useful way
of viewing
and
rc-ary
binary
relations.
relations
We
will
as directed
graphs.
331
332
Chapter
and Digraphs
4: Relations
\342\200\242
Nahor
Esau
\342\200\242Jacob
\342\200\242
The relation
4-1.
Figure
\342\200\242
Abram
shown:Nahor, Hanan,and
\"is
of\" on
parent
The
Abram.
Isaac),
(Milcah,
(Hanan,Sarai),
(Sarai, Isaac), (Bethuel,Rebecca),
Milcah),
Jacob),
(Isaac,
Esau),
(Isaac,
Jacob)}
(Rebecca,
when
viewed
purposes, relations appeareasierto understand
graphs than when viewed as sets of orderedpairs.It
easier
to see, for example, that Isaac and Bethuelare cousins
than it is from the orderedpairs.
diagram
For many
as directed
probably
from
the
Definition4.1.1.*
if E
(digraph)
V. The
pair
*Unlike
other
between
this
book and
edge
an
such as
the
called
the
subject.
vertices
and the
to be from
tail at x
and the
and
geometry
notation
other bookson
is
(V9E) is a directedgraph
are
is said
(x,y)
with the
arrow
the
standard,
from
much
but
of
elements
of mathematics,
areas
become fairly
G =
sets
of
terminology has
graph theory vary
widely accepted,
by
Bethuel),
(Nahor,
Bethuel),
(Abram,
Esau),
(Rebecca,
represented
Abram), (Hanan,
(Terah,
Nahor),
(Terah,
Hanan),
relation
binary
a set of people.
and
terminology
algebra,
x to
where
used
definitions
used
y,
here
to encounter differences
in
is
Section
Relations
4.1
and
Directed
Graphs
333
4-1,the edge(Terah,
4.1.1.
For the graph shown in Figure
Terah to Abram. There are two edges
incident
on Abram.
is incident
to Abram and (Abram, Isaac) is
(Terah, Abram)
Example
is from
Abram)
The edge
incident
for Terah,
Note
for
that
any
which has
digraph
relation R C
any binary
vertex
No
Abram.
from
except
two,
or out-degreegreaterthan
out-degreethree.
has in-degree
x B
digraph
traditionally
phrased
that
are
as irreflexivity
and
transitivity.
from
graph
general
one
type
edge is
of graph called a
permitted incident
vertex
and
more
than
then
are calledmultipleedges.
In
to
addition
nondirected
graphs
digraphs
and
and
nondirected
directed
multigraphs,
multigraphs
where the
is not
must be
334
Chapter
4: Relations
and
Digraphs
Sarai
\342\200\242
Abram
\342\200\242
Isaac
A proper
4-2.
Figure
of the
subgraph
digraph
in
Figure
4-1.
and
in definitions
the term graph is used insteadof digraph.
By contrast,
the statements of theoremsthat do not apply to all kinds of graphs we
we intend.
will
to specify which kind of graph
be careful
4.1.2.
Definition
G =
(V,E) if
G1
graph
VandE1
n
\302\243
G.
ofGifG1
V1
4.1.2.
The digraph shown
Example
vertices {Sarai,Isaac,Abram}
and
the
of the digraph
Isaac)}is a propersubgraph
Frequently it happensthat
graphs that have only to do
this
For
sets.
introduced.
means
Definition 4.1.3.
isomorphic if there
Two
E2.
graphs
and
G1
w in
\302\253
and
(VlfEx)
G2 =
onto function f: V!
adjacency,we
V^, (v,w)
mean
is in Ex iff
for
(/
(V2,E2) are
\342\200\224\342\226\272
that
V2
that
digraphs
(v), / (w)) is in
this is
of stating
way
wishes
a one-to-one
is
one
with the
By preserving
adjacency.
preserves
purpose,
Isomorphic
in
edges
E2-{(f(v),f(w))\\(v9w)EEl}.
In this casewe
= g{G2)
g(Gt)
thaX
call
Some
(directed
graph)
isomorphism
of
number
from Gx
isa
(under isomorphism)
g on
whenever Gx and G2are isomorphic.
of
examples
the
fa
of graphs
invariant
function
graphs
G2. An
such
invariants
and
edges,
to
of
in-degree of a vertex and j isthe out-degree
Note
that
of
the
for
vertex
each
graph.
pair
same
values of invariants, but that
the
graphs that are isomorphic have
that can guarantee that two graphs are
set of invariants
there isno known
of
the
where i is the
with one
vertex,
(ij),
pairs
same
isomorphic.
Example 4.1.3.
both
have
five
(2,1),(2,1),
(0,4).
vertices,
A
The
digraphs
eight
digraph
in
Figure
edges, and
that
is not
Section
Relations
4.1
Directed
and
335
Graphs
\302\273\302\273$
e
(a)
(b)
Figure
too,
has
five
in
edges,
eight
vertices,
(2,1),(2,1),(0,4).
4-4.
Figure
Note
and degree
ExercisesforSection
4.1
1.
Draw
(a)
the
The
digraph
relation
{1,2,3,4,5,6,7,8}.
(b) TherelationC on all
(c)
2.
Specify
3.
(a)
The
# on
relation
the
in-degree
in Figure4-1.
the
the set
and
relations.
divides
\342\200\242
c =
subsets
nonempty
b\"
b iff there
exists a
on the
integers
of the
set {0,1,2}.
{0,1,2}.
out-degree
of each vertex in
4. Provethat
the
eitherof
the
shown in Figure
digraph
in Figure 4-3.
shown
ones
Figure 4-4.
the digraph
in Figure
as a set of
(b)?
336
Chapter
4: Relations
and Digraphs
Figure 4-5.
5. (a)
the subgraphs
with four vertices and two edges
of the
in Figure 4-5, up to isomorphism.
That is,donot repeat
that are isomorphic.
graphs
Do the samefor all subgraphs
with four vertices and three
all
Draw
digraph
(b)
edges.
(c) Do the same
for
all
vertices and
four
with
subgraphs
four
edges.
(d)
Do
the
subgraphs with
five
and
vertices
four
edges.
the
invariants
cited
in this
section is truly
an
invariant:^
(a)
of vertices;
the number
of
the degree
edges;
spectrum.
y SupposeG is an arbitrary
digraph with
of
number
isomorphisms
largest possible
(Choose G to maximize this number.)
8.
Suppose
is
an
may
have?
maximize
Selected
(Treat
this
digraph
arbitrary
largest possiblenumber of
distinct
isomorphic
number.)
with
subgraphs
subgraphs
What
G and
vertices.
between
What
vertices.
with
k vertices
as distinct.
is the
itself?
is the
that G
Choose G
to
Section
Relations
4.1
and Directed
337
Graphs
(b)
(c)
fc
\342\231\246
^I-f
2.
JD. -degree
vertex
Nahor
Hanan
Bethuel
2
1
1
1
1
Isaac
2
1
2
2
0
0
Abram
Milcah
Sarai
Rebecca
Esau
Jacob
3.
(a)
\"
\"*
out-degree
Terah
*.^
A ^\342\200\224\342\200\224\342\200\224
{(a,6),(6,^),(e,d),(d,a),(c,a),(c,d),(c,6),(c,e)}
[(a,b)Aa,c),(a,d),(a,e),(b,c),(c,d),(d,e),(e,b)}
Vertex
isomorphisms.
possible
with
other
out-degree
vertices
four
in (a)
and
the
c in (a) must
only vertices
zero. Once
in-degree
is paired with
are
one of
are
(b), the rest of the correspondences
fully
the definition of isomorphism.The isomorphisms
{(c,a),(6,6),(e,c),(d,d),(a,e)}
[(c,a)9(b,c)9(e,d),(d,e),(a,b)}
{(c,a),(6,d),(e,e),(d,6),(a,c)}
{(c,a),(6,e),(t?,6),(d,c),(a,d)}
these
vertex
a corresponding
determined
are
thus:
in
by
338
Chapter
4: Relations
and Digraphs
There are,
of
many
course,
contradiction.Hereis one:
proofs.
They
generally proceed by
digraph
of Figure
4-4 has
possibly exist.
5. (a)
\342\200\242
-\342\226\272\342\200\242
-\302\253\342\200\242
-*\342\226\272\342\200\242
-\342\226\272\342\200\242-*-
(d)
Try
taking
away one
edge in as many
ways
as possible:
Gx to G2.
Suppose that / is an isomorphismfrom
of one-to-one
onto
the
definition
(a) It follows from
between the
a one-to-one
correspondence
gives
and
G2.
is a one-to-onecorrespondence
between
of Gx and
edges
= (/ (x), / (y)).
by: f((x,y))
given
in
.,vn is a list of the verticesof Gl9 ordered
vu..
Suppose
order of in-degree, and within
vertices
of equal
decreasing
in-degree, by increasing out-degree. For any vh f (i;,) has the
same in-degreein G2 as u, has in Gl9 and likewisefor out-degree.
is because every edge {vi,Vj)
in Gx corresponds
This
uniquely to
an edge (f(Vi),f(Vj))in G2, and for every edge in G2 there is
(b) There
edges of G2
(c)
function that /
vertices of Gx
Section
4.2
. .(in-degree(i;n),out-
(in-degreed),out-degree^)),.
degree(O)
/
degree(
/ (vn))).
degree(
7. There
are n! isomorphismsbetween
the
The
There are
possible edges,
these
and
There
edges.
subsets
distinct
2*2
the
are thus
that
itself.
k that
\342\200\242
(\302\243) 2k* possible
be
may
are k2
there
vertices
may be
of
number
largest
of size
subsets
distinct,
(\302\243)
the n vertices.
from
formed
vertices gives
digraph on n
complete
subgraphs.
with
digraph
complete
and
.,n}x{l,...,n}),
loops on n vertices,({l,.. .,n},{l,..
8.
339
Relations
a corresponding
such
of Binary
Properties
Special
formed
from
with k
subgraphs
vertices.
4.2
following
RELATIONS
special properties,
enough
which may
be
possessed
1. Transitivity
Vx,y,2,
if x R y and y R
2.
Reflexivity
Vx,
xR
3.
Irreflexivity
Vx,
xftx;
if x
5. Antisymmetry
V*,y
if x
6. Asymmetry
Vx,y
if
It
is
digraph
whenever
to restate these
if
is transitive
interesting
(relation)
there is
z, then x
Ryf theny R x;
R y and y R x, then x
xRyy
any
theny
three
y\\
Jftx.
properties in terms of
for
binary
x;
Vx,y
4. Symmetry
by a
have names:
that they
in mathematics
vertices
digraphs.
x,
y>
and
z,
y to z there is also
y and an edge from
illustrates a transitive relationon the set
need not
z in the definition of transitivity
Note
{u,v,w,x9y,z}.
4-7 is not a transitive
in Figure
be distinct. For example, the digraph
an edge from
x to
an edgefrom
x to
z. Figure 4-6
that
xf yy and
\342\200\242
\342\200\242
s^~
Figure
JC
\342\200\242
\342\200\242
4-6.
A transitive relation.
V
9f
\342\200\242
z
\302\273
\342\200\242
340
Chapter4: Relations
and
Digraphs
Figure
4-7.
is not
that
relation
transitive.
A relexive
4-8.
Figure
relation.
Figure 4-9.
relation.
irrefldxive
An
Figure 4-10.
relation.
[The edges
are
definition,
(xfx), (yfy),
if
itself (sometimescalleda
vertices
have
and
{x,y9z}
and
which
(z,z),
it
It
self-loop).
4-9 illustrates
Figure
vertex
every
4-8
Figure
self-loops.
(Note also
relation.
symmetric
would be
required by the
missing.]
is reflexive
A digraph
is
illustrates
a relation on
that a graph
possible
as Figure 4-11 illustrates.)
if for every
is symmetric
digraph
is also an edge in the
there
that
has an edge
is irreflexive
{x,y,z}that is irreflexive.
be neither reflexive
nor
irreflexive,
A
points
oppositedirection
two points.
relation
antisymmetric
points
them in both directions.Figure4-11illustrates
if
An
relation.
even
the
self-loop
permitted.
Properties(l)-(6)
of binary
special
kinds
equivalence
that
relation.
have an
an
is
the asymmetryproperty.
at x violates
used
are
relation
distinct
two
same
A digraph
are
is still further restricted. Self-loops
digraph
since
The digraph in Figure 4-11 is not asymmetric,
asymmetric
not
no
the
between
on {x,;y,z}.
relations
is transitive,
A
binary
in various
that are
as axioms to define
useful in mathematics.A binary
combinations
an
is called
reflexive, and symmetric
that is transitive, reflexive, and
relation
Section
4.2
341
Relations
4-11.
Figure
An antisymmetric
relation.
relation.
of these
Several
seen again
more than
of properties
ordering nor an equivalence
an application
consider
a partial
1.
an
Give
satisfies
of a
example
each of
the
nonempty set
following
and a relationon
combinations
symmetric
and
transitive,
(b)
symmetric
and
reflexive,
(d)
transitive
but not
but not
the
of properties;
set
that
draw a
reflexive.
transitive.
reflexive,
but not
antisymmetric.
but
not reflexive.
(e) transitive and antisymmetric,
(f) antisymmetric and reflexive, but not transitive.
2. For each of the following digraphs, state which of the special
properties(1-6)
satisified
are
by
the digraph's
(a)
(b)
(c)
(d)
relation.
342
Chapter
and Digraphs
4: Relations
implies
Asymmetry
antisymmetry.
(d)
4.
and
Asymmetry
the
of
Which
digraph if
5.
it
six
Draw
changes
imply transitivity.
together
symmetry
digraphs,
to the
reflexivity.
imply
together
asymmetry.
by making
digraph shownbelow
the
to every subgraph of a
to make
required
of
number
minimum
it satisfy
one
of the properties(1-6).
Ot6.
^\302\273-\342\200\242
fc
\342\226\272
\342\200\242-
set A.
7.
8.
9. Let
relations
be
and
on a
set
A.
Prove
following:
(a) If
are
and
asymmetric,
then R U
or
the
disprove
S and
are
are
asymmetric.
(b) If
are
and
antisymmetric,
then R U
S and
antisymmetric.
10. State
(a)
the negationof:
R is
Relation
(b) Relation
11. State the
both reflexive
is either
If a
or transitive.
(b) If a relation R
is
relation.
an equivalence
is reflexive,
then
R =
R'1.
12. Let A
aRb
13.
symmetric
of:
contrapositive
(a)
and transitive.
be
the
if alb
equivalence
relation
set of
is an
on A.
Section 4.2
SpecialProperties
of Binary
Relations
343
reflexive
(b)
irreflexive
DCR
iff
iff
- 0,
the empty
1. (a)
(b)
set.
4.2
for Section
Answers
Selected
D R
_\302\251
\302\256L
\302\251_
J\302\256[
\302\251_
\302\251
-*\342\200\242\342\200\242
.\302\251
(c>
(d)
'(e)
(f)
2.
irreflexivity,
(a)
transitivity,
(b)
antisymmetry
(c)
transitivity,
irreflexivity,
(d)
transitivity,
reflexivity,
3. (a)
If x R y implies y
Thus,
(xRy
vacuously,
antisymmetry,
asymmetry
antisymmetry,
asymmetry, symmetry
symmetry,
it
and yRx)
B\" must
(c)
antisymmetry
(x R y
x, then
A is
false.)
\302\251.
\302\251
Counterexample:
\302\251
\302\251
344
Digraphs
4.2.1
have
must
asymmetric
like (a),
Vacuous,
(d)
and
no edges.
Big O Notation
Thereis
of comparing
way
oh notation,\"
\"big
mathematics,especiallyin
it expresses a relation
because
This notation is particularly
interesting
is neither
a partial ordering nor an equivalence
that
between functions
relation,
sometimes
it is
though
applied as if
mistakenly
it were
one or
the
other.
from the set of
R be
a function
Definition 4.2.1. Let g: N \342\200\224\302\273
the collection
into
the
real
numbers.
denotes
0(g)
nonnegativeintegers
c
k (possibly
which
of all
functions
for
exist
constants
and
there
f:N\342\200\224+R
n > k, | / (n) | < c \342\200\242
different
for each /) such that for every
| g(n)
|. If / is in
we
that
is
of
order
0(g) say
g.
/
It is
worthwhile
by
simplified,
dropping
well behaved.
are
4.2.1.
Lemma
ku f (n) > 0
and
constants c and k2
Since
Proof.
\\f(n)\\
=J^(n)
This is expressedby
We
shall
the
of Big 0 can
involved
when the functions
definition
following
be
lemma.
/ (n)
and
follows immediatelyfrom
functions
note
the
that
the absolute values,
taking
Definition
nonnegative
>
max(kuk2).
4.2.1.
for
n > kl9
we have
The lemma
then
\342\226\241
where
all the
- 3n.
Consider the functions
g(n)
/ (n) = 2n and
>
Since 2n
3n for all n
0, we know that / is in 0(g). (In this case we can
choose c = 1 and k = 0 in the definition above.)On the other hand, gis not
in 0(f). This canbeshown
by contradiction.
Suppose
g is in 0(f). Then
there existc and k such that for all (positive)n > k, 3n < c \342\200\242
2n, which
Example
4.2.1.
<
implies
n*
a contradiction.
l\302\260g\302\260C
Section 4.2
SpecialPropertiesof
4.2.2.
Example
Since
logc(n).
seen
log2(n*)
c =
by choosing
can be seenby
345
Relations
Binary
x/logc(2)and k = 1.)Similarly,
c =
choosing
loge(2)/x and
in 0(f).
g is
(This
1.)
4.2.3.
Show that 5rc3 - 6rc2 + 4rc - 2 is in
Example
- 6n2 + 4rc 21< 5rc3 + 6rc3 + 4n3 + 2rc3< 17m3 for n > 1,
= and fc = 1 and conclude 5n3 - 6n2 + 4rc - 2 \302\2430(rc3).
0(rc3).Since
we choose
15n3
17
the functions
Consider
4.2.4.
Example
,,
if rc is
_ J2n
~
an even integer
otherwise
\\n
and
oc^^integer
^ n ^s an
~ f^n
_
\\
otherwise.
\\n
functions
are pathological, as their definitions
lead
one to
might
c and k it would be
for
some
suspect. Suppose that / is in 0(g). Then
true that for all (positive) n > k, f (n) < c \342\200\242
n to be even, this
g(n).
Taking
would
mean
that
2n < c \342\200\242
is a contradiction. Similar reasoning,
n, which
consideringthe casewhen n is odd, shows thatg cannot be in 0(f).
to
it is customary to extend this nptation
Note that in practice
describedin
which define functions, so that the relationships
formulas
above would be expressed:
the
first two examples
These
2n
is in
log2(rc*) is in
avoids
This
but
0(3n),
is not
3n
in 0(2n);
to
and
the
exact
write
to
of a function
0(f (n)) where a value
unknown.
For
function
may be
n2 =
(1/3)n
12 +
22
(n
+ 1/2) (n + 1) = l/3n3
\342\200\242
\342\200\242
\342\200\242
+ n2
that g is in
exercises
like /
special names,
introducing
which
is a
0(n2)
for this
- (1/3)n3
is
0(g)\\ is
for
4-
l/2n2
of a
22
\342\200\242
\342\200\242
\342\200\242
+
write
we could
l/6n,
case
function
a specific
functions
the
+ 0(n2). In this
consequence
gy
example,sincel2+
for
stands
0(n2)
g in 0(n2).
(The fact
in
the
section.)
equivalence
and
0(log2(rc*)).
reflexive
relation.
and
transitive,
but
\\ f:
is not
g: N
\342\200\224>
R,
f is
\342\200\224
R,
a partial orderingor
in
an
346
Digraphs
We
Proof.
transitive; (3) Q
1. Since|
f(n)
and
/:#\342\200\224\342\226\272#,
must
show four
is not
antisymmetric;
<
so Q
\342\200\242
| f(n)
and
k2y
cx
|/(n)|<
Exercises
for
in Q.
Q is
(/,/) is in Q
for
all
| < Cj
all
|g(n)|<
it is
that
to have
possible
it is
that
\342\200\242
to have
possible
(/,#) in Q
without
\342\226\241
4.2.1
Section
/3(n) =
/4(m)
the following
If p(n)
in Theorem
\342\200\242
log2(n)
/7(m)
= m2
/8(n)
= 2n
\342\200\242
log2(M)
theorem:
= amnm 4-
(Hint:Use
3. Proveor
defined
where
/6(rc)=V
log2(n)
= n
Q as
/B<*)-*2
AW-i
2. Prove
(2)
reflexive;
in Q.
are
\342\200\242
4. Example4.2.1shows
being
is
Q is not symmetric.
is reflexive.
3. Example 4.2.2shows
and still have f ^ g.
(g,f)
and (4)
all n
| for
of kx
things: (1)
\342\200\242
\342\200\242
\342\200\242
4-
axn
| am \\ +
each
disprove
+ a0 then
and k
\342\200\242
\342\200\242
\342\200\242
4-1 a01
of the
p(n) is in 0(nm).
= 1.)
following:
T:N\342\200\224+R
that
satisfies
the recurrence
n >
relations
Section4.2
SpecialProperties
of Binary
347
Relations
must be in
(a) 0(n)
if a
\342\200\242
(b)
0(n
(c)
0(nlo*<a)
< c;
= c;
if a
> c.
if
log(n))
T(n)
T(n) < a
Usingbig 0 notation,
n =
\342\200\242
T(n/c)
characterize
of the
three cases.
monotone
increasing
1, and
+ 6
for n >
T for
each of
<c
(a)
(b)
a =
(c) a> c
6.
sorting
simpler
ratio
n2/n
table.
in your
\\og2n
7. Show that
(a)
n\\
(b)
log2 (n!) G
0(nn)
0(n
log2n)
G 0(log2n!)
(c)
nlog2n
(d)
2n
(e)
n\\
is not
0(n\\)
in 0(2\
\342\200\242
\342\200\242
4- n) G
(f) (1 + 2 + 3 + \342\200\242
\342\200\242
\342\200\242
\342\200\24252
32
+
+
(2m
(g) (l2 +
8. Provethe
following
for
functions
0(n2)
l)2) e
/,
0(n3)
g, and h from
iV
into
the
real
numbers.
9.
and 8.
(a)
nk
(b)
3m
(c)
9ra2
(d)
10n2
0(nk+1)
+ 2 E
- 4n
+
5n
where k
0(n)
+ 12 E
- 6 E
is a positiveinteger.
0(n2)
0(n3)
3,
348
Chapter
and Digraphs
4: Relations
(e) 3n
(f)
+ 2 \302\2430(1)
5(2n) +
(g) 10n2 +
(h) 0(logan)
10. Give
n2
5m
0(2\
6 \302\243
0(n)
and
necessary
6 are
conditions
for a
than I.
greater
integers
be
to
function
in
0(1).
/: N
limitoff
(n)
constant
k such
\342\200\224+
R is
a function.
n approaches
as
= 0
liml/n
n\342\200\224\342\231\246\302\273
(b)
lim
- 0
1/n2
- A and
(c) If lim\342\200\236_\342\200\236/
(n)
A
B,
lim\342\200\236_^
/
B #
(provided
lim\342\200\236_0og(n)
(ra)g(n)
0).
(d) Suppose
lim\342\200\236_^/(n)/g(n)
/ E
then
12.
Use
O(f).
exercise
O(g) and
11(d)
(a) 0(n + 1) =
(b) 0(n3
(c)
(d)
(e)
(f)
(g)
Answers
n2
= AB,
gE 0
- L.
\302\243
then
and lining /
If L > 0, then
(/). If
the following:
+ 3) - 0(n + log2n)
=
3)
0(n3 5)
0(\302\2533)
O(10ra
n +
4.2.1
/ E
to show
n\"
0(n10)
\302\243
0(n)
(n) +
g(n)
(n)/g(n)
/ E
0, then
nm
for Section
lim/
A/B
L > 0,
0(g) but g $
0(g). If
Section
4.3
nm +
l,|p(n)| = |am \342\200\242
2. Forn>
+|a1|.n
3. (a)
Supposefor
(b)
The
crucial
n >
ku\\
| <
< ax
\342\200\242
|g(rc)
|ax|
\342\200\242
| g(rc)
\\ <
is that
ax
\\x
(kx,k2),| /x(n)
\342\200\242
|g(rc)
<*i
> max
for all n
\342\200\242
\\gi(n)
\342\200\242
\342\200\242
a2
\\ fx
(kx,k2)y
|g2(rc)
(ax
k2,
/2(rc)
f2(n)
\342\200\242
\342\200\242
a2)
\\gx(n)
| < |
k2,\\f2(n)\\<a2
\342\200\242
= | fx (n)\\-\\
|
/2(rc)
\342\200\242
a \342\200\242
all
for
Suppose
\\y\\.
|rcm|
(n) | <
y\\
\342\200\242
\342\200\242
\342\200\242
| /
>
for all n
> max
4- a2
y\\<\\x\\
| and
|g(n)
|. Then
\342\200\242
ku\\fx(n)\\<ax |gx(rc)|andforallrc>
Then,
\342\200\242
n +
ax
\342\200\242
\342\200\242
\342\200\242
+
\\ f(n)
for all n
The crucial
(c)
k,
fact here
fi(n)
f2(n)
n >
all
|. Then
|g(n)
\342\200\242
\342\200\242
\342\200\242
+
|a0|<(|aj+
\342\200\242
\342\200\242
\342\200\242
349
Relations
Equivalence
a2
\342\200\242
/x(n) | +
\\g2(n)\\.
f2(n) | <
\342\200\242
\302\2432(rc)|.
(d)
0(0).
4.
T is
that
know
We
positive valued,
Lemma 4.2.1.Sincen/cl
<
1 iff
to
T(n)< ]T
;-o
< a/c < 1, the sum
If 0
so
T(n) <
fcbrc
alog<nb. Since
nlogcab.
If a/c - 1, we have
a/c > 1, we can use
T(n) < bn((a/c)log<n
(a/c)logcn = (nIogcfl)/n,
4.3
EQUIVALENCE
for
some
and
we say
means
this
for a
< c, we
have
l)/(a/c
some
k.
constant
first
which
rclog<a,
< 1
some constant k,
RELATIONS
in
employed
alog<nb.
is bounded by
of
< (logcn
T(n)
the solution
Equivalencerelations,
differences
logca
the formulation
+ l)6n.
T(n)<(k
rclogcflt
Since
alog<n
use
will
(a/cYbn
-10 (o/c)1
so we
logcn <
the
are
process
irrelevant
defined
in Chapter
of abstraction,
to the purpose
at hand. Within
if the
differences
a given
between
context,
them do
350
Chapter
and Digraphs
4: Relations
For example,if
costsonedollar,it would not
not matter.
a dollar bill, or
dollar
particular
any
accepted
On the
whether
matter
That
by merchants.
other hand, there are
wants
a person
bill,
other situationswhere
these
things
are not
more
than
a dollar bill, so
equivalent. For example,a dollarcoinweighs
not
be willing to say
that if it were necessary to mail the dollar, onemight
At an extreme, a collectorof rarebillswould
be
the two were equivalent.
to
that
all
bills
dollar
are
since
minor
unlikely
say
equivalent,
very
such as serial numbers and errorsin printing,
differences,
may
greatly
of equivalent
affect the value of a bill as a collector'sitem.The
meaning
the same in
thus depends on context and expressesthe notion
of being
those respects relevant to the context.
In terms of formal mathematics,
a binary relation is an equivalence
relationif it is reflexive, symmetric, and transitive. These properties
of being the same which are ordinarily
taken
aspects
expressimportant
and are usually obviousfor specific
for granted
relations.
For
equivalence
in
consider
the
as.\"
the
relation
born
same
month
This
\"was
example,
since
each individual
was born in the same
relationis clearly
reflexive,
A was
as himself.
month
It is equally clearly symmetric\342\200\224if
individual
in
B
born
born in the same month as individual
then
was
the
same
B,
month as A. There is no question about transitivity either. Beingtold
B were born in the samemonth and B and Cwereborn in the
A and
that
no one
samemonth,
is likely to deny that A and C must also have been
things
of looking
way
into classes.
human
beings
of the
months
these equivalenceclassesconsists
Any time
relation
month.
given
an-equivalence
in
think
to
tHink
terms of
Definition
4.3.1.
whose
subsets
disjoint
of partitions,
in terms
3.
the
notions
any B,C G
4.3.2.
equivalence
are
to
interchangeable.
of A
is a collectionP of
A;
P, B D C -
0, B
for any xGA there existsB G P
for
Definition
Ay
the two
union is A.
1. foranyBGP,BC
2.
into twelve
year. Each of
or
= C;
such
and
that
x G
B.
relation R on
Given any set A and any equivalence
[x] =
[x] of each element x of A is defined
class
Section 4.3
{y G A
x R y.
[x]
equivalenceclass.
Theorem4.3.1.
A, S =
Given
A} is a
{[x] \\x
Conversely, if P
any
partition of A
is a partition of A into
is the setofequivalence
for the
classes
by
a E
b belong
a and
iff
to the
= [y], even
a unique
give
A and
set
351
Relations
Equivalence
if x \302\245=
yf provided
\"name\" to each
into
on
subsets.
nonempty
subsets, then P
disjoint
disjoint
nonempty
equivalence
definedon
relation E
same subset of P.
Proof.
1.
Clearly
2.
[x]
Pi [y J
some
3.
Exercises
the
by
\\z
symmetric, x R y, so that
For any xG A, [x]6S.
4.3
1. Tell how
many
distinct
[y],
\342\226\241
Two
people
(b)
Two
people
are equivalent
are equivalent
(c)
Two
people
are equivalent if
Suppose
that
if they are
if they are
are for
A.
for equivalence
definitions
relationsthat describeeachofthe
partitions.
following
members
of the
Democratic Party;
the
(b)
classes).
Republican Party; all the otherpeople(three
the negative integers; the nonnegative integers (two
classes).
the sets {2i,2i + 1}for all i > 0 (infinitely many classes).
the
members
with
Prove
different
for n
elements
digraphs,
digraphs
three vertices?
5. How many
6.
of the
(a)
(c)
of the
each
equivalencerelationon
State
classes there
equivalence
(a)
Prove
3.
[x] =
equivalence relations.
following
2.
\342\202\254z
A, x
Section
for
of [x], [x] C A.
z and y R z}. If this set is not empty,then for
z and y R z; but then, sincei? is transitive
and
definition
A |x R
that
equivalence
numbers.
the
equivalence
= 1,2,3,4, and 5?
relation
/ E g iff
relation
on functions
relations
are there
on a set with
in 0(g) and g is in 0( /) is an
from the real numbersto the real
/ is
352
Chapter
and Digraphs
4: Relations
of positive
set A
the
form
2m,
integersby
m is
where
G R
(a,6)
an arbitrary
integer.
(a)
relation.
an equivalence
R is
that
Show
classes
8. Let
A be the
set of positive integers.
a divides b or b divides a. Show
that
R.
under
DefineR on A
R is
reflexive
9.
set A is
G #
flona
relation
(a,6) G
and
(b,c)
and circular
reflexive
iff
by
G R iff
(a,b)
and symmetric
equivalence
relation.
10. Let R
Show
that
/? is
#,
conclusionis false
11. Let R he
(c,b) G R
on
12.
S is
also an
a-teflexive
he
Let
G R and
relation on A. Let S - {(a,6)
| (a,c)
c G A}. Show that if/? is an equivalence
relation
a binary
for some
then
A,
equivalencerelation.
relation
on a set A.
13.
Let
be
14.
an
that
R is
an
that (6,c) G R.
is an
relation.
equivalence
(a) Let/be
by
(a,6)
Show
(a,c) in R imply
and
R2 he
and
i?i
Rx Pi #2
if
by reflexive.
is replaced
symmetric
then
(a,b)
a function
from
G i? iff
a set
/(a) =
relation,
(b)
One
done
problem
handling
by a
misspelled
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDABCHACCLMMABCRCDABHCAC
That is,/(A)
= A,f(E) -
Determinethe
definedin part (a).
equivalence
A,
f(F)
classes
= S,
etc
determined
...
by R
where R is
Section
4.3
Theorem 4.3.1to
15. Use
equivalence relations.
(a) Let
(b) Let
set of
the
be
and b
Giiiffo
positive integers
same
the
have
(d) Let
and b
and
G R iff a
(6,12)
example,
(e) Let
A
R
set of
same
A by
on
(a,b)
upon division by 7.
and defineR
A by
on
(a9b)
factors. (Thus,
prime
positive integers
be
multiplicities).
the set of all
G R iff
and defineR
(a9b)
decimal
for
G R.)
the
and
the
have
A by
on
digit in their
remainder
same
positive integers
be
(a,b)
by
the
iff
(counting
Let
(f)
positive integers
have
set of
the
be
set of
the
be
G R iff a
(a9b) El Rift
let
and defineR
units
expansion.
(c) Let
and
father.
same
the
are
relations
following
set of
the
be
and b have
the
that
verify
353
Relations
Equivalence
b have
and define
R on
A by
(a,b)
is the
greatest
integer
or equalto a.)
a
be
the
set of all integers and defineR on A by (a,b) G R
Let
(g)
iffa2 = 62.
(h) LetA be the set of students in your discretemathematicsclass
in
R on A by (a9b) G R iff a and b sit in the same row
and
define
less than
classroom.
your
Let
(i)
(a9b) G R
(j) Let
on
set of
the
be
be
by
a and
iff
average.
16.
relation
that
Suppose
R on
a set
each a G A,
(a) For
(b)
If
Must
17.
R be
(a,b)
(b)
(a,b)S(c,d)iftab
(c) (a,6)T
the
follows:
sum
(a,6)
of
the
6 G A
such that
G
iff
(c,d)
(a,b) G R.
#.
Rf where
then give
R is
the set of
a geometric
+ d.
relation
digits
= cd.
6 = c
a +
following
A?
following relations on R
(a)
Define
exists
are equivalence
relations and
of their equivalence classes:
(c,d) iff a2 + b2 - c2 + d2.
numbers,
description
18.
there
an equivalencerelationon
that the
Show
real
G R
(a,c)
the
satisfies
properties:
on the
354
Chapter
and Digraphs
4: Relations
classcontaining
and describe the equivalence
0 < x < 100.
all the integersx in [202]where
19. Show that the relation R
equivalencerelation,
-
a2
an
is
b2
determined
is defined
of 2. Find
multiple
integral
by R.
number
202. List
Z of all integers is
as follows: (a,6) G R
set
the
on
R
where
the
the
an
iff
classes
equivalence
and
20. Let A = R x R, where R is the set of realnumbers,
let P =
in A. If a and b are in A, define
aRb iff the
point
(*o>yo)be a given
distance from a to P is jbhe same as the distance from b to P. Prove
relation on A and that the equivalence
that
R is an equivalence
classes are the circlesin the plane having P as the center.
1.
each
one for
R is
and
one for
and
an
If x
yf
y R
z R
and
x R x,
reflexive,
then xRy
Ey,
females
means xRz
is
Since
Symmetry:
was born,possibly
a person
y E z> then x R
transitive, this
Reflexivity:
4.3.1
in which
m#les
2. Transitivity: If x E y
Since
year
number
unbounded
(c) two,
week
for each
class
one
53,
(a)
(b) oneclassfor
andy
x,
x,
z, and z R y.
which means xEz.
x, y R
and so also x
which
meansy
E x.
Ex.
Since
most
the
abstraction
are
One
science,
yet
hardware
structures
study
machines.
to the
finite
arithmetic
operations
some
modulo
counting
on computers,
there is a frequent need for
number m. A mundane
of modular
example
12-hour clock, which counts seconds
the
common
= y(mod
m)
iff
x =
For
isan equivalence
relation
Theorem 4.3.2.
any
on
distinct
equivalence
classes:
any
[written
y +
positive
integer.
m)], is defined
\342\200\242
m for some integer a.
be
(mod
positive
the
12.
modulo
hours
Let
4.3.3.
Definition
by
is as a tool for
of groups,
state
including symmetries, and finite
that is particularly useful in computer
application
with familiar
is modular arithmetic. Due
deals
structures,
limitations
and finite accuracy limitations of
storage
the
include
equivalence relations
means
to
ordinarily
use of
important
(which
integer
integers,
and
[0],[1],..
.,[m
The relation
on the integers
relation = (modm)
partitions the integers into
m, the
- 1].
Section
4.3
355
Relations
Equivalence
1.3.7 of
y.
\342\226\241
The
the
equivalence
of
collection
respect
1]of
.,[m - 1]}.Arithmetic
positive integer m. That is,Zm = {[0],[1],..
can be extended to arithmetic on Zm in a natural way:
integers
M 4- [y]
[*]
\342\200\242
[y]
operators
4-
= [*
\342\200\242
y];
y].
of course, is the
these definitions,
so defined on Zm are
in
Implicit
- [x
functions.
actually
the
on
the
that
assumption
This really
should be
proven.
Theorem4.3.3.
The
operations
4-,
-, and
Zm are
\342\200\242
on
well-defined
functions.
Proof.
m). We need to show
m) and yx ^ y2(mod
that
4- y2(mod m). (Thisisthe sameas supposihg
=
=
=
and
that
and
4[x2] 4showing
[xx] [yx]
[x2]
[y2]
[xx]
[yx]
= (mod m), we know that xx = x2 4- a \342\200\242
m
the
of
definition
[y2].) By
m for some
b. It followsthat xx 4- yx =
for some a, and yx = y2 4- b \342\200\242
m, so that
xx 4- yx = x2 4- y2(mod m).
(*2 4- y2) 4- (a 4- b) \342\200\242
m for some a, and
2. Suppose that xx = x2(mod m). Then xx = x2 4- a \342\200\242
=
\342\200\242
*=
that
so
4(-a)
m,
[-xx]
[-\302\2432]-xx -x2
3. Suppose
that xx = x2(mod m) and yx = y2(mod
m). Then xx = x2 4m for some 6. It followsthat xx .
a \342\200\242
m for some a, and yx = y2 4- b \342\200\242
1. Supposexx
that xx + yx
yx =
x2
^2
y2(mod
the
defined
way
x2(mod
= x2
\342\200\242
4-
\342\200\242
.Due to
subtractionare
*2
(x2
m).
the
\342\200\242
b 4-
y2
\342\200\242
a 4-
\342\200\242
b \342\200\242\342\200\242
so
m)
m,
that
xx
\342\200\242
=
yx
operations
in Zm,
the usual
of addition,
multiplication,
lawsof commutativity,
and
associativity,
and
356
Digraphs
1. [x] +
2.
That is,
hold.
distributivity
[y]
\342\200\242
=
[y]
[x]
3. l[x]
4. ([*]
4-
\342\200\242
= [x]
[y])
\342\200\242 \342\200\242=
4- ([y]
4-
[2])
\342\200\242 \342\200\242
[x]
[2]
is commutative.)
is associative.)
(Addition
is
(Multiplication
(Multiplication
[x]
4- [2]
[y])
(Addition is commutative.)
4- [x]
[y]
[y]
([y]
[z])
associative.)
5.
([x]
4-
\342\200\242
=
[y])
\342\200\242
4-
[x]
[z]
\342\200\242
[y]
[2]
[2]
(Multiplication
over
distributes
addition.)
The
The
notation
The reader
should
of certain
however,
beware,
in a
notation
this
use
which
languages
different
programming
x
when
way
or m
is
negative.
there
of
both
divides
notation
The
them.
divisor of x
and y.
greatest commondivisor
is
common
Two
integers
gcd
(x9y)
the
denotes
are relatively
greatest
if their
prime
1.
of 237 and
204 is 3.
4.3.1.
The greatest commondivisor
Example
= 1. Thus, 237 and 203 are
Also, gcd(237,158)= 79, and gcd(237,203)
prime.
relatively
then,
for
[w 4- 2
If x and
4.3.4.
Theorem
\342\200\242
x],..
are
- 1) \342\200\242
x] are
.,[w 4- (m
relatively
w, the
integer
positive
every
prime
positive
integers
4- x]>
all distinct.
to
which
have
we shall
a better
prove as
a lemma.
Lemma 4.3.1.
smallest
r =
Suppose
positive
integer
for
\342\200\242
m. Then
r =
\342\200\242
x 4-
and
which
gcd(x,m).
Section4.3
show that r
We will first
Proof.
< q < r.
where 0
is,
(That
Then,
= x-p-(c-x
q=x-p-r
be that
= (1 - p
the smallest
r is
Since
which is
x and
= 0,
Interchanging
divides m. To prove
is divided
Supposes is a
0 < q
< r, it must
a proof
that r also
and
gives
m in
r =c
\342\200\242
x +
\342\200\242
5 and
m =
Substituting
obtain r
\342\200\242
a + d - b must
\342\200\242
we
m,
= (c
x and
\342\200\242
s.
\342\200\242
a 4-
\342\200\242
5 for
divides
be
it must
that
show
divides
also
that
number
positive
6, x =
a and
q,
r.)
by
\342\200\242
\342\200\242
\342\200\242
x + (\342\200\224p
m.
c) \342\200\242
d)
\342\200\242
r 4-
+ d-m)
the largest
r is
x =
Suppose
positiveintegerofthis form,
x.
to say r divides
m in the argument above
that
m, we will
x and
both
x.
divides
remainder when x
q is the
357
Relations
Equivalence
m. Then, for
6
x and
\342\200\242
s for
r and 5
\342\200\242
\342\200\242
s. Because
6)
5, since
Proof of Theorem4.3.4.
Suppose
0 <
7<f
will show
\342\200\242
= w + x
u;
x
i:
+
y,
integer
m. (We
<
combiningthex-terms,
we
(1)
1,
(2)
(i
by
and,
\342\200\242
(3) c
(4) c
the
j) = y
that this
\342\200\242
4-
+ x
\342\200\242
i]
[w + x
\342\200\242
and
y]
out the
\342\200\242
m.
Canceling
u;-terms and
obtain
\342\200\242
m. Since
preceding
[w
Forsome
leadsto a contradiction.)
lemma,
x and
\342\200\242
m =
\342\200\242
x +
- j)
(i
\342\200\242
x \342\200\242
(i
\342\200\242
x \342\200\242
from
(4),
we obtain
(5) m
\342\200\242
\342\200\242
(d
(i
j) 4- c
\342\200\242
=
y)
- y.
of so-called
family
table
these
(f
0
one.
searching.
techniques
(x)
+ g(x))
< d
\342\226\241
\"double
When
examine
mod m,
358
Chapter
and Digraphs
4: Relations
mod
+ 2 \342\200\242
g(x))
\"probe sequence\"for
(/ (x)
... (/ (x) +
m
x.
(m
/ and g
(Here
\342\200\242
1)
g(x))
the
m, called
mod
their
ability
Exercises
1.
What
equivalentto zero,modulo
100 are
less than
integers
positive
10?
2.
the following
Consider
wrong
(b) [x]/[y] =
=
the
Verify
multiplication
for Zm.
identities
for
is an identity
following
[x] +
(c)
is
5. Show that
if
([0]
[x]
[x] ([1]
([-*])
x =
integer <x/y)
associative,
on Zm.
commutative,
and
addition
for
4.
the
that
Verify
What
some
for
[z]
J ]
x/y
[L
(c) [x]/[y]
3.
Zm.
= [x/y]
[x]/[y]
(a)
each?
with
is an
identity for
addition.)
multiplication.)
of [x].)
then
odd,
x and y
6. Suppose
section.
were
m =
about
permitted
results
Which
8.
Define
and
relations
9. Define
b2
mod
following
for
identities
the
mod
m) mod m = (x + y) mod m.
- (x mod m).
a relation
R on the set of positive integersby (a,6)
G R iff a
are relatively
prime. Which of the 6 basic propertiesof
(a) (x mod m + y
(-x)
0?
7. Prove or
operator:
(b)
to be negative
still hold?
would
mod
mod
m =
does
R satisfy?
a relation R
the
set Z
of all integers by
G R iff
(a9b)
that R is an equivalencerelationon
of equivalence classes.
7. Show
the number
on
Z.
a2 =
Determine
Section
4.3
10. Find an
11.
(a)
[2][x]-[l]inZ\342\200\236
(b)
3170 = x
12.
mod 29.
is a prime
if p
that
Prove
359
Relations
Equivalence
and a2
p dividesa + b
p, then
b2 mod
or
\342\200\224
6.
(a)
decimal
10 so
1 mod
that
expansion
\302\273
1 mod
34\"
of
10 for
digit in the
last
the
is
What
n.
any integer
(b)
in the ordinary
94009
13.
(c)
What
(a)
Prove
decimal
of
expansion
one
of the
integer that is a square must have
its units digit:0,1,4,5,6,9.
of 0,1,5,6 for its
one
any fourth power must have
that
any
following for
(b)
that
Prove
units digit.
14. Prove
15. Prove
19
that
if n
of 4rc2
a divisor
is not
that
a prime
is not
4 for
n.
any integer
(n
\342\200\224=
1)!
modrc.
16. Determine
year
17.
by 8? When
divided
18.
5110is divided
(c)
20.
is
3100
When
4?
x
-3 = 7 mod 5
0 mod 19
1 mod
8. Prove that
x2
true:
39
7
mod
17
(a)
(c) 6 = -4
21. Translate the
mod
into
following
integer
5 =
(d)
are
statements
57 =
Fill in the
(c)
of the
16.
by
Suppose
1 mod
104th day
the
divided by 6?
when 51101is
remainder
the
is
What
and
on the
fall
even
n #
about
is even.
statements
integers
0 divides
two
odd
mod 13
itself.
integers
is odd.
(a) Use
the
for
digit
10
congruence
divisibility
of x is
by 2:
An
= 0
integer
divisible by 2.
congruences:
mod 2 to
x is
divisible
by 2
iff
test
the
units
360
Chapter
and Digraphs
4: Relations
(b) Use
(c)
divisible by 4 iff
divisible
is
5.
by
x is
An integer
formed
number
the
An integer x
4.
by
9546
(a)
(b) (16)(15)(22)
(c) (1) (2)(3) (4)
(d) (1) (2)(3) (4)
9546 ^ x
(e)
24. If
that
(5)
positive,
(b) Give
mod
11
relatively prime
b = c mod m.
that
Prove
(a)
mod 7
(6)-x
(6) (7) (8) (9) (10) -
(5)
s b mod m,
gcd(a,m) - gcd(6,m).
then
26.
- x mod 7
(31)
(29)
mod 11
if a
that
Prove
congruences
following
m are
and
implies
25.
the
\342\200\224'
where a and
are
ac
integers,
positive
the
mod
is
of
operations
zm.
27. (a)
(b)
(c)
(d)
Prove that
equation ax =
relatively
28.
two
Show
that
mod
has
an integer
solution iff a
and m are
prime.
some positive
three
digits.
29.
mod
n.
remainder
+ 3!+
+99! +100!is
...
12.
by
What is
(b)
l!+2!
when
361
Relations
Equivalence
+ 1005
...
l5+25+35+
is divided
by 4?
31. (The
Coconut
Three
Problem).
sailors
for
and
and divide
night
decides
distrustfully
for
attempts
into
three
awakens
night.
He
shares, but
equal
for:
problem
(a) 4 sailorsand 4
shares
equal
with
a remainder
of 1 after each
division.
5 sailors
(b)
with a
all integer
32.
Describe
33.
(a) When
remain,
at a time,
1,2,3,4,5
respectively,
are
none
that
over.
left
have been in
could
(b) Supposethat
removed
the equation12*-
2,
one
3, 4,
egg
5, or
2, 3,
eggs. But
Find the
17.
at a time, there
when 7 are taken out
4, 5,6
smallest number of
eggs
the basket,
remains
34.
53y
of
eggs
that
to
of 17 pirates stole a sack of gold coins.When
tried
they
In the
the fortune into equal portions,3 coinsremained.
brawl
over who should get the extra coins,onepiratewas
ensuing
was redistributed,
but this time an equal
killed.
The
wealth
in
which
distribution
left 10 coins. Again an argument developed
was
now
fortune
another
was
killed.
But
the
total
evenly
pirate
of
was
the least number
distributed
among the survivors. What
band
divide
been
stolen?
for men,
2 dollars
are
certain theater, the pricesofadmission
of each
one dollar for women,
and 50 cents for children. Howmany
if 100 people paid a total of 100dollars?
attended
In a
362
Chapter
and Digraphs
4: Relations
37.
38.
in 1900 if
his age at
death was
the
times
1/41
all
About
his
age at
final
age.\"
Find
that integral
as small
x is
which
a positiveintegeras possible.
39.
men
Three
possess
1/6 of the
second1/3,
then
man
returns
1/6 of what
third
the
and
and
1/2,1/3,
Selected
4.3.1
for Section
Answers
1. 10,20,30,
2. (a) Since
is
x/y
80, 90
60, 70,
50,
40,
in
not
general
an integer,
this is not
always
defined.
(b)
Take
that
- 3. Then [2]/[2]=
([3]/[2])[2]
division
(c) The
we
5. Supposex and
and p
4.4
can
show
has
definition
this
if and
division
since
also [3]/[2]
= [1]. It
expect from
is prime.
stated in the exercise.
only if m
are
as
is greater than
=
z exists.
If one does
such
that [x]/[y] is uniquely defined.In
all the properties we expect of
pq
for some
1.Thenp must
be
Suppose that p =
a power
p is
even numberwith
This
is a
Bona
of 2 greater
one. However,
any
other
contradiction.
ENUMERATIONS
order on A
set A is called a partial
and
the set A
then
and
transitive,
reflexive, antisymmetric,
we
a
ordered
or
set
partially
poset. Frequently will write
denote that A is partially
ordered
by the relation R.
A relation
follows
operator.
general,
(x ,y)
but
exist, however,
gcd
[1],
called
is
a
[A;R]
to
when
is
Section
Lattices,
Relations,
Ordering
4.4
363
Enumerations
and
order
1.
2.
3.
a <
G A9
V a,b Af if a <
V a,bfc
G A, if
Two elements
a < b or 6
either
elements of
ordered
< is
relation
(reflexivity)
a and b in
< a; otherwise
are
= b (antisymmetry)
a<c
(transitivity).
said to
A are
are
they
incomparable.
then
comparable,
ordered
a totally
A is
that
or
as follows:
described
be
can
the
case,
Example4.4.1.
(a)
an arbitrary
U be
Let
subsets of
Then
U.
[P(f/);
than
two
P(\302\2437) contains
distinct
incomparableunder
C] is a
P([/) is
P (U)
be the
poset but
not
if
collection of all
totally
more
contains
under
ordered
set
inclusion.
(b)
If Z
is the
only is [Z;<]partially
ordered.
(c)
familiar
Another
involves
where we
(d) If
3 does
is a
n. Then
3 are
not divide
positive
incomparable,
let Dn denote
partially
ordered
|]
is totally
partially
But
that is,
ordered
[P;
set.
See
| ] is not totally
2 doesnot divide
2.
integer,
[Dn; | ] is a
then not
is totally
but,
ac for
than that, it
ordered,
poset
\"divides\"
relation
the
on Z,
ordering
more
other
the setofpositive
set.
For
values
divisors
of
reflexive.
\\ ] is totally
364
Chapter
and Diagraphs
4: Relations
Poset Diagrams
The
we have
described
for digraphs can be usedfor partially
as well. Nevertheless, posets [A;<] are traditionally
in a more
economical way by poset (or Hasse) diagrams. On a
represented
is a vertex for each element
of A, but besides that, all
there
poset
diagram
omitted
of the reflexive
are
eliminating
explicit
representation
loops
diagrams
sets
ordered
in a poset diagram if it is
present
If
relation.
we
write x < y to mean x < y
impliedby
a vertex xjto a vertex y iffy
covers
but x # y, then an edge connects
xf
is no other element z suchthat x < z and z < y.
that is iff there
the
Special
of the
transitivity
in Posets
Elements
let
B be
a subset
of A. Then
1.
An
Hence,
by
b =
antisymmetry
b G
element
An
B is
b'.
elementofB
if
< b
(6 > x) for
all
x\302\243B.
4.
quite
and
least
as
coincide,
ordered
set (that is
For example, the
distinct.
a unique least
(h) have
and
element. The posetsof (f) and (g) have several minimal elements,
namely, 2 and 3 for (f) and 2,3, and 5 for (g).The posetsof(a),(b),(c),(d),
the
and
[712, | ] of (e) has
poset
(g) have a unique greatest element while
of (f) has two
maximal elements 7, 8, 9, 10,11,12.Likewise,
the
poset
maximal elements 12and 18 while the poset of (h) has maximalelements
4,6,
and
9.
Section
4.4
{a,
Enumerations
by
c}
{*.c-}
{a.b}
t4
42
1
(a)
[D\342\200\236;|]
(b)
(h)
4-12.
365
[9({a. b,
[{1, 2,
|]
Poset diagrams.
c});C]
3,4,6,9};
366
Chapter
and Digraphs
4: Relations
order
total
of
a set
is a
ordered.
nonempty subset B
is
said to be well
[A;<]
if every
order
well
element.
least
contains
Moreover,
A is a totally
Since
ordered set it follows that
minimal element, thenB contains
one minimal
only
is a least element of B.
element
moreover, this
if
set
B contains
element
and
Example 4.4.2.
The
(a)
the
equivalent to
(c) The
relation
not
but
minimal
numbers
(d)
x/2
e p.
Any
finite
the
poset
integers
negative
< on
to prove two
usually
becausethe
element.
totally
the set
ordered
set is
well ordered.
in
A such
mathematics
P(x) is true
that a0 is the minimal
for
because
they
element,
induction. If it isto
A, and there is a well
then
it is sufficient
A such
mathematical
a proposition
that
proven
is well
Well-orderingrelationsare important
basis for proofs by generalized
ordering
integers,
of < is
induction, and is
does
form the
be
property
axiom.
subsetof
nonnegative
of mathematical
principle
as an
taken
N is the set of
actual fact, the well-ordering
[Af;<], where
poset
ordered. In
all
x in
things:
is true;
a in A, if P(x)
any
1. P(a0)
2.
for
is true.
is true for
all
x in
P(a)
Section 4.4
367
and Enumerations
Lattices,
Relations,
Ordering
Enumerations
Well-orderingrelationsare important
in
computing
In other
words,
the well-ordered
4.4.3.
Example
pairing
There
well
constructed
on
order
elements
the
as follows:
defined
f:N\342\200\224+Z
N:
Z:
1 1 1 i 1 i i
In
other
pair
words,
-1
the even
-3
-2
integers in N with
...
...
the
of
integers
positive
Z and
1<
because
5.
The correspondence
/ above
we
4.4.3.
Definition
integers. That
/ = iV. A function
each
is a
special
case of
an enumerationwhich
define.
now
there
s\302\243S
repetitions
set
Any
have
The
able.
not
is, let /
Let / be an
=
{k \\ k
k <
of the
segment\"
n]
an enumeration
an i such that f(i)
is
f:I\342\200\224*S
exists
\"initial
G N9
for
constant
some
of S if /
= s. An
nonnegative
n, or let
is onto;that
enumeration
is,
for
has
no
= f(j) only if i = j.
function is one-to-one,
that
is, f(i)
do
has an enumeration is said to be countable.Setsthat
that
an enumeration are said to be uncountable,or nondenumeris totally
ordered
real numbers form a set which
by < but
if the
uncountable.
For
and
countable
well
construction:
be the
g(a)
of enumeration
concepts
as can be
related,
closely
of A.
is an enumeration
f:I\342\200\224+A
the
sets,
ordering
are
Suppose
without repetition
seen
by
simple
For eacha in A,
let
= a. The relation
smallest integer in / such that
f(n)
<^
<
of A for which each
defined by a <t b iff g(a)
g{b) is a well ordering
element a G A has only finitely many elements b G A such that b <^.
set A for which each
Conversely, if R is a well ordering of a countable
a G A has only finitely many predecessors; that is, thereareonly finitely
b G A such
elements
that
(6, a) G R, then there is a unique
many
368
Chapter
4: Relations
and
repetition
= min(A), f(i) =
by/(0)
/ such that
without
enumeration
given
Digraphs
min (A
\\f(j)
\\j
<
is
i}).
Lattices
in which
each pair of
We define a join-semilattice as a poset [A;<]
elements a and b of A have a least upper bound;we call this lub the join of
a and b, and denoteit by a V 6.
each pair of
Likewise we define a meet-semilattice as a posetin which
elements a and b have a greatest lower bound; this gib is calledthe meet
ofa and b, and it is denoted by a A b.
if c = a A b, then c satisfies:
Thus,
1. c
2. If
of {a,6}),
bound
d
(c is
< c
\\a,b}).
Likewise
reversing the
= a
if c
6, then
and
inequalities
c satisfies
changing
upper
bound.
words,
4.4.2.
Definition
elements
has a
a lattice
lattice
is a
and
a join-semilattice
is both
poset in
which
each
lower bound.
a greatest
pair
of
In other
and a meet-semilattice.
Example4.4.4.
(a)
lubof{B,C}.)
a V 6 is simply the
ordered
set is a lattice in which
totally
if R is
greater and a A b is the lesser of a and 6. For example,
the set of real numbers with
usual
the
<, then
ordering
aV6 = max{a,6}
a A b = min{a,6}.
and
P is the set of positiveintegers,
isa latticein
(c) The poset [P;| ],where
a A b = gcd(a,6) and a V b - lcm(a,6)
which
where gcd and 1cm
stand
for greatest
common divisor and least common
respectively
(b)
Any
(d)
multiple.For
Of the posets
(h)
are
instance,
6 A
in
4-12,
Figure
meet-semilattices,
9 =
3 and 6
- 18.
(a),(b),(c),
(g) is
Section
4.4
Relations,
Ordering
369
and Enumerations
Lattices,
Exercises
1.
of functions
definitions
Give
sets without
that enumerate
each of
the
following
repetitions:
perfect squares;
N x N.
real functions of one variable by
Q
Ry and for all x, f(x) < g(x).
ifff:R-+R,g:R-^
fQg
Prove
that
(a)
Q is a partial ordering.
(b) Prove that it is not a total ordering.
3. Provethat if R is a partial ordering on a set S, then for n > 2, there
elements of S suchthat
cannot be a sequencesu s2,. \342\200\242
\342\200\242>
sn of distinct
the
(b)
integers
nonnegative
of nonnegative
(c) the ordered
2. Considertherelation defined on
pairs
... R sn R sx.
countable.
Prove that the rationalnumbers
are
Consider the relation D on the integersdefined
Si
4.
5.
integers,
R s2
R sz R
an integer
exists
there
a such that x
(b) Prove
(c)
What
that
are
the
by
G D
(x,y)
iff
\342\200\242
a =
a lattice ordering on A.
minimal
elements of the set
> 1.
is not
with
respect
to
D?
an
enumeration
repetitions.
with
7. Define a well ordering on the classof all (finite)
digraphs
that
it
is a
A.
Prove
set
chosen
from
some
well
ordered
sets
vertex
well
ordering.
How many
set
with
n elements?
then so doesevery
subset
RofS.
10. For
(a) [D20;\\]
(b) [D,^]
(0 [/i5;|]
(d)
[A;
(e)
[A;
<] where
| ]
where
A =
0 < x < 1}
370
Chapter
4: Relations
11.
and Digraphs
{2,3,4,6,8,12,36,60}
{2,3,4,6,12,18,24,36}
B of a poset [A;
bounds
or not
whether
Determine
tice.
if they
find,
<],
of B,
the lub
or
join-semilat-
= P[{a,6})
(a) [P({a,6^});C]andB
B = {3,10,15}
[D30;
I land
(b)
= {2,7}
(c) [/12;|]andB
= {1,2,3,4,5}
[/6;|]andS
(d)
(e) [D12-{l};|]andB
12. Recall that
is a relation
on A,
= {(a,6) | (6,a) \302\243
/?}that if [A;R] is a poset
R
if
then
R~l
Prove
(called the
then
is
[A;#_1]
If
(c) If
R~lU
also
dual of [A;/?]).
relation on
is a
by R~l
defined
(a)
= {2,6,10}
= {3,4}
[D12-{l2};|]andS
(f)
a poset
ordered.
ordered.
A =
A x
R U
|(a,c)|a\302\243A|.
13.
Define
ordering.
orderingon Z x Z.
15.Let [A; <} be a poset and let B bea subsetofA. Prove:
6 is a maximal
element of
(a) If b is a greatest elementof B,then
B.
b is a lub of B.
of B, then
(b) If 6 is the greatestelement
G
J3
6 is the greatest element
If
6
an
of
is
bound
then
(c)
J3,
upper
ofB.
(d) If b and b' are greatest elements of B, then b = b'.
16. Let [A;<] be poset whereA is a finite set.
one maximal element and at
at least
(a) Prove that A contains
(b)
Prove
C is
that
leastone
minimal
(b)
If, in
a lattice
element.
that
A contains
a least
(c) If R
is a
is a
(d) If
18. Let
(b)
(c) a A
(6
R' is
371
and Enumerations
a total ordering on B.
a well ordering on B.
Va,b,c G A
= a (idempotentlaw).
a,aVa
6 A c,
b =
aV
= (a
A c)
R' is
then
then
Then prove
a lattice.
a A 6 =
a A
on A,
on A,
total ordering
well ordering
be
[A;<]
(a)
Lattices,
Relations,
Ordering
b V a (commutative).
a V (6 V c) = (a V b)
A c,
6)
(associative).
(d)
= a, a
(a V b)
a A
= a
A 6)
(a
= oiffaV6
(e) c<6iffaA6
(absorption).
6 (consistency).
19. Algebraic
and o is a
b.
is a \302\251
(c)
Define the
relation M on A
a partial orderingon
defined
so
A nonempty
totally ordered
contain
a least element.
[A^/lf] is
that
with a
[A;<]
poset
infinite
An
What
n =
totally
B but
for
subset B for
contain
a greatest
with a
subset B for
which
there
is a
gib
element.
which
there
is an
no lub.
or
in
the
ks are positiveintegers?
the
usual
of real numbers with
kl9k2f and
and
primes
that
Show
on n such that
sufficient
conditions
ordered,
nature of the posetdiagramsfor [Dn; \\ ] where
n = p^p^p^3 where Pi,p2, and p3 are
where
] is totally
will
be the
p\\lp\\*
distinct
22.
every
Determine necessaryand
[Dn;
(b)
[A;<]
poset
upper bound
21. (a)
but
set
element.
infinite
An
a o
greatest
(d)
iff
a o 6.
L is an infinite
where
lattice
[L;<]
ordered subset of L is finite.
(c) An infinite poset [A;<] in which some
(b)
6 =
a is
a meet-semilattice
G M
by (a,b)
poset
order
23.
elements
which
24.
The
set of
poset
diagram
appear.
[J34;<]
sequences
where
is denoted
372
Chapter 4: Relations
and
for
B4
25.
Digraphs
not be
may
[A;^]
poset
ordered
subsets.
al<a2<
\342\200\242
\342\200\242
\342\200\242
<
subset
Any
a chain in
< ai+l then the
ax and ak.
fe the
set of
ak is
such
that
with
endpoints
(a) If
at<b
=
P(t7)
[A;<], and
if
have
such
is no
there
chainis called
totally
that
b G
chain
maximal
chains
maximal
all
determine
of
.,aj
{alfa2f..
with
\302\243]
endpoints
<t>
andf/.
n =
where
k2 are
and
1.
l,r)
for
r2
< r2 + r
+ r<i<(r
+ l)2
exercise should
would have
not
n in [Dn; \\ ]
is correct.
solution
that
to this
solution
complete
< i
r2
- 1) for
- r
\302\243
3. Proof
1 and
endpoints
p2 distinct
Section4.4
- (i + l)2
(c) /(i) - (i ~r2/(0 = (r, - r2
each
px and
integers.
positive
(b) /(*)
with
p\\xp2*
= 2i
f(i)
(a)
chains with
all maximal
Determine
(b)
sx R s2f
sx R
be antisymmetric,
sx R sn by use of
s3,...,
since
existed,
sx
sx
we
by transitivity,
as sn R sx.Thus R could
(A better proof would prove
then,
as well
R sn,
sn.
of
transitivity.)
4. Proof
integers,
including
negative
Let
*<40-/<0
g(4i + 1) -
verify
Now,
6.
Proof
n >
(-a,6)
where f(i) = (a,6)
g(4i
*(4i
+ 3)-(-a,-\302\253
that
sketch:
0 define
2)-(a,-&)
Suppose
g(n
is an
this
4-
1)
Section 4.4
is such
there
include a proof
repetitions.)
rc}.
that
4.4.1 Application:
Strings
and
so
on Strings
Orderings
<
on the
be taken
as to
familiar
so
probably
is always finite,
(A complete
enumeration
an
is
orderingrelations< and
While the
are
n.
every
g
set G(n)
the
that
Observe
a k for
373
and Enumerations
Lattices,
Relations,
Ordering
there
granted,
domain, of
integers
for
where
science,
is another
the ordering
domain of character
is the
strings.
Definition4.4.4.
called
any finite
2 be
Let
is a
string
set. A finite
over 2.
of zero
sequence
or
In this context,2 is
an
The length of a string w is denoted
alphabet.
by | w |. The
of length 0 is denotedby A and called the null string. The set of
of length k is denoted by 2\\ That
is,
strings
string
all
2\302\260
{A}, and
2*+1 -
[wa
G 2*
and a
G 2} for
k >
0.
(^J
2*,
denoting
the set
\\^J
2*,
denoting
the set
of all nonnull
2*
\302\253
2+
2.
strings over
2.
k>0
Thus,
strings
for every
w
and
2*, | w |
y. If w =
wx...
= k.
wn
(Here
and
y =
denotes
wy
yx
...
ym, wy =
wx
...
2* includes
.,X,Y,Z],
letters
and,
of
catenation
the
wnyx
...
all the
in particular
28
is
are many applications where an ordering relationon strings
or lexicographic
One ordering, commonly called \"dictionary\"
in dictionaries
and
is used to assist in searchingfor words
ordering,
total
a
indices of books. This orderingis defined
extending
given
by
ordering <A on the alphabet A to a total ordering<L on A* as follows: Let
x and y be any two strings
in A*. Without loss of generality, suppose
<
of x and y; that is, the
x
Let
be
the
| | \\y |.
7
longest common prefix
=
=
w and z in A*. There
for
some
such
x
and
that
yz y
longeststring
yw
There
needed.
374
Chapter
and Digraphs
4: Relations
are three
cases,exactly
one
(x and y
are identical);
1.
= z
2.
= A
(x
3.
u;
# 6,a,6 G A,
The
= A
and z # A
= 6/3, a
aa,z
1. x
<Lyandy
2. x <Ly and y
3. if a
<A
<4 on A,
the
x and y
and
\302\243E
A*.
\302\243
a,
is definedin eachcaseas
follows:
x;
x <L y
4.4.1.
A and
alphabet
<L defined by
ordering
lexicographic
y <Lx.
any total
extending
<A
ordering
is a
total
on A*.
ordering
showing
Theproof
that
that
prefix of y); or
proper
<Lx;
^L
b then
Theorem
is a
between
relationship
must hold:
of which
anyone
enjoys
<L
The
three
cases in the
proof will
is transitive.
the relation
that
of the
examination
antisymmetric.
is transitive
this kind
We
wish
to prove that xx <L x2
the definition of <L,which has threecases.
and x2 <l *3 implies xx <L x3. There are three ways that xx <L x2 can come
about and three ways that x2 <l *3 can come about. Therearethus nine
which we can label by pairs (ij), where
(i) is the case by which
cases,
x2 <L x3. In order not to miss any
xx
<L x2 and
(j) is the case by which
to this system. To keep
we label the sections of the proof according
cases,
the proof short, we combinecaseswhenever
possible.
Case
x2 in
for
Case 2. (2,1),
(3,1).
In
xx <L x2 we again
Case
x2 in
for
definition
obtain xx
then
xx
gives
xx
x3, which
cases
these
<L
is what
x2 =
x2. By
substituting
xx
we want to prove.
x3. By substituting x3
for
x2 in
x3.
In all thesecasesxx
<L
=
=
xxzx and
x3 =
xxzxz2,
which
x2z2.Bysubstituting xxzx
satisfies case 2 of the
=
case
ybft, and a <A b. There
x2 = xxz = ya a, x3
subcases, depending on whethera falls in xx or in z. If a falls in xl9
is divided into xx = yah for some 5, and so case3ofthe definition
<L xz. If a falls in z, then a^ is a prefix of xs and X!<L x3 by case 2 of
Section
4.4
Case
5. (3,2).
Since x3 = yb/3z it
In this casexx =
followsthat x{<L
Case 6. (3,3).In
case
this
Lattices,
Relations,
Ordering
70a,
x3 by
7i6ij8i
72a2\302\2532>*3
ax < &!,
If a2
<L
xY
case 3.
x3 by
xx <L x3 by
that xx
We
If a2
then
falls in
in bu
falls
case 3. Finally,
if a2
7X
f}u
*)2a2a3
on
for some
= a2 <A
72, ax <A bx
then
x3
- 7ibij83 for
72&2#2>
whether
a2
a3, and
so
b2, and
so
someft, so
x3, again
covered
<L
have
string yu then xx
of the
as part
occurs
375
Enumerations
- 7ia1a1,x2 -
xx
and
*2 ^l *3 implies xx
\342\226\241
proof.
the lexicographic
ordering <L is a total ordering of A*, it is
B = {akb \\ k > 0},
a well ordering. To see this,just consider
the
set
B has no minimal element with respect to <L,
which is a subset of {a,b}*.
Although
not
since
aab
<L
ab,
aaab
<L aab,
.,a*+16<L
a*b,
This
is
A,a,b,aa,ab,ba9bb,aaa9aab,aba,abb,baa,....
on A* (defined
Theorem 4.4.2. Enumeration ordering<\302\243
above) is a
well ordering on A* if <A is a total ordering on A. Moreover, for each
such that wt <E w.
elements
w G A*, there are only
^GA*
many
finitely
(This is
Proof.
Exercises
for
Section
1. (a)
the
definition
ANIMAL,
BAND,
the
reader.)
4.4.1
Arrange
the
left as an exercisefor
CAN,
following
of
strings
lexicographic
AND, AN,
BAN,
CAR
into ascending
ordering:
ANIMATION,
order accordingto
376
Chapter 4: Relations
(b)
and
Digraphs
Arrange
alphabetic
2. (a) SupposeA
List
(d)
List all
\342\200\242
B =
{6,c}*.
\342\200\242
is the
defined
and
for x and
of values
pairs
cases
the
Hint:The
on that of
subset S
the
of
2*
and
a minimal
has
string(s)
ordering
finite n-tuples of
.,wn) | wt G
2*
shortest
enumeration
set of
{(wuw2y..
and
\"REDONE\"
modeled
of
on the
ordering
lexicographic
x and y,
y.
\"RED\"
- \"REDONE\"
of
nonempty
every
of
= \"REDONE\"
y
be
can
proof
that
(further)
y, classifyx and y
x and
y =
= \"REDUCE\",
(d) x - \"RED\",
4. Prove Theorem 4.4.2.
on
operation
by
ordering.
Akt>
AandbGB}.
{a6|aG
according
well
{a,b,c}3
jc
to
usual
elements of {a,6}3.
of
(c) Listallthe elements
(c)
How many
n elements.
has
all the
(b)
3. For
to
definition
the
element,
in S.
on strings
to definea
strings,
n > l}.
1.
(a)
AN,
AND,
ANIMAL,
AND,
BAN,
ANIMATION,
CAR
(b)
AN,
CAN, CAR,
BAND, ANIMAL,
ANIMATION
2.
(a)
nk
(b) aaa,
(c) bbb,bbc,bcb,
(d) aac, abc, bac,bbc
bcc,
5.
Define
(wl9..
,,wn)
ebb,
< (xu..
1<k
wk *
xk.
all
cbc,
ccb, ccc
1 < i
exists
xk
and
Section 4.4
Relations,
Ordering
There
programming
Computer
of functions.
definitions
functions
we need
of programming
properties
number of characters,say A.
Every legal program is a string of a finite
2.
assume we are
Let us
these
two
N
{h:N\342\200\224*
f:N\342\200\224+
0 if g(i)
question
languages:
of
an
alphabet
with a finite
in A*.
length,
given
with the
definitions.Thereforelet us define
gives a function for each string in A *.
legal function
are not
are
eachprogram
in
string
a function
computes
there
this
a programming
that satisfies
language
A*
of A*
let g: N \342\200\224>
be the enumeration
4.4.3 and in Theorem 4.4.2. Every programin this
A*. We would like to associate
that
Definition
after
discussed
algorithmic
and
properties,
languageisa
A*
programminglanguagemakesuse
1. Each
Functions
Noncomputable
that cannot
only a few
Are
377
and Enumerations
Lattices,
\\
that
is not a syntactically
legalprogram,
when
but
legal
executed
program,
with
input
in
a function
Let
f(i){x)
is a syntactically
program outputs a
or if g(i)
x this
or
one
is not a nonnegative integer, outputs morethan
value,
value
be
the integer
does not terminate. Otherwise, let f(i)(x)
output by program g(i) on input x.
N be defined
if d were
that
Letd:N \342\200\224>
by d(x) = f(x)(x) + 1.Observe
would
computed by any program g(i) then
equal d(i), but that
f(i)(i)
would contradict the definition
of d. This
completes the proof of the
value
that
simply
following
theorem.
mathematically
For any
4.4.3.
Theorem
function
definable
program that
may
be
defined
argument
and
is due
programming languagethere is a
N that
d: N \342\200\224\342\226\272
cannot
in the language.
the
to Cantor,
be computed by any
It is
not
numbers.
and hence that there are irrational
countable,
in
of d pairs
functions with
called diagonal because the definition
inputs
the way they would be encounteredif one were to lay all the possible
in a square matrix and to run down
the
functions
and
diagonal.
inputs
tool in
an important
are
This is illustrated in Figure 4-13. Suchproofs
problems
computability theory and canbeusedto show that a nijmber^f
of practical interest have no computable
Several more
solution.
are
a proof
that there are undefinable functions,
applications, including
in the exercises.
suggested
are
378
Chapter
4: Relations
and Digraphs
/(0)(0)
/(1)(D
/(2)(2)
f(i)(i)
Figure 4-13.
Exercises
construction.
diagonal
4.4.2
for Section
1. Considerthe programming
language
of Defense).
the U.S. Department
supposeg(i) =
is
\"functionh(x:
wherei is somespecific
integer)
the
(a registered trademark of
proof of Tl^orem 4.4.3,
x +
return
begin
integer.
This
value of
is the
What
definition.
Ada
In
string
/(i)(x)?
is
1; end h;\",
a legal Ada function
What
is
the
of
value
d(0?
2. Supposeg(j) =
\"functionh(x:
integer)
is
begin
loop
null;
end loop;
end
h;\"9
is a
computation
that
infinite
legal Ada
loops
series
forever,
10_1d0
di < 9.
4- 10\"2dx +
... + 10\"i-1d;
+ ...,
be enumerated.
that
the
functions
where
/: N
<
\342\200\224\302\273
N
Section 4.5
379
on Relations
Operations
6. Suppose
1.
- x
f(i)(x)
d(i) and
expansion
number
is an enumeration
of the realnumbersbetween
/: N \342\200\224\342\226\272
[0,1]
1. Let
denote the ith digit in the decimal
fraction
dig(x,i)
of x, as described in the hint. Definez to be the real
defined
the ith digit of z be (dig(f(i), i) + 2) mod
by letting
10. That
is z = dig(f(0),0)
4- 1)
((dig(f(i),i)
number would
would have
4.5
be
10) +
mod
10
. dig(f(l),l)
existence
since if /
a contradiction,
\342\200\242
\342\200\242
\342\200\242
10'
+
(i) = z for
\342\200\242
a real
of such
\342\200\242
\342\200\242
\342\200\242
The
i, we
some
RELATIONS
ON
OPERATIONS
+ 1
\302\243
+ 2
4. Suppose
Section4.4.2
one is
When
as being
relation
\342\200\242
\342\200\242
\342\200\242
x
An. Thenflx
need
(Ax
definitions.
further
for
\342\200\242
\342\200\242
\342\200\242
x
An)
Rx
Suppose
complement
union
RY U R2 is
\342\200\242
\342\200\242 The
xA\342\200\236.
Rv Suppose further that R2 C^xa relation, as are the intersection Rx D R2 and the difference
Example
relations
<,
<,
4.5.1.
The relationships betweenthe usual
=
in terms
and
on the integers can bedescribed
union
minus
of
relation
the
Rx
of
is the
relations
=; the
also
Rx
ordering
of union and
< and =; the
relation =
is the
minus
the
Another operation, called projection, is derived from
a lower
dimensioned
with the same name. It produces
from one of higher dimension.
concept
geometric
relation
380
Chapter
and Digraphs
4: Relations
The
of R
projection
. .,xk) |
{(xlv
If R
(a,c),
some
projectionof
(i.e.,
relational modelsfor
of
intersection,
application the union,
Work on
G
.,a\342\200\236)
R).
componentsis the
relation
fc-ary
(alv
R.
relation
the
is
(b,a,c)> (b,c,c),
respect
,,sk is the
(aSi,...,asJfor
{a9b9cf
relation and
componentpositions1,...,nof
to sl9..
respect
an rc-ary
An be
\342\200\242
\342\200\242
\342\200\242
x
of the
.9xk) =
(a,a,c)>
(b,b,c),
(a,b,c),
with
(xu..
4.5.2.
Example
Ax x
a subsequence
be
.,sk
sXfs29..
Let R
4.5.1
Definition
let
the set)
computer
relation
binary
with
{(a,a),
first
to the
respect
{a,fcj.
database
complement
has
systems
and projection
led to
operations
as
relations,
the relational
rc-ary
to
Definition4.5.2.
jB2 x
join
\342\200\242
\342\200\242
\342\200\242
x
x An and R2 C Bx
x
Let
Rx C Ax x A2
=
i
be
and
for
some
and
The
relations
Bm
j.
suppose At
B;
to component i ofRx and component
respect
R2 with
\342\200\242
\342\200\242
\342\200\242
x
and
ofRi
j of R2 is
the relation
{(al9...,an,bl9..
\\ (alv
.9bm)
. .,an)
G Rl9 (bl9..
R2 with
R2 is the
(c9a9y)9
(b9a)}
to the first
componentof Rx
and
the
at
- &,}.
the joinofRx
second
component
with
ordering
C SUPPLIER-NUMBERS
C PART-NUMBERS
ORDERS C SUPPLIER-NUMBERS
(b9a9a9b9x)).
A manufacturer
4.5.4.
Example
concerned
SUPPLIERS
and
relation
(a9c9a9a9x)9
{(a9b9c9a9y)9(a9b9a9a9x)9(a9c9c9a9y)9
PARTS
J?2,
x SUPPLIER-NAMES
x STATUS-CODES
x COLORS x WEIGHTS
x PART-NUMBERS
x QUANTITIES
PART-NAMES
C {a9b9c}2andR2
(a9a9x)9
respect
(a9c)9
.9bm) G
ADDRESSES
and
of
Section 4.5
Operationson
381
Relations
number
identification
The
weight.
but it
application,
the relational
be
will
suppliers
utility
of
some
of
operations.
the
to demonstrate
adequate
status
from which
in knowing
interested
is
3 he
code
number
k, and
how
s is oneof these
is
and
the
of
on
suppliers
q
quantity
parts outstanding order could be
obtained
from the relations SUPPLIERS and ORDERS
of a
by means
series of projectionsand joins.
Since{k} is a unary relation on the domainPART-NUMBERS,
we can
take the join of ORDERSand {k}with
to
PART-NUMBERS,
respect
of Rl are all the
obtaining a relation which we shall callRl. The members
such
in
that
is
a
ORDERS.
To
(x,k,z)
quadruples (x,k,z,k)
triple
eliminate undesired
we
take
with
the
of
Rl
to
information,
respect
projection
in SUPPLIERthe first and third components,yielding
a binary
relation
call R2. R2 consists of all
we shall
NUMBERS x QUANTITIESwhich
a
s
is
the
number
of
such
that
supplier of the part with number
pairs (syq)
since
k and q is the quantity of the part outstanding on order.Similarly,
the
can
take
we
on
the
domain
is
a
relation
STATUS-CODES,
{3}
unary
to
SUPPLIERS
with
of
and
{3}
STATUS-CODES,
calling
respect
join
that
such
the result RS. R3 consistsof all the quintuples
(x,;y,3,z,3)
many parts each has yet
(x,y,3,z)
to
respect
with
Pairs
deliver.
is in SUPPLIERS. Again,
the first component we
taking
obtain R4,
the
the
of R3 with
projection
of all
set of numbers
3. Relations
R2 and R4 share
R4
R2
and
that
can take the
so
we
SUPPLIER-NUMBER,
elements
of
The
a
i?5.
to
this
new
relation
domain,obtaining
respect
suppliers with
domain
to
component
joinof
code
status
number
k with
status
Definition 4.5.3.
by
R~l9
is the
relation
Suppose
C A
R}.
{(yfx) | (x,y) \302\243
x B.
382
Chapter
4: Relations
and
Digraphs
R~
Figure 4-14.
and
relation
its inverse.
of the relation
(x,z)}.
(y,z),
These
(y,z),
{(x,y),
relations are
of the inverse
that
the digraph
shown as digraphs in Figure4-14.Notice
of the digraph of the originalrelation,
of a relation has exactly
the
edges
directions
of the edges are reversed.
but
the
Example 4.5.6.
As
another
also
that
the
is symmetric.
is itself.
Observe
relation
integers
4.5.4.
Definition
of Rx
composition
(x,y) G Rl
and
4.5.7.
Example
(a,6),
(y,z)
Suppose
Rt
then
of relations
(RS)T
= R(S
and R2 C
x B
by Ri
The composition
Rx
(cfc)f(cfd)}.Theserelationsareshown
Composition
ordering
relation >.
relations,
is the
relation
of this
inverse
the usual,
consider
example,
\342\200\242
is
R2
\342\200\242
of
R2
the
the relations
Figure
is associative,that
i?x
{(x,z)\\
{(a,a)> (a,c),
is thejrelation
in
B x C. The
relation
is,
if
R, S,
and T
T).
\342\200\242o
c \342\200\242
R,
Figure
(a,d),
4-15.
^\342\200\2426
/?\342\226\240
{(a,a),
Ri -R2
relations.
are
Section
4.5
Operations
notation
is, Rl =
The
That
Rk+l
and
constructionleadsto
another
important
that
Observe
closure.
transitive
the
383
Relations
for the
= Rk .
used
is
Rk
Ry
on
Rk+n
operation
- Rk Rn.
on binary
relations\342\200\224
i? =
The
another
As
\"is
a parent
relation
\"is
a grandparent
transitive closure,considerthe
of this relationwith itself is the
and the transitive closureofthis relationis
smallest
R+ is the
4.5.1.
Theorem
of,\"
of.\"
ancestor
an
\"is
is
of composition
and
of.\" The composition
example
relation
therelation
{(a,b),
This
(c,d)}.
relation
containing
that
is
transitive.
First we
Proof.
y R
x Ri+jz,
Now
and sox R+
fe >
every
Q is
and
so i?+
xRly
is transitive.
xR
Suppose
and y RJ z for
C Q. D
Suppose
Q. Thus, by
some
Rk C
ij
> 1.
y and
Thus
Q. Then, since
Rk C Q for
on k,
induction
closure of
reflexive
it and is both
contains
that
relation
is transitive.
Rk+1 C
transitive
the
Similarly,
smallest
Theseare
U **i Rk>
Q and Q
transitive,
1, and
z.
R C
suppose
RQQ
since
z. Then,
that
show
shall
the
Forexample,
whole realm of possibleclosures.
also
says that iiR includesa pair (x,y) then R must
include
(y,x). The symmetric closureofa relationR is thus the set R U
R. In general,
R _1,which is the smallest
relation
that
includes
symmetric
if P is a property
such that P can be madetrue for any set by adding
only
of a
two
property
symmetry
abed
#
\302\273\302\273#
^#
\302\273\302\273t
#
>
R+
Figure
4-16.
relation
and
its transitive
closure.
384
Chapter
and Digraphs
4: Relations
of
the P-closure
P a
call
can
the smallest
to be
set
P.
property
Note
Exercises
2+, the
that
another
example
to
element
of 2+.
of such
1.
(b)
Draw
a digraph
a digraph
(c)
Draw
a digraph
(d)
Draw
(a)
Draw
R =
relation
the
Consider
digraph
of
inverse
R,RClR-1.
for the relation
2. Answer the questions asked in exercise
(1)
Q {(a,b),(b,c),(b,d),(d,d),(c,c),(a,c)}.
3. With R and Q defined in exercises 1 and 2, determinethe
a digraph. What is the differenceof R
R \342\200\242
Q. Draw
composition
Draw
a
and
Q, i?-Q?
digraph. Give a set of n-tuplesfor the join ofR
to the first component of R and
the second
and Q with
respect
of
component
Q.
= {(x,x9z)
z
4. Let P = {(x,y,x \342\200\242
\\ x and
y) | x and y are intergers} and Q
are integers}.
(a)
D Q?
is P
What
(b) What is
the projectionof P
Q with
P)
third components?
(d)
(e)
What
(c)
{3,5}
Let
T.
componentofR. Describe
is the
projection
of T
and
y are
with
{7} with
with
to the
respect
respect
respect
the
to
the
to
respect
first and
to the
first
second
third
component?
5.
Let
P =
and
(a)
What
is P
(b)
What
is
{(x>y,x \342\200\242
y) \\x
are integers}.
integers} and,
S = }(x,y,x+ y)
\\x
H S?
the
join
of P
and S
with
respect
to
the
third
the
third
component of each?
(c)
is
What
the
projection
of this
= y
\342\200\242
z for
some
R~l?
Is R
join,
with
respect
to
component?
6. Let R
positive
{(x,y)
\\ x
z greater
integers}.
(a) What
is R
symmetric? Reflexive?
are
Section4.5
(b) Prove
that RD
(c)
is
What
the
of R
projection
is the
\342\200\242
R. What
385
on Relations
Operations
with
the
to
respect
first
component?
7.
the transitive
Give
symmetric
the
and
closure,
of the
each
relations:
following
(a)
8.
is an
x RyiSx
(b) x R y
x =
{2,3,4,5,6}.
y +
of the
closures
the
Give
iff
set {l}with
to each
respect
of the
following
properties:
(a) If
element
of S then x + 1is an element
of S.
is an elementof S then x + 1 and -x are elementsof S.
If x is an element of S thenx + 2is an element
of S.
(c)
x \342\200\242
2 is an element
of S.
(d) If x is an elementof S then
9. Answer
the
same
as in (8) for the set {0}.
questions
10.Prove composition
of relations
is associative. That is if R, S, T are
T = R \342\200\242
relations on A, then (R . S) \342\200\242
(S \342\200\242
T).
11. Prove by mathematical
induction that if R is a relation on A, then
is an
(b) If x
(a)
(b)
12.
Rm -Rn
(Rm)n =
an
Give
Rk+1
13. (a)
Rm+n
Rmn
of a
example
\342\200\242
*
i?\"1
relation i? and a
fc
positive
that
such
/?*.
is
relation
symmetric
symmetric.
(b) Is
relation
antisymmetric
always
antisymmetric?
and
that the transitive closureofa reflexive
symmetric
is an equivalence relation.
and
R2 be arbitrary
binary relations on a set A. Prove
the following assertions.
(c) Show
relation
14. Let
Rx
disprove
(a) If Ri
(b)
(c)
(d)
(e)
and
R2 are
If Ri and R2
If/?x and R2
If/?x and R2
If i?x and R2
reflexive,
are
irreflexive,
are
symmetric,
are
antisymmetric,
are transitive,
then
then
15. Let R
\342\200\242
is
R2
/?x
then
then
reflexive.
irreflexive.
i?x
\342\200\242
is
i?x
then
\342\200\242
is
i?x
R2
symmetric.
antisymmetric.
\342\200\242
i?2 is transitive.
R2
J?x
A where
U ?-i
\342\200\242
is
R2
has
#2.
Prove
n elements.
J?1.
relation on a
Prove:
or
set A,
then
for
each
386
Chapter 4: Relations
and
Digraphs
S aie relationson
that R and
18. Suppose
is
19. Suppose
a set
Q S
A, where R
and S
positive integer n.
S are symmetric relations on a set A. Prove:
R and
that
then (y,x) G R . S.
(a) If (x,y) GS.fi,
\342\200\242
\342\200\242
. S - S . /?.
(b) If i? S C S
/?, then/?
.
S is symmetric
iff i? S - S \342\200\242
/?.
i? \342\200\242
(c)
for each positive integer n.
(d) Jf?\" J j symmetric
20. SupposeR and S are relations on a set A. Prove or disprove:
S.
so is R \342\200\242
then
(a) If R and S are reflexive,
and
S is
then R \342\200\242
(b) If R and S are both reflexive
symmetric,
\342\200\242
\342\200\242
=
reflexive
and symmetric iff/? S
S /?.
S is transitive
iff
/? \342\200\242
S =
(c) If R and S are transitive, then R \342\200\242
Rn
that
Prove
transitive.
S
\302\243
each
for
s./?.
(d) If
S are
and
relations on
equivalence
21.
then
A,
S
equivalence relation iff/?
A.
S
a
R
and
are
on
set
relations
Suppose
.
.
S~l
Z?\"1.
Prove
that
(a)
(/? S)\"1
- Z?\"1 U S\"1?
(b) Is it true that (/? U S)\"1
O
R1 C\\ S\"1?
Is
is
true
that
S)\"1
(c)
(R
on
If
R
is
an
relation
(d)
A, is it true that
equivalence
\342\200\242
S =
equivalencerelation
on
an
R'1 is an
A?
of relations
in
satisfies any of the six properties
defined
R'1
or
determine
whether
not
satisfies
same
the
4.2,
If R
(e)
\342\200\242
S is
\342\200\242
/?.
Section
properties.
22.
R C
that
Suppose
(f)
relation
on a set A.
that R is a reflexive
J?-1
is reflexive
and symmetric.
(a) Showthat R \342\200\242
is transitive.
R'1
(b) Proveor disproveR \342\200\242
closure
(c) Prove or disprove that the transitive
Assume
(a)
U
(T H
\342\200\242
(b)
i?
\342\200\242
(c)
Ifi?CS,then/?.
(T
(d) If
V
25. If
is
i? and
Let
Rn
Pi
Sn for
WO
WO
from
B and
A to
(R
\342\200\242
U
(R .
(R
\342\200\242
O
(/?
\342\200\242
is
i?\"1
an
T)
T)
let T and W
be
relations
WO
\342\200\242
W)
TCS-T.
relation
\342\200\242
i? C
relation.
equivalence
24.
S. Showthat i?\"1\302\243
S~\\
from
D to
A,
and
if
/? C
S, prove that
\342\200\242
S.
S be relationson a
each integer n > 1.
set
A. Prove
that (R D
S)n C
S are equivalence
relations on a set A, prove
that
both
R and S.
is an equivalence relation containing
on A such that
relation
Moreover, if T is any
equivalence
U SC
T.
R
U
that
S)+ C
(R
T, prove
i?
and
(i? U S)+
Section 4.5
27.
28.
Prove
29.If
A,
Z\\d
of
on
a set
A.
on
defined
integers
= 3c}, find
J? .
by aRb
iff
relation
on
S.
if R is a reflexive
and
transitive
each positiveintegern.
relation defined on a set A, then
R for
a symmetric
is
i?
Rn =
then
order (totalorder)
that
induction
by
a set
set
387
on Relations
Operations
R U
J?2 is
symmetric.
of R if
closure
(a) R =
{(a,6),(6,c),(c,d),(d,e)}
(c)
{(a,b),(b,c),(c,d),(d,e),(e,a)}
(b) * = {(a,a),(a,6),(6,c),(6,d),(d,c),(d,d)}
(d)
# =
{(a,6),(a,c),(c,c),(c,d),(d,c),(c,e),(e,/),(/,d)}
1.
(d)
(b)
a*
<\342\200\242>
4.
(a)
{(x,x,x2) | x is
(b)
{(x,x2)
(c) j(3,y,3
an integer}
an integer}
\342\200\242
|y is an integer}
y,3)
x is
U {(5,y,5\342\200\242
y,5)
|y
is an
integer}
(d) {(3,7,21,3,7),
(5,7,35,5,7)}
(e) {21,35}
6.
(a)
The
is empty.
intersection
nor is it
(b) If x = y
greater
transitive
The relation
is
not
symmetric,
reflexive,
\342\200\242
a and
than
one,
closure,
y =
\342\200\242
b then
then
so is b
since
it is
x =
\342\200\242
a. The
\342\200\242
.
(b
a).
relation
already transitive.
If a
and 6
J? is
its
are
own
Chapter
and Digraphs
4: Relations
projection of R
(c) The
with
setof integers> 2.
8.
the
(a)
the integers
PATHS
the
integers
positive
(b) all
component is
to the first
respect
integers
positive
the integer
powers of two
CLOSURES
AND
Many
of
questions
vertices
Two
connectivity.
is a
there
if
path that
goes
from
Definition4.6.1.
directed
in a
path
in
each
this
case,
path
v0 and
in G
vn
are
Vi_i)
with
the endpoints
may
v0
of the
path. A
nondirected
.,en in E
eu..
for which
or et = (vi9
v0,.. .,vn such that et = (i\\_i,i>i)
if all edges and verticeson the
is simple
for each 1 < i < n. A path
are
distinct,
except that v0 and vn may be equal. A path of length s* 1
is a circuit.
A
no repeated
edges and whose endpointsare equal
there is a sequenceof
path
called
digraph A = (V,E) is a
that for each 2 < i < n,
be written
as (i>;_i,vt) for
to vn9 and its length is n. In
E such
simple circuit
Note
directed
that
vertices
is calleda cycle.
the
definitions
and nondirected
of simple,
paths. It is alsoimportant
to
apply
notice
equally
that
to
a path
Paths and
Section 4.6
or nondirected,
as directed
the context,
from
inferred
be
is not
it
.,en is
el9..
path
e/s is to or from
kind of
There
are
two
paths from
directed
simple
(c,d). In
(6,d).
a number
are severalmore
to
addition
et
a to d. They
the simple
from a
paths
all
nondirected
simple
of the
path,
= (y9x)y
The digraph
of the
more)
(or
x and
4.6.1.
Example
each
the
qualified
or doesnot matter.
389
Closures
then
some
are
(a,6),
of
(6,c),
There
Theorem 4.6.1. If
En
iff
of
definition
path
since
x toy,
the theoremis
(if)
Suppose
(iV\302\273-i)
true
\302\243
#> so
(y\302\273-i\302\273y\302\273)
(V,E)
is a
digraph, then
x to
for
> 1,
(x9y) G
y in A.
1, En - E. The
is a path of length 1
that (x,y) G E iff there
guarantees
1is
a path of length
of A. For n > 1, we assume
an
edge
\342\200\224
n
for
break the proof into two parts:
1, and
(vq^x),.
\302\243
#n-1>
The proof is
Proof.
from
directed
is a
there
of nontrivial
by
that
Figure
by
on
induction
n. For
directed path
. .,(yn_i,yn)
is a
induction.
By definition
(u0, vn) G
4-17.
n =
from
\302\243n-
\302\243n.
A directed
graph
with
paths.
un. Then
v0 to
En~l
and
\302\243,
390
that
such
vn_x
(v0,vn) G
Suppose
if)
(only
some
Digraphs
En. Then,sinceEn
(v0,vn_l)
L>0
to
desired.
E,
exists
there
the inductive
of length n - 1
2?. By
,(yn-2>yn-i)
(y0^i),...
to this
(yn_i,yn)
!>\342\200\236_!.
Adding
= En~l
(un_i,u\342\200\236)G
and
2?n_1
path of lengthn
\342\226\241
of transitivity.
are also related to the property
and composition
= (VJE) is a digraph then E istransitive
iff every
directed
path in A
has
a \"short-cut.\"
That is, if there is a nontrivial
directed
from a
path
from x to y. This
vertex x to a vertex y there must alsobean edge directly
Paths
If A
reasoningleadsto
3/ in
V,
corollary.
4.6.1.
If A
Or ,3/) G
\302\243iff
Corollary
x and
in A.
useful
is a
(V,2?)
there
is a
of
the
Proof. This is a consequence
previous
directed path from x to y in A of some length n
G 2?+.
that
(x,y)
n >
1, and
Conversely,
so the previous
path of lengthn
from
to
(6,c),(c,d),(c,e),(d,e)}.
different
, then
guarantees
Or,3/)
is a
so
\302\243n,
y.
Let
We
E, 2?
(xyy)
theorem
jc
4.6.2.
Example
if
x to
If there
theorem.
> 1, then
vertices
compute
{a,6,c,d,e}
the
and
transitive
let R = {(a,a),(a,6),
closure of R in two
ways.
1. First,
Method
only compute
composition,
for
Rk,
we need
U*;>i#*
By
of
definition
we get
R2 =
i?3
i?4 =
{(a,a),(a,6),(a,c),(6,e),(6,d),(c,e)}
{(a,a),(a,6),(a,c),(a,d),(a,e),(6,e)}
{(a,a),(a,6),(a,c),(a,d),(a,e)}
i?5 = {(a,a),(a,6),(a,c),(a,d),(a,e)}
Notice
that
Then
R+
R+
-
R5 so it
the union
will
follow
of these
that
R4 =
i?5 = R6
= #*
for all
graph
vertex.
of
fe
>
4.
sets, so that
{(a,a),(a,6),(a,c),(a,d),(a,e),(6,c),(6,d),(6,e),(c,(i),(c,e),W,e)}
Method
compute
jR4 =
is just
the
each
Ry
Then,
and
for
a
is a path of length 3 from
there
example, we know (a,d) G R+ because
R+
to d, namely,
G
because
the path (a,6),(6,c),(c,d).Similarly,
(a,b)
there is a path of length1 and length
2 from a to b. Likewise,(a,e)E:R+
Section
becausethereisa path
of
a to
3 from
length
391
Closures
Paths and
4.6
as
well).
and finally
(a,6),
along
is a relation on a set of n
if R
general,
reasoning in the
above
example
shortened to a path of
R+ = R
Based
meant
U R2
at
length
if R is
Rn,
a relation
digraphs that we
4.6.2.
Definition
connected
if
is
there
strongly
directed path
from
n elements.
vertices
in a
connected
strongly)
is
what
exactly
of connectivity
a nondirected
path between them.
if there is a directed path between
to x.
of
pair
in general,
Therefore,
on a set with
are
They
them.
connected
connected
unilaterally
or
unilaterally,
that
now.
discuss
shall
the
extend
we can
vertices,
conclude
most
n.
relevant to
are
...
and
is
A
from
They
to y
x
or
and a
strongly)
or
unilaterally,
(weakly,
is a (weakly,
if it is a maximal (weakly,
component
subgraph; that is, there is no (weakly,
contains
connected subgraph of A that properly
connected
unilaterally,
or
unilaterally,
or strongly)
strongly)
A\\
4.6.3.
Example
edges,
{a,b,c}
and
either
between
in
Figure
all of the
4-18 illustrates
entire
is not
The
by
relations.
connectivity
incident
edges is unilaterally
since
there is no directed path
from
e to
d. The
connected,
strongly
and
connectedsubgraph is comprisedofvertices{e,f,g}
the
edges
{(g,e),
392
Chapter 4: Relations
and
Digraphs
c
\342\200\242
\342\200\242
4-18.
Figure
A graph
connectivities.
illustrating
are
weakly connected components,which
sets {a,b,c}and {d9e9f,g}.
of
There
are a number
unilaterally connected components.Two of them are the subgraphs
(e,f)y
This
(/>#)}\342\200\242
graph
has two
vertex
with
subgraphs
The strongly
({a,b},{(a,6)}),and ({6,c},
{(c,6)}).
vertices a, 6, c, and d, and
connected
the individual
Note that
qualification
Exercises
it will
term
\"connected\"
when
the
mean
weakly connected.
the
are
components
({e,f,g}, {(e,/),
subgraph
is used without
further
Consider
digraph
in Figure
4-16.
a to d.
from
(a) Find all of the simpledirected
paths
a to d.
from
(b) Find all of the simplenondirected
paths
that
start
at d.
(c) Find all of the directedcycles
(d) Find all of the nondirectedcyclesthat start at d.
Consider the digraph in Figure 4-17.
Find
all the weakly connected components.
(a)
connected
(b) Findallthe unilaterally
components.
Find all the stronglyconnectedcomponents.
Draw
a digraph
connected
with 5 vertices that has 4 strongly
2
and
3
connected
components,
components,
unilaterally
weakly
(c)
connected
exactly.
components,
Draw a
digraph
with
4 vertices
and one
strongly connected
component.
Draw
has
a digraph
3,
length
directed
with 5 vertices whoselongestsimple
has
whose longest simple undirectedpath
whose
What
digraph
is the
longest
length possible
with n vertices?
length 2,
and
path
whose
cycle?
5,
length
longest
in
Section
Paths
4.6
(a) Cis
(b)
an
of
the
digraph suchthat
classes of
an
of
the
C are
equivalence
equivalence
these vertices
between
Cy
iff
each weakly
connected
digraph.
the definition
8. Give
such that x
relation.
equivalence
the equivalence
components
a digraph
nondirected
is a
there
Con theverticesof
the relation
7. Define
393
Closures
and
on
relation
classes together
connected
the vertices of a
with
the
edges
components.
D on theverticesofa digraph
such
that x D y iff
directed path from x to y. Proveor disprove:
D is not an equivalence relation on the vertices
of a digraph.
(a)
D
is
iff
a
order
the
no
has
(b)
partial
cycles of length
digraph
the relation
9. Define
is a
there
10.
(x,y)
(a)
El
(b)
Let
is an
l
equivalence relation.
connected
is unilaterally
iff
A is
weakly
connected.
= (VfE)
Prove or disprove
be a digraph. Define A+ = (V,E+).
iff A is unilaterally
connected.
connected
that A+ is strongly
of En are equivalent:
12. Prove that the following
definitions
(a) El-EttndEn-En-l.Efoin>l;
(b) B1- EandEn= \302\243. E\"\"1 for n > 1.
13. Provethat the following definitions of E+ are equivalent:
11. Let A
(a)
E+
U7=iEl;
a simple
contains
path.
connected
16. Prove that a digraph G is unilaterally
directed path in G containingall theverticesof G.
17.
that
Prove
directed
(vl9v2)9:.
Selected
Answers
for
iff
there
is
is a closed
G is strongly connected iff there
a digraph
in G. (A path
vertex
(v0,Vi)9
path containing every
.,(un_!,u\342\200\236)is
Section
closed
4.6
1. (a) (a,6),(6,c),(c,d)
(a,c),(c,d)
if v0
un.)
394
Chapter
4: Relations
and Digraphs
(b) the
above,plus
(a,b),(dtb)
(a,c),(6,c),(d,6)
(e,a),(d,e)
(c) (d,6),(6,c),(c,d)
(d,e),(e,a),(a,c),(c,d)
(d,e),(e,a),(a,6),(6,c),(c,d)
(d)
the
plus
above,
(d,6),(a,6),(e,a),(d,e)
(d,6),(a,6),(a,c),(c,d)
(d,6),(6,c),(a,c),(e,a),(d,e)
(c,d),(6,c),(a,6),(e,a),(d,e)
(c,c0,(6,c),(d,6)
(c,d),(a,c),(e,a),(d,e)
(c,d),(a,c),(a,6),(d,6)
(d,e),(e,a),(a,6),(d,6)
(d,e),(e,a),(a,c),(6,c),(d,6)
2.
(a)
(b)
are
are two weakly connected components.They
a
nd
and
all
incident
vertices
with
{a,b,c}
edges,
subgraph
and
all
incident
vertices
with
edges.
{d,e,f,g}
subgraph
There
the
with
{d,e}
and
four
are
There
subgraph
6. Since only
the
five
for
except
vertex
last
greater than n.
with
iff
there
is a
w to
vertices
{d,e,f,g}
They
are:
);({e,/,^},{(e,/),(/^),(^,e)}.
not
have
length
a simple
path.
and there is
path from v to w
course it needs to be verified
directed
v. Of
They are
subgraph
vertices
components.
the
in the
n vertices
E w
0 );({<*}, 0
the
subgraph
connected
strongly
0);({c|,
starting
eachedge
8. Define v
{a,b} and
and
only
vertices
{b,c\\ and
vertices
connected components.
edge {(a,6)},the
the
{(c,6)},
subgraph with
edge
unilaterally
with
the
that
this
Section
Directed Graphsand
4.7
395
Matrices
Adjacency
classes
are the
equivalence relation, and that the equivalence
connected
components.
strongly
En as defined in (a), and let E(byn)
denote
En as
12. Let E(a,n)
denote
defined in (6). We wish to prove that E(a,n) = E(b,n)for all n > 0.
on n. For n = 1, we know that E(a,n) =
The proof is by induction
=
\302\243
n
E = E(b,n).Forn = 2, we know that E(ayn) = E \342\200\242
\302\243(6,n). For
- 1). E(a,n) =
> 2, let us assume that E(a,n - 1) = E(bfn
is an
E, and,
E(a,n - 1) \342\200\242
= 2?(6,n
E(a,n)
- 1)
E(6,n
\342\200\242
\302\243(a,n
4.7
E -
\342\200\242
\302\243
2)
E(b,n
1,
since
we have
- 1)
induction,
AND
GRAPHS
DIRECTED
\342\200\242
=
\302\243
- 2),by
E(a,n
- 1) =
\302\243(a,n
by induction,
\342\200\242
E. We know that n - 1 >
- 2) . E. Thus,
\342\200\242
\302\243
E(b,n
- 1)
\302\243(a,n
and
- 1).Thus
so
=
E(a,n)
- 2) =
\302\243(fc,n
- 2) \342\200\242
\342\200\242
E = \302\243
E(a,n) = \302\243
E(b,n
= \302\243
1) = \302\243(6,n).
\302\243(6,n
MATRICES
ADJACENCY
related
to
seen that digraphs
and binary relations are closely
have
to another
other. They are both relatedjust as closely
important
review the
structure: matrices. We will now therefore
mathematical
definition of matrix, to seehow a matrix can represent a binary relation
and how this matrix representation
can be useful in extracting
We
each
information
about
a digraph.
be
An
integers.
of
rectangular
are
the second
4-19.
in
Matrices interesting
mathematical
However,
are
most
Column
Column 2
Column
Row
A(\\,l)
A(\\,2)
A(\\,n)
Row
-4(2,1)
-4(2,2)
A(2%n)
Row m
doubly
their
theory.
array
A(m,\\)
Figure
A(m,2)
4-19
...
A(m,
n)
396
Chapter 4: Relations
the
and
book. We are
present
special
Digraphs
between
by
J) =
by A(i
1 iff
in matrices
for one
or binary relations.
which are
matrices,
Boolean
is a natural one-to-onecorrespondence
and the square Boolean matrices,as
definition.
following
Let
Definition
4.7.2.
{vu.. .,vn}. The adjacency
defined
interested
of digraphs
consider
There
relations
binary
demonstrated the
presently only
representation
application\342\200\224the
E be any
relation
binary
matrix of E is the n
on a finite set V
n Boolean
matrix
matrix
every n x n Booleanmatrixis the adjacency
also
that
the interpretation
unique binary relation on V. Note
ordering
of the set V.
adjacency matricesdependson the presumed
by
the
The relation
matrix
4.7.1.
adjacency
G E.
(vhVj)
Note that
Example
of
of
l]
|\"l
1111
0 0 111
0
11
Lo o o o lj
Notice all
because< is
that
the
reflexive,
Example
adjacency
4.7.2.
diagonal
and
will
The digraph in
o o ol
0 0 10
0 0 0 11
110
I 0
relation.
matrix,
To
OJ
the
Section4.7
Directed
and Adjacency
Graphs
y2
Vi
\302\273.#
397
Matrices
v3
#
4-20
Figure
very
to use
convenient
when
relations
In the
takes
two
a binary
definition
following
arbitrary
for
scalar
is
chosen
for
it is
because
a similar
much
useful
operators
(The
on operators, that
an operator
we define
\302\251
and
extracting
relation.
and yields a
arguments
used for this operatorhere
\302\256
as
notation
the notation
operator.)
4.7.3. Let S be any set and let \302\251and \302\256be any two
Definition
\302\251is
that
binary operators defined on the elementsof S. Assume
is
of
denoted
\302\251
a
nd
The inner
associative.
\302\256,
by \302\251.\302\256,
product
=
B
D
that
such
n
x
A\302\256.\302\256
ri
over
for
matrices
defined
Shy
B(l,j))
D(i,j) = (A(i,l) \302\256
...
\302\251
\302\251
(A{i,n)
\302\256
B(n,j)).
By
For
any single
and B to
scalar operator
we
\302\251
will
also write
B
\302\251
for
matrices
that
E(i9j)-A(i,j)\302\256B(iJ).
and
inner
398
Chapter 4: Relations
and
Digraphs
{0,1}
Example
operators
0
1
1 0
1 1
0
1
Let
inner product A
the
\302\256
be
OR.AND
1 1 1
[l
\302\251
and
1
1
in Example
matrix
the
be
4.7.2. The
let
x AND y
x OR y
and
in Example
matrix
the matrix
ll
11111
110 11
110
[o
oj
The
4.7.4.
Definition
two
the
When
of OR and AND,
operations
particular
two
how
show
will
We
obtained.
operations
\302\251and
then
respectively,
the
\302\256are
we shall
refer to
theorem
following
between
relationship
an important computational
and these operations on Boolean
expresses
relations
binary
matrices.
Theorem 4.7.1.
{vu..
represented
.,uj,
\342\200\242and
RB,
relation
RnA.
Proof.
(vjtvk)
the
Here
RB be
and
binary relations on a
matrices
and
B respectively.
set
Then
OR.AND
matrix
Recallthat RA
RB for
RA
by adjacency
Let
some j}.
\342\200\242
=
RB
Thus
if
Rc where Rc - {(viyvk)\\
C is the adjacency
(vhVj)
G RA
matrix of Rc
and
then
Section
Directed
4.7
C(i,k) = 1 iff
same as saying
consequence
of
OR.AND
(A
OR
the
AND
(A(i,n)
is thus a
direct
Let
the
be
V = {vu. . .,vn}.
a set
on
399
is exactly
1. This
...
theorem
The
B)(iyj).
definitions.
the
4.7.1.
Corollary
relation R
= 1 and A(vjyvk)
=
AND B(1J)) OR
j, A(vhVj)
- (A(i,l)
C(ijk)
is
which
B(n,j),
some
for
Graphs
the
OR
by
given
of any binary
matrix of the
OR ... OR
(OR.AND)2A
matrix
adjacency
Then
adjacency
(OR.AND)M.
Corollary
relation
R*9
R2
where
\342\200\242
\342\200\242
\342\200\242
U Rn.
4.7.2.
Let
R. The adjacency
(/ OR
by
is given
/ is
follows from
This
Proof.
i?+ = R
the
fact
that
\342\226\241
be
the
matrix
OR
A OR
(OR.AND)2
...
OR
binary
closure of
reflexive
transitive
the
of any finite
matrix
adjacency
of
(OR.AND)\"
Ry
A),
1 0
0 1
Lo
Proof. Thisis
reader
the
to
left
...
as an
i.
exercise.
\342\226\241
Example
We
see
4.7.4.
4.6.2.
In
that
Aj-
0
0 0
0 0
0
0
0
11
1 1
0 1
0 0
1110
0 0 0
0 0 0
ASA%-
11
0 1
0 0 0
400
Chapter
and Digraphs
4: Relations
11111
0 0 0
0 0 0
0 0 0
0 0 0
11111
0 0 0 1
0 0 0 0 0
A3
AJ
- AR
0 0 0 0 0
0 0 0 0 0
0
0
0
0
0
0
0
0
we can compute
the separate matrices by appeal
to the
For instance,
the second
observing paths of different
lengths.
row of A% means that there is a path of length2 from b to d and one of
length 2 from b to e. The third row of AR reflects the fact that there is a
path of length 2 from c to e.
Now if V stands for the Boolean operation OR, then the adjacency
Of
course,
graph and
matrix
transitive
of the
closure R +
is:
11111
0 0 111
AR+
=ARVA2RVARVA4RVAR
11
0 0 0 0 1
0 0 0 0 0
and
and integer
use
of operations
other than \"AND\"
\"OR\",
information
from
it is possible to extract other useful
an
is the number of
matrix. Among
such
useful
information
adjacency
to another in a digraph,
distinct
of a given length from
one
vertex
paths
of the
the lengthof the shortest path between two vertices, and the length
longest path between two vertices.
Making
matrices,
Theorem 4.7.2.
adjacency
matrix.
Let
Suppose
\302\251
and
x if x
\302\256y
- (VfE)
\302\256
denote
the
operations
>y
y otherwise,
\302\256
y
x+
if x
> 0
0 otherwise,
and y > 0
is its
Section
Directed
4.7
Graphs
401
and
A
k =
for
Lk~l\302\256
Lk(iJ) is the
Then
Vj
has
that
\302\256
(L*-1\302\251 \342\200\242
A)fork>l.
length
directed
nontrivial
= 0, in
case
which
path from
no such
ut
to
path
exists.
Proof.
conclusion
k > 1, we
The proofis
= 1 there is
= 1 we have Lk = A.
of
path
length 1 from i>t to vj9 the
follows directly from the definition of adjacencymatrix.For
caii assume the theorem holds for smaller
of k. Lk(iJ) =
values
k. For k
on
induction
by
Since A(i j)
a directed
iff
...
\302\256
\302\251
\302\251
Lk-\\i,k) \302\251(Lk-l(i,l)
(Lk-l(i,n)
A(lj))
is
the
maximumof
words, Lk(iJ)
Lk(iJ)and all of
1 <
nonzero,
then
Vi to
Vj.
If
path
from y,-to
directed
;) and
all of
the L*\"1^)
t>,
\302\256
A(t
of
j)
is nonzerothere
If Lk~l(if j) is
<k.
from
to
of
u,
path
length
Vj
is
of
there
a
nontrivial
induction
path length<k - 1
by
is
\302\256
nonzero
for
some
Lk~l(i,t)
A(\302\243,
t, then by induction
j)
for
Lk~x{i,t)
\302\256
A(tJ)
two cases:
We will consider
< n.
\302\243
In other
\302\256
A(nj)).
thereisa directed
path
from
vt to
if one
that
argue
ut
an
and
edge
of these
from
vt
to
Vj
y,- to
that
Vj.
can
(This
be
is
directed
Case 2. Supposethereis a nontrivial
path from vt to Vj of
<fc.
Choose
one
that
has
maximum
such
path
length.Let/ be the
length
this
the
on
it.
of
of
and
be
last
edge
By definition
length
path
(vt,Vj)
adjacency
matrix,
A(tJ)
whether/ is greaterthan
= 1. We
break
this
1.
Figure
4-21
into
subcases,
depending on
402
Chapter 4: Relations
and
Digraphs
/ is
that
proof
Lk(i, j)
- /.
this
theorem
that
Note
not be simpleand
so
\342\226\241
deals
the
of the
longest
harderproblem.
simple
length
matrices
Adjacency
next section
we
the
computing
however,
must
we
convenient
vertices and
edges. Finding
vertices is a much
look
transitive
closure of a relation. Beforemoving
one
point out that adjacency matrices are only
purposes.
vertices and
many
definition need
in our
which
representations
some
representation
for
will
paths
repeated
provide
and
digraphs
representing
with
include
may
very
edges.
and
study of graph representations
book.
best
the
They
few
Regrettably,
algorithms
is
on,
of several
for
graphs
with
however, a complete
beyond the scope of this
Exercisesfor Section4.7
1.
(a)
the
({a,6,c,d},#),
Section
4.7
(b)
Give
the
closure,
Jf?+.
Give the
(c)
Boolean
Give the
2.
3.
Graphs
matrix
representation
Boolean matrix
403
of the transitive
representation of
transitive
the
Jf?*.
reflexiveclosure,
(d)
Directed
matrix
4.7.2 for
in Theorem
defined
L3
this digraph.
Prove
4.7.2.
Corollary
alternative definitions
4. Give
\302\251
and
for
so
\302\256
that
them
of the
substituting
the
length
<&.
length
multiplication operations.
(a) Provethat
the
that
M(if j) is
from
v( to
entry
paths
A2
graph
A3
-\\-
= A
that
Suppose
that
we denote by
paths
Vj of
A2
+ ...
+ Ak is a matrix whosei-j**1
number of distinctdirectednontrivial
of
Vj
in
-\\-
A4
at most
length
k.
exercise
and
Prove th^t
(a)
AR
matrix of R
S, where
(b)
AR A
binary operation
As is the adjacencymatrixof R
operation AND.
S, where
(c)
The
As is
the adjacency
A2, and
of each of the
R and
AR and As
V
to
vt
is
j),
Ak(i,
from
the total
matrices.
6.
directed
exactly k.
length
of A*, which
entry
i-jth
of distinct nontrivial
the number
also
Suppose
respectively.
V denotes
the
OR.
transpose
of
AR
is
transposeof a matrix
the
is
adjacency
matrix
A is the
binary
M(jfi).)
7.
In
the
adjacency
defined on a set A.
to
of a
obtain
relation
the
404
Chapter
8. For
ofrelations
each of the 6 properties
(a)
terms
in Section
of adjacency
4.2, give
matrices.
Section4.7
1.
defined
in
\"0
0 01
1 0
0 0 0
_1 0 1 oj
0
1 1 Ol
\"0
(b)
0 1 0
LI
(c)
[1
(d)
0 0 0
1 1
1 1
1 1
1
1
OJ
Ol
Li
lj
ol
Li
oj
r\302\260
4.7.1 WarshalFs
Algorithm
section,
is frequently
satisfies its output requirements.Correctness
broken
into
termination and partial correctness.
Terminationmeansthat
the
halts on every input that meets its input requirements.
algorithm
if ever the algorithm halts, and if the
Partialcorrectness
means
that
the
met
input
input requirements, the output must meetallthe\"output
the input and output requirements
of
Precisely
requirements.
specifying
but
an algorithm,
and then verifying its correctness,are very
challenging
definition
very important
applications of the techniquesofmathematical
two parts:
and
proof.
correctness,
is efficiency.
Section
Directed
4.7
such
algorithm is implemented,
may
affect
very
hard
resource
its exact
the
as
requirements,
resourcesrequired
by
factor.
constant
of
on which it is executed,
and becauseexactfigures
are
an
describe
that
the
approximately,
algorithm
notation is frequently
Big-0
if we assert
that the running time t of
be that this timeis expressible
in
the
form
example,
0(n2), it may
405
computer
For
to obtain, it
Graphs
an
is
algorithm
then
such
coefficients
and
the
things as program
a0, au and a2, but
time. (Note,
assumes
certain
cost.
constant
operations
primitive
that
implementation
Any
the
increase
the
that
however,
that
order
time. In this
of the running
know
we
the
increase
second by a
Essentially,
the
size.
it
Thus,
respectively,
values of n, a two-fold
time of
factor of 8.
then,
are,
algorithm.)
the rate of
indicates
time
is the
time complexity
of
an
of
4 and
algorithm
the
that
if
problem an algorithm can solve.Forexample,
n
time
of
where
is
has
a
order
2n,
running
algorithm
graph-theoretic
of 10 in the number of
number of vertices, then an increase
determines
some
for large
running
input
of an
time
may
of data
choice
the
way,
how large a
the running
from
10 to 20, or from 20 to 30\342\200\224will increase
1000. Also, for
constant multiple of 210, or by approximately
such an algorithm,even a tenfold increase in computer speed adds only
3
in a given time, since 23 is
three
to the size of problem that can be solved
vertices\342\200\224say
time by a
approximately
Therefore,
estimate of
10.
algorithm
we
should
us an
not forget
gives
is a measureof
of an algorithm
algorithm, as the sizeofthe input goes
to infinity. It is possible, for small
that an algorithm of higher
inputs,
There is a
order.
orderactually
can
be more efficient than one of lower
time of
to assume
that an algorithm with
running
tendency, for instance,
that
order n2 is better
than one with running time of order n3. Indeed,
in some practical
of
is correct for large values
n, but
assumption
situations the lattermay have a better performance for small values of
the
n.
asymptotic
performance
function
of the
406
Chapter
4: Relations
and
Digraphs
1. The Subgraph
does contain
2. The Planar
a subgraph
a
positive integerk < | E |, is
= (VJE')is
\\E'\\ > k such that G'
Given
subset
there
G and H,
to HI
isomorphic
Problem.
Subgraph
two graphs
Given
Problem.
Isomorphism
is discussed
(Planarity
planar?
a
in
Chapter 5.)
Does
3. The HamiltonianCycle Problem.
Hamiltonian cycle? (Hamiltoniancycles
graph contain a
a given
are
in Chapter
discussed
5.)
4. The ChromaticNumber
a way that no
two
are
numbers
All
the
Cook of
problems
problems
a class
problems,
NP-complete
the
is now
notorious
of
University
for
known to
their
discussed
above belong
listed
problems
vertices
adjacent
(Chromatic
vertices
the
color
a graph
of G with
Given
Problem.
to
integerk, isit possible
of
in such
painted the
in Chapter 5.)
to a larger classof
This class
contain literally
same color?
problems
introduced
problems
computational
positive
k colors
are
in 1972.
Toronto
G and a
called
by Stephen
of
NP-complete
of different
hundreds
intractability.
computer science,
some sense the
mathematics,operations
economics,
research,
hardestproblems
in polynomial time by algorithms
that
can
be solved
that are allowed
to \"guess\"
arecorrect.
and then verify that their guesses
These
all
are
have
two
First,
problems
equivalent
important properties:
in the sense
that all or none can besolved
(More
by efficient
algorithms.
into
each
be
transformed
can
any other
precisely,
NP-completeproblem
NP-complete problems,which
occur
and
in such
areas as
are in
Section4.7
Directed
407
Matrices
and Adjacency
Graphs
transformation;
NP-complete problem by a polynomial-bounded
clearly
transformable
into an easy problem, then it is also
if a problem is easily
the NP-complete
an easy problem.
Thus,
problems are all easy or noneof
the
of
them
times
all
methods
are
Second,
currently
easy.)
running
known for finding general solutionsfor any of the NP-complete
problems
of
can always blowup exponentiallyin a mannersimilarto the behavior
T. (Even
for relatively small values of n, 2n is a very large number. For
example,when n = 70, a computer that can perform 106operations per
second
would
Since
many
for
intensively
of the
NP-complete problems
no efficient algorithms have
have
and
decades,
they
is inherent in
no efficient
should be
all
solving
of \"hardness\",
for any
an
find
efficient
problems:
NP-complete
any
of
many
\"hard\"
problems,
of them.
The reader
an infinite hierarchy of
including many that can
The study
harder than the NP-completeproblems.
and
the
classificationof
such
classes,
problemsaccording
complexity
is an important
of the algorithms that can solve
them,
complexity
be proven
to
degrees
studied
found
exist. Indeed,
considered
exists
there
that
however,
aware,
of
classesof problems
operations.)
been
the inability to
the nature of
be rightfully
may
problems
NP-complete
270
been
algorithms
that
suspect
procedure
believe that no such procedurecan exist.
since
of
such
no
that
strongly
solution
to perform
centuries
300,000
require
to
branch of
be much
computer scienceknown
as
computational
complexity
theory.
number of otherrelatedproblems.
Algorithm
4.7.1
Inputs The
{vly..
adjacency
matrix
of
a digraph
(V,E), where
.,vn].
Output:
+
(V,E
Closure
the Transitive
Computing
).
new
adjacency
matrix
M, which
is the adjacencymatrix of
408
Digraphs
For each
For each
1 up to n (sequentially)
k from
<
the
do
< n (in
ij
following:
following:
(*)
If M(i,k)
= 1, M(kJ)
= 1,and
- 0
M(iJ)
then changeM(iJ) to 1.
reasoning
behind
goes with
idea
basic
that
Vj.
Another
way of looking at it is that for
through it, the main loop of the algorithm
vL to
Vj
that
builds a
go
bypass
into
vk and
vertex
each
all of
considers
and out
(vhVj),
of
vk,
provided
all the
paths
the possible
and,
such
are
a bypass
if any
{v,
Figure
4-22. Warshall's
algorithm.
v*_,}
Section
Directed
4.7
Graphs
= 1 impliesthat Mk+l(i
=
>j)
+
of
matrix
(V,E ).
adjacency
This
theorems.
Theorem 4.7.3
from
vx to
1 if there is a nontrivial
in {vi,.. ,9vk].
vertices
only
=
Mk(iJ)
traverses
that
Vj
In orderto prove
theorem
this
we will need
directed
proof of
The
Proof.
S = 0, the lemmaistrivially
S is
and
nonempty
from a to b that
c is
in S
vertices
traverses exactly
{c}.
induction
there
since
true,
is no
on the size of S. If
vertex c in S. Suppose
path
\342\200\224
Lemma 4.7.1is by
an element
directed
a lemma.
in a
path
that eachtraversesonly
409
Matrices
Adjacency
Mk(iJ)
the
and
vertices
in S.
be
a directed
path
By the definition of
{c}.
\342\226\241
the
that
Now
lemma
is proven we
can proceedwith
the
of
proof
4.7.3.
Theorem
lemma,
either
traverses
only
Vi to
from
first
vk
is a nontrivial
there
vertices in [vu.. .9vk_i\\
and from vk to Vj using
case, by the
inductive
= n,
the
directed
path
from
algorithm.
we obtain an
else
there
to
that
Vj
paths
In
the
second
\342\226\241
immediate corollary,
which
often
vt
are nontrivial
in {vi9.. .9vk_i).
only vertices
= 1, and in the
hypothesis,Mk_x{iyj)
or
is what
proofs\342\200\224it
is ultimately
we
is
410
Chapter 4: Relations
and
Mn(iJ)
is not
This
If there is a nontrivial
- 1wheren = | V\\.
4.7.3.
Corollary
then
(V,E),
the
Digraphs
v{
to
Vj
in
if there
only
algorithm
from
path
= 1 at the end of
We also need to know
that
M(iyj)
is a nontrivial directed path from
Vi to Vj. The
enough.
next theorem
directed
proves that.
Algorithm
be
to
are
so forth.
does
considered,
This will
enable
to prove
us
induction.
4.7.4.
Theorem
If M(iJ)
= 1 at
Suppose
never
M(iJ)
change
to 0,
we
time
path
= 1.Theproofis by
M(iJ)
any
directed
to 1.
set
so that
have
the
(As observed
during
the
from
v( to
in
Vj
on the
induction
of
execution
(V>E).
time t at
adjacency
once
most
for each
matrix, so that
edge in E. For t
if
at time t
\342\226\241
VitOVj.
To apply Algorithm
of
WarshalPs
Algorithm.
with M0, the adjacencymatrix of the relationR, and then
construct the matrices Ml9 M2,...,
Mn, where n is the number
successively
k > 1, we can construct
for the relation R. Moreover, for each
of vertices
Condition
of
in
terms
of the previously constructed Mk_x.
(*)
Mk
the (ij) entry ofMk, from
Mk(iJ)f
Algorithm 4.7.1 tells us how to obtain
= 1, then Mk(iJ) = 1
of Mk_x. In particular, if Mk_x(iJ)
entries
certain
Application
4.7.1,
we start
also.In other
Moreover,
words,
if Mk_x(iJ)
were
ones in
every
entry
- 0, then we
remainsa 1
of Mk_x that is a 1
get a new 1 in position
if there
positions (iyk) and (k J) of
=
= 1 and Af^fej)
way,M*(;,;) = 1 if Mk_x{iyk)
we need only examinecolumnk and row k ofMk_u
Mk__x.
in
Mk.
To
1. Thus,if
put
it another
M^xdJ)
and then if
= 0,
there is a 1
Section
Directed
4.7
in positioni of column
is described
this
of
succinctly in the
= Mk_x(iJ)
Mk(iJ)
construct
we may
Thus,
a 1 in
will
be
411
entered
(ij) ofMk.
in position
All
k and
Graphs
V (Mk.x(i9k)
from
Mk
expression:
following
Mk_x
Mk_x(kJ)).
the following
by employing
procedures:
Step 1.
all positions
entry is
Step3.
all l's in
Mk_v
pu p2,... in columnk of
\342\200\242
in row
entry is 1.
a
Put
1 in
each position
already therefrom
4.7.5.
Example
discussed
to Mk
transfer
First
Record
2.
Step
previously
WarshalFs
of
(pstqt)
a previous
Mk
Mk_u
k ofMk_u
(provided
where
the
where the
a 1
is not
step).
in Examples
relation
will
apply
algorithm.
First, we let
0
110
0 0 10
Mo
Next we
0 0 0
0
0'
11
0
0 0 0 0
that
Mv To sSe if there are any new l's, we observe
M0
1 and 2 of row 1. Thus,
position 1 of column 1 and positions
but since the (1,1) and (1,2) entriesof M0 were
Mx(l,l) = 1 = Mi(l,2),
transferred
to Mu we introduceno new l's. Thus, Mx = M0.
already
Now we compute M2 so that in this computation we let k = 2. In
1 and there is a 1 in position 3 of
column 2 of Mu thereisa 1 in position
=
1. This is the only new 1 to be added to Mx.
row
2. Thus,
M2(l,3)
find
has l's in
Hence,
1110
0
M2
0\"
10
11
0 0 0 0 1
0 0 0
0 0 0 0 0
Proceed
3 have
next
to compute
M3. We
and
412
Chapter
4: Relations
and
Digraphs
* M3(2,4)
M3(l,5)
= M3(2,5) = 1.Therefore,
11111\"
0 111
0 0 0 11
0
Afft-
Nextobservethat M3 has a
a 1 in position 5. Thus,
1 in
0 0 0 0
1 =
4 has
theserequire
M3 =
Therefore,
changes.
M4.
1 in severalpositionsof column
5 but
no l's in row 5.
Thus, no new l's need be added to M4. Therefore,M5 = M4 = M3 is the
adjacencymatrix of R+. Of course, it is no surprise that we obtained the
Finally, M4 has a
same
4.7.4.
Corollary
matrix
Exercises
of the
4.7.4.
in Example
as
result
transitive
adjacency
4.7.1
for Section
of the
matrix
1. Using Warshairs algorithm,computethe adjacency
4-16.
transitive closure of the digraphjnFigure
2. Using
Warshairs
algorithm, compute the adjacency matrix of
G = ({a,6,c,d,e},{(a,6),
of the
the transitive
closure
digraph
(6,c),(c,d),(d,e),(e,d)}.
3.
Using
basic
the
idea of
computea matrix P
directed
(including
WarshalPs algorithm,
such
that
P(i,j)
devisean algorithmto
number of distinct
is the
digraph
xEZ.
4. Usingthe basicidea
of
WarshalPs
directed
path
algorithm
from
u,- to
Vj in
algorithm,
is the
D(ifj)
a digraph
devise an
length
(V,E).
algorithm to
of the
Verify
shortest
that
your
is correct.
Section
413
4.7
matrix
of R*
(a)
10
(b)
10
10
(d)
0 0
10
0 0 0 0
0 0 10
(e)
10
0 0 1
11
11
0 1
10
(f)
0 10
0 1
10
0 0
0
10
(c) 110
110
0 0 0 0
0 0 0 1
0
10
10 0 1
0 110
110
10
10
0 1
SelectedAnswers SolutionsforSection
4.7.1
1.
We
will
the vertices
consider
5. The
a b c d e
a
\"0
c
d
10
0 1
0
added
10
0 10
LI
0l
0 0
iteration, which
e to
from
0J
b and
from e
looks
at paths
through
to c, resultingin
the
a, edges are
matrix
shown
below.
1 1 0 0'
0 0
10
10
0 10
0 1
LI 1 1 0 0J
the
During
is added
0 1 1
second
d to
from
10
0 0 0
0 110
LI
0 0'
10
0
1
0J
edge
414
Chapter
and Digraphs
4: Relations
third iteration,which
During the
added
from
a,6,e,
the column
has
looks
at paths
through
c, edges are
and
d, resulting in
which
1 Ol
[0 1 1
110
0 0 1 0
1111
Ll
During the
it to dy
edges
filling
OJ
and d
i ll
[o i i
1111
ll
1111
1111
the
During
edgeto e,
are
edges
ll
and
fifth
e has
and
since every
final
iteration,
an edge to every vertex, all
in a
resulting
added,
that
M(i J)
- 0or if
only
vertices
i \302\245*
j, and
matrix
5 vertices).
of
directed
{vi9v2f...,vk\\.
P0(i9i) =
<*> if
M(i,i)
l's
of
full
on
remainingpossible
paths
Then
P0(iJ)
- 1. For
(the
adjacency
from
vt
to
= M(iJ)
k > 1,Pk(iJ)
Vj
if
-
1) (Pk-i(kJ).
case
equationsto
These
can
+ Pk-i(i>k) (Pk-i(k,k) +
Pk-i(iJ)
equations
be proved using induction and
analysis.
We
must
be more careful in using these
derive
an
than we were with
WarshalFs
since we do not
algorithm
algorithm,
want to count any path twice. To avoid this, we will use two
M and P. so that the values
of Pk_x can be held fixed until
matrices,
of
Pk have
been computed.
For
Copy
For
eacji k
the
each
values
pair
(ij)
of the
l)P(kJ).
Section
4.8
4.8
Application:
APPLICATION: SORTING
Sorting and
415
SEARCHING
AND
Suppose
(au..
Searching
are
every i such that 1 < i < n. Sortedsequences
in computer algorithms, sometimesin the guises
D. A
sorted
encountered
of
lists,
sequence
if
a, < ai+l
for
frequently
arrays, files,
or
of sorted
tables. One important property
lists is that each item is greater
or equal
to all the items precedingit and lessthan
than
or equal
to all the
it
in the
items following
list. The following lemma expresses this
formally.
(i)
a, <
(ii) a; <
The
If (alf..
4.8.1.
Lemma
total order
is a
.,a\342\200\236)
for
j such
follows
proof
that
with
respect
to
j < n, and
1 < j < i;
from the
immediately
orderingrelation.
sequence
i <
j such that
every
sorted
then.
Algorithm
operation
4.8.1
Binary
is frequently
is searching
that
Search.
Input:
with a
Method:
1. Leti 1,1(1)
2. If > u(i)
3. Letm(i) =
= 1,
l(i)
*LxJ denotes
= n.
step 5.
go to
L(/(0
and u(l)
u(i))/2J
.*
416
Chapter
and Digraphs
4: Relations
Let
Hi +
1) =
< a m(i)
id)
if x
m(i)
if x =
[m(i)
+ 1
ifx
a,\342\226\240ro(i)
>
>amii)
and
+ 1)
u(i
m(t) -- 1
ifx<am(0
m(0
if x
ifx >am(0
.w(0
4. Increaset by
5.
l(i)
Output
one
and go
if l(i)
= w(i)
= am(t),
to step 2.
and x ^ am\\
otherwise
0.
output
On the sequence(1,3,3,4,7,12,13,15
4.8.1.
for
> searching
binary search algorithm would go through step 3 threetimes,
Example
12, the
the
computing
following
values:
/(/)
m(i)
u(i)
4
6
8
8
6
9o(/))
=*/(/)'
<
1,3,3,4,7,12,13,15
<7,12,13,15>
<12>
would be 6, as desired.
The output
proved
with
Algorithm
Theorem 4.8.1.
following
are
there
algorithm,
any
about
4.8.1. The
Every
time Step
2 of Algorithm
4.8.1
is reached,
the
true:
(a) x is in
the subsequence(a/(l),...,au(l))
(alf.. .,an);
iff
is in
the sequence
Section
4.8
Sorting and
Application:
As
part
of the
which
lemma,
proof
this
of
prove the
we first
theorem,
an important
expresses
sorted according
isexactly
Step 2 has beenreached
of times
number
total
(c)
417
Searching
consequence
i.
following
a sequence
of
being
to sometotal ordering.
Lemma4.8.2.
to a
A = (au..
with
Let
.,an) be a sorted sequence
respect
< on D, let 1 < m < n, and let x = at for somei (1 < i < n).
one of the following cases holds:
and i < m, or
total order
Then
exactly
(a)
x <
(c)
x > am and
am
(b) x = am,
or
Proof. It is
one
of x
<
amt
m.
i>
a
< being
of
consequence
= am,
and x >
am
must
a total
What
hold.
ordering that
remains
exactly
to be shown
\342\226\241
of Theorem
4.8.1.
The proof is by induction
on the number
If this
is the first time, i = 1,
Step 2 has beenreachedpreviously.
=
since
l(i)
1, and u(i) = n, so that (a) is satisfied trivially
u(l) and,
=
1(1) n 1< n/2\302\260,so is (b). Part (c) is satisfied,sincethis is the first time
Step 2 is reachedand i = 1. Suppose Step 2 is reachedand it is not the
first time. Fix i to denotethe value
of i at this time. Due to the structure
of the
it must be that the previous
three
were 2,3,4. By
steps
algorithm,
induction, the theoremheldthe last time Step 2 was reached. At that
it is now, since the only changeto i is
time the value of i was one lessthan
madein Step 4, where it is increased by one.Thefact that Step 3 was
us to conclude that
5, permits
performed after Step 2, rather than
Step
at what
was done in Step 3, we see that oneof
l(i-1) < u(i-1). Looking
the
three cases must now hold:
following
- 1;
=
= m(i-l)
(1) x<am(i_u,/(0
/(i-l),anda(i)
Proof
of times
(2) x -
am(l_D,
= u(i);
= ro(i-l)
l(i)
In
(1), we
case
<flm(i-i)r
\342\200\242
-Pua-i)),
(alv . .yan)
i*(i-l))/2J
all.
at
(u(i-1)
know
so
Thus
that
4.8.2
Lemma
it must
(a) is
- 1, u(i)
l(i-1))/2
by
1, and, by
<
that
be in <aw_D,..
be in
cannot
if it is
.,<*\342\200\236(,\342\200\242_!)_!>
proven for
l(i)
u(i-l).
W-l)
case
(1).
u(i) = l(l(i
Since
+ a(i-l))/2
induction, this
is lessthan
- l(i)
1)
- 1-
Part
(c)
value of
(1). In case
n/21\"1.
was
follows by induction,
the prooffor case
i was one lessthan it is now.Thisconcludes
x = al(i) =
since
(2), part (a) of the theoremholds
trivially,
reached
in
\342\200\224
the
auii)y
and
418
Chapter
4: Relations
and
Digraphs
will
We
begin
observe
We
.,2,5.
1,2,3,4,2,3,4,2,3,4,..
2
be executed
infinitely
That
often. By
must
imply
would
do
to
have u(i)
would
thing
when we
that
be to
to be
algorithm
would
i =
we
time,
(log2(n) + \\)th
this were true, however, the next
for
impossible
Algorithm
Notice
executed is
the precedingtheorem,this
the
1. If
termination.
verifying
are
have
shown
also
output is correct.
The
search
binary
quickly
searching
permits
algorithm
an unsorted
than
list may
be
searched
important
and
a
elements
the
one. The
number
of an
by
for
list
performing
efficiently
the problem
be sorted,
of rather
complex solutionshave
efficient
very
very
studied,
One
evolved.
of
but
of the
easily
algorithm.
Interchange Sort.
4.8.2
Input:
a total
sequence
A of
relation,
ordering
n elements
(alya2,.. .,an>
drawn
from
a set
with
denoted by <.
into
arranged
sorted
sequence
Method:
2. If
no
such
pair
is found,
halt.
of
the
sequence
for a
pair (ahaj)
Section4.8
3. If a pair is found
It is
to
worthwhile
unlike
but
Algorithm
what
exactly
specify
is out
of order,
back to step 1.
the
4.7
notice that this algorithm, like Algorithm
4.8.1, is nondeterministic. That is, it doesnot
In
order.
steps are to be performed and in what
take
4.7 the
Algorithm
that
and go
elements
two
419
and Searching
Sorting
Application:
which
the
pairs
In the presentalgorithm
is in
the
nondeterminism
to be interchanged.
the choice of a particular pair that is out of order,
This is in contrast to Algorithm
which
4.8.1,
specifies uniquely what to do
at each step,and is therefore
called deterministic.
When analyzing an algorithm it is ordinarily
to describe
it in
desirable
the simplest, most abstractform,
so that
whatever
results are obtained
can be appliedto the widest
of implementations.
possible
Stating
range
for
an algorithm in a nondeterministic form
is
a useful
technique
there
are a
4.8.2,
achieving this objective.In the caseof Algorithm
in use that may be
number of distinct deterministicsorting
algorithms
viewed as refinementsof this algorithm,
including
algorithms that have
becomerather well known under the names \"Bubble Sort\", \"Successive
Minima\"
\"Shell
Sort\". Any results we can prove about this abstract
and
nondeterministic
will also apply to all of these deterministic
algorithm
(ij)
were considered.
of
versions
it.
nondeterministic
For example,
tend
because of their generality,
Largely
algorithms
it is probably
to pose special problems for analysis.
though
obvious that Algorithm
4.8.2
cannot
terminate
unless the list has
into
the desired
must
order, it is less obviousthat
algorithm
arranged
terminate.
terminate,
eventually
Assuming the algorithm doeseventually
it is still less obvious how many
be performed
before
interchanges
may
this happens. We could solve this problem by making the algorithm
been
the
deterministic,by
considered,
and
then
specifying
apply
a particular
the technique
order in which
of invariant
pairs are
assertions,
as we
did for
Algorithm 4.8.1.
restrictioncanbe
lifted.)
Each
by a
permutation
of the n
sequence consistingof
the
elements of A
numbers
1,..
can
be
described
.,rc arranged in
abstractly
some order.
420
Chapter 4: Relations
and
Digraphs
to the sortedorder,
(1,2,..
.,rc).
< nand(x;
= x, only if
LetP\342\200\236
.,*\342\200\236}
11 <xt
{(xu..
n items.
of
\\(x,y)\\x
= (xu.
..,*\342\200\236),y
3/ <
;', (xt
Vfe ^
The
at
some
insight
into
the
nature
of R,
.,yn),
(yu..
= xh
yj9 yt
=
xL
>
*,),
y*)}.
the permutation
of a set achieved
and y is the permutation achieved
the
next
time, then x R y. To obtain
consider the representationof R as a directed
of R is that
importance
stage of the Algorithm
for
after step 3 is performed
i\\/\\(*a
i =./)},
Define the
if
x is
4.8.2
some
Figure
4-23.
The relation
R on
P3.
xy x
R+ x.
will
irreflexive
is
will
We
R+ is
prove
x
permutation
ffx
= 1
(i>j)
>
iffXi
total
ordering
of each
disorder
where
= 0
ax (ij)
otherwise.
of pairs that
the number
measures
d(x)
and
Xj
R+
that the
prove
421
and Searching
Sorting
Application:
x.
us apply
Let
4.8.2.
Example
happens
Permutation
Sequence
Degree
(6,4,5,2,3,8,1,7)
15
<22,60l28i8,14,81,3,69)
(4,6,5,2,3,8,1,7)
14
>
(22,8,14,28,3,60,69,81
>
(8,22,14,3,28,60,69,81
>
(4,5,2,3,6,1,7,8)
(4,2,3,5,1,6,7,8)
(2,4,3,1,5,6,7,8)
(2,4,1,3,5,6,7,8)
(8,22,3,14,28,60,69,81)
(8,3,14,22,28,60,69,81)
(2,1,3,4,5,6,7,8)
(3,8,14,22,28,60,69,81)
(1,2,3,4,5,6,7,8)
In the
each
9
6
4
2
1
0
in going
one interchange
was
there
chart
above
after
of disorder
<60,22I28I8I14I81I3I69)
(22,28,8,14,60,3,69,81
of
a sequence
degree of disorder
We sort
change.
to
4.8.2
Algorithm
to the
from
the
sequence
one to
Proof.
except for
xP
y.
yq,yp
that
Recall
d(y).
x R y
iff
and
y are
identical
the
between ax
d(x) >
y then
<Tx(p>q)
and
ox{p,k)= <Ty(q,k),
=
VxikyQ)
\302\260x(iJ)
<jx(kyp)
<Ty(k,p)
\302\260y(iJ)
oy(p,q)
for
ay(k,q)y
k ^ p,q;
* p,q.
for all
all ij
= 0;
ax{q,k)
- oy(p,k),and
422
Chapter
and Digraphs
4: Relations
Applying these
5(x) =
1+
X!
(\302\260x(k,p)
<rx(M))
p<k<q
ls:k<p
= 1+
+ *x(M))
(^x(p^)
X!
obtain
we
X!
Mp.*)
+ <rx(g,fe)) +
X!
MM)
+ <Ty(k,p))
(\302\260y(q>k)
M?>*)
+ <ry(p>k)) +
X- <rx(ij)
\\<k<p
X!
<*y(k,p))
p<k<q
X!
down
5(y)
breaking
By
\302\253(y)-1
\302\253(*)
M?>fe) +
X]
is lackingto concluded(x)
All that
0y(q>k)
if
yk
>
<ry(k,p)
(i)
similarly
p<a<9
<yp<yq
>
the
(iii)
if
yp
<yk<yq
0 +
0;
ifyp
<yq
0+1.
<yk
follows
that
Proof.
So
far,
<k <q.
do now.
which we
<ry(fe,p)
<ry(pyk)
<ry(kfq)
then
<ry(g,fe) +
<7y(fc,g)
then
(ry(qfk) +
<ry(k,p)
+ 1 = <ry(p,k)
o-y(A,qr)
If x R+ y then
R
z such that
8(x) > d(z) >
Theorem 4.8.2.
an obvious
all p
<ry(q,k) +
5(x)
some
be
MM)).
show that
for
o>y(k,q)
then
Proof. Supposex
k > 1. If k = 1,
some
must
^y(p\302\273fe)
= 1
- 0
+ 0
=
=
=
\342\226\241
4.8.4.
Lemma
is to
d(y)
cases,
1 +0;
(ii)
^y(*\302\273p)
<ry(p,k) +
examining
X- o-y(tj).
If x R+
The
x, then
y. By
>
6(y),
x Rk~*
d(y). D
transitive
y. By
of R,
Lemma4.8.3,it
R+, is irreflexive.
is
\342\226\241
shown that
induction and
closure
the preceding
contradiction.
we have
Algorithm
degrees of
4.8.2
must
disorder,
always
terminate.
corresponding
The
to dis-
Section 4.8
Sorting
Application:
tances on
Essentially,
the
of this
basis
each step of
is that
shows
4.8.3
Lemma
what
the
each
since
Thus,
\302\273
izi
* X]
\302\243 *x(ij)
step of
at
of
number
We
order.
in
many
steps
steps.
- o - n(n
\302\273pl
i - X>
proof.
algorithm
decreases
\302\253(*>-
423
and Searching
1)
\342\226\240
least
sequence
one, it can
of length
n.
Of course,we have not shown that this number of steps is required for
any input sequence, though there are several
widely
sorting
taught
for
some
inputs.
algorithms that do perform this numberof interchanges
makes
One of these is the \"BubbleSort,\"which
repeated
bottom-to-top
of
pairs
passes over the sequence to be sorted,comparing
adjacent
elements.
Though
technique
has
4.8.2
Algorithm
more
in
an interesting
provided
by means
termination
of proving
use
where
of
an
ordering
long sequences
example
relation,
of
the
it is
must be sorted.
method
typical
sorted
sequences
in itself,
fundamental
algorithms, including the usualmethod of updating
in data
it is
and
because
sequentialfiles
processing applications. For variety,
we
for
this
as
a
recursive
shall
an
natural,
operation
algorithm
interest
present
definition.
function
Algorithm
4.8.3
Input:
Two
Output:
the
total ordering,
merge
sentence,
single
sequence
(au..
Sequences.
= (al9..
sequences,
to some
according
of
Two Sorted
Merging
<.
.,an) and
B = (bu.. .,fcm>,
(A,23), which
is a sorted permutation
.,6m>.
.,an,bu..
Method:
Aif|B| = 0;
merge (A,B)
|Bif|A|
\\(bx)
(au..
0;
\342\200\242
<\302\243*!> merge
\342\200\242\"
stands
,,an)
\342\200\242
merge
for
\342\200\242
(blf..
(<a2,..
(A,
catenation
.,6n)
.,an),B)
sorted
if
aY
<62>.. .,6m>) if a!
<
6^
and
^ bx.
That is,
(au.. .,an,bu.. .,6n).
of sequences.
424
Chapter
4: Relations
and
Digraphs
If A =-(1,2,5,12,12,16)
and B - < 2,3/7,13,21)
then
=
The
(1,2,2,3,5,7,12,12,13,16,21).
merge (A,B)
important propertiesof
are stated in the following
of two sequences
the
lemma.
merge
4.8.3.
Example
Let C
4.8.5.
Lemma
sequences
with
respect
and a
sequence
to
= merge (A,23),
of A
permutation
the lemmais
A-23orC
left: eitherax
<
bx or bx
< ax.
and
B are
S. Then C is alsoa
sorted
sorted
\342\200\242
23.
If | A | = 0 or | B | = 0
= 23 = A-23. Supposing| A
Proof.
where
order on
a total
\\ >
true,
trivially
0 and
|B
\\ >
0, there
C =
since
are two
cases
to
be
argue that
of A \342\200\242
we may assume by induction
this is clearly
a permutation
23, since
=
(on n and m) that (c2,...,cn+m)
.,an), 23) is a sorted
merge((a2,..
\342\200\242
permutationof <a2,...,a\342\200\236) 23. To show that C is sorted, we rely on
to conclude that <c2,...,cn+m)
is sorted
induction
and reason that ax < c2
of (a2,..
(as follows):
JB, a2 is
.,an) \342\200\242
By Lemma 4.8.1, c2 is the minimum
that
the minimum of <a2,...,an)and 6X is the minimum of B. It follows
and that ax < bx by the
c2 = a2 or c2 = bx. We know at < a2 since A is sorted,
of the case being considered.
Thus
ax < c2 and C is sorted.
assumption
Thereis onecaseleft, when bx < ax. In this case C = (bx) \342\226\240
(A,
merge
23 is
of A \342\200\242
(62,.. .,6m)). The reasoning that C is a sorted permutation
to the previous case,and is left to the reader. \342\226\241
analogous
total.)
In the first
is the
Merging
algorithms.
These
.,an),
((a2,..
B). We
basic concept
these
a single
of
sorting
the
unsorted
sorted
lists
together
sorted
list.
(5) (4)-(4,5)
<1,2)<6)
\342\200\224
(3)
(2,3)
(4,5X1,2,6)
(1,2,4,5,6)
(1,2,6)
\342\200\224(2,3,3)
\342\200\224(1,2,4,5,6)
(2,3,3)
\342\200\224
(1,2,2,3,3,4,5,6)
are
a number
merges,
the rule
One of
Section 4.8
Sorting
Application:
425
and Searching
Algorithm
Input:
A sequence
S of n elements (aua2,.. .,an) drawn
from
a set with
orderingrelation,denotedby <.
The elements of S arranged into a nondecreasing
sequence
a total
Output:
<a*(i)Ar(2\302\273-
is a permutation of
\342\200\242
-Ar(n)>
where
<ir(l),ir(2),..
.,7r(n)>
.,n.
1,2,..
Method:
The objectivebehind
It can
merges.
length lessthan
21.
By the
4.8.3.
Theorem
produced by
the
this
is to build up large lists with
few
algorithm
be shown that by the endofthe ith stage there is no list of
4.8.2
Algorithm
have
lengths
>
1), the
>2\\ except
for
sequences
(possibly)
last one.
less than 1. Thus, as a
have
length
first stage every list has length at least 2,
i - 1 every list
By induction, at the end of stage
Initially, no sequencemay
Proof.
basis for
after
induction,
except
last.
the
(possibly)
has length>2',except
the
(possibly)
the
last,
S{kl).
1}
two
lists
Every new list S{ff
produced
by the end of stage i comesfrom
> 2', except for the last one, which may be S(kl)
Sy ! and S'jj*, each of length
or a list created
list. It follows that all but
by merging S{kl) with another
have
length
>2l+1.
\342\226\241
on
the
it is possible to obtain an upper bound
n. Since
step 2 of
required to sort a list of length
4.8.4
when one list is left, supposethe end of stage i
terminates
Algorithm
to one. Then there
is reduced
is the first time the number of sequences
are two lists at the beginning of stage i. Thismeanseitheri = 1 or the two
1. In the latter case, we know
lists were produced at the end of stage i \342\200\224
that one of the two lists is of size >21'\"1.Thus n > 21'\"1 + 1, which implies
i < log2(n - 1) + 1.
two
that
show
of the complexity of merging would
merging
Analysis
each stage of
Thus
sequences of combined length t takes0(C) time.
4.8.4
takes
0(n) time. Since the algorithm goesthrough at most
Algorithm
Using
number
this
theorem
of stages
426
Chapter
and Digraphs
4: Relations
log2(n -1)
0(n \342\200\242
log2n).
the
of
the number
bound on
upper
of
is thus
algorithm
algorithm must
result
for
specific
time complexity
There
terminate,
the total
1 stages,
stages
demonstrating
by
it
go through.
may
that
when it
Similarly, the partial correctnessof this algorithm,
follows
from
the
that S is
is a sorted
fact
terminates S
sequence,
directly
into
sorted
Lemma
the
broken
4.8.5,
sequencesand, by
merge
initially
of being
sorted.
operation preservesthe property
Exercises
4.8
for Section
1.
Give
and
sequence
u(i)
computed
(1,8,9,15,24,
32,34,35,37,43,95,99).
in this
defined
section.
permutations.
(1,2,3,4)
(b) (4,3,2,1)
(c) (1,3,2,4)
(d) (3,1,4,2)
4.
Give-the
merge(A,B)
sequence
B = (1,24,93,97,101,102).
Show
merges
of
shorter
where
how
A = (1,24,95,100,101) and
it is defined in terms of the
sequences.
= < 10,8,9,7,5,6,4,2,3,1
as input to
> is given
1
it
is
into
the
broken
collection
of
4.8.3,
Algorithm
Give
the
(10),
(8,9), (7), (5,6), (4), (2,3), (1).
sequences
collection of sequences
as it would be at the endof each succeeding
stage,
until the algorithm terminates.
the sequence S
5. Suppose
and
6. Complete
the
and
7. Derive
8.
prove
of the
evaluations
and B
proof
at Step
of Theorem
4.8.1.
a formula
for the total number
function merge to evaluate merge{AyB)>
of
(recursive)
where
Which
properties
implicitly)
that
counterexample,
or
4.8.1?Prove,
propertiesis
not
satisfied.
9.
10.
used
(explicitly
properties of a total orderingare actually
in
4.8.2?
the
of
Lemma
Prove,by
implicitly)
proof
that
this lemma
fails if any one of them is not satisfied.
counterexample,
Which
Show
that
obtained by
an algorithm
any
of
permutation
of at most n
the sequence
- 1 pairwise
that takes as input two sequences,
a series
or
interchanges.
= (au..
.,an>
Section4.8
and B =
<
bx,..
permutation
.,n).
<1,2,..
wise
11.
An
427
and Searching
Sorting
Application:
interchanges.)
variation
important
sorted
sequences,
on merging
each of
by
unionCA,23)
\\
if|B|
if| A
(a^
{ax)
(bx)
union((a2,..
= 0;
if ax <
bx\\
.,an>,<62,..
if ax =
bx;
.,6m))
\342\200\242
if&i<a!.
union(A,<62>-\342\200\242-,bm>)
is an odd or
of elements are
then the degree of disorder is
interchangedin any permutation,
odd
an
or decreased
eitherincreased
integer. In fact, if i < j and
by
is decreasedby an odd
that
and
are
d(x)
interchanged,
prove
Xi
Xj
<
if
if
>
increased
and
x, Xj.
x> Xj
integer
l(i)
1
4
5
m(i)
6
3
4
u(i)
12
5
5
5
(a)
(b)
6 (The
pairs are
(c)
1 (The
(d)
3 (The
only pair
only pairs
<
permutation
a pair
4.8
Section
for
1. i
4.
\342\200\242
.,an),23)
Answers
3.
union(<a2,..
Observe that
12.
Selected
\342\200\242
= 0;
(4,3),(4,2),(4,1),(3,2),
(3,1),
(2,1).)
out of order is (3,2).)
out of order are (3,1),(3,2),
(4,2).)
1,1,24,24,93,95,97,101,101,102)
This
is obtained
as
<1>merge\302\25324,95,100,101>,
(1,24,93,97,101,102))
<1> <1> merge\302\25324,95,100,101),
<24,93,97,101,102\302\273
(1>(1)
(24) merge\302\25395;i00,101),
(24,93,97,101,102))
(1) (1) (24) (24) (93) (97) (101) (101) (101) (102) merge\302\253),
(102)).
5.
(8,9,10)
(5,6,7)
(2,3,4) (1)
(5,6,7,8,9,10)(1,2,3,4)
(1,2,3,4,5,6,7,8,9,10)
11.
The
the
main
case
difference
between
this and
at = fej. Prove the following
lemma.
Chapter
and Digraphs
4: Relations
Let
Lemma.
without
sequences
is a
repetitions,
repetitions and
{c,-|l< i <
\302\243} {a,-|
1 < i
< n]
..,6m> be sorted
C
<clf...,cg).
Then
SORTING
TOPOLOGICAL
APPLICATION:
and B = (6lv
.,an)
=
and C
union(A,B) =
(au..
language
In
Ada.f
compilation
independent
information
an
Ada,
units.
which
these
that is consistent
specifications,
fits
This is a problem
naturally
relationsand digraphs.Let be the set
that
binary
relation
that
must
ux
1.
on compilation
J?* is
whether
of binary
units. Let R be the
of compilation
a partial orderingon
directed
nontrivial
[i.e.,
whether
If not,
cycles].
We
call
shall
discovering
algorithms
fairly
a sequence
of U
such as
with
the onedescribed
above
respect
to
R,
such
call the
and
the
report that
there is no legalorderofcompilation.
2. If R* is a partial ordering, constructa sequence
(ulf...fun)
<
in
k.
that
U = [uly.. .,uj and for each
R*9j
(ujfuk)
topologicalenumeration
Ada
may be compiled
such an order exists.
units
be compiled
Determine
units
provided
into the terminology
with
other
process of
oneof them
is
the most
efficient.
Algorithm
4.9.1
Topological
Input:
digraph
sort.
G =
(V,E),
with
n vertices.
a registeredtrademark
of the
U.S. Department
>
of
V with
respect to
of Defense(AJPO).
Section4.9
Topological
Application:
429
Sorting
Method:
1. Let
U0
= ( ) (the
u / v}.
V, S0
E
\302\243
{u | (u,v)
and
(a) Choosest
Ut-Ui-i -
= 0, provided
that T^si)
halt and output a messagethat
{*,-},
all vGV.
3. If
not
already
\342\200\242 and
S-S,..!
<*,->,
following
To
Si
u,
0
1
2
3
4
5
\\a,b,c,d,e\\
- {sjfor
where E =
figure 4-24.)
would compute the
is shown in
above
G:
T,(a)
TAb)
TAc)
<t>
\\a\\
[a]
<t>
4>
<t>
T,(d)
\\b.c\\
\\b.c\\
T,(B)
la.b.d]
\\b,d\\
\\c,d,e\\
(a,b)
4>
4>
4>
[c\\
id)
{d.e}
(a,b,c)
<t>
<S>
4>
4>
(a.b.c.d)
<S>
<t>
<S>
4>
4>
(a,b,c,d,e)
4>
<t>
4>
4>
4>
prove
topological
ordering
on
a
Sn computed by this algorithm is actually
of V with
to E, provided E* is a partial
respect
need to prove a stronger theorem,onewhich
V, we actually
the state of completion at the endofeachstagei.
the
that
enumeration
G*
Figure
st
is not
= ({a,6,c,d,e},2?)
(This
<a>
<
{b.c.d.e}
characterizes
on input
of sets
= T^v)
TO
an
such
E*
Sn.
output
halted,
T0(v)
1,.. .,rc:
[/,-_! such
from
exists. Otherwise,
antisymmetric.
(b) Let
i =
for
4-24.
A digraph to
be sorted and
its
transitive
reflexive closure.
430
Chapter4: Relations
and
Digraphs
2. Ti_l(si)r4>;
=
u
\302\243,
4.
1 < ,/,/z
3.
Proof.
that (l)-(4)
is
{a | (u,u) G
G 2?* and
Tf(y)
If (s,,s*)
+ v,
and a
< i
consists
then
1
\302\243
{*lf..
j < &.
on i.
i >
For
.,sj}
for all v
V;
of i.
values
in Vand [/,-
are
for
true
by the
computed
1.
sets
separately:
in
of
2(b)
step
!/;_! and
distinct
and
If
(2)
were
Ti_l(si)
2(a) of the
Si_l =
1 distinct
of
i (sl9.. .,$,_!>is a sequence
of all the vertices in Vthat are not in St.By
the algorithm, St - (slf.. .,$;)and [/,- = [/,-_! - {sj, wherest is
therefore distinct from sl9.. .,s,_i. It follows that slv . .,st are
of all the vertices in Vthat are not in St.
[/,- consists
By induction,
(1)
consists
not empty,
s, would not
algorithm.[The
in step
early if all
chosen
been
have
terminated
have
would
algorithm
step
and
Ti_1(v)
By induction,
of the
2(b)
algorithm,
$ {slf..
{u
G E,u
\\ (u,v)
Tt(v) =
u (J
=\302\243
v, and
T^t(v) -
fo}
{u | (u,u)
{sl9.. .,sj}. By
G E, u * vy
.,sj}.
(4) By
induction,
have
therefore
and a
It follows
$ {$!,...,$;_!}}.
2?.Otherwise,by
than i, we know
and (s,,Sfc) G
are both less
that
v =
st for
induction,
that
some t
since
< k.
\302\243
If
< i.
(st,sk)
= i
\302\243
G E*
then
and
i>
\302\243
and
to be
st
k
the
k. We have
(si9sk)
shown
so far that (si9sk)
must
be in E. By induction, TV^s*) = 0 and
= {u\\(u,sk)
a $ {slf.. .,**_i}}.This is a
E E, u f sky and
7Vi(s*)
G
J5
that
since
and
(4)
contradiction, (s,-,s*)
part
s, $ {$!,.. .,sj. It follows
of the theorem must be true. \342\226\241
smallest k for
Parts
corollary,
(1)
G jE*
which
and
for the
(4) of
case when
and
&
the theorem
i =
n.
<
immediately
yield
the
following
Section 4.9
431
Sorting
Topological
Application:
/
4.9.1.
Corollary
a topological
is
algorithm
sort
by the topological
i = n
without
. in
step
By the
unless E*
preceding theorem,
In other words,
Ti_l{v)
in [/,-_!
vertices
the
{u
nonzero in-degree. We
shall
u G
=\302\243
v, and
in
such a
that
prove
G E,u
\\ (u,v)
and the
of G
subgraph
has
every
subgraph must
will
It
E*
unless
have
is
statements
equivalent:
(1) G
vertex has
(3) E* is not
Proof.
no
zero.
then
cycles,
is a
there
vertex
with
G without
Let
zero
loops.
denote
that
prove
in each
if
nonempty
in-degree.
Since G contains
a directed path
of maximal
->(up_i,i>p)
i is
loops
\342\200\242
(ui,l>2)>-
directed
nontrivial
without
that is, we
the contrapositive,
prove
2)
be any nonemptysubgraph of
no directed
every
directed cycle;
\342\200\224\342\226\272
We
subgraph of G
Let H
which
antisymmetric.
(1
G contains
in
self-loops
nonzeroin-degree;
a nontrivial
G contains
(2)
of
If G
4.9.1.
Lemma
Ui_l}.
form
vertex
nontrivial
cycle and therefore that E* cannotbe antisymmetric.
that
follow
the algorithm never halts before reachingstep5
not a partial orderingon V.
are
provided
to be
remains
What
stage
to E,
respect
in H
result as an exercise.)
If the in-degree v v is
of
that the
edge (wyVi)
Case 1.
edgesof P and
Suppose
path P':
directed
is
the
Case 2. Supposew
C:
loops
i where
.,(up-i,Up),
(w,Vi).
edge
each
But this
1<i
whose
< p. Then
edges
is a
there
contain
H such
all the
a path
of
length in H.
maximal
circuit
\302\245>
v> for
(w,Vi)y(vlyv2)y-.
in
and
(vltv2)f..
no
v{ for
.,0>i\302\273Vi)- This
directed
nontrivial
The contradiction in
there is no edge(w,vx)
in
the above
if.
In
some i.
again
is a
cycles.
leads to the conclusion that
the
other words,
in-degreeof vx is zero.
two
cases
432
Chapter 4: Relations
and
Digraphs
Suppose
3)
both in E+f
can
we
assume
vx
4.6.1, which
Corollary
by
(2). Let
G satisfies
\342\200\224\342\226\272
(2
Since it is nontrivial,
such a cycle.
and
(vuvk)
(u*,tfi) are
\342\200\242
\342\200\242
Avk,vx)
(l>i,l>2),
Then
=\302\243
vk.
means that
be
antisymmetric.
Suppose
2)
(v,w) and
get a nontrivial
are
(w,i>)
directed
cycle.
G includes
\342\200\224\342\226\272
(2
Suppose
1)
the
Then
(VkM).
(1).
subgraph
An
(vl9v2)9...,
satisfies
interesting
is that
any
be extended
relations
in section
4.4.1.
Corollary 4.9.2.
or
\342\226\241
algorithm
may
E* is
\342\200\224\342\226\272
that
infinite
countably
ordering
that
such
Let
complexity
some
of lower
proofs
searching
involving
problems
exercises.
in the
considered
R be
set. Then
R C W.
1.
Show
that
relation
the
extends
{(a,6),(a,d),(a,c),(6,d),(&,c),(c,e),
W,/),(e,/),(/,a)}.
3. Perform Algorithm
on
4.9.1
the
digraph
G =
where
({a,6,c,d,e},2?),
E = {(a,d),(6,c),(6,d),(6,e),(e,a),(e,<i)}.
all steps,
as
4.9.1. Drawthis digraph and the
of its transitive
Show
digraph
in Example
reflexive
closure.
The
can
that
algorithm
sequence by
choose
of
means
form
exercises
two
following
the
fcth
the
largest
comparisons
pairwise
heart of a
element
proof that
out
must use at
of an
any
input
least n
\342\200\224
1
comparisons.
4. Prove
Let
suppose
be
that
an
antisymmetric
in every total
on a set S = {sly..
.,sj and
R
extends
the
element
S
that
of
ordering
relation
Section
4.9
se is the
feth
for every i
Then
largest.
Sorting
Topological
Application:
=\302\243
e, 1
< i <
n9
either
seR+
433
st of
Prove
lemma:
the
exercise.
preceding
Then R contains
at
least n - 1 ordered
Set up a
pairs
(si9Sj) such that st =\302\243
s;. [Hint:
\342\200\224\342\226\272
i? between
one-to-one correspondencef: S \342\200\224
a subset of the
{e}
ordered pairs in R and the elements si9 i =\302\243
e. The
exercise
preceding
is at least one directed path in
that
there
may be viewed as saying
(S,R)from st to se or from se to st. Taking/(s^) to be any one of these
not
Jf?, but
edges on such a path gives a function f: S - [e\\ \342\200\224>
necessarily a one-to-one function. The problemisto define
/so that
it is
one-to-one.]
Selected
FOR
length
in a
vp
1.
e,d9c9b9ayg,f
2.
This
relation
cannot
therefore
REVIEW
maximal
zero.
out-degree
Answers
of
directed
contains several
be extended to
It
FOUR
CHAPTER
1. Define
x2 + y2
Section
the relation, R
=
1. Of
on
the six
G R iff
the set of real numbers by (x9y)
special properties of relationsstudiedin
4.2,
(a)
determine
(b)
determine
those properties R
2. For
two
following
digraphs,
isomorphicor exhibit isomorphism
pairs of verticesand also
the
an
corresponding
satisfies.
corresponding
listing
of edges.
Chapter
4: Relations
3. For
and Digraphs
the set A
determine
{a,6,c,d},
(a) the
A.
(Show
analysis.)
your
number of nonisomorphic
digraphs
(b) the
of
equivalence
A.
on
relations
4. Let R
real numbers
class
of 1.
(b) Determinethe equivalence
-1.
the
classof
Determine
(c)
equivalence
(d)
5.
What
(a)
An
(b)
partial
(c)
total
(d)
A total
order on A
is a
is a
that is
relation
well ordering
A
and
to the
respect
(with
that is
relation
is a
that
if
El A,
then a
relation R)
is a minimal
if
the
Exhibit
such that
8.
order on
a partial
A
set
is a partial ordersuch
on A
order
is
on a
order
of
7.
relation
equivalence
element
is determined by Jf??
definitions:
on a set
the following
Complete
(e) If
6.
of A
partition
= {a,b,c}
(a)
- S
(b)
\342\200\242
S
(c)
Rl
(d) R H
MR
and
Ms
closure
be the
of R.
adjacency matrices
for
the
relations
List
the
entries
(b) ComputeMR
(c)
Carry out
intermediatematrix.
of MR and
OR.AND
Ms.
Ms.
WarshalFs algorithm
for
MR,
listing
each
R and
Section
4.9
Disprove
(a) If
antisymmetric.
(b)
435
on the set of
on an
strings
is
alphabet
(c)
the topologicalsorting
relation
is
an
whose
ri
the
of
directed
closure
transitive
of the
is
matrix
adjacency
following
vertices.
the
of
the
on
algorithm
12. Compute
a set
relation.
equivalence
11. Using
R on
relation
transitive
and
symmetric
Any
o o o]
1 1 0. 0 0
0 0 110
13. Find
an
14. Let A
x where
integer
o o o lj
MAID, MADE,
RED, REASON,
Arrange
of
16. Give
(a)
them
x mod
13.
the relation R on
a partial orderon A. Find
and define
R is
MINE,
ME,
MEAL,
lexicographic
(b) Arrange
maximal elementsof
of
0 <x
{2,5,8,10,20,25,50,60,100}
a divides
b. Then
(afb) G R iff
minimal and
(a)
111
|o
MAIL,
into ascending
A under
the relation
MAMA, MOO,
MART,
MARRY,
MOST, MARE,
REST, RAIL,
ordering.
ordering.
(b) (3,2,1,6,5,4)
the
R.
enumeration
A by
permutations:
436
Chapter
4: Relations
17. Sort
and Digraphs
the sequence(3,2,1,5,4)
using
no
than
more
four
interchanges.
18.
Use
19. Prove by
mathematical
15
in the
sequence
induction:
a symmetric relationdefined
on
a set A, then Rn is
n.
for
each
positive integer
symmetric
(b) If R is a reflexive and transitive relation defined on a set A,
R = Rn for each positive integer n.
then
20. Show that 3n3 + 6n2 - 4n + 7 is in 0(n3).
(a)
21.
If R is
\342\200\242
\342\200\242
N = an10n + a^lO\"-1+ \342\200\242
Prove
that
an integer
+ ax10
where each at is an integer such that 0 < a, < 9, is divisible
by
ax10 + a0 is divisibleby 25.
+ a0,
25 iff
Graphs
5.1 BASIC
CONCEPTS
introduced
concepts,
Thischapterdeals more
nondirected
and
Directed
earlier
important
cases
properties
of directed
that
may
graphs,
by
possessed
with
graphs,
for
introduced
of
a number
graphs, as well
and nondirected
be
were
a few
as
such as
important
planarity and
colorability.
Definition 5.1.1.
G is
graph
elementsof E areordered
said
to be
elements
of sets (VjE),
V is a set
(digraph) the
where
directed
graph
In this case
of vertices.
pairs
from u to v, and to
of E are unordered
a pair
join
is a
u to v.
an edge (ufv)
If G is a nondirectedgraph
In this
pairs (sets)of vertices.
case
an
is
the
edge
G.
called
a multigraph.
of graphs
of the subject.
study
and multigraphs
Graphs
may
be
437
5: Graphs
Chapter
the planeand
each
edge
by a
vertex
each
curve joining
is represented
by a
point in
diagrams
the
representing
vertices of
represent
Example5.1.1.
of Figure
5-l(a) and (b) illustrate two
G, shownin Figure5-1(a), is not simple since
G' shown in
the graph
there is a loop incidenton vertex c. By contrast,
G\"
in
other
the
is
O
n
the
5-l(c)
5-l(b)
hand,
diagram
simple.
Figure
Figure
the
vertices
b
represents a multigraph since there arethreeedgesbetween
= {a,b,c,d\\ and E(G) =
and c. From the diagram, it is clearthat
V(G)
= V(G')
but E(G') =
V(G)
Moreover,
{{a,6},{a,c},{6,c},{c,c},{a,d},{c,d}}.
E(G) - {{cfc}}. The edges of the multigraph G\" do not, in fact, form a set in
the strictestsenseof the word, so to list the edgesof G\" we need to indicate
b and c somehow.For instance,
we could
between
of edges
the multiplicity
where 3{6,c}
indicatesthat thereare
list E(G\") = {{a,6},{a,c},3{6,c},{a,d},{c,<i}},
nondirected
The
diagrams
The graph
graphs.
Observethat nondirectedgraphs
for
graphs, in which
every
edge
direction
is also
there
direction.
Thus, the
as being \"the same\"
be viewed
may
(ufv) between
directed
two vertices in one
as symmetric
(d).
G
G'
mb
(a)
5-1.
nonsimple
^*f
(d)
(c)
(b)
directedgraph.
G'\"^#t
*d
*d
\342\200\242d
Figure
G\"
graph,
a simple
graph,
a multigraph,
and a
symmetric
Section
439
Basic Concepts
5.1
5-l(a).
for
directed
graphs
is retained
and
If
vlf
where
vertices
are
the vertices
of G, then the sequence(dx,
.,t>\342\200\236
=
we
of Usually,
is
the
dt
degree (u,-),
degreesequence
i>2,..
the degreesequence
is monotone
= A(G).
<
<
<
...
d2
dn
so that
that 5(G)
= dx
G.
increasing,
d2>.
\342\200\242
->dn),
order
that
the
is, so
440
Chapter 5: Graphs
5-2.
Figure
c of the graph G
The vertex
5.1.2.
Example
(2,2,3,5)
while
the
Example 5.1.3.
of G'
sequence
degree
is 3.
G'
in
Figure
The degree
is (2,2,3,3).
has
5-l(a)
sequence of G is
basic
The
in
described
of
Theorem
instance,
of degrees
relationship
the following
theorem,
or
Theory\"
its corollary
Graph
and
theorem
the
draws
one
How
For
immaterial.
graphs.
Theorem 5.1.1. If V
G,
graph
.,vn] is
{vu..
\302\243,deg(vi)
If G
then
2\\E\\.
is a directed graph,then
=
\302\243deg+(^)
The proof
Proof.
edge
contributes
on which
a count
the edge
is easy,
since
of one
Edeg-(<;;)=|\302\243|.
when
to the
is incident. D
the
degrees
are summed,
each
vertices
Section
Basic
5.1
has an interestingcorollary:
The theorem
Corollary5.1.1. In
nondirected
any
W be
Let
the set
deg(v)
\302\243
vEV(G)
Certainly,
that | W
is
deg(v)
2\342\200\236ei/
deg(v) =
]T
let
even number
U be
the set
2\\E\\.
vGU
hence
even;
is
deg(v)
2uew
= 5(G) is the
If k
5.1.2.
Corollary
\302\243deg(v)
v\342\202\254.W
and thereby
| is even
is an
there
graph
of verticesofodddegree.
Proof.
441
Concepts
even,
implying
\342\226\241
minimum
degree
of
all the
*|V|*
In
if G
particular,
\302\243 deg(v)-2\\E\\.
v\342\202\254.V(G)
is a fc-regular
then
graph,
*|V|-
deg(i;)-2|JBf|.
\302\243
uGV(G)
5.1.4.
Example
with
of
such
all othervertices,so in
degree1.
two vertices of
to which the
is simple,v
five
adjacent
the
to v.
(1,1,3,3,3,4,6,7)?
degree 7 is adjacentto
to itself
But then
only
Since
is adjacent.
be adjacent
cannot
vertices
v of
sequence
of
vertex
degree
it must
particular
vertex
the
Hence,
itself)
the conclusion
5.1.1.
Corollary
the
(1,3,3,3,5,6,6)?
would violate
sequence
a graph
degree
have
cannot
graph
simple
with
degree
the given
6. This
degree
sequence.
(c) Is
there
3,3,4,6,7)?
Yes, the
nonsimple
graph
diagram in Figure5-3exhibits
with
such
degree
a graph.
sequence
(1,1,3,
442
Chapter 5: Graphs
5-3.
Figure
5.1.3.
Definition
moreedgesofthe form
as v0
and vn
l>x
is the
...
vn)
In a nondirected graph G
{l>0,i>i }, [vifv2}9..
is called
a path
vertex, and
terminal
-,{vn_uvn}
a sequence
(sometimes
vn; v0 is the
P of zero or
abbreviated
from v0 to
initial vertex
of the
they both are calledendpoints
In
the
the
endpoints;
a cycle
A circuit
may have
is a circuit with
no
repeated verticesotherthan
other
repeated
vertices
except
the
sequence
of edges
Section
443
Basic Concepts
5.1
ir-O
a*
5-4.
Figure
of length
is repeated
twice.
Example
5.1.6. Forthe
facts:
Path
Closed path?
Simple path?
Length
5-4, we
in Figure
graph
Circuit?
Cycle?
a-d-c-e-f-j-d-a
no
yes
no
no
b-c-e-f-g-j-f-b
no
yes
yes
no .
a-b-a
no
yes
no
no
a-d-c-b-a
i-i
4
1
yes
yes
yes
yes
yes
yes
yes
yes
0
5
3
yes
yes
no
no
no
no
no
no
yes
yes
yes
yes
e-f-g-j-f-b
d-b-c-d
By definition, a simple
conversestatement not
path
need
5.1.2.
Theorem
is
a path
certainly
we have
be true,
In a graph G, every
u-v
the
path
and although
following
contains
the
result.
a simple
u-v
path.
-9{vn9vn+l} where u
has repeated
vertices, but
if
v0
not,
and
v =
then
vn+l. Of
P is
course, it may
a simple u-v
be
that
444
Chapter
5: Graphs
on the otherhand,
are
there
hypothesis,P' contains
we
Finally,
u-v
a simple
that
mention
or necessary
natural
repeated
j and
i <
where
distinct
path and,
thus, so doesP.
a numberof applications
where
there are
to apply \"weights,\"
or \"labels\"
\"capacities,\"
values
that
shall
refer
We
it
is
to the
are associated
to these all as
labelings.
Definition 5.1.4.
D is
where
E(G)\342\200\224+D,
An
graph G
of a
labeling
edge
some domain
of labels.A
vertex
is a function
f:
of G
labeling
is
a function/: V(G)-*D.
The degree
graph its degreeis
a nondirected
example
labeling. Labelings will be seen
in
context
of
the
minimal
again
spanning trees in Section5.4,in the
of binary trees in Section 5.6,in the context
context
in Section
of coloring
flows
in Chapter
7.
5.11, and in the contextof network
Exercises
to
assigns
of a vertex
which
function
an
Gx
= (VlfEx)9
=
(b)
(c)
where
Vx
{{a,6},{fe,c},{a,c},{a,d},{d,e}}.
G2 =
(V2yE2),
V2 =
where
{a,6,c,d,e}
and
{a,6,c,d,e}
and
E2 - {(a,6),(a,c),(a,d),(a,e),(e,c),(c,a)}.
G3
= (V3,E3),
where
V3
{(a,a),(a,6),(6,c),(c,d),(e,d),(d,e)}.
and
(d) Determinethe in-degree
in Exercise
the
give
sequence
sets
the
nondirected graph
sequences
following
are
(a) (2,3,3,4,4,5)
(b) (2,3,4,4,5)
with
degree
of
the
vertex in the
1
Exercise
nondirected
give the
graphs
to an
of
.,dn) is
not graphic.
in
given
translation
the graphs.
d = (dlyd29..
of each
out-degree
underlyingnondirectedgraph.Foreach
3.
it
and
{a,6,c,d,e}
\302\243i
E3 =
2.
each vertex in
equivalent (symmetric)
vertices and edges, as well
as
graphic
sequence
if
there
d. Show
is
a simple
that the
Section
Baste
5.1
445
Concepts
(c) (1,3,3,3)
(d) (2,3,3,4,5,6,7)
(e)
(1,3,3,4,5,6,6)
(f)
(2,2,4)
(g) (1,2,2,3,4,5)
(h)
all the
.,dn) where
(dud2..
sequence
Any
and
1.
n >
(i) (1,1,3,3,3,3,4,5,8,9)
Determinethe
5. Let be a nondirected
degree
has
order 9 such that eachvertex
least 5 verticeshave degree 6 or at least
6. Prove that at
6 verticeshave
have.
gfaph of
5 or
than 3.
degrees less
G can
of vertices
number
minimum
that
Suppose
edges.
5.
degree
of a
Suppose that we know the degreesof the vertices
G. Is it possible to determine the orderand
nondirected graph
6. (a)
size
of
G? Explain,
of
size
degrees
a nondirected
of the vertices
of G? Explain.
7.
a simplest
Give
(a)
having
(b)
having
no
(c)
having
exactly
one
having
exactly
one
having
exactly
two
exactly
two
(d)
(e)
(f)
having
vertices
8. Supposeyou
party
all
with
hands
shook
After
married
other
place.Noone
and no
and
married
are
three
with
possible
no vertices
handshaking
eachperson,
your
had shaken.Eachperson
gave
(c)
What
is
the
nor
himself
the
same
was completed,
including
you and
did you
how
spouse,
a different
one's
with
own
spouse,
once.
asked
that
you
suppose
many hands that person
person
more than
answer.
shake?
answer
were
a total
of 5
couples?
9. Let
(G)
and
AG denote
the
minimum
and
that
maximum
for
degrees
a nondirected
of all
graph
446
Chapter
5: Graphs
10. How
question:
Must
the number
of people at a party who do not know an odd
number of other people be even?
ever
born who had (or have)
an
(b) Must the numberof people
of brothers and sisters be even?
odd number
an odd number
of
Must
the number of families in Florida with
(c)
children be even?
12. What is the largest possible number of verticesin a graph with 35
and all vertices of degree at least3?
edges
13.Show that in a graph G there is a vertex of degree at least
[2\\E\\/\\ V\\ 1 and a vertex of degreeat most L2 \\E\\/\\ V\\ J .
14. (a) Let G be a graph with n vertices and m edges such that
the
if G has Nk vertices
vertices
have degree k or k + 1.Prove
that
of degree k and Nk+1 vertices
of degree k + 1, then
(a)
Nk-
(k
- 2m.
l)n
G have
(b) Supposeall verticesofa graph
odd number. Show that the number of
degree
edges
of/e.
15. For
any
graph
simple
or equal
than
G, prove
to l/2n(n
- 1),
that the
numberof edgesof G
n is
where
k, where k is an
is a multiple
in G
the number
is less
of vertices
of
G.
16.
(a) Therearean
(b) Therearean
(c) There
(d)
17.
There
odd
number
even
number
odd
number
are
an
are
an even
for
every
every
of vertices
of vertices
graph
graph
G?
give
For those
a counter
of even degree.
of odd degree.
Applications
are made
of
of
Graph
Theory
a number
of
Section 5.1
BasicConcepts
atoms. For
and 6 hydrogen
carbon
or hydrogen
carbon
atoms
represented
the
by
C2H6 and
graph: N
following
formula
molecular
the
by
447
the moleculecan be
H
\342\200\242
-\342\200\242H
H\302\273-
\342\200\242
know
We
must be
A. Find
the number of
bonds
any
carbon
must
atom
be 1.
in
(a)
(b)
(c) a hydrocarbonmoleculeCnH2n
a decane
(d)
molecule .C10H22.
(e) a hydrocarbonmoleculeCnH2n+2.
Can there exist (at least theoretically)a hydrocarbon
with the following molecular formulas?
B.
(a)
C3H5
(b)
C5H10
(c)
C5HU
molecule
(d) C20H39
2 in a graph G is
of length
18. Prove that the number of simplepaths
is the degree
+ d\\ + ... + dl, where
.,d\342\200\236)
(dud2i..
d\\
sequence for
G. Hint: for each vertex v in G, count the number of paths of length
with
v as
midpoint.
... <
where
dn
dx < d2 <
(dud2,.. .,d\342\200\236)
sequence
exists one with degree
(d\\ydl2i.. .,di_i)>
sequence
dl
Thus
dk
1dk
(1,1,1,2,2,2,3,3,3,3,5)
is graphic.
= 1,2,..
\342\200\224
1 for
k = n
for
the
is graphic
if and
given
with
vertex
degree
only if there
where
.,n - dn - 1,
- dn>...,n - 1.
if and only if
(1,1,1,2,2,1,2,2,2,2)
448
Chapter
5: Graphs
result to determineif
the Havel-Hakimi
are graphic:
Apply
sequences
the
following
(a) (1,1,1,1,2,2,2,2,2,2)
(b) (1,1,1,2,2,2,3,3,4,7)
(c)
(0,1,2,3,4,4)
(d)
(1,1,2,2,2,2,3,3)
(e) (1,3,3,4,5,5,5,5,5)
(f) (1,2,3,4,4,5,6,7)
3.
(a)
of
Sum
odd
(b)
is odd,
degrees
degree.
A simple
of degree
vertex
5.
with this
a graph
is
vertex
Let
Since
an
joining
Contradiction.
(d)
A simple
of order 7 cannot
graph
Let v
the
be
of
vertex
of degree
vertex
1, G
is impossible.
6. This
degree
of degree 7.
a vertex
the given degree sequence.
\342\200\224
v has 6 vertices and at least
have
with
exists
5. Usethe PigeonHolePrinciple.
8.
Hint:
this
Represent
each
and
most 6.The 7
different
10.
(a)
16
(b)
13
(c) Solve
12.
2\\E\\
15. The
>
V\\
31 V\\or
= 48
2/3
this
for all
\\E\\
represents
edge
graph.
responses
6.
by a
situation
to people
correspond
consider the degreesof
The
degree
a handshake. Now
of any vertex is at
have been
must
0,1,2,3,4,5, and
divisors k of 48.
(2/3)
35 > |
V\\implies|
edge
V\\
< 23.
connects
2 vertices.
Section 5.2
5.2
and
Isomorphisms
449
Subgraphs
AND SUBGRAPHS
ISOMORPHISMS
The concepts
of
Two graphs G
5.2.1.
Definition
nondirected
to
defined
subgraph,
graphs.
and
isomorphism
Chapter 4, extendnaturally
if there is a
isomorphic
of G to the verticesof G' such
G' are
and
the vertices
from
previously in
that
is one-to-one,
(i) /
(ii) / isonto,
and
vertices u and v
[f(u),f(v)}eE(G').
each
(iii)
for
Any
function
isomorphism
from
pair of
the above
/ with
adjacent in G iff
G E(G)iff
in G'.
are adjacent
andf(v)
f(u)
G, {u,v\\
G'. The
G to
of
vertices
u and v
In other words,
we
are
say
f preserves adjacency.
G' are isomorphic and / is an isomorphismof G to
is the names
G', then intuitively the only differencebetween the graphs
of the vertices. Indeed, if we were to change the names of the verticesof
the function
that
If the
G'
G and
graphs
vertices
1. |V(G)|-|V(G')|
2.
\\E(G)\\-\\E(G')\\
3.
If
v G
V(G)f then
sequencesof G
4. If
{vyv}
is
in G,
a loop
generally,if v0
in G, thenf(v0)
vx
v2
f(vx)
and,
degG(/(i>)),
thus,
the degree
the same.
Gf are
and
degG(i>)
then
-
{f(v)ff(v)}
... -
- f(v2)
vk_x
... -
is a loop
vk = v0 is
f{vk_x)
length
Discovering
In
G\\
particular,
the cycle
Isomorphisms
Theproblem
of
determining
is known
as
the
isomorphism
whether
problem,
450
Chapter
5: Graphs
to the
known algorithms which guarantee a correctanswer
isomorphism
n is the
where
usually require approximately 2n operations
For instance,
if G and G' are two
number of vertices.
with
the
graphs
to answer the isomorphism
same number of vertices, we might
attempt
the entire list of one-to-one onto
searching
question by exhaustively
\342\200\224*
if n = | V(G) |, there aren\\ such
But
one-to-one
V(G').
mapsf:V(G)
onto maps /, and, of course,n\\ is quite
large even for small values of n.
is particularly
The isomorphism
itself
difficult, but once we
problem
onto map f:V(G) \342\200\224*
of checking
a one-to-one
the process
have
V(G')
is fairly easy. We
whether or not this map is, in fact, an isomorphism
matrix
as a bookkeeping
device for
simply employthe adjacency
problem
all
recording
adjacencies.
If vuv2y..
this
the vertices
of G, then
vertices of G is the n x n
are
-,vn
of the
ordering
matrix
A, where
17th
for
entry
= 0.
(ij)
edge {vifVj} is an edge
matrix each of whose entriesis either0 or 1.
Thus, A is a symmetric
1 will appear on the ith position
is
of the diagonal of A iff there
Moreover,
if we change the orderingof theverticesof G, then
a loop at Vi. Of course,
the entries of A will be rearranged.
the proof
Then we have the following
of which we leave to the
fact,
A (ij)
of
1 iff the
is
reader.
Suppose
that
V(G')
is a
matrix
be
if
.,vn
for
matrix
/ is an
Then
adjacency matrices
iff the
Of course,
that
ordering Vi,v2y-.
adjacency
\342\200\242
->f(vn).
V(G')
and
one-to-one
be
and
\342\200\224\342\226\272
adjacency
vertices of G.
vertex ordering
of the
the
isomorphism
A
the
A' are
from
V(G)
to
equal.
the
proves is that
the case that
function.
in
maps
a smaller
list.
d.
must
Example
5.2.1.
The graphs G
and
G' of
Figure 5-5
are isomorphic.
6, d,
since these
vertices
Section5.2
and
Isomorphisms
451
Subgraphs
Figure 5-5.
/(e)
e' is
the matrix
10
110
10
1110
10
10
111
0.0010
It
d\\
is routine
and
e to
Thus,
in
to
each have
(^n-iO
one-to-one
more
Next
manageable
Graphs
we
numbers
than
any
luck,
this number
will
n\\.
Are Not
Isomorphic
this
How do we showthat graphs
question:
of exhaustive
search?
show
that two graphs are not isomorphicis to find
are
not
short
One way
and G'
b', c to c', d to
address
isomorphic,
property
a', b to
at least,
When
a to
search
and G'
be
maps
cases
some
the
shorten
vertices
Determining
to
that
isomorphic
graphs must
example,
if G
the
and G'
of vertices,
have different
for
two
have
Likewise,
some
graphs
different
if they
452
Chapter 5: Graphs
But
unfortunately,
the
hence
(and
two
the samedegreesequence
vertices and edges)and still not
may have
graphs
number of
same
be
In this case,we must dig deeper for reasons why they are not
Here's where the rub comes;there is generally
no
set
works
and
we
must
resortto
that
a
whole
of
tricks.
procedure
grab-bag
one approach seemsto work fairly often. Let us attempt to
Nevertheless,
isomorphic.
isomorphic.
describethat approachin
basic idea
The
terms.
general
preserved
the
classes
if the two
into
vertices
Then
isomorphism.
by
Definition 5.2.2. If
is a
iff V(H)
pairs of verticesin
Example
G'
graph
V(G')
G,
while
W.
{viyV2yV4yV5}.
The
graph
not
G\"\" shown
in E(G).
in (e)
is not a subgraph of G
the
because
edge
incident on v\\
more
obtained by deleting
of them.
A
simple
nondirected
a complete
graph
on
generally,
the verticesvx,...,
graph
n vertices,
we write
vk
and
[vly..
.,vk\\
all edges
for
the
incident
graph
on any
Section
5.2
Isomorphisms and
453
Subgraphs
v4#
(b)
vi
e7
\342\200\242
v,#\342\200\224\342\200\224
*5
v4#-
\\
\342\200\242
v.
*4
v4#
\342\226\240\342\200\242
v\302\253
(c)
(e)
(d)
5-6.
Figure
l?n. A complete
vertices
has
vertices
two
\"building
graphs
K2
graph,
Graphs G, G\\
graph on n verticeshas n
\342\200\224
1. A
degreen
by an
which
joined
blocks\"
in Figure
and a
may
are complete
5-5 consist
of two K3
loop.
5.2.3.
Example
(n
graph
Any
- l)/2
\342\200\242
subgraph
complete
edge.
We
show
the two
that
graphs in Figure
isomorphic.
Both
graphs
degree 2,4
the
similarity
have 8
verticesof degree3,and
ends.
If the
Figure
one
two graphs
5-7.
vertex
of degree
have
3 vertices
of
4. However, there
Two nonisomorphic
graphs.
454
Chapter5: Graphs
subgraphs induced by
the
first
no pair
graph
Two nonisomorphic
5-8.
Figure
the
vertices
of vertices
graphs.
5.2.4.
Example
two graphs
These
degree 3.
first
a-b-j-a,
triangle
length
The
isomorphic.
and
all vertices
have 10 verticesand 15edges,
are of
a subgraph
of 3 adjacent vertices(the
has
graph
for example),
but the second containsno cycles
of
3.
Example
5.2.5.
Figure
5-9.
isomorphic.
Section5.2
and
Isomorphisms
455
Subgraphs
a'. (See
Figure 5-10).
Clearly/
then
be
must
g to
match
d\\
to
not
adjacentto e
not to /'. Hence
but
we
b'.
and
match
and
e,
isomorphismbetweenthesegraphs
/ is matched
remain
only
there
Now
d' (matched
e to c' and
d, whereas
must
or b'. Say
either g'
c to
unmatched
there is an
with
e', and
matched
with
c' and
then
g\\
two
/'. Vertex g is
to c' but
is adjacent
g)
d to /'.
to
We
the
that
conclude
if
we have
matching
obtained,
a -\302\273a'
b \342\200\224*
e'
\342\200\224
c
6'
d -/'
\342\200\224\342\226\272
c'
\342\200\224\342\200\242*'
\342\200\224
d'
must
be such
fact it is an
an isomorphism.
isomorphism.
Thereis a simpler
way
involves
the
Checkingthat edgesmatch,we
use
to
verify
of complements
that
these graphs
see
that
in
are isomorphic.It
of graphs.
of H in
of G, the complement
Definition 5.2.3. If if isa subgraph
H are
G
of
is
the
that
the
E(H);
is,
G,denotedby H(G),
edges
subgraph
mc
/\342\200\242
Figure
5-10.
e'*
Neighbors of a
\342\200\242
d'
and
a'.
456
Chapter
5: Graphs
v5#C
from
deleted
A graph
5-11.
Figure
those of
its
and
v2
\302\273
complement.
G. If H is a simplegraph
H of H is the complement
of#
complement
\\
v5#
^#v2
in
Example
5-ll(a)
5.2.6.
A graph
the
vertices
with
Kn.
vertices
two
= | V(H)
in
\\.
Figure
and (b).
5.2.4.
Definition
Figure
Let G
D G\\
is the
graph
The
graphs.
whose vertex
the
graphs
of
intersection
set is V(G)
in Figure
5-9.
V(G')
Section 5.2
and whose
the
graph
the
union
edge set is E(G) D E(G').Similarly,
set V(G) U V(G') and edgesetE(G)
vertex
if G
complete
on
graph
vertices,
457
Subgraphs
of G
with
In general,
Special
and
Isomorphisms
and G' is
E(G').
G U
then
G is a
n vertices.
Graphs
graph
complete
One
example
graph
complete
Every
previously.
interesting
with n vertices. We
of graphs, which,
special
classes
class of
isomorphic graphs.
Definition 5.2.5.
whoseedges
a cycle
Example 5.2.7.
of length
of
classes
K5, C5,
is
are
shown
the
Kb.
Definition
set
of
Graphs
in Figure
complement of
graph
cycle
form
vertices
5.2.6.
can
bipartite
be partitioned
/X
.4fe-
(a)
i\\71
\342\200\242/X-
(d)
(c)
(b)
Figure 5-13.
K5,
C6,
lV6f P6,
and N6.
\342\200\242
(e)
\342\200\242
458
Chapter5:Graphs
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\302\273
\342\200\242
(a)
\342\200\242
(c)
(b)
5-14.
Figure
Khn is called a
star graph.
Example5.2.8.
are
that
Graphs
graphs.
bipartite
order m and n
we normally
(where
Complete
The
graphs,
5-15, shows
Figure
figure,
the graphs
of
the
edges
octahedron,cube,
and
icosahedron,
Exercises
1. Determineall nonisomorphic
3. Do the samefor those
11 of order 4.)
Which
are
five
other
are
interesting
especially
five platonic
in (a),
shown
solids: tetrahedron,
dodecahedron.
5.2
for Section
2.
of the
Khb
is
that
graph
of
the
isomorphic?
following
Justify
simple
of order
nondirected
4. (Hint:
graphs
there are 4
of order
3 and
of order
\\
\302\273
*\302\273
<1
,1
\\
Tetrahedron
Octahedron
Cube
/I/VA|\\
Dodecahedron
Icosahedron
Figure 5-15.
Section5.2
and
isomorphisms
Subgraphs
459
b'
c
\342\200\242
(a)
a'%
(b)
c'e
(c)
(d)
Figure
5-16.
460
Chapter
5: Graphs
(e)
g\302\273
(f)
\342\200\242
(g)
(h)
Figure
5-16.
continued
b'
Section
5.2
isomorphisms
(i)
and Subgraphs
461
c
\342\200\242
\342\200\242d'
am
(j)
\342\200\242
c
>\342\200\242/>'
(k)
(1)
Figure
5-16.
continued
462
Chapter
5: Graphs
(m)
(n)
J>fc<L
(o)
c
\342\200\242
(P)
gf
\\
c
\342\200\242
\342\226\240
\342\200\242r
Vs
*y\"*y
(q)
*^
\302\243\342\200\242
r
\342\200\242
M
e'
Figure
5-16.
continued
>y
Section
5.2
Isomorphisms
463
and Subgraphs
(r)
Figure
(a)
Give an
2 edges
5-16.
continued
4 vertices
they
are
and
not
isomorphic.
and
G\"
size 2.
be any
3 nondirected
two
simple graphs of
of
these
graphs
order
are
isomorphic.
(a)
(b)
Figure
5-17
464
Chapter5: Graphs
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
G2
>
\342\200\224
\342\200\242
\342\200\242
5-18
Figure
graph
every
with
(2,2,2,2,2,2,2,2)to
has
an example of
7. Give
with
(2,2,2,2,2,2).
sequence
degree
vertices
G be a simplegraph
8. Let
21
|\302\243|
9.
Verify that
(2,2,2,2,2,2,2,2).
a graph
that
Prove
What
-3.
V\\
said about G?
G is isomorphic to a graph H
vertices of
of the
ordering
have degree 3
vertices
of whose
all
and
11. (a)
two
that
Show
is an
the resulting
of K2t5.
the graph
Draw
there
if
that
such
adjacencymatricesareequal.
10.
and
can be
simple
complements are
(b) If a simplegraph
complement, how
graphs are
and
only
if their
to its
is isomorphic
does it have?
n vertices
with
vertices
many
isomorphic if
isomorphic.
with
be isomorphic
vertices
to its
complement?
12.
Let
cycle
be the
Cn
isomorphic
graph
its
with
graph
C5,
and
vertices
generalized
5 vertices,
Prove
n vertices.
complement.
be obtained
by taking an outer
may
5 \"spokes\"incident to the verticesof
n-cycle, n spokes
and
n-cycle,
fe-th
inner n-cycle attached by joining its verticesto every
Thus, P(5,2) is the Petersen graph.
of P(7,2), P(9,2), P(7,3), and P(9,4).
Draw
a diagram
(a)
is isomorphic to P(nfn - k).
Prove
that
(b)
P(n,k)
14.
Let
be
\302\247n
the
each vertex
class
of all
has degree3,that
is
is
\302\247n
the
vertices
class
of all
and
an
spoke.
where
cubic graphs
Section
5.2
Isomorphisms
on n vertices.Then Sn can
wherewe define two graphs
(a)
Show
is a
if G
that
(VyE)
of 3.
multiple
class
determined
and
one
equivalence
(d)
Show
the
graph
graphs
nonisomorphic
that
every graph in
that
class
for
\302\2474,
namely
by K4.
H:
\342\200\242
\342\200\242c
are
465
be partitioned
and Subgraphs
the
all 6
in
\302\247e.
is isomorphic
\302\2476
6 graphs
illustrated
graphs are in
to H.
below are
to K3>3 or
Ss.
466
Chapter5: Graphs
of
circumference
the following
the
of
circumference
(b)
(a) C5
16.
(c)
K5
The Petersen
(d)
that
Prove
every
G. Find
graphs,
K3.3.
of the
converse
the
and
following
statements:
are isomorphicgraphs,then G
numberof vertices.
If G and H are isomorphic graphs,then G
degree sequence.
and H
If G
(a)
(b)
of
Which
of edges
20.
Show
that
Ln2/4J
vertices
of
a simple
H have
the same
and
H have
the same
are true?
statements
these
and
graph
with
in (a) Kn
in Xm>n.
| V |
(b)
= n
(c) Cn
Kmn
is not
bipartite
if
| E \\ >
= M U N and
where
that G is a bipartitegraph
V(G)
in
N.
Prove
that
the
eachedgeofG joins a vertex in M to a vertex
sum of the degrees of the verticesin M is equal to the sum of the
(a) Suppose
degreesofthevertices
N.
in
Are
(b)
there
bipartite
following
degree
sequences?
(i)
(3,3,3,5,6,6,6,6,6,6).
(ii) (3,5,5,5,5,5,5,5,5,5).
(iii) (4,5,5,5,5,5,5,5,7,10,10,10).
G has n vertices, all but one of odd
a graph
how many
degree,
in the complement?
vertices of odd degreearethere
If vu i>2,..., vp are the vertices of a graph G and A is the adjacency
matrix of G, prove the following:
from vt to v}-oflength n
(a) An(iJ) = the numberof different
paths
inG.
(b) A2(iyi) = degree of vt.
in G. Here Tr(B) for a
of 3-cycles
(c) (l/6)Tr(A3) = the number
B means the trace of B which
is defined as the sum of
matrix
21.If
22.
the
23. If
{vltv2,...,vn)
incidence
matrix
B(iJ) = 1 iff
of 23.
entries
diagonal
and
V(G)
of the
vertex
{elye2y.. .,em} =
graph G as the
vt is
incident
with
the
B where
matrix
= 0
edge
e; and B(iJ)
incidence
matrices:
facts
about
otherwise.Prove the following
(a) No two columnsofB are equal.
The
sum of the entries in any columnis 2.
(b)
G'
If G and G' are two graphs, then G and
(c)
are isomorphic
iff
Sectiori
5.2
their incidencematricesare
verticesand edges.
24.
G is bipartite
a graph
that
Show
in sucha way
iff
some
of their
ordering
of G
vertices
the
matrix
its adjacency
that
for
equal
467
and Subgraphs
Isomorphisms
can be labeled
in the
be represented
can
form
B]
[0
[B1 o]
whoseonly
A2
with
1 1
2 2
2 2
1 1 4 1 1
1 3
1 2
1 2 2 1 2 3
B and 0 is a matrix
zero.
the graph G
1 1
3 2
2 3
of the matrix
transpose
are
entries
25. Determine
4
the
means
Bl
where
A such
matrix
adjacency
that
4 9 9 4 9 9]
and
A*
5
4 9
9 4
9 4
9
4
9
4
4
9
4
9
9
4
9
4
5
4
9
5
4J
> 3, where
([(G) is the diameterof the simple
d (G) < 3, whereG is the complement
of G. Then if G
to Gfd(G) = 2 or 3.
is a graph where the set of vertices
be
graph
may
into three subsets so that no edge has incident vertices
if
d(G)
G, then
graph
is isomorphic
27.
tripartite
partitioned
in the
(a)
same subset.
Give
of a
an example
In general,a
the
set
of
vertex
tripartite graph.
G is
graph
G into
is possible to partition
k-partite
if it
k disjoint
subsets VlyV2i..
,Vk
such
the other
each edge has one endpointin one subset
V,- and
i ^ j. A complete
graph
k-partite
endpoint in some V} where
the additional
is a simple k-partitegraph
with
property that
i =\302\243
to each vertex in V} where
each vertex in V,- is adjacent
j,
=
k
for all i and j. If ni
-partite graph is
\\Vi\\i then the complete
that
denoted
by
(b)
(c)
(d)
Selected
Answers
2. (a)
Kni,n2,...,n,.
an example of X2>2,3.
an example of #2,2,2,2
Draw
Determine
the size of Knun^.
Draw
for Section
\342\200\242
m nk.
5.2
nonadjacent
in
one
graph,
468
Chapter
5: Graphs
(b)
remove vertices of
Isomorphic;
graphs.
remaining
consider
Nonisomorphic;
(f)
complements.
5 and
their
incident
(i) Isomorphic; remove the verticesof degree
from
each
an
observe
graph,
isomorphism for the
edges
extend.
and
remaining
graphs
of the vertex
of degree
(k) Nonisomorphic; considerthe neighbors
5 in each graph.
3. Hint:If
adjacent
4 and
has order
graph
or nonadjacent.
8. Note that
1^1 = 6:Concludethat
is isomorphic
to X33
be
or the
graph
13.
(a)
P(7,2)
P(7,3)
5.3
TREES
PROPERTIES
AND THEIR
In
this
we
section
as a
known
tree is a
root. rooted
is a directed
A
nondirected
simple
rooted
a very
important specialkind
of
graph
Definition 5.3.1.
unique
will study
tree.
tree
path
tree
is a
Trees
Section 5.3
and
Spanning
G2
<?i
469
Trees
\342\200\242
\342\200\242
b%
b*^
%d
\342\200\242
e
\342\200\242
root, and we
one vertex
shall
that
(V,EX)
Ex
\342\200\242
i
nondirected trees.
the root.
it as
Two
trees,
and G2 ='(V,E2),
V=
T with
v in
only
tree.
of this definition
applies to nondirectedgraphs
A tree may be either a digraph or a nondirected
tree any vertex may be designated
asa root.
Example5.3.1.
-
t
\342\200\242
part
in
if
the
is calleda trivial
graph.Note
Gx
Two kinds of
designate
is the lengthof
hm
\342\200\242/
5-19.
Figure
^%d
\342\200\224
rooted tree
#c
\342\200\224
\342\200\242\342\226\272\342\200\242
Gx and
G2, are
where
{afb,cfd,efffgfhfij}f
= {{a,c},{6,c},{c,d},{c,\342\202\254},{e,^},{/,^},{^,i},{h,i},{i
J}}, and
E2 = {(c,a),(c,6),(c,d),(c,/),(/,e),(/,0,(^,d),(/i,e),0\302\273}.
Neitherof these
each
Example
(V,E),
were
tree,
vertex./
5.3.2.
V
directed
is at level
tree. If
is a
trees
rootof
tree
directed
{a,b,c9d,e,f,g,h}
Figure
4 in Gx
5-20.
vertex c is designatedasthe
and
at level
3 in G2.
5-20. T =
=
and E
{(a,6),(a,c),(a,d),(6,e),
T is
A directed
shown in Figure
tree.
470
Chapter5: Graphs
root of T is the vertexa and the verticesat level
2
trees are conventionally
drawn
with the root at the
top and all edgesgoing from the top of the page toward the bottom, so
of edges is sometimes not explicitlyshown.
direction
that
the
The
(d,/),(e,\302\243),(e,/i)}.
are
e and
/. Directed
Trees arise
in
many
hierarchy
first, or
elements
what
is more
For
what is moredesirable.
the order
in
product;
expresses
applications;
are to be
practical
which
the root
they occur in
frequently
organized into
important,
instance,
what
can be
a tree
some sort of
must
be
done
used to show
tasks
of some
are to be completed in the assembly
and tasks that can
can represent the finished
product,
levelthan B.
Example 5.3.3.
algebraic
formulas
as tree
Frequently
computer
as
Figure 5-21
If b werethe expression
x
(c
scientist
For example, a
structures.
d) we
may write
a + (c x d)
Figure
5-22
can
describes
be diagrammed
Section
Trees
5.3
The expression
and
(a + 5) x
be
can
471
Trees
Spanning
as
pictured
Figure 5-23
each
starting
from the
top
a
~
\302\251.^
\\\302\251
\"
\\
A.
\302\251
\302\251>
>\302\251
\302\251
\302\251/'\\
\302\251\342\200\236
a5/+
X3bc + d2
Figure 5-24
notation
this
invented
notation
by
is that
Jan
it is
formula
Lukasiewicz
written
in the
(1878-1956).
prefix
operator
The advantage of
that
it does
not
employ parentheses.
algebraic
Any*
with
the
operator
expression
written
can be written in
before its arguments
472
Chapter
5: Graphs
after
gously, one can placethe operator
its
this is
and
arguments,
called
the
operator postfix notation.Thus,
algebraic
expression
depicted in
in
written
5-21
can
be
notation
as
the
a6+,
postfix
Figure
expressionof
acd
x
the
5-22
and
becomes
notation
for
the
+,
postfix
Figure
expression
of Figures 5-23.and5-24isa5 + 36xc + d2+ 4- x. (Prefix and postfix
notation are nothing morethan the preorder
or
tree traversals
postorder
in Section
described
5.6.)
In
is a
vertices
nondirected
each
iff
pair
this we
b of a
path from a to b
of its vertices is
a and
G by aRb
define the relation R on the verticesof a graph
connected, then R is an equivalence relation.Consequently,
of G can be partitionedinto disjoint
sets Vlt V2>- \342\200\242
\342\200\242>
nonempty
Vk
if we
general,
b are
a and
iff
To do
of trees.
a characterization
of connectivity.Two
the concept
discuss
to
need
the
vertices
and
the
respectively,
components
C(G)and,
of G. Usually
G is
of course,
denote
we
connected
iff
induced
by
components
\342\200\242
and
\342\200\242>
VltV2>of
or
simply
Vk,
the
C (G)
Definition5.3.2. If
G
that
If
is
and e
connected
G is
graph
- e
be a
bridge
not connected,
to
is an edgesuch
or a cut edge.
then
is
a cut
vertex.
Example
Let G
5.3.4.
This graph G
has
be
the
3 components;
graph
^b
a<*
\342\200\242
c
em
Figure
5-25.
\342\200\242
A graph
with
%g
3 components.
i
#
k
\342\200\242
Section
Trees
5.3
are i and g and j
vertex of the first
but
k,
5.3.1.
Theorem
connected.Moreover,
c is
a cut
nondirected
simple
of trees.
properties
interesting
G is
graph
a tree
iff
is
no cycles.
and contains
connected
k are not
i and
473
Trees
Spanning
component.
present a few
let us
Now
and
and
Proof. Suppose
G is
a path,
by
u and v,
one along one portion of
vertices
the cycle
betweenu and v,
b be
and
thus
that
a tree
G is
different
paths suchthat
vertex
the
path completing
is a unique simple
the
path
has no cycles.
connected and containsno cycles.Leta
6, then
a to
other
there
that
any pair
and
suppose
Conversely,
the
and
following
vx
on
Px
2 different
simple
paths, Px
in G
following
In every
5.3.2.
Theorem
of degree
vertex
1.
(We are
excludingthe trivial
tree
with
only one
vertex.)
Theorem
Proof.
vertices.
If
n =
it.
leave
cannot
We
employ
1, there
Assume, then,
for
tree
with
n vertices
has exactly n
- 1 edges.
on the number of
induction
mathematical
for n = 1.
are no edges. Hence,the resultis trivial
> 1 that all trees with
n vertices
have exactly n - 1
474
Chapter
5: Graphs
v./-
\342\200\242^./*
\\
5-26
Figure
edges.
Then
consider an
previoustheorem,thereis
1 vertices.
degree 1. Let us
T of
v in
vertex
By the
\"prune\"
this
T that
is,
by removing this vertex and its associatededgee from
in
v. Let us illustrate
the
5-26.
consider T\" = T \342\200\224
picture Figure
by
Notethat T\" has n vertices and one fewer edge than T.But morethan
a and b in T\" there
is a
T\" is connected
since for any pair of vertices
that,
a
in
T.
has
not
been
to
b
this
from
Moreover,
path
unique simple path
of the vertex v and the edge e. Likewise, there are
affected
by the removal
no cycles in T\" since there were none in T. Thus, T\" is a tree and the
1 edges.
But then T must
inductive hypothesis impliesthat T\" has n \342\200\224
T\".
n edges
\342\226\241
as T has one more edgethan
have
tree
We
can
Corollary 5.3.1. If
verticesof degree1.
Proof.
Let
5.3.2.
upon Theorem
improve
= the
is
tree then
a nontrivial
number
of vertices of
G containsat least2
G. By
the
of degrees
sum
formula,
degdu)
\302\243
Now if there
- 2(n - 1) -
- 2|E|
X! deg(i>t)
i' = l
But
of degree
i =
for
2,...,
2).
1, then
n
and
i^,
(2n
= 1
+ X! <*eg(i\\)
>
1 +
2n
- 2 \302\253
2n
1.
i-2
then
2n
\342\200\224
2 >
2n
- 1 or
Section
Trees and
5.3
#
\\
Theorem
by adding
5.3.4.
an edge,
/\\
y\\
trees
nonisomorphic
The following
on 6 vertices.
The trees
5-27.
Figure
\342\200\242
A\\
\\
/\\
475
Trees
#v
Spanning
also
prove
with 6
vertices.
useful.
additional
Example5.3.6.
will create
5-28
have
We
definition.
this
already
There
Adding
any
of the
dotted
Figure
a cycle.
are
the
onemore
at
point.
Theorem
5.3.5.
A graph
G isa tree if
and
only
if G
has no cyclesand
\\E\\-\\V\\-1.
-^
\342\200\242\342\200\224\342\200\242\342\200\224\342\200\242
Figure
5-28
476
Chapter 5: Graphs
5.3.3 we have already proved
In Theorem
one
of the
Proof.
half
theorem. To prove the other half we need only show that if G has no
G is connected.
Denote by GUG2,.. .,Gkthe
| = | V| - 1,then
and|E
cycles
=
>
1.
k
the
o
f
where
Let
number of vertices of G,-.
G,
| V^ |
components
and G, contains no cyclessinceG
each Gt is a tree, for Gt is connected
Now
not. Thus,
does
G, has | V{ \\ - 1 edges. Hence G has (| Vx \\ - 1) + (| V2 \\ . +
\342\200\242
\342\226\240
\342\200\242
+ |V,|+ . \342\200\242
+
D+
D-IVJ
\\Vk\\-k-\\V\\-k
<|VJ\342\200\224
1
k = 1, and G is
G
has
Thus,
|V|
edges.
edges. By hypothesis,
connected.
Exercises
\342\226\241
5.3
Section
for
1. Tell how
(a)
(b)
different
many
of order
trees there
nonisomorphic)
(pairwise
are
(c) 4
(d) 5
2. (a)
if G
that
Prove
is a
of
degrees
21 V \\ \342\200\224
equals
2.
Draw
(b)
V \\ = 7
the
degree
and at
least
sequence
first.
3.
an
Give
4. Listall
5 and
2 vertices
of degree3?
example
vertices a
=
| V \\
and b
there
pairwise
are
(a) (1,1,1,1,2,2,3,3)
(b) (1,1,1,1,2,2,2,3,3)
5.
(c)
(1,1,1,1,1,1,2,3,5)
Show
that there
(1,1,2,2,3,3)
(a)
is no tree with
degree
sequence
(b) (1,1,2,2,2,2,3,3,3,3,3,3)
(c) (1,1,1,1,1,1,2,3,7),
6.
different
possible
degree sequences
of a tree
(a)
7.
the
Determine
with
17
vertices
and
Section
and Spanning
Trees
5.3
8. Provethat a simple
the additionof any
9. Let G
10. Show
a formula
that a
graph G
circuits.
11.
(a)
with k
a graph
be
Obtain
tree.
edge
for
is
a tree iff
forms
no cycles
contains
a cycle.
477
and
2 components.
at least
G contains
where
G is
graph
new
Trees
is a
components, where eachcomponent
k.
| E | in terms of | V | and
a tree iff G is connected and containsno
sequence
degree
12. Characterize
vertices as
(1,1,2,2,2).
the
having
such
must
same
a graph
number
look like
of
and
explain
why).
13.
14.
T be
1.
1 > 2 contains
at
that a connectedgraph with | E \\ = | V \\ \342\200\224
least 2 verticesthat are not cut vertices.
1 > 2 contains
at
Show that a connectedgraph with | E \\ = | V | \342\200\224
least one cut vertex.
of degree
that
a tree T has Nx vertices
1, 2 vertices of
Suppose
4.Find
2, 4 vertices of degree 3 and 3 verticesof degree
degree
(b) Show
(c)
15.
(a)
Nx.
(b)
that a
Suppose
degree 2, N3
Find
Nx
in terms
17.
Write
the
a tree
of degree
1, N2 vertices of
3,.. .,Nk vertices of degreek.
vertices
of degree
of N2,N3,...,
and Nk.
with
2 vertices
exactly
of degree 1.
expression
{[(a +
as
tree T has Nx
vertices
and then
6)xc]
x(d + e)}-
express the
[f-(gxh))
result in operatorprefix
notation.
478
Chapter
5: Graphs
graph that
a directed
be
in V. Suppose
vu..
the
are
.,vk
vertices
is a tree and v0
to
adjacent
v0.
S( =
=
E
E{
to v( by a
is connected
S,-),and Tt = ($,\302\243,),
(a) Showthat the subgraphs
T{
(b) Show that each T{ is a tree.
(c) Show that every edge of T
are
disjoint.
not
incident
to
v0
is
a vertex
be
Let
in one
\\ u
\\u
(S, x
of the
7Vs.
19. Supposethat
is a
be connected
20.
is
forest
connected
(1/2)
a simple
of
2 connected
exactly
are trees.
a forest
of
components
with
graph with
- 1) (n
simple
if\\E\\>
an
from a
edge
components.
22. Given a
23.
24.
G is
If
(a)
a simple
that if e
graph
is any
with
of G,
edge
if
C(G)
exactly
a simple
For
(b)
+ 1 components.
C(G)
graph G with
\342\200\224
e has
is a
than G
forest,
- e
has
See Exercise21.
connected
prove
components,
by induction
all of
show
components,
at most C(G) + 1
connected
C(G)
then G
components.In particular,
n vertices,
that
| V(G)
\\
<
C(G)+\\E(G)\\.
25.
Draw all
2 or
(a)
26.
more connected
| E | = 8.Determine
k.
Hint:
7 connected
See Exercise
9.
components
and | V \\ =
33, find
\\E\\.
27.
Show
a graph
that
degree0
28. If
a graph
is
Is the
connected.
no
with
not
tree can
of
the
of odd
connected,
prove
that its
complement G
is
converse true?
29. In a connected
graph
length have a common
30. Prove by
vertices
a circuit.
contain
must
G,
prove
that
any two
paths of maximal
vertex.
be coloredwith
same
color
are adjacent.
Section5.3
Treesand
31. Suppose
that
Gx and
G2 are isomorphic
then G2 is connected.
connected,
479
Trees
Spanning
if
Gx is
1 for
1.
(a)
3.
Any
Cn.
graph
cycle
(d) 3
(c) 2
(b)
of G,then | E{Qi)
Gl9.. .,Gkarethe components
= Z?_i (W(Gd
each L Then | E(G) | = &M \\ E(Gd
|
9. If
|
\\
= | V(Gt)
- 1) =
\\
| V(G)
\\
k.
15. (a)
Recall that
for
|E
a tree
\\
| V\\
sum of degrees
by the
\342\200\224
1 and
formula
iV1
2.2
2(|V|-l)
= 2(NX
=
(b) Similar
Nv
2iVx
+ 2
3-1)
laThus^^l^
to (a); observethat
2 = N3
+ 2N4 +
3iV5
...
+ (*
- 2)Nk.
17.
P
^>f
fu\\
A
0
\302\251
-XX
A
\302\251
\302\251
+abc+de-fXgh
each
22. Label the componentsGX,G2,..
Fix roots
.,0^.
vt in
G,. Join
one edge between vx and v2, one between y2 and v3, etc. There are
1 such
k \342\200\224
Also we could apply Exercise9.
adjunctions.
Chapter
5: Graphs
TREES
SPANNING
5.4.1.
Definition
tree of
if is
(a)
(b) H
A
a tree,
of
tree
trees
the
vertices
is a
that
play an
for
exploredin the exercises
{a,6,c,d,e} and E in
which
Figure
is T
this
still
allowing
computer
algorithms
of the
definition are
V =
where
(V,E)
{(a,c),(6,a),(6,6),(6,c),(c,d),(c,e),(d,c),(d,
directed spanningtreesof G,one
(shown in Figure 5-30).
= (V,{(6,a),(a,c),(c,d),(c,e)}),
graph
Consider
represents
verticescorrespond
to
communication
links.
consequences
section.
5-29).
Example 5.4.2.
that
this
the
5.4.1.
Example
of
of G.
graphs. Some of
work on
(shown
G is calleda spanning
G.
Spanning,
that
a graph
H of
subgraph
and
all
contains
spanning
tree
if
stations
the
edges
correspond
to
What
is the
give
while
two
is one
ways
way
to
For example,
Figure 5-29
Section5.4
Trees
Spanning
481
*%d
Figure 5-30.
Tof the
tree
spanning
graph
in Figure
5-29.
circuit
of
rank
The
idea
following
in the above
theorem.
5.4.1.
Theorem
contains
G.
illustrated
a spanning
until no further
cycles
nondirected
remain,
tree. Indeed,
if
then
G is
we
f
a%
J*J
bm-
\302\251\302\243
(b)
(a)
Figure
5-31
482
Chapter5: Graphs
hypothesis because
the inductive
since
one
The
G.
Before
Suppose
simple path in
vn_i
(b)
v09vu..
(e) If
If
(f)
T. Then
child of vn_x.
an ancestor of v,
of
subgraph
as a
designated
is an
internal
of v and
vertex
of T.
all its descendants,with
of Figure
5-19, a is designated as the
of T; i is the parentof h and j;f,h,i, and
c are the ancestors
of e; and the children
the tree
the parent
and
Search
based
algorithm
until
a cycle
on the
no cycles
for
are
finding
known
depth-first search
The
on a
the
idea
cycles
remain.
the
and c is
tree
as breadth-first
of breadth-first
be designed
could
such
Unfortunately,
of a
search
an
to
is
of finding
algorithm
process
time-consuming
we
can
define
spanning
(abbreviated
5.4.1
other
rather
efficient
DFS).
search is to
visit
all
vertices
opportupity.
a leaf,
a connected
internal
are
Search
Depth-First
algorithms
a.
of
from
j are leaves
and
b.d,f,h,
of u.
a descendant
j are
An
for
is a leaf of T.
T consisting
If, in
5.4.3.
Example
Breadth-First
trees
of vn.
v is
then
leaf of T, then v
not a
v is
(g) The
root,
\342\226\241
then a
no children,
has
then
induction.
vertices
are
of vn.
parent
are
the
ancestors
.,un_i
vn is a
If u is
(d)
is the
(a)
(c)
Let T
5.4.2.
u and
that
mathematical
tree by
a spanning
graphs,
Definition
has
fewer
of G, the spanning
describing
connected
\342\200\224
e has
\342\200\224
e has
for
G - e isstillconnected
and
cycles. Then
of the
one
sequentially
at
search,
on
the
first
Section 5.4
Let us
5.4.4.
Example
of Figure
483
Trees
Spanning
the
graph
5-31 (a).
the ordering
of the vertices abcdefghijk.Thenwe select
a as
T and designate
vertex chosenin the spanning
it as the root
tree
T. Thus,
a. Add to T all
at this stage, T consistsof the single
of
vertex
edges {a>x}, as x runs in order from b to k, that do not producea cycle in T.
Theseedges are now called tree edges for the
Thus, we add {a,b}and {a,d}.
select
We
the first
breadth-first searchtree.
Now
the process
for all vertices on level one from
each vertex in the designatedorder.Thus,
since
repeat
examining
level one, we
For
the edge
include
we
by
would
produce
{d,e}.
Next,
the
consider
we
include
and
{e,/}
root
by
d are
at
b.
examine
first
the
b and
at level
vertices
d, we reject the
T. But we include
for
a cycle in
{e,g}.
three.
level
Reject
On levelfour, include
{hfi}> {h,j\\, and {h,k}.
on level five at i, j> and k, but
the
Next, we attempt to apply
procedure
ends. The
so
no edge can be added at thesevertices
the
procedure
the
and k,
includes
vertices
spanning tree T therefore
afb,cfdfefffg>hyij,
and
and the edges{a,6},
{a,d},
{d,e}, {e,/}, {e,g}, {f,h}> \\h,i},
{6,c},
{hj}y
ML
The edges
that wererejectedin
edges. Clearly,
us give
let
Now
Algorithm5.4.1.
Input:
Output:
connected
A spanning
(Start)
2. (Add
Let
vx be
Search
Breadth-First
graph
G with
tree T
Method:
1.
search
breadth-first
partitions
the edges
two sets
the
into
the
search
breadth-first
the root
for
a Spanning
vertices labeled
vuv29..
Tree.
.,u\342\200\236.
for G.
of T. Formthe set V
in
{vx}.
order
consistent
with
484
Chapter
5: Graphs
the edges
V where
Step2
An
search is
to breadth-first
alternative
Example 5.4.5.
in Step
added
were
{xyv}
set V.
new
the
for
depth-first search.
spanningtree for
the
situation,
two
on
ordering
In
edge
vertices
this
Case 1. If y
a tree
y is
where
{x,y\\,
present
been
the first
themselves:
visited, visit
previously
edge, and
{x,y}is unexamined.
for which
cases
not
has
unexamined
some
are
there
the
consider
G in
graph
Situation 1. If
we
illustrate
us
Let
the
y, select{x,y} as
the parent
case, x is
In this
y.
ofy.
Case 2. If
{x,z}
visited
previously, then reject the
and proceed to select anotherunexamined
been
has
it examined,
consider
on x where
incident
z is the
unexaminededge.Eachsuch
In the
select
and
{x,y},
edge
{x,z} is
an
context of depth-first
edge.
example at
searchat c,
in the
edge
rejected
which
for
vertex
first
edge
hand, we
{c,d}.
select
would
Then
we would
select
{g,e}
reject
this
waare
{gyh}>
At
point,
examined, then
from
the
parent
return
we
of x.
scanned. Moreover,
backtracking.
and select
presented
with
{h,i}.
a second
2.
Situation
{hj},
to
the
parent
The vertex x
is
situation.
general
x
on
of x
said
now
to
have
already
been
to
parent
be
completely
of x is called
Section
5.4
Spanning
considering,
to h and
backtrack
Actually,
485
Then
h.
from
are
we
Trees
{k,h\\.
more
unexamined
edges.
algorithm.
Algorithm5.4.2.
Input:
Output:
connected
graph
A spanning
for
Search
Depth-First
G with
tree T for
a Spanning
vertices labeled
vuv2t..
Tree.
.,un.
G.
Method:
1. (Visit
2.
3.
and T is a spanningtreefor
Minimal
Spanning
G.
Trees
and in order to
The application of spanningtreesaremany
and
varied,
gain some appreciationfor this fact, we will describe what is sometimes
we have a collection of n
that
calledthe connector
Suppose
problem.
we
wish
to
construct
utility,
communication,
or
that
we know
connecting all of the cities.Assume
the cost of building the links
each
between
pair of cities and that, in
addition, we wish to construct the network as cheaplyas possible.
The desirednetwork
can
be represented
by a graph by regardingeach
as a vertex
and by placing an edge between verticesif a link runs
city
cost of
the
between
the two corresponding cities. Moreover,
given
transportation
network
486
Chapter5: Graphs
The
the total
minimize
minimal cost, it
be
cities
between
a link
constructing
the edge{vifVj}.
and
vt
then,
problem,
vjt we
can assign
is essentialthat
is to
for all
be connected
of
so
a network
as to
of
of the citiesareto
links.
by
in
circuits
Moreover,
the
mathematicianJ. B,
Jr.).
Kruskal,
Kruskal's
5.4.3.
Algorithm
Spanning Tree.
Input:
A connected
graph G with
values
nonnegative
assigned
to each
edge.
Output: A
minimal
tree
spanning
for G.
Method:
of minimal
value that is not a loop.Thisisthe first
value,
(If there is more than one edgeof minimal
choose one of these edges.)
arbitrarily
does not
that
Selectany remaining
edge of G having minimal value
included in T.
the
form a circuit with
already
edges
Continue Step 2 until T contains n-1 edges, where n is the number
of G.
of vertices
1. Selectany
edge
2.
3.
edge
T.
of
economytree.The point
minimal
Suppose
that
maximum
tree
spanning
or
of
problem
minimal).
the
and thus
calls
Suppose,
that
any
tree
this
does, if fact,
by this process an
algorithm
obtained
is that an economytreeisa
connectorproblem.
for finding an optimal solution (either
to
further, that an algorithm is designed
next
theorem
solves the
Section
5.4
make the
optimal choicefrom
at each
data
available
the
487
Trees
Spanning
stage
the
of
Any algorithm
process.
A greedy
algorithm.
Theorem 5.4.2.
labelled
are
Let
by nonnegative
be
graph where
a connected
numbers. Let T be an
T is
Then
the edgesof
economy
a minimal
tree
of G
spanning tree.
Proof.
As
for each edge e of G, let C(e)
the value
denote
before,
to
the
the
assigned
edge by
labelling.
If G has n vertices, an economytree T must
n - 1 edges. Let the
have
be
in
chosen
as
KruskaPs
edgeselfe2f...,e\342\200\236_i
Algorithm. Then C(T) =
Let
be
a
minimal
G.We show that C(T0) =
treeof
2\302\243ll
T0
C(et).
spanning
and
thus
T
also
conclude
is
minimal
that
C(T),
spanning tree.
If T and T0 are not the same let et be the first edge of T not in T0. Add
the edgee(to T0 to obtain the graph G0. Suppose e, = {a,b}.
P
Then
a path
from a to b existsin T0 and so P together with
in
a
C
circuit
et produces
G0
no circuits,
there must be an edge e0
by Theorem 5.3.4.SinceT contains
in C that
is not in T. The graph Tx = G0 - e0 is alsoa spanningtree of G
since
Tx has n
\342\200\224
1
edges.
Moreover,
C(TX) =
However,
we
tree of G.Thus,
know
C(T0) + C(ed -
that C(T0)
C(TX)
<
- C(T0)
C(TX)
T0 was
since
- C(c,-)-
C(e0)
C(e0)
a minimal
spanning
* 0
implies that
C(e,-)* C(e0).
T was constructed
since
However,
by KruskaPs algorithm, et is an edge of
without
smallest value that can be added to the edgesel9e29-.
.,el-_1
a
if
circuit.
is
to
the
added
Also, e0
edges eue29...,^_i, no
producing
is a subgraph
of the
circuit
is produced
because the graph thus formed
tree T0. Therefore,C(et)- C(e0), so that C(TX) - C(T0).
We
have
from T0 a new minimal spanning tree Tx such
constructed
the number of
that
T exceeds
the number of edges commonto 7\\ and
commonto
T
and
one
edges
T0
by
edge, namely e(.
another minimal spanning tree T2
to construct
Repeatthis procedure,
488
Chapter
5: Graphs
Figure 5-32
one
with
more
in common
with
this procedure,
in common
with
edge
was in common
T than
between
7\\
andT.
continuing
By
tree
all
with
edges
we finally
Example 5.4.6.
the
cities
in Figure
the use
illustates
example
following
Determine
the
we
{6,c},
edges
have
options:
the selection
{a,b}-
{a,g}
3
4
5
led]
\\b.c]
cost
for
fee}
{aM
{a,d}
15
\\f,h\\
15
\\g,h}
15
15
15
18
of both createsa
3. Likewise we may
choose{/,M.
of minimal
Cost
if.g}
Choose
network
a table:
{d,f}
Then
of KruskaFsalgorithm.
railway
Edge
1.
thus
5-32.
2.
minimal spanning
we conclude that T is
at a
arrive
and
T,
choose only
one
circuit.
Suppose
of
{g,h} and
that
and
we
for
choose
{a,d}
{/,/*}- Suppose we
Section
5.4
Spanning
4. We then
as illustrated
tree
a spanning
have
\342\200\242
*\342\200\242
\342\200\242/
5-33
Figure
minimal
in Figure 5-33.
g^
The
489
Trees
3+
5 +
5 +
ExercisesforSection
5.4
1.
Figure
of
the
graphs
a-f in
5-34
e%-
(a)
(b)
Figure
5-35
-\342\200\242d
(c)
5: Graphs
*\342\200\242-
(e)
(o
5-35 (Continued)
Figure
2. Provethat
graph
\\V\\-1-\\E\\.
3.
that
Prove
4. Prove
is a
a tree
only
if G
is connected
tree
is a
if and
and
1.
vertices.
5. Suppose that G
the complement
is a connectedgraph.Provethat
of any
of
spanning
3 algorithms,
vertex
orderings
tree
spanning
and
if
that a connectedgraph G
than
edges
if G
G is
tree
of the
have
any
an edge in
circuit
and
common. Is
spanning tree?
graphs in Figure 5-36by
also a
using
the
e
\342\200\242
(b)
(a)
Figure 5-36
nonisomorphic
spanning
trees
for the
5.4
Section
Spanning
Trees
491
Figure 5-37
8. Definethecircuitrank of a disconnected
graph to be the sum of the
Derive
circuit ranks of all its connected
a formula
for
components.
E
the circuit rank of G involving
and
C(G).
|
|, | V|,
9 Letv0-Vi-. \342\200\242
.-ym be a path of maximal length in a connected
graph
G. Prove
that
connected
G-v0 is connected. Concludethat any
contains
a vertex that is not a cut vertex.
graph
10.If the intersection
H of a collection of subtrees of a tree T is
H is a subtree of T.
then
nonempty,
11 Let H be a subgraph
of a connected
graph G. Showthat H is a
of
TofGiSH
some
tree
contains no cycle.
subgraph
spanning
12 Describehow to obtain all possiblespanning trees for the following
the total number of different spanningtrees:
andjist
graphs
\342\200\242
\342\200\242
(b)
Figure
n-cyclegraph.
G in
(c) The
graph
graph
(d) The
(b)
(e)
The
The
5-38
tetrahedron
Figure 5-38(a).
in Figure
5-38(b).
W4.
of
order
5.
492
Chapter 6: Graphs
13.
a minimal
Find
spanning tree
for
of
each
the
in Figure
graphs
5-39.
(c)
(b)
(a)
14.
connecting
to build
wishes
company
its
7 branches.
an intercommunication
The distances
are
in
given
system
the
following
table.
a
b
20
0
42
31
26
35
41
28
29
33
34
0
29
24
22
36
41
0
33
31
38
40
32
26
493
Spanning Trees
Define
(b)
Then
16.
KruskaPs
finds a
C(e). If
no two edgeshave
for
method
(Another
methodis based
on
it is
unless
same
the
let us
delete one by
(a)
(b)
graph
greedy
one
that
fact
cost,
a positive
a minimal spanning
it is foolish to use a
costliest
edges whose
cost
G has a unique
prove that
tree.) This
costly
graph.
edge
Thus,
deletion doesnot
graph.
why
Explain
connected
finding
the
needed to
disconnectthe
the system.
by a maximal spanningtree.
so that one has
algorithm
minimalspanningtree.
17.
k times
a connected
G be
Let
build
to
is meant
what
modify
that
algorithm
Find
a maximal
(c)
the costof
between them.
the distance
15.
between
of lines
construction
this process
any
G.
that
this
proof of Theorem 5.4.2to show
process
a minimal spanning tree.
a minimal
spanning tree for the graph in Figure5-40using
in (a).
described
process
the
Modify
produces
(c)
Find
the
Figure 5-40
any
edge of a connected simple graph G is an
spanning tree of G.
for any ttoo edges of a simple connected
that
graph
is a spanning tree containing the two
edges.
edge
of some
(b)
Prove
there
Kruskal.
G,
Hint:
494
Chapter 5: Graphs
19.
the following:
Disprove
G with
connected simplegraph
more than 2 edges has a
unique minimal spanning tree, then the costs of all the edges
are distinct.
Given
G, there
any 3 edges eue2yezof a simpleconnected
graph
is a spanning tree of G containingeue2,and
e3.
G have
a
Any two spanning trees of a simple connected
graph
(a) If a
(b)
(c)
common
edge.
tree
of any
consisting
vertex
a circuit
form
T. The processterminates
after
it to
wheren
22.
Tx and
be an
let e
and do not
cost
selected
have
all
G. Among
and
add
- 1 edges
|V(G)|.
of the
Let
we
of
in T
Prints
Apply
each
vv
edge of Tx
not
in T2.
(a) Show
but oneedgeofT2.
of
G containing
e and
all
that
a sequence
of
Show
Tx can be transformed into T2 through
one by removing one edge
trees, each arisingfrom the previous
(b)
23.
24. An
an
edge e
endpoints
depth-first
search spanning
n-cycle.
= {a,b}of a graph G
a
b are
and
multigraph
resulting
and
search
breadth-first
Compare
trees for
is denoted
is contracted
identified.
observe that
\\E(G-e)\\
= \\E(G)\\-l
of G = C(G \342\200\242
e)
(c) C(G) = the numberof connectedcomponents
= the number of connected componentsof G \342\200\242
e.
Let
T(G) = the number of spanning trees of a connected
G.
Then for an edge e of G that is not a loop, prove:
graph
Section
5.4
Spanning
(d) T(G
- e) is the number
of
(e)
is
There
spanning
spanning
(f)
Use (d)
of G
trees
spanning
containthe edgee.
that do not
a one-to-one
correspondence between
of G containing
trees
the edge e and
e.
trees
of G \342\200\242
and (e) to
concludeT{G)= T(G -
e)
495
Trees
the set of
T(G
the set
of
. e).
25. Show
26.
(a)
vertices
= 2n
that
- 1)!.. .(<*\342\200\236
1)!]
2)!]/[(d,
[(\302\273
the number of
(This
tree
classical result
is a
with
vertices
trees
spanning
of Kn
is
due to A. Cayley.)
vuv29..
T we
With
.,u\342\200\236.
associate
the
Note that
deg(^)
(b)
(c)
tn_x
of
= n.
- 1 timesin
T.
Observe
that the
(tut2,..
.,\302\243n_i).
In particular,
the vertices of T of
vertices whoseindicesdo not appear
Show
that
is the
(4,3,5,3,4,5,8)
index of
degree
a vertex
precisely those
Prufer code of T.
1 are
in the
Prufer code
tree:
\342\200\242
v,
v2#
>v7
#'v8
vt occurs
>v6
of
the
following
496
Chapter
5: Graphs
(d)
the Prufer
Obtain
code for
following trees:
of the
each
v4\302\273
\342\200\242V2
v5#-
-\342\200\242
v3
v*i
v7 %'
v8
^# \342\200\242
v8
v6<
i; v,
V7(
\342\200\242
v9
vI2
\342\200\242
(a)
(e)
(f)
(b)
(tut2,...,^-2)},
\302\2532 min
{slys2,...,Si_l9ti9ti+l9..
1 <
where
sx
s9 - 8.
Then
t{;
<
= 1,
if we
a Prufer
v4
3,
the vertices
v5
c\302\273\342\226\240
rw
that
s,
in general
and
min
0.
{k\\k
code (^,t2,..
.9tn_x)
the
connect
v2
.^\302\273-iIK
n and
s2 =
v3
Note
{sl9t29..
Thus
.,tn_i}}.
vertices
removed
determines
{k\\k$
be defined recursively by
S; can
the Prufer
5,
v8.
to
ut. we
obtain
6,
the tree
v6
-* p
V9, >
Section
5.4
Spanning
use
sequences,
the process
described in (f)
obtain
Then
vertices.
is its
497
Trees
Prufer code,
(ii) (1,4,4,6,6)
(1,4,4,5,6,5,7,7,10)
(iii)
of sequences
number
= n is
obviously nn~2.
The
(h)
tn_i
we obtain
Thus,
Selected
1. Only
and
(c),(e),
3. A connected
^ < n
and
code
of a
of
Kn.
there
trees of Kn.
5.4
for Section
Answers
1 <
such
and spanning trees
sequences
that
another proof of Cayley'sformula
between
correspondence
where
.,\302\243\342\200\236_i)
Moreover,there is a one-to-one
tree of Kn.
spanning
(tut2t..
(f).
1 edges.
removing
edges
V\\
5.
how
Recall
to
a spanning
obtain
tree by
from
circuits.
8. If
|V(G,)|then
Yl (mi
n>i
1) circuit
= m_
rank of
C(G)
-|tf(G)|-|V(G)|+C(G).
(e)
if ra,
= \\E(G)
| and
nt
Chapter 5: Graphs
{dye}, {d,f}, {b,e}t{a,c}y and one of {a,/}, {e,/}, and {a,e}.
for a
of edges. The result is obvious
on the
number
20. Useinduction
k
graph G with
graph with 0 edges. Suppose for any (connected)
G is already
a tree.
that if G has only one spanningtree,then
edges
Consider a graph H with only one spanning tree and having k + 1
edges.If H is not a tree, H contains a circuit (becauseH must be
one edge ex from the circuit,Hx = H - ex is
Remove
connected).
tree for Hx is also one for H. By
still connectedand any spanning
the inductive
hypothesis Hx is a tree, and henceis the unique
tree of H. Replace ex and remove another edgee2 of the
spanning
circuit in H. Get a new spanning tree H2 for /f. This contradiction
17.
(c)
Delete
proves the
(k + l)th case,and
the
result
is proved
by mathematical
induction.
DIRECTED TREES
The
arises:
now
question
directed
spanning
of directed trees
tree? The
and
of
Under
connected
quasi-strongly
graphs.
quasi-strongly
connected,
path
because
with
we may take w to
from u to u
no edges
be
u itself,
and
P
u to v.
pair
of
vertices
then
connected,
the
underlying
nondirected
graph
is
will
quasi-strongly
be
connected.
but
connected,
(b)
Figure
5-41
the
Section
Directed Trees
5.5
499
In the graph of Figure 5-41 (a) the vertex e is specialin the sense that
a directed path from e to every other vertex. By no meansis this
there is
accidentalas
shown
theorem.
following
Let G
5.5.1.
Theorem
the
by
be
Then the
a digraph.
following are
equivalent:
1.
G is
connected.
quasi-strongly
there is
that
r to
G.
G is
that
(2) implies (1). On the otherhand,
suppose
i
ts
There
is a
vertices
connected
and
consider
vifv2t..
.,un.
quasi-strongly
vertex w2 from which there is a path to vx and a path to v2. Likewise, there
is a vertex w3 from which there is a path to w2 and to t>3, and so on until
we conclude
that there is a vertex wn from which there isa path to
finally
to vn. Clearly,
there
and
a path
is a directed path from
wn to each
wn_x
vertex Vi of G since wn is connected
to vuv2t.. .,un-i through wn_v
Thus,
Proof.
Clearly
(2).
(1) implies
\342\226\241
in
present
a directed
We
characterizations
of
Theorem5.5.2.
1. G
2.
4.
is
r in G such that
vertex of G.
other
every
of r
in-degree
v
7.
is zero (that
Then the
1 for
each vertex
=\302\243
r, and
Proof. (1
\342\200\224*
The
(2\342\200\224*
3)
By
quasi-strongly
a vertex r suchthat
deg+(i>)
= 1
the
for each
=\302\243
r.
- e is not
has
a vertex
2)
Theorem
connectivity
circuits and no
that deg+(r) = 0 and
directed
no
r such
=\302\243
r.
and contains
G is
quasi-strong
vertices.
edge e of G.
6.
> 1
with
and
connected
connected
quasi-strongly
vertex
5.
be
a vertex
is
r to
G
is quasi-strongly
for each
connected
G
a digraph
equivalent:
G
is a directed tree.
There
from
3.
Let
are
statements
following
upon
5.3 characterizingnondirectedtrees.
in Section
the results
the underlying
circuits.
root
500
Chapter
5: Graphs
oneto
w such
that
neither of which
to v,
one
and
there are
Thus,
graph
path from
nondirected
any path P
from
vertex
another
to
directed
path from r to v,
would have in-degree
path
for
otherwise
v we assert
at least one
G is quasi-stronglyconnectedby Theorem
The ideas of the proof of (6\342\200\224*
7) are
the
Moreover,
proof
(7\342\200\224*
1)
We
5).
proof of (4 \342\200\224*
path
such
that
know
is the following.
is, in
path
not destroy
G will
if we
Therefore,
let
and
and
connected
Theorem
5.5.2, there
us
also
some related
discuss
study
two special
Definition5.5.1.
is not
the
root
directed
in
of
quasi-strongly
a directed
are edgeswhose
these edgesfrom
tree,
removal
resulting
Now
3 of
statement
if and
tree
G has
a directed
spanning tree T then obviously
the conditionsof Theorem5.5.1so that G is
Conversely if G is quasi-strongly
trees,
fact,
Proof. If
T satisfies
connected.
from
to any
from r
Theorem
only if G
by
the
since
for
(5\342\200\224*
6),
\342\226\241
G is connected.
then
a
the
5. Thus,
statement
in the
of
vertex
directed.
underlying graph
other
Now for
of G.
5.5.1.
contained
in
contained
is
simple
unique
vertex
other
G,
of
then
G.
the
a directed
Section
height
v to
root. We
501
Trees
Directed
5.5
empty tree.
The level ofa vertexv in a forest is the length of the path to v from
root of the tree to which it belongs. A directed
T is said to
tree
k if k is the maximum of the out-degrees
ofallthe vertices
degree
5.5.1.
Example
Tu
trees,
T2> and
Tx = ({a,6,cUi),
T2 = ({d},0),
^3 -
in Figure
shown
is
forest
consistsof three
the
have
T.
in
T3.
where
Ex
{(a,6),(a,c)}
and
where
({eyfygyhyiyjyk}yE3)y
\302\2433 {(eyf)y(eyg)y(gyh)y(h9i)y(hyj)y(hyk)l
The root
of Tx
the parentof
the root of T2 is
and
a child of e. Vertex g
d,
is a,
h
and
root
the
of T3
is e. Vertex g is
is the properancestor
of
hy
iy
jy
and
is the
3.
The
height,
combinatorial
its
the number
as
*A
Level 0
e
\342\200\242
\342\200\242d
X
K
Level
T
b\302\273
\\7^7
\342\200\242\302\243
> Height
1
\302\273
Level:
>
Level
/
IA
.
3 -
\\
\\
\\
\\*|
Figure 5-42.
forest.
= 3
502
Chapter
5:X3raphs
L(0,k) = l,forall/2.
For
fi
> 0,
each
are up to L(fi
It
children.
L(fi,fe)
L(fi
of level fi - 1. There
of them has up to k
\342\200\242
*.
1,*)
= fce, which
solution
to this recurrence relationis L(fi,fc)
can be easily
= 1; fc8-1 \342\200\242
k = k*. This
verified by induction: k\302\260
reasoning proves a
The
theorem, which
we
now state.
shall
Theorem
It is also
entire
for
to
interesting
a tree
tree,
as
fi
in
any
directed
special
\"compact.\"
if
8-0
8=0
each
Lh + 1 _
is as full
level
tree
the
last
as possible,the
-I
\342\200\224
\302\261
below.
is given
(The
an exercise.)
Theorem 5.5.5.
Two
at level
vertices
half of
constitutes
rest is left
in a
fcfi
maximum
the
know
of height h
This
0 and
tree of
directed
There
are
k and
h +
between
kinds
That
lower
degree
- 1
of interest becausethey
they
bound
of a
kh+1
\342\200\224\342\200\224\342\200\224
vertices
~~
tree.
need
on the
to be.
are
Because of
number of vertices,
Section5.5
Directed
5-43.
Figure
5.5.2.
Definition
the
maximum
(exactly
of degree k has
vertices in each level,
tree
(directed)
complete
3.
fce) of
5.5.2.
Example
of degree
last.
the
possibly
tree
complete
number
possible
except
503
Trees
3.
between
There are
5.5.1.
Corollary
kh
- 2
andJ
A-i
vertices
in
Proof.
We
tree of
directed
a complete
know
already
kh+1
nrrr
that
-
feh+1
k-1
l +
8-0
g-0
5.5.3.
Definition
directed
+ Efe'-i
^Ltf^-i
A B-tree
1. allthe
leaves
are
at the
^r-^^r2\342\200\224
\302\253
1
\342\200\224
1
\302\253
5.5.5. Since
at
least
one
B-tree)
is a
same level;
the
has at least
2. every internal vertex, exceptpossibly
root,
[xl
means the least integer > x.)
[k/2l \342\200\242
(here
children;
504
Chapter
5: Graphs
/l\\
//\\\\
/l\\
\342\200\242
\342\200\242 \342\200\242
\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\
\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242
(b)
(a)
5-44.
Figure
3. the
4. no
Example5.5.3.
vertexhas only
two
B-trees
have
sequentialfiles.
value
Exercises
for
is desirable,
5.5.6.
leaves,
be
cannot
a B-tree.
children, but
vertex
has five
is less
than T5/21.
of
B-tree
for /i >
Its
another
vertex
one
is high,
k.
k and
order
1.
The proof is by
Proof.
exercise.
which
increasesignificantly
Theorem
\342\200\242
[k/2lh-1
one
since
shown in Figure
4. Tree (b)
in implementing
indexed
applications
for directories of files stored in disk systems.A
important
for k
trees
3 or
children,
are used
They
two
(a) is
the
Of
order
and
vertex has
of tree
B-tree.The
order must be at least5,
large
non-S-tree.
and a
B-tree
on h,
induction
and is
\342\226\241
Section
5.5
one, exactly
3, and
(b)
How
being
directed
many
up to
the
at level 4.
are there
trees
that
fit
the
description
same).
3. Deriveformulaefor
a directed
at level
4 with
height
four vertices
exactly
above,
vertices
two
tree
the
in a
directed
minimum
of degree k
with
and
tree different
maximum
minimum
the
root
possible heights
n vertices.
4. Derive
5. Deriveformulaefor
from
and the
possible
heights
Section
complete
directed
tree
of
degree
with
of
a complete
of
a B-tree
tree of
directed
8. Derive
9.
height h.
and
vertices
505
Trees
Directed
5.5
of
B-tree
with
for
the
maximum
number
of internal
verticesin a
n leaves.
entities
as noun
sentence consists of a numberof syntactic
(such
which
are
phrases)
phrases, verb phrases,or prepositional
in accordance with
other
certain
concatenated with
each
grammatical
of
or
rules.
The process
parsing
resolving a sentenceinto its
think
leads naturally to a tree. For example,
syntactic
components
root
of
the
of
the
entire
sentence
as the
tree, the syntactic
of the sentence
as the internal vertices, and the words
as
categories
this
tree
the vertices of degree one. Using
a
procedure,
give
11. A
sentence:
and
are regular
T2:
of degree 3.
tall boy
506
Chapter
5: Graphs
leaves.
(c)
Draw a
(d)
Show
full
regular tree
is the
internal verticesand \302\243
of leaves,
number
- 1 if T is
\302\243
number
then (k -
of
l)i
regular of degree2.
Consider
of connecting 28 lamps to a single
outlet
electrical
extension
cords each of which has 4
by using
there are many ways to connect the lamps,
outlets.
Although
extension
this
how
cords are always needed? Hint: view
many
In particular,
i
the
problem
\302\243
-1.
(e)
2 and height 3.
T of degreek, if i is the
of degree
tree
regular
for a
that
as a
problem
tree.
must
be played to determine a tennis
is played with 64
tournament
elemination
matches
champion
if
a single
players?
(g)
a certain computerhas
sum of 3 numbers. How
instruction have to be executedto find
Suppose that
computes the
an
instruction
times
many
of 27
sum
the
which
will the
numbers?
(h)
Derive
leaves
(i)
Show that a
vertices.
2-3
tree
and
Draw
height 3.
A
(c) Derive a
a
Derive
leaves
14.
Suppose
the
maximum
in a
the
for
values
possible
and minimum
number
of
and minimum
number
of
T is
a tree
descendants,all
number
for
of
formula
number
in a
vertices
(d)
is a
tree
2-3
odd
of
if each
an
number
leaves
of descendants
with
the
occur
property
at the
of internal
that
same
the root
has at least 2
level, m =
vertices different
from
minimum
the
root,
Section
Binary
5.6
Selected
if a
5.5.1,
Corollary
By
n vertices,
h and
height
h < log*(n)+ 1.
8.
507
Answers
7.
Trees
Theorem
By
9. Let
rti
2 Tfe/21
the
be
smallest
k
the
recurrence:
nx
1,
2,
fy = n^kfe!
Solvingthis we obtain n, =
12. (d) There are ki descendants
of
number
minus
1.
>i. From
height
n0 =
the
possible
and
n vertices,
and
It follows
h~l.
B-treeof order
obtain
if a
5.5.6,
then n >
1, since
, for i
> 2.
2 ffe/211~1.
of the
vertices. But ki
number of leaves
the
plus
i internal
internal
vertices
the root
is not a descendantof
any
vertex.
Thus,
ki = i
\302\243
or
- l)i -8-1.
(k
View
(g)
where
the
problem
are
there
27
be
executed
13
times.
5.6
BINARY TREES
tree
with
f:
is a
E\342\200\224+
{0,1}
directed tree
such
that
T = (V,E),
it
labeled
with 0
508
Chapter5: Graphs
Figure
./\\
./\\
/\\
./\\
5-45.
Four
distinct
trees.
binary
follows
from the
That
each vertex has a unique parent (if any)
be a unique path from
definition of tree, whereit is requiredthat there
the rootto eachvertex.
vertex v were to have two parents there
(If any
the
these paths
would
be a path
to each of them from
root, and extending
to v would yield two paths to v.) That eachvertexhas a unique left child
from
and a uniqueright child (if any) follows
the labeling of the edgesof
the treewith 0's and l's. (At most one edge from the parent can have a 0
label and at most one edgecan have a 1.) It is also implicit in the
definition
that
vertex other than the root has a parent.Thisis so
every
v
vertex
in a tree must have
a path
to it from the root. The
because
every
last vertex before v on such a path must bethe parentof v.
The left-right
on the verticesof a binary
orientation
tree
that
requires
we view as distinct binary
those
trees
that would otherwise be the sameas
directedtrees of degree at most 2. (See Figure 5-45for an illustration.)
all.
5.6.1
Details such as edge labelsand the direction
of
in
are
of
trees.
edges
usually represented only implicitly
binary
drawings
The conventionis that for each vertex v the root of i/s left subtreelies
v and
to its left on the page,whereas
below
the
root of i/s right subtree
lies belowv and to its right on the page.Figure5-46shows an example of a
binary tree drawn with and without
edge labels and directed edges.
There are a few special kinds of binary trees that are important in
is the complete binary tree.
one
of these
computerapplications;
Example
\342\200\242XX
Figure
O
5-46.
XX
Conventions
for drawing
binary
trees.
Section
5.6
509
Trees
Binary
Let T be a binary
5.6.2.
Definition
tree.
vertex v in T has a
Every
as follows:
If v is the root, let index
unique level-order index, defined
\342\200\224
(u) \342\200\242]
1; if u is the left child of a vertex
u, let index (v) = [index
(v)
2;
= 1 + [index
if v is the right child of somevertex
a, let index (v)
otherwise,
(a)]
\342\200\242
2.
5-46 is repeated in
in Figure
shown
tree
binary
the locationof
children
eachvertex.
indices, and right childrenhave
The string corresponding
to vertex number 18 is 0010.
indices.
odd
of this, we get 10010,which
base two
a 1 in front
is the
Putting
representation of 18.
this
Left
Definition 5.6.3.
which
1,.. .,n of
vertex
in
binary
complete
indices
level-order
the
tree
with
index i for
5.6.3.
Of the two
Example
(a) is complete.In particular,(b)
index
every i from
trees
binary
ten
binary tree
complete
has n vertices
a tree
such
has
is a
tree
vertices form
of the
the
index written at
level-order
all have even
shown
10.
Figure
5-47.
binary
tree,
there is a
n.
1 to
vertices
for
interval
with level-order
indices.
510
Chapter
5: Graphs
(a)
Figure 5-48.
Completeand
It is probably apparent
correspondsto a speciallabeling
Thisis
of a
possibly the
last.
Lemma 5.6.1. In
of the verticesin
-
2e+1
the
complete
\302\243th
level
from 2ethrough n
1, or
binary tree
complete
complete
binary tree
directed tree of degree 2.
a complete
of the
a consequence
formally
level
every
of
each
that
now
by
trees
binary
noncomplete
has exactly
28 vertices,
for
except
the indices
28through
proof is by
The
Proof.
= 0
\302\243
definition
from
the
of level.
The vertices in level \302\243
those at distance \302\243
are
exactly
\342\200\224
\342\200\224
1 are exactly
root. The vertices in level \302\243
those at distance \302\243
level
\302\243
the root. It follows that the
are
the
precisely
verticesat
1 from
children
of the
assertsare
indices
with
those
level-order index,thechildren
1. This
interval, or the initial segment of
complete
be in T, by the definition
of complete
binary tree.
the
of
Because
segment
the
represented
efficiently
of
very
excellent
and
implementation,
algorithms
that
by at
the
heights
most one.
through
n, must
Definition5.6.4.
such
up
\342\226\241
natural
positive
algorithms,
it
height
of the
balanced
binary
tree is a binary
subtrees of every
vertex
tree
differ
Section5.6
511
Trees
Binary
height
The tree
5.6.4.
Example
height-balancedbinary
in a
tree that
tree
in
shown
of height
5-47 is a
and
5-46
Figures
vertex (13)would
4. Deleting
result
it would
since
balanced,
have a
would
in a
result
(4) would
vertex
height 1.
Note that
tree.
every
a right
subtree
of height 1. Deletingvertex (8)
tree that would no longerbe height
since
balanced,
trees are
binary
Height-balanced
general
than
complete binary
lower bound on the
nontrivial
tree
binary
a right
and
subtree
of
is also a height-balancedbinary
of interest becausethey are more
height.
vertices
in
Proof.
denote the
any
bound can
tree
binary
height-balanced
This
least
at
with
be obtainedfrom
least achievablenumber
of
[(1 +
(1/V5)
vertices
height
V5)/2]h+3 - 2
h.
Let
recurrence.
in a
V(h)
(nonempty) height
of height
tree
the
with
fewest
subtree
vertices
possible
of height
thus
- 1 and one
of vertices
in
h - 2. Thetotal number
of height
subtree
=
1
is
tree
such a
4- V(h
2).
V(h)
1) + V(h
it is nearly the sameas
since
This recurrence should be very
familiar,
solved in Chapter 3.
for
which
was
the
Fibonacci
the recurrence
numbers,
similar
the
solution:
we
obtain
techniques,
Using
height-balanced
where
<j>
and
\342\200\224^\342\200\224
- 0
'
\342\200\224g\342\200\224
512
Chapter
5: Graphs
of Chapter 1,namely
V(h)
= -U
=
since it is
But
see
that
It is
for
-7T (1
1,
<t>)M
Fn is
\342\200\224
where
Fh+2
the
71th
1
number.
Fibonacci
immediate that
to
-1
^(1-0)
this
compare
binary trees
complete
_5-2V5
_^
two apparently
these
interesting
vertices
(<t>)h+3
5 + 2V5
___
we
1.10.11
in Example
relation
recurrence
of this
that
of
bound
lower
the
with
2h
1.61803
1.61804
and
-1 <
(1 -
<t>)h+z
-^
1, and,
in particular,
-lso that
^i(l-0)h+3>
V(h) >
<
(0)*+3
2.
2;
Thus,
A binary
5.6.5.
Definition
vertex labeling
with ax < a2 <
for
/: V\342\200\224*
A,
where
anf and
\342\226\240
\342\200\242
\342\200\242
<
a complete
that
in a
is,
have
we
an
height balanced
binary tree.
\342\226\241
tree
with
ordered
set
the
properties:
(i)
For
(ii) For
< l(v)
> l(v).
5.6.5.
let
45,6,2,37,99
us
build
Section
5.6
Trees
Binary
Next use
a label
in
the
9 must
be the label of a vertex in the left
9 < 17.Moreover,
9 is greater
than 4, so 9 must be
of 4. Likewise 9 > 7,so9isa l$bel for the right
subtree
root since
of the
subtree
513
right
than
child of 7. Next,19is greater
label
some
vertex in the
17, so 19 will
of
but
19is
less
than
the
of
subtree
child
17;
23,
17, so labelthe
right
right
>
of 23 with the label 19.Nextconsider
left
child
45
17
so 45 is a label
45;
for
in the right subtree of 17;45 > 23, so label the right child of 23
a vertex
with
45. Continuing
as above, we see that 6 must bethe labelfor the left
child of the vertex 7, 2 is theleftchildof 4, 37 and 99 are respectively the
left
of 45. Thus, we have
and
children
the
binary tree:
right
following
17
\342\200\242
./\\
\\9
6.'
properorder.
Also,
if T\"
minimum
and
is a
find the
minimum
children
until
T\"
of the
maximum
start
label,
a leaf
by
The labelon
we can
Likewise,
successively
search
7 in this
section),and this
T with
is reached.
verticesof
(see Exercise
a rearrangement
give
tree is
search
binary
tree
\\99
37\302\253'
5-49
Figure
traversal will
\\45
19 #/
.1
are
root u, then
easily
To
visit successivelyleft
this
leaf is the minimum
find the maximum label on the
visiting
the
located.
we arrive
at
leaf.
have a dynamic feature as well;
original sequence can be
incorporated into
the binary
had been in the sequence
search tree just as if these
all along. For instance,if 1,5,11,39,84,87
to the original
are appended
of 6,11 is a right
child
a left child of 2,5 is a left
sequence,then 1becomes
child of 9,39 is a right childof37,84isa left child of 99, and 87 becomesa
But that
additional
numbers
appended
search
trees
to the
514
Chapter
5: Graphs
exercise.
1.
the
Draw
whose level
tree
binary
order indicesare
{1,2,4,5,8,10,11,20}.
2.
Show
is the
if H(n)
tree
with
n vertices
kinship relations.Are
the
Traversal Algorithms.)A
enumerateseachof
the
between
answer.
Justify
your
traversal
of a tree is a processthat
in the tree exactly once. When
a
parent-child
trees?
vertices
relationships
in the
is encountered
process,
particular
we say
root.
1. Preorder
Traversal (abbreviatedNLR).
For
first visit the root.
(a)
any subtree,
on the
entire
(b) Then performpreordertraversal
from that root (if a left subtreeexists.)
(c)
Perform
preorder
traversal
on the
left subtree
5.6
Section
Binary
515
Trees
Figure 5-50
2. InorderTraversal(abbreviated
(a)
it
(b)
perform
First,
LNR).
exists).
Then visit
(c) Perform
the root.
on the
traversal
inorder
3. Postorder Traversal(abbreviated
(a)
Perform
postorder
(b)
Perform
(c)
Visit
postorder
root.
the
LRN).
in
Figure
Preorder: a-b-c-d-e-f-g-h-i
\342\200\224
\342\200\224
\342\200\224
c \342\200\224
e \342\200\224
a \342\200\224
h \342\200\224
i
b \342\200\224
Inorder:
Postorder:
d-e
Show
following
the
c-f\342\200\224b-h
are
\342\200\224
\342\200\224
i\342\200\224g a
sequential
trees
\342\200\224
visited
postordertraversal.
a
\342\200\242
(a)
b%'
yy
(b)
bj
^#c
y\\
/.(
/
n%
o#
/
p\\
516
Chapter 5: Graphs
8.
9. Determine
If not,explain
or
whether
the following
not
trees are
sense
the
in
tree
of
the
height balanced.
not.
why
(b)
(a)
%c
em
me
md
cm
bm(
'\342\200\242/
(d)
(c)
em
dm
d*
\342\200\242/
mh
trees
all regular binary
exactly 7 vertices.
10. Draw
(a)
with
(b)
with
9 vertices.
exactly
(A regular
tree
where
each
vertex has
0 or 2
children.)
11.
all
Draw
distinct
binary
(a)
with
(b)
with 4 vertices.
12. Draw
trees
3 vertices.
search
binary
trees
for the
following lists:
(a) 18,44,2,5,73,45,14,6,8,10,20,11
(b)
2,1,5,6,8,9,7,3,4
(c)
Carol,
Bob, Dumpty,
Also,
Avid
dictionary
ordering.)
Joe,
Myrtie
Section
5.6
13. An
of each
children
the
which
an
tree of
ordered
517
Trees
Binary
degree 3
with
7 vertices.
(a)
(b) 10 vertices
and height4.
Explain
view
a binary
height
of the
to
how
14.
the
Determine
indexis
(a)
24
(b)
2s +
(c)
26
binary tree
whoselargestlevel-order
17
31
(d)
26 +
33
(e)
4s
(f)
2* for k
(g)
n for
15. Given
ordered tree.
tree as an
a positiveinteger
positive integer.
n a
index
level-order
of a vertex
index
level-order
the
the level-orderindexof v
's left
child,
in
a binary
tree, determine
parent if
the
of v is
(a) 29
(b) 410
n,
(c)
16.
an
Design
n is
where
to delete
algorithm
17. Determine
the
binary
Answers
integer.
caseswherev
Selected
a positive
for
search
Section
is a
leaf, has
conditions
tree to
a vertex
search
from
tree.
a binary
Hint:
tree so
the three
search
consider
will cause
have exactlyonechild.
5.6
1.
,2
Figure 5-51
of
518
Chapter
5: Graphs
3. By
Theorem 5.6.2, if
balanced
height
v5
+
ra*75(1
\\*
V5<
T)
\"2-
h < logq+>/6)(V5(n
that h (and
To see
2) < In for
Thus,
6. First,
<
they
(2)
are
henceH(n)) is in
and logx(7n) =
logL6(n) for n > 7.
> 1,
not
binary,
since a
2)).
person
of the
Figure
5-52
do
that V5(n
< 2 logxn, for n >
observe
logxn
may
vertices
Thati8'
O(log(n)),
logx7
tree has n
binary
and heighth,
family: for
form
binary
by ignoring
more
have
a person
example,
trees
when
viewed
crossbreeding.
Paternal
Paternal
Maternal
Maternal
grandmother
grandfather
grandmother
Mother
Figure
7. (a)
Preorder:a-b-d-e-g-c-f-h-i-j
5-53
Inorder:d-b-g-e-a-f-i-h-j-c
Postorder:
d-g-e-b-i-j-h-f-c-a
7.
than two
may have a
grandfather
Father
Section
5.6
REVIEW
Binary
Trees
519
1.
For
the
graph
each vertex
find the
below
with
an
obtained
visitation)
integer
by:
(a) BFS
(b) DFS
(c)
(In
2.
KruskaPs
each
algorithm.
problem
tree
For
the
(a)
Preorder:
(b)
Postorder:
(c) Inorder:
below
list the
orderingabcdefgh.)
520
Chapter
5: Graphs
3. Draw, if
the binary
1,2,3,4,5,6,7,8,9,10,11,13,18,26,52.
indices
level-order
the
with
label
and
not),
tree
sequence
degree
(1,1,1,1,2,3,3)
(b) (1,1,1,1,1,1,1,1,3,4,5).
5.
all
Draw
6. Fill
in
forests on
nondirected
nonisomorphic,
blanks:
the
is a simple connectedgraph
number of edgesof G is between
denotes
the number
(b) Suppose that iV\302\273
(a)
If G
tree T.If
N2
Explain.
5,
in a
height
is 412
index
of a
(k)
of v
tree
of
a vertex
of v 's
a graph
's parent
v in
tree is 223,then
and v 's right child
a binary
is
height
T =
; height
and
T is.
mm
e%
|E | -
level-order
dm
G, then
graph
if the largest
left childis
tree T depictedbelow,
vertexeis
the
of
binary tree is _
index
, and
is
if
is
a simple
of
+ 5. Explain.
level-order
For the
degree
and|\302\243|*
index
(j) If the level-order
the
4 and
componentsof a forestA
isthe degreesequence
(h) If (1,3,3,4,4,5)
The
of order
= 32.
(i)
Nt
a B-tree
of connected
24and|V|
|\302\243|
- 2, then
a graph
4|V|-36.Then|V|
number
The
Explain.
Explain.
G is
that
and|\302\243|
(f)
= 7, N6
the
of degreei in a
of vertices
of vertices
number
minimum
1, N4
then
vertices,
and
Explain.
(d) The
height5is
Suppose
iV3
70
with
number of verticesin
height 5 is
(e)
4 vertices.
/\342\200\242
\302\243\342\200\242
\342\200\242,
the
of the
degree
of
Section
5.6
Binary
(1)
(m)
Kn has
The wheel
521
Trees
edges.
has
edges.
.edges.
(n) Pn, the path graph on n verticeshas.
n
G
If
has
then
the
of
vertices,
(o)
G,the complement
simple
graph
G,
has
7.
edges.
or disprove.
Prove
two
are isomorphic.
graphs
with
(b) Every connected simplegraph
where n > 2 containsa cut point.
(c) If
is
graph
simple
n and | V
connected
two
with
| =
|E
+ 1
components,
\\E(G)\\>\\V(G)\\-2.
edges ex
spanning
tree
there is a
Hint:Kruskal.
(e)
\"full\"
A full
number
( f)
(g)
(h)
Every
tree is
of vertices
graph
simple
graph
simple
e2 of
connected graph G,
a simple
the
containing
e2.
has an
tree
binary
binary
and
possible.)
with 5 edges
with degree
connected.
connected
simple graph
with
> 2
vertices
contains at
or False.
\342\200\224
(a)
(b)
A simple
A
complete
522
Chapter
5: Graphs
has no cycles.
(c)
A tree
(d)
tree
(e)
complete
contains
always
a cut point.
of degree
tree
directed
2 is a complete
binary
tree.
( f)
Every circuit in
(g)
(h)
The
least2
vertices.
cut
sequence
(i) The
simple
connected,
(1,3,3,3,5,5) is graphic.
is
following
connected
contains
and
valid
If
argument:
then T
no circuits,
a graph T is
is a tree.If Tis
1.
atreefthen|E(T)|-|V(T)|-l.\\E(T)\\*\\V(T)\\-
Therefore,
The
connected.
strongly
(1)
The
(m)
The
sequence
tree.
two
graphs
\342\200\242-\302\253-
(1,1,2,2,3,3,3,3) is
below are
graph
the degreesequence
ofa
isomorphic.
is quasi-strongly
connected:
Section
5.7
523
Planar Graphs
5.7
PLANAR GRAPHS
on a piece of paper,
a graph
we often find it convenient
drawing
to
to
intersect
at points
even
other than at
(or
necessary) permitedges
These
of
the
intersection
are
of
called
crossovers
vertices
points
graph.
to
are
said
cross
over
and the intersectingedges(or crossing
each
edges)
other.
For example, the graph of Figure 5-54(a)exhibitsthreecrossovers:
A graph G is
over {a,d} and {a,c},and {b,d}crossesover
{b,e} crosses
{a,c}.
said to be planar if it can be drawn on a plane without
crossovers;
any
if a graph
G is said to be nonplanar. Note that
G has been
otherwise
this does not mean that G is nonplanar\342\200\224there
drawn with crossing
edges,
to
the graph without
crossovers.
For example,
draw
be
another
may
way
in Figure
the graph in Figure 5-54 (a), can be redrawn
5-54 (b) without
crossovers. Accordingly we say that a planar graph is a plane graph if it
is already
cross
drawn in the plane so that no two edges
over. Therefore,
its depiction
in (a) is
the graph in Figure 5-54 (b) is a planegraph
while
When
not.
Example 5.7.1.
outlets
have
we
Suppose
gas, and
(electricity,
three
water) situated
houses
and three
so that eachutility
connected
We
to
the
can
houses
this situation
represent
and the utilities, and
to
each
is
of
by a graph whoseverticescorrespond
where an edgejoinstwo vertices
iff one
be rephrasedin
utility
outlet
The
graph is the
problem can then
resulting
utilities
Before
we
terms
answer
of graph
this
question
e \342\200\242
(b)
(a)
Figure
5-54
524
Chapter5: Graphs
Figure
we will use
1. If
have
we
a cycle in
drawn
must be eitherinsidethe
cross
over
2. The
roles
the
5-55
one
of
graph
outside the
the plane,
cycle,
then any
edge
the cycle,
outside
not
on the
or the
cycle
edge must
of the
being
can be
redrawn so that
cycleare now
inside
the
edges
cycle
and
and vice
vertices
that
is,
formerly
versa.
/
Figure
5-56
Section
525
Planar Graphs
5.7
is not
computer
\\b,d} or
either
{a,e}.Therefore,
planar.
of planarity
Questions
in designing
science
circuit
printed
over
crossing
of nonplanarity
or
at
in such
are prepared
flowcharts
since
Furthermore,
statements
executed sequentially
is desirable that there be as few
to be placedin
least
herealso.
or
overlapping
a way
reasonable
near planarity
as
to allow
it
proximity,
flowlines
crossing
as
becomes an objective
be thought of as dividing
the
into regions
plane
are
connected
the
Intuitively
portions of the plane
regions
the
after
all
curves
and
of
the
points
plane corresponding,
remaining
been
deleted.
to edges and vertices of G have
Each plane
respectively,
G
determinesa
of
infinite
the
exterior
area
called
region of
graph
region
G. The verticesand edges of G incident with a region r make up the
of a region
boundaryof the region r. If G is connected, then the boundary
r is a closed path in which
When the
is
each
twice.
traversed
cut-edge
r
is
of
a cycle of
of
then
the
contains
no
cut
G,
boundary
boundary
edges
Of course,
a
G. In eithercase,the degree of r is the length of its boundary.
G
a
bethe
of
of
need
not
boundary
region.
cycle
in Figure
For example, in the graph shown
5-57 (a), a - 6 - c - / g - h a is a cyclebut thereareonly 4 regions determined
by this graph, namely
A
graph
plane
G can
or faces.
the
-u-v-w-x-y-z-x-u-t.
the concept
of a multigraph. We
we have not formally
used
in
in
sections
4.1 and 5.1. In the
only
passing
not
itself
be a graph in
need
the
of
a
dual
below,
graph
given
Heretofore,
to
referred
definition
its definition
\342\200\242
\342\200\242
cw
\342\200\242
i
I
z
*\342\200\242
\342\200\242
\342\200\242
(a)
r\\
V
\302\243
(b)
Figure
5-57
526
Chapter 5: Graphs
of the
sense
strictest
2 vertices
with
Definition
another
G there is
define
a
vertex r* of G *, and corresponding
to eachedge e of G there is an edgee*
r* and s* are joined by the edgee* in G* iff their
of G*;two vertices
the
regions r and s are separated
by
corresponding
edge e in G. In
particular, a loopis addedat a vertex r* of G * for each cut-edgeof G that
G* is called the
to the boundary of the regionr. The
multigraph
belongs
dual of G.
There
is a natural way to draw G* in the plane:
Place r* in the
correspondingregionr ofG (think of r* as the capital of the regionr), and
it crosses
each e* in such a way
that
the corresponding edge e
then
draw
G exactly
is
of
once (and crosses no other edgeof G). This
procedure
in Figure 5-58, where the dual
are indicated
illustrated
edges
by dashed
Note that if e is a loopof G,thee*
lines and the dual vertices
by asterisks.
multigraph
and
G*
conversely.
~~-s
\342\200\224.\342\200\224
.......
/,| \342\200\242
t/
f
1
\\
N.
/'\\
/'-A
\\
\342\200\242
-\342\200\242-
|, | V*
| JET* |, | fi*
regions,
vertices
and
direct
are
Forall plane
graphs
i)\\E*\\-\\E\\
\\V*\\
\\
\\
\\
Figure
ii)
*^
relations
N-
\\ I
yiQA
Let
r of
\\R\\,and
5-58
consequences
G,
V\\ denote
the number
of edges,
following
Section
5.7
Planar
degG* (r*)
iii)
for
(r)
degG
each
region
r of
be shownthat
it can
connected,
Graphs
G. Moreover,if
527
is
|fl*|-|V|.
iv)
In (iii)
we mean that
degreeof
the
corresponding
r*
r determined
in G*
is the
same as the
by G.
the regions
G.
for
Let us use the notation 2r\302\243/?(G)degree(r)
the sum of the
if
G*
Then
is
of
the
determined
G.
the
dual of G, let
all
by
regions
degrees
sum
of
the
of
of G*.
denote
the
the
vertices
degrees
2r*ev(G*)degree(r*)
Proof.
Then
]T
degree(r)
(iv) above.
by
verticesin any
But we
already know
is twice
graph
degree(r*)
]T
r*EV(G*)
r<ER(G)
that
the number
that
]T
r*EV(G*)
|E |
But
Exercises
for
1.
= | E* | by
Section
A
2.
Show
that
3.
Draw
the
(a)
= 2|E*|.
\342\226\241
5.7
graph
plane
For
degree(r*)'
find a
K5 is
dual
G is
2,3,4,5,
graph
for each
(b)
Figure 5-59
of the following
graphs:
(c)
528
5: Graphs
Chapter
4. Show
that the
graphs
following
are
planar:
1/
\\>
(c)
(b)
(a)
Figure 5-60
the
8i
*#C /7WO**
(a)
me
\342\200\242
(c)
(b)
a
e;
\342\200\242
c
c
(d)
(e)
Figure
(f)
5-61
Section 5.7
Planar
Show that
7. (a)
(b)
Show
A graph
8.
K5
that
KZtZ
G is
e is
Graphs
529
\342\200\224
e is
critical planar if
G is nonplanar
is planar.
are critical
graphs
obtained by removing
a
(a) Which of the following
(i) #3,3
vertex
planar?
(ii) Kh
(b)
(iii)
K6
(iv)
K4tZ
Show
cannot
that
Show
9.
that
have
critical planar
a vertex whose
and
graphs must be connected
removal disconnectsthe graph.
the following
(a)
(c)
5-62
Figure
that the
completetripartitegraph
Show that the wheel graph Wn on n
10. Show
11.
\342\200\242
(d)
\342\200\242,
is nonplanar.
KIXZ
is isomorphic
vertices
dual.
12.
13.
Show
Let
that
G be
with 4
graph
any
a connected
spanning tree of G,
correspond
to edges of
that G and G
have
T form
those
that
the same
and let G
be its dual. If T is a
G * that do not
of
edges
tree for G*. Conclude
spanning
planar graph
show
to its
number of spanningtrees.
530
Chapter
Selected
5: Graphs
1.
n
5.7
for Section
Answers
(b)
n =
= 2
n =4
fa
.A
5-63
Figure
5.8
= 5
FORMULA
EULER'S
If G is a connectedplanar
a plane
will
graph
exterior
region,
of regions,
where
of G in the planeas
2 regions,includingthe
any drawing
|2?|-|Vr|+
V\\
the number
respectively,
denote,
by Euler in
discovered
then
graph,
form |JR| =
| R |, | E |, and |
always
was
formula
1752.
is
a connected
plane
graph,then|V|-|\302\243| +
Proof.
We
observing the
by first
this
prove
determinesonly
a tree
convention,
one
result
We know
region.
for
tree.
By
already that
the
determined
>
+ |JR|
|V|-|2?|
by
for
is one
a tree
have
We
proved the
result
for
determines
\\R\\
ji?1!
=
2.
mathematical
are,
\\Rl\\
regions
\\E\\
= 1.
1 and
k +
separate
\\Vl\\,
\\E\\
G\\
| V1]
Therefore,
induction.
|V|
'-
\\E\\
- IE1]+
\\RX[
1, \\Rl\\
By the
\\E\\
\342\226\241
\\R\\
of the
\\R\\
inductive
2 and
1,
|Vl\\
previous
edge. Thus
of edges,
numbers
the
respectively,
two
since
region
|V|.
if
\\El\\>
vertices, and
But
then
|V\\
Section
531
EuLer's Formula
5.8
the
allows
does
corollary
following
that
number of edges in the closedpath
for graphs
holds
above theorem actually
1:
each vertex
In a
plane graph
we
particular,
that
observe
El
throughout
the
|Jf?| <
have
deree
the
2rG/e(G) degree
regionr G R(G).
Corollary5.8.1. In
graph is
region is
polyhedral
degree (v) >
of each
degree
plane graph
if, in addition,
In particular,
we
of each region
V(G).
G, if
the
is the
a region
forms
the boundary.
Then the
where regions may have degree
loops (though
we are assumingthat
1; thus
|E| >
and
assume
shall
we
However,
simple
have
to
graph
We recall
not).
\\E\\.
The
(r) = 2 \\E\\
connected
of
G such
>
graph G,
(simple)
plane
with
\\E\\>
1,
(1) |E|<3|V|-6and
(2) there
is a vertex v
Proof.
By
|i?|
Euler'sjormula
< 5.
3|/?|<2|JS|or|i?|<2/3|JS|.Hence,2/3|JS|
2 ^ 1/31JB | or 31 V\\| V\\since
if
then
As
each vertex has degree
for
(v) =\342\226\240\
(2)
2ur ViG) degree
<
#
Likewise
it
that
follows
|
|.
61 V\\<2\\E\\or\\
|
2/31 \302\243
2|E|,
But then since |R\\
+
+ 2, we have 2/31E\\ + 1/3|JE| => |fl|
+ | V\\ = \\E\\
> 2, an obvious contradiction. \342\226\241
| V\\ = | E | + 2 or | E \\ > |E \\ + 2 or 0
6>|JB|.
>6,
V\\<l/3\\E\\.
Thus,
The
fact
simple
problem,which
we
in (2)
Theorem 5.8.2.
Proof.
only
to show
that
K5
planar,
is
in connection
Section 5.12.
graph
Kn
Kn is
planar
is planar
for n
if n > 5, and for
this by an
We prove
|fl|\302\253|JE|-|V| +
with the
useful
in the
complete
It is easyto seethat
that Kn is nonplanar
nonplanar.
then
is very
discuss
will
2-10-5
iff
four-color
< 4.
= 1,2,3,4.Thus, we
this
it suffices
have
to show
|JS|<3|V|-6.)
Theorem
or n < 2.
5.8.3.
A complete
is planar
iff m
5 2
532
Chapter
5: Graphs
m >
method of proofby
and the
formula
Euler's
will
contradiction
solve the
following problem.
seven
exactly
If there
14
not exist
does
there
a polyhedral
graph
edges.
graph
|E |
with
= 7, then
since
Exercises
has degree
region
1.
is no
there
that
Prove
polyhedral graph
with
and
30 edges
exactly
11 regions.
2. Provethat
for
(a) 11/1*2
graph
polyhedral
+I V|/2.
|a|*2
(b)
any
+ 1*1/2,
(c) 3|fl|-6>|\302\243|.
V\\ <
2\\E\\
prove
that
V\\ > 4,
with
31 * |
\\E\\
< 21E
>
\\
6 for
and
any
polyhedral graph.
4. (a) If G
(b)
5.
6.
is a
polyhedral
graph
with
that
regions and
and
30 edges,
prove
6 vertices
and 12
edges,
30 edges
has a
vertices
12
is 3.
with
region
with
is 3.
less
than
less
12
G is a connected plane graph with
than
such that eachvertex of G has degree >3. Then prove
Section
7. Show that
is a
if
8.
a direct
Give
proof
>5 and
of degree
there is a regionof
graph, then
polyhedral
degree<5.
533
Formula
Euler's
5.8
each
at
region
30
least
edges.
10.
Let
a connected
G be
plane graph
denote, respectively
all
of G.
V\\ >
3. Let
and maximum
minimum
the
vertices
the
with
3 and
of degree
8 regions
and degree
7 vertices
with
have
of
vertices
Vk
exactly
degree k.
(a) Showthat 5^
(n - 6)Vn + 12
(b)
(c)
+ 3 Vz + 2 V4 + Vb >
= A(G).
n
when
Usethe resultin (a) to prove the existence
V1 +
4 V2
2 Vs
...
of a vertex in G of
degree <5.
that
Observe
that
Suppose
of
holds in (a)
equality
is 3. .
(d)
the
of each
degree
region
= 5. Prove
5(G)
iff
5.
degree
(e) Suppose
or
equal
are
there
at least
to 5.
is not connected
but instead consists
of severalcomponents,
that
connected
is, disjoint
subgraphs.
of Euler's
formula
for a
(a) Find the appropriatemodification
C
with
components.
plane graph
for plane
(b) Show that Corollary 5.8.1is true even
graphs that are
not connected.
12. Draw 2 polyhedral
graphs with 6 vertices and 10edges.
13.
Give
an
(a)
|\302\243|
of a
example
=
connected plane
graph suchthat:
3|V|-6.
(b) \\E\\<3\\V\\-6.
14. Prove or
| E | = 31V\\
15.
Show
that
do not
Show that
(b)
part
17.
Show
that
Kn
is
connected
graph
is planar
Km>n is
that if G
if we
is false
planar
<n <
4.
<
for 1 m < 2 or 1 < n
for 1
is a simpleplanar
graph
with
<
2.
| V\\
>,11, then
the
is nonplanar.
has
G be a plane graph such that eachvertex
degree
that a dual of G will lhave an odd number of regionsof finite
Let
that
such
is simple.
complementof G
19.N
is planar. Explain.
of the corollary to Euler's formula
6, then G
assume G
16.
18. Show
disprove:If
3. Prove
area.
534
Chapter
5: Graphs
20. If G is a connectedplanegraph
the
that
show
inequality
\\E\\
all
with
<
of length
cycles
- 6 can be strengthened
3| V|
at least r,
to
|J5|<[r/(r-2)](|V|-2).
21. The
Forexample, G
if
(1) K^.
(2)
(G) = 0.
for the following graphs:
of G in
the plane.
then c
is planar,
c (G)
Determine
(a)
number of
the minimum
G is
depictions
K5.
(b)
simplybecausethereare too
proof of Euler'sformula
24. Give a
of
25.
many
by
Explain.
edges.
using
number
on the
induction
edges.
that
Suppose
(a) G has 35
G is a connectedplanar graph.Determine
|V
regions each of degree 6.
if
14 regionseachof degree4.
each of degreek.
26. A planar graph G is called maximal planar if, for each pair of
nonadjacent vertices u and v of G, the addition of the edge {uyv\\
(b)
G has
(c)
G has
| R | regions
planarity.
destroys
that
Prove
| E | = 31V
Selected
for
Answers
2. (a)
\\V\\
2 +
| >
3. then
5.8
Section
if G is a
6 and the
+ |i?i/2since|\302\243|>:3/2|fi|implies
(|jB|-|i?|)>2
that|E|-|rt|;>|fl|/2.
6.
>
(r)
degree
Suppose
\\R\\-\\E\\-\\V\\
Then,
5/61R | +
2. But then | R
7. Observe that in
2\\V\\
6n3
4-
|JE|>
2or6|V|
\342\200\242
\342\200\242
\342\200\242
-21JB
equality
-1
-2/3|JB|.
V|=>
- 2/3\\E\\+ 2-\\E\\/3 +
\\
>
12, a
2>
contradiction.
and
|V|<2/3|\302\243|
+ 2>\\E\\
> 2 or | R
\\/6
5 for each
or
5/2\\R\\^\\E\\,2\\E\\z>3\\V\\
r*
of
degree
< 5.
- - - .
< 5.
deg
holds
= nt
(u)
iff
+ 2n2 +
each
region
3n3
has degree
3.
Euler's formula,
+
so|
1/31\302\243|
2/31E\\
V\\
- 2|JS|> 12.Write
= 6n, + 6n2 +
6|V|
- 3n3... and sum.
\342\200\224n, 2n2
=
Section
5.9
Multigraphs
11. (a)
exterior region
G, we have \\Rt\\
if the
that
Observe
of
component
over all
summing
regiongives|fl|-|\302\243|
18.
V\\
of edges
number
The
(| V\\
- 1). Thus, G
535
\\Et\\
+
|V\302\243|
each
Then
1.
exterior
is 1/2
G has
But since1/41V|(|
cannot have
hence
5.9
MULTIGRAPHS
that
be
would
formula
is nonplanar.
use of
recorded
earliest
The
the
Leonhard
mathematician
in Figure
shown
5-65.
vertices, thereby producingthe \"graph\"
Of course, to expressthis kind of structure,the moregeneral
multigraph
notion
of
is required.
edges
a single
with
called
between
numbers,
of
of points.
pair
multiplicities.
a*
the existence
expressing
formally
One way
According
is
the edges
by labeling
to this convention, the
*d
Figure 5-64.
The
Konigsberg
of multiple
Bridges.
536
Chapter 5: Graphs
Figure
Euler's
5-65.
\"graph.\"
natural
convention
labeled
with
multiplicity
1,
of the
extension
multiplicity
between
each
graph shown in
with multiplicity 2,
each of these pairs of
labeled
the
labeled
matrix. The
multiplicity
matrix
of
Figure 5-66is:
the
graph
0 2 2 1
2 0 0 1
2 0 0 1
1110
#\342\200\242
Figure
5-66.
Bridges.
shown in
Section5.9
and
Multigraphs
Figure 5-67.
The
multigraph
of the
Euler Circuits
537
Konigsberg Bridges.
is unsolvable.
Definition
includeseach
multigraph
in a
path
the
(xk_l,xk)9
,...,
is said
(xiyX2)9(x2fX3)
Euler
An
of
to be
then the
ef-.8
are
all
distinct,
an Eulerian multigraph
if
it
and xx=xk.) A
has an Euler
circuit.
We will now prove the main theorem characterizing
that have Euler paths.
multigraphs
nondirected
Theorem 5.9.1.
connected
the two
A nondirected
has an Euler path iff it is
multigraph
Inthe latter case,
0 or exactly2 verticesofodddegree.
of every Euler path in
vertices of odd degreeare the endpoints
and has
the multigraph.
that
G have an Euler path. It isclear
multigraph
Moreover, every time theEulerpath meets a vertex
on the vertex and which have
incident
are
it traverses two edges which
of the path, the
not
been
traced
before. Except for the two endpoints
be even. If the endpoints are
degree of all other verticesmust therefore
distinct, their degreesare odd. If the two endpoints coincide, their
degreesare even and the path becomes an Euler circuit, (if) Let us
Proof,
G must
(only
if)
be connected.
Let
538
Chapter 5: Graphs
construct an Eulerpath
way.
If not all edges in G
are
we will remove
traced,
have
been
The
proofs
the subgraph
obtain
and
of the
following corollaries
the
from
follow
preceding
theorem.
Corollary
it
is connected
5.9.1.
and all
nondirected
has an
multigraph
of its verticesareofeven
Euler circuit
iff
degree.
iff it is
A directed multigraph G has an Eulerpath
5.9.2.
connected and the in-degreeof eachvertex
is equal
to its
of two vertices, for which
it may
out-degree, with the possible
exception
be that the in-degree of one is one largerthan
its
and the
out-degree
its out-degree.
in-degree of the otherisonelessthan
Corollary
unilaterally
Corollary
is unilaterally
A directed
5.9.3.
connected and the
its out-degree.
Example 5.9.1.
with
a penciLwithout
The
lifting
multigraph
It is
the
an Euler
vertex
circuit iff
in G
is equal
to
of drawing
a multigraph on paper
the pencil or repeating any lines is clearly a
can be
path in the multigraph. A multigraph
in
an Euler path. For example,the multigraph
problem
an Euler
problem of finding
drawn in this way iff it has
5-68 (a) can be drawn in this fashion
Figure
exactly once,while
G has
in-degreeof every
directed
multigraph
with
each
in Figure
edge
being traced
interesting
to
observe
that
for determining
Theorem
Section 5.9
(a)
539
Euier Circuits
and
Multigraphs
(b)
Figure 5-68
Ps in each row
takes
the sum
whether
check
and
there are n
O(n)
performedin 0(n2)steps.Tocheck
the
(This
WarshalPs
algorithm.
are not
covered in this
G is
that
A* of A,
closure
reflexive
transitive
can be
the
rows
connected,
which takes
this
process can be
we can compute
that
methods
book.)
Application to ComputerScience
De
symbols. Clearly
symbols.A
de
there are nk
Bruijn
sequence,
register
Let
Sequences.
Bruijn
every sequencea in
2 =
different
the
computation
of the
this condition,
satisfies
fly+A-i
de
binary
graph
binary
of n
alphabet
k over
these
OL,
alphabet,
nk.
The
where
most
n =
if the
important
2, and
sequence
case
in
thus 2 = {0,1}.
and
are
are very useful in coding theory
sequences
it is possible to arrange 2k
that
by shift registers. To show
of k
in a circular array such that the 2k sequences
digits
with
an
Bruijn
implemented
consecutive
digits
be
then L =
1}
of length
sequences
where
{0,1,.. ,,n -
in
the
2k~l
arrangement
vertices
which
construct
the
2k~1
a directed
(fe-l)-digit
is an edge to the
bk_x
\342\200\242 and
an edge to the
vertex b2b3
is labeled bLb2 - \342\200\242
which
b^O
bk_10
\342\226\240
\342\200\242
\342\200\242
\342\200\242
is labeled bxb2 \342\226\240
vertex labeled b2bz \342\200\242
bk _xl. According
bk _xl which
to a
to Corollary 5.9.3 the graph has an Eulercircuit,
which
corresponds
circular arrangement of the 2k binary
digits.
numbers. From
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242 there
540
Chapter 5: Graphs
register
E =
state
as
diagrams,
de Bruijn
and are
{[(bl9.. .A_i),(62,
5-69illustrates
G2>4(
For
of the
example,
diagrams
or Good's diagrams,or
denoted by GnM
. .,ViA)]
is labeled
-A-iA)]
bl9b29..
(V,E)
where
.9bk.l9bk
G 2}
6lf.. -A-iA-
Figure
V,\302\243).
consider
the directed
sequence of edgeswith
the
Euler circuit of
following
labels:
G2>4( V,E)
consisting
Section 5.9
sequenceof 16binary
and the
541
Euler Circuits
and
Multigraphs
is
digits
0000101001111011,
where the
sequence.
One applicationof this
For
example,
of the
by
one digit.
only
digits in the
on G2A(
Euler circuit
is in
concept
16 binary
the
create
V,E)
the
closing
two ends
of the
the sequenceof
16
binary
digits
given
will
16 different
above, when implementedon a rotatingdrum,
generate
In
of
the
drum
that
16
distinct
codes.
and
produce
generalit
positions
by
in
2n binary
a
such
that 2n
is possibleto arrange
circular
array
digits
n
of
in
the
distinct.
areall
consecutive
sequences
digits
arrangement
ExercisesforSection
5.9
graph that
connected.
strongly
2.
a directed
that
Show
1.
a connected
to a set of
decomposed
that
Prove
can
edge
be
in
common.
3. Find an
Euler circuitin
\342\200\242
\342\200\242
Figure
5-70.
\342\200\242
\342\200\242
\342\200\242
\342\200\242
\342\200\242
LM\\./J
CIXD
(b)
(a)
Figure
4. In
the other
over
5.
Prove
have
all
between
bridges
or
an
is called
b and
5-70
two
(Konigsberg)
is
between
bridge
additional
bridges
regions b and c and
d. Is it
of Kaliningrad
a \"bridge.\
542
Chapter
5: Graphs
6. Give
as
7. In
an Euler
ten
edges
has a
that
bridge as well
path.
the definition
of
circuit
Euler
Eulercircuitintersects
8. Is it possible a knight to
with
discuss the
at least
vertex
every
move on an 8 x 8 chessboard
sothat it
move exactly once? A move
between
two
it is made
in either
on the chessboardis completewhen
for
makes
possible
every
squares
direction.
or 2) sequence in which every
9. Builda 27-digitcircular
(0,1,
ternary
once.
appearsexactly
3-digitsubsequence
10. Let L (G) of a graph G be another
graph which has a vertex for each
edge
in G
and two of
edges
corresponding
Euler circuit
G has
if
are adjacent
vertices
these
an Euler
which
no
has
the
iff
have a
in G
that
circuit.
Euler circuit but
for
has an
L(G)
which
L(G)
has
one.
Prove
14.
that
for positive
directed Eulercircuit.
15.
Which
of the
integers 5
in Figure
multigraphs
1 and
5-71 have
n, G8+ln(V,E)
Euler
has a
circuits,
paths,
or neither?
(c)
(b)
(a)
Figure
5.10
HAMILTONIAN
roads
that
the
5-71
GRAPHS
Suppose that a
with
(d)
connecting
salesman's
traveling
certain
salesman's
pairs of
job requires
includes
territory
several
cities
that he visit
each
city
personally.
Is it
Section 5.10
Hamiltonian
for him
possible
specifiedcity
exactly
car
enabling
Graphs
him to
543
visit each
once?
sucha characterization
isa major
unsolved
always
problem
provides
in graph theory,
a Hamiltonian
path,
first
lead
to a
interest
mathematician
Thomas
other hand,
Hamiltonian
in Hamiltonian
graphs, but in fact, the English
P. Kirkman
posed a problem about Hamiltoniangraphs in a
to the
paper
Royal
of
Hamilton's
appearance
submitted
game.
Society
in 1855,
544
Chapter
5: Graphs
graph illustratedin
Clearly the
a
find
Hamiltonian
by
cycle
for we can
the
inspection [following
numbering and
Figure
5-72
is Hamiltonian
of course,
theory.
graph
SomeBasicRules
for
Rule 1. If G
n
exactly
Hamiltonian
Constructing
has
1 edges,
Paths
and Cycles
n vertices,
edges.
Rule 2. If a vertex
containat least edge
one
in
G has
incident
two
incident
cycle will, of course, contain exactly
edges
In particular, both edgesincidenton a vertex of degree two will be
in every Hamiltonian cycle. In sum:therecannot
be three
or
contained
more edges incident with one vertexin a Hamiltonian
cycle.
Rule 3. No cycle that doesnot contain
all the vertices of G can be
a Hamiltonian
formedwhen building
path or cycle.
v. A
Hamiltonian
on v.
\342\200\242
v*
-\342\200\242
v5
Figure
5-72
Section 5.10
Hamiltonian
4. Once
Rule
through a vertex
are
we
has passed
building
edges incident on
unused
other
all
then
only two
because
deleted
v,
edges incident on
can
545
Graphs
be
included
be
can
in a
Hamiltonian cycle.
Example 5.10.1.
5-73)
order
in the
The
of
path
appearance
Hamiltonianpath. However,
through
in
Gx has
vertices
the
of
Gx
(in
Figure
Hamiltonian
e.
vertex
5.10.2.
Example
Likewise
included
any
Hamiltonian
cycle
at
the graph
for
G2
(in
Figure
least
following
three edges
path. The
neither
Note that the
5-73) has
reason.
the
incident on / cannot be
the
vertices
h and
j. There
The appealto
the
symmetry
of the
graph often
See
5-74.
Figure
Gx
Figure 5-73
546
Chapter
5: Graphs
<?3
nm
dm
5-74
Figure
Now
obtain a contradiction
{6,c}).
by Rule 4, we can
reduces
the
deletethe other edge
\\byc\\
degree of c to 2 so
Deleting
also.But
the
then there
must
thena
include
cycle
edge fa,c}
would also
with
{fc,c}.
Hamiltonian
be three
edges incident at a. Therefore, G3 has
There
is, however, a Hamiltonian path, namely,
cycle.
order:
traverses the vertices in the following
a-d-g-h-e-b-c-f-i.
no
would
5.10.4.
The graph
Example
/ is
horizontal symmetry(thevertex
are
There
symmetrical).
so that
vertex
Rules
2 and
edges.
Vertex
once
two
no vertices
off to
chosen
are
edges
in
G4
Hamiltonian
that
path
the
4 will force
e is
degrees
or
apart,
We examine
Case 1.
both cases.
consider
the situation where edges from
proposed Hamiltonian cycle.We choose the
edges {d,e\\ and {e,f\\ as part of our Hamiltonian cycle (the choiceof edges
and
Then
{b,e\\
{e,h\\ would
give the same conclusionby symmetry).
by
Rule 4, we^an delete {bfe} and {efh}. Then at b and h we must use both
incident
on b and h respectively. Thus, we must
choose
remaining
edges
the edges \\g,h},
choose
either {a,d} or
{hyi}, {ayb\\ and {6,c}. Now at d we may
opposite
The
{d,g\\.
we
that
Suppose
~ides
of e
two
cases
are in a
are symmetrical
with
consequently,
delete
subcyclea-b-c-f-e-d-awould
the other edgesincident
on
{a,n},{a,j},{i,k}> and {iym}.
contrary
to properties
have degree
2, but
{d,g}. Now
a and
at /,
so we
result,
i>
We now
of generality,
we
use
cannot
respectively,
edges
Delete
situation which
cycles.Verticesj
remaining
then by Rule 4
be deleted.
must
have arrived at a
of Hamiltonian
to the
respect
loss
forces
and
is
k currently
three edges
to
Section5.10
Hamiltonian
occursat g). We
on c (the same.discrepancy
Hamiltonian cyclein Case1.
be incident
there is no
Case2.
90
form
{dye} and
delete
choose
we
{b,e}
at d
Then
\\eyh).
choose\\gyh)
we must
symmetry we may
angle. By
two edges
we include
that
now
Suppose
degree
and
choose
that
conclude
incident on e that
pair
any
{e,/}. Then by
{hyi}. If
and
547
Graphs
of such
Rule 4 we may
{dyg\\y and at h
b we choose
at
then
{byc}
we
get
c, and
at
leaves
only
that
with
gy
G4
we
a-b-e-f-i-h-g-d-a.
the
delete
one edge
other
edges
{ayn}y
{ayj}y
be
This
cycle
property.
Therefore,
that
a subcycle:
a subcycle:
has
There is no Hamiltoniancycle
Example 5.10.5.
(See Figure 5-75.)
Each
in both
cases we
conclude
no Hamiltonian
for
the
graph
G5.
4. Moreover,every edge
4. No other type edge
a vertex of degree 3 with
one
of degree
connects
in
If
exists this graph.
we had a Hamiltonian cycle
it would
visit each
vertex of the graph passingalternately
a 3-vertex
and a 4-vertex.
through
This cycle would establish
a one-to-one
correspondence between the
vertex
G5 has
of
setof 3-vertices
the
and
graph had
set
six 4-vertices.
by
inspection
Therefore,
either 3 or
of 4-vertices.
a Hamiltoniancycle
as 4-vertices.But
only
degree
there
we
would
Figure
5-75
for
G5.
548
Chapter5: Graphs
that there is no Hamiltonian path for G5 by
for if there were sucha path
the
number
of 3-vertices
could
differ
and the numberof 4-vertices
only
by one. Since this isnot the
conclude
also
can
We
similar
reasoning,
case
Hamiltonian
is no
there
path.
differ
one.
most
at
The next
theorem gives
Hamiltoniangraph.To
that
condition
statement
the
understand
plane
let us
review
vertices.
cycle
Let
terminology.
Moreover,
C: vt
Thus,
v2
r3 =
{t>4,t>9}, ta,^},
diagonal
\342\200\224
\342\200\224
\342\200\224
\342\200\224
\342\200\224
\342\200\224
\342\200\224
\342\200\224
\342\200\224
3, r\\
and
in the
vz
=
v4
2, r4
{v7,v9}y
v5
= 2,
are
vG
r\\
diagonals
exterior of C.
Theorem 5.10.1(Grinberg).
n vertices.
Suppose
v7
v8
v9
vv
1, r6
Let
G be
that C is a Hamiltoniancycle
Figure 5-76
a simple
in
G. Then
Section5.10
Hamiltonian
549
Graphs
cycle C,
to this
(i
\302\243
i-3
First
Proof.
occur
diagonals
- rj) -
2)(r,
the interior
consider
there. Since G is a
0.
of C. Supposethat
plane
graph,
none
exactly
of
its
edges
it passes into
intersect. Thus a diagonalsplits the region
which
through
one
two parts. Thinking of putting in the diagonals
at a time, we see that
the insertionof a diagonal increases by one the numberof regionsinside
the
d diagonals divide the interiorof C into d + 1
cycle.
Consequently
regions. Therefore,
n
ri
\302\243
- 1.
d - ]T rt\342\226\240
and
+ 1
= d
t-3
Let N
However,
\302\243rt.
2JJL3
of the
each diagonal
the
of
degrees
N counts
of the
two
bounds
i'-3
each bounds
C once
(since
- 2d
=Y1ir*
+ n.
\302\273-3
for
Substituting
d, we
have
n
in =
21
2 21
i-3
t-3
^ - 2+ n
so that
n
21
- 2) r,-
(i
- 2.
t-3
By
the exterior
considering
of C we concludein a similarfashion
-
(i
\302\243
t-3
Therefore,
combining
the two
(i
\302\243
2) rj
- n-
that
2.
results gives
-
2)(r,
- rj) = 0.
\342\226\241
i-3
Example
5.10.6.
Hamiltonian cycle.
Show
that the
graph
G6
(Figure
5-77)
has
no
550
Chapter
5: Graphs
5-77
Figure
if a
theorem
Grinberg's
by
in the
region
plane depiction
of
and six
Hamiltonian
= 3,
r6
r4 +
= 6,
and 2(r4
r\\ must
contradiction, and G6
no Hamiltonian
has
cycle.
edgese,
any
must
avoid
the other.
regions
of degree
e\\
Hamiltonian
2(r4 5, the
r\\)
cycle of
-
-3(r5
r\\)
only possible
values
we
G7
of
such
4 and two
must
have
3 divides
that
so
Figure
r4 and
r\\ are
r4
possess HamiU
cycle containing one of the
5-78) does
regions of degree5.Thus,
2(r4 - r\\) + 3(r5 - rl5) =
r}. But then since r4 +
4 and
1, making
or -3.
\\/TV/
#
Figure
a'
\342\200\242
5-78
r4
for
0 or
r\\ =
r\\ either
Section
5.10
Hamiltonian
Now each
Thus,a
edgese and
of the
Hamiltonian
el
separates
have
would
cycle
551
Graphs
the
outside.
el,s
would
guaranteed
Similarly
quadrilaterals.
theorem.
Grinberg's
by
are
not
been discussing ways to show that certaingraphs
one
Now let us reverse our point of view and mention
of a Hamiltonian cycle. The result
sufficient condition for the existence
in several
we state
was proved by Dirac in 1952;a proof can be found
that
With
books on graph theory\342\200\224for example,
Theory
Applications
Graph
are also several other
[4]. There
by J. A. Bondy and U. S. R. Murty
We have
Hamiltonian.
similar resultsthat
Dirac's
each
vertex
are
Theorem.
known.
has degree
Corollary 5.10.1. If
(n > 3),then
for Section
1. Finda
is
for
n vertices (n
with
> 3) in which
a Hamiltonian
G has
graph
simple
at least
simple
graph on
n-vertices
cycle.
directed
graphs.
5.10
Hamiltonian
cycle
in each
of the
following graphs:
(c)
The
cube
(e) Thedodecahedron
(f)
(a)
icosahedron
(b)
(i)
(g)
The
(h)
Figure 5-79
The graph
G7
of
Fig.
5-78.
552
Chapter
5: Graphs
2. Prove
that there
is no Hamiltonian
cycle
in each
of the
following
graphs:
\342\200\242
b
</\342\200\242-
(c)
(b)
(a)
o
The Petersen
\\n
graph
(d)
(e)
<\342\200\242#.
\342\200\242
d
a.
\342\200\242
i
g*
(g)
Figure
5-80
Section 5.10
by^
Hamiltonian
553
Graphs
71
c?e-
\"
VKl
mm'
(h)
'e
\302\243
(i)
'\342\200\242^x//1^
^.^
cm
(j)
Figure
3. Prove
that there
continued
5-80.
are no Hamiltonianpaths
graphs:
(a) SeeGraph
(e)
a
m
<A
\\
each
of the
2.
in Exercise
in
>
(c)
Figure 5-81
following
Exercise
2.
554
Chapter
5: Graphs
Hamiltonian cycle
in
the
also
contain
any Hamiltonian cycle in the graph H2 must
two of the edges {afh},{c,d},{ij}.
Show
that
any
that
contains
both edges {dye} and {e J} cannot also
cycle
that
Show
(b)
must
exactly
Hamiltonian
contain {a,h}.
(c)
in
cycle
(d)
(e)
results
the
Using
Using
H3 can
(c), show
of Example
contain both
that
every
that
Show
**4
(a)
graphs
regions of
regions
degree 5, 8, and
of degree
5, 8,
9 with
exactly
9, and 11with
of degree
4, 5,
5 and
only one
one region
exactly
degree 9.
(d)
planar
with
9.
(b)
H5 must
5-82
Grinberg's theorem to
Hamiltonian
in
\"5
Figure
5. Use
Hamiltonian
in the
cycle
one
of degree
region
with
region of degree4.
one
region
of degree
4.
Section5.10
Hamittonian
6. If
the
following
2.
Exercise
2.
(c)
that
show
555
Graphs
(a)
(b)
5-83
Figure
colored
with
squares
a knight
place
chess, a
knight
horizontally
from
Kny
vertices?
chessboard,
we
on n
graph
complete
8. The
many different
7. How
on one
moves
its
standard
the
white and
alternately
of the 64 squares.According
to
the
rules
of
squares vertically or
followed by moving one
two
proceeding
by
square,
starting
8x8
black. Suppose
Tour
Puzzle
square in a perpendiculardirection.The Knight's
asks the question: Followingthese rules, is it possible
for
the
to tour
knight
once, and
(a)
The
the chessboard,
visiting
question
has an
affirmative
every
square
square?
answer.
Can
you find
such a
tour?
in terms
of graphs.
(b) Formulatethe question
(c) Investigate the Knight'sTourPuzzlefor a 4 x 4 chessboard.
Tour
for a 4 x 5 chessboard.
Puzzle
(d) Investigatethe Knight's
9. Supposethat a classroom
has 25 students seated in desks in a
square 5x5 array. The teacher wants to alter the seating by
move to an adjacent seat (just
student
ahead,
just
having
every
or on the left, or on the right).Show
(even or
behind,
by a parity
odd) argument that sucha move is impossible.
10. Suppose a set lofk verticesin a graph
G is chosen so that no pair of
v in /, degree (v) - 2ofthe
in / are adjacent. Then for each
vertices
on
v will not be used in a Hamiltonian cycle.
edges incident
(u)
2] =
Summingover all vertices in /, we have E1 = 2ue/[degree
556
Chapter5: Graphs
See
- 2k edgesthat
(v)
/degree
(a) Let
the number
that if E -
be
and
Show
respectively.
is
Why
(a)
part
only when
valid
Hamiltonian
El <
Hamiltonian cycle.
(b)
in a
used
be
cannot
cycle.
G,
have no
G can
then
V,
/ is a set of nonadjacent
vertices?
(c)
G4 in
Example
the
that
show
to
5.10.4.
a directed
to
corresponds
Hamiltonian
Selected
path.
5.10
for Section
Answers
2. (b) By
{b,g},
{a,d},
{a,6},
(b).
(g) To
a and
reach
for
similarly
(h)
leaves
no way
Observe
that
be
g we
o, g, i, k,
must go c
and
Similar
m.
- a-
-d
pasting these
subpaths
G.
of
to the
or c
in
included
proof of
- b-
a-
d\\
together
to visit j.
of
4. If
degree
would
Theorem
2(r6
{#,/},
the vertices
Consider
of degree
Hamiltonian
(e)
vertices
the
considering
rj)
that
= 15
at least oneedgeleading
to the inner
pentagon p-q-r-s\342\200\224
\342\200\224
k-lt \342\200\224
from
middle
the
h-i-j
p
subgraph f-g
Section 5.10
Hamiltonian
\342\200\224
n
(a)
edges
of at
of the
each
from
a total
giving
4.
- f. Then observethat
one of the
at least
eliminate
must
we
557
Graphs
outer and
inner pentagons,
least 12 edgeseliminated.
Suppose
Contradiction.
(b)
and
and
{ij} are not used (suppose{c,d}
then
and
must
be
used),
{d,e},{ej}9
used,
{ij}
{dj}
of
giving a triangle subcycle; impossible.Thus, at leasttwo
and
must
three
be
used.
all
cannot
be
{a,h}, {c,d},
However,
{ij}
used, for in that case, (^) if {dj} is used, then {d,e}and {ej}are
two of the three edges at e are not
not
used,
used;
meaning
Thus
(b) {dj} cannot be used,and then
{d,e} and
impossible.
and {a,6},{6,c} are
{g,h},{g,i}
[e9j] are both included. Similarly,
a
with
nine
used, forming subcycle
Therefore,
edges.
exactly
two of the edges {a,h},
and
{c,d}9
{ij} can be used.
If a Hamiltoniancycle contains
both
{d,e} and [ej] then [dj]
cannotbe used, forcing {i,y},{c,d} to be used. But by the first
two of the three verticesmust be used,
part,
exactly
of
If two
{c,d},
{a,h}y
not
are
{a,hl
eliminating
(e)
Grinberg
be equal
r\\ cannot
included
in
5.
(a) 3(r5 -
6.
(a)
cycle.
7(r9
(r9 -
3 divides
r\\)
that
\302\2617
implies
Hamiltonian
cycle
6(r8
9 implies
degree
rj) =
r\\)
Hamiltonian
any
1 and
rj) +
separate
r\\)
= 0
r\302\243)
\302\2611.
If
r4
r\\
Contradiction.
=
this
r\302\2471, but
contradiction.
Thus
1, then
only one
- r\\)
3(r5
region of
+
r3
- rj +
2(r4
r\\) +
3(r5
r\\)
rj) = 1.
Moreover any
4
the three regions of degree
3(r5
3(r5 -
1 inside.
=
r\302\243)
-1
Thus,
and 3
will
into either
r4
r\\
divide
6(r8
\302\2617.
Contradiction.
and
\302\2611.
Thus,
r5
1.
-
558
Chapter
5: Graphs
(c)
- l)!/2
7. (n
9.
to the right;
even.
is
right
left
E - El edgescanbeusedin a
most
a Hamiltonian cyclehas V edges.
The sum E1 counts some edges twice
and
on
bound
Let/
(1)
(c)
(2) /
hence
of edges
the number
= {ayefgyi,c}
students
number
total
nonadjacentvertices,
El
the
number
moving
moving
to the left or
forward or backwardis
must be even, but the
Hamiltonian
would
if
cycle,
but
/ is not a set of
not be the correct
= {b4,UJ,h,nl
(3) /=
{ayc,efgfifl\\.
NUMBERS
CHROMATIC
The Scheduling
Problem
Suppose the
is
Eachcommittee
that
state
legislature
to
supposed
is a
the
At
(a)
(b)
5.11
of
Similarly
even.Hence,
total is 25.
the
10.
moving to
of students
number
The
weekly schedule
different
hours
available
for
other
legislator
at the same
should
time.
needed
of
in the
committee
week as
legislative
be
The
meet
scheduled
question
this problem
with a \"committee\"graph G0 that has a
model
vertices
each committeeand has an edgebetween
to
with
a common member. But then we need
to
committees
corresponding
introduce
a new graph theoretic concept.
of colors
the assignment
of a graph G, we mean
a vertex
coloring
By
of some set) to the verticesof G,onecolor
elements
the
(which are simply
colors.
to each vertex, so that adjacent vertices are assigned different
in
as described
of labeling
is nothing more than a special kind
(This
n colors. If G has
Section 5.1.) An n-coloring
of G is a coloring of G using
an n-coloring,
G is said to be n-colorable.
then
G.
as well as a 3-coloringof the graph
Figure 5-84shows a 4-coloring
First,
we
vertex for
Section 5.11
Chromatic
Figure
The question
define
is: What
5-84
of a graph G
chromatic
k-chromatic.
In
the
investigating
ourselves
to
simple
then no coloringof
Figure 5-85.
We
to
be the
of a graph, we shall
is reasonable since if there
is
number
chromatic
This
graphs.
G is possible.
5.11.1.
Example
of colors required? We
minimum number n
vertices of G. We denote
the
= k we say that G is
x(G)
number
minimum
is the
number
chromatic
the
show
that
559
Numbers
x(^)
= 4
restrict
a loop,
of
the triangle
3 to a, 6, and
c respectively.
am-
Figure 5-85
560
Chapter
5: Graphs
of
Theorem
5.11.1.
The
committee
meetings
in our
Proof.
scheduling problem
schedule
for the
of hours
number
minimum
is x(G0).
G0
coloring
prove this by
committees
contradiction.
time
one-hour
in
G0 an
a legitimate
members.
these
colored
have
= k.
x(G0)
number of a
that
rigorously
that
must forcetwo
are by no
These
vertices.
of
Rule 1.
2.
extremely
this
we list
x(Kn)
some
Rule 4. If
degree
| V\\
always
triangle
generally,
Rule 3. If
where
^\\V\\>
x(G)
n> where
subgraph
(v)
adjacent to v.
= d,
number
k, we must
integer
- 1 colors. The goalis
with
we might
rules to
of the
some
determine
of
number. But to
a small
to
vertices
process
to
difficult
with
the chromatic
guess
that
1)-coloring
of G0 gives a
m-coloring
number is a given
verification
the vertices
to
the chromatic
adjacent
in
Rule
adjacent
\342\200\224
(k
any
To assist
an
more
time. To
give
which
\342\226\241
it is
show
then
can
all vertices
would completely
fact: Ordinarily
unfortunate
chromatic
to
same
However,
differently.
5.11.1
Theorem
verify
the
k. We
color
committeescontainingoneor morecommon
committees meet at different times, and thus the
contradictionsincewe
the
same
of G0,considertwo
m-coloring
Hence,
verticesare
one
at
the
than
correspond to two
vertices
for
where m <
periods,
less
schedule the
we can
that
Suppose
correspondto committeesmeeting
fact,
cannot be scheduledin
all committees
that
show
we
Next
hours. We
x(G0)
Suppose
could
have
may
been
be
listed.
We leave the
the reader.
is the
number
of
requires
then at
k colors
of G.
vertices
these
helpful;
is, x(K3)= 3;
on n vertices.
most d colorsarerequired
to
color
Section
5.11
5.
Rule
= maximum{x(C) | C is a connected
component
x(G)
example,
in
fc-chromatic
studying
colored
sense. For
our
restrict
so in
subgraph
be
fc-critical
is easy
to
of fc-critical
properties
following
often
it is
in some
just
only
proper
any
colors,
G}.
graphs,
we often
in general,
graphs
critical
of
the sense
of G can
be
k colors.
than
fewer
with
arbitrary
are
to graphs
attention
of
56 J
Numbers
Chromatic
see
if x(G)
and
a ^-chromatic
that
by
G.
A.
> k
Dirac.
5.11.2.
Theorem
Let G
(i) G is connected,
(ii)
The
of each
degree
be
graph. Then
a fc-critical
vertex of G is at leastk -
1.
(iii)
be expressed
cannot
graphs
no cut
contains
in the
in
intersect
which
form
Gx
a complete
1,
that
is,
d(G)
Gx and G2 are
In
particular, G
graph.
G2, where
vertices.
Proof,
of G with
(i) If G is not connected,letCbe any component
=
and
let
v
G
C.
be
vertex
of
which
is
in
But
not
then
k,
x(C)
any
>
fact
G
is
that
t
he
/z-critical.
v)
k,
x(G
contradicting
we have
(iiX Since G is fc-critical,
x(G - v) < k - 1 for eachvertex v of
with at
G. If degree (v) < k \342\200\224
the neighbors of v will be colored
1, then
2 colors.
of G - v
But then it follows that any (k - 1)-coloring
most k \342\200\224
of G by coloring v by the color
can be extended to a (k \342\200\224
1)-coloring
of v, contradicting
the fact that
different from the colorson the neighbors
X(G)= k.
(iii)
G = Gx
If
U G2 and
Gv
G2 =
Kn then
X(G\\)
^ k
- 1 and x(G2)<
But by
of G, and G is fe-critical.
1, since Gx and
G2 are subgraphs
relabeling the colors,we can color the vertices of Gx D G2 the same way in
a (k can then be combined to give
both graphs. These two colorings
thefactthat x(G) = k. By considering the
l)-coloring of G, contradicting
G can contain no cut vertex. \342\226\241
case r = 1,it follows
that
immediately
fe
Rule
6.
Every
Let
of G.
fc-chromatic
graph has at
least k
vertices
v such
that
\342\200\224
1.
let H be a
and
G be a fc-chromatic
graph
By Theorem 5.11.2, each vertex of H has degree
fc-critical
at
least
562
Chapter 5: Graphs
-
1 in H,
least
vertices.
H is
Since
fe-chromatic, H
clearlyhas at
rule follows
next
The
G.
\342\226\241
Rule 7.
For
degree of any
< 1+
G, x(G)
graph
of G.
any
vertex
where
A(G),
is the
A(G)
largest
Rule 8. When
a fe-coloring
of a graph G, we may delete
all
building
with their incident edges). In general,
vertices of degree lessthan k (along
when
to build a ^-coloring of a graph, it is desirable
tostart by
attempting
a
/z-coloring
These are
9.
Rule
(i)
G is
graph
Rule 10. If
> |
x(G)
V|
V|/|
follows
that
at least d(G)
of v. Hence
coloras
v.
If
we
V\\
degree
be
x(G)
classes,
d(G)
number
5-86.
d
Figure
> | V|since
chromatic
the
- 5(G)]x(G)
Thus, [ | V|
Find
number
is the
in the
vertices
place
Example 5.11.2.
of Figure
the observation
colored
from
easily
5(G) vertices.
some class.
minimum
the
is
5(G)
- 6(G)where| V
Thisrule
are
successively
the
forcing
thereby
colors,
2-colorable.
of G
cycle
Every
then
and
vertices
- 1 different
equivalent:
(ii) G is bipartite,
(iii)
of
subgraph
complete
5-86
are
colored
every
of the
the
at most
contain
vertex is in
\"wheel\"
graph
Section
Chromatic
5.11
563
Numbers
(/) =
degree
x(G)<s4.
could
see Rule 8 to build a 4-coloring
as follows.
Delete
4.
In
incident
of
than
less
all
(and
edges) degree
particular,
vertices except / will be deleted.
But since the remaining graph is
that
G is 4-colorable.
we
conclude
4-colorable
it
is
while
readily apparent that 3 < x(G) < 4, we do not yet know
But;
is. Xet
us attempt
to build a
what
the
chromaticnumber
exactly
G.
We
start
the
with
the
colors
of
by coloring
triangle a,fc,/
3-coloring
c
is
b
of
2
Now
since
to
vertices
and
colors
1,2,3 respectively.
/
adjacent
d
2.
and
then
is
forced
to
be
and 3,respectively,c isjbrcedto becolored
1,
have
1.
the adjacent
vertices a and e cannotboth
color
now
However,
the
other
a
fourth
the
be
3-colored.
On
cannot
hand, using
Thus,
graph
colorfor e yields a 4-coloring of G. Therefore x(G) = 4.
we
Alternately,
all
vertices
1.
2.
What
is the
What
does
chromatic
Rule
3.
mathematics
namely
numerical
the
and
students
analysis
real analysis
courses they
and
(A),
George:
Herman:
C,GfR
Elaine:
many
time
the
Determine
a careful
suffice.):
AfN
F,G
Ingrid:C,T
Jim:CAT
Ken:
F,N
A,R
Linda: A,T
Fred: C,G
(Give
(T), applied
(i?). The mathematics graduate
plan to take are:
Bob:
DeWitt:C,F
4.
(C),
topology
(N),
Abe:C,F,T
Carol: G,N
How
combinatorics
/f3i3,
to offer
plans
department
next semester,
theory (F),
mathematics
number
periods
chromatic
are needed
numbers
of the following
fewer
colors
graphs.
will
not
564
Chapter5:Graphs
/\342\200\242;
/\342\200\242
/\342\200\242-^A^s
V-M
'I
(c)
(b)
(a)
/\\
(d)
(n
Graph
\342\200\242
\342\200\242
-#c
\342\200\242
\342\200\242
(g)
5. Instead
of coloringvertices,we
in
Figure
5-75.
color
edges so that edges with
different colors. The edge
number
chromatic
of colors to color all
number
the edgesof G. If A(G) is the largest degree of the vertices of G,
prove that A(G) is lessthan or equal to the edge chromatic number
common
ofG.
end
can
are colored
points
of G is the minimum
Section
Chromatic
5.11
6. Find
the edgechromaticnumber
for
the
565
Numbers
graphs:
following
(a)
9C
d*<5-88
Figure
K3.3
(b)
(c) The
(d)
7.
Petersen Graph
Kn
that
Show
of Exercise 4(f)
the graphs
and
8.
Give
9.
We
a proof
give
for Rule
an algorithm
graph G. Firstorder
dx
use
>
J. A. Welsh
by D.
vertices
the
Powell to color a
to decreasing degrees
M. B.
and
according
an ordering may
the first
is
not
vertex.Repeatthe process
using
vertices.
for
9.
\342\200\242
\342\200\242
> dk. (Such
d2 > \342\200\242
the first color to color
unpainted
remaining
are fc-critical
4(g)
some integer k.
Continue
vertex
and
adjacent
the
not be unique.)Then
to color, in
to a
second
the process
sequential
previously colored
color
with
and the
the
third
color,
For
on until all verticesarecolored.
in the graph in
example,
to decreasing
Figure 5-89, we order theverticesaccording
degrees:
a. Use
Use the first color to color e and
the second
e,c, g,a,6,d,/,/i.
color on verticesc, of, and h. Use the third color to colorverticesg,
G is 3-colorable. Note that G is not 2-colorable
since
Thus,
bf and/.
Hence
thereis a triangle
x(G) = 3. Use the Welshsubgraph.
and so
Figure
5-89
566
Chapter 5: Graphs
of
the
upper
bound
to the
chromatic
graphs:
following
Of*
^<i
(a)
a\302\273
\\l
AT
(c)
5-90
Figure
10.
problem
11. The
as
a graph-coloring
organizers
of
problem.
n
There
conflicts,
put in different
will
with
suffice
a graph
hotels.
to
conference
a peace
local hotels.
are
becauseof political
The
conflict problem
vertex
coloring.
12. In
Section
Chromatic Numbers
5.11
of days
number
minimal
at
567
one match
most
a day).
(a) Restatethis
Exercise
(b)
13.
Give
5).
Solve
a
an edge-coloring
as
problem
problem (see
n = 6.
14. The
as
say
this
Figure
for
graph
2-colorable)
Given
. >un, and
vlyu2,.
more
colors
than
usually does) use many
5-91 shows a bipartite (hence,
which the greedy algorithm wastes4 colors.
may (and
coloring
necessary.
(a)
vertex
for
algorithm
greedy
someorder,
a graph
way that
the greedy
it is not surprisingthat
it
pays
be
exactly
by the
needed
colors
in such a
ordered
x(G) colors. (Thus,
to investigate
the number of
uses
algorithm
the
vertices.)
(b)
For each
for
the
which
cannot
a bipartite
3, find
>
greedy
be done if n
= 2k - 3. Can
Figure
15.
> d2 >
an order vlfv2>..
Let dj
d3
>
...
min
integer for
which
dn be
.9vn where
usesat mostmax
k <
graph
algorithm uses
{dt
it
with
vertices
k colors.Show
be done
if n
vi9v29..
that
= 2k
.9vn
this
- 2?
5-91
deg(ut)
+ 1, i\\
dk +
is the
basis
for
568,
Chapter
5: Graphs
all graphs
17. Describe
18. Analyze
the
with
possibilities
and chromatic
for the
chromatic number
of
wheel
graph
Definition 5.2.5.)
Wn. (See
20.
number n.
n vertices
where
n is
odd, is
a 4-criticalgraph.
Prove
1.
(a)
The
Section5.11
number
of
its length is even
chromatic
whether
2.
(a)
(b)
4,
k -chromatic
any
on
or odd.
n
1
+
(c)
5,
3. Fourtimeperiods.
4.
(a)
(c)
(d) 4
(e) 3
(f)
(g)
(h)
(i) 2
6. (a) 3
(b)
(c)
\342\200\224\342\226\272
(ii).
vertices
Suppose
that
colored the
< 3.
Section 5.12
The Four-Color
X(G) =
(c)
(d)
569
Problem
4.
= 4.
X(G)
10. Let
common
5.12 THEFOUR-COLOR
PROBLEM
the
accurately,
problems
in
that
planar
One wants
map
coloring.
no two adjacent
regions
x(G) ^
5 for
graphs
came
for planar
holds
situation
opposite
that
prove
in the
way
to
easy
of an
number
chromatic
the
Although
estimatedat all
graphs.In fact,it is
Interest
graphs.
planar
originally
from
in such
a map
common
some
each map,
asa
monumental
dissatisfied
with
even
skeptical
have been
mathematicians
some
achievement,
(and
proof. Thus,this
of) the
mathematicalproof,
remains:
question
unaided
Does there exist a purely
by computers?
Recent
and past attempts at a completely
when
The most famous failure occurredin
met
with
failure.
mathematicalproof
A.
1879
have
B.
the
four-color
problem.
Kempe published a paper that purported to solve
but in
considered
was
For approximately ten years the problem
settled,
in Kempe's
error
an
1890 P. J. Heawood pointed out
argument.
Nevertheless, Heawoodwas able to show, using Kempe's ideas, that every
We give Heawood'sproof of the following
is 5-colorable.
planar
graph
theorem.
5.12.1.
Theorem
Proof.
We
use
induction
the theorem to
assume
number of verticesof
be true for
all
planar
graphs
the
graph,
with at
and
most n
vertices.
Let
be
a planar
graph
with
+ 1
vertices.
By the
corollaryto Euler's
570
Chapter
5: Graphs
ys:
Figure 5-92
G contains
a vertex v whose degree is at most 5.The graph
G - u
formula,
and so can be coloredwith
five colors,
is a planar graph with n vertices,
by
the inductive hypothesis. Our aim is to show
how
this
of the
coloring
v can
vertices of G \342\200\224
be modified to give a coloringof the verticesofG.
v has exactly five neighbors, and that they
We
assume
that
are
may
otherwise
would
since
there
be
at
most
four
colors
colored,
differently
to v, leaving a spare colorwhich
would
be used to color v; this
adjacent
would
the
of
the
vertices
G.So
of
the
is now
situation
complete
coloring
as in Figure 5-92, with
the
vertices
colored
a,/?,7,S,e,respectively.
vly.. .,i>5
If X and n are any two colors, we define H(X9fx) to be the two-colored
subgraph of G induced by all those vertices colored X or ia. We shall first
consider H(a,y);
(1)
possibilities:
5-93),
components ofH(\\,y) (seeFigure
the
colorsa and y of all the vertices in the
interchange
result of this recoloring is
vx. The
componentof H{a,y)containing
that Vi and v3 both have color 7, enabling v to be colored a. This
completes the proof in this case.
If vx and vs lie in the same component
of H(a,y)
(see Figure
5-94),
\342\200\224*
\342\200\224*
\342\200\224*
\342\200\242
\342\200\242
\342\200\242
then there is a circuitCofthe form v \342\200\224\302\273
v> the
vx
v3
path between Uj and v3 lying entirely in H(ayy). Since v2 lies inside
If
Vi
then
(2)
and
v3 lie
in different
we can
'7,Ni
H(a,y)
{^3j H(a,y)
Figure
5-93
Figure
5-94
Section 5.12
The Four-Color
C and
to
entirely
v4 lying
colorsof
the
all
vertices
The
outside
lies
v4
v2
completesthe proof.
The
used in the proof of
argument
looking at a two-coloredsubgraphH(a>y)
often called a Kempe-chainargument,
Exercises
571
Problem
theorem
5-color
that of
colors) is
by A. B.
(namely
the
interchanging
it was initiated
and
since
four-color
on the
attack
\342\226\241
problem.
1.
a Kempe-chain
less than 30
Use
(a)
with
section
5.8.)
of a
vertex
of
Then
<4.
degree
4.
each
iff
a simple
that
Show
graph
4 is nonplanar.(Hint:UseRule
7. If
(a)
is the
30
17
and
edges
8 vertices
10
and 13
be 2-colored.
cannot
edge>s
6.
with
Show
a simple
that
connected planar graph with
vertices cannot be coloredwith 2 colors.
with
Show that a simple connectedplanar
graph
5. Show
than
less
with
4 colors.
prove
colorable.
3.
planar graph
most
graph
planar
every
at
of G,
complement
x(G)
+ x(G)
G.
(b)
x(G)x(G)>\\V\\.
(c)
+
/|V|+1\\2
/|V|
(d)
x(G)
< |
V\\
of degree
each
7 vertices
with
5.11 and
section
9 of
be 2-colored
G can
graph
exercise 5.)
then showthat:
1, where
V\\
is the
number
of vertices
of
1\\2
^ rc/n
- d whered is minimum
degree
of the
vertices
of
G.
A
so
Let
of the
variation
that
the
coloring problem
are colored
G and suppose
corresponding
edges
in G
distinctly.
for each
adjacent
Show
edge of
iff
that
the
Chapter5: Graphs
572
G can
graph
be edge
colored with
k colors
iff the
vertices
k colors.
with
can be colored
can
be 4-colored
9. Prove that the regionsof a planegraph
Hamiltoniancycle.
has
G is a plane graph where eachregion
that
10.Suppose
G = K4.
unless
Show that G is 3-colored
Selected
if G
has a
degree
3.
Answers
1.
of L(G)
(a)
There
(b)
Take
duals.
Exercise 6 of
2. Apply
3. Let
5.8 to
section
the dual
of G.
graph
edges
Suppose that
G can be 2-colored.
Then
Rule
9
of
section
5.11
in G
each
by
cycle
of regions
has even length. By Euler's Formula,the number
for G is
of coloring
the
vertices
of G is
| JB71 - | V\\ + 2 = 9. The problem
to
of
the
of
the
the
dual
of G.
equivalent
problem coloring
regions
The dual G* contains 9 vertices, 17 edges, and the degreeof each
vertex
of G* must be even. Now
since
G is simple each region of G
has degree> 3.Thus,
vertex
each
of G* has degree >3 and since
the verticesof G* are even, in fact, their degreesare >4. Thus in
G*, 21E* | > 41 V* | or 34 > 36. This contradiction showsthat G
be
The
length
Thus,
and
17
with
number
10 vertices.
be 2-colored.
cannot
4. First
a plane
length
of
G.
G is
is a simple graph,
a graph (and not a
of length
2. Hence there is a cycle
3 verticesrequireexactly
3 colors.
Rule 9 to G*. Interpret this result for
cycles
3. These
exactly
the dual
5. Take
since
is a circuit of length 3.
= 7* If all circuits have
= 14. But|\302\243|
= 13.
Apply
G.
6.
If such a graph is
conclude | E | = 14and
each
are8
Euler's
Formula
sum
of
degrees
to get | R | =
9 number
is
formula
to
9. The degreeof
28. Hence there
7.
regions
is >
3 and
of
degree
Section
color.
G, these
in
Thus,
the complete
But then | V| -
Kk
(ft
Let
< X(G)
< x(G)k
all vertices in
we
x(p)- Then from the fact that (k
> n
by 7(b). Thus, (k +, kf >:4n
+_k)2 >: Akk. Now kk
+
k)
l)2 >
(n
By 7(a), k +_k < n +
(&_+
>_2Vri.
>
4fefe or [(n + D/2]2>:fe*.
+ fe)2
k =
-k)^>0
(k
a Hamiltonian
C be
separatesthe plane
into
and
red
alternately,
say,
and
green
alternately
cycle for
the
the
interior
plane
of C
G. The
graph
and the
exteriorof
determined
regions
REVIEW
inside
they all
1 so
or
10.
since
k vertices
subgraph
Then
class.
largest
573
Problem
The Four-Color
5.12
cycle C
C. The
be colored
yellow.
5.7-5.12
FOR SECTIONS
1. Isit possible
to
team
exactly
a soccer
have
9 games?
plays
multigraph
answer with
result
which each
a graph
from
or
graph
theory.
that
Suppose
then
3. For
the
a graph
3, and
degree
connected
has
following
graph
H,
components.
574
Chapter 5: Graphs
(a) UseEuler'sformula
and
planar.
(b)
4. Let G
a simple
be
graph
with
116
that H is not
of H.
number
chromatic
the
Determine
to prove
corollaries
its
chromatic
and
vertices
number
5.
(a) Provethat
in
5-coloring
any
times.
(b)
Prove
that the complement G of
isomorphic to K24, the complete
graph
5. Prove that
if
degreeat least
6. Prove that the
is any
six,
vertices.
graph for which each vertex has
graph
7. Determine
or
(a) a Eulercircuit.
whether
obtained
(b)
a Euler
(c)
a Hamiltonian
cycle.
(d)
a Hamiltonian
path.
(a)
In
the
carefully
(b)
Also
the following
path.
G below find
that none exists.
x(G).
5 edges
from
the
or
show
graph has
-\342\200\242
#c\342\200\224
graph
determine
by removing
planar.
not
(e) chromaticnumber 3.
8.
on 24
connected
G is not planar.
Kn is not
graph
complete
then
a subgraph
contains
Vv
Vv/S.
AX^\"#
a Hamiltonian
cycle
Section
5.12
The Four-ColorProblem
Use
9.
simple
There
this
in the
cycle
following graphs:
10. Prove by
11.
theorem to
Grinberg's
Hamiltonian
575
on n
all integers
For
induction:
vertices
(c)
If 17
table
during
as
a problem
(d) Showthat
if
be partitioned
about graphs.
odd integer,
is an
how
to
days
many
this
model
Kn
can
Hamiltonian
cycles.
13. (a)
two
of
the
14. Suppose
Xmm
graph
has
> 1.
cycle
that G is a planar graph with
if
a table
around
of his
n vertices
each
of which
induction
has
Chapter
5: Graphs
15. A
coloring of a
simple graph G
the
partitions
set of
for
Draw
the
(b) a
with
wheel
a cycle
(f) a
(g)
cycle
Kn
18.
Determine
19.
knight
returned
chromatic number
Show that
x(G) > | k |.
of
chromatic
of
number
bipartite graph,
(c) a wheelwith
(d) a complete
(e)
color iriG.
of one
vertices
of
G the
n vertices,
16.
the
dual
17. Determine
(a) a
set
complement
G has
If
(b)
a maximal
k be
Let
(a)
vertices into
8 vertices
13
vertices
WSt
W13,
graph Km
values of n
9 of
Section
connected
length3,then|\302\243|<2|V|-4.
5.11.
graph has no
cycles of
Boolean
6.1
Algebras
INTRODUCTION
algebras
are named
Boole(1815-1864) in
who
1854
published
and
from
stems
algebras
applied
mathematics
the
to them.
\"
is the \"smallest
Boolean
Of special interestto computerscientists
whose
domain
is
the
set
of
Boolean
elements{0,1}.
expressions
algebra
Boolean
this
specific
algebra are
generated
by n Boolean variables over
in computer
realized by combinationalnetworks
and
are used extensively
design. A switching
algebra is developed in this chapter for the analysis
and synthesis of such networks.
out of binary
Sincedigital computers
are built predominantly
two
components\342\200\224that is,
which
assume only
possible distinct
components
as
in
units
functional
a digital computer can be viewed
positions,various
combinational
(or switching)
networks.
employing
such
binary
devices are
their speedof
577
Chapter
6: Boolean
Algebras
compared
nonbinary
The chapter
begins with
Boolean
We
functions.
the
discuss
and
in
initial
design are illustrated\342\200\224the
(ALU) of a digital computer and
computer
unit
logic
reliability
higher
discussion
a detailed
then
simplification
applications of
arithmetic
and
devices.
of the
design
design.
logic
ALGEBRAS
BOOLEAN
A
is a
algebra
two distinct elements
Boolean
least
at
distributive, complementedlatticehaving
as well as a zeroelement
0 and a one element
the Booleanalgebracan
1. Namely,
be
by the
represented
system
B is
where
+ and
(complementation)
1.
2. V a,b
(a) a
3.
b G
4-
G B,
(a) a + b
4.
=b
\342\200\242
b = b
two elements
a,
6.
Vayb>c
a +
(b)
Va
B.
a, Va G
B.
\342\200\242
1 =
=\302\243
6.
existence
of zero
existenceof unit
23,
(a) a + a = 1 and
a
laws
a + 0 = a, Va
a
(6 \342\200\242
c) = (a + 6) - (a +
c),|
\342\200\242
(6 + c) - (a \342\200\242
6) + (a \302\253
c),
J
of
B, 3 a G 23 (complement
(a)
(b)
a,b G B suchthat
commutativity
I
\342\200\242
a.
j
(b) 31 G B suchthat
5.
operation
such that
30GB
(a)
is a unary
following axiomshold:
B,
B.
\342\200\242
b G
(b)
and
operations,
G B,
(b) a
a,b
binary
that the
at least
exist
There
\342\200\242
are
such
\342\200\242
a =
existence
0.
laws
distributivity
a) such
that
of complements
The associativelaws
a +
for
(b +
c) = (a + b)
all a,6,c
23
can
Theorem6.2.9.)
be
and
derived
a - (6
from the
\342\200\242
=
c)
(a
\342\200\242
\342\200\242
c
b)
Section
Boolean
6.2
When parentheses
be
that
implied
Algebras
579
\342\200\242
are
operations
axioms
be noted,
a + (6 \342\200\242
c) = (a + b)
hold for
does not
algebra.
ordinary
example of a
The
simplest
0 and
elements,
the
only
two
addition
law over
distributive
that
1, definedto satisfy
\342\200\242
+
(a
c)
1+1=1.1=1+0=0+1=1
0+0=0-0=1.0=0.1=0
1=0
6-1.
is
It
axioms of
to verify that
of the
all
Clearly,
easy
above is
algebra
in the
postulates
a Booleanalgebraaresatisfied.
the
Boolean
the
from
proved
other
postulates
in the
set.
Somecommentshould
have
terminology.We
The
designers.
made
the
adopted
satisfiesthe properties:
0+0
Mathematicians,
algebra
in
the
0 +
0+1
and
0,
however,
commonly
sense:
= 1
+ 0 = 1+
use the
symbol + in Boolean
following
0 = 0,1 +
1=0
and
+ 1
= 1
= 1 + 0 = 1.
this latter
use the symbol \302\251to denote
computer
designers
binary operation of addition modulo2, sothat for them, 1 \302\2511 - 0, and,
= xxx2 + xxx2 for each xx, x2 G B.
in general, xx \302\251
x2
V and A in place of our + and use
Moreover,mathematicians
usually
The principal
reason computer designers used the symbols
+
operations.
\342\200\242
and
was
in the past commercial line printers did not
have
that
the
V and A. It is frequently
case that the terms sum, join, and
the
symbols
in a Boolean algebra as are
disjunctionareused interchangeably
Normally,
product,
meet,
and
conjunction.
580
Chapter 6: Boolean
Algebras
A partial
6rder <
x <y
in
While
entire
the
fact
Booleanalgebra,
the
make
up
information
and
=
\342\200\242
iff
+,
and
\342\200\242,
we will
frequently
( 23, +,-,->
say,
= y.
the domain
and the zero and
J3, called
set
system\342\200\224the
operations
as follows:
algebra
x + y
and
Boolean
-,
suppress
of the
unit\342\200\224
some
algebra.
that
It is easy to see, from the above
axioms,
they are arranged in pairs
from
the other
and that eitheraxiomcan be obtained
by interchanging
the operations of +'s and -'s, and the elements 0 and 1. This is the
principleof
For
duality.
example,
a +
(b
- (a
\342\200\242
c)
+ b) - (a
+ c)
i
a
Every
(b
that can
theorem
alsotrue.
We
sh^ll
manipulation
is
theorems
c) = (a - b)
\342\200\242
+
be provedfor
+ (a
Boolean
\342\200\242
c).
algebra
has a
dual which is
duality.
B,a + a = a.
Va G
6.2.1.
Theorem
Proof.
a
a =
(a -f a)
= (a
+ a)
\342\200\242
1
\342\200\242
+
(a
a)
+ aa
=a + 0
=a
= a
Proof,
Va G
6.2.2.
Theorem
(a)
By
the
Axiom
4(b)
Axiom
6(a)
Axiom 5(a)
Axiom 6(b)
Axiom
5,a . a = a.
principle
of duality
4(a).
\342\226\241
Section6.2
Boolean
(b)
aa = aa
= aa
4- aa
= a(a
+ a)
=a
4-
shown
\342\200\242
1
6.2.2are
the
as
known
Axiom
a2
B we
ax
Let ax = 02 and
a2
= ax
laws
0 and
1 are
unique.
elements,
Ox
and
a2 4-
02
of
each
0! = 02
and
0! +
02 =
0! - 0! + 02,
and
(V
0! = 02.
reader can easily
thus
of
show that
the
proof
theorem
is by the
duality.
6.2.4.
Theorem
02. For
and
= a2.
the
By the useofthe principleof duality,
the element1isalsounique.
of fact, we shall state the dual
results
As
a matter
The
without a proof throughout the rest of this section.
principle
dual
0X. Thus,
2(a) 02 +
by Axiom
of the
use
6.2.1and
for Boolean algebra.
two zero
are
the
4- 0!
02 +
But
there
\342\226\241
6.2.1. Theorems
of Theorem
elements
Suppose
E
6(a)
proof is obtainedby
proof
The
that
and
fl^EB
the
idempotent
Theorem 6.2.3.
Proof.
6(b)
Axiom 4(b).
the complete
here,
4(a)
Axiom
Axiom 5(b)
= a
As
Axiom
581
Algebras
Va E
B, a + 1 -
and
- 0
= 0.
Proof.
a + 1 = (a + 1) \342\200\242
1
= (a + 1) \342\200\242
(a + a)
= a4-l-a
= a
4- a
=1
a
Theorem
4(b)
Axiom 6(a)
Axiom
5(a)
\342\200\242
0 =
6.2.5.
Axiom
6(a)
Principle
The elements
of duality.
0 and 1 aredistinct
and
\342\226\241
I =
0; 0 =1.
582
Chapter
6: Boolean
Algebras
Proof.
G B;namely,
Let a
\342\200\242
1 =
Axiom 4(b)
\342\200\242
0 =
Theorem
and
0
6.2.4.
know
that
0 =
0 +
0-1
and
Theorem
Proof.
two complements,
a has
Suppose
\342\226\241
a.
there exists a unique complement
VaGB
6.2.6.
and 6(b).
Axioms 4(b)
1-1.1-0
ax
and
a2. Thus
by Axiom
(a,b)
a + ax = 1,
= 0,
a \342\200\242
ax
a2 =
\342\200\242
=
0.
a +
a2
Hence,
ai =
1 \342\200\242
ai
= (a
+ a2)
Axioms
' ai
Axiom
6(a)
\342\200\224 \342\226\240+^2al
CLCii
Axiom
5(b)
= 0
Axiom 6(b)
4- a2ax
= aa2 +
\342\200\242
a2
\342\200\242
a\"2
Axiom
5(b)
Axiom
6(a)
Axiom 4(b).
a2
\342\200\242
6 =
4(b)
aia2
= (a + a^
= 1
2(b) and
and
Let
a,b
\342\200\242
+
(a
G B.
b) =
a.
Then
Section6.2
Boolean
583
Algebras
Proof.
a-6 = a-l
a +
+ a-b
= a(l
=a
a
+ b)
(a
6.2.8.
Theorem
4(b)
Axiom 5(b)
+ b)
\342\200\242
1
6.2.4
Theorem
= a
Axiom 4(b)
= a
Principle
law.)
(Involution
Since a = (a)
Proof.
Axiom
are
we
Va
of
= a.
Bfa
for
searching
\342\226\241
duality.
a complement
of a.
However,
So
is one
thus
and
of
and
Proof.
for
all a,6,
+ (b
+ c)
\342\200\242
=
\342\200\242
\342\200\242;
namely,
aa = 0.
and
A Boolean
6.2.9.
+ and
= 1
a. By Theorem6.2.6the complement
isunique
of
complement
a = a.
\342\226\241
Theorem
operations
+ a
= (a + b) + c
c)
(b
(a
\342\200\242
\342\200\242
c.
b)
Let
a =
[(a + 6) + c] \342\200\242
[a +
- [(a + b)
c]
\342\200\242
a +
(b +
[(a
c)]
+ 6) + c] - (6
[(a + 6) + c]
= [(a + 6) \342\200\242
a + c \342\200\242
a] +
- a + [(a + b) + c] \342\200\242
(b + c)
- a
- a
But
+ {[(a+ 6)
+ (6 + c).
c]
\342\200\242
6 +
[(a +
b) +
+ c)
. (6
e] -
c}
also
(a + 6)
c)
584
Chapter
6: Boolean Algebras
a + (6 + c)
Thus
Similarly,
by the
= aT
Proof.
\342\200\242
\342\200\242
c
b)
\342\226\241
For
laws).
+ ab
=1
(a + 6) and
establish
we
(a
c)
any
Va,6
23,
\342\200\242
b and
(a
6.2.6
+ 6)
6.2.10
(DeMorgan's
a \342\200\242
6 = a + 6.
Theorem
a + b
(6
+ c.
(a
\342\200\242
\342\200\242
=
of duality.
principle
a b
+ 6)
(a
- 0.
\342\200\242
ab
and by the
are complements
Theorem
laws.
DeMorgan's
(a +
and
that
6) + a6= [(a +
b)
a]
+ 6]
(6 + 5)]
(6 +
. [(a
= [5 + (a + b)] . [a
= [(a + d) + 6] - [a
- (1 + b) \342\200\242
(a + 1)
+ 6)
5)]
(6.2.1)
-1-1
= 1.
(a +
b)
= a(o6)
4- 6(6 a)
= (aa)6 + (66)a
\342\200\242
a 6
(6.2.2)
=0 + 0
= 0.
Clearly
Theorem
Proof,
a (a + 6)
Before
observations. First,
a +
6 by the
6.2.11.
Va,6
\342\200\242
6 =
\302\24323,a
+ a6
= a
+ 6 and a(a +
ab - (a + a) (a + 6) = 1 \342\200\242
(a + 6)
by the principle of duality. \342\226\241
a +
= ab
principleof duality.
concluding
if (23,
= a
6)
- a6.
+ 6.
this
+ ,-,
of B
and
which inclosed under the operations+, \342\200\242,
, and
0,1 G Q, then
of (23, + ,-, ,0,1) calleda Boolean subal(Q,+ ,-, ,0,1)is a subalgebra
gebra.A Boolean subalgebra is a Boolean algebra.
Second, we can observe that set theory is an example of Boolean
of set
Let A be any set and let
denotethe operation
algebra.
BooleanAlgebras
Section 6.2
C containsthose^elements
to A. Thus
relative
set but not in set C.Then
complementation
the universal
585
(P(A),U,n,
in
found
,0,A> is a
Boolean
for any
f(u),g(u)}
tediousjobto
for
(w
u\302\243 U.
Likewise,
min
each
all the
that
check
\342\200\242
and
for
f(u),
function
/ corresponds uniquely to
= l). Then it is easy to
that
see
to
Sg and
SfUSg,SfD
\342\200\242
g)(u)
U forms
a subset Sf
- g,
f + g,f
of
need not be a
L^ where
and /
the complement of Sf in
Sf =
correspond
U. Because
we know that
algebra
Boolean algebra. (It is a fact
the set of all functions from
a
that
any Boolean algebraB is also
we
not
a Boolean
but
shall
that
fact.)
algebra,
verify
setalgebra P (U) and the Boolean algebraofall functions
TheBoolean
from
U into {0, 1} are essentiallythe samein the
sense
of the following
definition.
we
know
the power
that
set of
by (/
axioms of a Booleanalgebraaresatisfied,
\302\243
[/|/(u)
respectively
/ are defined
u G U. It
each
algebras,
in the
operation
(1)
(2)
h(a
h(a
+ b)
h:A
and
\342\200\224*
B is
called
preserves
= h(a)
\342\200\242
=
b)
+ , \342\200\242,
-,0,1)
a function
homomorphismif
a Boolean
is also a
set U into
above
defined
h(b)
A h(b)
h(a)
(3) h{a)=h{a)
A
Boolean
h:A
homomorphism
\342\200\224*
B is
a Boolean
isomorphism
if h is
+
bn)
(c\342\200\236
c2,...,
(cl9
c2,...,
cn) =
(bi +
c,, b2
and
(hub2,..
,,bn)
= (bub29...,
fen).
c2>...,
fcncj
bn +
cn),
Chapter
6: Boolean
Call this
Algebras
Booleanalgebrathe directsum
therejs
of B.
n copies
of
a natural
from the
uj,
isomorphism
only
h:<P(U)->B%
where
H(S)
= (bu
b2
if^GS
otherwise
bn)
with
bi =
for
i =
1,2,...,
proof that h
n. For examplewhen
n =
4, h
The
(1,0,1,1).
ExercisesforSection
6.2
1.
Let
least
this
in a
elements
l2 be
lx and
poset L. Provethat
3. Let V = {1,2,3,4,6,8,12,24}
be
a poset
ordering|
(\"is
with
Does the
poset
A greatest
element?
a least
have
to the partial
and lub of every
respect
the gib
of\.") Determine
divisor
of elements.
pair
l2 have
and
(greatest)
a
if lt
is unique.
(lub)
gib
element?
4. Provethat
is a
gcd)
1cm,
(M;
of positive
a set
integers
lattice under
that
represents
/, wheretherelation/ on
njn2
iff
nx
is a
divisor of
divisor).
5.
Prove
that if
and
lx
(lx V l2
6. Let
elements
(lx A l2
lx)
L be a poset with
that L
(ij
l2 are
forms
G {1,2}),
lattice
a least
if for
there is an
(ij G {1,2}).
of a lattice <L;V,
= l2)
element
any
(l2
and a
xlfx2fyuy2
<
A),
then
lx).
greatest element.Show
\302\243E
L,
where
x,-
<
xt <
z <
yj9
y;
Section
Boolean
6.2
7.
<L; V,
lattice
<
(l2
V (I,
lx) ->(l2
all /i,/2,/3 G
if for
is modular
>
587
L,
(/2 V /3)).
= lx A
/3)
Algebras
qi9q2
any
>
that
is a
of a
subsystem
every
algebra.
10.
/3)).
Boolean
algebra if a
Boolean
algebra
in any
that
Show
\342\200\242
x =
0 and
a + x
= 1,then
= a.
that in any
11. Show
four equations
the following
are
equivalent:
mutually
12.
(Z2 A
on a set Q. For
relations
equivalence
define qx < q2 appropriately,
and show that
lattice under the defined operation <.
E(Q),
(2?(Q);V,A
Show
I,
8. Let
9.
(^ V
(/2
that a
Show
b =
+ b=
a, a
Boolean algebra23
(be) = (a 4-
a +
b, 5 + 6 = l,a-6
for
6)c
the
satisfies
all a,6,c,
23
0.
law:
modular
where
a <
c.
13.
from
functions
14.
Draw
a set
n elements
containing
of the
diagram
in the
of elements
number
the
Determine
Boolean algebra of
to the set {0,1}.
all
partial
algebra
{a,6,c,d}to{0,l}.
15.
(a)
LetD110
of
110.
Thezero
(b) Showthat if
18 then
definition
Dl8
{1,2^3,6,9,18}
(Dl8ilcmygcdy ,1,18)
.
of the operation
between
(c) The essentialdifference
that 110is square-freeand 18
square-free m2
if
Show
divides
that if Dn is the
integer n, then
x = nix for
any
the
is not.
Dn.
,/,n)
two examples
A positive integer n
divisors
is a
of
any
above
(Dnylcmygcd>
x G
n for
Booleanalgebra
Boolean
of a
is
is
= 1.
square-free
algebra where
Chapter 6: Boolean
Algebras
B:
(a)
a_+
(b)
ab +
(c) a
Selected
b =
6
\302\251
for
Answers
the
for a,b,c
hold
following
6 \302\251
\302\251
ab,
be = ac if
< c if
a + c=6
ac = 6c iff
(d)
(e)
Boolean algebra23,
that in any
Show
16.
< a,
c < b
a <
c and fc
c iff
c <
< c,
< c,
fc
\302\251
fc.
\302\251
6.2
Section
and
preserved
Thus,
B.
be a subsystem
of the Boolean algebra <23;V,A,
)
the commutative, associative, and distributive
laws
are
in <B;V,A, ). If x G B, thenxG 23; hence
x V 3c,jc A 3c G
the elements 0 and 1 are included
in B and
)
<S;V,A,
laws.
complement
and,
FUNCTIONS
BOOLEAN
Let J8 =
an atom if
< 23,
+,
be a Boolean
for every x El
algebra.
\342\200\242,
,0,1 >
=\302\243
0 and
or
It is easy to showthat
of all atoms in 23, then B
a G
element
An
B is called
B,
\342\200\242
a =
\342\200\242
a =
0.
Boolean algebra,
to
B is a finite
is isomorphic
if
and if
R is
the set
<P(fl)fU,n/>
immediate
of
finite
every
whose
domains
above is that
of the
corollary
exercises
(See
of
is a
Boolean
algebra
have the
same cardinality
power of 2. Also,
must
It is
clear
from
the
above
the cardinality
of
discussion
Boolean
be isomorphic
that the
<B2,
whose
domain
is {0,1},with
the
+ ,.r,0,l>
operations
given
B is
2 to
algebras
(details
are
\"smallest\"Boolean
algebrais
j82=
end of
of the domain
the cardinality
2?. Namely,
at the
14-19
in Table
6-1.
Section6.3
0
1
0
1
0
1
1
1
In any
For
of the
elements
n-tuple
algebras
expressions
2. If ft
are
and
For example,
0
1
(xl9x29..
for
mappingthe algebra
the
are
fi2
and any
generated
expressions
\342\200\242
0 \342\200\242
+
1,
Xi
x2x3,
Boolean
finite
Boolean expressionsgeneratedby
.,xn) over B, recursively as
of the Booleanvariables
B.
elements
of 3e over
generated by
of B
element
Any
3c
and
in general,
B2 in particular, we define
algebra
1.
Boolean
\342\200\242
define functions
one may
system
algebraic
itself.
into
589
Functions
Boolean
jcx
in 3c are
by elements
xxx2
of x
are Boolean
Boolean
over
B,
so
expressions
the
/:Bn
\342\200\224B
elements
of 3c
for any argument 3c,can be determinedusing
/(?),
. We
refer to these functions as Boolean
the operations +, \342\200\242,
functions
of n variables
over B.
For example,xY + x2 determines
the function f(xux2) = x1 + x2; thus,
/(0,0) = 1,/(0,1) = 0,/(l,0) = l,and/(l,l) = 1.
where
and
It is
clear
that
Boolean
functions.
different
For
Boolean
example,
expressions
x1
\342\200\242
+
(x2
may determine
jc3) and
(xx
\342\200\242
-f
x2)
the same
(xx
\342\200\242
jc3)
the
the same Boolean functions. DeMorgan'sLaw,
Laws, the Distributive Laws, and otheridentitiesfor Boolean
Absorption
One
expressions.
algebras
bring out forcibly the redundancy of Boolean
of the main objectivesof this section
will be to eliminate the ambiguity
which
would
otherwise
result, by developing a systematic processthat
will
to a simple
reduce
\302\253>^n)
every Boolean expression /(^Ci,^c2>\302\253 \342\200\242
canonical form
such
that
two Boolean expressions represent the same
Booleanfunction
if and
only if their canonical forms are identical.
functions fx and f2 over the same
two Boolean
Furthermore,
any
given
the
use
n-tuple 3c E B, new Boolean functions can be determinedthrough
of the following three Booleanoperations.
always
determine
590
Chapter
6: Boolean
Algebras
= 71(x1,...,*\342\200\236),
g(xl9...,xn)
. .,Xn)
h,(Xi,.
\302\253(Xlv .
.,*n)
. ;Xn)
f\\\\Xu.
= /l(*lv
\342\200\242
'j^n)
\342\200\242
\342\200\242>^n)>
l2\\x\\y
' I2\\xlf
\342\200\242
\342\200\242>*\302\253)\342\200\242
will result
in the
of this
process a finite number of times
functions
over n variables.
development of a complete classof Boolean
in {0,1 }n and
2 elements
in {0,l}, there are 22\"
Since there are 2n elements
Boolean
functions
of n variables over B2.
Let Fn be the set of all Boolean functions of n variables over B2- The
system
Iteration
7n=(Fn,
0,1)
,.,\"
Definition
or its
6.3.1.
complement,
Definition
B, which
x* is
literal
6.3.2. A
form of
Boolean
has the
to be a Booleanvariable
there
that
clear
Example 6.3.1.
minterms
four
The
generated
by xu... ,xn over
n
of
distinct
literals is
(product)
are 2n minterms generated by n
expression
a conjunction
variablesin B2.
in
n generators
5c.
calleda minterm.It is
x1and jc2,
defined
variables
generated
by the two
variables,
J52are
XjX2,
X\\X2y
X\\X2i
and
X\\X2*
of a disjunction
a Boolean
(sum) of n
expression of the form
distinct literals is calleda maxterm generated
by jcx,. .. ,xn.
form for any Boolean function of
The next theorem gives the canonical
like to denote a
n variables,
but before stating and proving
it, we would
minterm by
Similarly,
where
(0
11
= x{
if
xf
if
xf = xh
for
i =
1,2,.. .,n.
Section6.3
is denoted by
a maxterm
Similarly,
591
Functions
Boolean
where
I 0
if
if
Theorem 6.3.1.
written
in
the
xf =
xf =
Xi
xi9
Boolean
Every
i =
for
1,2,.. .,n.
.,xn) over
f(xu..
expression
Scan be
forms
11...1
f(xl9.. ,,xn) =
21
normal
(disjunctive
afemfe
form),
fc=00...0
11. 1
f(xi9..
.,:cn)
IX (Pk +
k=00...0
where A assumes
{0,1},and where
all
normal
(conjunctive
Mfe)
form),
configurations j\\j2..
2n possible
such
Jn\302\273
that
j( (E
ai,..i.ssft-,...y.-/0,ivJB).
Proof.
the
Using
of
definitions
jct
/(*!,...,*\342\200\236)
if xxx2
\342\200\242
\342\200\242
\342\200\242
=
xn
7x72
\342\200\242
\342\200\242
\342\200\242
and
Jn>
jcjjc2
\342\200\242
\342\200\242
=
\342\200\242
xn
y^'2
\342\200\242
\342\200\242
\342\200\242
and
Jn>
.>7n,
it
is clear
that
also
0 otherwise;
+
Mh...jn
1 otherwise.
M;i
\342\200\242
<*>,...;\342\200\236
\"*,,..,\342\200\236
f(xu...,xn) =^v.Jn
if
and
mjlmmjn
Vi,i =
= 7t
\342\226\241
the
that
conclude
iff
expanded
that
they
normal
two Boolean
have the same
canonical forms.
The
form
is a
is a sum of minterms and each minterm
form
of
literals.
is
sometimes
product
Accordingly, this canonical
referred
to as the minterm form
or as a sum-of-products
form. Likewise
the conjunctive normal form is also called the maxterm form or a
disjunctive
product'Of-sumsform.
592
Chapter
6: Boolean
Algebras
= (0
\342\200\242
\342\200\242
+
+ jc3) we
variables
(jcx
f(xlyX2yXs)
x1
For the
write the
(1
x2)
\342\200\242
\342\231\246
+
xx
\342\200\242
\342\200\242
(0
x2)
Xj
x2)
table of
*3
*i
x2
0.
0
0
1
1
1
1
0
1
1
0
1
0
1
0
1
0
1
0
1
1
of
form
0
1
0
1
1
1
1
/ is:
= 0 \342\200\242
(*i\302\2432*3) +
(^2*3)
+ 0
\342\200\242
+ 0
\342\200\242
\342\200\242
\342\200\242
+ 1
(*i + x2)
Xl,X2yX^,
disjunctive normal
Then the
+ x2)
-j\" XjX2\302\253
6.3.3.
Example
\342\200\242
\342\200\242
+
(1
x2)
xt
= X\\X2
= (x1
f(xux2)
is
form
normal
f(xux2)
the
The representation of
6.3.2.
Example
in disjunctive
~\\~
X^X2X3
XyX2X3
(*iX2*3)
~t~
XiX2X$
t\"
(XiX2*3)
(* 1^2*3)
(XiX&s)
(* 1*2*3)
~\\~ XiX2X\302\247,
X]X2X\302\247
that
those five
of /
is:
(Xj +X2
form
normal
conjunctive
f(xuX2yXs)
operationscanbe
as
defined
well.
existsa form
The
FQ constructed
usual way to
test
if
X3){XY
+,
and
\342\200\242,
A set
if
X2 +
for
XgMXj
on elements
X2 +
of B.
of operations Q = {rlv
every
Boolean
*3).
function
But other
. .,rr}
FQ
on B
is
/ there
denotes
complete
/,
Section
Boolean
6.3
is to attempt
to generate the sets {+, } or
well known that these two are functionally
} from
{\342\200\242,
(a) The
6.3.4.
set, since it is
Theorem
6.3.1
(by
complete
f\\XlfX2)
is functionally
593
a given
and DeMqrgan's
laws).
Example
Functions
XxX<i
since
complete
X i I
X i \342\200\224
X ^X i \342\200\224
Xj
and
(#1
The dagger
(b)
Xj)
(#2
*2
= XjX2
X2
= Xi
-j\"
X1
Xi
X2.
function
=
/(Xi,X2)
is functionally
= ^l
#2/
Xj
\\
4-
X2
since
complete
\\
X\\
X\\ ==Xi
= Xj
and
\\x 1 j.
Exercises
for
following
the
Boolean
(x
A y) V
arguments
2.
minterm
The
x,y
\\
\\x21
is
X2)
==
Xj
4 X2
Xj
-f~
x2
\342\200\224
x^x2
6.3
Section
1. The
X\\)
over
algebra
(x
(a
expression
generated by x,y over
=
where B = {O,a,0,l}:
<J3;-,V,A,~>,
f(x,y)
V y)). Tabulate
the values of / (xyy) for all
Boolean
(x,y) G B2.
normal
the Boolean
Boolean expressiongeneratedby
is given
in Exercise1 above
described
algebra
form
of a
by
f(x,y)
= (aAx~Ay)V(l3AxAy)V(0AxAy)V{lAxAy).
form
of/.
594
Chapter 6: BooleanAlgebras
3.
Enumerate
4.
over
variable
true?
the
your
Justify
answer.
(a) If x(y
(b)
5.
If z
the
Obtain
Boolean
= x(y
z)
then
w,
+ w),
+ f)=
x(y
then 2 = w.
x(y + w).
of the
following
expressions:
(a)
jcj
(b)
(x1
(c)
xxx2 4-
\302\251
x2
\302\251
(Jj
\302\251
x2)
\302\251
jc3)
xs
(*i
6. If
4- x2J3)
of
dual
B be a Booleanalgebrawith
number of sub-Boolean
algebras
fi(xlyx2,..
7. Let
of a
partitions
set
with
of
each
the dual
8. Write
(a) x + xy
(b)
forms
canonical
sum-of-products
(x
- x+
1)(0
that
the
the number of
n elements.
Boolean
equation:
x) =
\342\200\242 +
is equal to
that
show
Show
elements.
2n
of B
then
.,*\342\200\236),
9. Let/(:t,;y,2)= ry
4- ^cy^
4-
xyz.
Show
that
set
a <
atoms
for someatom c.
(a)
functions
For each
/.
12.
all
of B.
atoms
of
Booleanalgebraif
> z
and a
\302\245=
z, then
az
> c
the Booleanalgebra
Show
Dno
described
(b)
integer.
of Duo.
of Boolean
(c) Determinethe number
subalgebras
in the Boolean
13. Determine that the set of atoms
algebra of all
subsets of a set A is just the singletonsubsetsof A.
14. Prove that if ax and a2 are two atoms in a Booleanalgebrasuch
that
axa2
\302\245=
0, then
atoms of
if
ax =
ax
a Boolean
a2.
4- a2
4-
\342\200\242
\342\200\242
\342\200\242
4-
algebra
all
Section
6.4
16. Prove
isl.
17.
that in every
Boolean
finite
sum of
the
algebra,
Suppose
Suppose
595
Mechanisms
Switching
all atoms
B.
algebra
the
following
hold:
or a < b.
a < b
18.
nonzero
element c of a finite
that
every
the sum of preciselyall the atomsa such that
Boolean
Prove
a <
19.
Let
a finite
B be
Defineh : B -* P(R)
h(x)
as
follows:
= 1,
d>
20.
Let
minimalif a
jc
Selected
Answers
5.
= 0.
Show
if jc
6.4
algebra. An
if, for every
and
that a
(a)
=
jcx \302\251
jc2
(C)
=
XiX2Xs
jc^
is an atom
iff
a G
element
jc
a is
\302\243
J5,
jc
< a
J5 is
said to be
implies
jc
= a
or
minimal.
4- Jc\"iJc2
+
XiX2\\Xz
Xi^^
4- 2
(c) f(x,y,z)
SWITCHING
0.
9.
atoms of B.
is a Booleanalgebraisomorphism.
a Boolean
be
no
ifx-0
[{aGJ?|a<:c}
Show that h
set of
the
be
B is
algebra
c. Moreover,
~f~
= xy
+
\302\2433)
XiX2X^
4-
xyJ
(Xj
-f
#i)(#2
\"I\"
4\" \302\243;\302\2432#3
+ ^1^2^3
4- ryz
4- 2
= xy
\342\200\224
X2)XZ
4-
\"I\"
#l#2^3
f(x,y,z)
MECHANISMS
In the first
and specifically
three
the
sections,
Boolean
we discussed
algebra
of all
algebras
algebra of all functions into a two-elementset.Boolean
in theoretical considerations, but by far the most
are
important
very
and
engineering
important
application lies in the realm of electrical
as
not
is
Such
an
surprising digital signals,
computer design.
application
mechanical
switches,
diodes, magnetic dipoles, and transistorsare all
Boolean
596
Chapter
6: Boolean
Algebras
states
correspondence
and 1 represent
between
the
two
Boolean
be realized
may
high
that
variables
potential
as current or no
or low potential,
states.
Boolean
function
f:B2\342\200\224^B2.
this
section
Section
Switching Mechanisms
6.4
697
LJ]
/
l\\
\\ri\\
Input
codes
(a)
(b)
a
b
Binary
coded
decimal
input
Logic
Seven
network
to be designed
segment
display
\302\273\302\273
device
r
\302\273\302\273
\342\200\224\342\226\272
(c)
Decimal
displayed
Inputs
Outputs
ABC
11110
0 0 0 0
0 0 0 1
0 0 1 0
110
10
0
1
10 0 0 0
0 110
1
11
110
11111
10 0 0 0
11111
10
11
(d)
Figure 6-1.
truth
table.
(a) Segment
identification,
(b) desired
(d)
598
Chapter 6: Boolean
Algebras
the segment
a 1 if
segments
only
entire
the
out
problem.
thus
have
We
standardized
requirement
of
driving
possible
table
truth
four
of
combinations
columns in the
rows and
indicate
to
indicates
generate and
once.
Another
X's
writing
we \"don't
that
outputs
for these
are
very
very
equation.
for
effective
useful
logic
way
equation
concise,
is incomplete.
we could
inputs,
all 16
generating
by
6-1
the
showing
several
of expressing logic
expresses
only one
the
truth
in
the
output
care\" what
table,
table
the
however,
is easy
to
switching functions at
each
for
output
logic equation could be written
6-1. Since logic equations are
(a-g) in the truth table of Figure
in form to discrete gating structures, they
useful
similar
are
very
very
The logical
when the switching is to be mechanizedwith
logic
gates.
and
are used to indicate \"not,\"
\"or,\"
respectively,
symbols -, +, and \342\200\242,
d of our seven-segment
\"and.\" Looking at Figure 6-1 we see that segment
must
be on when displaying the digits 0, or 2, or 3,or 5, or 6, or 8.
display
in place of or, we can write
for the
the
logic equation
Using the + symbol
a separate
example,
function
variable d as
d-0
Thisis
+ 3
+ 5
+ 6 + 8.
in terms
want
an
of the displayed digit, but we really
equation
in
D.
and
The
code
terms
of
the
variables,
C,
A,
B,
input
input
equation
and not-J5 and not-Cand not-D\";we can therefore
write an
for
0 is \"not-A
an
equation:
digit 0 = A
\342\200\242
B \342\200\242
C \342\200\242
D.
Likewise
digit
2 =
3 =
\342\200\242
C .
B \342\200\242
digit
5 =
\342\200\242
B \342\200\242
C .
digit 6 =
\342\200\242
B \342\200\242
C .
digit
\342\200\242
B \342\200\242
C \342\200\242
Z),
D,
Dy
Z),
Section
6.4
599
Mechanisms
Switching
and
digit 8
. B
\342\200\242
C . D.
D. We
equation for
can
output d as a function
similar
write
+ A-B- C-D
\342\226\240
B. \342\226\240
C \342\200\242
D +
+ A-
+
c =
\342\200\242
B- \342\226\240
D +
c- \342\200\242
D +
\342\200\242
B.
C
\342\200\242
D
jB. \342\226\240
C-
+ A
c.
\342\200\242
D +
c.
D +
\342\200\242
B~.
\342\200\242
B-
\342\226\240
D +
B- \342\226\240
c \342\200\242
/-A.
\342\200\242
B-
D +
+
equations
disjunctive
For
normal
\342\200\242
B.
\342\200\242
D +
\342\200\242
B.
\342\226\240
D
\342\200\242
D
\342\226\240
D
\342\200\242
D
\342\200\242
B.
\342\200\242
D +
\342\200\242
B-
\342\226\240
C \342\226\240
D +
\342\200\242B.
\342\200\242
B-
\342\200\242
B. \342\226\240
C \342\200\242
D
\342\200\242
B.
C
\342\200\242
D
\342\200\242
B.
\342\200\242
D
\342\200\242
\342\200\242
B. \342\226\240
D
c \342\226\240
\342\226\240
D +
\342\200\242
B. \342\200\242
C \342\200\242
D +
\342\200\242
B-
c.
\342\200\242
D +
\342\200\242
B.
D +
\342\226\240 A
\342\200\242
Bc-
c.
B<
+ A.\342\200\242
These
D+
\342\200\242
B.
C
\342\200\242
5. . c.
c .5 + 3.
\342\200\242
B>
\342\200\242
B. \342\200\242
C
A^<\342\200\242
B<
c
A-B-C.D
D + A
5- \342\226\240
c. \342\200\242
+ A. \342\226\240
e-A
A-B-C-D
c.
\342\200\242
!\342\226\240
B-
+ A.
g=A
inputs
the other
+ A.B-C-D
+ A.B.C-D
+ A-B-C-D
A-B-C.D
6 =A
the
of
for each of
equations
follows:
as
outputs
a =
C, and
of inputs
in terms
digits
+ A.B.C.Z).
A.B.C-5
a logic
have
thus
We
A9 B,
the
+ A
D +
c.
\342\200\242
D +
\342\226\240
B.
D +
\342\200\242B. \342\200\242
>B-
.c
D.
form.
example:
m0
\342\200\242
B \342\200\242
C \342\200\242
ml
\342\200\242
B . C
m2
\342\200\242
B \342\200\242
C \342\200\242
m5
\342\200\242
\342\200\242
\302\243
C \342\200\242
D,
m14
\342\200\242
J3 \342\200\242
C \342\200\242
m16
- A
Dy
. A
Dy
Z>,
\342\200\242
D.
fi \342\200\242
C \342\200\242
600
Chapter
6: Boolean Algebras
form.
canonical
in
functions
a = m0 + m2 + m3 + m5 +
= Sm (0,2,3,5,7,8,9).
numbers
Sincethe
table
digits,
displayed
shorter but alsoeasierto
minterm
directly
the
conjunctive
+ B
Mx
-A
M15
- A
+ B
in
1. A
10
of the
one
SSI
(small
These
gates.
on the truth
equation
Figure 6-1.
form, uses the
is not
only
maxterms
D,
D,
+ C + D.
(IC)
+ C+
B + C+
= A
+ m9
to rows
the
writing
from
M0
is true
maxterm
each
form of
write
m7 + mB
correspond
directly
this
and
Clearly,
to the
three following
of an
complexity
integrated circuit
categories.
scale integration)
device has a complexityof lessthan
in one
are ICs that contain several gates or flip-flops
package.
2. A MSI
100gates.Theseare
ICs
registers,counters,
and
that
provide
elementary
has
of 10 to
functions
such as
logic
a complexity
decoders.
4.
complexity
of
100
to
microprocessors,
of
(very
large scale integration) device has a complexity
a
half
10,000 gates. Right now a piece of siliconabout
LSI is now giving
100,000
square could contain over
gates.
memories
VLSI in all phases of design
and
including
larger
VLSI
than
centimeter
more
way to
microcomputing
devices.
Though MSI,LSI,and
functions
more
much
discretegates,
much
logic
VLSI
have made it possible to mechanize
than the method of connecting
economically
level\342\200\224even
in the
still be done at the
must
logic
gate
Section 6.4
601
Mechanisms
Switching
sophisticated
may perform
equationsand by
The
block
standard
most
truth
representation of
logic
circuits
is the
diagram,
The
symbols.
Y 32.14,1973)
(ANSI
tables.
common pictorial
The reader
uniform-shape
will
the
and
symbols
symbols.
distinctive-shape
The
the
International
Elecuniform-shape symbolsarethoseestablished
by
trotechnical
Commission (IEC Publication 117-15)and are widely used
in Europe. The IEEE has includedthesesymbols
in its standard,
but the
of
in the
distinctive-shape symbols remain the standard
preference
United States and have
found
wide
in other parts of the
acceptance
world.
The distinctive-shape
symbols will be used here.
Input
=o
\342\200\242
=Q-
Figure
6-2.
Output
\342\200\242
AND function.
Output
Input
=0-
=E-<
Figure
6-3.
INCLUSIVE OR function.
602
Chapter6: Boolean
Algebras
Output
Input
= A+B
A-B
=E>
Figure
6-4.
NAND
function.
Output
Input
B=
A +
+ B=
\342\200\242B
\342\200\242
\302\243
=EJ-
Figure 6-5.
NOR
/I
function.
Input
J^>o-/i
/!-]
|o-/
Figure
6-6.
Inverter.
Input
^\302\243)-A\302\256B
Output
AbZ^7]~aQb
Figure
6-7.
EXCLUSIVE-OR.
Output
Section 6.4
the
603
Mechanisms
Switching
is high
output
all
iff
in
6-3 represents
The symbol shown
the INCLUSIVE OR
Figure
is low (0) iff all inputs
function. The OR output
are low.
a function
The NAND symbolcharacterizes
whose
is low (0) iff
output
all inputs
are high (1) (Figure 6-4).
The NOR symbol shown in Figure 6-5 characterizes a function
whose
is high
output
iff
all
are low.
inputs
that
provides
the
EXCLUSIVE-OR,
recognizer.
all the
Though
desired.
as
inputs
gates,
four-input
they can
inputs,
make it
have as many
standard
fairly
to
four two-input
or one eight-input
together
package
two
with
pin limitations
Package
The one-to-one
equationmakesit
relationship
see
to
easy
design.
Exercises
6.4
for Section
1.
digital circuit
is a
function
majority
1. The output
truth table of a three-input majority
inputs are
of the
majority
circuit of a majority
2.
Two
fx and
functions,
digital
can
function
hconditions
what
Under
variables
Tx
xTx
0 otherwise.
is
and
function
with 4
be obtained
f2, are
the
the
the
NAND gates.
used as controlmechanisms:
yT2.
x and
of input variables
y and timing
two digital functions be 1 at the same
and
time?
3. Design
generates
and
a combinational circuit that acceptsa 3-bitnumber
an output binary number equal to the squareofthe input
number.
4.
Two
2-bit numbers
four-variable
function
axa0
and B
/ (al9a0,bub0).
bxbQ
are
to be
The function
value
1 whenever
2-bit
number.
a
|a(4) - a(B)| < 2. Design
using as few gates as possible.
combinational
compared
by a
/ is to have
the
for a
x0 x 2\302\260
B are such that
system to implement/
21 +
604
Chapter 6: Boolean
5.
Algebras
that
patterns
binary
code.
code where
A number
table
truth
a Gray
differ in one bit position only
is called
for a 3-bit Gray-code to binary-codeconverteris
shown.
3-bit
Gray
Code
0
0
0
0
0
1
0
0
1
1
Selected
1
0
functions
fi,f2>fs
1
0
0
0
using
only
Answers
1.
the three
Implement
Outputs
Code
Binary
Inputs
y I i'
X
V I zt
00
01
11
10
00
01
11
10
bxbj\\
fmin
F = xv
Fr
\342\200\224
ffiffo
bibo +
where
aob\\
x means
a\\bo +
a\\bi
0 or
1.
+ xz -f
vz
NAND
gates.
Section
6.5
Boolean Functions
Minimization of
6.5
FUNCTIONS
OF BOOLEAN
MINIMIZATION
605
/ is
function
a switching
to / and which
to find
an
expression
cost criteria.
some
minimizes
The most
minimal
is to find an expression with
cost
popular criteriato determine
of terms in a sum-of-productexpression,
number
there
provided
minimal
is no
fewer
other
literals.
uncomplemented
same
such expression with
the
in
a
literal
is
variable
(A
with
of the function:
the minimization
J \\X-[)X2iX\302\247) ==
combination
the
Similarly,
of
==
XiX2X$
XiX2X$
the
X^X2X^*
Xi%3\302\273
4-
XiX%\\X2
terms
yields
= *2*3>
*i)
terms yields
and fifth
fourth
4- XiX2X$
XiX2X^
~
\342\226\240
^2/
^1^3x^2
of the
combination
combination
X\\X2X\302\247 *
of the
XiX2X$ -f
Thus the
X\\X2X\302\247 '
X\\X2X\302\2474\"
and the
and
complemented or
form.)
Consider
The
of terms
number
4- X2)
= X1X3.
reduced expressionis
(Xi,X2,X^)
XjX3
4-
X2X% 4-
X1X3.
in the sense
This expression is in irredundant (or irreducible)
form,
that any attempt to reduceit any further
by eliminating
any term or any
literal in any term will yield an expression which is not equivalentto /.
the
Theabove reduction
is not unique. In fact, if we combine
procedure
first and second terms of /, the third and fifth,
and
fourth
and fifth, we
\\Xlyx2yX3)
X1X3
4-
XiX2
4- ^1^3,
which represents
The
them
presented
functions.
switching
to
6C6
Chapter
6: Boolean Algebras
A
A
AB
AB
ABC
ABC
ABC
ABC
AB
AB
ABC
ABC
ABC
ABC
>/-\342\200\224
Figure 6-8.
the
of
diagrams.
in 1952, is a
diagram, developed by E. W. Veitch
diagram in that circles are replacedby squares
Veitch
The
refinement
Veitch
Venn
and
arranged
are
shows a Veitch
of
the indicated
and
therefore
are
variables
top
half and
B =
function
Any
l's and
of four
the
represents
f =
set
the
as
6-10(a)
The numbers
variables.
represented
by that
D indicate the regions where
C = 0 in all the squaresin the
bottom
half, for example.
number
can be
variables
Figure6-10(b)
Universal
true;
1 in the squaresin
Figure
adjacent.
four
represented by
with
a truth
filling
simply
table. For
function
+ A-B-C-D.
A-B'C.D
B
(a)
Figure 6-9.
(c)
(b)
Development
of Karnaugh
maps
by
Venn
diagram
in
example,
approach.
Section 6.5
607
Functions
of Boolean
Minimization
improvement
approach as seenin
decimal
The
6-9.
Figure
of the minterms is
representation
in
given
Figure
6-
10(a).
with
Minimization
The
basic
cells
three
eliminates
variables.
of l's in the
given grouping
Any
ABCD.
ABD.
grouping
Minimization
map
Karnaugh
is
single
by a
identified
is defined as
6-ll(a)
cells, as in Figure 6-ll(b), is identified
involves the gathering of the various
groups
cell
in Figure
of two
by
in the
in a \"ring\"
where the variables
are
arranged
if the map
would
these
be
squares
adjacent
pattern
If
were inscribed on a torus (a doughnut-shaped
form).
you have
in
the
on
a
remember
that
torus,just
squares
map
difficulty visualizing
be
the same row or column, but on oppositeedgesof the map,
may
most
efficient manner,
of symmetry,
so that
combined.
AB
AB
00
CD\\
00||o
01 1
11 3
10 2
01 11
12
5 13
7 15
6 14
10
00
CD\\
12
13
11
15
11
10
14
>D
10
01
11 10
ooj
01
11
10
-*
B
(a)
Figure
6-10.
\342\200\242
D +
Mapping a
4-variable function:
\342\200\242
B \342\200\242
C \342\200\242
D.
(b)
(a)
minterm
numbers/(b)
= A \342\200\242
B
D\\
00
ABD
ABCD
c^ \\B
11 10
01
C\\
00
00
01
01
11
00
TTT
11
10
10
(71
(b)
(a)
A
ACD
00
01
00 111
ll
C\\B
BD
II
10
00
C^\\
01
11
11
10
10
1 i
[Tj
[7]
(c)
DN
(d)
BD
00
11
01
00
C\\B
10
D>
AD
00
01
ll
01
01
11
11 ll
10
11
(f)
(e)
AB
C\\B
DN
00
00
01
11 10
C\\B
DN
171
01
01
11
11
10
ill
10
Figure 6-11.
00
01
11
00
11
(h)
(g)
608
10
10
11
11
11
00
11
11
11 10
01
ll
00
01
C\\B
11 10
01
Minimization
on a
4-variable
Karnaugh map.
11
11
Section6.5
of Boolean
Minimization
Functions
609
\\B
p\\
01
11
11
i|
00
hi
11
Figure
10
ITJI
11
6-12.
is minimized
/(A,J3,C,D) = 2 m(2,3,4,7,10,ll,12,15)
map shown in Figure 6-12.
The function
the
Karnaugh
BCD
/ = 2 m(2,3,4,7,10,ll,12,15)
=
Quite
of the
some
often
occur.In this
we \"don't
case
+ BC
possible combinations
care\" what the function
on
+ CD.
if these
input
6-15,respectively.
The
side.
by
1, the other
eachmap.In
map
Karnaugh
placed side
to
addition,
4 and
20, are
maps,
e.g.,
to the
six-variablemap.
for
correspondsto
also logically
Similar
adjacent.
1.
Simplify
the
following
acde +
Boolean
acd +
eh
expression^
+ acfgh
+ acde.
arguments
apply
\302\273
xl
x|
lx
11
\302\243<
[x\"1 TxT
frT
m1
ll
)D
?\302\243>
1
i|
lx
X
|llJ
0 =
/I +
]_jlJ
\342\200\242
C- D
\302\243\342\200\242
D +
b=
\342\200\242
\302\243D
11
|x
~|7|*
Mx]
||x
c=
in
YD
111 |x
11
1)
X
f =
[fxf
xl
x|
[x~
~T| J|7|
IT]
C- D
f=C
[fxT
\"^
+ A +
)D
g= B-
610
Figure
lx
lx
D + B-C+
B-C
11
rn
Tfjl
PI
xl
#<
x|
>\302\243>
B - D+
+ B-C+B-D
>/>
e =
i|
+ B-C-D
d=C-D
|X
11
\342\200\224\342\226\240
B
X
ll
lx
-K\302\243>
|x1
d =
' [7|
11
|x
\"'
\302\243
\"
(TT
>D
*--
B+
rrfl
fl<
i|
c =
/4
r
11
D + C- D +
C \342\200\242
ll
\342\200\242A
C+
minimization.
B- D
Section
Minimization of
6.5
A =
.BC
DE\\
00
01
Boolean Functions
=
611
BC
II
10
00
01
11
10 /DE
001
12
| 16
20
28
24
01
13
17
21
29
25 01
11
15
11
19
23
31
27
10
14
10
18
22
30
26 10
Figure
Five-variable
6-14.
Karnaugh
00
11
map.
B
*^
\\
12
16
20
28
24
13
17
21
29
25
15
11
19
23
31
27
14
10
18
22
30
26
32
36
44
40
48
52
60
56
33
37
45
41
49
53
61
57
35
39
47
43
51
55
63
59
34
38
46
42
50
54
62
58
\\F
E(
'
A<
)F
E{
Figure
map.
612
Chapter 6: BooleanAlgebras
2.
the
Reduce
expression
following
to a minimal sum-of-products
expression.
/the
3. Minimize
(x
\302\251
yz)
(xy
\302\256
w)
using
expressions
following
+ xyw.
table or
a truth
map
technique.
+ ABCD+ BCD + ABCD.
=
ABCD + ACD + ABCD + ABCD.
(b) /
=
ABC
+ ABC
+ ABC + ABC.
(c) f
/
(a)
- ABCD
(e) /=(A
ABCD.
+ C).
ABCDjh
+ J3
equalities
a truth
using
table or
map technique.
+ ABC = (B + C)(B +
= (A + J3)(A + B)(B + C +
(b) AC + AB + ACD
+ D)(A
+ B + C).
(c) ABC + (A + B)D = (AB
=
(d) ABD + BC + CD ABD + CD + BC.
5.
+ ABC
ABC
(a)
+ ABC
C).
D).
To design product-of-sums
function.
Realize each set
complements
Obtain
minimal
realization
POS
of
f(A,B,CyD)
2m(0,2,10,ll,12,14) = nM(l,3,4,5,6,7,8,9,13,15).
6.
the
Minimize
following
functions.
switching
(a) 2m(l,2,3,13,15).
(b) 2m(0,2,10,ll,12,14).
(c) 2m(0,2,8,12,13).
(d)
2m(l,5,6,7,ll,12,13,15).
(e)
2 m(0,l,4,5,6,ll,12,14,16,20,22,28,30,31).
(f) 2m(6,7,10,14,19,27,37,42,43,45,46).
7.
Simplify
each
Boolean
algebra.
of
the
+ w)
xyz -f xyz + xy(z
(b) x +yz + w(x + yz).
(c) xy(z + w) + xy(z + w)
(a)
(d)
xyz +
xyw
xyw
expressions by using
following
+ (z
+
+ yzw.
xyz.
+ w).
the rules of
Section 6.6
to Digital
Applications
8. Minimizethe following
functions,
+
(a) / = 2 m(0,5,10,15)
2,(1,7,11,13)
using
Computer
the map
613
technique.
don't care
20 denotes
where
minterms.
2m(0,l,4,5,8,9)
(b) /-
2,(7,10,12,13).
+ 2,(2,5,7).
2m(l,3,4,6,9,ll)
/-
(c)
Design
3.
C\\
(c)
00
01
11
10
00
01
11
10
0
1
6. (c)
wzX
00
01
11
10
or
6.6
of
Anin
- xyz
+ ww
+ xwz
Anin
- xyz
xyw
y wz
TO DIGITAL COMPUTERDESIGN
APPLICATIONS
InitialDesign
Arithmetic
the
Logic
Unit of
a Digital Computer
computercan be
partitioned
arithmetic
into
logic
stages,
stages,
block diagram
The
Ck_i is
of an ALUstagek.
are
carries
the input
function
designated
selection
connected
in a
as selectors
m.
the output
ALU
stages,
where
are
and
to all stages of the ALU
are identical
to be
of the arithmeticor logicmicro-operation
614
Chapter
6: Boolean
Algebras
Bk
Ak
1'
1'
Function
selector
Stage
i'
Fk
Figure
performed by the
the
of
function
6-16.
frth
ALU.TerminalsFY
ALU.
In many
from
ALUs
4-bit
one
IC package
the
next
the required
Fm generate
a package
for
ALU.
J3,
and
is
enclosed
will contain
four outputs
selector
determines
the
A
m-bit
ALU
can
be
perform.
function
can
to
of an
stage
output
within
number of
constructed
higher-order
one
four stages
for F. The
from
with
bits.
on the micro-operations
The internal constructionof the ALU depends
that it implements. In any case, it always needs full-adders to perform
are sometimes
Additional
included for
the arithmeticoperations.
gates
I
n
to
minimize
number
of
terminals
for
order
the
logic micro-operations.
k
2k
IC
to
ALUs
use
selection
lines
the function
selection,
specify
micro-operations.
addition
of two
Section6.6
to Digital
Applications
Bi
Ci
Ft
Logicdiagram
(b)
Half-adder.
6-17.
Figure
Boolean
615
Design
Br
table
Truth
(a)
Computer
- Aft
+ Aft
directly from
be obtained
can
outputs
Ai
Bh
Ct - Aft.
The logic
an AND
and
gate
Full-Adder.
arithmetic
sum
of
6-17(b). It
in Figure
is shown
diagram
OR
is a
full-adder
third
The
input,
It consists
Ct-_i, represents
the carry
denoted
3, and
are
outputs
from
three
and
Bi9 represent
the
sum of
three binary
3 need
by the symbols Ft (for
C, gives the output carry.
in Table 6-2. The eight rows
2 and
shown
combinationsof l's
is equal
l's
is equal
of 1 if two
tol.
Thus
lower
previous
designated
the
bits are
the
two
the
and
inputs
the decimalnumbers
variable
is
that
are
At
arithmetic
the
because
0 to
by
of
position.
combinational
input bits.
variables,
input
three
consistsof an exclusive-
gate.
and
Ci =
APi +
Afin
BA-i.
and
variables
all
input
or three
inputs areequal
616
Chapter 6: BooleanAlgebras
6-2.
Table
Truth Table.for
Full-Adder
Inputs
Outputs
W,.i
CfF;
0 0
0
0
0
1
1
1
1
Clearly,we
also
can
d =
Aft + (Aft
gates
25
with
of
0 1
10
0 1
10
10
1 1
Aft)
- Aft
C.-.x
(Ai
\302\256Bi)
C-.l
6-18.
Figure
is of basic importance
in
form
The
realization.
has
effort
0 0
0 1
of these two
one inverter
plus
inputs
deal
0
1
0
1
0
1
0
1
write
realizations
Two-level
0
1
1
0
0
1
1
leading
used.
technology
SN7482.
A popular
realization
Using this
design we
more
perform
with
shown
the three
in
Control
Figure
of a
also
will
full-adder is by
add
control
utilizing
bits so
two
half-adders.
operations
6-21.
modelineMcontrolsthe
1, the terminalsmarked
carry
input
jc,
y,
and
Sx and
C,-_i. When
Lines
z have
the values of
Ah
Bi9
and
Cif
respectively.
have
different
eight
bit
possible
for Ft
function
combinations and
and Ct, The mode
=r>
=o
Q-,
Br
c,-r
Cm
^BO
o
SO
AJ
B>
BO
Figure
6-18.
Two-level
FO
realization
of a full-adder.
c,
B>t\342\202\254>^=!D
to
M>
o
Figure
6-19.
Full-adder
realization
with
8 gates
and 19
inputs.
Ci-x
>\342\226\240
Bi~+
o-
=D-
Figure 6-20.
Full-adder
realization
with
10 gates
and
22
inputs.
A,-
rf>
On
^O
pD
l~
)E>*
CM
t=Q
Figure
618
6-21.
Controlled
full-adder.
Section 6.6
to Digital
Applications
Table6-3. Effect
X
s1
A,
0
0
1
1
So
lines on
of Control
s2
0
1
0
1
619
Design
Full-Adder.
0
1
c,.,
B,
B,
1
and
C^
the
When
function.
through
Computer
is used to differentiate
M - 1, input carry C,_!
- C^. Thisallows
the
propagation
for
an arithmetic
microcarry through all the ALU
stages
M - 0, the input carry is inhibited,
z - 0. This is
operation. When
making
a necessaryconditionfor a logic micro-operation.
Hence, the ALU can
the
of
provideup to eightarithmetic
operations
Table 6-3 showshow the control lines
and
eight
logic operations.
control inputs Ah Bh and C,. The
value of jc may be 0 or At depending
on whether
S0 is 0 or l^Controllines
z
Si and S2 control the value of y which may be 0, 1, J3, or J3t. Terminal
M is 0 or 1.
on whether
may be equal to 0 or Ci_x depending
Table6-4 shows a list of the Boolean functions for each of the eight
0, output Ft
xy since
is the
2=
higher
F, (with
under
this
as
same
0. However,
ALU.
since
F{:
signal
stage
- 0) provide
of
Thearithmeticoperations
Boolean
listed
the
of
functions
are
- w;
the
are
when
functions
for one
Boolean
functions
functions
of the
- 1.The
operations in the one-stage
when M
generated
stage of the
ALU.
l=i
X
SqSiS2
M-0
M-
C, for M
B,
0 1
0 1
10
10
1 1
1 1
B,
B,
B, \302\256
C,.,
Bt
CQ
B,
B,
1
A,
A,
A,
B,
A,\302\256B,
A\302\256 B,
A,\302\256B,\302\256 C,.,
A,B, +
A,
B,
1
A,\302\256B,
A,\302\256B,
A,
\302\256
C,_i
B, \302\256
A,B,
A,
A,
A,\302\256C/_1
A,
0
1
0
1
0
1
A,
C/.,
\302\256
Cf_i
c\342\200\236
a,\302\256c\342\200\236
- 1
0 0 1
0 0
Ct
propagate to the z
logic
eight
\302\256
y;
6-4.
in Table
Table6-4. Boolean
0
\302\256
arithmetic
eight
represents
is not allowed to
when
M - 0. The
ALU
the
ALU
- w
B/C/_1
BjCj.i
c,_,
AC/-i
AC/-1+ BtC,^
+ AC/_,
C/-i
+ S/C,.,
620
Chapter 6: BooleanAlgebras
6-5.
Table
S0S^S2
0
0
0
0
0
0
0
0
0
0
Logic Micro-Operations
0 0
0 1
10
F=0
Clear
F=B
Transfer
F=B
Complement B
F- 1
F=A
Transfer
A\302\256B
arithmetic
The
conditions
control
of
OR
operations
B
bits
Complements
F=A
and
AND
bits
Exclusive-OR
Exclusive-NOR
F-A@B
F =
all
Set all
are
stages in cascade.
m identical
are listed in
ALU
the
for M = 0.
These arethe F functions
Note that there are 16possible
micro-operations
in the
ALU.
and only 8 of them are available
a fourth
ALU.
Description
logic operations
the
Micro-Operation
11
10 0
10 1
1 10
111
providing
in
for
two
Table 6-5.
logic operands
6-4.
Table
of full-adder
circuits is
adder
In each case, a parallel binary
composed
lines
are either
used, but someof the input
missing or complemented.
Thus, in row 001, input A is missing because all the x inputs of the
function
for
to zero by selection line S0.The output
full-adders
change
= 1. In row
= 0 and F = B + 1 when
this condition is F = B when
Cx
C0
soF =
010, input A is changed to zero and all B inputs are complemented
=
=
=
0 and F B + 1 when C0 1. In row 110,all bits of input B
B when
C0
so
are complemented
that
the arithmetic
F generates
operation of A
plus
for
row 111 represents
Boolean
one stage of a decrementmicro-operation.
the
ALU
is
The
C0 that enters the first low-orderstage
carry
in
four
Hence,
micro-operations.
employed for adding 1 to the
l's
the
of J3. The
complement
function
of
input
sum
arithmetic micro-operations
1.Thethreecontrol
set to 0 or 1 for
functions
generate
require five
M must
lines.
control
an operation
lines
specify
micro-operation.
particular
as the
the same operation
logicfunctions
always be
C0
must
be
arithmetic
when
C0 =
0.
that
to
B when
M =
1 and S0Sx
S2
= 110
is equal to
the
complement
plus
subtractionoperation,sincethe output
A
2's
and the
result is A
of J3. This
logic
function
+ B
+ 1 which
is equivalent to a
for a full
subtractor
Section6.6
to Digital
Computer
Micro-Operations
in the
Applications
Table6-6. Useful
M
S0S)S2
Arithmetic
Micro-operation
C0
0 0 1
F-B+1
0 10
F=\302\243+
F =
10
10
1 1
1 1
1 1
1
1
1
1
1
0
1
0
0
1
Increment B
+ B
F-A
0
1
F=A + B
F = yi
B+i
F=
ALU
Description
2's complement
y\302\273+i
621
Design
Increment
Add A
and
of B
of B
function
borrow
resembles
the
of a
function
function
full-adder,
for the
Multiplexers
A
is a
multiplexer
2n lines
digital system
and transmits
information
line
that receivesbinary
on
a single
output
from
information
line. The
one input
is determined
selected
from the bit combinationof n selection
It is analogous to a mechanicalor electricalswitch,
such
as the
selector switch of a stereo araplifer,which
the input that will
selects
drive
The input can come from
the speakers.
either
tape, AM, FM, or
phono,
AUX linesworked
of the switch. An example
of a 4 x 1
by the
position
in Figure
6-22. The four input lines are applied
to
multiplexeris shown
the
circuit
but only one input line has a path to the output
at any given
time.
The selection lines Wx and W2 determine
which input is selectedto
have
a direct
is also known as a data
path to the output. A multiplexer
selector sinceit selectsone of multiple input data lines and steers the
to the output
is specified by
information
line. The size of the multiplexer
the number of its inputs,
2n. It is also impliedthat it has n selection
lines
being
lines.
one
and
output
Clearly
come
the
from
4x1
line.
F-WlW2I0+WlW2Il
+ WxW2h+
WXW2I3.
data that
describing
may
622
Chapter
6: Boolean
Algebras
4XI
fO
i
\342\200\242
MUX
Inputs
Ouiput
/.\342\200\224*-
O-i
m>~
/,\342\200\224*-
^2
FK,
Select
Block diagram
(c)
\342\202\254>
wx
w2
/o
/2
/3
(a) Logicdiagram
(b)
Figure
In general
for a 2n
6-22.
by
table
Function
1 multiplexer.
1 multiplexer
2\"-l
t-0
where
m^ represents
ith input
the minterm i
of the selectionvariables,
Thus when
- 3,
the multiplexer
F, where
F-
and
It is
the
line.
ro</,
\302\243
- Wx W2 W3/0
Wt
W2
logicfunction
W3/1
+ Wx
will
be represented
by
W2W3/2
'+ ^1^2^3/7.
wants to load a 16-bitdata registerfrom
16 four-input
with
can be accomplished
this
sources,
come in eight IC packages.
Now,
if one
distinct
that
multiplexers
one
to four
Section
Applications
6.6
*1
x2
x3
\\
to
623
Design
Computer
Digital
*1
x2
\302\260)
*3
*3
o]
\302\260)
ij
')
l]
']
o)
MUX
Figure
6-23.
Multiplexer
implementation of a
logicfunction.
functions.
are
also very
Consider
xx
x2
+ xx
x3 +
x2
\302\243i
x3
624
Chapter 6: BooleanAlgebras
which
implies
of more
for
multiplexer approachis moreattractive
Of
course,
expressions.
simplesum-of-products
two
implementa
We
will
its sum
the
parts
In general, the
that do not yield
relative
merits of the
function.
given
6.6.1
Example
by the
be judged
should
approaches
functions
Thus
gate.
LetF(xlyx2yx3)
-2m
(1,3,5,6).
F with a 4 by 1 multiplexer.
First,we
implement
of minterms form. The next step is to connect
the
selection
lines
with
x2 connected
to
the
lowest-order
selection
line
to
F in
express
- 1
the high-order
W2.
last
The
first
xx will be
numberedminterms
and
uncomplemented
in
the
odd-numbered
minterms,
since
it is
the last
Section
Applications
6.6
to
Minterm
(a)
Multiplexer
Figure
6-24.
with
X\\
*2
*3
(b)
Implementation
Implementing F
With
architecture
- 2/n (1,
with
a 4
by
1 multiplexer.
the advent
has taken on
illustrated
3, 5, 6)
table
Truth
the various
design.
x2, x3)
(x1f
625
Design
Computer
Digital
with
two
key
matter
subject
an essential
prerequisite
organization
of digital
computers
of the
characteristic
For
is being
or impractical.
uneconomical
this
throughout
chapter
applications
\342\226\272F
Figure
6-25.
Another implementation of
Figure
6-24(a).
626
Chapter
6: Boolean Algebras
k>
ten
Function
\\e
6-26.
Exercises
Quadruple
all O's
0
0 1
select /
Figure
Output
(enable)
table
selectJ
1.
Show
and
that
a full-adder
a three-input
of-productsform
circuit consists
majority
Boolean
and
draw
OR
of a three-input exclusive
function.
function
the logic
of the
full-adder in sum-
Section
to
Applications
6.6
are 16 logicfunctions
lists 8 of thesefunctions.
4. The OR and AND logic
3. There
= A
B
\302\251
operations
of
the
OR
that when
modification
this
with
of
logic functions.
be implemented
values
the
determine
AB,
by
S3 as
identities
Boolean
two
the
and AND
4 show
Exercise
= 0 +
and AB
AB
5. Forthe S3
remaining
functions
Figure 6-27.Using
shown in the
B
two
the
Table 6-6
variables.
8 functions.
Boolean
for
circuit and
the output
modifying
List
627
Design
Computer
Digital
S3 = 0, none
other
and what
the
of
other
operations
logic
are their
can
selection
values?
(Original
output)
(Modified
6-27.
Figure
6. Let
full
us denote AtJ5t
by
now be
can
adder
G, and
output)
At
\302\251
JBt
by P,.
expressed as C, =
Gt
The output
P, C^.
carry of the
G, is called a
are
Ts,
carry-generateand producesan output when both At and \302\243,
is
of
the
called
a
because
irrespective
input carry.Pt
carry-propagate
with
the
of the carry from Ct_j
it is the term associated
propagation
be
as
to C;.Any output
expressed
carry
may
Ck
Gk +
PkC0
where
Gk
+ Pk-iGk-2
Gk_x
Pk = Pk-lPk-2
This
part
(a)
(b)
Show that
Show that
function A,
7. Draw
of
the
\342\200\242
\342\200\242
\342\200\242
+
Pk-iPk-2
P2G1
P2P1'
ALU
*
\342\200\242
\342\200\242
\342\200\242
for reducing
technique
parallel-adder
technique.
time.
propagation
by
the
Boolean
J5t.
look-ahead
carry.
List
628
Chapter
6: Boolean
Algebras
the
draw
and
for outputs
logic diagram
G5
P5.
8. Realize
external
as
little
f2(x,y,z,w)
(b)
Answers
=
plus
multiplexers
four-input
using
as required.
externalgates
1. F
= 2m(l,2,4,5,6,7,8,9,l(UU4,15).
an eight-input
using
multiplexer.
this function
(b) Realize
Selected
f(x,y,z,w)
function
+ yz
+ xz
xy
o
MAJ
5.
When
s3
1
1
1
1
1
1
1
1
REVIEW
S3 =
0 then S3AtJ3;
s2
0
0
0
0
1
1
1
1
Si
0
0
1
1
0
0
1
1
FOR CHAPTER
= 0
So
-carry
and
Fx
Ft +
Fi
Bi
Bi
1
A
0
1
A&
B, +
B{ +
1+
A,+
B,
A, \302\256
At 0 Bs
0
1
For M
Gr
AiBi
Gi
AiBi
A, +
A, B,
A,
AiB,
A,
A +
Ai +
Ai +
Ai
Bi
B.t
Bi
\302\256
Bi
(AND)
Bi
B,
A,
+ A,Bi
Bi + AiBi
Ai \302\256
Ai
A,
=0
B,(OR)
A,\302\256B,(EQ)
Bi
1. The
variables.
is
following
the
Without
deduce the
values
variablesxux2,x
3.
truth
formally
for
the
table
for several
deriving
functions
functions of 3 input
Boolean expressions,
in terms of the
A/2/3/4
any
Section
6.6
2.
*1
x2
0
0
0
1
1
1
1
0
1
1
0
1
1
*3
0
1
0
1
0
1
0
1
0
0
0
0
0
the
Simplify
Applications
to
f*
1
1
0
1
1
1
1
0
1
1
0
0
0
0
0
Boolean
following
Digital
Computer
629
Design
using laws of
expressions
Boolean
algebra:
(a)
xy 4 xy
(b) (x + y)(x + y)
(c)
3.
xz
+ xyz
xy
lawsof Booleanalgebra:
= x
+^xy
(b) (x + y) (x + y) - x
(c) x(x +y) =xy_
+ xy + xyz = y
(d)
xy2
(e)
(f)
3cyz 4-
+
(w\302\243
a;2)
+ xy
4- xyz
3cyz
- y(a; +
4-
xy2
jc)
= z
(a) f(x,y,z) = (x 4-
(b)
/ (x,y,z)
y)
(x,y,z)
M2M3M5,
form)
(z 4- 5c)
where / = 1 iff
an
of input
number
odd
equals 1.
(c) /
normal
M, are
where
variables
maxterms.
function
f(a,b,c,d)
2 m(0,l,2,3,4,5,8,10,12,13,14).
6. Minimize
\"don't-cares\"
the
function
is the
whose
f(a,b,cyd)
following:
\\cd
ab\\
00 01 11
1
1
10
Karnaugh
map
with
630
Chapter6: Boolean
7.
Algebras
Implement
the function
/ (a,fe,c,d)= 2 m(4,10,13,15)
using
an
8 x
multiplexer.
11.
12.
Design
Using
a full-adder
full-adders
using
using
five
two
8x1 multiplexers,
8x1
multiplexers,
gate.
using half-addersand an OR
only design a circuitthat will
gate.
output
the
of
where
complete
function
sum
and
G(x)
Flows
Network
7.1
AS
GRAPHS
OF
MODELS
Many systems
OF COMMODITIES
FLOW
involve
the
flow
such as
be somethingintangiblesuch
systemsof telephonesand
and
factories,warehouses,
as
lines;
retail
may
be
goods,
something
or money;
tangible
or it may
or heredity. Thus,
disease,
or interconnections of
networks;
all involve the flow of
information,
railway
outlets
a network.
commodities
through
in
transmission,
communication,
The commodity
of commodities.
or
transportation,
railway
lines,
channels
general,
systems
is frequently
accomplished
by
the graph
stations,
general,
terminates.
The
structural
which
information indicating
connected
by
structurally
similar\342\200\224may
significantly
different
interconnections
of
an
even
be
isomorphic
as
graphs\342\200\224but
are
be
have
be
be
might
by a graph, but edgesof the electric
whereas
the
interpreted
by parameters such as resistanceor voltage
be interpreted
by
edges of the telephone network modelmight
parameterssuch
as cost per unit length or maximum
of calls per unit of
number
and
we
time. We must account for these parameters as part of the model,
of
a
wecan
for
each
do so by either edge or vertex labels.Thus,
graph
edge
specified
network
model
631
632
Chapter
Flows
7: Network
associate
capabilities
but
graph,
to edge
labelings.)
7.1.1.
Example
representa
third city.
A
the
per
highway
doesn't
of a graph
is a
there
through
pass
the two
between
number
maximum
each vertex
by an edge if
distance
the
denote
indicate
could
label
second
connected
correspondingcitiesthat
One edgelabelcould
couldrepresent
Let
System.
are
vertices
between the
highway
cities.
Traffic
Two
city.
of time.
unit
Suppose
Example 7.1.3.
of
markets.
unit
vertices
and
channels
edge
Typical
of
of available
the cost
time,
number
We
Model.
Dynamic
modeled by
can be
system
the
or
commodity,
connected
markets
a
by a
have
we
that
system
may incorporate a
v by
four vertices
(Of course,v0
(u,v)
which
represents
can be
(Vi,vi+i)
commodity to
Let us
vlf
each
v2, v3,
v on
city
takes k days to
\342\200\242
\342\200\242
(u3_kyv3),
(^l^fc+i)*\342\200\242
edges
v0,
traverse, we
with
be storedtemporarily
the
vt
infinitely
at
following
any
city
represents
can
the same
assigned an
be more precisein
where
the starting
the
capacity as (u9v).
large
v on
day i.
each
road
(u0,vk)t
edges
capacity
Finally,
to
the
allow
vertex.
example.
refineries
at
a and
7.1.4.
b to
Section7.1
as
Graphs
Models
(a)
of Flow
633
of Commodities
(b)
7-1.
Figure
are
markets
pipelines connecting the refineries,reservoirs,and
with
is labeled
by edges in the graph of Figure7-l(a).Each
edge
a number indicatingthe maximum
amount
of oil in thousands of barrels
that canbetransported
via that
pipeline
per week.
In cases where there are multiple
sources
as a and b) and
(such
them
combine
multiple terminals(such as g, h, and i) we can artificially
to a single source vertex and a singleterminalvertex
two extra
by adding
S and D, represent
vertices as we did in Figure7-l(b).Thesetwo vertices,
the total supply and demand.Eachedge(S,x) is labeled with a number
x can supply each week.
representing the total amountof oilthat refinery
The
denoted
edge
for
(h,D),
of
barrels
these
With
instance,
oil each
barrels
20,000
form
is labeled with
a number
(xjl)
of oil demanded by market x eachweek.The
is labeled 30 because market h requires30,000
amount
total
the
representing
examples
preliminary
as defined
network
(transport)
Definition
7.1.1.
and containsno
loops
directed
is called
it can
(S,a) is labeled20because
we see
below.
graph
a (transport)
of
the essentialcharacteristics
is (weakly) connected
network if and only if
G that
supply
and
G, called
of
k defined
on the
the
edges
ofG.
The
edge of
function
G, the value
is called
k(e)
function of
the capacity
of e. We
the capacity
is called
G and if
think
e is
of k(e)
any
as
634
Chapter7: Network
Flows
maximum
rate at
vertices, distinct
the
representing
along
transported
e. The
in-degree0
the source
network
a transport
in
S has
out-degree 0, but
D has
sink
the
and
D,
vertices.
intermediate
are called
the
case.
We generally
will say
indicate that G
If
such
that
could be
any
Similarly,let B(v)
are
that
For
example,
= 0,
{y E
Thus
in
the empty
V(G)
\\ (y,v)
denote
- {y
A(v)
that
vertex
with
(v)
and edge
V(G)
of ally
E V(G)
\\ (v,y)
E V(G)
E(G)}
\"follow
E(G)}.
set
the set
v\" or
i>.\"
\"before
- {ajbj},while
jB(S)
from v.
is incident
graph
vertices
B(c)
is a directed
vE
V(G),let
(V(G)MG))
the
A(e)
set.
= {g,h,i}
1.
The
in
and
accompanying
which
c.
graph
(Figure
and
and
a pipeline system
from
3 refineries,a, fe,
delivered
7-2) represents
m is
i represent
intermediate
shown
on the
pumping
edges.
as a transport
network.
(a) Model this system
that
refineries
Add
to
model
the
additional
facts
(b)
a, fe, and
your
can produce at most 2,10, and 5 units respectively.
in
model
the facts that cities j, k, and
(c) Incorporate
your
and
7
units
4, 3,
require
respectively.
Figure
7-2.
Section
Graphs as
7.1
Modelsof
Flow
2. It
times
are 30
minutes
toJ3,
15 minutes
or
by
average
from B to
going
trip
C, and 30
minutes
from
4000
on
vehicles
3.
from
635
of Commodities
C. The
to
A to
the
network.
4. Suppose
Suppose,
5. Suppose5 personsA,
no person chairsmorethan
6. A
manufacturing
that
firm
forecastthe demandfor
The task of
each
the
producing
one
committee?
product
various
of articles can
certain period of time.
can be assigned to
a variety
produces
over a
articles
who
workers,
articles.
Let
be
the
m = 2.
(b)
how
Describe
(c) Discuss
how
to design
the
time
transport network.
7. From
a transport
ti}-
could
networkin general.
be
incorporated
into
your
to a single
run
a
of n cities,
Cl9 C2, ..., Cn buses
group
destination Cn+1.If thereis a roadfrom C, to C;, let ttj be the time
required to go from
Ct to C; by this road, and let fy; be the maximum
number of buses which can usethe road from
C, to C; per unit of
time (bij - 0 if there is no road from Ct to C;). Let bu be the maximum
number of buses that can be stationedat Ch and let A, be the
636
Chapter
Flows
7: Network
Figure 7-3.
number
is:
question
many
of
buses
at
stationed
buses
the buses
should
How
arrive at
as possible
and times of
shown
7.2
of
tij))
i =
vertices
b^ and
C,-(\302\243)
are
them
labeled
edges
of
(Ciyt)9
edges (C.-(*),Ctf*
3, 4, 5 and t = 0, 1,2,3,4
between
as
Cn+1
with
capacity
1, 2,
travel
Q originally
the
where
on the
1))
5 cities
road
map
7-3.
in Figure
FLOWS
to ask about a system suchasthe onepicturedin
of oil so that the
possible to organizethe shipment
demands of marketsg,h, and i are met? The total amount of oil available
of Figure
to a is 20,000 barrels per week. (Thisis indicatedin the
graph
of
7-l(b) that a has only one incoming
edge (B(a) = {S})and the capacity
of a's oil.
this edge is 20.) Since A (a) = {c,/}, c and /are the only
recipients
the
barrels
to c and 0 barrels to /, exceptfor
Thus, a could sendall 20,000
a can send a
fact that the edge (a,c) has a 12,000
barrelcapacity.
Thus,
a can
send a maximum of
maximum of 12,000barrelsto c.Butlikewise
a could
send 16,000 barrels to/and 4,000to c;
16,000barrelsto/. Hence,
or 8,000to/ and 12,000 to c; or 10,000 to / and 10,000to c;and so on.
we have not begun to considerhow b could distribute
its oil,
Although
we alreadyseea largenumber
of potential
plans. Let us begin to organize
our thoughts concerning
this
and as we proceed we will beginto
problem,
A
Figure
question
practical
7-1 (b)
is: Is it
seethe basic
of the
Let us labeledges
ideas
with
second
the
amount
concept
two
of flow.
numbers,
of flow through
first the
that edge.We
edge
make
cannot
two rules:
exceed
the
Section
7.2
637
Flows
(2) Except
a vertex
into
Of
the
send
edges
(c,e)
16,000 barrels to
to send
decide
could
ways refinery
possible
arbitrarily
20,000 to
and (c,d)
maximum of 17,000barrels.Thus,
A(c)
no
since
see that
oil can
Since
c has
receiveat most 17,000
b. Let
barrels
us make
a, c can receive at most 13,000barrels
the choice to send 13,000barrelsto from b. Likewise we choose to send
sent from S to b.
b to d. Thus, there must be
13,000
26,000
barrels.
from
from
from
We
only
continue
making
choices
to the above
subject
7-4.
in the diagram shown Figure
indicated
market
We see that, for this choiceof flow,
i received
as
constraints
two
jn
a summary
is
of the
but g
its demand
schedule we
have
developed:
a sends
16,000 to/
4,000 to c
b sends 13,000toc
tod
13,000
Total
g receives
16,000
h receives
10,000
i receives20,000
Total
46,000
46,000
even
barrelsof oil
80,000
though
and
the
somemarketsdid
a% 06,16)^/08.16^
(12,0)/
(17,
0)y
(20,
1^(10,
(30,
16)
10)^
(20, 20)
(13,
13)
-\342\226\272\342\200\242 *\342\226\240\342\200\242
,
<
Figure
(30, 20)
7-4.
638
Chapter 7: Network
Flows
Definition
and sink
A
flow
of G suchthat
(ii) If x is any
k(e)
for
each
of G,
vertex
edge e E E(G).
different from the
then
the
sum
the
sink D.
Condition (i) is
the amount of
edge. Condition
equal
flow
E V(G)
for every x
Thus,
is the
2yEMx)F(x9y)
the net
x. Moreover,
flow out
flow
x is
- {SM
of x and 2zE~B{x)F(z,x)
of
out
that
(i.Z.I)
z<=B{x)
yGA(x)
that
a vertex
x is
flow into
is the
defined to be
2yeA(x)F(jc,y)
2zEBix)F(z,x),
while the
equation.
Condition
not in
(iii)
that
insures
and
Note that
zero flow,
every
transport
where F(e)
= 0 for
has at least
edge e E E(G).
network
each
flow
along
e.
Example
7.2.1.
Consider the
example of a network
flow
shown
in
Figure 7-5.
Note the zeroflow into the source S along the edge (6,S).While
it is
that for each intermediate vertex x> the flow into x equals the flow
of x, we only illustrate this fact for the
out
vertex
e. The flow into e is
true
Section
Flows
7.2
639
Figure 7-5.
F(a,e) +
F(cye)
2 + 2 = 4.
The
Such
flow
edges
along
2 +
edges
are said
2 =
out
of e
is F(eyD)
+ F(eyd)=
(S,a)
to be
are
If an edge e is unsaturated,
then
we define the slack of e
in a flow F to be s(e) = k(e) - F(e).Therefore,
the
slack
of edge (eyD) in
Figure 7-5is 8 while the slack of edge (d,D) is 2.
in this example the flow out of the sourceS is equal
Note further
that
in turn, is equal to the flow
into
to F(S,a)
+ F(SyC) = 4 + 2 = 6, and
this,
the sink D. That this is always
the
we
case will be proved later, but first
need
some additional
notation and terminology.
In general,
if X and
Y are any subsets of V(G),we shall
write
(X, Y) for
the set of all edgeswhich
a vertex x E X to a vertex y E Y. In
go from
we shall write (x,Y) for ({jc},Y)
and
(Y,jc) for (Y,M). Let us
particular,
of all edges incident to x, and sincethese
note that (V(G)yx)
consists
=
from a vertex y E B(x), we have
all incident
are
(V(G),x)
edges
=
(J3(jc),jc). Similarly (x, V(G)) (xyA(x)).
into
the real numbers (g
Now
E(G)
g is any function from
suppose
We shall
a capacity
function or a flow function).
might be, for example,
x E X, y E Y, and
where
write g(Xy Y) for the sum of all values
g(xyy)
is the sum of all values
Y) = 2(xo,)e(x,Y)g0t,y)
(xyy) E E(G). Thus, g(Xy
x E X to a y E Y. We
the
an
adopt
g(e) where e is an edge from
convention that g(XyY) = 0 if (X, Y) is the empty set. Likewise,g(X,<t>)
set.
if <f> denotes
the empty
a sum of no values of the function
will
mean
=
=
=
X
and
{S,c,e}
Thus}g(X,</>) 0 g(<t>, Y). For example, in Figure 7-5 let
Note that while
Y = {a,6,d,D},
then (X,Y) = {(S,a),(c,d),(e,d),(e,D)}.
the
there
are edges
G, nevertheless,
(a,e), (6,S), and (6,c) in the graph
in
but
directions of these edges are such
these
that
(X, Y)
edges are not
then
insteadarein (Y,X). Moreover,
if g is the indicated flow
function,
=
=
=
2
2
X=
4
9.
If
+ 1+ +
+ g(eyd)
+ g(eyD)
g(Xy Y)
g(Sya) + g(cyd)
=
=
in
{a}and Y {D}, then g(X, Y) 0 sincethereareno edges in (X, Y) this
= 0 for X = {S,a,6,c,d,e}and Y = {D}, while
case. Likewise,g(YyX)
=
6.
g(X,Y)
unsaturated.
640
Chapter
7: Network
Flows
for X C
wherex G X and y
is the
V(G))
g(X,
V(G),
in V(G)
vertex
is
of x.
In general if X,
+ g(X,Z)
g(X,Y)
Y,
exclusion. In particular,if
#(X,Y) + g(XtZ).
of
network
F(S,V(G))-F(V(G),D)We first
Proof.
by
UZ)
respectively,
of S -
Then
D.
into
flow
the
and sink,
and
of inclusion
sets, theng(X,
source
G.
in
flow
then g(X,Y U Z)
principle
disjoint
the
be
be a
Let F
(Gtk).
the
Z are
Yand
of V(G),
subsets
are
and
- g(X,Y D Z)
observethat
F(V(G),V(G))-
\302\243
F(x,V(G))
(7.2.2)
\302\243 F(V(G),x)
x\302\243V(G)
by condition
However,
x E
each
V(G)\\{S,D}. Thus,
in
F(SfV(G))=
D.
S, and
Thus,
A(S)
out
flow
the
and
F(V(G)JD)
a2,...,
let bu b2,...,
=
sum
{ax, a2,
fet
- 0 = F(D,V(G))
defined
the transport
on
denote
a3,.. .,aj
all the
vertices
and B(D) =
{6lf
incident to
fe2, b3,...,
quantity
\\F\\
- F^aJ
+ F(S,a2)
\342\200\242
\342\200\242
\342\200\242
+
F(S,am)
-F(S,V(G))
= F(bl9D)
+ F(62,D) +
= F(V(G),D)
ofthe
flow
F.
since
flow
for
becomes
- F(V(G),S)+ F(V(G),D)
Let F be a
am denote all
7.2.2.
Definition
(G,fc).Let ai9
source
S and no
7.2.1,F(x,V(G))- F(V(G),jc)
that F(V(G),S)
we know
addition,
no flow into
the above
+ F(D,V(G))
F(S,V(G))
But,
(ii) of Definition
\342\200\242
\342\200\242
\342\200\242
+
F(btfD)
(7.2.3)
there
is
becomes
network
from
the
the sink
fej. The
Section
641
Flows
7.2
The
flow
in
7-5 has
Figure
value 6, while
the
flow
in
7-4 has
Figure
value 46.
Definition 7.2.3.
A flow
F in a network (G,k) is
>
if | F\\
flow
| F | for every flow F in (G,k).
Thus, a flow F is maximal if the value of F is
F is maximal if there
of any flow. In other words, a flow
calleda maximal
the largestpossible
value
is no flow
F*
such
that|F|<|F*|.
7.2.2.
Example
maximal.
The
value
of
any
flow defined
|F|
flow
the
= F(S,a)+
be
easy to
this
techniques
for
Figure
7-6 is
networkis suchthat
F(S,b)
more sophisticated
in
analyze.
determining
(2, 1)
Figure 7-6.
W&will
maximal
< k(ayd)
question,
have
flows.
+ k(a,c)
it follows
to develop
642
Flows
7: Network
Chapter
In summary,
the following
F(x,V(G)) -
F(V{GU)-
ifx
|F|
if:c=D
if
x*S,D
7.2
for Section
1. Determinewhich
the
of
networks.Explain
graphs
in Figure
answer.
your
(c)
produce
= S
\\F\\
0
Exercises
to
fact:
>D
Figure 7-7.
2. Considerthe flow
In
the
graph
F in
continue
we
the
capacity
are saturated.
(d) Determinewhich
edges
(e) Determine the slackof edges(ayD)
(f)
Find|F|.
(g) Determine
(h) Determine
(a),
A (6),
B(D).
and A (d).
and
(a,c).
(S,6).
7.2
Section
Flows
643
7-8, determine
which
(5,2)
\342\200\242
D
3. Using
(a)
(c)
Figure
(b)
>D
(d)
Si
(e)
of
'\342\200\242D
\342\200\242
D
S<
\342\200\242D
4.
Consider
the network
value
with
of
each
as in
capacities
maximal
different
flows.
of these
flows.
Figure 7-8.
644
Chapter
7: Network
Flows
kinds of military
5. Seven
are
equipment
units
to be
flown
of each
a battlefield
to
kind of
equipment
(a)
Y={dye]
{a,fe,c}
(b) X = {S,c}
(c)
{S,c}
Y-1M
{fe}
Y=lS,c}
{a}
Y-{6}
= {a4A
Y=\\D)
(d) X
y={a,fe}
(e)
X =
(g)
(i)
(f) X = {S,a,fe,c}
Y={L>}
(h) X = {d,e}
7. In
value
the
of
possible.
Y={a,M
Y={a,d,e,Z>}
{S,fe,c}
the
with
networks
following
flow
and a way
(If it is not
indicated
not.)
(2,2)
S.JL2U.;
,JL\302\260\302\261.D
(b)
(3,3)
(d)
(3,3)
the
flows, determine
(4,3)
of
the
explain
flow
why
if
Section7.3
8. In the following
of
value
each
the
in
fill in
networks,
transport
result is a flow
of the flows.
the
that
so
645
Cuts
and Minimal
Flows
Maximal
network.
given
(4,3)
(5,4)
S^J^
(b)
(5, )
Selected
Answers
Label
the
Plf P2> P& P* and P5 whose
planes
and 3 respectively.Thennotethat no plane
units of equipmentsinceno
same
the
plane.
units, the
planes can
maximum
most
equipment. Sincethere
are
(b) 8, maximal
requires
Other problemsaremore
Px
are
there
Obviously
of a
CUTS
flow. For
and
be
a network.
for
found
many
practical
Sometimes,
quite easily by
certain
the transport
as in
inspection.
limiting
networkin Figure7-9(a).
of
any
flow. Let
the possibilitiesof
values on
instance,thetotal capacity
can
the solution of
difficult.
Consider
7.3.1.
Example
the
from
9 and 8
is
7
units.
Thus,the 5
carry,
+ 7 + 6 + 4 + 3 = 27 units of
of 4 x 7 = 28 units, no such
total
Sections
in
saw
problems
value
are to be in
P2 can carry
flow
MINIMAL
AND
FLOWS
We
same kind
and
(a)
MAXIMAL
more than 7
is possible.
loading
7.3
can have
in fact,
can
they
at
carry
of the
2 units
even though
Therefore
are 9,8,6,4,
capacities
7\\
of
be
incident
edges
the
edges
total
into
the
from the
capacity of edges
the sink. Then,
646
Chapter
Flows
7: Network
a%
-\\
<l
(8,4)/'
>
\\
ar
<
7\\
\\
b
\342\200\224
\342\200\224\342\226\272
y\302\260
<7'5)\\
W-W (I
\342\200\224S
4)
\\(7,
yC(>,5)
b%
\302\273
\342\200\242d
(5,5)
(a)
7-9.
Figure
in
Figure
7-9(a),
Tx =
k(S,a) + k(S,b)
- 8+
15
+AW,D)
T2-*(c,D)
-7 + 6-13.
Isis
patent
two
values.
that
< 13
|F|
edgesare
and
unreliable,
be able to
network
of
for
flow
any
a.flow.
if \"enough\"
Figure
7-9.
for
Consider,
If these
of flow from
amount
of any flow
value
the
Thus,
the edges
example,
removed from
edges were
S could reachthe
sink.
limit
the
capacitiesof theseedgeslikewise
= 4 + 5 = 9. If we
find
flow; therefore, |F| < k(a,c) + k(b,d)
value 9, then we know that that flow would be a maximal flow.
in Figure 7-9(b) is, therefore, maximal.
conclude
that the
Example7.3.2.
Consider
the
example
shown
of
flows
transport
shown
illustrated
flow
in
network.
Figure
is a
maximal
7-11 are
the
sink
we
value of a
a flow of
The
are nowhere
is
flow
7-10.
in Figure
(c,d)
the
Thus,
saturated,
near
and
also maximal
flows
in
the
same
Section7.3
647
Cuts
and Minimal
Flows
Maximal
(7, 1)
(20, 1).
1)
(4,
7-10.
Figure
These
following definition.
suggest the
examples
d (5, 1)
(2,2)
Definition 7.3.1.
source
S and
sinkD.
but^D
X,
(\302\243
Let
(XyX) of
all
edges
cut.
7-9, the
In Figure
examples
sets Xx
such
sets
of
that
X2 =
jS},
{S,a,b}9and X3 -
are
{S,a,fe,c,d}
cuts.
S-D
are
(X\342\200\236Xt)
of network
flow. For
concept of a cut is centralto the study
if
a
river
is
a
X can
north-south
viewed
as
the
set
be
screen
line,
example,
chosen as the set of vertices eastofthe river,
then
and
the cut (XyX) is
the setofall westbound
on bridges
roads
crossing the river. Then we can
The
across these
of
capacity
east to west by
total trafficjrom
the
calculate
roads in (X,X). We
are
led,
notion of the
to the
therefore,
traffic
the
counting
just
a cut.
7.3.2.
Definition
the
(G,k),
C. Thus,the
then
If C is
of C
capacity
k(C)
capacity
set
any
is defined
k(C)
of
sum of
is the
transport network
of the edges of
edges
in a
the
capacities
by:
Z k(e).
e\302\243C
In
particular,
write k(X,X)
we are
for
the
sum
We
(X,X).
to X. We
(7,0)
(20, 2)
(4, 2) c
(2, 2) d
\342\226\272
\342\200\242D
(5, 2)
(20,
0)
(4, 0)
c (2, 2)
(b)'
(a)
Figure
7-11.
+\302\273*D
(5, 0)
Chapter
7:
Flows
Network
caution
the
that
there may
of
computation
an S-Dcut (X,X)
to X
but they
k(X,X).
the cuts
Specifically,
be_edgesfrom
with
smallest
a minimal
cut
are critical.
capacities
if there
Thus, we call
such
that
k(Y,Y)<k(X,X).
there
are 4 vertices
following example of a transportnetwork,
=
24
are
16 S-Dcuts
sink.
there
and
the
source
than
Therefore,
other^
S
a possible
with
forms
of
subset
since
{a,6,c,d} together
(X9X)
any
choice for X.
In the
Example 7.3.3.
Refer
to
the
in
Table
Table 7-1.
transport
7-1.
Possible S-DCuts.
shown in Figure
network
Capacity
{s}
{a,b,c,d,D\\
{S,a}
{b,c,d,D}
11
{S,b}
{atc,d,D}
10
\\S,c]
{a,b,d,D}
16
{S,d}
{a,b,ctD\\
{S,a,b}
\\c,d,D\\
{S,a,cj
\\b,d,D}
{S,a,d}
\\b,c,D]
{SAc}
{a,d,D}
{S.b.d}
{a,c,D}
{S,c,d}
{S,a,b,c}
{a,b,D}
{d,D}
19
12
22
20
15
17
21
17
{S,a,bfd\\
{c,D}
14
{S.a.c.d}
\\b,D\\
22
{S,btctd\\
\\a,D]
13
{S,a,b,c,d}
\\D\\
10
Figure 7-12.
Section7.3
Maximal
Flows
and Minimal
Cuts
649
= 12 = k(ayd)
+ k(b,d)
not enter into the
computationof the capacity of X becausejbhe edge (c,6) is in the wrong
that
X to X and not from X to X.
direction,
is, (c,6) is an-edge from
- 7+
of (Y,Y),
Likewisethe capacity
where Y = {S,M,is k(byd)
+ k(S,a)
=
3-10 since (Y,Y)
The edges (c,6) and (a,fe)
not
do
{(fe,d),(S,a)}.
contribute
of (Y, Y).
any value to the capacity
We have seen in Example7.3.1that
the
value
of any flow is limited by
the capacitiesofthe cuts.That this is true in general is part of the content
We emphasize that if X
5 + 7. Note that the capacity
of
the
7.3.1.
is any
k(X,X)
the
of
edge
(c,6) does
theorem.
following
Theorem
(X,X)
- {S,a,b},
S-D cut,
If F is a
then
in
flow
F(X,X),
and
(G,k) and
network
a transport
if
consequently
\\F\\^k(X,X).
(b)
If (XyX) is an
Proof.
S-D cut,then
- F(V(G),X)
F(X,V(G))
- Y. F(x,V(G))-
F(V(G),x\\
xEX
- F(S,V(G))
- F(V(G),S)
+ J2 F(x,V(G))-
F(V(G),x)
x\302\243X\\S
Butforx${SJ)}
F(x,V(G))-F(V(G),x)=0
so that
to
F(S,V(G))-F(V(G),S)=\\F\\.
Thm,F(X,V(G))-F(V(G),X)=\\F\\._
If_we
F(X,X),
across
any
the
net
flow
across
andF(X,X)
Now|F| -
astheflowintoX.
F(X,X)
F(X,X)
of
+
= FiXJC)
F(X,X)
F(X,X)jiiice
+ F(X,X).
- F(X,X).
think of F{X,X)asthe
_
< F(X,X)
flow
out
anyy
of X
G
650
Chapter 7: Network
Flows
x E
X and
in the definition
< A
(x,y) by the capacity constraint
that F(X9X) < fe(X,X)
so that,
in
than or equal to the capacity
of any
we see
a flow,
of
general,
cut.
X. But also,sinceF(x,y)
is less
flow
\342\226\241
In
computedin severalapparently
(1) | F
|=
that the
established
we have
summary,
different
be
F can
a flow
ways:
source S,
of the
out
of
value
sink D,
any S-D cut.
the
into
across
(Y,
where
Y ={!>}.
that|F| =
cut.
can
be a
Let F
7^3.1.
Then
fe(X,X).
if F*
see that
readily
then | F* | < k
and
flow
maximal
flow.
all
makes
that\\F\\=k(X9X)
Thus,|F| = |F*|for
any
that|F|
Y) = k (X,X)
7.3.2.
that F
Suppose
if and
(i) F(e)
and
for
is
cut of
any
But the
in fact equalities.
< \\F* |. Hence F is a
cut with capacity less
any
\342\226\241
a minimal
cut.
is a flow
value
the
be
and_(Y9Y)
k(X,X).
in
of F
a network
and suppose
equals the
capacity of
is, F(XyX)
= k
only if
- k (e)for
(ii) F(e^) = 0
F(X,X)
inequalities
such
flow_F*
k (Y,
Moreover,
and
be an
(X,X)
is a
is a maximal flow
(M,M).
for
each
each
edge
e E
edge
(X,X)f (that
_
e' E (X,X)
(or in other
(X,X)),
words,
= 0).
is
maximal
flow
and
(X,X)
is a
Section
Flows and
Maximal
7.3
Proof.
651
Cuts
Minimal
Suppose
|
F | =
F(e)-
(X,X)
e\302\243(X,X~)
\302\243 F(e')
e'\302\243(X~,X)
\302\243 F(e)e\302\243(X,X\")
\302\243 *(e)
e\302\243(X,X~)
-A(X,X)
the edgesjn
of (X,X).
since
capacity
Conversely,if|F|^
*V)
^e(Xx)
from
above
each edgee' by
and
F(e')
2cG(X^
for
each
inequality
definition
for each
k (e) implies
= 0
conclude
7.3.3
F(e')
the
-|Fl-
k(XyX)
2e<=ix,X)k(e)
S,^,
fe(X,X)
then
k(X,X),
of
we observed
in
then
7-13
Figure
fe(X,X)_=
e E
edge
flow
by
5, and sincein
has value
Sc\302\243(x^F(e)
(X,X).
cut had
Corollary
capacity
we
7.3.1.
Figure 7-13.
of
Corollary
since for
7.3.2.
shown
in Figure
{S,a,fe}, the
7-14.
cut (X,X)
satisfiesthe
652
Chapter 7: Network
Flows
7-14.
Figure
Exercises
for Section
1.
7.3
7-15
a transport
network with
shows
Figure
their capacities. Find all S-Dcutsand their
cut
minimum
2. Suppose that
D. Showthat
of a
edges
capacities.
labeled with
What is the
capacity?
7-15.
Figure
value
the
(G,k) is a transportnetwork
if
there
directed
is no
with
S and
source
of a
minimal
sink
the
cut in G
3.
Let
(G,k)
be
the
network
Figure7-16,where
(a)
Give
(b)
Determine|F\\.
an
example
the
label
with
source
on each
of a flow
F in G suchthat
Listthe edgesof(X,X),
(c) Let Xj= {S,a,d}.
of(X,X).
\\F\\
>
5.
__
and
find
the capacity
Section7.3
and Minimal
Flows
Maximal
653
Cuts
\342\200\242
D
Figure
4. In
the networkshown
in
7-16.
7-17, find
Figure
at least 7 cuts of
capacity
6.
5. (a)
Consider 4
jobs\342\200\224jj
andy3.
Baker,
people\342\200\224Allen,
Allen has
and./V
j*2 J3>
and
Case,
peopleto
do
job
can
j4. We wish
Dunn\342\200\224and
to either
jobs
j itj2t
j2 and
j3,
assign the
state
maximal
(b)
flow,
and
people, 2 carpenters,a plumber,
and
as
a
as
a
plumber,
carpenter
qualified
that 4
Suppose
person
the
that
who is
the
(2) Formulate
this
maximal
carpentry
4 jobs will
a flow
as
and
three
apply
in plumbing.
be filled.
problem as in (a) and
not all
flow.
>D
Figure 7-17.
one
find
654
Chapter
7: Network
Flows
Figure 7-18.
and
that
indicates
(1)
Draw a
7-18
Figure
transport networkthat
S be
Let
teachers
represent
and
tiyt2ftZytAy
1 teacher
a
teacher
by
5 students,
the
is taught
student
each
k(s2,D) = 1 and
= 1
k(ti,s2)
this
to
or not
whether
answer
will
to
t5,
k (S,t
i) =
means.
network.
the
arrange
required
teacher-
student assignment.
6. A set of edges in a directed graph G is called an (edge)
if its removal from G breaks all directedpaths
set
from
disconnecting
set C is an a-b
at least one vertex of G. We say that
a disconnecting
set if every directed
path from a to b is brokenby the
disconnecting
of C.
removal
(a) Prove
S-D
every
cut.
7,
A set
of edges
removal from
of
G to
C in a
G breaks
at least
is an
cut
{(S,a),
S-D
directed graph G
all directed
is
an
(edge)
paths from at
and
no
cut-set
if its
least onevertex
proper
subset
of C
Section7.3
Flows
Maximal
and Minimal
655
Cuts
\342\226\272
\342\200\242D
7-19.
Figure
breaks
set C of
in
edges
G is
networkis containedin
the
of
not an S-Dedgecut-set.
Figure
of cuts.
7-19 find
S-D cut
a minimal
that
Prove
(c)
class
cut-set.
8.
is
that
Suppose
where S
rrti
\342\200\224
m2.
For thejlow
In eachof
the
see
how to
maximal flow.
examples,
it is
increase the
to increase the
possible
flow?
If
so,
determine
flow.
Can
the value
you
of a
656
Chapter
7: Network Flows
(2, 0)
(8,6)
Figure
12. Disprove
(4,
\342\200\242
0)
\342\226\272\342\200\242D
7-20.
the following:
network
have the same capacity,
(a) If all the edgesofa transport
then all S-Dcutshave the same capacity.
(b) If F is a flow such that | F | = 0, then F isthe zeroflow.
If all edges in a transport network from
the
source
S are
(c)
then
all
sink
D
into
the
are
saturated.
saturated,
edges
then
(d) If (X,X) is a minimal S-Dcut in a transport
network,
there are no edges in G with capacity
smaller
than C - min
{k(e)\\eG(X,X)l
13.
If F
edges
with
7-21, with
larger
flow
indicated
X = {S,a,fe,c,d}.
capacities, (X,X) is a minimalcut where
to
A
is to be transmitted as messages.We want
set
of words
one
of
word
the
each
of
the
by
representing
possibility
investigate
letters of that word chosensuch that the words can be represented
transmit
is possible,
we
can
a
uniquely. If sucha representation
we
a
want
to
for
word
of
a
instead
letter
message
complete
single
of words,
sets
send. For the following
design a network modeland
is possible.
or not such a representation
determinewhether
(a) {bcd,aef,abef,abdf,abc}
(b)
{ace,bc,dab,df,fe}
(c)
{abc,bde,ac,bc,c}
\342\200\242
Section
Maximal Flows
7.3
657
Cuts
Minimal
and
Figure 7-21.
14.
Let
n elements,
both of
ici and ir2 be two partitions of a set with
which contain exactly r disjoint nonempty
State
a
subsets.
of
necessary and sufficient conditionfor the possibility
n elements such that the r disjoint subsetsin irx as
selectingr of the
well as the r disjoint subsets of tt2 are represented,
4 disjoint
into
(b) The integers 2,3,.. .,20,21are partitioned
subsets according
are
to their remainders
upon division by 4. They
also partitioned
into 4 disjoint subsets according
to the
number of
factors
prime
they contain (counting multiplicity),
(&)
{{2,3,5,7,11,13,17,19},
namely
{16}}. Is it
possible to select 4
representative for
representativefor
each
each
{4,6,9,10,14,15,21},
such
integers
remainder
of
number
possible
possible
{8,12,18,20},
is a
4 and a
there
that
modulo
prime factors?
15. A company
for a carpenter, a mechanic,a plumber,and
advertises
an electrician*The company
The first
four applicants.
interviews
and
an
is a plumber and a carpenter,the seconda mechanic
and
an
a
fourth
electrician, the third a mechanic,and the
carpenter
four
electrician. Can the jobsbefilled by these
applicants?
16. At a party, there are 6 girls and 6 boys. Girl Gx know boys BuB2,Be;
girl G2 knows B2 and B5; girl G3 knows B2fB3,B4;girl G4 knows
while
BUB3,B5;
respectively.
During
a single
Bl9B6
and B2yB3yB4yB5
she
a boy
knows?
17. Let
E bea setand
not be
where
are n
.,An
AlfA2y..
at
\302\243
At
for
each
i>
we
then
distinct representatives.
For
be
that
subsets of \302\243
(these
distinct
say that
instance,
all of
the
sets
the members
need
cii,a2t..
we have a
is:
sets
elements
.,a\342\200\236
system of
At may
want
to
be
send
convention.The
use
network
658
Chapter 7: Network
Flows
indicatedsubsetsof E
If so,list
to determine
whether or not the
have
a
{a,6,c,d,e}
system of distinct representatives.
flows
a system.
Ax =
(a)
{a,fa},A2
(b) A! = {a,d},
A2
Az
{a,c,d},
{fe,c},
A4
- {c,d}
Selected
1. The 16
cuts
{c}
7.3
for Section
Answers
\302\253
such
have
8,8,8,9,9,10,11,11,12,13,14,16,
capacities
17,18,19,21.
3. (a)
(4,3)
Figure
value of
The
(b)
6. First,
this
flow
7-22.
is 8.
define
remove all edgesof C to obtain a graph if. Then
S
v of G such
that there is a directed path from
X of vertices
if. The
reached
S-D
a set
to v
in
contradiction.
Hence,
7.
(a)
By
C is
Exercise
(X,X).
a disconnectingset. But
set. Thus,C -
(X,X).
the
cut
(X,X)
contains
proper
is a
subset
cut
of
disconnecting
Section
The Max
7.4
Figure 7-16let X
(b) In
a cut
an
not
but
{Sye}. Then
cut-set
edge
{(S,a),(S,6)} disconnecting
Cut
Flow-Min
(X9X) =
659
Theorem
is
{(Sya)y(Syb)y(e,g)}
since the
proper subset,
set.
is_a
of
(X,X) is a minimal cut. If somepropersubset
set
C
then
cut
contains
another
C,
disconnecting
The capacity of ( Y,Y) must be lessthan
the
of
(YyY).
capacity
C (XyX)
and the capacity is the sum of a
(XyX) since (YyY)
subset
of the same numbers. This contradictsthe
fact
that
has
no proper
(XyX) was a minimal cut. Thus, (X,X)
and therefore
must be an edgecut-set.
subsets,
disconnecting
8. Ingeneral,
of a set of numbersis lessthan
to
the
minimum
or_equal
the minimum
of a subset of those
numbers.
Let (X0,X0) be a
minimal S-D cut. By Exercise
is also an S-D edge
7(c)
(X0,X0)
cut-set.Hence,
minimal
cut is contained in E. Thus, m2 >
any
(c)
Supjpose
is a
(X,X)
7.4
THE
CUT THEOREM
FLOW-MIN
MAX
Theorem7.3.1
asserts
of a
flow, is at
maximal
value
the
thatjf
saturated
conditions
must
The
prevail
well-known
comes to
always.
Max Flow-Min
Cut theoremof
and
Fulkerson
of
any
maximal
In
Theorem.
flow is equal
any
to the capacity
cut.
a minimal
This theorem
(1)
the
existence
(2)
the
existence
(3) the
equality
minimal
In other words,
equality
Ford
our rescue.
for
maximal
flow
and
any
cut (XyX).
the
a maximal
inequality
flow and
660
Chapter
7: Network Flows
stated in Corollary
a minimal
and
flow
7.3.1and 7.3.2do,in
First, let
essentiallythe ideaexpressed
intermediate
maximal
assertions.
The existence
with
for a
hold
always
fact,
cut.
in
are
there
vertices,
For a
7.3.3.
Example
2n
the proof is
transport network
to observe;
thing
of these
subsets
possible
A of numbers
A set
(i)
an
with
(ii) If
{bn} are
a +
then
limn_\342\200\236
bn,
and
{an}
If these
existenceofa maximal
Here will sketch the
than or equal to the
and
FlyF2y^
of
{an}
and
bn).
take for
must
granted the
proof of (3).
flows
and a = lim,,.^ an
to the
proceed
upper boundL
a sequence
L, and
reader
the
familiar,
of
value
two sequences
b = limn_0O(an
+
flow
has a least
bound
upper
proof of
of
isV.
We
how to
indicate
considerthe
{Fn{x,y)}
Since
flows
may
are
there
construct a flow
for
Fn(x,y)
not approach
only finitely
V. For
value
with
n. The
all possible
each edge
sequence of
(x,y)
numbers
subsequence
Two
Basic
Ways
Before
to Increase
proceeding
flow-min cut
clearer.
the
theorem, let us
proof
discuss
of the
some
final
ideas
of
assertion
that
will
make
the
the
max
proof
Section 7.4
(i) If
an
more
of the commodity
If an edge is working
(ii)
edge
and redirect in
illustrate
us by
against
try
to send
more
sending
we could try to
the source,
toward
could
is, two
that
it.
through
back
us
Let
to capacity,we
being used
is not
edge
to increase
ways
of a commodity
basic
move
661
Cut Theorem
Flow-Min
Max
The
this
a more practicaldirection.
an example.
by considering
indicated
with
capacities
and
flow F
Suppose
that
and
(d,D).
by a
We
we
In other
decide
certain amount t.
decide
must
how
the
flow
k(S,a)
Similarly,
the
flow
from
a to
be.
can
Since
be increasedby
the flow is
more
at
than
- F(S,a) = 5-3 = 2.
d and from
to D
cannot
morethan
k(a,d) -
F(ayd)
= 6
6-0
and
= 3,
k(dyD) -F(d,D)=6-3
a
\342\200\242
(3,
(3, 3)
3)
Figure 7-23.
c
\342\226\272
\342\200\242
be increased by
662
Chapter
7: Network
Flows
(3, 3)
Figure
7-24.
- Fx(S9b)= 5-3 = 2
1-0
k(b,c)-Ffac)
=
k(c9D)
FfaD) 6-3
= 1
Increasing
the
flow of
F2
in Figure
Figure 7-25.
S-b-c-D
7-25.
by
min{2,l,3}
= 1
Section7.4
Max
The
of
capacity
cut
the
impliesthat F2
to D
from
is a
this
fact,
is a
flow.
maximal
of
the
for increasing
method
\"greedy\"
(2)
663
Cut Theorem
edge.In
Flow-Min
from
source
the
minimum
S to
unsaturated.
e, in
flow of
P, and
let t
each edge ev
of
be
the
path
of
P by t.
this
method
produced a maximal
\"greedy\"
But unfortunately this technique doesnot always
In fact, in
a maximal flow, as indicated in the following
example.
produce
the next example,thereareno S-D paths made up of unsaturated edges,
soin this case,we take an alternative approach at increasing the value of
certain
the flow by actually decreasing the flows
along
edges that may be
Repeated application of
in
flow
7.4.1.
Example
Example
shown in Figure
We
should
because
is, it
doing
would
Let
F denote
the
flow
indicated
in
the
network
7-26.
of
not,
so would
decrease
course, decrease
decrease the flow
the value
of F).
Figure
7-26.
664
Chapter
7:
Flows
Network
to decrease
attempt
F{S,b)+ F(a,6)
=
- F(a,b)
F{S,a)
if
to
we
decrease
avoid
A(S,6) -
by t.
F(S,b)-
and (a9D)
so (S,6)
cannot
choose t =
follows
that
decreasing
t,
and F(S,b) by
of
F(afb)
\302\243
flow can
the
by
and
tt
Now
-
and A(a,D) -
- 2
can be increasedby
Moreover,sinceF(a,b)
F(a,b)
and
+ F(a,D),
increasing F(S,b) by
F(a,D)
increasing
F(b,D)
we must
also increase F(ayD)
by \302\243,
F(b,D) and F(S,a). Hence, the value
F(a,b)
decreasing
be increased by
t. Since
the
minimum
F(a,D)=6-3
of {2,3}. Hence,
3,
t < 2.
1 and
decreased
Then
It
X = {S,M.
In orderto
the
generalize
the
reconsider
edges
process
whose flows
course,
(a,6), and
these
edges
Perhaps
another
example
will
be instructive.
Figure 7-27.
Section7.4
The
Max
Cut Theorem
Flow-Min
665
Figure 7-28.
shown
in Figure
7-28.
the
flowFx
Now
could
and 5.
(Figure
7-29).
directed
every
nondirected
be
S-a-c-D;
2,1,
path
reversed
the
slacks
Increase the
flow
by
S-b-c-D is such
to form a directed
the
other
2 edges
(S,b)
Figure
7-29.
666
Chapter 7: Network
Flows
(5,5)
>D
Figure 7-30.
7.4.1.
Suppose that (G,k)
sink D. Suppose,moreover,
that
Definition
S and
source
definition.
is a transportnetwork
eue2,..
.,en
et in
G is
a sequence
and
directed
from
Vi_x
F is
P from S to D
of vertices S = vQ,vly..
to i;, or from v( to Vi_x.
is directed
from Vi_Y
a flow in the
is a sequenceof edges
path
The
each
edge
i;,;
path (or a
flow-
for F) if
(ii) for
= D
.9un
forward edge of P if it
to
reverse or backward edge ofP.
A
P is defined
to be an F-augmenting
path
augmenting
with
network.
edge
backward
e of
edge
the
definition
of an
= the slacks(e{)
- F(et)
j
F(e,)
edges
flow.
form.
another
\342\202\254,-(P)
forward
all
iff
if e,
if
is a
ex is
forward edge of P.
backward edge of P.
Then
note
that e(P) is
associate
the number e(P) = min \342\202\254t(P).
P
In
the
is an
a
number.
path
always
particular,
nonnegative
iff
>
0.
e(P)
F-augmenting path
For example, if F is the first
flow
of Example
7.4.1, then the path P^
= 0 since
the edge (ayc) is
S-a-c-Dis not F-augmenting
because
\342\202\254(Pj)
saturated.But,on the other hand, the path P2: S-b-c-Dis F-augmenting
of
becausee(P2) = 1 (here each edge was an unsaturated forward
edge
With
p2).
P,
The Max
Section 7.4
is the
If F
in
flow
F-augmenting
forward
(a,b)
edge
667
then
7.4.2,
Example
two
the
because
Cut Theorem
Flow-Min
\342\202\254(P)
{s(Syb),F(ayb)ys(ayD)}
= min
{2,1,3}= 1.
in Example
7.4.3 was F-augmenting because
S-a-c-D,
= 2.
\342\202\254(PX)
path Px: S-b-c-D is Fraugmentingbecause
to state
and prove the
Now we have the machinery and terminology
The
e(P)
= min
P:
path
1. The
following lemma.
Lemma 7.4.1.
is an
defined by
If P
F.
that
Suppose
F(e) =
F(e)
F(e)
- e(P)
if e
e(P)
F(e)
is a flow
with
is a
(G,k)
F-augmentingpath in G
value
|F |
is a
transport network
S to
from
Dy
then
forward edge of
if
e is
a backward
if
e is
an edge
with
function
the
flow
edge of P
of G not in P
+ e(P).
of P,
Proof.
Let P be the sequence of edges elye2>-.
.,en
= D.
vertices S = v0yvu..
.9vn
To prove F is a flow with value | F \\ + e(P)y we must show
all
e in
edges
(b)
P(x,V(G))-P(V(G),x)
|F|
G and
+
the
that
GY
ifx
\342\202\254(P)
|P|-\342\202\254(P)
through
the
= S
ifjC=D
ifx^SorD.
that (a) holds,note that F(e,-) 4- e(P) < /e(et) for each forward
P since by definition e(P) < s(et) = fe(ej)
P(ei). Likewise,
e(P)> 0 for each backward edge et since e(P) < P(et).
F(ei)
To prove (b), observe that we need only check for vertices x on P
if x = vt is
because for all other verticesF and F are equal. Furthermore,
To see
edge
ei of
668
Chapter
7:
Flows
Network
recall that
the flow. If the
on P,
edgeeM =
e, and
edges
F(ei+1)=
is a
(viyvi+1)
other hand, if
edge
F(ei+l)
=
then
P,
F(el+1) - e(P).In eithercase, the result of replacing F
F(ei+1)
by F on this edgeel+1 is to increase the net flow out of i;,by c(P).
with regard to the edgee,joining
to i\\- end up
the
v^i
changes
Similarly,
flow
of
the
net
flow
out
of v{ is 0 +
the
net
out
c(P).
Thus,
v( by
decreasing
if i ^ 0 or n; the net flow out of u0 = S is | F\\ +
is zero,
e(P) - e(P), which
- \\F\\ - e(P). Thus, F is a flow and its value is
e(P) and out of un = D is
n
+
\342\202\254(p).
ifi
On the
e(P).
from Lemma
It follows
path, then F is
converseholds.
The
(3)
7.4.2.
Lemma
the
that
such
(X,X)
If a transport network
has a flow F with
value
(G,k)
either contains an F-augmenting path or a cut
capacity k (X,X) - | F |.
network
the
|F|,_then
before.
we mentioned
that
of this
proof
F admits an augmenting
a flow
The next lemma showsthat the
lemma contains the main idea of the
if
flow.
max-flow min-cut
of the
proof
7.4.1that
maximal
not
Proof. First,
=
XQ
there
a collection
we
construct
Then
define
as
the
set of all
{S}.
Xx
is a directed edge (S,y) in
such
E(G)
other words, Xx
S,y could be the
is the
Supposenext
set of
the
F(x,y) <
^o>^i>This
vertices
set of
is no
that
edge (y,S)
that
Xlf..
.,Xk_x
k(x,y) or elsethereis an
been defined.
have
edge
with
(y,x)
has not
such
In
flow.
positive
the sequenceof
Recall
< k(S,y).
F(S,y)
start of an F-augmentingpath.
all vertices y
some
there
flow
of
vertices
Then define Xk
edge
(xyy)
such
>0
that F(y,x)
already
been
as
that
chosen
for
in
\342\200\242
->Xk-i*
becausethe
number
for some
of
positive
integer
F-augmenting
path.
The Max
Section 7.4
Flow-Min
669
Cut Theorem
Since
Now
we have all the machinery to make the proofof assertion
(3) of the
max flow-min cut theoremof Fordand Fulkerson
easy.
F is a maximal flow. By Lemma
7.4.1, F admits no_augmenting
Suppose
the network
cut (X,X) such that
7.4.2,
path, so by_Lemma
contains^
=
which
of
that
is
means,
course,
(X,X) a minimalcut.This
|F| k(X,X),
and
the
concludesthe proof of assertion
(3),
proof of the theoremis
complete. D
In
course
Corollary 7.4.1.
flow
F is
maximal
iff
there
is no
F-augmenting
If F isa maximalflow,
to
D. Nevertheless,
then
there
there may be
are no
flow-augmenting paths
intermediate verticesv
and
from
paths
670
Chapter
7: Network
Flows
Figure 7-31.
Corollary 7.4.2.
is such that
cut
is a
(X,X)
minimal cut
iff
every
maximal
flow F
an
and
F is
of
Example 7.4.4. In
7-31,
find
a maximal
Considerthe
along all
edge
(c,b)
the
to obtain
edges
all minimal
path
and
flow,
cut (X,X),
with
network
flow and
augmenting
forward
minimal
any
indicated
cuts.
Figure
flow shown in
both
Figure
S-a-d-c-b-D.
decrease
are
7-32.
Section
7.4
of
Clearly this flow F ismaximalbecausethe value
of the cut (X,X)
where X = {S}isalso6.
this
671
Theorem
Cut
flow is
6 and the
capacity
To
cuts
minimum
all
find
Corollary 7.4.2. If
wejuse
of
(Y,Y) is
any
by the maximal
flow
F and all edges of (YyY)
must
have
none of the
Onflow. Therefore,
in
in
can
be
either
or
(YyY)
(y,y).
Thus, if a G Y,
edges(a,d),(d,c),(fa,c)
in
and
d
also
Y.
then
must
be
if
fa
E
so are_a,d, c in
then
fa, c,
Y,
Similarly,
for
d.
likewise
in
Y
is
or Y for any
either
Y;
Therefore, {a,fa,c,d}
cjmd
minimal
cut,
minimal cut
all edges
then
only two
are
there
Thus,
(YyY).
(YtY)
saturated
be
must
possibilities
for
minimal
cuts:
({S,a,fa,c,d},{D})and
(i)
(ii) ({S},{a,fa,c,d,L>})..
Sinceeachcut has
these
the
are
only
capacity
6, each
minimal
cuts.
of these
of a Maximal Flow
Construction
The
proof
7.'4.1as
algorithm
well
for
max flow-min
of
the
as
Examples
increasing
7.4.1.
Algorithm
with
a given flow F.
Input: a transport network
a
maximal
flow.
Output:
1 and 2 below until step 1 finds
no
steps
Repeat
augmenting
1. Choose an F-augmentingpath
Form a new flow of higher value
the augmenting
if
2.
paths,
augmenting
does
not
of
even
in the
in
fact,
be
a maximal
then
terminates
with
irrational
more general
if the
flow. The
is a crucial
we shall
of
each
edgeis an
capacity
7.4.1,
capacities
case.
due
does
question as to
show
integer.
that
the
There
to Edmonds
and
algorithm
one.
Fulkerson produced
for which the above
Nevertheless,
if the
Algorithm
Networks
path.
there
7.4.2. In otherwords,
will
terminate.
does terminate
algorithm
is a modification
F and
flow by Lemma
a maximal
terminate
then
path.
possible.
using
672
Chapter
7: Network
Flows
Theorem
is
(Gyk)
an
7.4.2.
If the capacity
integer,
then
each
of
Algorithm
2\342\202\254<=E(G)k(e)steps.
Proof.
by constructing
Fi(e) is an
in P.
each
for
flow,
Since
+
\\Fh\\<\\Fk\\+l*\\FM\\-\\Fk\\
any cut
for
2e<=E{G)k(e)
neW
floWS.
of this
A corollary
<
e(P)*k(XJ[)
find
can
we
2ee\302\243(G)&(e),
proof follows.
If
Theorem 7.4.3. (Integrality of FlowsTheorem).
of a
transport
maximalflow
network
(Gyk)
that F(e)
F such
Let us apply
at most
\342\226\241
Algorithm
7.4.1
has
an
capacity,
integer
is an integer for
to the
each
edge
each
edge
then there
e of G.
is a
following example.
the
for
shown
network
in
Figure 7-33.
First we
look
for
an augmenting
path where,
have
to be unsaturated).
Figure
7-33.
if
possible,
The path
all
edges
are
Px:S-c-d-Dis
Section
The Max
7.4
a path;
flow by
the
the
of the
slack
minimum
673
Theorem
7-34.
Figure
such
(7,6)
Cut
Flow-Min
edges along Px is
we
3. By
increasing
the flow Fx
obtain
shown in
Figure 7-34.
Thus,
are
there
Now
we look
edgesmust have
be
must
unsaturated.)
edges
that backward
backward
and,
flow,
positive
unsaturated
with
edges.
edges.
of course,
(Recall
the forward
Sequentially
2 along
the path
7-35.
Note
in the
decrease
the
flow by 2
Figure
7-36.
Note
the decrease in
7-37.
There
are
no
more
the
flow
by
2 units
along the
paths from
augmenting
(7,
Figure
7)
7-35.
S to D because(S,a) is
674
Chapter7: Network
Flows
Figure
7-36.
(7. 7)
7-37.
Figure
the
saturated and both edges out of c are saturated.
last indicated
Thus,
flow is maximal. Of course,we could
also argue that this flow is maximal
the
of this final flow is 29 and that the capacity
value
of
by observing_that
the cut (X,X)f where X = {S,c}
is also
us
determine
all minimal
If
cuts as we did in Example7.4.6.
is a minimal
(XyX)
cut, thenjione of the edges(a,/),
(e,-D),
29.
Infact,let
are
(b,d)AS,c)
e G_X, b
(X,X) U
the
minimal
(X,X),
only
A Labeling
(bj), (6,e),
in (XJf)
it follows
that
<E
X.
Thus,
S E
since
if X
it
follows
X and
= {S,c},then
that
(S,c) $
(X,X) is
cut.
Algorithm*
*The
discussion
from
here to
the end of
the
section
may be
omitted.
Section7.4
Max
The
675
Cut Theorem
Flow-Min
exist.
But for larger graphs, inspectionaloneis
reason, we introduce a labelingalgorithm.
in agreement with
vertices
we label
the
definition
of the sets
Basically,
7.4.2.
In other words, first we
.,Xk used in the proof of Lemma
X0f
Xl9..
label the source and then we label other vertices recursively according
no flow-augmenting
paths
this
For
sufficient.
not
to the following
is an
thereare
edge e in
the
network
transport
where
is unlabeled
y. Then
x and
connecting
we follow:
rules
two
x has
a vertex
Suppose
there
scheme.
Labeling:
In either
label
for
label x,
y the
assign
case,
vertex to
which y is adjacent.(Other
as an
such
the name of
backward
constructedby
the
using
first
case may
indicatethat
been
has
as a
x and y
In
be.
labeled
We
with the
or
forward
label.)
since x has
is this:
forward
use
e is a
simpler
the
a backward
a predecessorof
words, x is
other
in the
be included
S to
from
path
labeled
previously
conveying
flow-augmenting
path from S to y.
flow-augmenting
the
the flow-augmenting
using
e between
edge
whatever the
the
could
information
edge
y
on
Pred(y) = x to
notation
through x.
to the proof of
back
By
referring
x is labeled, x belongsto somesetXk_x for
k and then the possibilityof labeling
that y G Xk.
some
y means
As in the proofof Lemma7.4.2
two
cases
themselves:
either the
present
a label,
sink D receivesa labelor not. If D receives
then a flowaugmentingpath from S to D is possible and the labelon D indicates the
can be found by
predecessor of D on sucha path.A flow-augmenting
path
=
- Pred
= D,
the
vertices
Pred(D), W2
Wly
Pred(Wi)
using
W0
=
=
S
soon
until
we
find
and
Pred( W*_i) as the
(Pred(D)),
Wk
eventually
exists
path
from
Lemma7.4.2,we
predecessor
S to y
see
of some
that
vertex
discovera flow-augmenting
e(P)
by
which
is
we augment
Wk_x
path
in
the
P we
the flow F
sequence.
can easily
Of course, should we
determine the amount
to producea flow
of
larger
flow
since
F is
a label,
then the
that
value.
present
(X,X)
676
Chapter
Flows
7: Network
The
algorithm
as presently describedwill
discover
successfully
in the ordering.This
vertices order to label
Now let
us give
them.
a formal
of the
description
labeling algorithm.
Whether
Input: a transport
network
indexingofthe verticesS
(G,k)
=
Output: a flow-augmenting
labeled,
the
source
S with
the
sink
4.
<t>
(to
go to
S and
source
=
Dt and
.,vn
with
a given
that
indicate
S has
Step 5.
be
until
label
the
Pred(D) =
Wk
no predecessor).
If no
examined.)
But if
continue.
is labeled,
Vj
with
5. If
(G9k).
exists.
v0; otherwise,
no unexaminedverticesareavailable,
stop.
of a vertex.) For j = 1 to
(Examination
If
F in
that none
conclusion
or the
sink D and an
flow
vertex
choose
index
v0,vu..
path
1. Label source
D is
2. If the
3. (Choosea
examined,
Flow-
Exists.
Path
Augmenting
we examinethe
by which
a priority
establish
will
in
jc. Set
u,
let
is not
Uj
Pred(u;) = x. Return
W0 =
for some
D,
Wx
k. Then a
n,
labeled
v, W2
to
Step
do
the
and can
following:
be, label vj
2.
- Pred(u). Continue
path
flow-augmenting
is
WkfWk-l9...fWuW0-D.
apply
the
labeling
path
exists
to determine
network shown in
algorithm
in the
Section
The Max
7.4
\342\226\272
o.
7-38.
Figure
4, we
be labeledby
backward
receivelabels.
We
with
labelihg
to Step
return
and
2.
and
receive
d can
Choose d
W0 = D,
V^4
Step
4, label
2, D
Step
- Pred(D)
= ctW5 =
at
Now
the forward
as the labeledvertex
vertices.At
W,
Pred(6)
Onlyx d
examine.
to
vertex
to b. Now a can
but d and D cannot
adjacent
the label b,
chosenas the
677
Theorem
(4, 2)
\342\200\242
Cut
Flow-Min
go
to
Step
is unlabeled
this case, a is
and adjacentto a,
3. In
with
smallest
the
then
to Step 3.
with unlabeled adjacent
label d. Return to Step 2.
index
forward
has received a
= d, W2 = Pred(d)
label d and
= a, Wz
by
5,
Step
- Pred(a) = 6,
a flow-augmenting
Pred(c) = S determine
path
P:S-c-b-a-d-D.
determine
the present
augment
all
over
process
again.
can
Exercises
flow and
1.
Find
(a)
a maximal
flow and
a minimal
networks:
678
Chapter 7: Network
Flows
(b)
(3,0)
(4. 0)
(c)
>D
(d)
\342\200\242D
(e)
<D
*-\342\200\242
d.O)
\\D
The Max
Section 7.4
Cut Theorem
679
(g)
(f)
Flow-Min
(5,0)
*->D
\342\200\242
D
(4, 0)
(h)
2. Findtwo
indicated
maximal
flows
for the
capacities.
Figure
7-39.
680
Chapter7: Network
3.
Flows
a, 6,
Vertices
units respectively,
and
a flow
Find
units.
Cities
while
a, 6,
cities
Transportation
(a)
(b)
Draw
supplies
i and
7-40.
Figure
4.
vertices
demand.
Find
a maximal
flow.
of merchandise
units
/,
g>
and
h receive
should cities
so that as much
a,
fe,
and
c send
merchandiseas
possibleis transported?
5.
Use
Corollary
7.4.2
to show
that
minimal
cut
in the
network
Section
The Max
7.4
Flow-Min
Cut
681
Theorem
Figure 7-41.
isthe only
(b) (X,X), whereX = {Stb,d},
7.4.
Section
l(a)jn
(c)
(X,X)
and
(7,7),
where
minimal
cut
of Exercise
= {S,a,fe,c,d,e,/}, and
network
the
of
Exercise
(d)
Y={Syayc},Z={S,a\\.
(a)
cuts
in the
following networks:
of the
= {S,a,6,c},
cuts
X
682
Chapter
7: Network
Flows
(b)
(4, 4)
(c)
cuts.
9. Suppose
10.
X of residents
set
belong to various clubs Cu C2, C3, C4, and to
four disjoint politicalpartiesPl9 P2, P3, and PA as depicted
by
Figure 7-42. Suppose that each club must chooseone of its
membersto represent
no person can represent more than
it, and
oneclub,no matter how many clubs he belongs to. How should one
A so that
choose a system of distinct representatives
| A C\\ Pj \\ = 1
for eachy = 1, 2, 3? Hint:setup a flow problem.
11. Let (G,k) be a transport network
that (X,X)
is a
and
suppose
minimal cut in G.Prove
or disprove:
(a) If Ft and F2 are flowsjn
(G,k) such that Fx(e) = F2(e)for each
flows.
F2 are maximal
edge e in (XfX) U (X,X), then F1and
A
Section7.4
The
Flow-Min
Max
683
Cut Theorem
Figure 7-42.
(b) If Fx
and
maximal
F2 are
edgee\302\243(X,X)
12.
Suppose
that
is
(Gyk)
capacities.
Suppose
(vk-uvk) is a directed
flows, then
(e)
network
transport
where
fc-cycle
F in
ex
ufc
G where
(iV->i)>
=
with
v0. Prove
F(et) = 0 for
edge
integer
^2 = (vi9v2)9
=
\342\200\242
\342\200\242
^k
or disprove
some
that
i.
13. Prove
14.
for each
= F2(e)
(X,X).
further that
there is a maximalflow
Fx
(a) Modelthe
conditions
as
a transport
network.
684
Chapter7: Network
Flows
(b)
Use the
concept of maximal
the
instructors
four
(a) If F is
then
maximal,
flow along
nonzero
have
flow
so that
courses
four
he is
which
is an S-D cut.
with nonzero capacity
and
(X9X)
edge
every
or not
whether
determine
to the
will be
no instructor
not trained.
to
flow
be assigned
can
will
it.
then
(b) If F(X,X) is equalto k(X,X),
for
a cut (X,X),
(c) If |F| = k(XyX)
(X,X)
cut.
is a_minimal
is a
then (X,X)
minimal
cut.
if the
along an edge can be negative
edge goes
_
__
= k{XyX), thenF(X,X) = 0.
If F(X,X)
(e)
_ =
If | F\\ = k(X,X) for a cut (X,X),then
0.
( f)
F(XyX)
one
maximal
flow in a network, then
(g) If there is more than
(d)
flow F(e)
The
backward.
there isjnore
one
minimal
cut.
If F(X,X) = F(X,X),
F is a maximal flow.
= 0 for all
(i) If |F\\= 0,
F(e)
edges e.
S to D, then F(e)
from
whenever
directly
(j) Ife
k(e)
than
(h)
then
then
F is
\302\253
runs
maximal.
(k)
cut
(X,X)
be minimal
may
but
for
not
others.
of the cut
(1) The flow across a cut can be larger than the capacity
if there is someflow back fromX
to X.
(m) If F is a maximalflow and (X,X) is any cut, then F(e) = 0 for
any
edge e E (X,X).
network
have the same capacity,
(n) If all the edgesof a transport
thenall S-D
e = (a,b) is
have
cuts
(o) If
(p)
same
ayb
are
capacity,
S-D
(X,X).
all edges
maximal.
If
(q) If
the
unsaturated
F, then
maximal_flow
cut
an
of a
then
all
is
(X,X)
a minimal
cut, then
in
edges
saturated.
(r) If
the
is
flow
(X,X)
are
zero
flow.
Selected
Answers
1.
(a)
for Section
Use
shown
the
in
cut is (X9X)
7.4
paths S-a-c-D,
augmenting
7-43. The value of the
Figure
where
- {S,fe,d}.
is 9
and
a minimal
Section7.4
Max
The
Using
the
d-f-Dy
and
augmenting
7-44.The
(c)
by
7-43.
= {S,a,6,c,d,e,/}.
Consider
the
685
S-a-c-e-f-D,
value
of this
also 8, where X
Cut Theorem
(6, 4)
Figure
(b)
Flow-Min
1 along
augmenting
path S-b-d-a-c-D.
the forward
determined
by
= {S,a,6,c,d}.
2 units
by
along S-c-e-D
to obtain a
then (XfX)
{S,a,6,c,d,e},
is a
flow
minimal
of
and then by
value
16.
Let
1 unit
X =
cut.
determined
by
3. Not
= {S,a,6,c}.
S-a-d-f-i-Dy
S-a-d-g-i-Dy
has
value
S-a-d-e-g-i-D,
S-b-a-d-e-h-j-D.
Figure 7-44.
50. For
S-b-e-h-j-D,
S-c-e-h-j-Dy
686
Chapter
Flows
7: Network
5. (b)
then
flow
maximal
the
using
Thus,
(d) Using
Y-
and
{Sybyd\\
{a,c,D}.
of
(since S
cut (Y,Y)
minimal
answer
that
we see
1(d),
G Yand^S,a)is not
for
any
it
saturated),
must
D G
\302\243_Y-Likewise,
other case.
9. See
Ford
10.
Fulkerson's
and
Find a maximal
a sink;
and
a source
Introduce
book,
7.5 APPLICATIONS:
of
capacity
is such
each
1.
edge
a set.
HALLS
AND
MATCHING
make the
= {aua3,a6,a9}
flow.
Flows in Networks
THEOREM
MARRIAGE
Problem.
Assignment
certain
for
to
position
has a
Each applicant
applicants.
suitable
which
assignments
The
Committee
company
of
list*
he or
be
has
Is it possible to
she is suited? If not,what
to
the
have
n positions
which
qualifications
positions.
these
7 we
positions?
encountered
to
fill
and
make him
assign eachapplicantto a
is the
largest
And finally:
number
of
How should
made?
Problem
(or System of
Distinct
Problem).
In
to
These problems
certain
organization
m committees
can be given
another
twist.
This
version is known
as
Section7.5
m girls
The Marriage Problem. Given
can all the girls be married provided
she doesnot know?
and
no
conditions
of these
All
problems can
of
get at the essence
the
each edgeof G
property
another
way:
In
is a
directed graph G
B such that
A and
of B.
vertices
other
of
A0
(i) for
M is
matching
each vertex a E
the edge
(a,6)
M with
for G
to
costumes,
Let us attempt to
definitions.
subsets
two
what
a boy
no vertices in common. A
edges
is a matching M with a maximal
number
of
for
G
M
is
a
the
complete
matching
matching
having
E M for some b E B. Or to put it
that for each a E Ay(ayb)
matching
maximal
matching
edges.
of
different
many
of them.
graph
bipartite
set of
is a
n boys, under
girl is married to
the following
disjointunion of
vertices
is from
for G
with
directed
is the
of vertices
set
in
in all
elements
problems
Definition 7.5.1.
whose
be dressedup
are certaincommon
but there
687
Marriage Theorem
and Hall's
Matching
Applications:
of
of
M
B such
there
E B0,
Then,
a complete
course,
M is
is a
that
of edges
matching for G
is exactly
M. Moreover,
number
the
iff
in M
A.
edges
B0
A0
complete
there is exactly
matching
one vertex
if
there
6EB0 suchthat
onevertexa E A0
iff
A0
is a
such
that
= A.
a directed
The assignment problem can be modeledwith
bipartite
in
in
A
the applicants and the vertices
representing
graph G with vertices
B representing
an
that
the positions. Furthermore,
edge (a,6)signifies
calls for
a is qualified for position 6.The assignment
problem
applicant
But
in a
failing
maximal
688
Chapter
Basic
Flows
7: Network
Strategy
have
we
While
directed
bipartite
them. Of
course,
exercises, we
have
gained
already
will be
our strategy
Basically,
network
We design
a matching
call
| A | = 4 and |
The next theorem
where
B| = 5
from
vertices
matching
(a)
in
is
(b)
(c)
A flow
matched
and
be a directed bipartitegraph
whose
vertex
A and B such that each edgeof G is
in J3. Let (G*,k) denote the associated
gives
matching
the
flow
whose value is | A
Proof. Let F be
oGA
network
networksand flows.
flow
maximal
matching
7-45).
Then
A flow in the
a E
isl.
a source S and a
a E A and each b E B.
This resulting networkwe
adjoin
subsets
vertices
to
of
theorem.
cut
We
(Figure
Let G
set is
network.
for each
to all edges.
relates matching
7.5.1.
Theorem
(b,D)
proceed.
transport
flow
b E B~ Then
in
(G*,fc).
the only
Figure
edge
Suppose that
a is (S,a)
into
7-45.
for G. A vertex
across edge (a,fc)
for G.
F(a,b) = 1, where
and it must be that
Section
7.5
Applications:
F(S,a) = 1,or in
out of a is 1 and
which
other
F(a,b)
= 1.
F(afx)
and Hall's
Matching
the flow
words,
= 1, (a,b) is
Similarly the
Marriage Theorem
into a is 1.Moreover,
since
the only edge of the form
only
of the
edge
form (x,b)
689
the
flow
(a,x)
for
such that
determinea maximal
matching.
Complete
\342\226\241
Matchings
when
value
the
theorem
by
its
familiar
name.
HalPs
7.5.2.
graph whose vertex
Theorem
bipartite
whereeachedgeof G is from
completematchingfor G ifF|
We have
Proof.
matchingthen
the
matching
vertices
to
in B.
A and B
There exists a
if
there
is a
a directed
A.
complete
690
Chapter
Flows
7: Network
C of A. Let A
Suppose that | C | < | R(C)| for each subset
B = l^!,.. .,6j, and_let (G*,k) be the
associated
matching
.,am},
network.
the value of
{aly..
flow
be a
(consult
I
II
matching.
complete
After a changeof
7-46),
Figure
write X = {Syaiy..
.,as,6x,...,6J.Then
three types of edges.
we may
notation
(XyX) has
to as+ly...,am,
.,bt to Dy
and
III
We
edges
need
{alv . .,aj.
from aly..
estimate
only
Then
.,as to 6t+1,...,6n.
by
the
Wx
the number
matching
and W2,
condition
where
Wx
of edges of type
s = | C \\ < | R(C)
= R(C)
C\\
III.
Let C
|. Now 7?(C)
.,fcj and W^2
{bly..
Cut(X,
X)
of type
edges
type
Figure
of
III
7-46.
_^
/ edges
of type
m-5 edges
is
II
Section
7.5
Applications:
R(C)
Pi
\\W1\\^tand\\W1\\
\\
W2\\
equal to (m -
than or
The
s)
t +
gives a
corollary
following
a complete
Marriage
691
Theorem
= \\R(C) | > s
of the number
greater
Hall's
number
The
.,fej.
{bt+l9..
and
Matching
(s
- t) = m.
\342\226\241
sufficient conditionfor
existence
the
of
matching.
G whose
vertex
set is the
Corollary 7.5.1. In a bipartitegraph
B
of
A
where
each
of
G
union
and
is
from
vertices
of A to
edge
disjoint
for
G
if
is
vertices of B, thereexistsa complete
there
an
matching
integer
that
such
vertex in A
vertex in B
every
(i)
every
(ii)
is adjacent
to k or more verticesin B and
is adjacent to k or lessverticesin A.
\\C\\.
committee
problem, if each committee has at least k
k
is permitted to belong to more than
individual
find
then
is
to
a
for
it
committees,
separate
chairperson
always possible
if every
each committee. Likewise,in the marriageproblem,
girl knows at
the
in
Thus,
no
and
members
is
least k boys and every
boy
be married to a boy she knows.
Exercises
1.
each
girl
can
a good
a good
relationship
with
eachpartnerto a
relationship?Explain.
different
2.
most k girls,then
has
firm
law
has
by at
7.5
Section
for
known
David,
Cindy,
Bob,
Andy,
2 of
the
client
partners.
and Myrtie
children to school.Andy
drive their
whom
with
can
Is it possible to assign
he or she has a good
wish to
drive!
form
a car
Mondays
pool
to
or
Tuesdays,
(c)
Bob
Find
can
one
drive
such
compleie
matching.
692
Chapter7: Network
3.
Flows
J5;Dis
(c) Is therea
agreed to fix
Brian
curtains;
can clean
that
Assuming
match
will
5.
Anna
can paint
can paint,
as a
house
old
made.
Jody canmakenew
and
words {bcd,aefg,abef,abdf,abc,cdeg}
to represent each word by one
will
be uniquely
Myrtie
furniture;
wallpaper.
assignment
that
jobs
it possible
church charity
cleaned. In
and
wallpapered,
and new curtains
of code
set
transmitted.
Is
an
painted,
be moved
must
furniture
that
network.
be
must
addition,
Suppose
F is
matching?
complete
students have
4. Five
for
of tasks
they
that
can do.
is to be
of the
represented?
in the
If so, how?
letters
6. Five students,Sl9
committees,Cu
members
banquet.No
can
student
represent
two committees.
network.
(a) Model this problemasa matching
is
the
of
What
a
maximal
(b)
interpretation
matching?
of a complete matching?
(c) What is the interpretation
Is
there
a complete
7. Six senators,Si,S2,
S3,
The committees
are
C4
~ {Sl9S29Si9S6}9
each committee
are to be reviewed
committee.
5 distinct
{Sl9S29S59S6}9
Can
tasks?
If so,
and C5 -
senators
membersof5 committees.
^2 = t*Si,S5,og}, C3 =
{Sl9S29S3l
The
activities
a senator
who is
be selected
for the
by
of
not on the
reviewing
how?
8. There
9.
matching?
Section 7.5
Spanish;
P5
P2
be lockedin 2 cellssuch
6 prisoners
these
in the
inmates
English
speaks
Could
Spanish.
be
able
11.
Suppose
knowing
anything
apply
applicants
about
the
for n jobs
of his
qualifications,
Explain.
go to the
to
or
disprove.
go to
school has
schooldance
the dance
with
Explain.
girlfriends?
Corollary7.5.1.
Prove
boy in
every
13.
no
that
a language
to understand
the othersspeak?
10.
693
Marriage Theorem
and Hail's
Matching
Applications:
Any
matching
that
a complete
and
(ii) of
(i)
has
is contained in a maximal
matching.
14. There
are
compatible
with
15.
of the
with
with
a compatible
computers
m disk
and
drives
n disk drives.
and each disk
Is it possible
computers.
*
disk drive?
Each computeris
drive is compatible
network
determined
by G.
a complete
matching
means in this
context.
16. Let G be a directed bipartite graph with vertex set V equal to the
disjoint union of subset A and B where each edge of G is from
=
vertices
of A to vertices of B. Definethe deficiency
of G as d(G)
max {|C | - |jR(C) | such that C C A}.
(a) Showthat G has a complete matching iff d(G) = 0.
for G. Show that the
(b) Obtain the matching network
(G*,k)
or equalto | A \\ than
is
of
in
cut
(G *,k)
greater
capacity any
d(G).
694
Chapter 7: Network
Flows
(c)
17.
14.
< 6if|A|<
d(G)
Exercise17.
Prove
A
telephone
incoming
through
are
line is
3 groups
connected so that it
trunks.
trunks,
and a
II
group
that
lines
trunks
can be
most 6.
(a)
Describe
(b)
Determine
a directed
definition
(c)
(d)
of
in all.
outgoing
outgoing
the number
Moreover,
bound for
d(G).
See
this
problem.
15 for
problem
the
d(G).
incominglines
will
be
routed
to
connected
be
will
to outgoing
outgoing
of two
one
to
group
bipartite
an upper
of eight
one
to
line canbeswitched
can be switched
can be
line
group III
I, II,
B.
in
was built
network
to outgoing trunks.
switching
lines
into
partitioned
of
sets A and B as in
edges incidentfrom
vertex
or more
vertex
each
19.
with
are 4
there
that
Suppose
trunks when
that
companies
costs
their
in
circuit
miniature
are
circuits
high,
from
electronics companies.
The computermanufacturers
are
into 3
partitioned
10 members each. Manufacturers in category
within
50 miles
of 4 electronics companies, category
manufacturers
are
within
50 miles of 2 electronics
and
1
HI
of
within
50
miles
electronics
manufacturers
are
only
category
50 miles of more than
is within
company.No
company
is able
to supply
3 manufacturers and no
company
with
transportation
categories
are
more
(a)
II
companies,
electronics
electronics
than 1 manufacturer.
a directed
Describe
bipartite
d(G)< 10.
this
problem.
Section
7.5
695
Theorem
(c)
21.
Matching
Applications:
Let
network
a transport
be
(G,k)
ofG.
with
k(e)
each edge
1 for
that
the value of a maximal flow
is
to the
equal
maximum number of edge-disjointdirectedS-Dpaths
in G.
Show that the capacityofa minimalcut in (Gyk) is equal to the
minimum
of edges
number
whose deletion destroys all
Show
(a)
(b)
directed S-Dpaths.
in a directed
Let x and y be two vertices
Theorem,)
(Menger's
number
of edge-disjoint
graph G. Prove that the maximum
directed x-y paths in G is equalto the minimum
of
number
in G.
edges whose deletion destroys all directed x-y paths
(d) (Konig's Theorem,) Let G be a directed
bipartite graph whose
A and B where each
vertex set is the disjoint
of subsets
union
edgeof G is from vertices of A to vertices of B. Then the
number of edgesin a maximum
is equal to the
matching
minimum
of vertices
that cover all edges. (A set of
number
cover all the edgesof G if each edge is incident with at
vertices
as a
least
one of them.) Hint: Obtain Konig'sTheorem
(c)
restatement
of
aua29..
.,tfm in
bub2,..
of B
.,6\342\200\236
let
be an
there
column of M
(a)
(c).
part
an m x n matrix, M, constructa
22. Given
corresponding
edge
from
is nonzero.
a, to 6;
a matching
what
Interpret
to the
corresponding
Prove
maximum
graph
of M
and
with
with
G,
in the
jth
entry
means in this
rows
iff
bipartite
the
to
ith
and
row
context.
and
(G*,k)
the
interpret
the
the
number
same
them
and
entries.
Selected
Answers
5.
Design
{a,b,c,d,eyf,g}yand
in the
11. Apply
15. See
Liu
network
matching
edgesfrom
Corollary 7.5.1.
[26]
p. 286.
with
a code
a maximal
word
flow.
{code
to a
letter
words},
if
the
B
letter
=is
696
Chapter 7: Network
Flows
18.
number of
in this
edges
of
the
of
consisting
two.
Let e
the
= the
subgraph.
|C|-|/?(C)|<l/5|C|<2since|C|<10.Sinced(G)
\\R(C)\\},d(G)*2.
19. SeeLiu
21. See
REVIEW
p. 289.
[26]
FOR CHAPTER
1. In the
[4]
203-204.
pp.
7
with
network
flow shown
indicated
in Figure
7-47,
determine:
(a)
(b) F(X9X)
(c) the value
2. There
,
and
traffic,
and k(X,X)for
a maximal
of
= {S9a}9 and
flow.
to city D, onepassesthrough
passes through city C. During the lunch
average trip times are:
are two
routes
from
city A
the other
the
to
B: 15
to
C: 30
city
hour
minutes
minutes
B to D: 15minutes
C to D: 15 minutes
The
maximum
to
B: 1000
to
C: 2000
capacities
of the
routes are:
vehicles
vehicles
B to D: 3000vehicles
C to D: 2000 vehicles
**\342\200\242\302\243>
Figure
7-47.
Section
7.5
and Hail's
Matching
Applications:
697
Marriage Theorem
(15,15)
7-48.
Figure
the flow
Represent
of traffic from
A to
D during
transport
network.
3.
If a transport
network has
sink D, how many
S-D
cuts
4. In the transportnetwork
(a) Find a maximal flow.
List
(c)
Find
that
common
is jin
(X,X)
(X,X)
with
any
the
cut (X,X).
a minimal
that
S and
source
7-48:
in Figure
shown
5. Suppose
the
are there?
all flow-augmenting
value of the flow, showing
(b)
Prove
10 verticesincluding
cuts.
(G,k).
edges
in
in G.
circuit
directed
a transport network
of
containan equalnumber
S-D cut in
and (X,X)
Leon High
and
each
has
boys
boy
girl
exactly
4
dated
is
determine
whether
or
not
it
possiblefor
exactly
girls,
to
each
to
school
dated and
the
with
a
she
has
girl
go
banquet
boy
each boy to go with a girl he has dated.
7. Foreach of the following collection of sets, determinewhether or
not thereisa system
of distinct
If no such system
representatives.
School.If each
has
exists,explain
boys
Cx = {a,fe,c},C2 -
{a,d},
C3
graduates
training
state corporations
with
wish
but
dictates
that
same
no
university.
senior class at
5 of the
qualifications,
in the
not.
why
(a)
50
dated
have,
in
to
=
=
= {a,d}.
- {a,fe,c,d,e}.
{a}, C4
C5
respectively,
science
computer
hire a total of 48
13, 7, 7, 7, 7, and 7
and economics. Ten
graduates with
these
698
Chapter
7: Network
Flows
whether
or not all
48 graduateswill
be
hired
by the
10
corporations.
9.
and
Representation
of
Manipulation
Imprecision
8.1
FUZZY
8.1.1
SETS
Fuzzy
and
Sets\342\200\224Notation
Fuzzy
set theory,
Terminology
of
set theory.
abstract
in
membership
the
set. The
Kandel[51]
and
Zadeh
[50],
as well
Approximate ReasoningInferenceEngine
Ruspini [46].
element
membership
the
example
interesting
(ARIES)
by
Appelbaum
of an
and
the
of discourse, with
characterized
F
is
of
U
fuzzy
with each
which
associates
mF: U \342\200\224\342\226\272
[0,1],
of U denoted
function
as^
be
the
by u. A
universe
subset
membership
of
699
700
Chapter8: Representation
and
Other widely
of Imprecision
Manipulation
F= I
F = mF(wi)/t/i
when
U is
a finite
or
elements.
set of
is the
points in U at
is positive.
mF(u)
The height
8.1.3.
Definition
mF(u)
(8.1.1)
mF(un)/un
set of n
countable
a continuum
\342\200\242
\342\200\242
\342\200\242
+
Definition
which
U is
when
mF(u)/u
over
of
is the
least upper
bound of
Uy
- lubmF(u).
uGU
hgt(F)
A fuzzy
8.1.4.
Definition
set F
(8.1.3)
is said to be normal if
its
height
is
lubmF(u)
uEU
Otherwise
F may
be
F is subnormal.
normalized
or
nonfuzzy
contained
in
iff
may
be
be
noted
a subnormal fuzzy
that
a fuzzy
subset of
subset of U. A is a subset
(ordinary)
mA(u) < mB(u) for all elementsu of U> that
A C
Example 8.1.1.
\302\253-
set
mF by hgt(F).)
by dividing
(It
mA{u)
< mB(u),
u E
U.
is,
(8.1.4)
U be the interval
Let
universe
of discourse
the
in
u
as
[-20,110]
interpreted
temperature degreesFahrenheit.To
a fuzzy
to be able to
define
it is convenient
subset A of U labeled WARM,
whose
the
function
as
a
standard
function
express
mA
membership
of
the
be
the
to
reflect
parameters may
subjectivity
adjusted
of
characteristic
A standard
subset
function.
function of this type that maps a fuzzy
a real line onto the interval
is
which
a
is
the
S-function,
piecewise
[0,1]
with
Section
8.1
quadratic function
701
Sets
Fuzzy
definedas follows:
= 0
S(u;a,b,c)
for
\\c
< a
for a
<u<b
a]
(8.1.5)
for
b <
u <
for
w >
\342\200\224(H)1
= 1
and
where the parameters a and c are the lower
upper
fuzzy subset
interval bounds, respectively,and the parameterb = (a + c)/2 is the
crossover point, that is,the value of u at which S(u; aybyc) = 0.5.
subset
WARM
can be subjectively
Using the S-function, the fuzzy
= S(u;
characterized by the membershipfunction
60,70,80) or
mAl(u)
= S(u;
where
was
a
from
Florida
45,60,75)
by
person
given
mA2(w)
mAl(u)
Maine
the concept
of \"warm\"
whereas a person from
expressed
by
functions
and
Figure 8-1 shows the graphs of membership
mA2(u).
mAl(u)
mA2(u).
= 0.5 whereas
Notice that mAl(70)
mAa(70) = 0.9 with the interpretation
the
statement
as compared
\"70\302\260F
to 0.9
is
would
warm\"
Maine.
crossover
The
points
for
mAl(u)
and
mA2(u)
are
70 and
60,
respectively.
The
Both Ax
In
and
of Ax is
A2 are
normal
> 0
=
on (45,110].
1.
is a
subset
wwurm(w)
Figure
8-1.
Membership
function of
a fuzzy
subset
WARM.
of A2.
702
Chapter 8: Representationand
8.1.2.
Example
8.1.1)
below
of imprecision
Manipulation
B of
subset
fuzzy
the universe
mB(u)
- S(u;
that is,
to)
for
C labeled
subset
fuzzy
by a
be characterized
30
45 <
for
8.1.3.
Example
given
-w
(temperature)can
u <
for
-i-W
=
Example
S-function
30,45,60)
mB(u) = 1
equal
U (from
COLD
membership
\302\253
C = {setof temperatures
t\\
u <
u
60
> 60.
PLEASANT
of
function
the
\302\253
means
(where
normal
class,
approximately
with
= exp
mc(u)
(~((u
- t)/b)2)
all
for
real
u.
(8.1.6)
of \302\253.
The parameter b providesthe degree
of fuzziness
Let
us consider
functions given by a Floridian and
membership
which are graphed in Figure 8-3:
personfrom Maine, respectively
mCl(u)
mC2(u)
It can
be observed
from
- 74)/6)2)
exp
exp(-(U/-68)/12)2).
Figure
(-((u
8-3
that
and
the Floridian
Wcold(w)
Figure
8-2.
Membership
function of
a fuzzy
subset
COLD.
Section
8.1
Fuzzy
Sets
703
Wpleasan\302\253(w)
1.0
8-3.
Figure
Membership
fuzzy subset
of a
function
PLEASANT.
temperatures
the preferred
temperaturesas
+ e.
.6/6
from
\"pleasant.\"
Let U = \\a,bycyd,e},
8.1.4.
Example
d
from
case a fuzzy
In this
+ .9/c
A of
subset
or equivalently
[/ = a + 6 + c +
U may be representedas A \302\253
+
.3/a
of A = {a,6,c,d}, hgt(A) = .9, henceA
is subnormal.
It is
convenient to
represent a fuzzy
u
integers;
fuzzy
set
.6
.9
.5
labeled
\342\200\2423
Let U =
8.1.5.
a
tabular form:
Ma(u)
Example
in a
definition
set
{u\\u
u >
/,
SMALL
may
function
mA(u)
Here
the
function
decreasing
support
with
is the
mA(a)
]T
1 +
(8.1.7)
fcfjr/*
is a
monotonically
= 0, and
the
crossover
point
being 6.
Letting a = 0, c = oo
and
b =
10 yields
the
following
definition
of the
704
Chapter 8: Representation
fuzzy set
and
of Imprecision
Manipulation
SMALL:
SMALL=
with
sample
E[l
(^)2]\"7\302\273'
below:
values given
SMALL
.99
.91
.80
Example 8.1.6.
years. In this caseUisa
Let
terms
be expressed in
of
= {u | 0
.67
<u <
100}with
a fuzzy
and
continuum,
10
12
15
.50
.41
.31
u representing
set
labeled
OLD
age in
may
a function
(8.1.8)
(BUT/-
-*<\302\273>-/\342\200\242[>\342\231\246
mA(u) is a
[a,c] with
u = 6.
monotonicallyincreasingfunction
=
mA(a)
0, linv^mA(c)
= 1
over
We can find
advantageous
8.1.2
in
and the
other
the
interval
support
is
crossover point
which
at
be
are
of fuzzy sets.
applications
Throughout
for
max
and min,
a # b
the symbols
discussion,
forthcoming
any
= max (a,6) = a
= 6
real
if
# and
&
stand
a9b
a
> b
if a
<b
if
< b
(8.1.9)
and
&
b =
min
(a,6) =
= 6
Consistent
with
this
notation,
the symbol
if a
>b
(8.1.10)
#z means \"leastupperbound
Section
705
Fuzzy Sets
8.1
basic
the
Among
of z\"
of z\" where z
the values
E Z.
be read as \"greatest
lower
that can
operations
over
bound
be performedon fuzzy
the
are
sets
following:
~A
The
label for
B (or
by
The
union
of fuzzy
The
J3) and
A OR
sets,
8.1.8.
Definition
denoted by
B and
Pi
The intersection
interpreted as A
Comment.
operators used
respectively.
In
represents
A and
B is
(8.1.13)
Hence
AND.
\"hard\"
when
A AND
B is
&
the
Definition
8.1.9.
and is defined by
as
OR and AND
The product
AB=
not
appropriate
in which
are
the only
intersection,
&
is identified with
(i.e.,
min),
sense that no trade-off is allowed
AND
in
AND
operands,acts a
these or other possibleinterpretationsis more
AB
and
& mB(u)]/u.
[mA(u)
Ju
between
its operands.
By contrast,
the arithmetic
product of the
the applications
labels
sets
fuzzy
B are
J5.
particular,
of
if
by
is defined by
(8.1.12)
mB(u)]/u.
AC\\B=
The intersection
denoted
B is
and
to the
corresponds
then
[mA(u) #
[
Ju
negation.Hence,if
be interpreted as ~A.
union
of fuzzy sets
is defined by
B=
A would
by
(8.1.11)
is equivalent to
a fuzzy
Definition 8.1.7.
A
- mA(u)]/u.
fu [1
of complementation
NOT
then
set,
operation
is a
denoted
A is
set
mA(u)
are
of
AND.
it
of
terms
Which of
depends
on
used.
fuzzy
\342\200\242
mB(u)/u.
sets
A and
B is denoted by
(8.1.14)
706
Chapter 8: Representationand
Thus, Ap, where
of Imprecision
Manipulation
p is any
Ap=
if w
Similarly,
is any
is defined
number,
positive
by
(8.1.15)
f [mA(u)]p/u.
nonnegative real
number suchthat
< 1,
\342\200\242
hgt(A)
then
-
wA
Ju
(8.1.16)
mA(u)/u.
denoted
are
(8.1.15)
CON(A)
by
useful
in
and
is
defined by
(8.1.17)
CON(A)=A2.
The
fuzzy
set,
interpretation
of VERY.
A corresponds
to CON(A).
is an
concentration
VERY
then
denoted
Thus,
and
DIL(A)
by
if
A is
a label
is expressed by
(8.1.18)
DIL(A)=A05.
If A
is a
label
of a fuzzy
of a
A is
interpreted
as
DIL(A).
Example 8.1.7.
the
Given
+ 2+...+8,
C/-1
and
fuzzy
of discourse
universe
subsets
A =
.8/3 +
1/5 +
and
.6/6
- .7/3
+ 1/4 +
.5/6,
(8.1.19)
then
~A
- 1/1 +
+ .2/3
1/2
+ 1/4
CON(A)
= .64/3
DIL(5)
.84/3
+ .216/6
+ 1/5
+ .3/6
+ 1/5+ .36/6
+
1/4 +
.71/7
1/7
+ 1/8
.6/6
+ -3/6
.512/3
+ .4/6 +
(8.1.20)'
Section8.1
If Alf.. .,An
8.1.10.
Definition
are
Cartesian
product
\342\200\242
\342\200\242
is defined as a
x An and
Ax x \342\200\242
is expressed by
function
membership
mAl
Thus
\342\200\242
\342\200\242
\342\200\242
x
Al x
An can
\342\200\242
\342\200\242
\342\200\242
x
f
The concept of
discussion of fuzzy
Example
be written
UXy..
by
whose
.,\302\243/\342\200\236
& mAn(un).
(8.1.21)
as
.,un)
mAn(un)]/(uly..
the Cartesianproductwill
...
&
roAl(wi)
.,\302\243/\342\200\236
denoted
is
\342\200\242
\342\200\242
\342\200\242
&
&
\\mAx(ui)
referenced
further
be
(8.1.22)
in the
relations.
Given
8.1.8.
Ax
.,iO
mAn(ul9..
.,An
of
subset
fuzzy
of Uu..
subsets
fuzzy
of Alv.
the
respectively,
707
Sets
Fuzzy
+ .6/3
+ 1./2
.5/1
U2 =
Ux
1 +
and
2 + 3,
=
A2
l./l
+ .6/2,
then
Ax
A2 =
+
.5/(1,1)
+ 17(2,1)
+ M3,l)
.5/(1,2)
+ .6/(2,2)
+ .6/(3.2)
8.1.11. If Alv
Definition
mA
wxmAl
\342\200\242
\342\200\242
\342\200\242
+
(8.1.24)
wnmAn
of a convex
denotes the arithmeticsum.The concept
in the representation of linguistichedgessuch
as
which
the
associated
with
essentially*
etc.,
modify
typically,
components
weights
of a fuzzy set. The weights can alsobe interpreted
as coefficients
of the components of a fuzzy set A \"built\"
from
importance
fuzzy
where +
combination
is
useful
of
sets
Alv . .,An.
Example
8.1.9. Let Ux
weight in kilograms. A
as
fuzzy
set
{ux: 10 <
Ax labeled
ux
<
250}
as
HEAVY
with
ux representing
be expressed
may
708
Chapter8: Representation
with
and
mHEAVY(70)
centimeters.
of Imprecision
Manipulation
U2 =
Let
0.5.
<\302\253\342\226\240\302\2
\342\204\242L-rhN^n~7with
- 0.5.
raTALL(170)
Then a fuzzy
a convexcombinationof
set A labeled
BIG may be
HEAVY
and TALL, that
sets
fuzzy
in
height
\\u2:
A2 labeled
set
fuzzy
definedas
is, A1 and
A2:
BIG
mA(uuu2)
For example, if
= 0.6
/*200
/*100
we
the product
denote
- 0.6
mBiG(70,180) -
Notice
variations
that
the
membership
This is due to
determining the
and
0.64 +
0.5
fuzzy
0.4
fuzzy
of
using
- 0.584
mTALL(180)
= 0.556
BIG
set
\"importance\"
BIG
0.4 mTALL(170)
0.5
have stronger
of the
- 05
0.4 * 0.64
greater
set
0.4 *
mHEAWY(70)
in weight
function
0.4 mTALL(170)
0.6
= 0.6
m^^)]/^,^).
0.4 * 0.5
mHEAVY(80) +
0.6 *
.4
(8.1.27)
by *,
\"Ibig(70,170)- 0.6mHEAWY(70)
- 0.6 * 0.5 +
mBiG(80,170)
0.4 TALL
[.6mAl(u!)+
/
^140
JA0
HEAVY
the
the convex
variations
component
of
in height.
HEAVY in
combination of HEAVY
TALL.
t-level set
whosegradeof membershipin
A,-
fuzzy
resolution
set
A may
A is
greater
or equal
\\u:mA(u)>
be decomposed into
of
of U
to t. In symbols,
t).
its level-setsthrough
(8.1.28)
the
identity
A-
fltAt
(8.1.29)
Sets
Fuzzy
709
or
- ]T
(8.1.30)
tAt
where
tAt is
and
(8.1.16)],
from
0 to
set
the
of
the
At [in
At sets,
the sense
with
of
t ranging
1.
be interpreted
Since (8.1.1)or (8.1.2)
as a representation of a fuzzy
may
it follows from
as a union of its constituent fuzzy
{mjui),
singletons
of A we
the definition of the union (8.1.12)that if in the representation
=
we
can
have Ui
then
make the substitution expressedby
ujf
set
+ rrtj/uj
rrti/ui
(8.1.31)
# m;)A/,.
(mi
may
la + .6/6+ .3/6,
as
be rewritten
+ J
- A/a
(.4 #
.7)/a +
(.6 # .3)/6-
.6/6.
.7/a
Or conversely,
mjui =
<
(# ro,-)/ui, 0 < \302\243
m;.
(8.1.32)
For example,
the resolution
identity may
in
level-set.
More
specifically,
A
Then
by
using
suppose
that
- .1/a
+ .3/6
(8.1.32),
A
(8.1.1)
A can
.1/a
.3
# .4)/a,
be
viewed
or
(8.1.2)
A is
\302\243
.1.
as the result of
which fall into
be rewrittenas
+ .1/6
+ .1/c + .lid +
+ .3/6+ .3/c
+
+ .5/c
.3/d
.1/e
+ .3/e
+ .5/d + .5/e
+ .9/d+ .9/e
+ lie
combining
the same
710
Chapter
8: Representation
and
of Imprecision
Manipulation
or
A =
.1 (1/a +
.3
(1/6
1/6
l/c
+ lid
+ l/c
\\ld
.5 (l/c
+ 1/d + 1/e) +
.9
+ 1/e)
(lid
+ lie)
1/e)
1 (1/e).
which
is in
the form
(8.1.30). Using
are
(8.1.28),the level-sets
+c+
A.! =
a + 6
A3 =
A5 =
6+c+
by
+ e
+ e
d +
c +
= d
9
given
4- e
= e.
Ax
Definition
transforming
operation
set into a fuzzy
A of
U produces
a fuzzy
subset
by assigning
proper grades
F applied
fuzzifier
to a fuzzy
F(A;K)
which
is expressed
F(l/u;K).
of
by
(8.1.33)
mA(u)K(u),
the
is the kernel ofF,i.e.,
K(u)
can be used in
set
F(A;K) - f
where
of fuzzification
The
8.1.13.
a nonfuzzy
result
of applying
(8.1.34)
the
and
Here, mA(u)K(u) represents the productof a scalarmA(u)
of
the
of
sets
isthe
union
set
K(u) [see (8.1.16)],and/
family
fuzzy
fuzzy
w \302\243[/.
In effect,
(8.1.33) can be viewed as an integral
mA(u)K(u)y
of a linear operator, with K(u) being the counterpart of
representation
the
impulse
response.
Section
711
Fuzzy Sets
8.1
Let
Example 8.1.10.
A and
Uy
be defined by
K(u)
U=a+b+c+d
=
+ .6/6
.8/a
tf(l)-l/a+..4/6
.4/c.
Then
F(A;K)
= .8 (1/a
Ala + .4/c)
+ .24/a + .24/c
(1/6 +
+ .6
.4/6)
+ .24/c
.6)/6
The
definition
of fuzzification finds an
operation
of linguistic hedges such as MORE
MUCH, etc.
SLIGHTLY,
labeledas POSITIVE,
For example,if
of the
subset
OR
A of
a set
In this case,SLIGHTLY
real line.
POSITIVE.
is
the
SOMEWHAT,
LESS,
POSITIVE
SLIGHTLY
then
important applicationin
positive numbers is
is a label for a fuzzy
fuzzifier
of the term
Definition8.1.14.
Uu..
.,\302\243/n,then
U. R
can be
discourse
of
subset
is a
If
an
n-ary
mR
is the
function
link
between
u and
Vy respectively.
v,
Common
GREATER
THAN, IS
TO, IS INFLUENCED
Example 8.1.11.
MUCH
8-1).
GREATER
will be restricted to
measure of the strengthof the
of universes of discourseU and
discussion
mR(u,v)
are elements
Let\302\243/\302\253V-l
may
fuzzy
(8.1.35)
..,un)
of binary
fuzzy
SIMILARTO, IS RELEVANT
BY, etc.
THAN
constituent
is,
is a
examples
universes of
U is a fuzzy
ofR.
further
case,
which
its
of
..,un)l(uu.
mR(ul9.
membership
this
that
.,wn),
binary relations.In
product of n
fuzzy relation, R, in
Cartesian
2 +
be defined by
are
relations
TO,
IS
MUCH
CLOSE
3 +
712
Chapter
and Manipulation of
8: Representation
Imprecision
Not
Young
. Very
young
very
young
Old
<
Age
mathematical
Rigorous
Given
the sets
\"very
young,\"
or less
young\"
young,\"
\"very
among
oth&r
sets.
fuzzy
such
sets,
as
by squaring
by
old,\"
\"Not very
and
\"young\"
\"not.\"
Figure
of fuzzy
Construction
8-4.
sets
sets.
Table 8-1.
R
0
0
0
0.3
0
0.8
0
0
0
Example
TO may
be
8.1.12.
defined
If U =
a >
(-00,00),
0.8
0.3
as
IS CLOSE
where
,0
0
TO = f
0 is a scale factor.
\342\200\224\342\200\224-
(u,v),
IS CLOSE
Section
8.1
Fuzzy
therefore,
relations;
Sets
713
they
can be
definition.
by R
W denoted
R\302\260S=
If
V and
Uy
defined
S and
W are
addition
product (i.e., operations
replaced by min and max, respectively)of
andS.
min-max
operation
\302\260
S is
& in
the
are
for R
multiplication
relation
matrices
the
can be min or a
of the
(8.1.36)
definition
in the
used
and
It shouldbe mentionedthat
(8.1.36)
Comment.
by
#v[mR(u,v)&ms(vyw)]/(u,w)
sets.
fuzzy
8.1.16.
Definition
be:
reflexive
iffmR(u,u) = 1, Vu\302\243(/
symmetrical
iff mR(u,u')
= mR(u\\u),
\\f\302\243mR(u,u')
>
anti-symmetrical
@-transitive
iff
where @
u,u'
m^(w,w\")
'
w
V u,u
,
R on
relation
binary
fuzzy
0 and
U x
u,u'
(8.1.38)
= 0,
mR(u',u)
> mR(u,u')
u
can be replacedby
(o.i.oy)
@ mR(u',u\
(8.1.40)
u
U
a
min,
to
(8.1.37)
V
u*u!
\302\243/,
o a
tz
said
is
or other
product
algebraic
operation.
is transitive,
When
R+ =R
in the
exists
+ #2+
sense of
and
its transitive
\342\200\242
\342\200\242
\342\200\242
+ Rm
+ .
closure,
.
\342\226\240
where
max-min composition.Due
to
+, is
Rm =
the
defined
R\302\260
R\"1\"1
reflexivity
(8.1.41)
of R, R +
is min-transitive.
Reflexive and
relations.
symmetrical fuzzy
relations
are
called
relations
Reflexive,
are
proximity
are
closures
transitive
proximities.
8.1.12)
(Example
by
relations
called
of
714
Chapter
8.1.4
and Manipulation of
8: Representation
Cardinality of a Fuzzy
Set
Let U be a finite
8.1.17.
Definition
U. Its fuzzy
Imprecision
cardinality,
A be
and
universe
by c(A), is definedby
denoted
c(A)=
a fuzzy set on
(8.1.42)
t/\\At\\
number
of elements in the t-levelset of A, At, as defined
In other words,c(A) canbe defined
as a fuzzy
set of natural
| A t\\ is the
where
in (8.1.28).
numbers,N, suchthat
of a fuzzy
The concept
questionofthe
some
8.1.5
states
mc{A)(n) = lub{* E
E N,
V n
type
set
(0,1]:|
At
(8.1.43)
n).
cardinality
\"How
many
climate?\"
with pleasant
The ExtensionPrinciple
fuzzy
extension
The
is one
principle
the
set theory.
relation
mathematical
over
sets
fuzzy
Extension
The
8.1.18.
Definition
Ulf..
.,\302\243/\342\200\236
respectively,
defined by (8.1.22).Let /
fuzzy image B of Al9...,An
be
from
function
/ has
through
their
Cartesian
Ux x
\342\200\242
\342\200\242
\342\200\242
x
the constraint y
= f(ul9.. ,,un)
mB(y) = 0 when/
and
~\\y) = {ul9...,un
Un to
be
product
Y. The
a membership function:
min mA(wt),
mB(y) = (uu...,un) lub
n
\302\243
t/i x... x Un i-l
under
Principle.
with
the
: y
(8.1.44)
VyEY
condition
additional
f{u\302\273..
.,aB)}
= 0
(8.1.45)
in the composition
of fuzzy sets
The extension principlecanbeapplied
in defining
the fuzzy
of functions, in the algebraof fuzzy
numbers,
a fuzzy domain, in multivalued logic,
maximum value of a function
over
and in otherimportant
8.1.6
of Fuzzy
Applications
Fuzzy
modeling.
areas.
set
theory
It
has
is being
Set Theory
gained
its importance
applied in the
fields
as a tool for
of
fuzzy
vagueness
systems,
fuzzy
Section 8.2
and
and languages,
grammars
other areas of
artificial
(ES)
be
will
8.2
of
artificial
intelligence
medical
control,
science.
computer
(AI) and
and
theory
game
retrieval,
intelligence
operations
economics,
system
and
in Section
discussed
in
of natural
models
in
algorithms;
fuzzy
and
language and approximatereasoning;
research, decision analysis,pattern recognition,
diagnosis, theory of learning, information
715
Theory
Possibility
Specific
expert systems
8.3.
POSSIBILITY THEORY
The
Consider a nonfuzzy
8.2.1.
p =
it is
and
(ii) it is
X is an integerin
the
not
for
possible
words,
any integer
a possibility
induces
E [0,5]the possibility
each integer u
p):
(or proposition
interval
[0,5].
that:
value of X.
In other
statement
The interpretation
with
possibility.
Example
(i)
to explain
is used
example
following
and
ness
to be
[0,5]
a value
distribution
Ylx
u could
that
to be
[0,5]
which
be a
of X,
associates
value of
X.
Hence,
u} =
[Poss {X \302\253=
<u <5
for u < 0 or u
for \"The
possibility that X
{X =
JPoss
where Poss {X
value
u] stands
the
\"fuzzify\"
\"small
may
assume
the
integer\"
X is a small integer
is a fuzzy
set defined in
the universe of
positive
as
SMALL
where
>5
p:
proposition
pF =
integers
for 0
of u.\"
Now,
where
u\\
INTEGER
.7/3 signifies
= 1/0 +
that the
1/1
+ .9/2
+ .7/3
+ .5/4 +
.2/5
the
716
Chapter
8: Representation
and
of imprecision
Manipulation
SMALL INTEGER\342\200\224or,
the compatibility
equivalently,
INTEGER\342\200\224is 0.7.
statement that 3 is a SMALL
the interpretation of the proposition
be
Consequently,
q can
fuzzy set
It is
the
possible for
of membershipof u
In otherwords,
each
with
pF
integer
taking a value
in
the
a SMALL
to be
integer
any
of X
possibility
fuzzy
of
= 3}
{X
INTEGER.
distribution
to the
Thus,
X equal
INTEGER.
SMALL
Poss
INTEGER with
the grade
could be a value
set
fuzzified:
equal to
u being
set SMALL
induces
a possibility
the possibility that u
of the
= .7
Poss {X = 4} = .5
Poss {X = 5} = .2
Poss
{X
More
stated
above
the
generally,
in the
= u)
= 0
of a fuzzy
interpretation
can
proposition
X is a variable
U characterized
If
subset
takes values in U and F is a fuzzy
then
the proposition
mF,
membership function
q =
of
XisF
inducesa possibilitydistributionII
is equal
which
to F,
that is,
In essence,
the
It is
(8.2.2)
that
Poss
which
that
by a
(8.2.1)
nx = F
implying
be
following postulate.
serves
{X
possibility
to define
u\\
for all u
mF(u)
of X
distribution
G U.
engenders a
since
II x
Fy
the
(8.2.3)
possibility
value
fuzzy
u in
distribution
in nature.
set
U.
subjective
depends on the definition of F and henceis purely
the possibility distribution function associated
Correspondingly,
X (or the possibility
with
distribution function of II x) is denotedby px
function
of F,
and is defined to be numericallyequalto the membership
Section
8.2
that
717
Theory
Possibility
is,
the
PxMy
Thus,
possibility
Px
- mP.
that
X =
(8.2.4)
u, is postulatedto be equal
to
mF(u).
(8.2.2) is
Equation
equation
it signifies
because
of
assignment
g =
XisF\342\200\224
for \"translates
where \342\200\224*
stands
More generally, the possibility
proposition of the form
nx
= F
(8.2.5)
into.\"
of
F is
be
a fuzzy
(i) a variable,
as
expressed
subset
universe
of a
(ii) a fuzzy
(iii)
set,
IW)
to a
corresponding
equation
assignment
\"ATisF\"
where
the
(8.2.6)
of discourse
a proposition,
or (iv) an
=F
(8.2.7)
or,more
simply,
nx
X is either N itself(when
implicit
in
N,
with
is a
variable)
values in
taking
8.2.2.
Example
= F.
or a variable that
\302\243/.
Note
is explicitor
also
that
\"nested\"
(8.2.7).
the proposition
q = Tom is old.
Here
{u:0 <
function
Tom,
<
100} with
- Age(Tom),
u signifying
and \"old\"
is
a fuzzy
set defined
on U =
a membership
m0LD. Hence,
the conceptof
a possibility
= OLD.
distribution
is closely
related
718
Chapter
and Manipulation of
8: Representation
to
rules
to fuzzy sets.
applicable
The notion of
concept
of
restriction.
the calculus
restrictions,
fuzzy
the
for
of possibility
manipulations
ofa
First, let us definethe concept
of
u is
where
by
Then F
U and
discourse
characterized
be a
Let X
8.2.2.
Definition
universe of
function
a membership
on
other
of a
a fuzzy
mF.
that may
value of u to
X) if F
with
associated
(or
value
the
in a
the
value
assigned
subset
of U which is
values
takes
X is
that
U. Let F be
an element of
assignment
which
variable
= u signify
let X
acts as an elasticconstraint
the
restriction.
fuzzy
is a fuzzy restriction on X
words,
manipulated by
distribution
a possibility
a fuzzy
can be
distributions
possibility
therefore,
sets;
fuzzy
the
Imprecision
be assignedto X. In
= u:mF(u)
(8.2.8)
where mF(u)
represented
thought of
the
constraint
represented
mF(u)]is the degreeto
by F is not
it
or
is
the
t
o
the
constraint
must
be
stretched
so
satisfied,
degree
that the assignment u to X is possible.
a fuzzy
It is important to note
set per se is not a
restriction.
To be a fuzzy restriction, it must be actingasa
on the values
of
X can assume values in [/depending
a variable. In other
a variable
on the
on the fuzzy set F.
which
which
of
that
fuzzy
constraint
words,
definition
8.2.1
Relationship
Possibility-Probability
of possibility
uncertainty
manipulating
the
Both
representing
is used
concepts
and
to illustrate
Example
Now let
the differencebetweenprobability
passengers
many
with
in
by
U =
{1,2,.. .,7}.
interpreting
We
Poss{X
can
associate
= u) as
can
ride
values
of
example
simple
and
possibility.
8.2.3.
us considerhow
means
owns
a 4-seat
car.
ride in the car. This
in a car\" where X takes
a possibility
the degreeof
ease
distribution
with
which
a probability
passengers can ride in a car.Letus also associate
= u] stands for the probability
that u people
distributionwith
X where Prob{X
= u) and Prob{X = u) are
will
in the car. The values of Poss{X
ride
assessedsubjectively
and
are shown in Table 8-2.
Section8.2
Table 8-2.
and
Possibility
Poss{X=
u)
Prob{X-
u]
Associated
Distributions
Probability
.8
.3
.4
.2
.1
719
Theory
Possibility
5
.4
0
with
X.
7
.1
0
nor does a
probability,
its
but
probability,
of probability
degree
the possibility
lessening
the converse
is not true.
However,
possibility.
low
Furthermore, if
impossible,
between
an
is old
Hence
<100}.
#(Age(Tom))
nA{x){u)
To associate
Let us
20
25
30
35
40
50
60
.2
.3
.5
.8
.9
into
that
assume
\"old.\"Then,the probabilities
Table
u
ProbA{x)(u)
with OLD.
Associated
Distribution
Possibility
concept
8-4.
old\"
defined on U = {u:
is subjectively
in Table
8-3.
values
have
maY
sample
given
10
is
OLD
set
UAiX)(u)
Table 8-3.
between
= OLD.
\342\200\224
Let us
is
principle.
possibility/probability
consistency
0<
event
relationship
Probability
the
Distribution
\"hard\"
(nonfuzzy
any age
as
values
Associated
necessary to
it is
A (X),
or nonelastic)
over or equal to 60 is
shown in Table 8-4.
with
OLD.
40
50
60
70
80
90
.2
.2
.2
.2
100
.2
720
Chapter
and
8: Representation
tables demonstrate
These
of
application
SET
FUZZY
OF
APPLICATION
intrinsic
is
that
and
possibility
imprecision
nature.
8.3
of imprecision
Manipulation
SYSTEMS
TO EXPERT
THEORY
Systems\342\200\224Introduction
The
is on,
blitz
media
intelligence
all
Artificial
sides.
of Knowledge-Based
form
the
in
(AI)\342\200\224especially
Expert
now
Systems\342\200\224is
complexprograms
the
through
statements,
of English-like
use
Expert
and expert
of explicit
suppression
syntax,
also
(sometimes
Systems
reality,
and other
called
control
notational devices.
Consultant
Knowledge-Based
of
data,
inferences,
Systems) are structuredrepresentations
experience,
draw
and rules that are implicit in the human
Expert
systems
expert.
conclusions from a store of task-specific
principally
through
knowledge,
logical or plausible inference, not by calculation.
The objectiveof an expert system is to help the user chooseamong
a
a specific
within
set of options, actions, conclusions,or decisions,
limited
on the basis of information
that
is likely to be qualitative rather
context,
than qpantitative.
The creationof
an
restofthe
The
system
everyday
into
usage
system
expert
putting specificdomain
support this task by explicitly
primarily
knowledge
what
of an
into
separating
is commonly
expert system
revolves around
the task of
systems
from the
the system.
Expert
the domain knowledge
called the
knowledgebase.
requires accessby
the
end
user
a software
system called
by
knowledge base. Thisis accomplished
the inference engine. It interactswith the user through a user-interface
in Figure
8-5.
subsystem as shown
an autonomous
Each production rule in an expert system
implements
of
modified
and
chunk of expertise that can be developed
independently
the
other rules. When thrown together and fed to the inferenceengine,
to the
Section
Application of Fuzzy
8.3
set of
the
behaves
rules
sum
of its
reliable.
by
For
this
system
reason, the
system is
of the
much
expertise,
expert
typical
an expert
effects that
yielding
synergistically,
to Expert
Theory
Systems
721
are \"greater
than
parts.\"
Reflecting human
baseof a
Set
is imprecise,
usually qualified
a \"certainty
with
rendered
factor\" (CF),
Domain
Expert
\\
1r
Knowledge
Engineer
J)
i
Domain
Inference
Knowledge
Engine
Base
h*
X
User
Figure
8-5.
Diagram
of Expert
System.
722
Chapter8: Representation
and
Manipulation
of Imprecision
(Stanford
essentially
probability-based
reliability.
By
inferential
and randomness
a single
providing
incompleteness,
of information
the
fuzziness,
the
base,
knowledge
of certainty
computation
in
Oncethe
fuzzy
logic
quantifiers
fuzzy
can
be
employed
are
made
in order
by
explicit,
to
arrive
the
fuzzy
quantifier
various syllogisms in
at
conclusion.
For
and
students
are undergraduates\"
example, from the statements,\"Most
deduce
that \"most2
one
could
\"Most undergraduates are young,\"
of the
students
are
In this case, \"most2\"
the
product
represents
young.\"
fuzzy quantifier \"most\"with itself. As should be expected, the quantifier
in
\"most\"
in the
\"most2\"
is less specific than the quantifier
conclusion
Section
8.3
of Fuzzy
Application
Set Theory to
723
Systems
Expert
m
1
Mosr
(5
\302\243
(L)
Most
\342\226\240^Prr\302\273r\\r\302\273rtir\302\273n
be represented
such as \"most\" may
as a fuzzy
that defines the degree
to which any given
proportion
the definition of \"most.\"
matches
The fuzzy quantifier \"most\" acts by
the degree to which
a proportion
fits into \"most\" and then finding
finding
the degree
to which
that
fits into \"most.\" Thus,
the
value of
degree
\"most\" for a given
will be equal to the value of \"most\"
for the
proportion
quantifier
fuzzy
number\342\200\224a
set
fuzzy
root of that
square
proportion.
Figure
8-6.
The
fuzzy
\"most.\"
quantifier
In the
existing
of these
shortcoming
grips with
expert
of predicate
combination
the
pervasive
systems,
is dealt
uncertainty
methods is that
fuzziness
they
with
methods.
are
not
of information
capable
in the
of
speed
through
A serious
of coming
to
knowledgebase,
724
Chapter
8: Representation
and
of Imprecision
Manipulation
ad hoc in nature.
and, as a result, are mostly
the management of uncertainty is basedon the
the logic
management
of
framework
subsumes
logic which is
in
uncertainty
for dealing
both
conceptual
with
logic and
different
fuzzy reasoning.
to the
theory
of uncertainty
types
logic, which is
it provides a systematic
In this way fuzzy
probability
to
approach
of fuzzy
importance
particular
predicate
possible to deal
of
use
equivalently,
or,
approximate
underlying
of fuzzy
feature
alternative
An
and
within
logic
makes
a
it
single
framework.
\"Jim has
factor
of
0.8.
certainty
\"has duodenal ulcer\" is a fuzzy
so
that
Jim
have
it
Since
to
predicate,
may
of the
factor
a degree,the meaning
becomes
More
certainty
ambiguous.
CF = 0.8 mean (a) that Jim has duodenalulcerto the
does
specifically,
event
\"Jim
has
0.8; or (b) that the probability of the fuzzy
degree
duodenal ulcer\" is 0.8?Note that in orderto makethe latter
it is necessary
to be able to define the probability
of a
interpretation
meaningful,
in
in
event.
This
can
done
be
but
not
classical
fuzzy
fuzzy
logic,
probability theory.
of certainty
in nonfuzzy ES is carriedout
The computation
factors
two or more rules are combinedthrough conjunction,
when
disjunction,
In the case of chaining,in particular,the standard
or chaining.
inference
of its validity and must be replaced
rule\342\200\224modus
ponens\342\200\224loses much
by
more
rule of inference. Furthermore,the
the
compositional
general
of implication,
which forms the basis for both
forward
and
transitivity
is a brittle
which
backward chaining in most expert systems,
property
must be applied with great caution.
for
However,
fuzzy logic provides a natural conceptual framework
and
from
inference
bases
which
are
representation
knowledge
knowledge
or not totally reliable. Generally,
use of fuzzy
the
incomplete,
imprecise,
the
of
a nonlinear
reduces
inferenceto
that
of
problem
solving
logic
to
and
leads
conclusions
w
hose
is
a
cumulation
of
uncertainty
program
the uncertaintiesin the premises
from
which
the conclusions
are derived.
as well
as the certainty factor, are
As a consequence,the conclusions,
which
sets
are characterized
fuzzy
by their possibilitydistributions.
8.3.2
Fuzzy
Relational
Knowledge
point,
CF
consider
of 0.8
the
fact
is a
Base
or vague
Much of human reasoningdealswith imprecise,
incomplete,
information. Therefore, there is a need for information
that
systems
in order
allow representation and manipulationof imprecise
information
to model human reasoning.
The Fuzzy Relational
Base (FRKB) model, based on the
Knowledge
researchin the fields of relational data bases and theoriesof fuzzy sets
Section
Application of
8.3
and possibility,
is
of
and
individualization
for
725
the
addresses
following:
of impreciseinformation.
1. Representation
Derivation
Systems
processing.
2.
to Expert
Theory
the need
to satisfy
designed
information
imprecise
Set
Fuzzy
3. Linguisticapproximations
of
4. Development of
of acceptance.
measures
possibility/certainty
terms
fuzzy
relational
fuzzy
in the
operators
query language.
(IS,AS...
AS,
GREATER,...).
5. Processingof queries
6. Null value handling
with
using
fuzzy
value.
fuzzy term
of the
Modification
7.
individual
user.
base, in the
a knowledge
Such
relational
fuzzy
manipulated by
The
1.
organization
Value
3.
of
form
base is
a collectionof
be characterizedby
base
knowledge
or a modified version
system (SES).
FRKB
an
\"soft\" expert
(retrieval)
algorithms
of the FRKB
can be
recognition
2. Explanatory
the
knowledge
which may
relations
of
tables
fuzzy,
or functions
time-varying
and
rules.
divided into three parts:
or translation
(VKB),
Translation
The VKB
profile
knowledge
Data Types
of a
user.
The domains
in
the
FRKB
can
be of
the
following
types:
Discrete
2. Discrete
1.
3.
interval
unit
The attribute
1.
Single
scalars
[0,1].
values are:
or numbers.
blue).
by
the
maximum
726
Chapter 8: Representation
2.
3.
4.
and
possibilistic
real
or numbers.
of scalar or numeric domainvalues.
the unit interval [0,1] (membershipor
of scalars
(list)
sequence
of Imprecision
Manipulation
distribution
from
number
function
distribution
possibility
value).
5. Null value.
is an
be a
imprecise
possibilistic
bynA.
operators on
(i)
In
used in translationof
fuzzy
they
essence,
the
EKB are
in the
defined
Relations
propositions.
regular
Let Dt
relation:
Similarity
Then
s(xyy)
\302\243=[0,1] is
be a scalar domain,xty
relation
a similarity
with
Dx.
the
following
properties:
s(x,x) =
Reflexivity:
^-transitivity:
transitivity.
= s(yyx)
s(x,y)
Symmetry:
If jc, y,
specified
as max-min
z G
Relation:
>: max
p(x,y)
{p(x,y)
p(yfz)l
y&Di
The
p(x,y)
This form
points.
A
general
link may
fuzzy
equal
assigns
nonreflexive:g(:c,Jt)
degrees
(link) can
relation
have any of
the proximityrelationis
e^*'y\\ where 0 > 0.
form of
used
generally
the
following
of proximity
be definedin eitherVKB
properties:
=0
e-reflexive:g(x,x) = ey
reflexive: g(x,x) = 1
>
to equally distant
or
EKB.
Section
of
Application
8.3
be used
can
link
and
reflexive
friendship
More
Set
Theory
to Expert
727
Systems
symmetrical,
improvement.
transitivity
link are
Fuzzy
complex
by
or
a
applying
of:
rules
1. Fuzzy modifiers.
2.
relational
Fuzzy
operators.
3. Composition.
4. Qualified propositions.
The
Relational
Base
Knowledge
combined
structure
with
the
theory
of
of such
the implementation
8.3.3
an
for
In this
Appelbaum
as
defined
of either
definition
function
purpose
used in an
ARIES
has facilities
for
the
proposition/operation-specifictruth
been implemented primarily as a general
default or
ARIES
formulas.
Further,
etc.).
preference,
desirability,
a general
inference
representation
propositions,
systems.
SES
approximatereasoning
by
expert
of an ApproximateReasoningInference
An Example
Engine
\"soft\"
has
purposeapproximate
of being easily
capable
subsystem
or
other information
of
variety
expert systems
on automated deductive reasoning to a substantial
inference
wide
incorporated
into
systems
that
rely
degree.
Degreesof
which
in ARIES
may
728
Chapter
and Manipulation of
8: Representation
Imprecision
understood
rule domains.
representations
of
hypothetical
representing
describes
that
hypergraph
a propositional
as an approximatereasoninginferenceengine
of ARIES
operation
is better
those
with
when described in
terms
of
hypergraph
that
standard
with
the
antecedents
consequent
corresponding
of the logical connectives joining propositionsin the
at the end of the
is also indicated by means of symbolsdrawn
An arc drawn across
vertex.
edges incidenton the consequent
in rule
appear
proposition. The
antecedent
directed
nature
severaledges
the logical
such
the
an arc
logical
the
that
indicates
connective
also
at
the
of
in the
arrive
approximate
associated
estimates
real
with
values
world) to
reasoning,
vertices
are joined by
absence
of
assigned
leading
(not shown in
edges to indicate,
by users (on the basis of
values
and
the propositionsand
can
rule domain. These values
of the a posteriori truth value
In the hypergraph,eachpath
about
combinationof knowledge
rules
rule, while
OR.
used for
respectively,the a prioritruth
relations
of the
antecedent
In hypergraphs
observations
propositions
corresponding
in the
AND
connective
of
inferential
by ARIES
goal proposition.
be combined
to
to the
the truth
a certain
amount of support to the truth of the goal
all such
discussed below,to its logicalnegation.
Among
certain
optimal
possible paths, ARIES usually seekstwo paths
having
properties which are further discussedbelow.
The
examined
paths
by ARIES in this optimization processare not
classical
as conventionally
defined in graph theory. Rather,they
paths
are
as several edges (rather than one) incidentat the same
hyperpaths,
that
proposition
provides
or, as
Section
8.3
of Fuzzy
Application
Figure
Set Theory to
Expert
Systems
729
graph.
to
may
be part
the
desired
the
optimizationprocessrepresent
bodies of evidence for the truth
correct statements
about
the
of support
provided by certain
degree
in the rule domain as
of propositions
of a real world system. A priori
state
730
Chapter
8: Representation
and
of Imprecision
Manipulation
support
indication
of the
extent
the
of
proposition.
The actual
of certain
characteristics
considered.
use
is an exampleof
Fuzzy logic
\"soft\"
an
excellent
of evidential truth
as ARIES falls
system
this
of
manipulation
type
expert
list of
for
for the
formalism
(((PROPOSITION)(TRUTH-VAL))SUPPORT-PLAUSIBILITY).
in the base rule domain (i.e., a
is any statement
The PROPOSITION
propositionalstatementor a clause in the antecedent or consequentof a
term is either an interval
which
The TRUTH-VAL
rule).
[b,B]
represents the
a priori evidential
lower and upper bounds for the truth values
of the proposition or a call to a function, with
that
optional
arguments,
generates those bounds. For example:
((Jimis
((Jimis
on the other
than
older
much
30) (0.6,0.8))
to the
[0.6,0.8]
degree of
membership
than
older
much
the
computes
hand,
30) (age-factor
as a function
which has the
interval
the degree
plausibility
of
body
and
support
estimate
bound
lower
(support)
confirm
domain
measures
the
extent
(((Jim is
term,
and
upper
bounds
provided
ARIES
of an
of
Jim's
same
age.
The
format
as
(if available).
interval indicating
of the
by consideration
This
evidence.
thea posteriori
the
set
to the
Jim
Jim-age))
SUPPORT-PLAUSIBILITY
is bound to
TRUTH-VAL,
These results are the lower
of
of
interval,
of
possible
if any
truth
(0.5,0.9))
Section
Application of
8.3
possible
Set
Theory
to Expert
731
Systems
in the
base domain (facts and rules) indicates
for the proposition \" Jim is much older than 30\"
value of 0.5 to a highest (nearcertainty)
value
of
values
truth
Fuzzy
a lowest
0.9.
The INFERENCE-FUNCTION
requires
in the antecedent of
the clauses
representing
value
(produced
by the conjunctive formula
and the
interval
truth
of
are
AND-VERTICES.
of predecessor
sets
two
returning
conjunction
of input functions
final set
The
is an interval
hypergraphpaths) lower bound
ARIES output
the
The
(plausibility).
for
and where
hypothesis,
goal
(6,B),
also produces
program
b equals
where
the greatest (among
the possible truth value (support) of
B equalsthe leastupper
bound
the solution (i.e.,optimizing)
for
graphs
the
(WHY)
explanation
graphs can be retrievedusing
of
ARIES.
such
as
ARIES
also
capability
Systems
provide
graphics
capabilities that allow displayof portionsofthe hypergraph
representing
- the
rule domain,
or of specific nodes and their predecessors/successors
of a PROPOSITION
On
identifier along one of the optimal
input
paths,
are
also
as a
of
PROPOSITION
rules
capable displaying
they
having
t
heir
and
their
truth
conclusion,
antecedents,
values.,
While many applications of fuzzy set theory are still in an earlystageof
it seems
will
development,
probable that in the next decadefuzzy
logic
B. These
b and
become
routinely
communication
involved.
This
flexible
thinking
with
may
or
people
help
to bridge
of humans
of
artificial
intelligence
where
thought processesis
and
the gap between the analogic
imitation
of their
of
present
computers.
Exercises
for
Chapter
1. \"Theunion of fuzzy
2.
that
Prove
equivalent
sets
and
definition
the
to the
B is
following
of intersection
definition:
\"The
of
two
fuzzy
sets
is
of fuzzy
intersection
both
A and
732
Chapter 8: Representation
and
B\" which
contained
is also equivalent to
intersectionof
A and
any fuzzy
(a)
(b)
A H
and
J3.\"
both
in
3. For
of Imprecision
Manipulation
is
it
is
fuzzy set
any
also
contained
which is
in the
that
A prove
set
\"If
then
By
= A
cj>
0 =0
(c)AU(/=(/
(7 =
A =
(d)
(e)
A U
(f) AH
0.
that the
4. Show
(a) 0-A
- B
(b)
=0
=
(c) A - (A - B) - A n B
(d) C n D = A - [(A - C) U (A
(e) C U D = A - [(A - C] n (A
5. The
symmetrical differenceof
membership function
Uaab =
to
changed
do the
6. Let
IuA
B be
7. Definition:
following are
functions.
the
set
+ (1
^[Axj
The
be
Prove that
and B with
of
operation
^ min
A)x2]
a)
A B
(xx),
[wA
defined
= (A
U B) A
\342\200\224
- a
- a)]
TheNormal
Distribution
(2^eXP
above,
(J3
Pi A).
aA(x2)J.
continuous
well-known
u(x
~(x-u)\\
2a2
by
sets?
fuzzy
some of the
complement operationsare
and
density
Wx)
set whose
is a fuzzy
to those
related
is
A J3,
fuzzy sets.
fuzzy
sets A
fuzzy
difference
symmetrical
Let UR
real number.A
D)]
D)].
above relations
and
uAAB
uB\\. If
the
two
uB, denoted by
uA and
membershipfunctions
sets.
for ordinary
hold
relations
following
co
)\342\226\240
< X < oo
probability
is a
Section
8.3
of
Application
Set
Fuzzy
Theory
to Expert
Systems
733
The GammaDistribution
-jlTT^exp(-^),0<,
fyto
0 elsewhere
0.
0 >
and
Distribution
{(a +
ff + 1)!
\342\200\224
a!
a and /? must
The
\342\200\236
- *)*,
0<x
both be greaterthan
-1.
Density Function
Cauchy
fcto
Show that any
7T
1 +
fuzzy
set
C(2(X
\342\200\224
oo <
X <
by one
of these functions
\\uA
uB\\
\\max(uA,UB)
oo
Uf
described
convex.
6.
<1
elsewhere
[0
where
xa(l
~ min(wA,wB)
|.
is
Bibliography
1.
Aho,
V., J.
A.
Beckenbach,
John
and J. D. Ullman,
and
Design
Analysis
Algorithms, Reading,Mass.,Addison-Wesley,
E., Applied Combinatorial Mathematics, New
and Sons, 1964.
of Computer
2.
E. Hopcroft,
Wiley
1974.
York,
L. Lesniak-Foster,
3. Behzad,M.,G.Chartrand,
and
Graphs and
Boston:
and
1979.
Prindle,Weber
Schmidt,
Digraphs,
4. Bondy, J. A. and U.S.R. Murty,
Graph
Theory with Applications,
New York:North-Holland,
1976.
5. Berman,
K. D. Fryer, Introduction to Combinatorics,New
G. and
York:
Academic
1972.
Press,
7. Buck,
8. Capobianco,
M.,
J.
and
in Graph
Counterexample
9.
North-
York:
1977.
Holland,
Theory,
G.,
Chartrand,
and
Weber
Graphs
D. I. A.,
York:John Wiley
C. Mollezzo,
Examples and
New York, North-Holland, 1978.
as Mathematical
Models, Boston,
Basic
Sons,
1978.
New
York,
1969.
13. Even,
York,
1964.
Appleton-Century-Crofts,
Gordon and
Theory, New
of Combinatorial
Techniques
and
11. Dinkines,
12. Eisen,
Prindle,
1977.
Schmidt,
10. Cohen,
Definitions,
York,
Macmillan,
1973.
Englewood
Applied Algebrafor the ComputerSciences.
New
Jersey,
Prentice-Hall,
1976,
16.
Henkin,
L.,
On Mathematical
Induction,
Set
Theory,
American Math.
67,323-337,1960.
Monthly,
17.
to Automata
Introduction
and J. D. Ullman,
Theory, Languages, and Computation,ReadingsMass.,Addison-
Hopcroft,
Wesley,
J. E.
1979.
735
E. and S. Sahni,
18. Horowitz,
Fundamentals
Data
of
Structures,
19.
20. Honsberger,
R.,
Mathematical
John
21. Kenelly,
Allyn
and Bacon,
Structures,
New York,
Boston,
Logic,
Informal
W.,
American
The
Gems,
1973.
of America,
Association
Mathematical
1967.
22.
23.
R.
Press,
1974.
D. E.,
The Art
Knuth,
Fundamental
24.
Discrete
Korfhage,
Academic
R.,
of
Computational
ed. 1973).
F. Lessman,
1961.
and
H.
Levy,
Macmillan,
C. L., Elements of
25. Liu,
Discrete
1968.
McGraw-Hill,
York,
Random House,
1963.
S. and
E.
Page,
Combinatorics,
30. Prather,
R.,
L. B. Wilson, An Introduction
New York, CambridgeUniversity
Houghton
F. P,
Reading,
Structures,
32. Polya,
to Computational
1979.
Press,
Science,Boston,
Preparata,
Cliffs,
Englewood
O.,
G., How
1976.
Mifflin,
and P. T. Yeh,
Addison-Wesley,
Solve
It, Garden
Mass.,
to
to Discrete
Introduction
1973.
City, N.Y.,
Doubleday and
1957.
Company,
33.
York:
New
Mathematics,
26. Liu,
31.
York,
1977.
McGraw-Hill,
29.
1968 (2nd
Addison-Wesley,
Mass.,
Reading,
Algorithms,
Vol. I:
Programming,
Computer
and
1954.
34. Polya,
Sons,
G.,
35. Reingold,
Algorithms,
Mathematical
New York,
Discovery,
John
Wiley
and
1962.
E., J. Nievergelt,and
Englewood
Cliffs,
N.
New Jersey,
Deo,
Combinatorial
1977.
Prentice-Hall,
York,
John
Wiley
and
Sons, 1968.
Discrete
New
Jersey,
Mathematics
Prentice-Hall,
in
737
Bibliography
38.
T. A.,
Standish,
Mass.,
1980.
Addison-Wesly,
P.
J. T. and R.
39. Tremblay,
Mathematical
Discrete
Manohar,
to Computer Science,New
with Applications
Structures
York,
1975.
McGraw-Hill,
Applied Combinatorics,New
John
York,
and
Wiley
Sons, 1980.
Hafner
A.,
D. R. and
Four-Color
Problem,
L. W.
10, 85-86,1967.
and Chance,
Choice
York,
1965.
Press,
44. Woodall,
by
Journal
Comput.
problems,
43. Whitworth,
J.
R.
Wilson,
in Selected
Beinke and
R. J.
Wilson,
New
York,
Academic
Press,
1978.
46.
Induction,
E. H. Ruspini,
and
Reasoning Inference
L.
Appelbaum,
Englewood
ARIES\342\200\224An
Cliffs,
Example
New
of
an
Engine, in Approximate
edited by M. M. Gupta, A. Kandel,
in Expert
Reasoning
Systems,
and J. B. Kiszka,North Holland,1985.
W. Bandler,
L. R. Jr. and D. R. Fulkerson,
Flows
47.
in Networks,
Princeton,
Ford,
N.J., Princeton University Press, 1962.
to Difference
Introduction
48. Goldberg,
S.,
Equations, New York,
Approximate
John
Wiley
49. Zadeh,
1965.
50.
Zadeh,
and
1958.
Sons,
A.,
Uncertainty
The Role
in Expert
199-227,1983.
51.
M.
Zemankova-Leech,
Bases\342\200\224A
1984.
Key
to Expert
and
Index
table, 38-39
truth
Abbreviated
laws,
Absorption
language,
programming
428
Addend
251
614-615
49
Addition rule of inference,
Adjacency matrix, 396-402, 450
536-537
matrix,
multiplicity
539
76
Adjacent
primes,
Adjacent
vertices,
415-418
297,419,423
of, 407
complexity
64
division,
greedy, 486-487
for vertex
406
greedy,
inefficient,
518
sort,
interchange
path,
676
coloring, 567
418-423
minimal
282-284, 425-426
spanning
tree, 494
correctness
polynomial-bounded, 406
postorder
traversal
518
preorder
traversal
515,518
Prim's,494
run
times
Shell sort,
of, 347
419
(LRN),
(NLR),
514,
620
series,
in an
systems;
\"Soft\"
539-
sequences,
on a set,
operation
relations
16
matrix, 396-402
339,
340
inner product,
397-398
381-382
inverse,
339, 340
reflexivity,
339,
340
symmetry,
339,
340
set, 10
Binary
irreflexivity,
110,115
expert systems
596
Bruijn
fuzzy, 713
Permutations
seealso
of sorting
composition,
731
de
541
Binary
balanced
Boolean
Boolean
functions,
of; Switching
Arithmetic
404-
347
Boolean matrix,
619-621
micro-operations
37
efficiency,
antisymmetry,
Arithmetic
search
Biconditional
proposition,
344-346
Big O notation,
of,
multiplexers, 621-626
Artificial
733
adjacency
of,
675
BFS,seeBreadth-first
Binary
615-621
ALU, 619-621
515,
labeling,
representation,
mechanisms
of, 404
Backward
Binary
technique, 627
table
expert
Basis of induction,
103, 111
coded decimal
BCD, see Binary
29-30
Begging the question,
Beta probability density function,
engine
half-adder, 614-615
seealso
edge, 666
algorithms,
621
operations,
Backward
performance
in
performance of height
binary trees, 511
377-378
. full-adder,
chaining
724
407
19-20
carry look-ahead
26-27
and algorithm
minimization
nondeterministic, 419
partial
K., 569
micro-operations,
674-675
merge sort,
35
implication,
see Approximate
logic
Kruskal's, 486-489
labeling,
for
inference
reasoning
inorder
1973
Antisymmetry
ARIES,
systems,
729-731
k, 503-504
of order
Backward
Kempe-chain, 569-571
of, 404-407
efficiency
B-tree
Backtracking,
705
\"soft,\"
graph, 728-731
diagonal,
hashing,\" 357-358
\"double
and
\"hard\"
Argument
basic elements of,
485
DFS, 482,
614
24-26
419
deterministic,
relation,
binary
Augend bit,
Ancestor
of a vertex, 482
AND
Boolean
operator, 398-400
Appel,
fuzzy
@-transitive
713
reasoning,
*
.\"Analysis-synthesis\"
Antecedent of an
bubble sort,
28
BFS,482-485
search,
of,
unit
fallacy of, 28
Amphiboly,
AND-VERTEX,
mechanisms
binary
logic
fallacy
Ambiguity,
AND/OR
asymptotic
see Arithmetic
ALU,
AND,
Algebra
Algorithms
series, 250-
of
performance
405
algorithms,
439
339,340
Asymptotic
514
tree,
geometric
Alternating
full-adder, 614,615-621,
Asymmetry
539
407-412,
sets, 5
relation,
of
property
of a binary
Associative
Welsh-Powell, 565-566
^-balancedbinary
Assignment
set, 16
518
514-515,
Alphabet, 373
Adder
half-adder,
404
of,
sort, 428-432
Warshall's,
378,
614
bit,
termination
topological
The
419
function, 326
Ackerman's
Aspects
successive minima,
tree traversal,
38
Absurdity,
Ada
of discovery,
21-22
686
Problem,
on a
Associative binary
operation
(Contd.)
Algorithms
transitive (reflexive)closure,
339-340
transitivity,
383
search
algorithm, 415-4] 8
739
740
Index
binary
search
Binary
trees
514
a-balanced,
tree, 512-514
search
binary
Boolean algebras
tree, 512-514
complete, 509-510
for drawing,
conventions
508
left
child,
level-order index
parent, 507
518
traversal
preorder
515,
(LRN),
traversal
postorder
514,
(NLR),
515,518
right
traversal
child,
518
Binomial, 201
197-198
189-190
as combinations,
196
summation,
diagonal
as factorials, 191
Newton's
identity, 192-194
Pascal'striangle,
row
193-194
summation, 197
row square
196
summation,
property,
symmetry
identity,
theorem, 201-205
Binomial
seealsoTheMultinomial
modular law,
stroke
588-589
subalgebra,
584
graph,
see alsoDirected
457, 547-548
bipartite
graphs
593
form, 591,605
circuits,
612
forms,
sum-of-products
forms, 605
Veitch
606
601-602
398-400
search (BFS),482-
485
423
Buck, R. C,
canonical
Canonical
form, 591-
normal
592
function,
593
defined, 578
592
expressions
finite, 588
569-
Problem,
571
for vertex
greedy algorithm
567
coloring,
argument, 569-
Kempe-chain
571
for
569-571
graphs,
planar
560
Welsh-Powell
565-
algorithm,
566
Circuits
537-539
Eulerian,
full-adder, 614,615-621
in
388, 442
graphs,
half-adder, 614-615
Circular
representative
equivalence class,
cycle,
543-551
388, 442
function
Capacity
584
normal
form, 591-
Capacity
of a
for sets, 7
of an
of a directed
of a
for, 588-593
Carry
bit,
614
equivalence,
Closedpath,
Closure
Problem,
361
Code
647-648
fuzzy set, 714
350-351, 354-358
442
property, 383-384
The Coconut
633-634,
edge,
481
150-151
12
congruence,
638
cut, 647-648
Cardinality
permutations,
Class
Cantor'sparadox
rank of a graph,
of
356
graph,633
laws,
The Four-Color
Circuit
589-591
Capacity constraint,
DeMorgan's
558
Theorem, 569-571
for Boolean
form
Canonical
expressions,
589-591
dagger
Problem,
mechanisms
laws, 582-583
form of expressions,
conjunctive
Number
578
axioms,
Theorem,
360
simple,
Boolean algebras
atom, 588
The ChineseRemainder
Hamiltonian
110
of,
482
Child of a vertex,
5-Color
611
Bubble
method
roots,
defined,
Boolean functions,
minimization
of
Karnaugh maps, 607-609,610-
Bridge
Characteristic
Chromatic numbers
135
2-valued,
conditions
Boundary
recurrence relation,
301-302
roots,
406
for, 580-585
operators,
function of a set, 2
The Chromatic
Boolean functions
diagrams,
373-375
in IHR solutions,
310-319
multiple roots, 302-304
see
Switching mechanisms
Boolean
strings,
300-304
mechanisms,
product-of-sums
systems, 724
in expert
distinct
function,
\"smallest,\"
theorems
Character
defined,301
form, 591,612
produet-of-sums
sheffer
Chaining
Characteristic
587
Breadth-first
theorem
Bipartite
expressions,
590-592
205
The
Chain, 363
minterm
maxterm,
722, 724
factor,
Certainty
literal, 590
2-valued, 134-136
191-192
identity,
as, 578
lattice
formula, 497
Cayley's
isomorphism, 585
self-dual
204
additional,
identities,
function, 733
583
law,
switching
summation,
Pascal's
707
sets,
8,10,128
of strings, 373
Catenation
Cauchy probability density
585
homomorphism,
conditions, 194-195
boundary
column
functionally complete
of sets,
sum-of-products
coefficients
Binomial
product
of fuzzy
operations,592-593
defined,507
height balanced, 510-512
%
traversal (LNR), 515,
inorder
518
Cartesian
(Contd.)
free, 590
627
generation using
541
Gray, 604
Prufer,
495-497
shift
registers,
741
Index
Coefficients
of generating
247-251
functions,
in power series,239
of a graph, see Chromatic
Coloring
numbers
defined,143
177-181,
ordered partitions,
182-184
Constructive
repetition,
169
unordered
88
164-
172-177
repetitions, 151-154
110
110,249,
Common ratio,
Commutative
a set,
16
Commutative
of sets,
property
Complement
absolute,
of a
set, 4
set,
705
of a fuzzy
of a relation,
of a subgraph,
bipartite
Countable
Completegraph,
Components of a graph,
Composite integer, 120
472
of set relations,
Compound
382-383
complexity theory,
Concentration
Conclusion,
of a fuzzy
set, 706
modulo
Congruence modulo
relation, 12
Conjecture, 23-24
Conjunction
in Boolean
in
expert
of propositions,
Conjunction
rule
724
34
of inference,
49
of, 693
matching
654-655
Cycles
connected
bipartite
633
function,
component,
391-392
cut-set, 654-655
388
cycle, 388
442
defined,
332,
directed
path,
437
457
593
seeMultiplexers
Data selector,
diagrams, 540
sequences,
Directed
circuit, 388
Hamiltonian, 543-551
de Bruijn
340
graphs
Boolean matrices, 396-402
capacity
de Bruijn
see
bipartite,
net, 649
function,
339,
minimal, 645-652
Dagger
500-501
graphs
antisymmetric,
S-D,647-651
Cut-set,654-655
nondirected,
693
688-689
687,
for,
of, 647-648
across,
695
Theorem,
Konig's
701
edge cut-set,
for, 687,
689-691
Directed
Cycle graph,
algebras, 591-592
systems,
534
472
directed,
m, 354
n equivalence
bipartite graphs
completematching
Cut
edge,
551
61, 63-64
585-586
Directed
Directed forest,
flow
35, 47
proof,
capacity
407
A., 561
691
of a graph,
number
14-15
Direct
and
49
of a graph, 523
Cube,edgegraph of, 458
713
of a
deficiency
529
Crossovers
274
Computational
Crossoverpoint,
interest as a recurrence
relation,
128-132
graph,
planar
graphs
Covering of edges,695
Crossing
systems, 724
of relations,
126-132
counting,
379
of relations,
see Directed
Digraphs,
Dilation
Dirac'sTheorem,
134
Critical
equations, see
Dirac, G.
of
ordering of strings,
373-375
Dilemma, constructive
132-133
counting,
377-
362
\"Dictionary\"
destructive,
counting,
indirect
457,
531
452-453,
relations,
sets, 367
509-510
proofs,
378
Diagonal edge, 548
Diameter
of a graph, 465
Difference
algorithm, 404
principles
in
Recurrencerelations
406
Counterexample, 87
search
argument
Diagonal
Difference
set, 732
applications, 134-136
467
Complete ^-partite graph,
Complete matching, 687, 689-691
of algorithms,
407
Complexity
of fuzzy
sets,
of fuzzy
of an
226-228, 274
of a vertex, 482
49
dilemma,
Descendant
Diaphantus,
seeFunctions
Correspondence,
Counting,
graph,
531-532
in expert
Cook, Stephen,
Correctness
455-456
Complete
Composition
fuzzy
disjunctive
binary tree,
638
707-708
379
Complete
equation,
Convex
on
operation
binary
Problem, 686,691
difference,
Depth-first
settheory,
combination
of a proposition, 34
search
(DFS), 482, 485
Denial
.Convex
Laws, 6, 40-41,49,50,
584
Destructive
38
Conversation
see
61,86,
Derangements,
87-
edge, 494
mechanisms
Switching
Common
38
Conventional
of; Permutations
The Committee
Contingency,
Contrapositive,
see alsoInclusion-exclusion
principle
of sets, 3-4
Contradiction,
repetitions,
Combinatorial circuits,
Containment
Contracted
181-184
partitions,
with constrained
49
dilemma,
144, 146
numbers,
repetition
333, 439
Degree of a vertex,
439
Degree sequence of a graph,
\"Degree spectrum\" of a directed
DeMorgan's
35
Consequent
Consistent postulates, 579
Constant
term in power series, 239
bipartite
693
graph,
graph,334
34-38
logical,
of an implication,
Connectives,
coefficients
without
472
391-392,
binomial coefficients,see
with
Combinations
Binomial
Deficiency of a directed
form for
591-592
normal
Conjunctive
Boolean expressions,
539-541
'
388
edges,seeEdges
endpoints, 388
invariant,
irreflexive,
of graphs
334
339, 340
742
Index
Directed
Double negation,
(Contd.)
graphs
isomorphic, 334-335
of a plane
636
632-633,
labeling,
loop-free, 333
nontrivial path,
Elements
438
339, 340,
transitive, 339-340
connected
unilaterally
adjacent
to, 333
between
vertices,
391-392
vertices, see Vertices
viewed as nondirected
of graphs
graphs,
392
Directed
388
cut
Directedtrees,468-470,
498-504
full,
ordered, 517
506
aspects
Disjunction
algebras, 591-592
in Boolean
in expert
systems, 724
of propositions, 34
126-132
Disjunctive
counting,
incident
591-592
joining
Distinct
of,
representatives,
686
657,
Distinctive-shape
system
logic symbols,
possibility, 715-720
for sets, 5
laws
Distributive
relations,
Divide-and-conquer
321-322
Divisibility
285,
359-360
247-251
458
from, on, to
437
vertices,
of,
333, 439
matching,
535-536
multiplicities,
nondirected
388
path,
game, 543
reverse, 666
in binary
639
saturated,
right,
tree, 507
Domain
of relation on a set,
in the FRKB,
725
10-11
tree, 483
unsaturated,
357-
11
of expressions,
functions,
switching mechanisms,
596
of, 28
fallacy
(Sieveof), 224-225
ES,seeExpert
systems
20
15
plane,
Euclidean prime,
Euclid's
118
20
Elements,
Leonhard,
Euler,
path,
537\342\200\224539
Euler's
Euler's
formula,
530-532
225-226
0-function,
function, 602,
EXCLUSIVE-OR
603
Existence
proofs,
87-88
Existential generalization, 99
quantifier,
91
Existential
83-87, 8998
specification,
Experimentation
stage of
21
development,
Expert
723-724
721
diagram,
see also
\"Soft\"
systems
expert
(EKB),
639
Edmonds, 671
85-86
38
Equivalent
Existential
647-651
self-loop, 437
simple path, 388
458
354-358
integers,
Euclidean
333, 437
multiple,
class, 350-351
on
S-D cut,
Dodecahedron
graph
Hamilton's
loop,
350
equivalence
Euclid,
octahedron,458
tests,
in
666
maximal
601-602
Distribution,
see Flows
722
354-358
integers,
Eratosthenes
Networks
icosahedron,
Disjunctive syllogism,49
Disposition,
flow across,
forward,
for
Equivocation,
hyperedges, 728-731
654-655
388
endpoints,
350-351
class,
458
edge cut-set,
240
functions,
Equivalent propositional
dodecahedron,
21-22
of,
sets, 5, 211
Disjoint
^of generating
of sets, 4
on sets,
548
diagonal,
relation,
fuzzy
Equality
Equivalences
332
defined,
472
edge,
cycle, 388
505
regular,
general
defined,
cut-set, 654-655
506
thin,
equation, 638
cross,483
crossovers,523
cube,458
multigraph, 333
(-reflexive
726
Equivalence
494
contracted,
conversation
Graphs
Directed path,
Directed
691
438-439
seealso
388
complete
638
375
428-432
topological,
388
ordering of strings,
of sets, 367-368
437
constraint,
capacity
set,
Empty
Enumeration
backward, 666
see
networks,
transport
Networks
Edges of graphs
of a set, 1
Endpoints of a path,
paths,
Edge-disjoint
391-392
444
of a graph,
442
labeling
Edge
argument, 19-20
of an
388
symmetric,
tree, 486
Economy
connected vertices,
strongly
knowledge
Elements (Euclid's), 20
graphs
simple, 333
simple path,
404-407
of algorithms,
Efficiency
base
388-389
see. Paths in
reflexive,
339, 340
paths,
of development,
stage
Egervary, 689
EKB, see Explanatory
Dualofaposet, 370
Networks
see
526-527
graph,
Education
21
Menger's Theorem,695
networks,
40
law of,
Dual graph
The Extension
Exterior
525
region
\"Extraordinary\"
Principle, 714
of a plane graph,
sets,
743
Index
Facesofa plane,
525
minimal
-defined,
Fallacies
affirming
the consequent, 50
28
ambiguity,
29-30
begging the question,
circular reasoning, 29-30
the antecedent,
50-51
denying
30
cause,
30
generalization,
hasty
non sequitur, 51
post hoc ergo propter hoc, 30
unwarranted assumptions, 2930
\"vicious
29
circle,\"
46
Fermat primes,
Fibonacci
(Leonardo
numbers,
Fibonacci
116
for
120
of Pisa), 269
111, 113-114,
271-273
273
balanced
269-270
Fibonacci relation,
of, 271-273
solution
general
Fibonacci
sequence,111,270-273,
^
278
Finite
Finite
graph,
First order
437
logic,
see
Logic, first
order
\"The
569-571
Flow-augmenting
path,
Flow-augmenting
path
666
algorithm,
Networks, 671
Forward
labeling,
in networks
capacity
constraint,
defined,
638
638
638
out of a vertex,
638,
663
Integrality
of Flows
The Max
increasing,
Theorem,
Cut
667-669
functions
noncomputable,
on integers
of, 671-
700
subnormal,
700
systems
expert
relation,
726
37-40
Theorem
of
Gamma probability
density
function, 733
118
of logic,
see Logic,
of
fuzzifier, 710-711
(FRKB), 724-727
Base
Gates,
596
fuzzy binary
general fuzzy
link, 726-727
relation,
General fuzzy
727
713
726-727
relation
(link), 726-
22
Generalization,
Generalized
functions
Generating
711-713
calculating
coefficients, 247-251
proximity
relations,
713, 726
defined,
239
division
similarity
relations,
713, 726
equality
of power
of, 240
reflexive, 713
common
divisor
713
of, 713
relation,
relation,
common
Greatest
denominator;
@-transitive, 713
unit;
minimization
of
GCD, see
relations
fuzzy
difference, 732
377-378
modulo m, 355-358
relation, 713
binary
Relational
Knowledge
n-ary
Fuzzy set
subset, 700
see also\"Soft\"
under Sets
Fuzzification,
699-704
function,
on, see
operations
operations
support,
449-457
TheFundamental
Fuzzy
normal, 700
symmetrical
anti-symmetrical,
Flow-Min
Theorem,659-630,
membership
see Boolean
318
composition
672
height, 700
functions
Fuzzy
676
Fuzzy
point, 701
699-700
examples of, 701-704
306,
set, see
732
defined,
Functions
forcing,
conventional
sets, 2
crossover
700
with
convex,
615-621
fundamentals
flow-augmenting
path
'
algorithm,
an
for
D. R.,659,671
614,
of, 714
contrasted
Knowledge Base
Fundamentals
conversation equation,
flow into,
640
675
Full-adder,
731
Fuzzy sets
cardinality
of reference
19-20
Fulkerson,
708
705,
union,
708-710
identity,
Mevelset,
containment,
Arithmetic,
677
edge, 666
propositional,
676
maximal,
Forward
5-Color Theorem,
Flows
in expert
chaining
systems, 724
isomorphisms,
Flows in
inverse, 247-251
multiplicative
Forward
of, 247-251
270
Quarterly,
710-711
fuzzifier,
\"soft\"
AND, 705
product, 705-706
argument,
for,
general solution
and Pascal's triangle,
Fibonacci
to IHR,
solutions
Forest,
707-708
Principle, 714
The Extension
\"hard\" and
OIQ
Ford,
706
fuzzification,
defined,306
and particular
Frame
n, 273
large
674-
algorithm,
functions
Forcing
706
convex combination,
dilation,
labeling
N
675
707
product,
concentration,
639
division
edge, 639
edge,
vertex
Cartesian
complement, 705
647-651
unsaturated
718
restriction,
S-Dcuts,
closure, 713
transitive
Fuzzy
640
638,
(Contd.)
713
symmetrical,
equivocation, 28
Fuzzy relations
(Contd.)
645-652
cuts,
slack of an
28
amphiboly,
false
in networks
Flows
Factorials
series, 247-251
Index
744
functions
Generating
partial
shifting
solutions
scalar, 240
decomposition,
252-257
product
290
240-241
of,
290-296
sum
of, 240
relations
rule, 110
Geometricseries,110,116,
249-251
gib,
of a graph, 465
see Greatest
lower
Goals of an
bound
19
argument,
Good'sdiagrams,
540
551
444
sequences,
fc-critical,
561
fc-partite,
467
labelings,
444
457,
bipartite,
547-548
541
\"bridge\" edge,
see
chromatic
numbers,
Chromatic numbers
circuit
nondirected
graphs,
nontrivial
path,
null, 457
481
rank,
closedpath,
442
coloring,
complement
456
531
452-453,
complete,
457,531-532
467
components, 391-
complete bipartite,
fc-partite,
complete
(connected)
392,472
critical
planar,
442, 457,524
degree sequence,
465
diameter,
graphs
Theory,\"
Theorem of Graph
440-441
girth, 465
graphic
464
Petersen,
sequence,
444
simple path,
388,442
543
subgraph,
directed,
452
Havel-Hakimi
of graphs
438-
graphs,
539
Greatest
562-563
.
common denominator
common
divisor (GCD),
356
Greatest element of a set, 364
Greatest
lower
Greedy algorithm,
tree,
510-
Height
of a fuzzy
700
set,
of a tree,
501
500-501
Henkin,
Leon, 110
High-order
languages
(HOLs),
Homogeneous recurrence
266, 306-311
(HR),
(gib), 364
567
486-487,
bound
720
relations
Recurrence
relations
for Boolean
Homomorphism
algebras, 585
How to
Solve It, 18
see
Homogeneous
recurrence
relations
457
vertex,
Hyperedges, 728-731
Greatest
447
result,
Head of a sequence,282
P. J., 569
Heawood,
\"Hub\"
467
457
604
fallacy of, 30
generalization,
Hasty
HR,
converter),
Poset
see
recurrence relations;
339, 340,
458
457,
algorithms, 357-358
diagrams
334, 452
tetrahedron,
set
for fuzzy
AND
\"hard\"
457-458
(GCD),78
forest, 478
generalized
437,438
437
\"The First
527
simple,
543-548
path,
of a vertex,
self-dual,
wheel,
Eulerian, 537-539
551
Hamiltonian
500
439
dual, 569
endpoints,
334-335
subgraph,
proper
Hamiltonian
512
union,
458
dodecahedron,
458
solids,
tripartite,
439
see Directed
directed,
457
in graphs
paths, see Paths
Petersen, 463, 464
see Planar graphs
planar,
Sum of Degrees
Theorem,\"440-441
437
defined,
graph,
551
theorem, 548-551
circuit,
cycle. 543-
Hassediagrams,
\"The
439,464-465
Dirac'stheorem,
Hashing
442
437
438
529
cube, 458
cycle, 388,
organic
graphs
operations,705
458
symmetric
cubic,
388-389
406
Grinberg's
388
523,524-525
nonsimple, 438
689-691
Theorem,
Marriage
defined, 543
449-457
nonplanar,
689
Hamiltonian
333
nondirected path,
nonisomorphic,
614-615
Half-adder,
ra-colorable, 558
circumference, 465-466
548-551
an argument,
19
for
multiplicity
path
increasing
543
Hamilton, Sir William
Rowan,
The Hamiltonian Cycle Problem,
of edges, 535-536
536-537
matrix,
of platonic
388, 442
circuit,
Grounds
Hall's
437
multiplicities
order of,
450
396-402,
adjacency matrix,
AND/OR graphs, 728-731
for
Grinberg's theorem,
Hall, P.,
fc-regular, 439
open path,
Graphs
finite,
334,449-457
^-chromatic, 559,561
octahedron,
Graphic
\"Greedy\" method
flow, 663
334
invariant,
isomorphic,
multigraphs, 333,437,438
see alsoRecurrence
Girth
458
intersection, 456-457
loop-free,
Generating
728-731
hypergraphs,
icosahedron,
by a
multiplication
result, 447
Havel-Hakimi
(Contd.)
728-731
Hypergraphs,
728-731
Hyperpaths,
Hypothesis
of, 23
formulation
inductive, 103
of a proposition,
35, 47
strong inductive, 111
syllogism,
Hypothetical
48,49
circuit
580-581
Idempotent
property of sets, 5
IEC,seeInternational
technical
Electro-
Commission
745
Index
No. 91 for
Standard
IEEE
IHR, see
logic
Inhomogeneous recurrence
601
symbols,
relations
Inhomogeneous
recurrence relations
elements, 13
of set
Images
318
35
Implication,
law of, 40
logical, 45-46
proof of, see Proof, methods of
Incident
from, on, to edge, 333, 439
of
Inclusion-exclusion,
principle
Euler's
226-228
formulation and
statement
218-219
proofs, 220-222
224-225
Sieve of Eratosthenes,
for three sets, 213-218
sets, 212-213
two
for
601,
603
579
postulates,
132-133
Indirect counting,
Indirect
333, 439
of a vertex,
In-degree
61, 65-66
proof,
Induction
103-108
strong
mathematical;
and Analogy
Mathematics, 18
see alsoStrong
Inductive
406
423
Intermediate
contraposition,
50,61,86
dilemma,
49
disjunctive
syllogism,
49
specification,
98
47-48, 49
modus tollens, 49
simplification,
transitive
universal
605
form of Boolean
605
expression,
of a binary
Irreflexivity
339,340
Isolatedvertex,
Inference
Inhomogeneous
relations
(IHR),
recurrence
Leastelement
Least upper
Left child,
40
Middle,
of a set, 364
bound
(lub), 364
507
edge, subtree,
373-375
Linear
of strings,
ordering
permutation,
148-151
257
approximations,
of relations,
operations;
systems
368
380
Link
368
tree
266
Linear recurrence relation,
Linearity of generating functions,
Linguistic
Join-semilattice,
269
vertex, 509
281-285
Join
of elements,
34
Length
relation,
graph,334,406,449-457
Iteration,
of implication,
Excluded
Law of the
439
Proof,
methods
of
266
the Laws of
form of a Boolean
Boolean, 585
98
generalization,
Reasoning;
602, 603
of contradiction, 34
of contrapositive,
40, 49, 50
of double negation, 40
of hypothetical
syllogism, 48,
49
Law
Isomorphisms
49
rule, 48, 49
seealso
Law
583
Irredundant
Law
381-382
expression,
hypothetical syllogism,48, 49
ponens,
41
function,
of
Investigation
577
Thought.\"
algebras,
existential generalization, 99
existential
Law
247-251
(LSI), 600
Lattice,368,578
Irreducible
47-48, 49
detachment,
Involution
of
Equations
334
\"An
Laws, 6, 40-41,49,
DeMorgan's
The Lancaster
Invariant of graphs,
14
formula,
interpolation
88
426
INVERTER
49, 50
444
Invariant
of a set
45
destructive
sets, 14
for
function
assertion,
636
675
Combat,275
379
of a relation,
49
675
vertex, 674-675
456-457
of a proposition,
dilemma,
algorithm, 674-675
graph,
symbols,
multiplicative,
of
constructive
Labeling
forward,
(IEC)
for logic
535-538
486-489
algorithm,
Lagrange's
of sets, 5
49
conjunction, 49
Kruskal's
backward,
Electrotechnical
of relations,
695
Theorem,
Konig's
edge, 632-633,
Inverse
Inference, rules
defined,
418-
vertex, 482
of graphs,
Into
689
600
634
vertex,
601
46
addition,
large scale,
algorithm,
very
of fuzzy
algorithms,
Knowledge-Based Consultant
see Expert
(Expert) Systems,
Intersection
valid, 46-47
modus
and
Interchange sort
103,111
569-571
of a fuzzifier, 710-711
Thomas
Kirkman,
P., 543
The Knight's
Tour Puzzle, 555
large,
medium,
small,
117-15
Publication
Inference
faulty,
Integration:
Commission
22-24
Inefficient
Primes
see
111-115
reasoning,
Inductive step,
571
inductive
hypothesis
610-611
607-609,
map,
A. B., 569,
Kempe,
Konig,
modulo m, 354-358
in
hypothesis, 103
Inductive
Karnaugh
Karp, 671
systems
of, 359-360
divisibility
International
Induction
503-504
B-tree,
Integers
Internal
mathematical,
graph, 439
fc-regular
Kernel
prime,
INCLUSIVE-OR function,
Independent
condition,
110, 268
term of a series, 110
442
vertex,
Initial
of,
467
graph,
fc-partite
559
Kempe-chain argument,
relations
Initial
225-226
0-function,
coefficients,
of, 311-319
method
see also homogeneous
recurrence relations;
Recurrence
Initial
fc-chromaticgraph, 56,
^-critical graph, 561
fc-way
undetermined
derangements,
(Contd.)
(IHR)
(general
727
\"Soft\"
see
set
expert
Index
746
Logic, first
590
87, 89
by counterexample,
proof by example, 87
87, 89
proof by exhaustion,
91
abbreviated
basic
propositional
variables, 39-42
Logic, predicate,
in
602,603
INCLUSIVE-OR,601,603
of, 600-601
an ALU,
601-603
Logical
connectives, 34-38
Logical
implication,
consequence,
trees, 494
spanning
Minimization of Boolean
functions,
functions, see Boolean
Minimal
471
Many-to-one
96
function
for sets,
14
Networks
capacity function, 633
completematching,
cuts in,
see Cuts
defined,633
capacity,
edge
matching,
687,
coefficients, 191-192
NLR,
traversal
see Preorder
Non sequitur
fallacy,
51
functions, 377-
378
Nondirected
functions,
Nondirected
increasing
existence
Nondeterministic
Modus tollens, 49
346
688-689
Nonconstructive
87,88
Monotone
633-634
636
632-633,
edge labeling,
in networks
flows in, see Flows
intermediate vertex, 634
354-358
arithmetic,
law for Boolean
algebras,
ponens,
689-
687,
691
Modular
Modus
638,
640
Noncomputable
587
cut, 649
out of a vertex,
flow into,
Boolean expressions,
Modular
439
vertices,
across
a
Neighbor
flow
Net
Minterm
590-592
278
Lukasiewicz, Jan,
of
minimization
Square,
deposit
expert system, 722
cuts in networks,-645-652
Minimal
333
graph, 437
of a set, 364
bound
see Postorder
traversal
sequence,
in an ALU, 619-
621
Mineral
Loop-free
Magic
of
Micro-operations
Lucas
coefficients, method of
of Proof, see Proof,
Methods
propositional
Loop-freedigraph,
Undetermined
coefficients, see
methods
functions, 38
LRN,
of undetermined
Method
46
46-47
equivalent
roots,
558
NAND
Net
lists, 282-284
423-424
sequences,
711-713
relation,
fuzzy
127
events,
system, 722
expert
Negation
282-284,
300-304
of
valid inference,
699-704
function,
of characteristic
Method
Lower
Merging
sorted
exclusive
n-ary
425-426
sorted
of a graph,
matrix
536-537
n-colorable graph,
algorithm,
Merging
Fallacies
see
faulty inference, 46
Logically
sort
536
Multiplicity
MYCIN
45-46
Logical inferences
fallacies,
Merge
(MSI),
Menger's Theorem,695
603
Logic micro-operations in
619-621
of generating
a scalar, 240
of formal
inverse,
Multiplicities
integration
368
Menger, 689
Multiplicative
Mutually
368
89-91
621-626
functionby
system,
Meetof elements,
333
edges,
Multiplication
expert
Meet-semilattice,
Membership
Logic symbols,
register
Members of a set, 1
scale
600
EXCLUSIVE-OR,
minimization
shift
539-541
see also
Multiplexers,
Boolean expressions,
Medium
theorem,
Multiple quantifiers,
667-669
diagnosis
coefficients
205-
Binomial
Multinomial
Multiple
of, 671-677
Cut
Flow-Min
Maximum-length
722
seealso
The
\342\200\242207
Medical
expert
205
Multinomial coefficients,205-207
networks, 641,
590-592
AND, 601,603
rules
The Max
Maxterm
Logic gates
logical
construction
723-724
systems,
NOR,
645-652
sequence,
and
inferences
33-34
propositions,
valid
537
traversable,
536-537
flows in
Theorem,659-660,
connectives,
functions
396-402, 450
Boolean, 396-402
81-82
of discourse,
of
universe
graphs, 526-527
Multinomial,
adjacency,
Maximal
537-538
nondirected,
of plane
mathematical
Matrix
multiplicity,
80-
81
universal quantifier, 83-87, 89-
Logic, fundamentals
18
induction
proof
subject-predicate
538
Discovery,
in,
Bridges, 535-
The Konigsberg
induction, 103-108
see alsoStrong
89-91
quantifiers,
multiple
five
Mathematical
Mathematical
537-539
688-689
network,
integration
Eulerian
687
maximal,
87-88
scale
538
directed,
condition, 689
equivalences, 85-86
existence proofs,
687, 689-691
complete,
defined,80
91
Marriage
691
Matching
order
existential
The
graphs,
proof,
algorithms, 419
333
388
747
Index
graphs, 449-457
Nonisomorphic
recurrence
Nonlinear
321-322
Nonplanar
524-525
523,
Out-degree of a vertex,
406
algorithms,
general
439
333,
726
relation,
Nontrivial
path,
Nontrivial
tree,
388-389
Parent
Normal
Normal
and
algorithm,
graph,
457
string,
373
Null set, 4
Null
362-363, 580
133-134
for sets,
function
Onto
Openpath,
14
442
y
355-358
on integers modulo m,
see under Relations
relations,
on sets, see under Sets
397
Operator on operators,
Operator postfix, prefix notation,
on
471-472
Operators
Sets
of a proposition, 41-42
Boolean
OR, OR.AND
operators,
398-400
OR function, EXCLUSIVE and
INCLUSIVE,
601, 602, 603
437
pair, 9
181,182-184
selection
Ordered
Orderedtree, 517
177-
of objects,
enumeration,
lexicographic,
143
see Enumeration
373-375
partial,
on
topological, 428-432
total,
363
Ordinary
generating
Generating
\"Ordinary\"
functions, see
functions
sets, 9
simple,
trivial,
Perfect
718-720
Post hoc
30
Plausible
Postulates,
164
Powell,
144,146
numbers,
172-177
and
M. B., 565
repetitions,
series,
partitions,
repetitions,
247-251
Predicate,81-82
logic
723-724
Preimages
181-184
inverse,
multiplicative
Power set, 7, 9
Predicate
162-
515,
579
formal, 239
division of, 247-251
Power
partitions, 177-181,
with constrained
(LRN),
consistent
independent,
traversal
hoc fallacy,
518
Inference,
75
unlimited
ergo propter
Postorder
442
182-184
with
consistency
719
principle,
389
148-151
repetition
715-720
theory,
Possibility/probability
defined,143
ordered
715-720
716
to probability,
related
Possibility,
circular, 150-151
linear,
365
364,
Possibility Postulate,
Possibility
388, 442
integer,
algorithms,
distribution,
Possibility
388-389
in
polynomial
716-717
666
vertex-disjoint,
Patterns
18
of, 458
543-548
a vertex,
442
traverse
edge graphs
solids,
G., 18
Poset diagrams,
of, 388
nontrivial,
406
406
hyperpaths, 728-731
open,442
Subgraph Problem,
Characteristic
Eulerian, 537-539
Hamiltonian,
527
self-dual,
Polynomial-bounded
442
flow-augmenting,
of, 530-532
531, 532
Polyhedral plane graph,
Polynomial, characteristic, see
388
endpoints,
526-527
531, 532
Polya,
directed, 388
edge-disjoint,
569-
571
Platonic
Permutations
relations
Ordering
265
Opposite
Ordered
273
relation,
388, 442
length
Boolean, 398-400
Order of a graph,
numbers,
in graphs
cycle,
Kempe-chain argument,
The Planar
closed,442
set
operations
set, seeunder
265
on fuzzy
Fibonacci
193-194
569-
571
properties
192-194,
as a recurrence
Path graph, 457
Paths
81-86
Open proposition,
Operations
Pascal'sidentity,
569-571
Problem,
polyhedral,
178
Pascal's triangle,
5-Color Theorem,
181-184
of a set,
and
525
region,
multigraphs,
126,350-351
unordered,
Posets
177-181,182-184
of a set,
Parts
sets, see
ordered
ordered,
of, 526-527
TheFour-Color
340-341,
relations,
ordering
Partially
Partition
dual
252-257
Partial
crossovers,523
cycles,524
defined,523
404
fraction decomposition,
Partial
density
problems, 406-407
NP-complete
tree, 507
Partial correctness of an
591-592
probability
function, 732
Null
Parsing
conjunctive
form,
disjunctive,
of a vertex, 482
in binary
vertex
a sentence,
505
Parent
critical, 529
Russell's, 7, 9
469
for, 569-571
numbers
chromatic
Cantor's, 7
fuzzy
relation/726
67-71
principle,
Planar graphs
Paradox
general
Nonsymmetric
of
principle
Inclusion-exclusion,
Pigeonhole
138
Palindrome,
graph, 438
Nonsimple
148-151
fuzzy
(Contd.)
repetitions,
729-731
Nonpolynomial-bounded
Nonreflexive
Permutations
without
OR-VERTEX,
graph,
446-
447
relations,
in expert
of set
systems,
elements, 13
Premise,35,47
Preorder
traversal
515,518
(NLR), 514,
748
Index
of (Contd.)
Proof, methods
direct proof, 61,63-64
Primes
76
adjacent,
existenceproofs,
Euclidean, 118
Mersenne,
quadruple, 76
Prim's
proof
Principle
66
494
algorithm,
Principle
of duality, 580
of inclusion-exclusion,
proof
71
principle of
Induction,103-108
proof
of
principles
Counting,
Probability, related
718-720
proof by exhaustion,
proof
by mathematical
see
of counting,
Principles
by equivalence,
87
by example,
proof
of Mathematical
to
87, 89
cases, 62,
63, 64-65
87, 89
possibility,
61
trivial proof,
vacuous proof,
61
see also Inference,
733
function, 37-42
Propositions,
33
Number
Problem,406
Problem, 361
The Coconut
TheCommittee
686,
Problem,
691
571
TheHamiltonian
Problem,406
TheKnight's
The
Cycle
Tour
The
Puzzle,
687,
Problem,
Marriage
555
535-
Bridges,
Konigsberg
538
689-691
NP-complete, 406-407
ThePlanar
Subgraph
406
The Scheduling
Problem,
558-
Problem,
Problem,
The Towers
of Hanoi,
Problem-solving
strategies, see
of fuzzy
sets, 705-706
of generating
functions,
form,
arithmetic,
Projection
Proof,
existential, 83-87,89-91
591, 612
of
methods
110,115
110,116, 249-251
a relation, 379-380
of
fuzzy
Reflexive
general
Reflexive
relation
726
connected
of a
describea
108
relation,
subroutine,
binary
Reflexive
713
\342\200\242
fuzzy relation,
on a set,
11
of a similarity
of a planar
726
relation,
vertices,
Regular
language,
Range
Rational
of relation on a set,,10-11
roots theorem,-89
525
tree, 505
directed
Relations
see
binary,
725
Query
569
graph,
of a plane,
83-87, 89-91
relations
Binary
closure property,
Quotient, 64
383-384
379
complement,
composition, 382-383
379
difference,
see Equivalence
equivalence,
relations
24-26
fuzzy,
approach,17-19
aspects of discovery,
circular, 29-30
general
381-382
inverse,
19-20
join, 380
meet, 368
22-24
working
backward, 26-27
working
forward,
20-21
intersection, 379
21-22
elements of an argument,
fallacies, see Fallacies
inductive,
set, 3
109-111
Regions
89-91
\"analysis-synthesis,\"
Progression
geometric,
97-100
propositions,
Quantifiers
Reasoning
240-241
formula to
Reflexivity
282
Reasoning
Product
Quadruple primes, 76
universal,
Recursive
77
triple,
multiple,
108-109
Recursive
system,
498-500
Representatives
Problem,
expert
of Hanoi, 282
functions
Generating
Recursion,
of
relations,
of a tree, 495-497
Pythagorean
406
System of Distinct
code
TheTowers
Recursion theorem,
fundamentals
281-285
solutions,
see also
713, 726
Quasi-strongly
Isomorphism
of,
722
Priifer
285-290
functions,
quantified, 97-100
Proximity
321-322
properties of generating
substitution
see alsoLogic,
282-284,
algorithm,
models, 274-275
open, 81-86
Quantified
560
The Subgraph
negation
of, 34
PROSPECTOR
utilities, 523-525
houses and
38
of
Equations
275
425-426
34
equivalent,
268
conditions,
shifting
and disjunction
conjunction
306-311
266,
nonlinear,
Propositional
Assignment
290-296
homogeneous,
merge sort
of;
Problems
Problem, 686
269-273
relation,
linear, 266
rules
The Chromatic
285, 321-322
Combat,
The
relations,
divide-and-conquer
initial
75
divisor,
Proper
as, 274
derangements
The Lancaster
Reasoning
in
methods
723-724
Probability-based
expert systems,
as, 274
compound interest
defined, 266
induction,103-108,111-115
functions, 732-
Probability density
by counterexample,
of
by elimination
solutions,
300-304
Fibonacci
proof
see Inclusion-exclusion,
Principle
67-71
twin, 76
Primitive triple, 77
roots
characteristic
principle,
pigeonhole
76
triple,
87-88
positive), 61,65-66
120
110
relations,
indirect
120
Fermat,
Recurrence
Ordering
of;
see
ordering,
ordering
ordering,
relations
projection,
relations
see Partial
379-380
749
Index
Relations
Series
(Contd.)
713, 726
proximity,
Recurrence
see
recurrence,
relations
SES, see
Sets
726
713,
similarity,
union,
105, 366-367
of a set, 4
complement
prime
integers, 356
well-ordering,
Relative
Relatively
Remainder, 64
144,146
Repetition
numbers,
Revelation
stage of development,
Resolution
708-710
identity,
22
Cantor's
Root of a
507
tree, 469,482
300-304
Rule
Rule of detachment, 47-48, 49
Rules
of inference,
see Inference,
Russell,
of
Bertrand, 9
Russell's paradox
for sets, 7, 9
definition,
639
558-560
algorithms
Searching
DFS, 482,
485
Self-dual
Self-dual
135
functions,
Self-loop,
437
Sentenceparsing,
505
Sequences
deBruijn,
539-541
Fibonacci,
generating
289
graphic,
sequences,423-
358
searching, 415
sorted, 415
of, 282
11
Simple digraph,
images, 13
elements,
into
14
363
intersection, 5
function,
14
function,
operator,
ordered
13
pair, 9
\"ordinary,\" 9
scale
(SSI), 600
integration
algebra, 588-
Boolean
589
for fuzzy
AND
\"Soft\"
437
edge, 639
\"Soft\" expert
set
systems (SES),722-
724
one-to-onecorrespondence,14
onto function, 14
388, 442
operations,705
368
function,
path,
49
Simplification rule of inference,
Singleton set, 4, 442
for sets, 13
function
Single-valued
Sink
633, 638, 640
vertex,
\"Smallest\"
null, 4
one-to-one
Simple
Small
364
lub, 364
members,
Slack of an
333
Simple
Sizeofa graph,
inverse function, 14
368
of elements,
join
lower
224-
idempotent property, 5
incomparable
of
225
364
element,
greatest
see
meetof elements,
424
tail
see
fuzzy,
gib, 364
of generating
properties
functions, 285-290
Inclusion-exclusion,
principle
defined, 13
Fuzzy sets
mapping, 13
444
merging sorted
\"probe,\"
function,
609, 610
Sievemethod,
many-to-one
367-368
214
13
well-ordered, 366-367
(SSD),
Seven-segment display
Shifting
empty, 4
\"extraordinary,\"
415
sequences,
Searching
10-11
elements, 1
equivalence relation,
415-418
binary,
laws,
relation,
6, 212,
function,
5, 211
equality,
bound,364
diagrams,
596-600,
enumerations,
BFS, 482-485
2-3
universal,
well-defined
2-3
of
union, 4-5
Venn
50,61,86
domain
367
uncountable,
upper
description,
13
relation, 11
transitive
correspondence,13
367
ordered, 363
totally
transformation,
n, 12
modulo
distributive
representatives,
657,686
14-15
of relation,
of distinct
system
16
disjoint,
Saturated
symmetrical difference, 5
commutative property, 5
congruence class,12
11
relation,
symmetric
13
function,
subset, 3-4
operations,
binary
countable,
7, 9
paradox,
single-valued
383-384
property,
containment, 3-4
22,126-132
rules
function, 2
characteristic
congruence
product, 128-132
sum,
Russell's
singleton, 4, 442
product, 8,10
composition
Roots, characteristic,
relative complement, 4
363
chain,
on, 10
relation
tree, 468
Rooted
16
10
paradox,
Cartesian
3-4
subset,
10-11
range of relation,
reflexive relation, 11
Boolean
commutative
Right
\"Ring\"
preimages, 13
16
operations,
closure
edge, 666
Reverse
power, 7
proper
associative
associative property, 5
binary
350-351
partition,
systems
11
relation,
binary
operations,
antisymmetric
see Posets
ordered,
partially
249-251
110, 116,
\"Soft\"
expert
absolute complement, 4
363
ordering,
384
P-closure,
239, 247-251
formal power,
geometric,
Sets
see under
set,
Sets (Contd.)
115
110,
arithmetic,
13
ARIES,
727-731
EKB, 725-727
FRKB, 724-727
VKB,
Sorted
725-727
Sorted sequences,415
750
Index
Sum
algorithms
Sorting
rule,
see also
22,126-132
Transitive
Inclusion-exclusion,
Transitivity
of
principle
run
Switching
418-423
sort,
interchange
347
times,
Source vertex,
Spanning subgraph,
603
452
trees
Spanning
497
formula,
DFS, 482,485
480
maximal,
493
minimal,
485-489
Prim's
properties
Prufer code,
495-497
terminology
associated
with, 482
Specialization, 22
State diagrams,
shift
722
540
second
,
kind,209-210
for problem
Reasoning
373-375
Strings,
seealso
Inductive
hypothesis
Strong mathematical
induction,
111-115
seealso
111
induction
Mathematical
392
Symmetric
Problem,406
Subgraphs,
complement
Subroutine,
108
recursive,
Subset
of a fuzzy
of a set,
Substitution
set,
Successiveminima
Sum bit, 614
Sum
of Degrees
440-441
Sum
algorithm,
of generating
Theorem,\"
Terms
of a similarity
^-transitivity
726
494
spanning,
469
nontrivial,
prefix and
operator
postfix
517
in,
482
of, 473-476
properties
Prufer code, 495-497
root
of, 469
rooted, 468
see
spanning,
Spanning
subtree, 482
traversal
trees
514-515,
algorithms,
518
205
Trinomial,
graph, 467
Tripartite
Trivial
path,
Trivial
tree,
(reflexive)
relation
363
282
Functions
closure
on a
469
84
Truth set of a proposition,
Truth tables, 35, 37-41,46
for logic networks
Truth
tables
601
function,
set, 11
function, 602
616
full-adder,
Gray-code
relation,
442
Trivial proof, 61
EXCLUSIVE-OR
428-432
713
of a fuzzy binary
relation,
of a relation, 383
WarshalPs
407-412,
algorithm,
Transitive
482
nondirected, 469
AND
tree, 506
607
Transitive
vertex,
Triple primes, 76
of an algorithm, 404
Termination
in formal
power series, 239
Tetrahedron,
edge graph of, 458
539
functions, 240
178
vertex, 442
691
38
Total order
for
281-285
\"The
partition
Torus,
solutions
recurrence relations,
510-512
trivial,1469
of a set,
Topological sorting,
3-4
191
713
657, 686,
Representatives
Problem,
Thin directed
700
506
parent
relation, 726
System of Distinct
relation,
486
edges, 483
ordered,
coefficients,
relation,
of a fuzzy binary
of a similarity
Terminal
components, 391-392
80-81
Subject-predicate analysis,
Subnormal
fuzzy set, 700
connected
directed, seeDirectedtrees
minimal
of binomial
Tautology,
of, 455-456
descendant in,482
notation, 471-472
Tail of a sequence,282
334, 452
509-510
binary,
defined,468
t-part
Isomorphism
relationships,
complete
difference
Mevelset, 708
584
Boolean,
Subalgebra,
The Subgraph
combinatorial
internal
Symmetric
search,
of a
binary,
full,
48, 49
hypothetical,
Symmetry
B-tree,503-504
height-balanced,
Symmetrical
solving, see
Strategies
unit;
minimization
of
383
register,
Institute, 722
Research
University,
Trees
economy,
Syllogism
SSD,seeSeven-segment
display
SSI, see Small scaleintegration
Stanford
596-600,
609, 610
494
of, 480-482
Stanford
602, 603
function,
seven-segment display,
algorithm,
518
514-515,
501-503
INVERTER
algorithm, 486-489
KruskaFs
537
multigraph,
algorithms,
function, 601,
603
binary
604
converter),
INCLUSIVE-OR
defined,480
directed,
600-601
gate minimization,
BFS, 482-485
Cayley's
596
gate,
724
727
improvement,
Traversal
function, 602,
EXCLUSIVE-OR
339-340
relation,
systems,
Traversable
596
equivalent,
of a binary
in expert
Transport
601, 603
AND function,
419
sort, 428-432
633, 638, 640
topological
mechanisms
48, 49
rule,
converter,
half-adder,
to binary-code
604
615
INCLUSIVE-OR function,
INVERTER
function, 602
623, 625
multiplexers,
function,
602
primes,
76
601
751
Index
Boolean
2-valued
2's complement
134-
function,
136
form,
620-621
Venn
defined, 311
312-315
319
polynomials
315-317
Uniform probability density
function, 732
602
connected
Unilaterally
391-392
Union
of fuzzy
of graphs,
of sets, 4-5
Universal
dual
generalization,
98
set,
2-3
184
Unordered
selection
Unsaturated
Unwarranted
of, 29-30
edge,
of objects,
639
assumptions, fallacy
proof,
61
725-727
600
(VLSI),
circle\"
\"Vicious
see Value
VKB,
439
descendant, 482
379
143
569
graph,
out
into,
of,
638,
640
567
in directed
of,
500-501
\"hub,\"
initial,
442
internal, 482
634
439
509
scale
large
of an argument,
S., 402, 407
Warrants
Warshall,
19-20
Watkins,
392
333, 439
intermediate,
isolated,
forest,
457
in-degree,
fallacy, 29
knowledge base
437
391-392
integration
connected, 391-392
connected,
332
degree,
unilaterally
weakly
cycle, 388
731
389
traverse,
638
472
vertex,
391-392
terminal, 442
covering of edges,695
defined,
sets, 705,
457
of relations,
equation,
633,638, 640
connected,
strongly
vertices,
388
sink, source,
558, 567
conversation
507
child,
simple path,
729-731
388
coloring,
507
507
child, 482,
333, 439
482,
parent,
502-
729-731
OR-VERTEX,
out-degree,
right
ancestor, 482
AND-VERTEX,
503
500
439
adjacent,
circuit,
Uniform-shape
paths,
Vertices of graphs
for products of
and exponentials,
solutions
trial
444
of a graph,
442
labeling
Vertex-disjoint
for polynomials,
solutions
trial
Vertex
for exponentials,
solution
trial
path, 388
of, in directed tree,
number
567
of
flow into,
nondirected
6, 212, 214
of a graph, 558,
diagrams,
coloring
Vertex
coefficients,
method
neighbors, 439
net
606
diagram,
Venn, John, 6
204-205
(Contd.)
of graphs
Vertices
Vandermonde's identity,
Veitch, E. W.. 606
Veitch
Undetermined
640
of a flow,
Value
for sets, 13
of integers,
function
Well-defined
Well-ordered property
105
algorithm,
565-566
backward,
26-27
L. A., 699