Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: DISCRETE MATHEMATICS COMPLETE NOTES
Description: In-depth analysis of all important topics in Discrete Mathematics. Must have for all

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


Lecture Notes on Discrete Mathematics

DR

AF

T

July 30, 2019

AF

DR
T

2

Contents
1 Basic Set Theory

7

1
...


7

1
...


9

1
...


11

1
...


15

1
...


18

1
...


19

2 The Natural Number System

25

Peano Axioms
...
2

Other forms of Principle of Mathematical Induction
...
3

Applications of Principle of Mathematical Induction
...
4

Well Ordering Property of Natural Numbers
...
5

Recursion Theorem
...
6

Construction of Integers
...
7

Construction of Rational Numbers
...
1

3 Countable and Uncountable Sets

43

3
...


43

3
...


46

3
...


49

3
...


51

3
...


55

4 Elementary Number Theory

61

4
...


61

4
...


65

4
...


68

5 Combinatorics - I

71

5
...


71

5
...


73

5
...
1

Counting words made with elements of a set S
...
2
...


74

5
...
3

Counting words where letters may repeat
...
2
...


76

5
...
5

Pascal’s identity and its combinatorial proof
...
2
...


78

5
...


80

5
...


83

5
...


86

5
...


91

5
...


95

5
...


98

6 Combinatorics - II

103

6
...
103

6
...
107

6
...
110
6
...
1

Generating Functions and Partitions of n
...
4

Recurrence Relation
...
5

Generating Function from Recurrence Relation
...
133

7
...
134

7
...
137

7
...
143

7
...
149

7
...
7

Inferences in PL
...
1

DR

AF


...
1

Partial Orders
...
2

Lattices
...
3

Boolean Algebras
...
4

Axiom of choice and its equivalents
...
1

Basic concepts
...
2

Connectedness
...
3

Isomorphism in graphs
...
4

Trees
...
5

Eulerian graphs
...
6

Hamiltonian graphs

9
...
214

9
...
215

9
...
219

10 Graphs - II


...
1 Connectivity
...
2 Matching in graphs
...
3 Ramsey numbers
...
4 Degree sequence
...
5 Representing graphs with matrices
...
1 Groups
...
2 Lagrange’s Theorem
...
3 Group action
...
4 The Cycle index polynomial
...
5 Polya’s inventory polynomial


...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...



...


...


...


...


...


231
231
240
244
248
251

6

DR

AF

T

CONTENTS

Chapter 1

