Discrete Mathematical Structures
Discrete Mathematical Structures
Discrete Mathematical Structures
Discrete Mathematical
Structures
Mathematics and Its Applications: Modelling,
Engineering, and Social Sciences
Series Editor: Hemen Dutta
Discrete Mathematical
Structures
A Succinct Foundation
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
c 2020 by Taylor & Francis Group, LLC
This book contains information obtained from authentic and highly regarded sources.
Reasonable efforts have been made to publish reliable data and information, but the
author and publisher cannot assume responsibility for the validity of all materials or the
consequences of their use. The authors and publishers have attempted to trace the copyright
holders of all material reproduced in this publication and apologize to copyright holders if
permission to publish in this form has not been obtained. If any copyright material has not
been acknowledged, please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted,
reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other
means, now known or hereafter invented, including photocopying, microfilming, and
recording, or in any information storage or retrieval system, without written permission
from the publishers.
For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance
Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a
not-for-profit organization that provides licenses and registration for a variety of users. For
organizations that have been granted a photocopy license by the CCC, a separate system
of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered
trademarks, and are used only for identification and explanation without intent to infringe.
Preface ix
Authors xi
v
vi Contents
2 Combinatorics 39
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.2 Mathematical Induction . . . . . . . . . . . . . . . . . . . . . 39
2.2.1 Principle of Mathematical Induction . . . . . . . . . . 39
2.2.2 Procedure to Prove that a Statement P (n) is True for
all Natural Numbers . . . . . . . . . . . . . . . . . . . 40
2.2.3 Solved Problems . . . . . . . . . . . . . . . . . . . . . 40
2.2.4 Problems for Practice . . . . . . . . . . . . . . . . . . 56
2.2.5 Strong Induction . . . . . . . . . . . . . . . . . . . . . 57
2.2.6 Well-Ordering Property . . . . . . . . . . . . . . . . . 57
2.3 Pigeonhole Principle . . . . . . . . . . . . . . . . . . . . . . . 58
2.3.1 Generalized Pigeonhole Principle . . . . . . . . . . . . 58
2.3.2 Solved Problems . . . . . . . . . . . . . . . . . . . . . 58
2.3.3 Another Form of Generalized Pigeonhole Principle . . 60
2.3.4 Solved Problems . . . . . . . . . . . . . . . . . . . . . 61
2.3.5 Problems for Practice . . . . . . . . . . . . . . . . . . 69
2.4 Permutation . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.4.1 Permutations with Repetitions . . . . . . . . . . . . . 71
2.4.2 Solved Problems . . . . . . . . . . . . . . . . . . . . . 72
2.4.3 Problems for Practice . . . . . . . . . . . . . . . . . . 79
2.5 Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.5.1 Solved Problems . . . . . . . . . . . . . . . . . . . . . 81
2.5.2 Problems for Practice . . . . . . . . . . . . . . . . . . 85
2.5.3 Recurrence Relation . . . . . . . . . . . . . . . . . . . 87
2.5.4 Solved Problems . . . . . . . . . . . . . . . . . . . . . 87
2.5.5 Linear Recurrence Relation . . . . . . . . . . . . . . . 88
2.5.6 Homogenous Recurrence Relation . . . . . . . . . . . . 88
2.5.7 Recurrence Relations Obtained from Solutions . . . . 89
Contents vii
3 Graphs 135
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
3.2 Graphs and Graph Models . . . . . . . . . . . . . . . . . . . 135
3.3 Graph Terminology and Special Types of Graphs . . . . . . 138
3.3.1 Solved Problems . . . . . . . . . . . . . . . . . . . . . 140
3.3.2 Graph Colouring . . . . . . . . . . . . . . . . . . . . . 145
3.3.3 Solved Problems . . . . . . . . . . . . . . . . . . . . . 145
3.4 Representing Graphs and Graph Isomorphism . . . . . . . . 149
3.4.1 Solved Problems . . . . . . . . . . . . . . . . . . . . . 151
3.4.2 Problems for Practice . . . . . . . . . . . . . . . . . . 155
3.5 Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
3.5.1 Connected and Disconnected Graphs . . . . . . . . . . 158
3.6 Eulerian and Hamiltonian Paths . . . . . . . . . . . . . . . . 161
3.6.1 Hamiltonian Path and Hamiltonian Circuits . . . . . . 163
3.6.2 Solved Problems . . . . . . . . . . . . . . . . . . . . . 164
3.6.3 Problems for Practice . . . . . . . . . . . . . . . . . . 169
3.6.4 Additional Problems for Practice . . . . . . . . . . . . 169
Bibliography 257
Index 259
Preface
ix
x Preface
staff at CRC Press, Taylor & Francis Group, for their timely cooperation in
publishing this book. We also welcome productive suggestions and comments
to improve the quality of the book for next edition.
xi
1
Logics and Proofs
1.1 Introduction
In this chapter, we discuss propositional logic and various methods of proving
validity of propositions. The concept of logic has many applications in
computer science to develop computer programs, to verify the logic of program
and also in electronics to design circuits.
1.2 Proposition
A proposition (or statement) is a declarative sentence which is true or false,
but not both. Consider, for example,
(i) The year 2000 is a leap year.
(ii) 5 + 3 = 7.
(iii) x = 1 is a solution of x3 = 1.
(iv) Close the door.
In the above, (i)–(iii) are propositions, whereas (iv) is not a proposition.
Moreover, (i) and (iii) are true, while (ii) is false.
Examples:
(i) Apples are red, and milk is white.
(ii) Jack is brilliant or is a hardworking student.
1
2 Discrete Mathematical Structures
Note:
The truth value of a compound proposition is obtained by the truth values
of its subpropositions together with the way in which they are connected to
form the compound propositions.
Example:
P : Apple is red.
¬P : Apple is not red.
1.5.2 Conjunction
The conjunction of two statements P and Q is the statement P ∧ Q which
is read as “P and Q”. The statement P ∧ Q has a truth value T whenever
both P and Q have the truth value T ; otherwise, it has a truth value F . The
conjunction is defined by the truth table below.
Conjunction
P Q P ∧Q
T T T
T F F
F T F
F F F
Logics and Proofs 3
Example:
P : John worked hard.
Q: John passed the examination.
P ∧ Q: John worked hard, and he passed the examination.
1.5.3 Disjunction
The disjunction of two statements P and Q is the statement P ∨ Q and has a
truth value F only when both P and Q have truth value F ; otherwise, it has
a truth value T . The disjunction is defined by the truth table shown below.
Disjunction
P Q P ∨Q
T T T
T F T
F T T
F F F
Example:
P : 2 + 4 = 6 (T ).
Q: 2 > 10 (F ).
P ∨ Q: 2 + 4 = 6 or 2 > 10 is true.
Note:
P → Q has a truth value F if P has the truth value T and Q has the truth
value F . In all the remaining cases, it has the truth value T .
4 Discrete Mathematical Structures
Example:
P : It is hot.
Q: 2 + 3 = 5.
P → Q: If it is hot, then 2 + 3 = 5.
Example:
P : John is rich.
Q: John is happy.
P ↔ Q: John is rich if and only if he is happy.
5. What are the contrapositive, the converse, and the inverse of the
following conditional statement?
“If you work hard, then you will be rewarded”.
Solution.
P : You work hard.
Q: You will be rewarded.
¬P : You will not work hard.
¬Q: You will not be rewarded.
Converse: Q → P : If you will be rewarded, then you work hard.
Contrapositive: ¬Q → ¬P : If you will not be rewarded, then you
will not work hard.
Inverse: ¬P → ¬Q: If you will not work hard, then you will not
be rewarded.
6. Construct a truth table for the compound proposition
(P → Q) → (Q → P ).
Solution.
The truth table is shown below.
6 Discrete Mathematical Structures
1.5.8 Tautology
A statement formula which is true regardless of the truth values of the
statements which replace the variables in it is called a tautology or a
universally valid formula or a logical truth.
Example: P ∨ ¬P is a tautology.
1.5.9 Contradiction
A statement formula which is false regardless of the truth values of the
statements which replace variables in it is called a contradiction.
Example: P ∧ ¬P is a contradiction.
1.5.10 Contingency
A statement formula which is neither tautology nor contradiction is called
contingency.
Example: P → Q is a contingency.
Procedure I:
For every truth value T in the truth table of the given formula, select the
minterm which also has the value T for the same combination of the truth
values of P and Q. The disjunction of these minterms will then be equivalent
to the given formula. From the table below, we observe that
Procedure II:
This is explained in the following example:
P ∨ Q ⇔ ¬P ∧ (Q ∨ ¬Q) ∨ (Q ∧ (P ∨ ¬P )) [since A ∧ T ⇔ A]
⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (Q ∧ P ) ∨ (Q ∧ ¬P ) [Distributive laws]
⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q) [P ∨ P ⇔ P ]
Note:
1. The number of minterms appearing in the normal form is the same
as the number of entries with the truth value T in the truth table of
the given formula. Thus, every formula which is not a contradiction
has an equivalent PDNF.
2. If a formula is a tautology, then all the minterms will appear in its
PDNF.
3. To show that two formulas are equivalent, obtain PDNFs of the two
formulas. If the normal forms are identical, then both the formulas
are equivalent.
4. Minterms of three variables are P ∧ Q ∧ R, P ∧ Q ∧ ¬R, P ∧ ¬Q ∧ R,
¬P ∧Q∧R, P ∧¬Q∧¬R, ¬P ∧Q∧¬R, ¬P ∧¬Q∧¬R, ¬P ∧¬Q∧¬R.
⇔(¬P ∧ Q ∧ ¬R) ∨ F ∨ (F ∧ R) ∨ (P ∧ ¬Q ∧ R)
⇔(¬P ∧ Q ∧ ¬R) ∨ (P ∧ ¬Q ∧ R).
Now, consider
Procedure 1.
We look for those rows of H1 , H2 , . . . , Hm which have a truth value T . If for
every such row C also has a truth value T , then the conclusion C logically
follows from H1 , H2 , . . . , Hm .
Example 1: H1 : P , H2 : P → Q, C : Q.
In the first row of the truth table,
14 Discrete Mathematical Structures
Set of premises
R S
S
Rule CP
I7 : ¬P, P ∨ Q ⇒ Q
I8 : P → Q, Q → R ⇒ P → R
I9 : P, Q ⇒ P ∨ Q
I10 : Q ⇒ P → Q
I11 : P ∨ Q, Q → R ⇒ ¬P → R
I12 : ¬P ⇒ P → Q.
Equivalences Table
E1 : ¬¬P ⇔ P
E2 : P → Q ⇔ ¬P ∨ Q
E3 : P → Q ⇔ ¬Q → ¬P
E4 : (P Q) ⇔ (P → Q) ∧ (Q → P )
E5 : P → (Q → R) ⇔ (P ∧ Q) → R
E6 : ¬(P ∧ Q) ⇔ ¬P ∨ ¬Q.
Note:
1. Rule CP means rule of Conditional Proof.
2. Rule CP is also called the deduction theorem.
3. In general, whenever conclusion is of the form R → S (in terms of
conditional), we should apply Rule CP . In such case, R is taken as
an additional premise, and S can be derived from the given premises
and R.
4. Show that the hypotheses, “It is not sunny this afternoon and it is
colder than yesterday”, “We will go swimming only if it is sunny”,
“If we do not go swimming, then we will take a canoe trip”, and “if
we take a canoe trip, then we will be home by sunset”, lead to the
conclusion, “We will be home by sunset”.
Solution.
Let A: It is sunny
B: It is colder than yesterday
C: We will go swimming
D: We will take a canoe trip
E: We will be home by sunset.
Then the given premises are
(1) ¬A ∧ B (2) A → C (3) ¬C → D (4) D → E.
The conclusion is C.
Solution.
Let us include ¬(p → ¬s) as an additional premise and prove this
problem by the method of contradiction.
Now, ¬(p → ¬s) = ¬(¬p ∨ ¬s) = p ∧ s.
Therefore, the additional premise is p ∧ s.
1.11.1 Quantifiers
Consider the following example:
All apples are red. This can be understood as “for any x, if x is an apple, then
x is red”.
If we denote A(x): x is an apple and R(x): x is red,
then we can write the above statement as
(x)(A(x) → R(x)).
Here (x) is called “Universal Quantifier”. We use universal quantifier for those
statements of the form “All P are Q”.
Now, consider the following example:
Some men are clever. This can be written as “There exists x; if x is a man,
then he is clever”.
If we denote M (x): x is a man and C(x): x is clever,
then we can write the above statement as
Example:
(x)P (x) ∧ Q(x)
In this, all x in P (x) is bound, whereas the x in Q(x) is free. The scope of (x)
is P (x).
24 Discrete Mathematical Structures
(x)(H(x) → W (x)).
¬((x)(H(x) → W (x))
=⇒ ¬((x)(¬H(x) ∨ W (x)))
=⇒ (∃x)(H(x) ∧ ¬W (x)).
¬((∃x)¬A(x)) ⇒ (∀x)A(x).
Solution.
(i) Suppose x = −3 and y = 3, then x2 = y 2 = 9.
But x 6= y.
∴ ∀x ∀y (x2 = y 2 → x = y) is false.
(ii) Suppose x = −3 and y = 3, then xy = −9.
−9 < −3 =⇒ xy < x.
∴ ∀x ∀y(xy > x) is false.
5. Establish this logical equivalence, where A is a proposition not
involving any quantifiers. Show that (∀xp(x)) ∧ A ≡ ∀x(p(x) ∧ A)
and (∃x p(x)) ∧ A ≡ ∃x(p(x) ∧ A).
Solution.
(a) Consider
(∀xp(x)) ∧ A ≡ ∀x(p(x) ∧ A). (1.3)
26 Discrete Mathematical Structures
Limit does not exist means “for all real numbers L, lim f (x) 6= L”.
x→a
The above statement can be expressed as
12. Indicate free and bound variables. Also indicate the scope of the
quantifier in
(i) (x) (P (x) ∧ R(x)) ⇒ (x) (P (x)) ∧ Q(x)).
(ii) ((x)(P (x) Q(x) ∧ ∃(x) R(x))) ∧ S(x).
Solution.
(i) All occurrences of x in P (x) ∧ R(x) are bound occurrences. The
occurrence of x in xP (x) is bound. The occurrence of x in Q(x)
is free. The scope of (x) is P (x) ∧ R(x) and P (x).
(ii) All occurrences of x in P (x) Q(x) ∧ (∃ x) R(x) are bound,
and the occurrence of x in S(x) is free. The scope of (x) is
P (x) Q(x) ∧ (∃x) R(x), and the scope of (∃x) is R(x).
Solution.
{1} (1) (x)(P (x) → Q(x)) Rule P
{2} (2) P (y) → Q(y) Rule U S
{3} (3) (x)(Q(x) → R(x)) Rule P
{3} (4) Q(y) → R(y) Rule U S
{1, 3} (5) P (y) → R(y) Rule T
[∵ P → Q, Q → R ⇒ P → R]
{1, 3} (6) (x)(P (x) → R(x)) Rule U G.
which is false.
Therefore, by the method of contradiction, we have
Hence, ∀xP (x) ∧ ∃xQ(x) and ∀x∃y(P (x) ∧ Q(y)) are logically
equivalent.
4. Show that (x)(P (x) → Q(x)) ⇒ (x)P (x) → (x)Q(x).
Solution.
We use contrapositive method to prove this problem.
5. Show that ∃x(P (x) ∧ Q(x)) ⇒ (∃x)P (x) ∧ (∃x)Q(x). Is the converse
true?
Solution.
{1} (1) (∃x)(P (x) ∧ Q(x)) Rule P
{1} (2) P (y) ∧ Q(y) Rule ES
{1} (3) P (y) Rule T [P ∧ Q ⇒ P ]
{1} (4) Q(y) Rule T [P ∧ Q ⇒ Q]
{1} (5) ∃xP (x) Rule EG
{1} (6) ∃xQ(x) Rule EG
{1} (7) ∃xP (x) ∧ ∃xQ(x) Rule T [P, Q ⇒ P ∧ Q].
Logics and Proofs 31
E → S, S → H, A → ¬H, and E ∧ A.
Solution.
(i) Ottawa is not a small town.
(ii) Every city in Canada is not clean.
7. Construct the truth table for P ∧ (P ∨ Q).
Solution.
The truth table is shown below.
⇔ ∨(P ∧ Q)
⇔ (¬P ∧ (Q ∨ ¬Q)) ∨ (P ∧ Q)
⇔ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q)
¬¬A ⇔ ¬P ∨ Q.
S : (¬P → R) ∧ (Q P)
⇔ (¬P → R) ∧ ((Q → P ) ∧ (P → Q))
⇔ (P ∨ R) ∧ (¬Q ∨ P ) ∧ (¬P ∨ Q)
⇔ ((P ∨ R) ∨ F ) ∧ ((¬Q ∨ P ) ∨ F ) ∧ ((¬P ∨ Q) ∨ F )
⇔ ((P ∨ R) ∨ (Q ∧ ¬Q)) ∧ ((¬Q ∨ P ) ∨ (R ∧ ¬R))
∧ ((¬P ∨ Q) ∨ (R ∧ ¬R))
⇔ (P ∨ Q ∨ R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ R)
∧ (P ∨ ¬Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R) ∧ (¬P ∨ Q ∨ ¬R)
⇔ (P ∨ Q ∨ R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ ¬R)
∧ (¬P ∨ Q ∨ R) ∧ (¬P ∨ Q ∨ ¬R)
14. Find the PCNF of (P ∨ R) ∧ (P ∨ ¬Q). Also find its PDNF, without
using truth table.
Solution.
Let A ⇔ (P ∨ R) ∧ (P ∨ ¬Q)
⇔ ((P ∨ R) ∨ F ) ∧ ((P ∨ ¬Q) ∨ F )
⇔ ((P ∨ R) ∨ (Q ∧ ¬Q)) ∧ ((P ∨ ¬Q) ∨ (R ∧ ¬R))
⇔ (P ∨ Q ∨ R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ R)
∧ (P ∨ ¬Q ∧ ¬R)
⇔ (P ∨ Q ∨ R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ ¬R)
Now,
(Q ∧ R) ∨ (P ∧ R) ⇔ (Q ∨ P ) ∧ R (Distributive law)
⇔ (P ∨ Q) ∧ R (Commutative law). (1.6)
2.1 Introduction
In this chapter, we discuss about the technique of mathematical induction
which is used for proving many standard results over natural numbers. Then,
we discuss about the basis of counting, pigeonhole principle, permutations
and combinations, and recurrence relation. These concepts are useful
in the analysis of certain discrete time systems, analysis of algorithms,
error-correcting code, etc. At the end of the chapter, we discuss about
generating function which is used to solve linear recurrence relations.
m(m + 1)
1 + 2 + 3 + · · · + m + (m + 1) = +m+1
2
m(m + 1) + 2(m + 1)
=
2
(m + 1)(m + 2)
= .
2
∴ By mathematical induction, the given statement is true for all n.
n(n + 1)(2n + 1)
2. Show that 12 + 22 + 32 + · · · + n2 = , n ≥ 1 by
6
mathematical induction.
Solution.
n(n + 1)(2n + 1)
Let P (n) : 12 + 22 + 32 + · · · + n2 = .
6
1(1 + 1)(2 + 1)
(1) P (1) : 12 = = 1 is true.
6
(2) Assume P (m) is true.
m(m + 1)(2m + 1)
That is, 12 + 22 + 32 + · · · + m2 = .
6
(3) Now,
12 + 22 + 32 + · · · + m2 + (m + 1)2
Combinatorics 41
m(m + 1)(2m + 1)
= + (m + 1)2
6
m(m + 1)(2m + 1) + 6(m + 1)2
=
6
(m + 1)[m(2m + 1) + 6(m + 1)]
=
6
(m + 1)(2m2 + m + 6m + 6)
=
6
(m + 1)(2m2 + 7m + 6)
=
6
(m + 1)(2m2 + 4m + 3m + 6)
=
6
(m + 1)[2m(m + 2) + 3(m + 2)]
=
6
(m + 1)(m + 2)(m + 3)
=
6
(m + 1)[(m + 1) + 1][2(m + 1) + 1]
= .
6
∴ By mathematical induction, the given statement is true for
all n ≥ 1.
n2 (n + 1)2
3. Prove that 13 + 23 + 33 + · · · + n3 = , n ∈ N.
4
Solution.
n2 (n + 1)2
Let P (n) : 13 + 23 + 33 + · · · + n3 = .
4
12 (1 + 1)2
(1) P (1) : 12 = is true.
4
(2) Assume P (m) is true.
m2 (m + 1)2
That is, 13 + 23 + 33 + · · · + m3 = .
4
(3) Now,
m2 (m + 1)2
13 + 23 + 33 + · · · + m3 + (m + 1)3 = + (m + 1)3
4
m2 (m + 1)2 + 4(m + 1)3
=
4
(m + 1)2 [m2 + 4(m + 1)]
=
4
(m + 1)2 (m2 + 4m + 4)
=
4
(m + 1)2 (m + 2)2
=
4
(m + 1)[(m + 1) + 1]2
= .
4
42 Discrete Mathematical Structures
(or)
Prove that the sum of the first n odd integers is n2 for all integers n.
Solution.
Let P (n) : 1 + 3 + 5 + · · · + (2n − 1) = n2 .
(1) P (1) : 1 = 12 is true.
(2) Assume P (m) is true.
That is, 1 + 3 + 5 + · · · + (2m − 1) = m2 .
(3) Now,
2 + 5 + 8 + · · · + (3m − 1) + [3(m + 1) − 1]
m(3m + 1)
= + (3m + 3 − 1)
2
m(3m + 1) + 2(3m + 2)
=
2
3m2 + m + 6m + 4
=
2
3m2 + 7m + 4
=
2
3m2 + 3m + 4m + 4
=
2
3m(m + 1) + 4(m + 1)
=
2
(m + 1)(3m + 4)
=
2
(m + 1)[3(m + 1) + 1]
= .
2
∴ By mathematical induction, the given statement is true.
6. Prove that for n ≥ 0, 1 + 2 + 4 + · · · + 2n = 2n+1 − 1.
Solution.
Let P (n) : 1 + 2 + 4 + · · · + 2n = 2n+1 − 1.
(1) P (1) : 1 + 2 = 21+1 − 1 is true.
(2) Assume P (m) is true.
That is, 1 + 2 + 4 + · · · + 2m = 2m+1 − 1.
(3) Now,
Solution.
Let P (n) : 1(1!) + 2(2!) + · · · + n(n!) = (n + 1)! − 1.
(1) P (1) : 1(1!) = (1 + 1)! − 1 is true.
(2) Assume P (m) is true.
That is, 1(1!) + 2(2!) + · · · + m(m!) = (m + 1)! − 1.
(3) Now,
1(1!) + 2(2!) + · · · + m(m!) + (m + 1)[(m + 1)!]
= [(m + 1)! − 1] + (m + 1)[(m + 1)!]
= (m + 1)! + (m + 1)(m + 1)! − 1
= (m + 1)![1 + (m + 1)] − 1
= (m + 1)!(m + 2) − 1
= (m + 2)! − 1.
∴ By mathematical induction, the given statement is true for all
n ≥ 1.
8. Use mathematical induction to show that
1 1 1 1 n
+ + + ··· + = , for all n ≥ 1.
1·2 2·3 3·4 n(n + 1) n+1
Solution.
1 1 1 1 n
Let P (n) : + + + ··· + = .
1·2 2·3 3·4 n(n + 1) n+1
1 1
(1) P (1) : = is true.
1·2 1+1
(2) Assume P (m) is true.
1 1 1 1 m
That is, + + + ··· + = .
1·2 2·3 3·4 m(m + 1) m+1
(3) Now,
1 1 1 1 1
+ + + ··· + +
1·2 2·3 3·4 m(m + 1) (m + 1)(m + 2)
m 1
= +
m + 1 (m + 1)(m + 2)
m(m + 2) + 1
=
(m + 1)(m + 2)
m2 + 2m + 1
=
(m + 1)(m + 2)
(m + 1)2
=
(m + 1)(m + 2)
m+1
= .
(m + 1) + 1
∴ By mathematical induction, the given statement is true for all n.
Combinatorics 45
(m + 1)3 + 2(m + 1)
= m3 + 3m2 + 3m + 1 + 2m + 2
= (m3 + 2m) + 3(m2 + m + 1).
(m + 1)2 − 7(m + 1) + 12
= m2 + 2m + 1 − 7m − 7 + 12
= (m2 − 7m + 12) + (2m − 6).
(3) Now,
m + 1 < 2m + 1
< 2m + 2m since 1 < 2m
< 2 · 2m
< 2m+1 .
(m + 1) + 10 = (m + 10) + 1
≤ 2m + 1
≤ 2m + 2m since 1 < 2m
≤ 2 · 2m
≤ 2m+1 .
2m+1 = 2m · 2
< 2m (m + 1) since 2 < m + 1 for m ≥ 4
< m!(m + 1) by assumption
< (m + 1)!
(m − 1)m m2 − m + 2m
+m=
2 2
2
m +m
=
2
m(m + 1)
=
2
[(m + 1) − 1](m + 1)
= .
2
∴ By the principle of mathematical induction, the result follows.
17. Use mathematical induction to prove that 3n + 7n − 2 is divisible
by 8, for n ≥ 1.
Solution.
Let P (n) : 3n + 7n − 2 is divisible by 8.
(1) P (1) : 31 + 71 − 2 = 8 is divisible by 8, which is true.
(2) Assume P (m) is true.
That is, 3m + 7m − 2 is divisible by 8.
(3) Now,
3m+1 + 7m+1 − 2 = 3 · 3m + 7 · 7m − 2
= 3 · 3m + (3 + 4) · 7m − 2
= 3 · 3m + 3 · 7m + 4 · 7m − 6 + 4
= 3(3m + 7m − 2) + 4(7m + 1).
⇒ am − bm = k(a − b)
n! ≥ 2n+1 ; n = 5, 6, . . .
1 1 1 n
21. Show that + + ··· + = .
1·2 2·3 n(n + 1) n+1
Solution.
1 1 1 n
Let P (n) : + + ··· + = .
1·2 2·3 n(n + 1) n+1
1 1
(1) P (1) : = is true.
1·2 1+1
(2) Assume P (m) is true.
1 1 1 m
That is, + + ··· + = .
1·2 2·3 m(m + 1) m+1
(3) Now,
1 1 1 1
+ + ··· + +
1·2 2·3 m(m + 1) (m + 1)(m + 2)
m 1
= +
m + 1 (m + 1)(m + 2)
m(m + 2) + 1
=
(m + 1)(m + 2)
m2 + 2m + 1
=
(m + 1)(m + 2)
(m + 1)2
=
(m + 1)(m + 2)
m+1
=
m+2
m+1
= .
(m + 1) + 1
∴ By the principle of mathematical induction, the result follows.
Combinatorics 51
∴ By mathematical induction,
1 · 1! + 2 · 2! + 3 · 3! + · · · + n · n! = (n + 1)! − 1, n ≥ 1.
Pn 3n+1 − 1
23. Using mathematical induction, prove that k=0 3k = .
2
Solution.
3n+1 − 1
Let P (n) : 30 + 31 + · · · + 3n = .
2
31 − 1 2
(1) P (0) : 30 = = is true.
2 2
(2) Assume P (m) is true.
3m+1 − 1
That is, 30 + 31 + · · · + 3m = .
2
(3) Now,
3m+1 − 1
30 + 31 + · · · + 3m + 3m+1 = + 3m+1
2
3m+1 − 1 + 2 · 3m+1
=
2
3 · 3m+1 − 1
=
2
3m+2 − 1
=
2
3(m+1)+1
= .
2
Pn 3n+1 − 1
∴ By mathematical induction, k=0 3k = is true.
2
52 Discrete Mathematical Structures
Solution.
1 1 1 1 √
Let P (n) : √ + √ + √ + · · · + √ > n for n ≥ 2.
1 2 3 n
1 1 √
(1) P (2) : √ + √ = 1.707 > 2 = 1.414 is true.
1 2
(2) Assume P (m) is true.
1 1 1 1 √
That is, √ + √ + √ + · · · + √ > m for m ≥ 2.
1 2 3 m
(3) Now,
1 1 1 1 1
√ + √ + √ + ··· + √ + √
1 2 3 m m+1
√ 1
> m+ √
m+1
√ √
m m+1+1
> √
m+1
p
m(m + 1) + 1
> √
m+1
√
m·m+1
> √ (∵ m + 1 > m)
m+1
√
m2 + 1
> √
m+1
m+1
>√
m+1
√
> m + 1.
(3) Now,
Solution.
1 1 1 n
Let P (n) : H2n = 1 + + + · · · + ≥1+ .
2 3 2n 2
0
(1) P (0) : H20 = H1 = 1 ≥ 1 + .
2
That is, 1 ≥ 1 is true.
(2) Assume P (m) is true.
1 1 1 m
That is, P (m) : H2m = 1 + + + ··· + m ≥ 1 + .
2 3 2 2
(3) Now,
1 1 1 1 1 1
H2m+1 = 1 + + + ··· + m + m + + · · · + m+1
2 3 2 2 + 1 2m + 2 2
1 1 1
= H2m + + m + · · · + m+1
2m +1 2 +2 2
m 1 1 1
≥ 1+ + m + m + · · · + m+1
2 2 +1 2 +2 2
m 1
≥ 1+ + 2m · m+1 since there are 2m terms
2 2
1
each not less than m+1
2
m 1
≥ 1+ +
2 2
m+1
≥1+ .
2
n
∴ By the principle of mathematical induction, H2n ≥ 1 + .
2
28. Using mathematical induction, prove that
n(2n − 1)(2n + 1)
12 + 32 + 52 + · · · + (2n − 1)2 = .
3
Solution.
n(2n − 1)(2n + 1)
Let P (n) : 12 + 32 + 52 + · · · + (2n − 1)2 = .
3
1(2 − 1)(2 + 1)
(1) P (1) : 12 = = 1 is true.
3
(2) Assume P (m) is true.
m(2m − 1)(2m + 1)
That is, P (n) : 12 + 32 + 52 + · · · + (2m − 1)2 = .
3
Combinatorics 55
(3) Now,
(m + 1)3 − (m + 1) = m3 + 3m2 + 3m + 1 − m − 1
= m3 + 3m2 + 2m
= m3 − m + 3m2 + 2m + m
= (m3 − m) + 3(m2 + m).
56 Discrete Mathematical Structures
1· 2 · 3 + 2 · 3 · 4 + 3 · 4 · 5 + · · · + n(n + 1)(n + 2)
n(n + 1)(n + 2)(n + 3)
= , n ≥ 1.
4
Combinatorics 57
Solved Example:
Show that if n is an integer greater than 1, then n can be written as the
product of primes.
Solution.
Let P (n) : n be written as the product of primes.
Basic step: P (2) is true since 2 = 1 × 2, product of primes.
Inductive step:
Assume that P (k) is true for all positive integers k with k ≤ m. To
complete the inductive step, it must be shown that P (m + 1) is true under
this assumption.
Two cases arise, namely
(i) when (m + 1) is prime
(ii) when (m + 1) is composite.
Case (i) : If (m + 1) is prime, it is obvious that P (m + 1) is true.
Case (ii) : If (m + 1) is composite, then it can be written as a product of
two positive integers a and b with 2 ≤ a < b ≤ m + 1. By the
induction hypothesis, both a and b can be written as the product
of primes. Thus, if (m + 1) is composite, it can be written as the
product of primes, namely those primes in the factorisation of a
and those in the factorisation of b.
Solved Example:
What is wrong with this “proof” by strong induction?
Theorem: For every non-negative integer n, 5n = 0.
Proof.
Basis step: 5 · 0 = 0.
Induction step: Suppose that 5j = 0 for all non-negative integers j with
0 ≤ j ≤ m. Write m + 1 = i + j where i and j are natural numbers less than
m + 1. By the induction hypothesis,
5(m + 1) = 5(i + 1) = 5i + 5j = 0 + 0 = 0.
Solution.
Here, n = 12 months are the pigeonholes and k + 1 = 3 or k = 2.
Hence, among any kn + 1 = 25 students (pigeons), three of them
were born in the same month.
2. Suppose a laundry bag contains many red, white, and blue socks.
Find the minimum number of socks that one needs to choose in
order to get two pairs (four socks) of the same colour.
Solution.
There are n = 3 colours (pigeonholes) and k + 1 = 4 or k = 3. Thus,
among any kn + 1 = 10 socks (pigeons), four of them have the same
colour.
3. Assume there are n distinct pairs of shoes in a closet. Show that if
you choose n + 1 single shoes at random from the closet, you are
certain to have a pair.
Solution.
The n distinct pairs constitute n pigeonholes. The n+1 single shoes
correspond to n + 1 pigeons. Therefore, there must be at least one
pigeonhole with two shoes, and thus you will certainly have drawn
at least one pair of shoes.
4. Assume there are three men and five women at a party. Show that
if these people are lined up in a row, at least two women will be
next to each other.
Solution.
Consider the case where the men are placed so that no two men are
next to each other and not at either end of the line. In this case, the
three men generate four potential locations (pigeonholes) to place
women (at either end of the line and two locations between men
within the line). Since there are five women (pigeons), at least one
slot will contain two women who must, therefore, be next to each
other. If the men are allowed to be placed next to each other or
at the end of the line, there are even fewer pigeonholes and, once
again, at least two women will have to be placed next to each other.
5. Find the minimum number of students needed to guarantee that five
of them belong to the same class (Freshman, Sophomore, Junior,
Senior).
Solution.
Here, n = 4 classes are the pigeonholes and k+1 = 5 or k = 4. Thus,
among any kn + 1 = 17 students (pigeons), five of them belong to
the same class.
6. A student must take five classes from three areas of study. Numerous
classes are offered in each discipline, but the student cannot take
60 Discrete Mathematical Structures
more than two classes in any given area. Using pigeonhole principle,
show that the student will take at least two classes in one area.
Solution.
The three areas are the pigeonholes, and the student must take five
classes (pigeons). Hence, the student must take at least two classes
in one area.
7. Let L be a list (not necessarily in alphabetical order) of the 26
letters in the English alphabet (which consists of 5 vowels, A, E, I,
O, U, and 21 consonants).
(i) Show that L has a sublist consisting of four or more consecutive
consonants.
(ii) Assuming L begins with a vowel, say A, show that L has a
sublist consisting of five or more consecutive consonants.
Solution.
(i) The five letters partition L into n = 6 sublists (pigeonholes) of
consecutive consonants. Here, k + 1 = 4 and so k = 3. Hence,
nk + 1 = 6(3) + 1 = 19 < 21. Hence, some sublist has at least
four consecutive consonants.
(ii) Since L begins with a vowel, the remaining vowels partition
L into n = 5 sublists. Here, k + 1 = 5 and so k = 4. Hence,
kn + 1 = 21. Thus, some sublist has at least five consecutive
consonants.
8. Find the minimum number n of integers to be selected from
S = {1, 2, . . . , 9} so that
(i) the sum of two of the n integers is even
(ii) the difference of two of the n integers is 5.
Solution.
(i) The sum of two even integers or of two odd integers is
even. Consider the subsets {1, 3, 5, 7, 9} and {2, 4, 6, 8} of S as
pigeonholes. Hence, n = 3.
(ii) Consider the five subsets {1, 6}, {2, 7}, {3, 8}, {4, 9}, {5} of S
as pigeonholes. Then, n = 6 will guarantee that two integers
will belong to one of the subsets and their difference will be 5.
(i) If any two of these three people (B, C, D) are friends, then
these two together with A form three mutual friends.
(ii) If no two of these three people are friends, then these three
people (B, C, D) are mutual enemies. In either case, we get the
required conclusion.
If the group of enemies of A contains three people, by the above
similar argument, we get the required conclusion.
5. If we select ten points in the interior of an equilateral triangle of
side 1, show that there must be at least two points whose distance
1
apart is less than .
3
Solution.
Let ABC be the given equilateral triangle. Let D and E be the
points of trisection of the side AB, F and G be the points of
trisection of the side BC, and H and I be the points of trisection
of AC, so that the triangle ABC is divided into nine equilateral
1
triangles each of side .
3
A
1
D H
3
2 4
E I
6 8
5 7 9
B F G C
Equilateral triangle of side 1 unit
Solution.
Number of pigeonholes = Number of subjects = n = 4
Let k be the number of students (pigeons) in each subject.
Now, k + 1 = 5 ⇒ k = 4.
Therefore, the total number of students = kn + 1 = 4(4) + 1 = 17.
7. Show that if any 11 numbers from 1 to 20 are chosen, then 2 of
them will add up to 21.
Solution.
Construct the following sets with two numbers that add up to 21.
1
D F
3
2 4
B E C
Equilateral triangle of side 1 unit
Combinatorics 65
The numbers from 1 to 6 can be splitted into 3 sets above who sum
add up to 7. Hence if any four numbers from 1 to 6 are chosen,
then two of them will belong to any one of the above 3 sets whose
sum is 7.
14. Show that among any group of five (not necessarily consecutive)
integers, there are two with the same remainder when divided by 4.
Solution.
Take any group of five integers. When these are divided by 4,
each has some remainder. Since there are five integers and four
possible remainders when an integer is divided by 4, the pigeonhole
principle implies that given five integers, at least two have the same
remainder.
15. A bag contains 12 pairs of socks (each pair is in different colour). If
a person draws the socks one by one at random, determine at most
how many draws are required to get at least one pair of matched
socks.
Solution.
Let n denote the number of draws. For n ≤ 12, it is possible that
the socks drawn are of different colours, since there are 12 colours.
For n = 13, all socks cannot have different colours, and at least two
must have the same colour. Here 13 is the number of pigeons and
66 Discrete Mathematical Structures
Solution.
Consider the following sets:
These are the only sets containing two numbers from 1 to 8, whose
sum is 9.
Since every number from 1 to 8 belongs to one of the above sets,
each of the five numbers chosen must belong to one of the sets.
Since there are only four sets, two of the five chosen numbers have
to belong to the same set (by the pigeonhole principle).
These two numbers have their sum equal to 9.
10. Suppose there are 26 students and seven cars to transport them.
Then, show that at least one car must have four or more passengers.
11. Show that in any set of eleven integers, there are two whose
difference is divisible by 15.
12. Show that in any room of people who have been doing handshaking,
there will always be at least two people who have shaken hands the
same number of times.
13. Show that if nine colours are used to paint 100 houses, at least 12
houses will be of the same colour.
14. Show that if any five integers from 1 to 8 are chosen, then at least
two of them will have a sum 9.
15. Prove that if any 30 people are selected, then we may choose a
subset of five so that all five were born on the same day of the
week.
16. Show that in any set of 11 integers, there are two whose difference
is divisible by 15.
17. A drawer contains ten black and ten white socks. What is the last
number of socks one must pull out to be sure to get a matched pair?
18. In a group of 13 children, show that there must be at least two
children who were born in the same month.
19. Prove that every set of 37 positive integers contains at least two
integers that leave the same remainder upon division by 36.
20. Let A be some fixed ten element set of {1, 2, 3, . . . , 50}. Show that
A possesses two different five element subsets, the sum of whose
elements are equal.
2.4 Permutation
Any arrangement of a set of n objects in a given order is called a permutation
of the objects (taken all at a time). An arrangement of any r ≤ n of these
objects in a given order is called an r-permutation or a permutation of the n
objects taken r at a time.
For example, consider the set of letters: a, b, c, and d. Then,
(i) bdca, dcba, and acdb are permutations of the four letters (taken all
at a time).
(ii) bad adb, cbd, and bca are permutations of the four letters taken
three at a time.
Combinatorics 71
(iii) ad, cb, da, and bd are permutations of the four letters taken two at
a time.
The number of permutations of n objects taken r at a time is denoted by
nPr or P (n, r) or Pn,r or Prn or (n)r .
We shall use nPr or P (n, r).
Example:
Find the number of permutations of six objects, say, A, B, C, D, E, and F
taken three at a time. In other words, find the number of three-letter words
using only the given six letters without repetition.
Solution.
Let the general three-letter words be represented by the following three boxes:
The first letter can be chosen in six different ways. Following this, the second
letter can be chosen in five different ways, and, following this, the last letter
can be chosen in four different ways. Write each number in its appropriate
box as follows:
6 5 4
n!
nPr =
(n − r)!
Remark:
(i) When r = n, then nPn = n!
(ii) There are n! permutations of n objects (taken all at a time). For
example, there are 3! = 1 × 2 × 3 = 6 permutations of the three
letters a, b, and c. They are abc, acb, bac, bca, cab, and cba.
A −→ B −→ C −→ B −→ A.
The man can travel four ways from A to B and three ways from
B to C, but he can only travel two ways from C to B and three
Combinatorics 73
∴ n2 − n = 72 ⇒ n2 − n − 72 = 0
⇒ (n − 9)(n + 8) = 0
⇒ n = 9, −8
⇒ n = 9 since n is positive.
Combinatorics 75
9. In how many ways can six persons occupy three vacant seats?
Solution.
Total number of ways = P (6, 3) = 6 × 5 × 4 = 120 ways.
10. How many permutations of the letters A, B, C, D, E, F, G, H
contain the string ABC?
Solution.
Since the letters A, B, and C must occur as block, we can find the
answer by finding number of permutations of six objects, namely
the block ABC and individual letters D, E, F, G, and H.
Therefore, there are 6! = 720 permutations of the letters A, B,
C, D, E, F, G, H in which ABC occurs.
11. If P (12, r) = 1320, find r.
Solution.
P (12, r) = 12 × 11 × 10 . . . r factors
⇒ 1320 = 12 × 11 × 10 . . . r factors
⇒ r = 3.
Solution.
(i) We can keep aside the particular thing which will always occur;
the number of permutations of nine things taken three at a time
is P (9, 3). Now, this particular thing can take up any one of the
4 places, and 50 can be arranged in four ways.
Therefore, the total number of permutations
= P (9, 3) × 4 = 9 × 8 × 7 × 4 = 2016.
(ii) If we are keeping the particular thing aside as never to occur,
the number of permutations of nine things (10 − 1 = 9) taken
four at a time is P (9, 4) = 9 × 8 × 7 × 6 = 3026.
13. In how many ways can six boys and four girls be arranged in a
straight line so that no two girls are ever together.
Solution.
The arrangement may be done in two operations.
(i) First, we fix the positions of six boys. Their positions are
indicated by B1 , B2 , . . . , B6 . That is,
X B1 X B2 X B3 X B4 X B5 X B6 .
(iv) How many seating arrangements are there with no two girls
sitting together?
Solution.
(i) There are 6 + 5 = 11 persons, and they can sit in 11P11 ways.
That is, 11P11 = 11! ways.
(ii) The boys among themselves can sit in 6! ways, and girls among
themselves can sit in 5! ways.
They can be considered as two units and can be permuted in
2! ways.
Thus, the required seating arrangements can be done in
= 2! × 6! × 5! ways = 2 × 720 × 120 ways = 172800 ways.
(iii) The boys can sit in 6! ways and girls in 5! ways. Since girls have
to sit together, they are considered as one unit. Among the six
boys, either 0 or 1 or 2 or 3 or 4 or 5 or 6 have to sit to the left
of the girls’ units. Of these seven ways, 0 and 6 cases have to
be omitted as the boys do not sit together.
Thus, the required number of arrangements
= 5 × 6! × 5! ways = 5 × 720 × 120 ways = 432000 ways.
(iv) The boys can sit in 6! ways. There are seven places where the
girls can be placed. Thus, the total arrangements are
= 7P5 × 6! ways
7!
= × 720
2!
= 2520 × 720
= 1814400 ways.
16. Find the number of ways in which five boys and five girls can be
seated in a row if the boys and girls are to have alternate seats.
Solution.
Case (i): Boys can be arranged among themselves in 5! ways.
B B B B B
There are six places for girls. Hence, there are 6P5 × 5!
arrangements.
Case (ii): Girls can be arranged in 5! ways.
G G G G G
There are six places for boys. Hence, there are 6P5 × 5! ways.
Hence, taking two cases into account, there are 2 × 6P5 × 5!
arrangements in total.
∴ There are 2 × 120 × 6 = 240 ways.
17. How many permutations of {a, b, c, d, e, f, g}
(i) end with a
(ii) begin with c
78 Discrete Mathematical Structures
Solution.
(i) A bit string of length 10 can be considered to have ten positions
and should be filled with four 1’s and six 0’s.
10!
∴ Required number of bit strings = = 210.
4! × 6!
(ii) Required number of bit strings
10!
(iv) Required number of bit strings = = 252.
5! × 5!
Combinatorics 79
2.5 Combination
Suppose we have a collection of n objects. A combination of these n objects
taken r at a time is any selection of r of the objects where order does not
Combinatorics 81
Solution.
The boy can dispose of each question in two ways. He may either
solve it or leave it. Thus, the number of ways of disposing all the
questions = 25 .
84 Discrete Mathematical Structures
But this includes the case in which he has left all the questions
unsolved.
∴ The total number of ways of solving the paper = 25 − 1 = 31.
13. Find the value of r if 20Cr = 20Cr+2 .
Solution.
20Cr = 20Cr+2
⇒ 20Cr = 20C20−(r+2)
⇒ r = 20 − (r + 2) (∵ r = r + 2 ⇒ 2 = 0 is not possible)
⇒ 2r = 18
⇒ r = 9.
15. From a committee consisting of six men and seven women, in how
many ways can we select a committee of
(i) three men and four women
(ii) four members that has at least one woman
(iii) four persons that has at most one man
(iv) four persons of both genders
(v) four persons in which Mr and Mrs Joseph are not included.
Solution.
(i) Three men can be selected from six men in 6C3 ways.
Four women can be selected from seven women in 7C4 ways.
∴ By product rule, the committee of three men and four
women can be selected in 6C3 × 7C4 = 700 ways.
(ii) For the committee of at least one woman, we have the following
possibilities:
Combinatorics 85
(iii) How many if he must answer the first or second question not
both?
(iv) How many if he must answer exactly three out of the first five
questions?
(v) How many if he must answer at least three of the first five
questions?
4. How many diagonals are there in a polygon of ten sides?
5. A committee is to consist of two men and three women. How many
different committees are possible if five men and seven women are
eligible.
6. How many different groups can be selected for playing tennis out
of four ladies and three gentlemen, there being one lady and one
gentleman on each side?
7. From a committee of five women and seven men, in how many ways
can a subcommittee of four be chosen so as to contain one particular
man?
8. In how many ways can a selection be made out of five oranges, eight
apples, and seven plantains?
9. In how many ways can 20 students be divided into four equal
groups?
10. How many bit strings of length 10 have
(i) exactly three 0’s
(ii) at least three 1’s
(iii) more 0’s than 1’s
(iv) an odd number of 0’s?
11. How many bit strings of length 12 contain
(i) exactly three 1’s
(ii) at least three 1’s
(iii) an equal number of 1’s and 0’s?
12. In how many ways can a party of 16 people can be conveyed in two
vehicles, one of which will not hold more than eight and the other
not more than ten?
13. In how many ways can a committee of 8 be chosen from 12 socialists
and 9 conservatives to give a socialist majority with at least 2
conservatives included?
14. A committee of 12 is to be selected from 10 men and 10 women. In
how many ways can the selection be carried out if
(i) there are no restrictions
(ii) there must be equal number of men and women
Combinatorics 87
fn = 2fn−1 − fn−2
= 2[3(n − 1)] − 3(n − 2) since fn = 3n
= 6n − 6 − 3n + 6 = 3n.
= −6(−4)n−1 − 9 + 8(−4)n−2 + 12
= −6(−4)n−1 + 8(−4)n−2 + 3
= −6(−4)n−1 − 2(−4)n−1 + 3
= 2(−4)n + 3.
Example 2:
Consider the recurrence relation f (k) − 5f (k − 1) + 6f (k − 2) = 4k + 10 defined
for k ≥ 2, together with the initial conditions f (0) = 73 and f (1) = 5. Clearly,
it is a second-order linear recurrence relation.
Example 2:
Which of the following recurrence relations are homogenous and which of them
are non-homogenous?
(i) fn = fn−2 .
(ii) an = an−1 + an−3 .
(iii) bn = bn−1 + 2.
(iv) s(n) = s(n − 2) + s(n − 4).
Solution.
The relations fn = fn−2 , an = an−1 + an−3 , s(n) = s(n − 2) + s(n − 4) are all
homogenous, and the relation bn = bn−1 + is non-homogenous.
Combinatorics 89
yn 1 n
yn+1 4 4(n + 1) = 0
yn+2 16 16(n + 2)
When both sides of this equation are divided by rn−k and the right-hand side
is subtracted from the left, we obtain
Step 4:
Use the boundary conditions to determine the constants A1 , A2 , . . . , Ak .
92 Discrete Mathematical Structures
f1 = 1 ⇒ A1 c1 + A2 c2 = 1
√ ! √ !
1+ 5 1− 5
⇒ A1 + A2 = 1. (2.6)
2 2
r2 − 7r + 10 = 0
⇒ r = 2, 5
∴ c1 = 2, c2 = 5.
The general solution is
Given:
f (0) = 4 ⇒ A1 + A2 = 4. (2.7)
f (1) = 17 ⇒ 2A1 + 5A2 = 17. (2.8)
Solving (2.7) and (2.8), we get
A1 = 3 and A2 = 3.
∴ f (n) = 2n + 3(5)n .
r3 − 7r + 6 = 0.
1 1 0 −7 6
0 1 1 6
2 1 1 −6 0
0 2 6
1 3 0
c1 = 1, c2 = 2, c3 = −3.
Given:
T (0) = 8 ⇒ A1 + A2 + A3 = 8. (2.9)
T (1) = 6 ⇒ A1 + 2A2 − 3A3 = 6. (2.10)
T (2) = 22 ⇒ A1 + 4A2 + 9A3 = 22. (2.11)
A1 = 5, A2 = 2, A3 = 1.
r2 − 84 + 16 = 0
⇒ r = 4, 4 (repeated).
fk = (A1 + A2 k)4k .
Given:
r3 + 3r2 + 3r + 1 = 0
⇒ (r + 1)3 = 0.
Cn = A1 + A2 n + A3 n2 (−1)n .
Given:
C0 = 1 ⇒ A1 = 1. (2.14)
C1 = −2 ⇒ −(A1 + A2 + A3 ) = −2. (2.15)
C2 = 1 ⇒ A1 + 2A2 + 4A3 = 1. (2.16)
Solving (2.14), (2.15), and (2.16), we get
A1 = 1, A2 = 2, A3 = −1.
∴ The solution is
Cn = 1 + 2n − n2 (−1)n .
Rule 1:
When f (n) is of the form of a polynomial of degree m in n,
k0 + k1 n + k2 n2 + k3 n3 + · · · + km−1 nm−1 + km nm ,
96 Discrete Mathematical Structures
Q0 + Q1 n + Q2 n2 + Q3 n3 + · · · + Qm−1 nm−1 + Qm nm .
Rule 2:
When f (n) is of the form
k0 + k1 n + k2 n2 + · · · + km−1 nm−1 + km nm an ,
Q0 + Q1 n + Q2 n2 + · · · + Qm−1 nm−1 + Qm nm an
Note:
The general solution of the recurrence relation is the sum of the homogenous
solution and particular solution. If no initial conditions are given, then you
have finished. If m initial conditions are given, obtain m linear equations in
m unknowns and solve the system, if possible, to get a complete solution.
r2 − r − 6 = 0.
A1 (−2)k + A2 (3)k .
Q − Q − 6Q = −30
⇒ Q = 5.
fn − 5fn−1 + 6fn−2 = 0.
Q − 5Q + 6Q = 1
1
⇒ Q= .
2
∴ The complete solution is
1
fn = A1 (2)n + A2 (3)n + .
2
Solution.
By rule 2, the particular solution is of the form
Q0 + Q1 n + Q2 n2 . (2.21)
Q0 + Q1 n + Q2 n2 + 5 Q0 + Q1 (n − 1) + Q2 (n − 1)2
+ 6 Q0 + Q1 (n − 2) + Q2 (n − 2)2 = 3n2 − 2n + 1
which simplifies to
which gives
1 13 71
Q2 = ; Q1 = ; Q0 = .
4 24 288
∴ The particular solution is
71 13 1
+ n + n2 .
288 24 4
ar + 5ar−1 = 0.
Q + 5Q = 9
3
⇒ Q= .
2
∴ The general solution is
3
Ar = A(−5)r + .
2
Combinatorics 99
Given:
3
a0 = 6 ⇒ A + =6
2
9
⇒A= .
2
∴ The complete solution is
9 3
ar = (−5)r + .
2 2
r2 − 7r + 10 = 10
⇒ r = 2, 5.
Given:
f (0) = 1 ⇒ A1 + A2 + 8 = 1. (2.23)
f (1) = 2 ⇒ 2A1 + 5A2 + 10 = 2. (2.24)
Solving (2.23) and (2.24), we get A1 = −9, A2 = 2.
∴ The complete solution is
which simplifies to
1 1 1
Q0 2n + Q1 n2n + Q0 2n + Q1 n2n − Q1 n2n = 3n2n
2 2 2
3 1 3
⇒ Q0 − Q1 2 + Q1 n2 = 3n2n
n n
2 2 2
3 1
⇒ Q0 − Q1 = 0
2 2
3
and Q1 = 3.
2
2
Solving, we get Q0 = 3 and Q1 = 2.
2
∴ The particular solution is + 2n 2n .
3
8. Find the particular solution of the recurrence relation
f (n) − 2f (n − 1) = 3 · 2n .
Combinatorics 101
Solution.
The characteristic equation is r − 2 = 0.
The characteristic equation is r = 2.
Since r = 2 is the characteristic root of multiplicity 1, by Rule 3,
the general form of the particular solution is Qn · 2n .
Substituting in the given relation, we obtain
Qn2n − 2 Q · (n − 1)2n−1 = 3 · 2n
f (n) − 3f (n − 1) − 4f (n − 2) = 4n . (2.25)
Solution.
The associated homogenous relation is
f (n) − 3f (n − 1) − 4f (n − 2) = 0.
Remark:
What if the characteristic equation gives rise to complex roots? Here,
our methods are still valid, but the method for expressing the solutions
of the recurrence relations is different. Since an understanding of these
representations require some background in complex numbers, we suggest
that an interested reader refer to a more advanced treatment of recurrence
relations.
The symbol z is just the name given to a variable and has no special
significance. For any sequence {an }, we write G(z) to denote the generating
function of {an }. Clearly, given a sequence, we can easily obtain its generating
function and its converse. For example, the generating function of an = αn ,
n ≥ 0 is
α0 + αz + α2 z 2 + α3 z 3 + . . . (2.26)
1
We note that the infinite series (2.26) can be written in closed form as
1 − αz
which is a rather compact way to represent the sequence {an } or (a, α, α2 , . . . ).
and
∞
X
fn−2 z n = f0 z 2 + f1 z 3 + f2 z 4 + . . .
n=2
= z 2 (f0 + f1 z + f2 z 2 + . . . )
= z 2 [G(z)] [using (2.28)] .
Since y0 = 0, y1 = 1, we get
G(z) − f0 = 3zG(z)
⇒ G(z) − 2 = 3zG(Z)
∞
2 X
⇒ G(z) = = 2(1 − 3z)−1 = 2 (3z)n
1 − 3z n=0
∞
X
= 2 · 3n z n . (2.32)
n=0
fn = 2 · 3n
Given:
yn = 3yn−1 + 2. (2.34)
Multiplying both sides of (2.34) by z n and summing for n ≥ 1, we
get
X∞ ∞
X ∞
X
yn z n = 3 yn−1 z n + 2 zn. (2.35)
n=1 n=1 n=1
yn = 2 · 3n − 1.
Solution.
Let the generating function be
∞
X
G(z) = yn z n . (2.37)
n=0
∴ (2.38) becomes
1 4
2
[G(z) − y0 − y1 z] − [G(z) − y0 ] + 3G(z) = 0.
z z
Since y0 = 2, y1 = 4,
1 4
[G(z) − 2 − 4z] − [G(z) − 2] + 3G(z) = 0
z2 z
=⇒ [G(z) − 4z − 2] − 4z[G(z) − 2] + 3z 2 G(z) = 0
=⇒ G(z)[1 − 4z + 3z 2 ] = 2 − 4z
2 − 4z 2 − 4z
=⇒ G(z) = = .
1 − 4z + 3z 2 (1 − z)(1 − 3z)
110 Discrete Mathematical Structures
Put z = 1 =⇒ −2 = −2A =⇒ A = 1.
Put z = 13 =⇒ 23 = 32 B =⇒ B = 1.
1 1
∴ G(z) = + = (1 − z)−1 + (1 − 3z)−1
1−z 1 − 3z
X∞ X∞
= zn + (3z)n
n=0 n=0
X∞
= (1 + 3n )z n . (2.39)
n=0
yn = 1 + 3n .
∴ (2.44) becomes
5 2 1
∴ G(z) = + +
1−z 1 − 2z 1 + 3z
= 5(1 − z)−1 + 2(1 − 2z)−1 + (1 + 3z)−1
X∞ X∞ X∞
=5 zk + 2 (2z)k + (−3)k z k
k=0 k=0 k=0
Combinatorics 113
∞
X
5 + 2k+1 + (−3)k z k .
= (2.45)
k=0
Using a0 = 1,
z 1 − 9z
G(z)[1 − 8z] = 1 + =
1 − 10z 1 − 10z
1 − 9z
=⇒ G(z) = .
(1 − 8z)(1 − 10z)
Using partial fraction,
1 − 9z A B
= +
(1 − 8z)(1 − 10z) 1 − 8z 1 − 10z
=⇒ 1 − 9z = A(1 − 10z) + B(1 − 8z).
1 1 5
z = =⇒ − = A 1 −
8 8 4
1 1
=⇒ − = − A
8 4
1
=⇒ A = .
2
1 1 1
z= =⇒ = B
10 10 5
1
=⇒ B = .
2
1 1
∴ G(z) = (1 − 8z)−1 + (1 − 10z)−1
2 2
∞ ∞
1 X
n 1X
= (8z) + (10z)n
2 n=0 2 n=0
∞
X 1 n
= (8 + 10n ) z n . (2.48)
n=0
2
∴ (2.50) becomes
Put z = −1 =⇒ 8 = 4B =⇒ B = 2.
116 Discrete Mathematical Structures
1 4 4
Put z = =⇒ = A =⇒ A = 1.
3 3 3
1 2
∴ G(z) = +
1 − 3z 1+z
= (1 − 3z)−1 + 2(1 + z)−1
X∞ ∞
X
= (3z)n + 2 (−z)n
n=0 n=0
X∞
= [3n + 2(−1)n ] z n . (2.51)
n=0
S(n) = 3n + 2(−1)n .
n(A ∪ B ∪ C)
= n(A) + n(B) + n(C) − n(A ∩ B)
− n(B ∩ C) − n(A ∩ C) + n(A ∩ B ∩ C).
That is, we “include” n(A), n(B), n(C), we “exclude” n(A ∩ B), n(B ∩ C),
n(A ∩ C), and we “include” n(A ∩ B ∩ C).
Example:
Find the number of mathematics students at a college taking at least one of
the languages French, German, and Russian given the following data:
We want to find n(F ∪ G ∪ R), where F , G, and R denote the sets of students
studying French, German, and Russian, respectively.
By the inclusion–exclusion principle,
Note:
∴ |A ∩ B| = |A| + |B| − |A ∩ B|
100 100 100
= + −
7 11 7 × 11
= 14 + 9 − 1 = 22.
2. Among the first 1000 positive integers, determine the integers which
are not divisible by 5, nor by 7, nor by 9.
Solution.
Let A = set of integers divisible by 5
B = set of integers divisible by 7
C = set of integers divisible by 9.
1000 1000 1000
∴ |A| = = 200; |B| = = 142; C = = 111.
5 7 9
1000 1000
|A ∩ B| = = = 28
LCM (5, 7) 35
1000 1000
|B ∩ C| = = = 15
LCM (7, 9) 63
1000 1000
|A ∩ C| = = = 22
LCM (5, 9) 45
1000 1000 1000
|A ∩ B ∩ C| = = = = 3.
LCM (5, 7, 9) 5×7×9 315
English and Computer courses, and 14 had taken all three courses.
How many students were surveyed who had taken none of the three
courses?
Solution.
Given: |M | = 64; |E| = 94; |C| = 58;
|M ∩ C| = 28; |M ∩ E| = 26; |E ∩ C| = 22; |M ∩ C ∩ E| = 14.
|M ∪ E ∪ E| = |M | + |E| + |C| − |M ∩ E|
− |M ∩ C| − |E ∩ C| + |M ∩ E ∩ C|
= 64 + 94 + 58 − 26 − 28 − 22 + 14
= 154.
Inserting these quantities into the formula N (P10 P20 N30 ) shows that
the number of solutions with x1 ≤ 6, x2 ≤ 6, and x3 ≤ 6 equals
[implying from (2.52)]
N (P10 P20 N30 ) = 105 − 36 − 36 − 36 + 3 + 3 + 3 − 0 = 6.
|A ∪ B| = |A| + |B| − |A ∩ B|
= 142 + 90 − 12
= 220.
9. Determine n such that 1 ≤ n ≤ 100 and it is not divisible by 5 or 7.
Solution.
Let A denote the number n, 1 ≤ n ≤ 100, which is divisible by 5.
Let B denote the number n, 1 ≤ n ≤ 100, which is divisible by 7.
Then,
100 100 100
|A| = = 20, |B| = = 14, |A ∩ B| = = 2.
5 7 5×5
By the principle of inclusion–exclusion, the number n, 1 ≤ n ≤ 100,
which is divisible by either 5 or 7 is |A ∪ B|.
|A ∪ B| = |A| + |B| − |A ∩ B|
= 20 + 14 − 2
= 32.
12. A survey shows that 57% of Indians like coffee whereas 75% like
tea. What can you say about the percentage of Indians who like
both coffee and tea.
Solution.
Let A denote the set of Indians who like coffee.
Let B denote the set of Indians who like tea.
Assume the total population is 100.
∴ |A| = 57; |B| = 75. Now,
|A ∪ B| = |A| + |B| − |A ∩ B|
= 57 + 75 − |A ∩ B|
= 132 − |A ∩ B|.
|A ∩ B| ≥ 32. (2.53)
∴ |A ∩ B| ≤ 57 and |A ∩ B| ≤ 75.
=⇒ |A ∩ B| ≤ 57. (2.54)
From (2.53) and (2.54), the percentage of Indians who like both
coffee and tea lies between 32 and 57.
13. Out of 100 students in a college, 38 play tennis, 57 play cricket, 31
play hockey, 9 play cricket and hockey, 10 play hockey and tennis,
and 12 play tennis and cricket. How many play
(i) all three games
(ii) just one game
(iii) tennis and cricket but not hockey.
Assume that each student plays at least one game.
Solution.
Let T, C, and H denote the set of students playing tennis, cricket,
and hockey, respectively (Figure 2.1).
Given: |T | = 38, |C| = 57, |H| = 31
Combinatorics 127
T C
21
7 41
5
5 4
17
FIGURE 2.1
Venn diagram
|T ∩ C ∩ H| = |T | + |C| + |H| − |T ∩ C| − |C ∩ H|
− |T ∩ H| + |T ∩ C ∩ H|
=⇒ 100 = 38 + 57 + 31 − 12 − 9 − 10 + |T ∩ C ∩ H|
=⇒ |T ∩ C ∩ H| = 100 − 126 + 31 = 5.
Number of students
playing just one game = Number of students playing tennis only
+ Number of students playing cricket only
+ Number of students playing hockey only
= 21 + 41 + 17 = 79.
Solution.
Let A, B, and C be the set of integers between 1 and 100 that are
divisible by 7, 11, and 13, respectively.
100 100 100
∴ |A| = = 14; |B| = ; |C| = = 7;
7 11 13
100 100
|A ∩ B| = = 1; |A ∩ C| = = 1;
7 × 11 7 × 13
100 100
|B ∩ C| = = 0; = 0.
11 × 13 7 × 11 × 13
Number of integers between 1 and 100 that are divisible by 7, 11,
or 13 is |A ∪ B ∪ C|.
By principle of inclusion–exclusion, we have
(i) Number of integers between 1 and 100 that are not divisible by
7, 11, or 13 = 100 − 28 = 72.
(ii) Let U and V denote the set of integers between 1 and 100 that
are divisible by 3 and 7, respectively.
100 100 100
|U | = = 33; |V | = = 14; |U ∩ V | = = 4.
3 7 3×7
15. Find the number of integers between 1 and 100 that are divisible by
(i) 2, 3, 5, or 7
(ii) 2, 3, 5 but not by 7.
Solution.
Let A, B, C, and D denote the set of positive integers between 1
and 100 that are divisible by 2, 3, 5, and 7, respectively.
100 100
∴ |A| = = 50; |B| = = 33;
2 3
100 100
|C| = = 20; |D| = = 14;
5 7
100 100
|A ∩ B| = = 16; |A ∩ C| = = 10;
2×3 2×5
Combinatorics 129
100 100
|A ∩ D| = = 7; |B ∩ C| = = 7;
2×7 3×5
100 100
|B ∩ D| = = 4; |C ∩ D| = = 2;
3×7 5×7
100 100
|A ∩ B ∩ C| = = 3; |A ∩ B ∩ D| = = 2;
2×3×5 2×3×7
100 100
|A ∩ C ∩ D| = = 1; |B ∩ C ∩ D| = = 0;
2×5×7 3×5×7
100
|A ∩ B ∩ C ∩ D| = = 0.
2×3×5×7
(i) By the principle of inclusion–exclusion, we have
|A ∪ B ∪ C ∪ D|
= |A| + |B| + |C| + |D| − |A ∩ B| − |A ∩ C| − |A ∩ D|
− |B ∩ C| − |B ∩ D| + |A ∩ B ∩ C| + |A ∩ B ∩ D|
+ |A ∩ C ∩ D| + |B ∩ C ∩ D| − |A ∩ B ∩ C ∩ D|
= 50 + 33 + 20 + 14 − 16 − 10 − 7 − 7 − 4 − 2
+3+2+1+0−0
= 117 − 46 + 6
= 123 − 46
= 77.
(ii) The number of integers between 1 and 100 that are divisible by
2, 3, 5 but not by 7
= |A ∩ B ∩ C| − |A ∩ B ∩ C ∩ D| = 3 − 0 = 3.
16. How many prime numbers not exceeding 100 are there? Or
determine a prime number n, where 1 ≤ n ≤ 100.
Solution.
To find the number of primes not exceeding 100, first note that a
composite integer not exceeding 100 must have a prime factor not
exceeding 10.
The primes not exceeding 100 are 2, 3, 5, and 7 and the numbers
that are divisible by none of 2, 3, 5, or 7.
Let P1 be the property that an integer is divisible by 2.
Let P2 be the property that an integer is divisible by 3.
Let P3 be the property that an integer is divisible by 5.
Let P4 be the property that an integer is divisible by 7.
Number of primes not exceeding = 4 + N (P10 P20 P30 P40 ).
130 Discrete Mathematical Structures
Now,
N (P10 P20 P30 P40 ) = 99 − N (P1 ) − N (P2 ) − N (P3 ) − N (P4 )
+ N (P1 P2 ) + N (P1 P3 ) + N (P1 P4 )
+ N (P2 P3 ) + N (P2 P4 ) + N (P3 P4 )
− N (P1 P2 P3 ) − N (P1 P2 P4 ) − N (P1 P3 P4 )
− N (P2 P3 P4 ) − N (P1 P2 P3 P4 )
(∵ there are 99 integers > 1 and not exceeding 100).
100 100 100 100
N (P10 P20 P30 P40 ) = 99 − − − −
2 3 5 7
100 100 100
+ + +
2×3 2×5 2×7
100 100 100
+ + +
3×5 3×7 5×7
100 100 100
− − −
2×3×5 2×3×7 2×5×7
100 100
− +
3×5×7 2×3×5×7
= 99 − 50 − 33 − 20 − 14 + 16 + 10 + 7 + 6
+4+2−3−2−1−0+0
= 21.
∴ There are 4 + 21 = 25 primes.
17. How many solutions does x1 + x2 + x3 = 11 have, where x1 , x2 , and
x3 are non-negative integers with x1 ≤ 3, x2 ≤ 4, and x3 ≤ 6?
Solution.
Let P1 be the property that x1 > 3.
Let P2 be the property that x2 > 4.
Let P3 be the property that x3 > 6.
Now, the number of solutions satisfying the inequalities x1 ≤ 1,
x2 ≤ 4, and x3 ≤ 6 is N (P10 P20 P30 ).
By principle of inclusion–exclusion, we have
N (P10 P20 P30 )N − N (P1 ) − N (P2 ) − N (P3 )
+ N (P1 P2 ) + N (P1 P3 ) + N (P2 P3 ) − N (P1 P2 P3 ).
Now,
N = Total number of solutions
= C(3 + 11 − 1, 11) = 78
Combinatorics 131
3.1 Introduction
Graphs are mathematical discrete structures which have major role
in computer science (algorithms and computation), electrical engineering
(communication networks and coding theory), operations research (scheduling),
and in many fields of engineering and also in sciences such as chemistry,
biochemistry (genomics), biology, linguistics, sociology, and other fields. For
instance, graphs are encoded to represent the relationship between objects.
Many real-world situations can conveniently be described by means of a
diagram consisting of a set of points together with lines joining certain pairs
of these points. For example, the points could represent people, with lines
joining pairs of friends; or the points might be communication centres, with
lines representing communication links. Notice that in such diagrams, one is
mainly interested in whether or not two given points are joined by a line; the
manner in which they are joined is immaterial. A mathematical abstraction
of situations of this type gives rise to the concept of a graph.
In this chapter, we focus on the terminology of graphs, its various
types, connectivity of graphs, Eulerian path, and Hamiltonian path. Graph
theory is introduced as an abstract mathematical system. The most common
representation of a graph is by means of a diagram, in which the vertices are
represented as points and each edge as a line segment joining its end vertices.
135
136 Discrete Mathematical Structures
v4 e3 v3
e4
e2
v1 e1 v2
Example of a graph
Definition 3.2.2 Self-loop: An edge having same vertex as both its end
vertices is called a self-loop.
Example 3.2.3 Here e is a self-loop.
v3
v1 v2
Example of a self-loop
Definition 3.2.4 Parallel Edges: If more than one edge has the same pair
of end vertices, then the edges are called parallel edges.
v3
e1
e2
e3
v1 v2
e4
v1 e1 v2
v3
e2
e4
v5 e3 v4
The edge e1 is incident at the vertex v1 . The edge e3 is incident at the vertex v5 .
Example 3.2.9
v3
e1
e2
e3
v1 v2
Definition 3.2.10 Simple Graph: A graph which has neither self-loops nor
parallel edges is called a simple graph as shown below.
v1 v4
Example of isolated vertex
Definition 3.2.18 Mixed Graph: A graph in which some edges are directed
and some are undirected is called a mixed graph.
Definition 3.2.19 Multigraph: A graph which contains some parallel edges
is called a multigraph.
Definition 3.2.20 Pseudo Graph: A graph in which loops and parallel
edges are allowed is called a pseudograph.
where e is the number of edges with n vertices in the graph G. That is,
We know that the maximum degree of each vertex in the graph G can be
(n − 1).
(6) × (10) = 60
=⇒ 2e = 60
=⇒ e = 30.
7. Show that the sum of degrees of all the vertices in a graph G is even.
Solution.
Each edge contributes two degrees in a graph.
142 Discrete Mathematical Structures
Definition 3.3.7 Regular Graph: If every vertex of a simple graph has the
same degree, then the graph is called a regular graph.
If every vertex in a regular graph has degree k, then the graph is called
k-regular graph.
Note:
1. Every null graph is regular of degree 0.
2. The complete graph Kn is of degree n − 1.
3. If a graph G has n vertices and is regular of degree k, then G has
rn
edges.
2
Definition 3.3.8 Complete Graph: A simple graph with n vertices is said
to be a complete graph if the degree of every vertex is n − 1.
(or)
K3 K4 K5
Example 3.3.9
Example 3.3.12
C6
Example of cycle graph
Note:
1. In a graph, a cycle that is not a loop must have length at least
three, but there may be cycles of length two in a multigraph.
2. A simple digraph having no cycles is called a cyclic graph.
3. A cyclic graph cannot have any loops.
4. The cycle Cn , n ≥ 3, consists of n vertices 1, 2, . . . , n and edges
{1, 2}, {2, 3}, . . . , {n − 1, n}.
Definition 3.3.13 Wheel Graph: A wheel graph of order n is obtained by
joining a new vertex called “Hub” to each vertex of a cycle graph of order
n − 1, denoted by Wn .
Hub
W5
u1 u2
u3 u4
u5 u6
u7 u8
V1 V2
Example of bipartite graph
V1 V2 V3
V4 V5 V6
K3,3
Example of complete bipartite graph
Definition 3.3.19 Star Graph: Any graph that is K1,n is called a star
graph.
K1,6
Example of star graph
Graphs 145
v3
v6
v5 v4
Graph of C6
7. Is K3 bipartite?
Solution.
No, the complete graph K3 is not bipartite as shown below.
v1
v3
v2
Graph of K3
If we divide the vertex set of K3 into two disjoint sets, one of the
two sets must contain two vertices. If the graph is bipartite, these
two vertices should not be connected by an edge, but in K3 each
vertex is connected to every other vertex by an edge.
∴ K3 is not bipartite.
8. How many vertices and edges are there in a complete bipartite graph
Km,n ?
Solution.
There are m + n vertices and mn edges.
9. Find the degree sequence of the graph K2,3 .
Solution.
3, 3, 2, 2, 2.
10. For which values of m and n is Km,n regular?
Solution.
A complete bipartite graph Km,n is not regular if m 6= n.
=⇒ If m = n, then Km,n is regular.
11. Prove that a graph which contains a triangle cannot be bipartite.
Solution.
At least two of the three vertices must lie in one of the bipartite
sets because these two are joined by edge; thus, the graph cannot
be bipartite.
148 Discrete Mathematical Structures
V2
V1
V3
V7
V6 V4
V5
Graph G
Solution.
Graph G is bipartite since its vertex set is the union of two disjoint
sets {v1 , v2 , v3 } and {v4 , v5 , v6 , v7 } and each edge connects a vertex
in one of these subsets to a vertex in the other subset.
14. Draw the complete bipartite graphs K2,3 , K3,3 , K3,5 , and K2,6 .
Solution.
The complete bipartite graphs are shown below.
Graphs 149
K2,3
K3,3
K3,5 K2,6
Given complete bipartite graphs
15. How many subgraphs with at least one vertex does K3 have?
Solution. 17
Example 3.4.2
v1
v5 v2
v4 v3
Example of a graph with adjacency matrix
150 Discrete Mathematical Structures
v1 v2 v3 v4 v5
v1 0 1 0 0 1
v2 1 0 1 1 1
A=
v3 0
1 0 1 1
v4 0 1 1 0 1
v5 1 1 1 1 0
Example 3.4.4
v1 e1 v2
e4 e2
e5
v4 v3
e3
Example of a graph with incidence matrix
e1 e2 e3 e4 e5
v1 1 0 0 1 1
1 1 0 0 0
B= v2
0 1 1 0 1
v3
v4 0 0 1 1 0
Any function f with the above three properties is called an isomorphism from
G1 to G2 .
Example 3.4.6 Consider the graphs G1 and G2 in the following figure. Let
f : G1 −→ G2 be a function with f (u1 ) = v1 , f (u2 ) = v4 , f (u3 ) = v3 ,
f (u4 ) = v2 . Then, f is a one-to-one and onto function between G1 and G2 .
Here, f preserves the adjacency. The adjacent vertices in G1 are u1 and u2 ,
u1 and u3 , u2 and u4 , and u3 and u4 , and each of the pairs f (u1 ) = v1 and
f (u2 ) = v4 , f (u1 ) = v1 and f (u3 ) = v3 , f (u2 ) = v4 and f (u4 ) = v2 , and
f (u3 ) = v3 and f (u4 ) = v2 are adjacent in G2 . Hence, the graphs G1 and G2
are isomorphic.
u1 u2 v1 v2
u3 u4 v3 v4
G1 G2
u3 u4
Given graph
152 Discrete Mathematical Structures
Solution.
The adjacency matrix is
u u2 u3 u4
1
u1 0 1 1 1
1 0 0 1
A= u2
1 0 0 1
u3
u4 1 1 1 0
e1 e3
e7 e6 e5
v4
v5
e8
Given graph
Solution.
The incidence matrix is
e1 e2 e3 e4 e5 e6 e7 e8
1 1 1 0 0 0 0 0
v1 0 1 1 1 0 1 1 0
v2
B= 0 0
0 1 1 0 0 0
v3
v4 0 0
0 0 0 0 0 0
v5 0 0 0 0 1 1 0 0
3. What is the sum of the entries in a row of the incidence matrix for
an undirected graph?
Solution.
Sum is 2 if the edge e is not a loop and 1 if the edge e is a loop.
4. Check whether the two graphs are isomorphic or not.
G1 G2
Given graphs
Graphs 153
Solution.
In the graph G1 , vertices of degree 2 are not adjacent, while in
the graph G2 , vertices of degree 2 are adjacent. Since isomorphism
preserves adjacency of vertices, the graphs are not isomorphic.
5. Prove that the graphs G1 and G2 are isomorphic.
v1
u1
v5 v2
u3 u2
u4 v4 v3
u5
G1 G2
Given graphs
Solution.
The two graphs have the same number of vertices, same number of
edges, and same degree sequence. Consider the function f defined by
f (u1 ) = v1 , f (u2 ) = v3 , f (u3 ) = v4 , f (u4 ) = v2 , f (u5 ) = v5 .
Then, the adjacency matrices of the two graphs corresponding to
f are
u1 u2 u3 u4 u5
u1 0 1 1 0 0
u2 1 0 0 0 1
A(G1 ) =
u3 1 0 0 1 0
u4 0 0 1 0 1
u5 0 1 0 1 0
v1 v2 v3 v4 v5
v1 0 1 1 0 0
v2 1 0 0 0 1
A(G2 ) =
v3 1
0 0 1 0
v4 0 0 1 0 1
v5 0 1 0 1 0
Therefore, A(G1 ) = A(G2 ). Hence, G1 and G2 are isomorphic to
each other.
6. Prove that any two simple connected graphs with n vertices all of
degree 2 are isomorphic.
Solution.
We know that the total degree of a graph is given by
n
X
deg(vi ) = 2|E|.
i=1
154 Discrete Mathematical Structures
a b
c d
v1
v2
v4
v3
156 Discrete Mathematical Structures
u1 u2 v1 v2
v4
u3 u4 v3
G1 G2
3.5 Connectivity
Definition 3.5.1 Walk: A walk is defined as a finite alternating sequence
of vertices and edges, beginning and ending with vertices such that each edge
is incident with the vertex preceding and following it. (No edge appears more
than once, and vertex may be repeated.)
Graphs 157
e3
e1 e5 e6
v4 v3
e2
Example of a walk
Remarks:
1. A walk is also referred to as an edge train or a chain.
2. No edge appears more than once in a walk.
3. Every walk is a subgraph of G.
Definition 3.5.3 Terminal Vertex: In a walk, the vertex that begins and
ends the walk is called its terminal vertex.
For example, in the walk v1 e3 v3 e5 v2 in the figure above, the terminal
vertices are v1 and v2 .
Definition 3.5.4 Closed Walk: A walk with same end vertices is called a
closed walk.
In the example above, v1 e3 v3 e5 v2 e4 v1 is a closed walk.
Definition 3.5.5 Open Walk: A walk which is not closed is called an open
walk.
In the graph above, v1 e3 v3 e5 v2 is an open walk.
Remarks:
1. A path does not intersect itself.
2. A self-loop can be included in a walk but not a path.
158 Discrete Mathematical Structures
e3
e1 e5 e6
v4 v3
e2
Connected graph
Example 3.5.11
Let us consider
k
X k
X k
X
(ni − 1) = ni − 1
i=1 i=1 i=1
= (n − k).
Definition 3.6.4 Eulerian Graph: A closed walk which contains all edges
of the graph G is called an Euler line, and the graph containing at least one
Euler line is called an Eulerian graph.
v1 v4
e4 e1 e2
v2 v3
e3
Example of unicursal graph
Remark:
1. Adding an edge between the initial and final vertices of unicursal
line, we obtain an Euler line.
2. A connected graph is unicursal, if it has exactly two odd degree
vertices.
Theorem 3.6.14 In a connected graph G, with exactly 2k odd degree vertices,
there exist k edge-disjoint subgraphs such that they together contain all edges
of G and that each is a unicursal graph.
Proof.
Let the odd degree vertices of the given graph be named as v1 , v2 , . . . , vk and
ω1 , ω2 , . . . , ωk in any arbitrary order.
Add k edges (new edges) to G between the pair of vertices (v1 , ω1 ),
(v2 , ω2 ),. . . , (vk , ωk ) to form a new graph G0 .
In the resultant graph G0 , every vertex is of even degree.
=⇒ G0 is an Eulerian graph.
=⇒ G0 contains an Euler line, say P .
If we remove k newly added edges from P , that will split P into k walks
each of a unicursal line to itself.
That is, the first removal will leave a single unicursal line. The second
removal will split that into two unicursal lines, and each successive removal
will split a unicursal line into two unicursal lines, until there are k of them.
Hence, the theorem is proved.
c f
b e
Given graph
Solution.
a–b–c–f –d–e is a Hamiltonian path.
2. Does the graph below have a Hamiltonian path. If so, find such a
path. If it does not, give an argument to show why no such path
exists.
a b
d
e f
Given graph
Solution.
f –e–d–a–b–c is a Hamiltonian path.
3. Does the graph given below have a Hamiltonian path? If so, find
such a path. If it does not, give an argument to show why no such
path exists.
b
a c
j
i k
d h
o p q
n l
m
e g
f
Given graph
Solution.
No Hamiltonian path exists. There are eight vertices of degree 2,
and only two of them can be end vertices of a path. For each of the
other six, their two incident edges must be in the path. It is easy
to see that if there is to be a Hamiltonian path, exactly one of the
inside corner vertices must be an end and that this is impossible.
166 Discrete Mathematical Structures
a d
c
Graph with Eulerian and Hamiltonian circuits
c d
Graph with Hamiltonian circuit but no Eulerian circuit
Solution.
The graph having an Eulerian circuit but not a Hamiltonian circuit
as shown below.
b d
a
c
e f
3 n-2
n
2 1
n-1
4
n-3
Required graph for the problem
D
A
1 0 1 0
6. How do you find the number of different paths of length r from i to
j in a graph G with adjacency matrix A?
7. Is the directed graph given below strongly connected? Why or
why not?
1 2
4 3
19. Examine whether the two graphs G and G0 associated with the
following adjacency matrices are isomorphic.
0 1 0 1 0 0 0 1 0 0 1 0
1 0 1 0 0 1 1 0 1 0 0 0
0 1 0 1 0 0 0 1 0 1 0 1
1 0 1 0 1 0 , 0 0 1
0 1 0
0 0 0 1 0 1 1 0 0 1 0 1
0 1 0 0 1 0 0 0 1 0 1 0
A B B C
A
(i) (ii) D
C D E F E
u1 u3 v5 v2
u5 v4 v3
u4
G H
172 Discrete Mathematical Structures
e c d c
d c e f
v1 v2 v3 v4 v5 u1 u2 u3 u4 u5
4
Algebraic Structures
4.1 Introduction
An algebraic system can be described as a set of objects together with some
operations. These operations will impose a certain structure on the set. In this
chapter, we study the axiomatic set theory, semigroups, groups, and monoids
which are the basic tools of discrete mathematics.
173
174 Discrete Mathematical Structures
for all a, b, c ∈ G.
(vii) Cancellation Property: For a, b, c ∈ G and a 6= 0,
a ? b = a ? c =⇒ b = c.
Example 4.2.4 Let R be the set of real numbers. Consider the algebraic
system (R, +, ×) where + and × are the operations of addition and
multiplication on R.
Example 4.2.10 The set of integers, the set of reals, the set of complex
numbers are abelian semigroups (abelian monoids) under the usual operations
of addition and multiplication.
(a1 Ea01 ) ∧ (a2 Ea02 ) = [a1 (E1 ∩ E2 )a01 ] ∧ [a2 (E1 ∩ E2 )a02 ]
= (a1 E1 a01 ) and (a1 E1 a01 ) ∧ (a2 E2 a02 ) and (a2 E2 a02 )
= (a1 E1 a01 ) ∧ (a2 E1 a02 ) and (a1 E2 a01 ) ∧ (a2 E2 a02 )
= (a1 ? a2 )E1 (a01 ? a02 ) and (a1 ? a2 )E2 (a01 ? a02 )
= (a1 ? a2 )(E1 ∩ E2 )(a01 ? a02 )
= (a1 ? a2 )E(a01 ? a02 ).
Now,
Also,
a ? (a ? a−1 ) = a ? e = a. (4.2)
From (4.1) and (4.2), we get a = e.
Similarly, we can prove that b = e.
But in a group we cannot have two identities, and hence (S, ?)
cannot be a group.
This contradiction is due to an assumption that (S, ?) has two
idempotents.
Example: Let S = {a, b, c} under the operation ?. The composition
table of (S, ?) is shown in the following table.
Composition Table of (S, ?)
? a b c
a a c a
b c b a
c b a c
Solution.
First, we define a function g : Z −→ E by g(a) = 2a, for all a ∈ Z.
To prove g is one-to-one:
Suppose g(a1 ) = g(a2 ), where a1 , a2 ∈ Z.
Then, 2a1 = 2a2 =⇒ a1 = a2 .
Therefore, g is one-to-one.
To prove g is onto:
Suppose b is an even integer.
b
Let a = . Then, a ∈ Z and
2
b b
g(a) = g = 2 · = b.
2 2
That is, every element b ∈ E has a preimage in Z.
Therefore, g is onto.
To prove g is homomorphism:
Let a, b ∈ Z.
g(a + b) = 2(a + b)
= 2a + 2b
= g(a) + g(b).
Hence, (Z, +) and (E, +) are isomorphic semigroups.
7. If ? is a binary operation on the set of R of real numbers defined
by a ? b = a + b + 2ab,
(i) show that (R, ?) is a semigroup.
(ii) find the identity element if it exists.
(iii) which elements has inverse and what are they?
Solution.
(i)
(a ? b) ? c = (a + b + 2ab) + c + 2(a + b + 2ab)c
= a + b + c + 2(ab + bc + ca) + 4abc
and
a ? (b ? c) = a + (b + c + 2bc) + 2a(b + c + 2bc)
= a + b + c + 2(ab + bc + ca) + 4abc.
Hence, (a ? b) ? c = a ? (b ? c).
Therefore, ? is associative.
(ii) If the identity element exists, let it be e. Then for any a ∈ R,
a?e=a
or a + e + 2ae = a
or e(1 + 2a) = 0.
Therefore, e = 0, since 1 + 2a 6= 0, for any a ∈ R.
178 Discrete Mathematical Structures
(a ? a) ? a−1 = a ? (a ? a−1 ).
(a ? a) ? a−1 = a ? a−1 = e. (4.3)
−1
a ? (a ? a ) = a ? e = a. (4.4)
(x ? y) ? z = max{x ? y, z}
= max{max{x, y}, z}
= max{x, y, z}
= max{x, max{y, z}} = max{x, y ? z} = x ? (y ? z).
Solution.
Let (M, ?, eM ) and (T, ∆, eT ) be any two monoids, and let
g : M −→ T be a monoid homomorphism. If a ∈ M is invertible,
let a−1 be the inverse of a in M . We will now show that g(a−1 ) will
be an inverse of g(a) in T .
a ? a−1 = a−1 ? a = eM (by definition of inverse)
So, g(a ? a−1 ) = g(a−1 ? a) = g(eM ).
Hence, g(a)∆g(a−1 ) = g(a−1 )∆g(a) = g(eM ). (since g is a
homomorphism)
But g(eM ) = eT . (since g is a monoid homomorphism)
Therefore, g(a)∆g(a−1 ) = g(a−1 )∆g(a) = eT .
This means g(a−1 ) is an inverse of g(a). That is, g(a) is invertible.
Thus, the property of invertibility is preserved under monoid
homomorphism.
Assume g is a monoid epimorphism. Let t = g(b) ∈ T . Then
t∆g(z) = g(b)∆g(z) = g(b ? z) = g(z)
and g(z)∆t = g(z)∆g(b) = g(z ? b) = g(z).
Therefore, g(z) is the zero element of T .
17. The operation ? is defined by a ? b = a + b − ab, on the set Q
of all rational numbers. Show that under this operation, Q is a
commutative monoid.
Solution.
(i) Closure Property:
Since a + b − ab is a rational number for all rational numbers
a, b, the given operation ? is a binary operation on Q.
(ii) Associative Property:
For all a, b, c ∈ Q,
(a ? b) ? c = (a + b − ab) ? c
= (a + b − ab) + c − (a + b − ab)c
= a + b − ab + c − ac − bc + abc
= a + (b + c − bc) − a(b + c − bc)
= a ? (b + c − bc)
= a ? (b ? c).
Hence, ? is associative.
(iii) Existence of Identity:
For any a ∈ Q,
a?0=a+0−a·0=a
and 0 ? a = 0 + a − 0 · a = a.
Hence, 0 is the identity element in Q under the operation ?.
Algebraic Structures 183
(α ◦ β) ◦ γ = αβγ
= α ◦ (βγ)
= (α ◦ β ◦ γ).
4.2.3 Groups
Definition 4.2.14 Group: A non-empty set G together with a binary
operation ?, that is (G, ?), is called a group if ? satisfies the following
conditions:
Example 4.2.15 The set of all integers Z with the addition operation is a
group.
Example 4.2.16 The set of all non-zero real numbers R? under the
multiplication operation is a group.
Properties of Groups
1. The identity of a group is unique.
2. The left and right cancellation laws are true.
(i) a ? b = a ? c =⇒ b = c (left cancellation law) and
(ii) b ? a = c ? a =⇒ b = c (right cancellation law).
3. The inverse of any element in a group is unique.
−1
4. If a is an element of a group G, then a−1 = a.
5. For any two elements a, b in a group G, (a ? b)−1 = b−1 ? a−1 .
6. In a group, the solution for the equations a ? x = b and y ? b = a
exists, and it is unique.
Composition Table of P3
◦ f1 f2 f3 f4 f5 f6
f1 f1 f2 f3 f4 f5 f6
f2 f2 f1 f6 f5 f4 f3
f3 f3 f5 f1 f6 f2 f4
f4 f4 f6 f5 f1 f3 f2
f5 f5 f3 f4 f2 f6 f1
f6 f6 f4 f2 f3 f1 f5
1 2 3 1 2 3 1 2 3
f1 = , f2 = , f3 =
1 2 3 3 2 1 2 3 1
1 2 3 1 2 3 1 2 3
f4 = , f5 = , f6 = .
3 1 2 2 1 3 1 3 2
186 Discrete Mathematical Structures
AA = A, AB = BA = B, AC = CA = C, and
AD = DA = D.
(v) Existence of Inverse:
From Table 4.2, all elements in G are self-inverses.
That is, inverse of A is A, inverse of B is B, inverse of C is C,
inverse of D is D, since AA = A, BB = A, CC = A,
DD = A.
Hence, G forms an abelian group under matrix multiplication.
4. Show that (Q+ , ?) is an abelian group, where ? is defined by
ab
a ? b = , ∀ a, b ∈ Q+ .
2
Solution.
(i) Closure Property:
ab
It is clear that for all a, b ∈ Q+ , a ? b ∈ Q+ , since ∈ Q+ .
2
Hence, closure property is satisfied.
(ii) Commutative Property:
a ? b = b ? a is true for all a, b ∈ Q+ , since
ab ab ba
a?b=b?a= [∵ = is true in Q+ ].
2 2 2
(iii) Associative Property:
a bc
bc abc
a ? (b ? c) = a ? = 2 = .
2 2 4
ab
ab c abc
(a ? b) ? c = ?c= 2 = .
2 2 4
Therefore, a ? (b ? c) = (a ? b) ? c, for all a, b, c ∈ Q+ .
Hence, associative property is satisfied.
(iv) Existence of Identity:
e = 2 ∈ Q+ is the identity element, since
a·2
a?e=a?2= = a, for all a ∈ Q+ .
2
(v) Existence of Inverse:
4
a−1 = ∈ Q+ is the inverse of a ∈ Q+ , since
a
4 a · a4 4a
a ? a−1 = a ? = = = 2.
a 2 2a
Hence, Q+ is an abelian group under the operation ? defined in the
problem.
5. Prove that the identity element of a group is unique.
Solution.
Let (G, ?) be a group.
Let e1 and e2 be two identity elements in G.
Algebraic Structures 189
Then,
e1 ? e 2 = e1 [∵ e2 is the identity]
e1 ? e 2 = e2 [∵ e1 is the identity].
Thus, e1 = e2 .
Hence, the identity is unique.
6. Prove that the identity element is the only idempotent element of
a group.
Solution.
Let (G, ?) be a group.
Since e ? e = e, e is the idempotent element.
Let a be any idempotent element of G.
Then, a ? a = a.
Also, e ? a = a [∵ e is the identity element].
It follows that a ? a = e ? a.
By the right cancellation law, we have a = e, and so e is the only
idempotent element.
7. Prove that if every element in a group is its own inverse, then the
group must be abelian. Or prove that for any group (G, ?), if a2 = e
with a 6= e, then G is abelian.
Solution.
Given a = a−1 for all a ∈ G.
Let a, b ∈ G. Then, a = a−1 and b = b−1 .
Now, (a ? b) = (a ? b)−1
= b−1 ? a−1
= b ? a.
=⇒ G is abelian.
= a ? e ? a−1
= a ? a−1 = e
and
(b−1 ? a−1 ) ? (a ? b) = b−1 ? a−1 ? a ? b
= b−1 ? e ? b
= b−1 ? b = e.
Hence, (a ? b)−1 = b−1 ? a−1 .
10. If a and b are any two elements of a group (G, ?), then show that
G is abelian if and only if (a ? b)2 = a2 ? b2 .
Solution.
Necessary Part:
Given that (G, ?) is an abelian group.
=⇒ For all a, b ∈ G, a ? b = b ? a. (4.10)
2 2 2
To prove: (a ? b) = a ? b .
(a ? b)2 = (a ? b) ? (a ? b)
= a ? (b ? a) ? b
= a ? (a ? b) ? b [using (4.10)]
= (a ? a) ? (b ? b)
= a2 ? b2 .
Sufficient Part:
12. Show that the set S = {[1], [5], [7], [11]} is a group with respect to
multiplication modulo 12.
Solution.
The composition table of S with respect to ×12 is given in the
table below: Here, 5 ×12 7 = 35, which on division by 12 gives the
Solution.
(i) Closure Property:
cos α − sin α cos β − sin β
Let Aα = ∈ G and Aβ = ∈ G.
sin α cos α sin β cos β
Then
cos α − sin α cos β − sin β
Aα Aβ =
sin α cos α sin β cos β
cos α cos β − sin α sin β −(cos α sin β + sin α cos β)
=
sin α cos β + cos α sin β cos α cos β − sin α sin β
cos(α + β) − sin(α + β)
= = Aα+β ∈ G. (4.12)
sin(α + β) cos(α + β)
4.2.5 Subgroups
Definition 4.2.23 Subgroup: A non-empty subset H of a group G is said
to be a subgroup of G, if H itself is a group under the same operation defined
on G and with the same identity element.
Example 4.2.24 The set of all integers Z is a subgroup of the set of all real
numbers R under usual addition. That is, (Z, +) is a subgroup of (R, +).
Proof.
Necessary condition:
Assume that H is a subgroup of G.
Since H itself is a group, we have a, b ∈ H =⇒ a ? b ∈ H (using closure
property). Also, b ∈ H =⇒ b−1 ∈ H (using inverse property).
∴ a, b ∈ H =⇒ a, b−1 ∈ H =⇒ a ? b−1 ∈ H.
Sufficient condition:
Let a ? b−1 ∈ H, for all a, b ∈ H and H is a subset of G.
We have to prove H is a subgroup of G.
Algebraic Structures 193
∴ For a, b ∈ H =⇒ a, b−1 ∈ H
−1
=⇒ a ? b−1 ∈H⊆G
=⇒ a ? b ∈ H.
Example 4.2.28 The multiplicative group, G = {1, −1, i, −i}, (i being the
complex number) is cyclic.
We can write 1 = i4 , −1 = i2 , i = i3 . That is all the elements of G can be
expressed as integral powers of the element i.
Therefore, G is a cyclic group generated by i. Since i is the generator of G,
i−1 is also a generator of G.
Hence, G is a cyclic group, and its generators are i and i−1 .
194 Discrete Mathematical Structures
Proof.
Let (G, ?) be a cyclic group generated by an element a ∈ G, that is G = <a>.
Then, for any two elements x, y ∈ G, we have x = an , y = am , where m, n
are integers. Therefore,
x ? y = an ? am
= am+n
= am ? an
= y ? x.
ak = amq+r
= amq ? ar
q
= (am ) ? ar
= eq ? a r
= e ? ar
= ar .
ai ? a−j = aj ? a−j
=⇒ ai−j = aj−j = e, where i − j < n,
Proof.
Let G be a finite cyclic group of order n with generator a. That is,
g = {e, a, a2 , . . . , an−1 }.
4.2.7 Homomorphisms
Definition 4.2.33 Homomorphism: Let (G, ?) and (H, ∆) be any two
groups. A mapping f : G −→ H is said to be a homomorphism if
f (a ? b) = f (a)∆f (b), for a, b ∈ G.
Example 4.2.34 Let G = (Z, +) and H = (nZ, +) be two groups (for a fixed
integer n). The mapping f : G −→ H defined by f (m) = nm for m ∈ Z is a
homomorphism from G into H.
Proof.
Let f : (G, ?) −→ (G0 , ?0 ) be any homomorphism.
Φ(b) = fab
= fa ◦ fb [since fab (x) = abx = a(bx) = fa (bx) = fa ◦ fb (x)]
= Φ(a) ◦ Φ(b).
Claim 2: Φ is bijective
Clearly, Φ is one-to-one, since
Φ(a) = Φ(b)
=⇒ fa = fb
=⇒ fa (x) = fb (x), for every x ∈ G
=⇒ ax = bx
=⇒ a = b.
Therefore, Φ is onto.
Hence, Φ is bijective. Thus, Φ : G −→ G1 becomes as an isomorphism.
Hence, every finite group of order n is isomorphic to a permutation group
of degree n.
Theorem 4.2.40 Any cyclic group of order n is isomorphic to the additive
group of residue classes of integers modulo n.
Proof.
Let G = {a, a2 , . . . , an = e} be a cyclic group of order n generated by a.
We know that (Zn , +n ) is the additive group of residue classes modulo n
=⇒ Zn = {[1], [2], . . . , [n] = [0]}.
Let f : G −→ Zn be defined by f (ar ) = [r], for all ar ∈ G.
For all [r] ∈ Zn , there exists ar ∈ G such that f (ar ) = [r]
=⇒ f is onto.
For r 6= s, [r] 6= [s] and hence f (ar ) 6= f (as )
=⇒ f is one-to-one.
For all ar , as ∈ G, f (ar · as ) = f (ar+s ) = [r + s] = [r] + [s]
= f (ar ) +n f (as )
=⇒ f is a homomorphism.
Hence, (G, ·) is isomorphic to (Zn , +n ).
a ? H = {a ? h/h ∈ H}
H? = {h ? a/h ∈ H}
Example 4.2.42 Consider the multiplicative group G = {1, −1, i, −i} and a
subgroup H = {1, −1}. Clearly, iH, −iH, 1H, and −1H are the left cosets.
Theorem 4.2.44 Let (H, ?) be a subgroup of a group (G, ?). The set of left
cosets of H in G forms a partition of G. Also, every element of G belongs to
one and only one left coset of H in G.
Proof.
To prove: Every element of G belongs to one and only one left coset of H
in G.
Let H be a subgroup of a group G. Let a ∈ G. Then, aH = H if and only
if a ∈ H.
Suppose a ∈ G and aH = H. Then,
aH ⊆ H. (4.13)
H = aH.
Hence, every element of G belongs to one and only one left coset of H in G.
To prove: The set of left cosets of H in G forms a partition of G.
Let a, b ∈ G and H be a subgroup of G.
If aH ∩ Ha 6= φ, then let c ∈ aH ∩ Ha.
Since c ∈ aH, we have cH = aH.
Let H be a subgroup of a group G. Let a, b ∈ G if b ∈ aH; then bH = aH.
Since c ∈ bH, we have cH = bH. So
aH = cH = bH.
Proof.
Let G be a finite group and H be a subgroup of G.
Let O(G) = n and O(H) = m. Let us consider all left cosets of H in G.
Each coset has exactly m elements.
ah1 = ah2 =⇒ h1 = h2 , for all a ∈ G.
By result (iii), namely, G is decomposed into say r mutually disjoint
subsets, each of order m.
Therefore, n = rm. That is, O(G) = rO(H).
Thus, O(H) divides O(G).
Note: The converse of Lagrange’s theorem is not true in general. That is, if
n is a divisor of a group G, then it does not necessarily follow that G has a
subgroup of order n.
Theorem 4.2.46 If (G, ?) is a finite group of order n, then for any a ∈ G,
we must have an = e, where e is the identity of the group G.
Proof.
Let O(G) = n. Let a ∈ G.
Then, the order of the subgroup <a> is the order of the element a.
If O(<a>)= m, then am = e, and by Lagrange’s theorem, we get m|n.
Let n = mk. Then, an = amk = (am )k = ek = e.
Definition 4.2.47 Normal Subgroup: A subgroup (H, ?) of a group (G, ?)
is said to be a normal subgroup of G if for every x ∈ G and for every h ∈ H,
xhx−1 ∈ H or xHx−1 ⊆ H.
Example 4.2.48 Consider the group (Z, +). Clearly, (3Z, +) is a normal
subgroup of (Z, +).
N a ⊗ N b = N (a ? b).
Then, (G/N, ⊗) will form a group called quotient group or factor group.
Consider
f (g ? x ? g −1 ) = f (g) ?0 f (x ? g −1 )
= f (g) ?0 [f (x) ?0 f (g −1 )]
= f (g) ?0 [e0 ?0 f (g −1 )]
= f (g) ?0 f (g −1 )
= f (g ? g −1 )
= f (e) = e0 .
Thus, f (g ? x ? g −1 ) = e0 .
Therefore, g ? x ? g −1 ∈ ker(f ).
Hence, ker(f ) is a normal subgroup.
Theorem 4.2.51 Let (H, ?) be a subgroup of a group (G, ?). Then, (H, ?) is
a normal subgroup if and only if a ? h ? a−1 = H, for all a ∈ G.
Proof.
Let H be a normal subgroup of G.
Then by definition, a ? H = H ? a, for all a ∈ G. Hence,
a ? H ? a−1 = a ? (a−1 ? H)
= (a ? a−1 ) ? H
=e?H
= H.
a ? (x ? y) = (a ? x) ? y
= (x ? a) ? y
= x ? (a ? y)
Algebraic Structures 201
= x ? (y ? a)
= (x ? y) ? a
=⇒ x ? y ∈ H.
a−1 ? (a ? x) = a−1 ? (x ? a)
=⇒ x = a−1 ? (x ? a)
=⇒ x ? a−1 = a−1 ? (x ? a) ? a−1
= (a−1 ? x) ? (a ? a−1 )
= a−1 ? x
=⇒ x ? a−1 = a−1 ? x, ∀x ∈ G
=⇒ a−1 ∈ H.
Thus, H is a subgroup.
To prove: H is normal.
Let x ∈ H, g ∈ G.
Then, a ? x = x ? a, ∀a ∈ G.
Then, g ? x ? g −1 = x ? g ? g −1
=⇒ x ∈ H.
Thus, g ? x ? g −1 ∈ H =⇒ H is normal.
Theorem 4.2.53 N is a normal subgroup of a group G if and only if
gN g −1 = N , for every g ∈ G (or gN = N g). Show that the number of
right and left cosets are equal in normal subgroups and every left coset is a
right coset.
Proof.
Let N be a normal subgroup of G.
Let x ∈ gN g −1 =⇒ x = gng −1 , for some n ∈ N .
Therefore, x = gng −1 ∈ N (∵ N is a normal subgroup).
Hence, gN g −1 ⊆ N .
Now, g −1 N g = g −1 N (g −1 )−1 ⊆ N , since g −1 ∈ G, and g −1 ng ∈ N .
Therefore, N = g(g −1 N g)g −1 ∈ gN g −1
Therefore, N ⊆ gN g −1 .
Hence, N = gN g −1 .
Conversely, let N g −1 = N , for every g ∈ G.
That is, gN g −1 is the set of all gng −1 , for n ∈ N .
Clearly, gN g −1 ⊆ N .
Therefore, N is a normal subgroup.
We get if N is a normal subgroup, then gN g −1 = N or gN = N g, that
is, the left and right cosets are equal.
Therefore, the right and left cosets are equal in number in normal
subgroups, and every left coset is a right coset.
202 Discrete Mathematical Structures
+9 [0] [5]
H4 is closed since [0] [0] [5]
[5] [5] [1]
Similarly,
Therefore, f is a homomorphism.
To show f is one-to-one:
If f (x) = f (y), then axa−1 = aya−1 . Hence, by left cancellation
law, we have xa−1 = ya−1 ; again by right cancellation law, we get
x = y. Therefore, f (x) = f (y) =⇒ x = y. Hence, f is one-to-one.
To show f is onto:
Let y ∈ G; then a−1 ya ∈ G and
Example 4.2.57 Let A = {1, 2, 3}. Then, all the permutations of A are
1 2 3 1 2 3 1 2 3
1A = , p1 = , p2 = ,
1 2 3 1 3 2 2 1 3
1 2 3 1 2 3 1 2 3
p3 = , p4 = , p5 = .
2 3 1 3 1 2 3 2 1
Algebraic Structures 209
p(b1 ) = b2
p(b − 2) = b3
.. ..
. .
p(br−1 ) = br
p(br ) = b1 .
Example 4.2.63 Let A = {1, 2, 3, 4, 5}. The cycle (1, 3, 5) denotes the
permutation
1 2 3 4 5
.
3 2 5 4 1
Definition 4.2.64 Disjoint Cycles: Two cycles of a set A are said to be
disjoint if no element of A appears in both cycles.
210 Discrete Mathematical Structures
Example 4.2.65 Let A = {1, 2, 3, 4, 5, 6}. Then, the cycles (1, 2, 5) and
(3, 4, 6) are disjoint, whereas the cycles (1, 2, 5) and (2, 4, 6) are not.
Corollary 4.2.69 Every permutation of a finite set with at least two elements
can be written as a product of transpositions.
Remark 4.2.72 From the definition of even and odd permutations, we have
the following:
(a) The product of two even permutations is even.
(b) The product of two odd permutations is even.
(c) The product of an even and an odd permutation is odd.
Algebraic Structures 211
f (p) = q0 ◦ p, p ∈ An .
q0 ◦ p1 = q0 ◦ p2 . (4.17)
q0 ◦ (q0 ◦ p1 ) = q0 ◦ (q0 ◦ p2 );
Thus, f is one-to-one.
Now, let q ∈ Bn . Then, q0 ◦ q ∈ An , and
f (q0 ◦ q) = q0 ◦ (q0 ◦ q) = (q0 ◦ q0 ) = 1A ◦ q = q,
which means that f is an onto function. Since f : An −→ Bn is one-to-one
and onto, we conclude that An and Bn have the same number of elements.
Note that An ∩ Bn = φ, since no permutation can be both even and odd. Also,
by theorem, |An ∪ Bn | = n!
n! = |An ∪ Bn | = |An | + |Bn | − |An ∩ Bn | = 2|An |.
n!
Hence, we have |An | = |Bn | = .
2
Solution.
We have
1 2 3 4 5 6 1 2 3 4 5 6
(4, 1, 3, 5) = and (5, 6, 3) = .
3 2 5 1 4 6 1 2 5 4 6 3
1 2 3 4 5 6 1 2 3 4 5 6
Then, (4, 1, 3, 5)◦(5, 6, 3) = ◦
3 2 5 1 4 6 1 2 5 4 6 3
1 2 3 4 5 6
=
3 2 4 1 6 5
1 2 3 4 5 6 1 2 3 4 5 6
and (5, 6, 3)◦(4, 1, 3, 5) = ◦
1 2 5 4 6 3 3 2 5 1 4 6
1 2 3 4 5 6
= .
5 2 6 1 4 3
Observe that
(4, 1, 3, 5) ◦ (5, 6, 3) 6= (5, 6, 3) ◦ (4, 1, 3, 5)
and that neither product is a cycle.
= {1, 2, 3, 4, 5, 6, 7, 8} be
2. Let A a set. Then, write the permutation
1 2 3 4 5 6 7 8
p= as a product of disjoint cycles.
3 4 6 5 2 1 8 7
Solution.
We start with 1 and find that p(1) = 3, p(3) = 6, and p(6) = 1, so
we have the cycle (1, 3, 6). Next, we choose the first element of A
that has not appeared in a previous cycle. We choose 2, and we have
P (2) = 4, p(4) = 5, and p(5) = 2, so we obtain the cycle (2, 4, 5).
We now choose 7, the first element of A that has not appeared in
a previous cycle. Since p(7) = 8 and p(8) = 7, we obtain the cycle
(7, 8). We can then write p as a product of disjoint cycles as
p = (7, 8) ◦ (2, 4, 5) ◦ (1, 3, 6).
1 2 3 4 5 6 7
3. Is the permutation p = even or odd?
2 4 5 7 6 3 1
Solution.
We first write p as a product of disjoint cycles, obtaining
Solution.
Given A = (1 2 3 4 5), B = (2 3)(4 5).
1 2 3 4 5 1 2 3 4 5
AB =
2 3 4 5 1 1 3 2 5 4
1 2 3 4 5
=
3 2 5 4 1
= (1 3 5).
8. If A = {1, 2, 3, 4, 5, 6, 7, 8}, then express the following permutations
as a product of disjoint cycles.
1 2 3 4 5 6 7 8
(i) p =
6 5 7 8 4 3 2 1
1 2 3 4 5 6 7 8
(ii) p = .
2 3 1 4 6 7 8 5
Solution.
Hence, (g ◦ f )−1 = f −1 ◦ g −1 .
1 2 3 4 5 6 7 1 2 3 4 5 6 7
11. Let p1 = and p2 = .
7 3 2 1 4 5 6 6 3 2 1 5 4 7
(i) Compute p1 ◦ p2 .
(ii) Compute p−11 .
(iii) Is p1 an even or odd permutation? Explain.
Solution.
1 2 3 4 5 6 7 1 2 3 4 5 6 7
(i) p1 ◦ p2 = ◦
7 3 2 1 4 5 6 6 3 2 1 5 4 7
1 2 3 4 5 6 7
= .
5 2 3 7 4 1 6
1 2 3 4 5 6 7
(ii) p−1
1 = 4 3 2 5 6 7 1 .
(iii) p1 = (1 7 6 5 4) ◦ (2 3)
= (1 4) ◦ (1 5) ◦ (1 6) ◦ (1 7) ◦ (2 3)
= product of odd number of transpositions.
Therefore, p1 is an odd permutation.
12. If x = (1 2 3), y = (2 4 3), and z = (1 3 4), then show that
xyz = 1.
Solution.
1 2 3 4
Given x = (1 2 3) =
2 3 1 4
216 Discrete Mathematical Structures
1 2 3 4
y = (2 4 3) =
1 4 2 3
1 2 3 4
z = (1 3 4) = .
3 2 4 1
1 2 3 4 1 2 3 4 1 2 3 4
Therefore, xyz = ◦ ◦
2 3 1 4 1 4 2 3 3 2 4 1
1 2 3 4 1 2 3 4
= ◦
4 2 1 3 3 2 1 4
1 2 3 4
= = 1.
1 2 3 4
Examples:
1. The set of all integers Z, the set of all rational numbers Q, the set
of all real numbers R are rings under the usual addition and usual
multiplication.
2. The set of all n × n matrices Mn is a ring under the matrix addition
and matrix multiplication.
3. If n is a positive integer, then Zn = {[0], [1], . . . , [n − 1]} is a
ring under +n , the addition modulo n, and ×n , the multiplication
modulo n.
218 Discrete Mathematical Structures
Examples:
4. The ring (Z10 , +10 , ×10 ) is not an integral domain since 5 ×10 2 = 0,
even though 5 6= 0, 2 6= 0 in Z10 .
5. The ring Z of all integers is an integral domain but not a field.
Proof.
Let (R, +, •) be a finite integral domain.
To prove: (R − {0}, •) is a group, that is, to prove
(i) there exists an element 1 ∈ R such that
1 · a = a · 1 = a, for all a ∈ R (since 1 ∈ R is an identity)
(ii) for every element of 0 6= a ∈ R, there exists an element a−1 ∈ R
such that
a · a−1 = a−1 · a = a.
Let R − {0} = {a1 , a2 , a3 , . . . , an }.
Let a ∈ R − {0}. Then, the elements aa1 , aa2 , . . . , aan are all in R − {0},
and they are all distinct. That is, if a · ai = a · aj , i 6= j, then a · (ai − aj ) = 0.
Since R is an integral domain and a 6= 0, we must have
ai − aj = 0 =⇒ ai = aj , which is a contradiction.
Therefore, R − {0} has exactly n elements, and R is a commutative ring
with cancellation law. Hence, we get
a = a · ai0 , for some i0 (since a ∈ R − {0}).
That is, a · ai0 = ai0 · a (since R is commutative).
Thus, let x = a · ai for some ai ∈ R − {0}, and
y · ai0 = a · ai0 = (ai · a)ai0 = ai · a = a · aj = y.
Therefore, ai0 is unity in R − {0}. We write it as 1.
Since 1 ∈ R − {0}, there exists an element aak ∈ R − {0} such that
aak = 1.
If a 6= 0, then a−1 ∈ F .
Therefore, a · b = 0
=⇒ a−1 · (a · b) = a−1 · 0
=⇒ 1 · b = 0
=⇒ b = 0.
Hence, the theorem is proved.
Note:
The converse of the above Theorem 4.2.81 need not be true.
Proof.
Let R be an integral domain and a · b = a · c and a 6= 0, for all a, b, c ∈ R.
We have a · b − a · c = 0 =⇒ a · (b − c) = 0.
Therefore, since R is an integral domain and a 6= 0, b − c = 0. (R has no
zero divisor).
Therefore, b = c. Hence, the cancellation law holds.
Converse Part: Assume that the cancellation law holds in a ring R.
Let a · b = 0, for a 6= 0 and b ∈ R. We have
ab = 0 = a0
=⇒ b = 0.
Thus, ab = 0 in R =⇒ a = 0 or b = 0.
Therefore, R has no zero divisors.
Therefore, R is an integral domain.
TABLE 4.1
Composition Table for +4
+4 [0] [1] [2] [3]
[0] [0] [1] [2] [3]
[1] [1] [2] [3] [0]
[2] [2] [3] [0] [1]
[3] [3] [0] [1] [2]
Algebraic Structures 221
TABLE 4.2
Composition Table for ×4
×4 [0] [1] [2] [3]
[0] [0] [0] [0] [0]
[1] [0] [1] [2] [3]
[2] [0] [2] [0] [2]
[3] [0] [3] [2] [1]
a +4 (b +4 c) = (a +4 b) +4 c
and a ×4 (b ×4 c) = (a ×4 b) ×4 c
since 0 +4 (1 +4 2) = 0 +4 3 = 3
and (0 +4 1) +4 2 = (1 +4 2) = 3.
∴ (0 +4 1) +4 2 = (0 +4 1) +4 2.
Also, 1 ×4 (2 ×4 3) = 1 ×4 2 = 2
and (1 ×4 2) ×4 3 = 2 ×4 3 = 2.
∴ 1 ×4 (2 ×4 3) = (1 ×4 2) ×4 3.
Solution.
We know the following:
(Z, +) is an abelian group.
(Z, ×) is a monoid.
The operation × is distributive over +.
(Z, ×) is commutative.
(Z, +, ×) is without zero divisors.
(Z, +, ×) is an integral domain.
3. Give an example of a ring which is not a field.
Solution.
The ring Z of all integers is an integral domain but not a field.
5.1 Introduction
In this chapter, we focus on partially ordered sets, lattices, Boolean algebra,
and their properties. These structures are useful in set theory, algebra, sorting,
and searching and in the construction of logical representation for computer
science. The concept of the lattices is a special case of a partially ordered set.
Boolean algebra is a special lattice.
223
224 Discrete Mathematical Structures
1
Hasse diagram of P
Example 5.2.10 Consider the set X = {2, 3, 6, 12, 24, 36} and the relation
“≤” is defined as x ≤ y if and only if x divides y. The Hasse diagram of the
poset hX, ≤i is shown below.
24 36
12
2 3
Hasse diagram of X
Lattices and Boolean Algebra 225
Note:
1. Hasse diagram is named after the twentieth-century German
mathematician Helmut Hasse.
2. In a digraph, if we apply the following rules, then we get Hasse
diagram.
(i) Each vertex of a poset P must be related to itself. So, the arrows
from vertex to itself are not necessary.
(ii) If a vertex b appears above vertex a and if vertex a is connected
to vertex b by an edge, then we have aRb; so, direction arrows
are not necessary.
(iii) If vertex c is above a and if c is connected to a by a sequence
of edges, then we have aRc.
(iv) The vertices are denoted by points rather than by circles.
Example 5.2.11 Let A = {a, b}. Let B = P (A) = {{φ}, {a}, {b}, {a, b}}.
Then, ⊆ is a relation on A whose digraph and Hasse diagram are given in
Figures 5.1 and 5.2.
{a,b}
{a}
{b}
FIGURE 5.1
Digraph of hB, ⊆i
{a,b}
{a} {b}
FIGURE 5.2
Hasse diagram of hB, ⊆i
226 Discrete Mathematical Structures
Solution.
(i) Since a ≥ a for every integer a, the relation ≥ is reflexive.
(ii) If a ≥ b and b ≥ a, then a = b. Hence, ≥ is antisymmetric.
(iii) The relation ≥ is transitive since a ≥ b and b ≥ c imply that
a ≥ c.
Hence, ≥ is a partial ordering on the set of integers, and hZ, ≥i is
a poset.
2. Show that the inclusion relation ⊆ is a partial ordering on the power
set of a set S.
Solution.
(i) Since A ⊆ A, whenever A is a subset of S, the relation ⊆ is
reflexive.
(ii) Since A ⊆ B and b ⊆ A imply that A = B, the relation ⊆ is
antisymmetric.
(iii) Since A ⊂ B and B ⊂ C imply that A ⊆ C, the relation ⊆ is
transitive.
Therefore, the relation ⊆ is a partial ordering on P (S), and
hP (S), ⊆i is a poset.
3. Let R be a binary relation on the set of all positive integers such
that R = {(a, b)/a = b2 }. Is R reflexive, symmetric, antisymmetric,
transitive, an equivalence relation, or a partial order relation?
Solution.
(i) R = {(a, b)/a, b are positive integers and a = b2 }.
For R to be reflexive, we should have aRa, for all positive
integers a. But aRa holds only when a = a2 by hypothesis.
Now, a = a2 is not true for all positive integers. In fact, only
when a = 1, we have a = a2 . Hence, R is not reflexive.
(ii) For R to be symmetric, if aRb holds, then we should have bRa.
But aRb implies a = b2 . But a = b2 does not imply b = a2
always for positive integers. For instance, 16 = 42 , but 4 6= 162 .
Hence, aRb does not imply bRa. Hence, R is not symmetric.
(iii) For R to be antisymmetric, for positive integers a, b if aRb and
bRa hold, then a = b. aRb implies a = b2 , and bRa implies
b = a2 . Hence, if a = b2 and b = a2 , then a = b2 = (a2 )2 = a4 ,
that is, a4 − a = 0, that is, a(a3 − 1) = 0. Since a is a positive
Lattices and Boolean Algebra 227
Solution.
{a,b,c}
{a} {a,b}
{a} {b}
{a,b,c,d}
{a,c} {a,d}
{a,b} {b,c} {c,d}
{b,d}
{a} {c}
{b} {d}
(iv)
Hasse diagram of (iv)
8. Which elements of the poset h{2, 4, 5, 10, 12, 20, 25}, |i are maximal,
and which of them are minimal?
Solution.
The Hasse diagram is shown in Figure 5.3.
From the Hasse diagram in Figure 5.3, this poset shows that the
maximal elements are 12, 20, and 25 and the minimal elements are
12 20
25
4 10
2 5
FIGURE 5.3
Hasse diagram of the given poset
Lattices and Boolean Algebra 229
2 and 5. As this example shows, a poset can have more than one
maximal element and more than one minimal element.
9. Determine whether the posets represented by each of the Hasse
diagrams in the following figure have a greatest element and a least
element.
b c d d e d d
c c
b c
a a b a
a b
Solution.
(i) The least element of the poset with Hasse diagram (i) is a. This
poset has no greatest element.
(ii) The poset with Hasse diagram (ii) has neither a least nor a
greatest element.
(iii) The poset with Hasse diagram (iii) has no least element. Its
greatest element is d.
(iv) The poset with Hasse diagram (iv) has the least element a and
greatest element d.
10. Draw the Hasse diagram of the set of partitions of 5.
Solution.
5
4+1 3+2
3+1+1 2+2+1
2+1+1+1
1+1+1+1+1
Hasse diagram of the set of partitions of 5
230 Discrete Mathematical Structures
5=5
5=4+1
5=3+2
5=3+1+1
5=2+2+1
5=2+1+1+1
5 = 1 + 1 + 1 + 1 + 1.
Proof.
Let a, b, c ∈ L. Then by the definition of GLB of a and b, we have
a?b≤a (5.1)
a ? (b ? c) ≤ (a ? b) ? c. (5.4)
Proof.
Given: a, b ∈ L. Both a ? b and b ? a are GLB of a and b. By the uniqueness
of GLB of a and b, we have a ? b = b ? a. Similarly, a ⊕ b = b ⊕ a holds good.
Theorem 5.3.7 [Absorption law] For any a, b ∈ L, we have the following:
(i) a ? (a ⊕ b) = a
(ii) a ⊕ (a ? b) = a.
Proof.
Let a, b ∈ L. Then, a ≤ a and a ≤ a ⊕ b. So, a ≤ a ? (a ⊕ b). On the other
hand, a ? (a ⊕ b) ≤ a. By antisymmetric property of ≤, we have a = a ? (a ⊕ b).
Similarly, we have a ⊕ (a ? b) = a, for all a, b ∈ L.
Proof.
First, let us prove that a ≤ b ⇐⇒ a ? b = a ⇐⇒ a ⊕ b = b.
Let us assume that a ≤ b, and also, we know that a ≤ a.
∴ a ≤ a ? b. (5.5)
a ? b ≤ a. (5.6)
Theorem 5.3.9 Let hL, ≤i be a lattice. For any a, b ∈ L, the following are
equivalent:
(i) a ≤ b
(ii) a ? b = a
(iii) a ⊕ b = b.
Proof.
First, consider (i) ⇐⇒ (ii).
We have a ≤ a. Assume a ≤ b. Therefore, a ≤ a ? b. By the definition of
GLB, we have
a ? b ≤ a.
Hence, by antisymmetric property, a ? b = a.
Assume that a ? b = a, but it is only possible if
a ≤ b =⇒ a ? b = a =⇒ a ≤ b.
Combining these two results, we have a ≤ b ⇐⇒ a ? b = a.
Similarly, a ≤ b ⇐⇒ a ⊕ b = b.
Now, consider (ii) ⇐⇒ (iii).
Assume a ? b = a, we have b ⊕ (a ? b) = b ⊕ a = a ⊕ b, but by absorption,
b ⊕ (a ? b) = b.
Hence, a ⊕ b = b.
By similar arguments, we can show that a ? b = a follows from a ⊕ b = b.
(ii) ⇐⇒ (iii)
Hence, the theorem is proved.
Theorem 5.3.10 Let hL, ≤i be a lattice. For any a, b ∈ L, the following
inequalities hold:
(1) Distributive Inequalities
(i) a ⊕ (b ? c) ≤ (a ⊕ b) ? (a ⊕ c)
(ii) a ? (b ⊕ c) ≥ (a ? b) ⊕ (a ? c).
(2) Modular Inequalities
(i) a ≤ c ⇐⇒ a ⊕ (b ? c) ≤ (a ⊕ b) ? c
(ii) a ≥ c ⇐⇒ a ? (b ⊕ c) ≥ (a ? b) ⊕ c.
Proof.
Since (ii) in (1) and (ii) in (2) are duals of (i) in (1) and (i) in (2) respectively,
it is enough to prove (i) in (1) and (i) in (2) only.
Consider (i) in (1).
Let a, b, c ∈ L. Since a ≤ a ⊕ b and a ≤ a ⊕ c, we have
a ≤ [(a ⊕ b) ? (a ⊕ c)].
Since b ? c ≤ b ≤ a ⊕ b and b ? c ≤ c ≤ a ⊕ c, we have
(b ? c) ≤ (a ⊕ b) ? (a ⊕ c).
Therefore, (a ⊕ b) ? (a ⊕ c) is an upper bound for a and b ? c, and hence
a ⊕ (b ? c) ≤ (a ⊕ b) ? (a ⊕ c).
Thus, (i) in (1) is proved.
Lattices and Boolean Algebra 235
Therefore, (a ? b) ⊕ (a ? c) ≤ a ⊕ a = a. (5.12)
Also, a ? b ≤ b, a ? c ≤ a ? c
=⇒ (a ? b) ⊕ (a ? c) ≤ b ⊕ (a ? c). (5.13)
=⇒ a = a ? a ≤ (a ⊕ b) ? (a ⊕ c). (5.14)
Further, b ≤ a ⊕ b; a ⊕ c ≤ a ⊕ c
=⇒ b ? (a ⊕ c) ≤ (a ⊕ b) ? (a ⊕ c). (5.15)
Solution.
f h
e e
d e g
f
c d
c d
b b c b
a a
The posets represented by the Hasse diagrams in (i) and (iii) are
both lattices because in each poset, every pair of elements has both
a least upper bound and a greatest lower bound. On the other hand,
the poset with the Hasse diagram shown in (ii) is not a lattice, since
the elements b and c have no least upper bound.
It is to be noted that each of the elements d, e, and f is an upper
bound, but none of these three elements precede the other two with
respect to the ordering of this poset.
2. Is the poset hZ+ , |i a lattice?
Solution.
Let a and b be two positive integers. The least upper bound
and greatest lower bound of these two integers are the least
common multiple and the greatest common divisor of these integers,
respectively. Hence, it follows that this poset is a lattice.
3. Explain why the partially ordered sets of Figures 5.4 and 5.5 are
not lattices.
FIGURE 5.4
Hasse diagrams of the given posets
e e f
d e
d d
b c
c b c
a b a
a
FIGURE 5.5
Hasse diagrams of the given posets
238 Discrete Mathematical Structures
Solution. Given:
(i) does not represent a lattice since e ⊕ f does not exist.
(ii) does not represent a lattice since b ⊕ c does not exist.
(iii) does not represent a lattice because neither d ⊕ c nor b ? c
exists.
4. Let the sets S0 , S1 , S2 , . . . , S7 be given by
S0
S1 S2
S3
S4
S5 S6
S7
Hasse diagram of hL, ⊆i
a2 a3
a4
a6
a5 a7
a8
Hasse diagram of hL, ⊆i
Note that hS1 , ≤i and hS2 , ≤i are sublattices of hL, ≤i, but hS3 , ≤i is not a
sublattice since a2 , a4 ∈ S3 but a2 ? a4 = a6 ∈ S3 . Also, note that hS3 , ≤i is a
lattice.
Definition 5.3.16 Direct Product of Lattices: Let hL, ?, ⊕i and hS, ∧, ∨i
be two lattices. The algebraic system hL×S, ·, +i in which the binary operations
“+” and “·” on L × S are such that for any (a1 , b1 ) and (a2 , b2 ) in L × S
(a1 , b1 ) · (a2 , b2 ) = (a1 ? a2 , b1 ∧ b2 )
(a1 , b1 ) + (a2 , b2 ) = (a1 ⊕ a2 , b1 ∨ b2 )
is called the direct product of the lattices hL, ?, ⊕i and hS, ∧, ∨i.
Remark 5.3.18 Observe that both the operations of meet and join are
preserved. These may be mappings which preserve only one of the two
operations. Such mappings are not lattice homomorphisms.
(a ? b) ⊕ c = (a ⊕ c) ? (b ⊕ c)
= (a ⊕ b) ? (b ⊕ c)
= b ⊕ (a ? c)
= b ⊕ (a ? b)
= b. (5.21)
From (5.20) and (5.21), we have
b = c.
Theorem 5.4.9 Every distributive lattice is modular.
Proof.
Let hL, ≤i be a distributive lattice.
For all a, b, c ∈ L, we have
a ⊕ (b ? c) = (a ⊕ b) ? (a ⊕ c).
Thus, if a ≤ c, then a ⊕ c = c and
a ⊕ (b ? c) = (a ⊕ b) ? c.
Hence, if a ≤ c, the modular equation is satisfied, and L is modular.
10 6
15
2 5 3
FIGURE 5.6
Hasse diagram of hD30 , |i
D6 = {1, 2, 3, 6}
D10 = {1, 2, 5, 10}
D15 = {1, 3, 5, 15}
S1 = {5, 10, 15, 30}
S2 = {3, 5, 15, 30}, etc. are lattices.
1 1
a2
b1 b3
b2
a1
a3
0 0
(i) (ii)
Hasse diagrams of given lattices
Solution.
In lattice (i),
a3 ? (a1 ⊕ a2 ) = a3 ? 1 = a3 = (a3 ? a1 ) ⊕ (a3 ? a2 )
a1 ? (a2 ⊕ a3 ) = 0 = (a1 ? a2 ) ⊕ (a1 ? a3 )
but a2 ? (a1 ⊕ a3 ) = a2 ? 1 = a2
(a2 ? a1 ) ⊕ (a2 ? a3 ) = 0 ⊕ a3 = a3 .
Hence, the lattice (i) is not distributive.
In lattice (ii),
244 Discrete Mathematical Structures
45
32
10 15
16 9 15
2 5 3 5 8
4 3 5
1 1 2
1
1
Solution.
a ≤ b =⇒ a ⊕ b = b
=⇒ (a ⊕ b) ? b0 = 0 since b ? b0 = 0
=⇒ (a ? b0 ) ⊕ (b ? b0 ) = 0
=⇒ a ? b0 = 0 since b ? b0 = 0.
a ? b0 = 0 =⇒ (a ? b)0 = 1
=⇒ a0 ⊕ (b0 )0 = 1
=⇒ a0 ⊕ b = 1.
a0 ⊕ b = 1 =⇒ (a0 ⊕ b) ? b0 = b0
=⇒ (a0 ? b0 ) ⊕ (b ? b0 ) = b0 (using distributive law)
=⇒ a0 ? b0 = b0 since b ? b0 = 0
=⇒ b0 ≤ a0 .
(a ∧ b) ∨ c = (a ∨ c) ∧ (b ∨ c) (since L is distributive)
= (a ∨ b) ∧ (b ∨ c)
= (b ∨ a) ∧ (b ∨ c)
= b ∨ (a ∧ c)
= b ∨ (a ∧ b)
=b
and (a ∧ b) ∨ c = (a ∧ c) ∨ c = c.
Thus, b = (a ∧ b) ∨ c = c, so that
a ∧ b = a ∧ c and a ∨ b = a ∨ c =⇒ b = c.
That is, the cancellation law is valid in a distributive lattice.
8. Show that the direct product of any two distributive lattices is a
distributive lattice.
246 Discrete Mathematical Structures
Solution.
Let L1 and L2 be two distributive lattices. Let x, y, z ∈ L1 × L2 ,
the direct product (lattice) of L1 and L2 . Then, x = (a1 , a2 ),
y = (b1 , b2 ), and z = (c1 , c2 ) for some a1 , b1 , c1 ∈ L1 and
a2 , b2 , c2 ∈ L2 . Now,
x ∨ (y ∧ z)
= (a1 , a2 ) ∨ ((b1 , b2 ) ∧ (c1 , c2 ))
= (a1 , a2 ) ∨ (b1 ∧ c1 , b2 ∧ c2 )
= (a1 ∨ (b1 ∧ c1 ), a2 ∨ (b2 ∧ c2 ))
= ((a1 ∨ b1 ) ∧ (a1 ∨ c1 ), (a2 ∨ b2 ) ∧ (a2 ∨ c2 ))
(since L1 and L2 are distributive lattices)
= ((a1 ∨ b1 ), (a2 ∨ b2 )) ∧ ((a1 ∨ c1 ), (a2 ∨ c2 ))
= ((a1 , a2 ) ∨ (b1 , b2 )) ∧ ((a1 , a2 ) ∨ (c1 , c2 ))
= (x ∨ y) ∧ (x ∨ z).
a b c
0
Hasse diagram of given lattice
Solution.
The elements a, b, and c are symmetric in the lattice. It is enough
to prove for any one of a, b, c.
We have the cases a < 1 and 0 < a.
Case (i): Let a < 1.
Let x1 = a and x3 = 1. Then
x1 ∨ (x2 ∧ x3 ) = a ∨ (x1 ∧ 1) = a ∨ x2
and (x1 ∨ x2 ) ∧ x3 = (a ∨ x2 ) ∧ 1 = a ∨ x2 .
Hence, x1 ∨ (x2 ∧ x3 ) = (x1 ∨ x2 ) ∧ x3 .
Case (ii): Let 0 < a.
Let x1 = 0 and x3 = a. Then
x1 ∨ (x2 ∧ x3 ) = 0 ∨ (x2 ∧ a) = x2 ∧ a
and (x1 ∨ x2 ) ∧ x3 = (0 ∨ x2 ) ∧ a = x2 ∧ a.
Hence, x1 ∨ (x2 ∧ x3 ) = (x1 ∨ x2 ) ∧ x3 .
Therefore, the above lattice is modular.
Lattices and Boolean Algebra 247
d e
a b
a b c
{a,b,c}
f (a ? b) = f (a) ∩ f (b)
f (a ⊕ b) = f (a) ∪ f (b)
f (a0 ) = [f (a)]c
f (0) = α
f (1) = β.
Remark 5.5.10 The binary operations ? and ⊕ are preserved under Boolean
homomorphism.
Proof.
Let hL, ?, ⊕,− , 0, 1i be a Boolean algebra. Then, L is a complemented and
distributive lattice.
De Morgan’s laws are
a⊕¯ b = ā ? b̄, a ¯? b = ā ⊕ b̄, for all ā, a, b ∈ L.
Assume that a, b ∈ L. There exist elements ā, b̄ ∈ L such that
a ⊕ ā = 1, a ? ā = 0, b ⊕ b̄ = 1, b ? b̄ = 0.
Lattices and Boolean Algebra 251
¯ b = ā ? b̄.
(i) Claim: a ⊕
(a ⊕ b) ⊕ (ā ? b̄) = [(a ⊕ b) ⊕ ā] ? [(a ⊕ b) ⊕ b̄]
= [a ⊕ ? a ⊕ b] ? [a ⊕ b ⊕ b̄]
= [a ⊕ b] ? [a ⊕ a]
= 1 ? 1 = 1.
(a ⊕ b) ? (ā ? b̄) = [(a ⊕ b) ? ā] ? [(a ⊕ b) ? b̄]
= [(a ? ā) ⊕ (b ? ā)] ? [(a ? b̄) ⊕ (b ? b̄)]
= [0 ⊕ (b ? ā)] ? [(a ? b̄) ⊕ 0]
= (b ? ā) ? (a ? b̄)
= b ? (ā ? a) ? b = b̄ ? 0 ? b̄ = 0.
Hence, claim (i) is proved.
(ii) Claim: a ¯? b = ā ⊕ b̄.
(a ? b) ⊕ (ā ⊕ b̄) = [(a ? b) ⊕ ā] ⊕ [(a ? b) ⊕ b̄]
= [(a ⊕ ā) ? (b ⊕ ā)] ⊕ [(a ⊕ b̄) ? (b ⊕ b̄)]
= [1 ? (b ⊕ ā)] ⊕ [(a ⊕ b̄) ? 1]
= (b ⊕ ā) ⊕ (a ⊕ b̄)
= b ⊕ (ā ⊕ a) ⊕ b̄
= b ⊕ 1 ⊕ b̄ = b ⊕ b̄ = 1.
(a ? b) ? (ā ⊕ b̄) = [(a ? b) ? ā] ⊕ [(a ? b) ? b̄]
= (a ? ā ? b) ⊕ (a ? b ? b̄)
= (0 ? b) ⊕ (a ? 0)
= 0 ? 0 = 0.
Hence, claim (ii) is proved.
Therefore, De Morgan’s laws are proved.
Theorem 5.5.13 In a Boolean algebra hL, ?, ⊕i, the complement ā of any
element a ∈ L is unique.
Proof.
Let a ∈ L have two complements b, c ∈ L.
By definition, we have a ? b = 0, a ⊕ b = 1, a ? c = 0, a ⊕ c = 1.
Then, we have
b=b?1
= b ? (a ⊕ c)
= (b ? a) ⊕ (b ? c)
= 0 ⊕ (b ? c)
=b?c (5.22)
252 Discrete Mathematical Structures
and
c=c?1
= c ? (a ⊕ b)
= (c ? a) ⊕ (c ? b)
= 0 ⊕ (c ? b)
=c?b
= b ? c. (5.23)
From (5.22) and (5.23), we have b = c.
Therefore, every element of L has a unique complement.
(i) a ? a = a (ii) a ⊕ a = a.
Solution.
(i) To prove: a ? a = a.
(ii) To prove: a ⊕ a = a.
(i) a ⊕ a = 1 (ii) a ? 0 = 0.
Solution.
(i) To prove: a ⊕ 1 = 1.
(ii) To prove: a ? 0 = 0.
[(b0 + c + a)(b0 + c + a0 )]
[(c0 + a + b)(c0 + a + b0 )]
= (a0 + b + cc0 )(b0 + c + aa0 )(c0 + a + bb0 )
= (a0 + b + 0)(b0 + c + 0)(c0 + a + 0)
= (a0 + b)(b0 + c)(c0 + a).
10. Prove that a lattice with five elements is not a Boolean algebra.
11. Show that in a Boolean algebra, a ⊕ (a0 ? b) = a ⊕ b.
12. Show that in a Boolean algebra, a ? (a0 ⊕ b) = a ? b.
13. Show that in a Boolean algebra, (a ? b) ⊕ (a ? b0 ) = a.
14. Show that in a Boolean algebra, (a ? b ? c) ⊕ (a ? b) = a ? b.
15. Show that in a Boolean algebra, a ≤ b =⇒ a + bc = b(a + c).
16. Simplify the Boolean expression: (a ? c) ⊕ c ⊕ [(b ⊕ b0 ) ? a].
17. Simplify the Boolean expression: (1 ? a) ⊕ (0 ? a0 ).
Bibliography
257
Index
259
260 Index
Improved
A streamlined A single point search and
experience for of discovery discovery of
our library for all of our content at both
customers eBook content book and
chapter level