Basic Set Theory
The following notations will be followed throughout the book
...
The empty set, denoted ∅, is the set that has no element
...
N := {1, 2,
...
W := {0, 1, 2,
...
Z := {0, 1, −1, 2, −2,
...
Q := { pq : p, q ∈ Z, q 6= 0}, the set of Rational numbers;
6
...
C := the set of Complex numbers
...
We start with the basic
set theory
...
1

Sets

Mathematicians over the last two centuries have been used to the idea of considering a collection of
objects/numbers as a single entity
...
The technique of
using the concept of a set to answer questions is hardly new
...

However, the rigorous treatment of sets happened only in the 19-th century due to the German mathematician Georg Cantor
...

Cantor developed the concept of the set during his study of the trigonometric series, which is now
known as the limit point or the derived set operator
...
His new and path-breaking ideas were not well
received by his contemporaries
...
One of the most famous paradoxes is the Russell’s Paradox, due to Bertrand Russell
in 1918
...

The interested reader may refer to Katz [8]
...
The notion of a set is taken
as a primitive and so we will not try to define it explicitly
...

A “well-defined collection” of distinct objects can be considered to be a set
...
Well-defined, in this context, would enable
us to determine whether a particular object is a member of a set or not
...
BASIC SET THEORY

Members of the collection comprising the set are also referred to as elements of the set
...
An
important feature of a set is that its elements are “distinct” or “uniquely identifiable
...
If A is a set and a is an
element of it, we write a ∈ A
...
For instance,
if A is the set {1, 4, 9, 2}, then 1 ∈ A, 4 ∈ A, 2 ∈ A and 9 ∈ A
...

Example 1
...
1
...
Let X = {apple, tomato, orange}
...


2
...
, a10 }
...

3
...

We now address the idea of distinctness of elements of a set, which comes with its own subtleties
...
1
...


1
...
Is it a set?

2
...
Then X is the set of first 10 natural numbers
...

Definition 1
...
3
...
A set that has only one element is called a singleton set
...
They are:

DR

AF

1
...
g
...
Then X is the set of even integers
between 0 and 12
...
Stating a property with notation (predicate notation), e
...
,
(a) X = {x : x is a prime number}
...
Here, x is a variable and stands for any object that meets the criteria after the
colon
...
X = {x : 0 < x ≤ 10, x is an even integer }, or
ii
...
x = {x : 2 ≤ x ≤ 10, x is an even integer } etc
...
In general, one writes X = {x : p(x)} or X = {x | p(x)} to denote the set of all elements x
(variable) such that property p(x) holds
...

3
...
g
...

Then, X can also be specified by
(a) 4 ∈ X,

(b) whenever x ∈ X, then x + 2 ∈ X, and
(c) every element of X satisfies the above two rules
...
2
...
The third rule
should always be there
...
At this stage, one should make it
explicit
...
1
...
Let X and Y be two sets
...
Suppose X is the set such that whenever x ∈ X, then x ∈ Y as well
...
When there exists x ∈ X such that x 6∈ Y , then
we say that X is not a subset of Y ; and we write X 6⊆ Y
...
If X ⊆ Y and Y ⊆ X, then X and Y are said to be equal, and is denoted by X = Y
...
If X ⊆ Y and X 6= Y , then X is called a proper subset of Y
...

Example 1
...
5
...
For any set X, we see that X ⊆ X
...
Also, ∅ ⊆ X
...
It thus follows that there is only one empty set
...
We know that N ⊆ W ⊆ Z ⊆ Q ⊆ R ⊆ C
...
Note that ∅ 6∈ ∅
...
Let X = {a, b, c}
...
Also, {{a}} 6⊆ X
...
Notice that {{a}} 6⊆ {a} and {a} 6⊆ {{a}}; though {a} ∈ {a, {a}} and also {a} ⊆ {a, {a}}
...
2

AF

T

We now mention some set operations that enable us in generating new sets from existing ones
...
2
...
Let X and Y be two sets
...
The union of X and Y , denoted by X ∪ Y , is the set that consists of all elements of X and also
all elements of Y
...

2
...
More specifically, X ∩ Y = {x|x ∈ X and x ∈ Y }
...
The sets X and Y are said to be disjoint if X ∩ Y = ∅
...
2
...


1
...
Then,
A ∪ B = {1, 2, 3, 4, 5, 18} and A ∩ B = {1, 2, 4}
...
Let S = {x ∈ R : 0 ≤ x ≤ 1} and T = {x ∈ R :
...
Then,
S ∪ T = {x ∈ R : 0 ≤ x < 7} and S ∩ T = {x ∈ R :
...

3
...
Then
X ∩ Y = {b} and X ∪ Y = {a, b, c, {b, c}, {{b}, {c}} }
...

Lemma 1
...
3
...
Then,
1
...


10

CHAPTER 1
...

(c) S ⊆ S ∪ T, T ⊆ S ∪ T
...


(e) S ∪ ∅ = S, S ∩ ∅ = ∅
...


2
...

(b) R ∩ (S ∪ T ) = (R ∩ S) ∪ (R ∪ T ) (intersection distributes over union)
...
2a
...
Then, x ∈ R or x ∈ S ∩ T
...

Thus, x ∈ (R ∪ S) ∩ (R ∪ T )
...
So, x ∈ S and x ∈ T
...
Thus, x ∈ (R ∪ S) ∩ (R ∪ T )
...


Now, let y ∈ (R ∪ S) ∩ (R ∪ T )
...
Now, if y ∈ R ∪ S then either
y ∈ R or y ∈ S or both
...
If y 6∈ R then the conditions y ∈ R∪S and y ∈ R∪T imply that y ∈ S
and y ∈ T
...
This shows that (R ∪S)∩(R ∪T ) ⊆ R ∪(S ∩T ),
and thereby proving the first distributive law
...

Exercise 1
...
4
...
Complete the proof of Lemma 1
...
3
...


DR

(b) S ⊆ T if and only if S ∪ T = T
...
Prove the following:

(c) If R ⊆ T and S ⊆ T then R ∪ S ⊆ T
...


(e) If S ⊆ T then R ∪ S ⊆ R ∪ T and R ∩ S ⊆ R ∩ T
...


(g) If S ∩ T 6= ∅ then both S 6= ∅ and T 6= ∅
...

Definition 1
...
5
...


1
...

2
...

Example 1
...
6
...
Let A = {1, 2, 4, 18} and B = {x ∈ Z : 0 < x ≤ 5}
...


2
...
5 ≤ x < 7}
...
5} and T \ S = {x ∈ R : 1 < x < 7}
...
Let X = {{b, c}, {{b}, {c}}, b} and Y = {a, b, c}
...


11

1
...
RELATIONS

In naive set theory, all sets are essentially defined to be subsets of some reference set, referred to
as the universal set, and is denoted by U
...

Definition 1
...
7
...
Then, the complement of X, denoted by
X c , is defined by X c = {x ∈ U : x 6∈ X}
...

Lemma 1
...
8
...
Then,
1
...

2
...

3
...

4
...

5
...

6
...

7
...

8
...

9
...


AF

(b) (S ∩ T )c = S c ∪ T c
...


T

10
...

Exercise 1
...
9
...

1
...
2
...

2
...
Is S = ∅?
Definition 1
...
10
...
Then, the set that contains all subsets of X is called the power
set of X and is denoted by P(X) or 2X
...
2
...


1
...
Then P(∅) = P(X) = {∅, X} = {∅}
...
Let X = {∅}
...

3
...
Then P(X) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
...
Let X = {{b, c}, {{b}, {c}}}
...


1
...
We will use these
concepts to relate different sets
...


12

CHAPTER 1
...
3
...
Let X and Y be two sets
...
The elements of X × Y are also called ordered pairs
with the elements of X as the first entry and elements of Y as the second entry
...

Example 1
...
2
...
Let X = {a, b, c} and Y = {1, 2, 3, 4}
...

X ×Y

= {(a, 1), (a, 2), (a, 3), (a, 4), (b, 1), (b, 2), (b, 3), (b, 4), (c, 1), (c, 2), (c, 3), (c, 4)}
...
The Euclidean plane, denoted by R2 = R × R = {(x, y) : x, y ∈ R}
...
By convention, ∅ × Y = X × ∅ = ∅
...

Remark 1
...
3
...
Then, X × Y can also be defined as follows:
Let x ∈ X and y ∈ Y and think of (x, y) as the set {{x}, {x, y}}, i
...
, we have a new set in which an
element (a set formed using the first element of the ordered pair) is a subset of the other element (a set
formed with both the elements of the ordered pair)
...
As the two sets {{x}, {x, y}} and {{y}, {x, y}} are
not the same, the ordered pair (x, y) 6= (y, x)
...
3
...
Let X, Y, Z and W be nonempty sets
...
The product construction can be used on sets several times, e
...
,

DR

X × Y × Z = {(x, y, z) : x ∈ X, y ∈ Y, z ∈ Z} = (X × Y ) × Z = X × (Y × Z)
...
X × (Y ∪ Z) = (X × Y ) ∪ (X × Z)
...
X × (Y ∩ Z) = (X × Y ) ∩ (X × Z)
...
(X × Y ) ∩ (Z × W ) = (X ∩ Z) × (Y ∩ W )
...
(X × Y ) ∪ (Z × W ) ⊆ (X ∪ Z) × (Y ∪ W )
...

6
...
For example, x is taller than y can be a relation
...

Definition 1
...
5
...
A relation R from X to Y is a subset of
X × Y , i
...
, it is a collection of certain ordered pairs
...

Thus, for any two sets X and Y , the sets ∅ and X × Y are always relations from X to Y
...

Example 1
...
6
...
Let X be any nonempty set and consider the set P(X)
...

2
...
Some relations R on A are:
(a) R = A × A
...
3
...

(c) R = {(a, a), (b, b), (c, c)}
...

(e) R = {(a, a), (a, b), (b, a), (a, c), (c, a), (c, c), (b, b)}
...

(g) R = {(a, a), (b, b), (c, c), (d, d), (a, b), (b, c)}
...

(i) R = {(a, a), (b, b), (c, c), (a, b), (b, c)}
...
For example,
to draw pictures for relations on a set X, we first put a node for each element x ∈ X and label
it x
...
If (x, x) ∈ R then a loop is
drawn at x
...
1
...
b

Example 2
...
1: Pictorial representation of some relations from Example 2

3
...
Figure 1
...
1

1

a

2

b

3

c
R

Figure 1
...
Let R = {(x, y) : x, y ∈ Z and y = x + 5m for some m ∈ Z} is a relation on Z
...

5
...
Let R = {(x, y) : x, y ∈ Z and y = x + nm for some m ∈ Z}
...
A picture for this relation has no arrow between any two elements of {1, 2, 3,
...

1

We use pictures to help our understanding and they are not parts of proof
...
BASIC SET THEORY

Definition 1
...
7
...
Then,
the inverse relation, denoted by R−1 , is a relation from Y to X, defined by R−1 = {(y, x) ∈ Y × X :
(x, y) ∈ R}
...


Example 1
...
8
...
If R = {(1, a), (1, b), (2, c)} then R−1 = {(a, 1), (b, 1), (c, 2)}
...
Let R = {(a, b), (b, c), (a, c)} be a relation on A = {a, b, c} then R−1 = {(b, a), (c, b), (c, a)} is
also a relation on A
...
Consider an element x ∈ X
...
This gives rise to the following three possibilities:
1
...


2
...

3
...

One can ask similar questions for an element y ∈ Y
...

Definition 1
...
9
...
Then,
1
...
the set rng R:= {y ∈ Y : (x, y) ∈ R} is called the range of R
...
3
...
Let R be a nonempty relation from X to Y
...
for any set Z, one writes R(Z) := {y : (z, y) ∈ R for some z ∈ Z}
...
for any set W , one writes R−1 (W ) := {x ∈ X : (x, w) ∈ R for some w ∈ W }
...
3
...
Let a, b, c, and d be distinct symbols and let R = {1, a), (1, b), (2, c)}
...
dom R = {1, 2}, rng R = {a, b, c},

2
...


3
...
R−1 ({a}) = {1}, R−1 ({a, b}) = {1}, R−1 ({b, c}) = {1, 2}, R−1 ({a, d}) = {1}, R−1 ({d}) = ∅
...

Proposition 1
...
12
...

1
...


2
...

3
...


4
...

Proof
...
The proof of the first two parts is left as an exercise
...
Let f (S) 6= ∅
...
It implies that a ∈ dom f ∩ S
(a ∈ S)
...


4
...
There exist b ∈ rng f ∩ S and a ∈ A such that (a, b) ∈ f
...
Similarly, the converse follows
...


15

1
...
FUNCTIONS

1
...
4
...
Let X and Y be nonempty sets and let f be a relation from X to Y
...
f is called a partial function from X to Y , denoted by f : X * Y , if for each x ∈ X, f ({x})
is either a singleton or ∅
...
For an element x ∈ X, if f ({x}) = {y}, a singleton, we write f (x) = y
...

f (x) is said to be undefined at x ∈ X if f ({x}) = ∅
...
If f is a partial function from X to Y such that for each x ∈ X, f ({x}) is a singleton then f is
called a function and is denoted by f : X → Y
...

Thus, if f : X * Y , then for each x ∈ X, either f (x) is undefined, or there exists a unique y ∈ Y
such that f (x) = y
...
e
...

It thus follows that a partial function f : X * Y is a function if and only if dom f = X, i
...
,
domain set of f is X
...
4
...
Let A = {a, b, c, d}, B = {1, 2, 3, 4} and X = {3, 4, b, c}
...
Consider the relation R1 = {(a, 1), (b, 1), (c, 2)} from A to B
...

(a) R1 is a partial function
...


AF

T

(b) R1 (a) = 1, R1 (b) = 1, R1 (c) = 2
...


DR

(d) R1−1 = {(1, a), (1, b), (2, c)}
...
For any x ∈ X,
R1−1 (x) = ∅
...

2
...
The following are true
...

(b) R2 (a) = 1, R2 (b) = 4, R2 (c) = 2 and R2 (d) = 3
...


(d) R2−1 (1) = a, R2−1 (2) = c, R2−1 (3) = d and R2−1 (4) = b
...

Convention:
Let p(x) be a polynomial in the variable x with integer coefficients
...
For example,
the function f : Z → Z given by f (x) = x2 corresponds to the set {(a, a2 ) : a ∈ Z}
...
4
...

1
...
Then, f is a partial function with dom f = {a, b, d} and rng f = {1, 5}
...
Also, using g, one
obtains the relation g −1 = {(1, b), (5, a), (5, d)}
...
The following relations f : Z → Z are indeed functions
...


(b) f = {(x, −1) : x ∈ Z}
...


16

CHAPTER 1
...
Define f : Q+ → N by f = {( pq , 2p 3q ) : p, q ∈ N, q 6= 0, p and q are coprime}
...


Remark 1
...
4
...
If X = ∅, then by convention, one assumes that there is a function, called the
empty function, from X to Y
...
If Y = ∅ and X 6= ∅, then by convention, we say that there is no function from X to Y
...
Individual relations and functions are also sets
...
e
...
For example, let X = {−1, 0, 1}
...

4
...

5
...

Some important functions are now defined
...
4
...
Let X be a nonempty set
...
The relation Id := {(x, x) : x ∈ X} is called the identity relation on X
...
The function f : X → X defined by f (x) = x, for all x ∈ X, is called the identity function and
is denoted by Id
...
Do the following relations represent functions? Why?

DR

Exercise 1
...
6
...
The function f : X → R with f (x) = 0, for all x ∈ X, is called the zero function and is denoted
by 0
...
f = {(x, 1) : 2 divides x} ∪ {(x, 5) : 3 divides x}
...
f = {(x, 1) : x ∈ S} ∪ {(x, −1) : x ∈ S c }, where S = {n2 : n ∈ Z} and S c = Z \ S
...
f = {(x, x3 ) : x ∈ Z}
...


(c) f : R → R defined by f = {(x, x) : x ∈ R}
...

(e) f : R− → R defined by f = {(x, loge |x|) : x ∈ R− }, where R− is the set of all negative real
numbers
...

2
...
Then f −1 is a relation from Y to X
...

(b) f −1 (A ∩ B) = f −1 (A) ∩ f −1 (B) for all A, B ⊆ Y
...


(d) f −1 (Y ) = X
...

3
...
It is a relation from R to R
...


17

1
...
FUNCTIONS

Definition 1
...
7
...
Equivalently, f is one-one if for all x, y ∈ X, f (x) = f (y)
implies x = y
...
4
...


1
...
Then, the identity map Id on X is one-one
...
Let X be a nonempty proper subset of Y
...

3
...

4
...

It can be checked that there are 24 one-one functions f : {1, 2, 3} → {a, b, c, d}
...
There is no one-one function from the set {1, 2, 3} to its proper subset {1, 2}
...
There are one-one functions from the set N of natural numbers to its proper subset {2, 3,
...

Definition 1
...
9
...
Let A ⊆ X and A 6= ∅
...

Example 1
...
10
...
Then,
fQ : Q → R is the zero function
...
4
...
Let f : X → Y be a one-one function and let Z be a nonempty subset of X
...


DR

AF

T

Proof
...
Then f (x) = f (y)
...
Thus,
fZ is one-one
...
4
...
A function f : X → Y is said to be surjective (also called onto or a surjection)
if f −1 ({b}) 6= ∅ for each b ∈ Y
...

Example 1
...
13
...
Let X be a nonempty set
...


2
...
Then the identity map f : X → Y is not onto
...
There are 6 onto functions from {a, b, c} to {a, b}
...

4
...
Fix an element a ∈ X
...

Then g is an onto function
...
There does not exist any onto function from the set {a, b} to its proper superset {a, b, c}
...
There exist onto functions from the set {2, 3,
...
An example of such
a function is f (n) = n − 1 for all n ≥ 2
...
4
...
Let X and Y be sets
...
The set X is said to be equinumerous1 with the set Y if
there exists a bijection f : X → Y
...


18

CHAPTER 1
...
Hence, X
and Y are said to be equinumerous sets
...
4
...

1
...
Thus, f −1 : {a, b, c} → {1, 2, 3} is a bijection; and the set {a, b, c} is
equinumerous with {1, 2, 3}
...
Let X be a nonempty set
...
Thus, the set X is
equinumerous with itself
...
The set N is equinumerous with {2, 3,
...
} defined by
f (1) = 3, f (2) = 2 and f (n) = n + 1, for all n ≥ 3 is a bijection
...
4
...

1
...
Then, for every choice of pairs x, y with x ∈ X
and y ∈ Y there exists a bijection, say h : X → Y , such that h(x) = y
...
Define f : W → Z by f = { x, −x
: x is even} ∪ { x, x+1
: x is odd}
...
Define f : N → Z by f = {(x, 2x) : x ∈ N}, and g : Z → Z by g = { x, x2 : x is even} ∪ {(x, 0) :
x is odd}
...
Let X be a nonempty set
...

5
...
Then, ∩ Rn is a one-one relation
...
5

DR

AF

T

6
...
, 9} each having 5 elements and let B be the set of 5
digit numbers with strictly increasing digits
...
Is f one-one and onto?

Composition of functions

Definition 1
...
1
...
Then, the composition of
f and g, denoted by g ◦ f , is defined as
g ◦ f = {(x, z) : (x, y) ∈ f and (y, z) ∈ g for some y ∈ rng f ⊆ dom g}
...
In case, both f
and g are functions, g ◦ f is also a function, and (g ◦ f )(x) = g (f (x)) as (x, z) ∈ g ◦ f implies that
there exists y such that y = f (x) and z = g(y)
...

Example 1
...
2
...
Then, g◦f = {(3, β), (β, 3)}
and f ◦ g = {(a, b), (a, c), (b, a), (c, a)}
...

Proposition 1
...
3
...


Let f : X → Y, g : Y → Z and

1
...
Moreover, (h ◦ g) ◦ f =
h ◦ (g ◦ f ) (associativity holds)
...
If f and g are injections then g ◦ f : X → Z is an injection
...
If f and g are surjections then g ◦ f : X → Z is a surjection
...
If f and g are bijections then g ◦ f : X → Z is a bijection
...
6
...
[Extension] If dom f ∩ dom h = ∅ and rng f ∩ rng h = ∅ then the function f ∪ h from X ∪ Z to
Y ∪ W defined by f ∪ h = {(a, f (a)) : a ∈ X} ∪ {(c, h(c)) : c ∈ Z} is a bijection
...
Let X and Y be sets with at least two elements each and let f : X → Y be a bijection
...

Theorem 1
...
4
...
Then, for any two functions f : X → Y and g : Y → X,
f ◦ Id = f

and

Id ◦ g = g
...
By definition, (f ◦ Id)(x) = f (Id(x)) = f (x), for all x ∈ X
...
Similarly, the
other equality follows
...

Theorem 1
...
5
...
Then f is one-one and g is onto
...
To show that f is one-one, suppose f (a) = f (b) for some a, b ∈ X
...


AF

T

Thus, f is one-one
...
Write b = f (a)
...
That is,
we have found b ∈ Y such that g(b) = a
...


DR


Exercise 1
...
6
...
Let f, g : W → W be defined by f = {(x, 2x) : x ∈ W} and g = { x, x2 :
x is even} ∪ {(x, 0) : x is odd}
...

2
...
Prove that f −1 : Y → X is a function if and only if f is a
bijection
...
Define f : N × N → N by f (m, n) = 2m−1 (2n − 1)
...
Let f : X → Y be a bijection and let A ⊆ X
...
Let f : X → Y and g : Y → X be two functions such that
(a) (f ◦ g)(y) = y for each y ∈ Y ,

(b) (g ◦ f )(x) = x for each x ∈ X
...
Can we conclude the same without assuming the second
condition?

1
...

Definition 1
...
1
...
Then, a relation R on A is said to be
1
...

2
...

3
...


20

CHAPTER 1
...
6
...
For relations defined in Example 1
...
6, determine which of them are
1
...

2
...

3
...

Definition 1
...
3
...
A relation on A is called an equivalence relation if it
is reflexive, symmetric and transitive
...
The equivalence class of the equivalence relation ∼ containing an element a ∈ A is
denoted by [a], and is defined as [a] := {x ∈ A : x ∼ a}
...
6
...


1
...
3
...


(a) The relation in Example 1
...
6
...

(b) The relation in Example 1
...
6
...

(c) Other relations in Example 1
...
6
...

(d) The relation in Example 1
...
6
...
[0] = {
...

ii
...
, −14, −9, −4, 1, 6, 11,
...
[2] = {
...

iv
...
, −12, −7, −2, 3, 8, 13,
...
[4] = {
...


DR

AF

T

(e) The relation in Example 1
...
6
...
, −3n, −2n, −n, 0, n, 2n,
...
, −3n + 1, −2n + 1, −n + 1, 1, n + 1, 2n + 1,
...
, −3n + 2, −2n + 2, −n + 2, 2, n + 2, 2n + 2,
...


...
, −2n − 2, −n − 2, −2, n − 2, 2n − 2, 3n − 2,
...
, −2n − 1, −n − 1, −1, n − 1, 2n − 1, 3n − 1,
...
Consider the relation R = {(a, a), (b, b), (c, c)} on the set A = {a, b, c}
...

3
...
It
has two equivalence classes, namely [a] = [c] = {a, c} and [b] = {b}
...
6
...
[Equivalence relation divides a set into disjoint classes] Let ∼ be an equivalence
relation on a nonempty set X
...
any two equivalence classes are either disjoint or identical ;
2
...

That is, an equivalence relation ∼ on X divides X into disjoint equivalence classes
...
1
...
If the equivalence classes [a] and [b] are disjoint,
then there is nothing to prove
...
That is,
c ∼ a and c ∼ b
...
We will show that [a] = [b]
...
Then x ∼ a
...
Again, c ∼ b
and transitivity of ∼ imply that x ∼ b
...
That is, [a] ⊆ [b]
...
Thus, whenever two equivalence classes intersect, they are indeed equal
...
6
...
Notice that for each x ∈ X, the equivalence class [x] is well defined, x ∈ [x] and [x] ⊆ X
...

x∈X

Exercise 1
...
6
...
Further, for
each equivalence relation, determine its equivalence classes
...
R = {(a, b) ∈ Z2 : a ≤ b} on Z
...
R = {(a, b) ∈ Z∗ × Z∗ : a divides b} on Z∗ , where Z∗ = Z \ {0}
...
Recall the greatest integer function f : R → Z given by f (x) = [x] and let R = {(a, b) ∈ R × R :
[a] = [b]} on R
...
For x = (x1 , x2 ), y = (y1 , y2 ) ∈ R2 and R∗ = R \ {0}, let
(a) R = {(x, y) ∈ R2 × R2 : x21 + x22 = y12 + y22 }
...

(c) R = {(x, y) ∈ R2 × R2 : 4x21 + 9x22 = 4y12 + 9y22 }
...


(e) Fix c ∈ R
...


(f ) R = {(x, y) ∈ R2 × R2 : |x1 | + |x2 | = α(|y1 | + |y2 |)}, for some number α ∈ R+
...


DR

(b) R = {(x, y) ∈ S × S : x = −y}
...


T

5
...
Then, are the relations
given below an equivalence relation on S?

Definition 1
...
7
...
Then a partition of X is a collection of disjoint,
nonempty subsets of X whose union is X
...
6
...
Let X = {a, b, c, d, e}
...
Then {{a, b}, {c, e}, {d}} is a partition of X
...
The
equivalence classes of R are [a] = [b] = {a, b}, [c] = [e] = {c, e} and [d] = {d}, which constitute
the said partition of X
...
Consider the partition {{a}, {b, c, d}, {e}} of X
...

Given a partition of a nonempty set X, does there exists an equivalence relation on X such that
the disjoint equivalence classes are exactly the elements of the partition? Recall that the elements of
a partition are subsets of the given set
...
6
...
[Constructing equivalence relation from equivalence classes] Let P be a partition of a nonempty set X
...


22

CHAPTER 1
...

Proof
...

Let x ∈ X
...
Then x ∼ x
...

Let x, y ∈ X such that x ∼ y
...
So, y ∼ x
...

Let x, y, z ∈ X such that x ∼ y and y ∼ z
...
It follows that x ∼ z
...

To complete the proof, we show that
1
...

2
...

1
...
This x is in some A ∈ P
...
Then [x] = A
...
Similarly, let B ∈ P
...
Now y ∈ B ⇔ y ∼ x ⇔ y ∈ [x]
...

Exercise 1
...
10
...
Let X and Y be two nonempty sets and f be a relation from X to Y
...
Then,
(a) is it necessary that f −1 ◦ f ⊆ IdX ?

AF

(c) is it necessary that f ◦ f −1 ⊆ IdY ?

T

(b) is it necessary that f −1 ◦ f ⊇ IdX ?

DR

(d) is it necessary that f ◦ f −1 ⊇ IdY ?

2
...
Then,
(a) is it necessary that f ◦ f −1 ⊆ IdY ?

(b) is it necessary that IdX ⊆ f −1 ◦ f ?

3
...
Is X × X an equivalence relation on X? If yes, what are the equivalence classes?
4
...
Supply the equivalence relation on R whose equivalence classes are {[m, m + 1) : m ∈ Z}
...
A relation on a nonempty set may or may not be reflexive, symmetric, or transitive
...
With X = {1, 2, 3, 4, 5}, give one example for each type of such relations
...
What is the number of all relations on {1, 2, 3}?
8
...
What is the number of relations f on {1, 2, 3} such that f = f −1 ?
10
...
What is the number of functions from {1, 2, 3} to {a1 , a2 ,
...
What is the number of equivalence relations on {1, 2, 3, 4, 5}?
13
...
Then, is it possible to have f ◦g as an equivalence
relation? Give reasons for your answer
...
6
...
Let f, g be two equivalence relations on R
...

(a) f ◦ g is necessarily an equivalence relation
...

(c) f ∪ g is necessarily an equivalence relation
...
(g c = (R × R) \ g)

24

DR

AF

T

CHAPTER 1
...
Mathematical works do consist of proofs, just as
poems do consist of words - V
...


2
...
1 ∈ N, i
...
, 1 is a natural number
...
These axioms are credited to the
Italian mathematician G
...
W
...
Dedekind
...
Each of these axioms, listed P1
to P3 below, is crucial to the properties that the set of natural numbers enjoy
...
We now generate more natural numbers
using the successor function
...
The existence of the successor function is a property unique to the set of natural numbers
...
There exists an injective function S : N → N \ {1}
...

Axiom P2 implies that 1 is not the successor of any natural number
...
Now S(S(1)), which is S(2), is different from both 1 and 2
...
By a similar
argument, denote S(3) to be 4, S(4) to be 5, etc
...
} is also an element of N
...
e
...

Further, to exclude versions of N that are ‘too large’, the last axiom, called the Axiom of
Induction is stated next
...
[Axiom of Induction] Let X ⊆ N be such that
1
...
for each x ∈ X, S(x) ∈ X
...

Axioms P1 and P2 ensure that {1, 2,
...
Further, as 1 ∈ {1, 2,
...
}, S(n) ∈ {1, 2,
...

The next result ensures that any natural number different from 1 has to be a successor of some
other natural number
...

25

26

CHAPTER 2
...
1
...
If n ∈ N and n 6= 1, then there exists m ∈ N such that S(m) = n
...
Let X = {x ∈ N : x = 1 or ∃ y ∈ N such that x = S(y)}
...
e
...


So, for any x ∈ X \ {1}, there must exist y ∈ N such that x = S(y)
...

Therefore, S(x) = S(S(y)) implies that S(x) ∈ X
...


The existence of the set of natural numbers has been established axiomatically
...
The arithmetic in N that
touches every aspect of our lives is clearly addition and multiplication
...
1 is always a natural number by Axiom P1
...
Here, we define n + 1 = S(n)
...
Without loss of generality assume that
m 6= 1
...
1
...
So, to define n + m, it is sufficient
to define n + S(k)
...

For example, suppose we wish to compute 1 + 2
...
So,
1 + 2 = 1 + S(1)
...
Thus, 1 + S(1) = S(1 + 1) = S(2) = 3
...
In short, the definition for addition is:
Definition 2
...
2
...


AF

2
...


T

1
...
” can be defined
...

The multiplication of arbitrary natural numbers is now defined in a recursive manner
...
1
...
The multiplication of two natural numbers is defined as follows
...
For all n ∈ N, n · 1 := n, and
2
...

We follow the usual convention of writing (n · m) + k as n · m + k
...

1
...

Proof
...
We show that X = N
...
As
n + (m + 1) = n + S(m)

(Definition 2
...
2
...
1
...
2)

= (n + m) + 1,

(Definition 2
...
2
...
Now, let z ∈ X and let us show that S(z) ∈ X
...


(2
...
1
...
1), we see that

n+(m+S(z)) = n+S(m+z) = S(n+(m+z)) = S((n+m)+z) = (n+m)+S(z) for all n, m ∈ N
...

2
...

Proof
...
We show that X = N
...

Firstly, 1 + 1 = 1 + 1 and hence 1 ∈ Y
...
To show S(y) ∈ Y
...

Thus, S(y) ∈ Y and hence by Axiom P3, Y = N
...

Now, let z ∈ X
...
But, z ∈ X implies that n + z = z + n, for all n ∈ N
...
Hence, S(z) ∈ X and thus by Axiom P3, X = N
...
[Distributive law] For every n, m, k ∈ N, n · (m + k) = n · m + n · k
...
Let X = {k ∈ N : for all m, n ∈ N, n · (m + k) = n · m + n · k}
...


n · (m + 1) = n · S(m) = n · m + n = n · m + n · 1
...
Since z ∈ X
n · (m + z) = n · m + n · z, for all n, m ∈ N
...
2)

Thus, by definition and Equation (2
...
Hence, S(z) ∈ X and thus by Axiom P3, X = N
...
1
...
Prove the following using only the above properties:
1
...

2
...

3
...

4
...

5
...

6
...

7
...

8
...


28

CHAPTER 2
...
2

Other forms of Principle of Mathematical Induction

Mathematical Induction is an important and useful technique used for proofs in Mathematics
...
We discuss this principle now
...
Consider the
set X = {n ∈ N : P (n) is true }
...
In other words, if P (1) is true and P (n) is true
implies P (n + 1) is true for all n ∈ N then one concludes that P (n) is true for all n ∈ N
...

[Principle of Mathematical Induction (PMI)] Let P (n) be a statement (proposition) dependent on

a natural number n ∈ N such that the following hold:
1
...

2
...

Then, P (n) is true for all n ∈ N
...


Observation
...
Suppose I wish to climb the ladder
...
I step onto the first rung of the ladder
...
When I am on the k-th rung of the ladder, I know how to climb to the (k + 1)-th rung
...

When k = 2, by 2, I can climb to the third rung
...
This is the essence of mathematical induction
...
The above idea is formalized as the
principle of mathematical induction
...

We now present three simple examples to illustrate this
...
Compute the sum of the first n natural numbers
...

2
i=1

Example 2
...
1
...

2
i=1
(b) Induction hypothesis: Let us assume that P (k) holds and show that P (k + 1) holds
...

2
2

Thus, by PMI P (n) is true for all n ∈ N
...
Prove that 6 divides n3 + 5n for all natural numbers
...

(a) Base step: n = 1 ⇒ 13 + 5 · 1 = 6, which is clearly divisible by 6
...
2
...
Note
that the properties of addition and multiplication implies that (k + 1)3 = k 3 + 3k 2 + 3k + 1
...

By induction hypothesis, 6 divides k 3 + 5k; 6 divides 6 and 6 also divides 3k(k + 1) as either
k or k + 1 is even for all natural number k
...





1 1
1 n
n
3
...
Then prove that A =
, for all n ≥ 1
...
Then,
0 1


1 1
(a) P (1) = A = A1 =
holds true
...
Here, P (k) holds true

1 k

...

0 1 0 1
0
1

AF

T

Thus, by PMI P (n) is true for all n ≥ 1
...

Theorem 2
...
2
...
Base step: P (1) is true
...
Induction step: For each n ∈ N, P (1), P (2),
...

Then, P (n) is true for all n ∈ N
...
Let X = {n ∈ N : P (1) and P (2) and
...
Since P (1) is assumed true,
1 ∈ X
...
Then all of P (1), P (2),
...
By the induction step, P (n + 1)
is true
...
Thus, X is an inductive set and hence by Axiom P3, X = N
...

As expected, PSI is equivalent to PMI
...

Theorem 2
...
3
...

Suppose that P means the statement ‘P (n) is true for each n ∈ N
...

Proof
...
Hence, P (1) is true
...
Therefore, we can recursively establish
that P (n + 1) is true if P (1),
...
Hence, P can be proved using PSI
...
Define Q(n) to mean ‘P (`) holds
for ` = 1, 2,
...
’ Notice that Q(1) is true
...
e
...
THE NATURAL NUMBER SYSTEM

` = 1, 2,
...
But, by hypothesis, we know that P has been proved using PSI
...
, n
...
Hence, by
PMI, Q(n) is true for all n ∈ N using PMI
...

There are many variations of PMI and PSI
...
, n0 }
(for some fixed n0 ∈ N) instead of N
...

Theorem 2
...
4
...
Let P (n) be a statement dependent on n ∈ N
such that the following hold:
1
...

2
...

Then, P (n) is true for each n ≥ n0 + 1
...
Since n0 ∈ N, for each n ∈ N, n + n0 ∈ N
...
Then
Q(1) = P (n0 + 1)
...
Then, n = n0 + `, for some ` ∈ N with ` ≥ 1
...

Then, by definition P (` + n0 ) = P (n) holds true as Q(`) = P (` + n0 )
...

Thus, Q(` + 1) = P (` + 1 + n0 ) holds true
...
Q(1) is true
...
Further, for each ` ∈ N, ` ≥ 1 the assumption Q(`) is true implies that Q(` + 1) is true
...
However, m ≥ 1 implies n ≥ n0 + 1
...

Exercise 2
...
5
...

1
...
Let P (n) be a statement dependent on n ∈ N such that
the following hold:
P (n0 + 1) is true
...
, P (n) are true implies P (n + 1) is true
...

2
...
Let X ⊆ N0 be such that
n0 + 1 ∈ X, and for each n ∈ N0 , n0 + 1, n0 + 2,
...
Then X = N0
...

Example 2
...
6
...
1
Let P (n) be the statement that any natural number n ≥ 2 can be written as a product of primes
...
Base step: Let n = 2
...

2
...
, P (k) are all true
...
Then, we consider the following two cases:
(a) If k + 1 is prime then P (k + 1) holds
...
1
...


2
...
APPLICATIONS OF PRINCIPLE OF MATHEMATICAL INDUCTION

31

(b) k + 1 is not a prime
...
, k} such that p · q = k + 1
...
Thus, k + 1 = (p1 · · · ps ) · (q1 · · · qt )
...

Hence by PSI, P (n) is true for all n ∈ N
...
3

Applications of Principle of Mathematical Induction

Example 2
...
1
...
Show that for each x ∈ N, x ≥ 2, there exists a unique t ∈ N such that 1 + 2 + · · · + t < x ≤
1 + 2 + · · · + t + (t + 1)
...
Let S0 = 01 and let St = 1 + 2 + · · · + t for t ∈ N
...

The base steps in PMI and PSI are important, and overlooking these may result in spurious
arguments
...

Example 2
...
2
...
Find the error
...
The statement holds trivially for n = 1
...
Take a
collection Bk+1 of k + 1 balls that contains at least one green ball
...
Then by the induction hypothesis, each ball in Bk is
green
...
Call it
Bk0
...
Thus, each ball in Bk+1 is green
...

The following result enables us to define a function on N inductively
...
3
...
[Inductive definition of function] Let f be a relation from N to a nonempty set X
satisfying
1
...
for each n ∈ N, if f ({n}) is a singleton implies f ({S(n)}) is a singleton
...

Proof
...
Now, let A = dom f
...
So, by the induction axiom A = N
...

In the following exercises, assume the usual properties of xn where x ∈ C and n ∈ N ∪ {0}
...
Let a, a+d, a+2d,
...
Then
(a + id) = a + (a + d) + · · · + (a + (n − 1)d) = (2a + (n − 1)d)
...
3
...


i=0

2
...
, arn−1

Then

n−1
X
i=0

be the first n terms of a geometric progression, with a, r ∈ C, r 6= 1
...

r−1

3
...
6 for the construction of the set of integers
...
THE NATURAL NUMBER SYSTEM
(a) 6 divides n3 − n, for all n ∈ N
...

(c) 7 divides n7 − n, for all n ∈ N
...


(e) 9 divides 22n − 3n − 1, for all n ∈ N
...


(g) 12 divides 22n+2 − 3n4 + 3n2 − 4, for all n ∈ N
...


4
...

5
...

6
...


7
...


8
...

9
...
, a9 be non-negative real numbers such that the sum a1 + · · · + a9 = 5
...
, a9 and argue that
 a + a 2
a1 + a2 a1 + a2
1
2
+
+ a3 + · · · + a9 = 5, a1 · · · a9 ≤
a3 · · · a9
...


DR

(c) The product of n ≥ 2 non-negative real numbers is maximum when all numbers are equal
...
, an be non-negative real numbers
...

10
...

11
...

12
...

2
2
4
6
l=1

13
...
Consider a 2n × 2n
square with one unit square cut
...


L-shaped piece

4 × 4 square with a unit square cut

Show that a 2n × 2n square with one unit square cut, can be tiled with L-shaped pieces
...
Use (k + 1)5 − k 5 = 5k 4 + 10k 3 + 10k 2 + 5k + 1 to get a closed form expression for
k 4
...


k=1

2
...
WELL ORDERING PROPERTY OF NATURAL NUMBERS

2
...
So, for any m, n ∈ N, we need to define
what n < m means?
Definition 2
...
1
...
Then, the natural number n is said to be strictly less than the
natural number m, denoted by n < m, (in word, n is less than m) if there exists a k ∈ N such that
m = n + k
...
When n < m, we also write
m > n and read it as m is greater than n
...

Lemma 2
...
2
...
Then x < z
...
Since x < y, there exists k ∈ N such that y = x + k
...
Hence, z = y + ` = (x + k) + ` = x + (k + `) = x + t, where t = k + ` ∈ N as
k, ` ∈ N
...
4
...


Exercise 2
...
3
...
Then prove the following:
1
...

3
...


DR

AF

4
...


T

2
...


Lemma 2
...
4
...


Proof
...
Then m + 1 = m + n + 1 = m + S(n)
...
1
...
2), 1 = S(n), contradicting Axiom P2
...
4
...
[Law of trichotomy]

For all m, n ∈ N, exactly one of the following is true:
n < m,

n = m,

n > m
...
As a first step, we show that no two of the above can hold together
...
Then n = m + k for some k ∈ N and n = m
...
4
...
As another possibility, assume that n < m and n > m
...
So that n = m + k = n + (` + k), which again contradicts Lemma 2
...
4
...

To complete the proof, fix n ∈ N, and define X = {m ∈ N : n < m or n = m or n > m}
...

First, we need to show that 1 ∈ X
...
If n 6= 1 then there
exists y ∈ N such that n = S(y) = y + 1 = 1 + y and hence by the definition of order, 1 < n or n > 1
...

Next, in order to apply Axiom P3, assume that m ∈ X
...

We will consider all three cases and in each case show that S(m) ∈ X
...
Thus, S(m) = S(n + `) = (n + `) + 1 = n + (` + 1); and
hence n < S(m)
...


34

CHAPTER 2
...
So, n < S(m)
...


If n > m then n = m + k, for some k ∈ N
...
Thus,
S(m) ∈ X
...
Then,
n = m + k = m + S(`) = m + (` + 1) = m + (1 + `) = (m + 1) + ` = S(m) + `
...

Thus, by Axiom P3, X = N
...
Or equivalently, if n ≤ m < n + 1, then it is necessarily true that n = m
...

Lemma 2
...
6
...

Proof
...
Suppose m ≤ n
...
So, if m = n, then n < n + 1 implies that
m < n + 1
...
Thus, in any case, m < n + 1
...
If m 6≤ n, then by the law of trichotomy, m > n
...
It follows that n + ` < n + 1 for some ` ∈ N
...
1
...
2), one has ` < 1
...

The first case implies 1 < 1 and the second case implies that 1 is a successor of some natural number;
giving us a contradiction in either case
...


T

We are now in a position to state an important principle, namely the well ordering principle
...
4
...
[Well Ordering Principle in N]
element
...
By definition, a least element of a set is an element of the set
...
On the contrary, suppose A is a nonempty subset of
N that has no least element
...
If 1 ∈ A, then 1 will be the least element of A
...

Suppose 1, 2,
...
Then, none of 1, 2,
...
If S(m) ∈ A, then S(m) would be the
least element of A
...

Hence, by the strong form of induction, B = N
...


Exercise 2
...
8
...
Then prove that X contains its least element
...
5

Recursion Theorem

Recall how we defined addition and multiplication in N
...
Due to induction, we remarked that for each
m ∈ N, these two conditions defined n + m
...
Notice
that + is a binary operation on N, that is, + is a function from N×N to N
...
Similarly, multiplication is to be tackled
...
The
following result provides this general framework in N
...
5
...
5
...
[Recursion Theorem] Let f : N → N be a function
...


(2
...
Define g ⊆ N × N as follows
1
...
(x, y) ∈ g implies (S(x), f (y)) ∈ g
...
Assume that g({x}) = {y}
...
So, by Theorem 2
...
3, g is a function
...
3)
...

From Equation (2
...
So, 1 ∈ V
...
Here, g1 (n) = g2 (n)
...
Thus,
S(n) ∈ V
...
Therefore, g1 = g2
...

Example 2
...
2
...
[Addition function] Let f : N → N be the function defined by f (x) = S(x),
for all x ∈ N
...
By the recursion theorem, there exists a unique function
(2
...


DR

Define

for all x ∈ N, y + x := g(x)

(2
...
5), we get y + 1 = g(1)
...

Further, for any x ∈ N, we see that
y + S(x) = g(S(x))

(using Equation (2
...


(using g(x) = y + x)

Thus, for all y, x ∈ N, y + S(x) = S(y + x)
...
1
...

2
...
(Observe that this is well defined by Part 1
...
Now, define y · x := h(x), for all x ∈ N
...
Further, for any x ∈ N, we see that
y · S(x) = h(S(x)) = f (h(x)) = f (y · x) = y · x + y,
thereby, proving both the rules of multiplication stated in Definition 2
...
3
...
THE NATURAL NUMBER SYSTEM
3
...
(Part 2 allows us to define such a function
...
Now, define mx := p(x), for all x ∈ N
...
Further, for any x ∈ N, S(x) = x + 1 gives
mx+1 = mS(x) = p(S(x)) = f (p(x)) = p(x) · m = (mx ) · m
...


Remark 2
...
3
...
5
...
1, it was easy to show that y + S(x) = S(y + x), for all
y, x ∈ N
...
5
...
1 gives us commutativity of addition
...


By the recursion theorem, there exists a unique function t : N → N such that t(1) = S(S(y)) and
f (t(x)) = t(S(x)), for all x ∈ N
...


(2
...
5
...
1) and g(1) = y + 1 (Equation (2
...
This implies that 1 ∈ X
...
Now, consider S(y) + S(x)
...
5
...
1, S(y) + S(x) = S(S(y) + x)
...

where the last equality also follows from Example 2
...
2
...

Therefore, S(x) ∈ X, whenever x ∈ X
...


2
...
Similarly, the construction of integers from natural numbers and the
construction of rational numbers from integers require quite a lot of work
...
In this section and the succeeding one, we will discuss
how to construct the integers and rational numbers from the natural numbers
...
We define a relation ‘∼’ on X by
(a, b) ∼ (c, d) if a + d = b + c for all a, b, c, d ∈ N
...
Let Z denote the collection of all equivalence classes under this relation
...
Now, using the successor function S defined in Axiom P2, observe that
1
...
for a fixed element m ∈ N, [(1, S(m))] = {(n, m + n) : for all n ∈ N}, and
3
...


37

2
...
CONSTRUCTION OF INTEGERS
Further, Z consists of all equivalence classes of the above forms
...

Definition 2
...
1
...
Define
[x] ⊕ [y] = [(x1 , x2 )] ⊕ [(y1 , y2 )] = [(x1 + y1 , x2 + y2 )]
...
7)

The map ⊕ : Z × Z → Z, defined above is called the addition in Z
...
e
...
Thus, we need to verify that the addition of two different
representatives of the domain, give rise to the same set on the range
...
So, let us now prove that ⊕ is well-defined
...
6
...
The map ⊕ defined in Equation (2
...

Proof
...
Then, by
definition
[(u1 , u2 )] ⊕ [(x1 , x2 )] = [(u1 + x1 , u2 + x2 )],

[(v1 , v2 )] ⊕ [(y1 , y2 )] = [(v1 + y1 , v2 + y2 )]
...
Or equivalently,
we need to show that u1 + x1 + v2 + y2 = u2 + x2 + v1 + y1
...
Thus, adding the two and using the commutativity of addition
in N, we get
u1 + x1 + v2 + y2 = u2 + x2 + v1 + y1
...

On similar lines, we now define multiplication among elements of Z
...
6
...
Let [x] = [(x1 , x2 )], [y] = [(y1 , y2 )] ∈ Z, for some x1 , x2 , y1 , y2 ∈ N
...


(2
...
So, the readers are required to prove that
multiplication is well-defined
...

Exercise 2
...
4
...
Show that the multiplication defined in Equation (2
...


2
...
Write [0] = [(1, 1)]
...

(b) [Commutativity of addition] [x] + [y] = [y] + [x]
...

(d) [Cancellation property] If [x] + [y] = [x] + [z] then [y] = [z]
...


38

CHAPTER 2
...
Now, use the cancellation property in Z to show
that the additive inverse is unique
...

(f ) [Distributive laws] ([x] + [y]) [z] = [x] [z] ⊕ [y] [z]
...


(h) [Commutativity of multiplication] [x] [y] = [y] [x]
...


(j) [Cancellation property] If [x] [y] = [x] [z] with [x] 6= [0] then [y] = [z]
...


As a last property, we show that a copy of N naturally seats inside Z
...
6
...
Define f : N → Z by f (n) = [(S(n), 1)] for all n ∈ N
...
f is one-one
...
For all a, b ∈ N, f (a + b) = f (a) ⊕ f (b)
...
For all a, b ∈ N, f (a · b) = f (a) f (b)
...
1
...
By definition, [(S(a), 1)] = [(S(b), 1)] or equivalently,
S(a) + 1 = S(b) + 1
...
Since S is one-one, we have
a = b
...
Let a, b ∈ N
...
So

AF

f (a) ⊕ f (b) = [(S(a), 1)] ⊕ [(S(b), 1)] = [(S(a) + S(b), 1 + 1)] = [(S(a) + b + 1, 1 + 1)]

DR

= [(S(a + b) + 1, 1 + 1)] = [(S(a + b), 1)] = f (a + b)
...
Let a, b ∈ N
...
So
f (a) f (b) = [(S(a), 1)] [(S(b), 1)] = [(S(a) · S(b) + 1 · 1, S(a) · 1 + 1 · S(b))]
= [(S(a) · S(b) + 1, S(a) + S(b))] = [(S(a · b), 1)] = f (a b)
as S(a) · S(b) + 1 + 1 = S(a) · b + S(a) · 1 + 1 + 1 = a · b + 1 · b + S(a) + 1 + 1 = S(a · b) + S(b) + S(a)
...
Further, the map f commutes with the addition operation and the
multiplication operation
...
From now on, the symbols
+ and · will be used for addition and multiplication in integers
...
We
proceed to do this in the next few paragraphs
...
6
...
Let [x] = [(x1 , x2 )], [y] = [(y1 , y2 )] ∈ Z, for some x1 , x2 , y1 , y2 ∈ N
...
Further, [x] ≤ [y] if either [x] = [y]
or [x] < [y]
...
So, let [(u1 , u2 )] = [(v1 , v2 )] and [(x1 , x2 )] = [(y1 , y2 )]
be two equivalence classes in Z with [(u1 , u2 )] < [(x1 , x2 )]
...
As [(u1 , u2 )] = [(v1 , v2 )] and [(x1 , x2 )] = [(y1 , y2 )], one has u1 + v2 =
v1 + u2 and x1 + y2 = y1 + x2
...
Hence,
v1 + y2 + x1 + u2 = v1 + u2 + x1 + y2 = u1 + v2 + y1 + x2 = y1 + v2 + u1 + x2
< y1 + v2 + x1 + u2 ,

39

2
...
CONSTRUCTION OF INTEGERS

as u1 + x2 < x1 + u2
...
4
...

Thus, the above definition is well-defined
...
6
...

Lemma 2
...
7
...
Then, for
all a, b ∈ N, a < b if and only if f (a) < f (b)
...
Using Exercise 2
...
3, a < b if and only if a + 1 + 1 < b + 1 + 1, or equivalently, a < b if and
only if S(a) + 1 < S(b) + 1
...

Definition 2
...
8
...
Then, [x] is said to be positive if [0] < [x] and is said to
be non-negative if [0] ≤ [x]
...

Lemma 2
...
9
...
Then, [x] > [0] if and only if x1 > x2
...
By definition, [(x1 , x2 )] > [0] = [(1, 1)] if and only if x1 + 1 > x2 + 1
...
4
...

Exercise 2
...
10
...
Prove the following results for any [x] ∈ Z
...

(b) [x] > 0 if and only if −[x] < 0
...
[y] > [z], for some [y], [z] ∈ Z if and only if [y] + [x] > [z] + [x]
...
If [y] > [z], for some [y], [z] ∈ Z then [y] · [x] > [z] · [x], whenever [x] > 0
...
Thus, whenever we define functions or operations on Z then we need not
worry about well-definedness
...

Definition 2
...
11
...
g(n) = n if n ≥ 0,

2
...

This function is denoted by | · |
...
Further, by Exercise 2
...
10
...

For a better understanding of this function, we prove the following two results
...
6
...
For any x ∈ Z, −|x| ≤ x ≤ |x|
...

Proof
...
Then, by definition |x| = x and hence x ≤ |x|
...
Or equivalently, we need to show that 0 = x + (−x) ≤ x + x = 2x, which
is indeed true
...
Note that the condition
−|x| ≤ x is equivalent to the condition |x| + x ≥ 0 (use Exercise 2
...
10
...

For the second part, we again consider two cases, namely, y ≥ 0 and y < 0
...
If y < 0 then |y| = −y
...
6
...
2,

40

CHAPTER 2
...

Hence |y| = −y ≤ x
...

As a direct application of Lemma 2
...
12, one obtains the triangle inequality
...
6
...
[Triangle inequality in Z] Let x, y ∈ Z
...

Proof
...
6
...
Hence,
−|x| + (−|y|) ≤ x + y ≤ |x| + |y|
...
Thus, the
required result follows from the second part of Lemma 2
...
12
...
As a last note, we
make the following remark
...
7

T

Remark 2
...
14
...
4
...
Furthermore, if we fix an
integer z ∈ Z and take S = {z, z + 1, z + 2,
...
Or equivalently, every nonempty subset X of Z which is bounded
below satisfies the well ordering principle
...

We write Z∗ := Z\{0} and define an equivalence relation on X = Z×Z∗ and then doing everything
afresh as was done for the set of integers
...

Then, verify that ∼ is indeed an equivalence relation on X
...
This set is called the “set of rational numbers”
...
Let [x] = [(x1 , x2 )], [y] = [(y1 , y2 )] ∈ Q
...

2
...
Then, multiplication in Q, denoted as , is defined by
[x] [y] = [(x1 , x2 )] [(y1 , y2 )] = [(x1 · y1 , x2 · y2 )]
...
Further, the
map f : Z → Q defined by f (a) = [(a, 1)], is one-one and it preserves addition and multiplication
...
As earlier, we replace the symbols ‘⊕’ and ‘ ’ by ‘+’ and ‘·’
...
Note that the element 0 ∈ Z corresponds to [(0, 1)] = [(0, x)]
for all x ∈ Z∗
...
Verify that
for each [(x1 , x2 )] ∈ Q with x1 6= 0, the element [(x2 , x1 )] ∈ Q satisfies [(x1 , x2 )] · [(x2 , x1 )] = 1
...


41

2
...
CONSTRUCTION OF RATIONAL NUMBERS

Definition 2
...
1
...
Then, the division in Q,
denoted as /, is defined by
[x]/[y] = [(x1 , x2 )]/[(y1 , y2 )] = [(x1 y2 , x2 y1 )]
...

The readers are advised to verify that division is well-defined
...
The next result helps
in defining order in Q
...
7
...
[Representation of an Element of Q] Let [x] ∈ Q
...

Proof
...
If x2 > 0, we are done
...
6
...
1, we
know that −x2 > 0
...

Hence the required result follows
...
7
...
Let [x] = [(x1 , x2 )], [y] = [(y1 , y2 )] ∈ Q for some x1 , x2 , y1 , y2 ∈ Z with x2 , y2 > 0
...

One should verify that the order in Q is indeed well-defined
...
Further, it may be seen that Q is an ordered field, that is, the following
are satisfied for all a, b, c ∈ Q:

3
...


AF
DR

2
...


T

1
...


4
...

5
...

6
...

7
...

8
...

9
...

10
...

11
...

12
...

13
...

As a final result of this section, we prove the following result
...
7
...
[Existence of a Rational between two Rationals] Let [x], [y] ∈ Q with [x] < [y]
...

Proof
...
Since
[x] < [y], x1 y2 < x2 y1 , one has 2x1 y2 < x1 y2 + x2 y1 < 2x2 y1
...
It can be easily verified that [x] < [z] < [y] as x2 , y2 ∈ Z and using
the multiplicative cancellation (Exercise 2
...
4
...


AF

T

CHAPTER 2
...
Intuitively, the number of elements in a set may be
considered as its size
...
We will be
concerned about size of sets of various kinds
...
1

Finite and infinite sets

We first show that the intuitive notion of ‘number of elements in a set’ is a well defined notion, at
least for finite sets
...
, m} will be used often, we give a notation for this set
...
, m} for m ∈ N
...

Lemma 3
...
1
...
There exists no one-one function from [n] to any of its proper subsets
...
We use PMI to prove this result
...

The statement P (1) holds as there exists no one-one function from [1] to ∅
...
We show that P (m + 1) holds
...
We consider two cases depending on whether m + 1 ∈ rng f or not
...

(a) If f (m+1) = m+1, then the restriction function f[m] is a one-one function from [m] to A\{m+1},
which is a proper subset of [m]
...

(b) If f (m + 1) 6= m + 1, then there exist k, ` ∈ [m] such that f (k) = m + 1 and f (m + 1) = `
...


Observe that g is one-one and A \ {m + 1} is a proper subset of [m]
...

Case 2: m + 1 6∈ rng f
...
Then the restriction function f[m] is a one-one function from [m] to
A \ {f (m + 1)}, which is a proper subset of [m]
...

43

44

CHAPTER 3
...

As an application of Lemma 3
...
1, we prove the following result
...
1
...
Let m, n ∈ N
...
[Injection] There exists a one-one function from [m] to [n] if and only if m ≤ n
...
[Bijection] There exists a bijection from [m] to [n] if and only if m = n
...
(1) Suppose m ≤ n
...

Conversely, let f : [m] → [n] be a one-one function
...
Now,
f is one-one function from [m] to a proper subset of [m] contradicting Lemma 3
...
1
...

(2) Assume that m = n
...

Conversely, suppose that g : [m] → [n] is a bijection
...
By (1), m ≤ n and n ≤ m
...


T

Recall that two sets are said to be equinumerous if there is a bijection between them, and that the
composition of two bijections is a bijection
...
, m}, then A cannot be equinumerous with {1, 2,
...
e
...
This idea provides a mathematical justification of the fact that if two persons
count all English words in this page correctly, then they will arrive at the same number
...


DR

AF

Definition 3
...
3
...
A set X is called finite if either X = ∅ or there exists a bijection from X
to [m] for some m ∈ N; this number m is called the cardinality of X and is denoted by |X|
...

2
...

For instance, [m] is a finite set for any m ∈ N
...
For any m ∈ N, if a1 ,
...
, am } is a finite set since f : A → [m] defined by f (aj ) = j is a
bijection; and, |A| = m
...
In that case, the restriction
function f[n+1] : [n + 1] → [n] is one-one
...
1
...
Therefore, N is an infinite set
...

Theorem 3
...
4
...
A nonempty set X is finite if and only if there exists a one-one function
f : X → [m] for some m ∈ N
...
A set X is infinite if and only if there exists a one-one function f : N → X
...
A set X is infinite if and only if there exists a bijection from X to one of its proper subsets
...
A set X is infinite if and only if there exists a one-one function from X to one of its proper
subsets
...
(1) Let X be a nonempty set
...
Now, f itself is a one-one function
...
We show by PMI on m that X
is finite
...
So, by definition

45

3
...
FINITE AND INFINITE SETS

X is finite
...

If g is onto, then g is a bijection with n = k + 1 so that , i
...
, X is equinumerous with [k + 1] and
hence by definition, X is finite
...

If k + 1 6∈ rng g, then g : X → [k] is one-one, and the induction hypothesis implies that X is finite
...
Define h : X → [k] by
(
g(t), if t 6∈ x0
h(t) =
`,
if t = x0
...
By the induction hypothesis, X is finite
...
Since X 6= ∅, there exists at least one element, say, a1 ∈ X
...
, an−1
...
If this set is empty, then X = {a1 }, which is a finite
set
...
So, let a2 ∈ X \ {a1 }
...

So, suppose a1 ,
...
, m
...
, am } is nonempty, since otherwise X = {a1 , a2 ,
...
So, let
am+1 ∈ X \ {a1 , a2 ,
...
This proves the induction step
...
, an−1
...
Then f is a one-one
function
...
)
Conversely, let f : N → X be one-one
...
Then g ◦ f : N → [m] is one-one
...
It contradicts Lemma 3
...
1
...


DR

(3) Let X be an infinite set
...
Now define the function
g : X → X \ {f (1)} by
(
x,
if x 6∈ rng f
g(x) =
f (k + 1), if x = f (k) for some k ∈ N
...
So, we have a bijection from X to one of its proper subsets
...
On the contrary, assume
that X is a finite set
...
Since Y is a proper
subset of X, f (Y ) is a proper subset of f (X)
...
This contradicts Lemma 3
...
1
...
By (3) there exists a bijection from X to one of its proper subsets
...
Conversely, suppose that h : X → Y is
one-one, where Y is a proper subset of X
...
We see that Z is also a proper subset of X
and h : X → Z is a bijection
...
1
...
3 implies that a set X is finite if and only if there is no bijection from
X to any of its proper subsets, if and only if, there is no one-one function from X to any of its proper
subsets
...
1
...

1
...

2
...
In particular,
if X and Y are disjoint finite sets, then X ∪ Y is finite
...
Let X and Y be finite sets
...


46

CHAPTER 3
...
Let X be a nonempty set with |X| = n
...

5
...

6
...
Then X \ Y is an infinite set
...
Let X and Y be nonempty finite sets
...

8
...
Then |X| = |Y | if and only if there is a bijection from
X to Y
...
Let X be a finite nonempty set and let α be a fixed symbol
...
Then
|X| = |Y |
...
Let X be a nonempty finite set
...

11
...
Then |X ∪ Y | = |X| + |Y | − |X ∩ Y |
...
Let A and B be finite sets
...

13
...
If rng f = {b1 ,
...
In particular, if |f −1 (bj )| = k for j = 1, 2,
...

show that |A| =
j=1

3
...


AF

Definition 3
...
1
...
For each α ∈ I, take a set Aα
...
In this case, the set I is called an index set
...


Let {Yα }α∈I be a nonempty family of sets
...
union : ∪ Yα = {y : y ∈ Yα for some α ∈ I};
α∈I

2
...

α∈I

[Convention] The union of sets in an empty family is ∅
...
1
Unless otherwise mentioned, we assume that the index set for a family of sets is nonempty so that
the family is a nonempty family
...
2
...

1
...
Then the family
{Bα : α ∈ A} = {B1 , B2 , B3 } = {{1, 2}, {2, 3}, {4, 5}}
...

α∈A

1

α∈A

Consider the family {Aα }α∈I , where each Aα is a subset of a set S
...
If x 6∈ ∩ Aα , then there exists an
α∈I

α ∈ I such that x 6∈ Aα
...
Therefore, each such x ∈ ∩ Aα
...
2
...
Take A = N and Bn = {n, n + 1,
...
} = {{1, 2,
...

Thus, ∪ Bα = N and ∩ Bα = ∅
...
Verify that
[− n , n ] = {0}
...
2
...
Let {Aα }α∈I be a nonempty family of subsets of X and let B be any set
...
Then


1
...
B ∩ ∪ Aα = ∪ (B ∩ Aα ) ,
α∈I
α∈I

c
3
...

∩ Aα = ∪ Acα
...
(1) Let x ∈ B ∪




∩ Aα
...
If x ∈ B, then x ∈ B ∪ Aα for each

α∈I

α∈I

α ∈ I
...
If x ∈ ∩ Aα , then for each α ∈ I, x ∈ Aα so that x ∈ B ∪ Aα
...
In any case, x ∈ ∩ (B ∪ Aα )
...
Then for each α ∈ I, x ∈ B ∪ Aα
...
If x 6∈ B but x ∈ B ∪ Aα for each α ∈ I, then x ∈ Aα for each α ∈ I
...
Then x ∈ B ∪ ∩ Aα
...
So, let x ∈ X
...

α∈I

α∈I

Proof of (2) and (4) are similar to those of (1) and (3), respectively
...
2
...


1
...
What is ∪ Ax and ∩ Ax ?
x∈R

x∈R

2
...
What is



x∈[0, 1]

Ax and



x∈[0, 1]

Ax ?

3
...

n∈N

Proposition 3
...
5
...
Let {Aα }α∈I
be a family of subsets of X
...

α∈I

α∈I

α∈I

α∈I

Proof
...

α∈I

For the containment, the case ∩ Aα = ∅ is obvious
...
Then
α∈I

α∈I


y ∈ f ∩ Aα ⇔ (x, y) ∈ f for some x ∈ ∩ Aα ⇔ (x, y) ∈ f with x ∈ Aα for all α ∈ I
α∈I

α∈I

⇒ y ∈ f (Aα ) for all α ∈ I ⇔ y ∈ ∩ f (Aα )
...
COUNTABLE AND UNCOUNTABLE SETS

Remark 3
...
6
...
2
...
However, such an xα
need not be the same for each α
...
To see that it is indeed
the case, consider the function f : {1, 2, 3, 4} → {a, b} where f = {(1, a), (2, a), (2, b), (3, b), (4, b)}
...

To define the product of sets in a family, we first rewrite the product of two sets in an equivalent
way
...
The ordered pair (a1 , a2 ) may be
thought of as the function f : {1, 2} → A1 ∪ A2 with f (1) = a1 and f (2) = a2
...
Generalizing
this observation leads to the following definition
...
2
...
Let {Aα }α∈I be a nonempty family of sets
...
The product of the sets in the family is defined as
Y


Aα = f : f is a function from I to ∪ Aα with f (α) ∈ Aα for each α ∈ I
...


α∈I

Example 3
...
8
...
Then the product

Q

Aα is the set of

α∈I

all functions f : N → {0, 1}
...

Exercise 3
...
9
...
Write R as a union of infinite number of pairwise disjoint infinite sets
...
Write the set {1, 2, 3, 4} as the intersection of infinite number of infinite sets
...
Prove Parts 2 and 4 of Proposition 3
...
3
...
Let f : X → Y be a partial function, A ⊆ X, B ⊆ Y and let {Bβ }β∈I be a nonempty family of
subsets of Y
...


(a) f −1 ∩ Bβ = ∩ f −1 (Bβ )
...


(c) f f −1 (B) ∩ A = B ∩ f (A)
...

β∈I

β∈I

Also, show that in (a)-(c), equality may fail if f is a relation but not a partial function
...
2
...

5
...
Is

it true that f ∩ Aα = ∩ f (Aα )?
α∈I

α∈I

6
...

7
...

8
...

Q
9
...
Is the set
Aα equal to the set of all functions from {1, 2, 3}
α∈I

to {1, 2, 3}? Give reasons for your answer
...
Give sets An , n ∈ N, such that
An has 6 elements
...
1
n∈N

1

When we ask for more than one example, we encourage the reader to get examples of different types, if possible
...
3
...
3

Constructing bijections

Though we have discussed criteria for classifying a set as finite or infinite through injections, the
definitions demand creating bijections
...

Besides this, we now discuss some general techniques to create bijections
...
Also write Z using dots horizontally below the list for N
...
Can you supply
another bijection by changing the arrows?
Experiment 2: Consider an open interval (a, b)
...
View the open interval as a line segment on the real
line
...
Use this
information to answer the following:
1
...
Where is c − 2l ?
3
...
Where is c − α × 2l , for a fixed α ∈ (−1, 1)?

T

Using these information, find a bijection from (a, b) to (s, t)
...
]

AF

Practice 3
...
1
...
Construct two bijections from (1, ∞) to (5, ∞)
...
Construct two bijections from (0, 1) to (1, ∞)
...
Construct two bijections from (−1, 1) to (−∞, ∞)
...
Construct two bijections from (0, 1) to R
...
Construct two bijections from (0, 1) × (0, 1) to R × R
...
Imagine elements of P as
‘persons’ and elements of T as ‘seats’ in a train
...

1
...
He wants a seat
...
So, two seats f ( 12 ), f ( 13 ) are vacant
...

Giving each person a seat is not possible
...
Suppose that we un-seat 21 , 13 , · · · , 30
? Can we manage it?

3
...
What do we do if we had two new persons arriving? Fifty new persons arriving? A set
{a1 , a2 , · · · } of new persons arriving?
It leads to the following result, which you can prove easily
...
3
...
[Train Seat Argument] Let X be a set with {a1 , a2 ,
...


50

CHAPTER 3
...
If c1 ,
...
}
if x = ai , i ∈ N
if x = ci , i = 1, 2,
...
, ck } to Y
...
If c1 , c2 ,
...
}
if x = an , n ∈ N
if x = cn , n ∈ N

is a bijection from X ∪ {c1 , c2 ,
...

Example 3
...
3
...
X = [0, 1) and Y = (0, 1)
...
} onto {1/2, 1/3,
...
That is, define

if x = 0
 1/2
f : X → Y by f (x) =
1/(n + 1) if x = 1/n with n ∈ {2, 3,
...


DR

2
...


Ans: f : X → R given by f (x) = tan(π(x − 1/2)) is a bijection
...


That is, g maps each x in R\Z to itself by the identity map, and then it maps 0, −1, 1, −2, 2, −3, 3,
...
in that order
...
Hence g ◦ f : X → Y is
a bijection
...
3
...
In each of the following, use Theorem 3
...
2 to give a bijection from X to Y
...
X = [0, 1] and Y = (0, 1)
...
X = (0, 1) ∪ {1, 2, 3, 4} and Y = (0, 1)
...
X = (0, 1) ∪ N and Y = (0, 1)
...
X = [0, 1] and Y = [0, 1] \ { 11 , 31 , 51 , · · · }
...
X = R and Y = R \ N
...
X = [0, 1] and Y = R \ N
...
X = (0, 1) and Y = (1, 2) ∪ (3, 4)
...
X = R \ Z and Y = R \ N
...
4
...
4

51

Cantor-Schr¨
oder-Bernstein Theorem

Let A and B be finite sets with |A| = m and |B| = n
...
Then we know that m ≤ n
...
It then follows that there is a bijection from A to B
...
Take one-one functions f : X → Y and g : Y → X defined by f (x) = x + 2 and
g(x) = x + 1
...
If (x, y) ∈ f , we draw a solid
line joining x and y
...

1

1

2

2

3

3

4

4

5

5

6

6

7

7


...


DR

Figure 3
...
Initially, we keep all solid
lines and look at rng f
...
Each one of
these elements must be connected by a dotted line to some element in X
...
We follow the heuristic of keeping as many pairs in f as possible; and
then keep a pair (y, x) ∈ g if no pair (z, y) ∈ f has been kept
...
The elements 1, 2 ∈ Y but are not in rng f
...
That is, the pairs (1, 2), (2, 3) ∈ g must be kept
...
Then the pairs (2, 4), (3, 5) ∈ f must be deleted
...
Now, (1, 3) ∈ f ; it is kept, and then (3, 4) ∈ g must be deleted
...
The pair (4, 5) ∈ g is kept; so (5, 7) ∈ f must be deleted
...
The pair (4, 6) ∈ f is kept, and then (6, 7) ∈ g must be deleted
...
The pair (7, 8) ∈ g is kept; so (8, 10) ∈ f must be deleted
...
Then the bijection h : X → Y is given by

f (x)
if x = 3n − 2, n ∈ N
h(x) =
g −1 (x) otherwise
...
4
...
Construct bijections using the given injections f : N → N and g : N → N
...
f (x) = x + 1 and g(x) = x + 2
...
COUNTABLE AND UNCOUNTABLE SETS
2
...

3
...

We use this heuristic method of constructing a bijection in proving the following theorem
...
4
...
[Cantor-Schr¨
oder-Bernstein (CSB)]
Let X and Y be nonempty sets and let
f : X → Y and g : Y → X be one-one functions
...

Proof
...
So, assume that f is not onto
...
Write B = Y \ f (X), φ = f ◦ g, and A = B ∪ φ(B) ∪ φ2 (B) ∪ · · · = B ∪ ∪ φn (B)
...


Hence A = B ∪ φ(A)
...
Hence
f (X \ g(A)) = f (X) \ f (g(A)) = [Y \ B] \ φ(A) = Y \ [B ∪ φ(A)] = Y \ A
...
As g is one-one, its restriction to A
is a bijection onto g(A)
...
Therefore, the function h : X → Y
defined by
(
f (x),
if x ∈ X \ g(A),
h(x) =
−1
g (x), if x ∈ g(A)

T

is a bijection
...
If g is onto, we have nothing to prove
...
Then O :=

X \ g(Y ) 6= ∅
...
Observe that
n=1
O ⊆ E ⊆ X, ψ : X → X is one-one, and g does not map any element of Y to any element of O
...

n=1

n=1

Thus the restriction of ψ to E is a bijection from E onto E \ O
...

Then τ is a bijection
...
Then h is one-one and h(Y ) = τ −1 (g(Y )) = τ −1 (X \O) = X
...

Alternate
...
Here, T c = X \ T
and f (T )c = Y \ f (T )
...
2: Depiction of CSB-theorem

f (T )

¨
3
...
CANTOR-SCHRODER-BERNSTEIN
THEOREM

53

Note that ∅ ∈ F
...
Then
T ∈F







c 
c
g f (U )c = g f ∪ T
=g
∪ f (T )
= g ∩ f (T )c = ∩ g (f (T )c ) ⊆ ∩ T c = U c
...
Now that
⊆ U c , we want to
show that g (f (U )c ) = U c
...
Then we have an element

x ∈ U c \ g (f (U )c )
...
Then g f (U )c ⊆ U c ∩{x}c and f (U ) ⊆ f (V )
...


This contradicts the maximality of U in F
...
Hence f is a bijection from U to
f (U ) and g is a bijection from f (U )c to U c
...

Then h is a bijection
...
Also, we give different proofs of
this fact
...
4
...
The set N × N is equinumerous with N
...
We already know that the function f : N → N × N given by f (n) = (n, 1) is one-one
...
Note that g(m, n) = g(r, s), implies that 2m−r = 3s−n
...

Hence m = r and s = n; that is, (m, n) = (r, s), and thus f is one-one
...


DR

Alternate
...
Suppose h(x, y) = h(m, n)
...
Let x > m
...

Similarly, x < m leads to a contradiction
...
Then the equality implies 2y − 1 = 2n − 1
so that y = n
...
Further, each x ∈ N can be
uniquely written as x = 2r−1 (2n − 1), for some r, n ≥ 1
...

Alternate
...
Since m ≥ 1, n ≥ 1,
(m + n − 1)(m + n − 2)/2 + n ≥ 1
...
Write S0 = 0; and for any r ∈ N, write
1 + 2 + · · · + r = Sr
...
In Example 2
...
1
...
The existence
of such a t shows that f is onto, and its uniqueness shows that f is one-one
...

Suppose f (k, `) = f (m, n) for some choice of k, `, m, n ∈ N, i
...
, x := Sk+`−2 + ` = Sm+n−2 + n
...
By
the uniqueness of t corresponding to x it follows that k +`−2 = m+n−2
...
This, along with k + ` − 2 = m + n − 2 implies that k = m
...

To show that f is onto, let x ∈ N
...
Take
n = x − St
...
So, take m = t + 2 − n
...

Therefore, f is an onto function
...
Till now it is not
known whether there exists another polynomial in m and n which is a bijection
...
COUNTABLE AND UNCOUNTABLE SETS

Example 3
...
4
...
For this, write Q = Q+ ∪ Q− ∪ {0}, where
Q+ =

nm
n

o
: m, n ∈ N, gcd(m, n) = 1 ,

Q− = {−x : x ∈ Q+ }
...
Prove that Q+ is equinumerous with N
...
Let p1 , p2 ,
...
The prime factorization theorem asserts that each n ∈ N can be
written uniquely as n = pa11 pa22 · · · , where ai ∈ N only for a finite number of pi ’s, and the rest
of ai ’s are 0
...
Let f : N → Z be a bijection
such as f (n) = −n/2 if n is even, and f (n) = (n + 1)/2 if n is odd
...
Then g is a bijection
...
Use the above to conclude that Q− is equinumerous with N
...
Using Part 1, we see that
h ◦ g : N → Q− is a bijection
...
Use the above two parts to conclude that Q is equinumerous with N
...
Then N = A ∪ B ∪ {1}
...
Let g : N → Q+ and h : Q+ → Q− be
the bijections given in Parts 1 and 2
...
We see that the following function ψ : N → Q is a bijection:

DR



 (g ◦ φ1 )(x)
ψ(x) =
(h ◦ g ◦ φ2 )(x)


0

if x ∈ A
if x ∈ B
if x = 1
...
4
...

1
...
3
...
Then use the CSB-theorem to prove
that all the sets are equinumerous
...
Define f : Q → N by



2r 3s


f (x) = 5r 3s



1

if x = rs , gcd(r, s) = 1, r > 0, s > 0
if x =

−r
s ,

gcd(r, s) = 1, r > 0, s > 0

if x = 0
...
Apply CSB-theorem to prove that Q is equinumerous with N
...
Let X = {(x, y) ∈ N × N : y ≤ x}
...
Prove that f is a bijection
...
Prove that g is a bijection
...
Is this function the same as Cantor’s pairing
function?

55

3
...
COUNTABLE AND UNCOUNTABLE SETS

3
...
By induction it follows that Nk , that is the
product of N with itself taken k times, for any natural number k, is also equinumerous with N
...

Definition 3
...
1
...
A set which is equinumerous with N is called a denumerable set
...

2
...

3
...

Since the identity function on N is a bijection, it follows that N is denumerable
...

Example 3
...
2
...
Define f : N → Z and g : Z → N, respectively by


−x/2
−2z
if x is even
f (x) =
g(x) =
(x − 1)/2 if x is odd,
1 + 2z

if z is negative
if z is non-negative
...
Hence f is
a bijection
...


AF

T

2
...
4
...
Thus, N × N is denumerable, and
countable
...
By Example 3
...
4, Q+ , Q− , Q are denumerable, and countable
...

Theorem 3
...
3
...

1
...

2
...

Proof
...
Let X be a countable set
...
This bijection gives a one-one function f : X → N
...
In this case, the function g is one-one
...
If X is finite, then it is countable
...

Then, by Theorem 3
...
4
...
By CSB-theorem, there exists
a bijection h : X → N
...

2
...
By definition there is a bijection f : X → N
...
Conversely, suppose there exist one-one functions f : X → N and
g : N → X
...
Hence X is denumerable
...
5
...

1
...
Then, there is a bijection f : N → X
...
This list is called an enumeration of the elements of X
...
Let X be a nonempty set
...



Writing f (i) = xi , such a sequence is represented by xi i∈N = x1 , x2 ,
...


56

CHAPTER 3
...

Since Z is denumerable, its elements can be enumerated
...
is
an enumeration of Z
...
It says that there is a sequence r1 , r2 , r3 ,
...
This is what an enumeration means
...

By a denumerable family of sets, we mean a family of sets which is denumerable
...
We also use the same
notation for a countable family, where possibly only a finite number of sets Ai are nonempty
...

Notice that a countable infinite set is denumerable
...

Proposition 3
...
5
...
Each subset of a denumerable set is countable
...
Each infinite subset of a denumerable set is denumerable
...
A set is infinite if and only if it has a denumerable subset
...
Any subset of a countable set is countable; and any superset of an uncountable set is uncountable
...
A countable union of countable sets is countable
...
For any k ∈ N, the Cartesian product Nk is denumerable
...
A finite product of countable sets is countable
...
(1) Let X ⊆ Y , where Y is denumerable
...
The identity
function Id : X → Y is one-one
...

(2) Let X be an infinite subset of a denumerable set
...
So, X is countably
infinite, same as denumerable
...
Then, by Theorem 3
...
3, there is a one-one function f : N → X
...
Hence, rng f is a denumerable subset of X
...
There exists a bijection f : Y → N
...
By Theorem 3
...
4, X is an infinite set
...
If Y = ∅, then it is finite, thus countable
...
As X is countable, by Theorem 3
...
3, there exists a one-one function f : X → N
...
Hence Y is countable
...
If X is countable, then by what we have just proved,
X would be countable
...

(5) Let {Ai }i∈N be a countable family of sets, where each Ai is a countable set
...

i∈N

We show that X is countable
...
So, let X be infinite
...
1
...
2, there is a one-one
function f : N → X
...
Then, there exists at least one i ∈ N such that x ∈ Ai
...
So, suppose x appears at the kth
position in this enumeration of Ai
...
Define g : X → N by g(x) = 2i 3k , where i is the smallest natural number for which
x ∈ Ai and x appears at the k-th position in the enumeration of Ai
...
Therefore, by

57

3
...
COUNTABLE AND UNCOUNTABLE SETS
CSB-theorem, A is equinumerous with N
...
Suppose the result is true for k = m
...
From Theorem 3
...
3, we have a bijection g : N × N → N
...
, xm , xm+1 ) = g f (x1 ,
...
Then h is a bijection
...

Alternate
...
, 1) is one-one
...
, pk
be the first k number of primes, i
...
, p1 = 2, p2 = 3, etc
...
, mk ) =
1 −1 m2 −1
k −1
pm
p2
· · · pm

...
So, by CSB1
k
theorem, there exists a bijection from Nk → N
...
, Ak be countable sets
...
If
any Ai = ∅, then X = ∅; thus it is countable
...
Since Ai is
countable, there exists a one-one function fi : Ai → N
...
, xk ) = f1 (x1 ),
...
Let g : Nk → N be the one-one function given in (6)
...

We now address the question whether all infinite sets are denumerable or not
...
Recall that if X is a set, then its power
set P(X) denotes the set of all subsets of X
...


AF

T

1
...
On the right draw a similar but larger oval and write the elements of
P({1, 2, 3, 4}) inside it, one below the other
...
Now draw a directed line from 1 (on the left) to any element on the right
...
We have drawn a function
...

3
...
Find out the set Y = {i : i ∈
/ f (i)}
...

4
...
Why?

Theorem 3
...
6
...

Proof
...
For each x ∈ X,
f (x) ⊆ X
...
Since Y ∈ P(X) and f is onto, there exists
s ∈ X with f (s) = Y
...
e
...
As f (s) = Y , s 6∈ Y
...
So, s satisfies the defining property of Y , and hence s ∈ Y
...
This is a contradiction
...
5
...
Cantor’s theorem implies that one cannot have a bijection between a set and its
power set
...
However, f : N → P(N) given
by f (x) = {x} is one-one
...
e
...
5
...
It follows that any set equinumerous with P(N) is uncountable
...

Theorem 3
...
8
...


58

CHAPTER 3
...
Let X be an infinite set
...
1
...
Define
the function g : P(N) → P(X) by
g(A) = {f (i) : i ∈ A} for each A ∈ P(N)
...
As Remark 3
...
7 shows, P(N) is uncountable
...
The

set P(X), being a superset of g P(N) , is uncountable
...
5
...

1
...
Equivalently, let


X = x : x = (x1 , x2 ,
...
Define f : X → P(N) by

f (x) = f (x1 , x2 ,
...

Then f is a bijection
...



2
...
a1 a2 a3 · · · : ai ∈ {0, 1} for each i ∈ N
...

We give another proof by Cantor
...
Clearly Y is not finite
...
Let xn =
...
We
construct the numbers yn as follows:
If xnn = 0, then take yn = 1; otherwise, take yn = 0
...
y1 y2 · · · ∈ X
...
e
...
This is a contradiction
...
Thus we have shown that [0, 1) is
an uncountable set
...
5
...
The set P(N) is equinumerous with [0, 1) and also with R
...
By Example 3
...
9, there exists a one-one function f : P(N) → [0, 1)
...
Consider the
non-terminating binary representation of r
...

Define g : [0, 1) → P(N) by g(0) = ∅, and g(r) = Fr if r 6= 0
...
Therefore, by
CSB-theorem, P(N) is equinumerous with [0, 1)
...
3
...
1) and (0, 1) is
equinumerous with R (see Practice 3
...
1
...

Exercise 3
...
11
...
Let X be a nonempty set
...

2
...

3
...

4
...

5
...


59

3
...
COUNTABLE AND UNCOUNTABLE SETS
6
...


7
...
be an infinite sequence of nonempty sets such that Ak is a proper superset of Ak+1
for each k ∈ N
...

8
...
Then prove that X is countable
...
Let S be the set of sequences (xn ), with xn ∈ {0, 1,
...
Is S countable?
10
...
Is S countable?
11
...
Is S uncountable?
12
...
Consider the line segments Ls with
one end at the origin and the other end at a point s ∈ S
...
We are allowed to
rotate the circle anticlockwise (the lines do not move)
...
Can we rotate the circle by an angle θ so that no line Ls touches any of the
points of T ?
13
...
All other complex numbers are called transcendental
...

(b) Show that the set of transcendental numbers is uncountable
...
Fix an n ∈ N and let Tn be the set of all functions from {1, 2,
...


15
...

(a) Is X uncountable? Justify your answer
...
Let S ⊆ X be the set all eventually constant functions
...


AF

T

CHAPTER 3
...
1

Division algorithm and its applications

In this section, we study some properties of integers
...

Lemma 4
...
1
...
Then there exist unique
integers q, r such that a = qb + r, where 0 ≤ r < b
...


DR

AF

T

Proof
...
Then a + |a|b ∈ S
...
Therefore, by the well ordering principle, S contains its minimum, say s0
...
Since s0 ∈ W, s0 ≥ 0
...
This contradicts the minimality of s0
...
Take q = −x0 and r = s0
...
e
...

Uniqueness: Assume that there exist integers q1 , q2 , r1 and r2 satisfying a = q1 b + r1 , 0 ≤ r1 < b,
a = q2 b+r2 , and 0 ≤ r2 < b
...
Then 0 < r2 −r1 < b
...
So,
0 < (q1 − q2 )b < b
...
Similarly, r2 < r1 leads to a contradiction
...
Then, 0 = r1 − r2 = (q1 − q2 )b
and b 6= 0 imply that q1 = q2
...
1
...
Let a, b ∈ Z with b 6= 0
...
) When b|a, we also say that b is a divisor of a, and that a is a
multiple of b
...
1
...
Let a be a nonzero integer
...
Hence the
set of all positive divisors of a nonzero integer is a nonempty finite set
...
It then follows that if a, b ∈ N such that a|b and b|a, then a = b
...
1
...

1
...
Then the set S of their common positive
divisors is nonempty and finite
...
This element is called
the greatest common divisor of a and b and is denoted by gcd(a, b)
...

2
...
In this case, we also
say that the integers a and b are coprimes
...
ELEMENTARY NUMBER THEORY
The next result is often stated as ‘the gcd(a, b) is a linear combination of a and b’
...
1
...
[B´ezout’s identity] Let a and b be two nonzero integers and let d = gcd(a, b)
...

Proof
...
Then, either a ∈ S or −a ∈ S
...
By the well ordering principle, S contains its least element, say d
...
We show that d = gcd(a, b)
...
If
r > 0, then
r = a − dq = a − q(ax0 + by0 ) = a(1 − qx0 ) + b(−qy0 ) ∈ {ax + by : x, y ∈ Z}
...
This contradicts the choice of d
as the least element of S
...
Consequently, d|a
...
Hence d ≤ gcd(a, b)
...
Since d = ax0 + by0 for some x0 , y0 ∈ Z, we have gcd(a, b)|d
...
However, both gcd(a, b) and d are positive
...
Hence d ≥ gcd(a, b)
...

We prove three useful corollaries to B´
ezout’s identity
...
1
...
Let a, b ∈ Z and let d ∈ N
...


DR

AF

Proof
...
Then d|a and d|b
...

Thus, any common divisor of a and b divides d = gcd(a, b)
...
Since d is a common
divisor of a and b, by what we have just proved, d| gcd(a, b)
...
By Remark 4
...
3, d = gcd(a, b)
...
1
...
Let a, b be nonzero integers
...

Proof
...

Conversely, suppose there exist integers x0 and y0 such that ax0 + by0 = 1
...
It follows that k ≤ 1; consequently, k = 1
...
1
...
Let n1 ,
...
If a ∈ Z is such
that n1 |a,
...

Proof
...
, nk are pair wise coprimes means that if i 6= j, then gcd(ni , nj ) = 1
...
, nk |a
...
For k = 2, it is given
that n1 |a, n2 |a and gcd(n1 , n2 ) = 1
...


Multiplying by a, we have a = an1 x + an2 y = n1 n2 x( na2 ) + y( na1 )
...
Hence n1 n2 |a
...
Let each of n1 ,
...
Let n1 · · · nm = `
...
By the
induction hypothesis, `|a
...
That is,
n1 · · · nm+1 |a
...
1
...

Let a, and b be nonzero integers
...
We apply our observation that a common divisor of two integers
divides their gcd
...
Again, gcd(|b|, r) divides both a and |b|
...


Similarly, with r = a − |b|q, we see that gcd(a, |b|) divides both a and |b|; hence gcd(a, |b|)|r
...

Further, the gcd of any two integers is positive
...
So, we obtain
gcd(a, b) = gcd(a, |b|) = gcd(|b|, r)
...

Euclid’s algorithm
Input: Two nonzero integers a and b; Output: gcd(a, b)
...


...

gcd(a, b) = r`+1

with

0 ≤ r0
0 ≤ r1
0 ≤ r2
0 ≤ r3

< r0
< r1
< r2

0 ≤ r`+1 < r`

The process will take at most b − 1 steps as 0 ≤ r0 < b
...
That is,
r`+1 = r`−1 − r` q`+1 = r`−1 − q`+1 (r`−2 − r`−1 q` ) = r`−1 (1 + q`+1 q` ) − q`+1 r`−2 = · · ·
...
1
...
We apply Euclid’s algorithm for computing gcd(155, −275) as follows
...


To write 5 = gcd(155, −275) in the form 155x0 + (−275)y0 , notice that
5 = 35 − 2 · 15 = 35 − 2(155 − 4 · 35) = 9 · 35 − 2 · 155 = 9(−275 + 2 · 155) − 2 · 155 = 9 · (−275) + 16 · 155
...
Therefore, we see that there are infinite number of choices for the pair (x, y) ∈ Z2 , for which
d = ax + by
...
1
...


1
...
Then gcd( ad , db ) = 1
...
Prove that the system 15x + 12y = b has a solution for x, y ∈ Z if and only if 3 divides b
...
ELEMENTARY NUMBER THEORY
3
...
Then the linear system ax + by = c, in
the unknowns x, y ∈ Z has a solution if and only if gcd(a, b) divides c
...

4
...

5
...
For example, we can use the algorithm to
prove that gcd(2n + 3, 5n + 7) = 1 for every n ∈ Z
...
Suppose a milkman has only 3 cans of sizes 7, 9 and 16 liters
...

To proceed further, we need the following definitions
...
1
...


1
...


2
...

3
...

We are now ready to prove an important result that helps us in proving the fundamental theorem
of arithmetic
...
1
...
[Euclid’s Lemma]

Let a, b ∈ Z and let p be a prime
...


DR

One also has the following result
...
Suppose p|ab
...
So, assume that p - a
...
Thus there exist integers x, y such that 1 = ax + py
...
Since p|ab
and p|pb, we see that p|b
...
1
...
Let a, b, n ∈ Z be such that n|ab
...

Proof
...
There exist x0 , y0 ∈ Z such that nx0 + ay0 = 1
...

Since n|ab and n|nb, we have n|b
...
This product is unique, except for
the order in which the prime factors appear’
...
1
...
[Fundamental theorem of arithmetic] Let n ∈ N with n ≥ 2
...
, sk such that n = ps11 ps22 · · · pskk , for
some k ≥ 1
...
, t` then k = ` and for each i ∈ {1,
...

Proof
...
2
...

Theorem 4
...
15
...

Proof
...
, pk
...
We see that none of the primes p1 , p2 ,
...
This
contradicts Theorem 4
...
14
...
1
...
[Primality testing] Let n ∈ N with n ≥ 2
...




n divides n, then

65

4
...
MODULAR ARITHMETIC



Proof
...
Then, either x ≤ n or y ≤ n
...
If x is a prime, we are done
...
Now, p ≤ n and p
divides n
...
1
...


1
...


2
...
Then, there exists a consecutive set of N natural numbers that are composite
...
1
...
The least common multiple of integers a and b, denoted as lcm(a, b), is the
smallest positive integer that is a multiple of both a and b
...
1
...
Let a, b ∈ Z and let ` ∈ N
...

Proof
...
Clearly, a|` and b|`
...
If ` - x,
then by the division algorithm, x = ` · q + r for some integer q and some r with 0 < r < `
...
So, a|r
...
That is, r is a positive common multiple of both a and b which is
less than lcm(a, b)
...
Hence, ` = lcm(a, b) divides each common multiple of a
and b
...
By what we have
just proved, lcm(a, b)|`
...
Thus `| lcm(a, b)
...
1
...


T

Theorem 4
...
20
...
Then gcd(a, b) · lcm(a, b) = ab
...


DR

AF

Proof
...
Then a = a1 d and b = b1 d for some a1 , b1 ∈ N
...

Thus, it is enough to show that lcm(a, b) = a1 b1 d
...
Let c ∈ N be any
ezout’s identity, d = as + bt for some
common multiple of a and b
...
Further, by B´
s, t ∈ Z
...

a1 b1 d
(a1 d) · (b1 d)
ab
b
a
Hence a1 b1 d|c
...
By Lemma 4
...
19,
a1 b1 d = lcm(a, b)
...
2

Modular arithmetic

Definition 4
...
1
...
Let a, b ∈ Z
...

Example 4
...
2
...
Notice that 2|(2k − 2m) and also 2|[(2k − 1) − (2m − 1)]
...

2
...

3
...
Recall the notation [n − 1] := {0, 1, 2,
...


(a) Then, by the division algorithm, for any a ∈ Z there exists a unique b ∈ [n − 1] such that
a ≡ b (mod n)
...


66

CHAPTER 4
...
e
...


The set [n − 1] is taken as the standard representative for the set of residue classes
modulo n
...
2
...
Fix n ∈ N, and let a, b, c, d ∈ Z
...
If a ≡ b (mod n) and b ≡ c (mod n), then a ≡ c (mod n)
...
If a ≡ b (mod n), then a + c ≡ b + c (mod n), a − c ≡ b − c (mod n) and ac ≡ bc (mod n)
...
If a ≡ b (mod n) and c ≡ d (mod n), then a + c ≡ b + d (mod n), a − c ≡ b − d (mod n) and
ac ≡ bd (mod n)
...

4
...
In particular,
if ac ≡ bc (mod n) for nonzero a, b, c, and gcd(c, n) = 1, then a ≡ b (mod n)
...
We will only prove two parts
...

3
...
Thus, n|ac − bd, whenever n|a − b
and n|c − d
...

4
...
Then, there exist nonzero c1 , n1 ∈ Z with c = c1 d, n = n1 d
...
By Proposition 4
...
13, n1 |a − b, i
...
, gcd(c,n)
|a − b
...
Note that 3 · 9 + 13 · (−2) ≡ 1 (mod 13)
...
2
...


as 3 · 9 + 13 · (−2) ≡ 1

(mod 13)

as 13 ≡ 0

(mod 13)

as 9x ≡ 4

(mod 13)

(mod 13)
...
Therefore, the
congruence equation 9x ≡ 4 (mod 13) has solution x ≡ 12 (mod 13)
...
Verify that 9 · (−5) + 23 · (2) = 1
...


3
...

Theorem 4
...
5
...

Then the congruence equation ax ≡ b (mod n) has at least one solution if and only if gcd(a, n)|b
...
, rd ∈
{0, 1, 2,
...
, d
...
Write d = gcd(a, n)
...
Then, by definition, ax0 −b = nq,
for some q ∈ Z
...
Since d|a and d|n, we have d|ax0 − nq = b
...
Then, b = b1 d, for some b1 ∈ Z
...
Hence,
a(x0 b1 ) ≡ b1 (ax0 ) ≡ b1 (ax0 + ny0 ) ≡ b1 d ≡ b (mod n)
...
2
...
This proves the first statement
...
By what we have just proved, there exists a solution x1 of
ax ≡ b (mod n)
...

Now, ar ≡ a(x1 − pn) ≡ ax1 ≡ b (mod n)
...
e
...
, n − 1} satisfying ar ≡ b (mod n)
...
, n − 1} is any other solution of ax ≡ b (mod n), then ax2 ≡ b ≡ ar (mod n)
...
2
...
4, x2 ≡ r (mod n/d)
...
Then ax2 = ar + am(n/d) = ar + mn(a/d)
...

Hence, ax2 ≡ ar (mod n) so that x2 is a solution of ax ≡ b (mod n)
...
, n − 1} are of the form r + k(n/d) for k ∈ Z
...
, n − 1} which are congruent to r modulo
(n/d)
...
, n − 1}
...
2
...
Observe that a solution of the congruence ax ≡ b (mod n) is a number in {0, 1,
...
This set is not to be confused with the congruence class [n − 1]
...
, rd =
r + (d − 1)n/d
...
, d
...
2
...


1
...
2
...


2
...


T

3
...


AF

4
...


DR

5
...

(a) Prove that the given pair is equivalent to the pair x ≡ 20 (mod 28) and x ≡ 14 (mod 27)
...


(c) Verify that k = 21 is the solution for the first case in (b) and k = 22 for the second case
...

6
...

k!(p − k)!

7
...
Write Zp := {0, 1, 2,
...
, p − 1} = Zp \ {0}
...


(b) For all a, b ∈ Zp , a + b = b + a (mod p)
...


(d) For all a ∈ Zp , a + 0 ≡ a (mod p)
...

(f ) For all a, b ∈ Z∗p , a · b (mod p) ∈ Z∗p
...


(h) For all a, b, c ∈ Z∗p , a · (b · c) ≡ (a · b) · c (mod p)
...


(j) For each a ∈ Z∗p , there exists b ∈ Z∗p such that a · b ≡ 1 (mod p)
...
ELEMENTARY NUMBER THEORY
(k) For all a, b, c ∈ Zp , a · (b + c) ≡ (a · b) + (a · c) (mod p)
...
So, Zp = {0, 1, 2,
...
The well known examples of fields
are:
(a) Q, the set of rational numbers
...

(c) C, the set of complex numbers
...
Let p be an odd prime
...


(b) Corresponding to any a ∈ {2, 3,
...
, p − 2} and b 6= a
...
, p − 2} satisfy a 6= c, a · b ≡ 1 (mod p) and c · d ≡ 1 (mod p), then
b 6= d
...
Write q = (p − 3)/2
...
, {aq , bq }
q
S
that are pairwise disjoint satisfying ai · bi ≡ 1 (mod p) for 1 ≤ i ≤ q, and
{ai , bi } =
i=1

{2, 3,
...


(e) If p > 3, then 2 · 3 · · · · · (p − 2) ≡ 1 (mod p)
...
[Wilson’s Theorem] If p is any prime, then (p − 1)! ≡ −1 (mod p)
...
3

DR

AF

10
...


Chinese Remainder Theorem

Theorem 4
...
1
...
Let n1 , n2 ,
...
Write M = n1 n2 · · · nm
...


...

M

...
Let 1 ≤ i, j ≤ m
...
For 1 ≤ k ≤ m, define Mk =
Mi xi ≡ Mi xi + ni yi ≡ 1
Now, x0 :=

m
P
k=1

(mod ni );

i 6= j ⇒ ni |Mj ⇒ Mj xj ≡ 0

(mod ni )
...
That is, x0 is a solution to the given

system of congruences
...
Since n1 ,
...
1
...
Therefore, x0 is the unique
solution of the system of congruences module M
...
3
...
3
...
Consider the system of congruences x ≡ 20 (mod 28) and x ≡ 14 (mod 27) in
Exercise 4
...
7
...
In this case, a1 = 20, a2 = 14, n1 = 28 and n2 = 27 so that M = 28 · 27 = 756, M1 =
27 and M2 = 28
...
Hence
x0 = 27 · −1 · 20 + 28 · 1 · 14 ≡ −540 + 392 ≡ −148 ≡ 608

(mod 756)
...
3
...

1
...

2
...

3
...
What if we replace 6 or 4 with an odd number?

4
...
Show that the set Zn := {0, 1, 2,
...


(b) For all a, b ∈ Zn , a + b = b + a (mod n)
...


(f ) For all a, b ∈ Zn , a · b (mod n) ∈ Zn
...


AF

(e) For all a ∈ Zn , a + (n − a) ≡ 0 (mod n)
...


(h) For all a, b, c ∈ Zn , a · (b · c) ≡ (a · b) · c (mod n)
...


(j) For all a, b, c ∈ Zn , a · (b + c) ≡ (a · b) + (a · c) (mod n)
...

So, Zn = {0, 1, 2,
...
The well known
examples of commutative ring with unity are:
(a) Z, the set of integers
...

(c) R, the set of real numbers
...

5
...
By Exercise 4
...
3
...
Now, define addition and multiplication in Zm × Zn componentwise
...


Then, prove the following:
(a) Zm × Zn is a commutative ring with unity
...


70

CHAPTER 4
...


(d) For each (a, b) ∈ Zm ×Zn there exists a unique x ∈ Zmn such that x ≡ a (mod m) and x ≡ b
(mod n)
...


DR

AF

T

Such a function f is called a ring isomorphism, and thus, the two rings Zm × Zn and Zmn are
isomorphic
...
1

DR

AF

T

Combinatorics can be traced back more than 3000 years to India and China
...
The use of the word “combinatorial” can be traced back to Leibniz in his dissertation on
the art of combinatorial in 1666
...

These include the K¨
onigsberg bridges problem, the four-colour map problem, the Tower of Hanoi, the
birthday paradox and Fibonacci’s ‘rabbits’ problem
...

Undoubtedly part of the reason for this importance has arisen from the growth of computer science and
the increasing use of algorithmic methods for solving real-world practical problems
...


Addition and multiplication rules

We first consider some questions
...
How many possible crossword puzzles are there?
2
...
How often do two of
the selected balls have consecutive numbers?
3
...
Can we construct a floor tiling from squares and regular hexagons?
We observe various things about the above problems
...
Despite the initial simplicity, some of
these problems will be frustratingly difficult to solve
...
We will first address the problem of counting
...
In other words, can we figure out how many things there
are with a given property without actually enumerating each of them
...
We now introduce two standard techniques which are very useful for counting
without actually counting
...

Example 5
...
1
...
COMBINATORICS - I
1
...

What is the total number of license plates possible?
Ans: Here, we observe that there are 26 choices for the first alphabet and another 26 choices
for the second alphabet
...
Hence, we have a maximum of 26 × 26 × 10 × 10 = 67, 600 license plates
...
Let the cars in New Delhi have license plates containing 2 alphabets followed by two numbers
with the added condition that “in the license plates that start with a vowel the sum of numbers
should always be even”
...

Case 1: The license plate doesn’t start with a vowel
...

Case 2: The license plate starts with a vowel
...

Hence, we have a maximum of 54600 + 6500 = 61100 license plates
...
To understand these rules, we explain the involved ideas
...
Assume that
each of the parts can be completed on their own and completion of one part does not result in the
completion of any other part
...
We say the parts are alternative to mean that exactly one of
the parts must be completed to complete the task
...

Discussion 5
...
2
...
, mn ∈ N
...
[Multiplication/Product rule] If a task consists of n compulsory parts and the i-th part can
be completed in mi ways, i = 1, 2,
...

2
...
, n, then the task can be completed in m1 + m2 + · · · + mn ways
...

Example 5
...
3
...
How many three digit natural numbers can be formed using digits 0, 1, · · · , 9?
Identify the number of parts in the task and the type of the parts (compulsory or alternative)
...
Our task has three compulsory parts
...
Part 2: choose a digit for the middle place
...


Multiplication rule applies
...

2
...
Which rule applies here?

73

5
...
PERMUTATIONS AND COMBINATIONS

Ans: The task has two alternative parts
...
Part 2: form a three digit number with distinct digits using
digits from {2, 4, 6, 8}
...
Using
multiplication rule, we see that Part 1 can be done in 5 × 4 × 3 ways
...
So, it can be done in 4 × 3 × 2 ways
...
Ans: 84
...
1
...
There is another way to formulate the above rules
...
In this setting, the multiplication rule can be re-written
as: if A1 , A2 ,
...

For the addition rule, note that, as the completion of one part does not result in the completion of any
other part, A1 , A2 ,
...
Thus, the addition rule can be re-written as: if A1 , A2 ,
...


5
...


5
...
1

Counting words made with elements of a set S

AF

T

The first fundamental combinatorial object one commonly studies is a function f : [k] → S
...


DR

Discussion 5
...
1
...
Let k ∈ N and let f ∈ Map([k], S)
...
, f (k))
...

2
...
, xk ) of elements of X
...
xk , which is called a word of length k made with elements
of X
...

3
...
, z}, defined by f (1) = a, f (2) = a and f (3) = b
...
Because of this natural one-one correspondence, people use them interchangeably
...
2
...
Let n, r ∈ N be fixed
...

Proof
...
So, by the product rule, the number of such functions is rn
...
2
...


1
...
This task has 9 compulsory parts, where is each part can be done in 12 ways
...
Determine the number of words of length 9 made with alphabets from {a, b,
...
This task has 9 compulsory parts, where each part can be done in 26 many ways
...
Suppose 3 distinct coins are tossed and the possible outcomes, namely H and T , are recorded
...
Determine the number of possible outcomes
...
So, it is 23
...
COMBINATORICS - I

Practice 5
...
4
...
Let n, r ∈ N
...
How many ways are there to make 5-letter words (words of length 5) using the ENGLISH alphabet
such that the vowels do not appear at even positions?
3
...
2
...
[Use of complements] A simple technique which is used very frequently is counting
the complement of a set, when we know the size of the whole set
...

How many 5-letter words can be made using the letters A, B, C, D that do not contain the string
“ADC”? For example, ADCDD, BADCB are not counted but DACAD is counted
...
Then |X| = 45
...
We see that |A| = |B| = |C| = 42
...
Hence our answer to the original question is 45 − 3 × 42
...
2
...

1
...
How many 5 digit natural numbers are there that do not have the digit 9 appearing exactly 4
times?

T

Counting words with distinct letters made with elements of a set S

AF

5
...
2

DR

We now discuss the next combinatorial object namely the one-one functions
...
Further, n! = 1 · 2 · · · · · n and by convention, 0! = 1
...
2
...
[Injections] Let n, r ∈ N and X be a non-empty set
...
An injection f : [r] → X can be viewed as an ordered r-tuple of elements of X with distinct
entries
...

The set of all injections from A to B will be denoted by Inj(A, B)
...
If |X| = r, then a bijection f : X → X is called a permutation of X
...
, xr },
then f (x1 ),
...

3
...
As a convention, P (n, 0) = 1 for n ≥ 0
...
2
...
How many one-one maps f : [4] → {A, B,
...
Further, f (2) 6= f (1), f (3) 6= f (1), f (2) and so on
...

one-one map equals 26 · 25 · 24 · 23 = 22!
Theorem 5
...
9
...
Then the number
n!
P (n, r) = (n−r)!

...
The task is to from an r-tuple (f (1),
...
It has r compulsory parts,
namely selecting f (1), f (2),
...
, f (k − 1)}, for
n!
2 ≤ k ≤ r
...

Practice 5
...
10
...
How many ways are there to make 5 letter words using the ENGLISH alphabet if the letters must be different?

75

5
...
PERMUTATIONS AND COMBINATIONS
2
...
How many bijections f : [12] → [12] are there if a multiple of 3 is mapped to a multiple of 3?

5
...
3

Counting words where letters may repeat

Consider the word AABAB
...
For example, one such word is
A2 A3 B2 A1 B1
...

Notice that each of these words become AABAB when we erase the subscripts
...
It is a special case of Exercise 3
...
5
...

Proposition 5
...
11
...
Then, |A| = k|B|
...


Example 5
...
12
...
, nk ∈ N
...
, k
...
It is a
word made with the symbols A1 ,
...
, k
...

1
...
For each arrangement a ∈ A, define Er(a) to be the word in B obtained by
erasing the subscripts
...

Thus, by Proposition 5
...
11, |B| =

|A|
3!2!

=

5!
3!2!
...
Determine the number of ways to place 4 couples in a row if each couple sits together
...
Let Y be the set of all arrangements
of A, A, B, B, C, C, D, D in which both the copies of each letter are together
...
Let Z be the set of all arrangements of Ah , Aw ,
Bh , Bw , Ch , Cw , Dh , Dw in which Ah , Aw are together, Bh , Bw are together, Ch , Cw are together,
and Dh , Dw are together
...
So, define Er : Z → Y by Er(z) equals the
arrangement obtained by erasing the subscripts, namely h and w, that appear in z
...
Now, define M rg : Y → X by M rg(y) equals
the arrangement obtained by merging the two copies of the same letters into one single letter
...
Notice that each x in X has exactly one preimage in Y
...


76

CHAPTER 5
...
Instead of writing it in such a laborious way as the above, let us adopt a more reader
friendly way of writing the same
...
So, the 4 cohesive groups can be arranged in 4! ways
...
So, the total number of arrangements
is 24 4!
...
2
...
[Arrangements] Let n, n1 , n2 ,
...
, k and that n = n1 + · · · + nk
...

n1 !n2 ! · · · nk !
The formula remains valid even if we take some of the ni ’s to be 0
...
Let S be set of all arrangements of the n1 + n2 + · · · + nk symbols and let T be the set of
all arrangements of the symbols A1,1 ,
...
, A2,n2 ,
...
, Ak,nk
...
Notice that each s ∈ S has n1 !n2 ! · · · nk ! many pre-images
...
As |T | = (n1 + n2 + · · · + nk )!, we obtain the
desired result
...
Then our arrangements do not involve the
corresponding Ai ’s
...
As 0! = 1, we can insert some 0! in the denominator
...


DR

Corollary 5
...
14
...
Then the number of arrangements of m copies of A and n copies
of B is (m+n)!
m!n!
...
2
...
2
...

Theorem 5
...
15
...
, n}
...

Proof
...
So, let 1 ≤ k ≤ n − 1 and let X be the set of all arrangements of k copies of T ’s
and n − k copies of F ’s
...
xn ∈ X, define f (x1
...
e
...
Then, f is a bijection between X and the set of all
n!
, by Corollary 5
...
14
...
Hence, the number of k-subsets of [n] = |X| = |X| = k!(n−k)!
Discussion 5
...
16
...
For n ∈ N and r ∈ {0, 1,
...
The value of C(0, 0) is taken to be 1
...

2
...
2
...
, n, C(n, r) =
follows from the definition that C(n, r) = 0 if n < r, and C(n, r) = 1 if n = r
...


Also it

3
...
, nk ∈ N0 such that n = n1 + · · · + nk
...
, nk ) we
denote the number n1 !n2n!!···nk !
...
2
...
, k
...
, 0) = 1
...
2
...
If n ∈ N and n1 ,
...
, nk−1 ) to mean
C(n; n1 ,
...


5
...
5

Pascal’s identity and its combinatorial proof

We aim to supply a combinatorial proof of a very well known identity called the Pascal’s identity
...
2
...
[Pascal] Let n and r be non-negative integers
...


Proof
...
) If r > n, then by definition all the three terms are zero
...
If r = n, then the first and the third terms are 1 and the second term is 0
...
So, let us take r < n
...

Sometimes, we want to supply a combinatorial proof of an identity, i
...
, by associating the terms
on the left hand side (LHS) and the right hand side (RHS) with some objects and by showing a one
to one correspondence between them
...

Experiment


{1, 2, 3}












{2, 3, 4}



{1, 2, 5}
C(5, 3)















{3, 4, 5}

DR

AF

T

Complete the following list by filling the left list with all 3-subsets of {1, 2, 3, 4, 5} and the right
list with 3-subsets of {1, 2, 3, 4} as well as with 2-subsets of {1, 2, 3, 4} as shown below
...
2
...

Proof
...
So we have the identity
...
So, again we have the identity
...

Let S = {1, 2,
...
Then, by definition, there are
C(n + 1, r + 1) such sets with either n + 1 ∈ A or n + 1 6∈ A
...
, n}
...
, n, n + 1} which contain the element n + 1 is, by definition, C(n, r)
...
, n}
...

Therefore, using the above two cases, an (r + 1)-subset of S can be formed, by definition, in
C(n, r) + C(n, r + 1) ways
...


78

CHAPTER 5
...
2
...
View the function
written as a matrix of real numbers with rows indexed by R and columns indexed by C
...
e
...

x∈R

(x,y)∈R×C

y∈C

y∈C

x∈R

This is known as ‘counting in two ways’ and it is a very useful tool to prove some combinatorial
identities
...

Example 5
...
18
...
[Newton’s Identity] Let n ≥ r ≥ k be natural numbers
...


In particular, for k = 1, the identity becomes rC(n, r) = nC(n − 1, r − 1)
...
So, we take two appropriate sets R = {all r-subsets of [n]}
and C = {all k-subsets of [n]} and define f on R × C by f (A, B) = 1 if B ⊆ A, and f (A, B) = 0
if B 6⊆ A
...
Thus,
!
X X
X
f (A, B) =
C(r, k) = C(n, r)C(r, k)
...
Hence,
!
X X
X
f (A, B) =
C(n − k, r − k) = C(n, k)C(n − k, r − k)
...

Alternate
...

Select a team of size r from n students (in C(n, r) ways) and then from that team select k leaders
(in C(r, k) ways)
...
Alternately, select the leaders first in C(n, k) ways and out of the rest select another
r − k to form the team in C(n − k, r − k) ways
...

2
...
Then
C(1, r) + C(2, r) + · · · + C(n, r) = C(n + 1, r + 1)
...
1)

The RHS stands for the class F of all the subsets of [n + 1] of size r + 1
...
Note
that S has a maximum element
...
If the maximum of S is r + 1, then the remaining
elements of S have to be chosen in C(r, r) ways
...
If the maximum
of S is n + 1, then the remaining elements of S has to be chosen in C(n, r) ways
...

Observe that for r = 1, it gives us 1 + 2 + · · · + n =

n(n+1)

...
2
...
2
...

1
...
A committee of 5 students is to
be formed to represent the class
...

(b) Suppose the committee also needs to choose two different people from among themselves,
who will act as “spokesperson” and “treasurer”
...
Note that two committees are different if
i
...
even if the members are the same, they have different students as spokesperson and/or
treasurer
...
In
this case, determine the number of ways of forming the committee consisting of 5 students
...
Prove that C(pn, pn − n) is a multiple of p directly from its expression
...
Determine the number of arrangements of the letters of the word ABRACADABARAARCADA
...
Prove the following identities using combinatorial arguments
...


(b) C(n, r) = C(r, r)C(n − r, 0) + C(r, r − 1)C(n − r, 1) + · · · + C(r, 0)C(n − r, r) for natural
numbers n ≥ r
...


DR

AF

5
...

6
...
How many rectangles are there in an n × n square? How many squares are there?
8
...

(a) For each n ∈ N, prove that n! divides the product of n consecutive natural numbers
...


(c) For n, p ∈ N, the number C(pn, pn − n) is a multiple of p
...


9
...
How many ways are there to form the word MATHEMATICIAN starting from any side and
moving only in horizontal or vertical directions?

M

M
A

M
A
T

M
A
T
H

M
A
T
H
E

M
A
T
H
E
M

M
A
T
H
E
M
A

M
A
T
H
E
M
A
T

M
A
T
H
E
M
A
T
I

M
A
T
H
E
M
A
T
I
C

M
A
T
H
E
M
A
T
I
C
I

M
A
T
H
E
M
A
T
I
C
I
A

M
A
T
H
E
M
A
T
I
C
I
A
N

M
A
T
H
E
M
A
T
I
C
I
A

M
A
T
H
E
M
A
T
I
C
I

M
A
T
H
E
M
A
T
I
C

M
A
T
H
E
M
A
T
I

M
A
T
H
E
M
A
T

M
A
T
H
E
M
A

M
A
T
H
E
M

M
A
T
H
E

M
A
T
H

M
A
T

M
A

M

80

CHAPTER 5
...
3

Solutions in non-negative integers

There are 3 types of ice-creams available in the market: A, B, C
...
In how many ways can we do that? For example, we can buy 5 of type A or we can buy 3 of A
and 2 of C
...
Then, we
must have n1 + n2 + n3 = 5
...

Let us discuss it in a general setup
...
A point p = (p1 ,
...
Two solutions (p1 ,
...
, qk ) are said to be the same if pi = qi ,
for each i = 1,
...
Thus, (5, 0, 0, 5) and (0, 0, 5, 5) are two different solutions of x + y + z + t = 10
in N0
...
3
...
[Solutions in N0 ] The number of solutions of x1 +· · ·+xr = n in N0 is C(n+r−1, n)
...
Each solution (x1 ,
...


‘Put x1 many dots; put a bar; put x2 many dots; put another bar; continue; and end by putting
xr many dots
...
As there are C(n + r − 1, r − 1)
arrangements of n dots and r − 1 bars, we see that the number of solutions of x1 + · · · + xr = n in N0
is C(n + r − 1, n)
...
3
...
Determine the number of words that can be made using all of 3 copies of A and 6
copies of B
...
Hence, this number is C(9, 3)
...
First put the three A’s in row
...

Thus, we need to find number of solutions of x1 + x2 + x3 + x4 = 6 in N0
...
3
...

Discussion 5
...
3
...

1
...

2
...
For example,
{a, b, a} and {a, a, b} mean the same multisets (imagine carrying all of them in a bag)
...
How many multisets of size 6 can be made using the symbols a, b, c, d?
Taking na as the number of a’s to be put in the multiset and so on, it is asking us to find
solutions of na + nb + nc + nd = 6 in N0
...
3
...

1
...
In
how many ways can we buy 15 of them for a party?
Ans: Suppose we buy xi ice-creams of the i-th type
...


81

5
...
SOLUTIONS IN NON-NEGATIVE INTEGERS

2
...
So, the answer is C(50, 2)
...
[Reducing a related problem] In how many ways can we pick integers x1 < x2 < x3 < x4 <
x5 , from {1, 2,
...

Ans: For each choice of (x1 , x2 , x3 , x4 , x5 ), note that
(x1 − 1) + (x2 − x1 ) + · · · + (x5 − x4 ) + (20 − x5 ) = 19

i
...
,

d1 + d2 + d3 + d4 + d5 + d6 = 19

where d1 ≥ 0, d2 ≥ 3,
...
So, the problem reduces to finding the number of
solutions of n1 + n2 + · · · + n6 = 7 in N0
...

Alternate
...
The position of the bars in each such arrangement
gives us one solution
...


DR

AF

T

Conversely, each solution can be converted into such an arrangement by the following method:
let n1 be the number of dots present to the left of the first bar; n2 be the number of dots present
between the first bar and the second bar and so on
...

This is the same as the number of solutions of n1 + n2 + n3 + n4 + n5 + n6 = 7 in N0
...
Notice that x1 , x2 −3, x3 −6, x4 −9, x5 −12 is a increasing sequence of numbers from
1
...
For example, (1, 5, 8, 12, 17)

(1, 2, 2, 3, 5)
...
, 8 we can get back our original sequence
...
, 8
...
Ans: C(12, 5)
...
[Variables are bounded above] In this case problems become harder
...
So, let A = {(x, y, z) ∈ N30 : x + y + z = 48},
(a) Ax = {(x, y, z) ∈ N30 : x + y + z = 48, x ≥ 18},

(b) Ay = {(x, y, z) ∈ N30 : x + y + z = 48, y ≥ 27}, and
(c) Az = {(x, y, z) ∈ N30 : x + y + z = 48, z ≥ 36}
...
So, the answer equals C(50, 2) − |Ax ∪ Ay ∪ Az |
...
A more general formula appears in the next chapter
...
3
...


1
...
Find the number of ways to keep n identical objects in r distinct locations, so that location i gets
at least pi ≥ 0 elements, i = 1, 2, · · · , r
...
Find the number of solutions in non-negative integers of a + b + c + d + e < 11
...
COMBINATORICS - I
4
...
Determine the number of increasing sequences of length r using the numbers 1, 2,
...

6
...
, 100} such that the positive
difference between any two of the 10 integers is at least 3
...
There are 10 types of ice-creams available in the market
...
For example, we may buy 2 of first type and 1 of second type for a student
...
(a) In how many ways can one arrange n different books in m different boxes kept in a row, if
books inside the boxes are also kept in a row?
(b) What if no box can be empty?

9
...
Each shelf is capable of holding
up to 10 books
...
How many permutations of a, b,
...
How many rearrangements of 5 copies of a, 5 copies of b,
...
How many 10-subsets of {a, b,
...
How many ways (write an expression) are there to distribute 60 identical balls to 5 persons if
Ram and Shyam together get no more than 30 and Mohan gets at least 10?
i1 P
i2
n P
P
i1 =1 i2 =1 i3 =1

16
...


ik =1
i8
P
i9 =1

i29
...
Evaluate

AF

T

14
...
There are 10 persons to be seated on chairs with numbers 1 to 10
...
Then for i = 2, 3,
...
In how many ways can they be seated?
18
...
Then, a composition of n is an expression of n as a sum of positive integers
...

Let Sk (n) denote the number of compositions of n into k parts
...
Determine Sk (n), for 1 ≤ k ≤ n and
Sk (n)
...
Let n ≥ 2 be a natural number
...

20
...
4
...
4

Binomial and multinomial theorems

Discussion 5
...
1
...
By an algebraic expansion of (x+y +z)n let us mean, an expansion where
each term is of the form αxi y j z k , so that two terms differ in the degree of at least one of x, y, z
...

2
...
For example, xxx + xxy + xyx + xyy + yxx + yxy + yyx + yyy is
a word expansion of (x + y)3
...
Algebraic and word expansions for (x1 + · · · + xr )n are defined similarly
...
Take the word expansion of (X + Y + Z)4
...
Imagine a list the words in the order
XXXX, XXXY, XXXZ, XXY X,
...

5
...

(Prove this by induction!)
6
...


AF

T

7
...

4!
2!1!1!

=

DR

8
...
We express this by writing


cf XY Z 2 , (X + Y + Z)4 = C(4; 2, 1, 1)
...
4
...
[Multinomial Theorem] Let n, k ∈ N and n1 ,
...

Then


cf xn1 1 xn2 2 · · · xnk k , (x1 + · · · + xk )n = C(n; n1 , · · · , nk )
...


Proof
...
, xk
...
, nk copies of xk
...
Hence, the first identity follows
...

Theorem 5
...
3
...
Then


cf xi y n−i , (x + y)n = C(n, i)

or

n

(x + y) =

n
X
k=0

Proof
...
4
...


C(n, k)xn−k y k
...
COMBINATORICS - I

Remark 5
...
4
...
, nk ∈ Z such that n = n1 + · · · + nk
...
Defining C(n; n1 , · · · , nk ) = 0 if any of the ni ’s is negative,
we now see that the multinomial theorem remains valid even for n1 ,
...
A similar comment
is true for the binomial theorem too
...
, rk ) are thus known as ‘binomial coefficients’ and ‘multinomial
coefficients’, respectively
...

Corollary 5
...
5
...
Then the total number of subsets of [n] is 2n
...
See the exercises
...
The number of subsets of size k is C(n, k)
...

The example below show how the multinomial coefficients can be seen as an additional tool in our
study
...

Example 5
...
6
...
Fix m, n, k ∈ N
...
We can form a committee of size
k from a group consisting of m men and n women in C(m + n, k) ways
...
In
k
P
this way our answer is
C(m, i) C(n, k − i)
...


T

i=0

=

k
X
i=0

DR

AF

Alternate
...
We have C(m + n, k) =




cf xk y m+n−k , (x + y)m+n = cf xk y m+n−k , (x + y)m (x + y)n
k
i X

 h
C(m, i)C(n, k − i)
...
Let n > m be natural numbers
...


k=m

Ans: Recall that C(k, m)C(n, k) = C(n, m)C(n − m, k − m)
...


Alternate
...
The RHS stands for (A, B)
where A ⊆ [n] of size m and B ⊆ [n] \ A
...
On the other hand, we can first select a big set C of size |C| ≥ m
...
The
LHS expresses the number of ways in which this task can be done
...
Yet another way to see it is to notice that C(n, k)C(k, m) = C(n; m, k − m, n − k),


which is cf xm y k−m z n−k , (x + y + z)n
...


85

5
...
BINOMIAL AND MULTINOMIAL THEOREMS

3
...
e
...

Ans: Note that to form such a word, suppose we have selected xm many M ’s, xa many A’s,
and so on
...
In that case the number of words that can be formed from them is
C(5; xm , xt , xi , xa , xh , xc , xn , xe )
...

k1 +···+k8 =5
k1 ≤2,k2 ≤3,k3 ≤2,k4 ≤1,k5 ≤1,k6 ≤2,k7 ≤1,k8 ≤1

Exercise 5
...
7
...
Show that |P({1, 2,
...


(a) By using ‘select a subset is a task with n compulsory parts’
...

(c) Arguing in the line of ‘a subset of {1, 2,
...

2
...
Then, prove in two different ways that the number of subsets of S of
odd size is the same as the number of subsets of S of even size
...


k=0

C(t, k) C(n − t, ` − k) =

4
...


`=0

n
P

k=0

AF

t
P

C(t, k) C(n − t, ` − k), for any t, 0 ≤ t ≤ n
...
Show that C(n, `) =

k≥0

T

k≥0

5
...
Supply a different

`=r

proof by manipulating the binomial coefficients
...
We know that rC(n, r) = nC(n − 1, r − 1)
...

n
P
(a) Evaluate
rC(n, r) for n ≥ 3
...


(5k + 3) C(n, 2k + 1) for n ≥ 3
...


n
P
n(n + 1)
7
...
Then, we know that S1 (n) =
, S2 (n) =
2
k=1

2
n(n + 1)(2n + 1)
n(n + 1)
and S3 (n) =

...
Also, find a recursive method
6
2
to find closed form expression for Si (n), for i ≥ 5
...
For n ∈ N, k1 ,
...
, km ) = C(n − 1; k1 − 1,
...
, km − 1)
...


86

CHAPTER 5
...
For n, m ∈ N, evaluate

X

C(n; k1 ,
...


k1 ,
...
+km =n

10
...
How many terms are there in the (algebraic) expansion of (x1 + x2 + · · · + xm )n ?
How many terms involve at least one of each xi , i = 1,
...
Let n, r ∈ N
...
Supply a
k=0

combinatorial proof by using Map([r], [n])
...
For n, m ∈ N and r = b m
2 c (greatest integer function) evaluate
X

(−1)k2 +k4 +···+k2r C(n; k1 ,
...


k1 ,
...
+km =n

5
...
By a circular arrangement of elements of S, we mean an
arrangement of the elements of S on a circle
...
e
...
By
[x1 , x2 ,
...
We use the word circular permutation if elements of S are distinct
...


A1

A5

A2

A3

A2

A4

A1

A4

A1

A3
[A1 , A2 , A3 , A4 , A5 , A1 ]

A5
[A1 , A5 , A4 , A3 , A2 , A1 ]

Figure 5
...
5
...
Determine the number of circular permutations of X = {A1 , A2 , A3 , A4 , A5 }
...
Let B = {circular permutations of X} and A = {permutations of X}
...
For example, if we break the leftmost circular permutation in Figure 5
...
Notice that |f −1 (b)| = 5, for each b ∈ B
...
Thus, by the principle of disjoint pre-images
of equal size, the number of circular permutations is 5!/5
...
5
...
[Circular permutations] The number of circular permutations of {1, 2,
...

Proof
...
Here we give an alternate proof
...
, n − 1, n}}
...
, n −
1

Think of creating the circular permutation from a given permutation
...
5
...
Define f : A → B as f ([n, x1 , x2 ,
...
, xn−1 ]
...
, xn−1 ]) = [n, x1 , x2 ,
...
Then, g ◦ f (a) = a, for each a ∈ A and f ◦ g(b) = b, for
each b ∈ B
...
5
...

Example 5
...
3
...

Ans: There is only one A
...
So, the required answer is 2!8!4
...
5
...

1
...
, Xn ] by a rotation R1 ([X1 ,
...
, Xn ), we mean the arrangement [X2 ,
...
, Xn ) we mean the arrangement [X3 ,
...
On similar lines, we define
Ri , i ∈ N and put R0 (X1 ,
...
, Xn ]
...
, Xn ) = Rkn (X1 ,
...
, Xn ]
...
The orbit size of an arrangement [X1 ,
...
, Xn ) = [X1 ,
...
In that case, we call
n
o
R0 (X1 ,
...
, Xn ),
...
, Xn )
the orbit of [X1 ,
...

Discussion 5
...
5
...
We have R1 (ABCABCABC) = [BCABCABCA], R2 (ABCABCABC) =
[CABCABCAB] and R3 (ABCABCABC) = [ABCABCABC]
...


DR

AF

T

2
...
An arrangement of
S with orbit size 3 is [ACBACB]
...
There is no arrangement of S = {A, A, B, B, C, C} with orbit size 2
...
Thus
the element X1 repeats at least 3 times in S, which is not possible
...
There is no arrangement of {A, A, B, B, C, C} with orbit size 1 or 2 or 4 or 5
...
There are 3! arrangements of {A, A, B, B, C, C} with orbit size 3
...
Take an arrangement of {A, A, B, B, C, C} with orbit size 3
...
How many distinct arrangements can we generate by breaking the circular
arrangement at gaps?
Ans: 3
...

7
...
Make a circular arrangement by
joining the ends
...
They are the elements of the same orbit
...
Take an arrangement of n elements with orbit size k
...
How many distinct arrangements can we generate by breaking the circular arrangement
at gaps?
Ans: k
...

9
...


88

CHAPTER 5
...
5
...
The orbit size of an arrangement of an n-multiset is a divisor of n
...
Suppose, the orbit size of [X1 ,
...
Then,
Rk (X1 ,
...
, Xn ) = · · · = Rkp (X1 ,
...
, Xn )
as (p+1)k = pk+k = n−r+k ≡ k−r (mod n)
...
, Xn ) = [X1 ,
...
Hence, r = 0
...

Example 5
...
7
...

Ans: How many arrangements are there of orbit size 1? 0
...

How many arrangements are there of orbit size 3? 0
...

How many arrangements are there of orbit size 5? 5!
...

10!
− 5!
...
The number of
10!
5!
circular arrangements generated by those of orbit size 10 is 2!2!2!2!2!10
− 10

...


DR

AF

T

Discussion 5
...
8
...
Let [X1 ,
...
, Yn ] be two arrangements of an n-multiset
...
, Xn ] + [Y1 ,
...
By
[Ri +Rj ](X1 ,
...
, Xn )+Rj (X1 ,
...
By Ri ([X1 ,
...
, Yn ]) we denote the expression Ri (X1 ,
...
, Yn )
...
5
...
Think of all arrangements P1 ,
...
How many copies of [ABCABC] are there in [R0 + · · · + R5 ](P1 + · · · + Pn )?
n = 2!2!2!
Ans: Of course 6
...

Proposition 5
...
10
...
, Pn be all the arrangements of an m-multiset
...

Proof
...
, Rm−1 ), and collect all resulting arrangements
...
Similarly, if we
apply Ri on (P1 + · · · + Pn ), we get one copy of each arrangement
...

Proposition 5
...
11
...
Then the
number of rotations Ri , i = 0, 1,
...
Furthermore,
[R0 + R1 + · · · + Rm−1 ](P ) =

m
orbit(P )
...
As k is the orbit size of P , we already know that k divides m
...
Then
R0 , Rk ,
...
If there is any other s such that Rs fixes P , then noting that s is not

89

5
...
CIRCULAR ARRANGEMENTS

a multiple of k, let s = kj + r, where 0 < r < k
...
This is a
contradiction to the fact that k is the orbit size of P
...


Discussion 5
...
12
...
Recall that
each orbit accounts for one circular arrangement of objects in S
...

Now, let P1 ,
...
Then,
X

X

(the number of rotations fixing Pi ) orbit(Pi ) =

Pi

Pi

[R0 + · · · + Rm−1 ](Pi )

= m(P1 + · · · + Pn )
= m(all circular arrangements)
...
But,
get that the total number of all circular arrangements is m
Pi

the number of rotations fixing Pi =

DR

X

AF

T

notice that

Pi

X
Pi

|{Rj |Rj (Pi ) = Pi }|

= |{(Pi , Rj )|Rj (Pi ) = Pi }|
X
=
|{Pi |Rj (Pi ) = Pi }|
Rj

=

X

the number of Pi ’s fixed by Rj
...
5
...


Rj

the number of Pi ’s fixed by Rj
...
How many circular arrangements of {A, A, A, B, B, B, C, C, C} are there?

Ans: First way:
orbit size

no of arrangements

no of circular arrangements

1

0

0

2

0

3

3!

4, 5, 6, 7, 8

0

9
Total
Second way:

X

9!
3!3!3!

− 3!

0
3!
3

=2
0

9!
−3!
3!3!3!

9

= 186

188

90

CHAPTER 5
...
6
...
8 + 3! + 3!

Thus, the number of circular arrangements is
5
...
7
...
2
...
8 + 4)
564
=
=
= 188
...
Determine the number of circular arrangements of size 5 using the alphabets A, B and C
...


Verify that the answer will be 8 if we have just two alphabets A and B
...
5
...

1
...
Let us assume that any two garlands are same if one can be obtained from the other by rotation
...

(a) The flowers can have colors ‘red’ or ‘blue’
...

3
...

Then, determine the number of distinct garlands that can be formed using 6 flowers, 4 of which
are blue and 2 are red
...
Find the number of circular permutations of {A, A, B, B, C, C, C, C}
...
6
...
Let us assume that any two garlands are same if one can be obtained from the other by rotation
...
, Rk
...
Persons P1 ,
...
With this situation
find answers to the following questions
...
What is the minimum possible
number of persons telling truths? Give a circular arrangement of L and T showing that the
minimum is attainable
...

What is the orbit size of such a circular arrangement?
(c) What if we change the condition: ‘if Pi talks lie, then the next two persons to his right talk
truth’ ? Give a circular arrangement of L and T showing that the minimum is attainable
...
6

Set partitions

{1, 2, 9}, {3, 4, 5, 6, 7, 8} and other ways
...
6
...
There are 9 balls with numbers 1, 2,
...
Imagine that we have
to carry them in two identical polythene bags, without having a bag empty
...

Let S be a nonempty set and k ∈ N
...
For brevity, a partition of S into k subsets
is called a k-partition of S
...
6
...

1
...

2
...
To see this, observe that, if n = 1, then
we cannot have a 2-partition of [1] and the formula also gives the value 0
...
For each
non-trivial A ⊆ [n] (that is, A 6= ∅, [n]), the set {A, Ac } is a 2-partition of [n]
...

3
...

n
o
Discussion 5
...
3
...
In how many ways can we write {1, 2}, {3, 4}, {5, 6}, {7, 8, 9}, {10, 11, 12}
on a piece of paper, with the condition that sets have to be written in a row in increasing size?

92

CHAPTER 5
...

n
o
{1, 2}, {3, 4}, {5, 6}, {7, 8, 9}, {10, 11, 12}
n
o
{2, 1}, {3, 4}, {5, 6}, {7, 8, 9}, {10, 11, 12}
n
o
{5, 6}, {3, 4}, {1, 2}, {10, 11, 12}, {9, 7, 8}
n
o
{2, 3}, {1, 4}, {5, 6}, {7, 8, 9}, {10, 11, 12}
n
o
{2, 1}, {3, 4}, {7, 8, 9}, {5, 6}, {10, 11, 12}

correct
correct
correct
incorrect, not the same partition
incorrect, not satisfying the condition

There are 3!(2!)3 × 2!(3!)2 ways
...
, 12}
...
How many arrangements do we generate from a partition which has pi subsets of size ni , where
n1 < · · · < nk ?
Ans: p1 !(n1 !)p1 · · · pk !(nk !)pk =

k
Y

[pi !(ni !)pi ]
...
6
...
[Set partition] The number of partitions of [n] consisting of pi subsets of size ni ,
i = 1, 2,
...

p
1 ! · · · (nk !) k pk !

DR

AF

T

Proof
...
Take any x = x1
...
Since we know that the
sets in the partition have to be in the increasing order of their sizes, this arrangement naturally gives
us a way to construct the partition
...
Take the next n1 letters and make a set
...
Then take the next n2 letters and
make a set
...
In fact, once an arrangement x is given, there is only
a unique partition of the above type that we will get in this way
...

Thus we have defined a function f : X → Y
...
This
i=1

means |f −1 (y)| =
|Y | =

k
Q

[pi !(ni !)pi ]
...


Let n, r ∈ N
...
By convention, S(0, 0) = 1 and S(n, 0) = 0 for n ∈ N
...
6
...
We have S(5, 5) = 1, as the only way to make a 5-partition of [5] is to consider
{{1}, {2},
...

We have S(5, 1) = 1, as the only way to make a 1-partition of [5] is to consider {[5]}
...

We have S(5, 2) = 15, as the formula is 2n−1 − 1
...

Theorem 5
...
6
...
Then S(n + 1, r) = S(n, r − 1) + rS(n, r)
...
If r = 1, then the verification is trivial
...
Take an r-partition F of [n + 1]
...


93

5
...
SET PARTITIONS

If {n + 1} is not present in F , then n + 1 is present in some part with some other elements
...
Note that, given any r-partition of
[n], by inserting n + 1 into any of these r parts, we can create r many r-partitions of [n + 1]
...

Example 5
...
7
...

Ans: Make an r-partition of the set of these balls in S(n, r) ways
...

Since boxes are identical, this can be done in one way
...

To proceed further, consider the following example
...
6
...
Let A = {a, b, c, d, e} and define an onto function f : A → S by f (a) = f (b) =
f (c) = 1, f (d) = 2 and f (e) = 3
...



Conversely, take a 3-partition of A, say, A1 = {a, d}, A2 = {b, e}, A3 = {c}
...
Each of them is related to a one-one function
gi : {A1 , A2 , A3 } → [3]
...
Notice that fi (p) = gi (Ar ) if p ∈ Ar
...
6
...
Let n, k ∈ N
...

Proof
...

Observe that, when f : [n] → [k] is an onto function, then {f −1 (1),
...
Keeping that in mind, we define F : X → Y as F (f ) = {{f −1 (1),
...

On the other hand, given a k-partition α = {S1 ,
...
, Sk } → [k] and then defining f (p) = σ(Si ) if
p ∈ Si , i = 1,
...
This means |F −1 (α)| = n!, for each α ∈ Y
...

Lemma 5
...
10
...
Then,
nm =

n
X

C(n, k)k!S(m, k)
...
2)

k=1

Proof
...

On the other hand, any function f : [m] → [n] is an onto function from [m] to rng f , and rng f
can only be a nonempty subset of [n]
...
This has to be done for each subset A of size k and for each
k = 1,
...
Choosing a subset A of size k can be done in C(n, k) many ways and there are k!S(m, k)
many onto functions from [m] to A
...


94

CHAPTER 5
...
6
...
Let n, k ∈ N
...


i=0

Proof
...
The number n + 1 must belong to some part
...
They can be chosen in C(n, i) ways
...
Since i varies from 0 to
n, we have the identity
...

Remark 5
...
12
...
Recall that the number of onto functions f : [n] → [m] is the same as the
number of ways to put n distinct objects 1, 2,
...
, m
...

2
...

3
...
2)
...

Summary of some work done till now

1
...


AF

T

2
...


DR

3
...

4
...

i=0

5
...

6
...

7
...

8
...

9
...

Exercise 5
...
13
...
Determine the number of ways of carrying 20 distinct heavy books with 4
identical bags if each bag contains 5 books?
2
...
We know that S(n, 1) = 1 and S(n, 2) = 2n−1 − 1
...


95

5
...
NUMBER PARTITIONS
4
...
e
...


r=0

It is called the nth Bell number
...
Determine Bell(n), for
n
P
2 ≤ n ≤ 5
...

k=0

5
...
If all the people get down at some level, say 1, 2, 3, 4
and 5 then, calculate the number of ways of getting down if at least one person gets down at each
level
...
How many functions are there from [10] to [4] such that each i ∈ [4] has at least two pre-images?
P
7
...
Show that S(n, k) = 1a1 −1 2a2 −1 · · · k ak −1 , where the summation
is over all solutions of a1 + · · · + ak = n in N, by showing that the RHS has the same initial
values and satisfies the same recurrence relation
...
7

Number partitions

Let n, k ∈ N
...
By πn (k), we denote the number of partitions of n into exactly k parts
and by πn we denote the number of all partitions of n
...
By definition
πn (k) = 0, whenever k > n
...
7
...


1
...


AF

T

2
...

Verify that π7 (2) = 3 and π7 (3) = 4
...
7
...
We give here two instances where number partitions occur naturally
...
Determine the number of ways of carrying n copies of the same book in r identical bags with
the restriction that no bag goes empty
...

As the bags are indistinguishable, arrange them so that the number of books inside the bags are
in decreasing order
...

2
...

Ans: As the books are indistinguishable, we need to count the number of books in each bag
...
Also, as empty bags are allowed the resulting sequence (of numbers of books
in the bags in increasing order) may have some 0’s
...

At times ‘a partition of n into k parts’ is written in short as ‘a k-partition of n’
...
7
...
Let n, r ∈ N
...

Proof
...
For example, if n = 7, r = 4, we change the partition (6, 1) which has at most four parts
into (6, 1, 0, 0) which is a four tuple
...
Next, add 1 to each component of

96

CHAPTER 5
...
We get an r-partition of n + r
...

Conversely, given an r-partition of n+r, subtract 1 from each component
...
Truncating them we get a partition of n into at most r parts
...
7
...
[Recurrence for πn (k)] Another way of writing the previous result is
πn (k) = πn−k (0) + πn−k (1) + · · · + πn−k (k)
and so
πn (k) = πn−1 (k − 1) + πn−k (k)
...

Practice 5
...
5
...
, 8
...
7
...
Prove that π2r (r) = πr for any r ∈ N
...
7
...
Let n, k ∈ N and λ = (n1 , n2 , · · · , nk ) be a k-partition of n
...
Then, the Ferrer’s Diagram of λ is a pictorial representation of the partition created in the
following way
...
The first row is on the top
...


DR

AF

2
...
The hook length is the number of dots in
that particular hook
...
7
...
Ferrer’s diagram for the partitions λ1 = (5, 3, 3, 2, 1, 1), λ2 = (6, 4, 3, 1, 1) and
λ3 = (5, 5, 4, 3, 2) of 15, 15 and 19 are given below
...
2: Ferrer’s diagram of λ1 , λ2 , λ3
Suppose that we have a Ferrer’s diagram of some partition λ of n
...
In general, the number of dots in the i-th column is always greater than or equal
to the number of dots in the (i + 1)-th column
...

This new partition is called the conjugate of λ and is denoted by λ0
...

For instance, if λ = (5, 3, 3, 2, 1, 1) is a partition of 15, then its conjugate is λ0 = (6, 4, 3, 1, 1)
...


97

5
...
NUMBER PARTITIONS

Remark 5
...
9
...
, nk ) be a partition (of some number)
...
It’s conjugate λ0 = (p1 ,
...
For example, the conjugate of (5, 3, 1, 1) is a
partition with 5 components (p1 ,
...
So p1 = 4
...
So p2 = 2
...
So λ0 = (4, 2, 2, 1, 1)
...
7
...
Let n ∈ N
...

Proof
...
For 1 ≤ i ≤ k, define li = length
of the (i, i)-th hook
...
, lk ) is a strictly decreasing
sequence of positive integers with l1 + l2 +
...
Hence, from a self conjugate partition λ of n
we have got a partition of n whose parts are distinct and odd
...
, lk ) where parts are distinct and odd, we can get
a self conjugate partition by putting l1 dots in the (1, 1)-th hook, l2 dots in the (2, 2)-th hook and so
on
...
(Try to give a formula for the
resulting partition in terms of li ’s
...

Proposition 5
...
11
...

Then f (n) = πn − πn−1
...
For n = 1, both the sides of the equality are 0
...

We shall count the complement
...
, nk ) be a partition of n with nk = 1
...
) Then, λ gives rise to a partition of n − 1, namely (n1 ,
...

Conversely, if µ = (t1 ,
...
, tk , 1) is a partition of n with last
part 1
...

Thus, using Remark 5
...
4, the number of partitions of n in which no part is 1 is πn − πn−1
...
7
...

1
...
Find an expression for the number of k-partitions of n in which
each part is at least 3
...
Let n, k, m ∈ N
...

(a) The number of k-partitions of n with the first (largest) part m = the number of m-partitions
of n with the first part k
...

(c) The number of partitions of n into at most k parts with the first part at most m = the
number of partitions of n into at most m parts with the first part at most k
...
For n, r ∈ N, prove that πn (r) is the number of partitions of n + C(r, 2) into r unequal parts
...
Recall that a composition of n is an ordered tuple of positive integers whose sum is n
...
Express the following quantities in terms of Fibonacci numbers
(F1 = F2 = 1)
...

(b) The number of ordered partitions of n into parts equal to 1 or 2
...
COMBINATORICS - I
(c) The number of ordered partitions of n into odd parts
...
Let f (n, r) be the number of partitions of n where each part repeats less than r times
...
Show that f (n, r) = g(n, r)
...
8

Lattice paths and Catalan numbers

Let A = (a1 , a2 ) and B = (b1 , b2 ), a1 ≤ b1 , a2 ≤ b2 , be two points on Z × Z
...
, Pk = B) of S such that if Pi = (x, y) then
Pi+1 is either (x + 1, y) or (x, y + 1), for 1 ≤ i ≤ k − 1
...
For example, from (2, 3) if we take the sequence of steps
U U RRU RRRU R, then we reach (8, 7)
...
3
...
3: A lattice with a lattice path from (2, 3) to (8, 7)
Discussion 5
...
1
...
We have to take m many
steps of type R in total in order to reach a point with x-coordinate m
...
So, any arrangement of
m many R’s and n many U ’s will give such a path uniquely
...

Discussion 5
...
2
...


`=0

Ans: Observe that C(n + m + 1, m) is the number of lattice paths from (0, 0) to (m, n + 1)
...
, m for
the first time
...

Hence, the total number of lattice paths is the sum of the number of lattice paths from (0, 0) to
(i, n + 1)
...
Our proof is complete
...
8
...
As observed earlier, the number of lattice paths from (0, 0 to (n, n) is C(2n, n)
...
Then,
what is the number of such paths?
Ans: Call an arrangement of n many U ’s and n many R’s a ‘bad path’ if the number of U ’s exceeds
the number of R’s at least once
...
To each such
arrangement, we correspond another arrangement of n+1 many U ’s and n−1 many R’s in the following

99

5
...
LATTICE PATHS AND CATALAN NUMBERS

way: spot the first place where the number of U ’s exceeds that of R’s in the ‘bad path’
...
For example, the bad path RRU U U RRU corresponds
to the path RRU U U U U R
...
Thus, the number of bad
C(2n, n)
paths is C(2n, n − 1)
...

n+1
Discussion 5
...
4
...
By a standard (m, n)-lattice, we mean the rectangular grid with opposite corners at
(0, 0) and (m, n)
...
Recall that a lattice path from (0, 0) to (n, n) can be viewed
an arrangement of n many R’s and n many U ’s
...

From the previous discussion, it follows that the number of lattice paths from (0, 0) to (n, n) that
do not enter the region above the line y = x is C(2n, n)/(n + 1)
...
8
...
The n-th Catalan number, denoted Cn , is the number of different representations
of the product A1 · · · An+1 of n + 1 square matrices of the same size using n pairs of brackets
...

Example 5
...
6
...
Hence
C3 = 5
...


AF

T

Theorem 5
...
7
...
Then Cn =

DR

Proof
...
First we erase, the subscripts, with the understanding that the i-th A from left is Ai
...

Proof of the claim
...
Assume it is
true for n = 2, 3,
...

Observe that the last ( is followed by AA), as the product is meaningful
...
Then our original meaningful representation of the
product of p + 1 matrices changes into a meaningful representation X ∗ of p matrices with p − 1 pairs
of brackets
...
This means, in X, after the (p − k)-th ‘(’, there are at least k + 2 matrices
...

Drop the right brackets and one A from the right end, to have a sequence of n many ‘(’s and n
many A’s, where the number of A’s used till the (n − k)-th ‘(’ is at most n − (k + 1) = n − k − 1
...

Conversely, given such an arrangement, we can put back the ‘)’s: first add one more A at the right
end; find two consecutive letters from the last ‘(’; put a right bracket after them; treat (AA) as a
letter; repeat the process
...


100

CHAPTER 5
...
8
...
[Recurrence relation for Cn ] Let n ∈ N
...


i=0

Proof
...
, n
...
Hence,
Cn =

n
X

Ci−1 Cn−i =

i=1

n−1
X

Ci Cn−1−i
...
8
...
A full binary tree is a rooted binary tree in which every node either has exactly two
offsprings or has no offspring, see Figure 5
...
Show that Cn is equal to the number of full binary trees
on 2n + 1 vertices
...
4: Full binary trees on 7 vertices (or 4 leaves)

DR

Let f (n) be the number of full binary trees on 2n + 1 vertices
...
We see that
f (0) = 1 = C0
...
We two trees, one on the
left, say Tl and one on the right, say Tr
...
, n − 1
...
Hence, f (n) =
f (k)f (n − k − 1)
...

k=0

Remark 5
...
10
...
The interested reader may have a look
at those
...
8
...

1
...
Use the recurrence relation Cn =
Ci−1 Cn−i to show that
i=1

Cn = C(2n, n)/(n + 1)
...
Give a bijection between ‘the solution set of x0 + x1 + x2 + · · · + xk = n in non-negative integers’
and ‘the number of lattice paths from (0, 0) to (n, k)’
...
Use lattice paths to give a combinatorial proof of
C(n, k) = 2n
...
Use lattice paths to give a combinatorial proof of

k=0
n
P
k=0

C(n, k)2 = C(2n, n)
...
]

101

5
...
LATTICE PATHS AND CATALAN NUMBERS

5
...
Give an
arithmetic proof of this fact
...
A man is standing on the edge of a swimming pool (facing it) holding a bag containing n blue
and n red balls
...
If the ball is blue he
takes a step back and if the ball is red, he takes a step forward
...
Let n ≥ 4 and consider a regular polygon with vertices 1, 2, · · · , n
...
How many lattice paths are there from (0, 0) to (9, 9) which does not cross the dotted line, that
is they stay in lower part of the lattice?

(9, 9)

DR

AF

T

(0, 0)

9
...
We want to write a matrix of size 10 × 2 using numbers 1,
...
Then, determine the number of such matrices in which the numbers
(a) increase from left to right?
(b) increase from up to down?
(c) increase from left to right and up to down?
11
...

Exercise 5
...
12
...
Prove that there exists a bijection between any two of the following sets
...

(b) The set of maps of an n-set into an m-set
...

(d) The set of n-tuples on m letters
...
Prove that there exists a bijection between any two of the following sets
...
COMBINATORICS - I
(a) The set of n letter words with distinct letters out of an alphabet consisting of m letters
...

(c) The set of distributions of n distinct objects into m distinct boxes, subject to ‘if an object
is put in a box, no other object can be put in the same box’
...

(e) The set of permutations of m symbols taken n at a time
...
Prove that there exists a bijection between any two of the following sets
...

(b) The set of distributions on n non-distinct objects into m distinct boxes
...


Need to put somewhere
1
...
Write a generating function for an and hence evaluate
n
P
(k − 1)k(k + 1)
...
Let an = −3an−1 + 10an+2 + 3 × 2n , for n ≥ 2 with a0 = 0 and a1 = 6
...


Chapter 6

Combinatorics - II
6
...

We will prove its mathematical form first
...
1
...
[Pigeonhole Principle, PHP] Let A be a finite set and let f : A → {1, 2,
...
Let p1 ,
...
If |A| > p1 + · · · + pn , then there exists i ∈ {1, 2,
...


T

Proof
...
, n}, |f −1 (i)| ≤ pi
...


DR

AF

The elements of A are thought of as pigeons and the elements of B as pigeon holes; so that the
principle is commonly formulated in the following forms, which come in handy in particular problems
...
1
...
[Pigeonhole principle (PHP)]

PHP1
...

PHP2
...

PHP3
...

Example 6
...
3
...
Consider a tournament of n > 1 players, where each pair plays exactly once
and each player wins at least once
...

Ans: Number of wins varies from 1 to n − 1 and there are n players
...
A bag contains 5 red, 8 blue, 12 green and 7 yellow marbles
...

3
...

Ans: Let a be a person in the group
...
Clearly |S| + |F | = 5
...

Case 1: |F | ≥ 3
...
Else F is a set of mutual strangers of size at least 3
...
COMBINATORICS - II

Case 2: |S| ≥ 3
...
Else S becomes a set of mutual friends of size at least 3
...
Then, prove that there exist i, j, k ∈ {1, 2,
...
Let {x1 ,
...


9
P

xi

3
Ans: Note that i=19 = 30
9 = 3 + 9
...
Hence, the required result follows
...
Each point of the plane is colored red or blue, then prove that there exist two points of the same
color which are at a distance of 1 unit
...
Draw a unit circle with P as the center
...
Else, the circumference contains a point
which has the same color as that of P
...
If 7 points are chosen inside or on the unit circle, then there is a pair of points which are at a
distance at most 1
...
By PHP there is a sector containing at least two points
...

7
...
, 2n}, then there are two, where one of them divides
the other
...
There are n odd
numbers
...
If i ≤ j, then x|y, otherwise y|x
...
Given any n integers, n ≥ 1012 integers, prove that there is a pair that either differ by, or sum
to, a multiple of 2021
...
, n1012
...
, 1012}
...
Then, consider their difference
...
For, consider {0, 1, 2,
...

9
...

Ans: Let S = {1 = 30 , 3, 32 , 33 ,
...
Then, |S| = 2022
...
, 2020, by PHP, there is a pair which has the same remainder
...

10
...

Ans: Let S = {1 = 30 , 3, 32 , 33 ,
...
As |S| > 104 , by
PHP, there exist i > j such that the remainders of 3i and 3j , when divided by 104 , are equal
...
Then 3` − 1 = s · 104 for some positive integer
s
...

11
...
If f (x) = 5 for three distinct integers,
then for no integer x, f (x) can be equal to 4
...
If f (d) = 4, for an integer d, then (d − a)|f (d) − f (a) = −1
...
Similarly b, c = d ± 1
...


105

6
...
PIGEONHOLE PRINCIPLE

Alternate
...
For our problem,
we see that f (x) = (x − a)(x − b)(x − c)g(x) + 5, where g is an integer polynomial
...
By PHP some two
of them are the same, a contradiction
...
1
...
Let r1 , r2 , · · · , rmn+1 be a sequence of mn + 1 distinct real numbers
...

Does the above statement hold for every collection of mn distinct numbers?
Proof
...
If some
li ≥ m + 1 then we have nothing to prove
...
Since (li ) is a sequence of mn + 1
integers, by PHP, there is one number which repeats at least n+1 times
...
Notice that ri1 > ri2 , because if ri1 < ri2 , then ‘ri1 together with the
increasing sequence of length s starting with ri2 ’ gives an increasing sequence of length s+1
...


DR

AF

T

Alternate
...
Now, if either s ≥ m + 1 or
t ≥ n + 1, we are done
...
So, the number of tuples
(s, t) is at most mn
...
Now, proceed as in the previous case
to get the required result
...
Consider the sequence:
n, n − 1, · · · , 1, 2n, 2n − 1,
...


Theorem 6
...
5
...

Proof
...
As a is
irrational, for every m ∈ N, 0 < ia − biac < 1, for i = 1,
...
Hence, by PHP there exist i, j
with i < j such that
1
1
|(j − i)a − (bjac − biac)| <


...
To generate another pair,
find m2 such that
1
p1
< |a − |
m2
q1

and proceed as before to get (p2 , q2 ) such that |q2 a − p2 | < m12 ≤
we have pq11 6= pq22
...


1
q2
...
1
...
Let α be a positive irrational number
...

Proof
...
By Archimedean property, there exists n ∈ N such that
1
n < b − a
...
, n + 1
...
COMBINATORICS - II


0 < ri − rj < 1/n
...
Let p be the smallest integer so

that px > a
...
So,
px ∈ (a, b) and px ∈ S as well
...
b) ∩ S 6= ∅
...
1
...

1
...
Write 6 maximal chains P1 ,
...
Let A1 ,
...

i

Use PHP, to prove that there exist i, j such that Ai , Aj ∈ Pk , for some k
...
, A7 }
cannot be an anti-chain
...


2
...
If
(a) f (x) = 14 for three distinct integers, then for no integer x, f (x) can be equal to 15
...

3
...
Is it possible to select two of them, say x and y such that
x−y
0 < 1+xy
< √13 ?
4
...
, n} the product

n
Q
i=1


i − p(i) is even
...
Five points are chosen at the nodes of a square lattice (view Z × Z)
...
Choose 5 points at random inside an equilateral triangle of side 2 units
...


AF

T

7
...
Then, some circle of unit radius contains at least 13 of the given points
...
If each point of a circle is colored either red or blue, then show that there exists an isosceles
triangle with vertices of the same color
...
Each point of the plane is colored red or blue, then prove the following
...

(b) There is a rectangle all of whose vertices have the same color
...
Show that among any 6 integers from {1, 2,
...

11
...
, 46} has four elements a, b, c, d such that a + b = c + d
...
Show that if 9 of the 12 chairs in a row are filled, then some 3 consecutive chairs are filled
...
Show that every n-sequence of integers has a consecutive subsequence with sum divisible by n
...
Let n > 3 and S ⊆ {1, 2,
...
Then, there exist a, b, c ∈ S such that
a + b = c
...
Let a, b ∈ N, a < b
...
, a + b}, there is a
pair which differ by either a or b
...
Consider a chess board with two of the diagonally opposite corners removed
...
Mark the centers of all squares of an 8 × 8 chess board
...
Fifteen squirrels have 104 nuts
...


6
...
PRINCIPLE OF INCLUSION AND EXCLUSION

107

19
...
, xn } ⊆ Z
...

20
...
On disc A, n sectors are colored red and
n are colored blue
...
Show
that there is a way of putting the two discs, one above the other, so that at least n corresponding
sectors have the same colors
...
Show that there is a non-zero integer multiple of 2021 whose decimal representation has 2022
consecutive zeroes after the first decimal point
...
If more than half of the subsets of {1, 2,
...

23
...
, 11}
...

24
...
If he takes 45 aspirin altogether then prove
that in some sequence of consecutive days he takes exactly 14 aspirins
...
If 58 entries of a 14 × 14 matrix are 1 and the remaining entries are 0, then prove that there is
a 2 × 2 submatrix with all entries 1
...
Let A and B be two finite non-empty sets with B = {b1 , b2 ,
...
Let f : A → B be any
function
...
, am if |A| = a1 + a2 + · · · + am − m + 1
then prove that there exists an i, 1 ≤ i ≤ m such that |f −1 (bi )| ≥ ai
...
Each of the given 9 lines cuts a given square into two quadrilaterals whose areas are in the ratio
2 : 3
...

28
...
, 100} be a 10-set
...

29
...

30
...

(b) 2 and 3 and the number of 2’s and 3’s are equal? Justify your answer
...
Each natural number has a multiple of the form 9 · · · 90 · · · 0, with at least one 9
...
2

Principle of Inclusion and Exclusion

We start this section with the following example
...
2
...
How many natural numbers n ≤ 1000 are not divisible by any of 2, 3?

Ans: Let A2 = {n ∈ N|n ≤ 1000, 2|n} and A3 = {n ∈ N|n ≤ 1000, 3|n}
...
So, the required answer is 1000 − 667 = 333
...


Theorem 6
...
2
...
Then,


n
X
n
X


k+1
∪ Ai =
Ai ∩ · · · ∩ Ai
...
1)
1
k
i=1

k=1

1≤i1 <···
108

CHAPTER 6
...
, An equals
n
X


n
U \ ∪ Ai = |U | −
(−1)k
i=1

k=1



X

1≤i1 <···



Ai ∩ · · · ∩ Ai
...
Let x ∈
/ ∪ Ai
...
1)
...
Then,
the contribution of x to |Ai1 ∩ · · · ∩ Aik | is 1 if and only if {i1 ,
...
, r}
...
Thus, the contribution of x to the right
1≤i1 <···
hand side of Equation (6
...

The element x clearly contributes 1 to the left hand side of Equation (6
...
The proof of the equivalent condition is left for the readers
...
2
...
How many integers between 1 and 10000 are divisible by none of 2, 3, 5, 7?
Ans: For i ∈ {2, 3, 5, 7}, let Ai = {n ∈ N|n ≤ 10000, i|n}
...

Definition 6
...
4
...


DR

AF

T

Thus, ϕ(n) is the number of natural numbers less than or equal to n and relatively prime to n
...

Theorem 6
...
5
...
, pk be the distinct prime divisors of n
...

p1
p2
pk

Proof
...
Then, |Ai | =
By PIE,
k
h
X
1
ϕ(n) = n − | ∪ Ai | = n 1 −
+
i
pi
i=1

X
1≤i
n
n
, |Ai ∩ Aj | =
, and so on
...
2
...
[Derangement] A derangement of objects in a finite set S is a permutation/arrangement σ on S such that for each x, σ(x) 6= x
...
, n}
is denoted by Dn with the convention that D0 = 1
...

If a sequence (xn ) converges to some limit `, we say that xn is approximately ` for large values of
n, and write xn ≈ `
...
2
...
For n ∈ N, Dn = n!

n
X
(−1)k
k=0

k!


...

n!
e

109

6
...
PRINCIPLE OF INCLUSION AND EXCLUSION

Proof
...
Then, verify that
|Ai | = (n − 1)!, |Ai ∩ Aj | = (n − 2)! and so on
...
(n − 1)! − C(n, 2)(n − 2)! + · · · + (−1)n−1 C(n, n)0! = n!

n
X
(−1)k−1

i

So, Dn = n! − | ∪ Ai | = n!
i

n
P
k=0

(−1)k
k!
...


Dn
1
=
...
2
...
How many square-free integers do not exceed n for a given n ∈ N?

Answer: Let P = {p1 , · · · , ps } be the set of primes not exceeding n and for 1 ≤ i ≤ s, let Ai be the
set of integers between 1 and n that are multiples of p2i
...
So, the number of square-free integers not exceeding 100 is
j 100 k
4



j 100 k
9



j 100 k
25



j 100 k
49

+

j 100 k
36

+

j 100 k
100

= 61
...
2
...

1
...
There
are 5 students who take both A and B, 7 students who take both A and C, 4 students who take
both A and D, 16 students who take both B and C, 4 students who take both B and D and 3
students who take who take both C and D
...
Finally there are 2 in all four
courses and further 71 students who have not taken any of these courses
...

P
1 r−1
2
...
Using PIE, show that S(n, r) =
(−1)i C(r, i)(r − i)n
...
Show that
(−1) C(m, k)(m − k) =
0 if m > n
...
Determine the number of 10-letter words over English alphabet that do not contain all the vowels
...
Let m, n ∈ N with gcd(m, n) = 1 Prove that ϕ(mn) = ϕ(m)ϕ(n)
...
Determine all natural numbers n satisfying ϕ(n) = 13
...
Determine all natural numbers n satisfying ϕ(n) = 12
...
For each fixed n ∈ N, use mathematical induction to prove that
9
...


d|n

P

ϕ(d) = n
...
A function f : N → N is said to be multiplicative if f (nm) = f (n)f (m), whenever gcd(n, m) =
P
1
...
If f is
d|n

multiplicative then use induction to show that g is also multiplicative
...
COMBINATORICS - II

1
11
...


12
...


i=0

13
...

14
...

(a) Find the number of x’s for which the sum of the digits in x equals 30
...
In how many ways the digits 0, 1,
...

16
...
, 9, so that
no string contains all the 10 digits
...
Determine the number of ways of permuting the 26 letters of the English alphabet so that none
of the patterns lazy, run, show and pet occurs
...

18
...
Evaluate
n1 !n2 !n3 !
(n1 ,n2 ,n3 )∈S

6
...
Each of the 9 senior students said: ‘the number of junior students I want to help is exactly one’
...
The allocation was done randomly
...
We start with the definition of formal power series
over Q and develop the theory of generating functions
...

P
Definition 6
...
1
...
An algebraic expression of the form f (x) =
an xn , where an ∈ Q for all
n≥0

n ≥ 0, is called a formal power series in the indeterminate
# is denoted by Q[[x]]
...
g
...

n≥0

cf[xn , f ]

2
...

P
P
3
...
Then, their
n≥0

n≥0

(a) sum/addition is defined by cf[xn , f + g] = cf[xn , f ] + cf[xn , g]
...

Thus, with the above operations, the class of formal power series Q[[x]] over Q, is a vector
space which is isomorphic to the space of all sequences
...

k=0

Before proceeding further, we consider the following examples
...
3
...
3
...

1
...

k=2

Alternate
...
Also, the number of words with m many A’s and n many B’s is

...

2!
3!
4!
5!
6!
2!
3!
4!
5!
6!
If we replace y by x, then our answer is
h
i
2
3
4
5
6
2
3
4
5
6
8!cf x8 , (1 + x + x2! + x3! + x4! + x5! + x6! )(1 + x + x2! + x3! + x4! + x5! + x6! )
h
i
2
3
4
5
6
2
3
4
5
6
=
8!cf x8 , ( x2! + x3! + x4! + x5! + x6! )( x2! + x3! + x4! + x5! + x6! )
h
i
2
3
2
3
=
8!cf x8 , ( x2! + x3! + · · · )( x2! + x3! + · · · )



8
= 8!cf x8 , (ex − 1 − x)2 = e2x + 1 + x2 − 2xex − 2ex + 2x = 8! 28! − 7!2 − 8!2 = 238
...
How many anagrams (rearrangements) are there of the word M ISSISSIP P I?
11!
Ans: Using basic counting, the answer is

...
For another understanding, note that
= 11! × cf x , x

...
Hence, the readers should note that



11!
x2 x3 x4 2
x2 
11
= 11! cf x , 1 + x 1 + x +
+
+
1+x+
, or
4!4!2!
2!
3!
4!
2!


 x4 x5
2 x2 x3

11!
x2
= 11! cf x11 , x +
+ ···
+
+ ···
+
+ ···
4!4!2!
2!
4!
5!
2!
3!
3
...

Alternate
...

Suppose that we are considering A2 EM (means {A, A, E, M })
...

So their number is nothing but


cf x4 , (1 + x)5 (1 + x + x2 )3 =


cf x4 , (1 + 5x + 10x2 + 10x3 + 5x4 + · · · )(1 + 3x + 6x2 + 7x3 + 6x4 + · · · ) = 136
...
COMBINATORICS - II

4
...
Hence,
the required answer is


4 · 5 · · · · 13
cf x10 , (1 + x + x2 + · · · )4 = (1 − x)−4 = C(13, 10) =

...
3
...
[Generating Functions] Let (bn ) = (b0 , b1 , b2 ,
...

Then,
1
...
the exponential generating function (egf) is the formal power series
b0 + b1 x + b2

x2
x3
+ b3 + · · ·
...

Example 6
...
4
...

Thus, we need to consider the ogf
(1 + x2 + x4 + · · · )(1 + x3 + x6 + · · · )(1 + x5 + x10 + · · · ) =
(1 −

1
− x3 )(1 − x5 )

T

x2 )(1

AF


Hence, the required answer is cf xr ,

(1 −

x2 )(1

1

...


an

P (ex − 1)n
P yn
x
implies that ee −1 =
and
n!
n≥0 n!
n≥0




m
x
n
X (ex − 1)n
X
 m ex −1 
m
m (e − 1)


cf x , e
= cf x ,
=
cf x ,

...
Note that ee

P

DR

P xn
xn
bn
, g(x) =
∈ Q[[x]]
...

n!
n≥0
k=0
1
...
3
...


∈ Q[[x]] as ey =

(6
...
Whereas,

x
x
the expression ee 6∈ Q[[x]] as computing cf xm , ee , for all m ≥ 0, requires infinitely many
computations
...
Recall that if f (x) =

P
n≥0

an xn , g(x) =

P
n≥0

(f ◦ g)(x) = f (g(x)) =

bn xn ∈ Q[[x]] then the composition

X

an (g(x))n =

n≥0

X

an (

n≥0

X

bm xm )n

m≥0

may not be defined (just to compute the constant term of the composition, one may have to
look at an infinite sum of rational numbers)
...
Note
that g(0) = 1 6= 0
...
So, as function f ◦ g is well
P
defined, but there is no formal procedure to write ex+1 as
ak xk ∈ Q[[x]] (i
...
, with ak ∈ Q)
k≥0

and hence ex+1 is not a formal power series over Q
...
3
...
3
...
3, it can be checked that Q[[x]] forms
a Commutative Ring with identity, where the identity element is given by the formal power series
P
f (x) = 1
...
So, the question arises, under
n≥0

what conditions on cf[xn , f ], can we find g(x) ∈ Q[[x]] such that f (x)g(x) = 1
...



Proposition 6
...
6
...
Further, if
an ∈ Q, for all n then an ∈ Q, for all n
...
Let g(x) =
bn xn ∈ Q[[x]] be the reciprocal of f (x) =
an xn
...





But, by definition of the Cauchy product, cf x0 , f · g = a0 b0
...
However, if a0 6= 0, then the coefficients
cf[xn , g] = bn ’s can be recursively obtained as follows:
b0 = 1/a0 as 1 = c0 = a0 b0 ;
b1 = −(a1 b0 )/a0 as 0 = c1 = a0 b1 + a1 b0 ;
b2 = −(a2 b0 + a1 b1 )/a0 as 0 = c2 = a0 b2 + a1 b1 + a2 b0 ; and in general, if we have computed bk , for
k ≤ r, then using 0 = cr+1 = ar+1 b0 + ar b1 + · · · + a1 br + a0 br+1 , we get
br+1 = −(ar+1 b0 + ar b1 + · · · + a1 br )/a0
...

The next result gives the condition under which the composition (f ◦ g)(x) is well defined
...
3
...
Let f, g ∈ Q[[x]]
...
Moreover, if cf x0 , f (x) = 0, then there exists g ∈ Q[[x]], with


cf x0 , g(x) = 0, such that (f ◦ g)(x) = x
...

P
cn xn and suppose that either f is a polynomial or
Proof
...
Then, to compute ck = cf xk , (f ◦ g)(x) , for k ≥ 0, one just needs to consider the
k
P
P
terms
an (g(x))n , whenever f (x) =
an xn
...

n=0

n≥0

This completes the proof of the first part
...

The proof of the next result is left for the reader
...
3
...
[Basic facts] Recall the following statements from Binomial theorem
...
cf xn , (1 − x)−1 = (1 + x + x2 + · · · ) = 1
...
(a0 + a1 x + · · · )(1 + x + x2 + · · · ) = a0 + (a0 + a1 )x + (a0 + a1 + a2 )x2 + · · ·
...
cf xn , (1 − x)−r = (1 + x + x2 + · · · )r = C(n + r − 1, n)
...

4
...



1 − xm n
2
m−1
n
5
...

1−x
We now define the formal differentiation in Q[[x]] and give some important results
...


114

CHAPTER 6
...
3
...
Let f (x) =

P
n≥0

an xn ∈ Q[[x]]
...
[Formal Differentiation] Then, the formal differentiation of f (x), denoted f 0 (x), is defined by
f 0 (x) = a1 + 2a2 x + · · · + nan xn−1 + · · · =
2
...


n≥1

Then, the formal integration of f (x), denoted

Z
f (x)dx = α + a0 x +

R

f (x), is defined by

X an
a1 2
an n+1
x + ··· +
x
+ ··· = α +
xn+1
...
3
...
[ogf: tricks] Let g(x), h(x) be the ogf ’s for the sequences (an ), (bn ), respectively
...

1
...

2
...

3
...

4
...

5
...


(a) ar = r for all r ≥ 1 is xf 0 (x) and

AF

T

Example 6
...
11
...
Let ar = 1 for all r ≥ 0
...
So, for r ≥ 0, the ogf for

DR


(b) ar = r2 for all r ≥ 1 is x f 0 (x) + xf 00 (x)
...


2
...

i=0

3
...

Ans: Recall that this number equals C(r + n − 1, r) (see Theorem 5
...
1)
...
We can think of the problem as follows: the above system can be interpreted as
coming from the monomial xr , where r = y1 + · · · + yn
...
Now, recall that cf xyk , (1 − x)−1 = 1
...

(1 − x)(1 − x) · · · (1 − x)
(1 − x)n

115

6
...
GENERATING FUNCTIONS
4
...

k
2 2
2
k=0 2

Ans: Note that
4
2
3
+ 2 + 3 + ···
2 2
2
1
2
3
S = 0 + + 2 + 3 + ···
2 2
2
1
1
1
S = 1 + + 2 + 3 + · · · = 2
...
Put f (x) = (1 − x)−1
...

Thus, f 0 (x) = 1 + 2x + 3x2 + · · · has 1 as its radius of convergence
...

2
Alternate
...


1
...
3
...


1
8

AF


...


+

+
+
+

T

+
+

1
4
1
8

P
n≥0

nxn ∈ Q[[x]]
...

q(x)

2
...

3
...

4
...
Determine a closed form expression for

P n2 + 5n + 16

...


k=1

6
...


P
1
C(n + k − 1, k)
...
Determine
2k
k=0

8
...

9
...

10
...


116

CHAPTER 6
...
Find the ogf of the Fibonacci sequence (Fn )n≥0 := (1, 1, 2, 3,
...

12
...
Find

DR

AF

T

C(n, 0)2n − C(n − 1, 1)2n−2 + C(n − 2, 2)2n−4 − C(n − 3, 3)2n−6 + · · ·
...
We know (1 − x)−2 = 1 + 2x + 3x2 + · · ·
...

So, can you verify this identity, i
...
, the coefficient of xn in the later expression is actually n+1?

6
...
1

Generating Functions and Partitions of n

Recall from Page 95 that a partition of n into k parts is a tuple (n1 , · · · , nk ) ∈ Nk written in nonincreasing order, that is, n1 ≥ n2 ≥ · · · ≥ nk , such that n1 + n + 2 + · · · + nk = n
...
The following result due to Euler gives the generating
function of πn
...
3
...
[Euler: partition of n] The generating function for πn is
ε(x) = (1 + x + x2 + · · · )(1 + x2 + x4 + · · · ) · · · (1 + xn + x2n + · · · ) =

1

...
Note that any partition λ of n has m1 copies of 1, m2 copies of 2 and so on till mn copies of n,
n
P
where mi ∈ N0 for 1 ≤ i ≤ n and
mi = n
...

Thus, πn = cf[xn , ε(x)]
...
3
...


117

6
...
GENERATING FUNCTIONS

r
Q
Theorem 6
...
14
...


Corollary 6
...
15
...
Then, the ogf for the number of partitions of n into at most r parts,
is (1−x)(1−x12 )···(1−xr )
...
Note that by using Ferrer’s diagram (taking conjugate) we see that the number of partitions
of n into at most r parts is same as the number
 of partitions of n with entries at most r
...

Theorem 6
...
14, this number is cf x ,
1−xi
i=1

Theorem 6
...
16
...
Then, the ogf for πn (r), the number of partitions of n
r
into r parts, is (1−x)(1−xx2 )···(1−xr )
...
Consider a partition (λ1 ,
...
So, n ≥ r
...
, λk > 1 and λk+1 ,
...
Then (λ1 − 1,
...

Conversely, if (µ1 ,
...
, µk +
1, 1,
...

Thus, the number of r partitions of n is the same as the number
h of partitions of n − ir with at
most r parts
...
3
...
Hence,
the ogf for πn (r) is
xr

...
3
...

1
...


DR

2
...
Find the generating function for the numbers f (n)
...
3
...
Suppose there are k types of objects
...
If there is an unlimited supply of each object, then the egf of the number of r-permutations is
ekx
...
If there are mi copies of i-th object, then the egf of the number of r-permutations is

 

x2
xm1
x2
xm k
1+x+
+ ··· +
··· 1 + x +
+ ··· +

...
Moreover, n!S(r, n) is the coefficient of

xr
r!

in (ex − 1)n
...

1
...
Hence, the required result follows
...
Similar to the first part
...
Recall that n!S(r, n) is the number of surjections from {1, 2,
...
Each
surjection can be viewed as a word of length r of elements of X, with each si appearing at least
n
P
once
...
Also, by Exercise 5
...
7
...
Hence,
 
n 
 r

x2 x3
x
x
n
r
n!S(r, n) = r!cf x , x +
+
+ ···
= cf
, (e − 1)
...
COMBINATORICS - II

Example 6
...
19
...
In how many ways can you get Rs 2007 using denominations 1, 10, 100, 1000
only?


1
2007
Ans: cf x
,

...
If we use at most 9 of each denomination in Part 1, then this number is
"
! 9
! 9
! 9
!#


9
10000
X
X
X
X
2007
i
10i
100i
1000i
2007 1 − x
cf x
,
= 1
...
Every natural number has a unique base-r representation (r ≥ 2)
...

4
...
, kn ) = 1
...
, kn } is finite
...
The general
problem is NP-hard
...

Some times we have a way to obtain a recurrence relation from the generating function
...

X
1
Example 6
...
20
...
Suppose F =
=
an xn
...

F =F
1 − x 1 − x10 1 − x100 1 − x1000

DR

So,


 n−1 0 
n−1
,F
nan = cf x
, F = cf x

1
10x9
100x99
1000x999
+
+
+
1 − x 1 − x10 1 − x100 1 − x1000


=

n
X

an−k bk ,

k=1

where



k−1
bk = cf x ,

2
...
What about lim
n
P
k=1

1
k
...


where pk is the k-th prime?

Then, note that




 Y

n
1 1
1 1
1
1
1
sn ≤ 1 + + + · · ·
1 + + + ··· ··· 1 +
+ 2 + ··· =
(1 +
)
...

pk − 1
pk − 1
pk − 1
pk

k=1

k=1

n
P

1
n→∞ i=1 pi

As n → ∞, we see that lim

= ∞ as lim log sn = ∞
...
4
...
Let X be the set of natural numbers with only prime divisors 2, 3, 5, 7
...

n
2 4
3 9
7 49
1246
8

n∈X

Exercise 6
...
21
...
Let σ(n) =

P
d|n

d, for n ∈ N
...


k=1

2
...
Find the generating function for the
number of self conjugate partitions of n with a fixed size k of the corresponding Durfee square
...

(1 − x2 )(1 − x4 ) · · · (1 − x2k )
k=1

3
...

4
...

5
...

(b) if the word has all the letters and the first letter of the word appears an even number of
times
...


DR

n
X

T

6
...
, n} is said to be connected if there does not exist k, 1 ≤ k < n
such that σ takes {1, 2,
...
Let cn denote the number of connected permutations of
{1, 2,
...

7
...
Let g(n, r)
be the number of partition of n where no part is divisible by r
...

8
...

(b) The sequence has an odd number of 1s and an even number of 0s
...


6
...
4
...
[Recurrence Relation] A recurrence relation is a way of recursively defining
the terms of a sequence as a function of preceding terms together with certain initial conditions
...
4
...
an = 3 + 2an−1 for n ≥ 1 with the initial condition a0 = 1 is a recurrence relation
...

Definition 6
...
3
...
The k-th difference dk (an ) = dk−1 (an ) − dk−1 (an−1 )
...

Example 6
...
4
...
an − d2 (an ) = 5 is a difference equation
...


120

CHAPTER 6
...
Every recurrence relation can be expressed as a difference equation
...

Definition 6
...
5
...

Example 6
...
6
...
u(n) = 2n+2 − 3 is a solution of an = 3 + 2an−1 with a0 = 1
...
The Fibonacci sequence is given by an = an−1 + an−2 for n ≥ 2 with a0 = 0, a1 = 1
...

Definition 6
...
7
...


(6
...
3) is homogeneous and is called the associated linear homogeneous
recurrence relation with constant coefficients (LHRC)
...
4
...
For k ∈ N and 1 ≤ i ≤ k, let fi be known functions
...
, k,

(6
...
If ui (n) is a solution of the i-th recurrence relation, then

DR

an = c1 an−1 + · · · + cr an−r +
with the same set of initial conditions has

k
P

k
X

αi fi (n)

(6
...


i=1

Proof
...

Definition 6
...
9
...
The roots of the
characteristic equation are called the characteristic roots of the LHRC
...
Further, if x1 ,
...
It follows that an =
αi xni for αi ∈ R is a solution of the given
i=1

LHRC
...

Theorem 6
...
10
...
, xr of an
LHRC are distinct, then every solution of the LHRC is a linear combination of xn1 ,
...
Moreover,
the solution is unique if r consecutive initial conditions are given
...
Let u(n) be any solution of a given LHRC an = c1 an−1 + · · · + cr an−r
...


121

6
...
RECURRENCE RELATION
We show that there exist α1 ,
...
We first consider a

smaller problem, that is, whether the first r values of u(n) can be expressed in this form
...
, αr so that u(n) =
i=1

n = 0, 1,
...
To explore this, substitute n = 0, 1,
...
, αr :
 
 

1
···
1
α1
u(0)
 u(1)   x1 · · · xr α2 
 
 

=

...


...


...


...
, αr such that u(n) =
αi xni for 0 ≤ n ≤ r − 1
...
So, let us assume that u(n) =

r
P

i=1

αi xni for 0 ≤ n < k, where k ≥ r
...
So, xki =

u(k) =

r
X
j=1

Hence by PMI, u(n) =

cj u(k − j) =

r
P
i=1

r
X
j=1

cj

r
X

r
P

j=1

cj xk−j

...


i=1

αi xni for all n
...
Write y(n) = u(n) − v(n)
...
By what we have just proved, y(n) =
γi xni for some
i=1

constants γ1 ,
...
Treating γi s as unknowns, and substituting n = 0, 1,
...
Since the system matrix there is invertible, it leads
to the unique solution γ1 = · · · = γr = 0
...
That is, u(n) = v(n)
for all n
...

Example 6
...
11
...
Solve an − 4an−2 = 0 for n ≥ 2 with a0 = 1 and a1 = 1
...
As the characteristic roots x = ±2 are distinct, the general
solution is an = α(−2)n + β 2n
...
Hence,

α = 14 , β = 34
...

2
...
Ans: The characteristic
equation is x2 − 3x − 4 = 0
...
The general
1+c
solution is an = α(−1)n + β 4n
...
Thus, the

unique general solution is an = 51 (4 − c)(−1)n + (1 + c)4n
...
Solve the Fibonacci recurrence an = an−1 + an−2 with initial conditions a0 = 0, a1 = 1
...
So,
√ 

1+ 5 n
1− 5 n
the general solution is an = α 2
+β 2

...
Hence, the required solution is
"
√ !n
√ !n #
1
1+ 5
1− 5
an = √


...
6)
2
2
5

122

CHAPTER 6
...
Solve the recurrence relation an + an−2 = 0 with the initial conditions a0 = a1 = 2
...
The general solution
is in the form an = α in + β (−i)n
...
So,
α = 1 − i and β = 1 + i
...

5
...
For
n > 3, define (an , bn ) as the centroid of the triangle formed by (an−1 , bn−1 ), (an−2 , bn−2 ) and
(an−3 , bn−3 )
...
We will first show that (an ) converges
...
Notice that m1 ≤ a1 , a2 , a3 ≤ M1
...
e
...
e
...
e
...

m1 ≤
3
27
27
m1 ≤

As

2M1 +m1
3



8M1 +m1
9



26M1 +m1
,
27

and

we see that

m1 ≤ a4 , a5 , a6 ≤

26M1 + m1

...
Then
26
length([m1 , M1 ])
...
By nested interval theorem, ∩ [mi , Mi ] is a singleton set, say, {l}
...
It now follows
+3an+3
= l
...
Thus, lim an+1 +2an+2
6
n→∞

n→∞

a1 + 2a2 + 3a3
a2 + 2a3 + 3a4
a3 + 2a4 + 3a5
=
=
= ···
...

6

Thus, the limit to the original question is (19/6, 7/2)
...


...

Alternate
...
Note that we have the LHRC
an =

an−1 + an−2 + an−3
, n > 3
...
4
...
Observe that 1 is a root
...

3

Hence, by Theorem 6
...
10, there exist constants a, b, c ∈ C such that
an = a(1)n−1 + b(α)n−1 + c(β)n−1
...
Using the initial conditions, we get

   
1 1 1 a
a1
1 α β  b = a2 
...

6

Theorem 6
...
12
...
Then u(n) = tn
αi ni is a solution (called a basic solution)
...
, tk are the distinct characteristic roots with multiplicities s1 ,
...

Proof
...
Put

T

G0 = xn−r F = xn − c1 xn−1 − · · · − cr xn−r

AF

G1 = xG00 = nxn − c1 (n − 1)xn−1 − · · · − cr (n − r)xn−r

DR

G2 = xG01 = n2 xn − c1 (n − 1)2 xn−1 − · · · − cr (n − r)2 xn−r

...


Gs−1 = xG0s−2 = ns−1 xn − c1 (n − 1)s−1 xn−1 − · · · − cr (n − r)s−1 xn−r
Note that each of G0 , G1 ,
...
e
...
, s − 1, we have
Gi (t) = tn ni − c1 tn−1 (n − 1)i −
...

Thus, for any choice of αi ∈ R, 0 ≤ i ≤ s − 1, if one defines P (k) =
0=

s−1
X
i=0

s−1
P
i=1

k i αi , for k ≥ 0 then

αi Gi (t) = tn P (n) − c1 tn−1 P (n − 1) − · · · − cr tn−r P (n − r)
...
Therefore, u(n) is a solution of the
LHRC
...
4
...

Example 6
...
13
...
Then, the general solution is given
by 2n (α1 + nα2 ) + 3n (β1 + nβ2 + n2 β3 )
...
3)
...
That is, wn = un + vn shows that any solution wn can be expressed as
a solution of the associated LHRC plus a solution vn of the LNRC
...


124

CHAPTER 6
...
4
...
[LNRC] Consider the LNRC in Equation (6
...
Let un be a general solution of
the associated LHRC
...

Remark 6
...
15
...
4
...
Unlike an LHRC, no general algorithm is available to obtain a particular solution of an
LNRC
...
If f (n) = an or
nk or a linear combination of these, then a particular solution can be easily obtained
...

1
...

2
...

3
...

4
...


Example 6
...
16
...
Solve an = 3an−1 + 2n for n ≥ 1 with a0 = 1
...
Thus,
the general solution of LHRC is un = 3n α
...

This gives a = −3/2 and b = −1
...
Using a0 = 1, check that α = 5/2
...
Solve an = 3an−1 − 2an−2 + 3 (5)n for n ≥ 3 with a1 = 1, a2 = 2
...
Thus,
the general solution of the LHRC is un = α1n + β 2n
...

So, vn = c 5n is a particular solution of LNRC
...
It gives
c = 25/4
...
One can
then determine α and β from the initial conditions
...
In the previous example, take f (n) = 3(2n )
...
This is absurd
...

Now, with the choice of c n(2)n as a particular solution, we get 4nc = 6(n − 1)c − 2(n − 2)c + 12
...
Hence, the general solution of LNRC is in the form an = α + β2n + 6n2n from
which the constants α and β can be computed using the initial conditions
...
5

Generating Function from Recurrence Relation

Sometimes we can find a solution to the recurrence relation using the generating function of an ; see
the following example
...
5
...


1
...


Ans: Let F (x) = a0 + a1 x + · · · be the generating function for {ai }
...

1−x

1
2
1
=

so that an = cf[xn , F (x)] = 2n+1 − 1
...
5
...
Find the ogf F for the Fibonacci recurrence relation an = an−1 + an−2 , a0 = 0, a1 = 1
...
Then using the recurrence relation, we have
n≥0

F (x) =

X

n≥1

an xn = x +

Let α =

x

...


(an−1 + an−2 ) xn = x + (x + x2 )F (x)
...
Then




1
1
1 
1
F (x) = √

=√ 
β n xn 
...
6)
...

Theorem 6
...
2
...


(6
...


This implies that
r−1
P

F (x) =

i=0

Ai xi − c1 x

r−2
P
i=0

Ai xi − c2 x2

r−3
P
i=0

Ai xi − · · · − cr−1 xr−1 A0

1 − c1 x − · · · − cr xr


...
8)

Remark 6
...
3
...
8) in Theorem 6
...
2
...
Note that the numerator is a polynomial in x of degree at most r − 1, determined by the initial
conditions and the denominator Q(x) is a polynomial of degree r determined by the recurrence
relation
...
Now consider all solutions of the LHRCC an = c1 an−1 + · · · + cr an−r of order r
...
Each such solution will give us an ogf as
shown above
...
It now follows that, if P (x) has degree less than r,
P (x)
is an ogf for some solution
...
Note that we can write 1 − c1 x − · · · − cr xr = (1 − α1 x)s1 · · · (1 − αk xk )sk , where αi ’s are distinct
complex numbers and s1 + · + sk = r
...
Then notice that
P1 (x)
P1 (x)(1 − α2 x)s2 · · · (1 − αk x)sk
=
(1 − α1 x)s1
(1 − α1 x)s1 (1 − α2 x)s2 · · · (1 − αk x)sk

126

CHAPTER 6
...
Similarly, (1−α
s ,
...
Are
1 x) 1
k
these solutions linearly independent? Yes
...


...

+
a
= 0
...
As every term except the first one is divisible
by (1 − α1 x)s1 and the rhs is also divisible by (1 − α1 x)s1 , and that P1 has degree less than s1 ,
it follows that a1 = 0
...
Thus we already know that the sequences
(α1n ), (nα1n ),
...
Indeed, if there is a combination
a0 (α1n ) + a1 (nα1n ) + · · · + as1 −1 (ns1 −1 α1n ) = (0, 0, · · · ),
as α1 6= 0, we would get
(a0 + a1 n + a2 n2 + · · · + as1 −1 ns1 −1 ) = (0, 0, · · · ),
implying a0 = a1 = · · · = as1 −1 = 0
...
Now suppose that, the sequences
(α1n ), (nα1n ),
...
, (nsk −1 αkn )
are linearly dependent
...
, k
...
5
...

1
...

P
2(2n−1)
Cn xn , where Cn = C(2n,n)
Ans: Let g(x) = 1 +
n+1 = n+1 Cn−1 with C0 = 1
...
5
...


n≥1

g(x) − 1 =
=

X

Cn x n =

n≥1

n≥1


X
4n + 4
n=1

n+1

Cn−1 xn
x

Z

X
−6
−6
Cn−1 x +
Cn−1 xn = 4xg(x) +
tg(t)dt
...
So, [g(x) − 1 − 4xg(x)]x = −6

Rx

tg(t)dt
...

It is a linear ordinary differential equation
...

x(1 − 4x)
x 1 − 4x
1 − 4x
We thus multiply the equation with its integrating factor √
g(x)0 √

x
to obtain
1 − 4x


x
1 − 2x
1
d
x
1

+ g(x)
=

g(x)
=

...
5
...
Or, equivalently 2xg(x) = 1 + 2C 1 − 4x
...
Therefore, the ogf of the Catalan numbers is
x→0

g(x) =

1−


1 − 4x

...
Recall that Cn is the number of representations of the product of n + 1 square
matrices of the same size, using n pairs of brackets
...

Hence, we see that
Cn = C0 Cn−1 + C1 Cn−2 + · · · + Cn−1 C0
...
9)

Cn xn
...
9)
...
Hence, g(x) = 1 + xg(x)2
...

2x

DR

1
g(x) =
2

As the function g is continuous (being a power series in the domain of convergence) and
lim g(x) = C0 = 1, it follows that

x→0

g(x) =

1−



1 − 4x

...
Fix r ∈ N and let (an ) be a sequence with a0 = 1 and
Determine an
...


an xn
...

(1 − x)r+1

h
i
1
Hence, an = cf xn , (1−x)(r+1)/2

...

n
2 n!
2 n!n!

3
...


(6
...
COMBINATORICS - II
Answer: For n > 0, define Fn (x) =

f (n, m)xm = 1 +

P
m≥0

P

f (n, m)xm
...

By induction it follows that Fn (x) = (1 + x)n
...


f (n, m)y n =

P

For m > 0, define Gm (y) =

C(n, m)
0

n≥0

=

X

f (n, m)y n =

X

n≥1

n≥1

X

n

n≥1

f (n − 1, m)y +

P

f (n, m)y n
...
10) gives
(1 − y)2
Gm (y) =

if 0 ≤ m ≤ n
if m > n
...
As G1 (y) =
, one has Gm (y) =

...



f (n, m) = cf y n ,



 (
C(n, m)
ym
1
n−m
= cf y
,
=
(1 − y)m+1
(1 − y)m+1
0

if 0 ≤ m ≤ n
if m > n
...
Determine the sequence {S(n, m) : n, m ∈ W} which satisfies S(0, 0) = 1, S(n, 0) = 0 for n > 0,
S(0, m) = 0 for m > 0, and
S(n, m) = mS(n − 1, m) + S(n − 1, m − 1), for n > 0, m > 0
...
Then G1 (y) =

n≥1

(6
...
11) gives
Gm (y) =

X

S(n, m)y n =

n≥0

= m

X
n≥1

X
n≥1

(mS(n − 1, m) + S(n − 1, m − 1)) y n

S(n − 1, m)y n +

X
n≥1

S(n − 1, m − 1)y n

= myGm (y) + yGm−1 (y)
...
By induction it follows that
1 − my
m

X αk
ym
Gm (y) =
= ym
,
(1 − y)(1 − 2y) · · · (1 − my)
1 − ky
k=1

(6
...
5
...
Then
k! (m − k)!
#
"


m
m
X
X
αk
α
k
n m
n−m
=
S(n, m) = cf y , y
cf y
,
1 − ky
1 − ky

where αk =

m
X

k=1
m−k
(−1)
kn

k=1

k! (m − k)!

k=1

m
X

=

αk k n−m =

k=1
m

(6
...

m!
m!

=

k=1

k=1

m
1 P
(−1)k (m − k)n C(m, k) is known as the Stirling’s Identity
...
13) is also valid for n < m
...
Hence, we get the following identity,

(a) The identity S(n, m) =

m
X
(−1)m−k k n−1
= 0 whenever n < m
...
[Bell Numbers] Recall that the n-th Bell number b(n) for n ∈ N, is the number of partitions
of {1, 2,
...
By convention we take b(0) = 1
...
14)

k≥0

AF

k≥1

T

X k n X (−1)m−k
1 X kn
1 X kn
=
=
=
k!
(m − k)!
e
k!
e
k!

DR

as 0n = 0 for n ≥ 1
...
14) is valid even for n = 0
...
So, we compute its egf as follows:
k!


n
n
X
X
X
k  xn
x
1
B(x) = 1 +
=1+
b(n)
n!
e
k! n!
n≥1

n≥1

k≥1

1 X 1 X (kx)n
1 X 1 X n xn
= 1+
k
=1+
e
k!
n!
e
k!
n!
n≥1
n≥1
k≥1
k≥1



1 X 1  kx
1 X (ex )k
1
= 1+
e −1 =1+

e
k!
e
k!
k!
k≥1

k≥1


1 ex
x
= 1+
e − 1 − (e − 1) = ee −1
...
15)

x

Recall that ee −1 is a valid formal power series (see Remark 6
...
5)
...
15), we get log B(x) = ex − 1
...

n!
m!
n!
m≥0

n≥0

Thus,

n−1
m
n
X
X
 n−1 0 
x
b(n)
x  X
1
b(m)
n−1

,
= cf x
, B (x) = cf x
·
b(n)
=
·

...


n≥0

m=0

130

CHAPTER 6
...
5
...

1
...

2
...
, n} not containing consecutive
integers
...
Let Fn be the nth Fibonacci number
...

4
...
There were 9 professors
who were willing to supervise these students
...
In how many ways can we allocate supervisors to these students if all the ‘willing professors’ are to be allocated? What if we have an additional condition that exactly one
supervisor gets to supervise two students?
5
...

e−x
(b) Use (a) to show that the egf of Dn is

...
(a) In how many ways can one distribute 10 identical chocolates among 10 students?
(b) In how many ways can one distribute 10 distinct chocolates among 10 students?
(c) In how many ways can one distribute 10 distinct chocolates among 10 students so that each
receives one?
(d) In how many ways can one distribute 15 distinct chocolates among 10 students so that each
receives at least one?

T

(e) In how many ways can one distribute 10 out of 15 distinct chocolates among 10 students so
that each receives one?

DR

AF

(f ) In how many ways can one distribute 15 distinct chocolates among 10 students so that each
receives at most three?
(g) In how many ways can one distribute 15 distinct chocolates among 10 students so that each
receives at least one and at most three?
(h) In how many ways can one distribute 15 identical chocolates among 10 students so that
each receives at most three?
7
...

(b) In how many ways can one carry 15 distinct objects in 10 identical bags with no empty bag?
Answer using S(n, r)
...
What is the number of integer solutions of x + y + z = 10 with x ≥ −1, y ≥ −2 and z ≥ −3?
9
...
) at most four times the number of non-negative integer solutions of x+y+z =
10?
10
...


131

6
...
GENERATING FUNCTION FROM RECURRENCE RELATION

11
...
, pn , n ≥ 2, be distinct prime numbers
...
, pn , p21 ,
...
What is the value of

(−1)k C(15, k)(15 − k)5 ?

k=0

13
...
We summarize our findings about partitions in the following table
...
How many words of length 15 are there using the letters A,B,C,D,E such that each letter must
appear in the word and A appears an even number of times? Give your answers using generating
function
...
The characteristic roots of an LHRC are 2, 2, 2, 3, 3
...
Consider the LNRC an = c1 an−1 + · · · + cr an−r + 5n
...

18
...

19
...


132

CHAPTER 6
...
Find the number of words of size 12 made using letters from {A, B, C} which do not have the
sub-word BCA
...

21
...

22
...
We have many balls of each of the colors blue,
red and green
...

Condition 2: A red bag contains 3 blue balls or 5 red balls or 7 green balls
...

23
...
What is the smallest natural number n such
that if f (x) = 2009 has n distinct integer roots, then f (x) = 9002 does not have an integer root?
24
...
, 14} each of which has size 6
...
My class has n CSE, m MSC and r MC students
...
In how many ways can this be done,
if each student gets at most one? In how many ways can this be done, without the previous
restriction? Answer using generating functions
...
My class has n CSE, m MSC and r MC students
...
In how many ways can this be done, if each
student gets at most one? In how many ways can this be done, without the previous restriction?
Answer only using generating function
...
My class has N students
...
In how
many ways can we distribute the answer scripts so that each student gets at least 2
...

28
...
In an examination paper, there are M questions
...
In how many ways can it happen that some
three or more students have followed the same order? Answer using generating function
...
Eleven teachers attended the Freshers’ Party
...
In how
many ways a total of 18 glasses of soft drinks can be served to them, in general? Answer using
generating function
...
1

Logic of Statements (SL)

We study logic to differentiate between valid and invalid arguments
...
Each premise is a statement which is
assumed to hold for the sake of the argument
...
An argument has the structure
Premises: Statement1 ,
...

The following are instances of arguments:

DR

AF

T

• Statement1 : If today is Monday, then Mr
...

Statement2 : Today is Monday
...
X gets |5
...
X gets |5
...
X gets |5
...


• Statement1 : If today is Monday, then Mr
...

Statement2 : Today is Tuesday
...
X gets |5
...
X gets |5
...

Statementc : (Therefore,) Mr
...

We understand that the first one is a valid argument, whereas the next three are not
...
A
simple statement is an expression which is either false or true but not both
...

For example, ‘Today is Monday’ is a statement
...
‘Today is not
Monday’ is a statement
...

Using symbols for simple statements and the words ‘not’, ‘and’, ‘or‘, ‘implies’ and ‘if and only if’
help us in seeing the logical structure of a statement
...

to denote simple statements
...

Then the complex statements are made using these symbols along with parentheses by following some
specified rules
...
INTRODUCTION TO LOGIC
We abbreviate the phrase ‘Logic of Statements’ to ‘SL’ and present it in the following three sections
...
2

Formulas and truth values in SL

Definition 7
...
1
...
} of symbols
...
An atomic formula is also called an atomic variable
...
The well formed formulas, or formulas, for short,
are generated by using the following rules recursively:
F1: Each atomic formula is a formula
...

F3: If x and y are formulas, then (x ∧ y), (x ∨ y), (x → y) and (x ↔ y) are formulas
...

The connectives ∨, ∧, →, and ↔ always connect two old formulas to create a new one
...
The connective ¬ is used on a single old formula to give a
new one
...
Notice that in every formula, there is a matching pair of
parentheses
...
2
...


DR

AF

T

1
...

Ans: Since p5 ∈ A, by (F1), it is a formula
...
The principal
connective in the formula is ¬
...
The expression (¬(p3 ∧ (¬p4 ))) is a formula
...
By (F2), (¬p4 ) is a formula
...
Next, by (F2), (¬(p3 ∧(¬p4 ))) is a formula
...

3
...

Ans: By (F1), p1 is a formula
...
Once more, by (F3), (p1 →
(p1 ∨ p1 )) is a formula
...

4
...

Ans: By (F1), p1 , p3 and p5 are formulas
...

By (F2), (¬(p1 → p1 )) is a formula
...
The principal connective in this formula is ∨
...
The expression ¬p9 is not a formula since according to our formation rules, a pair of parentheses
should have been used
...
Similarly, (¬(p4 )) is not a formula due to extra
pair of parentheses, but (¬p4 ) is a formula with the principal connective as ¬
...
The expression (p4 ∨ p5 is not a formula, but (p4 ∨ p5 ) is a formula with the principal connective
as ∨
...
The expression (p6 ∨p1 )∧(¬p4 )) has one extra right parenthesis
...
We see that ((p6 ∨ p1 ) ∧
(¬p4 )) is a formula with the principal connective as ∧
...
2
...
with or without subscripts for atomic
formulas in place of p1 , p2 ,
...
By using
precedence rules we also cut short some more parentheses
...
¬ has the highest precedence
...
∧ and ∨ have the next precedence
...
→ and ↔ have the least precedence
...
If ambiguity results from using this convention in a context, we expand the
abbreviated formulas to formulas and decide the case
...

Example 7
...
3
...
By abbreviating p5 as p, we abbreviate (¬p5 ) as ¬p
...
To abbreviate the formula (¬(p3 ∧ (¬p4 ))), we write p3 as p, p4 as q
...

3
...

4
...
Then the formula (p1 ∨ ((¬(p1 → p1 )) ↔ (p3 ∧ p5 ))) is
abbreviated to p ∨ (¬(p → p) ↔ q ∧ r))
...
For instance in the last part of the above example, we should not abbreviate both p1 and p3
as p
...

Since statements are supposed to be either true or false, we now discuss how to assign truth values
to formulas
...

Further, if X is any formula, then either X = pi , an atomic variable, or X is in one of the forms:
¬p, p ∧ q, p ∨ q, p → q, or p ↔ q for formulas p, q, with the principal connective as ¬, ∧, ∨, →, ↔,
respectively
...
2
...
Let X be a formula
...
A truth assignment (appropriate to X) is a function f : B → {T, F }
satisfying the following conditions:
1
...

For formulas p and q,
2
...

3
...

4
...

5
...

6
...

Sometimes we write ‘f (p1 ,
...
, pk ’
...
, pk ) be a formula
...
, pk
...
A truth table for a formula
f (p1 ,
...
INTRODUCTION TO LOGIC

of truth values to the involved atomic formulas
...
It is as follows
...
The second row there tells that when p is assigned T and q is
assigned F , p → q is assigned F
...

Read T as ‘true’ and F as ‘false’
...
The formula p ∧ q is true if and only if both p, q are true; p ∨ q is true if and only if at least
one of p, q is true; p ↔ q is true when either both p, q are true, or when both p, q are false
...
(We illustrate this case in Example 7
...
6 below
...


q

r

F

F

F

q ∧ r p ∨ (q ∧ r)
F

F

T

F

F

T

F

F

F

F

T

T

T

T

T

F

F

F

T

T

F

T

F

T

T

T

F

F

T

T

T

T

T

T

F
F

DR

AF

p

T

Example 7
...
5
...

F

Example 7
...
6
...

q: you understand the subject
...
The formula
p → q is true under the first three cases as explained below
...
p is true and q is true
...
Here,
p → q is true
...
p is false and q is false
...
In this case, p → q is true
...
p is false and q is true
...

Here also, p → q is true
...
However, it will be easier to read it as ‘p then q’
...
3
...
p is true and q is false
...

Then p → q is false
...

Practice 7
...
7
...
Draw a truth table for the formula p ∧ ¬p → (p ∨ ¬q)
...
Can both the formulas p → q and q → p be F for some assignment on p and q?
Depending on the structure of a formula f (p1 ,
...
, pn
...
In
this connection we isolate those formulas which receive the same truth value under each assignment
...
2
...
A contradiction is a formula which takes the truth value F under each assignment
...
Often we write a
contradiction as ⊥ and a tautology as >
...
Once a tautology and a contradiction
are given new tautologies and contradictions can be obtained by using the following theorem
...
2
...
Let A be a formula having at least one occurrence of an atomic variable p
...
Denote by A[p/B] the formula obtained by replacing each occurrence of p by B in A
...
If A is a contradiction, then A[p/B] is a contradiction
...
If A is a tautology, then A[p/B] is a tautology
...
Let A be a contradiction
...
, pn ), where other than
p, the atomic variables occurring in A are p1 ,
...
Similarly, write A[p/B] = A(B; p1 ,
...
Let
f be any truth assignment that assigns truth values to p, p1 ,
...

If f assigns T to B, then the value of A[p/B] is the same as that of A(T ; p1 ,
...

If f assigns F to B, then the value of A[p/B] is the same as that of A(F ; p1 ,
...

Hence, A[p/B] takes the value F under the assignment f
...
This proves the first statement
...

For example, ((p → q) ∧ (q ↔ r)) ∧ ¬((p → q) ∧ (q ↔ r)) is a contradiction, since it is obtained from
p ∧ ¬p by replacing p with ((p → q) ∧ (q ↔ r))
...


7
...
Such expressions help us in simplifying
algebraic expressions
...


138

CHAPTER 7
...
3
...
Two formula A and B are called equivalent if under any truth assignment, both
receive the same truth value
...

Thus, equivalent formulas are evaluated the same in each row of their truth table
...

Example 7
...
2
...
Is p → q ≡ ¬q → ¬p?
Ans: We construct a truth table as follows
...

2
...


T

T

F

DR

T

p ∧ (q ∨ (¬q))

T

q

AF

p

T
T

F

T

F

F

F

F

Since in each row of the truth table the values of p and that of p ∧ (q ∨ (¬q)) match, they are
equivalent
...
3
...
Is p ∨ ¬p ≡ q ∨ ¬q?
When many atomic variables are involved, it may be time consuming to construct a truth table
...
A ≡ B if and only if whenever A is true, B is true, and whenever B is true, A is also true
...
A ≡ B if and only if whenever B is false, A is false, and whenever B is false, A is also false
...
3
...
Show that p → q ≡ ¬q → ¬p
...

Hence p → q ≡ ¬q → ¬p
...
3
...
[Laws] Let p, q, r be formulas
...
[Commutativity] p ∨ q ≡ q ∨ p,

p∧q ≡q∧p

2
...
[Distributivity] p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r),

p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)

139

7
...
EQUIVALENCE AND NORMAL FORMS IN SL
4
...
[Idempotence] p ∨ p ≡ p,

¬(p ∧ q) ≡ ¬p ∨ ¬q

p∧p≡p

6
...


p ∧ ¬p ≡ ⊥,

7
...
[Absorption] p ∨ (p ∧ q) ≡ p,
9
...
[Contraposition] p → q ≡ ¬q → ¬p,

p → ¬q ≡ q → ¬p

11
...
Construct the truth tables and verify
...
3
...
The statement q → p is called the converse of the statement p → q
...
Reason: The assignment f that assigns T to p and F to
q, assigns F to p → q but assigns T to q → p
...
Compare this with the Rule of Contraposition
...
The rule says that a statement is equivalent to its
contrapositive
...


1
...

2
...


DR

Example 7
...
7
...
p → q ≡ p ↔ p ∧ q
...
INTRODUCTION TO LOGIC

Practice 7
...
8
...
Does the absorption law imply p ∨ (p ∧ (¬q)) ≡ p and p ∧ (p ∨ (¬q)) ≡ p?

2
...

Simplify so that the number of occurrences of connectives is minimum
...
On the other hand, if a truth table is given, can we construct a
formula corresponding to it? For example, can we have a formula involving the atomic variables p, q, r
such that the formula receives the truth value T under the assignment T, F, T to p, q, r, respectively?
We see that the formula p ∧ ¬q ∧ r does the job
...
3
...
A truth function of n variables is any function from {T, F }n → {T, F }
...

If φ is a truth function of n variables p1 ,
...
Such a truth table will have n columns and 2n rows, each row showing the different assignments of
truth values to the variables
...

For example, the truth function φ : {T, F }2 → {T, F } given by
φ(T, T ) = T, φ(T, F ) = F, φ(F, T ) = T, φ(F, F ) = F
is depicted by the truth table
q

φ

T

T

T

F

F

F

T

T

F

F

F

DR

AF

T

T

p

n

Notice that there are 22 number of truth functions involving n number of variables
...
The question is whether any truth function can be expressed by a
formula
...

A formula which takes value T only on the assignment T T T is p ∧ q ∧ r
...

A formula which takes value T only on the assignment T T F is p ∧ q ∧ ¬r
...

Give a formula which takes value T only on the assignment F T F
...

Give a formula which takes value T only on the assignments T F T , T T F and T F F
...
e
...
3
...
3
...
Each truth function of n variables is expressed by a formula involving n variables
...
Let φ be a truth function of n variables
...
, pn be n number of atomic variables
...
Thus, take A = p1 ∧ ¬p1 ∧ p2 ∧ · · · ∧ pn
...
Suppose this set is {f1 ,
...
Corresponding to each fi , define
the formula Bi = r1 ∧ r2 ∧ · · · ∧ rn , where for 1 ≤ j ≤ n,

p
if f (pj ) = T
j
rj =
¬p if f (p ) = F
...
Thus, A = B1 ∨ B2 ∨ · · · ∨ Bm
is the required formula
...
3
...
Construct a formula that expresses the truth function φ given by
p

q

φ

T

T

T

T

F

T

F

T

F

F

F

F

AF

T

Ans: The truth function φ is true only for the truth assignments f1 and f2 , where f1 (p) = f1 (q) =
T and f2 (p) = T, f2 (q) = F
...
So the
formula that expresses φ is (p ∧ q) ∨ (p ∧ ¬q)
...
3
...
In particular, every formula can be equivalently expressed by a formula in such a
special form
...

Definition 7
...
12
...
We say that a formula A is in disjunctive normal form (in short, DNF) if it is a disjunction
of conjunctions of literals
...
Both DNF and CNF are called normal forms
...
3
...
The formulas (p ∧ ¬q) ∨ ¬r and (p ∧ ¬q) ∨ (q ∧ ¬r) ∨ (r ∧ s) are in DNF; (p ∨ ¬q) ∧ r
and (p ∨ q) ∧ (q ∨ ¬r) ∧ (r ∨ s) are in CNF; while p, p ∨ q, ¬p ∧ q are in both CNF and DNF
...
3
...
Write 5 formulas in CNF involving p, q, r
...
3
...
Any formula is equivalent to a formula in DNF, and also to a formula in CNF
...
Since each formula is a truth function, the first assertion follows from Theorem 7
...
10
...
Alternatively, if A is a formula, get a DNF for ¬A; then
negate the DNF and use the distributivity laws to get an equivalent CNF
...
3
...
Write all the truth functions on two variables and write formulas for them
...
First, we
eliminate the connectives → and ↔ by using the laws of Implication and Biconditional, i
...
, by using
the equivalences x → y ≡ ¬x ∨ y and x ↔ y ≡ (¬x ∨ y) ∧ (x ∨ ¬y)
...
INTRODUCTION TO LOGIC

earlier obtained formula is equivalent to the one, in which each occurrence of the connective ¬ precedes
atomic variables
...
The formula so obtained can also be simplified using the laws of Absorption
...

Example 7
...
17
...

We apply various laws in bringing the formula to its DNF and CNF as follows
...

((p → q) ∧ (q → r)) ∨ ((p ∧ q) → r)
≡ ((¬p ∨ q) ∧ (¬q ∨ r)) ∨ (¬(p ∧ q) ∨ r)
≡ ((¬p ∨ q) ∧ (¬q ∨ r)) ∨ (¬p ∨ ¬q ∨ r)
Ans: Using Distributivity on (¬p ∨ q) ∧ (¬q ∨ r), we get the DNF as
(¬p ∧ ¬q) ∨ (¬p ∧ r) ∨ (q ∧ ¬q) ∨ (q ∧ r) ∨ (¬p ∨ ¬q ∨ r)
...


Exercise 7
...
18
...
The simplified formula equivalent
to the original formula is ¬p ∨ ¬q ∨ r, which is in both DNF and CNF
...
Use induction on the number of connectives to show that any formula is equivalent to a formula
in DNF and a formula in CNF
...
A set of connectives is called adequate if every other connective can be expressed in terms of
the given ones
...
Determine which are adequate:
(a) {¬, ∧} (b) {¬, ∨} (c) {¬, →} (d) {∧, ∨} (e) {¬, ↔} (f ) {→, ∨, ∧}
...
Fill in the blanks to prove that ‘f ≡ g’ if and only if ‘f ↔ g is a tautology’
...
Assume that f ≡ g
...
Then, the value of f and g are the same
under b
...
As b is an arbitrary assignment, we see that
f ↔ g is a tautology
...
That is, f → g and g → f are both T under
b
...

Conversely, suppose that f ↔ g is a tautology
...
Then, there is an assignment b
under which f and g take different truth values
...
Then f → g is F under b and hence f ↔ g
takes F under b, a contradiction
...

4
...
For instance, the dual of ¬(p ∨ q) ∧ r is ¬(p ∧ q) ∨ r
...
4
...
, pk ) be a formula involving the atomic variables p1 ,
...
If A(¬p1 ,
...
, ¬pk ) ≡ ¬A∗ (p1 ,
...

(b) Let A, B be formulas that use only the connectives ∨, ∧ and ¬
...


7
...
, Sn
...
Here, S1 ,
...
To translate such an argument to SL involves translating the sentences to formulas
in SL
...
, Sn , Q are translated to the formulas P1 ,
...
Our goal is
to determine whether C is true under the assumption that each of P1 ,
...
The translated
entity corresponding to the argument is denoted by
?

P1 ,
...
We use the terminology that P1 ,
...
Once the truth of C is determined from the assumption that P1 ,
...
, Pn ⇒ C is valid
...


AF

P1 ,
...


?

Definition 7
...
1
...
, Pn } ⇒ C, where P1 ,
...
We also write the inference as P1 ,
...
The formulas P1 ,
...
We say that
the inference is valid if (P1 ∧ · · · ∧ Pn ) → C is a tautology; in this case, we write {P1 ,
...
, Pn ⇒ C
...
When the inference is valid, we also
say that C is a logical conclusion of the premises P1 ,
...

Example 7
...
2
...
Is the following argument valid?
If x = 4, then discrete math is bad
...
Therefore, x = 4
...
The argument is translated
?
to SL as the inference {p → q, q} ⇒ p
...
e
...
We need to determine whether (p → q) ∧ q → p is a tautology or
not
...
In this assignment, p → q is T ;
(p → q) ∧ q is T ; consequently, (p → q) ∧ q → p is F
...

2
...
Discrete math is bad
...


144

CHAPTER 7
...
The argument is translated
?
into the inference {q → p, q} ⇒ p
...

For this, suppose there is an assignment for which (q → p) ∧ q → p takes the value F
...
As (q → p) ∧ q is T , q must be T and
q → p must be T
...
This is impossible
...
Hence, it is a tautology
...
That is, {q → p, q} ⇒ p
...


Remark 7
...
3
...
A ⇒ B means that A → B is a tautology
...
Hence “A ⇒ B and B ⇒ A” is same as “A ↔ B is a tautology”, which
is again same as A ≡ B
...

While proving an inference to be correct, we only show that the falsity of the conclusion does not
go along with the truth of the premises, i
...
, the premises and the negation of the conclusion cannot
be true simultaneously
...
This is so because when p is false, p → q is true, and in this case, we need
not use any premise towards a correct inference
...

Theorem 7
...
4
...
, An and X, Y be formulas
...
[Rule of Contradiction] A1 ,
...


T

2
...
, An ⇒ X → Y if and only if A1 ,
...


DR

AF

Proof
...
, An ⇒ X
...
Then f assigns T to A1 ∧· · ·∧An →
X
...
, An to F , then it assigns F to A1 ∧ · · · ∧ An ∧ ¬X
...
, An
...
In this
case, f assigns F to A1 ∧ · · · ∧ An ∧ ¬X
...

Thus, A1 ∧ · · · ∧ An ∧ ¬X is a contradiction
...
Let f be an assignment
...
, An , then f assigns T to A1 ,
...
Otherwise, suppose f assigns T to all of
A1 ,
...
Since A1 ∧ · · · ∧ An ∧ ¬X is a contradiction, f assigns F to ¬X
...
Hence, f assigns T to A1 ,
...
That is, each assignment f assigns T to A1 ,
...

Therefore, A1 ,
...

(2) We use (1) repeatedly and the equivalence ¬(X → Y ) ≡ X ∧ ¬Y to obtain the following:
A1 ,
...

Example 7
...
5
...
Show that p, p → q ⇒ q
...
Suppose q is F (under the same
assignment)
...
This is a contradiction
...
By the rule of Deduction, (p, p → q) ⇒ q ≡ (p → q, p) ⇒ q if and only if
p → q ⇒ p → q if and only if (p → q) → (p → q) is a tautology; and this is true
...


145

7
...
INFERENCES IN SL
2
...


Ans: Suppose ¬q and p → q are T
...
Now that p → q is T , we see that q
is T
...

Alternate
...

This inference is called Modus Tolens, often abbreviated to MT
...
Show that p → q, q → r ⇒ p → r
...
Then p is T and r is F
...
As
q is F and p → q is T , p is F , a contradiction
...
Using the rule of Deduction, we need to show that p → q, q → r, p ⇒ r
...

This inference is called Hypothetical Syllogism abbreviated to HS
...
Show that p → q, p → r ⇒ p → q ∧ r
...
Since p → q is T , q is T
...
Then q ∧ r is T
...

This inference is called And Introduction, abbreviated to AI
...
Show that p → r, q → r ⇒ p ∨ q → r
...
Then p ∨ q is T and r is F
...
Similarly, the premise q → r gives q is F
...

This inference is called Or Introduction, abbreviated to OI
...
Consider an inference
?

A1 ,
...

We find out the atomic formulas involved in all the formulas Ai and C
...
Next, we mark all those rows, where all Ai s are
T
...
If yes, then the inference is correct, else, the inference
is incorrect
...

Instead of constructing a truth table, one analyzes all possibilities of assigning truth values to the
atomic formulas so that the premises are true, and then shows that in all these cases, the conclusion
is also true
...

In another variation of the truth table method, we consider all possibilities of assigning truth values
to the atomic variables so that the conclusion is false
...
This method is sometimes referred to as the indirect truth table method
...
We see that when the conclusion is in the form p → q, it is advantageous to use the third
variation
...
INTRODUCTION TO LOGIC

the required inference
...
The last formula in such a sequence must be the conclusion C
...
If the conclusion C is in the form p → q, then we may use p
as a new premise, and construct a proof with conclusion q
...
, An ⇒ p → q if and only if A1 ,
...
4
...

As the third alternative, we construct a proof using the rule of Contradiction
...
In such a proof, one uses ¬C as a new premise, and then derives a contradiction
...
, An ⇒ C if and only if A1 ,
...
4
...
While constructing
the proof, when we find that some formula X has appeared in a line, and also ¬X has appeared
in some line, then it would mean that the same set of premises imply X as well as ¬X
...
Thus we mention these two lines as our justification and write ⊥ on the last line
...
We explain these
methods of proof in the following example
...
4
...
Determine validity of the following argument:

DR

AF

The meeting can take place if all members are informed in advance and there is quorum
(a minimum number of members are present)
...
Members would have been informed in advance if there was no postal strike
...

Ans: Let us symbolize the simple statements as follows:
m: the meeting takes place;
a: all members are informed;
f : at least fifteen members are present;
q: the meeting had quorum;
p: there was a postal strike
...

Proof by Truth table: In this case, we have five atomic formulas; the truth table will consist of 25 rows
...

In all theses cases, we will find that the conclusion is also true
...
Even analyzing the truth values so that the premises are true is
no less time consuming
...

Suppose the conclusion ¬m → (¬f ∨ p) is F and each of the premises q ∧ a → m, f → q and
¬p → a is T
...
Hence, the atomic variables m, f and
p take values F, T and F , respectively
...
Similarly, ¬p → a

147

7
...
INFERENCES IN SL

is T gives a is T
...
This contradicts ¬m
taking the value T
...

Direct Proof: First, we plan how to go about: from f → q and ¬p → a, we get f ∧ ¬p → q ∧ a
...
Its contrapositive is ¬m → ¬f ∨ p
...

1
...

3
...

5
...

7
...

9
...

11
...


f ∧ ¬p → f
f ∧ ¬p → ¬p
f →q
f ∧ ¬p → q
¬p → a
f ∧ ¬p → a
f ∧ ¬p → (q ∧ a)
q∧a→m
f ∧ ¬p → m
¬m → ¬(f ∧ ¬p)
¬m → ¬f ∨ ¬¬p
¬m → ¬f ∨ p

(p ∧ q ⇒ p)
(p ∧ q ⇒ q)
(Premise)
(1, 3, HS)
(Premise)
(2, 5, HS)
(4, 6, AI)
(Premise)
(7, 8, HS)
(Contraposition)
(De Morgan)
(Double negation)

q ∧ a → m, f → q, ¬p → a ⇒ ¬m → ¬f ∨ p

AF

T

Indirect Proof: Using the rule of Deduction and Contradiction, we have

DR

if and only if q ∧ a → m, f → q, ¬p → a, ¬m ⇒ ¬f ∨ p

if and only if q ∧ a → m, f → q, ¬p → a, ¬m, ¬(¬f ∨ p) ⇒ ⊥
...

1
...

3
...

5
...

7
...

9
...

11
...

13
...
4
...

1
...

2
...
, pk
...


148

CHAPTER 7
...
Prove (p → q ∨ r) ≡ (p ∧ ¬q → r) in three different ways: truth table method, simplification, by
proving both p → q ∨ r ⇒ p ∧ ¬q → r and p ∧ ¬q → r ⇒ p → q ∨ r
...
Determine which of the following are logically equivalent:
(a) q → s

(b) (p → r ∨ s) ∧ (q ∧ r → s)

(c) (s → q ∨ r) ∧ (q ∧ s → r)


(d) p ∨ r ∨ (s → p) ∧ p → (s → r)


(e) p ∨ s ∨ (q → p) ∧ p → (q → s)
...
Let A be a formula that involves the connectives ∧, ∨, →, and atomic variables p1 , · · · , pk
...

6
...
, p9 → p10 ⇒ ¬p0 ∨ p5
...


(n) p → q, r ∨ s, ¬s → ¬t, ¬q ∨ s, ¬s, ¬p ∧ r → u, w ∨ t ⇒ u ∧ w
...
[Monotonicity] Let S1 ⊆ S2 be finite sets of formulas and let A be a formula
...
(We have used this result without mention
...
Determine which of the following arguments is/are correct:
(a) If discrete math is bad, then computer programming is bad
...
If complex analysis is good, then discrete math is bad
...
Complex analysis is bad and hence, at least
one more subject is bad
...
)
(b) Three persons X, Y and Z are making statements
...
Does it follow that
at least two of them are always right?
(c) If the lecture proceeds, then either black board is used or the slides are shown or the tablet
pc is used
...
If the slides are shown, then students are not comfortable with
the speed
...
The lecture proceeds and the students are comfortable
...


149

7
...
PREDICATE LOGIC (PL)

9
...
The clue lies in seeing when a normal form is a
tautology or a contradiction
...

Prove the following:
(a) A is a tautology if and only if each Ci has an occurrence of p and also ¬p for some atomic
variable p
...

(b) B is a contradiction if and only if each Di has an occurrence of p and also ¬p for some
atomic variable p
...

Ans: Similar to the first part
...
Let A and B be two formulas having the truth tables given below
...
How many assignments of truth values to p, q, r and w are there for which (p → q) → r → w
is true? Guess a formula in terms of the number of variables
...
Assume that F ≤ T
...
, p9
...
Does this imply that φ → ψ is a tautology?
13
...

For A, B ∈ S, define A ≤ B if A ⇒ B
...
Draw its Hasse
diagram
...
5

Predicate logic (PL)

How do we symbolize the argument ‘x runs faster than y, y runs faster than z, hence x runs faster
than z’ ? It is clear that, it is not {p, q} ⇒ r, as it is an invalid argument, whereas the given argument
is valid
...
In other words, we require something called a predicate f aster(x, y)
which takes truth values T or F depending on the inputs as elements from such a set
...
5
...
A k-place predicate P (x1 ,
...
, xk
to which a truth value can be assigned under each assignment of values to x1 ,
...

Example 7
...
2
...
Let P (x) mean ‘x > 0’
...
On the UD: [−1, 1], i
...
, when an
element a ∈ [−1, 1] is selected corresponding to x, the resulting statement P (a) is either T or F
...
Let P (x, y) mean ‘x2 + y 2 = 1’
...
On the UD: R, when two
elements a, b ∈ R are selected corresponding to x, y, the resulting statement P (a, b) is either T
or F
...
INTRODUCTION TO LOGIC

3
...
Then P (x, y) is a 3-place predicate
...

Definition 7
...
3
...
Any predicate is a formula, called an atomic formula
...
If A, B are formulas, then (¬A), (A ∧ B), (A ∨ B), (A → B) and (A ↔ B) are formulas
...
If A is a formula and x is a variable, then (∀x A) and (∃x A) are formulas
...
Read ∀ as ‘for each’ and ∃ as ‘there exists’
...

Remark 7
...
4
...
Notice that
PL is an extension of SL; so there should not be any confusion in the use of this term
...
5
...
Let P be a formula
...
In (∀x P ) or (∃x P ) the formula P is called the scope of the quantifier (extent to which that
quantification applies)
...
(a) If no quantifier occurs in P , then any occurrence of x in (∀x P ) is said to be bound by the
quantifier ∀, and any occurrence of x in (∃x P ) is said to be bound by the quantifier ∃
...
A similar statement
holds for the quantifier ∃
...
An occurrence of a variable in a formula is called a free occurrence if that occurrence of the
variable is not bound by any quantifier
...

Example 7
...
6
...

1
...

2
...


3
...
1
Convention: Once the formation of formulas, scope, bound and free occurrences of variables are
understood, we will put forth the precedence rules so that formulas can be written in an abbreviated
form
...
Outer parentheses are ignored
...
¬, ∀ and ∃ have the highest precedence
...
∧ and ∨ have the next precedence
...
→ and ↔ have the least precedence
...
We will see that this formula is equivalent

to ∀z (∃yR(y)) → R(z)
...
5
...

We will use the abbreviated formulas with the understanding that in case an ambiguity arises, we
would resort back to the original form
...
5
...

1
...
An interpretation for A means fixing a nonempty set
UD (called the universe of discourse), assigning values to the free variables in A, and giving
meanings of the predicates in A
...

If x is a variable, its value must be an element of UD; and if P (x1 ,
...

2
...
Then we say ‘∀xP is T under I’ if for each a ∈ UD,
the value of P |x=a is T
...

Similarly, we say ‘∃xP is T under I’ if for some a ∈ UD, the value of P |x=a is T
...
If P is a formula, then it will have a truth value T or F under each interpretation
...
)

DR

4
...

Remark 7
...
8
...
, xn ) by assigning
it to an n-ary relation, say, P 0 on the UD
...
,xn =an means (a1 ,
...
For ease in
notation, we continue with the informal assertion “P |x=a means the expression obtained from P by
replacing each free occurrence of x with a”, which is applied recursively
...
5
...
Consider the formula ∀x P (x, y)
...
Take N as UD
...
Let us assign 1 to the free variable y
...

2
...
Let P (x, y) mean ‘x + y is an integer’, and assign y to 2
...

Example 7
...
10
...
Consider the 2-place predicate R(x, y): ‘x
runs faster than y’
...
∀x ∀y R(x, y) means ‘each human being runs faster than every human being’
...
∀x ∃y R(x, y) means ‘for each human being there is a human being who runs slower’
...
∃x ∃y R(x, y) means ‘there is a human being who runs faster than some human being’
...
∃x ∀y R(x, y) means ‘there is a human being who runs faster than every human being ’
...
5
...
[Translation] We expect to see that our developments on logic help us in drawing
appropriate conclusions
...
We may have to introduce appropriate
variables and required predicates
...


152

CHAPTER 7
...
5
...

1
...

Ans: Does the statement guarantee that there is a person in the room? No
...
Let P (x) mean ‘x is a person in this class room’;
B(x) mean ‘x is a BTech student’; and M (x) mean ‘x is an MSc student’
...

2
...

Ans: Does the statement guarantee that there is a student in the room? Yes
...


Then the formula is ∃x S(x) ∧ (H(x) ∨ E(x))
...
Why?1
Notice that if a formula in PL has no free variables, then its translation into English will result in
a statement
...


DR

AF

T

Example 7
...
13
...
∀x Q(x) → R(x) : Every rational number is a real number
...
∃x ¬Q(x) ∧ R(x) : There is a real number which is not rational
...
∀x Q(x) ∧ L(x) → R(x) ∧ L(x) : Every rational number less than 2 is a real number less than
2
...
∀x Q(x) ∧ L(x) → ∀x R(x) ∧ L(x) : If each rational number is less than 2, then each real
number is less than 2
...
5
...
Translate the following sentences into PL:
1
...

2
...

3
...

4
...

In the rest of the exercises, fill in the blank with a PL-formula so that the definition will be
complete
...
A subset S ⊆ Rn is called compact, if —
...

6
...
Use UD = R and the predicates
P (x): x is positive; and Q(x, y, z): |x − y| < z
...
A function f : R → R is called continuous if —
...

8
...
Use UD = R and the predicates
P (x): x is positive; and Q(x, y, z): |x − y| < z
...
A function f : S → T is called a bijection if —
...

1

Remember, ∃x (P (x) → Q(x)) never asserts P (x)
...


153

7
...
EQUIVALENCES AND VALIDITY IN PL

7
...

Definition 7
...
1
...
A formula,
which receives the truth value F under each interpretation is called unsatisfiable
...

Notice that formulas A and B are equivalent if and only if under each interpretation, A and B
have the same truth value
...
6
...
Let R(x) be a predicate
...
R(x) → R(x) is valid
...
Notice that R0 ⊆ UD
...
The formula R(x) → R(x) is interpreted as the sentence:
if a ∈ R0 , then a ∈ R0
...
Since I is an arbitrary interpretation,
we conclude that R(x) → R(x) is valid
...
R(x) ∧ ¬R(x) is unsatisfiable
...
Suppose I assigns x to b ∈ UD; and
interprets R(x) as the unary relation R0 ⊆ UD
...
This is false
...

3
...
Under I, suppose that the formula ∀x R(x) is T
...
Then ∀z R(z) is T under I
...
Since I is an arbitrary interpretation, the two formulas are
equivalent
...



4
...
Let I be an interpreta

tion
...
This means ∃z R(z) → R(z) |z=a is T

for each a ∈ UD
...
But this also means that

∀y ∃z R(z) → R(y) is T under I
...
As I is


arbitrary, ∀z ∃z R(z) → R(z) ≡ ∀y ∃z R(z) → R(y)
...
6
...
Let P and Q be formulas
...
All tautologies of SL are valid in PL
...
If P is valid and x is any variable, then both ∀x P and ∃x P are valid
...
¬(∀x P ) ≡ ∃x ¬P , ¬(∃x P ) ≡ ∀x ¬P
...
∀x ∀y P ≡ ∀y ∀x P , ∃x ∃y P ≡ ∃y ∃x P
...
∀x (P ∧ Q) ≡ ∀x P ∧ ∀x Q , ∃x (P ∨ Q) ≡ ∃x P ∨ ∃x Q
...
INTRODUCTION TO LOGIC

Proof
...

For instance, in the tautology p → (q → p), replacing p by P (x, y) and q by R(x, y, z), we get the
formula P (x, y) → (R(x, y, z) → P (x, y))
...

Observe that the connectives are interpreted the same way in PL as in SL
...

(2) Let P be a valid formula and let x be any variable
...
Let a ∈ UD
...
This holds for each element a of UD
...
” and “For each a ∈ UD, P |x=a is T
...
(Recall that UD 6= ∅
...
Since I is an arbitrary
interpretation, both ∃x P and ∀x P are valid
...
So, ∀x P is F under I
...
Thus, ¬(P |x=a ) is T under I
...

Conversely, suppose that ∃x ¬P is T under an interpretation I
...
This means, P |x=a is F under I
...
That is, ¬(∀xP )
is T under I
...

For the second assertion, we use the first assertion as follows:
¬(∃x P ) ≡ ¬(∃x ¬¬P ) ≡ ¬¬(∀x ¬P ) ≡ ∀x ¬P
...
Let I be an interpretation
...
Then for some a ∈ UD, we have (∃y P )|x=a is T under I
...
Since P |x=a,y=b = P |y=b,x=a , we see that (∃x P )|y=b is T under I
...
A similar argument shows that if ∃y ∃x P is T under I, then ∃x ∃y P is
also T under I
...

For the first assertion, we use the second as follows:
∀x ∀y P ≡ ¬¬(∀x ∀y P ) ≡ ¬(∃x ∃y ¬P ) ≡ ¬(∃y ∃x ¬P ) ≡ ∀y ∀x¬¬P ≡ ∀y ∀x P
...
Then for each element a ∈ UD, (P ∧Q)|x=a




is T
...
Thus, both P |x=a and Q|x=a are T under I
...
Similarly, for

each element a ∈ UD, Q|x=a is T under I implies that ∀x Q is T under I
...

Conversely, suppose ∀x P ∧ ∀x Q is T under I
...
Then for
each element a ∈ UD, P |x=a is T , and for each element b ∈ UD, Q|x=b is T
...
It follows
that under I, P |x=c is T and Q|x=c is T
...
Hence
∀x (P ∧ Q) is T under I
...
Since I is an arbitrary
interpretation, this biconditional is valid, so that ∀x (P ∧ Q) ≡ ∀x P ∧ ∀x Q
...




The first part in Proposition 7
...
3 says that all the rules of the logic of Statements also hold in
Predicate logic
...

Again, ¬∀x P ≡ ∃x ¬P
...
You may similarly obtain many more valid
formulas in PL, and formulate many equivalences accordingly
...
6
...

Example 7
...
4
...
∃x ∀y P 6≡ ∀y ∃x P
...
Interpret Q(x, y) as ‘x > y’
...
It means ‘There is a natural number larger than all natural
numbers’
...
The formula ∀y ∃x P is ∀y ∃x Q(x, y)
...

2
...

Reason: Consider P as the predicate O(x) and Q as the predicate E(x) in the UD = N
...
Then ∀x (P ∨ Q) is the formula ∀x (O(x) ∨ E(x))
...
This is true
...
It means Either all natural numbers are odd, or all natural numbers are
even
...


T

3
...

Reason: Consider the predicates and their interpretations as in (2)
...
This is false
...


AF



Example 7
...
5
...


Suppose that X → Y is invalid
...

As Y is F , we see that for some a ∈ UD,

∃y R(a) → R(y) ∧ P (a, y) is F
...

That is, R(a) is T and for each y, R(y) ∧ P (a, y) is F
...


That is, R(a) → ∃y (R(y) ∧ P (a, y)) is F
...

Similarly, one shows that Y → X is valid
...
Write A = R(x) → ∃y R(y) ∧ P (x, y) and B = ∃y R(x) → R(y) ∧ P (x, y)
...
If R(a) is F , Then both X and Y are T
...
Notice that

R(a) → ∃y (R(y) ∧ P (a, y)) and ∃y R(a) → (R(y) ∧ P (a, y) have the same truth value
...

It follows that ∀xA ≡ ∀xB, that is, X ≡ Y
...
6
...


1
...



2
...

3
...
Determine whether ∀x(P → Q) ≡ ∀xP → ∀xQ
...
INTRODUCTION TO LOGIC

7
...
The validity of inferences are defined in an
analogous manner
...
7
...
An inference is an expression of the form {P1 ,
...
, Pn are called premises or hypotheses, and the formula C is called the conclusion of the
inference
...
, Pn } ⇒ C, if (P1 ∧ · · · ∧ Pn ) → C is
valid
...
, Pn
...
, Pn } ⇒ C to P1 ,
...
, Pn } ⇒ C to P1 ,
...

It follows that X ≡ Y if and only if both X ⇒ Y and Y ⇒ X hold
...
Moreover, to prove that P1 ,
...
, Pn are T under an arbitrary interpretation I and show that under the same I, C
must be T
...
, Pn ⇒ C can be proved by assuming
that an interpretation I makes the conclusion C false, and then showing that I makes at least one of
the premises P1 ,
...

We have seen in Example 7
...
4 that some of the equivalences do not hold
...
Namely,
∀x (P ∨ Q) 6⇒ ∀x P ∨ ∀x Q,

∃x P ∧ ∃x Q 6⇒ ∃x (P ∧ Q)
...


1
...


DR

Proposition 7
...
2
...
Then the following assertions hold:

2
...

3
...

Proof
...
and ∀y ∃x P is F
...
Then for each b ∈ UD, P |x=a,y=b is T
...
Hence ∀y ∃x P is T
...

(2) Let I be an interpretation under which ∀x P ∨ ∀x Q is T
...
However, P |x=a is T implies that P |x=a ∨ Q|x=a is T ; and P |x=a ∨ Q|x=a = (P ∨ Q)|x=a
...
So, under I , ∀x (P ∨ Q) is T
...
In any case, ∀x (P ∨ Q) is T under I
...

(3) We know ¬(∃x P ∧ ∃x Q) ≡ ∀x ¬P ∨ ¬∀x ¬Q
...
Now,
∀x (¬P ∨ ¬Q) ≡ ∀x ¬(P ∧ Q) ≡ ¬∃x (P ∧ Q)
...
This is same
as ∃x (P ∧ Q) ⇒ ∃x P ∧ ∃x Q
...
7
...
Any student who appears in the exam and gets a score below 30, gets F grade
...
Therefore x0 should get F grade
...


157

7
...
INFERENCES IN PL


We want to see whether1 ∀x S(x) ∧ E(x) ∧ B(x) → F (x) , S(x0 ) ∧ ¬E(x0 ) ⇒ F (x0 )
...


In this interpretation, the premises mean ‘every positive integer is a natural number’ and ‘ 2 is
a positive real number which is not rational’
...
Whereas the conclusion means

‘ 2 is a natural number’, which is false
...

Example 7
...
4
...
Therefore, all children of scientists are children of human
beings
...
Then our hypothesis is ∀x (S(x) → H(x))
...
∀x (∃y (S(y) ∧ C(x, y)) → ∃z (H(z) ∧ C(x, z)))
...
This is a correct translation
...
∀x (∀y (S(y)∧C(x, y)) → ∀z (H(z)∧C(x, z)))
...
This is a wrong translation
...
∀x (S(x) → ∀y (C(y, x) → ∃z (H(z) ∧ C(y, z))))
...
This is also a correct translation
...
∀x ∀y (S(x) ∧ C(y, x)) → ∀x ∀y (H(x) ∧ C(x, y))
...

This is a wrong translation
...

Let I be an interpretation under which ∀x (S(x) → H(x)) is T
...

Suppose that ∃y (S(y)∧C(b, y)) is T under I
...
Since ∀x (S(x) → H(x)) is T , we see that S(a) → H(a) is T
...

Hence under I, ∃z (H(z) ∧ C(b, z)) is T
...
Since this holds for any arbitrary element b ∈ UD, we conclude that under I,

∀x ∃y (S(y) ∧ C(x, y)) → ∃z (H(z) ∧ C(x, z)) is T
...

Example 7
...
5
...

Show that
∀x (R ∨ P ) ≡ R ∨ ∀x P, ∀x (R → P ) ≡ R → ∀x P,
∃x (R ∧ P ) ≡ R ∧ ∃x P,
∀x P → R ≡ ∃x (P → R),

∃x (R → P ) ≡ R → ∃x P
...


Ans: We already know that ∀x R ∨ ∀x P ⇒ ∀x (R ∨ P )
...
Hence R ∨ ∀x P ⇒ ∀x (R ∨ P )
...
Then for each element a ∈ UD, (R ∨ P )|x=a is T
...
So, under I, either R is T or for each a ∈ UD, P |x=a is T
...
Constants are interpreted as elements of UD just like variables,
but their occurrence in a formula is never categorized into bound or free
...
INTRODUCTION TO LOGIC

That is, under I, R ∨ ∀x P is T
...
We
conclude that ∀x (R ∨ P ) ≡ R ∨ ∀x P
...

Remark 7
...
6
...
If S is a given set and P is a formula, sometimes we use ∀(x ∈ S)P and ∃(x ∈ S)P
...

2
...
For example, we may write x ∈ S instead of using something like E(x, S);
or we may use x > 0 instead of using something like P (x)
...


DR

AF

T

Logic is used primarily to define and argue about mathematical systems
...
We need to extend it further by including the
equality predicate, constants, and function symbols
...
For instance, Peano’s
axioms formulated to define the natural number system uses the constant symbol 1, the function
symbol S and the equality predicate =
...
However, the logical structure to tackle mathematical theories is provided
by PL
...
Revisit Example 7
...
3, where we have used a
constant symbol x0
...
7
...

1
...
Write a formal definition of lim f (x) 6= `
...
In the following, fill in the blank with a PL-formula so that the definition will be complete:
(a) A subset S ⊆ Rn is called connected if —
...


(c) A subset S ⊆ Rn is called a subspace if —
...


(e) A function f : (S, ◦) → (T, +) is called a group isomorphism if —
...


3
...

(a) The decimal representation of a rational number either terminates or recurs, whereas that
of an irrational number neither terminates nor recurs
...
The square root of all
natural numbers which are squares have decimal representations that terminate
...


159

7
...
INFERENCES IN PL

(b) For any two algebraic numbers a and b, a 6= 0, 1 and b irrational, we have that ab is
transcendental
...
The number i
is not equal to 0 or 1
...

(c) Each student writes the exam using blue ink or black ink
...
A student who
writes the exam using blue ink and does not have his/her ID card gets an F grade
...
Therefore a student
who passes the exam must have written his roll number
...

(d) Check whether the following argument is correct:
Every mango is either an apple or an orange
...
No apples
are pineapples
...

Therefore, if an apple is a pineapple, then it is an orange
...


160

DR

AF

T

CHAPTER 7
...
1

Partial Orders

DR

AF

T

A relation can also be used to define an order on a set
...
So, ordering the objects according to a particular rule
brings a certain structure to the area of study
...
Similarly,
the relation ⊆ also brings an ordering to the set of sets
...

The reader is already aware of what reflexive, symmetric and transitive relations are
...

Definition 8
...
1
...

It is possible to interpret an anti-symmetric relation using the arrow diagrams of relations
...

Example 8
...
2
...
Example 1
...
6
...


2
...

(a) Show that R1 is an anti-symmetric relation on the set of positive integers
...

There are two relations which play a prominent role in mathematics
...
We
now introduce the other relation called a partial order
...
1
...
A relation f on a nonempty set X is called a partial order if f is reflexive,
transitive and anti-symmetric
...

The relation less than or equal to on the set of real numbers and the relation subset on the set of
sets are two fundamental partial orders
...
PARTIALLY ORDERED SETS, LATTICES AND BOOLEAN ALGEBRA

order
...
Further, if (X, ) is a
poset and x  y, then we read this as x is less than or equal to y
...
1
...
Let (X, ) be a poset
...
In neither (x, y) nor (y, x)
belongs to , then x and y are said to be incomparable
...
1
...

1
...

(a) The identity relation Id on X is reflexive, transitive and anti-symmetric and is therefore a
partial order
...

(b) The relation Id ∪ {(1, 2)} is also a partial order on X
...


(c) The relation = Id∪{(1, 2), (2, 1)} is both reflexive and transitive, but not anti-symmetric
...


(d) The relation Id ∪ {(1, 2), (3, 4)} is a partial order on X
...

2
...
The relation = {(a, b) : a divides b} is a partial order on X
...
Let X be a nonempty collection of sets
...

4
...
It is called the usual partial order on R
...
1
...
Construct a partial order on the set {1, 2, 3, 4, 5}
2
...


DR

1
...
1
...
1
...

Definition 8
...
7
...


1
...
Often a linear order is also referred to as a total order
or a complete order
...
A subset, C of X, is called a chain if and only if  induces a linear order on C
...
If C is not a finite set, then
the length of C is said to be infinite
...
A subset, A of X, is called an antichain if and only if no two elements of A are comparable
...

4
...


Let X be a nonempty set and let f be a relation on X
...
6
...
e
...
Relations which are simultaneously reflexive,
transitive and anti-symmetric play an important role in mathematics; and we give a name to such
relations
...
1
...
1
...
Let X be a nonempty set
...
Let f be a partial order on X and let a, b ∈ X
...

When a partial order satisfies some other desirable properties, they are given different names
...

Definition 8
...
9
...

1
...

2
...
e
...
A linear order is also called a total order,
or a complete order
...
The poset (X, f ) is said to be a linearly ordered set if f is a linear order on X
...
A linearly ordered subset of a poset is called a chain in the poset
...

5
...
A is called an anti-chain in the poset if no two elements
of A are comparable
...


Example 8
...
10
...
The height of a poset
is the maximum of the cardinalities of all chains in the poset
...


DR

1
...
1
...
1a has height 1 (size of the chain {1}) and width 5 (size of the
anti-chain {1, 2, 3, 4, 5})
...
The poset in Example 8
...
5
...

3
...
1
...
1d has height 2 (respective chains are {1, 2} and {3, 4}) and width
3 (a respective anti-chain is {1, 3, 5})
...

4
...
The same holds for the usual
order in Z, Q and R
...
If (X, f ) is a finite linearly ordered set then the singleton subsets of X are the only anti-chains
...

6
...

However, the set {1, 2, 4, 8, 16} is a chain
...

There are larger chains, for example, {2k : k = 0, 1, 2,
...
The poset (N, f ) has infinite height and infinite width
...
The poset (P({1, 2, 3, 4, 5}), ⊆) is not linearly ordered
...
Also, {∅, {2}, {2, 3}, {2, 3, 4}, {2, 3, 4, 5}, {1, 2, 3, 4, 5}} is a chain
...
What is its width?
Convention: It is common to use ≤ in infix notation for a partial order
...
Accordingly, the poset (X, f ) is
written as (X, ≤)
...
PARTIALLY ORDERED SETS, LATTICES AND BOOLEAN ALGEBRA

the partial order f ’
...
Also, we read x ≤ y as x is less than or equal to y; x < y as x is less
than y; x ≥ y as x is greater than or equal to y; and x > y as x is larger than y
...
1
...
Let n ∈ N
...
Define a relation ≤n on Pn
by ≤n = {(a, b) : a divides b}
...
Give a necessary and
sufficient condition on n so that (Pn , ≤n ) is a linearly ordered set
...
Further, the same linear order can be extended to the set of all words
formed using those symbols, such as that followed in a dictionary
...
1
...
Let (Σ, ≤) be a finite linearly ordered set (like the English alphabet with a <
b < c < · · · < z) and let Σ∗ be the collection of all words formed using the elements of Σ
...
, k for some k < min{m, n} and ak+1 < bk+1 , or
(c) ai = bi for i = 1, 2,
...

Then (Σ∗ , ≤) is a linearly ordered set
...
Sometimes Σ is called the alphabet and the linearly ordered set Σ∗ is called the dictionary
...
1
...
Let D1 be the dictionary of words made from a, b, c and D2 be the dictionary of
words made from a, b, d
...
1
...
[Directed Graph Representation of a Finite Poset] Often we represent
a finite poset (X, ≤) by a picture
...

(a) Put a dot (called a node) for each element of X and label it with that element
...

(c) Put a loop at the node labeled a for each a ∈ X
...
A directed graph representation of the poset (A, ≤) with A = {1, 2, 3, 9, 18} and ≤ as the ‘divides’
relation (a ≤ b if a|b) is given below
...

Definition 8
...
15
...
Each element of X is represented by a point and is labeled with the element
...
If a ≤ b then the point labeled a must appear at a lower height than the point labeled b and
further the two points are joined by a line
...
1
...
If a ≤ b and b ≤ c then the line between a and c is removed
...
1
...


Example 8
...
16
...


18
9
2

3
1

Practice 8
...
17
...
{1, 2, 3} × {1, 2, 3, 4} under lexicographic order
...
{1, 2, 3, 6, 9, 18} (all positive divisors of 18) with the relation as ‘divides’
...
{2, 3, 4, 5, 6, 7, 8} with the ‘divides’ relation
...
1
...
Let X and Y be nonempty sets
...
Suppose (F, ⊆) is a linearly ordered set
...
Then the following are true:
f ∈F

3
...

f ∈F

AF

f ∈F

DR

2
...


T

1
...


4
...

Proof
...

1
...
We have x ∈ dom h and (x, y), (x, z) ∈ h, y 6= z
...
As F is linearly ordered, either f ⊆ g or
g ⊆ f
...
Then, g is not a partial function, a contradiction
...

2
...
This means (x, y) ∈ f for some f , i
...
,
x ∈ dom f for a partial function f
...

f ∈F

Practice 8
...
19
...
1
...

We fix some more terminology for posets related to extreme elements
...
1
...
Let (X, ≤) be a poset and let A ⊆ X
...
We say that an element x ∈ X is an upper bound of A if for each z ∈ A, z ≤ x; or equivalently,
when each element of A is less than or equal to x
...

2
...
Thus, maximum
of A is an upper bound of A which is contained in A
...
In this case, we denote x = max{z : z ∈ A}
...
If minimum of A exists, then it is unique; and we write
y = min{z : z ∈ A}
...
PARTIALLY ORDERED SETS, LATTICES AND BOOLEAN ALGEBRA

3
...
e
...
Similarly, the greatest lower bound (glb) of A is a lower
bound of A which is greater than or equal to all upper bounds of A; it is the maximum (largest)
of the set of all lower bounds of A
...
An element x ∈ A is a maximal element of A if x ≤ z for some z ∈ A implies x = z; or
equivalently, when no element in A is larger than x
...

Example 8
...
21
...
1: Posets X and Y

1
...
Then,

AF

T

(a) the maximal elements of A are b and c,
(b) the only minimal element of A is a,

DR

(c) a is the lower bound of A in X,
(d) A has no upper bound in X,

(e) A has no maximum element,
(f) a is the minimum element of A,
(g) no element of X is the lub of A, and
(h) a is the glb of A in X
...
The following table illustrates the definitions by taking different subsets A of X, and also considering the same A as a subset of Y
...
1
...
1
...

1
...


2
...
For a, b ∈ Y , define a ≤Y b if a ≤ b
...
This is called the induced partial order on Y
...
1
...
[Hasse diagram exists] Let (X, ≤) be a finite poset
...
, xk be the minimal
elements of X
...
1
...
1
...
, xk
...
, xk } with the induced partial order ≤Y
...
Put it above those k dots
...
, ym be the minimal elements
of Y
...
This is the Hasse diagram for the poset (X, ≤)
...
1
...
[Bounds of the Empty Set] Let (X, ≤) be a poset
...
So, an lub for ∅ may or may not exist
...
Whereas, if X = Z and ≤ is the usual order,
then an lub for ∅ does not exist
...

Another important class of partial orders is introduced next
...
1
...
A linear order ≤ on a nonempty set X is said to be a well order if each nonempty
subset of X has minimum
...


DR

AF

T

Often we use the phrase ‘X is a well ordered set with the ordering as ≤’ to mean ‘(X, ≤) is a well
ordered set’
...
Thus to say that every subset (of X) has minimum is same as saying every
subset has its minimum, which is unique and is an element of that subset
...
Thus a linearly
ordered set is well ordered if and only if every nonempty subset has a minimal element
...
1
...

minimum
...
The set Z with the usual order is not well ordered, as {−1, −2,
...
The ordering 0 ≤ 1 ≤ −1 ≤ 2 ≤ −2 ≤ 3 ≤ −3 ≤ · · · describes a well order on Z
...
The set N with the usual order is well ordered
...
The set R with the usual order (usual ≤) is not well ordered as the set (0, 1) has no minimum
...

Theorem 8
...
27
...
Let A ⊆ W
satisfying “suppose for each x ∈ W , the condition {y ∈ W : y < x} ⊆ A implies x ∈ A”
...

Proof
...
Then Ac = W \ A 6= ∅
...
Notice that s ∈ Ac , and hence any element of W that is less than s is in A
...
If z ∈ Ws , then z < s
...

Hence, Ws ⊆ A
...
This is a contradiction
...
In the well ordered set N, the intiial segment of any natural number n is

168

CHAPTER 8
...
, n − 1}
...
We leave
it as an exercise to supply a formal proof that this principle is same as the principle of mathematical
induction in N
...
1
...

1
...

(a) Take X = Z with the usual order (usual ≤) and A = Z
...


2
...
If no, give reasons
...
Consider the poset X = {1, 2, 3, 6, 9, 18} with ‘divides’ relation
...

(b) What is its height? What is its width
...
What are the maximal elements, minimal elements, maximum,
minimum, lower bounds, upper bounds, glb and lub of A?

m, n ∈ N
m≤n



 [
(1, m), (1, n)

AF



DR

f=

T

4
...




5
...
∪ (2, 1)(3, 1), (4, 1),
...


(a) Does X have any minimal element(s)?
(b) Does every subset of X have a lower bound?
(c) Is X linearly ordered?
(d) Is it true that every nonempty subset of X has a minimal element?
(e) Is it true that every nonempty subset of X has a minimum?
(f ) What type of nonempty subsets of X always have a minimum?
6
...

7
...


(b) Take N with the usual order
...

(c) Take N with the usual order and N2 with the dictionary order
...


(d) There exists a partial order on N for which each nonempty subset has at least one but finitely
many upper bounds, and also at least one but finitely many lower bounds?
(e) There exists a partial order on N for which there are infinitely many maximal elements but
has no minimal element
...


169

8
...
LATTICES

(g) Every countable chain which is bounded below, in a poset, is well ordered with respect to the
same ordering
...

(i) Let S be the set of words with length at most 8 using letters from {3, A, a, b, C, c}
...
Are there more than 500 ways
to do that?
(j) An infinite poset in which each nonempty finite set has a minimum, must be linearly ordered
...

(l) An infinite poset in which each nonempty finite set has a minimum, must be well ordered
...

8
...


8
...
For instance,
consider the poset {1, 2,
...
The elements 5 and 3 have no
common upper bound
...
For example, look at the poset described by the third Hasse diagram in Figure 8
...

The set {a, b} has c and d as upper bounds, but there is no lub of {a, b}
...
2: Hasse diagrams
Definition 8
...
1
...
A poset (L, ≤) is called a lattice if each pair x, y ∈ L has an lub and also a glb
...
Do you want to write join and meet here or in

Boolean Algebras? I added it
...


2
...


Example 8
...
2
...
Consider the poset L = {0, 1}, where 0 < 1
...
In this case,
a ∨ b = max{a, b} and a ∧ b = min{a, b}
...


170

CHAPTER 8
...
The set N with the usual order is a distributive lattice, where ∨ = max and ∧ = min
...
The second distributive law is
left as an exercise to the reader
...
Then, either a ≥ b or a ≥ c, say a ≥ b
...
Thus,
a ∨ (b ∧ c) = max{a, min{b, c}}


= a = min max{a, b}, max{a, c} = (a ∨ b) ∧ (a ∨ c)
...
Then, a < b and a < c
...

Thus,
a ∨ (b ∧ c) = max{a, min{b, c}}


= min{b, c} = min max{a, b}, max{a, c} = (a ∨ b) ∧ (a ∨ c)
...
The poset described by the first diagram in Figure 8
...
(Verify
...
The poset described by the second diagram in Figure 8
...

(Verify by computing a ∨ (b ∧ c) and (a ∨ b) ∧ (a ∨ c) separately
...
Let S = {a, b, c}
...
Then A ∨ B = A ∪ B
and A ∧ B = A ∩ B
...


DR

AF

T

6
...
For elements x, y ∈ D(n),
define x ≤ y if x divides y
...

For n = 12, 30 and 36, the corresponding lattices are shown below
...
Further, let
pk | lcm{a, gcd{b, c}}
...
In that case, pk | lcm{a, b} and pk | lcm{a, c}
...

Now, let us assume that pk | gcd{lcm{a, b}, lcm{a, c}}
...

Then, either pk |a or (pk |b and pk |c)
...

Thus, any power of a prime divides a ∨ (b ∧ c) if and only if it divides (a ∨ b) ∧ (a ∨ c)
...
Similarly, the second distributive law can be verified
...
2
...

1
...
Draw the Hasse diagram of D(pn )
...


171

8
...
LATTICES

2
...
Prove that D(n) is a linearly ordered set if and only if n = pm for
some prime p and a positive integer m
...
Is every linearly ordered set a distributive lattice?
We now prove the basic results on ∧ and ∨
...
2
...
[Laws] In a lattice (L, ≤), the following are true:
1
...
[Commutativity] : a ∨ b = b ∨ a,

a∧b=b∧a

3
...
a ≤ b ⇔ a ∨ b = b
...
[Absorption] : a ∨ (a ∧ b) = a = a ∧ (a ∨ b)
6
...
a ≤ b, c ≤ d ⇒ a ∨ c ≤ b ∨ d,

b≤c ⇒a∧b≤a∧c

a ≤ b, c ≤ d ⇒ a ∧ c ≤ b ∧ d

8
...
[Modularity] : a ≤ c ⇔ a ∨ (b ∧ c) ≤ (a ∨ b) ∧ c
Proof
...


AF

T

(1) a ∨ a is an upper bound of {a, a}
...
On the other hand, a is an upper bound
of {a, a}
...
Hence
a ∨ a = a
...
So, b ∨ a is an upper bound of a, b
...
Exchanging a and b, we get b ∨ a ≤ a ∨ b
...

(3) Let d = a ∨ (b ∨ c)
...
So, d ≥ a ∨ b and d ≥ c
...
Similarly, e = (a ∨ b) ∨ c implies e ≥ a ∨ (b ∨ c)
...

(4) Let a ≤ b
...
Also, a ∨ b is an upper bound of {a, b} and hence a ∨ b ≥ b
...

Conversely, let a ∨ b = b
...
Therefore,
a ≤ b ⇔ a ∨ b = b
...
So, a ∨ (a ∧ b) ≤ a ∨ a = a using (1)
...

Hence, a ∨ (a ∧ b) = a
...
Note that a ∨ c ≥ a and a ∨ c ≥ c ≥ b
...
Thus,
a ∨ c ≥ lub{a, b} = a ∨ b
...
Again, using (6), we get a ∧ c ≤ b ∧ c ≤ b ∧ d
...
Thus, a = a ∧ a ≤ (a ∨ b) ∧ (a ∨ c)
...
So, by definition a ∨ (b ∧ c) ≤ (a ∨ b) ∧ (a ∨ c)
...
Then, a ∨ c = c and hence by (8), we have a ∨ (b ∧ c) ≤ (a ∨ b) ∧ (a ∨ c) = (a ∨ b) ∧ c
...
Then a ≤ a ∨ (b ∧ c) ≤ (a ∨ b) ∧ c ≤ c
...

Practice 8
...
5
...


172

CHAPTER 8
...


Before defining Direct Product of lattices, do we need to show that
if a = (a1, a2) ≤ (b1, b2) = b whenever a1 ≤1 b1 and a2 ≤2 b2 then
a ∨ b = (a1 ∨1 b1, a2 ∨2 b2) and a ∧ b = (a1 ∧1 b1, a2 ∧2 b2)
...
2
...
Let (L1 , ≤1 ) and (L2 , ≤2 ) be lattices
...
e
...
This is called the
lattice order on L1 ×L2
...

Thus (L1 × L2 , ≤) is a lattice, called the direct product of lattices (L1 , ≤1 ) and (L2 , ≤2 )
...
2
...

1
...
The set of all binary strings Ln of length n is
a poset with the order (a1 ,
...
, bn ) if ai ≤ bi for each i
...
It is called the lattice of n-tuples of 0 and 1
...
Consider the lattices {1, 2, 3} and {1, 2, 3, 4} with the usual orders
...


(3, 4)
(1, 4)
(3, 1)

AF

T

(1, 1)

DR

Practice 8
...
8
...
The lattice order defined on N2 is different from
the lexicographic order on N2
...

Proposition 8
...
9
...

Proof
...

Then
[(a1 , b1 ) ∨ (a2 , b2 )] ∧ (a3 , b3 ) = (a1 ∨ a2 , b1 ∨ b2 ) ∧ (a3 , b3 )
=
=
=
=

(a1 ∨ a2 ) ∧ a3 , (b1 ∨ b2 ) ∧ b3




(a1 ∧ a3 ) ∨ (a2 ∧ a3 ), (b1 ∧ b3 ) ∨ (b2 ∧ b3 )


(a1 ∧ a3 ), (b1 ∧ b3 ) ∨ (a2 ∧ a3 ), (b2 ∧ b3 )


(a1 , b1 ) ∧ (a3 , b3 ) ∨ (a2 , b2 ) ∧ (a3 , b3 )

This verifies one of the distributive laws
...
2
...

As in all algebraic structures, there is a notion of lattice homomorphism and also lattice isomorphism
...

Definition 8
...
10
...
A function f : L1 → L2 satisfying f (a∨1 b) =
f (a)∨2 f (b) and f (a∧1 b) = f (a)∧2 f (b) is called a lattice homomorphism
...


173

8
...
LATTICES
Example 8
...
11
...
Let D be the set of all words formed using the letters a, b,
...
With the dictionary order, where a ≤ b ≤ · · · ≤ z, both D and
S are lattices
...
Then, f is a
homomorphism
...

2
...
Let S = {0, 1, 2} with the usual order
...
If f (m) = 0 and f (n) = 1, then m ≤ n, or else, we have
f (m ∨ n) = f (m) = 0,

f (m) ∨ f (n) = 0 ∨ 1 = 1
...
So, the map f must have one of the following forms
...

(a) f −1 (0) = N
...
, k} and f −1 (1) = N \ {1, 2,
...


(c) f −1 (0) = {1, 2,
...
, k + r} and f −1 (2) = N \ {1, 2,
...


DR

AF

T

In a lattice there may or may not exist an element which is greater than or equal to every other
element
...
In fact, a largest element is unique
...
Then, in particular, a ≤ b and
b ≤ a so that a = b
...
Similarly, a lattice can have
only one smallest element
...
2
...
Let (L, ≤) be a lattice
...
Such an element α is called the largest
element of L, and is denoted by 1
...

Notice that if a lattice is bounded, then 1 is the lub of the lattice and 0 is the glb of the lattice
...
2
...
A lattice (L, ≤) is said to be complete if each nonempty subset of L has lub and
glb in L
...

It follows that each complete lattice is a bounded lattice
...
2
...

1
...
3 are complete
...
The set [0, 5] with the usual order is a lattice which is both bounded and complete
...

3
...

4
...

5
...
(Use induction
...
The set R with the usual order is a lattice
...
Observe that the
completeness property of R, i
...
, “for every bounded nonempty subset a glb and an lub exist”
is different from the completeness in the lattice sense
...
PARTIALLY ORDERED SETS, LATTICES AND BOOLEAN ALGEBRA
(1, 1, 1)

(1, 0, 1)

(1, 1, 0)
(1, 0, 0)

(0, 1, 0)

{a, b, c}

30

(0, 1, 1)

6

10

15

{a, b}

(0, 0, 1)

2

3

5

{a}

(0, 0, 0)

{a, c}

{b, c}

{b}

{c}

1



Figure 8
...
2
...
Let (L, ≤) be a bounded lattice
...
Such an element y corresponding
to the element x is called a complement of x, and is denoted by ¬x
...
2
...


DR

AF

T

1
...
In
fact, if x ∈ (0, 1), then it does not have a complement
...
Verify the captions of the two figures given below
...


1
1
a

f
c

b
0

0

Complemented but NOT distributive

Distributive but NOT complemented

Why the first 8 rows in the table given below? They already appear
in Proposition 8
...
4
...
In the proof, the first eight are already
proved earlier
...
2
...
[The Comparison Table] Let (L, ≤) be a lattice and let a, b, c ∈ L
...


175

8
...
LATTICES
Properties

Lattice type

∨, ∧ are idempotent

Any lattice

∨, ∧ are associative

Any lattice

[Absorption] a ∧ (a ∨ b) = a = a ∨ (a ∧ b)

Any lattice

∨, ∧ are commutative

Any lattice

a≤b⇔a∧b=a⇔a∨b=b

Any lattice

[Isotonicity] b ≤ c ⇒ {a ∨ b ≤ a ∨ c, a ∧ b ≤ a ∧ c}

Any lattice

[Distributive inequalities]

Any lattice

a ∨ (b ∧ c) ≤ (a ∨ b) ∧ (a ∨ c)
a ∧ (b ∨ c) ≥ (a ∧ b) ∨ (a ∧ c)

[Modular inequality] a ≤ c ⇔ a ∨ (b ∧ c) ≤ (a ∨ b) ∧ c

Any lattice

0 is unique; 1 is unique

Bounded lattice

If a is a complement of b, then b is also a complement of a

Bounded lattice

¬0 is unique and it is 1; ¬1 is unique and it is 0

Bounded lattice

An element a has a unique complement


a ∨ c = b ∨ c, a ∨ ¬c = b ∨ ¬c ⇒ a = b

[Cancellation] 
a ∧ c = b ∧ c, a ∧ ¬c = b ∧ ¬c ⇒ a = b

Distributive complemented lattice

[De-Morgan]

Distributive complemented lattice

¬(a ∨ b) = ¬a ∧ ¬b
¬(a ∧ b) = ¬a ∨ ¬b

a ∨ ¬b = 1 ⇔ a ∨ b = a
a ∧ ¬b = 0 ⇔ a ∧ b = a

Distributive complemented lattice

Distributive complemented lattice

AF

T

Proof
...

Cancellation property:

DR

b = b ∨ 0 = b ∨ (c ∧ ¬c) = (b ∨ c) ∧ (b ∨ ¬c) = (a ∨ c) ∧ (a ∨ ¬c) = a ∨ (c ∧ ¬c) = a ∨ 0 = a
...

De-Morgan’s property:
(a ∨ b) ∨ (¬a ∧ ¬b) = (a ∨ b ∨ ¬a) ∧ (a ∨ b ∨ ¬b) = 1 ∧ 1 = 1
...

(a ∧ b) ∨ (¬a ∨ ¬b) = (a ∨ ¬a ∨ ¬b) ∧ (b ∨ ¬a ∨ ¬b) = 1 ∧ 1 = 1
...

Using Definition 8
...
15 on the first two equalities, we get ¬(a ∨ b) = ¬a ∧ ¬b; and using it again on
the last two equalities, we obtain ¬(a ∧ b) = (¬a ∨ ¬b)
...

Conversely, if a = a ∨ b, then a ∨ ¬b = (a ∨ b) ∨ ¬b = 1
...

Exercise 8
...
18
...
Prove that every linearly ordered set is a distributive lattice
...
Draw the Hasse diagrams of {1, 2, 3} × {1, 2, 3, 4} with dictionary order and the lattice order:
(m, n) ≤ (p, q) if m ≤ p and n ≤ q
...
Give a partial order on N to make it a bounded lattice
...


176

CHAPTER 8
...
Consider the lattice N2 with lexicographic order
...
Show that {0, 1, 2,
...
Characterize those
sets A for which ∨A = 0
...
Is the lattice {1, 2} × {1, 2} × {1, 2} × {1, 2} isomorphic to {1, 2, 3, 4} × {1, 2, 3, 4}?
7
...

8
...

9
...
Let p1 , p2 ,
...
Prove that the lattice D(N ), (See Example 8
...
2
...
, n}
...
3
...
How many lattice homomorphisms are there from {1, 2} to {1, 2,
...
Draw as many Hasse diagrams of non-isomorphic lattices of size 6 as you can
...
3

Boolean Algebras

DR

AF

T

In a distributive complemented lattice (see Theorem 8
...
17) the binary operations ∨, ∧, and the
unary operation ¬ satisfy certain properties
...

Definition 8
...
1
...
[Commutativity] : x ∨ y = y ∨ x and x ∧ y = y ∧ x
...
[Distributivity] : x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z) and x ∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z)
...
[Identity elements] : There exist elements 0, 1 ∈ S such that x ∨ 0 = x and x ∧ 1 = x
...
[Inverse] : x ∨ ¬x = 1 and x ∧ ¬x = 0
...

Notice that the fourth property in the definition above uses the two special elements 0 and 1,
whose existence has been asserted in the third property
...
We show that it is indeed the case
...
3
...
Let S be a Boolean algebra
...
Elements 0 and 1 are unique
...
Corresponding to each s ∈ S, ¬s is the unique element in S that satisfies the property: s∨¬s = 1
and s ∧ ¬s = 0
...
For each s ∈ S, ¬¬s = s
...
3
...
(1) Let 01 , 02 ∈ S be such that for each x ∈ S, x ∨ 01 = x and x ∨ 02 = x
...
By Commutativity, 02 ∨ 01 = 01 ∨ 02
...
That is, 0 is the
unique element satisfying the property that for each x ∈ S, 0 ∨ x = x
...

(2) Let s ∈ S
...
For the converse, suppose t, r ∈ S
are such that s ∨ t = 1, s ∧ t = 0, s ∨ r = 1 and s ∧ r = 0
...

(3) It directly follows from the definition of inverse, due to commutativity
...
3
...

1
...
Then P(S) is a Boolean algebra with ∨ = ∪, ∧ = ∩, ¬A = Ac , 0 = ∅
and 1 = S
...
So, we have Boolean algebras of
finite size as well as of uncountable size
...
Take D(30) = {n ∈ N : n | 30} with a ∨ b = lcm(a, b), a ∧ b = gcd(a, b) and ¬a =
Boolean algebra with 0 = 1 and 1 = 30
...


It is a

3
...
It is a Boolean algebra with 0 = F
and 1 = T
...
Let B be the set of all truth functions involving the variables p1 ,
...
Then B is a Boolean algebra with 0 = ⊥ and 1 = >
...
, pn
...
)

DR

5
...
is a Boolean algebra with
usual operations
...
Here
also 0 = ⊥ and 1 = >
...

Remark 8
...
4
...
Notice that the second
parts in the defining conditions of Definition 8
...
1 can be obtained from the corresponding first parts
by replacing ∨ with ∧, ∧ with ∨, 0 with 1, and 1 with 0 simultaneously
...

This is called the principle of duality
...
3
...
[Laws] Let S be a Boolean algebra
...
[Constants] : ¬0 = 1,

¬1 = 0,

2
...


s ∧ s = s
...
[Absorption] : s ∨ (s ∧ t) = s,

s ∧ (s ∨ t) = s
...
[Cancellation] : s ∨ t = r ∨ t, s ∨ ¬t = r ∨ ¬t ⇒ s = r
...
[Cancellation] : s ∧ t = r ∧ t, s ∧ ¬t = r ∧ ¬t ⇒ s = r
...
[Associativity] : (s ∨ t) ∨ r = s ∨ (t ∨ r),

(s ∧ t) ∧ r = s ∧ (t ∧ r)
...
We give the proof of the first part of each item and that of its dual is left for the reader
...


178

CHAPTER 8
...

s ∨ 0 = s ∨ (s ∧ ¬s) = (s ∨ s) ∧ (s ∨ ¬s) = s ∧ 1 = s
...

(3) s ∨ (s ∧ t) = (s ∧ 1) ∨ (s ∧ t) = s ∧ (1 ∨ t) = s ∧ 1 = s
...
Then
s = s ∨ 0 = s ∨ (t ∧ ¬t) = (s ∨ t) ∧ (s ∨ ¬t) = (r ∨ t) ∧ (r ∨ ¬t) = r ∨ (t ∧ ¬t) = r ∨ 0 = r
...

(6) Using distributivity and absorption, we have



s ∨ (t ∨ r) ∧ ¬s = (s ∧ ¬s) ∨ (t ∨ r) ∧ ¬s = 0 ∨ (t ∨ r) ∧ ¬s

= (t ∨ r) ∧ ¬s = (t ∧ ¬s) ∨ (r ∧ ¬s)
...



Hence, s ∨ (t ∨ r) ∧ ¬s = (s ∨ t) ∨ r ∧ ¬s
...

Now, apply Cancellation law to obtain the required result
...
Boolean algebras are no exceptions
...
3
...
Let (B1 , ∨1 , ∧1 , ¬1 ) and (B2 , ∨2 , ∧2 , ¬2 ) be two Boolean algebras
...
In such a case,

DR

f (01 ) = 02 , f (11 ) = 12 , f (a ∨1 b) = f (a) ∨2 f (b), f (a ∧1 b) = f (a) ∧2 f (b), f (¬1 a) = ¬2 f (a)
...

Unless we expect an ambiguity in reading and interpreting the symbols, we will not write the
subscripts with the operations explicitly as is done in Definition 8
...
6
...
3
...
Recall the notation [n] = {1, 2,
...
The function f : P([4]) → P([3]) defined
by f (S) = S \ {4} is a Boolean homomorphism
...

f (A ∨ B) = f (A ∪ B) = (A ∪ B) \ {4} = (A \ {4}) ∪ (B \ {4}) = f (A) ∨ f (B)
...

Exercise 8
...
8
...
Let B1 and B2 be two Boolean algebras and let f : B1 → B2 be a function that
satisfies the four conditions f (01 ) = 02 , f (11 ) = 12 , f (a ∨1 b) = f (a) ∨2 f (b) and f (a ∧1 b) =
f (a) ∧2 f (b)
...

2
...
If a, b ∈ B with a ∧ b 6= a then a ∧ ¬b 6= 0
...
Let B be a Boolean algebra
...


(b) Let b ∈ B
...


4
...

Then f (a) is an atom of B2
...
3
...
What is the number of Boolean homomorphisms from P([4]) to P([3])?
6
...
See Example 8
...
3
...
How many atoms does D(30030) have? How many elements does it have?
We will show that finite Boolean algebras are simply the power set Boolean algebras, up to isomorphism
...

Let (L, ≤) be a distributive complemented lattice
...
It can be verified that (L, ∨, ∧, ¬) is a Boolean algebra
...
Is it possible to define a partial order ≤ on L so that (B, ≤) will
be a distributive complemented lattice, and then in this lattice, the resulting operations of ∨, ∧ and
¬ will be the same operations we have started with?
Theorem 8
...
9
...
Define the relation ≤ on B by
a ≤ b if and only if a ∧ b = a

for all a, b ∈ B
...


DR

AF

T

Proof
...

Reflexive: s ≤ s if and only if s ∧ s = s, which is true
...
Then we have s = s ∧ t = t
...
Then s ∧ t = s and t ∧ r = t
...

Now, we show that a ∨ b = lub{a, b}
...
Similarly, b ≤ a ∨ b
...

Now, let x be any upper bound for {a, b}
...
So, a ∨ b ≤ x
...
Analogous arguments show that
a ∧ b = glb{a, b}
...
Thus (B, ≤)
is a lattice
...
This provides the complement of a in the lattice (B, ≤)
...
Hence (B, ≤) is a distributive complemented
lattice
...
3
...

Definition 8
...
10
...
The relation ≤ on B given by
a ≤ b if and only if a ∧ b = a

for all a, b ∈ B

is called the induced partial order
...

It follows from Theorem 8
...
9 that a Boolean algebra can be defined as a distributive complemented
lattice
...

Example 8
...
11
...
In the power set Boolean algebra, singleton sets are the only atoms
...
In Example 8
...
3
...


180

CHAPTER 8
...
The {F, T } Boolean algebra has only one atom, namely T
...
3
...

1
...
, pn ?
2
...

Proposition 8
...
13
...

Proof
...
Assume that no element of B is an atom
...
Then there exists b1 ∈ B such that 0 < b1 < 1
...
By induction it follows that we have a sequence of elements (bi )
such that 0 < · · · < bi < bi−1 < · · · < b1 < 1
...
We
then have bk < bk−1 < · · · < bj = bk
...
Hence B has at least one atom
...
3
...
Let p and q be atoms in a Boolean algebra B
...

Proof
...
We know that p ∧ q ≤ p
...
But this is not
possible since p is an atom
...
Similarly, q∧p = q
...

Theorem 8
...
15
...
Then there exists a set X
such that B is isomorphic to P(X)
...
Let X be the set of all atoms of B
...
3
...
Define f : B → P(X)
by f (b) = {x ∈ B : x is an atom and x ≤ b} for b ∈ B
...

Injection: Suppose b1 6= b2
...
Without loss of generality, let b1  b2
...
Also, the assumption b1  b2 implies b1 ∧ b2 6= b1
and hence b1 ∧ ¬b2 6= 0 (see Exercise 8
...
8
...
So, there exists an atom x ≤ (b1 ∧ ¬b2 ) and hence
x = x ∧ b1 ∧ ¬b2
...

Thus, x ≤ b1
...
As x 6= 0, we cannot have x ≤ b2 (for, x ≤ ¬b2 and x ≤ b2 imply
x ≤ b2 ∧ ¬b2 = 0)
...
Therefore, f (b1 ) 6= f (b2 )
...
, xk } ⊆ X
...
Clearly,
A ⊆ f (a)
...
So, let y ∈ f (a)
...

Since y 6= 0, by Proposition 8
...
14, y ∧ xi 6= 0 for some i ∈ {1, 2,
...
As xi and y are atoms, we
have y = y ∧ xi = xi and hence y ∈ A
...
Thus, f is a surjection
...

Preserving ∨, ∧ : By definition,
x ∈ f (b1 ∧ b2 ) ⇔ x ≤ b1 ∧ b2 ⇔ x ≤ b1 and x ≤ b2
⇔ x ∈ f (b1 ) and x ∈ f (b2 ) ⇔ x ∈ f (b1 ) ∩ f (b2 )
...
Then, x = x ∧ (b1 ∨ b2 ) = (x ∧ b1 ) ∨ (x ∧ b2 )
...
Without loss of generality, suppose x ∧ b1 6= 0
...
4
...
Conversely, let x ∈ f (b1 ) ∪ f (b2 )
...
Thus, x ≤ b1 and hence x ≤ b1 ∨ b2 which in turn implies that x ∈ f (b1 ∨ b2 )
...

Preserving ¬ : Let x ∈ B
...
Thus f (¬x) = f (x)
...
The
readers should provide a proof
...
3
...
Let B be a finite Boolean algebra
...
If B has exactly k atoms then B is isomorphic to P({1, 2,
...
Hence, B has exactly 2k
elements
...
Fix b ∈ B
...
, pn are the only atoms less than or equal to b, then b = p1 ∨ · · · ∨ pn
...
3
...

1
...

2
...

3
...


T

4
...
Can we define some operations on this class
to make it a Boolean algebra?

AF

5
...
Is ‘finite’ necessary?

DR

6
...
Let
Bn = {k ∈ N : k | n}
...
Show that Bn is a Boolean algebra if and only if n > 1 is square-free
...
Show that the set of subsets of N which are either finite or have a finite complement is a denumerable Boolean algebra
...
Is it isomorphic to the free Boolean algebra with
generators p1 , p2 , · · · ?
8
...
We know that, for each n ∈ N, the
n

W
W
expression
xi is meaningful in each Boolean algebra due to associativity
...
Show that a Boolean algebra with at least 3 atoms has at least 23 elements
...
Prove or disprove: If B1 and B2 are finite Boolean algebras each of size k > 100, then they must
be isomorphic and there must be more than k isomorphisms between them
...
Let F(N) = {X ⊆ N : X is finite or X c is finite }
...
Show that both F(N)
and F(R) are Boolean algebras, where ∨ = ∪, ∧ = ∩ and ¬(Y ) = Y c
...
Give examples of two denumerable non-isomorphic Boolean algebras
...
Give examples of two uncountable non-isomorphic Boolean algebras
...
4

Axiom of choice and its equivalents

As mentioned earlier, unrestricted use of apparently natural constructions led to paradoxes in the
informal theory of sets
...
Mathematicians

182

CHAPTER 8
...
A priori, it is inconceivable
that this seemingly obvious statement should generate so much controversy
...
Though Axiom of choice looked very innocent, some of its
consequences were counter-intuitive
...
It had
been used in many branches of mathematics with much success in proving very important results
...
We will give an overview of the topic
in this section and discuss its usefulness
...

We know that the Cartesian product of two nonempty sets is nonempty
...
Is it true that the product of
an infinite number of nonempty sets is nonempty? Axiom of choice posits that it is indeed true
...
4
...
[Axiom of Choice (AC)]
nonempty
...
Similarly, the product of this family consists of all
α∈I

functions f from I to ∪ Aα , where f (α) ∈ Aα for each α ∈ I
...
Notice that any arbitrary family of sets C can be written as an indexed family
by taking the index set as C itself; for, C = {Aα }α∈C with Aα = α
...
Hence a reformulation of AC is as follows:

AF

Y ∈C

DR

AC: Given any nonempty family C of nonempty sets, there exists a function f : C → ∪ Y , called
the choice function, such that f (X) ∈ X for each X in C
...
It so closely resembles AC that it goes
by the acronym AC1
...
4
...
[Axiom of Choice 1 (AC1)] Given any nonempty family C of nonempty disjoint sets,
there exists a set B such that for each set X in C, X ∩ B is a singleton set
...

Theorem 8
...
3
...

Proof
...
Let {Bα : α ∈ I} be a nonempty family of nonempty sets
...
In a way Cα is a copy of Bα , the only difference being Cα consists
of ordered pairs (x, α) instead of the element x in Bα
...

Notice that if α 6= β, then Cα ∩ Cβ = ∅
...

By AC1, there exists a set A such that A ∩ Cα is a singleton set
...
Define the function f : {Bα : α ∈ I} → ∪ Bα by f (Bα ) = xα
...
Therefore, AC is true
...


There are many general statements equivalent to Axiom of Choice
...
For one of the equivalents of AC, we require a new notion that
we introduce now
...
4
...
4
...
A family of sets C is called a family of finite character if for any set A,
A ∈ C if and only if each finite subset of A is in C
...
4
...

1
...

2
...

3
...


4
...
As we know, a subset A of V is linearly independent if
and only if all finite subsets of A are linearly independent
...

Proposition 8
...
6
...
Show that P(A) ∪ P(B) is a family of finite
character
...
Let C = P(A) ∪ P(B) and let X ∈ C
...
Then X ⊆ A
...
Then Y ∈ P(A)
...

Thus, all finite subsets of X are in P(A) ∪ P(B)
...
We need to
show that X is in P(A) ∪ P(B)
...
Then there exist elements x ∈ X \ A and y ∈ X \ B
...
But {x, y} is neither in P(A)
nor in P(B), a contradiction
...
4
...
Let {Aα }α∈I be a nonempty family of nonempty sets
...


The following theorem lists some of the widely used equivalents of the axiom of choice
...
Nonetheless each of them follows from
the other
...
4
...
The following are equivalent to the axiom of choice:
1
...

2
...

3
...

4
...

Proof
...

Assume that the axiom of choice (AC) is true but Taukey’s lemma is false
...
So, each set A in the family F has a proper
superset in F
...
Thus
for each set A in the family F, the family SA is nonempty
...
The product of this indexed family
is the set of all functions from F to ∪ SA
...
Consequently, for each A ∈ F, f (A) ∈ SA , that is, f (A) is a proper superset of A
...


184

CHAPTER 8
...
Let H be the intersection of all f -inductive sub-families of F
...
We show that H is a chain
...

Since F has no maximal element, L is a nonempty family
...

Claim 1 : For any H ∈ H, we have either H ⊆ L or f (L) ⊆ H
...

We first show that C is an f -inductive set
...
Observe that for any set A in C, the following are true:
1
...
So f (A) ∈ C
...
If A = L, then f (A) = f (L) ⇒ f (L) ⊆ f (A) ⇒ f (A) ∈ C
...
If f (L) ⊆ A, then f (L) ⊆ A ⊆ f (A)
...

4
...

Reason: If each element of B is subset of L, then ∪ B ⊆ L and so it is in C
...


AF

T

Thus C is an f -inductive set
...
Also,
by the very definition of C, we have C ⊆ H
...
Again, the definition of C implies that
if H ∈ H, then either H ⊆ L or f (L) ⊆ H
...

We first show that L is an f -inductive family
...
Let L ∈ L
...
If B 6⊆ L, then since L ∈ L, f (L) ⊆ B, which is not possible
...
Now, if
B = L, then f (B) = f (L)
...
Since L ∈ L, f (B) ⊆ L ⊆ f (L)
...
Hence f (L) ∈ L
...
Is it true that ∪ B ∈ L? Well, let H be a proper subset of ∪ B
...
For this, let B ∈ B
...
If H = B, then since B is a proper subset of ∪ B, ∪ B ∈ H and B ∈ L, we have
f (H) = f (B) ⊆ ∪ B
...
As B ∈ L, f (B) ⊆ H
...
But this is not possible as H is a proper subset of ∪ B
...

Hence, L is an f -inductive family
...

Also, by the very definition of L, we have L ⊆ H
...

Form Claim 1, we conclude that for each pair of sets H1 , H2 in H, we have either H2 ⊆ H1 or
f (H1 ) ⊆ H2 ⇒ H1 ⊆ H2
...
Using Claim 2, we see that H is a chain in F satisfying
(a) ∅ ∈ H,

(b) if A ∈ H, then f (A) ∈ H,

(c)

∪ A ∈ H
...
Using induction,
we have f n (∅) ∈ H for each n ∈ N
...

n∈N

n∈N

n∈N

185

8
...
AXIOM OF CHOICE AND ITS EQUIVALENTS
This is a contradiction
...
Let X be
a nonempty poset
...
Let Y be a set such that all its finite
subsets are in C
...
Thus, Y is a
chain and so Y is a set in C
...
Therefore, by Tukey’s
lemma, X has a maximal chain
...
Let (X, ≤) be a nonempty poset in which every chain has an upper bound
...
Let a be an upper bound of C
...
Then there exists b ∈ X such that a < b
...
Hence a
is a maximal element of (X, ≤)
...
This proves Zorn’s lemma
...
Let X be a
nonempty set
...

Notice that F is a set of ordered pairs, where the first element is a subset of X and the second element
is a well order on that subset
...


T

B ⊆ C,

DR

AF

We leave it as an exercise to show that ≤ is a partial order on F
...

Let C be a nonempty chain in (F, ≤)
...


Notice that the proposal goes through provided (W, ≤W ) ∈ F
...
We need to show that if P is a nonempty subset of W , then there exists
p0 ∈ P such that p0 ≤W p for each p ∈ P
...
Given p ∈ P , there exists (D, ≤D ) such that p ∈ D
...
It has a minimum, say p0 as ≤D is a well order on D
...
For, suppose that there exists p1 ∈ W such
that p1 ≤W p0 , p0 6= p1
...
So, let p1 ∈ E
for some pair (E, ≤E ) ∈ C
...
But
p1 ∈ E and p1 6∈ D; so, E 6⊆ D
...
That is, there exists b ∈ E such
that D = {x ∈ E : x ≤E b, x 6= b}
...
This contradicts
p1 ≤W p0 as ≤W = ≤B on E
...
By Zorn’s
lemma, F has a maximal element
...
Notice that (Y, ≤Y ) is a
well ordered set
...
We can
then extend ≤Y to a well order on Y ∪ {x}
...
Hence,
Y = X
...

(Zermelo’s Well ordering principle ⇒ AC)
...
Let
{Xα }α∈L be a nonempty family of nonempty sets
...
By Zermelo’s well ordering
α∈L

186

CHAPTER 8
...
Hence, each set Xα being a nonempty subset of X, has
Q
a minimum mα
...
Then f ∈

...
4
...
Without using AC, show that Z and Q can be well ordered
...
In this
partial order, the elements of Z may be listed as 0, −1, 1, −2, 2, −3, 3,
...

For Q, recall that the set of positive rational numbers, Q+ , is denumerable
...
be
an enumeration of Q+
...
This provides a well order on Q
...


However, we do not know yet how to construct a well order on R
...

We now discuss some applications of the axiom of choice
...
4
...
Further, since every set can be well ordered (assuming
AC), the Principle of transfinite induction (See Theorem 8
...
27
...

Corollary 8
...
10
...
Then there exists a one-one
function from A to B if and only if there exists an onto function from B to A
...
Let f : A → B be a one-one function
...
Now, fix an
element a ∈ A
...

Then g is a an onto function
...
For any x ∈ A, g −1 (x) is a nonempty subset of B
...
Now, C is a nonempty family of nonempty sets
...
By the axiom of choice, there exists a function f : A → B, where for each α ∈ A,
α∈A

f (α) ∈ g −1 (α)
...
So, f is one-one
...
We denote the cardinal number of a set A by |A|
...

Generalizing the observation that “ |[m]| = |[n]| if and only if m = n” and “ |[m]| ≤ |[n]| if and
only if m ≤ n” we introduce the following definition to compare cardinal numbers
...
4
...
Let A and B be sets
...
By a cardinal
number, we mean the cardinality of some set
...
|A| ≤ |B| if there exists a one-one function from A to B
...
|A| ≥ |B| if |B| ≤ |A|
...
|A| = |B| if there is a bijection f : A → B
...
|A| < |B| if |A| ≤ |B| and |A| 6= |B|
...
|∅| = 0,

|[n]| = n,

|N| = ℵ0
...
4
...
If x = |A| , then by 2x we mean |P(A)|
...
If |B| = ℵk , then we write |P(B)| = ℵk+1 = 2ℵk
...

Further, Cantor-Schr¨
oder-Bernstein (CSB) theorem implies that |A| = |B| if and only if |A| ≤ |B|
and |B| ≤ |A|
...
4
...

1
...

Ans: It says, if there exist a one-one function f from A to B and a one-one function g from B
to C, then there is a one-one function from A to C
...

2
...

Ans: If A is any set, then Cantor’s theorem says that there is no onto function from A to P(A)
...
However, the function f : A → P(A) given by f (a) = {a} is a one-one
function
...
Hence, the result follows
...
The cardinal numbers we know till now are
ℵ0

0, 1, 2, 3,
...


AF

T

4
...
are infinite cardinal numbers
...


DR

5
...

Again, generalizing on the operations on natural numbers, we obtain the following definition for
adding and multiplying cardinal numbers
...
4
...
Let A and B be sets
...
Then, the addition and
multiplication of cardinal numbers are defined as follows:
1
...

2
...

We abbreviate αα · · · (m times) to αm
...
But that is not a problem as the following
example shows
...
4
...
Let A and B be sets
...
There exists an object x which is not an element of A
...
There exist sets C and D such that |C| = |A| , |B| = |D| and C ∩ D 6= ∅
...
Hence there exists x ∈ P(A) which is not an element of A
...

Write C = A × {x} and D = B × {y}
...

We will simply write C = A × {0} and D = B × {1} instead of using the objects x and y
...
PARTIALLY ORDERED SETS, LATTICES AND BOOLEAN ALGEBRA

Example 8
...
15
...
Then either |A| ≤ |B| or |B| ≤ |A|
...
Let F be the family of all one-one functions f with dom f ⊆ A and rng f ⊆ B
...
Consider the poset (F, ⊆)
...
Write g = ∪ f
...

f ∈C

f ∈C

If dom g is a proper subset of A and rng g is a proper subset of B, then take x ∈ A \ dom g and
y ∈ B \ rng g
...
Thus C ∪ {h} is a larger
chain, a contradiction to the maximality of C
...

Example 8
...
16
...

Proof
...
In view of Example 8
...
14, assume that
α = |A × {0}| = |A × {1}| , where A × {0} and A × {1} are disjoint sets
...

Then (F, ⊆) is a nonempty poset
...

Write g = ∪ f
...
Now, if y ∈ rng g, then rng g = ∪ rng f implies
f ∈C

f ∈C

f ∈C

T

y ∈ rng f for some f
...
So, there exists x ∈ dom f such that y = (x, 0)
or (x, 1)
...
Conversely, for any x ∈ dom g, we have
x ∈ dom f for some f and hence (x, 0), (x, 1) ∈ rng f ⊆ rng g
...

Further, g is an onto function from dom g to rng g
...
On
the contrary, suppose that we have a, b ∈ dom g and c ∈ rng g such that a 6= b and (a, c), (b, c) ∈ g
...
Notice that h is one-one
...
If f ⊆ h, then (a, c), (b, c) ∈ h, a contradiction to the fact that h is
one-one
...
Thus, we conclude that g is one-one;
and hence it is a bijection from dom g to rng g = dom g × {0, 1}
...
Then A \ dom g contains a
denumerable set, say D
...
Then the function ψ = g ∪ φ is
a bijection
...
Further, g is a proper subset of ψ; so that ψ 6∈ C
...

Hence, A \ dom g is finite
...
, xn }
...
, xn } to A
...
, xn }| = |A| = α
...
Therefore, α = α + α
...

Example 8
...
17
...

A proof along the lines of the previous example can be constructed for α2 = α; however, we give
another using Zorn’s lemma
...
Let A be an infinite set with |A| = α
...
Clearly, there is a
bijection f : N → N 2
...
) Define the set
X = {(M, g) : N ⊆ M ⊆ A and g : M → M 2 is a bijection }
...


8
...
AXIOM OF CHOICE AND ITS EQUIVALENTS

189

It is easy to see that in the poset (X, ≤), every chain has an upper bound
...

Consider the set C = A \ B; and write β = |B| , γ = |C|
...
Suppose β ≤ γ
...
Write E = (B ∪ D)2 \ B 2
and  = |E|
...


Hence  = β
...
Define the function ξ : (B ∪ D) → (B ∪ D)2
by

φ(x) if x ∈ B
ξ(x) =
ψ(x) if x ∈ D
...
This contradicts the maximality of (B, φ)
...

Then
α ≤ α2 = β 2 + βγ + γβ + γ 2 ≤ 4β 2 = 4β ≤ β 2 = β ≤ α
...

Practice 8
...
18
...
Show that α + β ≤ α + γ and αβ ≤ αγ
...
4
...
Every partial order on a nonempty set can be extended to a linear order
...
Let (X, f ) be a nonempty poset
...
Towards this, let F be the family of all partial orders h on X such that f ⊆ h
...
By Hausdorff’s maximality principle, it has a maximal chain, say C
...


DR

h∈C

It is easy to verify that g is a partial order
...
Then there
exists distinct x, y ∈ X such that (x, y) ∈
/ g and (y, x) ∈
/ g
...
If z ∈ Lx ∩ My , then (y, x) ∈ g by
transitivity
...
Note that x ∈ Lx and y ∈ My
...
We show
that g1 a partial order
...

Antisymmetry: Let (a, b), (b, a) ∈ g1
...

Suppose one of them is in Lx × My and the other is in g
...
This means (a, x) ∈ g, (y, b) ∈ g, and (b, a) ∈ g
...
Therefore, both of (a, b), (b, a) are in g, and hence a = b
...
Clearly, both of them are not in g1
...
So let (a, b) ∈ Lx × My and (b, c) ∈ g
...
From the last two, c ∈ My
...

Notice that g1 ∈
/ C
...


Example 8
...
20
...
Show that there is a
maximal Abelian subgroup J of G such that H ⊆ J
...
Notice that H ∈ F
...
Observe that H ∈ C, otherwise we
could extend C
...
It is easy to check that J is an Abelian subgroup of G
...
Thus C ∪ {J0 } is a larger chain
than C, which contradicts the maximality of C
...
PARTIALLY ORDERED SETS, LATTICES AND BOOLEAN ALGEBRA

Example 8
...
21
...

Ans: Recall that a Hamel basis of a vector space is a maximal linearly independent subset of the
vector space
...

Let V be a vector space
...
By Tukey’s lemma, the family F, ordered as usual by the subset relation, has a
maximal element
...

Example 8
...
22
...
Prove that there exists W ⊆ L
such that ≤ well orders W , and for each x ∈ L, there exists y ∈ W such that x ≤ y
...
)
Proof
...
The singleton set {`} is well ordered by ≤
...

Notice that {`} ∈ F
...

Then (F, g) is a nonempty poset
...
Clearly, this chain starts with {`}
...
Then it is clear that W ⊆ L
...
Let b ∈ B
...
Recall that Cb is well ordered
...
Then (I(b) ∪ {b}) ∩ B is a nonempty subset of Cb ; hence it has a minimum, say, w in
(I(b) ∪ {b}) ∩ B
...
Suppose, on the contrary that there exists y ∈ B such
that y < w
...
If y ∈ Cb , then y ∈ I(b), and hence y ∈ (I(b) ∪ {b}) ∩ B,
which implies that w ≤ y
...
In that case, y can only belong to a set in C that comes after
Cb (which is a proper superset of Cb )
...

Thus W is well ordered
...
Then
W0 := W ∪ {p} is well ordered and C ∪ {W0 } is a larger chain than C, contradicting the maximality
of C
...
In other words, for each
x ∈ L, there exists y ∈ W such that x ≤ y
...
4
...

1
...
Show that there is a set C such that C ∩ A = ∅ and
|C| = |B|
...
Let X be the set of all infinite sequences formed using 0, 1 and let Y be the set of all infinite
sequences formed using 0, 1, 2
...
Let α, β be infinite cardinal numbers with α ≤ β
...

4
...

5
...
Let A and S be nonempty subsets of X, where A is linearly independent,
A ⊆ S and span(S) = X
...

6
...
Write FA := {f : f is a function from A to F}
...
Show that Γ is a vector space over F with
respect to point-wise addition of functions and point-wise scalar multiplication
...


Chapter 9

Graphs - I
9
...
Move through each line exactly once
...
’ Which of the following pictures
can be drawn? What if we want the ‘starting dot to be the finishing dot’ ?

Later, we shall see a theorem by Euler addressing this question
...
1
...
A pseudograph G is a pair (V, E) where V is a nonempty set and E is a multiset
of 2-elements sets of points of V
...
The set E is called the edge set and its elements are called edges
...
1
...
G = {1, 2, 3, 4}, {1, 1}, {1, 2}, {2, 2}, {3, 4}, {3, 4}
is a pseudograph
...
1
...
A pseudograph can be represented in picture in the following way
...
Put different points on the paper for vertices and label them
...
If {u, v} appears in E some k times, draw k distinct lines joining the points u and v
...
A loop at u is drawn if {u, u} ∈ E
...
1
...
A picture for the pseudograph in Example 9
...
2 is given in Figure 9
...


1

2

3

4

Figure 9
...
GRAPHS - I

Definition 9
...
5
...
Then the following definitions and notations are in
order
...
we sometimes use V (G) in place of V for the vertex set and E(G) in place of E for the edge set
...
The number |V (G)| is called the order of the graph G, and is denoted by |G|
...
A graph with n vertices and m edges is called an (n, m)
graph
...
An edge {u, v} is sometimes denoted uv
...
The vertices u and v are
called the end vertices of the edge uv
...
We say ‘e is incident on u’ to mean
that ‘u is an end vertex of e’
...
If uv is an edge in G, then we say that the vertices u and v are adjacent in G, and also that u
is a neighbor of v
...

5
...
It is usually denoted by dG (v) or d(v)
...

A vertex of degree one is called a pendant vertex
...
Two edges e1 and e2 are called adjacent if they have a common end vertex
...
A graph is said to be non-trivial if it has at least one edge; else it is called a trivial graph
...
A multigraph is a pseudograph without loops
...


AF

T

9
...
Thus, by a graph, we will
mean a simple graph with a finite vertex set, unless stated otherwise
...
A set of vertices or edges is said to be independent if no two of them are adjacent
...

Discussion 9
...
6
...
However, it is easy to describe and carry out the arguments with a pictorial representation
of a graph
...
There is no loss of generality in doing this
...
1
...
Consider the graph G in Figure 9
...
The vertex 12 is an isolated vertex whereas
the vertex 10 is a pendant vertex
...
The vertices 1 and 6 are not


adjacent
...
The set {1, 2}, {8, 10}, {4, 5} is an
independent edge set
...
2: A graph G
...
1
...
Let G = (V, E) be a graph on n vertices, say V = {1,
...
Then, G is said to
be a

193

9
...
BASIC CONCEPTS
1
...

2
...

3
...


4
...
1
2
3 ··· n −1 n
Pnr, 1 ≤ j ≤ s}
...
Complete bipartite graph, denoted Kr,s if E = {{i, j} : 1 ≤ i ≤

1

2

··· n −1 n
Pn

3

1

2

··· n −1 n
Cn

3

Figure 9
...

The importance of the labels of the vertices depends on the context
...


1

2
K1,2

1

K1

2

2

2

K2
4

3

4

3

1

2

C3

3

1

2

5

K4
3

P1

2
P2

2

3
P3

2

2

2

1
K5
4

5
5

C4

1

3

4

3

1

1

2

3

4
2

5

K2,3

K3

1

1

K2,2

1

1

1

AF

K1,1

3

4

T

2

3

DR

1

4

1

1
3

C5

C6

6

4

3

2

1

1

2

3

4

P4

5

P5

Figure 9
...
1
...
What is the maximum number of edges possible in a simple graph of order n?
Lemma 9
...
10
...


d(v) = 2|E|
...
GRAPHS - I

Proof
...
Hence,

v∈V

2|E| =

X
v∈V

P

Since

X

d(v) =

v:d(v)

d(v) = 2|E|
...

v:d(v)

is even

P

d(v) is even, the above implies that
v:d(v)

d(v)

d(v) must be even as well
...
1
...
In a party of 27 persons, prove that someone must have an even number of friends
assuming that friendship is mutual
...
1
...
The graph in Figure 9
...

example in many places
...
5: Petersen graphs

DR

AF

Proposition 9
...
13
...

Proof
...
First, suppose G has exactly one isolated
vertex
Title: DISCRETE MATHEMATICS COMPLETE NOTES
Description: In-depth analysis of all important topics in Discrete Mathematics. Must have for all