100% found this document useful (1 vote)
271 views718 pages

B08CVQHQ8P

This document provides an overview and table of contents for a textbook on discrete structures and graph theory for computer science and engineering students. The textbook covers topics like set theory, relations, functions, algebraic structures, Boolean algebra, trees, and graphs. It is authored by J.P. Chauhan and published by Krishna Prakashan Media Pvt. Ltd. for Indian university students. The textbook aims to provide a balanced treatment of theory, technology, and design techniques for discrete mathematics concepts.

Uploaded by

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

B08CVQHQ8P

This document provides an overview and table of contents for a textbook on discrete structures and graph theory for computer science and engineering students. The textbook covers topics like set theory, relations, functions, algebraic structures, Boolean algebra, trees, and graphs. It is authored by J.P. Chauhan and published by Krishna Prakashan Media Pvt. Ltd. for Indian university students. The textbook aims to provide a balanced treatment of theory, technology, and design techniques for discrete mathematics concepts.

Uploaded by

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

Krishna's

DISCRETE STRUCTURES
& GRAPH THEORY
[Discrete Mathematics]
(For B.Tech. and M.C.A. students of all Colleges affiliated to Indian Universities)

By

J.P. Chauhan
M.Sc. (Mathematics)
C.C.S. University, Meerut (U.P.)

KRISHNA Prakashan Media (P) Ltd.


KRISHNA HOUSE, 11, Shivaji Road, Meerut-250 001 (U.P.), India
Jai Shri Radhey Shyam

Dedicated
to

Lord

Krishna
Author & Publishers
About the Book

 Indepth knowledge of Discrete Mathematical Structures.

 Covers the complete requirement of B.E., B.Tech., M.C.A. and B.Sc (C.S.) students.

 Contains complete solutions of previous year examination questions.

 Complete and detailed answers.

 Important Questions for reference are included for upcoming exams.

 The book presents a balanced treatment of the theory, technology and system design
techniques.

Acknowledgement
This book has been written in simple and lucid style for better understanding and
appreciation of study. It has been compiled systematically to enable sure one to evaluate detail
of the book. Needless to say, I am deeply indebted to the publisher, Shri Satyendra Rastogi, for
providing continuous support and enthusiasm.
This acknowledgement would fall short of completion if I fail to mention the entire team of
Krishna Prakashan Media (P) Ltd. I would like to thank the contributors for their creativity
and especially their excellent work.
Finally, we shall be very grateful to all instructors and students who send us their helpful
suggestions.

J.P. Chauhan

(iv)
Syllabus
ECS - 303
B.Tech. - A.K.T.U. (Sem. III)
(Compulsory for CS & IT) Elective for all other Branches
L T P
3 1 0

Unit-I
Set Theory: Introduction, Combination of sets, Multisets, Ordered pairs. Proofs of some general identities on
sets.
Relations: Definition, Operations on relations, Properties of relations, Composite Relations, Equality of
relations, Recursive definition of relation, Order of relations.
Functions: Definition, Classification of functions, Operations on functions, Recursively defined functions.
Growth of Functions.
Natural Numbers: Introduction, Mathematical Induction, Variants of Induction, Induction with Nonzero
Base cases. Proof Methods, Proof by counter example, Proof by contradiction.

Unit-II
Algebraic Structures: Definition, Groups, Subgroups and order, Cyclic Groups, Cosets, Lagrange's theorem,
Normal Subgroups, Permutation and Symmetric groups, Group Homomorphisms, Definition and
elementary properties of Rings and Fields, Integers Modulo n.

Unit-III
Partial order sets: Definition, Partial order sets, Combination of partial order sets, Hasse diagram.
Lattices: Definition, Properties of lattices Bounded, Complemented, Modular and Complete lattice.
Boolean Algebra: Introduction, Axioms and Theorems of Boolean algebra, Algebraic manipulation of
Boolean expressions. Simplification of Boolean Functions, Karnaugh maps, Logic gates, Digital circuits and
Boolean algebra.

Unit-IV
Propositional Logic: Proposition, well formed formula, Truth tables, Tautology, Satisfiability, Contradiction,
Algebra of proposition, Theory of Inference. Predicate Logic: First order predicate, well formed formula of
predicate, quantifiers, Inference theory of predicate logic.

Unit-V
Trees : Definition, Binary tree, Binary tree traversal, Binary search tree.
Graphs: Definition and terminology, Representation of graphs, Multigraphs, Bipartite graphs, Planar graphs,
Isomorphism and Homeomorphism of graphs, Euler and Hamiltonian paths, Graph coloring,
Recurrence Relation & Generating function: Recursive definition of functions, Recursive algorithms,
Method of solving recurrences.
Combinatories: Introduction, Counting Techniques, Pigeonhole Principle, Polya's Counting Theory.

(v)
3.9 Number of Functions 107
Unit-I
3.10 Recursively Defined Function 119
Chapter 1: Set Theory.......................(1-44) 3.11 Factorial Function 119
1.1 Set 3 3.12 Recursive Definition of Fibonacci
1.2 Types of Sets 4 Function 119
1.3 Subsets 6 3.13 Ackermann’s Function 120
1.4 Operations of Sets 7 3.14 Primitive Recursive Function 121
1.5 Principle of Duality 12 3.15 Growth of Functions 124
1.6 Cartesian Product of Sets 12 Chapter 4: Natural Numbers......(129-158)
1.7 Multiset 17 4.1 Peano’s Axioms 129
1.8 Operations on Multiset 18 4.2 Mathematical Induction 130
1.9 Venn Diagrams 20 4.3 Variant of Induction 147
1.10 Countable and Uncountable Gets 33 4.4 Proof Methods or Notion of Proof 147
Chapter 2: Relations.......................(45-78) 4.5 Method of Contraposition 148
2.1 Binary Relation 45 4.6 Proof by Contradiction 151
2.2 Total Number of Distinct Binary 4.7 Proof by Counter-Example 153
Relation from Set A to Set B 45 4.8 Proof by Cases 153
2.3 Some Operations on Sets 47
2.4 Operations on Relation 47 Unit-2
2.5 Properties of Relation 48
Chapter 5: Algebraic Structures.....(159-234)
2.6 Equality of Relation 49
5.1 Binary Operation on a Set 161
2.7 Composite Relation 49
5.2 Algebraic Structure 162
2.8 Recursion and Recurrence Relations 51
5.3 Group 164
2.9 Order of Relation 52
5.4 Some Definitions 166
2.10 Matrix Representation of Relations 54
5.5 Order of a Finite Group 167
2.11 Digraphs 56
5.6 Addition Modulo m 179
2.12 Equivalence Classes 59
5.7 Multiplication Modulo m 180
2.13 Quotent Set 60
5.8 Residue Classes of the Set of Integers 183
Chapter 3: Functions....................(79-128) 5.9 Order of an Element of a Group 186
3.1 Definition 79 5.10 Subgroup 198
3.2 Function (Mathematical Definition) 79 5.11 Cyclic Group 206
3.3 Classification of Function or Type 5.12 Simple Properties of Cyclic Group 207
of Functions 81 5.13 Cosets 209
3.4 Difference between Function and 5.14 Lagrange's Theorem 211
a Relation 86
5.15 Normal Subgroup 212
3.5 Kind of Mappings 87
5.16 Quotient Group or Factor Group 214
3.6 Even and Odd Functions 88
5.17 Permutation Group of Symmetric
3.7 Inverse Function (Inverse Mapping) 90 Group 216
3.8 Operations on Real Valued Function 101 5.18 Group Homomorphism 222

(vi)
5.19 Isomorphism of Groups 222 Chapter 7: Boolean Algebra........(303-366)
5.20 Properties of Homomorphism 7.1 Introduction 303
and Isomorphism 223 7.2 Boolean Algebra or Axioms of
5.21 Ring 226 Boolean Algebra 303
5.22 Type of Ring 227 7.3 Duality 307
5.23 Integral Domain 229 7.4 Theorems of Boolean Algebra 308
5.24 Field 229 7.5 Algebraic Manipulation of Boolean Expression
or Algebra of Propositions (A.P.) 312
5.25 Division Ring or Skew Field 229
7.6 Simplification of Booleam Function 325
5.26 Characteristic 229
7.7 Conjunctive Normal Form or Dual Canonical
5.27 Elementary Properties of a Ring 230 Form or Product of the Sums POS) Form 328
7.8 Minimization of Boolean Functions 341
Unit-3 Chapter 8: Logic Gates (Circuits)....(367-404)
Chapter 6: Partial Order Sets 8.1 Logic Gates and Circuits 367
and Lattices..............(235-302) 8.2 Combinational Circuits 368
6.1 Partial Order Set (Poset) 237 8.3 NAND-gate and NOR-gate 369
6.2 Total Ordering Relation or 8.4 Multiple Input Elements (or Gates) 373
Linearly Ordered or Chain 239 8.5 Equivalent Circuits 374
6.3 Immediate Predecessor or Immediate 8.6 Exclusive OR Gate or XOR Gate 375
Successor 239 8.7 Exclusive-NOR (XNOR) Gate 375
6.4 Hasse Diagram or Partially Ordered 8.8 Method for Draw Logic Circuit From
Set or Representation of Posets 240 Boolean Equation 376
6.5 Combination of Partial Order Sets 8.9 Method for Finding Boolean Function
or Components of Poset 259 or Expression From a Logic Circuit 376
6.6 Well Ordered Set 264 8.10 Digital Circuits or The Logic Diagram 376
6.7 Complete Order 265 8.11 Applications of Logic Gates 378
6.8 Dual of a Poset 265
6.9 Product of Two Posets 266 Unit-4
6.10 Isomorphic Posets 266 Chapter 9: Propositional Logic.....(405-492)
6.11 Lattice 269 9.1 Statement 407
6.12 Dual Lattice 276 9.2 Logical Connectives or Sentence
6.13 Properties of Lattices 276 Connectives 408
6.14 Sub-lattice 280 9.3 Kinds of Sentences 409
6.15 Isomorphic Lattice 281 9.4 Truth Value of A Statement 410
6.16 Distributive Lattice 283 9.5 Truth Tables 418
6.17 Complete Lattice 283 9.6 Basic Logical Operations 418
9.7 Kinds of Conditional 422
6.18 Complement of an Element in a Lattice 283
9.8 Algebra of Proposition 434
6.19 Complemented Lattice 283
9.9 Truth-Table for Well Formed Formula 439
6.20 Complemented Complete Lattice 284
9.10 Normal Forms 457
6.21 Bounded Lattice 284
9.11 Connectivity NOR AND NAND 460
6.22 Direct Product of Lattices 284
9.12 Law of Duality 474
6.23 Modular Lattices 284

(vii)
9.13 Predicate or Propositional Function or 11.19 Eulerian Paths and Circuits 576
Open Sentence 476 11.20 Hamiltonian Path 580
9.14 Quantifiers 478 11.21 Graph Colouring 586
9.15 Negation of A Quantifier 479 11.22 Chromatic Number 587
9.16 De-Morgan Laws 480 11.23 Edge Colouring 588
11.24 Five-Colour Theorem 589
Unit-5 11.25 Four Colour Conjecture 590
11.26 Chromatic Polynomials 591
Chapter 10: Trees and their
11.27 Uniquely Colourable Graph 592
Properties...............(493-528)
Chapter 12: Recurrence Relations..... (607-632)
10.1 Introduction 495
10.2 Tree 495 12.1 Recursive Formula 607
10.3 Decision Trees or Sorting Trees 499 12.2 Linear Recurrence Relation with
constant Coefficients 608
10.4 Tree Searching (Traversing) 502
12.3 Non-homogeneous Linear Recurrence
10.5 Binary Tree Construction 504 Relation or Difference Equations 615
10.6 Relationship between General Trees 12.4 Recursive Algorithm 626
and Binary Trees 506
10.7 Maximum and Minimum Possible Height Chapter 13: Discrete Numeric and Generating
of An n-Vertex Binary Tree 507 Functions.......................(633-672)
10.8 Spanning Tree 509
13.1 Discrete Numeric Functions 633
10.9 Rank and Nullity of a Graph 512
13.2 Manipulation of Numeric Functions 635
10.10 Fundamental Circuits 512
13.3 The Forward Difference and the Backward
10.11 Finding all Spanning Trees of a Graph 513 Difference of a Numeric Function 637
Chapter 11: Graph Theory..........(529-606) 13.4 Asymptotic Behavior of Numeric
Functions 640
11.1 Graph 529
13.5 O(f) or order f or BIG-OH of f 641
11.2 Directed Graph (Digraph) 533
13.6 Generating Functions 648
11.3 Isomorphic Graphs 535
13.7 Solution of Recurrence Relations by the
11.4 Regular Graph 537 Method of Generating Functions 660
11.5 Subgraph 537
Chapter 14: Combinatories.........(673-710)
11.6 Operations on Graphs 539
14.1 Counting Techniques 673
11.7 Labeling of a Graph 541
14.2 Combinations 688
11.8 Complete and Bipartite Graphs 542
14.3 Practical Problems on Combinations 691
11.9 Matrix Representation of Graphs 547
14.4 Permutations and Combinations with
11.10 Matrix Representation of Digraphs 551
Unlimited Repetitions 697
11.11 Walk 562
14.5 Pigeonhole Principle 701
11.12 Paths 562
11.13 Circuit 563 Chapter 15: Polya's Theorem.......(711-716)
11.14 Connected, Disconnected, Strongly Connected 15.1 Introduction to Polya's Theorem 711
and Weakly Connected Graphs 564 15.2 Polya's Enumeration (or Counting)
11.15 Applications of Graphs 565 Theorem 712
11.16 Basic Terminology 571 15.3 Applications of Polya's Theorem in Graph
Enumeration 714
11.17 Planar Graphs 572
11.18 Euler’s Formula 575

(viii)
Unit-1

C hapter
1. : Set Theor y
2. : Relations
3. : Functions
4. : Natural Numbers
1.1 Set
The theory of sets was developed by German Mathematician George Canter (1845-1918 A.D)
A well defined collection of distinct objects is called a Set.
(i) The objects in a set are called its members or elements.
(ii) We denote sets by capital letters, A, B, C, X, Y, Z, etc.
(iii) The elements of a set are also represented by small letters a, b, c, x, y, z etc.
If a is an element of a set A, we write a ∈A i.e a belongs to A or a is an element of A. If a does not belong to A,
it can be written as a ∉ A
Illustrations
(i) The collection of all natural numbers denoted by N.
(ii) The collection all vowels in the English alphabet is the set containing given elements, namely a,
e, i, o, u.
(iii) The solution of the equation x 2 – 5x + 6 = 0 i.e, 2 and 3
(iv) The rivers of India.
(v) The collection of all even numbers less than 8, is the set containing the numbers 2, 4, 6.
(vi) The collection of all integers, all rational numbers and all real numbers are denoted by Z, Q and R.

1.1.1 Representation of Sets


There are two methods of representing a set

(a) Roster or tabular form


In this form, all the elements of a set are listed within braces {} and are separated by commas.

Example 1: Write the following sets in the roster form.


(i) A = Set of all factors of 12 (ii) B = Set of all even positive integers less than 20
(iii) C = Set of all letters in the word ‘MATHEMATICS’

Solution:
(i) All factors of 12 are 1, 2, 3, 4, 6, 12

∴ A = {1, 2, 3, 4, 6, 12}
(ii) All even positive integers less than 20 are 2, 4, 6, 8, 10, 12, 14, 16, 18

∴ B = {2, 4, 6, 8, 10, 12, 14, 16, 18}


4 Discrete Mathematical Structures

(iii) The set of all letters in the word MATHEMATICS is given by


C = {M, A, T, H, E, I, C, S}

Note:
(i) The repeated letters are taken only once
(ii) In a set relation, order is not important. Hence, the set of all factors of 12 can also be written as
{2, 4, 6, 1, 12, 3} instead of {1, 2, 3, 4, 6, 12}

(b) Rule Method or Set Builder Form


In this form, we list the property satisfied by all the elements of the set.
It is written as { x : x satisfied the property}
i.e., The set of all those x such that each x has properties P.

Example 2: Write the set A = {1, 2, 3, 4, 5, 6, 7, 8} in the set-builder form.


Solution: We have A = Set of all natural number less than 9. Thus
A = { x : x ∈ N and x < 9}

Example 3: Write the set E =  , , , , , , ,  in the set-builder form.


1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9

 n 
Solution: We have E =  x : x = , Where n ∈ N and 1 ≤ n ≤ 8
 n + 1 

Illustration: The set of complex numbers can be written as C = {a + i b : a, b ∈ R }

1.2 Types of Sets


1.2.1 Empty Set
A set containing no element at all is called the empty set or the null set or the void set, denoted by φ or { }.
A set which has at least one element is called a non-empty set.

Illustrations
(i) { x : x ∈ N and 2< x < 3} = φ (ii) { x : x ∈ R and x 2 = –1} = φ

(iii) { x : x 2 = 9 and x is an even integer } = φ

1.2.2 Singleton Set


A set containing exactly one element is called singleton set.

Illustrations
(i) {0} is a singleton set whose element is 0
(ii) { x : x ∈ N and x 2– 9 = 0} = {3} which is singleton set.
Set Theory 5

1.2.3 Finite and Infinite Sets


Set is said to be finite if it consists of only finite number of elements. A set which is not finite is called an
infinite set. The number of distinct elements in a finite set A is denoted by n (A).

Illustrations of Finite Sets


(i) Let A = {2, 4, 6, 8, 10}. Then, A is finite set and n (A ) = 5.
(ii) The set of all persons on the earth is a finite set.
(iii) The set of all animals on the earth is a finite set.

Illustrations of Infinite Sets


(i) The sets of all points on the arc of a circle is an infinite set.
(ii) The set of all positive integer multiples of 5 is an infinite set.
(iii) N = set of all natural number = {1, 2, 3, 4, . . . . . . . . .}
(iv) P = Set of all primes = {2, 3, 5, 7, 11, 13. . . . . . . . .}

1.2.4 Equal Sets


Two sets A and B are said to be equal, if they have exactly the same elements and we write, A=B. If the sets
A and B are not equal than A ≠ B.
(i) The elements of a set may be listed in any order
Thus, {1, 2, 3} = {2, 1, 3} = {3, 2, 1}, etc.
(ii) The repetition of elements in a set has no meaning. Thus
{1, 2, 3} = {1, 1, 2, 3, 2} = {1, 1, 1, 2, 2, 3, 3, 3} etc.

1.2.5 Equivalent Sets


Two finite sets A and B are said to be equivalent if n (A) = n (B).

Illustration: Let A = { 2, 3, 4}, B = {7, 8, 9}

Then n (A) = n (B) = 3

So, A and B are equivalent. But A ≠ B

1.2.6 Cardinal number of a Set


The number of distinct elements containing in a finite set A is called cardinal number of A and is denoted by n (A).
6 Discrete Mathematical Structures

1.3 Subsets
A set A is said to be subset of set B, if every element of A is also an element of B and we write, A ⊆ B.

1.3.1 Super Set


If A ⊆ B then B is called a super set of A and we write B ⊇ A.

1.3.2 Proper Subset


If A ⊆ B and A ≠ B, then A is called a proper subset of B and we write A ⊂ B.

Illustrations of Subsets. Super set and proper subset


(i) Let A = {2, 3, 5} and B = {2, 3, 5, 7, 9} then, every element of A is an element of B but A ≠ B
∴ A ⊂ B, i.e, A is proper subset of B
(ii) For every set A, we have A ⊆ A, since every element of A is an element of A
(iii) Since φ has no element, we agree to say that φ is a subset of every set.
(iv) Let A = {1, {2, 3}, 4}
Thus {1} ⊂ A , { 2, 3} ∈ A , and {4} ⊂ A.
But { 2, 3} ⊆ A is a wrong statement in context of this example. The correct statement is {{ 2, 3 }} ⊆ A.

1.3.3 Intervals as Subsets of R


Let a, b ∈ R and a < b Then, we defined
(i) Closed interval [ a, b] = { x ∈ R : a ≤ x ≤ b}
(ii) Open interval ] a, b [ = {x ∈ R : a < x < b}
(iii) Right half open interval [a, b[ = {x ∈ R : a ≤ x < b}
(iv) Left half open interval ] a, b ] = {x ∈ R : a < x ≤ b}

1.3.4 Power Set


The set of all subset of a given set A is called power set of A and denoted by P (A)

If n ( A )= m then n [ P (A)] = 2m .

Example 4: Two finite sets have m and n elements. The total number of subsets of the first set is 56 more than
the total number of subsets of the second set. Find the values of m and n.

Solution: We know that if a set has m elements then total number of subsets of this set will be 2m .

So, in first set total number of subsets = 2m

In second set total number of subsets = 2n


Set Theory 7

∴ 2m = 2n + 56
⇒ 2m – 2n = 56

⇒ 2n(2( m – n) – 1) = 8 × 7

⇒ 2n(2( m – n) – 1) = 23 × 7 ...(1)

Now, since 23 is even and only 2n can be even in left hand side of equation (1), so

2n = 23

⇒ n=3

Now, since 7 is odd and only (2( n– m ) – 1) can be odd in left hand side of equation (1), so

2( m – n) – 1 = 7

2( m – 3 ) = 23

⇒ m– 3 = 3

⇒ m =6

Hence, n = 3 and m = 6
Example 5: Write down all possible subsets of A = { 2, 3} or {a, b} [U.P.T.U. (B. Tech.) 2007]

Solution: All possible subset of A are

φ, { 2}, { 3}, { 2, 3},

∴ P ( A ) = {φ, { 2}, {3}, {2, 3}}

Thus, n( A ) = 2 and n (P ( A )) = 4 = 22

1.4 Operations of Sets


1.4.1 Union of Sets
The union of two sets A and B, denoted by A ∪ B, is the set of all those elements which are either in A or in B
or in both A and B.
Thus, A ∪ B = { x : x ∈ A or x ∈ B}
∴ x ∈ A ∪ B ⇔ x ∈ A or x ∈ B
x ∉ A ∪ B ⇒ x ∉ A and x ∉ B

Example 6: Let A = { x : x is a prime numbers less than 10}


and B = { x : x ∈ N , x is a factors of 8}. Find A ∪ B

Solution: We have A = { 2, 3, 5, 7 } and B = { 1, 2, 4, 8 }


∴ A ∪ B = { 2, 3, 5, 7 } ∪ { 1, 2, 4, 8 } = { 1, 2, 3, 4, 5, 7, 8 }
8 Discrete Mathematical Structures

1.4.2 Intersection of Sets


The Intersection of two sets A and B denoted by A ∩ B, is the set of all these elements which are common to
both A and B.
Thus, A ∩ B = { x : x ∈ A and x ∈ B}
∴ x ∈ A ∩ B ⇔ x ∈ A and x ∈ B
x ∉ A ∩ B ⇒ x ∉ A or x ∉ B.

Example 7: Let A = { 1, 3, 5, 7, 9 } and B = {2, 3, 5, 7, 11, 13}. Find A ∩ B


Solution: We have A ∩ B = { 1, 3, 5, 7, 9 } ∩ { 2, 3, 5, 7, 11, 13} = { 3, 5, 7 }

Example 8: If A = ] 2, 4[ and B = [ 3, 5], find A ∩ B.


Solution: We have A ∩ B = ] 2, 4[ ∩ [ 3, 5] = [ 3, 4[

Example 9: If A = { 1, 2, 3, 4, 5} and B = { 4, 5, 6, 7, 8 }
C = { 7, 8, 9, 10, 11 } and D = { 10, 11, 12, 13, 14 }.

Find:
(i) A∪B (ii) B ∪C (iii) A ∪C
(iv) B∪D (v) (A ∪ B)∪ C (vi) (A ∪ B)∩ C
(vii) ( A ∩ B ) ∪ D (viii) ( A ∩ B ) ∪ (B ∩ C ) (ix) ( A ∪ C ) ∩ (C ∪ D )

Solution:
(i) A ∪ B = { 1, 2, 3, 4, 5, 6, 7, 8} (ii) B ∪ C = { 4, 5, 6,7, 8, 9, 10, 11}
(iii) A ∪ C = { 1, 2, 3, 4, 5, 7, 8, 9, 10, 11} (iv) B ∪ D = { 4, 5, 6, 7, 8, 10, 11, 12, 13, 14}
(v) ( A ∪ B ) ∪ C = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} (vi) ( A ∪ B ) ∩ C = { 7, 8}
(vii) ( A ∩ B ) ∪ D = { 4, 5, 10, 11, 12, 13, 14} (viii) ( A ∩ B ) ∪ (B ∩ C ) = { 4, 5, 7, 8}
(ix) ( A ∪ C ) ∩ (C ∪ D ) = { 7, 8, 9, 10, 11}

Example 10: If Ai = [ o, i ], where i ∈ Z, The set of integer, find


10
(i) A1 ∪ A2 (ii) A3 ∩ A4 (iii) ∪ Ai
i=5

Solution:
(i) We have A1 = [0, 1], A2= [0, 2] ⇒ A1 ∪ A2 = [0, 1] ∪ [ 0, 2] =[0, 1, 2].
(ii) We have A3 = [ 0, 3], A4 = [ 0, 4] ⇒ A3 ∩ A4 = {0}
10
(iii) We have ∪ Ai = A5 ∪ A6 ∪ A7 ∪ A8 ∪ A9 ∪ A10
i=5

= [ 0, 5] ∪ [ 0, 6 ] ∪ [ 0, 7] ∪ [ 0, 8] ∪ [ 0, 9] ∪ [ 0, 10]
=[ 0, 5, 6, 7, 8, 9, 10 ] .
Set Theory 9

1.4.3 Disjoint Sets [U.P.T.U. (B.Tech) 2008]

Two sets A and B are said to be disjoint if A ∩ B = φ.

1.4.4 Intersecting Sets


Two sets A and B are said to be intersecting if A ∩ B ≠ φ

Example 11: If A = {1, 3, 5, 7, 9}, B = {2, 4, 6, 8}


and C = { 2, 3, 5, 7, 11 }, find A∩B and A ∩ C . What do you conclude?
Solution: We have A ∩ B = { 1, 3, 5, 7, 9 } ∩ {2, 4, 6, 8} = φ
and A ∩ C = { 1, 3, 5, 7, 9 } ∩ {2, 3, 5, 7, 11}
= { 3, 5, 7 } ≠ φ
Thus, A and B are disjoint set while A and C are intersecting sets.

Example 12: Give an example of three sets A, B, C such that A ∩ B = A ∩ C but B ≠ C


Solution: We have A = { 1, 2, 3}, B = { 3, 4 } and C = { 3, 5, 7 }
Then A ∩ B = { 1, 2, 3} ∩ { 3, 4 } = {3} and A ∩ C = { 1, 2, 3} ∩ { 3, 5, 7 } = {3}
Thus A ∩ B = A ∩ C and B ≠ C

1.4.5 Difference of Sets


For any sets A and B, their difference (A – B) is defined as
( A – B ) = { x : x ∈ A and x ∉ B}.
Thus x ∈ ( A – B ) ⇒ x ∈ A and x ∉ B

1.4.6 Symmetric difference of Sets


Let A and B be two sets.
Then ( A − B ) ∪ (B − A ) is called symmetric difference of A and B .
It is denoted by A ∆ B i.e.
A ∆ B = (A ∪ B) − (A ∩ B) [U.P.T.U. (B. Tech.) 2008]

Example 13: If A = { x : x ∈ N , x is a factor of 6} and B = { x ∈ N : x is a factor of 8}


Then find (i) A ∪ B (ii) A ∩ B (iii) A – B (iv) B – A
Solution: We have A = { x : x ∈ N , x is factor of 6} = {1, 2, 3, 6}
and B = { x : x ∈ N , x is factor of 8} = {1, 2, 4, 8}
(i) A ∪ B = {1, 2, 3, 6} ∪ { 1, 2, 4, 8}
= {1, 2, 3, 4, 6, 8}
(ii) A ∩ B = {1, 2, 3, 6} ∩ { 1, 2, 4, 8} = {1, 2}
(iii) A – B = {1, 2, 3, 6} – { 1, 2, 4, 8} = {3, 6}
(iv) B – A = {1, 2, 4, 8} – { 1, 2, 3, 6} = {4, 8}
10 Discrete Mathematical Structures

1.4.7 Complement of a Set


Let U be the universal set and let A ⊆ U. Then, the complement of A denoted by A' or (U – A) is defined as

A' = { x ∈ U : x ∉ A} ⇒ x ∈ A' ⇔ x ∉ A

Example 14: If U = {1, 2, 3, 4, 5, 6, 7, 8} and A = {2, 4, 6, 8}, find (i) A' (ii) (A')'

Solution: We have
(i) A' = U – A = {1, 2, 3, 4, 5, 6, 7, 8} – { 2, 4, 6, 8 } = { 1, 3, 5, 7 }
(ii) ( A' )' = (U – A' ) = {1, 2, 3, 4, 5, 6, 7, 8} – { 1, 3, 5, 7 } = { 2, 4, 6, 8 } = A

1.4.8 Algebra of Set Theory


There are some very important laws of algebra which the sets theory follows. These are as given below.

(1) Commutativity: Let us consider two sets A and B. Then


(i) A∪B =B∪ A (ii) A∩B =B∩ A

or

The union as well as intersection of sets is commutative

Proof: (i) Let x ∈ A ∪ B ⇒ x ∈ A or x ∈ B

⇒ x ∈ B or x ∈ A

⇒ x ∈B ∪ A
∴ A∪B ⊆B∪ A ...(1)
Similarly, we have B∪ A ⊆ A∪B ...(2)

From eq (1) and eq (2), we have

A∪B =B∪ A

(ii) Suppose an arbitrary element x ∈ A ∩ B. Then

x ∈A∩B ⇒ x ∈ A and x ∈ B

⇒ x ∈ B and x ∈ A

⇒ x ∈B ∩ A

∴ x ∈A∩B ⇒ x ∈B ∩ A ⇒ A ∩ B ⊆ B ∩ A ...(3)

Therefore, we can show that

B∩ A ⊆ A∩B ...(4)

From eq (3) and eq (4), we have A ∩ B = B ∩ A


Set Theory 11

(2) Associativity: The sets are associative under the proposition of union and intersection i.e., if
A, B and C are three sets
Then (i) ( A ∪ B ) ∪ C = A ∪ (B ∪ C ) (ii) ( A ∩ B ) ∩ C = A ∩ (B ∩ C )

Proof: (i) Consider an element x such that


x ∈( A ∪ B ) ∪ C
⇒ x ∈ ( A ∪ B ) or x ∈ C
⇒ { x ∈ A or x ∈ B} or x ∈ C
⇒ x ∈ A or { x ∈ B or x ∈ C }
⇒ x ∈ A or { x ∈ B ∪ C }
Therefore, x ∈ ( A ∪ B ) ∪ C ⇒ x ∈ A ∪ (B ∪ C )
⇒ ( A ∪ B ) ∪ C ⊆ A∪ (B ∪ C ) ...(1)
Further we can show that A ∪ (B ∪ C ) ⊆ ( A ∪ B ) ∪ C ...(2)
From eq (1) and (2), we have ( A ∪ B ) ∪ C = A ∪ (B ∪ C )
(ii) Consider an element x such that
x ∈( A ∩ B ) ∩ C
⇒ { x ∈ A and x ∈ B} and x ∈ C
⇒ x ∈ A and x ∈ (B ∩ C }
⇒ x ∈ A ∩ (B ∩ C )
Thus x ∈ ( A ∩ B ) ∩ C ⇒ x ∈ A ∩ (B ∩ C )
∴ ( A ∩ B ) ∩ C ⊆ A ∩ (B ∩ C ) ...(3)
Further, A ∩ (B ∩ C ) ⊆ ( A ∩ B ) ∩ C ...(4)
From eq (3) and eq (4), we have
( A ∩ B ) ∩ C = A ∩ (B ∩ C )
(3) Idempotent Laws: If A be any set. Then
(i) A ∪ A = A and (ii) A ∩ A = A

Proof : (i) Let any element x ∈ A ∪ A. Then


x ∈ A ∪ A ⇒ x ∈ A or x ∈ A
⇒ x ∈A
∴ A∪ A ⊆ A ...(1)
Again if x ∈ A then x ∈ A ⇒ x ∈ A or x ∈ A
⇒ x ∈A∪ A
Thus x ∈A ⇒ x ∈A∪ A
⇒ A ⊆ A∪ A ...(2)
From eq (1) and eq (2), we have A∪ A = A
(ii) Same proof as (i)
12 Discrete Mathematical Structures

(4) Identity Laws: The empty set φ and universal set U are the identity elements of union and
intersection respectively
or

If A be any non-empty set, then

(i) A ∪ φ = A and (ii) A ∩U = A


Proof : (i) Let x be any element such that x ∈A∪φ
⇒ x ∈ A or x ∈ φ
⇒ x ∈A
∴ A∪φ ⊆ A ...(1)
Again let x ∈ A, then x ∈ A ⇒ x ∈ A or x ∈ φ
⇒ x ∈A ∪ φ
∴ A ⊆ A∪φ ...(2)
Hence, A∪φ = A
(ii) Similar proof as (i)

1.5 Principle of Duality


The principle of duality states that any established result involving sets and complements and operations
of union and intersection gives a corresponding dual result by replacing U by φ and ∪ by ∩ and vice versa.

1.6 Cartesian Product of Sets


Ordered Pair: If a ∈ B and b ∈ B then the ordered pair is the set {{a}, {a, b}} consisting of pair (a, b)
and the singleton {a}. It is represented by (a, b), the element a is called the first element and element b is
called second element.
Cartesian Product: If A and B are two non-empty sets, then the Cartesian product of A and B is the set of
all ordered pairs (a, b) where a ∈ A and b ∈ B

Example 15: Prove that A ∩ (B − C ) ⊂ A − (B ∩ C )


Solution: Let x ∈ A ∩ (B − C )
⇒ x ∈ A and x ∈ (B − C )
⇒ x ∈ A and ( x ∈ B and x ∉ C )
⇒ x ∈ A and x ∉ (B ∩ C )
⇒ x ∈ A − (B ∩ C )
Hence, A ∩ (B − C ) ⊂ A − (B ∩ C )

Example 16: To show that [ A ∩ (B ∪ A )] ∪ B = B


Solution: [ A ∩ (B ∪ A )] ∪ B = [( A ∩ B ) ∪ ( A ∩ A )] ∪ B = [( A ∩ B ) ∪ φ] ∪ B = ( A ∩ B ) ∪ B = B
Set Theory 13

Example 17: Given φ is an empty set, find P (φ ), P (P (φ )), P (P (P (φ )))


Solution: P (φ ) = φ, P (P (φ )) = {φ, {φ}}, P (P (P (φ ))) = {φ, {φ}, {{φ}}, {φ, {φ}}}

Theorem 1: If A, B and C are sets then


(i) A × (B ∪ C ) = ( A × B ) ∪ ( A × C ) (ii) A × (B ∩ C ) = ( A × B ) ∩ ( A × C )

Proof: (i) A × (B ∪ C ) = {( x, y ): x ∈ A, y ∈ (B ∪ C )}

= {( x, y ): x ∈ A and y ∈ B or y ∈ C }
= {( x, y ): x ∈ A, y ∈ B or x ∈ A, y ∈ C }
= {( x, y ): ( x, y ) ∈ A × B or ( x, y ) ∈ A × C }
= (A × B) ∪ (A × C )
(ii) A × (B ∩ C ) = {( x, y ): x ∈ A, y ∈ B ∩ C }
= {( x, y ): x ∈ A and y ∈ B and y ∈ C }
= {( x, y ): x ∈ A, y ∈ B and x ∈ A, y ∈ C }
= {( x, y ): ( x, y ) ∈ A × B and ( x, y ) ∈ A × C }
= (A × B) ∩ (A × C )

Theorem 2: If A, B and C are non-empty sets then


A ⊆ B ⇒ A ×C ⊆ B ×C
Proof: Let (a, b) ∈ A × C , then
⇒ a ∈ B and b ∈ C (Q A ⊆ B )
⇒ (a, b) ∈ B × C
∴ A ×C ⊆ B ×C

Illustration: A = {0, 1, 2}, B = {3, 5}, then


A × B = {(0, 3), (0, 5), (1, 3), (1, 5), (2, 3), (2, 5)}

Theorem 3: If A ⊆ U, Prove that

(i) U' = φ (ii) φ' = U (iii) ( A' )' = A (iv) A ∪ A' = U (v) A ∩ A' = φ
Proof: We have
(i) U ' = { x ∈U : x ∉U ' } = φ
(ii) φ' = { x ∈ U : x ∉ φ} = U
(iii) ( A' )' = { x ∈ U : x ∉ A' } = { x ∈ U : x ∈ A} = A
(iv) A ∪ A' = { x ∈ U : x ∈ A ∪ A' }
= { x ∈ U : x ∈ A or x ∈ A' }
= { x ∈ U : x ∈ A or x ∉ A} = U
(v) A ∩ A' = { x ∈ U : x ∈ A ∩ A' }
= { x ∈ U : x ∈ A and x ∈ A' }
= { x ∈ U : x ∈ A and x ∉ A} = φ
14 Discrete Mathematical Structures

Theorem 4: State and prove Demorgan's laws or To prove the following relations
(i) ( A ∪ B )' = A' ∩ B' (ii) ( A ∩ B )' = A' ∪ B'

Proof:
(i) Let x ∈ ( A ∪ B )' ⇒ x ∉ ( A ∪ B )
⇒ x ∉ A and x ∉ B
⇒ x ∈ A' and x ∈ B'
⇒ x ∈ ( A' ∩ B' )
∴ x ∈ ( A ∪ B )' ⇒ x ∈ ( A' ∩ B' )
Then ( A ∪ B )' ⊆ A' ∩ B' ...(1)
Again y ∈ A' ∩ B' ⇒ y ∈ A' and y ∈ B'
⇒ y ∉ A and y ∉ B
⇒ y ∉A∪B
⇒ y ∈ ( A ∪ B )'
∴ y ∈ A' ∩ B' ⇒ y ∈ ( A ∪ B )'
Then ( A' ∩ B' ) ⊆ ( A ∪ B )' ...(2)
From (1) and (2) ( A ∪ B )' = A' ∩ B'
(ii) Let x ∈ ( A ∩ B )' ⇒ x ∉ ( A ∩ B )
⇒ x ∉ A or x ∉ B
⇒ x ∈ A' or x ∈ B '
⇒ x ∈ A' ∩ B'
∴ ( A ∩ B )' ⊆ A' ∪ B' ...(1)
Again y ∈ A' ∪ B' ⇒ y ∈ A' or y ∈ B'
⇒ y ∉ A or y ∉ B
⇒ y ∉( A ∩ B )
⇒ y ∈( A ∩ B )'
∴ A' ∪ B' ⊆ ( A ∩ B )' ...(2)
From (1) and (2), we have
( A ∩ B )' = A' ∪ B'

Theorem 5: Use Distributive laws to prove the following:


(i) A ∪ (B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C ) (Union distributes intersection)
(ii) A ∩ (B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C ) (Intersection distributes union)
Proof:
(i) Let x ∈ A ∪ (B ∩ C ) ⇒ x ∈ A or x ∈ (B ∩ C )
⇒ x ∈ A or ( x ∈ B and x ∈ C )
⇒ ( x ∈ A or x ∈ B ) and ( x ∈ A or x ∈ C )
⇒ x ∈ A ∪ B and x ∈ ( A ∪ C )
⇒ x ∈( A ∪ B ) ∩ ( A ∪ C )
∴ A ∪ (B ∩ C ) ⊆ ( A ∪ B ) ∩ ( A ∪ C ) ...(1)
Set Theory 15

Similarly it can be prove that


( A ∪ B ) ∩ ( A ∪ C ) ⊆ A ∪ (B ∩ C ) ...(2)

From (1) and (2), we have A ∪ (B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C )


(ii) Let x ∈ A ∩ (B ∪ C ) ⇒ x ∈ A and ( x ∈ B ∪ C )
⇒ x ∈ A and ( x ∈ B or x ∈ C )

⇒ ( x ∈ A and x ∈ B ) or ( x ∈ A and x ∈ C )

⇒ x ∈ ( A ∩ B ) or x ∈ ( A ∩ C )

⇒ x ∈( A ∩ B ) ∪ ( A ∩ C )
∴ A ∩ (B ∪ C ) ⊆ ( A ∩ B ) ∪ ( A ∩ C ) ...(1)
Similarly it can be prove that ( A ∩ B ) ∪ ( A ∩ C ) ⊆ A ∩ (B ∪ C ) ...(2)
From (1) and (2), we have A ∩ (B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )

Theorem 6: Prove that


(i) B – A ⊆ A' (ii) A − B = A ∪ B' = B' − A'
(iii) A'– B' = B – A (iv) A ⊆ B then B' ⊆ A' [U.P.T.U. (B. Tech.) 2003]

Proof:
(i) Let x ∈(B – A ) ⇒ x ∈ B and x ∉ A
⇒ x ∈ B and x ∈ A'
∴ x ∈ (B – A ) ⇒ x ∈ A'
Then (B – A ) ⊆ A'
(ii) ( A – B ) = A ∩ B' = B'– A'
Let x ∈ ( A – B ) ⇔ x ∈ A and x ∉ B
⇔ x ∈ A and x ∈ B'
⇔ x ∈ A ∩ B'
∴ A – B = A ∩ B'
Again ( A – B ) = { x : x ∈ A and x ∉ B }

= { x : x ∉ A' and x ∈ B' }

= { x : x ∈ B' and x ∉ A' }

= (B'– A' )
∴ A – B = A ∩ B' = B' – A'
(iii) A' – B' = B – A
Let x ∈( A'– B' ) ⇒ x ∈ A' and x ∉ B'
⇒ x ∉ A and x ∈ B

⇒ x ∈ B and x ∉ A

⇒ x ∈B – A
∴ ( A'– B' ) ⊆ (B – A ) ...(1)
16 Discrete Mathematical Structures

Again y ∈(B – A ) ⇒ y ∈ B and y ∉ A


⇒ y ∉ B' and y ∈ A'
⇒ y ∈ A' and y ∉ B'
⇒ y ∈( A'– B' )
∴ B – A ⊆ ( A'– B' ) ...(2)
From (1) and (2), we have
∴ A' – B' = B – A
(iv) A ⊂ B then B' ⊂ A'
Let A ⊂ B ∴ x ∈ A ⇒ x ∈B
Again if x ∉B ⇒ x ∉ A
⇒ x ∈ B' ⇒ x ∈ A'
⇒ B' ⊂ A'

Theorem 7: If A, B, C be sets, then prove


A – (B ∪ C ) = ( A – B ) ∩ ( A – C ) [U.P.T.U. (B. Tech.) 2004]

Proof: Let x ∈ A – (B ∪ C )
⇒ x ∈ A and x ∉ (B ∪ C )
⇒ x ∈ A and ( x ∉ B or x ∉ C )
⇒ ( x ∈ A and x ∉ B ) or ( x ∈ A and x ∉ C )
⇒ x ∈ ( A – B ) and x ∈ ( A – C )
⇒ x ∈( A – B ) ∩ ( A – C )
Then A – (B ∪ C ) ⊆ ( A – B ) ∩ ( A – C ) ...(1)
Again let y ∈( A – B ) ∩ ( A – C )
⇒ y ∈ ( A – B ) or y ∈ ( A – C )
⇒ ( y ∈ A and y ∉ B ) and ( x ∈ A and x ∉ C )
⇒ x ∈ A and ( x ∉ B and x ∉ C )
⇒ x ∈ A and ( x ∉ (B ∪ C )
⇒ x ∈ A – (B ∪ C )
Then ( A – B ) ∩ ( A – C ) ⊆ A – (B ∪ C ) ...(2)
From (1) and (2) A – (B ∪ C ) = ( A – B ) ∩ ( A – C )

Theorem 8: If A, B, C are three sets, then show that


(i) A – (B ∩ C ) = ( A – B ) ∪ ( A – C ) (ii) A ∩ (B – C ) = ( A ∩ B )– ( A ∩ C )

(iii) A ∩ (B ∆ C ) = ( A ∩ B )∆( A ∩ C )
Proof:
(i) we have A – (B ∩ C ) = A ∩ (B ∩ C )'
= A ∩ (B' ∪ C ' ) (By Demorgon's law)
= ( A ∩ B' ) ∪ ( A ∩ C ' )
= (A – B)∪ (A – C )
Set Theory 17

(ii) A ∩ (B – C ) = A ∩ (B ∩ C ' )
= ( A ∩ B) ∩ C' (By Associativity)
= φ ∪ [( A ∩ B ) ∩ C ' ]
= [( A ∩ B ) ∩ A' ] ∪ [( A ∩ B ) ∩ C ' ]
= ( A ∩ B ) ∩ ( A ∩ C )'

= ( A ∩ B )– ( A ∩ C )
(iii) We have A ∩ (B ∆ C ) = A ∩ [(B – C ) ∪ (C – B )]

= [ A ∩ (B – C )] ∪ [ A ∩ (C – B )]

= [( A ∩ B )– ( A ∩ C )] ∪ [( A ∩ C )– ( A ∩ B )]

= (A ∩ B)∆ (A ∩ C )

1.7 Multiset
A collection of object that are not necessarily distinct, is called a Multiset.

1.7.1 Multiplicity of an Element


The number of times an element appears in the multiset is called the Multiplicity of that element.

In fact we can characterize a multiset as pair ( A, µ ), where A is the generic set and µ is the multiplicity
function defined as
µ : A → {1, 2, 3 K }

So that µ (a) = k where k is the number of times the element is in the multiset.

Illustration: If {a, b, c, c, a, c} is the multiset

then µ (a) = 2, µ (b) = 1 and µ (c) = 3

Illustration: Consider the multiset


A = {a, a, a, b, b, d, d, d, d, e}

The multiplicity of element a in A = 3 = µ (a)

The multiplicity of element b (µ (b)) in A = 2

The multiplicity of element d (µ (d )) in A = 4

The multiplicity of element e (µ (e)) in A = 1

The multiplicity of element c (µ (c)) in A = 0

Since c ∉ A

Remark: Sets are merely special instants of multisets in which the multiplicity of an element is either 0 or 1
18 Discrete Mathematical Structures

1.7.2 Equality of Multiset


If the number of occurrence of each element is the same in both the multiset then the multiset are equal.

Illustration: Let {a, b, a, a} = {a, a, b, a} But {a, b, a} ≠ {a, b}

1.7.3 Multisubset
A multiset P is said to be a multisubset of Q , if multiplicity of each element in P is less or equal to its
multiplicity in Q

Illustration: [1, 2, 2, 3] ⊆ [1, 1, 1, 2, 2, 3]

1.8 Operations on Multiset


1.8.1 Intersection of Multisets
If P and Q are multisets, then P ∩ Q is defined as the multiset such that for each element x ∈ P ∩ Q ,
µ ( x ) = min {µ P ( x ), µ Q( x )}

Illustration: P = {1, 1, 1, 2, 2, 3} , Q = {1, 2, 2, 2, 3, 3}


∴ P ∩ Q = {1, 2, 2, 3}

1.8.2 Union of Multisets


If P and Q are multisets, then P ∪ Q is defined as the multiset such that for each element x ∈ P ∪ Q ,
µ ( x ) = max {µ P ( x ), µ Q( x )}

Illustration: P = {a, b, b, c}, Q = {b, c, c, d} ⇒ P ∪ Q = {a, b, b, c, c, d}

1.8.3 Difference of Multisets


Let P and Q be two multisets. The difference of P and Q is denoted by P − Q and is a multiset such that the
multiplicity of an element in P − Q in that order is equal to the multiplicity of the element in P minus the
multiplicity of the element in Q if the difference is positive and is equal to 0 if the difference is zero or
negative.

i.e.if x ∈ P − Q ⇒ µ ( x ) = µ P ( x ) − µ Q( x )

Illustration: If P = {a, a, a, a, b, b, c, d} and Q = {a, a, b, d, e}

Then P − Q = [ a, a, b, c]
Set Theory 19

1.8.4 Sum of Multisets


This concept is not defined for ordinary set. However for multiset P and Q, we define ( A + B ) as
x ∈ A + B ⇒ µ (x) = µ A (x) + µB (x)

Illustration: P = {a, a, b, b, b, c} and Q = {a, a, a, b, c, c, d, e}


Then, P + Q = {a, a, a, a, a, b, b, b, b, c, c, c, d, e}

Example 18: For any set A and B, prove that


P ( A ∩ B ) = P ( A ) ∩ P (B ) [U.P.T.U. (M.C.A.) 2004]

Solution: Let x ∈ P ( A ∩ B ), then


x ∈ P (A ∩ B) ⇒ x ⊆ A ∩ B
⇒ x ⊆ A and x ⊆ B
⇒ x ∈ P ( A ) and x ∈ P (B )

⇒ x ∈ P ( A ) ∩ P (B )
∴ P ( A ∩ B ) ⊆ P ( A ) ∩ P (B ) ...(1)
Again, Let y ∈ P ( A ) ∩ P (B ), then

y ∈ P ( A ) ∩ P (B ) ⇒ y ∈ P ( A ) and y ∈ P (B )
⇒ y ⊆ A and y ⊆ B
⇒y ⊆ A∩B

⇒ y ∈ P( A ∩ B )
∴ P ( A ) ∩ P (B ) ⊆ P ( A ∩ B ) ...(2)
From (1) and (2)

∴ P ( A ∩ B ) = P ( A ) ∩ P (B )

Example 19: For any sets A and B, show that ( A – B ) = ( A ∩ B' )


Solution: Let x ∈ A – B, then
x ∈ A – B ⇒ x ∈ A and x ∉ B
⇒ x ∈ A and x ∈ B'
⇒ x ∈ A ∩ B'
∴ ( A – B ) ⊆ ( A ∩ B' ) ...(1)
Again, Let y ∈ ( A ∩ B' ), then

y ∈ ( A ∩ B' ) ⇒ y ∈ A and y ∈ B'

⇒ y ∈ A and y ∉ B

⇒ y ∈( A – B )
∴ ( A ∩ B' ) ⊆ ( A – B ) ...(2)
Hence From (1) and (2) ( A – B ) = ( A ∩ B' )
20 Discrete Mathematical Structures

Example 20: If P ( A ) = P (B ), show that A = B


Solution: Let P ( A ) = P (B ), then

A ⊆ A ⇒ A ⊂ P( A )

⇒ A ∈ P (B )
⇒A⊆B ...(1)
Again B ⊆ B ⇒ B ∈ P (B )
⇒ B ∈ P( A )
⇒B⊆ A ...(2)

From (1) and (2) we have A = B.

Example 21: For any set A and B, show that


(i) (A ∩ B )∪ (A – B) = A (ii) A ∪ (B – A ) = A ∪ B

Solution:
(i) L.H.S = (A ∩ B)∪ (A – B)
= ( A ∩ B ) ∪ ( A ∩ B' )
= A ∩ (B ∪ B' ) [ B ∪ B' = U ]
= A ∩U
= A = R . H. S
(ii) L.H.S = A ∪ (B – A ) [(B – A ) = B ∩ A' ( A ∪ A' = U )]
= A ∪ (B ∩ A' )
= ( A ∪ B ) ∩ ( A ∪ A' )
= (A ∪ B)∩ U
= ( A ∪ B ) = R . H. S

1.9 Venn Diagrams


In order to express the relationship among sets in perspective, we represent them pictorially by means of
diagrams, called Venn Diagrams. In these diagrams, the universal set is represented by a rectangular
region and its subsets by circles inside the rectangle. We represent disjoint sets by disjoint circles and
intersecting sets by intersecting circles.

1.9.1 Set inclusion Operation U

If A is a proper subset of B. Then they can be represented as given in Fig. 1.1 A B

Fig. 1.1
Set Theory 21

1.9.2 Union of two Sets


The union of two sets A and B is represented by shaded (stripes) portion of the
venn diagram (Fig. 1.2)

Fig. 1.2

1.9.3 Intersection of two Sets


The intersection of two sets A and B is shown in Fig. 1.3 by shaded (stripes) portion

Fig. 1.3

1.9.4 Disjoint Sets U

Two disjoint sets are shown by venn diagram as given in Fig. 1.4 A B

Fig. 1.4
1.9.5 Complement of a Set
The complement of a set A can be represented by shaded (stripes) portion as
given in Fig. 1.5. Let A and B be two intersecting subsets of U. In counting the
elements of ( A ∪ B ), the elements of ( A ∩ B ) are counted twice, once in counting
the elements of A and second time in counting the elements of B.
Fig. 1.5
∴ n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
If A∩B =φ then n( A ∩ B ) = 0
A–B B–A
n( A ∪ B ) = n( A ) + n(B )
A∩B
From the Venn diagram, it is also clear that

(i) n( A – B ) + n( A ∩ B ) = n( A )
A B
(ii) n(B – A ) + n( A ∩ B ) = n(B ) Fig. 1.6
(iii) n( A – B ) + n( A ∩ B ) + n(B – A ) = n( A ∪ B )

Theorem 9: When A and B are disjoint sets, then we have n( A ∪ B ) = n( A ) + n(B ).

1 2 .5 .6
3 4 .7 .8
.9
A B
Fig. 1.7

Proof is theorem 10
22 Discrete Mathematical Structures

Theorem 10: For any sets A and B, prove that


n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
Proof: We have by venn diagram

The set A – B, B – A, ( A ∩ B ) are disjoint and their union is ( A ∪ B ). A–B A∩B B–A
∴ n( A ∪ B ) = n( A – B ) + n( A ∩ B ) + n(B – A )
= n( A – B ) + n( A ∩ B ) + n(B – A ) + n( A ∩ B )– n( A ∩ B ) A B
Fig. 1.8
= n( A ) + n(B )– n( A ∩ B )
[∴ n( A – B ) + n( A ∩ B ) = n( A ) and n (B – A ) + n( A ∩ B ) = n(B )]
Hence
∴ n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )

Theorem 11: For any sets A,B,C prove that


n( A ∪ B ∪ C ) = [ n( A ) + n(B ) + n(C ) + n( A ∩ B ∩ C )] –[ n( A ∩ B ) + n(B ∩ C ) + n( A ∩ C )]
Proof: We have n( A ∪ B ∪ C ) = n[( A ∪ B ) ∪ C ]

= n( A ∪ B ) + n(C )– n[( A ∪ B ) ∩ C ]

= n( A ) + n(B )– n( A ∩ B ) + n(C )– n[( A ∩ C ) ∪ (B ∩ C )]

= n( A ) + n(B ) + n(C )– n( A ∩ B )– {n( A ∩ C ) + n(B ∩ C ) – n {[( A ∩ C ) ∩ (B ∩ C )]}

= n( A ) + n(B ) + n(C )– n( A ∩ B )– n( A ∩ C )– n(B ∩ C ) + n( A ∩ B ∩ C )

= n( A ) + n(B ) + n(C ) + n( A ∩ B ∩ C )– {n( A ∩ B ) + n(B ∩ C ) + n( A ∩ C )}

Example 22: (i) Prove that


Power set ( A ∩ B ) = power set ( A ) ∩ power set (B ) [U.P.T.U. (M.C.A.) 2004]

(ii) Show that for any two sets A and B .


A − (A ∩ B) = A − B [U.P.T.U. (B. Tech.) 2006]

Solution: (i) Let x ∈power set ( A ∩ B ) ...(1)


⇒ x⊆A∩B
⇒ x ⊆ A and x ⊆ B
⇒ x ∈ power set ( A ) and x ∈ power set (B )
⇒ x ∈power set A ∩ power set (B ) ...(2)
From (1) and (2), we get
power set ( A ∩ B ) ⊆ power set ( A ) ∩ power set (B ) ...(3)
Similarly, we can prove
power set A ∩ power set B ⊆ power set ( A ∩ B ) ...(4)
From (1) and (2), we find
power set ( A ∩ B ) = power set ( A ) ∩ power set (B )
(ii) Let x ∈ A − ( A ∩ B )
⇒ x ∈ A and x ∉ ( A ∩ B )
Set Theory 23

⇒ x ∈ A and (x ∉ A or x ∉ B )
⇒ (x ∈ A and x ∉ A ) or (x ∈ A and x ∉ B )
⇒ ( x ∈ φ ) or ( x ∈ A − B )
⇒ x ∈ φ ∪ (A − B)
⇒ x ∈( A − B )
∴ x ∈ A − ( A ∩ B ) ⇒ x ∈( A − B )
⇒ A − (A ∩ B) ⊆ A − B ...(1)
Again let x ∈ ( A − B ) ⇒ x ∈ A and x ∉ B
⇒ x ∈ A and x ∉ A ∩ B
⇒ x ∈ A − (A ∩ B)
∴ x ∈( A − B ) ⇒ x ∈ A − ( A ∩ B )
⇒ (A − B) ⊆ A − (A ∩ B) ...(2)
From (1) and (2) we find A − ( A ∩ B ) = A − B

Example 23: Assume A, B and C are arbitrary sets. You do not have to prove anything or provide counter
examples but only state if the following statements are true or false:
(i) {a, φ} ∈ {a, {a, φ}} (ii) If A ∈ B and B ⊆ C , then A ∈ C
(iii) If A ∈ B and B ⊆ C , then A ⊆ C (iv) If A ⊆ B and B ∈ C , then A ∈ C
(v) If A ⊆ B and B ∈ C , then A ⊆ C [U.P.T.U. (B. Tech) 2002]

Solution: (i) True (ii) True (iii) False (iv) False (v) True

Example 24: Using laws of sets prove that


(A ∩ B ) ∪ (A ∩ B) ∪ (A ∩ B ) = A ∪ B
Solution: We have (A ∩ B ) ∪ (A ∩ B) ∪ (A ∩ B )
= ( A ∩ B ) ∪ [( A ∩ B ) ∪ ( A ∩ B )]
= ( A ∩ B ) ∪ [( A ∩ (B ∪ B )] [Distributive]
= (A ∩ B ) ∪ (A ∩ U ) (B ∪ B = U )
= (A ∩ B ) ∪ A
= A ∪ (A ∩ B )
= ( A ∪ A) ∩ ( A ∪ B )
= U ∩ (A ∪ B )
=A∪B
From Venn diagram this can be also proved

Fig. 1.9
24 Discrete Mathematical Structures

If we make the union of all three, we get

Fig. 1.10

Example 25: Draw a Venn diagram of sets A, B and C where


(i) A and B have elements in common. B and C have elements in common, but A and C are disjoint.
(ii) A ⊆ B, set A and C are disjoint, but B and C have elements in common. [U.P.T.U. (B. Tech.) 2006]

(iii) A ⊂ B and C is disjoint from both A and B

Solution:

(i) (ii) C (iii)


A
A
B C
A B C
B φ
Fig. 1.11 Fig. 1.12 Fig. 1.13

Example 26: Draw the Venn diagrams showing


(i) A ∪ B ⊆ A ∪ C but B ⊆
| C
(ii) A ∩ B ⊆ A ∩ C but B ≠ C [U.P.T.U. (B. Tech.) 2005]

Solution: (i) Venn diagram for A ∪ B ⊂ A ∪ C but B ⊆


| C

Fig. 1.14

A ∪ B ⊂ A ∪ C, B ⊆
| C
(ii) Venn diagram for A ∩ B ⊆ A ∩ C but B ⊆
| C

A C
B

Fig. 1.15

A ∩ B ⊆ A ∩ C, B ≠ C
Set Theory 25

Example 27: Draw a Venn diagram to represent the following three facts:
(i) A∩B≠φ (ii) D ⊆ B ⊆C (iii) A∩D=φ (iv) ( A − B )′ (v) A − A′ (vi) A′ ∩ B

Solution: (i) A ∩ B = φ (ii) D ⊆ B ⊆ C

∪ ∪

A B
D

A∩B=φ B
C
Fig. 1.16

Fig. 1.17
(iii) A∩D=φ

A
D

Fig. 1.18

(iv) ( A − B )′

Fig. 1.19

(v) ( A − A′ ) (vi) A′ ∩ B

∪ ∪

A B
(A′ ∩ B)

A' A′
Fig. 1.20 Fig. 1.21
26 Discrete Mathematical Structures

1.9.6 Venn Diagram: Applications


Example 28: Use Venn diagram to show that the following argument is valid.
P1 : Babies are illogical
P2 : Nobody is despited who can manage a crocodile
P3 : Illogical people are despised
P4 : Babies cannot manage crocodile.

Solution: The given premises lead to the Venn diagram in the


Fig. 1.22

In the Venn diagram, the set of babies and the set of people
who can manage crocodile are disjoint. Hence babies can not
manage crocodiles and the conclusion P is valid. Fig. 1.22

Illustration: Show that the following argument is not


valid
P1 : All students are Lazy
P2 : Everybody who is not wealthy is a student
P3 : Lazy people are not wealthy.

Here both premises hold i.e. P1 and P2 but conclusion


does not hold. Thus the argument is invalid. Fig. 1.23

Example 29: If A and B are two sets such that


n( A ) = 27, n(B ) = 35 and n( A ∪ B ) = 50 find n( A ∩ B )
Solution: We know that

n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )

n( A ∩ B ) = 27 + 35 – 50 = 12
Hence n( A ∩ B ) = 12

Example 30: In group of 50 people, 35 speaks Hindi, 25 speaks both English and Hindi and all people speak
at least one of the two languages. How many people speak only English and not Hindi? How many speak
English?
Solution: We have
Total number of people = 50
Total number of people speaking Hindi = 35
Let A be the set of people that speak Hindi, B be the set of people that speak English.
Let n( A ) = The number of people in the set A
n(B ) = The number of people in the set B
∴ n( A ∪ B ) = 50, n( A ) = 35, n( A ∩ B ) = 25
Set Theory 27

We know n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
⇒ n(B ) = n( A ∪ B )– n( A ) + n( A ∩ B )
⇒ n(B ) = 50 – 35 + 25 = 40

And number of people that speak English only


U
= n(B )– n( A ∩ B )

= 40 – 25 = 15

Thus, the number of people speaking English only =15

And, the number of people speaking English = 40 Fig. 1.24


Alternatively: This problem can also be solved by Venn diagram in Fig. 1.24.

Example 31: A computer company must hire 20 programmers to handle system programming jobs and 30
programmers for applications programming. Of these hired, 5 are expected to perform jobs of both types. How
many programmers must be hired?

Solution: We have

20 Programmers = Programming jobs = n (A)

30 Programmers = Application programming = n(B )

5 Programmers = Both the jobs = n( A ∩ B )

Then n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )

= 20 + 30 – 5 = 50 – 5 = 45
∴ The total number of programmers hired are 45.

Example 32: In a group of 60 people, 40 speak Hindi, 20 speak both English and Hindi and all people speak
at least one of the two languages. How many people speak only English and not Hindi? How many speak
English?
Solution: Let total people = 60

Hindi Speaking = 40

English, Hindi Speaking = 20

Let n( A ) = The set of Hindi Speaking

n(B ) = The set of English speaking

∴ n( A ) = 40, n( A ∩ B ) = 20, n( A ∪ B ) = 60

Number of people that speak only English and not Hindi is

n(B – A ) = n( A ∪ B )– n( A ) = 60 – 40 = 20
28 Discrete Mathematical Structures

By venn diagram the shaded (stripes) portion (see Fig. 1.25) is the U=60
required number of people. Now the number of people, speaking
English n(B ).
20 20
∴ We have n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )

⇒ n(B ) = n( A ∪ B ) + n( A ∩ B )– n( A ) A B
⇒ n(B ) = 60 + 20 – 40 = 40
Fig. 1.25

Example 33: In a class of 25 students, 12 have taken Mathematics, 8 have taken Mathematics but not
Biology. Find the number of students who have taken Mathematics and Biology and those who taken Biology
but not Mathematics?
Solution: By Venn Diagram.

Let A denotes students taken Mathematics and set B denotes students


taken Biology. Shaded (stripes) portion define those students taken
both Mathematics and Biology.

Total number of students = 25

The students taken Mathematics only = 8


Fig. 1.26
The students taken Mathematics and Biology = 12 – 8 = 4

The Students taking Biology only = 25 – (8 + 4) =13

Example 34: A school has 21 boys in basket ball team, 26 in hockey and 29 in football team. Now if 14 boys
play hockey and basketball, 15 boys play hockey and football, 12 boys play football and basketball and 8 boys
play hockey, football and basketball all three games, then what is total number of boys playing these games?
Solution: Let B,H,F denote the total number of boys playing basketball, hockey and football.
Then n(B ) = 21, n(H ) = 26, n(F ) = 29
n(H ∩ B ) = 14; n(H ∩ F ) = 15; n(F ∩ B ) = 12
and n(B ∩ H ∩ F ) = 8
Then n(B ∪ H ∪ F ) = n(B ) + n(H ) + n(F )– n(H ∩ B )– n(H ∩ F ) – n(F ∩ B ) + n(B ∩ H ∩ F )
= 21 + 26 + 29 – 14 – 15 – 12 + 8 = 84 – 41 = 43

Example 35: A class has 175 students. The following description gives the number of students studying one
more of the subjects in this class.

Mathematics 100; Physics 70; Physics and Chemistry 46; Mathematics and physics 30; Mathematics and
Chemistry 28; Physics and Chemistry 23; Mathematics, Physics and Chemistry 18.

Find:
(i) How many students are enrolled in Mathematics alone; Physics alone and Chemistry alone?
(ii) The number of students who have not offered any of these subjects.
Set Theory 29

Solution: Let M,P,C denote the sets of students enrolled in Mathematics,


Physics and Chemistry.
M a b e P
Let a, b, c, d, e, f, g be number of elements contained in bounded regions. c
d f
Using the given data, we have
g
a + b + c + d = 100, b + c + e + f = 70, c + d + f + g = 46
b + c = 30, c + d = 28, c + f = 23, c = 18 C
Solve these equations, we obtain Fig. 1.27
c = 18, f = 5, d = 10, b = 12, g = 13, e = 35 and a = 60
(i) Number of students enrolled in
Mathematics alone = a = 60
Physics alone = e = 35
Chemistry alone = g = 13
(ii) Number of students not offering any of these subjects
= 175 – (a + b + c + d + e + f + g )
= 175 – (60 + 12 + 18 + 10 + 35 + 5 + 13) = 175 – 153 = 32

Example 36: A survey shows that 73% of the Indians like apples, whereas 65% like oranges. What
percentage of Indians like both apples and oranges?
Solution: Let A = Set of Indians who like apples

B = Set of Indians who like oranges


Then n( A ) = 73, n(B ) = 65, n( A ∪ B ) = 100
∴ n( A ∩ B ) = n( A ) + n(B )– n( A ∪ B ) = 73 + 65 – 100 = 38
Hence, 38 of the Indians like both apples and oranges

Example 37: In a survey it is found that 21 people like product A, 26 people like product B and 29 like
product C. If 14 people like products A and B; 15 people like products B and C; 12 people like products C and A;
and 8 people like all the three products.

Find:
(i) How many people are surveyed in all?
(ii) How many like product C only?

Solution:

Let A = the set of people who like product A A a b e B

B = the set of people who like product B c


d f
C = the set of people who like product C g
Let, a, b, c, d, e, f, g denote the number of elements containing in bounded
C
regions.
Fig. 1.28
30 Discrete Mathematical Structures

Then, we have
a + b + c + d =21
b + c + e + f = 26
c + d + f + g = 29
b + c = 14, c + f =15, c + d = 12
and c= 8
∴ c = 8, d = 4, f = 7, b = 6, g = 10, e = 5, a = 3
(i) Total number of surveyed people = a + b + c + d + e + f + g = 43
(ii) Number of people who like product C only = g = 10

Example 38: In a group of 52 persons, 16 drink tea but not coffee and 33 drink tea.
(i) How many drink tea and coffee both?
(ii) How many drinks tea and coffee both?
(iii) How many drink coffee but not tea?
Solution:
Let A = Set of persons who drink tea
and B = Set of persons who drink coffee A–B A∩B B–A
Then, A – B = Set of persons who drink tea but not coffee
And B – A = Set of persons who drink coffee but not tea
But n( A ∪ B ) = 52, n( A – B ) = 16 and n( A ) = 33 A B
Fig. 1.29
(i) Set of persons who drink tea and coffee both = ( A ∩ B)
Now, n( A – B ) + n( A ∩ B ) = n( A )
⇒ n( A ∩ B ) = n( A )– n( A – B ) = (33 – 16) = 17
Thus, 17 drinks tea and Coffee both
(ii) n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
⇒ n(B ) = n( A ∪ B ) + n( A ∩ B )– n( A ) = 52 + 17 – 33 = 36
Now n(B – A ) + n( A ∩ B ) = n(B )
⇒ n(B – A ) = n(B )– n( A ∩ B ) = 36 – 17 = 19
Thus, 19 drinks coffee but not tea.

Example 39: In a group of 850 persons, 600 can speak Hindi and 340 can speak Tamil.

Find:
(i) How many can speak both Hindi and Tamil?
(ii) How many can speak Hindi only?
(iii) How many can speak Tamil only?

Solution: Let A = Set of persons who can speak Hindi.


B = Set of persons who can speak Tamil
∴ n( A ) = 600, n(B ) = 340 and n ( A ∪ B ) = 850
Set Theory 31

(i) Set of persons who can speak both Hindi and Tamil = ( A ∩ B )
∴ n( A ∩ B ) = n( A ) + n(B )– n( A ∪ B )
= 600 + 340 – 850 = 90
Thus, 90 persons can speak both Hindi and Tamil
(ii) Set of persons who can speak Hindi only = (A – B)
Now n( A – B ) + n( A ∩ B ) = n( A )
⇒ n( A – B ) = n( A )– n( A ∩ B ) = 600 – 90 = 510
Thus, 510 persons can speak Hindi only
(iii) Set of persons who can speak Tamil only = (B – A)
Now n(B – A ) + n( A ∩ B ) = n(B )
⇒ n(B – A ) = n(B )– n( A ∩ B ) = 340 – 90 = 250
Hence, 250 persons can speak Tamil only

Example 40: In an examination, 56% of the candidates fail in English and 48% failed in Science. If 18%
failed in both English and Science, find the percentage of those who passed in both the subjects.
Solution:
Failed in English only = 56 –18 = 38
Failed in Science only = 48 – 18 = 30
Failed in both English and Science = 18
Failed in one or both of the subjects = 38 + 30 + 18 = 86
Passed in both the subjects = (100 – 86) = 14

Example 41: In a group of 65 people, 40 like cricket,10 like both cricket and tennis. How many like tennis
only and not cricket? How many like tennis?
Solution:
Let A = Set of people who like cricket
30 10 25
B = Set of people who like tennis
i.e., n( A ) = 40, n( A ∩ B ) = 10
A B
∴ n( A – B ) = (40 – 10) = 30 Fig. 1.30
n(B – A ) = 65 ~(30 + 10) = 25
Number of people who like tennis only = 25
Number of people who like tennis = 25 + 10 = 35

Example 42: In a canteen, out of 123 students, 42 students buy ice-cream, 36 buy buns and 10 buy cakes, 15
students buy ice-cream and buns, 10 buy ice- cream and cakes, 4 buy cakes and buns but not ice-cream and 11
buy ice-cream and buns but not cakes. Draw Venn diagram to illustrate the above information and find:
(i) How many students buy nothing at all?
(ii) How many students buy at least two items?
(iii) How many students buy all the three items?
32 Discrete Mathematical Structures

Solution:
Define the sets A, B and C such that U
A B
A = Set of students who buy cakes,
B = Set of students who buy ice-cream,
10 6 21
C = Set of students who buy buns. 4
4 11
According to Question, we have 17
n( A ) = 10, n(B ) = 42, n(C ) = 36
n(B ∩ C ) = 15
C
n( A ∩ B ) = 10
Fig. 1.31
n{( A ∩ C )– B} = 4
n{(B ∩ C )– A} = 11
and n{( A – B ∪ C )– B} = 10
Now, we have n(B ∪ C ) = n(B ) + n(C )– n(B ∩ C )
= 142 + 36 – 15 = 63
n(B ∪ C )– n(B ) = 63 – 42 = 21
and n(B ∪ C )– n(C ) = 63 – 36 = 27
The above distribution of the student can be illustrated by Venn diagram (Fig. 1.31).
Now, total number of students buying some thing
= 10 + 6 + 21 + 4 + 4 + 11 + 17 = 73
(i) Number of students who did not buy anything.
= 123 – 73 = 50
(ii) Number of students buying at least two items
= 6 + 4 + 4 + 11 = 25 and
(iii) Number of students buying all three items = 4.
Example 43: In a city of 1000 families, it was found that 40% families buy newspaper A, 20 families buy
newspaper B, and 10% buy C. Only 5% families buy A and B, 3% buy B and C and 4% buy A and C and 2%
families buy all the three newspapers. Find the number of families which buy:
(i) A only (ii) B only (iii) None of A, B and C.
Solution: Let P, Q and R denote the set of families buying newspaper A, B and C respectively.
Then according to question, we have
n(P ) = 40% of 1000 = 400
n(R ) = 100, n(Q ) = 200
n(P ∩ Q ) = 50, n(Q ∩ R ) = 30
n(R ∩ P ) = 40
and n(P ∩ Q ∩ R ) = 20 and n(U ) = 1000,
Where U is the universal set.
Set Theory 33

(i) Number of families which buy newspaper A only.


= n(P ∩ Q ' ∩ R ' )
= n[ P ∩ (Q ∪ R )' ] {Q (Q ∪ R )' = Q ' ∩ R ' }
= n(P )– n[(P ∩ Q ) ∪ (P ∩ R )] {Q n( A ∩ B' ) = n( A )– n( A ∩ B )}
= n(P )–[ n(P ∩ Q ) + n(P ∩ R )– n{(P ∩ Q ) ∩ (P ∪ R )}]
= n(P )–[ n(P ∩ Q ) + n(P ∩ R )– n(P ∩ Q ∩ R )]
= 400 – (50 + 40 – 20) = 330
(ii) Number of families which buy newspaper B
= n(P ' ∩Q ' ∪ R ' ) = n(Q ∩ P ' ∩ R ' )
= n[Q ∩ (P ∪ R )' ]
= n(Q )– n[Q ∩ (P ∪ R )]
= n(Q )– n[(Q ∩ P ) ∪ (Q ∩ R )]
= n(Q )– {n(Q ∩ P ) + n(Q ∩ R )– n(Q ∩ P ) ∩ (Q ∩ R )}
= n(Q )– {n(P ∩ Q ) + n(Q ∩ R )– n(P ∩ Q ∩ R )}
= 200 –[ 50 + 30 – 20] = 140.
(iii) The Number of families which buy none of A, B and C.
= n(P ' ∩ Q ' ∩ R ' )
= n[ P ∪ Q ∪ R )' ] (By de-morgan's law)
= n(U )–[ n(P ) + n(Q ) + n(R )– n(P ∩ Q ) – n(Q ∩ R )– n(R ∩ P ) + n(P ∩ Q ∩ R )]
= 1000 – (400 + 200 + 100 – 50 – 30 – 40 + 20) = 400.

1.10 Countable and Uncountable Gets


A set A is said to be Finite if either it is empty or there exists a one-to-one mapping from the set {1, 2, 3 K n}
onto the set A for some natural number N. A set which is not finite is called infinite.
Illustration : The set φ is a finite set.
Illustration: The set N of all natural numbers is infinite.
Illustration: The set Q all rational numbers is infinite.

1.10.1 Equivalent Sets


Two sets A and B are said to be equivalent if there exists a bijective map f : A → B . If A and B are equivalent
than we can write A ~ B

Illustration: Let A = {1, 2, 3, 4 K n} and B = {m, 2m, 3m, K mn}


Then A and B are equivalent because map f : A → B defined by f (i ) = m i , i = 1, 2, 3 K n is bijective.

Illustration: Any two closed intervals [ a, b] and [ c, d] are equipotent. We defined a mapping
f :[ a, b] → [ c, d ] such that
 d − c
f (x) = c +   ( x − a)
 b − a

Then, f is a bijective mapping.


34 Discrete Mathematical Structures

1.10.2 Denumerable Set


A set A is said to be Denumerable if A is equipotent to the set N of all natural numbers.

1.10.3 Countable Set


A set A is said to be countable if it is either finite or denumerable. A set which is not countable is said to be
uncountable.

Illustration: The set A = {2, 4, 6, 8, K } is also denumerable because f (n) = 2n is a bijective map from the set
N onto the set A.

Illustration: The empty set is countable because it is finite.

Theorem 12: Every subset of a countable set is also countable.


Proof: Let A be a countable set, than A can be written as a sequence. Let A = {a1 , a2, a3 , K }. If A is finite
then its every subset will also be finite and so it will be countable. Now consider that A is enumerable. Let B
be any subset of A. If B = φ then it is countable if B ≠ φ and let n1 be the least positive integer such that
an1 ∈ B . Let n2 be positive integer such that an2 ∈ B . Continuing in the manner, we find that
B = {an1 , an2 , an3 K } which is sequence and hence B is a countable set.

Theorem 13: The union of countable family of countable sets is countable. [U.P.T.U. (B. Tech.) 2009]

Proof: Let { A1 , A2, A3 K An, K } be a countable family of sets such that each An is countable.
we can write

A1 = {a11 , a12, a13 , a14 , K }


A2 = {a21 , a22, a23 , a24 K }
.............................................

.............................................
.............................................

An = {a n1 , a n2, a n3 , a n4 , K }
The following diagram demonstrates the above counting process:

A1 → a11 a12 a13 a14 ..............................

A2 → a21 a22 a23 a24 ..............................

A3 → a31 a32 a33 a34 ..............................

A4 → a41 a42 a43 a44 ..............................

................................................................................................

................................................................................................
Set Theory 35

We now list the elements of ∪ An as

a11

a21 , a12

a31 , a22, a13

a41 , a32, a23 , a14

..............................

..............................

a n1 , a( n −1 ) 2, K a1 n

..............................

..............................

It is clear that aij is the jth element of (i + j − 1)th row. Thus all the elements have been counted out. Thus ∪

An is countable.

Theorem 14: Show that the set N × N is countable.


Proof: We shall arrange the set N × N as shown below:

(1, 1) (1, 2) (1, 3) (1, 4) ..........................

(2, 1) (2, 2) (2, 3) (2, 4) ..........................

(3, 1) (3, 2) (3, 3) (3, 4) ..........................

(4, 1) (4, 2) (4, 3) (4, 4) ..........................

This scheme arranges all the elements of N × N into sequence < a1 , a2, a3 , . . . > . Thus N × N is countable.

Example 44: If A and B are countable then show that A × B is countable


Solution: Since A and B are countable, then we can write
A = {a1 , a2, a3 , a4 , . . . }
and B = {b1 , b2, b3 , b4 , K }
Let An = {an} × B = {(an, b): b ∈ B}
Then An is countable for each n because B is so. Now

A × B = ∪ An
n =1

Hence, A × B is countable

Example 45: Show that the set Q of all rational numbers is denumerable.
0 −1 1 − 2 2
Solution: Let us define An =  , , ,

, , K
n n n n n 
36 Discrete Mathematical Structures

for each n ∈ N . We show that each An is countable. We define the mapping f : N → An


r − 1
is r is odd
 n

by f (r) = 
− r is r is even
 2 n

Then f is one-to-one and onto. Thus each An is denumerable. Now Q = ∪ An is countable union of
n =1

denumerable sets. Therefore Q is denumerable.

Example 46: Show that set of all rational numbers in [ 0, 1] is countable.


Solution: The set of all rational numbers in [ 0, 1] is a subset of Q, the set of all rational numbers.
Hence, the set of all rational numbers in [ 0, 1] is countable.

Example 47: The set [ 0, 1] is uncountable.


Solution: We shall prove this result by contradiction.
Let [ 0, 1] is countable. Then there exists a bijective mapping f from N onto [ 0, 1] such that
f (1), f (2), f (3) K f (n) K . Thus
f (1) = 0 . a11 a12 a13 a14 K
f (2) = 0 . a21 a22 a23 a24 K
f (3) = 0 . a31 a32 a33 a34 K
M M M M
f (n) = 0 . a n1 a n2 a n3 a n4 K
..................................................
..................................................
where aij ∈{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
where aij ∈{0, 1, 2, K 9}
We choose a positive integer bn, for each n ∈ N

1 if ann ≠ 1
bn = 
2 if ann = 1

Let y = 0 . b1 b2 b3 K bn K
The decimal expression of y is unique since no bn is equal to 0 or 9. Moreover y ∈[ 0, 1] and y is not equal to
f (n) for any n. In fact, y differs from f (1) in the first decimal place, it differ from f (2) in the second decimal
place and so on. But this contradicts the assumptions that every real number in [ 0, 1] is in the set
{ f (1), f (2), K }. Hence [ 0, 1] is uncountable.

Example 48: The set of irrational numbers is uncountable.


Solution: Let S be the set of irrational numbers. If S be countable then S ∪ Q will also countable. But since
S ∪ Q = R is not countable, we have, S is uncountable.
Set Theory 37

1.10.4 Cardinality of Sets


Two sets A and B are said to have same cardinality if and only if A and B are equipotent. It is denoted by
| A| = card (A) or | A| = | B| iff there exists a bijective mapping f : A → B

Example 49: Find the cardinal number of each of the following sets

(i) A = {a, b, c, d, e, f } (ii) C = ]0, 1 [

Solution: (i) | A| = 6 as A has 6 numbers


(ii) |C | = c

Exercise
1. Which of the following collections are sets?
(i) The collection of all students of your class
(ii) The collection of all planets of the solar system
(iii) The collection of all interesting dramas written by Shakespeare
(iv) The collection of all good athletes of India
(v) The collection of all those students of your class whose age exceeds 15 years
[U.P.T.U. (M.C.A.) 2004]

2. Write the following sets in the roster form.


(i) A = Set of all letters in the word LETTER
(ii) B = { x : x is an integer and –2 < x < 5}
(iii) C = { x : x is a perfect square and x < 50}
(iv) D = { x : x ∈ N , x is a multiple of 5 and x 2 < 400}
(v) E = { x : x ∈ R and x 2 – 5x + 6 = 0}

3. State whether the given set is finite or infinite


(i) A = Set of all points on the circumference of a circle
(ii) B = Set of all leaves on a tree
(iii) C = { x ∈ R : 0 < x < 1}
(iv) D = { x ∈ z : – 15 < x < 15}

4. Which of the following sets are empty sets?


(i) A = { x ∈ N : 2x + 5 = 6} (ii) B = { x : x is prime, 90 < x < 96}
(iii) C = { x : x ∈ Q , 1 < x < 2} (iv) D = { x : x is an even prime}

5. Which of the following are pairs of equal sets?


(i) A = Set of the letters in the word 'ALLOY '
B = Set of the letters in the word 'LOYAL'
(ii) C = { x : x ∈ z, x – 3 = 0} and F = { x : x ∈ z, x 2 – 9 = 0}
38 Discrete Mathematical Structures

6. Which of the following are pairs of equivalent sets?


(i) A = {1, 2, 3}, B = {2, 4, 6} (ii) C = {–2, – 1, 0}, D = { 1, 2, 3}
7. State in each case whether A ⊆ B or B ⊆ A
(i) A = {1, 2, 3}, B = {1, 2, 3, 4, 5}
(ii) A = { x : x ∈ z, x 2 = 1}, B = { x : x ∈ N , x 2 = 1}
(iii) A = Set of all circles in a plane
B = Set of all circles of unit radius in the same plane [P.T.U. (B.E.) Punjab 2006]

8. If A = {1, 2, 3}, find P ( A ) and n{P ( A )}

9. Express each of the following sets as an interval.


(i) A = { x : x ∈ R , – 4 x < 0} (ii) B = { x : x ∈ R , 2 < x ≤ 6}
(iii) C = { x: x ∈ R , – 3 ≤ x < 2} [Kurukshetra (B.E.) 2007]

10. Write each of the following intervals in the set builder form.
(i) A =] – 2, 3[ (ii) B = [ 8, 11[ (iii) C = [–12, 6[
11. If A = {a, b, c, d, e, f }, B = {c, e, g, h} and C = {a, e, m, n}
(i) A∪B (ii) B ∪C (iii) A ∪C
(iv) B ∩C (v) C∩A (vi) A∩B

12. If A = {1, 2, 3, 4, 5}, B = {4, 5, 6, 7, 8}, C = {7, 8, 9, 10, 11} and D = {10, 11, 12, 13, 14} , find:
(i) (A ∪ B)∪ C (ii) (A ∪ B) ∩ C (iii) ( A ∩ B ) ∪ (B ∩ C ) (iv) ( A ∪C )∩(C ∪ D )
13. If A = {2x : x ∈ N and 1 ≤ x < 4}, B = { x + 2: x ∈ N and 2 ≤ x < 5}
and C = { x : x ∈ N and 4 < x < 8}, find:
(i) A∩B (ii) A∪B (iii) ( A ∪ B ) ∩ C
14. If A = {2, 4, 6, 8, 10, 12} and B = {3, 4, 5, 6, 7, 8, 10}, find: (A – B) ∪ (B – A)
1 1
15. If A = { : x ∈ N and x < 8} and B = { : x ∈ N and x ≤ 4}, find:
x 2x
(i) A∪B (ii) A∩B (iii) A–B (iv) B– A
16. If U = {1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {1, 2, 3, 4} B = {2, 4, 6, 8} and C = {1, 4, 5, 6}, find:
(i) A' (ii) B' (iii) C' (iv) (B' )'
(v) ( A ∪ B )' (vi) ( A ∩ C )' (vii) (B − C )'
17. Prove the following relations
(i) A ∪ B = B ∪ A (Commutative law) (ii) ( A ∪ B ) ∪ C = A ∪ (B ∪ C ) (Associative law)
(iii) A ∪ A = A (Indempotent law) (iv) A∩φ =φ∩Α=φ
(v) A ∩U = U ∩ A = A
18. If U = {1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {2, 4, 6, 8} and B = {2, 3, 5, 7} verify that
(i) ( A ∪ B )' = ( A' ∩ B' ) (ii) ( A ∩ B )' = ( A' ∪ B' )
Set Theory 39

19. If P and Q are two sets such that


n (P ∪ Q ) = 75, n (P ∩ Q ) = 17 and n (P ) = 49 find n (Q )

20. If A and B are two sets sent that n( A – B ) = 24


n(B – A ) = 19, and n( A ∩ B ) = 11, find:
(i) n( A ) (ii) n(B ) (iii) n( A ∪ B )

21. In a group of 50 persons, 30 like tea, 25 like coffee and 16 like both. How many like:
(i) either tea or coffee (ii) neither tea nor coffee [Rohtak (M.C.A.) 2007]

Hint:- (i) n ( A ) = n ( A – B) + n ( A ∩ B) (ii) n (B) = n (B – A ) + n ( A ∩ B)

22. A school award 42 medals in hockey, 18 in basketball and 23 in cricket. If these medals were bagged
by a total of 65 students and only 4 students got medals in all the three sports, how many student
received medals in exactly two of the three sports?

Hint:- n ( A ) = 42, n (B) = 18, n (C) = 23, n ( A ∪ B ∪ C) = 65 and

n ( A ∩ B ∩ C) = 4 then used.
n ( A ∪ B ∪ C) = n ( A ) + n (B) + n (C) + n ( A ∩ B ∩ C) – [ n ( A ∩ B) + n (B ∩ C) + n ( A ∩ C)]

23. In a survey of 100 students., the number of students studying the various languages are found as:
English only 18; but not Hindi 23; English and Sanskrit 8; Sanskrit and Hindi 8; English 26; Sanskrit
48 and not languages 24. Find.
(i) How many students are studying Hindi?
(ii) How many students are studying English and Hindi both? [M.K.U. (B.E.) 2004, 2008]

24. In a survey of 60 people it was found that 25 people read newspaper H, 26 read newspaper T, 26
read newspaper I, 9 read both H and I, 11 read H and T, 8 read both T and I and 3 read all the three
newspapers. Find
(i) The number of people who read at least one of the newspaper.
(ii) The number of people who read exactly one newspaper. [Osmania (B.E.) 2007]

25. Define finite and infinite sets. Distinguish these concepts with the help of suitable examples.

26. Represent each of the following relationships through Venn-diagrams.


(i) A∪B (ii) A ∩ B ∩C (iii) B ∩ C
(iv) (A ∩ C ) ∩ (A ∩ B)

27. Show that for any two sets A and B.


( A ∪ B ) − ( A ∩ B ) ⇔ ( A − B ) ∪ (B − A ) [U.P.T.U. (M.C.A.) 2001]

28. In a class of 120 students, 80 students study Mathematics, 45 students study History and 20 students
neither study History nor study Mathematics. What is the number of students who study both
Mathematics and History? [U.P.T.U. (M.C.A.) 2001]

[Hint:- 80 − x + x + ( 45 − x ) + 20 = 120]
40 Discrete Mathematical Structures

Answers
1. (i) (ii)
2. (i) A = {L, E , T , R } (ii) B = {−2, − 1, 0, 1, 2, 3, 4}

(iii) C = {1, 4, 9, 16, 25, 36, 49} (iv) D = {5, 10, 15} (v) E = {2, 3}

3. (i) Infinite set (ii) Finite (iii) Infinite


(iv) Finite
4. (i) (iv)
5. (i) A=B
6. (i) A and B are equivalent (ii) C and D are equivalent (iii) A⊆B
7. (i) A⊆B (ii) A⊆B
8. (i) P ( A ) = {φ, {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3}}
n{P ( A )} = 8
9. (i) A = ] − 4, 0[ (ii) B = [ 2, 6] (iii) C = [ −3, 2]
10. (i) A = { x ∈ R : − 2 < x < 3} (ii) B = { x : x ∈ R , 8 ≤ x < 11}
(iii) C = { x : x ∈ R , − 12 ≤ x < 6}
11. (i) {a, b, c, d, e, f , g, h} (ii) {a, c, e, g, h, m, n}
(iii) {a, b, c, d, e, f , m, n} (iv) {e}
(v) {a, e} (vi) {c, e}
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} {7, 8}
12. (i) (ii)

(iii) {4, 5, 7, 8} (iv) {7, 8, 9, 10, 11}


13. (i) {4, 6} (ii) {2, 4, 5, 6} (iii) {5, 6}
14. (i) {2, 3, 5, 7, 12}
 1 1 1 1 1 1 1 1 1 1 
(iii) 1, , , 
1 1 1 1 
15. (i) 1, , , , , , ,  (ii)  , ,  (iv)  
 2 3 4 5 6 7 8 2 4 6  3 5 7 8
16. (i) {5, 6, 7, 8, 9} (ii) {1, 3, 5, 7, 9} (iii) {2, 3, 7, 8, 9}
(iv) {2, 4, 6, 8} (v) {5, 7, 9} (vi) {2, 3, 5, 6, 7, 8, 9}
(vii) {1, 3, 4, 5, 6, 7, 9}
19. 43
20. (i) 35 (ii) 18 (iii) 68
21. (i) 35 (ii) 30
22. (i) 22
23. (i) 18 (ii) 3
24. (i) 52 (ii) 30
Set Theory 41

26.

28. 25

Objective Type Quesitons


Multiple Choice Questions
1. Let A and B be two sets in the same universal set. Then A − B is
(a) A ∩ B (b) A′ ∩ B
(c) A ∩ B′ (d) none of these
2. For two sets A and B, A ∩ ( A ∪ B ) is
(a) A (b) B
(c) φ (d) none of these
3. Let A = { x : x is a multiple of 3} and B = { x : x is a multiple of 5}. Then A ∩ B is
(a) {3, 6, 9 K } (b) {5, 10, 15, 20 K
(c) {15, 30, 45 K (d) none of these
4. For any set A, ( A′ )′ is equal to
(a) A′ (b) φ
(c) A (d) none of these
5. Which of the following statement is false
(a) A − B = A ∩ B′ (b) A − B = A − (A ∩ B)
(c) A − B = A − B′ (d) none of these
6. If A and B be sets, then ( A ∩ B ) ∪ ( A ∩ ~ B ) and A ∩ (~ A ∪ B ) are equal to [U.P.T.U. (M.C.A.) 2008]
(a) A and B (b) A and A ∩ B
(c) A ∪ B and A (d) A ∪ (~ B ) and A ∪ B
7. The number of subsets of a set having n elements is
(a) n (b) 2n − 1
(c) 2n (d) none of these
42 Discrete Mathematical Structures

8. If A and B are two sets such that A ∩ B = A ∪ B, then


(a) A=φ (b) B=φ
(c) A=B (d) none of these
9. If X and Y are two sets, then X ∩ (Y ∪ X )′ equals
(a) X (b) Y
(c) φ (d) none of these
10. Which of the following is true
(a) { x : x + 2 = 2} = φ
(b) for any set A and B either A ⊆ B or B ⊆ A
(c) set of all persons on earth is an infinite set
(d) { x : x ∈ R , − 1 < x < 3} is an infinite set
11. A and B are two sets having 3 and 5 elements respectively and having 2 elements in common. Then
the number of elements in A × B is
(a) 6 (b) 36
(c) 15 (d) none of these
12. A survey of 100 Indians shows that 60 like cheese whereas 70 like apples. Let n be the number of
persons who like both cheese and apple. Then
(a) n = 30 (b) n = 60
(c) n = 10 (d) none of these
13. Let A = { x : x ∈ R , x ≥ 3}, B = { x : x ∈ R , x ≤ 5}. Then A ∩ B is
(a) (3, 5) (b) [ 3, 5]
(c) B (d) none of these
14. n ( A ∩ B ) = 100, then n ( A′ ∩ B′ ) is
(a) 400 (b) 600
(c) 300 (d) none of these
15. For two sets A and B, A − ( A − B ) is
(a) B (b) A−B
(c) A∩B (d) none of these
16. For three sets A, B and C in the same universe, ( A ∪ B ) − C is
(a) ( A − C ) ∪ (B − C ) (b) ( A − C ) ∩ (B − C )
(c) A ∪ (B − C ) (d) none of these
17. Two finite sets have m and n elements. The total number of subsets of the first set is 56 more than the
total number of subsets of the second set. The values of m and n are
(a) 7, 6 (b) 6, 3
(c) 5, 1 (d) 7, 8
Set Theory 43

State True or False


1. Null set φ can be expressed in infinitely many ways
2. Univeral set is unique
3. ( A ∪ B )′ = A′ ∪ B ′
4. Let A = {1, 2, 1, 3}, B = {2, 1, 2, 2, 3} and C = {1, 3, 3, 2, 1, 2}. Then A = B but A ≠ C
5. A − B, A ∩ B, B − A are pair-wise disjoint
6. Let A ∆ B = ( A ∪ B ) − ( A ∩ B ). Then A ∩ (B ∆ C ) = ( A ∩ B ) ∆ ( A ∩ C )

Fill in the Blank(s)


1. For the universal set
X = {a, b, c, d, e, f , g, h}, let
A = {a, e, f , c}, B = {c, d, e, g}, C = {b, c, e, h}
(i) A ∪ (B ∩ C ) = K (ii) ( A ∩ B ) − C = K
(iii) ( A′ ∩ B ) ∪ C ′ = K(iv) ( A − B ) ∪ C = K

2. Let R be the universal set and X ∩ {2, 4, 8, 10} = 2, 8, then smallest set X = K and largest set X = K
3. Let A = {φ, b}, construct the following sets.
(i) A−φ (ii) {φ} − A
(iii) A ∪ φ ( A) (iv) A ∩ P ( A)
(v) φ−A [U.P.T.U. (M.C.A.) 2004]
44 Discrete Mathematical Structures

Answers
Multiple Choice Questions
1. (c) 2. (a) 3. (c) 4. (c) 5. (c) 6. (b) 7. (c)

8. (c) 9. (c) 10. (d) 11. (c) 12. (d) 13. (b) 14. (c)

15. (c) 16. (a) 17. (b)

State True or False


1. (T) 2. (F) 3. (F) 4. (F) 5. (T) 6. (T)

Fill in the Blank(s)


1. (i) {a, b, c, d, e, f } (ii) φ (iii) {a, d, f , g} (iv) {a, b, c, e, f , g}

2. (2, 8) and R − {4, 10}

3. (i) A (ii) φ (iii) P ( A ) (iv) A (v) φ

qqq
Relations 45

2.1 Binary Relation [R.G.P.V. (B.E.) Bhopal 2006; Pune (B.E.) 2005; R.G.P.V. (B.E.) Raipur 2005]

Let A and B be non-empty sets, then any subset R of the Cartesian product A × B is called a Relation from A
to B and is denoted by R. Thus, R is a relation from A to B ⇒ R ⊆ A × B . Symbolically we write
R = {( x, y ): x ∈ A, y ∈ B and x R y}
where x R y denotes that x is R related to y.

Example 1: Let A = {1, 2, 5} and B = {2, 4} be two given sets. Now suppose a relation from the set A to B is
expressed by statement ‘is less than’.
Solution: We have A × B = {(1, 2), (1, 4), (2, 2), (2, 4), (5, 2), (5, 4)} when x < y, then some ordered pairs
are related and some are not. The subset A × B whose elements are related in the relation R is given by
R = {(1, 2), (1, 4), (2, 4)}
clearly R⊂ A×B

Illustration: Let A denote the set of real numbers. Define.


R = {(a, b): 4a2 + 25b2 ≤ 100}
clearly R is a relation on A . [P.T.U. (B.E.) Punjab 2008]

If (a, b) ∈ R , we often write a R b and state, a is related to b’

If R ⊆ A × A, then R is the relation from A to A and R is called relation in A

2.2 Total Number of Distinct Binary Relations from Set A to Set B


If set A has m elements and set B has n elements, then A × B will have mn elements. Therefore, power set of
A × B will have 2mn elements. Thus, A × B has 2mn different subsets. Now every subset of A × B is a relation
from A to B. Hence, the number of different relations from A to B = 2mn

2.2.1 Domain and Range of a Relation


Let R = {( x, y ): x ∈ A, y ∈ B and x R y } be a relation from A to B . Then the set of first co-ordinates of every
element of R is called Domain R and denoted by Dom (R ) or d (R ) and the set of second co-ordinates of its
every element is called Range of R and denoted by Ran (R ) or r (R ). Symbolically
46 Discrete Mathematical Structures

d (R ) = domain of R = { x : x ∈ A and ( x, y ) ∈ R for some y ∈ B}


and r (R ) = range of R = { y : y ∈ B and ( x, y ) ∈ R for some x ∈ A}

Example 2: Let A = {a, b, c}, B = {2, 4, 6, 10}. A relation R from A to B is given as follows a R 2, a R 4 ,
a R 6 , aR10 , b R 6 , c R10 , write R as set of ordered pair.

Solution: R = {(a, 2), (a, 4), (a, 6), (a, 10), (b, 6), (c, 10)}

Illustration: Let L be the set of all lines in a plane and R be a relation in L defined by ‘‘is perpendicular to’’,
then
R = {( x, y ): x, y ∈ L and x ⊥ y}
is a relation in L and R ⊆ L × L

Example 3: Let A = {2, 4, 6} and B = {1, 4, 5, 6} then find out the relation from A to B defined by ‘‘is less than
or equal to’’. Find out the domain and range of the relation. [Pune (B.E.) 2006]

Solution: We have by Cartesian product of two sets.


A × B = {(2, 1), (2, 4), (2, 5), (2, 6), (4, 1), (4, 4), (4, 5), (4, 6), (6, 1) , (6, 4), (6, 5), (6, 6)}
Let R be the relation ‘‘is less than or equal to’’
Since 2<
|1 ⇒ (2, 1) ∉ i . e. 2 R1
2 < 4 ⇒ (2, 4) ∈ R i.e. 2 R 4

2 < 5 ⇒ (2, 5) ∈ R i.e. 2 R 5

2 < 6 ⇒ (2, 6) ∈ R i.e. 2 R 6

4<
|1 ⇒ (4, 1) ∉ R i.e. 4 R1

4 = 4 ⇒ (4, 4) ∈ R i.e. 4 R 4

4 < 5 ⇒ (4, 5) ∈ R i.e. 4 R 5

4 ≤ 6 ⇒ (4, 6) ∈ R i.e. 4 R 6

6 ≤|1 ⇒ (6, 1) ∉ R i.e. 6 R1

6 |≤ 4 ⇒ (6, 4) ∉ R i.e. 6 R 4

6 ≤| 5 ⇒ (6, 5) ∉ R i.e. 6 R 5

6 = 6 ⇒ (6, 6) ∈ R i.e. 6 R 6

Hence R = {( x, y ): x ∈ A, y ∈ (B ) and x ≤ y}
= {(2, 4), (2, 5), (2, 6), (4, 4), (4, 5), (4, 6), (6, 6)}
d (R ) = { x : x ∈ A and ( x, y ) ∈ R }
= {2, 4, 6}
r (R ) = { y : y ∈ B and ( x, y ) ∈ R } = {4, 5, 6}
Relations 47

Example 4: Let A = {a, b} and A 2 is the set of all words of length 2.

(i) Find the elements of A 2


(ii) The relation R on A 2 is defind x R y ⇒ first letter in x is same as first letter in y when x, y ∈ A 2, write R
as a set of ordered pairs. [Delhi (B.E.) 2005, 2009]

Solution: A 2 = {(a, a), (a, b), (b, a), (b, b)}

R = {(aa, ab), (ab, aa), (ba, bb), (bb, ba)}

2.3 Some Operations on Sets


1. x (S ∩ T )y = x S y ∧ x T y
2. x (S ∪ T )y = x S y ∨ x T y
3. x (R − S )y = x R y ∧ x /Sy
4. x (R ′ )y = x R y where R′ is complement of R

2.4 Operations on Relation


2.4.1 Complement of a Relation
Consider a relation R from set A to B . The complement of relation R denoted by R or R′ is a relation from A
to B such that
R = {(a, b): (a, b) ∉ R }

Example 5: Let R be relation from X to Y, where X = {1, 2, 3} and Y = {8, 9}


and R = {(1, 8), (2, 8), (1, 9), (3, 9)}. Find the complement of relation R .

Solution: We first find X × Y i.e.

X × Y = {(1, 8), (1, 9), (2, 8), (2, 9), (3, 8), (3, 9)}
Then complement relation R or R′ w.r.t. X × Y
R = {(2, 9), (3, 8)}

2.4.2 Inverse Relation


Let R be relation from a set A to B. The inverse of relation R denoted by R −1 is a relation from B to A such
that bR a–1 iff a R b . Symolically

R −1 = {(b, a): (a, b) ∈ R }

Thus, to find R −1 we write in reverse order all ordered pairs belonging to R.


48 Discrete Mathematical Structures

Example 6: Let A = {1, 2, 3} and relation (R ) is ≤ on A . Determine its inverse. [Nagpur (B.E.) 2007]
Solution: The relation R under ≤ is defined as
R = {(1, 2), (1, 3), (1, 1), (2, 2), (2, 3), (3, 3)}
−1
⇒ R = {(2, 1), (3, 1), (1, 1), (2, 2), (3, 2), (3, 3)}

Example 7: Find the R −1 to the relation R on A defined ‘‘ x + y’’ divisible by 2. For A = {1, 2, 3, 4, 6}

Solution: R = {(1, 1), (2, 2), (3, 3), (4, 4), (6, 6), (1, 3), (2, 4), (2, 6), (4, 6)
⇒ R −1 = {(1, 1), (2, 2), (3, 3), (4, 4), (6, 6), (3, 1), (4, 2), (6, 2), (6, 4)

2.4.3 Intersection and Union of Relations


If R and S are the two relations then intersection of R and S denoted by R ∩ S and the union of R and S
denoted by R ∪ S are two new relation that can be formed from R and S .
Thus R ∪ S = {( x, y ): x R y or x Sy }
R ∩ S = {( x, y ): x R y and x S y }
Illustration: Let R1 = {(1, 1), (2, 2), (3, 3), (4, 4), (3, 4), (4, 3)}
R 2 = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1)}
Then R1 ∪ R 2 = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1), (3, 4), (4, 3)}
R1 ∩ R 2 = {(1, 1), (2, 2), (3, 3), (4, 4)}
Identity relation: A relation R in a set A is said to be identity relation if I A = {( x, x ): x ∈ A}

2.5 Properties of Relation [R.G.P.V. (B.E.) Raipur 2005, 2009]

A relation R on a set A satisfies certain properties. These properties are defined as.
(i) Reflexive Relation: A relation R on a set A is reflexive if a R a ∀ a ∈ A i.e. is (a, a) ∈ R V a ∈ R ⇒ each
element a of A is related to itself.

Illustration: Let A = {a, b} and R = {(a, a), (a, b), (b, b)}
Then R is reflexive as a R a, bR b ∈ R
(ii) Irreflexive Relation: A relation R on set A is irreflexive if, for every a ∈ A, (a, a) ∉ R

Illustration: Let A = {1, 2} and R = {(1, 2), (2, 1)}

Then R is irreflexive, since both (1, 1) and (2, 2) ∉ R


(iii) Non-reflexive Relation: A relation R on a set A is non-reflexive if R is neither reflexive nor
irreflexive.
(iv) Symmetric Relation: If R is a relation in the set A, then R is called symmetric relation if a is R
related to b then b is also R-related to a.
i.e. (a, b) ∈ R ⇒ (b, a) ∈ R or aR b ⇒ bR a ∀ a, b ∈ A

Note: The relation R will be symmetric if R = R − 1


Relations 49

Example 8: If A = {2, 4, 5, 6} and


R1 = {(2, 4), (4, 2), (4, 5), (5, 4), (6, 6)}
and R 2 = {(2, 4), (2, 6), (6, 2), (5, 4), (4, 5)}
Solution: The relation R1 is symmetric since
(2, 4) ∈ R1 ⇒ (4, 2) ∈ R1
(4, 5) ∈ R1 ⇒ (5, 4) ∈ R1
(6, 6) ∈ R1 ⇒ (6, 6) ∈ R1
Hence (a, b) ∈ R ⇒ (b, a) ∈ R is true. But R 2 is not symmetric since (2, 4) ∈ R 2 ⇒ (4, 2) ∉ R 2
(v) Antisymmetric Relation: A relation R is said to be antisymmetric if aR b and b R a ⇒ a = b

Illustration: In the set of natural numbers, the relation a divides b is anti-symmetric, since a divides b and b
divides a is possible only when a = b
i.e. (a, b) ∈ R and (b, a) ∈ R ⇒ a = b

(vi) Asymmetric Relation: A relation R on set A is asymmetric if (a, b) ∈ R then (b, a) ∉ R for a ≠ b

Illustration: Let A = {1, 2, 3} and R = {(1, 2), (1, 1), (2, 3), (3, 1)} is a asymmetric relation.

(vii) Transitive Relation: The relation R on set A is called transitive relation if a R b and b R c ⇒ aR c or
(a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R ∀ a, b, c ∈ A

Illustration: If A = {1, 3, 5} and R = {1, 3), (1, 5), (3, 5)} then 1 R 3 and 3 R 5 ⇒ 1 R 5
i.e. (1, 3) ∈ R and (3, 5) ∈ R ⇒ (1, 5) ∈ R

2.6 Equality of Relation [R.G.P.V. (B.E.) Bhopal 2003, 2007; Rohtak (M.C.A.) 2008]

Let A be non-empty set and R be a relation defined on A . Then R is said to be Equivalence Relation if it is
(i) Reflexive i.e. a R a ∀ a ∈ A

(ii) Symmetric i.e. if a R b ⇒ bR a ∀ a, b ∈ A

(iii) Transitive i.e. a R b and b R c ⇒ aR c ∀ a, b, c ∈ A

2.7 Composite Relation [U.P.T.U. (M.C.A.) 2004]

Let A, B and C be three non-empty sets and R be a relation from A to B and S be a relative from B to C . Then
the Composite Relation of the two relations R and S is a relation from A to C and denoted by SoR and
defined as
SoR = {(a, c): ∃ an element b ∈ B such that (a, b) ∈ R and
(b, c) ∈ S} where a ∈ A, c ∈ C
Hence we can say that
(a, b) ∈ R , (b, c) ∈ S ⇒ (a, c) ∈ SoR
50 Discrete Mathematical Structures

The composition of a relation with itself is denoted with power of a relation R . Let R be a relation on the set
A . Then RoR is the composition of R with itself and RoR = R 2. Similarly R 3 = R 2oR = RoRoR .

Example 9: Let A = {1, 2, 3}, B = { p, q, r} and C = { x, y, z} and let R = {(1, p), (1, r), (2, q), (3, q)}
and S = {( p, y ), (q, x ), (r, z )}
Compute RoS [P.T.U. (B.E.) 2008; M.K.U. (B.E.) 2006]

Solution:

Fig. 2.1
Here, order pair (1, p) in R and ( p, y ) in S produce the order pair (1, y ) in RoS . Order pair (1, r) in R and (r, z )
in S produce the order (1, z ) in RoS . Similarly (2, q) in R and (q, x ) in S ⇒ (2, x ) in RoS. Also (3, q) in R and (q, x )
in S ⇒ (3, x ) in RoS
Hence SoR = {(1, y ), (1, z ), (2, x ), (3, x )}
or
(1, p) ∈ R and ( p, y ) ∈ S ⇒ (1, y ) ∈ SoR
(1, r) ∈ R and (r, z ) ∈ S ⇒ (1, z ) ∈ SoR
(2, q) ∈ R and (q, x ) ∈ S ⇒ (2, x ) ∈ SoR
(3, q) ∈ R and (q, x ) ∈ S ⇒ (3, x ) ∈ SoR

Example 10: Let R = {(1, 1), (2, 1), (3, 2)} and R = {(1, 1), (2, 1), (3, 2)} compute R 2

Solution: R 2 = RoR ,
Now, (1, 1) ∈ R ⇒ (1, 1) ∈ R ⇒ (1, 1) RoR
(2, 1) ∈ R ⇒ (1, 1) ∈ R ⇒ (2, 1) ∈ RoR
(3, 2) ∈ R ⇒ (2, 1) ∈ R ⇒ (3, 1) ∈ RoR
Hence, RoR = {(1, 1), (2, 1), (3, 1)}

Theorem 1: If R is relation from A to B, S is a relation from B to C and T is a relation from C to D.


Then prove that To (SoR ) = (ToS ) oR [R.G.P.V. (B.E.) Bhopal 2008; R.G.P.V. Raipur (B.E.) 2006;

U.P.T.U. (M.C.A.) 2001, 2003]

Proof: Let M R , M S and M T denote the matrices related to relation R , S and T respectively then,
M To ( SoR ) = M SoR . M T
= (M R . M S ). M T
= M R (M S . M T ) (Multiplication of matrix is associative)
= M R (M ToS )
= M ( ToS ) oR
∴ To (SoR ) = (ToS ) oR
Relations 51

Theorem 2: Let R be a relation from the set A to the set B and S be a relation from the set B to set C, then
(SoR )−1 = R −1 oS −1 . [U.P.T.U. (M.C.A.) 2003; U.P.T.U. (B.E.) 2002]

Proof: Let (c, a) ∈ (SoR )−1 ⇒ (a, c) ∈ (SoR ) ∀ a ∈ A, c ∈ C

∴ There exist an element b ∈ B with (a, b) ∈ R and (b, c) ∈ S


∴ (a, b) ∈ R and (b, c) ∈ S ⇒ (b, a) ∈ R −1 and (c, b) ∈ S −1

⇒ (c, b) ∈ S −1 and (b, a) ∈ R −1

= (c, a) ∈ R −1 oS −1

∴ (c, a) ∈ (SoR )−1 ⇒ (c, a) ∈ R −1 oS −1

Thus, (SoR )−1 = R −1 oS −1

Example 11: Let A = {a, b}

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


S = {(a, b), (b, a), (b, b)}
−1 −1 −1
Then, verify (SoR ) =R oS [U.P.T.U. (M.C.A.) 2002]

Solution: Now to find SoR


(a, a) ∈ R and (a, b) ∈ S ⇒ (a, b) ∈ SoR
(b, a) ∈ R and (a, b) ∈ S ⇒ (b, b) ∈ SoR
(b, b) ∈ R and (b, a) ∈ S ⇒ (b, a) ∈ SoR
∴ SoR = {(a, b), (b, a), (b, b)}
⇒ (SoR )−1 = {(b, a), (a, b), (b, b)}

and R −1 = {(a, a), (a, b), (b, b)}

S −1 = {(b, a), (a, b), (b, b)

R −1 oS −1 = {(a, b), (b, a), (b, b)}

∴ (SoR )−1 = R −1 oS −1

2.8 Recursion and Recurrence Relations


Let A be given set, the successor of A is the set A ∪ { A}. It is denoted by A +
∴ A + = A ∪ { A}
Let φ be the null set, then find the successor sets of φ, these sets are
φ, φ + = φ ∪ {φ}, φ ++ = φ ∪ {φ} ∪ {φ, {φ}}
They can be written as φ, φ + = {φ}, φ ++ = {φ, ∪ {φ}}.
Renaming the φ as 0 (zero)
φ + = 0+ = {φ} = 1, φ ++ = 1+ = {φ, {φ}} = {0, 1} = 2
52 Discrete Mathematical Structures

we get the set {0, 1, 2, 3 K } each element in the above set is a successor set of previous element, except 0.

Now we consider recursion in terms of successor.


Let S denote the successor, we define
(i) x + 0 = x (ii) x + S ( y ) = S ( x + y )

In this definition (i) is the basis and it defines addition of 0. The recursive part defines addition of the
successor of y.
Illustration: 3 + 2 = 3 + S (1) = S (3 + 1) = S (S (3 + 0)) = S (S + 3) = S(4) = 5

2.9 Order of Relation


There are two order of relation
(i) Partial Order Relation: The set A together with partially order relation R on the set A and is
denoted by ( A, R ) is called partially ordered set or Poset.
(ii) Total Order Relation: Consider the relation R on the set A.
If it is the case that for all a, b ∈ A, we have either (a, b) ∈ R or (b, a) ∈ R or a = b, then the relation R is called
total order relation on set A.
A relation R on set A is called partial order relation if it satisfies the following properties
(a) Relation R is reflexive i.e. a R a ∀ a ∈ A
(b) Relation R is antisymmetric a R b and b R a ⇒ a = b
(c) Relation R is transitive a R b, bR c ⇒ aR c

ä Closure of Relation

Let R be a relation on a set A.R may or may not have some property P, such as reflexivity, symmetry or
transitivity. If there is a relation S with property P containing R such that S is a subset of every relation with
P containing R, then S is called the closure of R with respect to P.

Reflexive Closure: Let R be a relation on a set A, and R is not reflexive (i.e. some pairs of the diagonal
relation ∆ are not in (R ). A relation R1 = R ∪ ∆ is the reflexive closure of the relation R if R ∪ ∆ is the
smallest relation containing R which is reflexive.

Illustration: A = {a, b, c} and relation R is given by


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

Reflexive closure = R1 = R ∪ ∆ where

∆ = is the set of elements of the type (a, a) where a ∈ A


i.e. ∆ = {(a, a), (b, b), (c, c)}

∴ R1 = R ∪ ∆ = {(a, a), (a, b), (b, b), (b, c), (c, c)}

Symmetric Closure: Let R be relation on A which is not symmetric and R −1 be inverse relation of R on A
then symmetric closure R * is defined as
R ∗ = R ∪ R −1
Relations 53

Example 12: Is R = {(1, 2), (4, 3), (2, 2), (2, 1), (3, 1)} be a relation on S = {1, 2, 3, 4}? Find the symmetric
closure.
Solution: The symmetric closure can be found by taking the union of R and R −1
Now R −1 = {(2, 1), (3, 4), (2, 2), (1, 2), (1, 3)}

Then R ∗ = R ∪ R −1 = {(1, 2), (2, 1), (4, 3), (3, 4), (3, 1), (1, 3)}

ä Transitive Closure

The relation obtained by adding the least number of ordered pairs to ensure transitivity is called the
Transitive Closure of the relation. The transitive closure of R is denoted by R + . Let a relation R be
defined on A and contains m elements, one never needs more than m steps. Consequently to make a
relation R transitive, one has to add all pairs of R 2. All pairs of R 3 and so on upto all pairs of R m , unless
these pairs are already in R. Thus
R+ = R ∪ R2 ∪ R3 ... ∪ Rm

Example 13: Let A = {1, 2, 3, 4} and R = {(1, 2), (2, 3), (3, 4)} be a relation on A . Find transitive closure R + .

Solution: We have R = {(1, 2), (2, 3), (3, 4)}


R 2 = RoR = {(1, 2), (2, 3), (3, 4)} O {(1, 2), (2, 3), (3, 4)}
= {(1, 3), (2, 4)}
R 3 = R 2oR = {(1, 3), (2, 4)} O {(1, 2), (2, 3), (3, 4)}
= {(1, 4)}
R = R 3 oR = {(1, 4)} O {(1, 2), (2, 3), (3, 4)}
4


+
Hence R = R ∪ R2 ∪ R3 ∪ R4
= {(1, 2), (2, 3), (3, 4), (1, 3), (2, 4), (1, 4)}

Theorem 3: Let R be relation from A to B and let A1 and A2 be two subsets of A, then
(i) A1 ⊆ A2 ⇒ R ( A1 ) ⊆ R ( A2 ) (ii) R ( A1 ∪ A2 ) = R ( A1 ) ∪ R ( A2 )

(iii) R ( A1 ∩ A2 ) ⊆ R ( A1 ) ∩ R ( A2 ) [P.T.U. (B.E.) Punjab 2006, 2009]

Proof: (i) Let y ∈ R ( A1 ) ⇒ x R y for some x ∈ A1


⇒ x ∈ A2 [∴ A1 ⊆ A2]
∴ R ( A1 ) ⊆ R ( A2 )

(ii) Let y ∈ R ( A1 ∪ A2 ) ⇒ x R y for some x ∈ A1 ∪ A2

Now x ∈ A1 ∪ A2 ⇒ x ∈ A1 or x ∈ A2
If x ∈ A1 , then x R y ⇒ y ∈ R ( A1 ), similarly if x ∈ A2 ⇒ y ∈ R ( A2 )
In either case y ∈ R ( A1 ) ∪ R ( A2 ) ∴ R ( A1 ∪ A2 ) ⊆ R ( A1 ) ∪ R ( A2 ) ...(1)
Again A1 ⊆ A1 ∪ A2 ⇒ R ( A1 ) ⊆ R ( A1 ∪ A2 )
A2 ⊆ A1 ∪ A2 ⇒ R ( A2 ) ⊆ R ( A1 ∪ A2 )
54 Discrete Mathematical Structures

Therefore R ( A1 ) ∪ R ( A2 ) ⊆ R ( A1 ∪ A2 ) ...(2)
From (1) and (2) R ( A1 ∪ A2 ) = R ( A1 ) ∪ R ( A2 )

(iii) Let y ∈ R ( A1 ∩ A2 ) ⇒ x R y for some x in A1 ∩ A2


Now, x ∈ A1 ∩ A2 ⇒ x ∈ A1 and x ∈ A2
⇒ y ∈ R ( A1 ) and y ∈ R ( A2 ) ⇒ y ∈ R ( A1 ) ∩ R ( A2 )
∴ R ( A1 ∩ A2 ) ⊆ R ( A1 ) ∩ R ( A2 )

2.10 Matrix Representation of Relations


2.10.1 Matrix of Relation
 A = {a1 , a2, a3 , K am }
Let R be the relation from the set A to B , where 
B = {b1 , b2, b3 , K bn}

be finite sets having m and n elements respectively. Then R can be represented by mn matrix and defined as
M R = {mij }
1 if (a, b) ∈ R
where mij = 
0 if (a, b) ∉ R

The matrix M R is called the matrix of R.

Note: M SoT = M S . M T

Example 14: Let R be the relation from the set A = {1, 3, 4} on itself and defined by
R = {(1, 1), (1, 3), (3, 3), (4, 4)} then find relation matrix.
[R.G.P.V. (B.E.) Raipur 2007; M.K.U. (B.E.) 2005, 2009; Pune (B.E.) 2008]

Solution: Let M R denotes the matrix of R. The number of rows in M R = number of elements in A = 3.
Since the relation from the set A on itself, the number of columns in M R is also 3 i.e. M R is 3 × 3 matrix

Here a1 = 1, a2 = 3 and a3 = 4
b1 = 1, b2 = 3 and b3 = 4
Since 1 R1 ⇒ m11 = 1 as (a1 , b1 ) = (1, 1) = 1

1R3 ⇒ m13 = 1 as (a1 , b3 ) = (1, 3) = 1

3R3 ⇒ m33 = 1 as (a3 , b3 ) = (3, 3) = 1

4R4 ⇒ m44 = 1 as (a4 , b4 ) = (4, 4) = 1


and all other elements of M R are zero.
1 3 4
1  m11 m12 m13 
Hence, MR = 3 m21 m22 m23 
 
4 m31 m32 m33 
Relations 55

1 3 4
1 1 1 0
= 3 0 1 0
 
4 0 0 1 

Example 15: Let A = {1, 2, 3, 4, 8}, B = {1, 4, 6, 9} Let a R b iff a| b i.e. a divides b. Find the relation matrix.
[Delhi (B.E.) 2005]

Solution: We have R = {(1, 1), (1, 4), (1, 6), (1, 9), (2, 4), (2, 6), (3, 6), (3, 9), (4, 4)}

1 4 96
1 1 1 1
1
2 0 1 0
1
 
MR = 3 0 0 1
1
 
4 0 1 0 0
8 0 0 0 0

Example 16: Let A = {a, b, c, d} and let

1 1 0 0
0 0 1 1
MR =  find R
0 0 1 1
 
1 0 1 0

Solution: R = {(a, a), (a, b), (b, c), (b, d ), (c, c), (c, d ), (d, a), (d, c)}

Example 17: Let A = {1, 2, 3, 4} and let, R be a relation on A whose matrix is

1 1 1 1
0 0 0 0
MR = 
1 1 1 1
 
0 1 0 0

Show that R is transitive [U.P.T.U. (M.C. A.) 2003; Rohtak (M.C. A.) 2007]

Solution: By the transitivity of R means that if M R2 = M R . M R and M R2 + M R = M R

1 1 1 1 1 1 1 1  1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0
∴ M R2 = M R . M R =   = 
1 1 1 1 1 1 1 1  1 1 1 1
     
0 1 0 0 0 1 0 0 0 0 0 0

1 1 1 1 1 1 1 1  1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0
So, M R2 + M R = +  =  = MR
1 1 1 1 1 1 1 1  1 1 1 1
     
0 0 0 0 0 1 0 0 0 1 0 0

∴ The relation R is transitive


56 Discrete Mathematical Structures

2.11 Digraphs
If A is a finite set and R is a relation on A, we can also represent R pictorially as
(i) Draw the small circle for each element of A and label the circle with corresponding element of A.
These circles are called vertices.

(ii) Draw an arrow, called an edge, from vertex ai to aj ⇔ ai R a j

The resulting pictorial representation of R is called a Directed Graph or Digraph of R.

The directed graph representing a relation can be used to determine whether the relation has various
properties.

(i) A relation is reflexive iff there is a loop at every vertex of the directed graph. So that the ordered pair
of the form (a, a) occurs in the relation. If no vertex has a loop, then the relation is irreflexive.

(ii) A relation is Symmetric iff for every edge between distinct vertices in its digraph there is an edge in
the opposite direction, so that (b, a) is in the relation whenever (a, b) is in the relation. A relation is
anti-symmetric if no two distinct points in a digraph have an edge going between them in both
direction.

(iii) A relation is transitive iff whenever there is a directed edge from a vertex a to a vertex b and from a
vertex b to vertex c, then there is also a directed edge from a to c.

Example 18: Let A = {1, 2, 3, 4}


R = {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (2, 4), (3, 4), (4, 1), (4, 4)}
Construct the digraph of R [Nagpur (B.E.) 2006]

Solution: The digraph of R is

Fig. 2.2
Relations 57

Example 19: Find the relation determine by

Fig. 2.3
Solution: The relation R of the digraph is
R = {(a, a), (a, c), (b, c), (c, b), (c, c), (d, c)}

Example 20: Let R = {(1, 2), (2, 3), (3, 1)} and A = {1, 2, 3}, find the reflexive, symmetric and transitive
closure of R, using
(i) Composition of relation R
(ii) Composition of matrix relation R [R.G.P.V. (B.E.) Raipur 2005, 2009]

(iii) Graphical representation of R


[P.T.U. (B.E.) Punjab 2002, 2006, 2009; M.K.U. (B.E.) 2005, 2008; Osmania (B.E.) 2003]

Solution: (i) The reflexive closure of R is denoted by R1 and given by


R1 = R ∪ ∆ or R ∪ I A
I A = identity relation
R1 = {(1, 2), (2, 3), (3, 1)} ∪ {(1, 1), (2, 2), (3, 3)}
= {(1, 1), (1, 2), (2, 2), (2, 3), (3, 1), (3, 3)}
The symmetric closure of R is denoted by R ∗ is given by
R ∗ = R ∪ R −1
= {(1, 2), (2, 3), (3, 1)} ∪ {(2, 1), (3, 2), (1, 3)}
= {(1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)}
The transitive closure of R is denoted by R +
Now RoR = {(1, 2), (2, 3), (3, 1)} o {(1, 2), (2, 3), (3, 1)}
⇒ R 2 = {(1, 3), (2, 1), (3, 2)}

R 3 = R 2oR = {(1, 3), (2, 1), (3, 2)} o {(1, 2), (2, 3), (3, 1)}

= {(1, 1), (2, 2), (3, 3)}


R = R 3 oR = {(1, 1), (2, 2), (3, 3)} o {(1, 2), (2, 3), (3, 1)}
4

= {(1, 2), (2, 3), (3, 1)} = R


+ 2 3
Thus R = R ∪ R ∪ R = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}
58 Discrete Mathematical Structures

(ii) Let M be the relation matrix of R, then


0 1 0
M = 0 0 1 
 
1 0 0

The symmetric closure matrix of R, denoted by M S i.e.

M S = M . M ′ or M ∨ M ⊥

0 1 0 0 0 1  0 1 1 
= 0 0 1  1 0 0 = 1 0 1 
    
1 0 0 0 1 0 1 1 0

R S* = {(1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)}

The reflexive closure matrix of R is R1 is given by


0 1 0 1 0 0 1 1 0
R1 = M ∨ I 3 = 0 0 1  ∨ 0 1 0 = 0 1 1 
     
1 0 0 0 0 1  1 0 1 

⇒ R1 = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 1), (3, 3)}
0 1 0 0 1 0 0 0 1 
Now M 2 = M . M = 0 0 1  0 0 1  = 1 0 0
    
1 0 0 1 0 0 0 1 0

0 0 1  0 1 0 1 0 0
M = M . M = 1 0 0 0 0 1  = 0 1 0
3 2
    
0 1 0 1 0 0 0 0 1 

The transitive closure relation matrix of R, denoted by M T

i.e. M T = M ∨ M 2 ∨ M 3 = M . M 2. M 3

0 1 0 0 0 1  1 0 0 1 1 1
= 0 0 1  1 0 0 0 1 0 = 1 1 1
     
1 0 0 0 1 0 0 0 1  1 1 1

⇒ R + = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}

(iii) The graphical representation of R is shown in Fig. 2.4 1 2

3
Fig. 2.4
Relations 59

To find out the reflexive closure representation of R we add all the arrows
1 2
from points to themselves which is shown in Fig. 2.5

Fig. 2.5

To find symmetric closure representation of R, we add missing reverses of all


the arrows in graphical representation of R. This is shown in Fig. 2.6

Fig. 2.6
To find transitive arrow we add 1 to 1 since 1 → 2 → 3 → 1 . Similarly 2 to 2, 3
to 3. Again we add arrow 1 to 3, since 1 → 2 → 3. Similarly 2 to 1 and 3 to 2.
This is shown in Fig. 2.7 1 2

Fig. 2.7

2.12 Equivalence Classes


Consider an equivalence relation R on a set A . The equivalence class of an element a ∈ A is the set of
elements of A to which element a is related. It is denoted by [ a] or a.

Example 21: Let A = {a, b, c} and let R = {(a, a), (b, b), (c, c), (a, b), (b, a)} where R is clearly an equivalence
relation. Find equivalence classes of the elements of A .
Solution: The equivalence classes are
[ a] = {a, b}, [ b] = {b, a} = [ a], [ c] = {c}
and rank of R is 2.

Example 22: Let A = {1, 2, 3, 4} and let


R = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (3, 3), (4, 4)}

Determine the equivalence classes and find rank of R.


Solution: The equivalence class of A are
[1] = R (1) = {1, 2, 3} [ 2] = R (2) = {1, 2, 3} = [1] or R (1)
[ 3] or R (3) = {3, 1, 2} = [1] or R (1) [ 4] or R (4) = {4}
Hence, there are two distinct equivalence classes. So rank of R is 2.
60 Discrete Mathematical Structures

2.13 Quotient Set


Let X be nonempty set and let R be an equivalence relation defined on X . The family consisting of all
distinct equivalence classes, into which X is decomposed with respect to R, is called the quotient set of X
with respect to equivalence R and is denoted by X / R .

Example 23: Let X = {1, 2, 3, 4} and R = {< x, y >| x > y}


(i) Give ordered pairs of R (ii) Draw graph of R
(iii) Give the relation matrix of R [U.P.T.U. (B.Tech.) 2005; R.G.P.V. (B.E.) Bhopal 2007]

Solution: R consists of ordered pairs < x, y > such that


x ∈ X , y ∈ X and x > y . Therefore
R = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)}
Graph R is as shown in Fig. 2.8

Relation matrix of R is given by Fig. 2.8

1 2 3 4
1 0 0 0 0
2 1 0 0 0
 
3 1 1 0 0
 
4 1 1 1 0

Example 24: Let F be the collection of all function f : (1, 2, 3) → {1, 2, 3}

If f and g Σ F , define an equivalence relation ~ by f ~ g iff f (3) = g (3) [Osmania (B.E.) 2006]
(i) Find the number of equivalence classes defined by ~
(ii) Find the number of elements in each equivalence class [U.P.T.U. (M.C.A.) 2004]
Solution: F be the collection of all function f : {1, 2, 3} → {1, 2, 3}
Total number function in f = 33 = 27
Again f and g are any two function in F such that f ~ g iff f (3) = g (3)
Then, (i) Number of equivalence classes defined by the relation ~ = 3
(ii) Number of elements in each class = 9

Example 25: Suppose A = {a, b, c, d } and π1 is the following partition π1 = {{a, b, c}, {d}}
(i) List the ordered pairs of the equivalence relations induced by π1 .
(ii) Draw the graph of the above equivalence relation. [Osmania (M.C.A.) 2009; U.P.T.U. (M.C.A.) 2004]

Solution: Given a set A = {a, b, c, d} and a partition of A is given by


d
π1 = {{a, b, c}, {d}}, then
(i) The ordered pairs of the equivalence relation induced by π1 , are given by
(ii) The graph of above relation is shown in Fig. 2.9

Fig. 2.9
Relations 61

Example 26: Let A be the set {1, 2, 3}, define the following types of binary relation on A.
(i) A relation that is both symmetric and anti-symmetric
(ii) A relation that is neither symmetric nor anti-symmetric [U.P.T.U. (M.C. A.) 2004]

Solution: We have A = {1, 2, 3}


(i) For a binary relation R on A to be symmetric, we have

aR b ⇒ bR a ∀ a, b ∈ A i.e. if (a, b) ∈ R then (b, a) ∈ R

For a binary relation R on A to be anti-symmetric, we have

aR b and b R a ⇒ a = b i.e. (a, b) ∈ R and (b, a) ∈ R only when a = b

which means that if a ≠ b then either a R b or b Ra


The binary relation on A is symmetric as well as anti-symmetric is given by
R = {(1, 1), (2, 2), (3, 3)}
(ii) A relation R on A shall be
(a) neither symmetric i.e. (a, b) ∈ R and (b, a) R

(b) nor anti-symmetric i.e. (a, b) ∈ R and (b, a) ∈ R even when a ≠ b.

The relation is given by


R = {(1, 2), (2, 1), (1, 3)} in which (1, 3) ∈ R but (3, 1) ∉ R
⇒ It is not symmetric and (1, 2) ∈ R as well as (2, 1) ∈ R but 1 ≠ 2, showing that R is not anti-symmetric.

Example 27: If R is an equivalence relation on A, then prove that R −1 is also equivalence relation on A.
[U.P.T.U. (M.C. A.) 2002-2003, 2005-2006]

Solution: (i) Let x ∈ A . Since R is a reflexive relation, ( x, x ) ∈ R

⇒ ( x, x ) ∈ R −1 .
So R −1 is reflexive
(ii) Let x, y ∈ R , as R is symmetric relation
( x, y ) ∈ R ⇒ ( y, x ) ∈ R
⇒ ( y, x ) ∈ R −1 and ( x, y ) ∈ R −1
So ( y, x ) ∈ R −1 ⇒ ( x, y ) ∈ R −1
So R −1 is symmetric
(iii) Let x, y, z ∈ A, as R is a transitive relation
( x, y ) ∈ R and ( y, z ) ∈ R ⇒ ( x, z ) ∈ R
which means that ( y, x ) ∈ R −1 and (z, y ) ∈ R −1 ⇒ (z, x ) ∈ R −1

or (z, y ) ∈ R −1 and ( y, x ) ∈ R −1 ⇒ (z, x ) ∈ R −1

So R −1 is transitive
Hence, R −1 is an equivalence relation.
62 Discrete Mathematical Structures

Example 28: Let N = {1, 2, 3K } and a relation is defined in N × N as follows: (a, b) is related to (c, d ) iff
ad = bc, then show whether R is a equivalence relation or not. [U.P.T.U. (B.Tech.) 2006, 2008]

Solution: (i) Reflexive: We know that a . b = b . a ⇒ ( a, b)R( a, b) . Hence it is reflexive.

(ii) Symmetric: Let (a, b) ∈ R and (c, d ) ∈ R and ( a, b) R( c, d )

⇒ ad = bc
⇒ cb = da
⇒ ( c d ) R( a, b) . Hence, it is symmetric

(iii) Transitive: Let ( a, b) R( c, d ) and ( c, d ) R( e, f )


⇒ ad = bc and cf = de
Multiplying these
(ad )(ef ) = (bc)(de) or a f = b e
⇒ ( a, b) R( e, f) hence it is transitive
Thus, relation is equivalence.

Example 29: Let X = {1, 2, 3, K 7} and R = {( x, y ): ( x − y ) is divisible by 3}. Show that R is an equivalence
relation. [U.P.T.U. (B.Tech.) 2007]

Solution: Given that X = {1, 2, 3, 4, 5, 6, 7}


and R = {( x, y ): ( x − y )is divisible by 3 }
Then R is an equivalence relation if

(i) Reflexive: ∀ x ∈ X ⇒ ( x − x ) is divisible by 3


So, ( x, x ) ∈ X ∀ x ∈ X
or, R is reflexive.

(ii) Symmetric: Let x, y ∈ X and ( x, y ) ∈ R


⇒ ( x − y ) is divisible by 3
⇒ ( x − y ) = 3n1 , (n1 being an integer)
⇒ ( y − x ) = − 3n2 = 3n2, n2 is also an integer
So, y − x is divisible by 3 or R is symmetric

(iii) Transitive: Let x, y, z ∈ X and ( x, y ) ∈ R , ( y, z ) ∈ R


Then x − y = 3n1 , y − z = 3n2, n1 , n2 being integers
⇒ x − z = 3 (n1 + n2 ), n1 + n2 = n3 be any integer
So, ( x − z ) is also divisible by 3 or ( x, z ) ∈ R
So, R is transitive
Hence, R is an equivalence relation.
Relations 63

Example 30: Let R be a binary relation defined as


R = {(a, b) ∈ R 2 : (a − b) ≤ 3}
determine whether R is reflexive, symmetric, anti-symmetric and transitive and how many distinct binary
relations are there on the finite set? [U.P.T.U. (B.Tech.) 2002, 2007; R.G.P.V. (B.E.) Bhopal 2009]

Solution: Let R = {(a, b) ∈ R 2 |(a − b) ≤ 3}

Reflexive: ∀ a ∈ R ⇒ a − a = 0 ≤ 3

so R is reflexive.

Symmetric: a, b ∈ R ⇒ a − b ≤ 3 then b − a ≥ 3 so R is not symmetric.


Anti-symmetric: Let (a, b) ∈ R ⇒ a − b ≤ 3

⇒b−a≥3
∴ a − b ≤ 3and b − a ≥ 3 is possible only if a = b, so R is anti-symmetric.
Transitive: Let (a, b) ∈ R and (b, c) ∈ R
⇒ a−b≤3 and b−c≤3
then a−c≤6
⇒ R is not transitive
2
Let n be the number of distinct elements in a finite set, then binary relation = nn

Example 31: Let A = {1, 2, 3, 4}. Give an example of R on A which is


(i) Neither symmetric nor anti-symmetric
(ii) Anti-symmetric and reflexive but not transitive
(iii) Transitive and reflexive but not anti-symmetric
Solution: (i) R = {(1, 3), (1, 1), (3, 1), (1, 2), (3, 3), (4, 4)} is neither symmetric nor anti-symmetric as
(1, 2) ∈ R but (2, 1) ∈ R and 1, 3 ∈ A such that (1, 3) ∈ R and (3, 1) ∈ R but 3 ≠ 1

(ii) R = {(1, 1), (1, 3), (2, 2), (3, 3), (3, 4), (4, 4)} is reflexive as a R a ∀ a ∈ A is anti-symmetric as no pair of
distinct elements x and y ∈ A exist such that ( x, y ) ∈ R and ( y, x ) ∈ R is not transitive as
1 R 3 , and 3 R 4 ⇒ 1 R 4

(iii) R = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (3, 4), (4, 3), (4, 4)} is reflexive as 1 R1 , 2R 2, 3 R 3 , 4 R 4 is
transitive as a R b, bR c ⇒ aR c is not anti-symmetric as 1 R 2 and 2 R1 but 1 ≠ 2

Example 32: Let R be a binary relation on the set of all strings of 0 ’s and 1’s such that
R = {(a, b)| a and b are strings that have same number of 0 ’s}. Is R reflexive, symmetric, transitive or a
partial order relation? [U.P.T.U. (B.Tech.) 2003]

Solution: Reflexive: Since every string is related to itself because it has same number of zeros.

Symmetric: Let a R b ⇒ a and b both have same number of zeros then b and a will have same number of
zeros.
⇒ b R a. Hence R is symmetric
64 Discrete Mathematical Structures

Transitive: Let a R b and b R c ⇒ aR c


i.e. a and b have same number of zeros, b and c have same number of zeros then a and c have same number of
zeros.
Anti-symmetric: Since it is symmetric it will not be anti-symmetric. Hence R is not a partial order
relation.

Example 33: Let R be the relation on set A = {a, b, c, d} and

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

(i) Reflexive closure of R (ii) Symmetric closure of R (iii) Transitive closure of R


[U.P.T.U. (B.Tech.) 2003]

Solution: (i) Reflexive Closure: = R ∪ ∆ = R ∪ {(a, a), (b, b), (c, c), (d, d )}
= {(a, b), (b, c), (d, c), (d, a), (a, d ), (a, a), (b, b), (c, c), (d, d )}

(ii) Symmetric Closure: = R ∪ R −1

= {(a, b), (b, c), (d, c), (d, a), (a, d ), (d, d )} ∪ {(b, a), (c, b), (c, d ), (a, d ), (d, a), (d, d )}
= {(a, b), (b, a), (b, c), (c, b), (d, c), (c, d ), (d, a), (a, d ), (d, d )}

(iii) Transitive Closure: = R ∪ R 2 ∪ R 3 K

R 2 = RoR = {(a, c), (d, b), (d, d ), (a, a), (a, c), (d, c), (d, a)}
R 3 = R 2oR = {(d, c), (d, d ), (d, a), (a, b), (a, d ), (a, c), (a, a), (d, b)} = R 2
R + = R ∪ R 2 = {(a, b), (b, c), (d, c), (d, a), (a, d ), (d, d ), (a, c), (d, b), (a, d ), (a, a)}

Example 34: Let S be the set of all points in a plane. Let R be a relation such that for any two points a and b,
(a, b) ∈ R if b is within two centimeter from a, show that R is not an equivalence relation.
[U.P.T.U. (B. Tech.) 2003; Kurukshetra (B.E.) 2008]

Solution: The relation R will be equivalence relation if

(i) Reflexive: ∀ a ∈ S ⇒ aR a i.e. every element of the plane is related to itself being within the 2 cm
from itself.

(ii) Symmetric: Let a R b i.e. a and b are within 2 cm distance.

⇒ b and a will also be within 2 cm distance.


⇒ bRa

(iii) Let aR b ⇒ a and b are within 2 cm distance i.e. | a − b| < 2


and bRc ⇒ b and c are within 2 cm distance i.e. | b − c| < 2
⇒ | a − b| + | b − c| < 4
⇒ | a − b + b − c| < 4 or | a − c| < 4 ⇒ a Rc .
Then R is not transitive.
Hence, R is not an equivalence relation.
Relations 65

Example 35: Let A = {1, 2, 3, 4, 5, 6} and let R be the relation defined by x divides y written as x / y

(i ) Write R as a set of ordered pairs (ii ) Draw its directed graph (iii ) Find R −1
[Rohtak (B.E.) 2007; Delhi (B.E.) 2005]

Solution:
(i) R = {(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 4), (2, 6), (3, 6), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)}

(ii) The directed graph of R is

Fig. 2.10
−1
(iii) R = {(2, 1), (3, 1), (4, 1), (5, 1), (6, 1), (4, 2), (6, 2), (6, 3), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)}

Example 36: Let S = {1, 2, 3, 4, 5} and A = S × S. Define relation on A: ( a, b) R( a′, b′ ) . Show that R is an
equivalence relation iff ab′ = a′ b [U.P.T.U. (B.Tech.) 2004; Pune 2003, 2007]

Solution: We have A = S × S
⇒ A = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5),
(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)}
∴ R = {((1, 1), (5, 5)), ((1, 1), (2, 2)), ((1, 1), (3, 3)), ((1, 1), (4, 4)) K }
Then R is an equivalence relation, if

(i) Reflexive: Let ( a, b) R( a′, b′ ) ⇒ ab ′ = a ′ b

⇒ ( a, b)R( a, b) ⇒ ab = ba

⇒ R is reflexive

(ii) Symmetric: Let ( a, b) R( a′, b′ ) ⇒ ab ′ = ba ′


⇒ ab ′ = a ′ b
⇒ ( a′, b′ )R( a, b)
⇒ R is symmetric
(iii) Transitive: Let ( a, b) R( a′, b′ ) ⇒ ab ′ = a ′ b ...(1)
and (a ′ , b ′ ) R (a ′′ , b ′′ ) ⇒ a ′ b ′′ = a ′′ b ′ ...(2)
ab ′
From (1) a′ =
b
a b′
put in (2), we find b ′′ = a ′′ b ′
b
66 Discrete Mathematical Structures

⇒ a b′′ = a′′ b
⇒ ( a, b) R( a′′, b′′ )
Hence it is transitive
Therefore, R is an equivalence relation.

Example 37: If R and S are equivalence relations on the set A, show that the following are equivalence
relation.
(i) R ∩ S (ii) R ∪ S [U.P.T.U. (B.Tech.) 2003]

Solution: (i) R ∩ S is an equivalence relation, if

(a) Reflexive: ∀ a ∈ A, (a, a) ∈ R and (a, a) ∈ S, since R and S are equivalence relations. This implies
∀ a ∈ A , (a, a) ∈ R ∩ S
Hence, R ∩ S is reflexive

(b) Symmetric: Let (a, b) ∈ R ∩ S ⇒ (a, b) ∈ R and (a, b) ∈ S


⇒ (b, a) ∈ R and (b, a) ∈ S as R , S is symmetric
⇒ (b, a) ∈ R ∩ S

(c) Transitive: Let (a, b) ∈ R ∩ S, (b, c) ∈ R ∩ S


⇒ (a, b) ∈ R , (a, b) ∈ S and (b, c) ∈ R , (b, c) ∈ S
∴ (a, b) ∈ R , (b, c) ∈ R and R is transitive ⇒ (a, c) ∈ R
and (a, b) ∈ S, (b, c) ∈ S and S is transitive ⇒ (a, c) ∈ S
∴ (a, c) ∈ R , (a, c) ∈ S ⇒ (a, c) ∈ R ∩ S
Hence R ∩ S is an equivalence relation.

(ii) The union of two equivalence relation on a set is not necessarily an equivalence relation. For
example
A = {a, b, c} and R , S be two relation on A given as
R = {(a, a), (b, b), (c, c), (a, b), (b, a)}
and S = {(a, a), (b, b)(c, c), (b, c), (c, b)}
Each R and S is an equivalence relation on A . But R ∪ S is not transitive, because (a, b) ∈ R ∪ S and
(b, c) ∈ R ∪ S ⇒ (a, c) ∉ R ∪ S
Hence R ∪ S is not equivalence relation.

Example 38: Let A = R × R (R be the set of real numbers) and define the following relation on A.

( a, b) R( c, d ) ⇒ a2 + b2 = c2 + d 2

(i) Verify that ( A, R ) is an equivalence relation.

(ii) Describe geometrically what the equivalence classes are for this relation (justify).
[U.P.T.U. (B.Tech.) 2002; R.G.P.V. (B.E.) Bhopal 2006]
Relations 67

Solution: Reflexive: Let ( a, b) R( a, b) ⇒ a2 + b2 = a2 + b2 which is true.

Hence R is reflexive.

Symmetric: ( a, b) R( c, d ) ⇒ a2 + b2 = c2 + d 2

⇒ c2 + d 2 = a2 + b2

⇒ ( c, d )R( a, b)
⇒ R is symmetric

Transitive: Let ( a, b) R( c, d ) ⇒ a2 + b2 = c2 + d 2

and ( c, d )R( e, f ) ⇒ c2 + d 2 = e2 + f 2

∴ a2 + b2 = e2 + f 2 ⇒ ( a, b)R( e, f )

⇒ R is transitive

Hence, R is an equivalence relation.

Example 39: Let A = {1, 2, 3, 4, 6, 7, 8, 9} and let ~ be the relation on A × A defined as (a, b)~(c, d ) if
a + d = b + c . Prove that
(i) ~ is an equivalence relation
(ii) Find [(2, 5)], the equivalence class of (2, 5)

Solution: ~ is an equivalence, if
(a) Reflexive: (a, b)~(a, b) i.e. a + b = a + b which is true. Hence ~ is reflexive
(b) Symmetric: (a, b)~(c, d ) ⇒ a + d = b + c
⇒ b + c = a + d ⇒ c + b = d + a ⇒ (c, d )~(a, b)
Hence relation is symmetric.

(c) Transitive: Let (a, b)~(c, d ) and (c, d )~(e, f ) then a + d = b + c and c + f = d + e then add
a + d + c + f = b + c + d + e or a + f = b + e or (a, b)~(e, f ) then ~ is equivalence relation.

(i) R [(2, 5)] = {(2, 5), (1, 4), (3, 6), (4, 7 ), (5, 8), (6, 9)}

Example 40: Let A = {1, 2, 3, 4, 5, 6}, construct description of relation R on A for the following:
(i) R = {( j, k} : k is multiple of j}

(ii) R = {( j, k ): ( J − k )2 ∈ A}

(iii) R = {( j, k ): j divide k}

(iv) R = {( j, k ): j × k is prime} [U.P.T.U. (B.Tech.) 2008]


68 Discrete Mathematical Structures

Solution: (i) We have R = {1, 2, 3, 4, 5, 6}, then


R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 2), (2, 4), (2, 6), (3, 3), (3, 6), (4, 4), (5, 5), (6, 6)}

Fig. 2.11

(ii) R = {(1, 2), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (3, 4), (3, 5), (4, 2), (4, 3), (4, 5), (4, 6), (5, 3), (5, 4),
(6, 5)}

Fig. 2.12

(iii) R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 2), (2, 4), (2, 6)}

Fig. 2.13

(iv) R = {(1, 2), (1, 3), (1, 5), (2, 1), (3, 1), (5, 1)}

Fig. 2.14
Relations 69

Example 41: How many reflexive relation and symmetric relations are there on a set with n elements?
[Pune (B.E.) 2003, 2009; Kurukshetra (B.E.) 2007]

Solution: A relation R on a set A is a subset of A × A. Thus a relation is determined by specifying whether


each of the n2 ordered pairs in A × A is in R. If R is reflexive, each of n order pair (a, a) for a ∈ A must be in R.
Each of other n2 − n = n (n − 1) ordered pairs may or may not be in R. By product rule of counting, there
are 2n( n −1 ) Reflexive Relations.

If R is symmetric, each of the n ordered pair ( a, a ) for a ∈ A must be in R and set of pairs elements
n (n − 1)
of the form (a, b) and (b, a) for a, b ∈ A be in R. There are such pairs. By product rule of
2
n( n −1)
counting, there are 2n. 2 2 = 2n ( n+1 )/ 2 symmetric relation.

Example 42: Let A be a set with 10 distinct elements. Determine the following
(i) Number of distinct binary relations on A
(ii) Number of different symmetric binary relation A [U.P.T.U. (B.Tech.) 2009]
2
Solution: (i) We know if a set A has n elements then number of distinct binary relation on ( A × A ) = 2n

But n = 10 in A.
2
Then number of distinct binary relation A = 2(10 ) = 2100

(ii) We know number of symmetric relation on set A with n elements = 2n( n + 1 )/ 2


But n = 10, then number of symmetric relation on A = 210 × (11 )/ 2= 255

Example 43: If R1 and R 2 are two equivalence relations on a set A, then prove that R1 ∩ R 2 is also an
equivalence relation on A. [Rohtak (M.C.A.) 2008]

Solution:
(i) Reflexive: Let x ∈ A, then ( x, x ) ∈ R1 as R1 is reflexive, similarly ( x, x ) ∈ R 2 then ( x, x ) ∈ R1 ∩ R 2
Hence, R1 ∩ R 2 is reflexive

(ii) Symmetric: Let x, y ∈ A, ( x, y ) ∈ R1 ⇒ ( y, x ) ∈ R1 (R1 is reflexive)


( x, y ) ∈ R 2 ⇒ ( y, x ) ∈ R 2 (R 2 is reflexive)
⇒ ( x, y ) ∈ R1 ∩ R 2 then ( y, x ) ∈ R1 ∩ R 2
So, R1 ∩ R 2 is symmetric

(iii) Transitive: Let x, y, z ∈ A, since R1 , R 2 are transitive


∴ ( x, y ), ( y, z ) ∈ R1 ⇒ ( x, z ) ∈ R1
and ( x, y ), ( y, z ) ∈ R 2 ⇒ ( x, z ) ∈ R 2
Now, ( x, y ), ( y, z ) ∈ R1 ∩ R 2 ⇒ ( x, z ) ∈ R1 ∩ R 2
So, R1 ∩ R 2 is transitive
Hence, R1 ∩ R 2 is an equivalence relation.
70 Discrete Mathematical Structures

Example 44: Let A be the set of all integers and a relation R is defined as
R = {( x, y ): x ≅ y (mod m), m divide ( x − y ) where m is positive integer. Prove that R is an equivalence
relation. [U.P.T.U. (M.C.A.) 2008]

Solution: (i) Since ( x − x ) is divisible by m, therefore


x ≅ x (mod m) i.e. x R x .
⇒ R is reflexive

(ii) If x, y ∈ A and ( x − y ) is divisible by m, then ( y − x ) = − ( x − y ) is also divisible by m.


∴ x ≅ y (mod m) ⇒ y ≅ x (mod y )
or xRy ⇒ yRx.
So R is symmetric

(iii) If x, y, z ∈ A and x − y, y − z are divisible by m


∴ x − z = ( x − y ) + ( y − z ) is also divisible by m
⇒ x ≅ z (mod m)
∴ x R y, yRz ⇒ x R z.
So R is transitive. Hence R is an equivalence relation.

Exercise
@ Relation
1. Give an example of a relation which is:
(i) reflexive and transitive but not symmetric.
(ii) symmetric and transitive but not reflexive.
(iii) reflexive and symmetric but not transitive.
(iv) reflexive and transitive but neither symmetric nor anti-symmetric.

2. Prove that if a relation R on set A is transitive and irreflexive, then it is symmetric

3. If R be a relation in the set of integer I defined by R = {( x, y ): x ∈ I, y ∈ I, ( x − y ) = 8 k or ( x − y ) is


divisible by 8}. Prove that R is an equivalence relation.

4. List the order pairs in the relation R from A = {0, 1, 2, 3, 4} to B = {0, 1, 2, 3} where (a, b) ∈ R if and only if
(i) a=b (ii) a+ b=3 (iii) a×b
(iv) a ⊥ b (v) g. c. d (a, b) = 1 (vi) lcm (a, b) = 2

5. Let A = {1, 2, 3, 4}, determine whether the relation are reflexive, symmetric, anti-symmetric or
transitive
(i) R = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}
(ii) R = {(1, 3), (4, 2), (2, 4), (3, 1), (2, 2)}
(iii) R = {(1, 2), (1, 3), (3, 1), (1, 1), (3, 3), (3, 2), (1, 4), (4, 2), (3, 4)}
Relations 71

6. Write down the relations in the square of the set {1, 2, 4, 8, 16, 32, 64}

7. Let f be a mapping of a set X onto a set B. Then if we define (a, b) ∈ R for a, b ∈ X provided
f (a) = f (b). Prove that R is an equivalence relation.

8. Let R be the relation in the natural numbers N = {1, 2, 3 K }


Define by x + 2y = 10 i.e. Let R = {( x, y ) 1 x, y ∈ N , x + 2y = 10}

Find (a) The domain and range of R (b) R −1

9. Show that the relation is congruent module 4 to on the set of integers {0, 1, 2, K 10} is an equivalence
relation.

10. Determine which of the following are equivalence relations and or partial ordering relations for the
given sets.
(a) A = {lines in the plane}: x R y iff x is parallel to y

(b) A = {the set of real numbers: x R y iff | x − y| ≤ 7

11. Let A = {1, 2, 3, 6}. If for x, y ∈ A

R = {( x, y ): x ≤ y}

S = {( x, y ): x divides y}

write R and S as sets and find R ∩ S

12. For a set X with n elements, find how many relations on X, which are
(i) Symmetric [U.P.T.U. (M.C. A.) 2004]
(ii) Anti-symmetric [P.T.U. (B.E.) Punjab 2008]
(iii) reflexive [U.P.T.U. (B.Tech.) 2009]

(iv) irreflexive
(v) reflexive and symmetric [Pune (B.E.) 2007]

(vi) reflexive and not symmetric [Rohtak (M.C.A.) 2007]


(vii) symmetric but not reflexive [Rohtak (M.C.A.) 2007]
(viii) neither reflexive nor irreflexive.

13. Let L be the set of lines in the euclidean plane and let R be the relation in L defined by ‘‘ x is parallel to
y’’. Is R a symmetric relation? Why? Is R a transitive relation?

14. Prove that if R is asymmetric relation then


R ∩ R −1 = R

15. Find all partitions on


(i) A = {1, 2, 3} (ii) A = {a, b, c, d}
72 Discrete Mathematical Structures

16. Let A = {1, 2, 3, 4, 5, 6, 7} and R = { x, y ): x − y is divisible by 3}

Show that R is an equivalence relation. Draw the graph of R.

17. Let R = {(1, 2), (3, 4), (2, 2)} and

S = {(4, 2), (2, 5), (3, 1), (1, 3)}

Find RoS, SoR , Ro (SoR ), (RoS ) oR , RoR , SoS, and RoRoR .

18. Let R and S be any two relations on a set of positive integers.


R = {( x, 2x )|x ∈ I} and S = {( x, 7 x )| x ∈ I, then show
RoS = {( x, 14 x )| x ∈ I} = SoR
RoR = {( x, 4 x )| x ∈ I}

RoRoR = {( x, 8 x )| x ∈ I}

RoSoR = {( x, 2x )| x ∈ I}]

19. On the set of integers the relation is defined by a R b ‘‘iff (a − b) is even integer’’. Show that R is an
equivalence relation.
20. Suppose S and T are two sets and f is a functions from S to T let R1 be an equivalence relation on T.
Let R 2 be binary relation on S such that ( x, y ) ∈ R 2 if and only if ( f ( x ), f ( y )) ∈ R1 . Show that R 2 is
also an equivalence relation. [U.P.T.U. (B.Tech.) 2009]

21. Prove that the relation ‘‘congruence modulo m’’ is given by

R = {( x, y )|( x − y ) is divisible by m}
Over the set of positive integer is an equivalence relation. Also show that if x1 = y1 , and x 2 = y 2
then ( x1 + x 2 ) = ( y1 + y 2 ) [U.P.T.U. (M.C.A.) 2008]

22. Given the relational matrices M R and M S , find M RoS , M ( R )–1 , M ( S )–1 , M ( RoS ) and show that
M ( RoS )− 1 = M ( S )− 1 o ( R )− 1
.
1 0 1  1 0 0 1 0
MR = 1 1 0 and M S = 1 0 1 0 1 
   
1 1 1  0 1 0 1 0 [Raipur (B.E.) 2005, 2007]

23. Let A = {1, 2, 3, 4, 5, 6}. Define a relation R on A

R = {( x, y ): x + y is divisor of 24}
(i) Find the relational matrix M of R
(ii) Compute M 2 and use M and M 2 whether or not R is transitive
Relations 73

24. A number of binary relations are defined on the set A = {0, 1, 2, 3} Fig. Shows some diagrams of
relations.

Find the relation each case as a set of ordered pairs. Decide which of the following properties it has
(i) reflexivity (ii) symmetry (iii) transitivity

(a) 0 1 2 3 (b) 0 1

2 3
Fig. 2.15
Fig. 2.16
(c) (d)

0 1
1

2 3 3 2
Fig. 2.17 Fig. 2.18 Fig. 2.19

25. The relation R on a set A = {1, 2, 3, 4} is defined by


R = {(1, 1), (1, 2), (1, 4), (2, 2), (2, 1), (2, 4), (3, 3), (3, 4), (3, 2), (4, 3), (4, 2), (4, 1)}.
Find the digraph of R and hence find R −1
26. Let A = {0, 1, 2, 3, 4}. Show that the relation
R = {(0, 0), (0, 4), (1, 1), (1, 3), (2, 2), (3, 1), (3, 3), (4, 0), (4, 4)} is an equivalence relation.
Find the distinct equivalence classes of R [U.P.T.U. (M.C.A.) 2000]
27. Define relation and explain properties of relation. [R.G.P.V. (B.E.) Raipur (B.E.) 2007]
74 Discrete Mathematical Structures

Answers
1. Let A = {1, 2, 3}
(i) R1 = {(1, 1), (2, 2), (3, 3), (1, 3)} is reflexive, transitive but not symmetric.
(ii) R 2 = {(1, 1), (3, 3), (1, 3), (3, 1)} is symmetric and transitive but not reflexive.
(iii) R 3 = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1), (2, 3), (3, 2)} is reflexive and symmetric but not
transitive.
(iv) Z * be the set of non-zero integers and R be the relation on Z * given by (a, b) ∈ R if a is a factor
of b, R is reflexive and transitive but not symmetric.

4. (i) {(0, 0), (1, 1), (2, 2), (3, 3)} (ii) {(0, 3), (1, 2), (2, 1), (3, 0)
(iii) {(1, 0), (2, 0), (3, 0), (4, 0), (2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)}
(iv) {(1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (3, 0), (3, 3), (4, 0)}
(v) {(0, 1), (1, 0), (1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (4, 1), (4, 3)}
(vi) {(1, 2), (2, 1), (2, 2)}

5. (i) Transitive (ii) Symmetric (iii) transitive

6. R = {(1, 1), (4, 2), (16, 4), (64, 8)}

8. (a R = {(8, 1), (6, 2), (4, 3), (2, 4)} (b) R −1 = {(1, 8), (2, 6), (3, 4), (4, 2)}

10. (a) It is an equivalence relation but not a partial ordering relation, since R is not anti-symmetric.
(b) Not transitive, therefore, it is neither.
11. R = {(1, 1), (1, 2), (1, 3), (1, 6), (2, 2), (2, 3), (2, 6), (3, 3), (3, 6), (6, 6)}
S = {(1, 2), (1, 3), (1, 6), (2, 6), (3, 6)}
R ∩ S = {(1, 2), (1, 3), (1, 6), (2, 6), (3, 6)} = S

12. (i) 2n( n +1 )/ 2 (ii) 2n . 3( n −1 )/ 2 (iii) 2n( n −1 )


2 2 2 2
− n) − n)/ 2 −n − n)/ 2
(iv) 2( n (v) 2( n (vi) 2n − 2( n
2 2 2 2
+ n)/ 2 − n)/ 2 −n
(vii) 2( n − 2( n (viii) 2n − 2 . 2n

13. Symmetric and transitive, since


(i) x is parallel to y and y parallel to x
(ii) if x is parallel to y and y is parallel to z then x is parallel to z

15. (i) {{1, 2, 3}}, {{1}, {2, 33}, {{2}, {1, 33}, {{3}, {1, 3}, {{13, 52}, {3}}

(ii) The number of different partition on A is 15.


Relations 75

17. RoS = {(4, 2), (3, 2), (1, 4)}


SoR = {(1, 5), (3, 2), (2, 5)}
Ro (SoR ) = φ
(RoS ) oR = {(3, 2)}
RoR = {1, 2} = SoS = {(4, 5), (3, 3)}
RoRoR = φ

1 1 0 1 1 1
 1 1 1   0 0 1 1 0 1
     
22. M ( R )− 1 = 0 1 1 , M ( S )− 1 =  0 1 0 M ( RoS )− 1 = 0 1 1
 
1 0 1 1 0 1 1 1 1
   
0 1 0 0 1 1

1 1 1 0 1 0 1 1 1 1 1 1
1 1 0 1 0 1 1 1 1 1 1 1
   
1 0 1 0 1 0 2 1 1 1 0 1 0
23. (i) M R = , M =
0 1 0 1 0 0 1 1 0 1 0 1
   
1 0 1 0 0 0 1 1 1 0 1 0
0 1 0 0 0 1  1 1 0 1 0 1 

Since M 2⊆ M is not true. M is not transitive.

24. (a) {(2, 3), (3, 2)} Not reflexive and transitive but symmetric

(b) {(0, 1), (0, 2)} Not reflexive, symmetric but transitive
(c) {(0, 0), (0, 1), (0, 3), (1, 1), (1, 0), (2, 3), (3, 3)} Not reflexive, symmetric and transitive
(d) {(0, 0), (0, 1), (1, 1), (1, 2), (2, 2), (2, 0)} Not reflexive, symmetric and transitive
(e) {(0, 0), (0, 1), (0, 3), (1, 1), (1, 0), (3, 0)} Reflexive, symmetric but not transitive

25.
1
1
2 2

3
4

Fig. 2.20 Fig. 2.21


76 Discrete Mathematical Structures

Objective Type Quesitons


Multiple Choice Questions
1. Let A = {1, 2, 3}, B = {1, 3, 5}. A relation R : A → B is defined by R = {(1, 3), (1, 5), (2, 1)}. Then R −1 is
(a) {(1, 2), (3, 1), (1, 3), (1, 5)} (b) {(1, 2), (3, 1), (2, 1)}
(c) {(1, 2), (5, 1), (3, 1)} (d) none of these

2. The relation R is defined on the set of natural numbers as {(a, b): a = 2b}. Then R −1 is given by
(a) {(2, 1), (4, 2), (6, 3) K } (b) {(1, 2), (2, 4), (3, 6) K }
−1
(c) R is not defined (d) none of these

3. A relation R defined on the set of integers by R = {(a, b): a divides b}. Then R is
(a) reflexive (b) symmetric
(c) transitive (d) none of these
4. Given two finite sets A and B such that n ( A ) = 2, n (B ) = 3. Then total number of relations from A to B is
(a) 4 (b) 8
(c) 64 (d) none of these

5. Let r be a relation on the set of natural number N by n r m iff n is a factor of m. Then r is


(a) reflexive and symmetric
(b) transitive and symmetric
(c) reflexive, transitive but not symmetric
(d) equivalence

6. Consider the non-empty set consisting of children in a family. Consider a relation R : x R y iff x is
brother of y. Then R is
(a) symmetric and not transitive (b) transitive but not symmetric
(c) neither symmetric nor transitive (d) none of these

7. If X = {a, b, c, d, e} and Y = { p, q, r, s, t } then which of the following subsets of X × Y is


(a) {(a, r), (b, r), (b, s ), (d, t ), (e, q), (c, q)} (b) {(a, r), (b, p), (c, t ), (d, q)}
(c) {(a, p), (b, t ), (c, r), (d, s ), (e, q)} (d) {(a, r), (b, r), (c, r), (d, r), (e, r)}

8. Which of the following is an equivalence relation


(a) {(1, 3), (3, 1), (3, 5), (5, 3), (1, 5), (5, 1)} (b) {(1, 1), (3, 3) }
(c) {(1, 1), (1, 2), (2, 1), (2, 3), (3, 2), (2, 2)} (d) none of these

9. If R is symmetric, then
(a) xRy and y Rz ⇒ xRz (b) x Rx
(c) xRy ⇔ yR x (d) none of these
Relations 77

10. If x R y ⇔ 2x + 3y = y in the set of real number R, then

(a) o R1 (b) ( 2/ 3 ) R1
(c) 1 R( 2/ 3 ) (d) ( 4/ 3 ) R 0

State True or False


1. Every relation which is symmetric and transitive must be reflexive.

2. Let R = {(3, 1), (1, 3), (3, 3)} be a relation defined on the set A = {1, 2, 3}. Then R is symmetric,
transitive but not reflexive.

3. If a relation R on a set A is transitive, then R −1 is also transitive.

4. Let R and R′ , may be, disjoint, be two symmetric relations on a set A. Then R ∩ R ′ must be symmetric.

5. Let R be a set a relation defined by aR b iff | a − b| ≥ 1, a, b ∈ R

Then R is symmetric and transitive, but not reflexive.

6. Let S = {1, 2, 3, 4, 5} and A = S × S, the relation R is defined on A as ( a, b) R( c, d ) iff ad = bc. Then R is


symmetric, transitive but not reflexive.

Fill in the Blank(s)


1. Let R ⊆ N × N defined by aR b iff 2a + 3b = 20. Then R ......... .

2. A relation r on the set N of natural numbers is defined by r = {n, n + 3): n ∈ N }. Then range
r = N − {. . . . . . . . } .

3. Let R = {(1, 2), (1, 3), (2, 4)} be a relation defined on A = {1, 2, 3, 4}. Then RoR ......... .
[Raipur (B.E.) 2007]

4. If x R y , y R z ⇒ x R z , then R will be ......... .

5. If x, y ∈ I where I is the set of integers and relation x R y ⇒ x − y is an even integer, then relation R
will be .......... .

6. If f : x → y, where y = x 3 + 1 and its domain = {0, 1,2}, then its range will be ......... .
78 Discrete Mathematical Structures

Answers
Multiple Choice Questions
1. (c) 2. (b) 3. (c) 4. (c) 5. (c) 6. (b)

7. (c) & (d) 8. (d) 9. (c) 10. (b)

State True or False


1. F 2. F 3. T 4. T 5. F 6. F

Fill in the Blank(s)


1. {(3, 8), (6, 6), (9, 4), (12, 12)} 2. {1, 2, 3} 3. {1, 4} 4. Transitive
5. equivalence relation 6. {1, 2, 9}

❑❑❑
3.1 Definition
3.1.1 Domain
Set of inputs (also called pre-image) is called domain. It is denoted by D f .
Here, the domain is N = {1, 2, 3, 4, . . . . . . . . }

3.1.2 Co-Domain
Set of possible outputs is called co-domain. Here, the co-domain is N = {1, 2, 3, 4, . . . . . . }

3.1.3 Range
Set of actual outputs (also called images) is called Range. It is denoted by R f .
Here, the range is {1, 4, 9, 16, . . . . . . }. Obviously R f ⊆ co-domain.

3.2 Function (Mathematical Definition)


If A and B are two non-empty sets then a rule f, under which to every element x of the set A there
corresponds one and only one elements of set B then the rule f is called the function from A to B, it is
denoted by
f:A→ B
If a pre-image is denoted by x and an image is denoted by y then we can write y = f ( x )
Where y is image ∈ B and x is pre image ∈ A and f ( x ) is called the value of function f at the point x.

3.2.1 Methods of Representing a function


(a) Arrow diagram

Fig. 3.1
D f = {a, b, c, d}. Co-domain = { p, q, r, s, t , u} and f (a) = p, f (b) = q, f (c) = r, f (d ) = s
80 Discrete Mathematical Structures

➤ Vertal Description

f is a function which assigns to each country in the world and its capital city

Fig. 3.2

Since every country has one and only one capital. Hence, f is a function.

D f is the set of the countries of the world. R f is the set of all the capital cities.
∴ f: A→ B such that x ∈ A ⇒ f ( x ) ∈ B i.e., f (India ) = New Delhi

➤ Tabular Form

A x 1 2 3 4 5

B y a b c d e

Let f : A → B, such that


D f = {1, 2, 3, 4, 5}, R f = {a, b, c, d, e} and f (2) = b, f (5) = e etc.

➤ Enumerating the Ordered Pairs

Let f = {(1, a), (2, a), (3, a), (4, a)}

Then D f = {1, 2, 3, 4}, R f = {a} and f (1) = a, f (2) = a. . . . . .


This function can be represented by
f ( x ) = a V { x ∈ N : 1 ≤ x ≤ 4}

Fig. 3.3

Note:
(i) The set of first elements of ordered pairs of a function is called domain (D f ).
(ii) The set of second elements of the ordered pairs of a function is called range (R f ).
Functions 81

➤ Formula or an Equation

Let f : R→R

Such that f (x) = x 2 ∀ x ∈ R

Then D f = R , R f = R + ∪ {0}

Fig. 3.4

3.3 Classification of Functions or Type of Functions


3.3.1 Real function
A function f : A → B is called real valued if the image of every element of A under f is a real number i.e.,

if f ( x ) ∈ R ∀x ∈ A or y = f ( x ),

where y is dependent variable and x is independent variable.

The curve y 2 = 4ax and x 2 = 4ay are the functions as they contains two dependent variable value of one
gives the result of other.

Note:
(1) The function is not defined if denominator of function is zero.
1
i.e., f ( x) = then function is not defined at x = 2
x–2
(2) The function is not defined if function becomes indeterminate for any value of x

i.e., f ( x ) = (| x|– 2)( x – 2) is not defined at x = 2 Since f( 2) = 0 0


82 Discrete Mathematical Structures

➤ Range

It is the set of all the images of all the elements of domain, which is obtained as
x –1
i.e., Let f ( x ) = y, and f (x) =
x–2
x –1
∴ y=
x–2

⇒ yx – 2y = x – 1
2y – 1
⇒ ( y – 1) x = 2y – 1 or x=
y –1

For y = 1 there is no real values of x for which the above equation is satisfied.

Hence R f = R – {1}. i.e., the set of all real number except 1.

Note: Usually the domain of a real function is an interval. For any two real numbers a and b where a < b, we
defined
(i) Closed interval [ a , b] = { x ∈ R : a ≤ x ≤ b} (ii) Open interval ] a , b[ = { x ∈ R, a < x < b}
(iii) Left-half open interval ] a , b] = { x ∈ R : a < x ≤ b} (iv) Right-half open interval [ a , b[ = { x ∈ R, a ≤ x < b}
(v) ] a , ∞ [= { x ∈ R : x > a } (vi) [a , ∞ [= { x ∈ R ; x ≥ a }
(vii) ] – ∞ , a [ = { x ∈ R : x < a } (viii) ] – ∞ , a] = { x ∈ R : x ≤ a }

3.3.2 Algebraic Functions


The functions consisting of finite number of terms involving different power of independent variable (x)
and the operations plus (+), minus (–), multiplication (×) and division (÷) are called Algebraic
functions.

x3 – 1
e.g., 2x 2 + x1 / 3 + 4, x 2 + 3x + 9, etc.
x3 + 1

3.3.3 Polynomial Functions


A function whose domain and co-domain both is the set of real numbers and contains finite number of
terms containing natural number powers of x multiplied by real constants is called polynomial function.
If f : R → R1 such that f ( x ) = a0 + a1 x + a2 x 2 + . . . . . . . . + an x n

Where n ∈ N and a1 , a2, . . . . . . . an ∈ R then f is called a polynomial function. Some time f ( x ) is also called a
polynomial in x.
Functions 83

➤ Degree of a Polynomial

The highest power of x having non-zero coefficient is called the degree of the polynomial. Here, if an ≠ 0
then degree of f ( x ) is n. Thus
(i) f ( x ) = ax + b, a ≠ 0 is a linear polynomial, having degree one.
(ii) f ( x ) = ax 2 + bx + c, a ≠ 0 is a quadratic polynomial, having degree two.
(iii) f ( x ) = ax 3 + bx 2 + cx + d, a ≠ 0 is a cubic polynomial, having degree three.

3.3.4 Rational Functions


A function obtained by dividing a polynomial by another polynomial is called a rational function. Domain
of such functions contains all the real numbers except the real numbers for which the polynomial in
denominator is zero.
P( x )
Hence, f : A → R; f (x ) =
R( x )
Here, P ( x ) and Q ( x ) are the polynomial functions and A = { x : x ∈ R such that Q ( x ) ≠ 0} .
 x2+ 1  2
Thus, the function f ( x ) =  2  is a rational function, where x – 2x + 5 ≠ 0
 x – 2x + 5

Illustrations:
x 2 + 5x + 7
(i) f (x) = 2
is function. As x 2 – 3x + 2 ≠ 0, the domain of function is R – {1, 2}.
x – 3x + 2
1
(ii) f (x) = , n ∈ N is function whose domain is R – {0}.
xn

3.3.5 Irrational Functions


The algebraic function containing one more terms having non-integral rational power of x are called
irrational functions.

Illustration:
2x 3 / 2 + 5x 2( x1 / 2 )3 + 5x
If g( x ) = = , then g is undefined if x < 0 and also if x 2 – 1 = 0 i.e., x = ±1
x2– 1 x2 – 1

3.3.6 Modulus Function


f : R → R such that

 x if x ≥ 0
f ( x ) =| x| =  
– x if x < 0 

then f ( x ) is called Modulus Function.


Since the modulus of every real number is a unique non-negative real number, so D f = R . Since x is either
0 or a positive real number, we have R f = { x : x ∈ R } = Set of non-negative real numbers.
84 Discrete Mathematical Structures

3.3.7 Signum function


 x 
 , when x ≠ 0 
This function is defined by f (x) =  x 
 0 , when x = 0 
 

 1, when x > 0 
 
Thus, we have, f ( x ) =  0 , when x = 0 
 
–1, when x < 0 

Then D f = R and R f = [–1, 0, 1]

3.3.8 Constant Function


Let C be fixed real number. Then the function defined by f ( x ) = C ∀ x ∈ R is
called constant function C.

Clearly, D f = R and R f = (C )
Here, A = { x1 , x 2, x 3 } and B = {a, b, c} and f : A → B be such that f ( x1 ) = b,
f ( x 2 ) = b, f ( x 3 ) = b. Then, D f = { x1 , x 2, x 3 }, R f = {b} = Range of f
Fig. 3.5

3.3.9 Identity Function


The function defined by f ( x ) = x for all x ∈ R is called the identity function clearly

D f = R, R f = R

3.3.10 Reciprocal Function


1 1
The function defined by f ( x ) = is called the reciprocal function. The function f ( x ) = is not defined if x = 0.
x x
D f = R – {0}, R f = R – {0}

3.3.11 Step Function or the Greatest Integer Function


If x ∈ R then [x] is defined as the greatest integer not exceeding x.
i.e., [ 2. 01] = 2, [ 2. 9] = 2, [–1 . 3] = –2, [3] = 3, [–1] = –1

If we consider f ( x ) = [ x] then D f = R and R f = {[ x]: x ∈ R }

Example 1: Find a set of all real number x such that [x] = 2


Solution: For all x such that 2 ≤ x < 3, we have f ( x ) = [ x] = 2. So required set = { x ∈ R : 2 ≤ x < 3} = [ 2, 3[
Functions 85

3.3.12 Exponential Function


The function f ( x ) = ex is called the exponential function. Since f ( x ) = ex is defined for all real value of x.
So D f = R , also y = ex ⇒ x = log y
And, we know that log y is not defined when y = 0 or negative so, R f = ] 0, ∞ [

3.3.13 Logarithmic Function


The function f ( x ) = log x is called the logarithmic function, log x is not defined when x is zero or negative.
∴ D f = ] 0, ∞ [, R f = Range ( f )={log x : x ∈] 0, ∞ [ } = set of all real numbers = R

3.3.14 Trigonometric Function


The function sin x, cos x, tan x, cot x, sec x, cosec x are called the trigonometric functions. The domains and
ranges of these functions are given below:
(a) sin x: Since sin x is defined for all value of x ∈ R , its domain R = R . As value of sin x lies between –1
and +1, so range = [–1, 1]

(b) cos x: Since cos x is defined for all value of x ∈ R , its domain R = R . As value of cos x lies between –1
and +1, so range = [–1,1].
sin x
(c) tan x: We have tan x = which is not defined when cos x =0. And cos x = 0 ⇒ cos x = cos
cos x
π π π
(2n + 1) ⇒ x = (2n + 1) . Then domain R = R – {(2n + 1) , n ∈ I}. Since tan x take all value of x so
2 2 2
its range = R
1 π
(d) sec x: We have sec x = is not defined when cos x = 0 and cos x = 0 ⇒ cos x = cos (2n+1) ⇒
cos x 2
π π
x =(2n+1) . Then domain = R – {(2n + 1) , n ∈ I} , Range = R –] – 1, 1 [
2 2
cos x
(e) cot x: We have cot x = is not defined, when
sin x
sin x = 0 ⇒ sin x = sin nπ ⇒ x = nπ, n = 0, 1, 2, 3 ........
∴ Domain = R – {nπ : n ∈ I} and Range = R
1
(f) cosec x: We know cosec = is not defined,
sin x

sin x = 0 ⇒ sin x = sin nπ


⇒ x = nπ
∴ Domain = R – {nπ: n ∈ I} , Range = R –] – 1, 1[.
86 Discrete Mathematical Structures

3.3.15 Inverse Trigonometric Functions


Let sin y = x ⇒ y = sin –1 ( x ) is called inverse circular function. The domain and range of inverse
trigonometric functions are given as:

Function Domain Range

1. sin –1 x [–1, 1] [– π 2, π 2]

2. cos–1 x [–1, 1] [ 0, π ]

3. tan –1 x R [– π 2 , π 2]

4. cot –1 x R ] 0, π[

 π π
5. cosec–1 x R –] – 1, 1[ – 2 , 2  – {0}

π 
6. sec –1 x R –] – 1, 1[ [ 0, π ] –  
 2

3.4 Difference between Function and a Relation


Let A and B be two sets and f be a function or mapping from the set A to the set B. Then by definition of
function, F is a subset of A×B, in which a ∈ A will exists in one and only one ordered pair from all order
pairs contained in f as first co-ordinate.

In other words, the mapping f will be a subset of A×B which satisfy the following two conditions:
(i) For each a ∈ A, (a,b) ∈ f for some b ∈ B (ii) If (a, b) ∈ f and (a, b' ) ∈ f ⇒ b = b'

But from the definition of relation, every subset of A × B is a relation from the set A to the set B. Hence every
mapping is a relation but every relation is not function.
If R is a relation from A to B, then the domain of R may be a subset of A, but if f is a function or mapping
from A to B, then the domain f will be A.
In relation R, any element of A can be associated to more than one elements in B and it is also possible that
some elements of A are not associated to any element in B. But in mapping f , every element of A is
associated to one and only one element in B.

Illustration: Let A = {1, 2, 3, 4, 5}, B = {a, b, c}.


if R = {(1, a), (2, b), (3, b), (4, c), (5, c)}
Then R is a function from A to B, clearly B is a function from A to B. Again, let S be a subset of A × B,
where S = {(1, a), (2, c), (1, b), (4, c), (5, c)}
Here S is a relation from A to B, but S is not a function from A to B, because 1 ∈ A is associated with two
elements a and b of B.
Functions 87

3.5 Kind of Mappings


3.5.1 Into Mapping [U.P.T.U. (B.Tech.) 2003]

If f : A → B be a mapping such that at least one element of B is not a f –


image of any element of the set A, then the mapping f is said to be an
into mapping or A into B mapping. Symbolically, the above
definition can be given as follows: A mapping f : A → B is said to be
into mapping if { f ( x ) : x ∈ A} ⊂ B.
Fig. 3.6

3.5.2 Onto Mapping


If f be a mapping such that each element of B is f–image of at least one
element of A, then the mapping f is said to an onto or subjective mapping.

In onto mapping f ( A ) = B, symbolically–A mapping f : A → B will be an


onto mapping, if { f ( x ) : x ∈ A} = B
Fig. 3.7

3.5.3 One-One Mapping [U.P.T.U. (B.Tech.) 2003]

Let f : X → Y be a mapping. If all distinct elements of the domain X has distinct f –images in Y, then the
mapping f is said to one-one or injective mapping.

Thus, f : X → Y will be one one or injective mapping,

if x1 ≠ x 2 ⇒ f ( x1 ) ≠ f ( x 2 )

or

if f ( x1 ) = f ( x 2 ) ⇒ x1 = x 2

3.5.4 Many-One Mapping


Let f : X → Y by a mapping. If two or more than two elements of the domain X have the same f –image in Y,
then the mapping f is said to be many-one mapping.

Thus, f : X → Y will be many one mapping if x1 ≠ x 2 ⇒ f ( x1 ) = f ( x 2 ).


88 Discrete Mathematical Structures

(i) (ii)

(iii) (iv)

Fig. 3.8

3.6 Even and Odd Functions


A function f ( x ) is said to be
(i) even if f (– x ) = f ( x ) ∀x (ii) odd if f (– x ) = – f ( x ) ∀x

Example 2: Show that the mapping f : R → R , where f ( x ) = – sin, x, x ∈ R is neither one-one nor onto.
Solution: Here f ( x1 ) = – sin x1 , f ( x 2 ) = – sin x 2, x1 , x 2 ∈ R .
∴ f ( x1 ) = f ( x 2 ) ⇒ – sin x1 = – sin x 2 ⇒ sin x1 = sin x 2.
Since f ( x1 ) = f ( x 2 ) even when x1 ≠ x 2.
∴ The mapping is not one-one.
Again, since the numerical value of sin x cannot exceeds 1, and so the mapping is not onto.

Example 3: Discuss the mapping f : R → R defined by f ( x ) = x 2, where R is the set of real numbers.

Solution: Here the domain of the mapping is R and f –image is the set of positive real numbers, because
the square of any real number is positive. Thus, f –image is a proper subset of its domain;
i.e., { f ( x ) : x ∈ R} ⊂ R.

Hence it is an into mapping.


Again, f ( x1 ) = f (– x1 ) = x12; i.e., f – image of two distinct elements is the same element of R. Thus, it is a
many-one mapping. Hence the given mapping is many-one into mapping.

Example 4: If X = {–1, 1} and f ( x ) = x 3 and f : X → X , then prove that f is one-one onto mapping.

Solution: Q f ( x1 ) = f ( x 2 ) ⇒ x13 = x 23 ⇒ x1 = x 2, x1 , x 2 ∈ X .
∴ mapping is one-one.
Since f (–1) = (–1)3 = –1 and f (1) = 13 = 1; i.e., each element of X is f –image of some element of X itself.
∴ mapping f is onto.
Thus, the given mapping is one-one onto mapping.
Functions 89

Example 5: If N be the set of natural numbers and a mapping f : N → N is defined by f ( x ) = x 2, x ∈ N , then


prove that f is one–one, but not onto.
Solution: Let x1 , x 2 ∈ N . Then f ( x1 ) = x12, f ( x 2 ) = x 22

f ( x1 ) = f ( x 2 ) ⇒ x12 = x 22

⇒ x1 = + x 2
[Taking only + ve sign, since x1 , x 2 are positive integers]
∴ The mapping f is one-one.
Q Each element of N is not f–image of some elements of N itself, for instance, 2, 3, 5, 6, 7,
8,...etc. are not square of any positive integer. Thus, f is not onto.
∴ f is into mapping.
Hence, the given mapping is one-one into.
Example 6: Test the mapping f : R → R defined by f ( x ) = cos x for being one-one and onto, where R is the
set of real numbers.
or

Prove that the mapping f : R → R defined by f ( x ) = cos x, ∀x ∈ R is many-one into mapping.


Solution: Since f ( x ) = cos x and f (– x ) = cos(– x ) = cos x, so two elements x and –x have the same f–image.

Hence, the mapping f is not one-one; i . e. , f is many–one.

Again we know that for all real values of x, the values of cos x oscillates from –1 to +1; i.e.,
–1 ≤ cos x ≤ 1( x ∈ R ). Therefore only those elements in R (range set) which lie between –1 and +1 are
f–images and remaining elements of this set are not associated to any element of the domain set. Thus, the
given mapping f is not onto; i.e., f is into. Therefore, it follows that the given mapping f is many-one into.
1
Example 7: Show that the mapping f : R → R , f ( x ) = , x ≠ 0 and x ∈ R is one-one onto, where R is the set
x
of non-zero real numbers.
Solution: Let x1 , x 2 ∈ R be any two non-zero real numbers, then
1 1  1
f ( x1 ) = f ( x 2 ) ⇒ = Q f ( x ) = x 
x1 x 2

⇒ x1 = x 2
∴ f ( x1 ) = f ( x 2 ) ⇒ x1 = x 2.
⇒ f is one-one mapping.
Let y ≠ 0 be any real number such that f ( x ) = y;
1 1
i.e. y= ⇒x= .
x y

1
Q y ≠ 0, ∴ is also a non-zero real number
y
90 Discrete Mathematical Structures

1
Hence, for every y ≠ 0 there exists its pre-image ≠ 0 in R as shown below:
y
 1 1  1
f  = =y Q f ( x ) = x 
 y  (1 / y )
1
It shows that { f ( x ) = : x ≠ 0, x ∈ R } = R
x
∴ f is onto.
Hence, the given mapping is one-one onto.

Example 8: Show that the mapping f : R → R , defined by f ( x ) = 3x + 5 is one-one into, where, R is the set of
real numbers.
Solution: f is one-one: Let x, y ∈ R be such that f ( x ) = f ( y ), then
f ( x ) = f ( y ) ⇒ 3x + 5 = 3y + 5 ⇒ 3x = 3y ⇒ x = y.

∴ f is a one-one mapping.
f is onto: Let z ∈ R (range of f ) be arbitrary, then let x ∈ R (domain of f ) be such that f ( x ) = z, then
z–5
f ( x ) = z ⇒ 3x + 5 = z ⇒ x = ∈ R.
3
z–5
Thus, for each member z in the range R of f, ∃ a member in the domain R of f such that
3
 z – 5 3(z – 5)
f  = + 5 = z.
 3  3

Hence, f is a mapping from R onto R.


∴ the given mapping f : R → R is one-one onto.

3.7 Inverse Function (Inverse Mapping)


Let f : X → Y be one-one onto mapping. Let y ∈ Y, since f is onto, there exists x ∈ X such that f ( x ) = y.
Again since f is one-one, this is the only element of X such that f ( x ) = y.

Thus, we have seen that for each y ∈ Y, there is a unique x ∈ X that f ( x ) = y.

This mapping from Y to X is called Inverse of f. The inverse of the mapping f is usually denoted by f –1 .
Thus, f ( x ) = y ⇔ f –1 ( y ) = x.

Definition: If f : X → Y is a one-one onto mapping, then the mapping X Y


f
f –1 : Y → X .
x y
Which associate each element y ∈ Y to a unique element x ∈ X is called
f –1
inverse mapping of f : X → Y.
Fig. 3.9
The inverse function is more clear from the Adjoining Figure.
Functions 91

Let f : X → Y be an one-one onto mapping, then x ∈ X , y ∈ Y are associated.


∴ y = f –image of x = f ( x ).

Thus, x = f –1 ( y ).

Hence, the mapping f –1 : Y → X , y ∈ Y is mapped with f –1 ( y ); i . e, x ∈ X .

? Theorems
Theorem 1: Prove that if f : A → B is one-one onto mapping then f –1 : B → A will be one-one onto mapping.
[U.P.T.U. (B.Tech) 2007]

Proof: Since f is one-one onto mapping, so we have


y = f ( x ) ⇒ f –1 ( y ) = x, x ∈ A, y ∈ B.
Let y1 = f ( x1 ), y 2 = f ( x 2 ), x1 , x 2 ∈ A; y1 , y 2 ∈ B,
Then x1 = f –1 ( y1 ), x 2 = f –1 ( y 2 ).
Now f –1 ( y1 ) = f –1 ( y 2 ) ⇒ x1 = x 2 ⇒ f ( x1 ) = f ( x 2 ) [Q f is a function]
⇒ y1 = y 2.
–1
∴ The mapping f is one-one.

Again, let x be an arbitrary element of A, then for the mapping f there exists an element y in B such that
y = f ( x ).
But f –1 ( y ) = x ∀x ∈ A.

∴ { f –1 ( y ): y ∈ B} = A.

Thus, f –1 : B → A is onto.

Hence, f –1 : B → A is one-one onto mapping.

Theorem 2: If f is one-one onto (bijective) function from the set A to the set B, then f –1 will be a unique
function.
Proof: Since f : A → B is one-one onto mapping and so its inverse will exists.

Suppose, if possible, there are two inverse g and h of f.

Now let y be an arbitrary element of B, then g (y) = x 1 and h(y) = x 2, where x1 , x 2 ∈ A.


Hence f ( x1 ) = y and f ( x 2 ) = y. [Q g and h are inverses of f]

Therefore f ( x1 ) = f ( x 2 ) ⇒ x1 = x 2 [Q f is one-one onto]


⇒ g( y ) = h( y ) ∀y ∈ B ⇒ g = h.
Hence, inverse of f is unique.

Theorem 3: The inverse of an inversible mapping is unique. [M.K.U. (B.E.) 2005, 2008]

Proof: Let f : A → B
By invertible mapping, if possible, let
g : B → A and h : B → A
92 Discrete Mathematical Structures

be two different inverse mapping of f . Let b ∈ B and g (b) = a 1, a1 ∈ A, h (b) = a2, a2 ∈ A


Now g (b) = a 1 ⇒ b = f (a1 )
and h (b) = a2 ⇒ b = f (a2 )
∴ f (a 1 ) = f (a2 ) ⇒ a1 = a2 [Q f is one-one]
This prove that g (b) = h (b) ∀ b ∈ B
Thus, the inverse of f is unique.

Example 9: f : R → R is defined by f ( x ) = ax + b where a, b, x ∈ R and a ≠ 0


Show that f is invertible and find the inverse of f . [U.P.T.U. (B.Tech.) 2007]

Solution: First we have to show f is one-one


Let x1 , x 2 ∈ R such that f ( x1 ) = f ( x 2 )
then ax1 + b = ax 2 + b
⇒ ax1 = ax 2
⇒ x1 = x 2
⇒ f is one-one.
To show that f is onto
Let y ∈ R such that y = f ( x ) or y = ax + b or ax = y − b
1
∴ given y ∈ R , there exists an element x = ( y − b) ∈ R such that f ( x ) = y
a
⇒ f is onto
( y − b)
Hence, f is one-one and onto ⇒ f is invertible and f −1 ( y ) =
a

Example 10: If f : I → I, where f ( x ) = x 2 and I be the set of integers, then find f –1 (9) and f –1 (– 2).

Solution: We know that (– 3)2 = 9 and (3)2 = 9 and there is no other integer whose square is 9. Hence f –1 (9)
= {– 3, 3}, but there is no other integer whose square is – 2, therefore f –1 (– 2) = φ, null set.

Example 11: If f : R → R is de fine d by f ( x ) = x 2 + 1, the n find f –1 (3), f –1 ({10, 37}).

Solution:

(i) From x 2 + 1 = 3, x = ± 2. Hence f –1 (3) = {– 2, 2}.

(ii) From x 2 + 1 = 10, x = ± 3 and from x 2 + 1 = 37, x = ± 6 .

Hence f –1 ({10, 37}) = {– 6, – 3, 3, 6 }.

Remark: f –1 is not a mapping, because for that f must be one-one and onto which is not here.

Example 12: If x, y ∈ R , then find f –1 the inverse mapping of f = {( x, y ): y = 3x – 2}

Solution: Let f : R → R , where y = f ( x ) = 3x – 2.


1
Now, from y = 3x – 2, 3x = y + 2 or x = ( y + 2) .
3
1  1 
By the definition of inverse function, f –1: R → R where x = f –1 ( y ) = ( y + 2) or f –1 = ( y, x ): x = ( y + 2).
3  3 
Functions 93

Example 13: Let f : Q → Q be defined by f ( x ) = 3x + 5( x ∈ Q ), where Q is the set of rational then prove that
f is one-one and onto mapping. Find also the formula which define the inverse function f –1 .

Solution: Let x1 , x 2 ∈ Q . Then f ( x1 ) = f ( x 2 ) ⇒ 3x1 + 5 = 3x 2 + 5


⇒ x1 = x 2 [By cancellation law]
Hence, f is a one-one mapping.
1
Let y ∈ Q , then x = ( y – 5) ∈ Q be such that
3
1  1 
f ( x ) = f  ( y – 5) = 3  ( y – 5) + 5 = y – 5 + 5 = y.
3  3 
Therefore, the mapping f is onto.
Hence, the given mapping is one-one onto.
1
Now, y = f ( x ) = 3x + 5 ⇒ x= ( y – 5).
3
Hence, from the definition of inverse function, f –1 : Q → Q where
1
x = f –1 ( y ) = ( y – 5);
3
–1  1 
i.e, f = ( y, x ) : x = ( y – 5).
 3 

Example 14: If Q is the set of rational numbers and f : Q → Q is defined by f ( x ) = 3x + 2, x ∈ Q , then prove
that f is one-one and onto. Find also f –1 .

Solution: Let x1 , x 2 ∈ Q , then


f ( x1 ) = f ( x 2 ) ⇒ 3x1 + 2 = 3x 2 + 2 ⇒ 3x1 = 3x 2 ⇒ x1 = x 2.
∴ f is a one-one mapping.
Again, let y ∈ Q (range of f) be arbitrary, then
y = f ( x ) = 3x + 2
y–2
⇒ x= ∈Q.
3
Since for y ∈ Q , x ∈ Q be such that
 y – 2  y – 2
f (x) = f   = 3  + 2 = y.
 3   3 

Thus, f is onto mapping.


Hence, f is one-one onto mapping.
Let y be image of x under f, then
y = f ( x ) = 3x + 2, y ∈ Q
1
⇒ x = ( y – 2)
3
–1 1
⇒ f ( y ) = x = ( y – 2)
3
 1 
Hence f –1 = ( y, x ): x = ( y – 2).
 3 
94 Discrete Mathematical Structures

Example 15: Is the inverse function x 2 – 3 = y, possible give reasons?

Solution: Let x ∈ R (domain) and y ∈ R (Co-domain)


Such that f (x) = y
⇒ x2– 3 = y

⇒ x = (3 + y )1 / 2

thus, f –1 : R → R is defined by f –1 ( x ) = ( x + 3)1 / 2, ∀x ∈ R .

Example 16: If f : X → Y and A and B are two subsets of X, then prove that
(i) f ( A ∪ B ) = f ( A ) ∪ f (B ). (ii) f ( A ∩ B ) ⊆ f ( A ) ∩ f (B ).

Solution:
(i) Let y be any arbitrary element of f ( A ∪ B ), then

y ∈ f ( A ∪ B ) ⇒ y = f ( x ), where x ∈ A ∪ B
⇒ y = f ( x ), where x ∈ A or x ∈ B
⇒ y = f ( x ) ∈ f ( A ) or y = f ( x ) ∈ f (B )
⇒ y = f ( x ) ∈[ f ( A ) ∪ f (B )]
⇒ y ∈ f ( A ) ∪ f (B )
∴ f ( A ∪ B ) ⊆ f ( A ) ∪ f (B ). ...(1)
Again, Let y be any arbitrary element of f ( A ) ∪ f (B ), then

y ∈ f ( A ) ∪ f (B ) ⇒ y ∈ f ( A ) or y ∈ f (B )

⇒ y = f ( x ), where x ∈ A or x ∈ B

⇒ y = f ( x ), where x ∈ A ∪ B

⇒ y = f ( x ), where f ( x ) ∈ f ( A ∪ B )

⇒ y ∈ f (A ∪ B)

∴ f ( A ) ∪ f (B ) ⊆ f ( A ∪ B ) ...(2)

Hence, from (1) and (2), we get f ( A ∪ B ) = f ( A ) ∪ f (B )


(ii) Let y be any arbitrary element of f ( A ∩ B ), then

y ∈ f ( A ∩ B ) ⇒ y = f ( x ), where x ∈ A ∩ B

⇒ y = f ( x ), where x ∈ A and x ∈ B

⇒ y = f ( x ), where f ( x ) ∈ f ( A ) and f ( x ) ∈ f (B )

⇒ y ∈ f ( A ) and y ∈ f (B )

⇒ y ∈ f ( A ) ∩ f (B )

Therefore f ( A ∩ B ) ⊆ f ( A ) ∩ f (B ).
Functions 95

Example 17: If f : X → Y and A, B are two subset of Y, then prove that


(i) f –1 ( A ∪ B ) = f –1 ( A ) ∪ f –1 (B ) (ii) f –1 ( A ∩ B ) = f –1 ( A ) ∩ f –1 (B )

Solution: (i) Let x be any arbitrary element of f –1 ( A ∪ B ), then

x ∈ f –1 ( A ∪ B ) ⇒ f ( x ) ∈ A ∪ B
⇒ f ( x ) ∈ A or f ( x ) ∈ B
⇒ x ∈ f –1 ( A ) or x ∈ f –1 (B )

⇒ x ∈ f –1 ( A ) ∪ f –1 (B )

∴ f –1 ( A ∪ B ) ⊆ f –1 ( A ) ∪ f –1 (B ) ...(1)

Again, let x be any arbitrary element of f –1 ( A ) ∪ f –1 (B ), then

x ∈ f –1 ( A ) ∪ f –1 (B ) ⇒ x ∈ f –1 ( A ) or x ∈ f –1 (B )

⇒ f ( x ) ∈ A or f ( x ) ∈ B

⇒ f ( x ) ∈ A ∪ B ⇒ x ∈ f –1 ( A ∪ B )

∴ f –1 ( A ) ∪ f –1 (B ) ⊆ f –1 ( A ∪ B ). ...(2)

Hence, from (1) and (2), we get


f –1 ( A ∪ B ) = f –1 ( A ) ∪ f –1 (B )

(ii) Let x be any arbitrary element of f –1 ( A ∩ B ), then

x ∈ f –1 ( A ∩ B ) ⇒ f ( x ) ∈ A ∩ B

⇒ f ( x ) ∈ A and f ( x ) ∈ B
⇒ x ∈ f –1 ( A ) and x ∈ f –1 (B )

⇒ x ∈ f –1 ( A ) ∩ f –1 (B )

∴ f –1 ( A ∩ B ) ⊆ f –1 ( A ) ∩ f –1 (B ) ...(1)

Again, let x be any arbitrary element of f –1 ( A ) ∩ f –1 (B ), then

x ∈ f –1 ( A ) ∩ f –1 (B ) ⇒ x ∈ f –1 ( A ) and x ∈ f –1 (B )

⇒ f ( x ) ∈ A and f ( x ) ∈ B

⇒ f (x) ∈ A ∩ B

⇒ x ∈ f –1 ( A ∩ B )

∴ f –1 ( A ) ∩ f –1 (B ) ⊆ f –1 ( A ∩ B ) ...(2)

Hence, from (1) and (2), we get


f –1 ( A ∩ B ) = f –1 ( A ) ∩ f –1 (B ).
96 Discrete Mathematical Structures

Example 18: If f : X → Y be a mapping and { Aα }α ∈∆ be an indexed family of subsets of Y, then prove that

(i) f –1  ∪ Aα  = ∪ f –1 ( Aα ) f –1  ∩ Aα  = ∩ f –1 ( Aα )
 α ∈∆  α ∈∆ (ii)
 α ∈∆  α ∈∆

Solution: (i) Let x be any arbitrary element of f –1  ∪ Aα  then


 α ∈∆ 

x ∈ f –1  ∪ Aα  ⇔ f ( x ) ∈ ∪ ( Aα )
 α ∈∆  α ∈∆

⇔ f ( x ) ∈ Aα for some α ∈ ∆
⇔ x ∈ f –1 ( Aα ) for some α ∈ ∆

⇔ x ∈ ∪ f –1 ( Aα )
α ∈∆

∴ f –1  ∪ Aα  ⇔ ∪ f –1 ( Aα )
 α ∈∆  α ∈∆

(ii) Let x be any arbitrary element of f –1  ∩ Aα  then


 α ∈∆ 

x ∈ f –1  ∩ Aα  ⇔ f ( x ) ∈ ∩ ( Aα )
 α ∈∆  α ∈∆

⇔ f ( x ) ∈ A α ∀α ∈ ∆
⇔ x ∈ f –1 ( Aα ) ∀α ∈ ∆

⇔ x ∈ ∩ f –1 ( A α )
α ∈∆

∴ f –1  ∩ Aα  = ∩ f –1 ( Aα )
 α ∈∆  α ∈∆

Example 19: If f : X → Y and A, B ⊆ Y, then prove that


(i) A ⊆ B ⇒ f –1 ( A ) ⊆ f –1 (B ). (ii) f –1 ( A – B ) = f –1 ( A )– f –1 (B ). (iii) f –1 (Y – A ) = X – f –1 ( A ).

Solution:
(i) Let x ∈ f –1 ( A ) be arbitrary. Then

x ∈ f –1 ( A ) ⇒ f ( x ) ∈ A
⇒ f (x) ∈ B [Q A ⊆ B]
–1
⇒x∈f (B )
–1 –1
Hence f ( A) ⊆ f (B ).
(ii) Let x be any arbitrary element of f –1 ( A – B ), then

x ∈ f –1 ( A – B ) ⇔ f ( x ) ∈ A – B
⇔ f ( x ) ∈ A and f ( x ) ∉ B
⇔ x ∈ f –1 ( A ) and x ∉ f –1 (B )

⇔ x ∈[ f –1 ( A )– f –1 (B )]

Therefore, f –1 ( A – B ) = f –1 ( A )– f –1 (B ).
Functions 97

(iii) Let x be any arbitrary element of f –1 (Y – A ), then

x ∈ f –1 (Y – A ) ⇒ f ( x ) ∈ Y – A
⇒ f ( x ) ∈ Y and f ( x ) ∉ A
⇒ x ∈ f –1 (Y ) and x ∉ f –1 ( A )

⇒ x ∈ X and x ∉ f –1 ( A ) [Q f –1 (Y ) = X ]

⇒ x ∈[ X – f –1 ( A )].
∴ f –1 (Y – A ) ⊆ X – f –1 ( A ) ...(1)

Again, let x be any arbitrary element of X – f –1 ( A ), then

x ∈ X – f –1 ( A ) ⇒ x ∈ X and x ∉ f –1 ( A )

⇒ x ∈ f –1 (Y ) and x ∉ f –1 ( A ) [Q f –1 (Y ) = X ]

⇒ f ( x ) ∈ Y and f ( x ) ∉ A

⇒ f (x) ∈ Y – A

⇒ x ∈ f –1 (Y – A )

∴ X – f –1 ( A ) ⊆ f –1 (Y – A ) ...(2)

From (1) and (2), we have f −1 (Y − A ) = X − f −1 ( A )

Example 20: Find the domain and range of the following function:
(i) f ( x ) = sin x – cos x (ii) f ( x ) = sin x

Solution:
(i) Domain of f ( x ) = sin x – cos x, the value of cos x and sin x lies between –1 and +1 for the given
function f (0) = –1, f (π ) = 1, so domain is R i.e., D f = R .

Range of f ( x ) = R f = sin x – cos x is [–1,1].


(ii) Domain of f ( x ) = sin x . The given function will be positive, zero or negative according as the value
of x is > 0, = 0, < 0. Thus, domain of f ( x ) = sin x is R.

Range of f ( x ) = R f = [ 0, 1].
1
Example 21: Find the range of the function f ( x ) = .
2 – cos 3x
1
Solution: Let y =
2 – cos 3x
1 1
⇒ 2 – cos 3x = or cos 3x = 2 –
y y

1
⇒ –1 ≤ (2 – ) ≤ 1 (∴ –1 ≤ cos 3x ≤ 1)
y
98 Discrete Mathematical Structures

1 1
⇒ –1 ≤ 2 – and 2 – ≤ 1
y y

1 1
⇒y≥ and y ≤ 1 i.e., ≤ y ≤ 1
3 3

1 
⇒ R f = Range ( f ) =  , 1
3 

Example 22: Find the domain and Range of the function.


 
 x 2, when x < 0 
 
f ( x ) =  x , when 0 ≤ x ≤ 1
 
 1 , when x > 1 
 x 

Find (i) f (– 2) (ii) f (1 / 3) (iii) f (1) (iv) f ( 2) (v) f (– 3)

Solution: Since, f ( x ) is defined for all value x ∈ R ⇒ domain f ( x ) = D f = R


Now x < 0 ⇒ f ( x ) = x 2 > 0 ⇒ f ( x ) ∈] 0, ∞ [

0 ≤ x ≤ 1 ⇒ f ( x ) = x ⇒ f ( x ) ∈]0, 1[
1
and, x > 1 ⇒ f (x) = ∈[ 0, 1]
x

∴ Range f = R f =]0, ∞ [ ∪ [ 0, 1] ∪ ] 0, 1[ = [ 0, ∞ [
2  1
(i) – 2 < 0 ⇒ f (–2) = (–2) = 4 f   = 1 / 3 and
(ii)  3
1
(iii) f (1) = 1 (iv) 2 > 1 ⇒ f ( 2) =
2
(v) – 3 < 0 ⇒ f (– 3) = (– 3)2 = 3.

x 2 + 2x + 3
Example 23: If g( x ) = then find R g = Range of g( x )
x
x 2 + 2x + 3
Solution: Let =y
x
⇒ x 2 + 2x + 3 = xy or x 2 + (2 – y ) x + 3 = 0 ∀x ∈ R

∴ (2 – y )2 – 4 × 1 × 3 = 0 (B 2 – 4 Ac = 0)

⇒ y 2 – 4 y + 4 – 12 ≥ 0

⇒ y2 – 4y – 8 ≥ 0

⇒ ( y – (2 – 2 3)( y – (2 + 2 3) ≥ 0

⇒ y ∈ (– ∞, 2 – 2 3) ∪ (2 + 2 3, ∞ )

i.e., y ∈ R – (2 – 2 3, 2 + 2 3) = R g
Functions 99

x2 – 2
Example 24: If f ( x ) = then find R f = Range of f ( x )
x2 – 3
x2– 2
Solution: Let y = ⇒ yx 2 – 3y = x 2 – 2
x2 – 3
⇒ x 2( y – 1 ) = 3 y – 2

3y – 2
⇒ x2 =
y –1
3y – 2 2
This is possible only if ≥0 ⇒ y ∈ (– ∞, ) ∪ (1, ∞ ) = R f
y –1 3

6 – 3x  x – 1
Example 25: If g( x ) = cos–1 + cos ec –1   then find D g = domain of g.
4  2 
6 – 3x x –1
Solution: Let φ ( x ) = cos–1 and ψ ( x ) = cos ec –1
4 2
6 – 3x
Then φ( x ) is defined when –1 ≤ ≤1
4

i.e., – 4 ≤ 6 – 3x ≤ 4 or –10 ≤ –3x ≤ –2


10 2
i.e., ≥x≥ .
3 3

 2 10
∴ Dφ =  , 
3 3

The function ψ( x ) is defined when


x –1 x –1
–∞ ≤ ≤ –1 or 1 ≤ <∞
2 2

i.e., – ∞ < x – 1 ≤ –2 or 2≤ x –1 < ∞

i.e, – ∞ < x ≤ –1 or 3≤ x < ∞

∴ D ψ = (– ∞,–1) ∪ (3, ∞ )

 10 
∴ D g = D( φ + ψ ) = D φ ∩ D ψ = 3, 
 3

Example 26: Find the domain and Range of the function.


1 1
(i) f (x) = x 2 (ii) g( x ) = (iii) h( x ) = 9 – x 2 (iv) k( x ) =
x–3 1 – x2

Solution:
(i) For each x ∈ R , x 2 is unique real number

∴ domain ( f ( x )) = R
Now y = x2 ⇒ x = ± y

∴ Range ( f ) = set of all non-negative real number = [ 0, ∞ [


100 Discrete Mathematical Structures

(ii) The function g( x ) is not defined when x – 3 = 0 i.e., x = 3

Domain ( f ( x )) = R – (3)
1 1 1 + 3y
Also y= ⇒ x –3= ⇒ x =
x–3 y y

⇒ x is not defined when y = 0

∴ Range of f ( x ) = R – {0}.

(iii) h( x ) = 9 – x 2 , h( x ) is not defined when (9 – x 2 ) is negative.

∴ h( x ) is defined only when (9 – x 2 ) ≥ 0

But, (9 – x 2 ) ≥ 0 ⇒ x 2 ≤ 9

⇒ x ≤ 3 or x ≥ – 3
⇒ –3≤ x ≤ 3

⇒ x ∈[–3, 3]
∴ Domain ( f ( x )) = [– 3, 3]

For each x ∈[– 3, 3], h( x ) will be unique value in the interval [0, 3]

Hence, range h( x ) = [ 0, 3]
1
(iv) k( x ) = 2
, k( x ) is not defined when (1 – x )2 = 0 i.e., x = ± 1
1– x

∴ Domain k( x ) = R –[–1, 1].


1 1 1
Also y= ⇒ 1 – x2 = or x = 1–
1 – x2 y y

 1
Clearly, x is not defined when 1 –  < 0 i.e., when y < 1
 y

∴ Range k( x ) = ( y ∈ R : 1 ≤ y < ∞ ) = [1, ∞[.

Example 27: Find the domain and range of the function


f (x) = 1 – x

Solution: The function f ( x ) is defined for all x ∈ R .


∴ Domain ( f ( x )) = R
Also x ≥ 0 ⇒ – x ≤ 0 ⇒1– x ≤1
∴ Range ( f ( x )) = { y ∈ R : y ≤ 1} =] – ∞, 1]
Functions 101

3.8 Operations on Real Valued Function


(i) Addition: ( f + g )x = f ( x ) + g( x ), f + g will be defined only for those values of x for which both f and
g are defined.

∴ D( f + g ) = D f ∩ D g , D f = Domain of f ( x ), D g = Domain of g (x)

(ii) Subtraction: ( f – g )x = f ( x )– g( x ) ⇒ D( f – g ) = D f ∩ D g

(iii) Multiplication: ( fg ) x = f ( x )g( x ) ⇒ D( fg ) = D f ∩ D g

 f f (x)
(iv) Division:   x =
 g g( x )

 f
  will be defined for those value of x for which both f and g are defined and also g( x ) ≠ 0.
 g

∴ D( f / g ) = D f ∩ D g – { x : x ∈ D g and g( x ) = 0}
(v) Composition: Let X , Y, Z be three non empty sets, f : X → Y and g : Y → Z be two mapping, then
the composition of mappings f and g is the composition mapping denoted by 'gof ' and is a function.
(gof ): X → Z and defined as

(gof ) x = g [ f ( x )] ∀x ∈ X

The composition 'gof ' is denoted by the following diagram

Fig. 3.10

Theorem 4: Let f : X → Y and g : Y → Z be one-one and onto maps. Then the composite function

gof : X → Z is one-one onto

and (gof )–1 = f –1 o g –1 [U.P.T.U. (M.C.A.) 2005]

Proof: Since f and g are both one-one onto and therefore f –1 and g –1 both exists and both are one-one
onto
gof is one-one Let x1 , x 2 ∈ X then
(gof ) x1 = (gof ) x 2

⇒ g [ f ( x1 )] = g [ f ( x 2 )]
102 Discrete Mathematical Structures

⇒ g( y1 ) = g ( y 2 ) Where f ( x1 ) = y1 ∈ Y and f ( x 2 ) = y 2 ∈ Y

⇒ y1 = y 2 [g is one-one]

⇒ f ( x1 ) = f ( x 2 )

⇒ x1 = x 2 [ f is one-one]

It clearly shows that gof is one-one mapping

gof is onto: Let z ∈ Z, since g is onto, hence there definitely exists an element y ∈ Y such that g( y ) = z.
Again f is onto, there exists an element x ∈ X such that f ( x ) = y.
(gof )x = g[ f ( x )] = g( y ) = z

It shows that for each z ∈ Z there exists an element x ∈ X such that (gof ) x = z
∴gof is onto mapping. Hence the mapping gof is one-one onto.
To prove that ( gof )–1 = f –1 og –1

Q gof is one-one onto mapping

∴The inverse mapping (gof )–1 exists

If f : X → Y be given by f ( x ) = y, where x ∈ X , y ∈ Y

g : Y → Z be given by g( y ) = z, where y ∈ Y, z ∈ Z

and gof : X → Z be given by (gof )( x ) = z, where x ∈ X , z ∈ Z


By definition of inverse mapping
f –1 ( y ) = x, g –1 (z ) = y, (gof )–1 (z ) = x

Now, ( f –1 og –1 )(z ) = f –1[ g –1 (z )] = f –1 ( y ) = x

∴ (gof )–1 (z ) = ( f –1 o g –1 ) z

⇒ (gof )–1 = f –1 o g –1

Theorem 5: Let f : P → Q be a one-one and onto mapping and I P and I Q be the identify functions of the sets P
and Q respectively. Then show that f –1 of = I P and fof –1 = I Q.

Proof: Note that a function f : P → Q is called an identity function, if f (P ) = p, ∀p ∈ P and is denoted by I P .


Let f : P → Q be defined as
f ( p) = q, p ∈ P and q ∈ Q
Then, the inverse image of the element q under f is
f –1 (q) = p

Again, since f is one-one onto therefore f –1 : Q → P exists and we have

f –1 (q) = p, p ∈ P and q ∈ Q

Now ( f –1 of ) p = f –1 ( f ( p)) ∀ p ∈ P ⇒ f –1 (q) = p


Functions 103

Thus ( f –1 of ) p = p = I p( p)∀p ∈ P .

Hence f –1 of = I P

Similarly ( fof –1 )(q) = f ( f –1 (q))∀q ∈ Q

⇒ f ( p) = q = I Q(q) ⇒ fof –1 = I Q

Theorem 6: Show that the composite of mapping obey associative law.


or

If X , Y, Z, T are four sets and f , g, h be three mapping given by f : X → Y, g : Y → Z, h : Z → T , then prove


that ho(gof ) = (hog ) of

Proof: We have given that

f : X → Y, g : Y → Z, h: Z → T

Let x be any arbitrary element of X, then

[ ho(gof )] x = h [(gof )( x )]

= h [ g( f ( x ))]

= h [ g( y )] [ f ( x ) = y]

= h(z ) [ g( y ) = z]

Again [(hog ) of ] x = (hog )( f ( x )) = (hog )( y ) = h [ g( y )] = h(z ) = t ...(2)

From (1) and (2) ho(gof ) = (hog ) of .

Theorem 7: The composition of functions is not commutative i.e. fog ≠ gof . [U.P.T.U. (B.Tech.) 2009]

Proof: Let f : P → Q and g : Q → R be two functions. Then the function gof exists because the range of f is
a subset of the domain of g. But fog cannot exist unless the range of g is a subset of domain of f i.e. unless
R ⊂ P . As such we find that fog does not exist if R ⊂
| P but fog will be a function from Q to itself if P = R , .
Thus, if P = R

f : P → Q and g : Q → P ⇒ gof : P → P and fog : Q → Q

Now we find that both fog and gof exist but they cannot be equal of P and Q are two distinct sets, which are
their domains. However if P = Q = R , then both function gof and fog exist and both are from P to itself, even
then they may not be equal. Hence, in general the composition of functions is not necessarily commutative.

Example 28: Let A = {1, 2, 3, 4, 6} and let R be the relation on A defined ‘‘ x divides y’’ indicated as x|y ( x|y) if
there exist an integer z such that xz = y.
(i) Write R as a set of ordered pairs.

(ii) Find the inverse relation R −1 and describe R −1 in words. [U.P.T.U. (B.Tech.) 2003]

Solution: The ordered pairs in R are those elements in which second element of every ordered pair is
divisible by first element.
104 Discrete Mathematical Structures

(i) R = {(1, 2), (1, 3), (1, 4), (1, 6), (2, 4), (2, 6), (3, 6)}
Here 1 | 2, 2| 4 and 3| 6

(ii) To find R −1 , arrange all the ordered pairs in reverse order

R −1 = {(2, 1), (3, 1), (4, 1), (6, 1), (4, 2), (6, 2), (6, 3)}

Now relation R −1 can be defined as x is divisible by y or x R y − 1

Example 29: Show that there exists one to one mapping from A × B to B × A . Is it onto also?

[U.P.T.U. (B.Tech.) 2004]

Solution: Let ( x, y ) ∈ A × B ⇒ ( y, x ) ∈ B × A

Now, f : A × B to B × A

Let x1 , y1 , x 2, y 2 ∈ A × B

and f be defined as f ( x, y ) = ( y, x )

If f ( x1 , y1 ) = f ( x 2, y 2 )

⇒ ( y1 , x1 ) = ( y 2, x 2 )

⇒ y1 = y 2 and x1 = x 2

Hence it is one-one. It will be onto also every element of co-domain will be f -image of at least one element
of a domain.

Example 30: Let X = {1, 2, 3}, Y = { p, q} and Z = {a, b}, let f : X → Y be f = {(1, p), (2, p), (3, q)}

g : Y → Z be g = {( p, b), (q, b)}. Find gof and show it pictorially [U.P.T.U. (B.Tech.) 2003]

Solution: gof = g [ f ( x )] ⇒ (gof )(1) = g [ f (1)] = g ( p) = b

(gof )(2) = g [ f (2)] = g ( p) = b

(gof )(3) = g [ f (3)] = g (q) = b

gof = {(1, b), (2, b), (3, b)}

Fig. 3.11
Functions 105

Example 31: Let X = {a, b, c}. Define f : X → X such that

f = {(a, b), (b, a), (c, c)}

Find (i ) f −1 (ii ) f 2 (iii ) f 3 (iv ) f 4 [U.P.T.U. (B.Tech.) 2004]

Solution: (i) f 1 = {(a, b), (b, a), (c, c)}

(ii) f 2 = fof = ( fof ) a = f [ f (a)] = a


( fof ) b = f [ f (b)] = b
( fof ) c = f [ f (c)] = c

f 2 = fof = {(a, a), (b, b), (c, c)}


(iii) f 3 = f 2of = f 2 [ f (a)] = f 2 [ f (a)] = b

f 2 [ f (b)] = a, f 2 ( f (c)] = c

∴ f 3 = {(a, b), (b, a), (c, c)}


(iv) f 4 = f 3 of = f 3 [ f (a)] = a

f 3 [ f (b)] = b, f 3 [ f (c)] = c

f 4 = {(a, a), (b, b), (c, c)}

Example 32: Let f , g and h : R → R ; be defined by (R is the set of real numbers)

Compute (i ) f −1 g ( x ) (ii ) h . f (g f −1 y ). (h . f ( x )
1
Where f ( x ) = x + 2, g ( x ) = 2
, h (x) = 3
x +1

Solution: Let f ( x ) = x + 2, Let y = f ( x ) or x = f −1 ( y )

Q y=x+2 ⇒ x=y−2

⇒ f −1 ( y ) = y − 2

 1  1 1 − 2x 2 − 2 − (2x 2 + 1)
(i) f −1 [ g ( x )] = f −1  2 = 2 − 2= =
 x + 1 x + 1 x2 + 1 x2 + 1

(ii) h { f (g f −1 ( y )} . {h f ( x )}

= h f (g ( y − 2) h f ( x )
 1  1
=h f  2  h ( x + 2), Let =t
( y − 2) + 1  ( y − 2)2 + 1

= h f (t ) h ( x + 2)
= h (t + 2) 3
= 3. 3 = 9.
106 Discrete Mathematical Structures

Example 33: Show that the function f and g both of which are from N × N to N given by f ( x, y ) = x + y and
g ( x, y ) = xy are onto but not one-one. [U.P.T.U. (B.Tech.) 2003]

Solution: For one-one mapping


We have f ( x, y ) = x + y
Let x1 , y1 , x 2, y 2 ∈ N If f ( x1 , y1 ) = f ( x 2, y 2 )
⇒ x1 + y1 = x 2 + y 2
⇒ x1 ≠ x 2 and y1 ≠ y 2
e.g. x1 = 1, y1 = 4, x 2 = 4, y1 = 1

Then f ( x1 , y1 ) = f ( x 2, y 2 ). But x1 ≠ x 2, y1 ≠ y 2
Hence f is not one-one mapping
Again, g ( x, y ) = xy
Let x1 , y1 , x 2, y 2 ∈ N
and g( x1 , y1 ) = g( x 2, y 2 )
⇒ x1 y1 = x 2 y 2
It not necessarily x1 = x 2 and y1 = y 2
e.g. if x1 = 1, y1 = 5, x 2 = 5, y 2 = 1

Then g ( x1 , y1 ) = g ( x 2, y 2 )
But x1 ≠ x 2 and y1 ≠ y 2
Onto f is defined as f ( x, y ) = x + y

Since every element of N can be written as the sum of two elements of N. There will be no element in the
co-domain that does not have pre-image in domain. Hence it is onto. Similarly g is also onto.

Example 34: Let the maps f : X → Y and g : Y → Z be defined by the diagram

Fig. 3.12
Find gof : X → Z [P.T.U. (B.E.) Punjab 2007]

Solution: We have (gof )(l) = g [ f (l)] = g (2) = p

(gof )(m) = g [ f (m)] = g (1) = s

(gof )(n) = g [ f (n)] = g (2) = p

(gof )(t ) = g [ f (t )] = g (3) = q

Hence, gof = { p, s, p, q}
Functions 107

Example 35: Let X = {1, 2, 3} and f , g, h, s are functions from X to X given by

f = {(1, 2), (2, 3), (3, 1)} g = {(1, 2), (2, 1), (3, 3)}

h = {(1, 1), (2, 2), (3, 1)} s = {(1, 1), (2, 2), (3, 3)}

find fog, gof , fohog, sog, gos, sos and fos

Solution: fog = {(1, 3), (2, 2), (3, 1)}

gof = {(1, 1), (2, 3), (3, 2)} ≠ fog

fohog = {(1, 3), (2, 2), (3, 2)}

sog = {(1, 2), (2, 1), (3, 3)} = g = gos

sos = {(1, 1), (2, 2), (3, 3)} = s

fos = {(1, 2), (2, 3), (3, 1)} = f

Example 36: Let f ( x ) = x + 2, g ( x ) = x − 2, h ( x ) = 3x for x ∈ R , find gof , fog, fof , fohog

Solution: gof = {( x, x ): x ∈ R } = g [ f ( x )] = g ( x + 2) = x + 2 − 2 = x

fog = {( x, x ): x ∈ R } = f [ g ( x )] = f ( x − 2) = x − 2 + 2 = x = gof

fof = {( x, x + 4): x ∈ R } = f [ f ( x )] = f ( x + 2) = x + 4

( foh) og = fo (hog ) = ( foh) g ( x ) = ( foh)( x − 2)

= f [ h ( x − 2)]

= f [ 3 ( x − 2)]

= 3 ( x − 2) + 2 = 3x − 4

3.9 Number of Functions


Cardinality of a sets A and B are m and n respectively.
Number of functions from A → B = nm

Number of functions from A → A = nn

Example 37: Prove that the number of functions from A → A is less than number of relations from A → A
2
i.e. nn < 2n [U.P.T.U. (M.C.A.) 2004-2005]

Solution: First we prove by induction that

n < 2n ∀ positive integers n.

We know that P (1): 1 < 21 is true. ...(1)

Let us assume that P (k ): k < 2k , k ∈ N is true. ...(2)


108 Discrete Mathematical Structures

We shall prove that P (k ) is true, then P (k + 1) is also true.


i.e. (k + 1) < 2k +1 ...(3)

Now k < 2k [from (2)]

⇒ k + 1 < 2k + 1 (adding 1 on both sides)

⇒ k + 1 < 2k + 2k (as b 1 < 2k )

⇒ (k + 1) < 2. 2k

⇒ (k + 1) < 2k +1

Hence, by principle of induction P (k ) is true k ∈ N .

Thus, n < 2n ∀ n ∈ N

Taking nth power on both sides, we find

(n)n < (2n )n


2
or nn < 2n .

Example 38: If A is finite set and f : A → A1 is a one-one function, then f is onto also.

[R.G.P.V. (B.E.) Raipur 2005]

Solution: Let A = {a1 , a2, a3 K an} be finite set. Since f is a one-one function f (a1 ), f (a2 ) K f (an ) are all n
distinct elements of the set A. But A has only n elements.
Therefore, A = { f (a1 ), f (a2 ) K f (an )}
It means co-domain of f = Range of f . Therefore f is onto function.

Example 39: List all possible functions from X = {a, b, c} to Y = {0, 1} and indicate in each case whether the
function is one to one, is onto is one to one onto. [U.P.T.U. (B.Tech.) 2006]

Solution: We have X = {a, b, c} and Y = {0, 1}

All possible function from X to Y are

f1 = {(a, 0), (b, 0), (c, 0)}, f 2 = {(a, 1), (b, 1), (c, 1)}

f 3 = {(a, 0), (b, 0), (c, 1)}, f 4 = {(a, 1), (b, 1), (c, 0)}

f 5 = {(a, 0), (b, 1), (c, 1)}, f 6 = {(a, 1), (b, 0), (c, 0)}

f7 = {(a, 0), (b, 1), (c, 0)}, f 8 = {(a, 1), (b, 0), (c, 1)}
3
The total number of function from X → Y is 2 = 8

The functions f 3 , f 4 , f 5, f7 , f 8 are onto functions. No functions is one-one and no function is one-one onto.
Functions 109

All the functions are given below:

Fig. 3.13

Example 40: Let N be the set of natural numbers including zero. Determine which of the following functions
are one-to-one, which are onto and which are one-to-one onto.
1 if j is odd
(i) f : N → N , f ( j) = j2 + 2 (ii) f : N → N , f ( j) = 
0 if j is even [U.P.T.U. (B.Tech.) 2006]
2
Solution: (i) For each value of j ∈ N its image f ( j) = j + 2 ∈ N
If j = a1 , a2 ∈ N , then f (a1 ) = a 12 + 2 and f (a2 ) = a22 + 2
As a1 ≠ a2 then a 12 + 2 ≠ a22 + 2

i.e. f (a1 ) ≠ f (a2 ), so f is one-one

There exists value of f ( j) = 0, 1 for which the pre images (− 2), (− 1) does not belong to N
(ii) All odd value of j ∈ N have the same image (1) ∈ N . So f is not one-one

Example 41: Let f : R → R and g : R → R , where R be the set of real numbers. Find fog and gof , where
f ( x ) = x 2 and g ( x ) = x + 4 . State whether these functions are injective, surjective and bijective.
[U.P.T.U. B.Tech.) 2005]

Solution: We have
( fog ) x = f [ g ( x )] = f ( x + 4) = ( x + 4)2

(gof ) x = g [ f ( x )] = g [ x 2] = x 2 + 4
110 Discrete Mathematical Structures

 f (− 1) = 1
The function f ( x ) = x 2 is not one-one (injective) as 
 f (1) = 1

It is not onto surjective because corresponding to negative values of f ( x ), the value of x shall be imaginary
and does not belong to R.

The function g ( x ) = x + 4 is one-one (injective). It is also onto (surjective) and hence it is bijective
(one-one and onto).

The function ( fog ) x = ( x + 4)2 is not one-one (injective) as for x = ± i ∉ R , the value of fog ( x )will be same.

It is also not onto (surjective) because corresponding to negative value of fog ( x ) ∈ R , there will not be a
value of x ∈ R .

The function (gof ) x = x 2 + 4 is not one-one (injective) as for x = ± i the value of (gof ) x will be the same. It
is not one-one (surjective) because corresponding to negative values of (gof ) x, the values of x shall be
imaginary ∉ R.

Example 42: Show that if f ( x ) is a function defined by f ( x ): N − {1} → N where f ( x ) is highest prime
factor of x, then f is
(i) not a one-one function (ii) not a onto function
Solution: (i) f (10) = highest prime factor of 10 = 5
f (15) = highest prime factor of 15 = 5
f (20) = highest prime factor of 20 = 5
Therefore f is a many-one function and is not a one-one function.
(ii) Again image of x ∈ N − {1} = the largest prime number that divide x = a prime number. Therefore the
range of f is a set of prime numbers. It means the range of f ≠ N so the function f is not an onto
function.

Example 43: Let f : R → R be a function defined by f ( x ) = px + q ∀ x ∈ R . Also fof = I R , find the values of p
and q. [Pune (B.E.) 2004, 2008; Delhi (B.E.) 2007; P.T.U. (B.E.) Punjab 2005, 2009]

Solution: ( fof ) x = I R ( x )
⇒ f ( f ( x )) = x
⇒ f ( px + q) = x
⇒ p ( px + q) + q = x
2
⇒ p x + pq + q − x = 0

⇒ x ( p2 − 1) + pq + q = 0 ∀ x ∈ R

⇒ p2 − 1 = 0 and pq + q = 0

⇒ p = ± 1 and q ( p + 1) = 0
⇒ p = 1 and q = 0 or p = − 1 and q is any real value.
Hence, either (i) p = 1 and q = 0 or (ii) p = − 1 and q = any real value.
Functions 111

Example 44: If f : A → B and g : B → A are two functions such that gof = I A , then f is
(i ) injective (one-one)
(ii) g is surjective [Rohtak (M.C.A.) 2005, 2009; Kurukshetra (B.E.) 2007]

Solution: Let x, y ∈ A
Then f (x) = f (y )

⇒ g ( f ( x )) = g ( f ( y ))

⇒ (gof ) x = (gof ) y

⇒ I A (x) = I A (y )

⇒ x=y

and this is true ∀ x ∈ A. Thus f ( x ) = f ( y ) ⇒ x = y ∀ x, y ∈ A. Therefore f is one-one

(ii) g : B → A if x ∈ A then f ( x ) ∈ B (as f : A → B ) if y ∈ f ( x ) then

g ( y ) = g [ f ( x )] = (gof ) x = I A ( x )

Therefore V x ∈ A, there exists a y ∈ f ( x ) ∈ B such that g ( y ) = x

⇒ g is onto.

Example 45: Composition of function is commutative. Prove the statement or give counter example.
[U.P.T.U. (B.Tech.) 2009]
or

Show that the function f ( x ) = x 3 and g ( x ) = x1 / 3 for all x ∈ R are inverse to one another.

[Nagpur (B.E.) 2005, 2008]

Solution: Since ( fog ) x = f [ g ( x )] = f ( x1 / 3 ) = x

and (gof ) x = g [ f ( x )] = g [ x 3 ] = x

∴ fog = gof then f = g −1 or g = f −1

1  1
Example 46: If f ( x ) = x 3 – , find the value of f ( x )+ f  
x3  x
1
Solution: We have f ( x ) = ( x 3 – )
x3
 
 3 

 
1  
1
f   =   –
1  =  1 – x 3
 3 
 x  x 3
 1   x 
  
  x 
 1  1  1 
Hence, f ( x ) + f   =  x 3 – 3  +  3 – x 3  = 0.
 x  x   x 
112 Discrete Mathematical Structures

1 + x  x+ y
Example 47: If f ( x ) = log   , show that f ( x ) + f ( y ) = f  .
1 – x  1 + xy 
1 + x
Solution: We have f ( x ) = log   ...(1)
1 – x
1 + y
and f ( y ) = log   ...(2)
1 – y
1 + x 1 + y
∴ f ( x ) + f ( y ) = log   + log  
1 – x 1 – y
 1 + x   1 + y   1 + x + y + xy 
= log     = log  
  1 – x   1 – y    1 – x – y + xy 
  x+ y
1 +  
 x+ y   1 + xy   1 + x + y + xy 
∴ f  = log = log  
 1 + xy    x+ y  1 + xy – x – y 
 1 –   
  1 + xy  

 x+ y
∴ f (x)+ f (y ) = f  
 1 + xy 

1  1
Example 48: If f ( x ) = x 2 – , show that f ( x )+ f   = 0
x 2  x

1 1  1 1
Solution: We have f ( x ) = x 2 – Put x = , we get f   = 2 – x 2
x 2 x  x x

 1 1 1
∴ f (x)+ f   = x 2 – 2 + 2 – x 2
 x x x
=0

 3x + 1
Example 49: If y = f ( x ) =   , prove that f ( y ) = x
 5x – 3

Solution: Put x = y in given function


 3x + 1
3  +1
3y + 1  5x – 3 14 x (5x – 3)
f (y ) = = = × =x
5y – 3  3 x + 1  (5x – 3) 14
5  –3
 5x – 3

1 + x  2x 
Example 50: f ( x ) = log   , Show that f   = 2 f (x)
1– x  1 + x 2
1 + x
Solution: We have f ( x ) = log  
1– x
 2x 
1 +  2
x 2  = log  1 + 2x + x  = log  1 + x  = 2 log  1 + x  = 2 f ( x ).
2
 2x  1 +
∴ f  = log 
1 + x 
2
 1 – 2x 
2
 1 – 2x + x  1 – x 1 – x
 1 + x2 
Functions 113

Example 51: Define function. Let f and g be two functions defined by

f (x) = x – 1 and g( x ) = 4 – x 2 ,

then describe the function:


(i) ( f – 2g )x (ii) ( fg )x

Solution:

(i) We have, f ( x ) = x – 1 , g( x ) = 4 – x 2

∴ ( f – 2g )x = f ( x )– 2g( x ) = x – 1 – 2 4 – x2

(ii) We have, f ( x ) = x – 1 , g( x ) = 4 – x 2

∴ ( fg )x = ( fog )x = f [ g( x )] = f  4 – x2 = 4 – x2 – 1
 

Example 52: Let f : R → R be the identity function. What is fof ? What is ff ?

Solution: Let f : R → R then f is said to be identify mapping if f ( x ) = x

Now ( fof )x = f [ f ( x )] = f ( x ) = x

and f f is another way of representation of fof


Thus ff ( x ) = ( fof )x = f [ f ( x )] = f (x) = x

Example 53: If f : A → B such that f ( x ) = x – 1 and g : B → C such that g( y ) = y 2 find fog ( y ) .

Solution: We have f : A → B such that f ( x ) = x – 1


and g : B → C such that g( y ) = y 2

∴ ( fog ) y = f [ g( y )] = f [ y 2] = y2– 1

1 x –1
Example 54: If f ( x ) = and g( x ) = . Find the value of g [ f ( x )].
1– x x
1 x –1
Solution: We have f ( x ) = , g( x ) =
1– x x
1
–1
 1  1– x 1+ x –1 1– x
Then g[ f ( x )] = g = = × =x
1 – x  1 1– x 1
1– x
x–3
Example 55: Define composite function. Let f : N → R s.t f ( x ) = 2x – 3 and g : Z → R s.t g( x ) = , then
2
find formula for gof : N → R .
(2x – 3)– 3
Solution: We have (gof )x = g[ f ( x )] = g[ 2x – 3] = = x–3
2
114 Discrete Mathematical Structures

Example 56: f ( x ) = x and g( x ) = x . Define f + g and f – g.


2x, when x ≥ 0 
Solution: ( f + g )x = f ( x ) + g( x ) = x + x =  
 0, when x < 0
2x, when x < 0 
Also ( f – g )x = f ( x )– g( x ) = x – x =  
 0, when x ≥ 0

Example 57: If f ( x ) = x 2 and g( x ) = x 3 , define f g

Solution: We have ( f g )x = f ( x )g( x ) = x 3 x 2 = x 5, ∀x ∈ R

Example 58: If f ( x ) = 1 + x 2 and g( x ) = 1 – x, define ( f / g ) .

 f f (x) 1 + x 2
Solution: We have   x = = , ∀x ∈ R .
 g g( x ) 1 – x

1
Example 59: Find the domain of the function. f ( x ) = + x + 2.
log10 (1 – x )

1
Solution: Let f ( x ) = g( x ) + h( x ), where g( x ) = and h( x ) = x+2
log10 (1 – x )
The function g( x ) defined for all real value of x for which 1 – x > 0 and x ≠ 0 i.e., x < 1 and x ≠ 0.
∴ Domain ( f ) =] – ∞, 1[–{0}
Again, h( x ) is defined for those real value of x for which x + 2 ≥ 0 i.e., x ≥ – 2
∴ Domain h( x ) = [–2, ∞ [
Now domain f = domain ( f + g )= domain ( f ) ∩ domain (g)
=] – ∞, 1[–{0} ∩ [–2, ∞[ = [–2, 1 – {0}]

cos–1 x
Example 60: Find the domain of the function. f ( x ) =
[ x]
g( x )
Solution: Let f ( x ) = , where g( x ) = cos–1 x and h( x ) = [ x] then,
h( x )

domain (g ) = [–1, 1] and domain (h) = R


∴ Domain ( f ) = domain (g ) ∩ domain (h) – { x : h( x ) = 0}
= [–1, 1] ∩ R –[ 0, 1] = [–1, 0[ ∪ {1}

Example 61: If f ( x ) = [ x] and g( x ) = x .

Find (i) (gof )(–5/ 3)– ( fog )(–5/ 3) (ii) (gof )(5/ 3)– ( fog )(5/ 3)

Solution: We have
(gof )( x ) = g[ f ( x )] = g([ x]) = [ x]
( fog )( x ) = f [ g( x )] = f ( x ) = [ x ]
Functions 115

(i) (gof )(–5/ 3) – ( fog )(–5/ 3)


 –5 
= [–5/ 3] –   = [–1. 66] –[ 5/ 3] = –2 –[1. 66]
 3 
= 2– 1 = 1
(ii) (gof )(5/ 3)– ( fog ) 5/ 3 = [ 5/ 3] –[ 5/ 3 ] = [1. 66. . . . ] –[1. 66. . . . ]
=1–1 = 0

Example 62: Let f ( x ) = x 2 – 1 and g( x ) = (3x + 1), describe

(i) gof (ii) fog (iii) fof (iv) gog

Solution: Here domain ( f ) = R , and domain (g ) = R and


Range ( f ) ⊆ Domain (g ) and range (g ) ⊆ domain ( f )

Hence, all the required composite functions are defined and the domain of each is R. Now
(i) (gof )x = g[ f ( x )] = g( x 2 – 1) = 3( x 2 – 1) + 1 = 3x 2 – 2
(ii) ( fog )x = f [ g( x )] = g(3x + 1) = (3x + 1)2 – 1 = 9 x 2 + 6 x
(iii) ( fof )x = f [ f ( x )] = f ( x 2 – 1) = ( x 2 – 1)2 – 1 = x 4 – 2x 2
(iv) (gog )x = g[ g( x )] = g[ 3x + 1] = 3(3x + 1) + 1 = (9 x + 4)

Example 63: If f : R → R , g : R → R and h : R → R and defined as


f ( x ) = x 2, g( x ) = tan x and h( x ) = log x.

π
Then show [ ho(gof )] x = 0 if x =
2
Solution: [ ho(gof )] x = h[(gof )x]
 π
= h[ g ( f ( x ))] = h[ g ( x 2 )] = h (tan x 2 ) = log tan x 2 = log tan   = log 1 = 0
 4

Example 64: Let f : R → R where f ( x ) = 2x + 1, g : R → R where g( x ) = x 2 – 2


Then find, (i) (gof ) x and (gof )(1) (ii) (gof ) ≠ fog

Solution: (i) (gof ) x = g [ f ( x )] = g[ 2x + 1] = (2x + 1)2 – 2 = 4 x 2 + 4 x – 1

And (gof )(1) = 4 × (1)2 + 4 × (1)– 1 = 7


(ii) (gof ) x = 4 x 2 + 4 x – 1

( fog ) x = f [ g( x )] = f ( x 2 – 2) = 2( x 2 – 2) + 1 = 2x 2 – 4 + 1 = 2x 2 – 3

∴ (gof ) ≠ fog

Example 65: If mapping f : R → R , f ( x ) = cos x, x ∈ R and g : R → R , g( x ) = x 3 , x ∈ R

Then, find (gof )x and ( fog )x and show that (gof ) x ≠ ( fog )x
Solution: (gof )x = g[ f ( x )] = g[ cos x] = (cos x )3 = cos3 x
Again ( fog ) x = f [ g( x )] = f [ x 3 ] = cos x 3
Q ( fog ) x ≠ (gof )x
116 Discrete Mathematical Structures

Example 66: Let f : A → A and g: A → A be two function defined on set A = {1, 2, 3, 4, 5} such that
f (1) = 3, f (2) = 5, f (3) = 3, f (4) = 1, f (5) = 2 . And g(1) = 4, g(2) = 1, g(3) = 1, g(4) = 2, g(5) = 3 find fog and gof .
Solution: Here f (1) = 3 ⇒ gof = g[ f (1)] = g(3) = 1 f (2) = 5 ⇒ gof = g[ f (2)] = g(5) = 3
f (3) = 3 ⇒ gof = g[ f (3)] = g(3) = 1 f (4) = 1 ⇒ gof = g[ f (4)] = g(1) = 4
f (5) = 2 ⇒ gof = g[ f (5)] = g(2) = 1 g(1) = 4 ⇒ fog = f [ g(1)] = f (4) = 1

g(2) = 1 ⇒ fog = f [ g(2)] = f (1) = 3 g(3) = 1 ⇒ fog = f [ g(3)] = f (1) = 3

g(4) = 2 ⇒ fog = f [ g(4)] = f (2) = 5 g(5) = 3 ⇒ fog = f [ g(5)] = f (3) = 3

Exercise
1. Let f ( x ) = (2x + 5) and g( x ) = x 2 + 1. Describe
(i) gof (ii) fog (iii) fof (iv) ff

x –1
2. If f ( x ) = , when x ≠ 1 and x ≠ –1. Show that ( fof –1 ) is an identify function.
x +1

1
3. If f ( x ) = x – 1 and g( x ) = . Describe
x
(i) c (ii) f –g
(iii) c (iv) f / g, find the domain in each case.

1
4. If f ( x ) = . Show that f [ f ( f ( x )] = x
1– x

x
5. Find the domain of the function f ( x ) =
x 2 – 3x + 2

1
6. Find the domain and range of f ( x ) = 2
x –1

7. If f ( x ) = x 2 + 3x + 2, find the value of x for which, f ( x + 1) = f ( x )

1 – tan x
8. If f ( x ) = , show that f (cos θ ) = tan 2(θ / 2)
1 + tan x

 2x – 1
9. If y = f ( x ) =   , prove that f ( y ) = x
 5x – 2

10. If f ( x ) = log e x and x > 0, prove that f (υ ν ω ) = f (υ) + f (v ) + f (ω )


sin x  π 1 – 2 tan θ  π
11. (i) If f ( x ) = , find f   (ii) If f (θ ) = , find f  
1 + cos x  2 1 + 2 tan θ  4

(iii) If f ( x ) = sin −1 (log x ), find f (1)


Functions 117

3x – 1, when x ≥ 1
12. If f ( x ) =   then find f (0) and f (2)
 – x, when x < 1 

13. Let f : R → R , where f ( x ) = x 2 + 1, find f –1 (–5), f –1 (26)

14. Let R be the set of all real number and f : R → R be function such that f ( x ) = sin x, x ∈ R and
g( x ) = x 2, x ∈ R . Then show gof = fog.

15. If g( x ) = ex and f ( x ) = x 2 then find ( fog ) x and (gof )x.

16. If f : R → R be given by:


 π  π
f ( x ) = sin 2 x + sin 2  x +  + cos x cos  x +  , ∀x ∈ R and
 3   3

 5
g : R → R be such that g   = 1
 4
Then, show that gof : R → R be a constant function.

1
17. If f : R → R where f ( x ) = x 2 + 2 and g : R → R where g( x ) = 1 – , then find
1– x
(i) fog (ii) gof
x
18. Show that f : R – {–1} → R – {1} given by f ( x ) = is invertible. Also find f –1 .
x +1

19. What do you mean by a function? Are y 2 = 4ax and x 2 = 4ay functions? Explain.

20. Defined the relation and function. What is the difference between a function and relation?

21. Defined the relation and function with examples.

22. Explain with example that every function is a relation but every relation is not a mapping.

23. Let the function f , g and h be defined by


(i) f ( x ) = x 2 where 0 ≤ x ≤ 2 (ii) g ( y ) = y 2 where 3 ≤ y ≤ 10
(iii) h (z ) = z 2 where z ∈ R , which of these functions are equal?

24. Consider the function f : R → R given by f ( x ) = x 3 + 1 . Prove that f is one-to-one and maps R onto R.

25. If f : N → N is defined by
2n if n is even
f (n) =  Show that f is one to one.
n if n is odd

26. Let A = {1, 2, 3} and B = {a, b, c, d}. In each case, state whether the given function is injective,
surjective, bijective
(i) f = {(1, a), (2, d ), (3, b)} (ii) g = {(1, a), (2, a), (3, d )}
(iii) h = {(1, a), (2, b)}
118 Discrete Mathematical Structures

27. Determine which of the following are one-to-one, which are onto and which are one-to-one onto:
(i) f :N→ N f (x) = x 2 + 2 (ii) f :N→ N f ( x ) = x (mod 3)
1, x is odd
(iii) f :N→ N f (x) = 
0, x is even

28. If f : R → R and g : R → R defined by


1
f ( x ) = x 3 − 4 x, g ( x ) = 2
, h (x) = x 4
x +1
Find the following composition function
(i) (goh) x (ii) (gog ) x (iii) (hogof ) x (iv) ( fogoh) x

29. Let f = {(1, − 1), (4, − 2), (9, − 3), (16, 4)} and g = {(− 1, − 2), (− 2, − 4), (− 3, − 6), (4, 8)} show that gof
is defined while fog is not defined. Also, find (gof ).
30. Composition of functions is commutative. Prove the statement or give counter example.
[U.P.T.U. (B.Tech.) 2009]

31. Define bijection mapping. Let h be a set of points in the co-ordinate diagram of E × F which is
function of E into F.
(i) If the horizontal line contains at most one point h, what type of function h?
(ii) If each horizontal line contains at least one point of h, what type of function is h?
[U.P.T.U. (B.Tech.) 2005]

32. Let Fx be the set of all one-to-one mapping from X onto X, where X = {1, 2, 3}. Find all the elements
of Fx and find the inverse of each element.
[U.P.T.U. (B.Tech.) 2007]

Answers

1. (i) (gof )x = 4 x 2 + 20 x + 26 (ii) ( fog )x = 2x 2 + 7

(iii) ( fof )x = 4 x + 15 (iv) ( ff )x = 4 x 2 + 20 x + 25

3. Domain in each case is R 5. [R – {1, 2}]

6. [D f = R –[–1, 1], R f = R –] – 1, 0] 7. [ –2]

11. (i) 1 (ii) –1 (iii) 0 12. f (0) = 0, f (2) = 5


3

13. f –1 (–5) = φ, f –1 (26) = ± 5 15. [ e2x , ex 2]

 –1 x  3x 2 – 4 x + 2 x2 + 2
16. f (x) = 17. (i) (ii)
 1 – x  (1 – x )2
x2 + 1

23. none of these function are equal.


Functions 119

26. (i) Injective (ii) not injective (iii) is not a function


27. (i) one-to-one, not onto (ii) neither (iii) neither

28. (i) ( x 8 + 1)−1 (ii) ( x 2 + 1)2 [1 + ( x + 1)2]

(iii) [( x 3 − 4 x )2 + 1]− 4 (iv) ( x 8 + 1)− 3 − 4 ( x 8 + 1)−1

29. {(1, − 2), (4, − 4), (9, − 6), (16, 8)}


31. (i) h is many-one mapping (ii) h is many-to-many mapping
x−b
32. f −1 ( x ) =
a

3.10 Recursively Defined Function [U.P.T.U. (B.Tech.) 2007]

It is the function in which the definition of function refers to itself. This definition must have the following
properties so that it may not be circular.
(i) There must be certain arguments called Base Values for which the function does not refer to itself.
(ii) Each time the function refers to itself, the argument of function must be closure to a base value.

3.11 Factorial Function [U.P.T.U. (B.Tech.) 2007]

Recursive definition of factorial function n ! can be defined as


If n = 0 then n ! = 0 ! = 1
If n > 0 then n ! = n . (n − 1)!

This definition is recursive since it refers to itself, 0 is the base value of the function

3 ! = 3. 2 ! K Level (1)

2 ! = 2.1 ! K Level (2)

1 ! = 1 . 0 ! K Level (3)

0!=1K Level (4)

So depth of level = 4 in the case

3.12 Recursive Definition of Fibonacci Function


This function is defined as if n = 0 or n = 1 then Fn = n if n > 1, then Fn = Fn − 2 + Fn −1

Here, base values are 0 and 1. Function is 0, 1, 1, 2, 3, 5, 8, 13, K

It is called Fibonacci Function. Here value of Fn are defined in terms of smaller values of n that are closer
to the base values 0 and 1.
120 Discrete Mathematical Structures

Illustration: Let x and y are positive integer and function f is defined as


0 if x < y
f ( x, y ) = 
 f ( x − y, y ) + 1 if y ≤ x
Then f (7, 8) = 0 as 7 < 8
and f (20, 5) = f (20 − 5, 5) + 1 (as y < x )
= f (15, 5) + 1 = [ f (15 − 5, 5) + 1] + 1 = f (10, 5) + 2 = [ f (10 − 5, 5) + 1] + 2
= f (5, 5) + 3 = [ f (0, 5) + 1] + 3 = f (0, 5) + 4 (x < y ) = 0 + 4 = 4
Illustration: We defined the function in factorial notation as
0 if n = 1

f (n) =    n 
 f    ! + 1 if n > 1
  2 
  n  n
where f    ! means greatest integer ≤
  2  2
  23    11 
Then f (23) = f    ! + 1 = f (11) + 1 =  f   ! + 1 + 1 = f (5) + 2
 2     2  
  5 
= f   ! + 1 + 2 = f (2) + 3 = f (1) + 4 = 0 + 4 = 4
  2 
Example 67: Give a recursive or inductive definition of function an where a is non-zero real number and n is
non-negative integer.

Solution: an = 1 if n = 0 or a° = 1 and an +1 = a . an or an = a an −1

3.13 Ackermann’s Function


It can be defined as
(i) If m = 0, then A (m, n) = n + 1
(ii) If m ≠ 0, but n = 0, then A (m, n) = A (m − 1, 1)
(iii) If m ≠ 0 and n ≠ 0, then A (m, n) = A (m − 1), A (m, n − 1)
A (m, n) is explicitly given only when m = 0

Example 68: Evaluate (i ) A (2, 0) (ii ) A (2, 1)


Solution: (i) A (2, 0) = A (1, 1)
A (1, 1) = ( A (1 − 1, A (1, 1 − 1)) = A (0, A (1, 0))
A (1, 0) = A (0, 1)
A (0, 1) = 1 + 1 = 2
Use backward process i.e.
A (1, 0) = A (0, 1) = 2
A (1, 1) = ( A (0, A (1, 0)) = A (0, 2) = 2 + 1 = 3
A (2, 0) = A (1, 1) = 3
Functions 121

(ii) A (2, 1) = (( A (1, A (2, 0)) = A (1, 3) by (i)


= A (0, A (1, 2))
A (1, 2) = A (0, A (1, 1)) = A (0, 3) = 4
A (2, 1) = A (0, 4) = 5

3.14 Primitive Recursive Function


Primitive recursive functions are functions that can be generated by what is called Primitive Recursion
from a set of initial function, employing method, similar to the ones used in the definition of addition and
multiplication. The basic building block of primitive recursive expressions are the constant 0, a set of
variables x1 , x 2 K and a set of function symbols. The formation rules for the primitive recursive expression
can be formulated as
(i) 0 is expression
(ii) Every variable is an expression
(iii) If f is function symbol of arbitrary d and t1 , t 2 K t d are expressions, then f (t1 , t 2, t 3 K t d ) is an
expression.

3.14.1 Initial Function


(i) Zero Function: Z ( x ) = 0 ∀ x ∈ N and Z : N → N
(ii) Successor Function: S ( x ) = x + 1 ∀ x ∈ N and S : N → N
(iii) Projection Function: U in ( x1 , x 2, x 3 , K x n ) = x i for n − tuples ( x1 , x 2, x 3 , K x n ) for 1 ≤ i ≤ n and
x i ∈ N , i = 1, 2 K n. So, U in is also called generalized identity function.

In particular S (4) = 4 + 1, Z (8) = 0


U13 (3, 5, 8) = 3, U 23 (3, 5, 8) = 5, U 33 (3, 5, 8) = 8

All these functions are initial functions. The initial function provides an infinite set of functions from
which other function can be built up by using the following strategies.
(i) Composition: If f is an n-ary function and g1 , g 2, K g n are k-ary functions, then f (g1 , g 2, g 3 , K g n )
is a k-ary function, where f (g1 , g 2, K g n )( x1 , x 2, K x k ) = f (g1 ( x1 , x 2, K x k ) K g n ( x1 , x 2 K x k ).
(ii) Primitive Recursion: Let g : N n → N and h : N n + 2 → N be functions. We can say that
f : N n +1 → N is defined from g and h by primitive recursion if f satisfies the conditions

f ( x1 , x 2, K x n, 0) = g ( x1 , x 2, K x n )
and f ( x1 , x 2, K x n, y + 1) = h ( x1 , x 2 K x n, y, f ( x1 , x 2 K x n, y )]
where y is inductive variable. Hence,

A function f is said to be Primitive Recursive if it can be obtained from the initial functions by a finite
number of operations of composition and recursion.
122 Discrete Mathematical Structures

Example 69: Show that the function f ( x ) = k, where k is constant, is primitive recursive function.
[U.P.T.U. (B.Tech.) 2005]

Solution: Let k = 0, then


f (x) = 0 = f (y )
Otherwise f ( x + 1) = k = f ( x ) = U 22 ( x1 f ( x ))
So, f ( x ) is primitive recursive function.

Example 70: Show that the function f < x, y > = x − y is partial recursive. [U.P.T.U. (B.Tech.) 2003]

Solution: Since every element of a domain maps to at most one element of the co-domain. Now, the
predecessor function.
p(0) = 0 , p ( y + 1) = y = U12
which is recursive function and from it the subtraction is
f ( x, 0) = x = U11 , f ( x, y + 1) = p ( f ( x, y )) = g ( x, y, f ( x, y ))
where g ( x, y, z ) = p (z ) = U 33
⇒ f is partial recursive function

Example 71: Show that additive is primitive recursive.


Solution: We define addition as
x + 0 = 0, x + ( y + 1) = ( x + y ) + 1 ∀ x, y ∈ N
we define, f ( x, y ) = x + y such that
f ( x, y + 1) = x + y + 1 = ( x + y ) + 1 = f ( x, y ) + 1 = S ( f ( x, y )
Also f ( x, 0) = x
∴ f ( x, 0) = x = ∪11 ( x )
f ( x, y + 1) = S (∪ 33 ( x, y, f ( x, y ))
Hence, we find ∪ 11, ∪ 3
3 comes from primitive recursion so f is primitive recursive.

Example 72: Show that multiplication (*) defined by


x ∗ 0 = 0, x ∗ ( y + 1) = x ∗ ( y + x )
is primitive recursive.
Solution: We define µ ( x, y ) to be x ∗ y, so that µ ( x, 0) = 0 = Z ( x )
µ ( x, y + 1) = µ ( x, y ) + 1 = f ( x, µ ( x, y ))
µ ( x, y + 1) = f {(∪ 33 ( x, y, µ ( x, y )), ∪13 ( x, y, µ ( x, y ))}
where f is additive function.
Example 73: Show that f ( x, y ) = x y is a primitive recursive function.
Solution: Here x ° = 1 for x ≠ 0 we put x ° = 0 for x = 0
Again x y +1 = x y ∗ x
Hence, f ( x, y ) = y x is define as
f ( x, 0) = 1
f ( x, y + 1) = x ∗ f ( x, y ) = ∪13 ( x, y, f ( x, y ) ∗ ∪ 33 ( x, y, f ( x, y ))
Therefore, f ( x, y ) is primitive recursive function.
Functions 123

Example 74: Consider a recursive function G from Z + to Z for all integer n ≥ 1

1 if n is 1

  n
g (n) = 1 + g   if n is even
 2

g (3n − 1) if n is odd and n > 1

Is g well defined? Justify.

Solution: Suppose g is a function. Then by definition of g


g (1) = 1
g (2) = 1 + g (1) = 1 + 1 = 2
g (3) = g (8) = 1 + g (4) = 1 + (1 + g (2)) = 1 + (1 + 2) = 4
g (4) = 1 + g (2) = 1 + 2 = 3
g (5) = g (14) = 1 = g (7 ) = 1 + g (20)
= 1 + (1 + g (10)) = 1 + 1 (1 + (1 + g (5))) = 3 + g (5)
∴ g (5) = 3 + g (5)
⇒ 3= 0
Hence, g is not well define.

Illustration: Let f1 ( x, y ) = x + y, f 2 ( x, y ) = 3x, f 3 ( x, y ) = xy and g ( x, y, z ) = x + y + z be function over


N. Then g ( f1 ( x, y ), f 2 ( x, y ), f 3 ( x, y )) = g ( x + y, 3x, xy )
= x + y + 3x + xy

This gives the composition of g with f1 , f 2, f 3 .

Example 75: Show that the proper subtraction is primitive recursive and hence prove that 5 − 3 = 2.
Solution: We have P (0) = 0
P ( y + 1) = y = ∪ 12 ( y, P ( y ))

which is recursive function and from it, the subtraction is f ( x, 0) = x = ∪11 ( x )

f ( x, y + 1) = P ( f ( x, y ) = g ( x, y, f ( x, y )
where g ( x, y, z ) = P (z ) = ∪ 33 ( x, y, z )

Hence, the proper subtraction function is a recursive function


Now, f (5, 3) = p f (5, 2) = p ( p f (5, 1)) = p ( p ( p (5, 1))) = p ( p (4) = p (3) = 2

Example 76: Show that the function x ! is primitive recursive, where 0 ! = 1 and n ! = n * (n − 1)!
Solution: Let f ( x ) = x, then
f (0) = 0 ! = 1 = S (0)
and f ( x + 1) = ( x + 1)!
= ( x + 1) ∗ x !
= ( x + 1) ∗ f ( x )
124 Discrete Mathematical Structures

= x ∗ f (x) + f (x)
= ∪12 ( x, f ( x )) ∗ ?

= ∪ 22 ( x, f ( x )) + ?

= ∪ 22 ( x, f ( x )
Since the sum (+ ) and product (*) are primitive recursive, f ( x ) is primitive recursive.

3.15 Growth of Functions


The growth of functions is often described using three important notations: the big-oh (o) the big omega
(Ω) and beg-theta (θ). They provide a special way to compare relative size of functions that is very useful in
the analysis of computer algorithm. It often happens that the time or memory space requirements for the
algorithm available to do a certain job differ from each other or such a grand scale that differences of just a
constant factor are completely over shadowed. The o-notations makes use of approximation that
highlights these large scale difference while ignoring differences of a constant factor and differences that
only occur for small set of input data.
‘‘Let f and g be function from the set of integers or the set of real numbers to the set of real numbers. Then f
of order g written as f ( x ) is o (g( x )) if there are constants C and K such that | f ( x )| ≤ C | g ( x )| whenever
x > K which is read as f ( x ) is big-oh of g ( x ).
Remark: To show f ( x ) is o (g ( x )) we have to find only one pair of constant C and K such that f ( x ) < Cg ( x )
if x > K . However a pair C , K that satisfies the definition is never unique. Moreover, if one such pair exists
there are infinitely many such pairs. A simple way to see this a note that if C , K is one such pair, any pair
C ′ , K ′ with C < C ′ and K < K ′ also satisfies the definition. Since f ( x ) < C ′ g ( x ) whenever x > K ′ > K .

Example 77: Use O-notation to express

| 3x 3 + 2x + 7| ≤ | 2| x 3|

for all real number x > 1


Solution: We take C = 12 and K = 1, the given statement translates to 2x 3 + 2x + 7 is o ( x 3 ).

Example 78: Use the definition of order to show that x 2 + 2x + 1 is 0 ( x 2 ) .

Solution: The function f and g referred to in the definition of o-notation are defined as follows. For all
real number x
f ( x ) = x 2 + 2x + 1 and g ( x ) = x 2
For all real number x > 1
| x 2 + 2x + 1| = x 2 + 2x + 1 as x 2 + 2x + 1 > 0 for x > 1
≤ x 2 + 2x 2 + x 2
≤ 4x2
≤ 4| x 2|
Therefore, | f ( x )| ≤ 4| g ( x )| for all x > 1
Let C = 4, K = 1
⇒ | f ( x )| ≤ C | g ( x )| ∀ x > K
Hence, x 2 + 2x + 1 is o ( x 2 ).
Functions 125

Exercise
@ Recursively Defined
1. Show that the proper subtraction is primitive recursive and hence prove that 5 − 3 = 2 .

2. Show that for any real number x > 1, 2x 4 + 4 x 3 + 5 ≤ 11 x 4 .

3. Use the definition of order to show that 5x 3 − 3x + 4 is o ( x 3 ) .

4. Show that 9 x 2 is o ( x 3 ). Is it true that x 3 is o (9 x 2 )?

5. Let f1 ( x, y ) = x + y, f 2 ( x, y ) = xy + y 2 and g ( x, y ) = xy be functions defined over N. Find the


compositions of g with f1 and f 2.

6. Let f ( x, y ) = 3x 2 + y, g1 , ( x, y, z ) = x + y + z and g 2 ( x, y, z ) = x − y − z be defined over N. Find the


composition of f with g1 and g 2.

1 if x = y
7. Consider the function f ( x, y ) =  show that this function is primitive function.
0 if x ≠ y

8. Compute A (3, 1), A (3, 2), A (2, 3) and A (3, 3).

9. Prove the following for the Ackermann function


(i) A (1, y ) = y + 2 (ii) A (2, y ) = 2y + 3

10. A function f : Z + → Z is defined by

1

f (n) =  f (n / 2) if n is even

1 + f (5n − 9) if n is odd and n > 1
show that f is not well defined.

11. Let x and y be two integers and suppose g ( x, y ) is defined recursively by


5 if x < y
g ( x, y ) = 
g ( x − y, y + 2) + x if x ≥ y
Find g (2, 7 ), g (5, 3), and g (15, 2)

12. Use the definition of o-notation, prove the followings:


(i) 6 x 2 + 5x is o ( x 2 ) (ii) 8 x 5 − 17 x 2 + 80 x − 24 is o ( x 5 )
2 2 2 2 3
(iii) 1 + 2 + 3 + . . . + x is o ( x )

13. Give big-oh estimates for the factorial function and the logarithm of the factorial function and the
logarithm of the factorial function where the factorial function an = n !is defined by n ! = 1, 2, 3, K n .
126 Discrete Mathematical Structures

14. What do you mean by recursively defined function? Give an example. [U.P.T.U. (M.C.A.) 2008]

15. Show that the function f ( x ) = k, where k is constant is primitive recursive. [U.P.T.U. (B.Tech.) 2005]

16. What is meant by a recursively defined function? Give the recursive definition of factorial
function. [U.P.T.U. (B.Tech.) 2002, 2006]

17. Let f : R → R is defined by f ( x ) = x 2 + 1. Find

(a) f −1 (5) (b) f −1 (10)

18. State whether the following functions are one-one


(a) To each person on the earth assign the number which corresponds to his age.
(b) To each country, assign the number of people living in the country.
(c) To each book written by only one author, assign to author.
(d) To each country having prime-number, assign to prime number.

Answers
5. ( x + y )( xy + y ) 6. 3 ( x + y + z )2 + x − y + z

8. 13, 17, 9, 37 11. 5, 10, 42

18. (a) not one-one (b) one-one


17. (a) (− 2, 2) (b) (–3, 3)
(c) not one-one (d) one-one

Objective Type Quesitons


Multiple Choice Questions
1. Let f : R → R be given by f ( x ) = − x 2 and g : R + → R + be given by g ( x ) = x , where R + is the set of
non-negative real numbers and R is the set of real numbers. What are fog and gof ?
[U.P.T.U. (M.C.A) 2008]
(a) x, − x (b) − x, x (c) not defined,− x (d) − x, not defined

2. Which of the following sets are equal? [U.P.T.U. (M.C.A.) 2007]


2 2
A = { x : x − 4 x + 3 = 0} B = { x : x − 3x + 2 = 0} C = { x : x ∈ N , x < 3}
D = { x : x ∈ N , x is odd, x < 5} E = {1, 2} F = {1, 2, 1}
G = {3, 1} H = {1, 1, 3}
3. Let A and B be two finite sets having m and n elements respectively. Then the total number of
mapping from A to B is [U.P.T.U. (M.C.A.) 2007]

(a) mn (b) 2mn (c) mn (d) nm


Functions 127

4. Total number of injective mappings from a set with m elements to a set with n elements, m < n is
n!
(a) mn (b) nm (c) (d) n!
(n − m)!

5. Let A be a set containing 10 distinct elements, then the total number of distinct functions from A
to A is
(a) 10 ! (b) 1010 (c) 210 (d) 210 − 1

6. The composite function fog of the maps f : R → R , f ( x ) = sin x, g : R → R , g ( x ) = x 2 is


sin x
(a) x 2 sin x (b) (sin x )2 (c) sin x 2 (d)
x
7. If f ( x ) = 2x then f (0), f (1), f (2) K are in

(a) A.P (b) G.P (c) H.P (d) none of these

8. The function f : A → B is a bijection iff


(a) co-domain of f = its range (b) range of f is A
(c) f ( x ) = f ( y ) ⇒ x = y ∀ x, y (d) none of these

9. The function f : Q → Q defined by f ( x ) = 3x + 5, x ∈ Q is


(a) not one-one (b) not onto
(c) one-one onto (d) none of these

10. Let X = {1, 2, 3}, Y = {a, b, c} then which of the following functions is a constant function f : X → Y
(a) f1 = {(1, a), (2, a), (3, a)} (b) f 2 = {(1, a), (2, a), (3, b)}
(c) f 3 = {(2, a), (3, b), (1, c)} (d) none of these

11. If f : R → R and f ( x ) = 3x − 7, then f −1 (14) is equal to

(a) 7 (b) 35
(c) 14 (d) none of these

State True or False


1. The composition function is commutative.

2. A one to-one-function is also known as surjective function .

3. The function f : N → N , f ( x ) = x 2 + 3x + 2 is one-one.

4. Let f : R → R be defined by f ( x ) = sin (3x + 2). Then f is invertible.

5. The function f : R → R , f ( x ) = cos x is neither one-one nor onto.

6. f :[ − π / 2, π / 2] → [ − 1, 1], f ( x ) = sin x is invertible.

7. f : N → N , f ( x ) = 3x + 1 is surjective.

8. Let f : A → B, g : B → A and gof = I A then g = f −1 .


128 Discrete Mathematical Structures

Fill in the Blank(s)


1. Min { x, – x} is ......... .

2. Max { x, – x} is ......... .

3. Solution set of |2x – 1| < 3 is .......... .

1 + x  1+ b 
4. If f ( x ) = ln   then f   is .......... .
1 − x  1 + ab

5. If A = {a, b} and B = {0, 1, 2} then number of functions defined from A to B is ......... .

6. h( x ) = log10 ( x − 4 + 6 − x ) is defined for ......... .

7. If f : R → R such that f ( x ) = cos x and g: R → R such that g( x ) = x 2 then ( fog )x is ......... .

8. If f ( x ) = x 2 + 5x + 9 then f –1 (3) will be ......... .

Answers
Multiple Choice Questions
1. (d) 2. B = C = E = F, A = D = G = H 3. (d) 4. (c) 5. (b)

6. (c) 7. (b) 8. (a) 9. (c) 10. (a) 11. (a)

State True or False


1. F 2. F 3. T 4. F 5. T

6. T 7. F 8. F

Fill in the Blank(s)


1. |x| 2. –|x| 3. { x : x ∈ R and – 1 < x < 2 4. f (a) + f (b)

5. 9 6. [ 4, 6] 7. x 2 cos x 2 8. {–2, – 3}

❏❏❏
Natural Numbers 129

4.1 Peano’s Axioms [U.P.T.U. (B.Tech.) 2004]

The most basic mathematical system is the set N (natural number) of positive integers. The positive integer
can be defined by a set of axioms, known as Peano’s Axioms.
P1 There exists a natural number 1 i.e. 1 ∈ N
P2 There exists an injective mapping f : N → N . If n ∈ N then f (n) = n + 1 Successor of n
P3 There exists no number n ∈ N such that f (n) = 1
P4 If A be any subset of N such that 1 ∈ A and n ∈ A
⇒ f (n) ∈ A, then A = N
Remark
1. Axiom P1 asserts that N is non-empty.
2. Axiom P2 asserts that f (m) = f (n) ⇒ m = n
3. Axiom P3 asserts that the natural number 1 is a non-successor
4. Axiom P4 leads to the important principle known as the Principle of Mathematical Induction

4.1.1 Basic Properties [U.P.T.U. (B.Tech.) 2004]

We denote the set of positive integers by N and set of integers by Z or I i.e.


N = {1, 2, 3, K }
Z = {. . . − 3, − 2, − 1, 0, 1, 2, 3 K } = I
The simple rules concerning addition and multiplication of these integers are given as
(i) Commutative laws for multiplication and addition:
a + b = b + a and ab = ba
(ii) Associative laws for multiplication and addition:
(a + b) + c = a + (b + c) and (ab) c = a (bc)
(iii) Distributive law: a (b + c) = ab + ac
(iv) Additive identity 0 and multiplicative identity 1
a + 0 = 0 + a = a and a . 1 = 1 . a = a
(v) Additive inverse of a is (− a): a + (− a) = (− a) + a = 0
130 Discrete Mathematical Structures

4.2 Mathematical Induction


4.2.1 Principle of Mathematical Induction [R.G.P.V. (B.E.) Bhopal 2002, 2007]

Let P (n) be a statement involving the natural number n. To prove that P (n) is true for all natural number
n ≥ a, we proceed as follows:

(i) Verify P (n) for n = a

(ii) Assume the result for n = k > a

(iii) Using result (i) and (ii), prove that P (k + 1) is true.


This is known as the First Principle of Mathematical Induction. If P (n) is true for n = 1 (i.e. for a = 1)
P (n) is true for all n ∈ N . Sometimes the above procedure will not work. Then we consider the alternative
principle called the Second Principle of Mathematical Induction, which is given as

(i) P (n) is true for n = a

(ii) Assume that P (n) for a ≤ n ≤ k

(iii) Prove P (n) for n = k + 1


Remark: The second principle of mathematical induction is useful to prove recurrence relation which
involves three successive terms e.g. statements of the type
p Tn +1 = q Tn + r Tn −1

Example 1: Prove by induction.


1
1 . 2. 3 + 2. 3. 4 + 3. 4 . 5 + K + n (n + 1)(n + 2) = n (n + 1)(n + 2)(n + 3) ∀ n ∈ N ...(1)
4

Solution: For n = 1
L.H.S. = 1 . 2. 3 = 6
1
R.H.S. = (1 . 2. 3. 4) = 6
4
So, L.H.S. = R.H.S.
∴ (1) is true for n = 1 ...(2)
Assume (1) is true for n = k
i.e. 1 . 2. 3 + 2. 3. 4 + 3. 4 . 5 + K + k (k + 1)(k + 2)
1
= k (k + 1)(k + 2)(k + 3) ...(3)
4
Natural Numbers 131

Now for n = k + 1
L.H.S. = 1 . 2. 3 + 2. 3. 4 + K + k (k + 1)(k + 2) + (k + 1)(k + 2)(k + 3)
1
= k (k + 1)(k + 2)(k + 3) + (k + 1)(k + 2)(k + 3) (using 3)
4
1
= (k + 1)(k + 2)(k + 3)(k + 4)
4
= R. H. S. for n = k + 1 ...(4)
Hence (1) is true for all n ∈ N .

Example 2: Prove by induction:


n (n + 1)
1 + 2+ 3+ 4 + K+ n = ∀ n ∈N ...(1)
2
[U.P.T.U. (M.C.A.) 2005]

Solution: For n = 1
L.H.S. of (1) = 1
n (n + 1) 1 . (1 + 1)
R.H.S. of (1) = = =1
2 2
So, L.H.S. = R.H.S.
∴ (1) is true for n = 1 ...(2)
Assume (1) is true for n = k
k (k + 1)
i.e. 1 + 2+ 3+ 4 + K+ k = ...(3)
2
Now for n = k + 1
L.H.S. = 1 + 2 + 3 + 4 + K + k + (k + 1)
= (1 + 2 + 3 + 4 + K + k ) + (k + 1)
k (k + 1)
= +k+1 (from (3))
2
k 2 + k + 2k + 2 k (k + 1) + 2 (k + 1) (k + 1)(k + 2)
= = =
2 2 2
= R.H.S. for n = k + 1 ...(4)
Hence, (1) is true for all values of n ∈ N

Example 3: Show that


n (n + 1)(2n + 1)
12 + 22 + K + n2 = , n ≥1 ...(1)
6
by mathematical induction. [U.P.T.U. (B.Tech.) 2003; U.P.T.U. (M.C.A.) 2005]

Solution: For n = 1
L.H.S. of (1) = (1)2 = 1
n (n + 1)(2n + 1) 1 (1 + 1)(2 + 1) 6
R.H.S. of (2) = = = =1
6 6 6
So, L.H.S. = R.H.S.
∴ (1) is true for n = 1
132 Discrete Mathematical Structures

Assume (1) is true for n = k ...(2)


k (k + 1)(2k + 1)
i.e. 12 + 22 + 33 + K + k 2 = ...(3)
6
Now for n = k + 1
L.H.S. of (1) = {12 + 22 + 32 + K + k 2} + (k + 1)2
k (k + 1)(2k + 1)
= + (k + 1)2 from (3)
6
(k + 1)
= {k (2k + 1) + 6 (k + 1)}
6
(k + 1){2k 2 + 7 k + 6} (k + 1)(k + 2)(2k + 3)
= =
6 6
= R.H.S. for n = k + 1 ...(4)
Hence (1) is true for all values of n ∈ N

Example 4: Show that 2n > n3 for n ≥ 10 ...(1)

Solution: For n = 10
L.H.S. of (1) = 210 = 1024

R.H.S. of (1) = n3 = (10)3 = 1000

Hence 1024 > 1000


So, L.H.S. of (1) = R.H.S. of (1) ...(2)
Hence (1) is true for n = 10
Assume that 2k > k 3 for all k ≥ 10 ...(3)
Now for n=k+1
3
 1
L.H.S. of (1) = 2k +1 = 2. 2k > 1 +  2k
 10
3
 1
≥ 1 +  2k
 k
3
 1
> 1 +  k 3 = (k + 1)3 = R.H.S. ...(4)
 k
Hence (1) is true for all values of n ∈ N

Example 5: To show that any positive integer n greater than or equal to 2 is either a prime or a product of
primes. [U.P.T.U. (B.Tech.) 2004; U.P.T.U. (M.C.A.) 2008]

Solution: For n = 2, since 2 is prime, the statement is true. Assume that the statement is true for any
integer n,
2≤ n ≤ k
For the integer n = k + 1, if k + 1 is a prime, then the statement is true. If k + 1 is not a prime, then k + 1
cannot be written as pq, where p ≤ k and q ≤ k . According to the induction hypothesis, p is either a prime or
a product of primes. Also, q is either a prime or a product of primes. Consequently, pq is a product of
primes.
Natural Numbers 133

Example 6: Prove that for any integer n > 1


1 1 1 1
+ + +K+ ≥ n ...(1)
1 2 3 n
[U.P.T.U. (B.Tech.) 2009; P.T.U. (B.E.) Punjab 2004, 2007; Delhi (B.E.) 2008; Rohtak (M.C.A.) 2009]
Solution: For n = 1
L.H.S. of (1) = 1
R.H.S. of (1) = 1
So, L.H.S. = R.H.S. ...(2)
Assume the result for n = k
1 1 1
i.e. 1+ + +K+ ≥ k ...(3)
2 3 k
For, n=k+1
1 1 1 1
L.H.S. = 1 + + +K+ +
2 3 k k+1
1
≥ k+ [using (3)]
k+1
1
≥ k+
(k + 1) + k
= k+ k+1− k = k+1
i.e. the result is true for n = k + 1
Hence by induction, the result is true V n ∈ N .

Example 7: Show that n3 + 2n is divisible by 3 for n ≥ 1.


[U.P.T.U. (B.Tech.) 2005; Nagpur (B.E.) 2008; Rohtak (M.C.A.) 2007]
or

Prove that for all n ≥ 1, n3 + 2n is a multiple of 3 . [U.P.T.U. (B.Tech.) 2007; M.K.U. (B.E.) 2004, 2007, 2009]

Solution: For n = 1, we have P (n) = n3 + 2n

⇒ P (1) = (1)3 + 2(1) = 3


∴ 3 is divisible by 3
Hence P (n) is true for n = 1
Assume P (n) is true for n = k
i.e. P (k ) = k 3 + 2k is divisible by 3.
For, n=k+1
P (k + 1) = (k + 1)3 + 2 (k + 1)

= k 3 + 3k 2 + 3k + 1 + 2k + 2

= k 3 + 3k 2 + 5k + 3

= k 3 + 2k + 3k + 3k 2 + 3

= (k 3 + 2k ) + 3 (k 2 + k + 1)
134 Discrete Mathematical Structures

Since (k 3 + 2k ) is divisible by 3 also 3 (k 2 + k + 1) being a multiple of 3 is divisible by 3


∴ As each term is divisible by 3.
Hence, n3 + 2n is divisible by 3 is true for all n ∈ N .

Example 8: Prove by mathematical induction:

n4 − 4n2 is divisible by 3 for all n ≥ 2 . [Pune (B.E.) 2005, 2009]

Solution: Let P (n) = n4 − 4n2 divisible by 3 for all n ≥ 2 ...(1)

For n = 2 ⇒ P (2) = 24 − 4 . (22 ) = 16 − 16 = 0

is divisible by 3.
∴ P (2) is true
Assume P (k ) is true for n = k
∴ P (k ) = k 4 − 4k 2 is divisible by 3

Now, for n = k + 1
P (k + 1) = (k + 1)4 − 4 (k + 1)2

= k 4 + 4k 3 + 6k 2 + 4k + 1 − 4k 2 − 8k − 4

= k 4 + 4k 3 + 2k 2 − 4k − 3

= k 4 − 4k 2 + 4k 3 + 6k 2 − 4k − 3

= k 4 − 4k 2 + 3 (2k 2 − 1) + 4k 3 − 4k

= k 4 − 4k 2 + 3 (2k 2 − 1) + 4k (k 2 − 1)

= (k 4 − 4k 2 ) + 3 (2k 2 − 1) + 4k (k − 1)(k + 1)
14243 14243 14442444 3
(i ) (ii) (iii)

(i) is divisible by 3 because of induction hypothesis

(ii) is divisible by 3 because of it is multiple of 3

(iii) is divisible by 3 because it has a factor which is product of 3 consecutive number.


∴ P (n) is divisible by 3 V n ≥ 2.

Example 9: Prove by induction, n2 + n is even number for all natural number n.


[P.T.U. (B.E.) Punjab 2005, 2009]

Solution: Let P (n) = n2 + n is even number V n ≥ N ...(1)


2
For n = 1, P (1) = (1) + 1 = 2 = even number

∴ P (1) is true
Assume n = k i.e. P (k ) = k 2 + k is even number ...(2)

Now, for n = k + 1 then


Natural Numbers 135

P (k + 1) = (k + 1)2 + (k + 1)

= k 2 + 2k + 1 + k + 1

= (k 2 + k ) + 2 (k + 1) ...(3)
1424 3 1424 3
(i) (ii )

(i) is even number from (2)

(ii) is even number because it is multiple of 2


Hence all terms in R.H.S. of (3) is even then P (k + 1) is even
Hence, P (k + 1) is true
∴ P (n) = n2 + n is true for all n when n is natural number.

Example 10: Show that n (n2 − 1) is divisible by 24, where n is any odd positive integer.

Solution: Let P (n) = n (n2 − 1) is divisible by 24 V n ∈ N ...(1)

For n = 1. ⇒ P (1) = 0 which is divisible by 24.


∴ P (1) is true.
Assume P (k )is true i.e. P (k ) = k (k 2 − 1)is divisible by 24 ...(2)

where k is odd positive integer.


Now, for n=k+ 2

P (k + 2) = (k + 2)[(k + 2)2 − 1]

= (k + 2){k 2 + 4k + 3}

= (k + 2)(k + 3)(k + 1)

= k (k + 1)(k + 3) + 2 (k + 1)(k + 3)

= k (k + 1)(k − 1 + 4) + 2 (k + 1)(k + 3)

= k (k + 1)(k − 1) + 4k (k + 1) + 2 (k + 1)(k + 3)

= k (k 2 − 1) + 4k (k + 1) + 2 (k + 1)(k + 3)

= k (k 2 − 1) + 2k [ 2 (k + 1) + (k + 3)]

= k (k 2 − 1) + 2 (k + 1)(3k + 3)

= k (k 2 − 1) + 6(k + 1)2
Now, 6 (k + 1)2 is divisible by 24 for all odd n and k (k 2 − 1) is divisible by 24 by induction hypothesis.

Since entire term is divisible by 24 then P (k + 2) is true


∴ P (n) is true for n is any odd positive integer.

Example 11: Prove that 8n − 3n is a multiple of 5 by mathematical induction (n ≥ 1) .


136 Discrete Mathematical Structures

Solution: Let P (n) = 8n − 3n is multiple of 5 ...(1)


1 1
For n = 1 then P (1) = 8 − 3 = 5 is a multiple of 5.
Assume P (n) is true for n = k i.e.
P (k ) = 8k − 3k is multiple of 5 ...(2)
k +1 k +1 k k
For n = k + 1 ⇒ P (k + 1) = 8 −3 =8 .8−3 .3
k k
= 8 . 8 − 3 (8 − 5)
= 8 (8k − 3k ) + 5. 3k
From (2) (8k − 3k ) is multiple of 5 and 5. 3k is also a multiple of 5
∴ P (k + 1) is true
∴ P (n) is true V n ≥ 1

Example 12: Show that n4 < 10n for n ≥ 1 ...(1)

Solution: For n = 1
L.H.S. of (1) = (1)4 = 1
R.H.S. of (1) = 101 = 10
∴ 1 < 10
⇒ n4 < 10n
L.H.S. = R.H.S. ...(2)
4 k
Assume the result for n = k i.e. k < 10 ...(3)
is true.
For n = k + 1 then show (k + 1)4 < 10( k +1 )
L.H.S. = (k + 1)4 = k 4 + 4k 3 + 6k 2 + 4k + 1 from (3)
< 10k + 4k 3 + 6k 2 + 4k + 1
< 10k + 10 [Q 4k 3 + 6k 2 + 4k + 1 ≥ 10]
(k + 1)4 < 10k +1 for k ≥ 1
Hence result is true for all n ≥ 1
∴ n4 < 10n V n ≥ 1

Example 13: Prove that


1 1 1 1 n
+ + +K+ = ...(1)
1 . 4 4 .7 7 .10 (3n − 2)(3n + 1) 3n + 1

Solution: For n = 1
1 1
L.H.S. = =
1 .4 4
1 1
R.H.S. = =
3+ 1 4

So, L.H.S. = R.H.S.


Natural Numbers 137

∴ (1) is true for n = 1 ...(2)


Assume (1) is true for n = k
1 1 1 1 k
i.e. + + +K+ = ...(3)
1 . 4 4 .7 7 .10 (3k − 2)(3k + 1) 3k + 1

Now for n = k + 1
1 1 1 1
L.H.S. = + +K+ +
1 . 4 4 .7 (3k − 2)(3k + 1) [ 3 (k + 1) − 2][ 3 (k + 1) + 1]
k 1
= +
3k + 1 [ 3 (k + 1) − 2][ 3 (k + 1) + 1]
k 1
= +
3k + 1 (3k + 1)(3k + 4)
k
= = R. H. S. ...(4)
3k + 4

Hence (1) is true for n ∈ N

Example 14: 7 2n + 23 n − 3 . 3n −1 is divisible by 25 V n ∈ N [R.G.P.V. (B.E.) Bhopal 2002, 2005, 2009]

Solution: Let P (n) = 7 2n + 23 n − 3 . 3n −1 ...(1)

We have to show that 25 divides P (n)


i.e. P (n) = 25. q for some q ∈ Z

Now P (n) = 49n + 8( n −1 ) . 3( n −1 )

= 49n + 24n −1

P (1) = 49 + 1 = 50 = 25 × 2, so 25 divides P (1)


Now assume that 25 divides P (k )
i.e. 49k + 24k −1 = 25m for some m ∈ Z ...(2)

Now P (k + 1) = 49( k +1 ) + 24k

= 49 . 49k + 24k

= 49 (25m − 24k −1 ) + 24k (from 2)


k −1 k
= 49 . 25m − 49 . 24 + 24

= 49 . 25m − 24k −1 (49 − 24)

= 25[ 49 m − 24k −1 ]

= 25. q where q = 49m − 24k −1

∴ 25 divides P (k ) ⇒ 25 divides P (k + 1) ...(3)


From (1), (2) and (3) we find that 25 divides P (n) V n ∈ N .

Example 15: To prove by mathematical induction


138 Discrete Mathematical Structures

(1 + x )n > 1 + nx for n ≥ 2, x > − 1, x ≠ 0 ...(1)

Solution: For n = 2
L.H.S. = (1 + x )2 = 1 + 2x + x 2 > 1 + 2x ...(2)

Since x ≠ 0, x > − 1 ⇒ 1 + x > 0 so (1 + x )n > 0 and as x ≠ 0 so x 2 > 0

Now, assume the result for n = k, k > 2


Then (1 + x )k > 1 + kx ...(3)

For n = k + 1 we have
(1 + x )k +1 = (1 + x )(1 + x )k from (3)

> (1 + x )(1 + kx )
= 1 + (k + 1) x + kx 2

> 1 + (k + 1) x as kx 2 > 0 ...(4)

From (2), (3) and (4) we find that


(1 + x )n > 1 + nx V n ≥ 2, x ≠ − 1, x ≠ 0

n
 n + 1
Example 16: | n <   for n > 1, n ∈ N
 2 

for n = 2
2
 3 9
L.H.S. = 2, R.H.S. =   =
 2 4
So L.H.S. < R.H.S.
∴ The results is true for n = 2 ...(1)
Assume the result for n = k i.e.
k
 k + 1
| k <   ...(2)
2 
For n = k + 1, we have to show
k +1
 k + 2
|(k + 1) <  
2 
k
 k + 1
|(k + 1)= (k + 1) | k < (k + 1)   ...(3)
2 

(k + 1)( k + 1 )
= (from 2)
2k
∴ It is sufficient to prove
k +1
(k + 1)( k +1 )  k + 2
< 
2k  2 
Natural Numbers 139
k +1 k +1
 k + 2  1 
i.e.   = 1 + 
 k + 1  k + 1
2
 1   1 
= 1 + (k + 1)   + (k + 1)C 2   +K
 k + 1  k + 1

= 2 + some positive real number


>2 ...(4)
Hence, from (3) and (4), we find
k +1
 k + 2
|(k + 1) <  
2 
i.e. result is true for n = k + 1
n
 n + 1
Hence | n <   V n≥2
2 

Example 17: Prove that

1 − an +1
1 + a + a2 + a3 + K + an = when n ≥ 0
1−a

1 − an +1
Solution: Let P (n) = 1 + a + a2 + K + an = ...(1)
1−a
For n = 0, P (0) = 1 ⇒ P (0) is true
For n = 1,L.H.S. of (1) = 1 + a
1 − a2 (1 − a)(1 + a)
R.H.S. of (1) = = =1 + a
1−a (1 − a)
L.H.S. = R.H.S.
⇒ P (1) is true
Assume n = k i.e. P (k ) is true

1 − ak +1
i.e. P (k ) = 1 + a + a2 + K + ak = ...(2)
1−a

Now to show (1) is true for n = k + 1


P (k + 1) = 1 + a + a2 + K + ak +1

= (1 + a + a2 + K + ak ) + ak +1

1 − ak +1
= + ak +1 [from (2)]
1−a

1 − ak +1 + ak +1 − ak + 2 1 − ak + 2
= =
(1 − a) (1 − a)

Hence P (n) is true for n ≥ 0.


140 Discrete Mathematical Structures

Example 18: Using mathematical induction, prove that


n (n + 1)
12 − 22 + 32 − 42 + K + (− 1)n −1 n2 = (− 1)n −1 ...(1)
2
Solution: For n = 1
L.H.S. of (1) = 1
1 (1 + 1)
R.H.S. of (1) = (− 1)1 −1 =1
2
L.H.S. = R.H.S.
Hence (1) is true for n = 1
Assume for n = k (1) is true i.e.
k (k + 1)
12 − 22 + 32 − 42 + K + (− 1)k −1 k 2 = (− 1)k −1 is true ...(2)
2
Now, we have to prove that (1) is true for n = k + 1
i.e. 12 − 22 + 32 − 42 + K + (− 1)( k +1 ) −1 (k + 1)2
(k + 1)(k + 2)
= (− 1)( k +1 ) −1
2
L.H.S. of (1) = 12 − 22 + 32 − 42 + K + (− 1)k −1 k 2 + (− 1)k (k + 1)2

(− 1)k −1 k (k + 1)
= + (− 1)k (k + 1)2 [from (2)]
2
1
= (− 1)
k −1
(k 2 + k ) + 2 (− 1)k (k 2 + 2k + 1)
 
2   
1
= (− 1)k (k + 1)(k + 2) = R. H. S. of (1)
2
Hence (1) is true for n = k + 1 ∴ (1) is true for all n ≥ 1.

Example 19: If A be the set with n elements, show that power set of A has 2n elements.
Solution: Let P (n) be the statement that a set with n elements has exactly 2n subsets. i.e. P (n) = 2n

For n = 1 then P (1) = 21 = 2 i.e. if A = {a1 } then its only subsets is φ and {a1 }. Hence P (1) is true

Assume that P (k ) is true i.e. the set A = {a1 , a2, K ak } has 2k subsets.

We have to show that it is true for n = k + 1


i.e. P (k + 1) is true if A = {a1 , a2, K ak , ak +1 } then it has 2k +1 subsets

Now the subset of A containing (k + 1) elements can be divided into two categories.
(i) Subsets not containing (2k + 1) and this number is 2k by induction hypothesis.
(ii) Subsets containing ak +1 which can be represented as {ak +1 }, {a1 , ak +1 }, {a2, ak + 2}, K {a1 , a2, . . . ak +1 }
and this number is 2k .
Thus the number of subsets of A = The number of subsets not containing ak +1 + The number of subsets
containing ak +1 = 2k + 2k = 2k +1 which is P (k + 1)

Hence P (n) is true for all positive value of n.


Natural Numbers 141

Example 20: If x and y denote any pair of real numbers for which 0 < x < y, prove by induction method
0 < x n < y n for all natural numbers n.

Solution: Let P (n) be the given statement.


For n = 1, 0 < x < y which is true for P (1)
Assume that P (k ) is true i.e.
0 < xk < yk
We want to show that P (k + 1) is true.
Now, we have 0 < xk < yk ...(1)
Multiplying both sides by y, we find
0 < yx k < y k +1 ...(2)
k
Again multiplying both sides of x of 0 < x < y, we find
0 < x k +1 < yx k ...(3)
From (2) and (3), we find
0 < x k +1 < yx k < y k +1
Thus P (k + 1) is true. Hence P (n) is true for all n.

Example 21: If an = an −1 + an − 2 V n > 3 and a1 = a2 = 1 . Prove by strong mathematical induction 2n −1 an = n


(mod 5) V n > 1 .
Solution: Let P (n) = 2n −1 an = n (mod 5)
For n = 1 ⇒ P (1) = 2° a1 = 1 (mod 5) ⇒ a1 = 1 (mod 5) which is true since a1 = 1
Assume P (n) is true for all n = 1, 2, 3 K k
We have to show that P (n) is true for n = k + 1
i.e. 2k +1 −1 ak +1 = (k + 1)(mod 5)

But ak +1 = ak + ak −1
or 2 ak +1 = 2k ak + 2k ak −1
k

= 2 (2k −1 ak ) + 22 (2k − 2 ak −1 )

By hypothesis, we have 2k −1 ak = k (mod 5) and 2k − 2 ak −1 = (k − 1) mod (5)

Therefore, 2k +1 −1 ak +1 = 2k ak +1 = 2k ak + 2k ak −1 = 2 . k + 22 (k − 1)(mod 5 )

= (k + 1) mod (5)
Thus, P (k + 1) is true. Hence P (n) is true for all n

Example 22: The nth fibonacci number denoted by Fn is related by the reccurance relation
Fn+1 = Fn + Fn−1 , n ≥ 2 and F1 = F2 = 1

Use strong mathematical induction prove the inequality


n −1
(1 + 5 
Fn <   , n = 1, 2, 3 K
 2 
142 Discrete Mathematical Structures

Solution: Let P (n) be the statement that the inequality is true for all positive integer n.
For n = 1, P (1) is true, since 1 ≤ 1
In this case it is also useful to verify P (2) directly i.e.
(1 + 5)
1≤ 
 2 
which holds true because 5 is greater than 1.
We assume that P (n) is true for all n = 1, 2, 3 K k
(1 + 5)
i.e. Fk ≤ t k −1 , Fk −1 ≤ t k − 2 and let t = and we observe that t is one of the solution of the
2
equation
x 2 − x − 1 = 0, we have t 2 − t − 1 = 0

i.e. t2 =t + 1
we want to prove that P (k + 1) is true. Now
Fk +1 = Fk + Fk −1 ≤ t k −1 + t k − 2

= t k − 2 (t + 1)

= tk−2 t2 = tk
which shows that P (k + 1) is true
Hence, by mathematical induction P (n) is true for n ≥ 2 .

Example 23: Using mathematical induction find a general formula on the basis of observations of the
following statements:
13 = 1
23 = 3 + 5
33 = 7 + 9 + 11
43 = 13 + 15 + 17 + 19
[P.T.U. (B.E.) Punjab 2004; Delhi (B.E.) 2007; R.G.P.V. (B.E.) Bhopal 2001, 2009;
Kurukshetra (B.E.) 2007; M.K.U. (B.E.) 2005, 2009]
3
Solution: Let P (1) = 1 = 1

P (2) = 23 = 3 + 5 = (22 − 2 + 1) + {(22 − 2 + 1) + 2}

P (3) = 33 = (7 + 9 + 1)

= (32 − 3 + 1) + {(32 − 3 + 1) + 2} + {(32 − 3 + 1) + 4}

Hence by induction
P (n) = n3 = (n2 − n + 1) + {(n2 − n + 1 + 2}

+ {(n2 − n + 1) + 4} + K + {(n2 − n + 1) + (2n − 2)}

(Total terms are n)


2 2 2 2
Q P (n) = (n − n + 1) + (n − n + 3) + (n − n + 5) + K + (n + n − 1) .
Natural Numbers 143

Example 24: Prove that the sum of the cubes of three successive natural numbers is divisible by 9.
Solution: We have 13 + 23 + 33 = 36 divisible by 9, so the statement is true if the first of three successive
numbers is 1.
Assume that the sum
m3 + (m + 1)3 + (m + 2)3 , where m is some natural number is divisible by 9
i.e. m3 + (m + 1)3 + (m + 2)3 = 9k ...(1)
where k is a positive integer
Again the sum
(m + 1)3 + (m + 2)3 + (m + 3)3 = (m + 1)3 + (m + 2)3 + m3 + 9m2 + 27 m + 27

= m3 + (m + 1)3 + (m + 2)3 + 9 (m2 + 3m + 3)

= 9k + 9 (m2 + 3m + 3) (from 1)
2
= 9 (k + m + 3m + 3) which is divisible by 9
Therefore, by mathematical induction the statement is proved.

Example 25: (i ) an − bn is divisible by a − b where n is a positive integer.

(ii) Prove that x n − y n is divisible by x + y when n is even.

Solution: (i) Let P (n) = an − bn


For n = 1, P (n) = a − b and a − b is divisible by a − b
∴ P (n) is divisible by a − b for n = 1
Let for some natural number n = k, P (k ) is divisible by a − b
ak − bk
∴ = some expression in b = λ (Let)
a−b
or ak − bk = λ (a − b) or ak = bk + λ (a − b) ...(1)
k +1 k +1 k k
Now, P (k + 1) = a −b =a a−b . b

= a [ bk + λ (a − b)] − bk . b [from 1]
k k
= b (a − b) + aλ (a − b) = (a − b)(b + aλ )
⇒ P (k + 1) is also divisible by a − b
Thus, P (k + 1) is divisible by a − b if P (k ) if divisible by (a − b). Therefore by mathematical induction an − bn
is divisible by (a − b) for all positive integers n.

(ii) Let P (n) = x n − y n

For n = 2 ⇒ P (2) = x 2 − y 2 = ( x + y )( x − y )

⇒ P (2) is divisible by ( x + y )

Let x k − y k = ( x + y ) f ( x, y ) ...(1)

where f ( x, y ) is polynomial of degree (m − 1) in x and y and k is an even integer


144 Discrete Mathematical Structures

Again x k + 2 − y k + 2 = x k + 2 − x k y 2 + x k y 2 − y k + 2 = x k ( x 2 − y 2) + y 2 ( x k − y k )
= ( x + y ) [ x k ( x − y ) + y 2 f ( x, y )] [from (1)]

⇒ x k + 2 − y k + 2 is divisible by ( x + y )

⇒ x n − y n is divisible by ( x + y ) when n is any even integer.

Example 26: Use induction to show that


1 + 3 + 5 + K + (2n − 1) = n2 ...(1)

Solution: For n = 1
L.H.S. of (1) = 1, R.H.S. of (1) = (1)2 = 1
L.H.S. = R.H.S.
∴ (1) is true for n = 1 ...(2)
Assume (1) is true for n = k
i.e. 1 + 3 + 5 + K + (2k − 1) = k 2 ...(3)
Now for n = k + 1
L.H.S. of (1) = 1 + 3 + 5 + K + (2k − 1) + (2k + 1)
= k 2 + 2k + 1 (from 3)

= (k + 1)2 = R. H. S of (1) ...(4)


Hence (1) is true for all n ∈ N .

Example 27: Prove that


1 .1 ! + 2. 2 ! + 3. 3 ! + K + n . n ! = (n + 1)! − 1 ...(1)
where n is positive integers
Solution: For n = 1
L.H.S. of (1) = 1 .1 ! = 1 .1 = 1
R.H.S. of (1) = (1 + 1)! − 1 = 2 ! − 1 = 2 − 1 = 1
L.H.S. = R.H.S.
∴ (1) is true for n = k ...(2)
Assume (1) is true for n = k
i.e. 1 .1 ! + 2. 2 ! + 3. 3 ! + K + k . k ! = (k + 1)! − 1 ...(3)

Now for n = k + 1
L.H.S. of (1) = 1 .1 ! + 2. 2 ! + K + k . k ! + (k + 1). (k + 1)!
= {(k + 1)! − 1} + (k + 1). (k + 1)!
= (k + 1)![1 + (k + 1)] − 1
= (k + 2)(k + 1)! − 1
= (k + 2)! − 1
= R. H. S. ...(4)
Hence (1) is true for all n ∈ N .
Natural Numbers 145

Exercise
@ Mathematical Induction
1. Show that 13 + 23 + 33 + K + n3 = (1 + 2 + 3 + K + n)3

12 22 n2 n (n + 1)
2. Show that + +K+ =
1 . 3 3. 5 (2n − 1)(2n + 1) 2 (2n + 1)
1 1 1 1 n
3. Show that + + +K+ =
1 . 2 2. 3 3. 4 n (n + 1) (n + 1)
1 1 1 n
4. Show that + +K+ =
1 . 3 3. 5 (2n − 1)(2n + 1) 2n + 1
5. It is know that for any positive integer n ≥ 2
1 1 1
+ +K+ − A > 0 , where A is constant. How large can A be?
n+1 n+ 2 2n

6. Show that, n4 − 4n2 is divisible by 3 for all n ≥ 2 by induction.

7. Show that, n4 + n3 − 2n2 is always even.

8. Prove that 5n − 4n − 1 is divisible by 16 V n ≥ 1 .

(2n)! 1
9. Prove that ≤ for all positive integer n.
22n (n !)2 (3n + 1)
1
2

10. Show that


(i) 2n × 2n − 1 is divisible by 3 for all n ≥ 1
(ii) n3 + 2n is divisible by 3 for all n ≥ 1
(iii) 11n + 2 + 122n +1 is divisible by 133; n ∈ N

11. Show by mathematical induction


8
(i) 8 + 88 + 888 + K + 8 . 8 . 8 K 8 (n digits) = (10n +1 − 9n − 10); n ∈ N
81
(ii) 2.7 n + 3. 5n − 5 is divisible by 24; n ∈ N
1 1 1 1 n
(iii) + + +K+ = , V n ∈N
3.7 7 .11 11 .15 (4n − 1)(4n + 3) 3 (4n + 3)
n −1
n (n − 1)(n + 1)
(iv) ∑ i (i + 1) =
2
i =1 [U.P.T.U. (B.Tech.) 2002]
146 Discrete Mathematical Structures

12. For what natural numbers n the inequality

2n > 2n + 1 is valid? [Ans. V n ≥ 3]

13. Prove by mathematical induction

1 1 1 13
+ +K+ > , n > 1, V n ∈ N
n+1 n+ 2 2n 24

14. Prove that V n ≥ 1, n3 + 2 n is multiple of 3. [U.P.T.U. (B.Tech.) 2007-08]

15. Use induction to show that n ! ≥ 2n −1 for n ≥ 1

n
 2 2n
16. Show that 1 +  ≥ 1 + V n ≥ 1.
 3 3

17. Using mathematical induction show that for all positive integer n

(i) n3 − 4n + 6 is divisible by 3. (ii) 3n3 + 3n2 + n is divisible by 6

[U.P.T.U. (B.Tech.) 2002]


2
(iii) n (n + 5) is an integral multiple of 6 (iv) n (n + 1)(n + 2) is divisible by 6

(v) 3. 52n +1 + 23 n +1 is divisible by 17 (vi) 7 n − 2n is divisible by 5

(vii) 3n > n3 for each integer n ≥ 4 (viii) Show that 4n > 3n for all n ≥ 0

18. Use induction to show that if r ≠ 1

a (rn +1 − 1)
a + ar + ar2 + K + arn = for n = 0, 1, 2, K
r −1

19. Prove that 52n − 1 is divisible by 24 where n is positive’ integer. [R.G.P.V. (B.E.) Bhopal 2003, 2005]

20. Prove that


7
(i) 7 + 77 + 777 + K + 777 K 7 = [10n +1 − 9n − 10] V n ∈ N
1424 3 81

n
(ii) ∑ r . ncr = n . 2n −1
r=0

(iii) 2 0 + 21 + 2 2 + K + 2 n = 2 n +1 − 1 V non-negative integer of n [U.P.T.U. (B.Tech.) 2003]


Natural Numbers 147

4.3 Variant of Induction


Let P (n) be the statement involving natural number n. If

(i) P (n) is true for n = n0 and

(ii) P (n) is true for n = k + 1 assuming that the statement is true for n0 ≤ n ≤ k then the statement is true
for all n ≥ n0
Remark: This is powerful form of mathematical induction because in order to prove that the statement is
true for n = k + 1. We are allowed to make a stronger (ii)

4.4 Proof Methods or Notion of Proof


In this section we study different types of proof. Direct proof, Indirect proof, Proof by counter example and
Proof by cases.

4.4.1 Direct Proof [U.P.T.U. (M.C.A.) 2008]

We consider that P is true, and from the available information the conclusion q is shown to be true by valid
reference. In this methods of proof we construct a chain of statements P , P1 , P2, K Pn K q where P is either a
hypothesis of the theorem or an axiom and each to the implications p ⇒ p1 ,p1 ⇒ p2 K pn ⇒ q is either an
axiom or is implied by the implication preceding it.

Example 28: If a and b are odd integer, then a + b is an even integer. [U.P.T.U. (M.C.A.) 2008]

Solution: Direct Proof :


An odd integer is of the form 2k + 1, where k is some integer given that a and b are even integers, then there
exist two integer m and n such that
a = 2m + 1, b = 2n + 1
Then a + b = (2m + 1) + (2n + 1) = 2m + 2n + 2 = 2 (m + n) + 2 = 2 {(m + n + 1)}
But m + n + 1 is an integer, therefore a + b is an even integer.

Example 29: Prove that product of two odd integers is an odd integer. [U.P.T.U. (B.Tech.) 2005]

Solution: Direct Proof :

Let a and b be two odd integers, then there exist two integers m and n such that
a = 2m + 1, b = 2n + 1
∴ ab = (2m + 1)(2n + 1) = 4 mn + 2m + 2n + 1 = 2 {2 (mn) + (m + n)} + 1 which is odd.

Example 30: Prove that for every positive integer n, n3 + n is even if n is even. [U.P.T.U. (B.Tech.) 2003]

Solution: Direct Proof :


We have n3 + n = (2k )3 + (2k ) = 8k 3 + 2k = 2 {4k 3 + k} which is even [Let n = 2k]
148 Discrete Mathematical Structures

Example 31: If x is even integer then x 2 is an even integer.


Solution: Direct Proof:
Let p : x is an even integer
q : x 2 is an even integer

Consider the hypothesis p, if x is an even integer then by definition of even integer x = 2k for some integer k
∴ x 2 = (2k )2 or x 2 = 4k 2 is clearly divisible by 2
Therefore x 2 is an even integer. Thus p → q.

Example 32: If a number such that x 2 − 7 x + 12 = 0, then show that x = 3, x = 4 by direct proof.

Solution: We have x 2 − 7 x + 12 = 0

⇒ x 2 − 7 x + 12 = ( x − 3)( x − 4) = 0

⇒ ( x − 3) = 0 or ( x − 4) = 0
∴ x − 3 = 0 ⇒ x = 3, x − 4 = 0 ⇒ x = 4
∴ x = 3 or x = 4.

Example 33: Prove that if | x| > | y| then x 2 > y 2 by direct method.

Solution: Since | x| > | y| then | x|2 > | y|2 But | x|2 = x 2,| y|2 = y 2

Hence x2 > y2

4.5 Method of Contraposition


4.5.1 Indirect Proof [U.P.T.U. (M.C.A.) 2008]

This method of proof is very useful and a powerful at all levels of the subject mathematics. Indirect method
follows from the tautology
( p ⇔ q) ⇔ ((− q) ⇒ (~ p))
This states that the implication p ⇒ q is equivalent to ~ q ⇒ ~ p. To prove p ⇒ q indirectly, we assume that q
is false and then show that p is false.
More Generally, to prove the validity of an argument with premises p1 , p2, K pn and conclusion q by
indirect method, we consider second argument with premises
~ q, p1 , p2, K pi −1 , pi +1 , K pn
and conclusion ~ pi and prove the validity of this second argument.

Example 34: For any integer n > 2, prove that n prime ⇒ n odd. [U.P.T.U. (M.C.A.) 2008]

Solution: Let p : n prime


q : n odd
Then ~ q : n even
~ p : n is not prime
Natural Numbers 149

If n is even number greater then 2, then n = 2 k for some integer k > 1. Then n is divisible by 2 and n ≠ 2,
therefore n cannot be prime. Thus we have ~ q ⇒ ~ p
i.e. if n is any number bigger than 2, then n cannot be prime.

Example 35: If x 2 is an even integer, then x is an even integer.


Solution: Let p : x 2 is an even integer

q : x is an even integer
let ~ q is true, then x cannot be even integer, therefore x must be odd, x is of the form
x = 2 k + 1 for some integer k
∴ x = 2k + 1 ⇒ x 2 = (2k + 1)2

⇒ x 2 = 4k 2 + 2k + 1

= 2 (2k 2 + k ) + 1

Let 2k 2 + k = n, ⇒ x 2 = 2n + 1 is odd

Thus we have ~q ⇒~ p
Hence, by contraposition x is even.

Example 36: Show that the following argument is a valid argument.


p
p ∧ q→ r ∨ s
q
~s
r

Solution: We will take as premises for the indirect proof all given premises except ~ s and the negation of
conclusion ~ r i.e. we shall show that the following argument is valid.
p
p ∧ q→ r ∨ s
q
~r
s
Now p
 premises
q 
p ∧ q a conclusion because p ∧ q → q ∧ p is always a tautology.
Now, p ∧ q a valid conclusion
q ∧ p a premise
r ∨ s a valid conclusion by modus ponens
~ r a premise
s a valid conclusion because (r ∨ s ) ∧ ~ r → s is tautology.
150 Discrete Mathematical Structures

Example 37: Prove by indirect method p → (q ∧ r), (q ∨ s ) → t and p ∨ s ⇒ t .


Step 1: ~t is an additional premise
Step 2: 1 p → (q ∧ r) premise
2 (q ∨ s ) → t premise
3 ~t additional premise
{1} 4 p→ q premise
{1} 5 p→ r
{2} 6 s→t premise
{3, 6} 7 ~s ~ q, p → q ⇒ (~ p)

8 p∨ s premise
{8} 9 s
10 s (~ s ) = F

Example 38: Using indirect method show that


p → q , q → r, ~( p ∧ r), p ∨ r ⇒ r
Solution: Step 1: (~ r) is an additional premise

1 q→ r premise

2 ~r premise

{1, 2} 3 ~q p → q, ~ q ⇒ ~ q

4 p→ q premise

{3, 4} 5 ~p p → q, ~ q ⇒ ~ q

6 p∨ r premise

{5, 6} 7 r

8 r ∧ (~ r) = f

contradiction, hence premise.

Example 39: If an integer is divisible by 10 then it is divisible by 2 . If an integer is divisible by 2, then it is


divisible by 3. Prove that an integer divisible by 10 is divisible by 3.
Solution: D10 ( x ): x is divisible by 10
D 2 ( x ): x is divisible by 2
D 3 ( x ): x is divisible by 3
V x [ D10 ( x ) → D 2 ( x )]
V x [ D 2 ( x ) → D 3 ( x )]
V x [ D10 ( x ) → D 3 ( x )]
Natural Numbers 151

1 V x [ D10 ( x ) → D 2 ( x )] premise

2 D12 (b) → D 2 (b) ∪S

3 V x [ D 2 ( x ) → D 3 ( x )] premise

4 D 2 (b) → D 3 (b) ∪S

{2, 4} 5 D10 (b) → D 3 (b) P → Q, Q → R ⇒ P → R

6 V x [ D10 ( x ) → D 3 ( x )] conclusion

4.6 Proof by Contradiction


In this method of proof, we assume the opposite of what we are trying to prove and get logical
contradiction. Hence our assumption must have been false. Therefore what we were original required to
prove must be true.

Example 40: Show that 2 is not rational number. [U.P.T.U. (B.Tech.) 2004]

p
Solution: Let us consider 2 is rational. Then we can find integers such that = 2
q

where p and q have no common factor after cancelling the common factors squaring on both sides

p2
=2
q2

⇒ p2 = 2q2

⇒ p2 is even

⇒ pis even
⇒ p = 2 k for some integer k

⇒ (2k )2 = 2q2

⇒ 4k 2 = 2q2

⇒ q2 = 2k 2

⇒ q is even
∴ p and q have common factor of 2
which is contradiction to the statement that p and q have no common factors. Thus 2 is irrational.

Example 41: Suppose that the integers 1, 2, 3, 4 K 10 are randomly positioned around a circular wheel.
Show that sum of same set of 3 consecutively positioned numbers is at least 15.
Solution: (Proof by Contradiction)
Let ai = the number of position i on the wheel.
152 Discrete Mathematical Structures

Then we have to prove

a1 + a2 + a3 ≥ 15
a + a + a ≥ 15
 2 3 4
M M M

a4 + a5 + a6 ≥ 15
 ...(1)
M M M
a + a + a ≥ 15
7 8 9
M M M
a + a + a ≥ 15
 10 1 2

where a1 + a2 + a3 + K + a10 = 1 + 2 + 3 + 4 + K + 10

Let us consider the given conclusion is false. i.e.

a1 + a2 + a3 < 15
a + a + a < 15
 2 3 4

 3
a + a 4
+ a5
< 15
M M M M

a10 + a1 + a2 < 15

We can write these equalities as

a1 + a2 + a3 ≤ 14
a2 + a3 + a4 ≤ 14
M M M M
a10 + a1 + a2 ≤ 14

Adding we get

3 (a1 + a2 + a3 + K + a10 ) ≤ 10 × 14

⇒ 3 × (1 + 2 + 3 + K + 10) ≤ 140

10 (10 + 1)  n (n + 1)
⇒ 3. ≤ 140 Σ n = 
2  2 

⇒ 3 × 5 × 11 ≤ 140

⇒ 165 ≤ 140 which is contradiction

Hence given statement (1) is true.


Natural Numbers 153

4.7 Proof by Counter-Example


If a statement claims that a property hold for all objects of a certain type, then to prove it, we must use
steps that are valid for all objects of that type. To disprove such a statement, we need only show one
counter example. Such a proof is called a proof by counter-example.

Example 42: Prove or disprove the statement. If x and y are real number
( x 2 = y 2) ⇔ ( x = y ) [U.P.T.U. (B.Tech.) 2004]

Solution: − 3, 3 are real numbers and


(− 3)2 = (3)2 but − 3 ≠ 3.

Hence, the result is false and implication is false.

Example 43: Prove that the statement ‘‘if n is an integer, then n2 − n + 41 is prime number’’ is false.
[U.P.T.U. (M.C.A.) 2005]
2 2
Solution: If n = 41 then n − n + 41 = (41) which is not prime. Hence the statement is false.

4.8 Proof by Cases


In this section we discuss rules of inference. The rules of inference will be given in terms of statement
formula. We define consistency.

4.8.1 Consistent
A collection of statements is consistent if the statement can all be true simultaneously.

A set of formulas H1 , H 2, H 3 , K H n is said to be consistent if their conjunction

H1 ∧ H 2 ∧ H 3 K ∧ H n

has the truth value T for some assignment of the truth values to the atomic variables appearing in
H1 , H 2, H 3 , K H n. And a set of formulae H1 , H 2, H 3 K H n is said to be inconsistent if their conjunction

H1 ∧ H 2 ∧ H 3 K ∧ H n ⇒ S ∧ (~ S ) (a contradiction)

where S is any formula.

We use notion of inconsistency in the method of proof called proof by contradiction (or indirect
proof). We now begin our discussion by setting the following two rules of inference.

Rule P: A premise may be introduced at any point in the derivation.

Rule T : A formula S may be introduced in a derivation if S is Tautologically implied by anyone or more of


true preceding formula in the derivation.
154 Discrete Mathematical Structures

4.8.2 Table for the Rule of Inference


I1 : P ∧ Q ⇒ P (Simplification)
I 2: P ∧ Q ⇒ Q (Simplification)
I 3 : P ⇒ P ∨ Q (Addition)
I 4 : Q ⇒ P ∨ Q (Addition)
I 5: ~ P ⇒ P → Q
I6: Q ⇒ P → Q
I7 : ~(P → Q ) ⇒ P
I 8 : ~(P → Q ) ⇒ ~ Q
I 9 : P, Q ⇒ P ∧ Q
I10 : p ~ P , P ∨ Q ⇒ Q (Disjunction syllogism)
I11 : P , P → Q ⇒ Q (Modus powers)
I12: ~ Q , P → Q ⇒ ~ P (Modus Tollens)
I13 : P → Q , Q → R ⇒ P → R
I14 : P ∨ Q , P → R , Q → R ⇒ R (Dilemma)

Equivalence
E1 : ~(~ p) ⇔ P
E 2: P ∧ Q ⇔ Q ∧ P
E 3: P ∨ Q ⇔ Q ∨ P
E 4 : (P ∨ Q ) ∨ R ⇔ P ∨ (Q ∨ R )
E 5: (P ∧ Q ) ∧ R ⇔ P ∧ (Q ∧ R )
E 6 : P ∧ (Q ∨ R ) ⇔ (P ∧ Q ) ∨ (P ∧ R ) (Distributive laws)
E7 : P ∨ (Q ∧ R ) ⇔ (P ∨ Q ) ∧ (P ∨ R ) (Distributive laws)
E 8 : ~(P ∧ Q ) ⇔ (~ P ) ∨ (~ Q )
E 9 : ~(P ∨ Q ) ⇔ ~ P ∧ (~ Q )
E10 : P ∨ P ⇔ P
E11 : P ∧ P ⇔ P
E12: R ∨ (P ∧ (~ P )) ⇔ R
E13 : R ∧ (P ∨ (~ P )) ⇔ R
E14 : R ∨ (P ∨ (~ P )) ⇔ T
E15: R ∧ (P ∧ (~ P )) ⇔ F
E16 : P → Q ⇔ (~ P ∨ Q )
E17 : ~(P → Q ) ⇔ P ∧ (~ Q )
E18 : P → Q ⇔ ~ Q → ~ P
E19 : P → (Q → R ) ⇔ (P ∧ Q ) → R
E 20 : ~(P → Q) ⇔ P → (~ Q )
← ←
Natural Numbers 155

Example 44: Show that (P →  Q ), R ∨ S, S →  Q , P → Q ⇔  P are in consistent. [U.P.T.U. (B.Tech.) 2009]

Solution

1 P Assumed

2 P→Q Rule P

3 Q (1) and (2)

4 S → Q P

5 Q → S P→Q → Q →  P

6 S (3), (5)

7 R∨S P

8 R → S P→Q →  P ∨ Q

9 S→ R P→Q → Q →  P

10 R (6), (9)

11 R → Q P

12 Q (10), (11)

13 Q ∧ Q (3), (12)

Inconsistent

Example 45: Prove  Q , P → Q ⇒  P [U.P.T.U. (B.Tech.) 2005]

Solution: 1 P→Q P

2 Q →  P T, (1)

3 Q P

4 P T, (2), (3)

Example 46: Show that  P follows logically form  (P ∧  Q ),  Q ∨ P ,  R

Solution: 1  (P ∧  Q ) P

2 P ∨Q ∴  (P ∧ Q ) ⇔  P ∨  Q

3 P→Q ∴ P → Q ⇔ P ∨Q

4 Q ∨ R P

5 Q→R

6 P→R (3), (5)

7 R P

8 P  Q, P → Q ⇒  P
156 Discrete Mathematical Structures

Exercise
@ Methods of Proof
1. Give a direct proof that if a and b are odd integers then a + b is even.
2. Prove by direct method
If x and y are rational numbers than x + y is rational.
3. Prove the using direct method
(i) Sum of two even integers is an even integer.
(ii) Sum of an even integer and an odd integer is an odd integer.
(iii) Product of an even integer and an odd integer is an even integer.

4. Prove by using Direct Method: If an integer a is such that (a − 2) is divisible by 3, then a2 − 1 is


divisible by 3. [Rohtak (B.E.) 2006; Nagpur (B.E.) 2005]

5. Prove that 3 is not a rational number (Prove by Contradiction). [U.P.T.U. (M.C.A.) 2004]

6. Prove that 5 is not a rational number. [U.P.T.U. (B.Tech.) 2008]

7. If a real number x is such that | x| > 5, then x 2 > 25 (give the proof by cases).

8. Prove by using contra positive method. If x 2 is an odd integer, then x is an odd integer.
[U.P.T.U. (M.C.A.) 2004]

9. Disprove the proposition (by counter-example) for every integer x there is an integer y where
y 2 = x. [M.K.U. (B.E.) 2004, 2007]

10. Find counter example if a > b then a2 > b2. [Delhi (B.E.) 2008]

11. Check the validity of the following arguments

(i ) p → q′ (ii) p (iii) p
r′ → q′ q q
p → r′ ~ p→ r p ∧ q→ r ∨ q
q→ ~r p ∧ q→ r ∧ q
~r r

[Ans. (i) Valid (ii) Valid (iii) Valid ]


12. Show that the following argument is a fallancy

p→ q
~p
~q

13. State and prove Peano‘s Axiom. Also show how its minimal property forms the basis for
mathematical induction? [U.P.T.U. (B.Tech.) 2005]
14. Prove using contrapositive that if x 2 − 4 < 0, then − 2 < x < 2 . [P.T.U. (B.E.) Punjab 2007]
Natural Numbers 157

Objective Type Quesitons


Multiple Choice Questions
1. Set F = {2, 3, 5, K } of odd natural numbers is closed under the operation of
(a) addition (b) multiplication (c) division (d) subtraction

2. The number log 2 7 is

(a) an integer (b) a rational number


(c) an irrational number (d) a prime number

3. e is
(a) natural number (b) rational number
(c) irrational number (d) integer

4. The value of 12 + 22 + 32 + K + n2 is
n(n + 1) n(n – 1) n(n + 1)(n + 1)
(a) (b) (c) (d) none of these
2 2 6

5. The value of (1 + x )n > . . . . . . . . . .

(a) 1+ n x (b) 1 + xn (c) xn (d) none of these

State True or False


1. Between any two rational numbers, there exists an infinite number of irrational numbers.

2. The set E = {2, 4, 6 K } is closed under operation of division.

3. Set N of natural numbers is closed under the operation of subtraction but not under the operation of
division.

4. If a, b, c ∈ N , then a < b ⇒ a + b < a + c.

5. Cancellation laws in N, for both additive and multiplicative operation hold good.

6. 32n − 1 is divisible by 8 V n ∈ N

1 1 1 1 n
7. + + +K+ = , V n ∈ N.
1 . 2 2. 3 3. 4 n (n + 1) n + 1
158 Discrete Mathematical Structures

Fill in the Blank(s)


1. Let x be a non-zero rational number and xy an irrational then y is .......... .
2. Solution set of the equation x 2 ≤ 25, x ∈ 2 is .......... .

3. If a and b are add integers, then a+b is an .......... . [U.P.T.U. (M.C.A.) 2008]

4. The product of two odd integers is an .......... . [U.P.T.U. (B.Tech.) 2005]

5. n distinct straights lines drawn in a plane through a point divide the plane into .......... parts.
6. Suppose x, y, u, v are four real numbers such that x + y = u + v and x 2 + y 2 = u 2 + v 2 then
x n + y n = . . . . . . . . . . V n ∈ N.

Answers
Multiple Choice Questions
1. (b) 2. (c) 3. (d) 4. (c) 5. (a)

State True or False


1. T 2. F 3. F 4. T 5. T 6. T 7. T

Fill in the Blank(s)


1. irrational 2. {0, ± 1, ± 2, ± 3, ± 4, ± 5} 3. even integer
4. odd integer 5. 2n 6. 2n

❑❑❑
Unit-2

C hapter
5. : Algebraic Str uctures
Algebraic Structures 161

5.1 Binary Operation on a Set


Let G be a non-empty set. Then G × G = {(a, b): a ∈ G, b ∈ G} If o : G × G → G then o is said to be a binary
operation on the set G. Then image of the ordered pair (a, b) under the function o is denoted by aob. Often
we use symbols +, ×, . , o, ∗ , ⊕, ∪, ∩, ∧, ∨ etc. to denote binary operations on a set.
Thus ‘ + ’ will be a binary operation on G iff
a + b ∈ G V a, b ∈ G and a + b is unique
Similarly ‘ ∗ ’ will be a binary operation on G iff
a ∗ b ∈ G V a, b ∈ G and a ∗ b is unique
A binary operation on a set G is sometimes also called a Binary Composition in the set G. If ‘ ∗ ’ is a binary
composition in G , then a ∗ b ∈ G V a, b ∈ G. Therefore G is closed with respect to the composition denoted
by ‘ ∗ ’.

Illustrations:
1. Addition ‘ + ’ is a binary operation on the set N of natural numbers. The sum of two natural
number is also a natural numbers. Therefore N is closed with respect to addition, i.e. a + b ∈ N V
a, b ∈ N . This operation of addition is binary over the sets I, Q , R and C also.
2. The usual operation of Subtraction ‘–’ is a binary operation over the sets I, Q , R , and C but it is
not binary in N because 5–8 = −3 ∈
/ N whereas 5 ∈ N, 8 ∈ N. Thus N is not closed with respect to
subtraction.
3. Let A be the set of all (n × n) matrices over the field R of real numbers. The operation of addition
and Multiplications of matrices in A are binary over A because the sum and product of two (n × n)
matrices in again a matrix of order (n × n).

Illustration:
Let ‘ o’ be a binary operation on the set R of real number defined by the rule
a o b = a + 2b V a, b ∈ R , then
(a o b)oc = (a + 2b)oc = (a + 2b) + 2c
and a o (b o c) = a o (b + 2c) = a + 2(b + 2c) = a + 2b + 4c
Thus (a, o b)o c =/ a o(b o c) .
Hence above rule is not Associative in R
162 Discrete Mathematical Structures

5.2 Algebraic Structure [M.K.U. (B.E.) 2002, 2005, 2009; P.T.U. (B.E.) Punjab 2004]

A non-empty set G equipped with one or more binary operations is called on algebraic structure.

Let symbols ∗ , + , . , o , ⊕, ∪, ∩, ∨, ∧ etc. denote binary operations on a set G. Then (G, ∗ ), (G, ⊕ ),
(G, ∗ , o, ∨, ∧ ) etc. are algebraic structure. (N , + ), (I, + ), (I, –), (R , + ), (R , + , . ) are all algebraic structures
addition (+) and multiplication (• ) are both binary operation on the set R of real numbers. Therefore
(R , + , . ) is on algebraic structures, equipped with two operation.

5.2.1 Semi-Group
[R.G.P.V. (B.E.) Bhopal, U.P.T.U. (B.Tech.) 2008; M.K.U. (M.C.A.) 2004, 2008, M.K.U. (B.E.) 2007, 2009]

Let G be a non-empty set and ∗ be a binary operation on G. (G, ∗ ) is said to be semi group if the operations is
∗ is associative.
OR
(G, ∗ ) is a semi group, if
(i) x ∗ y ∈ G for all x, y in G, and (ii) ( x ∗ y ) ∗ z = x ∗ ( y ∗ z ) for all x, y, z ∈ G

5.2.2 Identity Element


Let ∗ be a binary operation on a non-empty set G. An element e ∈ G is said to be an identity element for the
operation ∗, if
a ∗ e = e ∗ a = a V a ∈G
It may be observed that a semi group (G, ∗ )need not have an identity element with respect to the operation ∗.

5.2.3 Monoid [U.P.T.U. (B.Tech.) 2008]

A semigroup (M, ∗) with an identity element with respect to the operation ∗ is called monoid.
OR
An algebraic system (M, ∗) is called a monoid, if
(i) M is closed with respect to ∗ i.e. if x, y ∈ M , then x ∗ y ∈ M .
(ii) ∗ is an associative operation i.e. for any x, y, z ∈ M ,
x ∗ ( y ∗ z ) = ( x ∗ y ) ∗ z.
(iii) Existence of identity element i.e. there exists a element e ∈ M such that

e ∗ x = x ∗ e = x for any x ∈ M .

Illustration : Let S be any non-empty set. Consider the power set P(S) together with the operation ∪ of union
of two sets, then ( P (S ), ∪ ) is a monoid with empty φ as identity element.
Algebraic Structures 163

Illustration: Let M = {0, 1, 2, 3. . . n − 1}, Let + n and x n denote the operation of addition modulo n and
multiplication modulo n respectively. Then (M , + n ) and (M , × n ) both are monoids. 0 and 1 are the identity
elements with respect to the operations + n and × n respectively.

Example 1: Let ({a, b}, ∗ ) be semi group where a ∗ a = b show that


[R.G.T.U. (B.E.) Bhopal 2005, 2006; R.G.T.U. (B.E.) Bhopal 2005, 2007; U.P.T.U. (B.Tech.) 2005]
(i) a∗b = b ∗ a (ii) b∗b = b

Solution: Given that a ∗ a = b ...(1)


(i) a ∗ b = a ∗ (a ∗ a) [using (i)]
= (a ∗ a) ∗ a [by associative law]
= b∗a [using (1)]
a∗b = b∗a ...(2)
(ii) Since ({a, b}, ∗) is a semi group, it must be closed with respect to the operation ∗.
We are given that a ∗ a = b so a ∗ b must be equal to a
a∗b = b ∗ a ⇒ b∗a = a
Hence b∗b = b [Q a ∗ b = a]
The composition table is
∗ a b
a b a
b a b

Example 2: Let (A, ∗) be a semi group. Furthermore, for every a and b in A, if a ≠ b, then a ∗ b ≠ b ∗ a.
(i) Show that for every a ∈ A , a ∗ a = a.
(ii) Show that for every a, b ∈ A , a ∗ b ∗ a = a. [R.G.P.V. (B.E.) Bhopal 2004; U.P.T.U. (B.Tech.) 2007]
(iii) Show that for every a, b, c ∈ A.
a ∗ b ∗ c = a ∗ c.
Solution: By tautology we know that p ⇒ q ≡ ~ q
⇒ ~ p, where q and p are propositions.

∴ a ≠ b ⇒a∗b ≠ b∗a ≡ a∗b = b∗a ⇒ a = b ...(1)

(i) By closure property, for any a ∈ A, a ∗ a ∈ A


Again, by associative law, we have
a ∗ (a ∗ a) = (a ∗ a) ∗ a)
⇒ a∗a = a [by (1)]
∴ a ∗ a = a whenever a ≠ b ⇒ a ∗ b ≠ b ∗ a
(ii) For any a, b ∈ A, we have
a ∗ (a ∗ b ∗ a) = (a ∗ a) ∗ (b ∗ a)
= a∗ (b∗ a) [by (i) ] ...(2)
Also (a ∗ b ∗ a) ∗ a = a ∗ (b ∗ a ∗ a)
164 Discrete Mathematical Structures

= a ∗[ b∗ (a ∗ a)]
= a ∗ (b ∗ a)[Q a ∗ a=a] ...(3)
From (2) and (3), we have
a∗ (a∗ b∗ a) = (a∗ b∗ a)∗ a
∴ a∗ b∗ a = a . [by (1)] ...(4)
(iii) For any a, b, c ∈ A, we have
a ∗ b, c ∈ A and a, b ∗ c ∈ A [by closure property]
⇒ (a ∗ b) ∗ c ∈ A and a ∗ (b ∗ c) ∈ A [by closure property]
⇒ (a ∗ b) ∗ c = a ∗ (b ∗ c) [by associativity]
⇒ (a ∗ b) ∗ c = a ∗ (b ∗ c) = a∗ b∗ c∗ ∈ A
⇒ (a ∗ c) ∗ (a ∗ b ∗ c) = (a ∗ c) ∗[ a ∗ (b ∗ c) = [(a ∗ c)) ∗ a] ∗ (b ∗ c) [by associativity]
= (a ∗ c ∗ a) ∗ (b ∗ c) [by associativity]
= a ∗ (b ∗ c) [using (4)]
= a ∗[ b ∗ (c ∗ a ∗ c)] [using (4)]
= a ∗[(b ∗ c)] ∗ (a ∗ c) [by associativity law]
= [ a ∗ (b ∗ c)] ∗ (a ∗ c) [by associativity law]
= (a ∗ b ∗ c) ∗ (a ∗ c).
∴ a ∗ b ∗ c = a ∗ c.

Example 3: Prove that (A,+) is a semi-group where A be the set of all positives even integers and + be the
ordinary addition operation. [R.G.P.V.) (B.E.) Bhopal 2006]

Solution: Here A = {2, 4, 6. . . }. We observe that:


(i) Since sum of any two positive even integers is a positive even integers, it follows that
a, b ∈ A ⇒ a + b ∈ A V a, b ∈ A.
Thus, + is a binary operation on A.
(ii) For any a, b, c ∈ A, we have
(a + b) + c = a + (b + c)
Thus + operation is associative on A. Hence ( A, + ) is a semi group.

5.3 Group [R.G.P.V. (B.E.) Bhopal 2006; 2009; U.P.T.U. (B.Tech.) 2006, 2007; Rohtak (B.E.) 2007, 2009]

An algebraic structure (G, ∗ ) where G is a non-empty set and ‘ ∗ ’ is a binary operation defined on G, is called
a group if the binary operation ∗ satisfies the following postulates (group axioms):

(1) Closure Property: If a and b belong to G to then a * b also belongs to G, i.e.,


a ∈ G, b ∈ G ⇒ a ∗ b ∈ G V a, b ∈ G.

(2) Associativity: The binary operation ∗ is associative i.e., if a, b, c. are the elements of G then
(a ∗ b) ∗ c = a ∗ (b ∗ c) V a, b, c ∈ G
Algebraic Structures 165

(3) Existence of Identity: There exists an element e in G such that e ∗ a = a = a ∗ e V a ∈ G. The


element e is called the identity.
If a ∗ e = a V a ∈ G then e is the right identity and when e ∗ a = a then e is the left identity in G.

(4) Existence of Inverse: For each element a ∈ G , there exists an element of G called the inverse
of a and denoted by a–1 such that
a–1 ∗ a = e = a ∗ a–1 , where e is the identity element for ∗.

5.3.1 Abelian Group or Commutative Group


A Group (G, ∗ ) is said to be abelian or commutative if in addition to four group axioms the following
postulate is also satisfied.

5. Commutativity: The binary operation “ ∗ ” in commutative in G i.e.


a ∗ b = b ∗ a V a, b ∈ G
The algebraic structure (G, ∗ ) satisfying postulates 2 to 5 is called on abelian group in the honour of
great mathematician Niels Abel. Thus for an abelian group, we have
a+ b=b+ a [additive operation]
a⋅ b = b⋅ a [multiplicative operation]
A abelian group under addition is sometimes called module.
A group which is not abelian is called non-abelian.

Note 1: If we use the additive notation ‘ + ’ to denote the composition in G, then the inverse of an element a ∈ G
is denoted by the symbol –a i.e.,
(–a ) + a = 0 = a + (–a )
Note 2: If we use the multiplicative notation ‘ . ’ to denote the composition in G, then often we denote the
identity by the symbol ‘1‘, Thus 1 is an element of G such that
1 . a = a = a. 1 V a ∈ G
In multiplicative notation, we often denote the inverse of a by 1 /a. Thus 1/a is an element of G such that.
1 1
. a = 1 = a⋅
a a
In addition notation, we often denote the identity by the symbol ‘0’. Then 0 is an element of G such that
0 + a = a = a + 0.
Note 3: In addition notation, the element a + (–b) ∈ G is denoted by a − b. In multiplicative notation the
element a ⋅ b–1 ∈ G is denoted by a/b.
166 Discrete Mathematical Structures

5.4 Some Definitions


5.4.1 Groupoid
An algebraic structure (G, *) is called a groupoid or a binary algebra or quasi-group is the binary operation ∗
satisfies only postulate G. Thus groupoid is a set G with a binary operation ‘sign’ defined on G such that G is
closed under the operation ‘∗’ i.e. if
a, b ∈ G ⇒ a ∗ b ∈ G V a, b, ∈ G.

Illustration: If N is the set of natural number, the set (N , + ) is a groupoid because the set N is closed with
respect to addition (sum of two natural number is a natural number). Thus 2+7=9 ∈ N.

Illustration: The set G = (–2, – 1, 0, 1, 2) is not a groupoid with respect to addition operation ‘ + ’ because
(–2) + (–1) = –3 ∈G
/ i.e. set G is not closed under additive operation.

Illustration: The algebraic structure (M , . ) , where M = (a + b 2: a, b ∈ I ) and ‘.’ denotes ordinary


multiplication operation is a monoid, because
(1) If α = a + b 2 and β = c + d 2 are two arbitrary elements of M, then
α . β = (a + b 2)⋅ (c + d 2)
= (ac + 2bd ) + (ad + bc) 2
= x + y 2(say)
Clearly x + y 2 ( x, y ∈ I ) ∈ M , hence closure property is satisfies
(2) If α = a + b 2 , β = c + d 2 and γ = e + f 2 are three abbitrary elements of M, then

(α ⋅ β ). γ = [(a + b 2 )⋅ (c + d 2)] ⋅ (e + f 2)
= [(ac + 2bd ) + (ad + bc) 2 ]. (e + f 2)

= [(ac + 2bd )e + 2(ad + bc) f ] + [(ac + 2bd ) f + (ad + bc)e] 2


= [ a(ce + 2df ) + 2b(cf + de)] + [ a(cf + de) + b(ce + 2df )] 2
= (a + b 2). [(ce + 2df ) + (cf + de) 2]

= (a + b 2) ⋅ [(c + d 2). (e + f 2)]

= α ⋅ (β ⋅ γ ).
Hence associative law is satisfied.

5.4.2 Finite and Infinite Groups


If in a group G the underlying set G consists of a finite number of distinct elements then the group is called
a Finite Group, otherwise an Infinite Group.
Algebraic Structures 167

5.5 Order of a Finite Group


The number of element in a finite group is called the Order of the Group. An infinite group is said to be
of infinite order. We shall denote the order a group G by the symbol O (G).

Example 4: Let A = {a, b}, which of the following tables define a semi group?. Which define a monoid on A.
[U.P.T.U. (B.Tech.) 2005]
∗ a b ∗ a b ∗ a b
a b a a b b a a b
b a b b a a b b a

(i) (ii) (iii)


Solution: (i) We have from (i)
(a) Closure: Since all entries in composition table are in A. Hence closure property satisfied.
(b) Associativity: Since there are only two element in the set A. Hence associativity is always
satisfied.
(c) Identity: V elements of A ∃ an element b ∈ B such that

b ∗ a = a and b ∗ b = b
Hence (i) is semi group as well as monoid.
(ii) Again (ii) table satisfied closure and associativity and there is no identity. Hence it is
semigroup but not monoid.
(iii) We have from (iii)
(a) Closure: Since all entries in composition table are in A. Hence closure property satisfied.
(b) Associativity: Since there are only two element in the set A. Hence associativity always
satisfied.
(c) Identity: V element of A there exist a, b, ∈ A such that identity of A.
Therefore, it is semi group as well as monoid.

Example 5: Show that the set I of all integers (Positive or negative including zero), i.e,
I = (. . . . , – 4, – 3, – 2, – 1, 0, 1, 2, 3, 4 . . . )
is an infinite abelion group with respect to the operation of addition of integers.
[Delhi (B.E.) 2004, 2006, 2009]

Solution: I will be group if


1. Closure property: We know that the sum of two integers is also an integers i.e.
a, b ∈ I ⇒ a + b ∈ I V a, b ∈ I.
Thus I is closed with respect to addition
2. Associativity: We know that addition of integers obey the associative law. Thus addition is an
associative composition.
Therefore, (a + b) + c = a + (b + c) V a, b, c ∈ I.
168 Discrete Mathematical Structures

3. Existence of identity: The number 0 ∈ I. Also we have


0 + a = a = a + 0 V a ∈I
Therefore integers 0 is the identity.
4. Existence of Inverse: For all a ∈ I There exists an unique element –a ∈ I such that
(– a) + a = 0 = a + (– a)
Thus every integer possesses additive inverse
5. Commutativity: Commutative law holds good for addition of integers i.e.,
a + b = b + a V a, b ∈ I.
Hence (I,+) is an abelian group. Since the under lying set I is an infinite set so (I, + ) is an infinite
abelian group.

Example 6: The set of all rational number Q forms an infinite abelian group with respect to addition
composition.

Solution: Q = { p/q, where p and q are prime integers and q ≠ 0} is abelian group, if

1. Closure Property: By the definition of addition of rational numbers we know that the sum of
two rational number is also a rational number. Therefore closure is satisfied.
2. Associative Law: Let (P1 /q1 ), (P2/q2 ), (P3 /q3 ), be any three rational numbers. Then
p1 p p  p1  p2q3 + q2 p3  p1 q2q3 + q1 p2q3 + q1 q2 p3
+  2 + 3 = + =
q1  q2 q3  q1  q2 q3  q1 q2 q3

p1 p2 q3 + q1 q2 q3 p3  p1 p2  p3
= + = + +
q1 q2 q3 q3  q1 q2  q3

Therefore associative law holds.


3. Identity Element: The rational number 0 i.e., (0/1) is the additive identity since
p 0 p.1 + 0. q p 0 p
+ = = = +
q 1 q.1 q 1 q

Hence (0/1) is identity of Q.


4. Existence of Inverse: Let ( p/q) be any rational number, then (− p/q) is the additive inverse of
( p/q) for
( p/q) + (– p/q) = (0/q) = 0 (additive identity)
Therefore each element having inverse
5. Commutativity: Commutative law also holds good for addition of rational numbers, since
p1 p2 p1 q2 + p2 q1 q2 p1 + p2 q1 p2 q1 + q2 p1 p2 p1
+ = = = = +
q1 q2 q1 q2 q2 q1 q2 q1 q2 q1

Therefore commutativity is also satisfied, since the underlying set Q is an infinite set, hence
(Q , + ) is an infinite abelian group.
Algebraic Structures 169

Example 7: Show that the set of all (m × n) matrices having their elements as integers (rational or real or
complex number) is an infinite abelian group with matrix addition as the composition.
[U.P.T.U. (M.C.A.) 2003]

Solution: Let M is the set of all (m × n) matrices with their elements as real number. The M formed infinite
abelian group if group with matrix addition as the composition.
1. Closure Property: Let A and B be two matrices of order (m × n) and A, B ∈ M . Then A + B ∈ M
because, the sum of two matrices of the same type is a matrix of the same type. Thus
M is closed with respect to matrix addition.

2. Associative Law: Let A, B, C ∈ M and let

A = [ aij ]m × n, B = [ bij ]m × n, C = [C ij ]m × n

∴ A + (B + C ) = [ aij ]m × n + {[ bij ]m × n + [C ij ] m × n}

= [ aij ]m × n + [ bij + cij ]m × n [by the law of matrix addition]

= [ aij + (bij + cij )]m × n [by the law of matrix addition]

= [(aij + bij ) + cij ]m × n [by associative law]

= [ aij + bij ]m × n + [ cij ]m × n

= (A + B)+ C
Thus the operation of addition of matrices is associative in the set of matrices.

3. Existence of Identity Element: If O = (O m × n )is a null matrix in M then A ∈ M,


O ∈ M ⇒ O + A = A. Thus null matrix is identity element.

4. Existence of Inverse: Let (– A ) ∈ M then A ∈ M where (– A) is the matrix whose elements are the
negative of the corresponding elements of A.
Also A + (– A ) = (– A ) + A = O [Null matrix of the type (m×n)]
Thus matrix (– A ) is the inverse of matrix A.

5. Commutative Law: Let A = [ aij ]m × n and B = [ bij ]m × n, then

A + B = [ aij ]m × n + [ bij ]m × n

= [ aij + bij ]m × n [by the law of matrix addition]

= [ bij + aij ]m × n [by commutative law of numbers]

= [ bij ]m × n + [ aij ]m × n

=B+ A

Hence (M , + ) is infinite abelian group.


170 Discrete Mathematical Structures

Example 8: Show that set G = {a + 2 b : a, b ∈ Q } is a group with respect to addition.


Solution

1. Closure Property: Let x, y be any two elements of G. Then x = a + 2 b, y = c + 2 d where


a, b, c, d ∈ Q .
Now x + y = (a + 2b) + (c + 2d )
= (a + c) + 2(b + d ) ∈ G
[Q a, c ∈ Q ⇒ a + c ∈ Q ; b, d ∈ Q ⇒ b + d ∈ Q ]
Thus x + y ∈ G V x, y ∈ G. Therefore G is closed with respect to addition.

2. Associative Law: The element of G are rational numbers and the addition of rational number
is associative.
3. Existence of Left Identity: We have 0+ 2 ⋅ 0 ∈G since 0 ∈Q.
If a + 2b is any element of G, then

(0 + 2 ⋅ 0) + (a + 2b ) = (0 + a) + 2(0 + b) = a + 2 b.
∴ 0 + 2 ⋅ 0 is the left identity
4. Existence of Left Inverse: Let a + 2 b ∈ G, then a + 2b ∈ G ∃ (– a)] + 2 (– b) ∈ G
[ a, b ∈ Q ⇒ – a, – b ∈ Q ]
such that [(– a) + 2(– b)] + [ a + 2b] = [(– a) + a] + 2[(– b) + b] = 0 + 2. 0
= the identity
∴ (– a) + 2 (– b) is the inverse of a + 2b.
Hence, G is a group with respect to addition.

Example 9: Show that the set of all integers I forms a group with respect to the binary operation ' * ' defined
by the rule.
a∗ b = a + b + 1 V a, b ∈ I.
Solution: I formed group if
1. Closure Property: Let a, b ∈ I, then
a ∈ I, b ∈ I ⇒ a + b + 1 i . e. , a ∗ b ∈ I
Therefore I is closed with respect to the operation ‘ ∗ ’

2. Associativity: If a, b, c ∈ I, then
(a ∗ b) ∗ c = (a + b + 1) ∗ c = (a + b + 1) + c + 1 = a + b + c + 2
and a ∗ (b ∗ c) = a ∗ (b + c + 1) = a + (b + c + 1) + 1 = a + b + c + 2
∴ (a ∗ b) ∗ c = a ∗ (b ∗ c) V a, b, c ∈ I
3. Existence of Left Identity: An element e ∈ I will be the left identity, if
e ∗ a = a V a ∈I
Now e∗a=e+ a+1
e + a + 1 = a ⇒ e = –1
Hence –1 ∈ I is the identity in I.
Algebraic Structures 171

4. Existence of Left Inverse: If a ∈ I, then b ∈ I will be the inverse of a if b ∗ a = –1 (left identity).


Now b ∗ a = –1 ⇒ b + a + 1 = –1
⇒ b = −2 − a
Now a ∈ I ⇒ – a ∈ I ⇒ –2 + (– a) ∈ I
⇒ –2 – a ∈ I.
Also (–2 – a) ∗ a = (–2 – a) + a + 1 = –1
∴ (–2 – a) is the inverse of a
Further a ∗ b = a + b + 1 = b + a + 1 = b * a.
Therefore the composition is also commutative.
Hence, I is an infinite abelian group for the given composition.

Example 10: Show that set of matrices


cos α – sin α 
Aα = 
 sin α cos α 

Where α is a real number, forms a group under matrix multiplication.


cos α – sin α 
Solution: Let G be the set of matrices Aα , where Aα =  , a ∈ R where R is the set of real
 sin α cos α 
number. Then G formed group if
1. Closure Property: Let Aα , Aβ ∈ G while α, β ∈R, we have
cos α – sin α   cos β – sin β   cos(α + β ) – sin (α + β) 
Aα Aβ = 
 sin α cos α   sin β cos β   sin (α + β ) cos(α + β) 

= Aα +β ∈ G [Q α , β ∈ R ⇒ α + β ∈ R ]
Hence, closure property is satisfied.
2. Associativity: We know that for all 2×2 matrices, matrix multiplication satisfies associative
law
3. Existence of Identity: Since 0 ∈ R, Therefore
cos 0 – sin 0 1 0
A0  = =G
 sin 0 cos 0  0 1 

Now 10 10  is the unit matrix of order 2.


 
Therefore A0 Aα = Aα = Aα A0 V Aα ∈ G
Thus A0 is the identity element.

4. Existence of Inverse: Let Aα ∈ G, then


cos α – sin α 
Aα =  , α ∈R
 sin α cos α 
cos α – sin α
∴ | Aα| = = cos2 α + sin 2 α = 1 ≠ 0
sin α cos α

∴ The matrix Aα is non-singular and so inversible


cos α sin α 
We have Adj⋅| Aα| = 
 – sin α cos α 
172 Discrete Mathematical Structures

Adj Aα  cos α sin α   cos(–α )– sin(–α ) 


∴ A α –1 = = = ∈G
| Aα |  – sin α cos α   sin(–α) cos(–α) 

Since –α ∈ R
Thus, each element of G possesses inverse

5. Commutative Law: Now Aα Aβ = Aα +β = Aβ + α = Aβ Aα .


Hence, commutative law satisfied
Thus, G is a group under matrix multiplication.

Example 11: The set P (S ) of all possible subset of a non-empty set S under the composition ‘ ∗’ defined by the
rule. [Rohtak (B.E.) 2005; P.T.U. (B.E.) Punjab 2008]

( A ∗ B ) = A ∪ B V A ⊆ S, B ⊆ S .

Show that P (S ) is not a group, but it is a monoid.

Solution:

1. Closure Property
Since A ⊆ S, B ⊆ S ⇒ A ∪ B ⊆ S
⇒ A ∪ B ∈ P (S )
Therefore P (S ) is closed with respect to the given composition.

2. Associativity: We know that the union of sets always obey associative law i.c.
A ∪ (B ∪ C ) = ( A ∪ B ) ∪ C .

3. Existence of Identity: Since A ∪ φ = A = φ ∪ A. Therefore empty set φ ∈P (S ) is identity


element for composition ‘ ∗ ’ .

4. Let A ∈ P (S ) and A = φ and if its inverse be B then A ∗ B = A ∪ B =/ φ (identity element)

Therefore, no member of P (S ) can be the left inverse of A. Thus P (S ) is not a group but it is a monoid
under the given composition.
Example 12: Show that the set of cube roots of unity is an abelian group with respect to multiplication.
Solution: Cube roots of unity are obtained by solving the following equation:
x3 – 1 = 0
⇒ ( x − 1)( x 2 + x + 1) = 0
–1 ± (1 – 4) –1 1
⇒ x = 1, x = = ± i 3
2 2 2
 (–1) i 3 (–1) i 3 
∴ G = 1, + , – .
 2 2 2 2 
(–1) i 3 1 i 3
If we put + = ω, then – – = ω 2 and ω 3 = 1
2 2 2 2
∴ G = {1, ω, ω 2}.
Now we form a composition table.
Algebraic Structures 173

. 1 ω ω2

1 1 ω ω2

ω ω ω2 1

ω2 ω2 1 ω

Here ω ω 2 = ω 3 = 1 and ω 2ω 2 = ω 4 = ω 3 ω = 1 ω = ω

1. Closure Property: Since all the entries in the composition table are the elements of the G,
thus G is closed with respect to multiplication.

2. Associativity: Since the element of G are all complex number and we know that the
multiplication of complex number is associative because.
(1. ω ). ω 2 = 1. (ω. ω 2 )etc.

3. Existence of Identity: From the composition table we see that


1(1) = 1, 1(ω ) = ω = ω(1), 1(ω 2 ) = ω 2 = ω 2(1)

Therefore 1 is the left identity.

4. Existence of Inverse: From the composition table, we find that 1.1=1 (identity)
Therefore, the inverse of the element 1 ∈G is 1 itself, i.e.

ω. ω 2 = ω 2 ⋅ ω = 1

∴ ω –1 = ω 2 ∈G and (ω 2 )–1 = ω ∈G
Thus, the inverse of every element of G is in G.
5. Commutative Law: We know that the multiplication of complex number is commutative.
The number of element in the set G is 3. Therefore G is an abelian group of order 3 with respect
to multiplication.

Example 13: Show that the set four fourth roots of unity (namely 1,–1, i, –i) forms an obelian group with
respect to multiplication. [ U.P.T.U. (B.Tech.) 2008]

Solution: Let x = 11 / 4 ⇒ x 4 – 1 = 0

⇒ ( x 2 + 1)( x 2 – 1) = 0
⇒ x = 1, – 1, i , – i
∴ G = { 1, – 1, i , – i }

To show that multiplication is a composition in G, we form a composition . 1 –1 i –i


table as given alongside. 1 1 –1 i –i
–1 –1 1 –i i
i i –i –1 1
–i –i i 1 –1
174 Discrete Mathematical Structures

1. Closure Property: Since all the entries in the composition table are the element of the set G.
Therefore the set G is closed with respect to the multiplication and the operation of
multiplication is binary in G.

2. Associativity: The element of G are all complex numbers and the multiplication of complex
numbers obeys associative law i.e.
(1 . i ). (–i ) = 1 . [i (–i )] = 1
(1 . i ). (–1) = 1 .[i (–1)] = i etc.
Therefore, the given composition is associative in G.

3. Existence of Left Identity: From the composition table we see that the row headed by 1 just
coincides with the top row of the composition table. Thus we have
1(1) = 1, 1(–1) = – 1, 1 (i ) = i , 1(–i ) = – i
In other words, there exists an element
1 ∈G such that 1. a = a V a ∈ G
Therefore 1 is the left identity.
4. Existence of Left Inverse: We know that the identity element is its own inverse. From the
composition table, it is clear that
(1)–1 = 1 ; (–1)–1 = –1 ; (– i )–1 = i and (i )–1 = –i

Because (1 . 1) = 1 [Left identity]


(–1)⋅ (–1) = 1 [Left identity]
(–i ) ⋅ (i ) = 1 [Left identity]
and (i )⋅ (–i ) = 1 [Left identity]
Thus, the inverse of the element 1, – 1, i and –i of G are respectively the element 1, – 1, – i and i of G.
Therefore, the inverse of every element of G is in G. Hence G is a group.

5. Commutative Law: The multiplication of complex number is commutative i.e.


1(–1) = (–1)(1); (–1). i = i . (–1)etc.
Since the number of elements in the set G is 4, therefore (G, . ) is a finite abelian group of order 4.

Example 14: Show that the four matrices


1 0 –1 0 1 0  –1 0 
 0 1  ,  0 1  ,  0 –1  ,  0 –1 
       

form a multiplicative group. Is this abelian? [Kurukshetra (B.E.) 2005, 2008]

1 0 –1 0 1 0  –1 0 
Solution: Let A=  ,B= ,C =  and D =  
0 1   0 1 0 –1  0 –1

Let G be the given set, then G = { A, B, C , D}

1 0 1 0 1 + 0 0 + 0 1 0
Now A. A =   = =  = A.
0 1  0 1  0 + 0 0 + 1  0 1 
Algebraic Structures 175

Similarly, B. B = A; C . C = A; D. D = A.

1 0 –1 0 –1 + 0 0 + 0 –1 0 . A B C D


Also A. B =   = =  = B.
0 1   0 1   0 + 0 0 + 1   0 1  A A B C D

Similarly A. C = C ; A. D = D B B A D C

Similarly, finding all the possible products we from the composition table as C C D A B
given alongside. D D C B A

1. Closure Property: Since all the entries in the composition table are the elements of the set G,
therefore G is closed with respect to the multiplication of matrices.
2. Associativity: We know that the multiplication of (2 × 2)matrices obey associative law i.e. for
A, B, C , ∈ G.
( A. B ). C = B. C [Q A. B = B] [Q B. C = D]
=D
and A. (B. C ) = A . D.
=D
Therefore ( A. B. ). C = A. (B. C ) [Q B. C = D]
3. Existence of Left Identity: From the composition table we find that the row headed by the
element A just coincides with the top row of the composition table, therefore matrix A is left identity
element, because
A. A = A; A. B = B; A. C = C ; A. D = D
4. Existence of Left Inverse: From the composition table, it is clear that the left inverse of A is A, i.e.,
A –1 = A; B –1 = B; C –1 = C and D –1 = D
Hence, in the column headed by C we find that the left identity A occurs in the row headed by C
i.e., C . C = A. Therefore the left inverse of C is C and also the left inverse of D is D.
Therefore G is a group with respect to multiplication.
5. Commutative Law: The entries is the Ist, IInd, IIIrd and IVth rows of the composition table
coincide with the corresponding entries of the Ist, IInd, IIIrd and IVth columns. Therefore
composition in G is commutative. Since the number of elements in the set G is 4, therefore G is a
finite abelian group of order 4.

Example 15: Show that the set of n-nth roots of unity form a finite abelian multiplicative group of order n.
Solution: We have
(1)1 / n = (1 + 0 i )1 / n

= (cos 0 + i sin 0)1 / n

= (cos 2rπ + i sin 2rπ)1 / n, where r is any integer


2rπ 2rπ
= cos + i sin {by De-Moivre's theorem}
n n
= e( 2πri)/ n
176 Discrete Mathematical Structures

Putting r = 0, 1, 2, 3, K n − 1 we get the n-nth roots of unity. Thus if G is the set of n-nth roots of unity, then
G = {1, e2πi/ n, e4 πi/ n, e6 πi/ n, . . . e[2( n–1 )πi]/ n}
or G = {1, ω, ω 2, ω 3 K ω n–1 } where ω = e2πi / n and ω n = 1.

1. Closure Property: Let a, b ∈ G , then both a and b are n − nth roots of unity. Therefore an = 1 and
bn = 1 .

Now (ab)n = anbn = (1)(1) = 1

∴ ab is also an n − nth roots of unity and so ab ∈ G


Thus V a, b ∈ G ⇒ ab ∈ G. Therefore G is closed with respect to multiplication.

2. Associativity: The elements of G are all complex numbers and the multiplication of complex
numbers is associative.
3. Existence of Left Identity: We have 1 ∈G and
1. a = a V a ∈ G
Therefore 1 is the left identity.
4. Existence of Left Inverse: The left inverse of 1 is 1. if ω r , 1 ≤ r ≤ n − 1, is any element of G, then
ω n– r is also an element of G such that
ω n− rω r = ω n = 1 [Q ω nth root of unity]

ω n– r is the left inverse of ω r .


5. Commutativity: We know that the multiplication of complex numbers is commutative. Therefore
(G, . ) is a finite abelian group of order n.

Theorem 1: Uniqueness of the identity element. The identity element in a group is unique.
Proof: Let e and e1 be two identity element of group G.
Then, we have
ee1 = e1 if e is the identity and ee1 = e if e1 is the identity.
But ee1 is an unique element of G. Therefore ee1 = e and ee1 = e1 ⇒ e = e1
Hence the identity is unique.

Theorem 2: Uniqueness of inverse. the inverse of every element of a group is unique.


Proof: Let a be any arbitrarily element of a group G and let e be the identity element. Let b and c are the
two inverse of a. Then
ba = e = ab if b is the inverse of a
and ca = e = ac if c is the inverse of a
We have b(ac) = be [Q ac = e]
=b [Q e is identity]
Also (ba) c = ec [Q ba = e]
=c [Q e is identity]
But b(ac) = (ba)c (Q the composition of multiplication is associative in a group)
Therefore b=c
Hence the inverse of every element in G is unique.
Algebraic Structures 177

Theorem 3: If the inverse of an element ‘ a’ in a group is a–1 , then the inverse of a–1 is a, i.e, (a–1 )–1 = a
[U.P.T.U. (B.Tech.) 2004, U.P.T.U. (M.C.A.) 2001, 2002, 2005]

Proof: Let e be the identity element, then


a–1 a = e V a ∈ G [by the definition of inverse]
[multiplying both the sides by (a–1 )–1 which is an 
⇒ (a–1 )–1 (a–1 a) = (a–1 )–1 e  
element of G i.e., (a–1 ) ∈ G ⇒ (a–1 )–1 ∈ G] 
Q Composition in G is associative 
⇒ [(a–1 )–1 a–1 ] a = (a–1 )–1 e and e is identity element 
 
⇒ ea = (a–1 )–1 e [Q (a–1 )–1 is the inverse of a–1[Q ea = a]
⇒ a = (a–1 )–1

Theorem 4: Reversal law of inverse in groups. The inverse of the product of two element of a group is the
product of the inverse taken in the reverse order. [U.P.T.U. (B.Tech.) 2004]

i.e. (ab)–1 = b–1 a–1 V a, b ∈ G [U.P.T.U. (M.C.A.) 2002]


–1 –1
Proof: Suppose a and b are any elements of G and a , b are respectively the inverse of a and b, then
–1 –1
a a = e = aa ...(1)
–1 –1
and b b = e = bb ...(2)
Where e is the identity element.
Now (ab)(b–1 a–1 ) = [(ab) b–1 ] a–1 [Q Composition is associative in G]

= [ a (bb–1 )]a–1 [Q Composition is associative in G]


–1
= (a e)a [Q bb–1 = e]
= aa–1 [Q ae = a]
=e [from (1)] ...(3)
–1 –1 –1 –1
Similarly, (b a )(ab) = b [ a (ab)] [by associativity]

= b–1[(a–1 a)b] [by associativity]


–1
= b (eb) [Q a–1 a = e]

= b–1 b [Q eb = b]
=e [from 2] ...(4)
From (3) and (4), we find
(ab)(b–1 a–1 ) = e = (b–1 a–1 )(ab).
Therefore, by the definition of inverse, we see
(ab)–1 = b–1 a–1

Remark: If the group is commutative, then (ab)–1 = a–1 b–1 , Since b–1 a–1 = a–1 b–1

But in a group, we have (ab)–1 = b–1 a–1 .


178 Discrete Mathematical Structures

Theorem 5: Cancellation laws hold in a group. If a, b, c ∈ G,


Then (i) ab = ac ⇒ b = c [Left cancellation law]
and (ii) ba = ca ⇒ b = c [Right cancellation law]
or
In any group the left cancellation and right cancellation law are true.
Proof: Let a ∈ G and e be the identity element, then
a ∈ G ⇒ ∃ a–1 ∈ G such that a–1 a = e = aa–1
Now ab = ac ⇒ a–1 (ab) = a–1 (ac)
⇒ (a–1 a) b = (a–1 a) c [by associative law]
⇒ eb = ec [Q a–1 a = e]
⇒ b=c [Q e is identity]
Similarly ba = ca ⇒ (ba) a–1 = (ca)a–1
⇒ b(aa–1 ) = c(aa–1 ) [by associative law]
⇒ be = ce ⇒ b = c

Note: In additive notation the two laws would have been

(i) a + b = a + c ⇒ b = c and (ii) b + a = c + a ⇒ b = c

Theorem 6: If a, b ∈ G then the equations ax = b and ya = b have unique solution in G

Proof: Let a, b ∈ G and e be the identity element then a ∈ G ⇒ ∃ a–1 ∈ G such that a–1 a = aa–1 = e
Then a ∈ G, b ∈ G ⇒ a–1 ∈ G and b ∈ G
⇒ a–1 b ∈ G [by closure property]
Similarly, b ∈ G, a ∈ G ⇒ b ∈ G and a–1 ∈ G
⇒ ba–1 ∈ G [by closure property]
Now ax = b and ya = b
⇒ a (ax ) = a–1 b and ( ya)a–1 = ba–1
–1
[multiplying both side by a–1 ]
⇒ (a–1 a)x = a–1 b and y(aa–1 ) = ba–1 [by associative law]
–1 –1
⇒ ex = a b and ye = ba [Q a–1 a = e = aa–1 ]
⇒ x = a–1 b and y = ba–1 [Q ex = x, ye = e]
⇒ x = a–1 b is a solution of the equation ax = b and y = ba–1 is a solution of the equation ya = b
Now we shall show the uniqueness of the solutions. Let us suppose, if possible let x1 , x 2 be the two values
of x satisfying the equation ax = b and y1 , y 2 be the two values of y satisfying the equation ya = b. Then
ax1 = b, ax 2 = b and y1 a = b, y 2a = b
∴ ax1 = ax 2 ⇒ x1 = x 2 [by left cancellation law]
and y1 a = y 2a ⇒ y1 = y 2 [by right cancellation law]
Hence, the solution are unique.
Algebraic Structures 179

5.6 Addition Modulo m


If a and b are any two integers then the operation of addition modulo m is defined as the least non-negative
remainder when the ordinary sum of a and b divided by m. This operation when applied over the integers a
and b is written as a + m b and is defined as:
a + m b = r, 0 ≤ r < m,
where r is the left non-negative remainder when (a + b) is divided by m
8 +7 5 = 6
Illustration: 18 ≡ 3 (mod 5) because 18 − 3 = 15, is divided by 5. –20 ≡ 8 (mod 7) because –20 –8= –28; is
divided by 7.

5.6.1 Additive Group of Integers Modulo m


Theorem 7: The set G = {0, 1, 2, 3 . . . , m − 1} of first m non-negative integers is a group with respect to the
composition addition modulo m. [Rohtak (B.E.) 2005, 2007]

Proof: 1. Closure Property: By the definition of addition modulo m, a + m b = r

Where r is a least non-negative remainder when ordinary addition a + b, is divided by m. The remainder r
has got the value 0 ≤ r ≤ (m − 1). Therefore V a, b, ∈ G ⇒ a + m b ∈ G and so G is closed with respect to the
composition addition modulo m.
2. Associativity: Let a, b, c ∈ G arbitrarily. Then
a+ m(b + m c) = a + m(b + c) [Since b + m (= b + c)mod. m]
= The least non-negative remainder when a + (b + c) is divided by m
= The least non-negative remainder when (a+b)+c is divided by m
[Since a + (b + c) = (a + b) + c]
=(a + b) + m c [by the definition of + m ]
= (a + m b) + m c [Since a + b ≡ a + m b (mod.m)]
Therefore, ‘ + m ’ is a associative composition in G

3. Existence of Identity: There exists an element 0 ∈G.


Such that 0 + m a = a = a + m 0.
Therefore, the element 0 ∈G is the identity in G with respect to the given composition.
4. Existence of Inverse: The inverse of 0 is 0 itself. If r(≠ 0) ∈ G, corresponding to the element,
there exist an element (m − r) ∈ G such that
(m − r) + m r = 0 = r + m (m – r)
therefore (m − r) is the inverse r with respect to the given composition.
Thus, the structure (G, + m ) is a group. It can easily be seen that this group is abelian group.
180 Discrete Mathematical Structures

5. Commutativity: a + m b = The least non-negative remainder when (a + b) is divided by m.


= The least non-negative remainder when (b + a) is divided by m
= b + m a.
The set G contain m elements, therefore, this group is a finite abelian group of order m.

Note: If we exclude the element zero 'o' from the set G then the remaining structure will not constitute a group.

5.7 Multiplication Modulo m


Now we define a similar composition known as multiplication modulo m and it is written as a. m b or a ×m b
where a and b are any integers and m is a fixed positive integers.
If a and b are any two integers then the operation of multiplication modulo m is defined as the least
non-negative remainder when the ordinary product of a and b i.e.(a. b) is divided by m. Thus
a. m b = r, o ≤ r < p where r is the least non-negative remainder when (a. b) is divided by m
8 ⋅5 4 = 2 because 8 ⋅ 4 = 32 when divided by 5 leaves 2 as the least non-negative remainder.

Theorem 8: Multiplicative group of integers modulo p where p is prime. The set G = {1, 2, 3, K ( p − 1)} of
( p − 1) integers (where p is a prime integer) is a finite abelian group of order ( p − 1) with respect to the
composition multiplication modulo p. [R.G.P.V. (B.E.) Raipur 2005, 2009]

Proof: 1. Closure Property: Let a, b ∈ G arbitrarily, then 1 ≤ a ≤ p − 1 and 1 ≤ b ≤ p − 1. Now by definition,


a × p b = r where r is the least non-negative remainder when the ordinary product ab is divided by p. Since p
is prime, therefore ab is not exactly divisible by p. Therefore, r cannot be zero and we shall have
1 ≤ r ≤ p − 1.

Thus a × p b ∈ G V a, b ∈ G. Therefore the given operation is binary in G.

2. Associativity: Let a, b, c ∈ G arbitrarily. Then


a × p(b × pc) = a × p (b c) [Q b × pc ≡ b c (mod p)]
= The least non-negative remainder when a(bc) is divided by p
= The least non-negative remainder when (ab)c is divided by p
=(ab) × pc
=(a × p b) × pc [Q ab ≡ a × p b (mod p)]
Therefore ‘ × p ’ or ‘ × p ’ is an associative composition.
3. Existence of Left Identity: We have 1 ∈G, also if a ∈ G arbitrarily, then 1× p a = a. Therefore
1 is the left identity.

4. Existence of Left Inverse: Let a be any member of G. Then consider then following products:
1 × p a, 2 × p a, 3 × pa. . . . ( p − 1) × p a.
All these are the elements of G and we claim that no two of them are equal as shown following:
Let i and j be two distinct integers such that
1 ≤ i ≤ p − 1, 1 ≤ j ≤ p − 1 and i > j then i × p a = j × pa
⇒ i a and ja leave the same least non-negative remainder when divided by p
Algebraic Structures 181

⇒ (ia – ja) is divisible by p


⇒ (i – j) a is divisible by p
Since 1 ≤ (i – j) ≤ p − 1; 1 ≤ a ≤ p − 1 and p is prime therefore (i – j) a cannot be divisible by p
i.e. , i × p a ≠ j × p a
Thus, 1 × pa, 2 × p a 3 × p a, . . . ( p − 1) × p a are ( p − 1) distinct element of set G, hence one of them must
be equal to 1.
Let a′ × p a = 1 then a′ is the left inverse of a.

5. Commutativity: The composition ‘ • p ’ or ‘ × p ’ is commutative in G, because


a × pb = The least non-negative remainder when (ab) is divided by p
= The least non-negative remainder, when (ba) is divided by p
= b × pa.
Hence (G, × p ) is a finite abelian group of order ( p − 1)

Example 16: Prove that the set G = {0, 1, 2, 3, 4, 5} is a finite abelian group of order 6 with respect to addition
modulo 6 as the composition in G.
Solution: We have
+6 0 1 2 3 4 5
0 0 1 2 3 4 5
1 1 2 3 4 5 0
2 2 3 4 5 0 1
3 3 4 5 0 1 2
4 4 5 0 1 2 3
5 5 0 1 2 3 4

1. Closure Property: We see that all the entries of the composition table are the elements of the
set G. Therefore the set G is closed with respect to addition modulo 6 i.e. + 6 .
2. Associativity: Let a, b, c ∈ G arbitrarily. Then
a + 6(b + 6 c) = a + 6(b + c) [Since b + 6 c ≡ b + c (mod 6)]
= The least non-negative remainder when a + (b + c) is divided by 6
= The least non-negative remainder when (a + b) + c is divided by 6
= (a + b) + 6 c [Q a + (b + c) ≡ (a + b) + c]
= (a + 6 b) + 6 c [Q a + b ≡ a + 6 b(mod 6)]
Therefore the operation + 6 is associative in G.

3. Existence of Identity: We have 0 ∈G. If a is any element of G, then from the composition
table we have
0 + 6 a = a = a + 6 0 V a ∈G
Therefore 0 is the identity element.
182 Discrete Mathematical Structures

4. Existence of Inverse: From the composition table, we observe that the inverse of 0 is 0, the
inverse of 1 is 5, 2, is 4, 3, is 3, 4 is 2 and 5 is 1.
Illustration: 4 + 6 2 = 0 = 2 + 6 4 ⇒ 4 is the inverse of 2.

5. Commutativity: The composition is commutative as the corresponding rows and columns in


the composition table are identical.
The number of element in the set G is 6. Hence (G + 6 ) is a finite abelian group of order 6.

Example 17: Prove that the set G = {1, 2, 3, 4, 5, 6} is a finite abelian group of order 6 under the
multiplication modulo 7, as the composition in G i.e. ×7 or ×7 .
Solution: Let us form the composition table:
×7 1 2 3 4 5 6
1 1 2 3 4 5 6
2 2 4 6 1 3 5
3 3 6 2 5 1 4
4 4 1 5 2 6 3
5 5 3 1 6 4 2
6 6 5 4 3 2 1

1. Closure Property: From the composition table we see that all entries in the composition
table are the element of the set G. Therefore, G is closed with respect to multiplication modulo 7 i.e., .7 .

2. Associativity: If a, b, c ∈ G arbitrarily, then


a.7 (b.7 c) = a.7 (bc) [ Since b.7 c ≡ bc (mod 7 )]
= The least non-negative remainder when a(bc) is divided by 7
= The least non-negative remainder when (ab)c is divided by 7 [Q a(bc) = (ab)c]
= (ab).7 c
= (a.7 b).7 c [Since a . 7 b ≡ ab (mod 7)]
Therefore the given composition is associative in G.
3. Existence of Identity: We have 1 ∈G. If a is any element of G, then from the composition
table we observe that 1.7 a = a = a. 7 1 .
Therefore 1 is identity element.
4. Existence of Inverse: From the composition table we observe that the inverse of 1 is 1,
inverse of 2 is 4, 3 is 5, 4 is 2, 5 is 3 and 6 is 6.
Illustration: 3.7 5 = 1 = 5.7 3 ⇒ 3 is inverse of 5
5. Commutativity: The composition is commutative as the corresponding rows and columns in
the composition table are identical.
The number of elements in the set G is 6. Hence G, •7 ) is a finite abelian group of order 6.
Algebraic Structures 183

5.8 Residue Classes of the Set of Integers


Let I = {K , – 3, – 2, – 1, 0, 1, 2, 3. . . } be the set of integers. Let a, b ∈ I arbitrarily and m be the fixed positive
integer.
Relation of ‘‘congruence modulo m’’ in the set of integers.
Definition: Let m be a positive integer, then the two integers a and b are said to be ‘congruent modulo m’
if m| a − b is divisible by m.
Symbolically: We write it as a ≡ b (mod m) which read as “a is congruent to b modulo m”.

Illustrations:
(i) 8 ≡ 3 (mod 5) because 8 − 3 = 5 which is divisible by 5.
(ii) 27 ≡ – 3 (mod 5) because 27–(–3)=30 which is divisible by 5.

Theorem 9: The set of residue classes modulo m is an abelian group of order m with respect to addition of
residue classes.
Proof: I = {0, ± 1, ± 2, ± 3. . . } be the set of integers. If a ∈ I, then [ a] is a residue class modulo m if.
[ a] = { x: x ∈ I and x − a is divisible by m}.
Let I m be the set of all residue classes of I mod m, i.e. I m = {[ a]: a ∈ I}, we have
[ a] = [ b] ⇒ a ≡ b (mod m)
The set I m has m distinct element {[ 0], [1], [ 2] K [ m − 1]}.
Thus we have , I m = {[ 0], [1], [ 2] . . .[ m − 1]}
If a and b be any two integers then we define addition of residue classes [ a] and [ b] as follows:
[ a] + [ b] = [ a + b]
If [ a] = [ c] and [ b] = [ d], then it can be easily seen that
[ a] + [ b] = [ c] + [ d].
Therefore our addition of residue classes is well defined.
Now, we shall show that (I m , + ) is a group where ‘ + ’ represents the addition of residue classes.
1. Closure Property: If [ a], [ b] ∈ I m , then by definition,
[ a] + [ b] = [ a + b].
Since (a + b) is an integer, therefore [ a + b] ∈ I m . Thus I m is closed with respect to addition of
residue classes.
2. Associativity: Let [ a], [ b], [ c] ∈ I m arbitrarily.
Then [ a] + ([ b] + [ c]) = [ a] + [ b + c] [by def. of addition of residue classes]
=[ a + (b + c)] [by def. of addition of residue classes]
= [(a + b) + c] [Q add. of integers is associative]
= [ a + b] + [ c]
= ([ a] + [ b]) + [ c] .
184 Discrete Mathematical Structures

3. Existence of Identity: We have, 0 ∈ I m . If [ a] ∈ I m , then we have


[ 0] + [ a] = [ 0 + a] = [ a] = [ a] + [ 0].

Therefore the residue class [0] is the identity element.

4. Existence of Inverse: Let [ a] ∈ I m be arbitrary. Since a ∈ I ⇒ – a ∈Ι, therefore [– a] is also an


element of I m we have
[– a] + [ a] = [– a + a] = [ 0] = [ a] + [– a]
Therefore [– a] is the inverse of [ a]

5. Commutativity: Let [ a], [ b] ∈ I m , then


[ a] + [ b] = [ a + b] = [ b] + [ a].
Hence I m is an abelian group with respect to addition of residue classes. Since the number of distinct
elements in Im is I m , therefore the order of this group is m.

Theorem 10: The set of non-zero residue classes modulo a prime integer p is an abelian group of order ( p − 1)
with respect to multiplication of residue classes. [U.P.T.U. (M.C.A.) 2007]

Proof: Let I = {0, ± 1, ± 2, ± 3 K } be the set of integers. If a ∈ I, then [a] is a residue class modulo p of I, if
[ a] = [ x : x ∈ I and x − a is divisible by p]
We have [ a] = [ b] ⇔ a – b is divisible by p.
The residue class [0] is called the zero residue class. Also we have [ a] = [ 0] if and only if a is divisible by p.
Let I p be the set of all residue classes of I mod p. Then I p has p distinct elements i.e.

[ 0], [1], [ 2]. . .[ p − 1].


Therefore if G be the set of all non-zero residue classes modulo p, then G has p − 1 distinct element and we
have,
G = {[1], [ 2]. . .[ p − 1]}
or G = [ a]: a ∈ I and a is not divisible by p}
If a, b ∈ I arbitrary. Then we define the multiplication of residue classes [a] and [b] as follows:
[ a][ b] = [ a b].
If [ a] = [ c] and [ b] = [ d], then it can be easily seen that
[ a][ b] = [ c][ d].
Therefore our multiplication of residue classes is well defined.
Now we shall show that G is a group with respect to multiplication of residue classes.

1. Closure Property: Let [ a], [ b] ∈ G arbitrarily. Then a and b are integers and a.b is not exactly
divisible by p. By definition, we have,
[ a][ b] = [ ab].
Since a, b ∈ G ⇒ ab ∈ G. Therefore [ ab] is also a residue class modulo p. But we have to show
[ ab] ≠ [ 0] i.e., p is not a divisor of ab
We have p| ab ⇒ p| a or p| b [∴ p is a prime]
But neither a nor b is divisible by p.
Therefore [ ab] ≠ 0 and [ ab] ∈ G and G is closed with respect to multiplication of residue classes.
Algebraic Structures 185

2. Associativity: If [ a], [ b], [ c] ∈ G arbitrarily, then


[ a]([ b][ c]) = [ a][ bc] [by definition]
= [ a(bc)] [by definition]
= (a, b)c] [since multiplication of integers is associative]
= [(ab)c] = [ a b][ c] = ([ a][ b])[ c] .
Therefore multiplication of residue classes is associative.
3. Existence of Identity: Since the integers 1 is not divisible by the prime integer p. Therefore [1]
≠ [ 0] . Thus [1] ∈G. If [ a] ∈ G, then

[1][ a] = [1 a] = [ a] = [ a][1].

Thus the residue class [1] is the identity element.

4. Existence of Inverse: Let [ a] ∈ G i.e., [ a] [0] then a is not divisible by p. Consider the
following p − 1 products:
[1][ a] , [ 2][ a], K [ p − 1][ a].
By closure property all these products are the elements of G, We shall show that all these are distinct
elements of G. Let i and j (i ≠ j) be two integers, such that

1 ≤ i ≤ p − 1; 1 ≤ j ≤ p − 1 and i > j .
Thus, [i ][ a] = [ j][ a]
⇒ i a – j a is divisible by p

⇒ p|(i – j)a
⇒ p|(i – j) since p is not a divisor of a.

But according to our assumption i − j is a positive integer and i − j < p. So it is not divisible by p.
Therefore [i ][ a] ≠ [ j][ a]. Thus [1][ a], [ 2][ a], . . . , [ p − 1][ a] are the p − 1 distinct elements of G.
Therefore one of these elements must be equal to [1].
Let [ b][ a] = [1] = [ a][ b]. Then [ b] is the inverse of [a].
5. Commutativity: Let [ a],[ b] ∈ G arbitrarily. Then
[ a][ b] = [ ab] = [ ba] = [ b][ a].
Q Multiplication of residue classes is commutative.

Hence G is an abelian group with respect to multiplication of residue classes. Since the number
of distinct elements in G is p − 1, therefore the order of this group is p − 1.
186 Discrete Mathematical Structures

5.9 Order of an Element of a Group


Let G be a group and we denote the composition by multiplication and a ∈ G arbitrarily. By the order of the
element a ∈ G, we mean the least positive integer n (if it exists) such that,
an = e, where e is the identity element in G.
If there does not exist an integer n satisfying an= e, then we say that the element a ∈ G is of infinite order or
zero order. The order of an element a of a group G is denoted by o(a). If the composition in G has been
denoted additively then by the order of an element a ∈ G we mean the least positive integer n (if it exists)
satisfying na = e.

Remark 1: In any group G, the identity element is always of order 1 and it is the only element of order 1, i.e.
e1 = e and as such o(e) = 1. If o (a) = 1 then a1 = a = e.

Remark 2: If a is an element of group G and n is a positive integer such that an = e, then o (a) ≤ n, when n is a
least positive integers satisfying an = e, then o (a) = n and there exists any positive integer m (< n) such that
am = e, then o (a) < n.

Theorem 11: The order of an element a of a group (G, . ) is the same as the order of a–1 , i.e. o (a) = o (a–1 ) .

Proof: Let n and m respectively be the orders of a and a–1 i.e., o (a) = n and o (a–1 ) = m

Now O (a) = n ⇒ an = e [identity element]

⇒ (an )–1 = e–1

⇒ (a–1 )n = e [Q e–1 = e]

⇒ o (a–1 ) ≤ n

⇒ m ≤ n.

Also o (a–1 ) = m ⇒ (a–1 )m = e

⇒ (am )–1 = e

⇒ am = e [Q b–1 = e ⇒ b = e]

⇒ o (a) ≤ m

⇒ n ≤ m.
Now m ≤ n and n ≤ m ⇒ m = n.
–1
If o (a) = ∞, then the order of a cannot be finite because o(a–1 ) = m ⇒ o (a) ≤ m ⇒ o (a) is finite.

Therefore if o (a) = ∞, then o (a–1 ) = ∞.


Algebraic Structures 187

Theorem 12: The order of any integral power of an element a of any group (G, . )cannot exceed the order of a.
Proof: Let o (a) = n and ak be any integral power of a, we have to prove that o (ak ) ≤ o (a).

Now, o (a) = n ⇒ an= e [identity element]

⇒ (an )k = ek
⇒ ank = e

⇒ (ak )n = e
⇒ o (a)k ≤ n
⇒ o (a)k ≤ o (a) .

Theorem 13: If o (a) = n for some a ∈ G, then am = e iff n is a division of m. [U.P.T.U. (B.Tech.) 2003]

Proof: The condition is necessary. Let us suppose that n is a divisor of m. Then there exists an integer
m
q such that = q or nq = m
n
Now am = anq = (an )q =eq = e [Q o (a) = n]
m
Thus, we have established that if o (a) = n and n is a divisor of m, then a = e.

The condition is sufficient. Let am = e.

Now am = e ⇒ o (a) ≤ m ⇒ n ≤ m.

Since m is an integer and n is a positive integer, therefore by division algorithm, there exists integers q and
r such that
m = nq + r where 0 ≤ r < n
Now am = anq+ r [Q m = nq + r]
nq r
=a a
= (an )q ar = eqar = ear = ar [Q an = e]

Therefore am = e ⇒ ar = e

Since 0 ≤ r < n, therefore ar = e suggests that r must be equal to zero otherwise o (a) ≠ n. Thus if o (a) = n then
there exists not positive integer r < n satisfying ar = e.

Hence m = nq ⇒ n is a divisor of m.

Theorem 14: The order of the elements a and x –1 ax are the same where a, x are any two element of a group
(G, . ) .
Proof: We have to prove:
o (a) = o ( x –1 ax ).
Suppose n and m are respectively the orders of a and x –1 ax i.e., o (a) = n and o ( x –1 ax ) = m

Now ( x –1 ax )n = ( x –1 ax )( x –1 ax )( x –1 ax ) K ( x –1 ax ) [n factors]
–1 –1 –1 –1
=x ax x ax x ax . . . x ax
188 Discrete Mathematical Structures

= x –1 a( xx –1 )a ( xx –1 ) a ( xx –1 ). . . ax [by general associative law]


–1
=x a(e) a(e) a(e). . . ax

= x –1 (ae)(ae)(ae). . . ax

= x –1 an x [Since 0(a) = n ⇒ an = e]

= x –1 ex = x –1 x = e
This means that o ( x –1 ax ) ≤ n i . e, m ≤ n
Again o ( x –1 ax ) = m ⇒ ( x –1 ax )m = e

⇒ x –1 am x = e

⇒ x –1 am x = x –1 x

⇒ am x = x [by left cancellation law]


m
⇒ a x =ex

⇒ am = e [by right cancellation law]


⇒ o (a)≤ m ⇒ n ≤ m
Now m ≤n and n ≤ m ⇒ m = n
Hence o (a) = o ( x –1 ax ) .
Remark: For every two arbitrary elements a, b ∈ G, the order of ab is the same as that of ba, i.e.
o (ab) = o (ba).
We have a–1 (ab)a = (a–1 a)(ba) [by associative law]

= e(ba) [since a–1 a = e]

= (eb)a [since b = eb]


= ba .
Thus, ba = a–1 (ba)a

⇒ order of ba = order of a–1 (ab)a

⇒ order of ba = order of ab, i.e., o (ab) = o (ab) [Q o ( x –1 xa) = o (a)]

Theorem 15: If the order of an element a of a group is n and p is prime to n then the order of a p is n.
Proof: Let if possible the order of a p be m, i.e., o (a p ) = m.
Now, o (a) = n ⇒ an = e
⇒ (an )p = e p = e
⇒ (a p )n = e
⇒ o (a p ) ≤ n
⇒ m≤n
[because the order of any power of an element a cannot exceed the order of a]
Since p is prime to n, therefore there exist integers x and y such that
px + ny = 1.
Algebraic Structures 189

Therefore a = a1 = a px + ny = a px ⋅ any

= a px (an )y = a px e y = a px e = a px = (a p )x .
Now am = [(a p )x ]m = (a p )mx = [(a p )m ]x = (a pm )x .

= ex =e [Q o (a p ) = m ⇒ (a)pm = e]
Therefore o (a) ≤ m ⇒ n ≤ m.
Now, m ≤ n and n ≤ m ⇒ m = n.

Example 18: Find the orders of each element of the multiplicative group G = {1, – 1, i , – i }
Solution: Since 1 is the identity element, therefore o(1) = 1
Now (–1)1 = –1, (–1)2 = (–1)(–1) = 1 [identity element]
∴ o(–1) = 2.
Similarly (i )1 = i , (i )2 = –1, i 3 = –i , i 4 = 1 [identity element]
∴ o (i ) = 4
and (−i ) = – i , (−i )2 = – 1, (−i )3 = i , (−i )4 = –1
1
[identity element]
∴ o (i ) = 4
Hence o (1) = 1, o (–1) = 2, o (i ) = 4 and o (–i ) = 4

Example 19: Find the orders of each element of the multiplicative group ({1, ω , ω 2}, • ).

Solution: The identity element e of the multiplicative group ({1, ω, ω 2}, • ) is 1.


Thus 11 = 1 [identity]
∴ o(1) = 1
Similarly ω1 = ω, (ω 2 ) = ω 2, (ω )3 = ω 3 = 1 [identity]
∴ o(ω ) = 3
and (ω ) = ω , (ω ) = ω 4 = ω 3ω = ω, (ω 2 )3 = (ω 3 )2 = 12 = 1
21 2 2 2
(identity)
2
∴ o(ω ) = 3 .

Example 20: Find the order of each element of the group G = {0, 1, 2, 3, 4, 5} , the composition in G is
‘addition modulo 6’.
Solution: In the given operation, the order of any element of (G, + 6 ) is the least positive integer n such
that
na = e

The identity element of group (G, + 6 ) is 0, therefore the order of this element is 1 i.e., o(0) = 1

Now 11 = 1, 12 = 1 + 61 = 2, 13 = 1 + 61 + 61 = 1 + 6 2 = 3,

14 = 1 + 61 + 61 + 61 = 1 + 6 3 = 4, 15 = 1 + 6 4 = 5 and 16 = 1 + 6 5 = 0 (Identity)
Therefore o(1) = 6
Similarly, 2 = 2, 22 = 2 + 6 2 = 4, 23 = 2 + 6 4 = 0
1
(identity)
∴ o(2) = 3
31 = 3, 32 = 3 + 6 3 = 0 (identity)
190 Discrete Mathematical Structures

∴ o(3) = 2
43 = 3(4) = 12 (mod 6)=0 (identity)
∴ o(4) = 3
and 5–6 = 6(5) = 30 (mod 6) = 0 (identity)
∴ o(5) = 6

Example 21: If a and b are any two elements of a group (G, . ) , then (b a b–1 )n = banb–1 for any integer n.

Solution: n being an integer it can assume positive values, negative values and also the value zero.
Therefore
(i) If n = 0 , then
(b a b–1 )0 = e [by definition]
0 –1 –1 –1
Also ba b = beb = bb =e

∴ (bab–1 )0 = ba0 b–1


(ii) If n > 0, then
(bab–1 ) = bab–1 = ba1 b–1 [Q a1 = a]

Thus the result is true for n = 1


Let us suppose that the result is true for n = k, i . e. ,
(bab–1 )k = bak b–1 .

Then (bab–1 )k(bab–1 )1 = (bak b–1 )(bab–1 )1

or (bab–1 )k +1 = bak b–1 bab–1 = bak eab–1 = bak ab–1 = bak +1 b–1.

Therefore the result is true for n = k + 1 if it is true for n = k. But we have seen that the result is true for n = 1.
Hence by mathematical induction it is true for all n > 0 .
(iii) If n < 0 and let n = – m where m > 0, then
(bab–1 )n = (bab–1 )– m = [(bab–1 )m ]–1 = (bam b–1 )–1

= (b–1 )–1 (am )–1 b–1 = ba– m b–1 = banb–1 .

Similarly, we can show that


(aba–1 )n = abna–1 .

Example 22: Prove that if G is an abelian group, then


(ab)n = anbn V a, b ∈ G and V n ∈ I.

Solution: n being an integer, it can assume positive values, negative values and also the value zero,
therefore,
(i) Let n = 0, then by definition of identity element,
a0 = e, b0 = e, (ab)0 = e and a0 b0 = ee = e.

Therefore (ab)0 = e = a0 b0 or (ab)n = anbn if n = 0 .


Algebraic Structures 191

(ii) Let n > 0 . If n=1, then


(ab)1 = ab = a1 b1 . ∴ (ab)n = anbn if n=1
Let us suppose that the assertion is true for n = k, i.e.
(ab)k = ak bk .

Now (ab)k +1 = (ab)k (ab)

= (ak bk )(ab)

= ak (bk a)b [by associative law]


k k
= a (ab )b [G is abelian ⇒ bk a = abk ]

= (ak a)(bk b) = ak +1 bk +1
Thus the assertion is true for n = k + 1 if it is true for n = k. Therefore, by mathematical induction the
assertion is true for every positive integral value of x.
(iii) Let n < 0 , Let n = − m, where m is a positive integer.
Then (ab)n = (ab)– m = [(abm ]–1 = (am bm )–1

= (bm am )–1 [G is abelian ⇒ am bm = bm am ]

= (am )–1 (bm )–1 [Q (ab)–1 = b–1 a–1 ]

= a– m b– m
= anbn.
Therefore, from (i), (ii) and (iii), we have
(ab)n = anbn V a, b ∈ G and V n ∈ I.

Example 23: Let (G, ∗ )be a group. If (G, ∗ )is an abelian group, then show that a3 ∗ b3 = (a∗ b)3 for all a and b in G.
[R.G.P.V. (B.E.) Bhopal 2007]

Solution: Suppose (G, ∗ ) is an abelian group, then


a ∗ b = b ∗ a V a, b ∈ G ...(1)
2
Now (a ∗ b) = (a ∗ b) ∗ (a ∗ b) = a ∗ (b ∗ a) ∗ b

= a ∗ (a ∗ b) ∗ b [using (1)]
= (a ∗ a) ∗ (b ∗ b)
= a2 ∗ b2 ...(2)

Further (a ∗ b)3 = (a ∗ b)2 ∗ (a ∗ b)

= (a2 ∗ b2 ) ∗ (a ∗ b) [using (2)]

= [(a2 ∗ b) ∗ b] ∗ (a ∗ b)

= (a2 ∗ b) ∗ (b ∗ a) ∗ b

= (a2 ∗ b) ∗ (a ∗ b) ∗ b [using (1)]

= a2 ∗ (b ∗ a) ∗ (a ∗ b)
192 Discrete Mathematical Structures

= a2 ∗ (a ∗ b) ∗ b2 [using (1)]

= (a2 ∗ a) ∗ (b ∗ b2 ) = a3 ∗ b3

Example 24: Prove that a group (G, ∗ ) is abelian, if


b–1 ∗ a–1 ∗ b ∗ a = e V a, b ∈ A.

Solution: We have,
b–1 ∗ a–1 ∗ b ∗ a = e ⇒ (b–1 ∗ a–1 )(b ∗ a) = e

⇒ (b–1 ∗ a–1 )–1 = b ∗ a [Q a ∗ b = e ⇒ a–1 = b]

⇒ (a–1 )–1 ∗ (b–1 )–1 = b ∗ a [Q(a ∗ b)–1 = b–1 ∗ a–1 ]

⇒ a∗b = b∗a
⇒ G is abelian

Example 25: Prove that if for every element a in a group (G, ∗ ), a2 = e then G is abelian group.

Solution: Let a and b by any two element of the group G, then ab is also an element of group G, i.e.,
a, b ∈ G ⇒ a b ∈ G V a, b ∈ G
⇒ (a ∗ b)2 = e.

Now (a ∗ b)2 = e ⇒ (a ∗ b)(a ∗ b) = e

⇒ (a ∗ b)–1 = (a ∗ b)

⇒ b–1 ∗ a–1 = a ∗ b ...(1)

But a2 = e ⇒ a ∗ a = e

⇒ a–1 = a ...(2)
Similarly 
b2 = e ⇒ b–1 = b

Therefore, from (1) and (2), we get

b∗a = a∗b

Therefore b ∗ a = a ∗ b V a, b ∈ G . Hence G is an abelian group.

Example 26: Prove that if every element of a group G is its own inverse, then G is an abelian group.

Solution: Let a and b any two elements of G. Then ab is also an element of group G.
Therefore (a ∗ b)–1 = a ∗ b (given)

Now (a ∗ b)–1 = a ∗ b ⇒ b–1 ∗ a–1 = a ∗ b

⇒ b∗a = a∗b [Q b–1 = b and a–1 = a]

⇒ G is abelian.
Algebraic Structures 193

Example 27: Prove that if every element of a group G except identity element is of order two, then G is
abelian.

Solution: Let a, b ∈ G

According to the given condition


a2 = e, b2 = e and (a ∗ b)2 = e [Q a ∈ G, b ∈ G ⇒ a ∗ b e G]

or (a ∗ b)(a ∗ b) = ee = a2 ∗ b2 [Q a2 = e and b2 = e]

or a ∗ (b ∗ a) ∗ b = a ∗ (a ∗ b) ∗ b [by associative law]


or b∗a = a∗b [by cancellation law]

Hence G is abelian.

Example 28: If G is a group of even order then prove that it has an element a ≠ e satisfying a2 = e.

Solution: Let G be a group of even order 2n, where n is a positive integer. We shall prove that G has
definitely an element a ≠ e such that a–1 = a. We shall prove it by contradiction.

Let G has no other element except e which is its own inverse. In a group when every element possesses a
unique inverse then the identity element e is its own inverse.

Again if b is the inverse of e, then


b = e–1 ⇒ e = b–1

Now we separate the 2n – 1 elements of the set G ′ = A − {e} in the pairs of two elements of every pair is the
inverse of other. But we cannot do so because the odd integer 2n − 1 is not divisible by 2. Therefore our
initial assumption is wrong.

Thus, in G there is an element a ≠ e such that a = a–1 ⇒ a ∗ a = a–1 ∗ a ⇒ a2 = e.

Example 29: If A is a group such that (ab)m = am bm for three consecutive integers m and for every a, b ∈ A,
then show that A is abelian group.
Solution: Let a, b ∈ A arbitrarily. Let m, m + 1, m + 2 be any three consecutive integers such that,

(ab)m = am bm ; (ab)m +1 = am +1 bm +1

and (ab)m + 2 = am + 2bm + 2

We have (ab)m + 2 = (ab)m +1 (ab)

⇒ am + 2bm + 2 = am +1 bm +1 (ab) (given)

⇒ am +1 abm +1 b = am +1 bm +1 ab

⇒ abm +1 = bm +1 a [by left and right cancellation law]


m m +1 m m +1
⇒ a (ab ) = a (b a)

⇒ am +1 bm +1 = am bm (ba)

⇒ (ab)m +1 = (ab)m ba

⇒ (ab)m (ab) = (ab)m ba


194 Discrete Mathematical Structures

⇒ ab = ba [by left cancellation Law]


⇒ A is abelian.

Example 30: In a group A, if ba = am bm , then prove that the elements am bn– 2, am – 2bn, ab–1 have the same
order.
Solution: We have
am bn– 2 = am bn b–2

= bab–2 [Q b a = am bn]

= bab–1 b–1 = (b–1 )–1 (ab–1 ) b–1 .


Now, We know that in a group o (a) = o ( x –1 ax ), where a, x ∈ A arbitrarily

∴ o (am bn– 2 ) = o[(b–1 )–2(ab–1 )b–1 ]

= o (ab–1 ) ...(1)

Further am – 2 bn = a–2 am bn = a–2 ba [Q ba = am bn]

= a–2ba2−1 = a–2 b a–1 a2

= (a2 )–1 (ba–1 ) a2.

o (am – 2bn ) = o [(a2 )–1 (ba–1 ) a2] = o (ba–1 )

= o[(ba–1 )–1 ] [Since o (a–1 ) = o (a)]

= o[(a–1 )–1 b–1 ]

= o (ab–1 ). ...(2)
m n– 2 –1 m–2 n
From (1) and (2), we have o (a b ) = o (ab ) = o (a b ).

Example 31: Show that any group of elements less than or equal to four must be abelian.
[Rohtak (M.C.A.) 2005, 2008, Delhi (B.E.) 2009]

Solution
1. When a group G of order 1 consisting of one element e(identity element) i.e., G = {e} then it is
obviously an abelian group.
2. When a group G of order 2 consisting of two elements say identity element e and a i.e.
G = {e, a}, then ea = ae = a ⇒ G is abelian
3. A group of order 3 consisting of three element
i.e., G = {e, a, b}, then the composition table will be as:
• e a b
e e a b
a a a2 ab

b b ab b2
Algebraic Structures 195

Since in any row of composition table of group, there exists every element once, then
Either a2 = e or ab = e.
And ba = e or b2 = e .
Now, if a2 = e then ab = b
But ab = a ⇒ a = e, which is impossible [Q a ≠ e]
Therefore ab = e and thus a2= b.
Similarly since in any column of composition table, there exists every element once, then b2 ≠ e.
Thus ba = e and b2 = a
Then the composition table as under:
• e a b
e e a b
a a b e
b b e a

Therefore ab = ba
∴ G is an abelian group.
4. A group of order 4 consisting of four element i.e. G = {e, a, b, c}.
Therefore the composition table as under:
e a b c
e e a b c
a b a2 ab ac

b b ba b2 bc

c c ca cb c2

The identity element e is its own inverse. Thus there should be atleast one element in G which is its own
inverse.
Let a–1 = a, b–1 = b and c–1 = c, then it is definite that G is abelian.

It b–1 = c, then c–1 = b and so bc = e = cb.

Also a–1 = a ⇒ aa = e ⇒ a2 = e
Since in any row of the composition table of group G there exist every element once, thus in the second
row, either
ab = b or ab = c
and either ac = c or ac = b
But ab = b ⇒ a=e
Which is a contradiction because a ≠ e
Thus ab = c and so ac = b
Similarly, since in any column there exists every element once. Therefore in the second column,
either ba = b or ba = c
196 Discrete Mathematical Structures

and either ba = c or ca = b
But ba = b ⇒ a = e
Which is a contradiction, because a ≠ e
Thus ba = c and so ca = b
Therefore ab = c = ab, bc = e = cb,
ca = b = ac
The composition table as under:
. e a b c
e e a b c
a a e c b
b b c a e
c c b e a

Hence G is abelian.

Example 32: Show that the set G = {1, – 1} with respect to multiplication operation, that is the algebraic
structure ({1, – 1}), .) is a finite abelian group of order 2.
Solution: The assumption table for the set G is as under:
. 1 –1
1 1 –1
–1 –1 1

1. Closure Property: Since every element of the table is in G, so G is closed with respect to
multiplication.

2. Associative Law: Since all elements of G are integers, so multiplication operation obeys
associative law.
3. Existence of Identity: From multiplication table, ∃ 1 ∈G such that
1. a = a = a.1 V a ∈ G,
Since the external column is identical to the column corresponding to 1.

4. Existence of Inverse: For 1 ∈G, ∃ 1 ∈ G : 1 . 1 = 1 = 1. 1 and for –1 ∈ G, ∃ – 1 ∈ G:


–1 –1
(–1). (–1) = 1 = (–1). (–1). Thus, we have 1 = 1 ∈G and (–1) = – 1 ∈G, i.e., the inverse of
each element of G is in G itself. Also, the number of elements in G is 2. Hence G is a finite abelian
group with respect to multiplication composition.

Example 33: Prove that any group of three elements is necessarily abelian.
Solution: Let G = {e, a, b}, where e is the identity element, clearly, e–1 = e. Now, if a–1 = a and b–1 = b then
by Ex. 40, G is an abelian group.

Now, Let a–1 ≠ a and b–1 ≠ b. Since a–1 , b–1 ∈ G, so for the inverse of a and b there are two possibilities:

(i) a–1 = e or a–1 = b; and (ii) b–1 = e or b–1 = b.


Algebraic Structures 197

Now a–1 = e ⇒ (a–1 )–1 = e–1 [Q e–1 = e]


⇒ a=e
But a ≠ e, because a and e are distinct elements of G. Therefore, a–1 = b similarly b–1 = a.
Again, ab = aa–1 = e and ba = bb–1 = e
⇒ ab = ba
and by definition of e
ae = a = ea, be = b = eb.
Thus, all the three elements of G commute with each other. Hence G is an abelian group.

Example 34: Does the following table show a group? If yes, then what is the identity element?
* 0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 1 2
3 0 3 2 1

Solution: Let G = {0, 1, 2, 3}


1. Closure Property: Since all elements of the closure table are elements of G, so the operation
‘ ∗ ’ is closed in G.
2. Associative Law: Since
1 ∗ (2 ∗3) = 1 ∗ 2 = 2 and (1 ∗ 2) ∗ 3 = 2 ∗ 3 = 2
i.e., 1 ∗ (2 ∗ 3) = (1 ∗ 2) ∗ 3 etc.
Hence the operation ‘*’ obeys associative law in G.

3. Existence of Identity: The identity element of G is 1, because the external column is identical
to the column of 1, i.e. 1 ∗ a = a = a ∗1 V a ∈ G.

4. Existence of Inverse: In G, the inverse of all elements except 0 exist.

Hence (G, ∗ ) does not show a group. However, 1 ∈G is its identity element.

Example 35: If G is a group, a ∈ G and am = e, then prove that o (a)| m .

Solution: Let o (a) = n, Then an = e, where e is the identity element of G and n is the least positive integer.
According to the question, am = e , so n ≤ m.
Now, by the method of division algorithms,
m = nq + r, where q, r ∈ I and 0 ≤ r < n.

∴ am = anq+ r = (an )q. ar = (e)q. ar = e. ar = ar


Therefore am = e ⇒ ar = e, 0 ≤ r < n .
But n is the least positive integer for which an = e, so it is not possible for any positive integer r smaller than
n for which ar = e.
198 Discrete Mathematical Structures

Therefore ar = e ⇒ r = 0
Hence m = nq, q ∈ I ⇒ n| m or o (a)| m.

5.10 Subgroup [U.P.T.U. (B.Tech.) 2008]

Definition: A non-empty subset H of a group G is called a subgroup of G, if


(i) H is stable for the composition in G, (ii) H is a group for the composition in G.

Remark 1: According to definition of subgroup each subgroup is a complex but every complex is not
necessarily a group.

Remark 2: Every group (G, ∗) whose order is greater than one has at least two different subgroups:
(i) The subset consisting of the identity element alone with ‘∗’ i.e., {(e), * }.
(ii) The entire set G with ‘ ∗ ’ i . e. , (G, ∗ ) .

These two subgroups are known as improper subgroups or trivial subgroups of G.


A subgroup other than these two subgroups is known as Proper Subgroup or non-trivial Subgroup of G.
Remark 3: If (G, ∗ ) is a group and (H , ∗ ) is a subgroup of (G, ∗ ), then we write as:
(H , ∗ ) ⊆ (G, ∗ ).
The symbol ⊆ stands for “ is the subgroup of ”.

Remark 4: The identity of the subgroup H is the same as that of G. For if e′ and e are the identities of H and
G respectively, then
a ∈ H ⇒ e′ a = a
and a ∈G ⇒ e a = a
Now e ′ a = ea ⇒ e ′ = e.
Remark 5: The inverse of a ∈ H is the same as the inverse of an element of G. For if b and c are the two
inverse then
b a = e ′ and ca = e
ba = ca ⇒ b = c [Q by remark 4: e=e′]
Remark 6: The order of an element a ∈ H is the same as the order of that as an element of G.

Remark 7: If H is a subgroup of G and K is a subgroup of H then K is a subgroup of G.

Theorem 16: If H and K are any elements of a group G, then


(HK )–1 = K –1 H –1
Proof: Let x be any arbitrary element of (HK )–1 , then x = (hk )–1 V h ∈ H , k ∈ K
= k –1 h –1 ∈ K –1 H –1 [Q k –1 , h –1 , ∈ H –1 ]
∴ (HK )–1 ⊆ K –1 H –1 .
Again, Let y be any arbitrary element of K –1 H –1 , then y = k –1 h –1 , k ∈ K , h ∈ H
= (hk )–1 ∈ (Hk )–1 [Q h k ∈H K]
–1 –1 –1
∴ K H ⊆ (HK )
–1
Hence (HK ) = K –1 H –1 .
Algebraic Structures 199

Theorem 17: If H is any subgroup, then HH=H.


Proof: Let h1 h2 be any element of HH, where h1 ∈ H and h2 ∈ H.
Since, H is a subgroup of G, therefore
h1 h2 ∈ H H ⇒ h1 h2 ∈ H .
∴ H H ⊆ H.
Now, let h be any element of H, then, we can write
: h = he, where e is the identity of G.
Now h ∈ H , e ∈ H ⇒ he ∈ HH
⇒ H ⊆ H H.
Hence H = HH .

Theorem 18: If H is any subgroup of G, then H –1 = H . Also show that the converse is not true.

Proof: Let h –1 be any arbitrary element of H –1 , then h ∈ H .


Now H is a subgroup of G, therefore.
h ∈ H ⇒ h –1 ∈ H
Thus h –1 ∈ H –1 ⇒ h –1 ∈ H
Therefore H –1 ⊆ H .
Again, h ∈ H ⇒ h –1 ∈ H [Q H itself is a group]
⇒ (h –1 )–1 ∈ H –1 [by definition of H –1 ]
⇒ h ∈ H –1
∴ H ⊆ H –1

Hence H –1 = H .

If H is a complex of a group G and H –1 = H , then, it is not necessary that H is a subgroup of G. For example,
H = {–1} is a complex of the multiplicative group G = {–1, 1}. Also H –1 = {–1}, since –1 is the inverse of 1 in
G. But H = {–1} is not a subgroup of G. Since ((–1)– 1) = 1 ∉ H, therefore H is not closed with respect to
multiplication.

5.10.1 Criterion For A Complex to be a Subgroup


Theorem 19: A non-empty subset H of the group G is a subgroup of G, if and only if
(i) a ∈ H, b ∈ H ⇒ a b ∈ H.
(ii) a ∈ H ⇒ a–1 ∈ H where a–1 is the inverse of a in G.
Proof: The condition are necessary. Let H is a subgroup of G, then H must be closed with respect to
multiplication i.e. the composition in G. Therefore,
a ∈ H, b ∈ H ⇒ a b ∈ H.
Thus the condition (i) satisfies.
Let a ∈ H and let a–1 be the inverse of a in G, then the inverse of a group, therefore each element of H must
possess inverse. Therefore.
a ∈ H ⇒ a–1 ∈ H

Thus the condition (ii) satisfies.


200 Discrete Mathematical Structures

The condition are sufficient. Let H be a non-empty subset of a group G such that the condition (i) and
(ii) satisfy. We are to prove that H is a subgroup of G.

1. Closure Property: Since a ∈ H , b ∈ H ⇒ a b ∈ H [by condition (i)]


Therefore, H is closed with respect to multiplication.

2. Associativity: Let a, b, c ∈ H arbitrarily, then V a, b, c ∈ H ⇒ a, b, c ∈ G [Q H⊆ G]


⇒ (ab) c = a(bc) [by associative law in G]
Thus (ab) c = a(b c) V a, b, c ∈ H
3. Existence of Identity: The identity of the subgroup is the same as the identity of the group.
Now a ∈ H ⇒ a–1 ∈ H [by condition (ii)]
–1 –1
Again a ∈ H, a ∈ H ⇒ aa ∈H [by condition (i)]
∴ The identity e is an element of H.

4. Existence of Inverse.
Since, a ∈ H ⇒ a–1 ∈ H [by condition (i)]
Therefore, each element of H possess inverse.
Hence, H itself is a group for the composition in G.
So, H is a subgroup of G.

Theorem 20: A necessary and sufficient condition for a non-empty subset H of a group to be a subgroup is
that
a ∈ H , b ∈ H ⇒ ab–1 ∈ H
Where b–1 is inverse of b in G.
Proof: The condition is necessary. Suppose H is a subgroup of G. Let a ∈ H , b ∈ H . Now each element
of H must possess inverse because H itself is a group.
∴ b ∈ H ⇒ b–1 ∈ H .
Further H must be closed with respect to multiplication i.e. the composition in G. Therefore
a ∈ H , b ∈ H ⇒ a ∈ H , b–1 ∈ H ⇒ ab–1 ∈ H .
Thus the condition (i), satisfies.
The condition is sufficient. Let H be the non-empty subset of group G such that
a ∈ H , b ∈ H ⇒ ab–1 ∈ H ...(1)
We are to prove that H is subgroup of G.

1. Existence of Identity: We have a ∈ H , a ∈ H ⇒ aa–1 ∈ H [by condition (1)]

⇒ e ∈H .

Thus, the identity e is an element of H.

2. Existence of Inverse: Let a be any element of H, then by the condition (1), we have
e ∈ H , a ∈ H ⇒ ea–1 ∈ H ⇒ a–1 ∈ H

Thus, each element of H possesses inverse.


Algebraic Structures 201

3. Closure Property:
Let a, b ∈ H, then b ∈ H ⇒ b–1 ∈ H
Thus a, b ∈ H ⇒ a, b–1 ∈ H ⇒ a(b–1 )–1 ∈ H [by the condition (1)]
⇒ ab ∈ H .
Therefore, H is closed with respect to the composition ‘.’ in G

4. Associativity: The associative law satisfies in H, because


V a, b, c ∈ H ⇒ a, b, c ∈ G [Q H ⊆ G]
⇒ (ab)c = a(bc) [by associativity in G]
∴ In H, (ab)c = a(bc) V a, b, c ∈ H .
Hence, H itself is a group for the composition in G. Therefore H is a subgroup of G.
Cor. 1: A necessary and sufficient condition for a non-empty subset H of a group to be a subgroup is that
HH –1 ⊆ H

Proof: The condition is necessary. It is given that H is a subgroup of G. Let ab–1 be element of HH –1
Then a ∈ H, b ∈ H.
Since H itself is a group, therefore
b ∈ H ⇒ b–1 ∈ H
Thus a ∈ H , b–1 ∈ H ⇒ ab–1 ∈ H [by closure property]
–1 –1 –1
∴ ab ∈ HH ⇒ ab ∈H.
Hence HH –1 ⊆ H .

The condition is sufficient. Let H be a non-empty subgroup of G such that


HH –1 ⊆ H ...(1)
Let a, b ∈ H . Then
a b ∈ H ⇒ ab–1 ∈ HH –1 [by definition of HH –1 ]
⇒ ab–1 ∈ H [by condition (1)]
–1
∴ a ∈ H , b ∈ H ⇒ ab ∈ H . Hence, H is a subgroup of G .

Cor. 2: A necessary and sufficient condition for a non-empty subset H of a group G to be a subgroup is that
HH –1 = H

Proof: The condition is necessary. Suppose H is a subgroup of G. Therefore (H , .) itself is a group.

Let h ∈ HH –1 arbitrary, then

h ∈ HH –1 ⇒ ∃ a ∈ H , b–1 ∈ H –1 such that h = ab–1 .


⇒ a, b ∈ H such that h = ab–1 [Q x ∈ H ⇔ x –1 ∈ H –1 ]
⇒ a, b–1 ∈ H such that h = ab–1 [Q H is a subgroup]
–1 –1
⇒ ab ∈ H such that h = ab [Q H is a subgroup]
⇒ h ∈H
⇒ HH –1 ⊆ H ...(1)
202 Discrete Mathematical Structures

Now, H is a subgroup of G, therefore e ∈ H . If h is any arbitrary element of H, then


h = he = he–1 ∈ HH –1 [Q h ∈ H , e–1 ∈ H –1 ]
∴ H ⊆ HH –1 .
Hence HH –1 = H .
The condition is sufficient. Suppose H is a non-empty subset of group G such that
HH –1 = H
We have to prove that H is a subgroup of G, therefore,
a, b ∈ H ⇒ ab–1 ∈ H .
a, b ∈ H ⇒ a ∈ H , b–1 ∈ H –1 [by definition of H –1 ]
⇒ ab–1 ∈ HH –1 ⇒ ab–1 ∈ H . [Q HH –1 = H ]
Hence, H is a subgroup of G.

5.10.2 Criterion In the Case of Finite Complexes


Theorem 21: Let ( A, ∗ ) be a group and B a subset of A. If B is a finite set then (B, ∗ ) is a subgroup of ( A, ∗ ) if
∗ is a closed operation on B. [R.G.P.V. (B.E.) Bhopal 2006; 2009]
Proof: Suppose B is a non-empty finite subset of A and B is closed under ∗ operation i.e.,
a ∈ B , b ∈ B ∈ a ∗ b ∈ B.
Then to prove that B is a subgroup of A.
1. Closure Property: Let a, b ∈ B arbitrarily, then
a, b ∈ B ⇒ a ∗ b ∈ B [by the given condition]
Thus B is closed with respect to multiplication
2. Associativity: Let a, b, c ∈ B , then
V a, b, c ∈ B ⇒ a, b, c ∈ A [Q B ⊆ A]
⇒ (a ∗ b) ∗ c = a ∗ (b ∗ c) [by associativity in A]
∴ In B, (a ∗ b) ∗ c = a ∗ (b ∗ c) V a, b, c ∈ B
3. Existence of Identity: Let e be the identity of A. By the given condition, we have
a ∈ B, a ∈ B ⇒ a2 = a ∗ a ∈ B
⇒ a3 = a2 ∗ a ∈ B
⇒ a4 = a3 ∗ a ∈ B
Proceeding in this way, we get am ∈ B, where m is any positive integer. Thus the infinite collection of
elements a, a2 a3 K am K belongs to B. If all these elements are distinct B will be an infinite set. But B is a
finite positive integers r and s (r > s ) we must have,
ar = as ⇒ ar ∗ a– s = as ∗ a– s [Q as ∈ A ⇒ (as )–1 i . e. , a– s ∈ A]
⇒ ar – s = a0 = e, where e is the identity of A
⇒ ar − s = e, where r. s is a positive integer
r–s
⇒ e=a ∈B
⇒ e ∈B .
0
Therefore, the identity e i.e., a is also on element of B.
Algebraic Structures 203

4. Existence of Inverse
Now r − s ≥ 1 ⇒ r − s −1 ≥ 0
⇒ ar − s −1 ∈ B
⇒ ar – s ∗ a–1 ∈ B
⇒ e ∗ a–1 ∈ B
⇒ a–1 ∈ B
Thus a ∈ B ⇒ a–1 ∈ B V a ∈ B i.e. each element of B possesses inverse.
Finally, the element of B are also the element of A. Therefore the composition in B must be associative.
Hence B is a subgroup of A.

5.10.3 Criterion for the Product of two Subgroup to be a Subgroup


Theorem 22: If H and K are subgroup of a group G then HK is a subgroup of G iff HK = KH .
Proof: Suppose HK = KH . To prove that HK is a subgroup of G, it is sufficient to prove that
(HK )(HK )–1 = HK .
We have,
(HK )(HK )–1 = (HK )(K –1 H –1 ) = H (KK –1 )H –1
= (HK )H –1 [Q K is a subgroup of G ⇒ KK –1 = K ]
= (KH )H –1 [Q HK=KH]
= K (HH –1 ) [by associativity]
= KH [Q H is a subgroup of G ⇒ HH –1 = H ]
∴ HK = KH ⇒ HK is a subgroup of G.
Converse: Let HK is a subgroup. Then
(HK )–1 = HK ⇒ K –1 H –1 = HK
⇒ HK = HK [Q K is a subgroup of G ⇒ K –1 = K and similarly H –1 = H ]

5.10.4 Intersection of Subgroup


Theorem 23: If H1 and H 2 are two subgroups of a group G, then H1 ∩ H 2 is also a subgroup of G.
[U.P.T.U. (B.Tech.) 2004, 2007, 2009]

OR

Intersection of two subgroups of a group G, is a subgroup of G. [Rohtak (B.E.) 2006, 2009]


Proof: Suppose H1 and H 2 be any two subgroup of G. Then
H1 ∩ H 2 ≠ φ .
Since at least the identity element e is common to both H1 and H 2 . In order to prove that H1 ∩ H 2 is a
subgroup it is sufficient to prove that
a ∈ H1 ∩ H 2, b ∈ H1 ∩ H 2 ⇒ ab–1 ∈ H1 ∩ H 2 .
204 Discrete Mathematical Structures

Now a ∈ H1 ∩ H 2 ⇒ a ∈ H1 and a ∈ H 2
b ∈ H1 ∩ H 2 ⇒ b ∈ H1 and b ∈ H 2.
But H1 , H 2 are subgroups, therefore
a ∈ H1 , b ∈ H1 ⇒ ab–1 ∈ H1
a ∈ H 2, b ∈ H 2 ⇒ ab–1 ∈ H 2
Finally ab–1 ∈ H1, ab–1 ∈ H 2 ⇒ ab–1 ∈ H1 ∩ H 2.
Thus a ∈ H1 ∩ H 2, b ∈ H1 ∩ H 2 ⇒ ab–1 ∈ H1 ∩ H 2.
Hence H1 ∩ H 2 is a subgroup of G.

Theorem 24: Union of two subgroup is not necessarily a subgroup. [U.P.T.U. (B.Tech.) 2007]

Proof: Suppose G be the additive group of integer. Then


H1 = {0, ± 2, ± 4, ± 6 . . . ) and H 2 = {0, ± 3, ± 6, ± 9, . . . ]
are both subgroups of G.
We have H1 ∪ H 2 = {0, ± 2, ± 3, ± 4, ± 6, ± 9. . . }
Obviously H1 ∪ H 2 is not closed with respect to addition since 3 ∈ H1 ∪ H 2 is not closed with respect to
addition since 3 ∈ H1 ∪ H 2 , 4 ∈ H1 ∪ H 2 But 3 + 4 = 7 ∈ H1 ∪ H 2
Therefore, H1 ∪ H 2 is not a subgroup of G.
However, H1 ∩ H 2 = {0, ± 6, ± 12, ± 18, . . . } is a subgroup of G.

Example 36: Let H be a subgroup of a group G, K is defined by K = { x ∈ G: x H = H x}.


Prove that K is a subgroup of G.
Solution: Let x1 , x 2 ∈ K arbitrarily, then
x1 H = Hx1 , x 2H = Hx 2 ...(1)
Firstly we shall show that x 2–1 ∈ K .
Here x 2H = Hx 2 ⇒ x 2–1 ( x 2H )x 2–1 = x 2–1 (Hx 2 )x 2–1

⇒ Hx 2–1 = x 2–1 H
⇒ x 2–1 ∈ K . ...(2)
Now, we shall show x1 x 2–1 ∈K

Here ( x1 x 2–1 ) H = x1 ( x 2–1 H ) [by Associativity]

= x1 (Hx 2–1 ) [from (2)]

= ( x1 H )x 2–1 [by Associativity]

= (Hx1 )x 2–1 [from (1)]

= H ( x1 x 2–1 ) [by Associativity]

∴ x1 x 2–1 ∈ K .

Thus x1 , x 2 ∈ K ⇒ x1 x 2–1 ∈ K .

Hence, K is a subgroup of G.
Algebraic Structures 205

Example 37: Prove that if G is an abelian group with identity e, then the element of G satisfying the equation
x 2 = e from a subgroup H of G . [M.K.U. (B.E.) 2008, M.K.U. (M.C.A.) 2005]

Solution: Let H = { x ∈ G: x 2 = e} .
Now x 2 = e ⇒ x = x –1
Then, if x ∈ H , then x –1 ∈ H and e2 = e
Therefore e ∈H
Let x, y ∈ H . Since G is abelian, therefore,
x y = y x = y –1 x –1 = ( xy )–1 [Q x = x –1 , y = y –1 ]
Thus ( xy )2 = e ⇒ xy ∈ H
Hence, H is a subgroup of G.

Example 38: If a ∈ G, we define the normalizer of a in G by the set


N (a) = { x ∈ G: xa = ax}.
Show that N (a) is a subgroup of G.
Solution: Let x, y = N (a).
Then xa = ax, ya = ay
Now ya = ay ⇒ y –1 ( ya)y –1 = y –1 (a y ) y –1
ay –1 = y –1 a
y –1 ∈ N (a).
Also ( xy –1 ) a = x( y –1 a) = x(ay –1 ) [Q y –1 a = ay –1 ]
= ( x a)y –1 = (ax )y –1 [Q xa = ax]
–1
= a ( xy )
–1
⇒ xy ∈ N (a).
–1
∴ x, y ∈ N (a) ⇒ x y ∈ N (a) V x, y ∈ N (a).

Hence N (a) is a subgroup of G.

Example 39: Show that union of two subgroup is a subgroup if and only if one is contained in the other.
Solution: Suppose, H1 and H 2 are the two subgroup of group G. Let H1 ⊆ H 2 or H 2 ⊆ H1 . Then H1 ∪ H 2=H 2
or H1 . But H1 , H 2 are subgroups and therefore H1 ∪ H 2 is also a subgroup.
Conversely. Suppose H1 ∪ H 2 is subgroup. We are to prove that
H1 ⊆ H 2 or H 2 ⊆ H1 .
Let us assume that H1 is not a subset of H 2 and H 2 is also not a subset of H1 .
Now H1 is not a subset of H 2 ⇒ ∃ a ∈ H1 and a ∈
/ H2 ...(1)
and H 2 is not a subset of H1 ⇒ ∃ b ∈ H 2 and b ∈
/ H1 ...(2)
From (1) and (2), we have a ∈ H1 ∪ H 2 and b ∈ H1 ∪ H 2.
Since H1 ∪ H 2 is a subgroup.
Therefore ab = c (say) is also an element of H1 ∪ H 2.
But ab = c ∈ H1 ∪ H 2
⇒ ab = c ∈ H1 or H 2.
206 Discrete Mathematical Structures

Suppose, ab = c ∈ H1 , then b = a–1 c ∈ H1 ,

[Since H1 is a subgroup, therefore a ∈ H1 ⇒ a–1 ∈ H1 ]


But from (2), we have b ∈
/ H1 which is a contradiction.
Again, ab = c ⊆ H 2, then a = c b–1 ∈ H 2

[Since H 2 is a subgroup, therefore b ∈ H 2 ⇒ b–1 ∈ H 2]


But from (1), we have a ∈
/ H 2, which is a contradiction.
Hence, either H1 ⊆ H 2 or H 2 ⊆ H1 .

Example 40: If G is a group, the centre of G is defined by the set Z(G ) = {z ∈ G: zx = xz V x ∈ G}


then prove that Z(G ) is a subgroup of G.
Solution: Let z1 , z2 ∈ Z(G ), then
z1 x = xz1 , z2 x = xz2 V x ∈G.

Now xz1 = z1 x = z1 (z2–1 z2 x ) V x ∈ G

= z1 z2–1 (z2 x ) = z1 z2–1 ( x z2 ) [Q z2 x = xz2]

∴ ( xz1 )z2–1 = z1 z2–1 ( xz2 )z2–1

or x(z1 z2–1 ) = z1 z2–1 x(z1 z2–1 ) = (z1 z2–1 ) = x V x ∈ G.

∴ z1 , z2 ∈ Z(G ) ⇒ z1 z2–1 ∈ Z(G ).

Hence Z(G ) is a subgroup of G.

5.11 Cyclic Group [U.P.T.U. (B.Tech.) 2009]

A group (G, • ) is called cyclic if for a ∈ G, every element x ∈ G is of the form an, where n is some integer.
Symbolically, G = {an | n ∈ I}.

The element a is then called a generator of G. We may occur more than one generator of a cyclic group. If G
is a cyclic group generated by a then we write G = {a} or G = {a}.

Illustration: The multiplicative group G = {1, – 1, i , – i ) is cyclic.


We can write G = {i , i 2, i 3 , i 4 }

Thus G is a cyclic group and the generator this group is i. Also we can write
G = {–i , (–i )2, (–i )3 , (–i )4 }.

Thus –i is also a generator of G.

Illustration: The multiplicative group of the three cube roots of unity viz., {ω,ω 2, ω 3 = 1} is a cyclic group of
order 3. The generators of this group are ω and ω 2.
Algebraic Structures 207

Illustration: The group G = ({0, 1, 2, 3, 4, 5}, + 6 ) is cyclic group. Here the generators are 1 and 5.
We see that
11 = 1, 12 = 1 + 61 = 2, 13 = 1 + 612 = 3, 14 = 1 + 613 = 1 + 6 3 = 4, 15 = 1 + 614 = 5,

16 = 1 + 615 = 1 + 6 5 = 0 .

Therefore G = {1, 12,13 ,14 ,15, 16 = 0}

Illustration: The multiplicative group n-nth roots of unity,


i . e., G = (e2πri/ n, r = 0, 2K , (n − 1)}, . )

is cyclic group a generator being e2π ri/ n

5.12 Simple Properties of Cyclic Group [R.G.P.V. (B.E.) Bhopal 2002]

Theorem 25: Every cyclic group is an abelian group. [Rohtak (B.E.) 2007]
Proof: Let G = {a} be a cyclic group, generated by a. Let x, y ∈ G arbitrarily, then there exists integers r and
s such that
x = ar , y = as
Therefore xy = ar as = ar + s [by law of indices]
s+ r s r
=a = a a = yx
∴ xy = yx V x, y ∈ G
Hence, G is an abelian group.

Theorem 26: If a is a generator of a cyclic group G, then a–1 also a generator of G.


[P.T.U. (B.E.) Punjab 2006, 2008]
r
Proof: Let G = {a} be a cyclic group, generated by a and a be an element of G, where r is some integer.

Then, we can write ar = (a–1 )– r . Since r is an integer, therefore –r is also an integer. Therefore every
element of G is generated by a–1 . Thus a–1 is also a generated of G.

Theorem 27: Every subgroup of a cyclic group is cyclic.


[Kurukshetra (B.E.) 2008; R.G.P.V. (B.E.) Bhopal 2001; 2005]
Proof: Let G = {a} be a cyclic group generated by ‘ a’. If H = G or (e), then H is cyclic. Let H be a proper
subgroup of G, Then H contains integral powers of ‘ a’. Let as ∈ H ⇒ (as )–1 , i . e. , a– s H

Let m be the least positive integer, such that am ∈ H . Then we shall prove that H = {am }, i.e., H is cyclic
group generated by am .
Suppose at ∈ H arbitrarily. By division algorithm, ∃ integers q and r such that
t = mq + r, 0 ≤ r < m
Now am ∈ H ⇒ (am )q ∈ H [by closure property]
mq
⇒ a ∈H
mq –1
⇒ (a ) ∈H
208 Discrete Mathematical Structures

⇒ a– mq ∈ H

Also at ∈ H and a– mq ∈ H ⇒ at a– mq ∈ H
⇒ at – mq ∈ H
⇒ ar ∈ H [Q r = t − mq]
m
Now, m be the least positive integer such that a ∈ H and 0 ≤ r < m.

Then r = 0, therefore t = mq.


∴ a = amq = (am )q.

Thus every element at ∈ H is of the form of (am )q. So H is cyclic having am as its generator.

Example 41: Find the generator of cyclic group G = {a, a2, a3, a4 = e} [M.K.U. (M.C.A.) 2004, 2006, 2009]

Solution: The generator of this cyclic group is of order 4 as a4 = e. The generator of this cyclic group are
all the elements a p where p are 1 and 3. Therefore a and a3 are the generators of the given cyclic group.

Example 42: How many generators are there of the cyclic group G of order 10.
[Bhopal (M.C.A.) 2004, 2006, 2009]

Solution: Let a be generator of G. Then O (a) = O (G ) = 10

and G = {a, a2, a3 , a4 , a5, a6 , a7 , a8 , a9 , a10 = e}


Then, ak is also a generator of G, if m is prime to 10.
But 1 is prime to 10, therefore a is also a generator of G
3 is prime to 10, therefore a3 is also a generator of G
7 is prime to 10, therefore a7 is also a generator of G
9 is prime to 10, therefore a9 is also a generator of G.
Hence, a, a3 , a7 , a9 be the generator of G.

Example 43: Show that the group G = {1, 2, 3, 4, 5, 6} ×7 is cyclic. How many generators are there.
[Delhi (B.E.) 2006, 2009]

Solution: Let a be generator of G. Then O (a) = O (G ) = 6


Now 31 = 3, 32 = 3 × 7 3 = 2, 33 = 3 × 7 3 × 7 3 = 6
34 = 33 × 7 3 = 4 , 35 = 34 × 7 3 = 5, 36 = 35 × 7 3 = 1

Hence, G is cyclic group with generator 3 i.e.


G = {3, 32, 33 , 34 , 35}

Similarly 5 is also generator of G.

Example 44: Prove any group G of order 3 is cyclic. [Delhi (M.C.A.) 2007]

Solution: Since the order of G is 3, therefore, there are exactly two distinct elements except e ∈ G
Let G = {e, a, b}
Now, a ∈ G, b ∈ G ⇒ ab ∈ G. [Closure]
Algebraic Structures 209

There are possibilities either ab = e or ba = a or ab = b


If ab = a ⇒ b = e, which is contrary to our hypothesis.
Hence ab ≠ a, similarly ab ≠ b
Therefore, ab = e ...(1)
2 2 2 2
Again, as a ∈ G ⇒ a = e or a = a or a = b

⇒ a2 = e then from (1) ⇒ a2 = ab


⇒ aa = ab or a = b Which is again contradiction
2
Therefore, a ≠e
Again ⇒ a2 = a ⇒ a = e
Therefore, a2 ≠ a so that a2 = b

∴ G = {e, a, a2}
Hence a3 = aa2 = ab ⇒ a = e
Hence, G is cyclic and the generation of G is a

5.13 Cosets
Let G be a group on which the group operation is multiplication and H be a subgroup of G. Let a ∈ G then,
the set Ha = {ha : h ∈ H }
is called a right coset of H in G generated by a. If group operation is addition. Then left coset and right coset
of H in G generated by a.
H+ a = {h + a: h ∈ H ] [Right coset]
a+ H = {a + h: h ∈ H ] [Left coset]
Remark: (1) If e be identity of G, then He = H = eH
(2) e ∈ H ⇒ a e ∈ H a ⇒ a ∈ H a, e ∈ H ⇒ ae ∈ aH ⇒ a = Ha

Example 45: If G is an additive group of all integers and H is additive subgroup of all even integers of G, then
find all the cosets of H in G.
Solution: We have G = {0, ± 1, ± 2, ± 3, . . . }
and H = {0, ± 2, ± 4, . . . }
Let 0, 1, 2 ... ∈G then
H + 0 = {0, ± 2, ± 4, ± 6 . . .
H + 1 = {0 + 1, ± 2 + 1, ± 4 + 1 . . . } = {. . . 3, – 1, 1, 3. . . }
H + 2 = {0 + 2, ± 2 + 2, ± 4 + 2, . . . } = {. . . – 4, – 2, 0, 2, 4, . . . . } = H
Hence, H and H +1 are two distinct cosets.
Theorem 28: If H is any subgroup of G and h ∈ H , then Hh = H = hH .
Proof: Let h ∈ H ⊆ G, then we have to show Hh = H and hH = H suppose h′ be any arbitrary element of H.
Then h′ h ∈ Hh
Since H is a subgroup, then
210 Discrete Mathematical Structures

h′ ∈ H , h ∈ H ⇒ h′ h ∈ H
Thus h′ h ∈ H h ⇒ h′ h ∈ H
∴ h′ h ∈ H and h h′ ∈ H h ⇒ H h ∈ H ...(1)
–1 –1
Again h′ = h′ e = h′ (h h) [ h h = e, e + h′ = h′ ]

= (h1 h –1 ) h ∈ Hh [by associativity]


–1
as h′ ∈ H , h ∈ H ⇒ h′ h ∈ H ⊆ H is subgroup.
∴ h′ ∈ H ⇒ h′ ∈ Hh
⇒ H ⊆ Hh ...(2)
From (1) and (2), we get
Hh = H
Similarly, we can find hH = H
Then Hh = H = hH .

Theorem 29: If a and b are any two elements of a group G and H is a subgroup of the group, then
Ha = Hb ⇔ ab–1 ∈ H and aH = bH ⇔ b–1 a ∈ H
Proof: Let H is subgroup of G and a, b ∈ G such that
Ha = Hb
If e be the identity then
e ∈ H ⇒ e a ∈ Ha ⇒ a ∈ Ha
But Ha = Hb ⇒ a ∈ Hb
⇒ ab–1 ∈ Hbb–1

⇒ ab–1 ∈ He

⇒ ab–1 ∈ H

⇒ ab–1 ∈ H
Conversely: Let H is subgroup of G and a, b ∈ H such that ab–1 ∈ H
Then, show Ha = Hb
as ab ∈ H ⇒ H (ab)–1 = H
–1

⇒ H (ab)–1 = Hb [ h ∈Η ⇒ Hh = H ]
⇒ Hae = Hb [ ae = a]
⇒ Ha = Hb
Therefore, Ha = Hb ⇔ ab–1 ∈Η
Similarly, aH = bH ⇔ b–1 a ∈ H

Theorem 30: If a, b are two distinct elements of a group G and H is any subgroup of G, then
a ∈ Hb ⇔ Ha = Hb
and a ∈ bH ⇔ aH = bH
Algebraic Structures 211

Solution: Let a ∈ Hb ⇒ ab–1 ∈ Hbb–1

⇒ ab–1 ∈ He (bb–1 = e)
⇒ ab–1 ∈ H
⇒ Hab–1 ∈ H
⇒ Ha(b–1 b) = Hb
⇒ Hae = Hb [ ae = a]
⇒ Ha = Hb
Conversely, Let Ha = Hb
if a ∈ Ha ⇒ a ∈ Hb
Similarly we can prove a ∈ bH ⇒ aH = bH

Theorem 31: Any two right (left) cosets of a subgroup are either disjoint or identical.
[R.G.P.V. (B.E.) Bhopal 2005; 2008]

Proof: Let H is a subgroup of G and let Ha and Hb be any two right cosets of H in G. Then to show that Ha
and Hb are either disjoint or identical i.e. either Ha ∩ Hb = φ or Ha = Hb. Suppose Ha and Hb are not disjoint.
Then there exists at least one element c such that c ∈ Ha and c ∈ Hb.

Let c = h1 a and c = h2b where h1 , h2 ∈ H


⇒ h1 a = h2b
⇒ h1 h1 a = h1–1 h2b
–1
[Q H is subgroup, h1 ∈ H ⇒ h1–1 ∈Η

⇒ ea = h1–1 h2b [ h1–1 h1 = e]

⇒ a = (h1–1 h2 ) b [ ae = a]

⇒ Ha = H (h1–1 h2 ) b
⇒ Ha = Hb
Therefore, either Ha ∩ Hb = φ or Ha = Hb.
Similarly we can prove that either a H = b H or aH ∩ bH = φ

5.14 Lagrange's Theorem [U.P.T.U. (B.Tech.) 2009]

The order of each subgroup of a finite group is a divisor of the order of the group.
Proof: Let G is finite group of order n i . e. O (G ) = n
i . e. G = {a1 , a2, a3 , . . . an}.
and H is subgroup of G of order m i.e. O (H ) = m
i.e. H = {h1 , h2, h3 , K hm }.

Let a1 ∈ G. Then Ha 1 = {h 1 a 1 , h 2 a 1 , h 3 a 1 ,... h m a 1 } be right coset of H in G generated by a1 having


all distinct elements. Suppose if possible
hia = h j a [by left cancellation law]
⇒ hi = h j
212 Discrete Mathematical Structures

Therefore, each right cost of H in G has m distinct elements but we know the union of all left or right coset
of H in G is equal to group i.e.
G = Ha1 ∪ Ha2 ∪ Ha3 . . . ∪ Hak
Where Ha2 = {h1 a2, h2a2, . . . hm a2}
Ha3 = {h1 a3 , h2a3 , . . . hm a3 }
Hak = {h1 ak , h2ak , . . . hm ak }
Now number of elements in G = number of elements in Ha1 + number of elements in Ha2 + . . . + number of
elements in Hak
⇒ n = m + m + m + . . . + k time
⇒ n = mk
n
⇒ k=
m
O (G )
⇒ k=
O (H )
⇒ O (H ) is divisor of O(G)

Remark: The converse of Lagrange's theorem is not true. If G is finite group of order n and m is a positive
integer, such that m is divisor and m is a positive integer, such that m is divisor of n, then it is not necessary
that G has definitely a subgroup of order m.

Theorem 32: Use Lagrange's theorem to show that any group of prime order can have no proper
subgroup. [R.G.P.V. (B.E.) Raipur 2003, 2005, 2008]

Proof: Let G be a group of prime order p. Let H be subgroup of G and let O (H ) = m, by Lagrange’s theorem
O(H) is a divisor of O (G ) i.e., m is a divisor of p

Since p is prime, therefore either m=1 or m = p

Now m = 1 ⇒ O (H ) = 1 ⇒ H = {e} and m = p ⇒ O (H ) = O (G ) ⇒ H = G


Thus, either H = {e} or H = G

Hence, a group of prime order can have no proper subgroup.

5.15 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 , x hx −1 ∈ H

Theorem 33: A subgroup H of a group G is normal iff x H x –1 = H V x ∈ G.

Proof: Let x H x –1 = H V x ∈ G
⇒ x H x –1 ⊆ H V x ∈ G
⇒ H is normal subgroup of G.
Converse, H is normal subgroup of G. Then
x H x –1 ⊆ H V x ∈ G ...(1)
Algebraic Structures 213

Also, x ∈ G ⇒ x –1 ∈ G
∴ x –1 H ( x –1 ) ⊆ H V x ∈ G ⇒ x –1 H x ⊆ H V x ∈ G
⇒ x( x –1 Hx )x –1 ⊆ xHx –1 V x ∈ G
⇒ H ⊆ x H x –1 ...(2)

From (1) and (2) we have x H x –1 V x ∈ G.

Theorem 34: A subgroup H of a group G is a normal subgroup iff left coset of H in G is a right coset of H in G.
Proof: Let H be a normal subgroup of G
Then x H x –1 = H V x ∈ G ⇒ ( xHx –1 ) x = H x V x ∈G

⇒ x H = H x V x ∈G ⇒ each left coset xH is the right coset H x

Conversely, assume that x H = H x V x ∈ G


Then x H x –1 = H V x ∈ G.

Showing that H is normal subgroup of G.

5.15.1 Simple Group


A group G is called Simple Group if its only normal subgroups are G and {e}.

Theorem 35: Every subgroup of an abelian group


[P.T.U. (B.E.) Punjab 2005, 2009, R.G.P.V. (B.E.) Bhopal 2005, 2008, Rohtak (B.E.) 2005, 2009;
Pune (B.E.) 2007, 2008; Delhi (M.C.A.) 2007, 2009]

Proof: Let G be an abelian group and H is subgroup of G Now x ∈ G, h ∈ H .

⇒ xhx –1 = hxx –1 [∴G is abelian and H ⊆ G]

= he = h
–1
∴ x ∈ G, h ∈ H ⇒ xhx ∈ H , then H is normal subgroup of G.

Theorem 36: The intersection of any two normal subgroup of a group is a normal subgroup.
Proof: Let H and K be two normal subgroup of a group G. Since H and K are subgroups of G, therefore
H ∩ K is also a subgroup of G. Then to show H ∩ K is a normal subgroup of G.
Let x ∈G and n ∈ H ∩ K ⇒ n ∈ H, n ∈ K
Now x ∈G, n ∈ H and H is normal subgroup of G ⇒ xnx –1 ∈ H
Again x ∈ G, n ∈ K and K is normal subgroup of G ⇒ x n x –1 ∈ K
∴ x n x –1 ∈ H , x n x –1 ∈ K ⇒ x n x –1 ∈ H ∩ K
Thus, x ∈ G, n ∈ H ∩ K ⇒ x n x –1 ∈ H ∩ K
Hence, H∩K is a normal subgroup of G.
214 Discrete Mathematical Structures

Example 46: Let Pn be any symmetric group on n symbols. Prove that An is a normal subgroup of Pn.
Solution: Let α ∈ pn and β ∈ An. Since β is an even permutation and α may be odd or even. Then we have to
show that α βα −1is an even permutation.
If α is odd, then α –1 is also odd. Now α β is odd
⇒ αβα −1 is even.
If α is even ⇒ α –1 is also even. Now α β is even ⇒ αβα −1is even
Thus, α ∈Pn, β ∈ An ⇒ αβα −1 ∈ An. Hence An is a normal subgroup of Pn

Example 47: If G is a group and H is a subgroup of Index 2 in G, prove that H is a normal subgroup of G.
Solution: Let H be a subgroup of index 2 in a group G. Then the number of distinct right (left) cosets of H
in G is 2. Let x ∈G. If x ∈ H , then xH = H = Hx.

If x ∈
/ H then Hx is distinct from H and xH is distinct from H. But H is of index 2. Therefore the number of
distinct right (left) costs in right (left) coset decomposition of G will be 2. Therefore the cosets H, Hx, xH
are such that G = H ∪ Hx = H ∪ xH . But there is no element common in H and xH. Therefore we must have

Hx = xH .

Hence H is normal subgroup of G.

5.16 Quotient Group or Factor Group


Let H be normal subgroup of G. The set of all cosets of H in G is known as quotient G/H

i.e. G/H = {Ha: a ∈G}

Theorem 37: The product of two right (left) cosets in G is also right (left) coset in G.
[M.K.U. (B.E.) 2005, 2008, Rohtak (M.C.A.) 2007]

Proof: Let G is group and H is normal subgroup of G.


Then G/H = {Ha : a∈G} be quotient group.
Let Ha, Hb ∈G/H ⇒ (Ha)(Hb) = H (aH )b
= H (Ha)b [ aH = Ha]
= (HH )(ab) [ HH = H ]
= Hab V a ∈ G, b ∈G
= right coset of H in G generated by ab.

Theorem 38: The set of all cosets of a normal subgroup is a group with respect to multiplication.

Proof: Let G/H be the collection of all cosets of H in G i.e. G/H = {Ha: a ∈ G}

Then show G/H formed group if


Algebraic Structures 215

(i) Closure Property: Let a, b ∈G. Then Ha, Hb ∈ G/H

Now, (Ha)(Hb) = H (aH )b = H (Ha)b = HHab = Hab ∈ G/H [Ha = aH , H H = H ]

Now, a ∈G, b ∈G ⇒ ab ∈G then Hab ∈G/H

Thus G/H is closed under multiplication


(ii) Associativity: Let a, b, c ∈G. Then Ha, Hb, Hc ∈ G/H

∴ Ha(HbHc) = Ha(Hbc) = Ha(bc) = H (ab)c [ a(bc) = (ab)c]

= (Hab)Hc

Thus, the product in G/H satisfies = (HaHb)Hc the associative, property.


(iii) Existence of Identity: We have H = He ∈ G/ H , (Ha) ∈G/H ⇒ (He)(Ha) = Ha = (Ha)(He)

Therefore the coset H is the identity element.


(iv) Existence of Inverse : Let Ha ∈G/H ⇒ Ha–1 ∈G/H

such that (Ha)(Ha–1 ) = Haa–1 = He = H


and (Ha–1 )(Ha) = Ha–1 a = He = H
Hence, Ha–1 ∈ G/H is inverse of Ha
Hence, G/H is a group under multiplication of cosets.
O (G )
Theorem 39: If G is finite group H is a normal subgroup of G, then O (G / H ) =
O (H )

Proof: We have
number of elements in G O (G )
O (G / H )=number of distinct right cosets of H is G = =
number of elements in H O (H )

Remark: The number of distinct left (or right) cosets H in G is called index of H in G.

Theorem 40: There exists a one-to-one correspondence between the elements of subgroup H and those of any
cosets of H in G. [U.P.T.U. (M.C.A.) 2005, M.K. U. (B.E.) 2004, 2008, Pune (B.E.) 2007]

Proof: We define a mapping f : H → a H by f (h) = ah V h ∈ H

Let h1 , h2 ∈ H such that f (h1 ) = f (h2 ) ⇒ ah1 = ah2 ⇒ h1 = h2

∴ f is one-one (by left cancellation law)


Every element of aH of the form ah for some h ∈ H .

∴ f is onto

Note: If G is finite group and H is subgroup of G, then for any two left cosets of H in G have the same number
of elements.
216 Discrete Mathematical Structures

Theorem 41: If aH and bH are two distinct left cosets of H in G, then there exists a one to one correspondence
between aH and bH.
Proof: Consider the mapping f : aH → bH
Defined by f (a h) = bh Vh ∈ H
Now f (ah1 ) = f (ah2 ), where h1 , h2 ∈ H
⇒ bh1 = bh2
⇒ h1 = h2 [by left cancellation law]
Thus f is one-one
f is onto mapping, since b h ∈ b H is the f image of ah ∈ aH
Thus f as defined above is a objective mapping from aH in bH.

5.17 Permutation Group of Symmetric Group [U.P.T.U. (B.Tech.) 2006]

Let S be finite set consisting n elements, then the set of all one-one onto mapping from S to S forms a group
with respect to composition of mapping. This group is called Permutation Group or symmetric group on
n symbols of degree n and is denoted by Sn .

If S = {a1 , a2, a3 , . . . an}, then we can write an element f ∈ Sn as


 a1 a2 a3 ..... an 
f = 
 f (a1 ) f (a2 ) f (a3 ) . . . . . f (an )

where f (a1 ), f (a2 )..... f (an )are the f -images of a1 , a2, ... an respectively. So it is permutation of n symbols.

5.17.1 Permutation
A one-one mapping of a finite set S onto itself is called permutation.
The number of elements in a finite set S is known as the degree of permutation. It is denoted by

 a a2 a3 
f = 1  or
 a2 a1 a3 

5.17.2 Equal Permutations


Let S be non-empty set. The permutation f and g defined on S is said to be equal if
f (a) = g(a) V a ∈ S
1 2 3 4  4 1 3 2
Illustration: Let S = (1, 2, 3, 4) and let f =   and g =   , we find
 3 1 2 4  4 3 2 1
f (1) = g(1) = 3 , f (2) = g(2) = 1, f (3) = g(3) = 2, f (4) = g(4) = 4
Algebraic Structures 217

i.e. f (a) = g(a) V a ∈ S

∴ f =g

5.17.3 Total Number of Permutation


If there are n elements in set S. Then total number of permutation is n!

Illustration: Let S = {1, 2, 3} then total number of permutation = 3!=6.


1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 
S 3 =  ,  ,  ,  ,  ,  
1 2 3  2 1 3 1 3 2  3 2 1  2 3 1  3 1 2 

5.17.4 Identity Permutation


Let S be a finite, non-empty set an identity permutation on S denoted by I is defined I(a) = a V a ∈ S

Illustration: Let S = {a1,a2,a3,. . . an}


 a1 a2 a3 . . . an
Then I=  is the identity permutation on S
 a1 a2 a3 K an

5.17.5 Product of Permutations or Composition of Permutations


Let S = (a1 , a2, a3 , K an ) and let

 a1 a2 a3 . . . an   a1 a2 a3 . . . an 
f = , g =   be two arbitrary permutation
 f (a1 ) f (a2 ) f (a3 ) K f (an )  g(a1 ) g(a2 ) g(a3 ) K g(an )
on S. Then composition of f and g is denoted by fg or fog.

such that
 a a2 a3 K an   a1 a2 a3 K an 
fog = fg =  1  
 f (a1 ) f (a2 ) f (a3 ) . . . f (an )  g(a1 ) g(a2 ) g(a3 ) . . . g(an )

 a1 a2 a3 K an 
=  But in generally fog ≠ gof
 f (g(a1 )) f (g(a2 )) f (g(a3 )) . . . f (g(an ))

1 2 3 1 2 3
Illustration: Let S = {1, 2, 3} and f =  ,g=  be two permutation on S then
 2 3 1  3 2 1
1 2 3 1 2 3 1 2 3
fog = fg =     = 
 2 3 1  3 2 1  2 1 3
1 2 3 1 2 3 1 2 3
gof = gf =     = 
 3 2 1  2 3 1 1 3 2
∴ fog ≠ gof .
218 Discrete Mathematical Structures

5.17.6 Inverse of Permutation


If f is a permutation on S = (a1 , a2, a3 , . . . an ) such that

a a2 a3 K an
f = 1 
 b1 b2 b3 . . . bn

then there exists a permutation called inverse f and denoted by f –1 such that fof –1 = f –1 of = I
b b2 . . . bn
where f –1 =  1 
 a1 a2 . . . an

1 2 3 4 5 1 2 3 4 5 –1
Example 48: If A =   ,B =  then find AB, BA and A
 2 3 1 5 4 1 3 4 5 2

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
Solution: We have AB =     = 
 2 3 1 5 4 1 3 4 5 2  3 4 1 2 5

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
BA =     = 
1 3 4 5 2  2 3 1 5 4  2 1 5 4 3
–1
1 2 3 4 5  2 3 1 5 4
A –1 =   = 
 2 3 1 5 4 1 2 3 4 5

Theorem 42: If S a set of n symbols, then the set Sn of all permutation on S is a group with respect to the
operation product of two permutation.
Proof: We know product of two permutations on n symbols is again a permutation. The product of
permutation is associative. The identity permutation I defined on S acts as the identity element of the
group. If f is permutation on S, then f –1 is also a one-one mapping on S onto itself. Hence f –1 is also a
permutation in S such that f f –1 = f –1 f = I. Thus Sn is group.

Note:
(i) The order of S n = n !
(ii) For n ≤ 2, the group S n is abelian for n ≥ 3, the group S n is non-abelian.

5.17.7 Cyclic Permutation


Let S = {a1 , a2, a3 K an} be finite set of n symbols. A permutation f defined on S is said to be cyclic
permutation if f is defined such that
f (a1 ) = a2, f (a2 ) = a3 , f (a3 ) = a4 . . . f (an–1 )) = an and f (an ) = a1 .

1 2 3 4
Illustration: Let S = {1, 2, 3, 4} then f =   is cyclic permutation. It is written as f = (1 2 3 4) .
 2 3 4 1

Illustration: Let (1 3 4 2 6) is cycle of length 5. Suppose it represents a permutation of degree 9 on a set S


consisting of the elements 1, 2, 3 ...9. Then the permutation.
1 3 4 2 6 5 7 8 9
f = 
 3 4 2 6 1 5 7 8 9
Algebraic Structures 219

5.17.8 Transposition
A cycle of length 2 is called Transposition

Remark: 1. Let S = {a1 , a2, a3 K an} f , g, h be cyclic permutation on S. Then

(i) ( f o g )–1 = g –1 o f –1 (ii) ( f o g o h)–1 = h –1 o g –1 o h –1


n!
2. If Sn is a permutation group on n symbols, then of the n! permutation in Sn , are even permutation
2
n!
and are odd permutation.
2
3. The set of all even permutation of degree n form a group under the composition of permutations.
4. The group of even permutation is called Alternating Group.
5. Every permutation may be expressed as the product of transposition in many ways.
6. If f is a cycle of length n, then f can be expressed as the product of (n – 1) transposition, even and
odd permutation.

5.17.9 Even and Odd Permutation


A permutation f is said to be an even permutation if f can be expressed as the product of even number of
transpositions. A permutation f is said to be an odd permutation if f can be expressed as the product of odd
number of transposition.
Remark:
(i) An identity permutation is consider as an even permutation
(ii) A transposition is always odd
(iii) The product of two even permutation is even and also the product of two odd permutation is even.
(iv) The product of an even and an odd permutation is odd. Similarly the product of an odd
permutation and an even permutation is odd.

5.17.10 Disjoint Cycle


Let S = {a1 , a2, a3 , K an}. If f and g are two cycles on S such that they have no element common then f and g

are said to be disjoint cycles.

Illustration: Let S = {1, 2, 3, 4, 5, 6} if f = (1 4 5) and g = (2, 3, 6) Then f and g are disjoint cycle
permutation on S.

Note:
1. The product of two disjoint cycles is commutative
2. Even permutation can be written as a product of disjoint cycles and transposition
220 Discrete Mathematical Structures

Illustration: Let f = (123) and g = (45) be two permutations on 5 symbols 1, 2, 3, ...5. Then
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
f g=    = 
 2 3 1 4 5 1 2 3 5 4  2 3 1 5 4

1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
gf =     = 
1 2 3 5 4  2 3 1 4 5  2 3 1 5 4

∴ f g=g f
1 2 3 4 5 6 7 8 9
Illustration: Let f =  
 2 3 1 4 8 6 9 7 5

be a permutation of degree 9 on the set (1, 2, 3. . . 9)


1 2 3  4  6  5 8 7 9
We have f =         ⇒ f = (1 2 3)(5 8 7 9)(4)(6)
 2 3 1  4  6  8 7 9 5

Example 49: If S = (1, 2, 3, 4, 5, 6)


Compute (5 6 3) 0(4 1 3 5)
 5 6 3  4 1 3 5
Solution: We have (5 6 3) 0 (4 1 3 5) =    
 6 3 5  1 3 5 4

1 2 4 5 6 3  4 1 3 5 2 6
=   
1 2 4 6 3 5  1 3 5 4 2 6

1 2 4 5 6 3 1 3 4 5 6 2
=  =  = (1 3 4)
 3 2 1 6 6 4  3 4 1 6 6 2

Example 50: Express the following permutation as the product of disjoint cycles

g = (1 3 2 5)(1 4 3)(2 5 1)

Solution: We have g = (1 3 2 5)(1 4 3)(2 5 1)

1 3 2 5 4  1 4 3 2 5  2 5 1 3 4
⇒ g=     
 3 2 5 1 4  4 3 1 2 5  5 1 2 3 4

1 3 2 5 4 1 2  3 5 4
=  =    = (1 2)(3 5 4)
 2 5 1 4 3  2 1  5 4 3

 1 2 3 4 5 6 7 8
Example 51: Show that f =   is even
7 3 1 8 5 6 2 4

 1 7 2 3  4 8  5  6
Solution: We have f =        
7 2 3 1  8 4  5  6

⇒ f = (1 7 2 3 )(4 8)(5)(6)
⇒ f = (1 7 )(1 2)(1 3)(4 8)
⇒ f is expressed as product of 4 transposition, therefore f is even permutation.
Algebraic Structures 221

1 2 3 4 5 6 7 8
Example 52: Show that f =   is odd
1 4 3 6 5 8 7 2

1  2 4 6 8  3  5 7
Solution: We have f =          
1  4 6 8 2  3  5 7

f = (2 4 6 8)
⇒ f = (2 4)(2 6)(2 8)
⇒ f is expressed as product of three transposition, therefore f is odd permutation.

Example 53: Define permutation group. Let A = {1, 2, 3, 4, 5}.

Find (1 3) O (2 4 5) O (2 3) [U.P.T.U. (B.Tech.) 2008]

1 3 2 4 5  2 4 5 3 1  2 3 1 4 5
Solution: We have f = O O 
 3 1 2 4 5  4 5 2 3 1  3 2 1 4 5

1 3 2 4 5  2 3 1 4 5
⇒ f = O 
 3 1 4 5 2  3 2 1 4 5

1 3 2 4 5
⇒ f = 
 2 1 4 5 3

⇒ f = (1 2 4 5 3)

Example 54: Find the elements and multiplication table of the symmetric group S3 . [U.P.T.U. (B.Tech.) 2007]

S3 = ( f1 , f 2, f 3 , f 4 , f 5, f 6 )

Solution: Let S = (1, 2, 3) then


S3 = ( f1 , f 2, f 3 , f 4 , f 5, f 6 )
1 2 3 1 2 3 1 2 3
where f1 =   , f2 =   , f3 =  
1 2 3 1 3 2  2 1 3
1 2 3 1 2 3 1 2 3
f4 =   , f5 =   , f6 =  
 2 3 1  3 1 2  3 2 1 [U.P.T.U. (B. Tech.) 2007]

The composition table for S3 are as


Product of f1 f2 f3 f4 f5 f6
Permutation
f1 f1 f2 f3 f4 f5 f6
f2 f2 f1 f4 f3 f6 f5
f3 f3 f5 f1 f6 f2 f4
f4 f4 f6 f2 f5 f1 f3
f5 f5 f3 f6 f1 f4 f2
f6 f6 f4 f5 f2 f3 f1
222 Discrete Mathematical Structures

1 2 3 1 2 3 1 2 3
Here f1 is Identity permutation, Now f 4 f 5 =     =  = f1
 2 3 1  3 1 2 1 2 3

1 2 3 1 2 3 1 2 3
f5 f3 =    =  = f6
 3 1 2  2 1 3  3 2 1

Similarly other entry can be obtain

5.18 Group Homomorphism

5.18.1 Homomorphism [U.P.T.U. (B.Tech.) 2007]

Let (G, ∗ ) and G′ , ∆) be any two groups. A mapping f from G to G′ i.e. f : G → G′ is called a homomorphism
of G to G′ if
f (a ∗ b) = f (a) ∆ f (b) V a, b ∈G.

5.18.2 Homomorphism into


A mapping f from a group G into a group G′ is said to be a homomorphism of G into G′ if
f (a ∗ b) = f (a) ∆ f (b) V a, b ∈ G

5.18.3 Homomorphism onto


A mapping f from a group G onto a group G′ is said to be a homomorphism of G onto G′ if
f (a ∗ b) = f (a) ∆ f (b) V a, b ∈ G.

Illustration: Let G be a group of all real numbers under addition and let G′ be the group of non-zero real
numbers under multiplication and f : G → G′ defined by f (a) = 2aV a ∈ G, then it is homomorphism because.

f (a + b) = 2a+ b = 2a2b = f (a) f (b) [U.P.T.U. (B.Tech.) 2007]

Illustration: Let G be a group of integers under addition and G′ = G, and let f ( x ) = 3x V x ∈ G , then
f ( x + y ) = 3( x + y ) = 3x + 3y = f ( x ) + f ( y )

Therefore f is homomorphism. [U.P.T.U. (B.Tech.) 2007]

5.19 Isomorphism of Groups [U.P.T.U. (B.Tech.) 2007]

Let (G, ∗ ) and (G′ , ∆ ) be two groups. A mapping f : G → G′ defined by f (a∗ b) = f (a)∆f (b) is called
Isomorphism, if f is a one-one and onto mapping. We can say a one-one onto homomorphism is an
isomorphism. Thus every isomorphism is necessarily a homomorphism. But converse is not true.
Algebraic Structures 223

5.19.1 Endomorphism
Let (G, ∗ ) be a group. A mapping f : G → G′ is called endomorphism if f (a ∗ b) = f (a) ∗ f (b)

5.19.2 Automorphism
Let (G, ∗ ) be a group. A mapping f : G → G defined by f (a ∗ b) = f (a) ∗ f (b) is called automorphism if f is
objective mapping.

5.19.3 Kernel of Homomorphism


If f is a homomorphism of a group G into a group G′, then the set K of all those elements of G which are
mapped by f onto the identity e′ of G′ is called the Kernel of the Homomorphism

Thus if f is a homomorphism of G into G′, then k is the kernel of f if

k = { x ∈ G: f ( x ) = e ′, where e′ is the identity of G′}

5.20 Properties of Homomorphism and Isomorphism


Theorem 43: Let f be a homomorphic (or an isomorphic) mapping of a group G into a group G′ . Then we
have the following important properties.
(i) The f-image of the identity e of G is the identity of G′ i.e. f (e) is the identity of G′
(ii) The f -image of the inverse of an element a of G is the inverse of the f-image of a i.e.
f (a–1 ) = [ f (a)]–1
(iii) The order of the f -image of an element is the same as the order of the element.
[U.P.T.U. (B.Tech.) 2003, 2006, 2009; U.P.T.U. (M.C.A.) 2002, 2004]

Proof: (i) Let e and e′ be identity of G and G′ respectively.

Let a ∈ G ⇒ f (a) ∈ G′ [ f : G s G′ ]
Now e ′ f (a) = f (a) = f (ae) [ae=a]

= f (e) f (a) [ f is homomorphism or isomorphism]

⇒ e ′ = f (e) [right cancellation law)


∴ f (e) is identity of G′
(ii) If e is the identity of G ⇒ f (e) is identity of G′. If a–1 is the inverse of a in G, then

a–1 a = e = aa–1
Now, a–1 a = e ⇒ f (a–1 a) = f (e)

⇒ f (a–1 ) f (a) = f (e) [f is homo or isomorphism]

Again aa–1 = e ⇒ f (aa–1 ) = f (e)

⇒ f (a) f (a–1 ) = f (e)


224 Discrete Mathematical Structures

∴ f (a–1 ) f (a) = f (e) = f (a) f (a–1 )

⇒ f (a–1 ) = [ f (a)]–1
(iii) Let e be identity of G, then f (e) is the identity of G′. Let the order of a ∈ G be finite and it be
equal to n i.e. o (a) = n. Then

an = e ⇒ f (an ) = f (e)
⇒ f (a a a K aK n time)= f (e)
⇒ f (a) f (a) K f (a)K n time = f (e) . [f is isomorphism]

⇒ [ f (a)]n = e′ [ f (e) = e′ ]

⇒ o[ f (a)] ≤ n ...(1)
m
If possible, O [ f (a)] = m, then [ f (a)] = e′ [ e′ = f (e)]

⇒ f (a) f (a)... f (a)− mK time = f(e)


⇒ f (a a a K mK time)= f (e)
⇒ f (am ) = f (e) [ f is one-one]
m
⇒ a =e

⇒ o (a)≤ m ...(2)

From (1) and (2) m=n

Theorem 44: If f is a homomorphism of a group G into group G′ with kernel k is normal subgroup of G.
Proof: Let f be a homomorphism of a group G into a group G′. Let e and e′ be the identities of G and G′
respectively. Let k be the kernel of f. Then
k = { x ∈ G: f ( x ) = e ′ }
Since f (e) = e ′, therefore at least e ∈ G ⇒ k ≠ φ
Let a, b ∈ k ⇒ f (a) = e ′ , f (b) = e ′
∴ f (ab ) = f (a) f (b–1 ) = f (a)[ f (b)]–1 = e ′ (e ′ )–1 = e ′ e ′ = e ′
–1

⇒ ab–1 ∈ k
Thus a ∈ k, b ∈ k ⇒ ab–1 ∈ k
Therefore k is subgroup of G. Now to prove k is normal in G. Let g ∈ G,
k1 ∈ k = ⇒ f (k ) = e ′
∴ f (gk1 g –1 ) = f (g ) f (k1 ) f (g –1 ) = f (g ) e ′ [ f (g )]–1

= [ f (g )][ f (g )]–1 = e ′ ]

⇒ g k1 g –1 ∈ k

Thus g ∈G, k1 ∈ k ⇒ g k1 g –1 ∈ k. Hence k is normal subgroup of G.


Algebraic Structures 225

Example 55: Show that the multiplicative group G = {1, ω, ω 2} is isomorphic to permutation group of
G′ = {I, (a b c), (a c b)} on three symbols.
Solution: We can see that
O (1) = 1, O (ω ) = 3, O (ω 2 ) = 3

O (I ) = 1, O (abc) = 3, 0(acb) = 3

Let e and e′ be the identities of G and G′ respectively we defined mapping


f : G → G′ such that same order elements map each other.

Then f is one-one and onto


Also O (a) = O[( f (a)] V a ∈G
f (ω ω 2 ) = f (ω 3 ) = f (1) = I = (abc)(acb) = f (ω ) f (ω 2 )

f (ω ⋅ ω 2 ) = f (ω )ω 2

Similarly f (1, ω 3 ) = f (1) f (ω 3 )

Thus, f preserves the compositions in G and G′

Hence, G ≅ G′

Example 56: Prove that f a ; G → G′ which is defined by f a( x ) = a–1 x a is a group isomorphism.


[U.P.T.U. (B.Tech.) 2005]
Solution: For a fixed a ∈ G, f a: G → G is defined as
f a( x ) = a–1 x a V x ∈ G
f a is a one-one mapping: Let x, y ∈ G
⇒ f a( x ) = f a( y ) ⇒ a–1 xa = a–1 ya
⇒ x = y ⇒ f a is one-one [by cancellation law]
f a is onto: For any x ∈ G, ∃ a x a–1 ∈ G such that
f a(axa–1 ) = a–1 (axa–1 ) a = x ⇒ f ais onto G
f a is homomorphism
f a( xy ) = a–1 ( x y )a = (a–1 xa)(a–1 ya) = f a( x ) f a( y )

Hence f a is a group isomorphism.

Example 57: If G be the multiplicative group of three cube roots of unity i . e. G = {1, ω, ω 2} where ω 3 = 1 and
G′ be the additive group of integers module 3 i.e. G′ = {0, 1, 2} + 3
Solution: Formed composition table for G = {1, ω, ω 2} and G′ = {0, 1, 2}

. 1 ω ω2 +3 0 1 2

1 1 ω ω2 0 0 1 2

ω ω ω2 1 1 1 2 0

ω2 ω2 1 ω 2 2 0 1
226 Discrete Mathematical Structures

The mapping f : G → G′ defined as


f (1) = 0, f (ω ) = 1, f (ω 2 ) = 2

is one-one and onto and f (ab) = f (a) f (b)


∴ G ≅ G′

Example 58: If for a group G f : G → G is given by f ( x ) = x 2 V x ∈G is a homomorphism, prove that G is


abelian. [U.P.T.U. (B.Tech. 2004]

Solution: Let a, b ∈ G ⇒ a b ∈ G.
f : G → G is a homomorphism
⇒ f (a) = a2, f (b) = b2 and f (ab) = (ab)2

Now f (ab) = (ab)2 ⇒ f (a) f (b) = (ab)(ab)

⇒ (a2 )(b2 ) = (ab)(ab)

⇒ (aa)(bb) = a (ba) b
⇒ a (ab) b = a (ba) b
⇒ ab = ba [by cancellation law]
⇒ G is abelian group.

5.21 Ring [U.P.T.U. ( B.Tech.) 2008; R.G.P.V. (B.E.) Bhopal 2002, 2006, 2009]

An algebraic system (R , + , . ) is called ring if the binary operations ‘ + ’ and ‘ . ’ R satisfy the following
properties.
(i) (R , + ) is an abelian group (ii) (R , . ) is semi group
(iii) The operation ‘ . ’ is distributive over ‘ + ’ let a, b, c ∈ R then
(a) a ⋅ (b + c) = a ⋅ b + a ⋅ c (b) (b + c)⋅ a = b ⋅ a + c ⋅ a

Illustration: The set R consisting of a single element o with two binary operations defined by 0 + 0 = 0 and
0. 0 = 0 is a ring
This ring is called the Null Ring or the Zero Ring.
0 a
Illustration: The set of all matrices of the form   where a, b being real numbers with matrix addition
0 b
and matrix multiplication is a ring. [U.P.T.U. (B.Tech.) 2006]

Example 59: The set of integer I with respect to ‘ + ’ and ‘ . ’ is a ring. [U.P.T.U. (B.Tech.) 2006]

Solution: (I, + ) is an abelian group


(i) Closure Property: Since the addition of two integers is again an integer, therefore I is closed
with respect to addition of integers.
(ii) Associativity: We know that addition is associative in I
i.e. a, b, c ∈ I ⇒ (a + b) + c = a + (b + c) V a, b, c ∈ I
Algebraic Structures 227

(iii) Existence of Identity: Let 0 ∈ I and a ∈ I ⇒ a + 0 = a = 0 + a V a ∈ R

then 0 is called additive identity of I

(iv) Existence of Inverse

Let a ∈ I ⇒ ∃ b ∈ I such that a + b = 0 = b + a V a, b ∈ I

Then b is called additive inverse of a


(v) Commutativity: Since a + b = b + a V a, b ∈ I

( I, . ) is a Semi Group
(vi) Closure Property: Since multiplication of two integers is an integers i.e.
a, b ∈ I ⇒ a ⋅ b ∈ I V a, b ∈ I

(vii) Associativity: Let a, b, c ∈ I ⇒ a(b ⋅ c) = (a ⋅ b)⋅ c V a, b, c ∈ I

(viii) Distributive Law: Let a, b, c ∈ I then


(a) a ⋅ (b + c) = a ⋅ b + a ⋅ c V a, b, c ∈ I (b) (b + c) ⋅ a = b ⋅ a + c ⋅ a + c ⋅ a V a, b, c ∈ I
Hence (I, + , . ) forms a ring

5.22 Type of Ring


Ring with Unity
If in a ring R ∃ an element denoted by 1 such that 1 ⋅ a = a ⋅ 1 V a ∈ R , then R is called ring with unit element.
The element 1 ∈ R is called the unit element of the ring.

5.22.1 Commutative Ring or Abelian Ring


The ring R is said to be a commutative ring or an abelian ring if it satisfies the commutative law.
i.e. a ∈ R , b ∈ R ⇒ a. b = b. a V a, b ∈ R

5.22.2 Ring Without Unity


A ring R, which does not contain multiplicative identity is called a ring without unity.

5.22.3 Boolean Ring


A ring whose element is idempotent i.e. a2 = a V a ∈ R is called Boolean ring

5.22.4 Finite and Infinite Ring


If number of elements in the ring R is finite, then (R , + , . ) is called a finite ring, otherwise it is called an
infinite ring.
228 Discrete Mathematical Structures

5.22.5 Order of Ring


The number of elements in a finite ring R is called the order of ring R. It is denoted by O(R ).

5.22.6 Invertible Ring


Let (R , + , . ) be ring with unity, an element a ∈ R is said to be invertible, if there exists an element a–1 ∈ R ,
called the inverse of a such that
aa–1 = a–1 a = 1

5.22.7 Zero Divisor of a Ring [U.P.T.U. (B.Tech.) 2009]

A non-zero element a of a ring R is called zero divisor or a divisor of zero if there exists an element b ≠ 0 ∈ R
such that either ab = 0 or b a = 0

5.22.8 Ring without Zero Divisors


A ring R is without zero division if the product of no two non-zero elements of R is zero i.e. if
ab = 0 ⇒ a = 0 or b = 0.

Example 60: Suppose M is a ring of all 2×2 matrices with their elements as integers,the addition and
multiplication of matrices being the two ring compositions. Then M is a ring with zero divisions.
0 0
Solution: The null matrix O =   is zero element of this ring.
0 0
1 0 0 0
Let A =  ≠ O, B =  ≠ O ∈R
0 0 1 0
1 0 0 0 0 0
Then AB =   = =O
0 0 1 0 0 0
Thus the product of two non-zero elements of the ring is equal to the zero element of the ring. Hence M is a
ring with zero divisors.

Theorem 45: R is without zero divisors ⇔ cancellation laws holds in R.

Proof: Let R is without zero divisors, let a, b, and c be any elements of R such that ab = ac, a ≠ 0.
Now, ab = ac ⇒ ab – ac = 0 ⇒ a (b − c) = 0
Since R is without zero divisors then
a(b − c) = 0 ⇒ either a = 0 or b − c = 0 but a ≠ 0 then b − c = 0 or b = c
Thus, cancellation law hold in R
Similarly, right cancellation law hold in R
Conversely, Let cancellation laws hold in R if possible ab = 0 a ≠ 0, b = 0.
Then ab = 0 ⇒ ab = a0 [ a0 = 0]
⇒ b=0 [by left cancellation law]
Again ba = 0 ⇒ ba = 0 a ⇒ b = 0 [by right cancellation law hold in R]
Algebraic Structures 229

5.23 Integral Domain


A ring R is called an integral domain if it satisfies the following properties.
(i) It is commutative ring (ii) It has unit element (iii) It is without zero divisors

Illustration: Ring of integers is an integral domain.

Illustration: The ring of rational numbers (Q , + , • ) is an integral domain with zero element and unit
element.

Illustration: The ring of real number (R , + , • ) is an integral domain with zero element and unit element.

Illustration: The ring of complex number (C , + , • ) is an integral domain.

5.24 Field [U.P.T.U. (B.Tech.) 2008, 2009]

A Ring R with atleast two elements is called a field if it


(i) is commutative ring
(ii) has unit element
(iii) each non-zero element having multiplication inverse.

Illustration: The set of rational numbers under addition and multiplication (Q , + , • ) is field

Illustration: The set of real numbers under addition and multiplication (R , + , • ) is field

Illustration: (I p, + p, •p ) is field, where p is prime number.

5.25 Division Ring or Skew Field


A ring (R , + , • ) is said to be a division ring if its non-zero elements form a group under multiplication.

5.26 Characteristic
Let (D, + , • ) be an integral domain. D is said to be characteristic p, if p is the smallest positive integer such
that pa = 0 V a ∈ D.
230 Discrete Mathematical Structures

5.27 Elementary Properties of a Ring


Theorem 46: If R is a ring, then for all a, b, c ∈ R
(i) a0 = 0a = 0 (ii) a(– b) = – (ab) = (– a)b
(iii) (– a)(– b) = ab (iv) a(b − c) = ab – ac
(v) (b − c) a = ba − ca
Proof: (i) We have
a0 = a(0 + 0) [Q 0 + 0 = 0]
= a0 + a0 [by left distributive law]
∴ 0 + a0 = a0 + a0. [Q a0 ∈ R and 0 + a0 = a0]

Now R is a group with respect to addition, therefore applying right cancellation law for addition in R, we
get 0=a0.
Similarly we have 0a = (0 + 0) a = 0a + 0a. [by right distributive law]
∴ 0 + 0a = 0a + 0a. [Q 0 + 0a = 0a]

Applying right cancellation law for addition in R, we get 0 = 0a.


(ii) We have a[(– b) + b] = a0 [Q – b + b = 0]
⇒ a(– b)+ ab = 0 [by using left distributive law and the result (i)]
⇒ a(– b) = – (ab), [since in a ring a + b = 0 ⇒ a = – b.]
Similarly we have (– a + a) b = 0 b
⇒ (− a) b + ab = 0 ⇒ (− a)b = −(ab), [since in a ring a + b = 0 ⇒ a = − b]
(iii) We have (– a)(– b) = −[(– a) b], since a(– b) = –(ab)
= –[–(ab)], since (– a)b = –(ab)
=ab, since R is a group with respect to addition and in a group we have –(– a) = a.
(iv) We have a(b – c) = a[ b + (− c)] = ab + a(− c) [left distributive law]
= ab + [ −(ac)] = ab − ac. [Q a(– c) = –(ac)]
(v) We have (b − c)a = [ b + (− c)]a = ba + (− c)a [right distributive law]
= ba + [ −(ca)] = ba − ca.

Theorem 47: A finite commutative ring without zero divisors is a field.

or

Every finite integral domain is a field. [R.G.P.V. (B.E.) Bhopal 2002, 2004, 2005, 2007, 2009]

Proof: Let D be a finite commutative ring without zero divisors having n elements a1 , a2, K an. In order to
prove that D is a field, we must produce an element 1 ∈ D such that 1a = a V a ∈ D. Also we should show that
for every element a ≠ 0 ∈ D there exists an element b ∈ D such that ba = 1.

Let a ≠ 0 ∈ D. Consider the n products aa1 , aa2, . . . , aan.


Algebraic Structures 231

All these are elements of D. Also they are distinct. For suppose that aai = aaj for i ≠ j .

Then a(ai − aj ) = 0 . ...(1)

Since D is without zero divisors and a ≠ 0, therefore (1) implies

ai – aj = 0 ⇒ ai = aj , contradicting i ≠ j.

∴ aa1 , aa2, . . . , aan are all the n distinct elements of D placed in some order. So one of these elements will be
equal to a. Thus there exists an element, say, 1 ∈ D such that

a1 = a = 1a. [Q D is commutative]

We shall show that this element 1 is the multiplicative identity of D. Let y be any arbitrary element of D.
Then from the above discussion for some x ∈ D, we shall have ax = y = xa.
Now 1 y = 1(ax ) [Q ax = y]

= (1a)x = ax [Q 1a = a]

=y [Q ax = y]

= y .1 [Q D is commutative]

Thus 1 . y = y = y . 1, V y ∈ D. Therefore 1 is the unit element i.e., the multiplicative identity of the ring D.

Now 1 ∈ D. Therefore from the above discussion one of the n products aa1 , aa2, . . . , aan will be equal to 1.
Thus there exists an element, say, b ∈ D such that ab = 1 = ba.

∴ b is the multiplicative inverse of the non-zero element a ∈ D. Thus every non-zero element of D is
inversible. Hence D is a field.

Theorem 48: Every field is an integral domain.[R.G.P.V.) (B.E.) Bhopal 2002, 2009, P.T.U. (B.E. Punjab 2007, 2009]
Proof: Since a field F is a commutative ring with unity, therefore in order to show that every field is an
integral domain we should show that a field has no zero divisors.
Let a, b be elements of F with a ≠ 0 such that ab = 0.

Since a ≠ 0, a–1 exists and we have

ab = 0 ⇒ a–1 (ab) = a–1 0 ⇒ (a–1 a) b = 0 ⇒ 1b = 0 [Q a–1 a = 1]


⇒ b = 0. [Q 1b = b]
–1
Similarly, let ab = 0 and b ≠ 0 . Since b ≠ 0, b exists and we have

ab = 0 ⇒ (ab)b–1 = 0b–1 ⇒ a(bb–1 ) = 0 ⇒ a1 = 0 ⇒ a = 0.


Thus in a field ab = 0 ⇒ a = 0 or b = 0. Therefore a field has no zero divisors. Therefore every field is an
integral domain.

But the converse is not true i.e., every integral domain is not a field. For example, the ring of integers is
an integral domain and it is not a field. The only invertible elements of the ring of integer are 1 and –1.
232 Discrete Mathematical Structures

Example 61: Prove that a ring R is commutative iff


(a + b)2= a2 + 2ab + b2 V a, b ∈ R
[U.P.T.U. (B.Tech.) 2004; R.G.P.V. (B.E.) 2007]

Solution: Let R be commutative ring. Then


(a + b)2 = (a + b)(a + b)

= a(a + b) + b(a + b) [by distributive]


2 2
= a + ab + ba + b [by distributive]

= a2 + ab + ab + b2 [ ba = ab]

= a2 + 2ab + b2 ...(1)

Conversely, Let (a + b)2 = a2 + 2ab + b2, then show R is commutative i.e.,

(a + b)2 = a2 + 2ab + b2 [from (1)]


2 2 2 2
⇒ a + ab + ba + b = a + 2ab + b

⇒ ab + ba = 2ab [by cancellation law]


⇒ ba = ab V a, b ∈ R
⇒ R is commutative ring

Example 62: To show (–1)(–1) = 1 [U.P.T.U. (B.Tech.) 2007]

Solution: We know (–1) a = – a V a ∈ R


Put a = –1 ⇒ (–1)(–1) = –(–1) = 1 [Q –(− a) = a]
Algebraic Structures 233

@ Algebraic Structures
1. Define group and prove that if every element of a group G is its own inverse then G is abelian group.
[U.P.T.U. (B.Tech.) 2009]
2. Write short notes on groups and semi groups
P.T.U. (B.E.) Punjab 2004, 2006, 2009; R.G.P.V. (B.E.) Bhopal 2003, Pune (B.E.) 2005, 2007
Nagpur (B.E.) 2008; M.K.U. (B.E.) 2007]

3. Define normal subgroup, homomorphism, isomorphism. [R.G.P.V. (B.E.) Bhopal 2002]

4. Write short notes on:


(i) Groups and semi groups, [Rohtak (M.C.A.) 2005, 2009; M.K.U. (B.E.) 2008; R.G.P.V. (B.E.) 2003;
Kurukshetra (B.E.) 2008]
(ii) Cosets [P.T.U. (B.E.) Punjab 2008, R.G.P.V. (B.E.) Bhopal 2003]
(iii) Isomorphism and homomorphism [U.P.T.U. (B.Tech.) 2007; Rohotak (B.E.) 2001, 2005, 2007,
R.G. P.V. (B.E.) Bhopal 2002]
(iv) Homomorphism [Pune (B.E.) 2006; Nagpur (B.E.) 2004

(v) Rings [R.G.P.V. (B.E.) Bhopal 2002; M.K.U. (M.C.A.) 2007]

5. (i) Differentiate between semigroup and subgroup with example. [U.P.T.U. (B.Tech.) 2008]

(ii) How monoid, ring and field are related to each other? [U.P.T.U. (B.Tech. 2008]

6. Let A = {a, b}. Which of the following tables define a semigroup? Which define a monoid on A ?
[U.P.T.U. (B.Tech.) 2005]

(i) * a b (ii) * a b (iii) * a b


a b a a b b a b b
b a b b a a b b a
7. Let ({ p, q}∗ ) be a semigroup where p ∗ q = q. Show that
(i) p∗q = q∗ p (ii) q∗q = q
[U.P.T.U. (B.Tech.) 2006; P.T.U. (B.E.) Punjab 2007; M.K. U. (B.E.) 2009; Nagpur 2003]

8. Find all the subgroup of

(i) (Z12, +12 ) (ii) (Z 5, + 5 ) [U.P.T.U. (B.Tech.) 2006]

9. Define the symmetric group of degree n denoted by Sn. [U.P.T.U. (B.Tech.) 2006]

10. Define algebraic systems with examples. [M.K.U. (M.C.A.) 2005, 2008]

11. Define subgroups and cyclic groups. [M.K.U. (B.E.) Tamil Nadu 2004, 2007]

12. Show that every group of order 2 is isomorphic to every other group of order 2.
13. If G is cyclic group of order n then show o (a) = n.

14. If (G, ∗ ) is a group of order 4, then show that G is abelian.


234 Discrete Mathematical Structures

15. Show that the additive group Z 4 is isomorphic to multiplicative group of non-zero elements of Z 5.
16. Find all subgroup of a cyclic group of order 10 and 12.
17. Define and explain the following with suitable example
(i) cyclic group (ii) zero divisor of a ring
(iii) order of an element of a group (iv) field [U.P.T.U. (B.Tech.) 2009]

18. If G is group of order n then order of any element a ∈ G is a factor of n, prove .


[U.P.T.U. (B.Tech.) 2009]

19. State and prove Lagrange's theorem. [U.P.T.U. (B.Tech.) 2009; P.T.U. (B.E.) Punjab 2004, 2007, 2009;
R.G.T.U. (B.Tech.) 2005, 2008; Raipur (B.E.) 2006]

❑❑❑
Unit-3

C hapter
6. : Par tial Order Sets and Lattices
7. : Boolean Algebra
8. : Logic Gate
6.1 Partial Order Set (Poset) [U.P.T.U. (B.Tech.) 2005, 2007; R.G.P.V. Bhopal 2005, 2009;
M.K.U. (B.E.) 2005, 2008; I.G.N.O.U. (M.C.A.) 2001, 2003, 2005, 2009; Rohtak (B.E.) 2009]

A non empty set A, together with a binary relation R is said to be a partially ordered set or a poset if
following conditions are satisfied.
( P1 ) Reflexivity: a R a ∀ a ∈ A
( P2 ) Antisymmetry: If a, b ∈ A, then
a R b and b R a ⇒ a = b
( P3 ) Transitivity: If a, b, c ∈ A then
a R b, b R c ⇒ a R c
The relation R on set A is called Partial Order Relation. The poset is denoted by ( A, R ) or ( A, ≤ )
Remark: We generally use the symbol ≤ in place of R. We read ≤ as less than or equal to (although it may
have nothing to do with the usual less than or equal to relation.)
Example 1: The set S on any collection of sets. The relation ⊆ read as ‘‘is subset of ’’ is partial ordering of S.
[U.P.T.U. (B.Tech.) 2007; I.G.N.O.U (M.C.A.) 2009; Rohtak (B.E.) 2004, 2007, 2009]

Solution: The set S is poset if it satisfies the following conditions.


( P1 ) Reflexive: Since A ⊆ A for any subset A of S ∴ ⊆ is reflexive
( P2 ) Antisymmetric: If A ⊆ B and B ⊆ A ∀ A, B ∈ S then A = B ∴ ⊆ is antisymmetric
( P3 ) Transitivity: If A ⊆ B and B ⊆ C for any sets A, B, C ∈ S, then A = C ∴ ⊆ is transitive
Hence, (S, ≤ ) is a poset
Example 2: A set S = {a, b, c} together with the relation of set inclusion ⊆ is a partial order on P (S ) where
P (S ) is power set of S . [U.P.T.U. (B.Tech.) 2002; R.G.P.V. (B.E.) Raipur (B.E.) 2009]

Solution: The power set of S is P (S ) = {φ, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, {a, b, c}}
Then P (S ) is partial order relation or poset if it satisfies the following conditions.
( P1 ) Reflexivity: Since every A ⊆ A ∀ A ∈ P (S ). Hence, it is reflexive
( P2 ) Antisymmetry: If A ⊆ B and B ⊆ A ⇒ A = B . Hence, it is antisymmetric
( P3 ) Transitivity: If A ⊆ B, B ⊆ C ⇒ A ⊆ C . Hence, it is transitive
∴ (P (S ), ⊆ ) is poset.
238 Discrete Mathematical Structures

Example 3: Let A = {2, 3, 6, 12, 24, 36} and R be the relation in A which is defined by a divides b then R is
partial order in A. [R.G.P.V. (B.E.) Bhopal 2004, 2006, 2008, 2008]

Solution: The relation divisor is a partial order if it satisfies the following conditions.
( P1 ) Reflexivity: Since a ‘|’ a ∀ a ∈ A ∴ ‘|’ is reflexive
( P2 ) Antisymmetric: If a ‘|’ b and b ‘|’ a ∀ a, b ∈ A then a = b ∴ ‘|’ is antisymmetric
( P3 ) Transitivity: If a ‘|’ b and b ‘|’ c ∀ a, b, c ∈ A then a‘|’ c
Illustration: 2 ‘|’ 6, 6 ‘|’ 12 ⇒ 2 ‘|’ 6
∴ ‘|’ is transitive. Hence, ( A, ‘|’) is a poset.
Example 4: The set of integers Z with usual ordering ≤ read as ‘‘Less than or equal to’’ is a poset.
Solution: The set of integer Z is poset if it satisfies the following conditions.
( P1 ) Reflexive: Since a ≤ a for every integer a∴ ≤ is reflexive
( P2 ) Antisymmetric: If a ≤ b and b ≤ a then a = b ∀ a, b ∈ Z. Hence ≤ is antisymmetric
( P3 ) Transitive: If a ≤ b and b ≤ c, where a, b, c ∈ Z then a ≤ c ∴ ≤ is a transitive relation
Hence, (Z, ≤ ) is a poset.
Example 5: If R is partially ordered relation on a subset X and A ⊆ X , show that

R ∩ ( A × A ) is a partial ordering relation on A. [M.K.U. (B.E.) 2000, 2004]

Solution: Denote R ∩ ( A × A ) by R′ then R′ will be partial order relation or poset if.


( P1 ) Reflexive: Let x ∈ A then ( x, x ) ∈ A × A.
Since R is reflexive, ( x, x ) ∈ R ⇒ x R x
∴ ( x, x ) ∈ R ∩ ( A × A ) = R ′
( P2 ) Antisymmetric: Suppose ( x, y ) ∈ R ′ and ( y, x ) ∈ R ′
Then ( x, y ) ∈ R ∩ ( A × A ) and ( y, x ) ∈ R ∩ ( A × A )
Since R is antisymmetric, ( x, y ) ∈ R and ( y, x ) ∈ R then x = y ∴ R′ is antisymmetric
( P3 ) Transitivity: Suppose ( x, y ) ∈ R ′ = R ∩ ( A × A ) and ( y, z ) ∈ R ′ = R ∩ ( A × A )
Then ( x, y ), ( y, z ) ∈ R and ( A × A ) is R transitive.
( x, y ) ∈ R , ( y, z ) ∈ R ⇒ ( x, z ) ∈ R . Since R ⊂ A × A
∴ ( x, z ) ∈ A × A and hence ( x, z ) ∈ R ∩ ( A × A ) = R ′
Thus R ′ = R ∩ ( A × A ) is partial ordering relation on A.

6.1.1 Comparable
Two elements a and b is a poset (S, ≤ ) are said to be comparable if either a ≤ b or b ≤ a. Thus a and b are called
Incomparable if neither a ≤ b nor b ≤ a

Illustration: In poset (Z + , ‘|’), the integer 3 and 9 are comparable. Since 3 ‘|’ 9. But the integers 5 and 7 are
incomparable because neither 5 ‘|’ 7 nor 7 ‘|’ 5.
Partial Order Sets and Lattices 239

6.2 Total Ordering Relation or Linear Order or Chain [U.P.T.U. (B.Tech.) 2007]

A relation R on a set A is said to be total ordering relation if the relation R is reflexive, anti-symmetric,
transitive and satisfies the following relation.
Law of Dichotomy: For each, a, b ∈ A, either a ≤ b or b ≤ a i.e. any two elements of A are comparable.

Illustration: The set (Z + , ‘|’) is not linearly ordered. Since 4 and 7 are incomparable as neither 4 ‘|’ 7 nor
7 ‘|’ 4 . But A = {2, 6, 12, 36} is linearly ordered subset of Z + . Since 2 ‘|’ 6 6 ‘|’ 12 and 12 ‘|’ 36 .
Illustration: The set N of positive integers along with usual order ≤ (less that or equal to) is totally or
linearly ordered.

Example 6: Define poset. Give an example of a set X such that (P ( X ), ⊆ ) is totally ordered set.
[U.P.T.U. (B.Tech.) 2006, 2007]

Solution: Let X = {a, b, c} then


P ( X ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}. Then P ( X ) is totally ordered set if
( P1 ) Reflexive: Since each set is subset to itself i.e. {a} ⊆ {a} ∀ {a} ∈ P ( X ). Hence, it is reflexive

( P2 ) Antisymmetry: If A ⊆ B and B ⊆ A ⇒ A = B. Hence, it is antisymmetric


( P3 ) Transitivity: If A ⊆ B and B ⊆ C ⇒ A ⊆ C . Hence, it is transitive
∴ (P ( X ), ⊆ ) is poset
( P4 ) Law of Dichotomy: For each {a} ∈ P ( X )
and {a, b} ∈ P ( X ) ⇒ {a} ⊆ {a, b}. i.e.any two elements in P ( X )are comparable.

Then (P ( X ), ⊆ ) is totally ordered set.


Also {a}, {b} ∈ X then although the set P ( X ) is not linearly ordered by ⊆.

6.3 Immediate Predecessor and Immediate Successor


Let ( A, ≤ ) be a poset and a, b ∈ A. a is said to be Immediate Predecessor of b or b is immediate successor of
a, written as
a << b

/
If a < b and no elements of A lies between a and b i.e. ∃ c ∈ A such that a < c < b.
240 Discrete Mathematical Structures

6.4 Hasse Diagram or Partially Ordered Set or Representation of Posets


[U.P.T.U. (M.C.A.) 2002, 2004]

A graphical representation of a partial ordering relation in which all arrow heads are understood to be
pointing upward is known as the Hasse diagram of the relation.

In Hasse diagram, we represent each element of A as a node or vertex of the graph and we draw a rising line
from a to b if b covers a. These lines intersected only at the vertices of the graph. Subgraphs of the types
shown in Fig. 6.1 and Fig. 6.2 do not appear in Hasse diagrams of posets because in each case the left
branch says that cover b, whereas the right branch contradicts this on the other hand. Fig. 6.3 and Fig. 6.4
represent distinct posets.

a
a a a
d d e
c c d e

c c
b b b b
Fig. 6.1 Fig. 6.2 Fig. 6.3 Fig. 6.4

Not Poset
Posets

6.4.1 Procedure for Drawing Hasse Diagram


[Rohatak (M.C.A.) 2005, 2007, Delhi (M.C.A.) 2009; I.G.N.O.U. (M.C.A.) 2003, 2005, 2009]

We use the following steps for drawing Hasse diagram:


1. Draw the digraph of given relation.
2. Delete all cycles for digraph.
3. Eliminate all edges that are implied by the transitive relation.
4. Draw the digraph of a partial order with edges pointing upward so that arrows may be omitted from
edges.
5. Replace the circles representing the vertices by dots.
Example 7: (i) Draw the Hasse diagram of ( A, ≤ ), where A = {3, 4, 12, 24, 48, 72} and relation ≤ be such that
a ≤ b if a divides b. [U.P.T.U. (B.Tech.) 2009]

(ii) Draw the Hasse diagram of the relation S defined as ‘‘divides’’ on set B where
B = {2, 3, 4, 6, 12, 36, 48} [U.P.T.U. (B.Tech.) 2008]
Partial Order Sets and Lattices 241

Solution: (i) The Hasse diagram is given below (ii) The Hasse diagram is given below.

48 36 48
72

24 12

4 6
12

3 4
2 3
Fig. 6.5 Fig. 6.6

Example 8: Let A be the set of factors of a particular positive integer m and let ≤ be the relation ‘‘divides’’ i.e.
≤ = {( x, y ): x ∈ A, y ∈ A and x ‘|’ y} draw Hasse diagrams for
(a) m = 12 (b) m = 30 (c) m = 45
[U.P.T.U. (B.Tech.) 2005, 2008; M.C.A. (Uttranchal) 2007, 2009; M.K.U. (B.E.) 2001, 2003; U.P.T.U. (M.C.A.) 2008-2009]
Solution: (a) A = {1, 2, 3, 4, 6, 12}
(b) A = {1, 2, 3, 5, 6, 10, 15} (c) A = {1, 3, 5, 9, 15}
The Hasse diagrams is given below

12 30

6 4 6
10 15
15 9

3 2 3 5 3
2 5

1 1
1
(a) (b) (c)
Fig. 6.7 Fig. 6.8 Fig. 6.9
Example 9: Draw the Hasse diagram for the partial ordering {( A, B ): A ⊆ B} on the power set P (S ) where
S = {a, b, c}. [U.P.T.U. (B.Tech.) 2003; R.G.P.V. (Bhopal) 2005, 2009]

Solution: Let S = {a, b, c}, then {a, b, c}

P (S ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
The Hasse diagram of the poset (P (S ), ⊆ ) is {a, b} {a, c} {b, c}

{a} {c}
{b}

φ
Fig. 6.10
242 Discrete Mathematical Structures

Example 10: The directed graph G for a relation R on set A = {1, 2, 3, 4} is shown in
1 2
Fig. 6 .11.
(i) Verify that ( A, R ) is a poset and find its Hasse diagram.
(ii) How many more edges are needed in the figure to extend ( A, R ) to a total
3 4
order?
Fig. 6.11

Solution: (i) The relation R corresponding to the given digraph is R = {(1, 1), (2, 2), (3, 3), (4, 4), (3, 1),
(3, 4), (1, 4), (3, 2)} R is a partial order relation if it is

( P1 ) Reflexive: Since a R a ∀ a ∈ A. Hence, it is reflexive.

( P2 ) Antisymmetric: Since a R b and b R a then we get a = b. Hence, it is 1 2


antisymmetric.

( P3 ) Transitive: For every a R b and b R c ⇒ a R c. Hence, it is transitive.


4
Therefore ( A, R ) is poset. Its Hasse diagram is 3
(ii) Only one edge (4, 2) is included to make it total order. Fig. 6.12

Example 11: Let A = {1, 2, 3, 4, 6, 8, 9, 12, 18, 24} be ordered by the relation ‘‘a divides b’’. Draw the Hasse
diagram. [P.T.U. (B.E.) Punjab 2009]

Solution: The Hasse diagram is given below

24
24
8 12 18 8 12 18

Or

6 4 6 9
9
4
2 3
2 3

1
1
Fig. 6.13 Fig. 6.14

Example 12: Draw the Hasse diagram of B 3 with ‘‘≤’’ as defined for matrices of o’s and f ’s
| 0 , where B 3 are matrices with one row
[(rij )m × n ≤ (sij )m × n] iff rij ≤ sij ∀ i and j where 0 ≤ 0, 0 ≤ 1, 1 ≤ 1, 1 ≤
and three column. [R.G.P.V. (B.E.) Bhopal 2006; R.G.P.V. (B.E.) Raipur 2008]
3
Solution: The Hasse diagram of R is given below.
Partial Order Sets and Lattices 243

(1, 1, 1)

(1, 1, 0) (0, 1, 1) (0, 1, 1)

(1, 0, 0) (0, 1, 0) (0, 0, 1)

(0, 0, 0)
Fig. 6.15

Example 13: Let S be any class of sets. Prove that the relation of set inclusion ⊆ is a partial order relation on S.

Solution: ( P1 ) Reflexivity: For each A ∈ S, we have A ⊆ A.


Hence, the relation ⊆ is reflexive.

( P2 ) Anti-symmetry: Let A, B ∈ S. Then A ⊆ B, B ⊆ A ⇒ A = B.


Hence, the relation ⊆ is anti-symmetric.

( P3 ) Transitivity: Let A, B, C ∈ S. Then A ⊆ B, B ⊆ C ⇒ A ⊆ C .


Hence, the relation ⊆ is transitive.
Thus, the inclusion relation ⊆ is a partial order relation on the set S.
Example 14: Prove that the relation ‘‘a divides b’’, if there exists an integer c such that ac = b and is denoted
by a| b, on the set of all positive integers N is a partial order relation.
Solution: ( P1 ) Reflexivity: For each a ∈ N. ∃ an integer 1 such that
a 1 = a ⇒ a| a. Hence, the relation ‘|’ is reflexive.
( P2 ) Anti-symmetry: Let a, b ∈ N and a| b, b| a. Then
a| b, b| a ⇒ ∃ integers c1 , c2 such that ac1 = b, bc2 = a ...(1)
b a
⇒ c1 = , c2 =
a b
b a
⇒ c1 c2 = .
a b
⇒ c1 c2 = 1
⇒ c1 = c2 = 1
⇒ a = b, by (1).
Hence, the relation ‘|’ is anti-symmetric.
244 Discrete Mathematical Structures

( P3 ) Transitivity: Let a, b, c ∈ N and a| b, b| c. Then


a| b, b| c ⇒ ∃positive integers d1 , d2such that ad1 = b, bd2 = c
⇒ ad1 d2 = c
⇒ ∃ an integer d such that ad = c, where d = d1 d2
⇒ a| c. Hence, the relation ‘|’ is transitive.
Thus, the relation ‘|’ is a partial order relation on N.
Example 15: Let N be the set of partial integers. Prove that the relation ≤, where ≤ has its usual meaning, is a
positive order relation on N. [U.P.T.U. (B.Tech.) 2005]

Solution: ( P1 ) Reflexivity: For each a ∈ N, we have a is equal to a itself

⇒ a is less than or equal to a itself ⇒ a ≤ a.


Hence, the relation ≤ is reflexive.
( P2 ) Antisymmetry: Let a, b ∈ N and a ≤ b, b ≤ a. Then a ≤ b, b ≤ a ⇒ a = b.
Hence, the relation ≤ is antisymmetry.
( P3 ) Transitivity: Let a, b, c ∈ N and a ≤ b, b ≤ c. Then a ≤ b, b ≤ c ⇒ a ≤ c.
Hence, the relation ≤ is transitive.
Thus, the relation ‘‘less than or equal’’ denoted by ≤ is a partial order relation on the set N.
Example 16: Let X be the set of all 2 × 2 real matrices. Let
x x2 y y2
x, y ∈ X , x =  1  , y= 1
 x3 x4   y3 y 4 

and the relation x ≤ y has the meaning: x1 + x 2 + x 3 + x 4 ≤ y1 + y 2 + y 3 + y 4 .


Prove that ≤ is not a partial order relation on the set X.
Solution: The given relation ≤ is not antisymmetric on the set X because
x ≤ y, y ≤ x ⇒ x1 + x 2 + x 3 + x 4 ≤ y1 + y 2 + y 3 + y 4 , y1 + y 2 + y 3 + y 4 ≤ x1 + x 2 + x 3 + x 4
⇒ x1 + x 2 + x 3 + x 4 = y1 + y 2 + y 3 + y 4
Always ⇒
/ x = y.
2 3 − 2 − 3
For example, x= , y =  8 ∈ X,
 4 − 5  1 

where x1 + x 2 + x 3 + x 4 = 2 + 3 + 4 + (− 5) = 4
and y1 + y 2 + y 3 + y 4 = (− 2) + (− 3) + 8 + 1 = 4
i.e., x1 + x 2 + x 3 + x 4 = y1 + y 2 + y 3 + y 4 ; nevertheless

2 3 − 2 − 3
4 − 5 ≠  8 1 
  

i.e., x ≠ y.
Partial Order Sets and Lattices 245

Example 17: Let X be the set of all complex numbers z = x + iy. For, z1 = x1 + iy1 and z2 = x 2 + iy 2, let the
meaning of z1 ≤ z2 be: x1 ≤ x 2 an y1 ≤ y 2 where ≤ has usual meaning for the real numbers.
(i) Is ≤ an order relation on X? (ii) Is ( X , ≤ ) a chain?

Solution: Let X = {z = x + iy | x, y ∈ R }. Then we see that

(i) ( P1 ) Reflexivity: For each z = x + iy ∈ X , we have


x = x, y = y ⇒ x ≤ x, y ≤ y

⇒ z ≤ z i.e., z ≤ z for each z ∈ X . Hence, the relation ≤ is reflexive.

( P2 ) Antisymmetry: Let z1 = x1 + iy1 , z2 = x 2 + iy 2 ∈ X and z1 ≤ z2, z2 ≤ z1 .


Then z1 ≤ z2, z2 ≤ z1 ⇒ x1 ≤ x 2 and y1 ≤ y 2, x 2 ≤ x1 and y 2 ≤ y1
⇒ x1 ≤ x 2, x 2 ≤ x1 and y1 ≤ y 2, y 2 ≤ y1
⇒ x1 = x 2 and y1 = y 2
⇒ x1 + iy1 = x 2 + iy 2
⇒ Z1 = Z 2
Hence, the relation ≤ is antisymmetric on the set X.

( P3 ) Transitivity: Let Z1 = x1 + iy1 , Z 2 = x 2 + iy 2, Z 3 = x 3 + iy 3 ∈ X


and Z1 ≤ Z 2, Z 2 ≤ Z 3 , then
Z1 ≤ Z 2, Z 2 ≤ Z 3 ⇒ x1 ≤ x 2 and y1 ≤ y 2 and x 2 ≤ x 3 , y 2 ≤ y 3
⇒ x1 ≤ x 3 and y1 ≤ y 3
⇒ Z1 ≤ Z 3
Hence the relation ≤ is transitive on the set X. Therefore, ≤ is partially ordered relation on X.

(ii) The given relation ≤ is not totally ordered on the set X, because the law of dichotomy is in general are
not true in X. If z1 = x1 + iy1 , z2 = x 2 + iy 2 ∈ Z then it is not necessary true that either
z1 ≤ z2 or z2 ≤ z1
For example, if z1 = 3 + 4 i , z2 = 5 − 7i ∈ X , then 3 < 5, − 7 < 4
∴ neither z1 ≤ z2 nor z2 ≤ z1 . Hence, ( X , ≤ ) is not a chain.
Example 18: Draw the Hasse diagrams of
(i) (D 8 , ‘|’) (ii) (D 6 , ‘|’) [M.C.A. (Uttranchal) 2007]

(iii) A = {2, 3, 5, 30, 60, 120, 180, 360, ‘|’} [I.G.N.O.U. 2004, 2009; R.G.P.V. (B.E.) Bhopal 2005, 2007]

(iv) h = {1, 2, 3, 4, 6, 9, ‘|’} [Rohtak (B.E.) 2008]


246 Discrete Mathematical Structures

Solution: The Hasse diagrams of all these posets are given as


(i) We have D 8 = {1, 2, 4, 8}, Relation ≤ ‘|’ = division (Fig. 6.16)
6
8

4 2 3

2
1

1 (D8, ‘|’) D6, ‘|’


Fig. 6.16 Fig. 6.17

(ii) We have D 6 = {1, 2, 3, 6} relation ≤ = ‘|’ = divisor (Fig. 6.17)


(iii) We have A = {2, 3, 5, 30, 60, 120, 180, 360, ‘|’ } relation is divisor i.e. a| b (Fig. 6.18)

360

4 6 9
120 180

60
2 3
30

2 3 5 1
Fig. 6.18 Fig. 6.19

(iv) We have h = {1, 2, 3, 4, 6, 9, ‘|’ } relation is divisor i.e. a| b Fig. (6.19)

Example 19: Show that there are only five distinct Hasse diagrams for partially ordered sets that contain
three elements.
Solution: Let us consider that a ≤ b if a| b and consider the set
A = {2, 3, 5} B = {2, 3, 4}
C = {2, 3, 6} D = {2, 4, 6}
E = {2, 4, 8}, then its Hasse diagrams are:
8
4

6
4
4 6

2 3 5 2 3 2 3 2
(A, ≤) (B, ≤) (C, ≤) (D, ≤) (E, ≤)
Fig. 6.20
Partial Order Sets and Lattices 247

Example 20: Determine the Hasse diagram of the relation R . A = {1, 2, 3, 4}


R = {(1, 1), (1, 2), (2, 2), (2, 4), (1, 3), (3, 3), (3, 4), (1, 4), (4, 4)} [Nagpur (B.E.) 2008]

Solution: Diagraph for the given relation set R is

2 3

Fig. 6.21

Step 1: Remove Cycles Fig. (6.22)

Fig. 6.22 Fig. 6.23

Step 2: Remove transitive edge (Fig. 6.23)

Step 3: All edges are pointing upwards remove arrows from edges, replace circles by 4
dots.

Hence Hasse diagram is 2 3

1
Fig. 6.24
Example 21: Draw Hasse diagram for the following relations on set
(i) A = {1, 2, 3, 4, 12}
R = {(1, 1), (2, 2), (3, 3), (4, 4), (12, 12), (1, 2), (4, 12), (1, 3), (1, 4),
(1, 12), (2, 4), (2, 12), (3, 12)}
(ii) A = {1, 2, 3, 4, 5}

R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 4), (3, 5), (2, 2), (3, 3), (4, 4), (5, 5)}
248 Discrete Mathematical Structures

(iii) A = {1, 2, 3, 4, 5}
R = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (1, 2), (4, 5), (1, 3), (1, 4), (1, 5), (2, 4), (2, 5), (3, 5)}
Solution: (i) The digraph for the given relation R is

4
12

2
3

Fig. 6.25

Step 1: Remove cycles

Fig. 6.26

Step 2: Remove transitive edge:


12
1 R 2, 2 R 4 ⇒ 1 R 4
2 R 4, 4 R 12 ⇒ 2 R 12 4 3
1 R 4, 4 R 12 ⇒ 1 R 12
i.e. eliminate edges (1, 4), (2, 12), (1, 12). All arrows are pointing upwards
2
1
Step 3: Circles are replaced by dots. Arrows are also removed. Hence Hasse diagram Fig. 6.27

12

4
3

Fig. 6.28
Partial Order Sets and Lattices 249

(ii) The diagraph for the given relation R is

Fig. 6.29

Step 1: Remove Cycles (Fig. 6.30)

Fig. 6.30 Fig. 6.31

Step 2: Remove transitive edges (1, 4), (1, 5) (Fig. 6.31)

Step 3: All edges are painting upwards, remove arrows from edges replace circles by dots.
Hence Hasse diagram is

(iii) The diagraph for the given relation set R is Fig. 6.32

4 5

2 3

Fig. 6.33
250 Discrete Mathematical Structures

Step 1: Remove Cycles

Fig. 6.34

Step 2: Remove transitive edges


1 R 2, 2 R 4 ⇒ 1 R 4
2 R 4, 4 R 5 ⇒ 2 R 5
1 R 4, 4 R 5 ⇒ 1 R 5
i.e. eliminate transitive edges (1, 4), (2, 5), (1, 5). All arrows are pointing upwards.

Fig. 6.35

Step 3: Circles are replaced by dots. Arrows are also removed. Hence, the required Hasse diagram is

5
4
3
2
Example 22: Determine the Hasse diagram of the relation on A = {1, 2, 3, 4, 5}, 1
whose matrix is shown. Fig. 6.36
1 2 3 4 5 1 2 3 4 5
1 1 1 1 1 1 1 1 0 1 1 1
2 0 1 1 1 1 2 0 1 1 1 1
   
(i ) M R = 3 0 0 1 1 1 (ii) MR = 3 0 0 1 1 1
4 0 0 0 1 1 4 0 0 0 1 0
   
5 0 0 0 0 1 5 0 0 0 0 1 

Solution: (i) The digraph for given matrix is

Fig. 6.37
Partial Order Sets and Lattices 251

Step 1: Remove Cycles

Fig. 6.38

Step 2: Remove transitive edges (2, 5), (1, 3), (2, 4), (1, 5), (1, 4) and (3, 5)

Fig. 6.39
Step 3: Circles are replaced by dots and all edges are pointing upwards. Arrows are removed.

Hence, The required Hasse diagram is

1
Fig. 6.40

(ii) The digraph for given matrix is

Fig. 6.41
252 Discrete Mathematical Structures

Step 1: Remove Cycles


5
4

2 3

1
Fig. 6.42

Step 2: Remove transitive edges (2, 4), (1, 4), (1, 5)

5
4

2 3

1
Fig. 6.43

Step 3: Circles are replaced by dots. Arrows are removed. All edges are pointing upwards. Hence the
required Hasse diagram is

Fig. 6.44
Example 23: Determine the matrix of the partial order whose diagram is given in fig. 6.45

Fig. 6.45
Partial Order Sets and Lattices 253

Solution: Step 1: Put arrow on every edge, replace dots by circles

Fig. 6.46

Step 2: Put transitive edges

i.e. 1 R 2 and 2 R 4 ⇒ 1 R 4

1 R 3 and 3 R 5 ⇒ 1 R 5

4 5

2 3

Fig. 6.47
Step 3: Put cycles on all circles

Fig. 6.48

Step 4: Relation set for the above digraph is

R = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (1, 2), (2, 4), (1, 4), (1, 3), (3, 5), (1, 5)}
254 Discrete Mathematical Structures

Step 5: The matrix for above relation set is


1 2 3 4 5
1 1 1 1 1 1
2 0 1 0 1 0
 
MR = 3 0 0 1 0 1
4 0 0 0 1 0
 
5 0 0 0 0 1 

Example 24: Let A = {a, b, c, d} and P ( A ) is its power set. Draw diagram for (P ( A ), ⊆ ).

[R.G.P.V. (B.E.) Bhopal 2003, 2009]

Solution: We have A = {a, b, c, d}. Then

P ( A ) = {φ, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}, {a, b, c}, {a, b, d},

{a, c, d}, {b, c, d}, { a, b, c, d}}


Then P ( A ) is poset if

The partial order relation R of set P ( A )


R = {(φ, φ ), {φ, a}, {φ, b}, {φ, c}, {φ, d}, {φ, (a, b)}, {φ, (a, c)} {φ, (a, d )}, {φ, (b, c)}, {φ, b, d},
{φ, c, d}, {φ, (a, b, c)}, (φ, (a, b, d )), {φ, (a, c, d )}, {φ, (b, c, d )}, {φ, (a, b, c, d )} K }

Matrix of Above Relation is given by:

MR =

The Hasse diagram for given relation R is shown in fig. 6.49


Partial Order Sets and Lattices 255

Fig. 6.49

Example 25: Let A = {a, b, c}. Show that (P ( A ), ⊆ ) is a poset and draw its Hasse diagram.
[U.P.T.U. (B.Tech.) 2007]
Solution: We have A = {a, b, c}. Then
P ( A ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
Then (P ( A ), ⊆ ) will be posets if

( P1 ) Reflexivity: For each set B ⊆ P ( A ). We have


B⊆B i.e. B R B . So ⊆ is reflexive

( P2 ) Antisymmetry: For any B, C ∈ P ( A ), we have


B ⊆ C, C ⊆ B ⇒ B = C
i.e. B R B, C R B ⇒ B = C
So ⊆ is antisymmetric

( P3 ) Transitivity: For any B, C , D ∈ P ( A ), we have


B ⊆ C, C ⊆ D ⇒ B ⊆ D
i.e. B R C, C R D ⇒ B R D
So ⊆ is transitive on P ( A )

Thus ⊆ is a partial order relation on P ( A )


The relation R on P ( A ) is as
R = {(φ, φ ), (φ, {a}), (φ, {b}), (φ, {c}), (φ, {a, b}), (φ, {a, c}), {φ, {b, c}, (φ, {a, b, c}, ({a}, {b}),
({a}, {c}), ({a}, {a, b}), ({a}, {a, c}), ({a}, {b, c}), ({a}, {a, b, c)}, ({b}, {c}), ({b}, {a, b}),
({b}, {a, c}), ({b} {b, c}), ({b}, {a, b, c}), ({c}, {a, b}) , ({c}, {a, c}), ({c}, {b, c}),
({c}, {a, b, d}), ({a, b}, {a, c}), ({a, b}, {b, c}), ({a, b}, {a, b, c}), ({a, c}, {b, c}),
({a, c), {a, b, c)}, ({b, c}, {a, b, c})}
256 Discrete Mathematical Structures

The matrix of above relation R is as follows:

φ{a} {b} {c} {a, b} {a, c} {b, c} {b, c} {a, b, c}


φ  1 1 1 1 1 1 1 1 
{a}  0 1 0 0 1 1 0 1 
 
{b}  0 0 1 0 1 0 1 1 
{c}  0 0 0 1 0 1 1 1 
MR =  
{a, b}  0 0 0 0 1 0 0 1 
{a, c}  0 0 0 0 0 1 0 1 
 
{b, c}  0 0 0 0 0 0 1 1 
{a, b, c}  0 0 0 0 0 0 0 1 

Digraph of this matrix M R is

To convert this digraph into Hasse diagram.

Step 1: Remove Crycles


Partial Order Sets and Lattices 257

{a, b, c}

{a, b} {a, c} {b, c}

{a} {b} {c}

{φ}

Fig. 6.51

Step 2: Remove transitive edges (φ, {a, b}), (φ, {a, c}), (φ, {b, c}), (φ, {a, b, c}), ({a}, {a, b, c}), ({b}, {a, b, c}),
({c}, {a, b, c})
Step 3: All edges are pointing upwards. Now replace circles by dots and remove arrow from edges.
Hence, required Hasse diagram is

{a, b, c}

{a, b} {a, c} {b, c}

{a} {b} {c}

φ
Fig. 6.52

Example 26: Let A = {a, b}, Show that (P ( A ), ⊆ ) is poset and draw its Hasse diagram.
[Raipur (B.E.) 2008; Rohtak (B.E.) 2007]
Solution: We have A = {a, b}. Then P ( A ) = {φ, {a}, {b}, {a, b}}
Then (P ( A ) ⊆ ) will be poset. See example 25.
Hence, (P ( A ), ⊆ ) is a poset.
258 Discrete Mathematical Structures

Partial order relation R on P ( A ) is given as

R = {(φ, φ ), (φ, {a}), (φ, {b}), (φ, {a, b}), ({a}, {a})

({a}, {b}), ({a}, {a, b}), ({b}, {b}), ({b}, {a, b}), ({a, b}, {a, b})}.

Matrix of the above relation is as follows


φ {a} {b} {a, b}
φ 1 1 1 1
{a} 0 1 0 1
MR =  
{b} 0 0 1 1
{a, b} 0 0 0 1

Diagraph of the above matrix M R is

{a, b}

{a} {b}

Fig. 6.53

To convert this diagraph into Hasse diagram.


Step 1: Remove Cycles

Fig. 6.54
Partial Order Sets and Lattices 259

Step 2: Remove transitive edges

φ R {a}, {a} R {a, b} ⇒ φ R {a, b}

φ R {b}, {b} R {a, b} ⇒ φ R {a, b}

{a, b}

{a} {b}

Fig. 6.55

Step 3: All edges are pointing upwards.

Now, replaced circles by dots and remove arrows from edges. Hence, required Hasse diagram is

{a, b}

{a} {b}

{φ}
Fig. 6.56

6.5 Combination of Partial Ordered Sets or Components of Poset


6.5.1 Maximal Element, Minimal Element
An element belonging to a point (a ≤ ) is said to be Maximal element of A if there is no element c in A such
that a ≤ c. An element b ∈ A is said to be minimal element of A if there is no element c in A such that c ≤ b.
260 Discrete Mathematical Structures

Example 27: Let (P , ≤ ) be a partially ordered set. Where P = {1, 2, 3, 4, 5} and ≤ is the
relation of division which partially ordered the set P. Draw the Hasse diagram of P.
Solution: The Hasse diagram is shown in fig. 6 . 57
The maximal elements of P is 3, 4, 5
The minimal elements of P is 1.
Fig. 6.57

Example 28: Find all the maximal and minimal elements of posets whose Hasse diagrams are given in the
figures below.

(i) 3 (ii) f g
5
4 d e
2

6
a b c
1
Fig. 6.58

Maximal elements: 3, 5
Solution: (i) 
Minimal elements: 1, 6

Maximal elements: f , g
(ii) 
Minimal elements: a, b, c

Example 29: Find all the maximal and minimal elements of the posets whose Hasse diagrams are given in the
figures

(i) 5 6 (ii) 7
4
4 6 8
3 5

3 2 9
2 1

1
Fig. 6.59

Maximal elements: 5, 6
Solution: (i) 
Minimal elements: 1

Maximal elements: 4, 7
(ii) 
Minimal elements: 1, 9, 8
Partial Order Sets and Lattices 261

6.5.2 Greatest Element, Least Element


An element a ∈ A is said to be a Greatest Element of A if x ≤ a for all x ∈ A. An element a ∈ A is called a
Least Element of A if a ≤ x for all x ∈ A.
The least element is also called First Element or Zero Element of A. The least element if exists is
unique.It may happen that the least element does not exist. The least element is generally denoted by 0.

The greatest element is also called Last Element or Unit Element of A. The greatest element if exists is
unique. It may happen that the greatest element does not exist. The greatest element is generally denoted by 1.

Note: Greatest element is also called as universal upper bound. Least element is also called as univeral upper
bound.

Example 30: Find the greatest and least elements of following Hasse diagrams.

(i) f (ii) e (iii) (iv)


5
d e d
4
c
b c
2 3
a a b
1
Fig. 6.60

Greatest element = f Greatest element = e


Solution: (i)  (ii) 
Least element =a Least element = none
Greast element =5 Greast element = none
(iii)  (iv) 
Least element = none Least element = none

6.5.3 Upper Bounds and Least Upper Bound


Let (P , ≤ ) be a poset and let A be a subset of P. An element x ∈ P is called an Upper Bound of A if
a ≤ x ∀ a ∈ A.
Let (P , ≤ ) be poset and A be a subset of P. An element x ∈ P is called an Lower Bound of A if x ≤ a ∀ a ∈ A

6.5.4 Least Upper Bound or Supremum


Let (P , ≤ ) be a poset and let A ≤ P . An element x ∈ P is said to be a Least Upper Bound or Supremum of
A if x is an upper bound of A and x ≤ y for all upper bounds y of A. Least upper bound, if it exists, is unique
and will be denoted by ‘‘lub’’ or ‘‘sup’’.
262 Discrete Mathematical Structures

6.5.5 Greatest Lower Bound or Infimum


Let (P , ≤ ) be a poset and A ⊆ P . An element x ∈ P is said to be a greatest lower bound or infimum of A,
written as glb ( A ) or inf ( A ), if x is a lower bound and y ≤ x for all lower bounds y of A.
A greatest lower bound, if it exists is unique.

Illustration: Consider the poset whose diagram is given by


d

c e

a f
Fig. 6.61

(i) Upper bound for {c, e} is d lub {c, e} or sup {c, e} = d . Lower bound for {c, e} are the elements b, a and f
glb {c, e} = inf {c, e} = b
(ii) Lower bound for {a, f } are the the elements b, c, e, d lub {a, f } = b = sup {a, f } lower bounds of a, f do not
exist.

Example 31: Show that a poset has atmost one greatest and atmost one least element.
[U.P.T.U. (B.Tech.) 2002, 2004]

Solution: Let a and b are the greatest element of a poset A. Then, since b is the greatest element, we have
a≤b ...(1)
Similarly, since a is the greatest element, we have
b≤a ...(2)
Then from (1) and (2) b = a by antisymmetric property of poset.
Similarly it can be proved for least element. Hence a poset has atmost one greatest and one least element.

Example 32: Consider the set A = {1, 2, 3, 4, 5}. Define the relation < on A such that x < y iff

( x mod 3) < ( y mod 3)


(i) Prove that ( A, ≤ ) is a poset. (ii) Draw the Hasse diagram for ( A, ≤ )
(iii) What are the maximal elements? (iv) What are the minimal elements?
[U.P.T.U. (B.Tech.) 2003; Kurukshetra (B.E.) 2009; P.T.U. (B.E.) Punjab 2007]

Solution: (i) ( A, ≤ ) will be poset if


(a) Reflexivity: Since every element of A is related to itself.
i.e. 1 ≤ 1 ⇒ (1 mod 3) ≤ (1 mod 3) . Hence, it is reflexive.
(b) Antisymmetric: If a ≤ b ⇒ (a mod 3) ≤ (b mod 3) and b ≤ a ⇒ (b mod 3) ≤ (a mod 3)
Then, we get a = b. Hence, it is antisymmetric.
(c) Transitive: If a ≤ b and b ≤ c
Then (a mod 3) ≤ (b mod 3) and (b mod 3) ≤ (c mod 3)
Partial Order Sets and Lattices 263

∴ (a mod 3) ≤ (c mod 3)
or a≤c
Hence, it is transitive. Therefore ( A, ≤ ) is poset.
(ii) The Hasse diagram for A = {1, 2, 3, 4, 5}

2
4

1 3
Fig. 6.62
Maximal element = 5
(iii) 
Minimal element = 1 and 3

Example 33: Consider the partially order set A = {2, 4, 6, 8} where 2| 4 means 2 divide 4 show with reason
whether the following statements are true or false.
(i) Every pair of elements in the poset has a greatest lower bound.
(ii) Every pair of elements in the poset has a least upper bound.
(iii) This poset is a lattice. [U.P.T.U. (B.Tech.) 2002]

Solution: Now first we draw the Hasse diagram under relation of divisor

Fig. 6.63

(i) True, its g.l.b. table is

∧ 2 4 6 8

2 2 2 2 2

4 2 4 2 4

6 2 2 6 2

8 2 4 2 8

Here a ∧ b = H.C.F of (a, b) . Hence every pair of elements has g.l.b.


(ii) False, since there exists no l.u.b. of 6 and 8
(iii) False, since 6 and 8 has no l.u.b. This is not a lattice.
264 Discrete Mathematical Structures

Example 34: Consider the poset A = (1, 2, 3, 4, 6, 9, 12, 18, 36}, ‘|’) . Find the greatest lower bound and least
upper bound of the sets {6, 18} and {4, 6, 9}.
Solution: Hasse diagram under relation of divisibility
36

12 18

4 6 9

2 3
1
Fig. 6.64

An integer is a lower bound of {6, 18} if 6 and 18 are divisible by this integer. Only such integers are 1 and
6. Since 1| 6, 6 is the greatest lower bound of {6, 18}. Hence glb {6, 18} = 6

An integer is an upper bound of {6, 18} if and only if it is divisible by 6 and 18 which is 18.

Hence lub {6, 18} = 18

The only lower bound of {4, 6, 9} = 1. Hence glb {4, 6, 9} = 1.

The only upper bound of {4, 6, 9} = 36 . Hence lub {4, 6, 9} = 36


glb (a, b) = greatest common divisor (g. c. d)
Remark: 
lub {ab} = lowest common multiple (l. c. m)

6.6 Well Ordered Set


A partially ordered set ( A, ≤ )is said to be will ordered if every non-empty subset of S has a least element.

Illustration: The set of real numbers R and the set of all integer I (with the usual ordering ≤) are not
well-ordered.

Illustration: The set of all positive integer I + or N is well ordered.

Theorem 1: Every well ordered set is totally ordered.


Proof: Let x, y ∈ X . ( X , ≤ ) being a well ordered set. Then { x, y} contains a first element.

Hence x ≤ y or y ≤ x. This means that ( X , ≤ ) is totally ordered.


Partial Order Sets and Lattices 265

6.7 Complete Order


A linear order ≤ on a set X is called complete if every non-empty subset of X which is bounded above has a
supremum in X.

Illustration: Every well order is complete.

6.8 Dual of a Poset


Let R be relation on a set X. Then converse of R denoted by R is a relation on X defined by setting
a R b ⇔ b R a ∀ a, b ∈ X
If R is a partial order relation denoted by ≤ on X, then R the convese of R is denoted by ≥ .

Theorem 2: If ( X , R ) is a poset then ( X , R ) is also poset. [U.P.T.U. (M.C.A.) 2005]

Proof: ( X , R ) will be poset if


(i) R is Reflexive: Let a ∈ X . Since R is reflexive then
aR a ∀ a ∈ X ⇒ aR a ∀ a ∈ X
⇒ R is reflexive
(ii) R is antisymmetric: Let a R b and b R a
Now a R b ⇒ b R a and b R a ⇒ a R b
But a R band b R a ⇒ a = bas R is antisymmetric
Thus, aR b and bR a ⇒ a = b
Hence, R is antisymmetric.
(iii) R is transitive: Let a R b and b R c ⇒ b R a and c R b
⇒ cR a
⇒ aR c
Thus, a R b and b R c ⇒ a R c. Hence, R is transitive
Therefore, R is a partial order relation.

6.8.1 Another Definition of Dual Poset


Let ( A, ≤ ) be a poset, then ( A, ≥ ) is also a poset. ( A, ≥ ) is called the dual of ( A, ≤ ).
Remark: The least element of poset ( A, ≤ ) is equal to the greatest element of ( A, ≥ ) and vice versa.
The glb in ( A, ≤ ) = lub in ( A, ≥ )
266 Discrete Mathematical Structures

6.9 Product of Two Posets


Let A and B be two posets. Then product of two poset is define as A × B = {(a, b): a ∈ A, b ∈ B}
Under the relation
(a1 , b1 ) ≤ (a2, b2 ) if a1 ≤ a2 on A and b1 ≤ b2 on B

Theorem 3: If A and B are two posets then A × B is also a poset, where (a, b) ≤ (c, d )if and only if a ≤ c, b ≤ d
[U.P.T.U. (B.Tech.) 2009]

Proof: ( A × B ) will be poset if


(i) Reflexivity: Let (a, b) ∈ A × B ∀ a ∈ A, b ∈ B
⇒ a ≤ a and b ≤ b
⇒ (a, b) ≤ (a, b)
⇒ relation (≤ ) on ( A × B ) is reflexive.
(ii) Antisymmetry: Let (a1 , b1 ) ≤ (c1 , d1 ) and (c1 , d1 ) ≤ (a1 , b1 )
Then (a1 , b1 ) ≤ (c1 , d1 ) ⇒ a1 ≤ c1 and b1 ≤ d1 , (c1 , d1 ) ≤ (a1 , b1 ) ⇒ c1 ≤ a1 and d1 ≤ b1
Now, a1 ≤ c1 and c1 ≤ a1 ⇒ a1 = c1 and b1 ≤ d1 and d1 ≤ b1 ⇒ b1 = d1
Thus (a1 , b1 ) = (c1 , d1 ) . Hence, (≤ ) on A × B is anti-symmetric
(iii) Transitivity: Let (a, b) ≤ (c, d ) and (c, d ) ≤ (e, f )
Then a ≤ c, b ≤ d and c ≤ e, d ≤ f
∴ a ≤ c, c ≤ e ⇒ a ≤ e
b ≤ d, d ≤ f ⇒ b ≤ f
∴ (a, b) ≤ (e, f )
Hence, (≤ ) on A × B is transitive. Thus, A × B is a poset.

6.10 Isomorphic Posets


Two posets A and B are said to be isomorphic if there is a function f : A → B such that f is one-one and onto
function. And
x ≤ y ⇔ f (x) ≤ f (y )
or
x R y ⇔ f (x ) R′ f (y )

Example 35: Elaborate the term isomorphic poset? Let A = {1, 2, 3, 4} and ≤ (relation) be partial order of
divisibility on A. Let B = {0, 1, 2, 3, 4} and ≤ (relation) be usual less than or equal to an set B. Show that ( A, ≤ )
and (B, ≤ ) are isomorphic poset. [U.P.T.U. (B.Tech.) 2002]

Solution: We have
A = {1, 2, 3, 4}, ≤ : divisibility relation
R = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (1, 3), (1, 4), (2, 4)}
Partial Order Sets and Lattices 267

Whose diagram is

Fig. 6.65

B = {0, 1, 2, 3, 4}, ≤ : less than or equal


R = {(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (0, 1), (0, 2), (0, 3), (0, 4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}
Whose diagram is

0 1

2 3

Fig. 6.66

( A, ≤ ) and (B, ≤ ) are isomorphic poset because there exist function f which is one-one and onto.

Example 36: Let A = {1, 2, 4, 8} and let ≤ be the partial order of divisibility on A. Let A′ = {0, 1, 2, 3} and let ≤
be the usual relation ‘‘less than or equal to’’ on integers. Show that ( A, ≤ ) and ( A′ , ≤ ) are isomorphic posets.
[U.P.T.U. (B.Tech.) 2003, 2008]
Solution: The Hasse diagram of ( A, ‘|’) is
8

1
Fig. 6.67
268 Discrete Mathematical Structures

And the Hasse diagram of ( A′ , ≤ ) is

0
Fig. 6.68
The mapping f : A → A′ .

Since both have same Hasse diagram, every element of A maps to only a single element in A and both have
same number of elements. Hence it is one-one onto.

If we define f (1) = 0, f (2) = 1, f (4) = 2, f (8) = 3

Let a ‘|’ b iff f (a) ≤ f (b)

∴ 1 ‘|’ 2 ⇒ f (1) < f (2)

⇒ 0 <1
And 2 ‘|’ 4 ⇒ f (2) < f (4)

⇒1 < 2
Hence, f : A → A′ is an isomorphism

Example 37: Let A = {1, 2, 3, 4, 6, 12}. Let R be the partial order relation on A given by x R y iff x ‘|’ y. Then
( A, R ) is a poset. Consider another poset ( A, ≤ ) in which ≤ denotes the usual ‘‘less than equal to’’ relation on A.
The ( A, R ) and ( A, ≤ ) are not isomorphic. The Hasse diagrams of ( A, R ) and ( A, ≤ ) are given below
12

12 6

4 6 4

2 3 2

1 1
Fig. 6.69

Solution: The poset ( A, R ) and ( A, ≤ ) are not isomorphic. Let 4 and 6 be two distinct element in ( A, R ) and
f (4), f (6) be two distinct element in ( A, ≤ ). Now f (4) and f (6) are comparable in ( A, ≤ ), while 4 and 6 are
non-comparable.
Partial Order Sets and Lattices 269

Example 38: Show that the poset ( A, ≤ ) and (B, ≤ ), whose Hasse diagrams are given below in figure (i ) and
(ii ), respectively, are not isomorphic.
Solution: Since there is an one-one correspondence between (i) and (ii) so they are not isomorphic to
each other.
a3 b2 b3

a1 a2 b1
(i)
(ii)
Fig. 6.70

Example 39: Let A = {1, 2, 3, 6} and let ≤ the divisibility relation on A. Let B = {φ, {a}, {b}, {a, b}} and let ≤ be
the relation ⊆. Then ( A, ≤ ) and (B, ⊆ ) are isomorphic. [R.G.P.V. (B.E.) Bhopal 2008]

Solution: Let f : A → B is defined as


f (1) = φ, f (2) = {a}, f (3) = {b}, f (6) = {a, b}

Then f is bijective isomorphic from ( A, ≤ ) to (B, ⊆ ). Hence ( A, ≤ ) and (B, ⊆ ) are isomorphic

6 {a, b} = f(6)

2 3 f(2) = {a} {b} = f(3)

1 φ = f(1)

(i) (ii)
Fig. 6.71

(i) and (ii) are the Hasse diagram of ( A, ≤ ) and (B, ⊆ )

6.11 Lattice
A partially ordered set (L, ≤ ) is said to be a lattice if every two elements in the set L has unique least upper
bound (sup) and a unique greatest lower bound (inf)
or
The poset (L, ≤ ) is a lattice if for every a, b ∈ L sup {a, b} and inf {a, b} exists in L. i.e.
sup {a, b} = a ∨ b = a joint b and Inf {a, b} = a ∧ b = a meet b

 sup {a, b} = a ∪ b or a + b
Note: The other notations for 
 Inf {a, b} = a ∩ b or a . b
270 Discrete Mathematical Structures

Illustration: The set N of natural numbers under divisibility relation ‘|’ formed a lattice in which
a ∨ b = l c m (a, b) ∈ N
a ∧ b = gcd (a, b) ∈ N

Example 40: Determine whether the following Hasse diagrams represent lattice or not.
Partial Order Sets and Lattices 271

(ix) 5 (x) 6

5
4

3 4
2 3

1 2
[U.P.T.U. (B.Tech.) 2007] [U.P.T.U. (B.Tech.) 2007]

(xi) e

c d

a
[U.P.T.U. (B.Tech.) 2002; R.G.V.P. (B.E.) Bhopal 2005]
Fig. 6.72

Solution: (i) Construct the closure tables for lub (∨) or supremum or joint and glb (∧ )

∨ a b c d ∧ a b c d
a a b c d a a a a a
b b b c d b a b b b
c c c c d c a b c c
d d d d d d a b c d

Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
(ii) Construct the closure tables for lub (∨ ) and glb (∧ )
lub: glb:
∨ a b c d ∧ a b c d

a a b c d a a a a a
b b b c c b a b b a
c c c c c c a b c d
d d c c d d a a d d
272 Discrete Mathematical Structures

Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.

(iii) Construct the closure tables for lub (∨ ) and glb (∧ )


lub: glb:
∨ a b c d e f g ∧ a b c d e f g
a a b c d e f g a a a a a a a a
b b b d d e f g b a b a b b b b
c c d c d e f g c a a c c c c c
d d d d d e f g d a b c d d d d
e e e e e e f g e a b c d e e e
f f f f f f f − f a b c d e f e
g g g g g g − g g a b c d e e g

Since each subset of two elements has not least upper bound but has greatest lower bound. So this is not
the lattice.

(iv) Construct the closure tables for lub (∨ ) and glb (∧ )


lub: glb:
∨ a b c d e f g ∧ a b c d e f g

a a b c d e f g a a a a a a a a
b b b d d e f g b a b a b b b b
c c d c d e f g c a a c c c c c
d d d d d e f g d a b c d d d d
e e e e e e g g e a b c d e d e
f f f f f g f g f a b c d d f f
g g g g g g g g g a b c d e f g

Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
(v) Construct the closure tables for lub (∨ ) and glb (∧ ):

(∨) a b c d e f g (∧) a b c d e f g
a a a a a a a a a a b c d e f g
b a b a a b a b b b b e g e g g
c a a c a c c c c c e c f e f g
d a a a d a d d d d g f d g f g
e a b c a e c e e e e e g e g g
f a a c d c f f f f g f f g f g
g a b c d e f g g g g g g g g g

Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
Partial Order Sets and Lattices 273

(vi) Construct the closure tables for lub (∨ ) and glb (∧ ).


lub: glb:

a b c d e a b c d e

a a b c d e a a a a a a

b b b c e e b a b b a b

c c c c e e c a b c a c

d d e e d e d a a a d d

e e e e e e e a b c d e

Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
(vii) Construct the closure tables for lub (∨ ) and glb (∧ ).
lub: glb:

∨ a b c d e f ∧ a b c d e f

a a c c d e f a a − a a a a

b c b c d e f b − b b b b b

c c c c d e f c a b c c c c

d d d d d e f d a b c d d d

e e e e e e − e a b c d e d

f f f f f − f f a b c d d f

Since e ∨ f and a ∧ b does not exist. Then given poset is not lattice.
(viii) Construct the closure tables for lub (∨ ) and glb (∧ )
lub: glb:

∨ 1 2 3 4 5 6 ∧ 1 2 3 4 5 6

1 1 2 3 4 5 6 1 1 1 1 1 1 1

2 2 2 6 4 6 6 2 1 2 1 2 1 1

3 3 6 3 6 6 6 3 1 1 3 1 3 3

4 4 4 6 6 6 6 4 1 2 1 4 1 4

5 5 6 5 6 5 6 5 1 1 3 1 5 5

6 6 6 6 6 6 6 6 1 2 3 4 5 6

Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
274 Discrete Mathematical Structures

(ix) Construct the closure tables for lub (∨ ) and glb (∧ )


lub: glb:

∨ 1 2 3 4 5 ∧ 1 2 3 4 5

1 1 2 3 4 5 1 1 1 1 1 1

2 2 2 4 4 5 2 1 2 1 2 2

3 3 4 3 4 5 3 1 1 3 3 3

4 4 4 4 4 5 4 1 2 3 4 4

5 5 5 5 5 5 5 1 2 3 4 5

Since each subset of two elements has least upper bound and greatest lower bound. So this the lattice.
(x) Since 1 ∧ 2 does not exist so it is not lattice.
(xi) Construct the closure tables for lub (∨ ) and glb (∧ ).
lub: glb:

∨ a b c d e ∧ a b c d e

a a b c d e a a a a a a
b b b c d e b a b b b b
c c c c e e c a b c b c
d d d e d e d a b b d d
e e e e e e e a b c d e

Since each subset of two element has least upper bound and a greatest lower bound. So this is the lattice.

Example 41: Let S be any non empty set and P (S ) be its power set. Show that (P (S ), ⊆ ) is a lattice.

Solution: We have shown that (P (S ), ⊆ ) is a poset. Also for any two set {a, b, c}
A, B ∈ P (S ), we have

A ∨ B = sup { A, B} = A ∪ B {a, b} {a, c} {b, c}


and A ∧ B = inf { A, B} = A ∩ B
{b} {c}
Since both A ∪ B and A ∩ B be the element in P (S ), therefore (P (S ), ⊆ ) is a {a}
lattice

To illustrate this example we consider φ


Fig. 6.73
S = {a, b, c}. Then

P (S ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}

The lattice is represented by the following Hasse diagram.


Partial Order Sets and Lattices 275

Example 42: For any positive integer m, D m denote the set of divisors of m ordered of divisibility, then
(D m , ‘|’) is lattice, where
sup (a, b) = lcm (a, b)
inf (a, b) = gcm (a, b)
for any pair a, b in D m .
i.e. D 36 = {1, 2, 3, 4, 6, 9, 12, 18, 36} is lattice.
[I.G.N.O.U. (M.C.A.) 2005, 2009; M.K.U. (B.E.) 2008; U.P.T.U. (B.Tech.) 2004]

Solution: The Hasse diagram of (D 36 , ‘|’) is

36

12 18

4 6 9

2 3

1
Fig. 6.74

Since each subset of two elements least upper bound and a greatest lower bound. So this is the lattice.

Example 43: Let L be the set of all factor of 12 and let ‘|’ be the divisibility relation on L. Show that (L, ‘|’) is a
lattice.
Solution: Construct the closure table for ∨ and ∧
where a ∨ b = sup {a, b} = lcm (a, b)
a ∧ b = inf {a, b} = gcd (a, b)
∨ 1 2 3 4 6 12 ∧ 1 2 3 4 6 12
1 1 2 3 4 6 12 1 1 1 1 1 1 1
2 2 2 6 4 6 12 2 1 2 1 2 2 2
3 3 6 3 12 6 12 3 1 1 3 1 3 3
4 4 4 12 4 12 12 4 1 2 1 4 2 4
6 6 6 6 12 6 12 6 1 2 3 2 6 6
12 12 12 12 12 12 12 12 1 2 3 4 6 12

Since each subset of every two elements in L has ∨ and ∧. Then ≤ (L, ‘|’) is lattice.

Example 44: Show that every chain is a lattice.


Solution: Let (L, ≤ ) be a chain. Let a, b ∈ L. Then, since L is a chain, we have
a, b ∈ L ⇒ a ≤ b or b ≤ a
We assume that a ≤ b. Then
a ∨ b = b and a ∧ b = a
i.e. a ∨ b, a ∧ b both exist in L. Hence every chain is a lattice.
276 Discrete Mathematical Structures

6.12 Dual Lattice


Let (L, ≤ ) be a lattice, for any a, b ∈ L, the converse of relation ≤ , denoted by ≥ is defined as
a≥b⇔b≤a
Then (L, ≥ ) is also a lattice called Dual Lattice of (L, ≤ ).

6.12.1 Dual Statement


The dual of any statement in lattice (L, ≤ ) is defined to be the statement that is obtained by replacing ∧ by ∨
and ∨ by ∧, ≤ by ≥ and ≥ by ≤ . Let L be a lattice and a, b ∈ L, then dual of the statement a ∧ b ≤ b ∨ c is
a ∨ b ≥ b ∧ c.

6.13 Properties of Lattices


Theorem 4: Let (L, ≤ ) be a lattice. Then the following results hold.
(1) Idempotent Law: For each a ∈ L
(i) a∧ a=a (ii) a∨ a=a
(2) Commutative Law: For each a, b ∈ L
(i) a∧ b=b∧ a (ii) a∨ b=b∨ a [U.P.T.U. (M.C.A.) 2005]

(3) Associative Law: For any a, b, c ∈ L


(i) (a ∧ b) ∧ c = a ∧ (b ∧ c) (ii) (a ∨ b) ∨ c = a ∨ (b ∨ c)
(4) Absorption Law: For a, b ∈ L
(i) a ∧ (a ∨ b) = a (ii) a ∨ (a ∧ b) = a [R.G.P.V. (B.E.) Bhopal 2005, 2008]

Proof: (1) Let a ∈ L. Then


(i) a ∧ a = inf {a, a} = a. Then a ∧ a = a
(ii) a ∨ a = sup {a, a} = a. Then a ∨ a = a
(2) Let a, b ∈ L. Then
(i) a ∧ b = inf {a, b} = inf {b, a} = b ∧ a
(ii) a ∨ b = sup {a, b} = sup {b, a} = b ∨ a
(3) Let a, b, c ∈ L. Then show
(i) (a ∧ b) ∧ c = a ∧ (b ∧ c) (ii) (a ∨ b) ∨ c = a ∨ (b ∨ c)
Let x = a ∧ (b ∧ c) and y = (a ∧ b) ∧ c
Now, x = a ∧ (b ∧ c) ⇒ x ≤ a, x ≤ b ∧ c
⇒ x ≤ a, x ≤ b, x ≤ c
⇒ x ≤ a ∧ b, x ≤ c
⇒ x ≤ (a ∧ b) ∧ c ≤ y
∴ a ∧ (b ∧ c) = (a ∧ b) ∧ c
(ii) By principle of duality a ∨ (b ∨ c) = (a ∨ b) ∨ c
Partial Order Sets and Lattices 277

(4) For a, b, c ∈ L. Then show


(i) a ∧ (a ∨ b) = a (ii) a ∨ (a ∧ b) = a
By definition for any a ∈ L, we have
a ≤ a, a ≤ a ∨ b ⇒ a ≤ a ∧ (a ∨ b) ...(1)
Bu a ∧ (a ∨ b) ≤ a ...(2)
Then from (1) and (2)
a ∧ (a ∨ b) = a
By principle of duality a ∨ (a ∧ b) = a

Theorem 5: Let (L, ≤ ) be a lattice. For any a, b, c ∈ L, the following hold


a ≤ c ⇔ a ∨ (b ∧ c) ≤ (a ∨ b) ∧ c [U.P.T.U. (B.Tech.) 2009]

Proof: We know that for any a, b, c ∈ L. Then


a≤c⇔a∨ c=c ...(1)
and a ∨ (b ∧ c) ≤ (a ∨ b) ∧ (a ∨ c) ...(2)
From (1) and (2) we find
a ≤ c ⇔ a ∨ (b ∧ c) ≤ (a ∨ b) ∧ c
Remark: This inequality is known as Modular Inequality.

Theorem 6: For any a, b ∈ L, prove that


a ≤ a ∨ b and a ∧ b ≤ a [P.T.U. (Punjab) 2008]

Proof: We know a ∨ b is upper bound of a. Hence a ≤ a ∨ b. Also we know a ∧ b is lower bound of a.

Hence a ∧ b ≤ a.

Theorem 7: Let (L, ≤ ) be a lattice and let ∧ and ∨ denote the operations of meet and joint in L. Then for any
a, b ∈ L.
(i) a≤b⇔a∧ b=a (ii) a ≤ b ⇔ a ∨ b = b (iii) a∧ b⇒a⇔a∨ b=b
Proof: (i) Let a ∧ b = a. Since a ∧ b = inf {a, b} ⇒ a ∧ b ≤ b.
Now a∧ b≤b⇒a≤b [ a ∧ b = a]
Conversly, Let a ≤ b. By reflexivity of ≤ we have
a≤a
Now a ≤ b and a ≤ a ⇒ a is lower bound of {a, b}
⇒ a = inf {a, b} = a ∧ b
Since a ∧ b infimum of {a, b}, we have
a∧ b≤a
∴ a ≤ a ∧ b and a ∧ b ≤ a ⇒ a ∧ b = a (By antisymmetry)
(ii) Let a ∨ b = b, then show a ≤ b
Since a ∨ b = sup {a, b}
⇒a≤a∨ b
Now, a ≤ a ∨ b and a ∨ b = b ⇒ a ≤ b
278 Discrete Mathematical Structures

Conversely, Again let a ≤ b then reflexivity b ≤ b


Now a ≤ b, b ≤ b ⇒ b is an upper bound of {a, b}
⇒ sup {a, b} ≤ b
⇒a∨ b≤b
But from the definition of a ∨ b = sup {a, b} ⇒ b ≤ a ∨ b
Also a ∨ b ≤ b and b ≤ a ∨ b ⇒ a ∨ b = b
(iii) We know a ∧ b = a ⇔ a ≤ b
⇔a∨ b=b
Hence, a ∧ b = a ⇔ a ∨ b = b.

Theorem 8: Let (L, ≤ ) be a lattice and a, b, c ∈ L. Then the following implications hold:
(i) a ≤ b and a ≤ c ⇒ a ≤ b ∨ c (ii) a ≤ b and a ≤ c ⇒ a ≤ b ∧ c.

Proof: (i) Suppose a ≤ b and a ≤ c. From the definition of join operation in lattice (L, ≤ ), we have
b ∨ c = sup {b, c}
⇒ b ∨ c is an upper bound of {b, c}
⇒ b ≤ b ∨ c.
Now, by transitivity of the relation ≤ , we have
a ≤ b and b ≤ b ∨ c ⇒ a ≤ b ∨ c.
(ii) Suppose a ≤ b and a ≤ c. Then
a ≤ b and a ≤ c ⇒ a is a lower bound of {b, c}
⇒ a ≤ glb {b, c}
⇒a≤b∧ c [Q glb {b, c} = b ∧ c]
Corollarly: Let (L, ≤ ) be a lattice and (L, ≥ ) be its dual. Then for a, b, c ∈ L,
(i) a ≥ b and a ≥ c ⇒ a ≥ b ∧ c (ii) a ≥ b and a ≥ c ⇒ a ≥ b ∨ c .
Proof: Applying principle of duality on Theorem 8, we get the results.

Theorem 9: Let (L, ≤ ) be a lattice and a, b, c, d ∈ L. Then the following implications hold:
(i) a ≤ b and c ≤ d ⇒ a ∨ c ≤ b ∨ d (ii) a ≤ b and c ≤ d ⇒ a ∧ c ≤ b ∧ d.
Proof: (i) Suppose that a ≤ b and c ≤ d. By the definition of join operation ∨ in lattice (L, ≤ ), we have
b ≤ b ∨ d and d ≤ b ∨ d.
Now, by transitivity of the relation ≤, we have
a ≤ b and b ≤ b ∨ d ⇒ a ≤ b ∨ d .
Similarly, c ≤ d and d ≤ b ∨ d ⇒ c ≤ b ∨ d .
Now, a ≤ b ∨ d and c ≤ b ∨ d ⇒ b ∨ d is an upper bound of {a, c}
⇒ lub {a, c} ≤ b ∨ d
⇒a∨ c≤b∨ d [Q a ∨ c = lub {a, c}]
(ii) Suppose that a ≤ b and c ≤ d. By the definition of meet operation ∧ in lattice (L, ≤ ), we have
a ∧ c ≤ a and a ∧ c ≤ c.
By transitivity of the relation ≤, we have
a ∧ c ≤ a and a ≤ b ⇒ a ∧ c ≤ b.
Similarly, a ∧ c ≤ c and c ≤ d ⇒ a ∧ c ≤ d
Partial Order Sets and Lattices 279

Now, a ∧ c ≤ b and a ∧ c ≤ d ⇒ a ∧ c is a lower bound of {b, d}


⇒ a ∧ c ≤ glb {b, d} ⇒ a ∧ c ≤ b ∧ d
Theorem 10: Let (L, ≤ ) be a lattice. Then for any a, b, c ∈ L, the following inequalities hold:
(i) a ∧ (b ∨ c) ≥ (a ∧ b) ∨ (a ∧ c) (ii) a ∨ (b ∧ c) ≤ (a ∨ b) ∧ (a ∨ c).
These inequalities are known as distributive inequalities. They are also called Semi-distributive Laws.
Proof: (i) By the definition of meet operation ∧ in lattice (L, ≤ ), we have
a ∧ b = inf {a, b} ≤ a and a ∧ b = inf {a, b} ≤ b.
Further, by the definition of join operation ∨ in lattice (L, ≤ ), we have
b ≤ sup {b, c} = b ∨ c and c ≤ sup {b, c} = b ∨ c.
Also, by transitivity of the relation ≤, we have
a ∧ b ≤ b and b ≤ b ∨ c ⇒ a ∧ b ≤ b ∨ c.
Now, a ∧ b ≤ a and a ∧ b ≤ b ∨ c ⇒ a ∧ b is a lower bound of {a, b ∨ c}
⇒ a ∧ b ≤ glb {a, b ∨ c}
⇒ a ∧ b ≤ a ∧ (b ∨ c) [Q a ∧ (b ∨ c) = glb {a, b ∨ c}] ...(1)
Again, a ∧ c ≤ a and a ∧ c ≤ b ∨ c ⇒ a ∧ c ≤ a ∧ (b ∨ c). ...(2)
From (1) and (2), we have
a ∧ (b ∨ c) is an upper bound of {a ∧ b, a ∧ c}
Then lub (a ∧ b, a ∧ c) ≤ a ∧ (b ∨ c)
⇒ (a ∧ b) ∨ (a ∧ c) ≤ a ∧ (b ∨ c)
(ii) By principle of duality we get (ii) part.

Theorem 11: Show that dual of a lattice is a lattice. [U.P.T.U. (B.Tech.) 2004, 2007]

Solution: Let (L, ≤ ) be a lattice and let (L, ≥ ) be its dual, where the relation ≥ is defined as
x ≥ y if and only if y ≤ x.
We now show that ≥ is reflexive, antisymmetric and transitive.
( P1 ) ≥ is reflexive: Let a ∈ L. Since ≤ is reflexive, we have
a ≤ a ∀ a ∈L ⇒ a ≥ a ∀ a ∈L ⇒ ≥ is reflexive.
( P2 ) ≥ is anti-symmetric: Let a, b ∈ L be such that a ≥ b and b ≥ a. Then
a ≥ b and b ≥ a ⇒ b ≤ a and a ≤ b
⇒a=b [Q ≤ is antisymmetric]
Thus a ≥ b and b ≥ a ⇒ a = b. Hence, ≥ is anti-symmetric.
( P3 ) ≥ is transitive: Let a, b, c ∈ L be such that a ≥ b and b ≥ c. Then
a ≥ b and b ≥ c ⇒ b ≤ a and c ≤ b
⇒ c ≤ b and b ≤ a
⇒c≤a [Q ≤ is transitive]
⇒ a ≥ c.
Thus a ≥ b and b ≥ c ⇒ a ≥ c. Hence, ≥ is transitive.
Therefore, ≥ is a partial order relation and L, and so (L, ≥ ) is a poset.
Let a, b ∈ L. Then since (L, ≤ ) is a lattice, sup {a, b} exists in (L, ≤ ).
Let a ∨ b = sup {a, b} in (L, ≤ ). Then
a ≤ a ∨ b and b ≤ a ∨ b.
Now a ≤ a ∨ b and b ≤ a ∨ b
⇒ a ∨ b ≥ a and a ∨ b ≥ b
280 Discrete Mathematical Structures

⇒ a ∨ b is a lower bound of {a, b} in (L, ≥ ).


We shall show that a ∨ b is the greatest lower bound of {a, b} in (L, ≥ ).
Let l be any lower bound of {a, b} in (L, ≥ ). Then
l ≥ a and l ≥ b ⇒ a ≤ l and b ≤ l
⇒ l is an upper bound of {a, b} in (L, ≤ )
⇒ lub {a, b} ≤ l in (L, ≤ )
⇒ a ∨ b ≤ l in (L, ≤ )
⇒l≥a∨ b
⇒ a ∨ b is greatest lower bound of {a, b} in (L, ≥ ).
Similarly, we can show that a ∧ b is the least upper bound of {a, b} in (L, ≥ ). Hence (L, ≥ ) is a lattice.

Theorem 12: Show that in a lattice (L, ≤ ) if a ≤ b ≤ c, then


a∨ b=b∧ c
and (a ∧ b) ∨ (b ∧ c) = b = (a ∨ b) ∧ (a ∨ c).
Solution: We know that
a≤b⇒a∨ b=b ...(1)
and b ≤ c ⇒ b ∧ c = b. ...(2)
From (1) and (2), we get
a ≤ b ≤ c ⇒ a ∨ b = b = b ∧ c. ...(3)
Thus a ≤ b ≤ c ⇒ a ∨ b = b ∧ c.
Also, a≤b⇒a∧ b=a
and a≤b≤c⇒a≤c [Q ≤ is transitive]
⇒ a ∨ c = c. ...(4)
Now, replace a ∧ b for a, b ∧ c for b, a ∨ b for b and a ∨ c for c in R.H.S. of (3) we find
(a ∧ b) ∨ (b ∧ c) = b = (a ∨ b) ∧ (a ∨ c)

Example 45: Let N denote the set natural numbers. For any a, b ∈ N , show that max {a, min {a, b}} = a and
min {a, max {a, b}} = a
Solution: We know a ∨ b = max {a, b} and a ∧ b = min {a, b}
By absorption law a ∧ (a ∨ b) = a ...(1)
a ∨ (a ∧ b) = a ...(2)
∴ min {a, max {a, b} = min {a, a ∨ b} = a ∨ (a ∧ b) = a
max {a, min {a, b} = max {a, a ∧ b} = a ∨ {a ∧ b} = a
∀ positive integers a and b.

6.14 Sub-lattice
A non empty subset M of lattice (L, ≤ ) is said to be a sub-lattice of L if M is closed with respect to meet (∧ )
and joint (∨ ) i.e.
x, y ∈ M ⇒ x ∨ y ∈ M and x ∧ y ∈ M
or
A non empty subset of M of lattice (L, ≤ ) is said to be sub-lattice of L if M itself formed lattice with respect to
∨ and ∧ operation.
Partial Order Sets and Lattices 281

Example 46: Consider the lattice of all the integer ‘|’ under the operation of divisibility. The lattice D n of all
divisors of n > 1 is a sub-lattice of ‘|’ . Determine all the sub-lattices of D 30 that contain at least four elements.
D 30 = {1, 2, 3, 5, 6, 10, 15, 30}
Solution: The sublattice of D 30 that solution at least four elements are as follows.
(i) {1, 2, 6, 30} (ii) {1, 2, 3, 30} (iii) {1, 5, 15, 30}
(iv) {1, 3, 6, 30} (v) {1, 5, 10, 30} (vi) {1, 3, 15, 30}

Example 47: Consider the lattice L = {1, 2, 3, 4, 5} as shown in fig. 6.75 Determine all sublattices with three
or more elements.

Fig. 6.75

Solution: All the sublattice with three or more elements are those whose least upper bound (lub) and
greatest lower bound (glb) exists for every pair of elements which are as.
(i) {1, 2, 5} (ii) {1, 3, 5} (iii) {1, 4, 5} (iv) {1, 2, 3, 5}
(v) {1, 3, 4, 5} (vi) {1, 2, 3, 4, 5} (vii) {1, 2, 4, 5}

6.15 Isomorphic Lattice [U.P.T.U. (B.Tech.) 2007, 2008]

Two lattice L1 and L 2 are isomorphic if there exists a one-to-one correspondence f : L1 → L 2 such that
f (a ∧ b) = f (a) ∧ f (b)
and f (a ∨ b) = f (a) ∨ f (b) ∀ a, b ∈ L1 and f (a), f (b) ∈ L 2

Example 48: Show that the lattice L and L′ given below are not isomorphic? [U.P.T.U. (B.Tech.) 2008]

f 5

d 4
e

b 2 3
c

a 1
(L) (L´)
Fig. 6.76

Solution: Consider the mapping


f = (a, 1), (b, 2), (c, 3), (d, 4), (e, not defined)
Since there is no one-one corresponding between L and L′ so L and L′ are not isomorphic .
282 Discrete Mathematical Structures

Example 49: Determine whether the lattice shown in Fig. 6.77 are isomorphic.

d
4

b c 3 2

a 1
L1 L2
Fig. 6.77
Solution: The lattice shown in fig. 6.77 are isomorphic. If we consider f = {(a, 1), (b, 2), (c, 3), (d, 4)}
i.e. f : L1 → L 2

a, b ∈ L1 ⇒ f (a), f (b) ∈ L 2
Then f (b ∧ c) = f (a) = 1
f (b) ∧ f (c) = 2 ∧ 3 = 1
Q f (b ∧ c) = f (b) ∧ f (c)
Again f (b ∨ c) = f (d ) = 4
f (b) ∨ f (c) = 2 ∨ 3 = 4
∴ f (b ∨ c) = f (b) ∨ f (1)
Hence, L1 and L 2 are isomorphic.

Example 50: Determine whether the lattice shown in fig.6.78 are isomorphic. [R.G.P.V. (B.E.) Bhopal 2009]

7
e
5 6
4
b c d
2 3

1
a
L1
Fig. 6.78

Solution: L1 and L 2 lattices are not isomorphic. Since one-one corresponding is not possible as the
element of two lattices are not same.
Partial Order Sets and Lattices 283

6.16 Distributive Lattice [U.P.T.U. (B.Tech.) 2009; I.G.N.O.U. (M.C.A.) 2001, 2004, 2006, 2009;
R.G.P.V. (B.E.) Bhopal 2005, 2008]
A lattice L is called distributive lattice if for any element a, b and c of L, it satisfies the following properties.
(i) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) (ii) a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)

Theorem 13: Let a, b, c ∈ L, where (L, ≤ ) is a distributive lattice. Then a ∨ b = a ∨ c and a ∧ b = a ∧ c ⇒ b = c


[Rohtak (B.E.) 2008; Raipur (B.E.) 2007]

Proof: We know that


b = b ∨ (b ∧ a) [absorption]
= b ∨ (a ∧ b) [commutative]
= b ∨ (a ∧ c) [a ∧ b = a ∧ c]
= (b ∨ a) ∧ (b ∨ c) [distributive]
= (a ∨ b) ∧ (c ∨ b) [commutative]
= (a ∨ c) ∧ (c ∨ b) [a ∨ b = a ∨ c]
= (c ∨ a) ∧ (c ∨ b)
= c ∨ (a ∧ c) [ a ∧ b = a ∧ c]
= c ∨ (c ∧ a)
=c [absorption]

6.17 Complete Lattice [U.P.T.U. (B.Tech.) 2005]

Let (L, ≤ ) be lattice. Then L is said to be complete if every subset A of L, ∧ A and ∨ A exist in L. Thus, in every
complete lattice (L, ≤ ) there exist a greatest element g and a least element l.

6.18 Complement of an Element in a Lattice


Let (L, ≤ ) be a lattice and let 0 and 1 be its lower and upper bounds. If a ∈ L is an element than an element b
is called complement of a if
a ∨ b = 1 and a ∧ b = 0
Remark: 0 and 1 are called universal bounds. But commutative property we can say if b is complement of a
then a is also complement of b.

6.19 Complemented Lattice


Let (L, ≤ ) be a lattice with universal bounds 0 and 1. The lattice L is said to be complemented lattice if every
element in L has a complement i.e.
a ∨ 1 = 1, a ∧ 1 = a

a ∧ 0 = 0, a ∨ 0 = a
The complement of a is denoted by a′ or a. Then
a ∧ a′ = 0, a ∨ a′ = 1
284 Discrete Mathematical Structures

6.20 Complemented Complete Lattice


Let (L, ≤ ) be a complete lattice with greatest and lower elements g and l respectively, then L is called
complemented complete lattice. If for each a ∈ L, there exists an element a ′ ∈ L such that
a ∨ a ′ = g and a ∧ a ′ = l
Remark: The complemented distributive lattice is called a Boolean Algebra.

6.21 Bounded Lattice [U.P.T.U. (B.Tech.) 2008]

Let (L, ≤ ) be a lattice. Then L is said to be bounded lattice if it has a least element 0 and a greatest element
1.0 is called the identity of joint and 1 is called the identity of meet in a bounded lattice (L, ∨, ∧ ) .

6.22 Direct Product of Lattices


Let (L1 , ∧1 , ∨1 ) and (L 2, ∧ 2, ∨ 2 ) be two lattices, where ∧1 , ∨1 are meet and join in L1 and ∧ 2, ∨ 2 are meet and
join in L 2. The algebraic system (L1 × L 2, ∧, ∨ ) is called the Direct Product of the lattices (L1 , ∧1 , ∨1 ) and
(L 2, ∧ 2, ∨ 2 ) if for any (a1 , a2 )and (b1 , b2 )in L1 × L 2, so that a1 , b1 ∈ L1 and a2, b2 ∈ L 2, define ∧ and ∨ in L1 × L 2 by
(a1 , a2 ) ∧ (b1 , b2 ) = (a1 ∧1 b1 , a2 ∧ 2 b2 )
(a1 , a2 ) ∨ (b1 , b2 ) = (a1 ∨1 b1 , a2 ∨ 2 b2 )

6.23 Modular Lattices


A lattice L is said to be modular lattice if for all a, b, c ∈ L, a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c

Theorem 14: Let L {a1 , a2, K an} be finite lattice then L is bounded.
Proof: Let L = {a1 , a2, a3 K an} be any finite lattice. Then we have to show that L having least and greatest
element.
Now, b1 = a1
b2 = a2 ∧ b1
b3 = a3 ∧ b2
.........................
.........................
.........................
bn = an ∧ bn −1
All b1 , b2, K bn ∈ L and bn ≤ ai ∀ i = 1, 2, 3 K n
⇒ bn is the least element of L
∴ bn = a1 ∧ a2 ∧ a3 K ∧ an
Similarly, a1 ∨ a2 ∨ a3 K ∨ an is the greatest element of L. Thus, L is bounded lattice.
Partial Order Sets and Lattices 285

Theorem 14: A lattice in which relative complements are unique is distributive. [Delhi (B.E.) 2009]

Proof: Let L be a lattice in which relative complements are unique. Then L cannot contain a pentagonal
sublattice in which relative complements are not unique. Similarly it cannot contain a sublattice
isomorphic with M 5. Hence L is distributive.

Theorem 16: For any a and b in a Boolean algebra B.

(i) ( a′ )′ = a (ii) ( a ∨ b)′ = a′ ∧ b′

 a ∨ ( a′ ∧ b) = a ∨ b
(iii) ( a ∧ b)′ = a′ ∨ b′ (iv) 
 a ∧ ( a′ ∨ b) = a ∧ b
[U.P.T.U. (B.Tech.) 2003, 2004, 2005]

Proof: (i) To show (a ′ )′ = a


Let complement of a ∈ B be a ′ ∈ B then by definition of compliment
a ∨ a ′ = 1 and a ∧ a ′ = 0 ...(1)
Since the operation ∨ and ∧ are commutative then. From (1)
a ′ ∨ a = 1 and a′ ∧ a = 0
This show a ∈ B be the complement of a′
i.e. (a ′ )′ = a

(ii) To show (a ∨ b)′ = a ′ ∧ b ′


If a ′ ∧ b ′ be complement of a ∨ b then show
(a ∨ b) ∨ (a ′ ∧ b ′ ) = 1 and (a ∨ b) ∧ (a ′ ∧ b ′ ) = 0
Now (a ∨ b) ∨ (a ′ ∧ b ′ ) = [(a ∨ b) ∨ a ′ ] ∧ [(a ∨ b) ∨ b ′ ] [by distributive]
= [ a ∨ (b ∨ a ′ )] ∧ [ a ∨ (b ∨ b ′ )] [by associativity]
= [ a ∨ (a ′ ∨ b)] ∧ [ a ∨ 1] [ a ∨ b ′ = 1]
= [(a ∨ a ′ ) ∨ b] ∧ 1 [ a ∨ 1 = 1]
= [1 ∨ b] ∧ 1
=1 ∧1
=1
and (a ∨ b) ∧ (a ′ ∧ b ′ ) = [ a ∧ (a ′ ∧ b ′ )] ∨ [ b ∧ (a ′ ∧ b ′ )]
= [(a ∧ a ′ ) ∧ b ′ ] ∨ [ b ∧ a ′ ] ∧ b ′ = (0 ∧ b ′ ) ∨ (a ′ ∧ b) ∧ b ′
= 0 ∨ [ a ′ ∧ (b ∧ b ′ )] = 0 ∨ [ a ′ ∧ 0] = 0 ∨ 0 = 0
Thus, a ′∧ b ′ is the complement of a ∨ b i.e.
(a ∨ b)′ = a ′ ∧ b ′
(iii) Applying principle of duality on (a ∨ b)′ = a ′∧ b ′
We get (a ∧ b)′ = a ′ ∨ b ′
(iv) We have a ∨ (a ′ ∧ b) = (a ∨ a ′ ) ∧ (a ∨ b) [by distributive]
= 1 ∧ (a ∨ b) =a∨ b [ a ∨ a ′ = 1]
Again, a ∧ (a′ ∨ b) = (a ∧ a′ ) ∨ (a ∧ b)
= 0 ∨ (a ∧ b) = a ∧ b
286 Discrete Mathematical Structures

Theorem 17: Prove that in a distributive lattice, if an element has a complement then this complement is
unique. [U.P.T.U. (B.Tech.) 2003, 2008, 2009]

Proof: Let (L, ≤ )be a bounded distributive lattice. Let a ∈ L having two complement b and c then show b = c

Since b and c be complement of a then


a∨ b=1 a∧ b=0
a∨ c =1 a∧ c=0
Now b=b∧1
= b ∧ (a ∨ c)
= (b ∧ a) ∨ (b ∧ c) [by distributive law]
= (a ∧ b) ∨ (b ∧ c) [ a ∧ b = b ∧ a]
= 0 ∨ (b ∧ c) [ a ∧ b = 0]
= (a ∧ c) ∨ (b ∧ c) [ 0 = a ∧ c]
= (a ∨ b) ∧ c [ a ∨ b = 1]
=1 ∧ c = c
Hence, complement of a is unique.

Theorem 18: If L is a distributive lattice and b′ is the complement of b in L and a ∧ b ′ = 0, then show a ≤ b.
Proof: We have a ∧ b ′ = 0
⇒ (a ∧ b ′ ) ∨ b = 0 ∨ b = b
⇒ (a ∨ b) ∧ (b ′ ∨ b) = b
⇒a∨ b=b
⇒a≤b

Theorem 19: The dual of distributive lattice is a distributive lattice.


Proof: Let (L, ∧, ∨ ) be a distributive lattice. Then we have to show its dual (L, ∧ *, ∨ *) is also distributive
where ∧ * = ∨, ∨ * = ∧.
Let a, b, c ∈ L, then we have to show
a ∧ * (b ∨ * c) = (a ∧ * b) ∨ * (a ∧ * c) or a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)
This is true because (L, ∧, ∨ ) is distributive lattice. Hence (L, ∧ *, ∨ *) is also distributive.

Theorem 20: In any lattices (L, ∨, ∧ ) the following statements are equivalent

(i) a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) ∀ a, b, c ∈ L (ii) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) ∀ a, b, c ∈ L

Proof: Let (i) → (ii) i.e. (i) is given than show (ii)

R.H.S. of (ii) = (a ∨ b) ∧ (a ∨ c) = a ∨ [ c ∧ (a ∨ b)]

= a ∨ [(c ∧ a) ∨ (c ∧ b)] [from (i)]

= [ a ∨ (c ∧ a) ∨ (c ∧ b)
= a ∨ (b ∧ c) = L.H.S. of (ii)
Again (ii) → (i) it can be show in dual number.
Partial Order Sets and Lattices 287

Theorem 21: Dual of a complemented lattice is complemented.


Proof: Let (L. R ) be a complemented lattice with 0 and 1 as least and greatest elements. Let (L, R ) be the
dual of (L, R ). Then 1 and 0 are the least and greatest elements of (L, R ).
Let a be any element of L. Since (L, R ) is complemented, there exists a ′ ∈ L such that
a ∧ a ′ = 0 and a ∨ a ′ = 1 in (L. R )
i.e., 0 = inf {a, a ′ } and 1 = sup {a, a ′ } in (L, R )

⇒ 0 R a, 0 R a ′ and a R 1, a ′ R 1
⇒ a R 0, a ′ R 0 and 1 R a, 1 R a ′
⇒ 0 is an upper bound of {a, a′ } in {L, R } and 1 is a lower bound of {a, a′ } in {L, R }.

Let k be any upper bound of {a, a′ } in {L, R }. Then a R k and a ′ R k


⇒ k R a and k R a′
⇒ k R 0 as 0 is the inf. of {a, a′ } in (L, R )
⇒ 0 R k.
This shows that 0 is the least upper bound of [ a, a′ ] in {L, R }. Therefore a ∨ a ′ = 0 in (L, R ).
Similarly, we can show that a ∧ a ′ = 1 in (L, R ). Thus, a is the complement of a′ in (L, R ).
Hence (L, R ) is complemented.

Theorem 22: Two bounded lattices L1 and L 2 are complemented iff L1 × L 2 is complemented.
Proof: Let L1 and L 2 be two complemented lattices and let 0, 1 and 0 ′ , 1 ′ are least and greatest elements of
L1 and L 2 respectively. Then (0, 0 ′ ) and (1, 1′ ) will be the least and greatest elements of L1 × L 2. Let (a1 , a2 )
be any element of L1 × L 2 then a1 ∈ L1 and a2 ∈ L 2.

Since L1 and L 2 are complemented, there exists a1 ′ ∈ L1 and a2′ ∈ L 2 such that a1 ∧ a1 ′ = 0, a ∨ a ′ = 1 and
a2 ∧ a2′ = 0′ and a2 ∨ a2′ = 1. We shall show that (a1 ′ , a2′ ) is the complement of (a1 , a2 ) in L1 × L 2.
We have (a1 , a2 ) ∧ (a1 ′ , a2′ ) = (a1 ∧ a1 ′ , a2 ∧ a2′ ) = (0, 0 ′ )
and (a1 , a2 ) ∨ (a1 ′ , a2′ ) = (a1 ∨ a1 ′ , a2 ∨ a2′ ) = (1, 1′ ).
This shows that (a1 ′ , a2′ ) is the complement of (a1 , a2 ) in L1 × L 2.
Hence L1 × L 2 is complemented.
Conversely, Let L1 × L 2 be complemented, we have to show that L1 and L 2 are complemented.
Let a1 ∈ L1 and a2 ∈ L 2 then (a1 , a2 ) ∈ L1 × L 2.
Since L1 × L 2 is complemented, therefore exists (a1 ′ , a2′ ) ∈ L1 × L 2 such that
(a1 , a2 ) ∧ (a1 ′ , a2′ ) = (0, 0′ )
and (a1 , a2 ) ∨ (a1 ′ , a2′ ) = (1, 1′ )
⇒ (a1 ∧ a1 ′ , a2 ∧ a2′ ) = (0, 0′ ) and (a1 ∨ a1 ′ , a2 ∨ a2′ ) = (1, 1′ )
⇒ a1 ∧ a1 ′ = 0, a2 ∧ a2′ = 0′ and a1 ∨ a1 ′ = 1, a2 ∨ a2′ = 1′
⇒ a1 ∧ a1 ′ = 0, a1 ∨ a1 ′ = 1 and a2 ∧ a2′ = 0′ , a2 ∨ a2′ = 1′
⇒ a1 ′ and a2′ are complements of a1 and a2 respectively. Hence L1 and L 2 are complemented.
288 Discrete Mathematical Structures

Theorem 23: Show that every chain is a distributive lattice. [U.P.T.U. (B.Tech.) 2004]

Solution: Let (L, ≤ ) be a chain and a, b, c ∈ L. We consider the cases:

(i) a ≤ b or a ≤ c and (ii) a ≥ b or a ≥ c.


Now we shall show that distributive law is satisfied by a, b, c:
For case (i), we have
a ∧ (b ∨ c) = a and (a ∧ b) ∨ (a ∧ c) = a.
For case (ii), we have
a ∧ (b ∨ c) = b ∨ c and (a ∧ b) ∨ (a ∧ c) = b ∨ c.
Thus, we have a ∧ (b ∨ c) = (a ∧ c) ∨ (a ∧ c).
This shows that a chain is a distributive lattice.

Theorem 24: Show that every complete lattice is a bounded lattice.


Proof: Let L be a complete lattice. Then every non-empty subset of L has least upper bound and greatest
lower bound. Therefore L itself has least upper bound and greatest lower bound. Hence L is a bounded
lattice.

Theorem 25: In lattice L with least element 0 and greatest element 1, show that 0 is the unique. Complement
of 1 and 1 is the unique complements of 0. [R.G.P.V. (B.E.) Raipur 2005, 2009; Kurukshetra (B.E.) 2008]

Proof: We have 0 ∧ 1 = 0 and 0 ∨ 1 = 1


Therefore 0 and 1 are complements of each other. Now we have to show that each of these two
complements are unique. Suppose if possible a be any other complement of 0
Then 0 ∧ a = 0 and 0 ∨ a = 1
But 0 ∨ a = a Therefore, a = 1
This shows that complement of 0 is unique. Similarly we can show that 0 is the only complement of 1.

Theorem 26: The pentagonal lattice given below is not modular.

1
c

a
o
Proof: Let a ≤ c Fig. 6.79

and a ∨ (b ∧ c) = a ∨ 0 = a
(a ∨ b) ∧ c = 1 ∧ c = c
∴ a ∨ (b ∧ c) ≠ (a ∨ b) ∧ c
Therefore, the pentagonal lattice is not modular.

Theorem 27: Show that every finite lattice is complete.


Proof: Let (L, ∧, ∨ ) be any finite lattice. And S be any non empty subset of L. Then S is finite set. Let
S = {a1 , a2, K an}. Then a1 ∧ a2 K ∧ an and a1 ∨ a2 K ∨ an are infinum and supremum of S in L. Hence L is
complete.
Partial Order Sets and Lattices 289

Theorem 28: Every distributive lattice is modular. [M.K.U. (B.E.) 2008; P.T.U. (B.E.) Punjab 2008]

Proof: Let L be a distributive lattice and a, b, c ∈ L. Then we have to show


a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c
Since L is distributive, then
a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) ...(1)
Also a≤c⇒a∨ c=c ...(2)
Then from (1) and (2) we find
a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c
This show L is modular lattice.
But converse of above theorem is not true.

Theorem 29: Show that a lattice L is modular iff for any a, b, c ∈ L, the following condition holds
a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c)
Proof: Let L is modular then
a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c ...(1)
Since a ≤ c then from (1)
a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c)
Conversely, Let for all a, b, c ∈ L
a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c) ...(2)
Then show L is modular. Let a, b, c ∈ L, a ≤ c then a ≤ c
Hence from (2), we have
a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c
⇒ L is modular.

Example 51: If A = {a, b, c}. Prove that lattice (P ( A ), ∩, ∪ )(under ⊆) is distributive when P ( A ) = power set
of A.
Solution: Let A = {a, b, c} then power set
P ( A ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
The Hasse diagram is shown in fig. 6.80

{a, b, c}

{a, c}
{a, b} {b, c}

{a} {c}
{b}

φ
Fig. 6.80

This is distributive lattice under A ∨ B = A ∪ B and A ∧ B = A ∩ B, A, B ∈ P ( A )


290 Discrete Mathematical Structures

Let A = {a}, B = {b, c}, C = {c, a}, then we have

B ∨ C = {b, c} ∪ {c, a} = {a, b, c}

A ∧ (B ∨ C ) = {a} ∩ {a, b, c} = a ...(1)

Also A ∧ B = A ∩ B = {a} ∧ {b, c} = φ

A ∧ C = A ∩ C = {a} ∩ {c, a} = {a}

∴ ( A ∧ B ) ∨ ( A ∧ C ) = φ ∪ {a} = {a} ...(2)

From (1) and (2) we see that

A ∧ (B ∨ C ) = ( A ∧ B ) ∨ ( A ∧ C )

Again B ∧ C = B ∩ C = {b, c} ∧ {c, a} = {c}

∴ A ∨ (B ∧ C ) = {a} ∪ {c} = {a, c} ...(3)

Also A ∨ B = A ∪ B = {a} ∪ {b, c} = {a, b, c}

A ∨ C = A ∪ C = {a} ∪ {c, a} = {a, c}

∴ ( A ∨ B ) ∧ ( A ∨ C ) = {a, b, c} ∩ {a, c} = {a, c} ...(4)

From (3) and (4), we have

A ∨ (B ∧ C ) = ( A ∨ B ) ∧ ( A ∨ C )

Example 52: The lattice (L, ≤ ) in fig. 6.81 is not a distributive lattice.
a

b c d

e
Fig. 6.81

Where L = {a, b, c, d, e} and ≤ is a partial ordering relation defined on L.

[R.G.P.V. (B.E.) Bhopal 2009; P.T.U. (B.E.) Punjab 2006]

Solution: The joint and meet operations are defined by

a ∨ b = lup {a, b} and a ∧ b = glb {a, b}


Partial Order Sets and Lattices 291

The joint and meet operation tables are given as.


∨ a b c d e ∧ a b c d e
a a a a a a a a b c d e
b a b a a b b b b e e e
c a a c a c c c e c e e
d a a a d d d d e e d e
e a b c d e e e e e e e

∴ b ∧ (c ∨ d ) = b ∧ a = b
and (b ∧ c) ∨ (b ∧ d ) = e ∨ e = e
Thus, b ∧ (c ∨ d ) ≠ (b ∧ c) ∨ (b ∧ d )

Example 53: Show that the lattice shown in Fig. 6.82 are non-distributive.

b a

o c
Fig. 6.82
Solution: We have a ∧ (b ∨ c) = a ∧ 1 = a
and (a ∧ b) ∨ (a ∧ c) = 0 ∨ c = c
∴ a ∧ (b ∨ c) ≠ (a ∧ b) ∨ (a ∧ c)
Hence, the lattice is not distributive.

Theorem 30: A lattice (L, ≤ ) is distributive if and only if


(a ∨ b) ∧ (b ∨ c) ∧ (c ∨ a) = (a ∧ b) ∨ (b ∧ c) ∨ (c ∧ a)∀ a, b, c ∈ L ...(1)

Proof: Let (L, ≤ ) is a distributive lattice, then show


(a ∨ b) ∧ (b ∨ c) ∧ (c ∨ a) = (a ∧ b) ∨ (b ∧ c) ∨ (c ∧ a)
L.H.S. = (a ∨ b) ∧ (b ∨ c) ∧ (c ∨ a)
= {a ∨ [(b ∨ c) ∧ (c ∨ a)]} ∨ {b ∧ [(b ∨ c) ∧ (c ∧ a)]} [L is distributive]
= [(a ∧ (c ∨ a)) ∧ (b ∨ c)] ∨ [(b ∧ (b ∨ c) ∧ (c ∨ a)]
= [ a ∧ (b ∨ c)] ∨ [ b ∧ (c ∨ a)] [by absorption law]
= [(a ∧ b) ∨ (a ∧ c)] ∨ [(b ∧ c) ∨ (b ∧ a)]
= (a ∧ b) ∨ (b ∧ c) ∨ (c ∧ a) = R.H.S.
292 Discrete Mathematical Structures

Conversely: Let the condition (1) hold, then shown (L, ≤ ) is a distributive lattice.
We first show that (L, ≤ ) is a modular lattice.

Let x, y, z be any three elements in A, and let x ≤ z. Then


x ∨ ( y ∧ z ) = [ x ∨ ( x ∧ y )] ∨ ( y ∧ z ) [ x ≤ z ⇒ x ∧ z = x]
= [( x ∧ z ) ∨ ( x ∧ y )] ∨ ( y ∧ z )
= ( x ∧ y ) ∨ ( y ∧ z ) ∨ (z ∧ x )
= ( x ∨ y ) ∧ ( y ∨ z ) ∧ (z ∨ x )
= ( x ∨ y ) ∧ [( y ∨ z ) ∧ z]
= (x ∨ y ) ∧ z
Thus, (L, ≤ ) is a modular lattice.
Now, for any three elements a, b, c in L, we have
a ∧ (b ∨ c) = [ a ∧ (a ∨ c)] ∧ (b ∨ c) [By absorption law]
= a ∧ (a ∨ b) ∧ (a ∨ c) ∧ (b ∨ c)
= [(a ∨ b) ∧ (b ∨ c) ∧ (c ∨ a)] ∧ a
= [(a ∧ b) ∨ (b ∧ c) ∨ (c ∧ a)] ∧ a
= [(a ∧ b) ∨ (c ∧ a)) ∨ (b ∧ c)] ∧ a ...(1)

Since a ∧ b ≤ a, a ∧ c ≤ a ⇒ (a ∧ b) ∨ (a ∧ c) ≤ a ∨ a

Then (a ∧ b) ∨ (a ∧ c) ≤ a ...(2)

a ∧ (b ∨ c) = [(a ∧ b) ∨ (c ∧ a)] ∨ [(b ∧ c) ∧ a]

= [(a ∧ b) ∨ (c ∧ a) ∨ (b ∧ (c ∧ a))]

= (a ∧ b) ∨ (c ∧ a)

Hence (L, ≤ ) is distributive.

Theorem 31: Every sublattice of a distributive lattice is distributive.

Proof: Let M be a sublattic of distributive lattice L.

Let a, b, c ∈ M . Then a, b, c ∈ L.

a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) in L

⇒ a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) in M.

⇒ M is distributive.
Partial Order Sets and Lattices 293

Example 54: Let A = {1, 2, 3, 5, 30} and a ≤ b iff a divided b. The Hasse diagram is shown in Fig. 6.83 Find
complement of 2. [U.P.T.U. (B.Tech.) 2002]

30

2 3 5

1
Fig. 6.83

Solution: Since 2 ∧ 3 = 1, 2 ∨ 3 = 30
2 ∧ 5 = 1, 2 ∨ 5 = 30
Hence, 2 has two complement 3 and 5

Example 55: In the lattice defined by the Hasse diagram given by the following figure. 6.84.
a
b c

e d

f
Fig. 6.84

How many complements does the elements ‘e’ have? Given all [U.P.T.U. (B.Tech.) 2003, 2006, 2007]

Solution:
Since e ∧ g = f , e ∨ g = aand e ∧ d = f e ∨ d = a
where a is universal upper bound and f be universal lower bound. Hence, d, g be two complement of e.

Example 56: Homomorphism image of a distributive lattice, is distributive.


Solution: Let f : L → M be homomorphism and L be a distributive lattice. Then show M is distributive. Let
x, y, z ∈ M as f is onto ∃ a, b, c ∈ L such that f (a) = x, f (b) = y, f (c) = z
x ∧ ( y ∨ z ) = f (a) ∧ ( f (b) ∨ f (c))
= f (a) ∧ ( f (b ∨ c))
= f (a) ∧ f (b ∨ c)
= f {a ∧ (b ∨ c)}
= f {(a ∧ b) ∨ (a ∧ c)}
= f (a ∧ b) ∨ f (a ∧ c)
= [ f (a) ∧ f (b)] ∨ [ f (a) ∧ f (c)] = ( x ∧ y ) ∨ ( x ∧ z )
Hence, M is distributive.
294 Discrete Mathematical Structures

Example 57: Consider the lattice D 30 = {1, 2, 3, 5, 6, 15, 30}, the divisor of 30 ordered by divisibility.
(i) Draw the Hasse diagram of D 30 (ii) Find the complement of 2 and 10, if exists.

Solution: (i) The Hasse diagram of D 30 is

Fig. 6.85

(ii) The elements 2 and 10 has no complement as they do not satisfying the condition of complement
a ∨ a ′ = 30 and a ∧ a ′ = 1. 30 is upper bound, 1 is lower bound.

Example 58: Let (L, ≤ ) be a distributive lattice and let c′ be the complement of an element c in L. If b ∧ c ′ = 0
then show that b ≤ c.
Solution: Since b ∧ c ′ = 0, then we have
(b ∧ c ′ ) ∨ c = 0 ∨ c = c
⇒ (b ∨ c) ∧ (c ′ ∨ c) = c
⇒ (b ∨ c) ∧ 1 = c
⇒ b∨c=c
⇒ b≤c

Example 59: Let (L, ≤ ) be a distributive lattice. Show that if a ∧ x = a ∧ y and a ∨ x = a ∨ y for some a ∈ L.
Then x = y. [U.P.T.U. (M.C.A.) 2005]

Solution: Let (L, ≤ ) be a distributive lattice and let


a ∧ x = a ∧ y and a ∨ x = a ∨ y ...(1)
Now x = x ∧ ( x ∨ a) [by absorption law]
= x ∧ (a ∨ x ) [by commutative]
= x ∧ (a ∨ y ) [by (1)]
= ( x ∧ a) ∨ ( x ∧ y ) [by distributive]
= (a ∧ x ) ∨ ( x ∧ y )
= (a ∧ y ) ∨ ( x ∧ y ) [by (1)]
= (a ∨ x ) ∧ y
= y ∧ (a ∨ x ) [by distributive]
= y ∧ (a ∨ y ) [by (1)
=y [by absorption law]
Partial Order Sets and Lattices 295

@ Posets and Lattices


1. Define poset. Give an example of a set X such that (P ( X ), ⊆ ) is totally ordered set.
[U.P.T.U. (B.Tech.) 2007]

2. Show that in a poset least elements, if exists is unique.


3. Show that in a poset greatest elements, if exists is unique.
4. Define the terms
(i) partially ordered set (ii) linearly ordered set.

5. Let ≤ be partial ordering of a set S. Define the dual order on S. How is the dual order related to the
inverse of the relation ≤

6. What is meant of a ‘‘Hasse diagram’’. Draw the Hasse diagram of the relation R on A where
A = {1, 2, 3, 4} and R = {(1, 1), (1, 2), (2, 2), (2, 4), (1, 3), (3, 3), (3, 4), (1, 4), (4, 4)}.

7. Which of the following are partial order.


(i) The relation R = {(a, b) ∈ Z × Z | a| ≤ | b| on Z
(ii) The relation R = {(a, b) ∈ Z × Z | a − b ≤ 0
(iii) The relation R = {(a, b) ∈ Z × Z | a divide b in Z on Z.

8. Let A = {a, b}. Describe all partial order relations on A.

9. Find two incomparable elements in the following posets


(i) (P {0, 1, 2}, ⊆ ) (ii) ({1, 2, 4, 6, 8})

10. Let D m denote the positive divisors of m ordered by divisiblity. Draw the Hasse diagram of
(a) D12 (b) D15 (c) D16 (d) D17

11. Let A be given finite set and P ( A ) is a power set. Let ⊆ be inclusion relation on the elements of P ( A ).
Draw Hasse diagrams of (P ( A ), ⊆ ) for
(i) A = {a} (ii) A = {a, b} (iii) A = {a, b, c}
[R.G.P.V. (B.E.) Bhopal 2006; P.T.U. (B.E.) Punjab 2008]

12. Let A = {1, 2, 3, 4, 5}. Determine the relations represented by the following Hasse diagram.
5
5 5

3 4 4 4
3
2 3
2
1 1 1 2

(i) (ii) (iii)


Fig. 6.86
296 Discrete Mathematical Structures

13. Let A = {1, 2, 3, 4, 5} be ordered set as shown in fig. 6.87 below. Find
(i) all minimal and maximal elements of A
(ii) greatest and least element of A
(iii) all linearly ordered subset of A, each of which contains at least three elements.
2
1

3 5

4
6
Fig. 6.87

14. Consider the subsets {2, 3}, {4, 6}, and {3, 6} in the poset ({1, 2, 3, 4, 5, 6}, ‘|’). Find for each subsets if
exists
(i) upper bound and lower bound
(ii) greatest lower bound and least upper bound.

15. Let S be ordered set in fig. 6.88 Suppose A = {1, 2, 3, 4, 5} is isomorphic to S and
f : {(a, 1), (b, 3), (c, 5), (d, 2), (e, 4)} is similarly mapping from S to A. Draw the Hasse diagram of A.
e

d c

a
Fig. 6.88

16. Draw the Hasse diagrams of all lattices with upto five elements.

17. Consider the lattice L in fig. 6.89


(i) Find all sublattices with five elements
(ii) Find complements of a and b if they exist
(iii) Is L distributive, complemented?

d e

b
a c

o
Fig. 6.89
Partial Order Sets and Lattices 297

18. Show that lattice L represented by the diagram is complemented, modular but not distributive.
1

a b c d

o
Fig. 6.90

19. Show that lattice L, represented by the diagram is modular, distributive but not complemented.

20. Find the complement of each element of D 42.

Fig. 6.91

21. Prove that the dual of a lattices is also a lattice. [U.P.T.U. (B.Tech.) 2005]

22. Every finite lattice is bounded. [U.P.T.U. (M.C.A) 2007]

23. Determine the matrix of the partial order whose Hasse diagrams are given below

b c d e

(i) (ii)
Fig. 6.92
298 Discrete Mathematical Structures

4
6. 7. (i) No (ii) Yes (iii) No

8. R1 = {(a, a), (b, b)}, R 2 = {(a, a), (b, b), (a, b)},
2 3
R 3 = {(a, a), (b, b), (b, a)}

9. (i) {0} and 1 {1} (ii) 4 and 6


1
Fig. 6.93

10. (a) 12 (b) 15 (c) 16 (d) 17

8 1
4 6 5 3
4
3
2 2
1

1 1
Fig. 6.94

11. (i) {a} (ii) {a, b} (iii) {a, b, c}

{a} {b}
{a, b} {a, c} {b, c}
φ
φ

{b} {c}
{a}

φ
Fig. 6.95

12. (i) {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5), (3, 3), (3, 5), (4, 4), (4, 5), (5, 5)}
(ii) {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5), (3, 3), (3, 4), (3, 5), (4, 4),
(4, 5), (5, 5)}
(iii) {(1, 1), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5)(3, 3), (3, 4), (3, 5), (4, 4), (4, 5), (5, 5)}

13. (i) Minimal 4 and 6, maximal 1 and 2


(ii) There is no greatest and least elements
(iii) {1, 3, 4}, {1, 3, 6}, {2, 3, 4}, {2, 3, 6}, {2, 5, 6}
Partial Order Sets and Lattices 299

14. For {2, 3}, upper bound is 6 and lower bound 1.

lub {2, 3} = 6, glb {2, 3} = 1

For {4, 6}, no upper bound and lower bounds are 2 and 1 glb {4, 6} = 2

For {3, 6} upper bound is 6 and lower bounds are 3 and 1 i.e. glb {3, 6} = 3 and lub {3, 6} = 6

15. 4 16.

2 5

1
Fig. 6.96
Fig. 6.97

17. (i) since oabd 1, oacd 1, oade 1, obce 1, oace 1, ocde 1.


(ii) c and e are complements of a, b has no complement
(iii) No, No

20. 1′ = 42, 2′ = 21, 3′ = 14, 6′ = 7, 7′ = 6, 14′ = 3, 21′ = 2, 42′ = 1

a b c d e 1 2 3 4 5
a 1 1 1 1 1 1 1 1 1 1 1
b 0 1 0 0 0 2 0 1 0 1 0
   
23. (i) c 0 0 1 0 0 (ii) 3 0 0 1 0 1
d 0 0 0 1 0 4 0 0 0 1 0
   
e 0 0 0 0 1  5 0 0 0 0 1 
300 Discrete Mathematical Structures

Multiple Choice Questions


1. The poset (Z + , ≤ ) is:
(a) a lattice (b) not a lattice (c) isomorphic (d) none of these

2. The maximum number of zero element and unit element each in a poset is:
(a) 0 (b) 1 (c) 2 (d) none of these

3. The lattice (P (S ), ⊆ ) is bounded with greatest and least elements equal to:
(a) S and φ respectively (b) φ and S respectively
(c) 0 and 1 respectively (d) none of these

4. Let X = {2, 3, 6, 12, 24}, let ≤ be partial order relation defined by x ≤ y is x divides y. Number of edges
in Hasse diagram of ( X , ≤ ) is:
(a) 3 (b) 4 (c) 9 (d) none of these [U.P.T.U. (M.C.A.) 2008]

5. Identify which of the following partially ordered sets shown in following figures are lattices:

(i) 4 (ii) 2 1 (iii) (iv) 5

3
3 2 4
2 3

1 4 1
Fig. 6.98

6. From the Hasse diagram, find:


(i) lub and glb of A = {2, 3, 6}
(ii) lub and glb of B = {2, 3}
(iii) lub and glb of C = {6, 12}

Fig. 6.99

7. In the lattice defined by the Hasse diagram as given. How many complements does the a
element e have
b c

(a) 2 (b) 3 g
(c) 0 (d) none of these e d
f
Fig. 6.100
8. A self complemented, distributive lattice is called:
(a) Boolean algebra (b) Modular lattice (c) Bounded lattice (d) Complete lattice
Partial Order Sets and Lattices 301

9. The maximal and minimal elements of posets are:


(a) maximal 5, 6 and minimal 2 (b) maximal 5, 6 and minimal 1
(c) maximal 3, 5 and minimal 1, 6 (d) none of these

State True or False Fig. 6.101


1. Every chain is not a distributive lattice.

2. Every chain is lattice.

3. Every distributive lattice is modular.

4. Every poset is lattice.

5. Every lattice is poset.

6. Product of two lattices is lattice.

7. A bounded lattice has two elements then 0 ≠ 1.

Fill in the Blank(s)


1. If L is finite lattice then L is . . . . . . . . . . . . . . .

2. The set of natural number is . . . . . . . . . . . . . . . . .


302 Discrete Mathematical Structures

Multiple Choice Questions


1. (a) 2. (b) 3. (a) 4. (b)

5. (i) lattice (ii) not lattice (iii) lattice (iv) not lattice (iv) not lattice

6. (i) lub = 6 glb does not exist (ii) lub = 6 glb does not exist (iii) lub = 12, glb = 6,

7. 2 8. (a) 9. (c)

State True or False


1. False 2. True 3. True 4. False 5. True 6. True

7. True

Fill in the Blank(s)


1. bounded 2. well order set

❑❑❑
Boolean Algebra 303

7.1 Introduction
Boolean algebra was originally introduced by British Mathematician George Boole. This Mathematics is an
algebraic structure which is based on the principle of logics. George Boole published a research paper
named ‘Laws of Thoughts’ in which he described that different fundamental principles of logics can be
expressed by symbolic notations.
Suppose B is any set of numbers [or Sets or Objects or Statements or Switches] and in B two binary
operations ∪ and ∩ [or ∨ and or + and ] are defined, then the algebraic structure (B, ∪, ∩) [or (B, ∨, ∧) or
(B, +, .)] is called a Boolean Algebra if the laws given below hold.
The identity elements for the operations ∪ and ∩ are respectively empty set φ and universal set I, for
operations ∨ and ∧ are 0 (false, F) and 1 (true, T) and for operations + and (. ) are 0 and 1.
Remark: The binary operations + and . used in Boolean algebra are not the operations of ordinary
addition and multiplication.

7.2 Boolean Algebra or Axioms of Boolean Algebra


7.2.1 Definition 1
Let B be a set of elements a, b, c … and ∪ (union) and ∩ (intersection) are two binary operations, then the
algebraic structure (B, ∪, ∩) is called a Boolean Algebra, if the elements of B obey the following laws:
(B1) Closure Law
For any two elements a and b of B, a ∪ b and a ∩ b are unique elements of B i.e.,
(i) a ∪ b ∈ B ∀ a, b ∈ B (ii) a ∩ b ∈ B ∀ a, b ∈ B
(B2) Commutative Law
(i) a ∪ b = b ∪ a, ∀ a, b ∈ B (ii) a ∩ b = b ∩ a, ∀ a, b ∈ B
(B3) Distributive Law
(i) a ∪ (b ∩ c) = (a ∪ b) ∩ (a ∪ c), ∀a, b, c ∈ B (ii) a ∩ (b ∪ c) = (a ∩ b) ∪ (a ∩ c), ∀a, b, c ∈ B
(B4) Existence of Identity Elements
There exists two elements φ (empty set ) and I (universal set) in B such that for every a ∈ B, we have
(i) a∪ φ = a (ii) a∩ I = a
φ is identity element of B with respect to ∪ and I is identity element of B with respect to ∩ .
304 Discrete Mathematical Structures

(B5) Complementary Law i.e., Law of Inverse

For each a ∈ B there exists a' ∈ B such that


(i) a ∪ a' = I (ii) a ∩ a' = φ
(B6) φ ≠ I, i.e., both identities are not equal

Note: Clearly it follows from the definition that a Boolean algebra has at least two elements.

7.2.2 Definition 2
In definition 1 above, if operation + and . are respectively used in place of operations ∪ and ∩, and 0 and 1
are used in place of empty set φ and universal set I, the definition of Boolean Algebra is given as follows:
Let B be a set of elements a, b, c, ... and + and . are two binary operations, then the algebraic structure (B,
+, .) is called a Boolean algebra, if the elements of B obey the following laws:

(B1) Closure Law


For any two elements a and b of B, a + b and a . b are unique elements of B, i.e., a + b ∈ B ∀a, b ∈ B and
a. b ∈B ∀a, b ∈ B
(B2) Commutative Law
(i) a + b = b + a, ∀a, b ∈ B. (ii) a . b = b . a, ∀a, b ∈ B
(B3) Distributive Law
(i) a + (b . c) = (a + b). (a+c), ∀ a, b, c ∈ B (ii) a . (b + c) = a . b + a . c, ∀ a, b, c ∈ B

(B4) Identity Law


There exists two elements 0 and 1 in B such that for every a ∈ B, we have

(i) a + 0 = 0 + a = a (ii) (a) . a' = (a)' . a = 0

0 is identity element of B with respect to ‘+’ and 1 is identity element of B with respect to ‘.’ .

(B5) Complementary Law i.e., Law of Inverse

For each a ∈ B, there exists a ′ ∈ B, such that


(i) a + a ′ = a ′+ a = 1 (ii) a. a′ = a′ . a = 0

(B6) 0 ≠ 1

Example 1: Let B be the set of all positive divisors of 30 i.e.,


B = {1, 2, 3, 5, 6, 10, 15, 30}

and the operations ∨ and ∧ on B are defined as follows:


a ∨ b = L. C. M. of a and b, a ∧ b = H. C. F. of a and b

prove that (B, ∨, ∧, ' ) is a Boolean Algebra.


Boolean Algebra 305

Solution: Here B = {1, 2, 3, 5, 6, 10, 15, 30}

(B1) Closure Law: From composition tables it clearly follows that closure laws hold for ∨ and ∧.
Composition Table for ∨
∨ 1 2 3 5 6 10 15 30
1 1 2 3 5 6 10 15 30
2 2 2 6 10 6 10 30 30
3 3 6 3 15 6 30 15 30
5 5 10 15 5 30 10 15 30
6 6 6 6 30 6 30 30 30
10 10 10 30 10 30 10 30 30
15 15 30 15 15 30 30 15 30
30 30 30 30 30 30 30 30 30

Composition Table for ∧


∧ 1 2 3 5 6 10 15 30
1 1 1 1 1 1 1 1 1
2 1 2 1 1 2 2 1 2
3 1 1 3 1 3 1 3 3
5 1 1 1 5 1 5 5 5
6 1 2 3 1 6 2 3 6
10 1 2 1 5 2 10 5 10
15 1 1 3 5 3 5 15 15
30 1 2 3 5 6 10 15 30

Composition Table for Complement

a a′

1 30

2 15

3 10

5 6

6 5

10 3

15 2

30 1
306 Discrete Mathematical Structures

(B2) Commutative Law: ∀a , b ∈ B

we have a∨ b = b∨ a and a∧ b = b∧ a

Illustration: 3 ∨ 5 = 5 ∨ 3 = 15 , 10 ∧ 15 = 15 ∧ 10 = 5

(B3) Distributive Law: ∀a, b, c ∈ B


(i) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) , (b ∧ c) ∨ a = (b ∨ a) ∧ (c ∨ a) and
(ii) a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) , (b ∨ c) ∧ a = (b ∧ a) ∨ (c ∧ a)

Illustration: 3 ∨ (5 ∧ 10) = 3 ∨ 5 = 15 and (3 ∨ 5) ∧ (3 ∨ 10) = 15 ∧ 30 = 15


∴ 3 ∨ (5 ∧ 10) = (3 ∨ 5) ∧ (3 ∨ 10)

5 ∧ (15 ∨ 3) = 5 ∧ 15 = 5 and (5 ∧ 15) ∨ (5 ∧ 3) = 5 ∨ 1 = 5


∴ 5 ∧ (15 ∨ 3) = (5 ∧ 15) ∨ (5 ∧ 3)

(B4) Identity Elements: Identity element for ∨ is 1 and identity element for ∧ is 30, since ∀a ∈ B, we have

a ∨ 1 = 1 ∨ a = a and a ∧ 30 = 30 ∧ a = a
Illustration: 15 ∨ 1 = 1 ∨ 15 = 15 , 5 ∧ 30 = 30 ∧ 5 = 5

(B5) Complementation: For each a ∈ B there exists its complementary element b, such that
a ∨ b = 30 and a ∧ b = 1

Illustration: If a = 3 then b=10 Q 3 ∨ 30 = 30 and 3 ∧ 10 = 1. Thus complement of 3 ∈ B is 10 ∈ B.


Similarly complement of 1 is 30, complement of 2 is 15. In general complement of a ∈ B is 30/a.

Hence (B, ∨, ∧, ' ) is a Boolean algebra.

Example 2: Show that the structure (B, +, ⋅ , ') is a Boolean algebra where B={0, 1} and ‘+’ and ‘.’ are two
binary operations and ‘ ' ’ a unary operation on B, defined by the following tables:

+ 0 1 . 0 1 a a'

0 0 1 0 0 0 0 1

1 1 1 1 0 1 1 0

Solution:

(B1) Closure Law: The closure law with respect to both + and . hold clearly from given tables.

(B2) Commutative Law: First two tables are symmetrical in rows and columns,

i.e., 0 + 1 = 1 = 1 + 0 and 0.1 = 0 = 0.1

Hence both operations ‘+’ and ‘.’ are commutative.


(B3) Identity Elements: From given tables, we have
(i) 0 + 0 = 0, 1 + 0 = 0 + 1 = 1 (ii) 0 .1 = 1 . 0 = 0, 1 .1 = 1

Hence additive identity is 0 and multiplicative identity is 1.


Boolean Algebra 307

(B4) Distributive Law: Every operation is distributive over other operation. Since for 0, 1 ∈B, we have
(i) 0 + (1.0) = 0 + 0 = 0 and (0 + 1) (0 + 0) = 1.0 = 0
Hence 0 + (1.0) = (0 + 1) (0 + 0)
(ii) 1 (1 + 0) = 1.1 = 1 and 1.1 + 1.0 = 1 + 0 = 1
Hence 1 (1 + 0) = 1.1 + 1.0

(B5) Complementation: From third table we clearly see that the complement of each a ∈ B exists in B

0' = 1 and 1' = 0

(B6) Clearly 0 ≠ 1

Hence (B , +, .) is a Boolean Algebra.

Example 3: Let S be a family of sets which is closed under the binary operations union ‘ ∪ ’, intersection ‘ ∩ ’,
and complement ‘ ′ ’ , then prove that (S, ∪, ∩ , ' ) is a Boolean algebra.

Solution: (B1) Closure Law: For any two elements A and B of S, we know that A ∪ B and A ∩ B are
unique elements of S, i.e., A ∪ B ∈ S and A ∩ B ∈ S, ∀ A, B ∈ S

(B2) Commutative Law: A ∪ B = B ∪ A and A ∩ B = B ∩ A, ∀A, B ∈ S

(B3) Identity Elements: φ (empty set) and U (universal set) exist in S such that

(i) A∪φ = A (ii) A ∩U = A ∀ A, B ∈ S

Hence identity element for ∪ is φ and identity element for ∩ is U.

(B4) Distributive Laws: For any three elements (or members) A, B, C of S, we have
(i) A ∪ (B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C ) (ii) A ∩ (B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )

(B5) Complementation: ∀A ∈ S, there exists an element A′ in S such that


(i) A ∪ A′ = U (ii) A ∩ A′ = φ

(B6 ) Clearly φ ≠ U

Hence (B, ∪, ∩ , ' ) is a Boolean algebra.

7.3 Duality
Let (B, +, .) be a Boolean algebra if in a statement of (B, +, .) the positions of ‘+’ and ‘.’ are interchanged
and also the positions of identity elements 0 and 1 are interchanged, then the new statement (so obtained)
is called the Dual of the original statement.

Illustration: Consider the statement (1 + a) (b + 0) = b. Its dual is the following statement

(0 . a ) + (b . 1) = b
308 Discrete Mathematical Structures

7.3.1 Principle of Duality


The dual of any theorem (or property) in Boolean algebra is also a theorem (or property).
Proof: The verification of above principle immediately follows due to the symmetry of axioms and
presence of two binary operations and two identity elements.

7.4 Theorems of Boolean Algebra


Theorem 1: (Idempotent Law) For every element of a Boolean algebra B:
(i) a+a=a (ii) a.a=a
Proof: (i) To prove a + a = a [Kurukshetra (B.E.) 2006]

L.H.S. = a + a
= (a + a) 1 [From B3]
= (a + a) (a + a′) [From B5]
= a + (a . a′) [From B4]
=a+0 [From B5]
= a = R.H.S. [From B3]

(ii) To prove a . a = a
L.H.S. = a . a
=a.a+0 [From B3]
= a . a+a . a′ [From B5]
= a (a+a′) [From B4]
=a.1 [From B5]
= a = R.H.S. [From B3]

Theorem 2: For every element of a Boolean Algebra B:


(i) a+1=1 (ii) a.0=0
Proof: (i) To prove a + 1=1.
L.H.S. = a + 1
= a + (a + a′) [From B5]
= (a + a) + a′ [Associative Law]
= a+ a′
= 1 = R.H.S. [From B5]
(ii) To prove a . 0 = 0
L.H.S. = a . 0
= a (a . a′) [From B5]
= (a . a) a′ [Associative law]
= a . a′ = 0 = R.H.S. [From B3]
Boolean Algebra 309

Theorem 3: (Absorption Laws) For any two elements a and b of a Boolean algebra B.
(i) a + (a . b) = a (ii) a (a + b) = a
Proof: (i) To prove a + (a . b) = a
L.H.S. = a + (a . b)
=a.1+a.b [From B4]
= a (1 + b) [From B3]
=a.1 [Q 1 + b = 1]
= a = R.H.S [From B4]
(ii) To prove a (a + b) = a
L.H.S. = a (a + b)
= (a + 0) (a + b) [From B3]
= a + (0 . b) [From B4]
= a + 0 = a = R.H.S [From B4]

Theorem 4: (Associative Laws) The binary operation ‘+’ and ‘.’ both obey the associative laws in a
Boolean algebra B.
(i) a + (b + c) = (a + b) + c (ii) a (bc) = (ab) c
Proof: (ii) First of all, we shall prove that
a + a (bc) = a + (ab) c ...(1)
L.H.S. of eqn. (1) = a + a (bc)
=a [Prop. 3(i)]
= a (a + c) [Prop. 3 (ii)]
= (a + ab) (a + c) [Prop. 3 (i)]
= a + (ab) c [By Distributive law]
= R.H.S. of equation (1)
Again, we shall prove that
a′ + a (bc) = a′ + (ab) c ... (2)
L.H.S. of eqn. (2)= a′ + a (bc)
= (a′ + a)(a′ + bc) [From B3]
= 1 (a′ + bc) [From B6]
= a′ + bc [From B4]
= (a′ + b)(a′ + c) [From B3]
= [1 (a′ + b)](a′ + c) [From B4]
= [(a′ + a)(a′ + b)](a′ + c) [From B5]
= (a′ + ab)(a′ + c) [From B3]
= a′ + (ab) c [From B3]

= R.H.S. of eqn. (2)


310 Discrete Mathematical Structures

Multiplying equation (1) and (2),


[ a + a (bc)][ a′ + a (bc)] = [ a + (ab) c][ a′ + (ab) c] ...(3)

L.H.S. of equation (3)


[ a + a (bc)][ a′ + a(bc)] = [ a(bc) + a][(a(bc) + a′] [From B2]
= a (bc)+ aa′ [From B3]
= a(bc)+ 0 [From B5]
= a(bc) [From B4]

R.H.S. of eqn. (3)


[ a + (ab) c][ a′ + (ab) c] = [(ab) c + a][(ab) c + a′][From B3]
= (ab) c + aa′ [From B3]
= (ab) c + 0 [From B5]
= (ab) c [From B4]

∴ Simplifying eqn, (3), we get a(bc) = (ab) c

Part (1) follows from principle of Duality. Since dual of a (bc) = (ab) c is

a + (b + c) = (a + b) + c

Theorem 5: In a Boolean algebra B, the identity elements are complementary to each other i.e., for 0, 1 ∈ B,
we have
(i) 0′ = 1 (ii) 1′ = 0
Proof: (i) To prove 0′ = 1
L.H.S. = 0′
= 0′ + 0 [From B3]
= 1 = R.H.S. [From B5]

(ii) To prove 1′ = 0
L.H.S. = 1′
= 1.1′ [From B3]
= 0 = R.H.S. [From B5]

Theorem 6: The identity elements in a Boolean algebra are unique. [U.P.T.U. (B.Tech.) 2001]

Proof: (i) To prove identity element 0 is unique for ‘+’.


Suppose 0 and 01 are two identity elements of Boolean algebra B for ‘+’.

If 0 is identity element, then 0 1 + 0 = 01 [From B3]


If 01 is identity element then 0 + 01 = 0 [From B3]
Since operation '+' is commutative.
∴ 01 + 0 = 0 + 01 ⇒ 01 = 0
Hence, identity element 0 is unique.
Boolean Algebra 311

(ii) To prove identity element 1 is unique for ‘.’ ,


Suppose 1 and 11 are two identity elements of Boolean algebra B for ‘.’ ,
If 1 is identity element, then 11 . 1 = 11 [From B3]
Again if 11 is identity element, then 1 . 11 = 1 [From B3]
Since operation ‘.’ is commutative
∴ 11 . 1 = 1 . 11 ⇒ 11 = 1
Hence, identity element 1 is unique.

Theorem 7: The complement of each element of Boolean algebra B is unique. [Rohtak (M.C.A.) 2004, 2008]

Proof: Let a ∈ B be any element. Suppose x and y are two complements of a.


Then by definition, we have
a+ x = x + a=1, a . x = x . a = 0
 ...(1)
and a + y = y + a = 1, a . y = y . a = 0
Now x=x.1 [From B3]
= x (a + y) [From (1)]
= x . a + x .y [From B4]
=0+x.y [From (1)]
=a.y+x.y [From (1)]
= (a + x) . y [From B4]
= 1. y [From (1)]
=y
It shows that the complement of each element is unique.

Theorem 8: (Involution Law)


For each element a of Boolean algebra B, we have (a ′ )′ = a

Proof: Let complement of a ∈ B be a ′ ∈ B, then by definition


a + a ′ = 1 or a. a ′ = 0 ...(1)
But operation '+' and ‘.’ in B are commutative.
a ′+ a = 1 and a ′ . a = 0 ...(2)
Equation (2) shows that complement of a ′ ∈ B is a ∈ B. But complement of every element of Boolean
algebra is unique. Hence, complement of a ′ = a or (a ′ )′ = a

Theorem 9: (De Morgan’s Laws) For any two elements a and b of Boolean algebra B, we have
(i) (a + b)′ = a ′ . b ′ (ii) (a . b)′ = a ′ + b ′ , ∀a, b ∈ B
Proof: (i) To prove ( a + b ) ′ = a ′ b ′
Here we have to show that the complement of (a + b) is a ′ . b ′, for which it is sufficient to prove
(a + b) + a ′ . b ′ = 1 
and  [Using B5]
(a + b)(a ′ . b ′ ) = 0
Now (a + b) + a ′ . b ′ = [(a + b) + a ′ ][(a + b) + b ′ ] [From B3]
= [(a + a ′ ) + b][ a + (b + b ′ )] [From property 4]
312 Discrete Mathematical Structures

= (1 + b)(a + 1) [From B5]


= 1.1 = 1
and (a + b)(a′. b′ ) = (a′. b′ )(a + b) [From B2]
= (a′. b′ ) a + (a′. b′ ) b [From B3]
= (b′. a′ ) a + (a′. b′ ) b [From B2]
= b′(a′. a) + a′(b′. b) [From property 4]
= b′. 0 + a′. 0 [From B5]
= 0 + 0 = 0. [From B4]
Hence (a + b)′ = a ′ . b ′
(ii) To show ( a . b ) ′ = a ′ + b ′.
Here we are to show that the complement of a . b is (a ′ + b ′ ), for which it is sufficient to prove
(a . b) + (a′ + b′ ) = 1 
 [Using B5]
(a . b)(a′ + b′ ) = 0
and Now (a . b) + (a′ + b′ ) = (a′ + b′ ) + (a . b)
= [(a′ + b′ ) + a][(a′ + b′ ) + b] [From B3]
= [(b′ + a′ ) + a][(a′ + b′ ) + b] [From B2]
= (b′ + (a′ + a)][ a′ + (b′ + b)] [From property 4]
= (b′+1)(a′+1) [From B5]
=1.1 = 1
and (a. b)(a ′ + b ′ ) = (ab) a ′ + (ab) b ′
= (ba) a ′ + a (bb ′ )
= b (aa ′ ) + a (bb ′ ) (aa ′ = bb ′ = 0)
= b .0 + a .0
=0+0=0
Hence, (ab)′ = (a ′ + b ′ )

7.5 Algebraic Manipulation of Boolean Expression or Algebra of Propositions (A.P.)


The algebra of propositions is a Boolean algebra. The symbol used in Boolean algebra in place of symbols
used in the algebra of propositions are
Symbols used in A.P. Symbols used in B.A.
∨ +
∧ •
~ ' = Complement
Statement p,q,r,... variables a, b, c, ....

F 0
T 1

Thus, the tautologies of proposition S are Boolean algebra.


Boolean Algebra 313

Theorem 1: The algebra of propositions is a Boolean algebra i.e., if B is the set of propositions p, q, r... Then
(B, ∨, ∧, ~) is a Boolean algebra.
Proof: Let p, q, r ∈ B

( B1 ) Closure Law: We know that if p and q are propositions than p ∧ q and p ∨ q are also propositions. i.e.,
p ∧ q ∈ B and p ∨ q ∈ B ∀ p, q ∈ B

(B2) Commutativity: Let p, q ∈ B ⇒ (i) p ∧ q = q ∧ p and (ii) p ∨ q = q ∨ p

(B3) Distributive Law: Let p, q, r ∈ B then

(i) p ∨ (q ∧ r) = ( p ∨ q) ∧ ( p ∨ r) (ii) p ∧ (q ∨ r) = ( p ∧ q) ∨ ( p ∧ r)

The truth table for (i)


p q r p∨q p∨r q∧r p ∨ (q ∧ r) ( p ∨ q) ∧ ( p ∨ r )

T T T T T T T T
T T F T T F T T
T F T T T F T T
T F F T T F T T
F T T T T T T T
F T F T F F F F
F F T F T F F F
F F F F F F F F

Similarly we can find truth table for (ii)

(B3) Existence of Identity Propositions

Tautology g and contradiction l are the identity propositions for ∨ and ∧ respectively, such that

p ∨ l = l ∨ p = p ∀ p ∈ B and p ∧ l = l ∧ p = p ∀ p ∈ B
Truth table:
p g l p∨l l∨ p p∧ g g∧p

T T F T T T T
F T F F F F F

(B5) Law of Complements: Let p ∈ B ⇒ ~ p ∈ B, such that


(i) p ∧ (~ p) = l (ii) p ∨ (~ p) = g
Hence, (B, ∨, ∧, ~) is a Boolean algebra.
314 Discrete Mathematical Structures

7.5.1 Boolean Algebra (Definition 3)


Let (B, ≤ ) be a Boolean lattice. An algebraic system (B, ∨, ∧, ' ) defined by the Boolean lattice (B, ≤ ) is called a
Boolean Algebra.

Theorem 1: For each element a in a Boolean algebra (B, ∨, ∧, ' ), (a ′ )′ = a


Proof: Let complement of a ∈ B be a′ ∈ B, then by definition, we have
a ∨ a′ = 1 and a ∧ a′ = 0 …(1)
Since the operations ∨ and ∧ are commutative, we have from (1)
a′ ∨ a = 1 and a′ ∧ a = 0
⇒ complement of a′ ∈ B is a ∈ B
But complement of every element of Boolean algebra is unique. Therefore, complement of a′ = a
or (a′ )′ = a
The result in Theorem 1 is known as Involution Law.

Theorem 2: For any a and b in a Boolean algebra (B, ∨, ∧,′ ),

(i) (a ∨ b)′ = a′ ∧ b′ and (ii) (a ∧ b)' = a′ ∨ b′ [U.P.T.U. (B.Tech.) 2007]

Proof: (i) We have (a ∨ b) ∨ (a′ ∧ b′ ) = [(a ∨ b) ∨ a′] ∧ [(a ∨ b) ∨ b′]


[Q the join operation ∨ is distributive over the meet operation ∧]
= [ a ∨ (b ∨ a′ )] ∧ [ a ∨ (b ∨ b′ ) [Q the join operation is associative]
= [ a ∨ (a′ ∨ b)] ∧ [ a ∨ 1] [Q the join operation is commutative and b ∨ b′ = 1]
= [(a ∨ a′ ) ∨ b] ∧ 1 [Q the join operation is associative and a ∨ 1 = 1]
= [1 ∨ b] ∧ 1 [Q a ∨ a′ = 1]
= 1 ∧ 1= 1 [Q 1 ∨ b = 1]
and (a ∨ b) ∧ (a′ ∧ b′ ) = [ a ∧ (a′ ∧ b′ )] ∨ [ b ∧ (a′ ∧ b′ )]
= [(a ∧ a′ ) ∧ b′] ∨ [(b ∧ a′ ) ∧ b′]
= [ 0 ∧ b′] ∨ [(a′ ∧ b) ∧ b′]
= 0 ∨ [ a′ ∧ (b ∧ b′ )]
= 0 ∨ [ a′ ∧ 0] = 0 ∨ 0 = 0
Thus, a′ ∧ b′ is the complement of a ∨ b; i.e.,
(a ∨ b)′ = a′ ∧ b′ ...(1)
(ii) Applying principle of duality on (i), we have
(a ∧ b)′ = a′ ∨ b′ ...(2)
The result in Theorem 2 are known as De-Morgan's Law.

Example 4: In a Boolean algebra (B, ∨, ∧,′ ) , show that


a ∨ (a′ ∧ b) = a ∨ b and a ∧ (a′ ∨ b) = a ∧ b.
Solution: We have a ∨ (a′ ∧ b) = (a ∨ a′ ) ∧ (a ∨ b) [By Distributive Law]
= 1 ∧ (a ∨ b)= a ∨ b [Q a ∨ a′ = 1]
Next a ∧ (a′ ∨ b)= (a ∧ a′ ) ∨ (a ∧ b) [By Distributive Law]
= 0 ∨ (a ∧ b)= a ∧ b [Q a ∧ a′ = 0]
Boolean Algebra 315

Example 5: In a Boolean algebra (B, ∨, ∧,′ ), prove that the following:


(a) a ∨ [(a′ ∧ c) ∨ b] = (a ∨ b) ∨ c (b) ( x′ ∧ y′ ) ∨ ( x′ ∧ y′ )′ = 1
(c) (a ∧ b) ∨ [(a ∨ b′ ) ∧ b]′ = 1 (d) a ∨ (b ∧ a) = a

Solution: (a) We have


a∨] (a′ ∧ c) ∨ b] = a ∨ [(a′ ∨ b) ∧ (c ∨ b)] [By Distributive Law]
= [ a ∨ (a′ ∨ b)] ∧ [ a ∨ (c ∨ b)] [By Distributive Law]
= [(a ∨ a′ ) ∨ b] ∧ [ a ∨ (b ∨ c)] [By Associativity and Commutativity]
= (1 ∨ b) ∧ [(a ∨ b) ∨ c] [Q a ∨ a′ = 1]
= 1 ∧ [(a ∨ b) ∨ c] [Q 1 ∨ b = 1]
= (a ∨ b) ∨ c
(b) ( x′ ∧ y′ ) ∨ ( x′ ∧ y′ )′ = ( x′ ∧ y′ ) ∨ [( x′ )′ ∨ ( y′ )′ ] [By De-Morgan's Law]
= ( x′ ∧ y′ ) ∨ ( x ∨ y ) [By Involution Law]
= [ x ∨ ( x′ ∧ y′ )] ∨ y [By Associativity and Commutativity]
= [( x ∨ x′ ) ∧ ( x ∨ y′ )] ∨ y [By Distributive Law]
= [1 ∧ ( x ∨ y′ )] ∨ y [Q x ∨ x′ = 1]
= ( x ∨ y′ ) ∨ y [Q 1 ∧ a = a]
= x ∨ ( y′ ∨ y ) [By Associative Law]
= x ∨1 [Q y′ ∨ y = 1]
=1 [Q x ∨ 1 = 1]
(c) (a ∧ b) ∨ [(a ∨ b′ ) ∧ b]′= (a ∧ b) ∨ [(a ∨ b′ )′ ∨ b′] [By De-Morgan's Law]
= (a ∧ b) ∨ [(a′ ∧ b′′ ) ∨ b′] [By De-Morgan's Law]
= (a ∧ b) ∨ [(a′ ∧ b) ∨ b′] [By Involution Law]
= (a ∧ b) ∨ [(a′ ∨ b′ ) ∧ (b ∨ b′ )] [By Distributive Law]
= (a ∧ b) ∨ [(a′ ∨ b′ ) ∧ 1] [Q b ∨ b′ = 1]
= (a ∧ b) ∨ (a′ ∨ b′ ) [Q a ∧ 1 = a]
= (a ∧ b) ∨ (a ∧ b)′ [By De-Morgan's Law]
=1 [ x ∨ x′ = 1, where x = a ∧ b]
(d) We have a ≤ a ∨ (a ∧ b) ... (1)
a ≤ a, a ∧ b ≤ a
a ∨ (a ∧ b) ≤ a ∨ a
Q a∨ a = a
Then a ∨ (a ∧ b) ≤ a ...(2)
Joining (1) and (2),
we find a ∨ (b ∧ a) = a

Example 6: In a Boolean algebra, if relation x~y is represented by xy′, then prove:


(i) x + y = x + (y ~ x) (ii) x′ = 1 ~ x (iii) xy = 0 ⇔ x ~ y = x
Solution: (i) R.H.S. = x + ( y ~ x ) = x + yx′
= ( x + y )( x + x′ ) [From B3]
= ( x + y )1 [From B5]
= x + y = L.H.S. [From B4]
316 Discrete Mathematical Structures

(ii) R.H.S. = 1 ~ x = 1. x′ = x′.1 = x′ = L.H.S.


(iii) x ~ y = x ⇔ xy′ = x or y'=1 ⇒ ( y′ )′ = 1′ or ( y′ ) ′ = 0
⇔ x( y′ )′ = 0
⇔ xy = 0 [Q ( y′ )′ = y]

Example 7: If B is a Boolean Algebra, then prove that the following statements are equivalent:
(i) a . b′ = 0 (ii) a + b = b (iii) a′ + b = 1 (iv) a . b = a
Solution: To prove (i) ⇒ (ii) i.e., a . b' = 0 ⇒ a + b = b
a + b = (a + b)1
= (a + b)(b + b′ ) (Q b + b′ = 1)
= (b + a)(b + b′ ) [Commutativity]
= (b + a)b + (b + a). b′
= b . b + a . b + b . b′ + a . b′
= b + a. b + 0 + 0 (Q a . b′ = 0)
= b + a. b
= 1 . b + a. b (Q 1 . b = b)
= (1 + a) b [From Distributive Law]
= (a + 1). b [From Commutative Law]
=1. b (Q a + 1 = 1)
=b (Q 1 . b = b .1 = b)
To prove (ii) ⇒ (iii) i.e., a + b = b ⇒ a′ + b = 1.
Let a + b = b, then a′ + b = a′ + (a + b)
= (a′ + a) + b (Associative Law)
= (a + a′ ) + b (From Commutative Law)
=1 + b (Q a + a′ = 1)
=1 (Q 1 + b = 1)
To prove (iii) ⇒ (i) i.e., a′ + b = 1 ⇒ a . b′ = 0.
a′ + b = 1 ⇒ (a′ + b)′ = 1′ (Taking Complement)
⇒ (a′ )′ . b′ = 1′ [Q (a + b)′ = a′. b′]
⇒ a . b′ = 0 [Q (a′ )′ = a and 1′ = 0]
To prove (i) ⇒ (iv) i.e., a . b′ = 0 ⇒ a . b = a
a . b′ = 0 ⇒ (a . b′ )′ = 0′ (Taking Complement)
⇒ a′ + (b′ )′ = 1 [Q (a . b′ )′ = a′ + b′]
⇒ a′ + b = 1 [Q (b′ )′ = b]
⇒ a . (a′ + b) = a . 1
⇒ a . a′ + a . b = a (Distributive Law)
⇒ 0 + a. b = a
⇒ a. b = a
Boolean Algebra 317

To prove (iv) ⇒ (i) i.e., a . b = a ⇒ a . b′ = 0.


a . b = a ⇒ (a . b)′ = a′ (Taking Complement)
⇒ a′ + b′ = a′ [Q (a . b)′ = a′ + b′]
⇒ a . (a′ + b′ ) = a . a′
⇒ a . a′ + a . b′ = a . a′ [From Distributive Law]
⇒ 0 + a . b′ = 0 (Q a . a′ = 0)
⇒ ab′ = 0
Hence, the given statements are equivalent.

Example 8: Simplify the following by using Boolean algebra:


(i) (a + b) a′ . b′ (ii) a . b . c + a′ + b′ + c′ (iii) (ab′ + c)′
(iv) [ a + (a′ . b)].[ a′ + (a . b)] (v) (a + b + c)′ (vi) (a′ b′ c′ )′
(vii) a . b + [(a + b′ ). b]′ (viii) ab + ab′ + a′ b + a′ b′ (ix) [(a′. b′ )′ + a]. (a + b′ )′

Solution: (i) (a + b) a′.b′ = (a + b)(a′. b′ )


= (a + b)(a + b)′ = 0 [Q a . a′ = 0]
(ii) a . b . c + a′ + b′ + c′ = a . b . c . + (a′ + b′ ) + c′ = a . b . c + [(a . b)′ + c′]
= a . b . c + [(a . b) c]′
= a . b . c + (a . b . c)′ = 1 [Q a + a′ = 1]

(iii) ( ab′ + c) = (ab′ )′ c′ = [ a′ + (b′ )′ ] c′ [Q (a + b)′ = a′. b′]
= [ a′ + b ] c′ [Q (ab)′ = a′ + b′]
(iv) [ a + ( a′. b )][ a′ + ( a . b )] = [(a + a′ )(a + b)][(a′ + a)(a′ + b)]
= [1 . (a + b)][1 . (a′ + b)]
= (a + b)(a′ + b)
= (b + a)(b + a′ ) = b + a . a′ = b + 0 = b
(v) ( a + b + c)′ = [(a + b) + c]′ = (a + b)′ c′ = a′. b′. c′
(vi) ( a′b′ c′ )′ = [(a′ b′ ) c′]′ = (a′. b′ )′ + (c′ )′ = (a′ )′ + (b′ )′ + (c′ )′ = a + b + c
(vii) a . b + [( a + b′ ) b ]′ = a . b + (a + b′ )′ + b′
= a . b + a′(b′ )′ + b′
= a . b + a′. b + b′
= a . b + [ b′ + a′. b]
= a . b + (b′ + a′ )(b′ + b)
= a . b + (b′ + a′ )(1) = a . b + b′ + a′ = a . b + (a . b)′ = 1
(viii) ab + ab′ + a′b + a′b′ = (ab + ab′ ) + (a′ b + a′ b′ )
= a . (b + b′ ) + a′(b + b′ ) = a . 1 + a′. 1 = a + a′ =1
(ix) [( a′.b′ )′ + a ]( a + b′ )′ = [(a′ )′ + (b′ )′ + a][ a′(b′ )′ ]
= (a + b + a)(a′. b)
= (a + b)(a′. b) [Q a + a = a]
= a (a′ b) + b (a′. b)
= (a . a′ ) b + b (b . a′ ) = (0) b + (bb) a′ = 0 + ba′ = ba′
318 Discrete Mathematical Structures

Example 9: In a Boolean algebra, prove the following:

(i) a + a′. b = a + b (ii) a′ + a . b = a′ + b (iii) a . b = a ⇒ a . b′ = 0

(iv) a (a . b) = a . b (v) a + (a + b) = a + b (vi) a . b + b . c + c . a = (a + b)(b + c)(c + a)

Solution:
(i) To prove a + a′b = a + b
L.H.S. = a + a′ b = (a′ + a′ )(a + b) [From B2]

= 1 (a + b) = a + b = R.H.S.
(ii) To prove a′ + a . b = a′ + b
L.H.S. = a′ + a′ . b = (a′ + a)(a′ + b) [From B2]

= 1 (a′ + b) = a′ + b = R.H.S.
(iii) To prove a . b = a ⇒ a . b′ = 0.
Given, a. b = a
then a . b′= (a . b) b′ (Putting a = a . b)
= a (b . b′ ) = a. 0 = 0

Hence, if a . b = 0, then a . b′ = 0

(iv) To prove a (a . b) = a . b
L.H.S. = a (a . b) = (a . a) b = a . b = R.H.S.
(v) To prove a + (a + b) = a + b
L.H.S. = a + (a + b) = (a + a) + b = a + b = R.H.S.

(vi) To prove ab + bc + ca = (a + b) (b + c) (c + a)
R.H.S. = (a + b) (b + c) (c + a)
= (a + b) [(c + b) (c + a)]
= (a + b) [c + ba]
= (a + b) c + (a + b) ba
= a . c + b . c + a . ba+ b . ba

= a . c + b . c + a . ab + b . ba

= a . c + b . c + (a . a) b + (b . b) a

= a.c + b.c + a.b + b.a

= a . c + b . c + (a . b + a . b)

= a.c + b.c + a.b [Q a + a = a]

= c . a + b . c + a . b = ab + bc + ca = L.H.S.
Boolean Algebra 319

Example 10: In a Boolean algebra, show that


if a + b = a + c and ab = ac then b = c.
Solution: Let a + b = a + c and ab = ac then to prove b = c.
Now b = b + b. a [Absorption Law, from prop. (3)]
= b.b + b.a [Q b . b = b]
= b (b + a)
= b (a + b)
= b (a + c)
= b.a + b.c
=a.b+b.c [Q a . b = a . c]
=a.c+b.c
= (a+b) c
= (a + c) c [Q a + b = a + c]
= a . c + c . c = a . c + c = c+ c . a = c

Example 11: In a Boolean algebra, show that,

If a + x = b + x and a + x′ = b + x′ then a = b
Solution: The given statement are
a+x=b+x ...(1)
a + x′ = b + x′ ...(2)
Now a=a+0 [Q 0 is Additive Identity]
= a + x. x′ [Q x. x′ = 0]
= (a + x )(a + x′ ) [By Distributive Law]
= (b + x )(b + x′ ) [From (1) and (2)]
= b + x. x′ [By Distributive Law]
=b+0 [Q x. x′ = 0]
=b [Q 0 is Additive Identity]

Example 12: In a Boolean algebra if a . x = b . x and a. x′ = b. x′ then, show that a = b.

Solution: The given statements are


a.x=b.x ...(1)
a . x′ = b . x′ ...(2)
Now a = a .1 [Q 1 is Multiplicative Identity]
= a ( x + x′ ) [Q x + x′ = 1]
= a . x + a . x′ [By Distributive Law]
= b . x + b . x′ [From (1) and (2)]
= b ( x + x′ ) [By Distributive Law]
= b. 1 = b [Q x + x′ = 1]
320 Discrete Mathematical Structures

Example 13: Show that a Boolean algebra cannot have three elements.

Solution: Let (B, + , ⋅ , ' ) be a Boolean algebra, where B = {0, 1, a}.

Since 0 and 1 are the identity elements of B with respect to the binary compositions ‘+’ and ‘ . ’ respectively.
Also 0′ = 1 and 1′ = 0. Also we know that complement of any element is unique. Therefore , a′ does not exist
in B. Hence (B, + , ⋅ , ' ) cannot be a Boolean algebra when B contains three elements.

Example 14: In a Boolean algebra B, prove that


a + b = b ⇒ a . b = a for a, b ∈ B.
Solution: Given a + b = b. ...(1)
Now a . b = a (a+b) [using (1) for b]
=a.a+a.b [By Distributive Law]
=a+a.b [By Idempotent Law]
= a. [By Absorption Law]
a + b = b ⇒ a .b = a

Examples 15: In a Boolean algebra, prove the following:


(a) a + [(a′. c) + b] = (a + b) + c (b) ( x′. y′ ) + ( x′. y′ )′ = 1

Solution: (a) a + [( a′ .c) + b ] = a + (a′ + b)(c + b) [By Distributive Law]


= [ a + (a′ + b)][ a + (c + b)] [By Distributive Law]
= [(a + a′ ) + b][(a + (b + c)] [By Associativity and Commutativity]

= (1 + b)[(a + b) + c] [Q a + a′ = 1]
= 1 [(a + b) + c] [Q 1 + b = 1]
= ( a + b) + c

(b) ( x′. y′ ) + ( x′. y′ )′ = x′. y′ + ( x′ )′ + ( y′ )′ [By De-Morgan's law]

= x′. y′ + x + y [By involution law]

= x + x′. y′ + y [By commutative law]


= ( x + x′ ). ( x + y′ ) + y [By distributive law]

= 1 ( x + y′ ) + y [Q x + x′ = 1]
= ( x + y′ ) + y [Q 1 . b = b]
= x + ( y′ + y ) [By associativity]
= x +1 [Q y′ + y = 1]
=1 [Q x + 1 = 1]
Boolean Algebra 321

Example 16: If p and q are two propositions then write p ⇔ q in Boolean algebra. [U.P.T.U. (B.Tech.) 2002]

Solution: Truth tables of p ⇒ q and ~ p ∨ q are same, as given below:


p q ~p p⇒q ~p∨q
T T F T T
T F F F F
F T T T T
F F T T T

Therefore p ⇒ q is equivalent to ~ p ∨ q. The Boolean equivalent of ~ p ∨ q is a′ + b.


Similarly Boolean equivalent of q ⇒ p i.e., of ~ q ∨ p is b′ + a.
∴ p ⇔ q = ( p ⇒ q) ∧ (q ⇒ p)
= (~ p ∨ q) ∧ (~ q ∨ p)
= (a′ + b)(b′ + a)
= a′. b′ + a′. a + b . b′ + b . a = a′. b′ + 0 + 0 + b . a= a . b + a′. b′

Example 17: Simplify the expression [{( x′ ∩ y′ )′ ∪ z} ∩ ( x ∪ z}]′ by first changing into Boolean form.
Express the simplified expression into set theory form again.
Solution: The symbols ‘+’ and ‘.’ are used in Boolean algebra instead of symbols ‘ ∪ ’ and ‘ ∩ ’ in set theory.
Now changing the expression in Boolean algebra, we have
= [{ x′. y′ )′ + z}( x + z )]′
= {( x′. y′ )′ + z}′ + ( x + z )′ [From De-Morgan's Law]
= ( x′. y′ ) z′ + ( x′. z′ ) [From De-Morgan's Law and (a′ )′ = a]
= ( x′. z′ ). y′ + ( x′. z′ )1 [Q ( x′. y′ ) z′ = x′( y′. z′ ) = x′(z′. y′ ) = ( x′. z′ )y′]
= ( x′. z′ )( y′ + 1) = ( x′. z′ )1 = x′ z′ [Q y′ + 1 = 1]
Changing to set theory the given expression = x′ ∩ z′.

Using Boolean algebra prove the following:


1. (a + b) a′. b′ = 0, ∀ a, b ∈ B
2. a . b + b . c + b . c′ = b, ∀ a, b, c ∈ B
3. a . b . c + a′ + b′ + c′ = 1
4. (a + b′ )(a′ + b)(a′ + b′ ) = a′. b′
5. (a + b)′ + (a + b′ )′ = a′
6. a + (a + b) = a + b
7. (a + b)(a′ + c) = (a . c) + (a′. b)
8. (a + b)(b′ + c) + b(b′ + c′ ) = a . b′ + a . c + b
9. a . b. c + a . b. c′ + a . b′. c + a′. b. c = a . b + b. c + c . a
10. ( p + q)(q + r)(r + p) = p . q + q . r + r. p
322 Discrete Mathematical Structures

11. Show that the triplet (B,+, ⋅ ) is a Boolean algebra where B = {a,b,c,d} and ‘+’ and ‘.’ are two binary
operations defined by the following tables:

+ a b c d • a b c d
a a b c d a a a a a
b b b b b b a b c d
c c b c b c a c c a
d d b b d d a d a d

12. Show that the triplet (B, +, .) is a Boolean algebra where B = {0, 1, 2, 3} and ‘+’ and ‘.’ are two
binary operations defined by the following tables:

+ 0 1 2 3 • 0 1 2 3
0 0 1 2 3 0 0 0 0 0
1 1 1 1 1 1 0 1 2 3
2 2 1 2 1 2 0 2 2 0
3 3 1 1 3 3 0 3 0 3

Also find the complement for each element.


13. Show that the triplet (B,+, ⋅ ) is a Boolean algebra where B = {x, y} and ‘+’ and ‘.’ are two binary
operations defined by the following tables:

+ x y • x y
x x y x x x
y y y y x y

14. If B = {a, b, c, d} and binary operations ‘+’ and ‘.’ are defined by:

+ a b c d • a b c d
a a b c d a a a a a
b b b d d b a b a b
c c d c d c a a c c
d d d d d d a b c d

Show that (B,+, .) is a Boolean Algebra.


15. In a Boolean algebra, prove that:
b = c if and only if both a + b = a + c and ab = ac holds.
16. What are the different laws of Boolean algebra. Discuss in detail.
17. Simplify the following Boolean functions:
(a) ab + abc + bc (b) (ab′ + c)(a + b′ ) c
Boolean Algebra 323

18. Simplifying the Boolean function:


f = ab′ cd + cb + cd′ + ac′ + a′ bc′ + b′ c′ d′
19. If a + b = 0 ⇒ a = o, b = 0
20. Write the dual of each of the following:
(a) (a .1)(0 + a′ ) = 0 (b) a + a′ b = a + b
21. Prove that in any Boolean algebra:
(a) a + a′ b = a + b (b) If ax = bx and ax ′ = bx ′ then a = b (c) ab + ab′ + a′ b + a′ b′ = 1

22. Prove the following identities in a Boolean algebra:


(i) a′ + a′. b = a′, ∀a, b ∈ B (ii) a . b + b . c + b . c′ = b ∀ a, b, c ∈ B
(iii) (a + b)(a′ + c) = (a . c) + (a′. b), ∀ a, b, c ∈ B (iv) a . b + [(a + b′ )b]′ = 1, ∀a . bc ∈ B
(v) a . b + c (a′ + b′ ) = a . b + c, ∀a, b, c ∈ B (vi) [{(a′. b′ )′ + c}(a + c)]′ = a′. c′, ∀a, b, c ∈ B
(vii) a . b + a . b′ + a′. b + a′. b′ = 1, ∀ a, b, c ∈ B
(viii) p . q . r + p . q . r′ + p . q′ . r + p′ . q . r = p . q + q . r + r . p ∀ p, q, r ∈ B

23. Prove the following:


(i) [ a + (a′ + b)′ ][ a + (b′. c)′ ] = a (ii) (a + b′ )(a′ + b)(a′ + b′ ) = a′. b′
(iii) [{(a′. b′ )′ + c} + (a′ + c′ )] ′ = 0

24. In a Boolean algebra, change the following expressions into factors:


(i) a + a′. b (ii) a . b′ + a′. b (iii) a + b. c (iv) (a . b) + (a′. b′ ) (v) a + (b. c. d )

17. (a) ab + bc (b) ac + b′ c

18. a + b + d′

20. (a) (a + 0) + (1 . a ′ ) = 1 (b) a (a′ + b) = ab

24. (i) a+b (ii) (a′ + b′ )(a + b) (iii) (a + b)(a + c) (iv) (a′+ b)(a + b′ ) (v) (a + bc)(a + d )

7.5.2 Boolean Functions [U.P.T.U. (B.Tech.) 2007]

Let (B, + , . , ' ) be a Boolean-algebra with binary operation ‘+’ (,) ‘.’ and a unary operation ‘,’ .

(i) Monomial: Monomial is any element of Boolean algebra. Also an element obtained by applying the
operation ‘.’ on two or more elements is called monomial. For example x, x′, y, x′. y, x′. y. z are
monomials.

(ii) Polynomial: Polynomial is an expression of Boolean algebra containing two or more than two
monomials with operation ‘+’ in between them. In other words, if the operation ‘+’ is applied to two or
more than two monomials then the expression so obtained is called a polynomial. For example:
x + y′ + x. y′ is a polynomial. Its First Term is x, Second Term is y′ and Third Term is x. y′.
324 Discrete Mathematical Structures

(iii) Factor: Consider an expression x. ( y′ + x ). Then we say that x and y′ + x are two factors of this
expression. If an expression is composed of several expressions with ‘.’ operation then each of these
expressions is called a factor.

(iv) Constant: By a constant we mean any symbol which represents a specified element of Boolean-
algebra B.

Illustration: 0 and 1 are constants of B, since 0 and 1 are identity elements for ‘+’ and ‘.’ in B. Hence 0
and 1 represents two specified elements of B.

(v) Variable: By variable we mean a symbol which represents an arbitrary element for B . Usually
variables are denoted by the symbols x, y, z, x′, y′, z′, . . .

(vi) Boolean Function (or Boolean Polynomial)


Definition: An expression obtained by the application of binary operation ‘+’ and ‘.’ and a unary
operation ‘ ’ on finite number of elements of Boolean algebra (B, + , . ,′ ) is called a Boolean Function or

Boolean Polynomial.
Illustration: x . y′ + x′y, x . y . z . + x′. y . z + x . y′. z are Boolean functions

Note: The number of variables in any Boolean function is the number of distinct letters appearing irrespective
of whether the letter is primed or unprimed.

Illustrations: 1. x + x′ is a function of one variables 'x'. 2. x. y′ is a function of two variables x and y.


3. x. y. z + x′. y. z + x. y′. z′ is a function of three variables x, y and z.

(vii) Power and Multiple of a Variable in a Boolean Function: Let (B,+, .) be a Boolean- algebra
and x ∈ B be any arbitrary variable, then
x 2 = x. x = x

x 3 = x 2. x = x. x = x
x 4 = x 3 . x = x. x = x etc.
x n = x n−1 . x = x. x = x, when n is a positive integer.
Again 2x = x + x = x
3x = x + x + x = x + x = x, etc.
nx = x + x + x +. . . up to n terms, where n is +ve integer.
= x.
Hence, the powers and multiples of any variable do not exist in a Boolean function.
For each positive integer n, we have xn = x .

7.5.3 Minimal (maximal) Boolean Functions or Minterm


A minimal (maximal) Boolean function in n variables x1 , x 2. . . , x n is the product of n letters ~
x1 , ~
x 2. . . , ~
x n.
In other words a minimal (maximal) Boolean function in n variables x1 , x 2. . . , x n is ~
x1 , ~
x 2. . . , ~
x n.
Where ~
x i denotes either x i or x i′. All the letters or some of the letters may be primed.
Boolean Algebra 325

7.5.4 Boole's Theorem


Statement: The number of minimal Boolean function in n-variables are 2n.

Proof: Suppose x1 , x 2. . . , x n are n variables in a Boolean algebra (B, +, .) and let their complements be
respectively x1′ , x 2′ . . . , x n′ . Now there are two ways of selecting the first variable, x1 or x1′ in a minimal
Boolean function; there are two ways of selecting the second variable, x 2 or x 2′ ... there are two ways
selecting the nth variable, x n or x n′ . Thus we see that there are two ways of selecting each of the n variables.
Hence the number of minimal Boolean functions in n variables.

= 2 x 2 x 2 x ... x 2 (n factors) = 2n

7.6 Simplification of Boolean Function


7.6.1 Disjunctive Normal Form or Canonical Form or Sum of Products (SOP) Form
A Boolean polynomial which can be written as sum of the minimal Boolean functions, is called
Disjunction Normal Form (or Canonical Form) of the Boolean function.

Suppose x1 , x 2, . . . , x n are n variables in a Boolean algebra (B, +, .) and their complements are respectively
x1′ , x′2, . . , x′n and suppose f ( x1 , x 2, . . . , x n ) is an arbitrary Boolean function of these n variables. The function
f is called in Disjunctive Normal Form if the function f can be written as the sum of terms of the type
f1 ( x1 ), f 2( x 2 ), . . . , f n( x n ) where f i( x i ) = x i or x′i ∀i = 1, 2, . . . , n and no two terms are identical. In addition to
it, 0 and 1, for n ≥ 0 are called disjunctive normal form in n variables.

Note: We know that there are 2 n minimal Boolean functions in n variables. Hence maximum number of
distinct terms in a disjunctive normal form of a Boolean function in n variables are 2 n .

7.6.2 Complete Disjunctive Normal Form or Complete Canonical Form


If the number of distinct terms in disjunctive normal form of Boolean function in n variables are 2n, then it
is called Complete Disjunctive Normal Form.

Illustration: A Boolean function f ( x1 , x 2 ) in two variables x1 , x 2 in Disjunctive Normal Form may be


given by
f ( x1 , x 2 ) = x1 . x 2 + x1′ . x 2 + x1 . x′2
But if Boolean function f ( x1 . x 2 ) in two variable is Complete Disjunctive Normal Form, then
f ( x1 , x 2 ) = x1 . x 2 + x1′ . x 2 + x1 . x′2 + x1′ . x′2

Illustration: A Boolean function f ( x1 , x 2, x 3 ) in three variables x1 , x 2, x 3 in Disjunctive Normal Form


may be given by
f ( x1 , x 2, x 3 ) = x1 . x 2. x′3 + x1′ . x 2. x 3 + x1 . x′2. x 3
326 Discrete Mathematical Structures

But if f ( x1 , x 2, x 3 ) is Complete Disjunctive Normal Form then there are 23 i.e., 8 distinct terms in
f ( x1 , x 2, x 3 ) . Hence
f ( x1 , x 2, x 3 ) = x1 . x 2. x 3 + x1′ . x 2. x 3 + x1 . x′2. x 3 + x1 . x 2. x′3 + x1′ . x′2. x 3 + x1 . x′2. x′3 + x1′ . x 2. x′3 + x1′ . x′2. x′3

Theorem 3: Bool's expansion theorem.


Every function without constants of a Boolean algebra is equal to a function in disjunctive normal form.

Proof: Let x1 , x 2, . . . , x n be n variables in a Boolean algebra (B,+, .) and let f ( x1 , x 2, . . . , x n ) be a Boolean


function of n variables x1 , x 2, . . . , x n without constants. Now we are to show that f can be transformed in
disjunctive normal form. To do so, we proceed as under:
(i) Suppose g, h are any functions of variables x1 , x 2, . . . , x n and suppose that the expression of the type
(g + h)′ or (g. h)′ occur in f. Then by the us of De-Morgan's Laws, namely

(g + h)′ = g′. h′ and (g. h)′ = g′ + h′


the function f will be expressed in prime expressions such that each expression represents a single
variable.
(ii) After doing as stated in (i) above, we change f into Boolean polynomial by applying Distributive Law
of operation ‘.’ over operation ‘+’.
(iii) Now suppose, f contains some terms (say pth term) free from x i or x′i, then we multiply this pth term by
x i + x′,
i
without changing f. Since if pth term contains a function g then g = g.1 = g( x i + x′i )

Repeating this process several times, every f is so expressed that each term contain all the n variables
(x i or x′i, ∀i = 1, 2, . . . , n).
(iv) In the end, repeated terms are removed by using Idempotent Law ( x i + x i = x i ) .

Thus, f is expressed in disjunctive normal form.

Theorem 4: To prove: If in complete disjunctive normal form or complete canonical form in n variables, each
variable is assigned arbitrarily the value 0 or 1, then just one term will have the value 1 while all others will have
the value 0.
Proof: Suppose (B, +, ⋅) is a Boolean-algebra and let a function f be in complete disjunctive normal form in
n variables x1 , x 2, . . . , x n of B. Let the values 0 and 1 be assigned to the variables x1 , x 2, . . . , x n.

Now we select a term in complete disjunctive normal form. We shall show that the value of this selected term
is 1 and every other term (2n − 1 term in all) has 0 as value. This selected term whose value is 1 contains x1 if x1
has the value 1 assigned or x1′ if x1 has the value 0 assigned x 2 if x 2 has the value 1 or x′2 if x 2 has the value 0,
x 3 if x 3 has the value 1 or x′3 if x 3 has the value 0,..., x n if x n has the value 1 or x′nif x n has the value 0.
∴ The value of this selected term = 1.1.1... 1 (n times) = 1.
Clearly remaining all 2n– 1 terms has 0 as at least one factor (since no two terms are same in complete
disjunctive normal form). Hence each of the remaining 2n – 1 terms has 0 as value.

Verification: Let f ( x1 , x 2 ) be a Boolean function in two variables x1 and x 2. Its complete disjunctive
normal form is given by
f ( x1 , x 2 ) = x1 . x 2 + x1′ . x 2 + x1 . x′2 + x1′ . x′2
Boolean Algebra 327

Now assigning values 0 or 1 to the variables, we have the following tables:

x1 x2 x1′ x′2 x1 . x 2 x1′ . x 2 x1 . x′2 x1′ . x′2

1 0 0 1 0 0 1 0

0 1 1 0 0 1 0 0

From the above table we observe that by giving values 0 or 1 to the variables only one term, in both
distributions, has value 1 and other terms have value 0.
Hence the theorem is verified.

Example 18: Find complete disjunctive normal form in one variable x1 .


Solution: f ( x1 ) = x1 + x1′ = 1.

Example 19: Find complete disjunctive normal form in two variables x1 , x 2 and show that its value is 1.
Solution: f ( x1 , x 2 ) = x1 . x 2 + x1 . x′2 + x1′ . x 2 + x1′ . x′2
= x1 ( x 2 + x′2 ) + x1′ ( x 2 + x′2 ) [By Distributive Law]
= x1 .1 + x1′ .1 [Q x 2 + x 2 = 1]
= x1 + x1′ = 1

Example 20: Find complete disjunctive normal form in three variables, and show that its value is 1.
Solution: f ( x1 , x 2, x 3 ) = x1 . x 2. x 3 + x1 . x 2. x′3 + x1 . x′2. x 3 + x1′ . x 2. x 3 + x1 . x′2. x′3 + x1′ . x 2. x′3
+ x1′ . x′2. x 3 + x1′ . x′2. x′3
= x1 . x 2( x 3 + x′3 ) + x1 . x′2( x 3 + x′3 ) + x1′ . x 2( x 3 + x′3 ) + x1′ . x′2[( x 3 + x′3 )
= x1 . x 2. 1 + x1 . x′2. 1 + x1′ . x 2. 1 + x1′ x′2.1 [Q x 3 + x′3 = 1]
= x1 . x 2 + x1 . x′2 + x1′ . x 2 + x1′ . x′2
= x1 ( x 2 + x′2 ) + x1′ ( x 2 + x′2 )
= x1 . 1 + x1′ . 1 = 1

7.6.3 Complement Function of a Boolean Function in Disjunctive Normal Form


Suppose f is a Boolean function expressed in disjunctive normal form. Then complement function of f is a
Boolean function which is the sum of all those terms of complete disjunctive normal form which are not
present in disjunctive normal form of f. The complement function of f is denoted by f ′.

Illustration: Let f ( x, y ) = x. y + x′. y′


Now complete disjunctive normal form in two variables is
x. y + x′. y + x. y′ + x′. y′
Hence f ′( x, y ) = x′. y + x. y′
328 Discrete Mathematical Structures

7.7 Conjunctive Normal Form or Dual Canonical Form or Product of the Sums POS) Form
A Boolean polynomial is called a Conjunctive Normal Form (or Dual Canonical Form) if it is the
product of distinct factors where each factor is the sum of variables x1 , x 2, x 3 . . . and their complements
x1′ , x′2, x′3 , . . . and in each factor variables or their complements do not occur more than once. In addition to
it, 0 and 1 for n ≥ 0 are called in conjunctive normal form in n variables.

Illustrations: The following functions are in Conjunctive Normal Form:


(i) f ( x1 , x 2 ) = ( x1 + x′2 )( x1′ + x 2 )( x1′ + x′2 )

(ii) f ( x1, x2, x3 ) = ( x1 + x2 + x3 )( x1 + x2 + x3′ )( x1′ + x2 + x3 ) ( x1′ + x′2 + x′3 )

Note: In conjunctive normal form no two factors are identical.

7.7.1 Complete Conjunctive Normal Form


A conjunctive normal form in n variables called Complete Conjunctive Normal Form if there are 2n
distinct factors.

Bool's Expansion Theorem


Every function without constants of Boolean algebra is equal to a function in conjunctive normal form.

Proof: Let x1 , x 2, . . . , x n be n variables in a Boolean algebra (B,+, .) and let f ( x1 , x 2, . . . , x n ) be a Boolean


function of n variables x1 , x 2, . . . , x n without constants. Now we are to show that f can be transformed to
conjunctive normal form. To do so, we proceed as follows:
(i) Suppose g, h are any functions of variables x1 , x 2, . . . , x n and suppose that the expressions of the type
(g + h)′ and (g. h)′ occur in f. Then by the use of De-Morgan's Laws, namely

(g + h)′ = g′. h′ and (g. h)′ = g′ + h′


the functions f will be expressed in prime expressions such that each expression represents a single
variable.
(ii) After doing as stated in (i) above, we change f into Boolean polynomial consisting factors, by
applying distributive law of ‘+’ over ‘.’ .
(iii) Now suppose f contains some factor (say pth factor) free from x i or x′i, then to this pth factor x i. x′i is
added, without changing f. Since of pth factor contains a function g, then
g = g + 0 = g + x i. x′i
Representing this process several times, every factor of f is so expressed that each factor contains all
the n variables (x i or x′i, ∀ i = 1, 2, . . . , n).

(iv) In the end, repeated factors are removed by using the Idempotent law ( x i. x i = x i ).
Thus f is expressed in conjunctive normal form.
Boolean Algebra 329

7.7.2 Complement Function of a Boolean Function in Conjunctive Normal Form


Suppose f is a Boolean function expressed in conjunctive normal form. Then complement function of f is a
Boolean function which is the product of all those terms of complete conjunctive normal form which are
not present in conjunctive normal form of f. The complement function of f is denoted by f ′.

Illustration: Let f ( x, y ) = ( x + y )( x′ + y′ )
Now complete conjunctive normal form in two variables is ( x + y )( x′ + y )( x + y′ )( x′ + y′ )
Hence f ′( x, y ) = ( x′ + y )( x + y′ )
Rule for finding complement of a function in DN form

We can find by inspection the complement of any function given in disjunctive normal form. If a function f
is given in disjunctive normal form then its complement f ′ is obtain by omitting from the complete
disjunctive normal form, the terms which appear in the function f.
Remark: The complement of complement DN form is CN form.
Rule for finding complement of a function in CN form

We can find by inspection the complement of any function given in conjunctive normal form. If a function f is
conjunctive normal form then its complement f ' is obtain by omitting conjunctive normal form the terms
which appear in the function f.
Remark: The complement of complement CN form is DN form.

Example 21: Let E ( x1 , x 2, x 3 ) = ( x1 ∨ x 2 ) ∨ ( x1 ∧ x 3 ) be a Boolean expression over two valued Boolean


algebra. Write E ( x1 , x 2, x 3 ) in disjunctive normal form. [U.P.T.U. (B.Tech.) 2009]

or

Let E ( x1 , x 2, x 3 ) = {( x1 + x 2 )′ + ( x′1 . x 3 )}′

be a Boolean expression over two valued Boolean algebra. Write E ( x1 , x 2, x 3 ) in disjunction normal form.
[Kurukshetra (B.E.) 2006; R.G.P.V. (Bhopal) 2008; Osmania (B.E.) (Andhra) 2009]

Solution: We have
E ( x1 , x 2, x 3 ) = {( x1 + x 2 )′ + x1′ . x 3 }′
= ( x1′ . x′2 + x1′ . x 3 )′
= ( x1′ . x′2 )′ . ( x1′ . x 3 )′
= {( x1′ )′ + ( x′2 )′ } . {( x1′ )′ + x′3 }
= ( x1 + x 2 )( x1 + x′3 ) [( x1′ )′ = x1 ]
= x1 + x 2 x′3 [By distributive]
= x1 . 1 . 1 + x 2 x′3 . 1 [ x1 + x1′ = x 2 + x′2 = x 3 + x′3 = 1]
= x1 ( x 2 + x′2 )( x 3 + x′3 ) + x 2 x′3 ( x1 + x1′ )
= x1 ( x 2 x 3 + x 2 x′3 + x′2 x 3 + x′2 x′3 ) + x1 x 2 x′3 + x1′ x 2 x′3
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x′2 x 3 + x1 x′2 x′3 + x1 x 2 x′3 + x1′ x 2 x′3
= x1 x 2 x 3 + x1 x′2 x 3 + x1 x 2 x′3 + x1 x′2 x′3 + x1′ x 2 x′3 , [ x1 x 2 x′3 + x1 x 2 x′3 = x1 x 2 x′3 ]
330 Discrete Mathematical Structures

7.7.3 Boolean Expression


A Boolean expression or form, in n variables x1 , x 2, K x n is any finite string of symbols formed as
(i) 0 and 1 are Boolean expressions.
(ii) If α and β are Boolean expression, then α . β or α ∗ β and α + β or α ⊕ β are also Boolean expressions.
(iii) x1 , x 2, x 3 K x n are Boolean expressions.
(iv) If α is Boolean expression then (α )′ is also a Boolean expression.
(v) If α is a Boolean expression in n variables x1 , x 2 K x n then α can be written as α ( x1 , x 2, x 3 K x n ) .

Remark: Consider the Boolean expression

α ( x1 , x 2, . . . x n ) = [ x1 . x 2 + x 3 ] ′

if x1 = 1, x 2 = 0 and x 3 = 0, then

α ( x1 , x 2, x 3 ) = α (1, 0, 0) = [1 . 0 + 0] ′ = (0 + 0)′ = 0 ′ = 1

7.7.4 Equivalent Expression


Two Boolean expression α ( x1 , x 2, x 3 K x n ) and β ( x1 , x 2, x 3 K x n ) are said to be equal or equivalent
expression if one can be obtained from the other by finite numbers of application of the identities of
Boolean algebra.

7.7.5 Literal
A literal is defined be a Boolean variable or its complement. For example x1 and x1′ are literals.

Example 22: Find the complement of the following functions


(i) f = a′ b + ab′ (ii) f = a' bc + abc′ + a′ b' c + a' b' c'.
Solution: (i) The complete disjunctive normal form in two variables a, b is
F = ab + ab′ + a′ b + a′ b′
The given DN form is f = a′ b + ab′
Then f′=F − f
= a b + ab′ + a′ b + a′ b′ – a′ b – ab′ = ab + a′ b′
(ii) The complete disjunctive normal form in three variables a, b and c is
F = abc + a ′ bc + ab ′ c + abc ′ + a ′ b ′ c + a′ bc ′ + a ′ bc' + a ′ b ′ c ′
The given DN form is f = a′ bc + abc′ + a′ b ′ c + a′ b′ c′
Then f ′ = F – f = abc + ab′ c + a′ bc′+ ab′ c′

Example 23: Find the complement of f = ( x + y' )( x + y ).


Solution: The given function f is written in CN form of two variables.
The complete CN form in two variables is F = ( x + y )( x ′ + y )( x + y′ )( x ′ + y′ )
The complement of f is f ′ = F – f = ( x′ + y )( x ′ + y′ )
Boolean Algebra 331

Example 24: Change the function f = uv + u' v + u' v' from DN form to CN form.

Solution: The given DN form is f = uv + u′ v + u′ v′

The complete DN form for two variables u, v is

F = uv + u' v + uv' + u' v'

The complement of DN form

f ' = F – f = uv'

We know the complement of complement DN form is CN form i.e.

f = ( f ' )'

f = (u v' )' [By De Morgan's law]

f = u' + (v' )' = u' + v [(v' )' = v]

Example 25: Change the function f = ( x + y' )( x ' + y )( x ' + y ' ) from CN form to DN form.

Solution: The given CN form is

f = ( x + y' )( x ' + y )( x ' + y' )

The complete CN form for two variables x, y is

F = ( x + y ' )( x ' + y )( x ' + y ' )( x + y )

The complement of CN form f ' = F – f

f ′ = (x + y )

We know the complement of complement CN form is DN form i.e.

f = ( f ' )'

f = ( x + y )'

f = x' y'

Example 26: Simplify the Boolean function by using laws of Boolean algebra

xy + x ' y + x ' y '

Solution: Let f = xy + x ' y + x ' y '

= xy + x ' ( y + y ' ) [y + y' = 1]

= xy + x ' [By Commutative]

= ( x ' + xy )

= ( x ' + x )( x ' + y ) [By Distributive]

= 1 ⋅ (x '+ y ) [ x ' + x = 1]

f = x' + y [1. x = x]
332 Discrete Mathematical Structures

Example 27: Simplify the Boolean function by using the law of Boolean algebra xy + xyz + yz .
Solution: Let f = xy + xyz + yz
= xy(1 + z ) + yz
= xy + yz [1+z =1]
= xy + zy [By Commutative]
= ( x + z) y

Example 28: Express Boolean expression ( x + y ). (z′ + w ) in polynomial.


Solution: ( x + y )(z′ + w ) = ( x + y )z′ + ( x + y ) w [By Distributive Laws of ‘.’ over ‘+’]
= z′( x + y ) + w( x + y ) [By Commutative Law]
= z′ . x + z′ . y + w. x + w. y [By Distributive Law]

Example 29: Express the polynomial x. z + x. w + y. z + y. w into factors.


Solution: x. z + x. w + y. z + y. w = x (z + w ) + y(z + w ) [Distributive Law]
= (z + w )x + (z + w )y [Commutative Law]
= (z + w )( x + y ) [Distributive Law]
= ( x + y )( z + w ) [By Distributive Law]

Example 30: Obtain the sum of products canonical forms of Boolean expression x1 x′2 + x 3 .
Solution: We know
f ( x1 , x 2, x 3 ) = x1 x′2 + x 3
= x1 x′2(1) + x 3 1.1 [ x1 + x1′ = x 2 + x′2 = x 3 + x′3 = 1]
= x1 x′2( x 3 + x′3 ) + x 3 ( x1 + x1′ )( x 2 + x′2 )
= x1 x′2 x 3 + x1 x′2 x′3 + ( x1 x 3 + x1′ x 3 )( x 2 + x′2 )
= x1 x′2 x 3 + x1 x′2 x′3 + x1 x 2 x 3 + x1 x′2 x 3 + x1′ x 2 x 3 + x1′ x′2 x 3
= x1 x′2 x 3 + x1 x′2 x′3 + x1 x 2 x 3 + x1′ x 2 x 3 + x1′ x′2 x 3
This is the sum of products canonical forms.

Example 31: Write the Boolean expression f ( x1 , x 2, x 3 ) = ( x1′ x 2 )′ ( x1 + x 3 ) in both disjunctive and
conjunctive normal forms.
Solution: We have
f ( x1 , x 2, x 3 ) = ( x1′ x 2 )′ ( x1 + x 3 )
= [( x1′ )′ + ( x′2 )] ( x1 + x 3 ) [( x1′ )′ = x1 ]
= ( x1 + x′2 )( x1 + x 3 )
= x1 + x′2 x 3
= x1 1.1 + x 2′ x 3 . 1

= x1 ( x 2 + x′2 )( x 3 + x′3 ) + x′2 x 3 ( x1 + x1′ ) [ x1 + x1′ = x 2 + x′2 = x 3 + x′3 = 1]


= ( x1 x 2 + x1 x′2 )( x 3 + x′3 ) + x1 x′2 x 3 + x1′ x′2 x 3
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x′2 x 3 + x1 x′2 x′3 + x1 x′2 x 3 + x1′ x′2 x 3 [ x1 x′2 x 3 + x1 x′2 x 3 = x1 x′2 x 3 ]
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x′2 x 3 + x1 x′2 x′3 + x1′ x′2 x 3
Boolean Algebra 333

This is the disjunctive normal form.


Now the conjunctive normal form.
f ( x1 , x 2, x 3 ) = ( x1′ x 2 )′ ( x1 + x 3 )
= ( x1 + x′2 )( x1 + x 3 ) [( x1′ )′ = x1 )]
= ( x1 + x′2 + 0)( x1 + x 3 + 0)
= ( x1 + x′2 + x 3 x′3 )( x1 + x 3 + x 2 x′2 )
= ( x1 + x′2 + x 3 )( x1 + x′2 + x′3 )( x1 + x 3 + x 2 )( x1 + x 3 + x′2 )

Example 32: Change the function x′yz + xyz + x′yz′ + xyz′ into disjunctive normal form of two variables.
Solution:
x′yz + xyz + x′yz′ + xyz′= ( x′yz + x′yz′ ) + ( xyz + xyz′ )
= x′y(z + z′ ) + xy(z + z′ )
= x′y(1) + xy(1) [Q z + z′ = 1]
= x′y + xy = xy + x′y.

Example 33: Express the following function in disjunctive normal form in the smallest possible number of
variables:
f ( x, y, z )= xy′ + xz + xy.

Solution: f ( x, y, z ) = xy′ + xz + xy
= xy′ + xy + xz
= x ( y′ + y ) + xz = x.1 + xz = x + xz = x(1 + z ) = x.1 = x .

Example 34: Change the following functions to disjunctive normal forms of three variables x, y, z:
(i) x + y′ (ii) x′z + xz′ (iii) ( x + y )( x′ + y′ ) (iv) x

Solution:

(i) x + y′= x( y + y′ )(z + z′ ) + y′( x + x′ )(z + z′ )


= x( yz + yz′ + y′z + y′z′ ) + y′( xz + xz′ + x′z + x′z′ )
= xyz + xyz′ + xy′z + xy′z′ + y′xz + y′xz′ + y′x′z + y′x′z′
= xyz + xyz′ + ( xy′z + xy′z ) + ( xy′z′ + xy′z′ ) + x′y′z + x′y′z′
= xyz + xyz′ + xy′ z + xy′ z′ + x′y′ z + x′y′ z′

(ii) x′z + xz′ = x′z ( y + y′ ) + ( xz′ )( y + y′ ) = x′zy + x′zy′ + xz′y + xz′y′


= x′yz + x′y′z + xyz′ + xy′z′.
(iii) ( x + y )( x′ + y′ ) = xy′ + yx′
= xy′(z + z′ ) + yx′(z + z′ ) = xy′ z + xy′ z′ + yx′z + yx′z′

(iv) x = x ( y + y′ )(z + z′ )

= x ( yz + yz′ + y′z + y′z′ ) = xyz + xyz′ + xy′ z + xy′ z′.


334 Discrete Mathematical Structures

Example 35: Write the following functions into disjunctive normal forms of 3 variables x, y, z:
(i) x′ + y′ (ii) xy′ + x′y (iii) ( x + y )( x′ + z′ )
Solution: (i) x′ + y′= x′( y + y′ )(z + z′ ) + y′( x + x′ )(z + z′ ) [Q x + x′ = 1, etc.]
= x′( yz + yz′ + y′z + y′z′ ) + y′( xz + xz′ + x′z + x′z′ )
= x′yz + x′yz′ + x′y′z + x′y′z′ + xy′z + xy′z′ + x′y′z + x′y′z′
= x′yz + x′yz′ + 2x′y′z + 2x′y′z′ + xy′z + xy′z′
= x′yz + x′yz′ + x′y′z + x′y′z′ + xy′z + xy′z′ [Q nx = x, ∀n ∈ N ]
(ii) xy′ + x′y = xy′(z + z′ ) + x′y(z + z′ ) = xy′ z + xy′ z′ + x′yz + x′yz′. [Q z + z′ = 1]
(iii) ( x + y )( x′ + z′ ) = ( x + y )x′ + ( x + y ) z′
= xx′ + yx′ + xz′ + yz′
= 0 + x′y + xz′ + yz′ [Q xx′ = 0]
= x′y(z + z′ ) + xz′( y + y′ ) + yz′( x + x′ )
= x′yz + x′yz′ + xyz′ + xy′z′ + xyz′ + x′yz′
= x′yz + 2x′yz′ + 2xyz′ + xy′z′ = x′yz + x′yz′ + xyz′ + xy′ z′.

Example 36: Find a function of three variables x, y, z which has value 1, when either x = y = 1 and z = 0 or x
= z = 1 and y = 0, otherwise it has value 0.
Solution:

Case I: When x = y = 1 and z = 0 ⇒ z′ = 1


Function xyz′ has value 1, since xyz′ = 1.1.1 = 1

Case II: When x = z = 1 and y = 0 ⇒ y′ = 1


Function xy′z has value 1, since xy′z = 1.1.1 = 1

Hence the required function is the sum of above two functions and is given by xyz′ + xy′ z
Now if x,y,z are assigned values 0 and 1 in other distinct ways, the above function has value 0.

Example 37: Express the following function in conjunctive normal form:


f ( x, y, z ) = ( xy′ + xz )′ + x′

Solution: f ( x, y, z ) = ( xy′ + xz )′ + x′ = ( xy′ )′ . ( xz )′ + x′


= ( x′ + y )( x′ + z′ ) + x′
= ( x′ + x′ + y )( x′ + x′ + z′ ) [Q a + bc = (a + b)(a + c)]
= ( x ′+ y )( x ′+ z ′ )
= ( x ′+ y + zz′ )( x ′+ z′ + yy′ )
= ( x′ + y + z )( x′ + y + z′ )( x′ + z′ + y )( x′ + z′ + y′ )
= ( x′ + y + z )( x′ + y + z′ )( x′ + y′ + z′ ) (Q aa = a)
Boolean Algebra 335

Example 38: What are Boolean functions? Simplify the given Boolean expression. (a . b)′ ⊕ (a ⊕ b)′
Solution: A Boolean function is an expression which is formed with binary variables. The two binary
operator OR and AND, the unary operator NOT parenthesis and equal sign.
(a . b)′ ⊕ (a ⊕ b)′ = [(a . b)′ ]′ (a ⊕ b)′ + (a . b)′ ((a ⊕ b)′ )′ [ a ⊕ b = ab′ + a′ b]
= (a . b)(a′ b + ab′ ) + (ab)′ (a ⊕ b)
= ab (a′ b + ab′ ) + (ab)′ (a′ b + ab′ )
= (a′ b + ab′ )1 = a′ b + ab′

Example 39: Is the statement always true? Justify your answer:


"If x ( y + z′ ) = x( y + w′ )"
Solution: If x( y + z′ ) = x( y + w′ )
⇒ xy + xz′ = xy + xw′
⇒ xz′ = xw′
⇒ z′ = w′
⇒z=w
The statement is true only when z = w

Example 40: If f ( x, y, z ) = xy′ + xyz′ + x′yz′ show that: f ( x, y, z ) + z′ ≠ f ( x, y, z )


Solution: f ( x, y, z )+ z′ = xy′ + xyz′ + x′yz′ + z′
= xy′ + xyz′ + z′( x′y + 1)
= xy′ + xyz′ + z′ [Q x′y + 1 = 1, z′1 = z′]
= xy′ + z′( xy + 1) = xy′ + z′ ≠ f ( x, y,z )

Example 41: Simplify the Boolean expression:


(a ∧ b) ∨ (a ∧ b ∧ c) ∨ (b ∧ c)
Solution: (a ∧ b) ∨ (a ∧ b ∧ c) ∨ (b ∧ c) [T = b ∧ c]
= (a ∧ b) ∨ (b ∧ c) ∧ (a ∨ T ) = (a ∧ b) ∨ (b ∧ c) ∧ T = ( a ∧ b ) ∨ ( b ∧ c)

Example 42: The function xy + x′y + x′y′ is given in disjunctive normal form, change it into conjunctive
normal form.
Solution: xy + x′y + x′y′ = xy + x′( y + y′ )
= xy + x′ [Q y + y′ = 1]
= x′ + xy
= ( x′ + x )( x′ + y ) [Q a + ab = (a + b)(a + c)]
=( x′ + y )
Example 43: The function ( x + y′ )( x′ + y )( x′ + y′ ) is given in conjunctive normal form, change it into
disjunctive normal form.
Solution: ( x + y′ )( x′ + y )( x′ + y′ )
= ( x + y′ )( x′ + yy′ ) [By Distributive Law]
= ( x + y′ )x′ [Q yy′ = 0]
= x x′ + x′y′ = 0 + x′y′ = x′y′
336 Discrete Mathematical Structures

Example 44: Change the following Boolean function to disjunctive normal form
f ( x, y, z ) = [ x + ( x ′+ y )′ ][ x + ( y′ . z′ )′ ]
Solution: f ( x, y, z ) = [ x + ( x′ + y )′ ][ x + ( y′. z′ )′ ]
= [ x + ( x′ )′ y′][ x + ( y′ )′ + (z′ )′ ] [By De Morgan Law]
= [ x + x. y′][ x + y + z] [Q (a′ )′ = a]
= ( x + x. y′ )x + ( x + x. y′ )y + ( x + x. y′ ) z [. is Distributive over +]
= x. x + x. y′. x + x. y + x. y′. y + x. z + x. y′. z
= x + x. y′ + x. y + 0 + x. z + x. y′. z [Q x. x = x]
= x . 1 . 1 + x. y′. 1 + x . y . 1 + x . 1 . z + x . y′. z
= x ( y + y′ )(z + z′ ) + x. y′(z + z′ ) + x. y(z + z′ ) + x ( y + y′ ) z + x. y′ . z
= x. y. z + x. y. z′ + x. y′. z + x. y′. z′ + x. y′. z + x. y′. z′ + x. y. z + x. y. z′ + x. y. z + x. y′. z + x. y′. z
= x. y. z + x. y. z′ + x. y′. z + x. y′. z′

Example 45: Change the following Boolean function to disjunctive normal form
f ( x, y, z, t ) = ( x′. y + x. y. z′ + x. y′. z + x′. y′. z′. t + t ′ )′ .
Solution: Applying general De-Morgan Law, we have
f ( x, y, z, t ) = ( x′. y )′ ( x. y. z′ )′ ( x. y′. z )′ ( x′. y′. z′. t )′ (t ′ )′
= ( x + y′ )( x′ + y′ + z )( x′ + y + z′ )( x + y + z + t ′ )t
= [ x. x′ + x. y′ + x. z + y′. x′ + y′. y′ + y′. z]( x′ + y + z′ )( x. t + y. t + z. t + t ′. t )
= [ x. y′ + x. z + x′. y′ + y′ + y′. z]( x′ + y + z′ )( x. t + y. t + z. t ) [Q a . a′ = 0, a . b = b. a, etc.]
= [ x. z + { y′ + y′( x + x′ + z )}( x′ + y + z′ ) ( x. t + y. t + z. t )]
= ( x. z + y′ )( x′ + y + z′ )( x. t + y. t + z. t ) [By Absorption Law: y′ + y′. u = y′]
= ( x. z. x′ + x. z. y + x. z. z′ + y′. x′ + y′. y + y′. z′ )( x. t + y. t + z. t )
= ( x. y. z + x′. y′ + y′. z′ )( x. t + y. t + z. t ) [Q x. x′ = 0]
= x. y. z. x. t + x. y. z. y. t + x. y. z. z. t + x′. y′. x. t + x′. y′. y. t + x′. y′. z. t + y′. z′. x. t + y′. z′. y. t + y′. z′. z. t
= x. y.z.t + x′. y′ .z.t + x. y′ .z′.t [Q a.a′ = 0,a + a = a]

Example 46: Change the following Boolean function to conjunctive normal form:
f ( x, y, z, t ) = ( x′. y + x. y. z′ + x. y′. z + x′. y′. z′. t + t ′ )′
Solution: By general De-Morgan's Law, we have:
f ( x, y, z, t ) = ( x′. y )′ ( x. y. z′ )′ ( x. y′. z )′ ( x′. y′. z′. t )′ (t ′ )′
= ( x + y′ )( x′ + y′ + z )( x′ + y + z′ )( x + y + z + t ′ )t
= ( x + y′ )( x′ + y′ + z )( x′ + y + z )t [By Absorption Law]
= ( x + y′ + 0 + 0)( x′ + y′ + z + 0)( x′ + y + z + 0)(0 + 0 + 0 + t )
= ( x + y′ + z. z′ + t . t ′ )( x′ + y′ + z + t . t ′ )( x′ + y + z + t . t ′ )( x. x′ + y. y′ + z. z′ + t )
= ( x + y′ + z + t )( x + y′ + z + t ′ )( x + y′ + z′ + t )( x + y′ + z′ + t ′ )( x′ + y′ + z + t )( x′ + y′ + z + t ′ )
( x′ + y + z + t )( x′ + y + z + t ′ )( x + y + z + t ) ( x + y + z′ + t )( x + y′ + z + t )( x + y′ + z′ + t )
( x′ + y + z + t )( x′ + y + z′ + t )( x′ + y′ + z + t )( x′ + y′ + z′ + t ) [Q + is Distributive over.1]
= ( x + y + z + t )( x + y + z + t ′ )( x + y + z′ + t )( x + y + z′ + t ′ )( x′ + y′ + z + t )( x′ + y′ + z + t ′ )
( x′ + y + z + t )( x + y′ + z′ + t )( x + y′ + z′ + t ′ )( x + y′ + z + t ′ )( x + y′ + z + t )( x + y′ + z′ + t )
( x′ + y + z′ + t)(x′ + y′ + z′ + t )
Boolean Algebra 337

Example 47: Evaluate the function f from the following table:

a b c f T

1 1 1 0 a′. b′. c′

1 1 0 1 a′. b′. c

1 0 1 1 a′. b. c′

0 1 1 0 a . b.′ c′

1 0 0 1 a′. b. c

0 1 0 0 a . b.′ c

0 0 1 1 a . b. c′

0 0 0 0 a. b . c

Where T represents the terms of function f.

Solution: From Bool's expansion theorem, the function f is given by

f (a . b . c) = 0 (a′. b′. c′ ) + 1 (a′. b′. c) + 1 (a′. b. c′ ) + 0 (a . b′. c′ ) + 1 (a′. b. c) + 0 (a . b′. c) + 1 (a . b. c′ ) + 0 (a . b. c)

= a′. b′. c + a′. b. c′ + a′. b. c + a . b. c′

= a′. b′. c + a′. b (c′ + c) + a . b. c′ [By Distributive Law]

= a′. b′. c + a′. b.1 + a . b. c′ [Q c′ + c = 1]

= a′. b′. c + a′. b + a . b. c′

= a′(b′. c + b) + a . b. c′ [By Distributive Law]

= a′(b + b′. c) + a . b. c′

= a′(b + b′ )(b + c) + a . b. c′ [By Distributive Law]

= a′.1 (b + c) + a . b. c′

= a′(b + c) + a . b. c′

= a′. b + a′. c + a . b. c′

= a′. b + a . c′. b + a′. c

= (a′ + ac′ ) b + a′. c

= (a′ + a)(a′ + c′ ) b + a′. c [By Distributive Law]

= 1 (a′ + c′ ) b + a′. c = (a′ + c′ ) b + a′. c = a′. b + c′. b + a′. c

= a′.b + b.c′ + a′.c


338 Discrete Mathematical Structures

Example 48: Determine the functions f1 and f 2 from the following table:

x1 x2 x3 T1 f1 f2 T2

1 1 1 x1 . x 2. x 3 1 0 x1′ . x′2. x′3

1 1 0 x1 . x 2. x′3 0 0 x1′ . x′2. x 3

1 0 1 x1 . x′2. x 3 1 0 x1′ . x 2. x′3

0 1 1 x1′ . x 2. x 3 0 1 x1 . x′2. x′3

1 0 0 x1 . x′2. x′3 0 0 x1′ . x 2. x 3

0 1 0 x1′ . x 2. x′3 0 1 x1 . x′2. x 3

0 0 1 x1′ . x′2. x 3 1 0 x1 . x 2. x′3

0 0 0 x1′ . x′2. x′3 1 0 x1 . x 2. x 3

Where T1 and T2 represents the terms of f1 and f 2 respectively.


Solution: From Bool's expansion theorem, f1 is given by
f1 ( x1 , x 2, x 3 ) = 1 ( x1 . x 2. x 3 ) + 0 ( x1 . x 2. x′3 ) + 1 ( x1 . x 2′ . x 3 ) + 0 ( x1′ . x 2. x 3 ) + 0 ( x1 . x′2. x′3 ) + 0 ( x1′ . x 2. x′3 )
+1 ( x1′ . x′2. x 3 ) + 1 ( x1′ . x′2. x′3 )
= x1 . x 2. x 3 + x1 . x′2. x 3 + x1′ . x′2. x 3 + x1′ . x′2. x′3 = x1 ( x 2 + x′2 ) x 3 + x1′ . x′2( x 3 + x′3 )
= x1 . 1 . x 3 + x1′ . x′2. 1 = x1 . x 3 + x1′ . x′2
Similarly f 2 is given by
f 2( x1 , x 2, x 3 ) = 0 ( x1′ . x′2. x′3 ) + 0 ( x1′ . x′2. x 3 ) + 0 ( x1′ . x 2. x′3 ) +1 ( x1 . x′2. x′3 ) + 0 ( x1′ . x 2. x 3 ) +1 ( x1 . x′2. x 3 )
+ 0 ( x1 . x 2. x′3 ) + 0 ( x1 . x 2. x 3 )
= x1 . x′2. x′3 + x1 . x′2. x 3 = x1 . x′2. ( x′3 + x 3 ) = x1 . x′2.1 = x1 .x′2

Example 49: Determine the function f defined by the following table and simplify it:

x y z f ( x, y, z ) T

1 1 1 0 x. y. z

1 1 0 1 x. y. z′

1 0 1 1 x. y′. z

1 0 0 0 x. y′. z′

0 1 1 0 x′. y. z

0 1 0 0 x′. y. z′

0 0 1 1 x′. y′. z

0 0 0 0 x′. y′. z′

Where T represents the terms of f in disjunctive normal form.


Boolean Algebra 339

Solution: We know that for f to be in disjunctive normal form, the value of only one term is 1 while the
value of others is 0, when each variable is assigned arbitrarily the value 0 or 1. Consequently, the function f
in disjunctive normal form is given by
f ( x, y, z ) = x. y. z′ + x. y′. z + x′. y′. z
Verification: From the table, we have
∑ f . T =0 ( x. y. z ) + 1 ( x. y. z′ ) + 1 ( x. y′. z ) + 0 ( x. y′. z′ ) + 0 ( x′. y. z ) + 0 ( x′. y. z′ ) + 1 ( x′. y′. z ) + 0 ( x′. y′. z′ )
= x. y. z′ + x. y′. z + x′. y′. z
= x. y. z′ + ( x + x′ ). y′. z
= x. y. z′ + 1 . y′. z = x. y. z′ + y′. z = f ( x, y,z )
Which is the required function.

Example 50: Find the complement of the following Boolean functions which are in conjunctive normal
forms:
(i) F = ( x + y + z′ )( x + y′ + z′ )( x + y + z′ )

(ii) F = ( x + y + z )( x′ + y′ + z′ )( x + y′ + z )( x + y + z′ ). ( x + y′ + z′ )

Solution: Complete conjunctive normal form in three variables is


( x + y + z )( x + y + z ′ )( x + y′ + z )( x + y ′ + z′ ) ( x′ + y + z )( x′ + y + z′ )( x′ + y′ + z )( x′ + y′ + z′ )
Let complement of given function F be F ′, then, we have
(i) F ′ = ( x + y + z )( x + y′ + z )( x′ + y + z )( x′ + y + z′ )( x′ + y′ + z )( x′ + y′ + z′ )
(ii) F ′ = ( x′ + y′ + z )( x′ + y + z′ )( x′ + y + z )

1. Define the following:


(i) Boolean Function (ii) Minimal Boolean Function

2. Show that the number of minimal Boolean function in n variables are 2".

3. State and prove Boole's Expansion theorem.

4. Show that complete canonical form in n variables is always equal to 2n. Explain it by giving examples
in 2 and 3 variables.

5. Change the following function to disjunctive normal form

F ( x, y, z ) = x. y′ + x. z + z. y.

6. Change the following functions to disjunctive normal form:


(i) f ( x, y, z ) = [( x + y′ )( x, y′, z )′ ]′ (ii) f ( x, y, z ) = ( x + y′ )( y + z′ )(z + x′ )( x′ + y′ )
(iii) f (u, v, w ) = (u + v + w )(u. v + u′. w )′ (iv) f ( x, y, z ) = x′. y′. z + x′. z
(v) F ( x, y, z ) = ( x. y′ + x. z′ )′+ x′ (vi) F ( x, y, z ) = [( x + y′ ) + ( y + z′ )′ ]′ + y. z.
(vii) F ( x, y, z ) = ( x + y )( x + z′ ) + ( y + z′ ) (viii) F ( x, y, z ) = [( x. y′ )′+ z′][ z + x′]′
340 Discrete Mathematical Structures

7. Show that every Boolean function can be written as the sum of minimal Boolean functions.

8. Change the following function to conjunctive normal forms in which minimum number of variables
are used:
(i) f = ( x + y′ )( y + z′ )(z + x′ )( x′ + y′ ). (ii) f = ( x + y )( x + y′ )( x′ + z )

(iii) f = x′. y. z + x. y′. z′ + x′. y′. z + x′. y. z′ + x. y′. z + x′. y′. z′.

9. Change the following functions to conjunctive normal forms:


(i) F = [ x + ( x′ + y )′ ][ x + ( y′ + z′ )]. (ii) F = ( x + y )( x + y′ )( x′ + z ).

(iii) F = [( x + y′ )( x. y′. z )′ ]′. (iv) F = x′. y. z + x. y′. z′

(v) F ( x, y, z ) = [ x + ( x′ + y )]′ [ x + ( y′. z′ )′ ]

10. Find the complement of the following function


(i) ( x + y ) ( x ′ + y )( x ′+ y ′ ) (ii) ( x + y + z )( x ′+ y ′+ z )( x ′+ y ′+ z ′ )

11. Express the following functions into disjunctive normal form:


(i) x. y (ii) x + x′. y
(iii) f ( x, y, z ) = x. y′ + x. z + x. y (iv) f ( x, y, z ) = ( x. y′ + x. z )' + x′
(v) f ( x, y, z ) = x. y. z + ( x + y )( x + z ) (vi) f ( x, y, z ) = ( x + y )( x + y′ )( x′ + z )
(vii) f ( x, y, z ) = ( x + y + z )( xy + x′z )′ (viii) f ( x, y, z ) = [( xy′ )′ + z′][ z + x′]′
(ix) f ( x, y, z ) = ( x′ + y )′ ( x + z )′ + ( y. z )′
(x) f ( x, y, z ) = ( x + y′ )( y + z′ )(z + x′ )( x′ + y′ ).

5. [ x. y. z + x. y′. z + x. y. z′ + x. y′. z′]


6. (i) x′. y. z + x′. y. z′ + x. y′. z (ii) x′. y′. z′
(iii) u. v′. w + u. v′. w′ + u′. v. w′ (iv) x′. y′. z + x′. y. z′ + x′. y′. z
(v) x. y. z + x′. y. z + x′. y′. z′+ x. y. z′ + x′. y′. z′ (vi) x. y. z + x′. y. z + x′. y. z′
(vii) x. y. z + x′. y. z + x. y′. z + x′. y. z′ + x ′ . y. z ′+ x ⋅ y′⋅ z ′ + x ′⋅ y′⋅z′
(viii) x. y. z′ + x. y′. z′
8. (i) ( x + y′ + z )( x + y′ + z′ )( x + y + z′ )( x′ + y + z′ )( x′ + y + z )( x′ + y′ + z )( x′ + y′ + z′ )
(ii) ( x + z )( x + z′ )( x′ + z ) (iii) ( x′ + y′ )]
9. (i) ( x + y + z )( x + y + z′ )( x + y′ + z )( x + y′ + z′ )
(ii) ( x + y + z )( x + y + z′ )( x + y′ + z ) ( x′ + y + z )( x + y′ + z′ )( x′ + y′ + z )
(iii) ( x + y + z )( x′ + y + z )( x + y + z′ )( x′ + y′ + z )( x′ + y′ + z′ )
(iv) ( x + y + z )( x + y′ + z )( x + y + z′ )( x′ + y′ + z )( x′ + y + z′ )( x′ + y′ + z′ )
(v) ( x + y + z )( x + y + z′ )( x′ + y + z )( x′ + y + z′ )( x + y′ + z )( x + y′ + z′ )( x′ + y′ + z )( x′ + y′ + z′ )
Boolean Algebra 341

10. (i) ( x + y′ ) (ii) ( x + y + z )( x ′ + y′ + z )( x ′ + y′+ z′ )


11. (i) xyz + xyz′ (ii) xy + xy′+ x′ y
(iii) xyz + xy′ z + xyz′ + xy′ z′ (iv) x′ yz + x′ yz′ + x′ y′ z + x′ y′ z′ + x y z′
(v) xyz + xyz′ + xy′ z + xy′ z′+ x′ yz (vi) xyz + xy′ z
(vii) xy′ z + xy′ z′ + x′ y z′ (viii) xyz′ + xy′ z′
(ix) xy′ z + xy′ z′+ x′ y′ z + x′ y′ z + xyz′ + x′ yz′ + x′ y′ z′
(x) x′ y′ z′

7.8 Minimization of Boolean Functions


Karnaugh map (or map method)

7.8.1 Karnaugh Maps


The Karnaugh map is a pictorial representation of truth table of the Boolean functions . This method is easy
to use when Boolean function has six or fewer variables . Since function of one variable can be simplified
easily. We illustrate the method when number of variables in a function is 2,3 and 4.

(i) Case of Two Variables: We consider the case when the Boolean function f is of two variables x and y. We
have constructed a 2 × 2 matrix of square with each square containing one possible input combination of
variable x and y.

The Karnaugh map of the function is the 2 × 2 matrix obtained by placing 0’s and 1’s in the square according
to whether the functional value is 0 or 1 for the input combination associated with square. Let f = xy + x′y
be Boolean function is represented by the Karnaugh map in Fig. 7.1.

x x' x x'

y xy x 'y y 1 1

y' x y' x' y' y' 0 0

Fig. 7.1

Now consider the method to obtain minimal form of the function by using Karnaugh map. The application
of the Boolean law xy + x′y = x, when seen in the context of a Karnaugh map, because the replacement of
two adjacent squares containing 1’s by a rectangle containing two squares. The absorption law x + xy = x
has its counterpart on a Karnaugh map as well. It is simply the group of adjacent squares into the largest
possible rectangle of such squares and we will use the largest rectangle instead of individual squares. To
find minimal form of the function we first consider all largest rectangles composed of the adjacent squares
with 1’s in them. From the set of these largest rectangles, the minimum number of rectangles are taken
such that every square with 1’s is part of at least one such rectangle.
342 Discrete Mathematical Structures

Example 51: Using the Karnaugh map method to find a minimal DN form of the following functions

(a) f ( x, y ) = xy + xy′ (b) f ( x, y ) = xy + x′y + x′y′ (c) f ( x, y ) = xy + x′y′

Solution: (a) We first represent f ( x, y ) by a Karnaugh map. The Karnaugh x x'


map representation of f ( x, y ) = xy + xy′ is shown in Fig. 7.2. y 1 0

We have represented two adjacent squares with 1's in them by a


y' 1 0
rectangle this rectangle represents x. Hence.
Fig. 7.2
f ( x, y ) = x

(b) We have f ( x, y ) = xy + x′y + x′y′ x x'

The Karnaugh map is represented in Fig. 7.3. y 1 1

The function f ( x, y ) contains two pairs of adjacent squares with 1 y' 0 1


which includes all the squares of f ( x, y ) which contain 1. Hence
Fig. 7.3
f ( x, y ) = y + x′ = x′ + y is its minimal form.

(c) We have the function f ( x, y ) = xy + x′y′

The Karnaugh map is represented in Fig. 7.4.

Thus, f ( x, y ) = xy + x′y′ is the minimal form.

Fig. 7.4

(ii) Case of Three Variables: The Karnaugh map corresponding to xy x y' x' y' x' y
Boolean function f ( x, y, z ) is as in (a) part of Example 51. z
Each square represents the minterm corresponding to the column and row
z'
intersecting in that square. In order that every pair of adjacent products in
figure are geometrically adjacent the right and left edges must be Fig. 7.5
identified. By a basic rectangle in Karnaugh map three variables, we mean
a square, two adjacent squares or four squares which form a 1 × 4 of 2 × 2 rectangle.

Suppose that the Boolean function f ( x, y, z ) has been represented in Karnaugh map by placing 0's and 1's in
the appropriate squares.

Example 52: Find using Karnaugh maps a minimal form for each of the following Boolean functions.
(a) f ( x, y, z ) = xyz + xyz′ + x′yz′ + x′y′z′ (b) f ( x, y, z ) = xyz + xyz′ + xy′z + x′yz + x′y′z′

(c) f ( x, y, z ) = xyz + xyz′ + x′yz′ + x′y′z′ + x′ y′z


Boolean Algebra 343

xy x y' x' y' x' y


Solution: (a) The Karnaugh map, corresponding to the given function
is given in Fig. 7.6. z 1 0 1 0
From the Karnaugh map, we see that f ( x, y, z ) has three maximal basic
rectangles containing squares with 1 which are shown by rectangles. z' 1 0 0 0
Observe the squares corresponding to xyz′ and x′yz′ are adjacent. Thus
the symbols are left open to signify that they join in one rectangle. The Fig. 7.6
resulting minimal Boolean function is xy + yz′ + x′y′z .
(b) The Karnaugh map corresponding to the function
f = xyz + xyz′ + xy′z + x′yz + x′y′z
is given in Fig. 7.7 which has five squares with 1’s in them
corresponding to the five minterms of f.
From the Karnaugh map, we see that f ( x, y, z ) has two maximal basic
rectangles containing all squares with 1, which are shown by Fig. 7.7
rectangles. One of the maximal rectangle is the two adjacent squares
which represents xy and the other is the 1 × 4 square which represents z. Both are needed to cover all the
squares with 1. So the minimal form of f ( x, y, z ) is given by
f ( x, y, z ) = xy + z
(c) The Karnaugh map corresponding to the function f ( x, y, z ) = xyz + xyz′ + x′yz′ + x′y′z′ + x′y′z is given by
xy x y' x' y' x' y

z 1 0 1 0

z' 1 0 1 1

Fig. 7.8
Thus f ( x, y, z ) has two minimal forms.
f ( x, y, z ) = xy + x′y′ + x′z′ and f ( x. y. z ) = xy + x′y′ + y z′
(iii) Case of Four Variables: The Karnaugh map corresponding to xy x y' x' y' x' y
Boolean function f ( x, y, z, w ) with four variables x, y, z and w. Each of zw
the 16 squares corresponding to one of the 16 minterms with four
zw'
variables xyzw, xyzw′K
z'w'
as indicated by the labels of the row and column of the square.
z'w
Now we consider the first and last column to be adjacent and the first
Fig. 7.9
and last rows to be adjacent. both by wrap around. A basic rectangle in
a four variable Karnaugh map is a square, two adjacent squares, four squares which form 1 × 4 or 2 × 2
rectangle or eight squares which form a 2 × 4 rectangle. The minimization method is same as three
variables functions.

Example 53: Use Karnaugh maps to find a minimal form for the following Boolean functions.
(a) f ( x, y, z, w ) = x′yzw + xy′zw′ + x′y′zw′ + xyzw′ + xy′z′w′
(b) f ( x, y, z, w ) = xy′ + xyz + x′y′z′ + x′yzw′
344 Discrete Mathematical Structures

Solution: (a) The Karnaugh map corresponding (a) is as


xy x y' x' y' x' y

zw 0 0 0 1

zw' 0 1 1 0

z'w' 1 1 0 0

z'w 0 0 0 0

Fig. 7.10

This has five squares with 1’s in them corresponding to the five min-terms of f. A minimal cover of all 1's of
the map consists of the three maximal rectangles as f ( x, y, z, w ) = y′z w′ + x z′w′ + x′y zw.
xy x y' x' y' x' y
(b) The Karnaugh map corresponding to given function (See Fig. 7.11).
zw 1 1
The minimum number of maximal basic rectangles to cover all 1's of the
map is 3. Thus the minimal form is f ( x, y, z ) = xz + y′z′ + yzw′ zw' 1 1 1
observe that the upper left 2 × 2 rectangle represents xz while the other
z'w' 1 1
2 × 2 rectangle represents y′z′.
z'w 1 1

Fig. 7.11

Example 54: Use a Karnaugh map to find a minimal form of the function xy x y' x' y' x' y
f ( x, y, z, w )= xyzw + xyzw′ + xy′zw′ + x′y′zw + x′y′zw′
zw 1 0 1 0
Solution: The Karnaugh map corresponding to given function (See
Fig. 7.12) zw' 1 1 1 0
Hence we obtain two minimal forms,
z'w' 0 0 0 0
f ( x, y, z, w ) = xyz + x′y′z + xzw′

and f ( x, y, z, w ) = xyz + x′y′z + y′zw′ z'w 0 0 0 0

Fig. 7.12

Example 55: Simplify the following Boolean expressions by using map method and show circuit diagrams for
original expression and reduced expression:
(a) x′y + xy′ + xy (b) x′yz + x′yz′ + x′y′z + xy′z
y
Solution: (a) Let F = x′y + xy′ + xy′ ...(1) x 0 1

Using K map this equation can be reduced as shown in Fig. 7.13. 0 1


0
This K map contain two pairs of 1's that are horizontally and vertically
adjacent and each pair is reducing a variable.
Thus, the reduce expression is f = x + y 1 1 1

Fig. 7.13
Boolean Algebra 345

(b) F = x′yz + x′yz + x′y′z + xy′z

Using K map method this equation can be reduced as shown in Fig. 7.14.

y'z
x 00 01 11 10

0 1 1 1
0

1 0 1 0 0

Fig. 7.14
This K map contain three pairs of 1's the horizontally and vertically adjacent and each pair is reducing a
variable. Thus the reduce expression is F = x′z + x′y + y′z

7.8.2 Representation of Logical Expressions Using Minterms and Maxterms


We can represent the logical expression using the minterm and maxterms as follows:

Y = A B C + A B C + A B C = given logic expression


(i) 123 123 123
m7 m3 m4 ← corresponding minterms

∴ Y = m7 + m3 + m4 = Σ m (3, 4, 7 )
This is other way of representation, where Σ denotes sum of products

(ii) Y = ( A + B + C ). ( A + B + C )( A + B + C ) = given logic expression


14 4244 3 14 4244 3 14 4244 3
M2 M0 M6 ← corresponding minterms

∴ Y = M2 M0 M6

∴ Y = π M (0, 2, 6)
This is other way of representation, where π denotes product of sums.

7.8.3 Fundamental Product


A literal or product of two or more literals in which no two literals involve the same variable is called a
fundamental product.

For example x1 , x′2, x′3 , x y′ are fundamental products.

Example 56: Write the following Boolean expressions in an equivalent sum of canonical form in three
variables x1 , x 2 and x 3 .

(i) x1 ∗ x 2 or x1 . x 2 [U.P.T.U. (B. Tech.) 2006, 2007]

(ii) x1 ( x′2 x 3 )′ [PTU (B.E.) Punjab 2005, 2008]

(iii) x1 + x 2 or x1 ⊕ x 2 [U.P.T.U. (B. Tech.) 2006, 2007]


346 Discrete Mathematical Structures

Solution: (i) x1 . x 2 = x1 . x 2 . 1
= x1 . x 2 . ( x 3 + x′3 ) [ x 3 + x′3 = 1]
= x1 x 2 x 3 + x1 x 2 x′3
= M 6 + M7
∴ x1 . x 2 = M 6 + M 7
(ii) x1 ( x′2 x 3 )′ = x1 [( x′2 )′ + x′3 ]
= x1 [ x 2 + x′3 ] [( x′2 )′ = x 2]
= x1 x 2 + x1 x′3
= x1 x 2 . 1 + x1 x′3 . 1
= x1 x 2 ( x 3 + x′3 ) + x1 x′3 ( x 2 + x′2 )
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x 2 x′3 + x1 x′2 x′3
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x′2 x′3 [ x1 x 2 x′3 + x1 x 2 x′3 = x1 x 2 x′3 ]
= m7 + m6 + m4
= m4 + m6 + m7
= Σ 4, 6, 7 ≤ M (4, 6, 7 )
x1 + x 2 = ( x1 + x 2 ). 1
= ( x1 + x 2 ). ( x 3 + x′3 ) [ x 3 + x′3 = 1]
= x1 x 3 + x1 x′3 + x 2 x 3 + x 2 x′3
= ( x1 x 3 + x1 x′3 ). 1 + ( x 2 x 3 + x 2 x′3 ). 1
= ( x1 x 3 + x1 x′3 ). ( x 2 + x′2 ) + ( x 2 x 3 + x 2 x′3 ). ( x1 + x1′ )
= x1 x 3 x 2 + x1 x 3 x′2 + x1 x′3 x 2 + x1 x′3 x′2 + x 2 x 3 x1 + x 2 x 3 x1′ + x 2 x′3 x1 + x 2 x′3 x1′
= x1 x 2 x 3 + x1 x′2 x 3 + x1 x 2 x′3 + x1 x′2 x′3 + x1′ x 2 x 3 + x1′ x 2 x′3

Example 57: Write the following Boolean function in m-notation


(i) f ( x1 , x 2, x 3 ) = x1′ x 2 x 3 + x1 x′2 x 3 + x1 x 2 x′3 + x1 x 2 x 3 + x1 x′2 x′3 [M.K.U. (B.E.) 2005, 2007]
(ii) f ( x1 , x 2, x 3 , x 4 ) = x1′ ( x′2 + x 4 ) + x1 x 3 x′4 [Osmania (B.E.) Andhra 2008]
(iii) f ( x1 , x 2, x 3 ) = ( x1 + x 2 + x 3 )( x1 + x 2 + x′3 )( x1 + x′2 x 3 ) [U.P.T.U. (B.Tech.) 2004]
Solution: (i) f = x1′ x 2 x 3 + x1 x′2 x 3 + x1 x 2 x′3 + x1 x 2 x 3 + x1 x′2 x′3 .
= min 3 + min 5 + min 6 + min7 + min 4
= min 3 + min 4 + min 5 + min 6 + min7
= Σ m (3, 4, 5, 6, 7 )
(ii) f = x1′ ( x′2 + x 4 ) + x1 x 3 x′4
= x1′ x′2 + x1′ x1′ x 4 + x1 x 3 x′4
= x1 x′2 ( x 3 + x′3 )( x 4 + x′4 ) + x1 ( x 2 x′2 )( x 3 + x′3 ) x 4 + x1 ( x 2 + x′2 ) x 3 x′4
= x1′ x′2 x 3 x 4 + x1′ x′2 x′3 x 4 + x1′ x′2 x 3 x′4 + x1′ x′2 x′3 x′4 + x1 x 2 x 3 x′4 + x1 x′2 x 3 x′4
= m0 + m1 + m3 + m5 + m7 + m10 + m14
= Σ m (0, 1, 3, 5, 7, 10, 14)
(iii) f = ( x1 + x 2 + x 3 )( x1 + x 2 + x′3 )( x1 + x′2 x 3 )
= max ( x 0 ) max ( x1 ) max ( x 2 )
= ∏ M (0, 1, 2)
Boolean Algebra 347

7.8.4 Alternate Way of Representation


The alternate way of representing the sum of products expression is explain with the help of example.

Let us consider the Boolean function

X = A′ B′ C ′ + A B C ′ + A′ B C

This function can be represent as

X ( A, B, C ) = Σ (0, 6, 3) or Σ m (0, 6, 3)

where m = minterms
The Minterms Corresponding to square 0, 6, 3 of the Karnaugh map are present in the Boolean
function and marked by 1. Other squares are marked by 0. It is explain as

AB

C 00 01 11 10

0 1 0 1 0

1 0 1 0 0

Fig. 7.15

7.8.5 The Use of Karnaugh Map in Boolean Algebra


[R.G.P.V. (B.E.) Bhopal 2005, 2008; Rohtak (B.E.) 2009]

This widely used method of representation and simplification of Boolean functions is popular among
electrical engineers and is suitable for hand computations and is most efficient for function involving upto
4-5 variables. A Karnaugh map is a plane area subdivided into 2n equal cells each representing a point B 2n
for function of n variables. The cells corresponding to the arguments for which the function has the value 1
are shaded or darkened or a, 1 is written on it.

Example 58: Use Karnaugh map representation to find minimal sum of products expression for the following
Boolean function:
(i) F ( A, B, C , D ) = Σ (0, 2, 7, 8, 10, 15) [U.P.T.U. (B.Tech.) 2009]
(ii) F ( A, B, C , D ) = Σ (0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 11) [U.P.T.U. (B.Tech.) 2003]
(iii) F ( A, B, C ) = Σ (0, 1, 2, 4, 5, 6) [U.P.T.U. (B.Tech.) 2003]
(iv) F ( A, B, C ) = Σ (0, 2, 4) [R.G.P.V. (B.E.) Bhopal 2009]
(v) F ( A, B, C ) = Σ (0, 2, 3, 4, 7 ) [R.G.P.V. (B.E.) Raipur 2008]
(vi) F ( A, B, C ) = Σ (0, 4, 7 ) [Rohtak (B.E.) 2007]
(vii) F ( A, B, C ) = Σ (1, 2, 5, 6) [I.G.N.O.U. 2007]
348 Discrete Mathematical Structures

(viii) F ( A, B, C ) = Σ (1, 9, 11, 13, 15) [I.G.N.O.U. (M.C.A.) 2008]

(ix) F ( A, B, C , D ) = Σ (0, 1, 2, 3, 5, 7, 8, 10, 14) [R.G.P.V. (B.E.) Bhopal 2006]

(x) F ( A, B, C , D ) = Σ (0, 1, 3, 5, 7, 9, 11, 14, 15) [I.G.N.O.U. 2009]

(xi) F ( A, B, C , D ) = Σ (0, 2, 4, 6) R.G.P.V. (B.E.) Raipur 2004, 2007, 2009]

(xii) F ( A, B, C , D ) = Σ (0, 2, 4, 5, 6, 7, 8, 10, 13, 15) [Osmania (B.E.) 2004, 2006, 2007]

(xiii) F ( A, B, C , D ) = Σ (0, 2, 4, 5, 6, 8, 9, 10, 13) [U.P.T.U. (M.C.A.) 2005]

(xiv) F ( A, B, C , D ) = Σ (0, 2, 8, 9, 10, 11, 14, 15) [Kurukshetra (B.E.) 2004, 2008]

(xv) F ( A, B, C , D ) = Σ (5, 6, 7, 13, 14, 15) [Rohtak (B.E.) 2007, 2009]

(xvi) F ( A, B, C , D ) = Σ (4, 5, 6, 7, 13, 15) [U.P.T.U. 2004, 2008]

Solution: (i) F ( A, B, C , D ) = Σ (0, 2, 7, 8, 10, 15)

The minterms function F are

M 0 = 0000 = A B C D

M 2 = 0010 = A B C D

M 7 = 0111 = A B C D

M 8 = 1000 = A B C D

M10 = 1010 = A B C D

M15 = 1111 = ABCD


Karnaugh map of the given function is shown in fig. 7.16

CD

AB C D [ 0 0] C D [ 0 1] CD [11] CD [10]

1 1
[ 0 0] A B
0 1 3 2

[ 0 1] A B 1
6
4 5 7

[11] A B 1
12 13 15 14

[10] A B 1
1 8 9 11 10

Fig. 7.16
Boolean Algebra 349

The Karnaugh map has one pair, and one quad. There are no over lapping.

Consider the pair m7 + m15 . A is the only variable which changes its form, so A is to be removed

The reduced expression for the pair m7 + m15 is BCD quad is m0 + m3 + m8 + m10 in the map moving
horizontally we observe that the variable C change its form and then moving vertically. We get A changes
its form. Therefore A and C are removed. The reduced expression for quad
m0 + m3 + m8 + m10 is B D
Then F (A B C D) = B C D + B D
(ii) F ( A, B, C , D ) = Σ (0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 11)
The looping of one octet and two quad as shown in map. The looping octet will give the minterm as A′ . The
looping quad formed by 0, 1, 8, 9 produces the minterm as B′ C ′ and the quad formed by 1, 3, 9, 11 gives the
minterm as B′ D. Hence simplified function is
F = A′ + B C ′ + B′ D
Karnaugh map of the given function is shown in fig. 7.17

AB

CD 00 01 11 10

00 1 1 1

01 1 1 1

11 1 1 1

10 1 1

Fig. 7.17

(iii) F ( A, B, C ) = Σ (0, 1, 2, 4, 5, 6)
Karnaugh map of given function is shown in fig. 7.18

BC

A 00 01 11 10

0 1 3 2
0
1 1 1

4 5 7 6
1
1 1 1

Fig.7.18
Fig. 7.18

Hence, the simplifying function is F ( A, B, C ) = B + C


350 Discrete Mathematical Structures

(iv) F ( A, B, C ) = Σ (0, 2, 4)

Karnaugh map of given function is shown in fig. 7.19

BC

A BC BC BC BC

1 3 2
A
1 1 1

1 5 7 6
A
1

Fig. 7.19

Hence, the simplified function is

F ( A, B, C ) = B C + A B C

(v) F ( A, B, C ) = Σ (0, 2, 3, 4, 7 )

Karnaugh map of given function is shown in fig. 7.20

BC

A 00 01 11 10

0 1 3 2
0
1 1 1

4 5 7 6
1
1 1

Fig. 7.20

Hence, the simplified function is

F ( A, B, C ) = B C + B C + A B
Boolean Algebra 351

(vi) F ( A, B, C ) = Σ (0, 4, 7 )
Karnaugh map of given function is shown in fig. 7.21

BC

A BC BC BC BC

0 1 3 2
A
1 1

4 5 7 6
A
1 1 1

Fig. 7.21

Hence, the simplified function is


F ( A, B, C ) = A B C + B C
(vii) F ( A, B, C ) = Σ (1, 2, 5, 6)
Karnaugh map of given function is shown in fig. 7.22

BC

A 00 01 11 10

0 1 3 2
0
1 1

4 5 7 6
1
1 1

Fig. 7.22
Hence, the simplified function is
F ( A, B, C ) = B C + B C
352 Discrete Mathematical Structures

(viii) F ( A, B, C , D ) = Σ (1, 9, 11, 13, 15)


Karnaugh map of given function is shown in fig. 7.23

CD

AB 00 01 11 10

0 1 3 2
00
1

4 5 7 6
01

12 13 15 14
11
1 1

8 9 11 10
10
1 1

Fig. 7.23

Hence, the simplified function is


F ( A, B, C , D ) = A D + B C D
(ix) F ( A, B, C , D ) = Σ (0, 1, 2, 3, 5, 7, 8, 10, 14)
Karnaugh map of given function is shown in fig. 7.24

CD

AB 00 01 11 10

0 1 3 2
00 1 1 1 1

4 5 7 6
01 1 1

11 12 13 15 14

8 9 11 10
10 1 1

Fig. 7.24
Boolean Algebra 353

Hence, the simplified function is


F ( A, B, C , D ) = A D + A B + B D + A C D
(x) F ( A, B, C , D ) = Σ (0, 1, 3, 5, 7, 9, 11, 14, 15)
Karnaugh map of given function is shown in fig. 7.25

CD

AB 00 01 11 10

0 1 3 2
00
1 1 1

4 5 7 6
01 1 1

12 13 15 14
11
1 1

8 9 11 10
10 1 1

Fig. 7.25
Hence simplifying function is
F ( A, B, C , D ) = A D + C D + A B C + A B D + A B C
(xi) F ( A, B, C , D ) = Σ (0, 2, 4, 6)
Karnaugh map of given function is shown in fig. 7.26
CD

AB C D C D CD CD

0 1 3 2
AB 1 0 0 1

4 5 7 6
AB 1 0 0 1

12 13 15 14
AB 0 0 0 0

8 9 11 10
AB 0 0 0 0

Fig. 7.26
Hence, simplified function is
F ( A, B, C , D ) = A D
354 Discrete Mathematical Structures

(xii) F ( A, B, C , D ) = Σ (0, 2, 4, 5, 6, 7, 8, 10, 13, 15)


Karnaugh map of the given function is shown in fig. 7.27

CD

AB 00 01 11 10

00 1 1

01 1 1 1 1

11 1 1

10 1

Fig. 7.27
Hence, simplified function is
F ( A, B, C , D ) = B D + A B + B D
(xiii) F ( A, B, C , D ) = Σ (0, 2, 4, 5, 6, 8, 9, 10, 13)
Karnaugh map of the given function is shown in fig. 7.28

CD

AB 00 01 11 10

00 1 1

01 1 1 1

11 1

10 1 1 1

Fig. 7.28

Hence, simplified function = F ( A, B, C , D ) = A B + B D + B C D + A C D


Boolean Algebra 355

(xiv) F ( A, B, C , D ) = Σ (0, 2, 8, 9, 10, 11, 14, 15)


Karnaugh map of the given function is shown in fig. 7.29
CD

AB 00 01 11 0

0 1 3 2
00
1 1

4 5 7 6
01

12 13 15 14
11
1 1

8 9 11 10
10 1 1 1 1

Fig. 7.29

Hence, the simplified function is


F =B D + A B + AC
(xv) F ( A, B, C , D ) = Σ (5, 6, 7, 13, 14, 15)
Karnaugh map of the given function is shown in fig. 7.30
CD

AB 00 01 11 10

0 1 3 2
00

4 5 7 6
01 1 1 1

12 13 15 14
11
1 1 1

8 9 11 10
10

Fig. 7.30
356 Discrete Mathematical Structures

Hence, the simplified function is


F =B D + BC
(xvi) F ( A, B, C , D ) = Σ (4, 5, 6, 7, 13, 15)
Karnaugh map of the given function is shown in fig. 7.31

CD

AB C D C D CD CD

0 1 3 2
AB
0 0 0 0

4 5 7 6
AB 1 1 1 1

12 13 15 14
AB
0 1 1 0

8 9 11 10
AB 0 0 0 0

Fig. 7.31

Hence, simplified function is


F ( A, B, C , D ) = A B + B D

7.8.6 Minterms and Maxterms for Three Variables


Variables Minterms Maxterms

A B C mi Mi

0 0 0 A B C = m0 A + B + C = M0

0 0 1 A B C = m1 A + B + C = M1

0 1 0 A B C = m2 A + B + C = M2

0 1 1 A B C = m3 A + B + C = M3

1 0 0 A B C = m4 A + B + C = M4

1 0 1 A B C = m5 A + B + C = M5

1 1 0 A B C = m6 A + B + C = M6

1 1 1 A B C = m7 A + B + C = M7
Boolean Algebra 357

Each minterm is represented by mi, where i = 1, 2, 3 K 2n − 1 and each maxterm is represented by

M i, where i = 1, 2, 3 K 2n − 1

Minterm = A B C corresponding to A B C = 011


Maxterm = ( A + B + C ) corresponding to ABC = 011
Minterms and Maxterms for two Variables

Variables/literals Minterms ( mi ) Maxterms M i

A B m1 M1

0 0 A B = m0 A + B = M0

0 1 A B = m1 A + B = m1

1 0 A B = m2 A + B = M2

1 1 A B = m3 A + B = M3

Example 59: f = Σ m (0, 1, 2, 5) is a three input function, transform into its canonical sum of products form.
Solution: Let x1 , x 2 and x 3 denote the three inputs
Then, m0 = 000 = x1′ x′2 x′3

m1 = 001 = x1′ x′2 x 3

m2 = 010 = x1′ x 2 x′3

m3 = 101 = x1 x′2 x 3

∴ Canonical sum of products form of the expression is

f = x1′ x′2 x′3 + x1′ x′2 x 3 + x1′ x 2 x′3 + x1 x′2 x′3

Example 60: Obtain the three variable product of sums canonical form of the Boolean expression

x1 . x 2 or x1 ∗ x 2 [U.P.T.U. (B.Tech.) 2006]

Solution: Let x 3 denote the variable then


x1 . x 2 = ( x1 + x 2 x′2 )( x 2 + x1 x1′ )

= ( x1 + x 2 )( x1 + x′2 )( x 2 + x1 )( x 2 + x1′ )

= ( x1 + x 2 )( x1 + x′2 )( x 2 + x1′ ) [( x1 + x 2 )( x1 + x 2 ) = ( x1 + x 2 )]

= ( x1 + x 2 + x 3 x′3 )( x1 + x′2 + x 3 x′3 )( x1′ + x 2 + x 3 x′3 )

= ( x1 + x 2 + x 3 )( x1 + x 2 + x′3 )( x1 + x′2 + x 3 )( x1 + x′2 + x′3 ) ( x1′ + x 2 + x 3 )( x1′ + x 2 + x′3 )


358 Discrete Mathematical Structures

Example 61: Draw a Karnaugh map for the table

A B C Z

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 0

[U.P.T.U. (B.Tech.) 2004]

Solution: First we draw the blank map of fig. Output 1 appears ABC inputs of 000, 001, 010 and 110. The
fundamental products for these conditions are A B C , A B C , A B C and A B C . Enter 1 s for these products
on the Karnaugh map Fig. Finally enter 0 s in the remaining spaces shown in fig. 7.32

AB AB

C 00 01 11 10 C 00 01 11 10

0 0 1 1 1

1 1 1

(a) (b)

AB

C 00 01 11 10

0 1 1 1 0

1 1 0 0 0

(c)
This is the Karnaugh map for Given Table

Fig. 7.32
Boolean Algebra 359

Example 62: Use the Karnaugh map method to find a minimal DN form (sum-of-products form) of the
following functions.
(i) Y = AB + AB′ [P.T.U. (Punjab) 2009]
(ii) Y = AB + A′ B + A′ B′ [R.G.P.V. (B.E.) (Raipur) 2008]
(iii) Y = AB + A′ B′ [R.G.P.V. (B.E.) Bhopal 2009]

Solution: The representation of Y = AB + AB′ by Karnaugh map is as follows

A
B A A′

1 0
B

1 0
B′

Fig. 7.33
We have represented two adjacent squares with 1s in them by rectangle. This rectangle represents A.
Hence, Y=A
(ii) The representation of Y = AB + A′ B + A′ B′ by Karnaugh map is as follows

B A A′

B 1 1

B′ 0 1

Fig. 7.34
The function Y contains two pairs of adjacent squares with 1 which includes all the squares of Y which
contain 1. The horizontal pair (rectangle) represents Y with vertical pair (rectangle) represents A.
Hence, Y = B + A′ = A′ + B is its minimal form.
(iii) The representation of Y = AB + A′ B′ by Karnaugh map is as follows.

A
B A A′

B 1 0

B′ 0 1

Fig 7.35

The function Y consists of two rectangles as shown in the figure.


Hence Y = AB + A′ B′ is the minimal form.
360 Discrete Mathematical Structures

Example 63: Find using Karnaugh maps a minimal form of each of the following Boolean functions
(i) Y = ABC + ABC ′ + A′ BC ′ + A′ B′ C ′ R.G.P.V. (Bhopal) 2006, 2009]
(ii) Y = ABC + ABC ′ + AB′ C + A′ B′ C [U.P.P.V. (B.Tech.) 2004]
(iii) Y = ABC + ABC ′ + A′ BC ′ + A′ B′ C ′ + A′ B′ C [Kurukshetra (B.E.) 2005, 2008]

Solution: (i) The representation of Y = ABC + ABC ′ + A′ BC ′ + A′ B′ C ′


by Karnaugh map is as follows

AB

C AB AB′ A′ B′ A′ B

C 1 0 1 0

C′ 1 0 0 1

Fig. 7.36

We see from Karnaugh map that Y has three maximal basic rectangles containing squares with 1 which are
shown by rectangles. The squares corresponding to ABC′ and A′ BC ′ are adjacent. Thus the symbols are left
open ended to signify that they join in one rectangle.
Hence, the minimal Boolean function is Y = AB + BC ′ + A′ B′ C

(ii) The representation of Y = AB + ABC ′ + AB′ C + A′ B′ C


by Karnaugh map is as follows which has five squares with 1s in them corresponding to the five minterms
of Y

AB

C AB AB′ A′ B′ A′ B

C 1 1 1 1

C′ 1 0 0 0

Fig. 7.37

From the Karnaugh map we find that Y has two maximal basic rectangles containing all the squares with
1s, which are shown by rectangles. One of the maximal baisc rectangle in the two adjacent squares which
represents A B and the other is (1 × 4) square which represents C. Both are needed to cover all the squares
with 1. So, the minimal form of Y is given by

A = AB + C
Boolean Algebra 361

(iii) The representation of Y = ABC + ABC ′ + A′ BC ′ + A′ B′ C ′ + A′ B′ C


by Karnaugh map is as follows

AB

C AB AB′ A′ B′ A′ B

C 1 0 1 0

C′ 1 0 1 1

Fig. 7.38

which has five squares with 1‘s’ in them corresponding to the five minterms of Y. It has four maximal basic
rectangles to cover all squares with 1‘s’ in them. Hence we include basic rectangles which represent AB and
A′ B′ and only one of two rectangles which correspond to A′ C ′ and BC′ . Thus Y has two minimal forms
Y = AB + A′ B′ + A′ C ′ and Y = AB + A′ B′ + BC ′

Example 64: Draw a Karnaugh map to represent the following Boolean function

Y = A′ B′ C ′ D + ACD + BD ′ + AB + BC

Solution:
CD

AB C′ D ′ C′ D CD C D′
00 01 11 10

A′ B′ 00 1
0 1 3 2

A′ B 01 1 1 1

4 5 7 6

AB 11 1 1 1 1
12 13 16 16

AB′ 10 1
8 9 11 10

Fig. 7.39
362 Discrete Mathematical Structures

The first term represents a four variable term, from which it is clear that its minterm will be in square 1. It
has therefore been assigned to square 1. The term ACD represents a pair. Square 11 and 15 satisfy the
requirement of its position. There are three quartets, each of which yield a product of two variables. The
term BD ′ points, for which the proper squares are 12, 13, 14 and 15. The last quartet yields the product BC.
Its proper position is in squares 6, 7, 14 and 15.

Example 65: Use a Karnaugh map to find a minimal sum for


E = y′ t ′ + y′ z′ t + x′ y′ zt + yzt ′
[U.P.T.U. (B.Tech.) 2005; R.G..P.V. (B.E.) Bhopal 2007; U.P.T.U. (M.C.A.) 2008]

Solution: Draw a Karnaugh map to represent the following Boolean function

E = y′ t ′ + y′ z′ t + x′ y′ zt + yzt ′

zt
xy zt z t′ z′ t ′ z′ t

xy 0 1 0 0

x y′ 0 1 1 1

x′ y′ 1 1 1 1

x′ y 0 1 0 0

Fig. 7.40

which represent nine squares with 1‘s’ in them corresponding to the four minterms of E. To cover all
squares with 1‘s’ in them.
Thus E has three mimal forms
E = x′ y′ + z t ′ + y′ z′
Boolean Algebra 363

1. Simplify the following Boolean expressions by using map method and show circuit diagram of
original expression and reduced expression
(a) A′BC + AB′C ′ + ABC + ABC ′ (b) A′C + A′B + AB′C + BC
2. Simplify the following Boolean expressions by using only laws of Boolean and then construct the
circuit diagrams of reduced Boolean expression
(a) AB′ + C ′D′ (b) (BC ′ + A′D )( AB′+ CD′ ) (c) (BC + AC ′ + AB + BCD )
3. Find the minimal form of the Boolean function of four variables represented by the Karnaugh map
given by
xy x y' x' y' x' y
zw 1 0 0 1

zw' 0 0 0 0

z'w' 0 0 0 0

z'w 1 0 0 1

Fig. 7.41

4. Use the Karnaugh map representation to find a minimal form each of the following functions
(a) f ( x, y ) = x′y + xy
(b) f ( x, y, z ) = xyz + xy′z + x′yz + x′y′z
(c) f ( x, y, z ) = xyz′ + xy′z′ + x′y′z′ + x′y′z + x′yz + x′yz′
(d) f = xyzw′ + xy′zw′ + xy′z′w′ + xy′z′ w + x′y′ zw′ + x′y′z′w′ + x′y′zw′
5. Draw Karnaugh map and simplify the following Boolean expressions
(i) F ( A, B, C , D ) = Σ (2, 3, 6, 7 ) (ii) F ( A, B, C ) = Σ (0, 1, 3, 4, 5)
(iii) F ( A, B, C , D ) = Σ (7, 13, 14, 15) (iv) F ( A, B, C , D ) = Σ (0, 2, 6, 8, 10, 12, 14, 15)
(v) F ( A, B, C ) = ∏ (0, 1, 4, 5) (vi) F ( A, B, C , D ) = ∏ (1, 3, 5, 7, 13, 15)
6. Define Boolean algebra and give a list of its important properties. Give some examples of Boolean
algebra

[Hint: B2 = { 0, 1}, D (6), D (10), D (15), D (30) are Boolean algebra]

7. In Boolean algebra, for x1 , x 2 and x 3 ∈ B, find whether the following expressions are equivalent or not
(a) ( x1 ∧ x 2 ) ∨ ( x1 ∧ x 3 ) (b) ( x1 ∨ x 2 ) ∧ ( x1′ ∨ x 3 ) ∧ ( x 2 ∨ x 3 ) (c) ( x1 ∨ x 2 ) ∧ ( x1′ ∨ x 3 )

8. State the dual of a ∨ (b ∨ a ∧ b) = 1.


364 Discrete Mathematical Structures

1. (a) BC + AC ′ (b) C + A′B


2. (a) AB′ + C ′D′ (b) 0 (c) BC + AB + AC ′
3. f = yw
4. (a) f =y (b) f = z (c) f = z′ + x′z (d) f = xzw′ + xy′z′ + x′y′z + x′z′w
5. (i) B (ii) B′ + A′ C (iii) A B D + A BC + BC D
(iv) D′ + A BC (v) B (vi) B C ′ + B′ D + A B′ C
7. (i) yes (ii) yes (iii) yes
8. a ∧ (b ∧ a ∨ b) = 0

Multiple Choice Questions


1. a ∧ (a′ ∨ b) is
(a) a∨ b (b) a∧ b (c) a∨ a (d) b∧b
2. Let (R , + , . ) be Boolean ring then R is commutative and 2a is
(a) 0 (b) b (c) 1 (d) none of these

3. The number of elements of any finite Boolean algebra is


(a) 2n (b) 2n (c) n2 (d) none of these
4. If x is any element of a Boolean algebra B, then x + x + x + x is
(a) 4x (b) 3x (c) 2x (d) x
5. The dual of a + 1 = 1 is
(a) a. 0 = 0 (b) a. 0 = 1 (c) a . a′ = 0 (d) a. a = a
6. A Boolean function is in disjunctive normal form, if it is expressed as
(a) sum of the minimal Boolean polynomials (b) product of minimal Boolean functions
(c) in both forms (d) none of these
7. Disjunctive normal form of a + a′ b is
(a) a . b′ + a′ b (b) a b + a′ b (c) a b + a b′ + a′ b (d) a b′ + a′ b + a′ b′
8. Idempotent law in Boolean algebra is
(a) (a′ )′ = a (b) a + a. b = a (c) a+ a=a (d) a+1=a
9. In Boolean algebra, which of the following statements is true for x, y ∈ B
(a) ( x y )′ = x′ + y′ (b) ( x y )′ = x′ − y′ (c) ( x y )′ = x′ y′ (d) none of these
10. A Boolean algebra cannot have
(a) 2 elements (b) 3 elements (c) 4 elements (d) 5 elements
Boolean Algebra 365

State True or False


11. Given any finite set Boolean Algebra B, there exists a set S such that B and P (S ), the Boolean ring of
subsets of S, are isomorphic as Boolean algebra.
12. Every Boolean expression is equivalent to a unique expression in disjunctive normal form.

13. The poset (D n, divisor) forms a Boolean algebra iff n cannot be written as a product of distinct
primes.

Fill in the Blank(s)


14. The simplified form of the Boolean function a + a b is ............... .
15. The graph of the Boolean algebra of order 2n is ............... .
16. The disjunctive normal form of the Boolean function f ( A, B ) = A + B is .................. .
366 Discrete Mathematical Structures

Multiple Choice Questions


1. (b) 2. (a) 3. (a) 4. (d) 5. (a) 6. (a)
7. (c) 8. (c) 9. (a) 10. (b)

State True or False


11. T 12. F 13. T

Fill in the Blank(s)


14. a 15. The n-cube 16. AB+ AB+ AB

❑❑❑
Logic Gates (Circuits) 367

8.1 Logic Gates and Circuits


Logic Circuits (also known as Logic Networks) are structures which consists of certain elementary
circuits called Logic Gates. These logic gates are also called Logic Elements. In signal processing, a
binary input is usually represented by the presence or absence of a certain voltage along a wire, called an
Input Lead. These voltages applied on different input leads are processed by logic elements (or logic
gates) and after processing the voltage appear out along a wire, called Output Lead.
Now we shall discuss the standard symbols for these logic gates (or logic elements).

8.1.1 Symbols and Description for Basic Logic Gates


We shall follow the convention that the lines entering the gate symbol from the left hand side are input
lines (i.e., input leads) and the single line on the right hand side is the output line (i.e., output lead).
There are three basic logic gates namely AND-gate, OR-gate and NOT-gate, corresponding to three basic
operations of Boolean algebra namely ‘+’, ‘ . ’ and ‘ ' ’ respectively, (described below), these are
components of a general logic circuit, called 'Black Box' represented by the symbol (the following figure
is its symbol).

Input Output

leads leads
Fig. 8.1

8.1.2 AND-Element or AND-Gate


If there are two or more inputs then the output through their AND-gate (or AND-element) is a function of
inputs and this function is obtained by the product of inputs.
a
In the Fig. 8.2, suppose a an b are two inputs then their output x x=ab
through AND-gate is given by b
x = a. b, or x = ab, or x = a ∧ b.
Fig. 8.2
368 Discrete Mathematical Structures

8.1.3 OR-Element or OR Gate


If there are two or more inputs then the output through their OR-gate (or OR-element) is a function of inputs
and this function is obtained by summing (+) the inputs.
In the following figure, suppose a and b are two inputs then their output y through the OR-gate is given by
y = a + b, or y = a ∨ b.

a
y=a+b

Fig. 8.3

8.1.4 NOT-Element of Inverter


NOT-element changes the input to the complement (' ) of it i.e. the output
through the NOT-element is the complement ( ' ) of input. z=a'
a
In the Fig. 8.4 suppose 'a' is the input then the output z through NOT-element
is given by z = a′. Fig. 8.4

The leads in the logic circuit represents voltage which are variable i.e., the voltages in the leads are not
constant. In the above diagrams the input variables have been represented by 'a' and 'b' and output variables by
x, y, z. The operation of sum, multiplication and complementation are usually called Connectives.

8.2 Combinational Circuits


The logic circuits which do not contain memory elements are called Combinational Circuits. These logic
circuits are represented by algebraic output expression. These algebraic expressions are constructed by using
absolute input variables and operation ‘+’, ‘. ’, and ‘ ' ’ are used respectively for OR-, AND-and Not-elements in
input and output in the suitable brackets.

Two combinational circuits are given below. The diagrams are self explanatory.

a
a+b

b
(a+b)(ab)'
1
a
ab (ab)'

Fig. 8.5
Logic Gates (Circuits) 369

Fig. 8.6

Remark: Note that all crossing of wires are insulated except those which are circled.

8.2.1 Two Valued Logic Circuits


Two different voltages are used in two valued logic circuits. These voltages are distinguishable by definite
methods. For convenience one voltage is called ‘0’ and other ‘1’. In this condition, the values of input and
output variables belong to the set {0, 1}.

8.2.2 Input-Output Behavior of Basic Elements (or Gates)


Here we shall consider logic gates having two input leads. A voltage 1 will appear on the output lead of the
AND-gate if and only if voltage 1 appears on both the input leads. A voltage 1 appears on the output lead of
the OR-gate when a voltage 1 appears on at least one of the input leads. The NOT-gate has one input lead
and one output lead. The voltage 0 will appear on the output lead of the NOT-gate when a voltage 1
appears on the input lead and vice-versa. These facts are well explained by the following truth tables:

a b a.b a b a+b a b
1 1 1 1 1 1 1 0
1 0 0 1 0 1 0 1
0 1 0 0 1 1
0 0 0 0 0 0
Fig. 8.7

8.3 NAND-gate and NOR-gate


There are two additional gates namely NAND-gate and NOR-gate. These are equivalent to the combinations
of above gates.

8.3.1 NAND-gate (or NAND-element)


It is equivalent to AND-gate followed by a NOT-gate.
370 Discrete Mathematical Structures

If a and b are two inputs then their output through NAND-gate is (a. b)′. See following fig. 8.8:

a b NAND
1 1 0
a
(a.b)' 1 0 1
0 1 1
b
0 0 1
Fig. 8.8 Fig. 8.9

Also the output of NAND-gate is 0 if all the inputs are 1, (see truth table).

8.3.2 NOR-gate (or NOR-element)


It is equivalent to an OR-gate followed by a NOT-gate.

If a and b are two inputs then their output through NOR-gate is (a + b)′, See the following figure 8.10.

a b NOR
1 1 0
a 1 0 0
(a+b)'
0 1 0
b 0 0 1
Fig. 8.10 Fig. 8.11

Also the output of a NOR-gate is 1 if all the inputs are 0. [See the truth tables]

The only difference between the symbolic representation of AND and NAND gates and between OR and
NOR gates is that NAND and NOR gates are each followed by a circle.

Theorem 1: Show that the set of gates {OR, NOT} is functionally complete
Or

Show that an AND gate can be replaced by a suitable interconnections of OR gate and NOT gates.
[Kurukshetra (B.E.) 2008]

Solution: Since by DeMorgan's law,


xy = ( x′ + y′ )′

therefore an AND gate can be replaced by one OR gate and three NOT gates. The logic circuit is given
below:

Fig. 8.12
Logic Gates (Circuits) 371

Theorem 2: Show that an OR gate can be replaced by a suitable interconnection of AND gates and NOT gates.
[Rohtak (B.E.) 2009]

Solution: By De Morgan's law, we have

( x + y ) = ( x′ y′ )′

Thus an OR gate can be replaced by one AND gate and three NOT gates as shown below:

x
x'
y (x'y') x+y
y'
Fig. 8.13

Example 1: Simplify the circuit as follows.

a
b

a
d

c
b

c
d
Fig. 8.14

Solution: Clearly the output of first, second, third, and fourth OR gates are a' + b, a' + d, c' + b and c' + d
respectively. Thus the inputs first (upper) AND gate are a' + b and a' + d and inputs of second (lower) AND
gate are c' + b and c' + d. Hence inputs of last AND gate are (a' + b)(a' + d ) and (c' + b)(c' + d ). Therefore, the
Boolean expression corresponding to given circuit is

f = (a' + b)(a' + d )(c' + b)(c' + d )

= (a' + bd )(c' + bd ) [by distributive law]

= a' c' + bd [by distributive law]


372 Discrete Mathematical Structures

The simplified circuit corresponding to f = a′ c' + bd is given below:

a a'

c a'c'
c'
a'c'+ba
b
d bd
Fig. 8.15

Example 2: Evaluate (a + b). (ab)′ when a = 0, b = 1.


Solution: (a + b)(ab)′ = (0 + 1)(0 .1)′ = 1. (0)′ = 1 . 1 = 1

Example 3: Evaluate (ab)(a + b)′ when a = 1, b = 0.


Solution: (ab)(a + b)′ = (1 . 0)(1 + 0)′ = 0 . (1)′ = 0 . 0 = 0

Example 4: Define a switching function. How are the operations of addition, multiplication and
complementation defined on these functions?
Solution: If B is a Boolean algebra then function B n → B defined by the output expression f (c), is called
Output Function or Switching Function of the circuit.

Now let Fn be the set of all switching function of all two valued logic circuits in n input variables and let
f , g ∈ Fn be two arbitrary switching functions.
The operation of addition, multiplication and complementation on these functions are defined as follows
(just similar for 0 and 1).
For each X 0 ∈ B n we define

( f + g )( X 0 ) = f ( X 0 ) + g( X 0 ) , ( fg )( X 0 ) = f ( X 0 ). g( X 0 ) , f ′( X 0 ) = ( f ( X 0 ))′ .
According to these definitions, the basic logic elements AND, OR and NOT for these functions are expressed
as follows:

Fig. 8.16

Theorem 3: The set Fn of all switching functions of n variables forms a Boolean algebra with respect to
operations ‘+’ . ‘ . ’ and ‘ ' ’. In other words, the following postulates hold for all f , g, h ∈ Fn .
(i) Commutativity f + g = g + f , f . g = g. f
(ii) Associativity ( f + g ) + h = f + (g + h), ( f . g ). h = f . (g. h)
(iii) Distributive Laws f (g + h) = fg + fh, f + gh = ( f + g )( f + h)
(iv) Identity Elements f + 0 = f , f .1 = f
Logic Gates (Circuits) 373

(v) Dominant Elements f + 1 = 1, f . 0 = 0


(vi) Idempotent Law f + f = f, f. f = f
(vii) Complementation f + f ′ = 1, f . f ′ = 0
(viii) De-Morgans's Law ( f + g )′ = f ′. g′, ( f . g )′ = f ′ + g′
(ix) Involution ( f ′ )′ = f
(x) Absorption Law f + fg = f , f . ( f + g ) = f
(xi) Redundancy f + f ′g = f + g, f ( f ′ + g ) = fg
(xii) Consensus fg + f ′h + gh = fg + f ′h;( f + g )( f ′ + h)(g + h) = ( f + g )( f ′ + h)
where '0' and '1' represents the function 0 and 1 respectively.

Proof: The functions f,g,h will have the values 0 or 1 i.e., f , g, h ∈ {0,1}. The proof of the above theorem
follows from the function table (i.e., truth table):

f g h gh f+gh f+g f+h ( f+g) (f+h) f′ f + f′ f. f ′

1 1 1 1 1 1 1 1 0 1 0

1 1 0 0 1 1 1 1 0 1 0

1 0 1 0 1 1 1 1 0 1 0

1 0 0 0 1 1 1 1 0 1 0

0 1 1 1 1 1 1 1 1 1 0

0 1 0 0 0 1 0 0 1 1 0

0 0 1 0 0 0 1 0 1 1 0

0 0 0 0 0 0 0 0 1 1 0

From table, we have f + gh = ( f + g )( f + h) etc.

8.4 Multiple Input Elements (or Gates)


(i) The expression f1 + f 2 + K+ f m where f i(i = 1, 2K , m) ∈ Fn is called multiple input OR-gate and is
represented by the following symbol:

f1
f1 +f2+...+fm
f2
fm

Multiple input OR-gate


Fig. 8.17
374 Discrete Mathematical Structures

(ii) The expression f1 . f 2. . . . f m where f i(i = 1, 2, . . . . , m) ∈ Fn is called multiple input AND-gate and is
represented by the following symbol:

f1
f1 .f2 ... .fm
f2
fm

Multiple input AND-gate


Fig. 8.18

(iii) The expression ( f1 + f 2 + . . . . + f m )′ where


f i = (i = 1, 2, . . . . , m) ∈ Fn
is called multiple input NOR-gate and is represented by the symbol:

f1
(f1 +f2+...+fm)'
f2
fm

Multiple input NOR-gate


Fig. 8.19

(iv) The expression ( f1 . f 2. . . . f m )′ where f i(i = 1, 2, . . . . , m) ∈ Fn is called multiple input NAND-gate and is
represented by the symbol:

f1
(f1 . f2 . ... . fm )'
f2
fm

Multiple input NAND-gate


Fig. 8.20

8.5 Equivalent Circuits


Let f : B n → B where B = {0,1} be a output function. If f represents different circuits then they all are called
Equivalent Circuits. In particular, by the use of various laws of Boolean algebra, the output function of
a circuit can be represented by an identically equal expression, which may be more useful. Usually, we
prefer that expression which has lesser number of logic gates, when represented by logic-circuit. For
example:
The ( x. y ) + ( x. z ) takes three gates: two AND-gates and one OR-gate (see Fig. 8.21);

Fig. 8.21
Logic Gates (Circuits) 375

But we can write ( x. y ) + ( x. z ) as x. ( y + z ). The function x. ( y + z ) takes two gates: one AND-gate and one
OR-gate (see Fig. 8.22);

x x.(y+z)

y y+z
z

Fig. 8.22

The circuits represented by Fig. 8.21 and 8.22 are equivalent circuits.
Clearly circuit of Fig. 8.22 is more economical since it saves one AND-gate.

8.6 Exclusive OR Gate or XOR Gate


The exclusive OR gate is different. It gives an output of 1 when either but not both inputs are 1. In Boolean
algebra, the sign ⊕ stand for XOR operation. The truth table for this gate is shown in Fig.8.23 and also its
truth table.

Input Output
A B F = A′ B + A B′

0 0 0 A F=A⊕B
0 1 1
B
1 0 1
XOR-gate
1 1 0
Fig. 8.23
Table for XOR
Using the truth table, the disjunctive normal form for the gate is
F = A B′ + A′ B = A ⊕ B

8.7 Exclusive-NOR ( XNOR ) Gate


XNOR gate is equivalent to an exclusive OR gate followed by an inverter. The output is only when both
inputs are either 0 or 1.

The table for this gate is shown in Fig. 8.24

A A⊕B (A ⊕ B)´

B
Fig. 8.24
376 Discrete Mathematical Structures

(a) A NOT gate in series with XOR gate

Input Output

A B F = A B + A′ B′

A 0 0 1
(A ⊕ B)´
0 1 0
B
Fig. 8.25: Symbol for XNOR Gate
1 0 0

1 1 1

8.8 Method for Draw Logic Circuit From Boolean Equation


First we find the switching equations necessary for realization of a combinational logic function. Then
each term in this equation is represented by a logic gate. All these logic gates connect to each other to form
the logic diagram. This is called Realization of switching functions using logic diagram.

8.9 Method for Finding Boolean Function or Expression From a Logic Circuit
Start from the input side and write the equation at the output of each input gate and repeat this process
towards the output. Then write the switching equation for output.

8.10 Digital Circuits or The Logic Diagram


A Boolean expression may be transformed from an algebraic expression into a logic diagram composed of
AND, OR and NOT gates. This logic diagram or digital circuit include an inverter circuit for every variable
present in its complement form. If the logic expression is defined by
Y = A + BC
Then the corresponding network will require one AND and one OR gate.

If the logic expression is defined by


Y = A + B′
Then the corresponding network will require two input OR gate with a NOT gate on one of the inputs.
Logic Gates (Circuits) 377

Example 5: Find the logic networks corresponding to Boolean expression.


(i) f = x y + zu (ii) f = x y + z′ (iii) f = x′ y′ z + x′ y z + x y′
[P.T.U. (B.E.) Punjab 2007]

Solution: (i) We have f = x y + z u

x
xy

xy+zu

z
zu

u
Fig. 8.26: Implementation of x y + z u with AND, OR Network

(ii) We have f = x y + z′

x
xy

y
x y + z´

z z´
Fig. 8.27: Implementation with AND, OR and NOT Gate

(iii) We have f = x′ y′ z + x′ y z + x y′

Fig. 8.28
378 Discrete Mathematical Structures

8.11 Applications of Logic Gates


Logic gates have several applications to the computers. They are used in the following
(i) Address (ii) Encoder (iii) Decode

8.11.1 Adders
The application of binary bits consists the following elementary operations
0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 10
We find left bit gives the carry. When the augend and addend numbers contain more significant digits, the
carry obtained from the addition of two bits is added to the next higher order pair of significant digits.

8.11.2 Half Adder


A logic circuit that performs the addition of two bits is called half adder. The half adder circuit needs two
binary inputs and two binary outputs. The inputs variables designate augend and added bits, the output
variables produce the sum and carry.
The truth table for adder is

A B Carry ( C ) Sum ( S )

0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

Fig. 8.29: 2 input half adder


We see from table the half adder performs binary operation at a faster rate.
Logic circuit for half adder is given in Fig. 8.30

Fig. 8.30

8.11.3 Full Adder


A logic circuit that performs the addition of three bits is a full adder. It consists of three inputs and two
outputs. The two outputs are SUM and CARRY. We take two input variables A1 and B1 . The sum of three
binary digits from 0 to 3. The binary numbers 2 and 3 need two binary digits. We denote the symbols SUM
= S and CARRY = C.
Logic Gates (Circuits) 379

The Truth Table for the Full Adder

A1 B1 C1 C S

0 0 0 0 0

0 0 1 0 1

0 1 0 0 1

0 1 1 1 0

1 0 0 0 1

1 0 1 1 0

1 1 0 1 0

1 1 1 1 1

Fig. 8.31

8.11.4 Decoder
A decoder is a combinational logic circuit that converts n input lines to maximum of 2n unique output lines.
In a 3 to 8 line decoder three inputs are decoded into 8 outputs where each output represents one of the
minterms of the 3 input variables. If the input variables represent a binary number then the outputs will be
digits of octal system i.e. contain 8 digits A 3 to 8 line decoder can also be used for decoding any 3 bit code
to provide 8 outputs. The following is the diagram of 3 to 8 decoder.

Fig. 8.32: A 3 to 8 decoder


380 Discrete Mathematical Structures

Truth Table of 3 to 8 Line Decoder

Inputs Outputs

A B C F0 F1 F2 F3 F4 F5 F6 F7

0 0 0 1 0 0 0 0 0 0 0

0 0 1 0 1 0 0 0 0 0 0

0 1 0 0 0 1 0 0 0 0 0

0 1 1 0 0 0 1 0 0 0 0

1 0 0 0 0 0 0 1 0 0 0

1 0 1 0 0 0 0 0 1 0 0

1 1 0 0 0 0 0 0 0 1 0

1 1 1 0 0 0 0 0 0 0 1

Fig. 8.33

We find that the outputs variables are mutually exclusive. A decoder with n input variables can generate 2n
minterms.

8.11.5 Encoder [U.P.T.U. (B.Tech.) 2008]

A logical circuit which performs the inverse operation of a decoder is called on Encoder. Decimal to
binary encoder converts decimal numbers and a Hexadecimal to binary encoder converts Hexadecimal
number to its binary equivalent. An encoder with 2n input lines will have n output line. The block diagram
for 24 to 4 encoder is given in Fig. 8.34

0
1

4 output lines
24 = 16 input lines

15

Fig. 8.34
Logic Gates (Circuits) 381

8.11.6 Multiplexer (MUX) [U.P.T.U. (B.Tech.) 2008]

Multiplexers are used to transmit large number of data over a small number of lines. Multiplex means
many to one. A digital multiplexer is combinational circuit that selects binary information from many input
lines that directs its a single output line. The selection of a particular input line is controlled by a set of
selections lines. A multiplexer receives binary information from the 2n lines and transmit information on a
single output line. The block diagram of 4 to 1 line multiplexer is shown in Fig. 8.35

0
1

input output

2
3 S1 S2

Select
Fig. 8.35: Block Diagram for 4 × 1 Multiplexers

Example 6: Consider the following truth table

P Q R S

1 1 1 0
1 1 0 0
1 0 1 1
1 0 0 1
0 1 1 0
0 0 1 1
0 0 1 0
0 0 1 0

(i) Construct a Boolean Expression having this table as its truth table. Simplify the expression.
[U.P.T.U. (B.Tech.) 2003, 2004]
(ii) Construct a circuit having the given table as its input/output table. [U.P.T.U. (B.Tech.) 2003, 2004]
Solution: (i) Boolean expression is
S = PQ ′ R + PQ ′ R ′ + P ′ Q ′ R

= Q ′ R (P + P ′ ) + P Q ′ R ′

= Q′ R + P Q′ R ′ [ P + P ′ = 1]
382 Discrete Mathematical Structures

(ii) Required circuit is as

Fig. 8.36

Example 7: Draw the combinational circuit using the basic gates to obtain the following output.
Y = A B + BC + A B [P.T.U. (B.Tech.) Punjab 2008]

Solution: This circuit has three inputs A, B, C and one output.

Fig. 8.37

Example 8: Write the Boolean expression for the logic circuit shown in Fig. 8.38

Fig. 8.38

Solution: The input gates are 1, 2, 3


∴ Y5 = A, Y2 = B , Y3 = C
The equation for gate 4 is
Y4 = Y1 + Y2 = A . B
The equation for gate 5 is
Y5 = Y4 + Y3 = ( A . B ) + C
Logic Gates (Circuits) 383

Example 9: Sketch the given Boolean expression. Use one AND gate one OR gate only.
Y = A B + AC [Raipur (B.E.) 2008]
Solution: We have
Y = A B + A C = A (B + C )
This expression can be expressed using logic gates only as

Fig. 8.39

Example 10: Show that A ⊕ B = [( A B′ )′ . ( A′ B )′ ]′ and hence design a logic circuit of XOR gate using NAND
only.
Solution: A ⊕ B = (( A . B′ )′ . ( A′ . B )′ )′
= [( A′ + (B ′ )′ ). (( A′ )′ + B′ )]′
= [( A′ + B ). ( A + B′ )]′ [( A′ )′ = A]
= ( A′ + B )′ + ( A + B′ )′
= ( A′ )′ B′ + A′ (B′ )′ [( A′ )′ = A]
= A B′ + A′ B = A ⊕ B
The NAND gate implementation of the XOR function is shown in fig. 8.40

Fig. 8.40

Example 11: Realize the following Boolean expression using only NAND gates.
Y = (A B + B C )C [Rohtak (B.E.) 2007]

Solution: We have
Y = (A B + B C )C
= A BC + BC C
= A BC + BC [C C = C ]
= B C ( A + 1) [ A + 1 = 1]
Y = BC
⇒ Y = (BC )
384 Discrete Mathematical Structures

This expression can be realized used only NAND gates as shown in fig. 8.41

C BC (B C) = BC

Fig. 8.41

Example 12: Y = A B C + B C D + A B C

(i) Simplify this equation and realize using basic gates.

(ii) Realize the simplified equation using only NOR gates. [U.P.T.U. (B.Tech.) 2003]

Solution: (i) We have Y = A BC + BC D + A BC

= (A + A) B C + B C D [ A + A = 1]

=1. BC + B C D

= BC + B C D

= B (C + C D ) [By distributive]

= B (C + C )(C + D ) [C + C = 1]

= B (C + D )

The realization of this expression is shown in Fig. 8.42

Fig. 8.42

(ii) Realization Using Only NOR Gates

We have Y = B (C + D )

⇒ Y = B C (C + D ) ( A = A)

⇒ Y = B + (C + D )
Logic Gates (Circuits) 385

The realization of this expression is shown in Fig. 8.43

Fig. 8.43

Example 13: Reduce the following expressions and implement them using NAND gates only.

(i) f ( x, y ) = ( x y + x + y ) x y (ii) f ( x, y ) = ( x + x y + x y )

Solution: We have f ( x, y ) = ( x y + x + y ) x y

= (x + y + x . y ) x y

=x x y+ y x y+ x y x y [ x x = y y = 0, y y = y]

=0+ x y+ 0= x y

The equation is realized as shown in Fig. 8.44

Fig. 8.44: Realization Using the Basic Gates

Now replace the inverter and the NAND gate by their NAND equivalent to get the circuit in Fig. 8.45

x
x –y x –y

y
–y

Fig. 8.45: Realization Using the NAND Gates


386 Discrete Mathematical Structures

(ii) We have

f ( x, y ) = x + x y + x y

= x + (x + x) y [ x + x = 1]

= x + 1. y = x + y [1 . y = y]

Convert this expression with only NAND gates as

f ( x, y ) = ( x + y ) = ( x + y ) = ( x . y )

This expression can be implemented using NAND gates as shown in Fig. 8.46

Fig. 8.46

Example 14: Draw a logic circuit corresponding to Boolean expression

Y = A + BC + B [U.P.T.U. (B.Tech.) 2008]

Solution: We have Y = A + B C + B

= ( A + B )( A + C ) + B

= (A + B) + (A + C ) + B

= A B + AC + B

= A (B + C ) + B

Fig. 8.47
Logic Gates (Circuits) 387

Example 15: Simplify Boolean function algebraically and write CKT diagram.
f ( x1 , x 2, x 3 ) = ( x1 . x 2 + x 3 ). ( x 2 + x 3 ) + x 3 [U.P.T.U. (B.Tech.) 2004]

Solution: We have
f ( x1 , x 2, x 3 ) = ( x1 x 2 + x 3 )( x 2 + x 3 ) + x 3
= x1 x 2 x 2 + x 3 x 2 + x1 x 2 x 3 + x 3 x 3 + x 3
= x1 x 2 + x 2 x 3 + x1 x 2 x 3 + x 3 + x 3 [ x 2 x 2 = x 2, x 3 x 3 = x 3 ]
= x1 x 2 + x 2 x 3 (1 + x1 ) + x 3 [ x 3 + x 3 = x 3]
= x1 x 2 + x 2 x 3 + x 3 [1 + x1 = 1]
= x1 x 2 + x 3 ( x 2 + 1) [ x 2 + 1 = 1]

= x1 x 2 + x 3

Fig. 8.48

Example 16: Consider the Boolean function


f ( x1 , x 2, x 3 , x 4 ) = x1 + ( x 2 . ( x1 + x 4 ) + x 3 . ( x 2 + x 4 ))
(i) Simplify f algebraically
(ii) Draw the switching c k t of f and reduction of f
(iii) Find minimum normal form [U.P.T.U. (B.Tech.) 2004]

Solution: (i) We have


f = x1 + ( x 2 . ( x1 + x 4 ) + x 3 ( x 2 + x 4 ))
= x1 + { x 2 x1 + x 2 x 4 + x 3 x 2 + x 3 x 4 }
= x1 + x1 x 2 + x 2 x 4 + x 3 x 2 + x 3 x 4
= ( x1 + x1 )( x1 + x 2 ) + x 2 x 4 + x 3 x 2 + x 3 x 4
= x1 + x 2 + x 2 x 4 + x 3 x 2 + x 3 x 4 ( x1 + x1 = 1)
= x1 + x 2 (1 + x 4 ) + x 3 x 2 + x 3 x 4
= x1 + x 2 + x 3 x 2 + x 3 x 4
= x1 + ( x 2 + x 3 )( x 2 + x 2 ) + x 3 x 4 ( x 2 + x 2 = 1)
= x1 + x 2 + x 3 + x 3 x 4
= x1 + x 2 + x 3 (1 + x 4 ) (1 + x 4 = 1)
= x1 + x 2 + x 3
388 Discrete Mathematical Structures

(ii)

Fig. 8.49: KCT of Given boolean Function f

x1
x2 x1 + x2 + x3

x3
Fig. 8.50: Circuit for Reduction of f

(iii) Minterm Normal Form of f

x3 x4

x1 x 2 00 01 11 10

0 2 3 2
00
1 1

4 5 7 6
01
1 1 1 1

13 12 15 14
11
1 1 1 1

8 9 11 10
10
1 1 1 1

Fig. 8.51

Minterms are (3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)

Example 17: Draw the logic circuit for each of the following Boolean expressions:

(i) x. y + y. z (ii) d (a. b′ + a′. c) (iii) X = ( A + B ). C (iv) X = A(B + C + D )


Logic Gates (Circuits) 389

Solution:

(i)

Fig. 8.52

(ii)

Fig. 8.53

(iii)

Fig. 8.54

(iv)

Fig. 8.55
390 Discrete Mathematical Structures

Example 18: Draw the logic circuit for each of the following expression:

(i) x. y + z. y′ (ii) ( x + y )( x′ + y′ + z′ )( y′. z′ ).

Solution: (i)

Fig. 8.56

(ii) Let f ( x ) = ( x + y )( x′ + y′ + z′ )( y′. z′ )

Fig. 8.57

or
The logic circuit of the given expression may be drawn as follows:

x
y

z f

Fig. 8.58
Logic Gates (Circuits) 391

Example 19: Draw the logic circuit with inputs a, b, c and output y which corresponds to the Boolean
expression
y = ab′ c + abc′ + ab′ c′
Solution:

Fig. 8.59

Example 20: Draw the logic circuit with inputs a,b,c and output X where
X = abc + a′ c′ + b′ c′
Solution:

Fig. 8.60

Example 21: Express the output y as a Boolean expression in the input x1 , x 2, x 3 and x 4 for the logic circuit
in the following fig. 8.61:

Fig. 8.61
392 Discrete Mathematical Structures

Solution: In the given diagram, we have

The uppermost element x1 on the left hand side is connected with NOT-element, hence its output
expression is x1′ . The elements x 2 and x 3 are connected with NOR-element, hence their composite output is
( x 2 + x 3 )′ . Then under these elements, the element x 2 is connected with NOT-element, hence its output is
x′2. Lastly the elements x 3 and x 4 are connected with NOR-element, hence their output expression is
( x 3 + x 4 )′. Now elements x1′ and ( x 2 + x 3 )′ are connected by AND-element, hence their complete output is
x1′ ( x 2 + x 3 )'
Similarly x′2 and ( x 3 + x 4 )′ are connected by AND element, hence their composite output x′2( x 3 + x 4 ).

In the end x1′ ( x 2 + x 3 )′ and x′2( x 3 + x 4 )′ are connected by OR-element, hence their composite expression y
is given by
y = x1′ ( x 2 + x 3 )′ + x′2( x 3 + x 4 )′

Example 22: Draw the logic diagram to represent the Boolean expression:
(i) ( x + y )( x′ + y′. z′ ) (ii) x. y + [ z′( x ′+ y′ )] (iii) ( x + y + z )[ x. y + x′. z]

Solution: (i)

Fig. 8.62

So, Z = ( x + y ) + ( x′ + y′z′ )

(ii)

Fig. 8.63

So, Z = ( x ⋅ y ) + [ z′( x′ + y′ )]
Logic Gates (Circuits) 393

(iii)

Fig. 8.64

So, Z = ( x + y + z )( xy + x′z )

Example 23: Simplify the following Boolean expression and then construct the circuit diagram of reduced
Boolean expression.
(i) xy + xy′ + x′y′ ( ii) xy′z + (z + y ) x′

Solution: (i) xy + xy′ + x′y′


= x( y + y′ ) + x′y′ = x.1 + x′y′ = x + x′y′

Fig. 8.65

(ii) xy′z + (z + y ) x′
∴ xy′z + x′z + x′y = z ( xy′ + x′ ) + x′y
= z( x(1 − y ) + x′ ) + x′y [ y + y' = 1]
= z( x − xy + x′ ) + x′y
= z(1 − xy ) + x′y
= z − zxy + x′y
= z − zxy + (1 − x )y
= z − zxy + y − yx
= z − xy(z + 1) + y Fig. 8.66
= z − xy + y
= z + y(1 − x ) = z + y. x′
394 Discrete Mathematical Structures

Example 24: Draw the logic diagram to represent the Boolean expressions:
(i) ( x + y )( x′ + y′ ⋅ z′ ) (ii) x ⋅ y + (z′( x ′+ y′ )] (iii) ( x + y + z )( x. y + x′. z )

Solution: (i)

Fig. 8.67
So, Z = ( x + y ) + ( x′ + y′z′ )

(ii)
Z

Fig. 8.68
So, Z = ( xy ) + [ z′( x′ + y′ )]

(iii)

Fig. 8.69

So, Z = ( x + y + z )( x. y + x′. z )
Logic Gates (Circuits) 395

Example 25: Simplify the following Boolean expressions by using only laws of Boolean and then construct
the circuit diagrams of reduced Boolean expression:
(i) x ( x′ + y ) (ii) x′y′z + x′yz + xy′ (iii) x + x′y

Solution:
(i) F = x ( x′ + y )
or F = x. x′ + x. y
or F = 0 + xy [By Inverse Law]
or F = x. y [By Identity Law]

x F
y

Fig. 8.70
(ii) F = x′y′z + x′yz + xy′

F = x′z( y′ + y ) + xy′

F = x′z(1) + xy′ [Inverse Law]

F = x′z + xy′

Fig. 8.71

(iii) Let F = x + x′y


F = x (1) + x′y
F = x + xy + x′y (1 = 1 + y)
F = x + y( x + x′ )
F = x + y(1)
F = x+ y

Fig. 8.72
396 Discrete Mathematical Structures

Example 26: Write Boolean expressions corresponding to the following logic circuits:
(i)

Fig. 8.73

(ii)

Fig. 8.74

(iii)

Fig. 8.75

Solution:

(i)

Fig. 8.76
Logic Gates (Circuits) 397

(ii)

Fig. 8.77

(iii)

Fig. 8.78

Example 27: Draw the logic diagram to represent the Boolean expressions:
(i) ( x1′ x′2 )′ + x1 x 2 (ii) ( xy )′ + xyz (iii) ( x1 + x 2 ) x 3 + x 4

Solution:
(i) ( x1′ x′2 )′ + x1 x 2

Fig. 8.79

(ii) ( xy )′ + xyz

Fig. 8.80
398 Discrete Mathematical Structures

(iii) ( x1 + x 2 ) x 3 + x 4

Fig. 8.81

Example 28: Write Boolean expressions corresponding to the following logic circuits:
(i)

Fig. 8.82

(ii)

Fig. 8.83

(iii)

Fig. 8.84
Solution:

(i) z = { x1 x 2 + ( x1 x 3 )′ }. x′3 (ii) z = ( x ⋅ y )′ + (t ′ + x ) (iii) Z = ( x + y )′ yz


Logic Gates (Circuits) 399

Example 29: Draw the logic diagram to represent the Boolean expressions.

(i) ( x + y )( x′ + y′ z' ) (ii) x. y + [ z′( x' + y′ )] (iii) ( x + y + z )( x. y + x′. z )

Solution: (i)

Fig. 8.85
So, Z = ( x + y )( x′ + y′z′ )

(ii)

Fig. 8.86

So, Z = ( x. y ) + [ z′( x′ + y′ )]

(iii)

Fig. 8.87
So, Z = ( x + y + z )( x. y + x′z )
400 Discrete Mathematical Structures

Example 30: Draw the logic diagram to represent the following Boolean expressions.
(i) x′ z′+ yw (ii) xyz′+ yz′+ x ′ y

Solution: (i)

Fig. 8.88

(ii)

Fig. 8.89

Example 31: Show that logic circuit corresponding to any Boolean expression can be realized by using NAND
gate alone.
Solution: Since logic circuits corresponding to any Boolean expression are constructed using AND, OR
and NOT gates, therefore it is enough to show that AND, OR and NOT gates can be replaced by NAND gates
only. The following figures show how OR gates, AND gates and NOT gates can be replaced by suitable
interconnections of NAND gates.

(i)

Fig. 8.90
Logic Gates (Circuits) 401

(ii)

Fig. 8.91

(iii)
a

b a' b'

is equivalent
ab to NAND gate

a' b'

Fig. 8.92

Thus logic circuit corresponding to any Boolean expression can be constructed using NAND gates only.

Example 32: Show that logic circuit to realize any Boolean expression can be constructed using NOR gates
alone.
Solution: As in above example, we shall show that OR gate, AND gate and NOT gate can be replaced by
suitable interconnections of NOR gates.

(i)

Fig. 8.93

(ii)
a

b (a+b)'

is equivalent
a+b to OR gate

(a+b)'

Fig. 8.94
402 Discrete Mathematical Structures

(iii)

Fig. 8.95

Thus logic circuit corresponding to any Boolean expression can be constructed using NOR gates only.

Example 33: Simplify the circuits given below


(i) x

z
Fig. 8.96

(ii)

Fig. 8.97

Solution: The Boolean function corresponding circuits as

(i) (x + y)' yz (ii) [ xy + ( xz )']z'


Logic Gates (Circuits) 403

Exercise
@ Logic Gates
1. If f = gh′ + g′h, then prove that (gh′ + g′h)′ = gh + g′h′.
2. If x + y + z = xyz, then prove that x = y = z.
3. Prove the identity x′y′ + x′y + xy′ + xy = 1
4. If fg + hg′ = 1, where 1 is the function 1, then prove that f + h = 0.
5. Draw the logic circuits of the following:
(i) ( x + y )′ (ii) (a + b′ )(c. d′ )
6. Define NOR gate. Show that any logic circuit for a given Boolean expression can be constructed
using NOR gates only.
7. Define NAND gate. Show that an OR gate can be replaced by pair of NAND gates.
8. Use NAND gates to construct with following outputs
(i) x′ (ii) x+ y
(iii) xy (iv) x⊕y
9. Write the expression corresponding to the following logic circuits
x3

x1

x2

Fig. 8.98

10. How can you connect NAND gate to get an OR gate?

5. (i)

Fig. 8.99

(ii)

Fig. 8.100
404 Discrete Mathematical Structures

8.

Fig. 8.103 Fig. 8.104

9. Z = [( x1 x 2 )′ + x 3 ] x 4

10.

Fig. 8.105

qqq
Unit-4

C hapter
9. : Propositional Logic
Propositional Logic 407

9.1 Statement [U.P.T.U. (B.Tech.) 2004, 2006]

A Statement is a declarative sentence which is true or false, but not both; or in other words a Statement
is a declarative sentence which has a definite truth value.

Illustration: Following are statements (or proposition):

S. No. Declarative Sentence Truth Value

(i) { x: x 2 = 36} = {6, − 6} True

(ii) 3>9 False


(iii) The capital of UP is Lucknow True
(iv) Blood is red True
(v) 5+4=10 False

Following are not Statements:

(i) How are you (Interrogative)

(ii) Please go from here (Request)

(iii) May God help you (Wish)

9.1.1 Statement Letters or Sentence Variable


We know that symbols have great importance in Mathematics and therefore symbols will be used to
represent statements. The symbols which are used to represent statements, are Called Statement Letters
or Sentence Variables. To represent statement usually the letters P , Q , R , K , p , q , r , K etc. are used.
For example, if the statement 'Lucknow is the capital of U.P.' is denoted by the letter ‘p’, then in Mathematics
it is written as follows:
p = Lucknow is the capital of U.P.
408 Discrete Mathematical Structures

9.2 Logical Connectives or Sentence Connectives


Logical connectives or sentence connectives are the words or symbols used to combine two sentences or
statements to form a compound sentence or compound statement.

Table of Logical Connectives with their Symbols

Connective Word Name of Connective Symbol Symbol Rank

Not Denial or Negation ~ or ¬ 1

and Conjunction ∧ 2

Or Disjunction ∨ 3

if...then Conditional → or ⇒ 4

iff or if and only if Bi-conditional ↔ or ⇔ 5

Illustrations
(1) π is greater than 3 and π is less than 3.2. In symbolic language: let p ≡ π is greater than 3, q ≡ π is less
than 3.2, so p ∧ q.
(2) a is equal to 4 or b is equal 4. In symbolic language : let p ≡ a is equal to 4; q ≡ b is equal to 4, so p ∨ q.
(3) (4<7) ∨ (1=0)
(4) If two lines are parallel then they do not intersect. In symbolic language : let p ≡ two lines are parallel;
q ≡ two lines do not intersect; so p ⇒ q.
(5) A is a right angled triangle if the sum of squares of its two sides is equal to the square of the third side. In
symbols : let p ≡ A is a right-angled triangle, q ≡ the square of two sides of a triangle is equal to the square
of the third side. So p ⇔ q.
(6) If π > 3 then ~ π < 3

9.2.1 Use of Brackets


The use of brackets in statements (or propositions) is very important. The meaning (or explanation) of
statements is included in brackets.

Illustration: The statements ( p ∧ q) ⇒ r and p ∧ (q ⇒ r)


have completely different meaning. Therefore, following rules are followed for brackets in statements:
Rule 1: If connective 'Not (i.e., ~)' is repeated then bracket is not required. For example: ~ ~ p has the
meaning as (~(~p)
Propositional Logic 409

Rule 2: If in a statement, the connectives of the same rank appear, then brackets are applied from the left.
For example:
p ∧ q ∧ r ∧ s ∧ t = {( p ∧ q) ∧ s} ∧ t
Rule 3: If the connectives of different ranks appear, then first of all the bracket of that connective is
removed which is of lower rank.
Illustration: p ∨ (q ⇒ r) = p ∨ ( p ⇒ r)
Here, the rank (=4) of ' ⇒' is greater than the rank (=3) of ' ∨'. Therefore, this bracket cannot be removed.

9.3 Kinds of Sentences


Usually the sentences are of two kinds:
(i) Simple sentence or Atomic sentence. (ii) Compound sentence or Molecular sentence.

9.3.1 Simple Sentence


A simple sentence or atomic sentence has no connective.

9.3.2 Compound Sentence


A compound sentence or molecular sentence is composed of various connectives.
A compound sentence is named on the basis of the leading connective used in it.

Illustration:

Connective Compound Sentence

∧ Conjunctive sentence

∨ Disjunctive sentence

→ or ⇒ Conditional sentence

↔ or ⇔ Bi-conditional sentence

~ or ¬ Negative or denial sentence

(a) In conditional sentence p ⇒ q, p is called ‘antecedent' or 'hypothesis' or 'premise' and q is called


'consequent or conclusion’. In language, it is read as:

(i) p means q (ii) if p then q (iii) p then q

(iv) when p then q (v) q if p (vi) q when p

(vii) p only if q (viii) necessary condition for p is q

(ix) sufficient condition for q is p.


410 Discrete Mathematical Structures

(b) Bi conditional sentence p ⇔ q is read as:


(i) If p then q and if q then p.
(ii) The necessary and sufficient condition for p is q.
(iii) p if and only if q.

(c) The sentences used to form a compound sentences are called its components. For example: The
components of p ∧ q are p and q.
Remark: The component may either be simple sentences or compound sentences.

9.4 Truth Value of A Statement


According to the definition of statement, a statement has a definite truth value which is either True or
False. Consider the following examples:
(i) 15 is an odd number. (ii) 9 is a prime number.
Clearly (i) is true, therefore (i) has a definite truth value 'True' and it is denoted by the first letter 'T ' of
True. Similarly, (ii) is a statement whose truth value is 'False' and it is denoted by the first letter 'F ' of
False.

9.4.1 Statement Pattern or Statement Form


Statement pattern or statement form is an expression which is obtained by combining statement letters by
the use of a finite number of logical connectives. For example:

If p and q be statement letters, then following are examples of statement pattern:


(i) p ∧ q (ii) p ∨ q (iii) p ⇒ q (iv) p ∨ q ⇒ ~ p (v) p ∨ q ⇔ q ∨ p

The statement pattern may be simple or composite, according as it is composed of one or more logical
connectives. Thus statement patterns given by (i), (ii) and (iii) are simple while those given by (iv) and (v)
are composite.

9.4.2 Truth Value Function


We know that every statement has definite and unique truth value which is either True or False. Hence
every statement pattern defines a truth value function if its components whose range set is {T, F}.

9.4.3 Principal Connective


We know that a compound sentence is formed by the use of one or more than one logical connectives.
The logical connective, which is used in the end in the composition of a compound sentence, is called a
Principal Connective.
Illustrations:
(i) The principal connective in ( p ∧ p) ⇒ r is ' ⇒.'
(ii) The principal connective in (r ⇒ p) ∨ ( p ⇔ q) is ' ∨'.
Propositional Logic 411

9.4.4 Open Statement


A sentence, which contains one or more variables such that when certain value are substituted for
variables, becomes a statement, is called an Open Statement.

Illustration: Consider x+3=9

If we put 6 in place of x, then this sentence becomes a true statement. Such a sentence is called an open
statement.

9.4.5 Proposition
If p, q, r K are Simple Statement then the compound statement P ( p, q, r, s, . . . ) is called a proposition.
The truth value of proposition P depends on the truth values of variables p, q, r, K . If the truth value of the
proposition P. A truth table is a simple way to show this relationship.

Example 1: Find the truth table for the proposition (~ p ∧ q) .


Solution: The truth table of the proposition (~ p ∧ q) is

p q ~p ~p∧q
T T F F
T F F F
F T T T
F F T F

9.4.6 Well Formed Formulas [U.P.T.U. (B.Tech.) 2005, 2006]

The statement formulas contain one or more simple statements and some connectives. If p and q be any two
statements, then p ∧ q, (~ p) ∧ q, ( p ∧ q) ∨ (~ p) are some statement formula derived from the statement
variables p and q, where p and q called components of the statement formula.
Consider p ∧ q and q ∧ p, where p and q are any two propositions. The truth tables of these two propositions
are identical. This happen when we have any proposition in place of P and any proposition in place of Q. So
we can develop the concept of a propositional variable and well formed formulas (wff ).

Well Formed Formulas


A statement formula is a string consisting of variables, parentheses and connective symbols. A statement
formula is called well formed formulas ( wff ) if
(i) A statement variable p standing alone is a well formed formula.
(ii) If p is a well-formed formula, then (~ p) is a well formed formula.
(iii) If p and q are well formed formula then ( p ∧ q), ( p ∨ q), ( p ⇒ q) and ( p ⇔ q) are well formed formulas.
(iv) A string of symbols is a well formed formula if and only if it is obtained by finitely many applications of the
rule (i), (ii) and (iii).
412 Discrete Mathematical Structures

Note 1: A well formed formulas is not a proposition, but if we replace the proposition in place of
propositional variable, we get a proposition. For example

(i) ( ~ ( p ∨ q) ∧ ((~ q) ∧ r ) ⇒ q) is a wff

(ii) (~ p ∧ q) ⇔ q is a well formed formulas

Note 2: We can drop parentheses when there is no ambiguity. For the sake of convenience we used well
formed formula ( wff )
Note 3: The final column entries of the truth table of a well formed formula gives the truth values of the
formula.

Example 2: Which of the following sentences are statements? Also state their truth value.
(i) Is 3 a prime number? (ii) x 2 − 5x + 6 = 0
(iii) There will be snow in December (iv) Give me ten rupees
(v) Ramesh is poor but honest

Solution:
(i) It is not the statement [Interrogative]
(ii) It is not statement. Its truth value depends upon the value of x.
(iii) It is statement. It can be judged to be true or false.
(iv) It is not statement [wish]
(v) It is the statement. It can be judged to be true or false. It is true if Ramesh is poor and honest and false
when he is poor but not honest.

Example 3: Which of the following sentences are proposition? What are the truth values of those that are
propositions?
(i) Kolkata is the capital of India (ii) Answer this question (iii) What time is it?
(iv) x+y = y+x for every pair of real number x and y (v) 5 + 6 = 10
(vi) x+3=3 (vii) x + 2 = 5 if x = 1 (viii) Do not go
Solution:

(i) Yes, F (ii) No (iii) No (iv) Yes, T

(v) Yes, F (vi) Yes, F (vii) No (viii) No

Example 4: Find out which of the following are statements and which are not.
(i) Where are you going? (ii) Gitanjali is sick or old
(iii) It is raining and the sun is shining
(iv) Intersection of two non-empty sets is always a non-empty set
(v) Two individuals are always related (vi) The real number x is less than 3
(vii) 5x + 8y = 17 (viii) Do not pluck the flowers
Propositional Logic 413

Solution:
(i) It is not a statement since it is an interrogative sentence. It can not be judged to be true or false.
(ii) It is a statement. It can be judged to be true or false. It is true if Gitanjali is sick or if Gitanjali is old or if
Gitanjali is sick as well as she is old. It is false if Gitanjali is neither sick nor she is old.
(iii) It is a statement. It can be judged to be true or false. It is true if it is raining and also the sun is shining. It is
false if it is not raining or if the sun is not shining or if neither it is raining nor the sun is shining.
(iv) It is a statement. It can be judged to be true or false. It is false statement because the intersection of two
non-empty sets is always not recessarily a non-empty set.
Illustration: A = {1, 2, 7} and B = {3, 5, 8, 11}
are two non-empty sets but A ∩ B = φ i.e. A ∩ B is an empty set.
(v) It is a statement. It can be judged to be true or false. It is false statement because it is not necessary that
two individuals are always related.
(vi) It is an open sentence. Its truth value depends upon x. Hence, it is not a statement.
(vii) It is an open sentence. Its truth value depends upon x and y. Hence, it is not a statement.
(viii) It is not a statement since it is an imperative sentence. It cannot be judged to be true or false.

Example 5: Which of the following are statements? If a statement, then find its truth value.
(i) 2+3=6 (ii) Listen to me, Vishu !
(iii) 6 has three prime factors (iv) 13 is a prime number
Solution:
(i) '2 + 3 = 6 ' is a statement. Since 2 + 3 = 5, so it is a false statement and hence its truth value is 'F'.
(ii) It is not statement, since it is an imperative sentence.
(iii) It is a statement. Since 6 has only two prime factors namely 2 and 3, therefore, it is a false statement. So its
truth value is 'F'.
(iv) It is a statement. Since 13 is prime number so it is a true statement. Hence its truth value is 'T'.

Example 6: State the truth values of the following statements.


(i) There is always a real root for any quadratic equation.
(ii) There is only one triangle (apart from the triangles congruent to it ) with prescribed lengths for sides a, b, c
with a < b + c, b < c + a and c < a + b
(iii) Every set is a fixed set.
(iv) The sum of two and three is five.
(v) The number of ways of seating 2 persons out of n persons in two chairs is n p .
2

Solution:
(i) Since a quadratic equation may have a pair of complex roots also so the given statement is false. Hence, its
truth value is 'F'.
(ii) Since all triangles with prescribed lengths for sides a, b, c with
a < b + c, b < a + c and c < a + b, p = 4d is true. Hence, its truth value is 'T'.
(iii) Since a set may be finite or infinite so the given statement is false. Its truth value is 'F'.
(iv) The given statement is true. So, its truth value is 'T'.
(v) The given statement is true. So its truth value is 'T'.
414 Discrete Mathematical Structures

Example 7: Write down the truth value (T or F) of each of the following statements.
(i) There are only finite number of rational numbers.
(ii) The quadratic equation ax 2 + bx + c = 0, a ≠ 0, has always two real roots.

(iii) A triangle one of whose vertices lies on a circle and whose side opposite to this vertex is a diameter of the
circle is a right angle triangle.
(iv) The Taj Mahal is in Agra.
(v) { x : x 2 = 16} = {4, – 4}

(vi) A cow has four legs.

Solution:
(i) It is a false statement because the rational numbers are infinite. Hence, its truth value is 'F'.
(ii) It is false statement because the quadratic equation ax 2+ bx + c = 0, a ≠ 0, may also have roots which are
not real. Hence, the truth value of this statements is 'F'.
(iii) The given statement is true because in a circle a diameter always subtends a right angle at any point on the
circumference opposite to it. Hence, its truth value is 'T'.
(iv) It is a true statement. Hence, its truth value is 'T'.
(v) It is a true statement. Hence, its truth value is 'T'.
(vi) It is a true statement. Hence its truth value is 'T'.

Example 8: Which of the following statements are true and which are false?

(i) 16 + 9 = 4 2 + 3 2 (ii) 9 × 7 = 21 × 3 (iii) {2, 3} ⊂ {2, 4, 6} (iv) 5 ∈ {1, 3, 5}

Solution:
(i) True, since 25 = 25 (ii) True, since 63 = 63
(iii) False, since 3 ∉ {2, 4, 6} (iv) True, since 5 is an element of the set {1, 3, 5}

Example 9: What type of sentence is 5 + x = 9? For what value of x it will become a true statement?
Solution: The given sentence 5+x =9 is an open statement. It becomes a true statement for x = 4.

Example 10: Are the following propositions?

(i) Some roses are black. (ii) All roses are white.

(iii) May you live long. (iv) The girls are beautiful.

(v) Go to home. (vi) What is your good name?

(vii) Bravo ! you have done a good work. (viii) Children, come to me.

(ix) Is 7 a prime number? (x) 10 is a prime number.

(xi) Go to college.
Propositional Logic 415

Solution:
(i) Yes, since it is a declarative sentence, whose truth value is True.
(ii) Yes, since it is a declarative sentence, whose truth value is False.
(iii) No, since it is not a declarative sentence.
(iv) (v), (vi), (vii), (viii), (ix) and (xi) are not proposition since these all are not declarative sentences.
(x) Yes, since it is a declarative sentence, whose truth value is False.

Example 11: If p = he is poor, q = he is laborious, then write down the following statements in symbols (i.e.,
in the language of logic):
(i) He is poor and laborious. (ii) He is poor but is not laborious.
(iii) It is false that he is poor or laborious. (iv) It is false that he is not poor or is laborious.
(v) Neither he is poor nor he is laborious. (vi) He is poor or is not poor and is laborious.
(vii) It is not true that he is not poor or is not laborious.

Solution: In terms of statement letters p, q and logical connectives, the solutions are as follows:

(i) p∧ q (ii) p∧ ~q (iii) ~( p ∨ q)

(iv) ~(~ p ∨ q) (v) ~ p∧ ~q (vi) p ∨ (~ p ∧ q)

(vii) ~(~ p ∨ ~ q)

Example 12: Let p = "Ravi is rich" and q = "Ram is happy"


Write the following statements in symbolic form:
(i) Ram is poor but happy. (ii) Ravi is neither rich nor happy.
Solution:
(i) ~ p∧ q (ii) (~ p) ∧ (~ q)

Example 13: Write the following sentences in symbols:


(i) When Sheela will come then I shall go to college.
(ii) Until Sheela will not come I shall not go to college.
Solution: Let p ≡ Sheela will come, q ≡ I shall go to college.
∴ (i) p ⇒ q (ii) ~ p ⇒~ q

Example 14: Write the following in symbols:


(i) What so ever, I say, he refuses from that.
(ii) I shall reach the station in time, otherwise I shall miss the train.
(iii) I shall go to Delhi, but I shall not see zoo.
(iv) In the position when he is ill, I shall care.
(v) Whenever I take leave, I fall ill.
(vi) Until I shall not be called till then, I shall remain here.
(vii) Ram will go to work or will remain in the house and he will white-wash the house.
(viii) Not only men, but also women and children were killed.
416 Discrete Mathematical Structures

(ix) If he will do labour, he will success. If he will success, he will get pleasure. Thus, by doing labour one gets
pleasure.
(x) If teams do not arrive or the weather is bad, then there will be no match.
(xi) The necessary and sufficient condition for raining is that the sky should be cloudy.
(xii) I shall go to Agra, but I shall not see Taj Mahal.
Solution:
(i) Let p ≡ I say, q ≡ he refuses from that
Statement is : p ∧ q
(ii) p ≡ I shall reach the station in time, q ≡ I shall miss the train,
Statement is: p ∨ q
(iii) p ≡ I shall go to Delhi, q ≡ I shall see zoo
Statement is: p ⇒~ q
(iv) p ≡ he is ill, q ≡ I shall care.
Statement is: p ⇒ q
(v) p ≡ I take leave, q ≡ I fail ill.
Statement is : ~ p ∧ q
(vi) p ≡ I shall be called, q ≡ I shall remain here.
Statement is: ~ p ⇒ q
(vii) p ≡ Ram will go to work, q ≡ Ram will remain in the house,
r ≡ Ram will white-wash the house
Statement is: p ∨ (q ∧ r)
(viii) p ≡ men were killed, q ≡ women were killed, r ≡ children were killed
Statement is: p ∧ (q ∧ r)
(ix) p ≡ he will do labour, q ≡ he will success, r ≡ he will get pleasure.
Statement is: ( p ⇒ q ∧ q ⇒ r) ⇒ ( p ⇒ r)
(x) p ≡ teams do not arrive, q ≡ whether is bad, r ≡ there will be no match.
Statement is: ( p ∨ q) ⇒ r
(xi) p ≡ raining, q ≡ cloudy sky.
Statement is: p ⇔ q
(xii) p ≡ I shall go to Agra, q ≡ I shall see Taj Mahal.
Statement is: p ⇒~ q

Example 15: Whenever Ram and Shyam are present in the party then there is some trouble in the party.
Today there is no trouble in the party. Hence, Ram and Shyam are not present in the party. Write it in symbolic
notations.
Solution: p ≡ Ram and Shyam are present in the party, q ≡ To be trouble in the party.
Statement is: p ⇒ q, ~ q ⇒ ~ p
Propositional Logic 417

Example 16: If p ≡ It is 4 o'clock, q ≡ the train is late, then state in words the following results:

(i) p∨ q (ii) p∧ q (iii) p ∧ (~ q)


(iv) q∨ ~ p (v) (~ p) ∧ q (vi) (~ p) ∧ (~ q)
(vii) (~ p) ∨ (~ q) (viii) ~( p ∧ q) (ix) ~p⇒q

Solution:
(i) It is 4 0'clock, or the train is late. (ii) It is 4 0'clock, and the train is late.
(iii) It is 4 0'clock, and the train is not late. or It is 4 0'clock, but the train is not late.
(iv) The train is late or it is not 4 0'clock. (v) It is not 4 0'clock, and the train is late.
(vi) It is not 4 0'clock, and the train is not late. or Neither it is 4 0'clock, nor the train is late.
(vii) It is not 4 0'clock, or the train is not late. or Either it is not 4 0'clock, or the train is not late.
(viii) It is not true that it is 4 0'clock, and the train is late.
(ix) If it is not 4 0'clock, then the train is late.

Example 17: Let p = It is cold, q = It is raining. Give a simple verbal sentence which describes each of the
following statements:

(i) ~p (ii) p∧ q (iii) p∨ q


(iv) q⇔ p (v) p ⇒~ q (vi) q∨ ~ p
(vii) ~ p∧ ~ q (viii) p ⇔~ q (ix) ~~q
(x) ( p∧ ~ q) ⇒ p (xi) ~~p (xii) ( p∧ ~ q) ⇒ q

Solution:
(i) It is not cold. (ii) It is cold and raining.
(iii) It is cold or it is raining. (iv) It is raining if and only if it is cold.
(v) If it is cold, then it is not raining. (vi) It is raining or it is not cold.
(vii) It is not cold and it is not raining. (viii) It is cold if and only if it is not raining.
(ix) It is not true that it is not raining. (x) If it is cold and not raining, then it is cold.
(xi) It is not true that it is not cold. (xii) If it is raining and not cold, then it is raining.

Example 18: If p ≡ Ramesh is a player, q ≡ Mohan is wise, then write the following symbols in sentences:

(i) ~ p∨ ~q (ii) ~p⇔q (iii) p∧ ~ q


(iv) p∧ q (v) ~( p ∧ q)

Solution:
(i) Neither Ramesh is a player nor Mohan is a wise boy.
(ii) Ramesh is not a player iff Mohan is a wise boy.
(iii) Ramesh is a player and Mohan is not a wise boy.
(iv) Ramesh is a player and Mohan is a wise boy.
(v) It is not true that Ramesh is a player and Mohan is a wise boy.
418 Discrete Mathematical Structures

9.5 Truth Tables


The meaning and use of different logical connectives can be very well understood by the analysis of truth
values. In symbols, true or false statements are expressed with the help of tables. These tables are called
Truth Tables.

9.6 Basic Logical Operations


9.6.1 Conjunction (∧ )
Suppose p and q are two statements. When two statements p, q are combined by using the word 'and' , then
we get a new statement represented by p ∧ q. The resulting statement p ∧ q is read as 'p and q' or 'p meet q'.
The statement p ∧ q so obtained is called the Conjunction of p and q. The conjunction of statements p and
q i.e., p ∧ q is true only in the condition when p and q both are true, i.e.,
(i) If p is true and q is true, then p ∧ q is true. (ii) If p is true and q is false, then p ∧ q is false.
(iii) If p is false and q is true, then p ∧ q is false. (iv) If p is false and q is false, then p ∧ q is false.

Truth table for p ∧ q

p q p∧ q

T T T

T F F

F T F

F F F

Note: The statements, used to form the resulting statement, are called Components. For example, the
components of resulting statement p ∧ q are p and q.

9.6.2 Disjunction (∨ )
Suppose p and q are two statements. When two statements p, q are joined by using the word 'or', then we
get a new statement represented by p ∨ q . The resulting statement p ∨ q is read as 'p or q' 'p join q'. The
statement p ∨ q so obtained is called the Disjunction of p and q. The disjunction of statements p and q i.e.,
p ∨ q is false only in the condition when p and q both are false, i.e.,

(i) If p is true and q is true, then p ∨ q is true. (ii) If p is true and q is false, then p ∨ q is true.

(iii) If p is false and q is true, then p ∨ q is true. (iv) If p is false and q is false, then p ∨ q is false.
Propositional Logic 419

Truth table for p ∨ q

p q p∨q

T T T
T F T
F T T
F F F

9.6.3 Negation (~) or ( ¬) or Not


Let p be a statement. The negation (or denial) of the statement p is obtained by putting the word 'not' and
is represented by ' ¬ p', ~p is read as 'not p'. Hence,

(i) If p is true, then ~ p is false. (ii) If p is false, then ~ p is true.


Therefore the truth value of ~p is also true or false.
Truth table for ~ p

p ~p

T F
F T

Thus, the negation of a statement is a new statement which is the denial of the previous statement. But at
the time of taking the negation (~) of a statement, one should be very cautious, which will be clear from
the following example:

Suppose p = Ramesh is a good player of Hockey, then ∼ p never means ‘Ramesh is a bad player of Hockey’.
∼ p has the following meaning:
∼ p = Ramesh is not a good player of Hockey.

Note: that a negation is called a connective although it only modifies a statement. In this sense, negation is
the only operator that acts on a single proposition.

Example 19: Find the negation of the propositions

(i) It is cold (ii) Today is Sunday (iii) Tim Tim is poor


Solution: The negation of the proposition are
(i) It is not cold (ii) Today is not Sunday (iii) Tim Tim is not poor

Example 20: Write the negation of each of the following statements


(i) 2 + 7 ≤ 13 (ii) 3 is an odd integer and 8 is an even integer
(iii) No nice people are dangerous (iv) The weather is bad and I will not go to work
(v) I grow fat only if I eat too much.
420 Discrete Mathematical Structures

Solution:

(i) 2 + 7 is not less than or equal to 13 (ii) 3 is not an odd integer and 8 is not an even integer

(iii) Nice people are not dangerous (iv) The weather is not bad and I will go to work

(v) I don't grow fat if I not eat too much.

9.6.4 Conditional Statement [U.P.T.U. (B.Tech.) 2007]

Let p and q be any two statements. The statement of the type 'if p then q' is called Conditional
Statement and is represented by ' p ⇒ q'. It is read as 'p implies q', 'p' is called antecedent and 'q' is called

Consequent. To be more clear about conditional statement, consider the following example:

A father said to his son, ''if you will stood first in the examination, then I shall purchase a scooter for you''. If
antecedent is denoted by p and consequent by q, then the given conditional statement is represented in
symbols as ' p ⇒ q'. Now there are following four possibilities:
(i) The son stands first in the examination and the father purchases a scooter for him, i.e.,

If p is true, q is true, then p ⇒ q is true.

(ii) The son stands first in the examination and father does not purchases a scooter for him, i.e.,

If p is true, q is false then p ⇒ q is false.

(iii) The son does not stands first in the examination and the father purchases a scooter for him, i.e.,

If p is false, q is true then p ⇒ q is true.

(iv) The son does not stands first in the examination and the father does not purchases a scooter for him, i.e.,
If p is false, q is false, then p ⇒ q is true.

Hence, we observe that the conditional statement is false only in condition 'when antecedent is
true and consequent is false'.
Truth table for p ⇒ q

p q p ⇒q

T T T
T F F
F T T
F F T

Note: Some authors use the symbol ' → ' instead of the symbol ' ⇒.' and ↔ by ⇔
Propositional Logic 421

9.6.5 Bi-Conditional (⇔ ) [U.P.T.U. (B.Tech.) 2007]

Let p and q be two statements. The statement of the type 'p ⇒ q and q ⇒ p' i.e., ' p ⇒ q ∧ q ⇒ p' is called

bi-conditional statement and it is represented by ' p ⇔ q'.

Bi-conditional statement p ⇔ q is also read as follows:

(a) 'p if and only if q',

or (b) 'p then and only then when q',

or (c) 'p iff q'.

To make more clear the bi-conditional statement, in example of (iv) above of 9.6.4, if the father had
promised the son that, "I shall purchase a scooter for you if and only if you will stand first in the
examination". It means that the father will not purchase a scooter for him if the son does not stand first in
the examination. Thus, case (ii) and (iii) both in above example are against his promise, so bi-conditional
is a false statement.

Hence, we observe that a Bi-conditional statement is true only in those cases when its both
components have the same truth values.
Truth table for p ⇔ q

p q p⇔q

T T T

T F F

F T F

F F T

Note: Let p and q be statement letters, then following are example of statement patterns:

(i) p∧ q (ii) p∨ q
(iii) p∨ q ⇒ ~ p (iv) p⇒q
(v) p⇔q (vi) p∨ q ⇔ q∨ p
422 Discrete Mathematical Structures

9.7 Kinds of Conditional


If p and q are any two statements, then some other conditional, related to conditional p ⇒ q, are also used
which are given in the following table.
Conditional Name of Kind
I. p⇒q Direct implication
II. q⇒ p Converse implication
III. ~ p ⇒~q Inverse or Opposite implication
IV. ~q ⇒~ p Contra-positive implication

9.7.1 Contra-Positive Implication


Now, we shall discuss contra-positive implication in detail. If p and q are two statements, then implications
~ q → ~ p is called the contra-positive of implication p → q, i.e., p ⇒ q and ~ q ⇒ ~ p are contra-positive of
each other. For example: if in any ∆ ABC , ∠ B = 90° , then
BA 2 + BC 2 = AC 2 ...(1)
Its contra-positive will be as follows:
In any ∆ ABC, if BA 2 + BC 2 ≠ AC 2, then ∠ B ≠ 90° ...(2)
Again above both implications (i) and (ii) are contra-positive of each other.
The following unified truth table, clearly explains the definitions of different kind of conditional.

p q ~p ~q p⇒q q⇒ p ~p ⇒~q ~q ⇒~p


T T F F T T T T
T F F T F T T F
F T T F T F F T
F F T T T T T T

9.7.2 Tautology [U.P.T.U. (B.Tech.) 2008]

A Tautology is a proposition which is true for all truth values of its sub propositions or components.
A tautology is also called Logically Valid or Logically True. Clearly in truth tables, all entries in the
column of tautology are of 'T' only.

Example 21: If truth set of any proposition over universal set is defined as
T p( n) = {a ∈ u : p (a) is true}

then prove that T p ⇔ q = (T p ∧ Tq ) ∨ (T pc ∧ Tqc )

and T p→ q = (T pc ∨ Tq )
[U.P.T.U. (B.Tech.) 2008]
Propositional Logic 423

Solution: The truth table for given proposition


T p ↔ q = (T p ∧ Tq ) ∨ T pc ∧ Tqc is

Tp Tq Tp↔ q T p ∧ Tq T pc T qc T pc ∧ T qc (T p ∧ T q ) ∨ (T pc ∧ T qc )

T T T T F F F T

T F F F F T F F

F T F F T F F F

F F T F T T T T

Hence, from table we find

T p ↔ q = (T p ∧ Tq ) ∨ (T pc ∧ Tqc )

The truth table for T p→ q = T pc ∨ Tq is

Tp Tq T p→ q T pc T pc ∨ T q

T T T F T

T F F F F

F T T T T

F F T T T

Hence, from table we find

T p→ q = T pc ∨ Tq .

Example 22: Show that the truth values of the following formulas are independent of their components.
(i) ( p ∧ ( p → q)) → q (ii) ( p → q) ⇔ (~ p ∨ q)
(iii) (( p → q) ∧ (q → r)) → ( p → r)
[U.P.T.U. (B.Tech.) 2007]
Solution: Truth value of each of these expression being ‘‘Tautology’’ as shown below is independent of
the components.
(i) ( p ∧ ( p → q)) → q

p q p→ q p ∧ ( p → q) = A A→ q

T T T T T

T F F F T

F T T F T

F F T F T
424 Discrete Mathematical Structures

(ii) ( p → q) ⇔ (~ p ∨ q)

p q p→ q ~p ~p∨q ( p → q) ⇔ (~ p ∨ q)

T T T F T T

T F F F F T

F T T T T T

F F T T T T

(iii) (( p → q) ∧ (q → r)) → ( p → r)

p q r p→ q q→ r p→ r ( p → q) ∧ ( q → r ) (( p → q) ∧ ( q → r )) → ( p → r )

T T T T T T T T

T T F T F F F T

T F T F T T F T

T F F F T F F T

F T T T T T T T

F T F T F T F T

F F T T T T T T

F F F T T T T T

Example 23: (i) Consider the conditional statement p. If the floods destroy my house or fires destroy my
house, then my insurance company will pay me. Write the converse, inverse and contrapositive of the
statement. [U.P.T.U. (B.Tech.) 2003]

(ii) There are two restaurants next to each other one has sign that says ‘‘Good food is not cheap’’ and other has a
sign that says ‘‘cheap food is not good’’. Are the signs saying the same thing?
[U.P.T.U. (B.Tech.) 2003]

(iii) Given the following statements as premises, all refering to an arbitrary meal:
(a) If he takes coffee, he does not drink milk.
(b) He eats crackers only if he drink milk.
(c) He does not take soup unless he eats crackers.
(d) At noon today, he had coffee.
Whether he took soup at noon today? If so, what is the correct conclusion? [U.P.T.U. (B.Tech.) 2004]

Solution: (i) Let the atomic statements be


P : The floods destroy my house , q :The fires destroy my house

r : My insurance company will pay me


Propositional Logic 425

Then, ( p ∨ q) ⇒ r

Its inverse is ~( p ∨ q) ⇒ ~ r or ~ p ∧ ~ q ⇒ ~ r

Therefore, the argument will be

If the floods does not destroy my house and fires does not destroy my house, then my insurance company
will not pay me. Its converse is r ⇒ p ∨ q

Therefore, argument will be ‘‘If my insurance company pay me then the floods will destroy my house or
fires will destroy my house.

(ii) Let P : Food is good and q : Food is cheap


Then the argument ‘‘Good food is not cheap’’ is written as
p ⇒~q

and the argument ‘‘cheap food is not good’’ is written as

q ⇒~ p

and their truth table is


p q ~p ~q p ⇒~q q ⇒~p

T T F F F F

T F F T T T

F T T F T T

F F T T T T

Since last two columns are same. Hence we can say that the signs are saying the same thing.
(iii) Let p : he takes coffee, q : he drinks milk, r : he eats crackers and s : he takes soup
Then, we see
(a) p→ ~q (b) r→ q (c) ~r→ − s
(d) ~r→ − s (e) by condition (e), we have p
Since implication r → q is equivalent to its contrapositive ~ q → ~ r, we have the following chain of
arguments.
p→ ~q a premise

~q→ ~r contrapositive of premise (b)

p→ ~r a conclusion of law of syllogism

~r→ ~s a premise

p→ ~s a conclusion by law of syllogism

p a premise

~s a conclusion by modusponen

Hence ~ s is the conclusion, i.e. he did not take soup at noon day.
426 Discrete Mathematical Structures

Example 24: The peirce arrow ↓ (NOR ) is a logical binary operation which is defined as follows
p ↓ q = ~( p ∨ q)

(i) prove that ~ p = p ↓ p (ii) prove that p ∧ q = ( p ↓ p) ↓ (q ↓ q)

(iii) write p → q using peirce arrows only. [U.P.T.U. (B.Tech.) 2004]

Solution: (i)

p ~p p∨ p ~ ( p ∨ p)

T F T F

F T F T

We see from table p ↓ q = ~( p ∨ p)

(ii) p ∧ q = ( p ↓ p) ↓ (q ↓ q) = (~ p) ↓ (~ q) [from (i)]


= ~(~ p ∨ ~ q) [by De-Morgan’s law]

= p∧ q
(iii) Since, we have ( p → q) ≅ (~ p ∨ q) = ~( p ∧ ~ q) by (i)
= ~( p ∧ (q ↓ q)) by (ii)

= ~(( p ↓ p) ↓ (q ↓ q) ↓ (q ↓ q))

= (( p ↓ p) ↓ (q ↓ q) ↓ (q ↓ q) ↓ (( p ↓ p) ↓ (q ↓ q) ↓ (q ↓ q))

Example 25: The converse of a statement is given. Write the inverse and contrapositive statements ‘‘If I come
early, then I can get car’’. [Osmania (B.E.) Andhra 2004, 2008]

Solution: Inverse: ‘‘If I cannot get car, then I shall not come early’’.
Contrapositive: If I do not come early, then I can not get the car.

Example 26: The inverse of statement is given. Write the converse and contrapositive of the statement.

‘‘If a man is not fisherman, then he is not swimmer’’.


Solution: Converse: ‘‘If he is a swimmer, then the man is a fisherman’’.
Contrapositive: ‘‘If he is not a swimmer, then the man is not a fisherman’’.

Illustration: If ( p ∧ q) ∧ ~( p ∨ q) is a contradiction

Hence, p∧ q⇒ p∨ q

Illustration: If ( p → q) ∧ (q → r) → ( p → r) is a tautology.

Hence, ( p → q) ∧ (q → r) ⇒ ( p → r)

Example 27: The contrapositive of statement is given as


‘‘If x < 2 Then x + 4 < 6’’
Write the converse and inverse [U.P.T.U. (B.Tech.) 2009]
Propositional Logic 427

Solution: Converse: If x > 2, then x + 4 > 6


Inverse: If x + 4 > 6, then x > 2

Example 28: Write the equivalent formula for p ∧ (q → r) ∨ (r ↔ p)which does not contain bi-conditional.
[U.P.T.U. (B.Tech.) 2009]

Solution: p ∧ (q → r) ∧ (r → q) ∨ (r → p) ∧ ( p → r)

Example 29:Given that the value of p → q is true. Can you determine the value of ~ p ∨ ( p ↔ q)?
[R.G.P.V. (B.E.) Raipur 2008; P.T.U. (B.E.) Punjab 2007]

Solution: We shall construct the truth table column for p → q and ~ p ∨ ( p → q)

p q p→ q ~p p↔q ~ p ∨ ( p ↔ q)

T T T F T T

T F F F F F

F T T T F T

F F T T T T

From the table it follows that p → q is true then the value of ~ p ∨ ( p ↔ q) is true.
We can determine the value of ~ p ∨ ( p ↔ q) because corresponding to each possible choice of p and q for
which the value of p → q is true, the value of ~ p ∨ ( p ↔ q) is same as T.

Example 30: Given that the value of p → q is false, determine the value of (~ p ∨ ~ q) → q
[U.P.T.U. (B.Tech.) 2009; Rohtak (B.E.) 2007]

Solution: We shall construct the truth table column p → q and (~ p ∨ ~ q) → q

p q ~p ~q p→ q (~ p) ∨ (~ q) (~ p ∨ ~ q) → q

T T F F T F T

T F F T F T F

F T T F T T T

F F T T T T F

From the table it follow that p → q is false then the value of (~ p ∨ ~ q) → q is false.

Example 31: Prove that ( p ⇔ q) ∧ (q ⇔ r) ⇒ ( p ⇔ r) is a tautology. [U.P.T.U. (B.Tech.) 2003]

Solution: For convenience, let


p ⇔ r = A and ( p ⇔ q) ∧ (q ⇔ r) = B
428 Discrete Mathematical Structures

p q r p⇔q q⇔r p ⇔ r = A (suppose) ( p ⇔ q) ∧ ( q ⇔ r ) = B B⇒ A


(suppose)

T T T T T T T T
T T F T F F F T
T F T F F T F T
T F F F T F F T
F T T F T F F T
F T F F F T F T
F F T T F F F T
F F F T T T T T

Last column shows that B ⇒ A i.e., ( p ⇔ q) ∧ (q ⇔ r) ⇒ ( p ⇔ r) is a tautology.

Example 32: Prove that each of the following statement is a tautology:


(i) [( p ⇒ q) ∧ (q ⇒ r)] ⇒ ( p ⇒ r) (ii) [(~ q ⇒ ~ p) ∧ (q ⇒ p)] ⇒ ( p ⇔ q)
(iii) ( p ⇒ q) ∨ (r ⇒ p) (iv) ( p ⇔ q ∧ r) ⇒ (~ r ⇒ ~ p)
[U.P.T.U. (B.Tech.) 2006]

Solution:
(i) Let the statement patterns p ⇒ q, q ⇒ r and p ⇒ r be denoted by sentence variables P, Q and R
respectively.
Truth Table for [( p ⇒ q) ∧ (q ⇒ r)] ⇒ ( p ⇒ r):

P Q R
p q r p⇒q q⇒r p⇒r P∧Q P ∧ Q⇒ R

T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T F F T
F T T T T T T T
F T F T F T F T
F F T T T T T T
F F F T T T T T

Last column show that (P ∧ Q ) ⇒ R i.e., [( p ⇒ q) ∧ (q ⇒ r)] ⇒ [ p ⇒ r] is a tautology.


(ii) Let the statement patterns ~ q ⇒ ~ p, q ⇒ p and p ⇔ q be denoted by sentence variables P, Q and R,
respectively.
Propositional Logic 429

Truth Table for [(~ q ⇒ ~ p) ∧ (q ⇒ p)] ⇒ ( p ⇔ q)

p q ~p ~q P~q ⇒~ p (Q) q ⇒ p P∧Q (R ) p ⇔ q ( P ∧ Q) ⇒ R


T T F F T T T T T
T F F T F T F F T
F T T F T F F F T
F F T T T T T T T

Last column shows that (P ∧ Q ) ⇒ R i.e., [(~ q ⇒ ~ p) ∧ (q ⇒ p)] ⇒ ( p ⇔ q) is a tautology.

(iii) Truth Table for ( p ⇒ q) ∨ (r ⇒ p) :

p q r p⇒q r⇒ p ( p ⇒ q) ∨ ( r ⇒ p)
T T T T T T
T T F T T T
T F T F T T
T F F F T T
F T T T F T
F T F T T T
F F T T F T
F F F T T T

From the last column, it is clear that the given statement ( p ⇒ q) ∨ (r ⇒ p) is a tautology.
(iv) Truth Table for ( p ⇔ q ∧ r) ⇒ (~ r ⇒ ~ p):

p q r q∧r p⇔q∧r ~r ~p ~ r ⇒~ p ( p ⇔ q ∧ r ) ⇒ (~ r ⇒ ~ p)
T T T T T F F T T
T T F F F T F F T
T F T F F F F T T
T F F F F T F F T
F T T T F F T T T
F T F F T T T T T
F F T F T F T T T
F F F F T T T T T

From the last column, it is clear that the given statement ( p ⇔ q ∧ r) ⇒ (~ r ⇒ ~ p) is a tautology.
Example 33: Prove that each of the following statement is a tautology:
(i) ( p ⇒ q) ∨ r ⇔ [( p ∨ r) ⇒ (q ∨ r)]
(ii) ( p ∧ q ⇒ r) ⇔ ( p ⇒ r) ∨ (q ⇒ r) [U.P.T.U. (B.Tech.) 2006]
430 Discrete Mathematical Structures

Solution:
(i) Truth Table for ( p ⇒ q) ∨ r ⇒ [( p ∨ r) ⇒ (q ∨ r)]:

p q r p⇒q ( p ⇒ q) ∨ r p∨r q∨r ( p ∨ r) ( p ⇒ q) ∨ r ⇔ [( p ∨ r )


⇒ (q ∨ r) ⇒ ( q ∨ r )]

T T T T T T T T T
T T F T T T T T T
T F T F T T T T T
T F F F F T F F T
F T T T T T T T T
F T F T T F T T T
F F T T T T T T T
F F F T T F F T T

From the last column, it is clear that the given statement


( p ⇒ p) ∨ r ⇔ [( p ∨ r) ∨ (q ∨ r)] is tautology.
(ii) Truth Table for (~ q) ∧ ( p ⇒ q) ⇒ (~ p):

p q ~q p⇒q (~ q) ∧ ( p ⇒ q) ~p (~ q) ∧ ( p ⇒ q) ⇒ (~ p)

T T F T F F T

T F T F F F T
F T F T F T T
F F T T T T T

From the last column, it is clear that the given statement (~ q) ∧ p ⇒ q) ⇒ (~ q) is a tautology.

9.7.3 Contradiction [U.P.T.U. (B.Tech.) 2008]

A Contradiction is a Proposition which is always false for all truth values of its propositions or
components. A contradiction is also called logically false. Clearly in truth tables, all entries in the column
of contradiction are of 'F' only.
Example 34: Prove that p ∧ (~ p) is a contradiction.
Solution: Let p be a statement. Truth table for p ∧ (~ p) is:

p ~p p ∧ (~ p)

T F F
F T F

Since all entries in the column of p ∧ (~ p) are of F only, it is a contradiction.


Propositional Logic 431

Example 35: Prove that p ⇔ (~ p) is a contradiction.


Solution: Truth table for p ⇔ (~ p) is:

p ~p p ⇔ (~ p)

T F F
F T F

Since all entries in the last column are of 'F' s and so it is contradiction.

Example 36: Prove that ( p ∨ q) ∧ (~ p) ∧ (~ q) is a contradiction.


Solution: Truth Table for given proposition is:

p q p∨q ~p ~q ( p ∨ q) ∧ (~ p) ( p ∨ q) ∧ (~ p) ∧ (~ q)

T T T F F F F
T F T F T F F
F T T T F T F
F F F T T F F

Since all entries in the last column are of 'F' s and so it is contradiction.

Example 37: Prove that each of the following statement is a contradiction:


(i) P = ( p ∨ q) ∧ ( p ∨ ~ q ∧ (~ p ∨ q) ∧ (~ p ∨ ~ q) (ii) [( p ∧ r) ∨ (q ∧ ~ r)] ⇔ [(~ p ∧ r) ∨ (~ q ∧ ~ r)]

(iii) ( p ∨ q) ∧ (~ p) ∧ (~ q) (iv) [( p ∧ q) ⇒ p] ⇒ [ q ∧ ~ q] = A

(v) ( p ∧ q ⇒ q) ⇒ (q ∧ ~ q)
Solution:
(i) Let p ∨ q = R , p ∨ ~ q = S, ~ p ∨ q = U and ~ p ∨ ~ q = V.
Then construction of the truth table:

p q ~p ~q R = p∨q S = p∨ ~q U =~ p∨ q V = ~ p ∨ ~ q P = R ∧ S ∧U ∧ V

T T F F T T T F F
T F F T T T F T F
F T T F T F T T F
F F T T F T T T F

From the last column of truth table it is clear that P is a contradiction because the truth value of each entry
of this column is F.
432 Discrete Mathematical Structures

(ii) Let ( p ∧ r) ∨ (q ∧ ~ r) = P and (~ p ∧ r) ∨ (~ q ∧ ~ r) = Q .


Then construction of the truth table:

p q r ~p ~q ~r p∧r q∧ ~r P ~p∧r ~q∧ ~r Q P ⇔Q

T T T F F F T F T F F F F
T T F F F T F T T F F F F
T F T F T F T F T F F F F
T F F F T T F F F F T T F
F T T T F F F F F T F T F
F T F T F T F T T F F F F
F F T T T F F F F T F T F
F F F T T T F F F F T T F

From the last column of the truth table it is clear that the statement P ⇔Q i.e.,
( p ∧ r) ∨ (q∧ ~ r) ⇔ (~ p ∧ r) ∨ (~ q∧ ~ r) is a contradiction.
(iii) On constructing of the truth table:

p q ~p ~q p∨q ( p ∨ q) ∧ (~ p) ( p ∨ q) ∧ (~ p) ∧ (~ q)

T T F F T F F
T F F T T F F
F T T F T T F
F F T T F F F

Since all entries in the last column are of F' so it is a contradiction.

(iv) On constructing the truth table:

p q ~q p∧q ( p ∧ q) ⇒ p q ∧~q A

T T F T T F F
T F T F T F F
F T F F T F F
F F T F T F F

Since all entries in the last column are of F' s and so it is a contradiction.
Propositional Logic 433

(v) On constructing the truth table:

p q p∧q ( p ∧ q) ⇒ q ~q q ∧~q [( p ∧ q) ⇒ q ⇒ ( q ∧ ~ q)]

T T T T F F F
T F F T T F F
F T F T F F F
F F F T T F F

Since all entries in the last column are F s and so it is a contradiction.

9.7.4 Logical Equivalence [U.P.T.U. (B.Tech.) 2008]

Two statements (or propositions) are called Logically Equivalent if the truth values of both the
statements (or propositions) are always identical. In other words, two statement are called logically
equivalent if when either is true the other is true and when either is false the other is false.

If two statements P and Q are logically equivalent then these are represented by 'P ≡ Q '. If P ≡ Q then P ⇒ Q

is a tautology. Consider two open statements x = 4 and 3x = 12 (when x ∈ N ) . Both have the same truth
value T for the value 4 of x, therefore, these both open statements are logically equivalent.

Theorem: The necessary and sufficient condition for two statements P and Q to be logically equivalent is that
P ⇔ Q is a tautology. [Rohtak (M.C.A.) 2004, 2009]

Proof: P ⇔ Q will be a tautology if its truth value is always T. The necessary and sufficient condition for
the truth value of P ⇔ Q to be T is that the truth values of P and Q should always be identical i.e., P
and Q should be logically equivalent.

Example 38: If p and q are two statements, show that the implication p ⇒ q and its contra-positive
(~ q) ⇒ (~ p) are logically equivalent. [U.P.T.U. (B.Tech.) 2008]

Solution: Truth table:

p q p⇒q ~ p ~q (~ q) ⇒ (~ p)

T T T F F T
T F F F T F
F T T T F T
F F T T T T

The entries of third and sixth columns are identical. Hence, p ⇒ q and (~ q) ⇒ (~ p) are logically
equivalent.
434 Discrete Mathematical Structures

Example 39: Show that q ⇒ p converse of p ⇒ q and its inverse (~ p) ⇒ (~ q) are logically equivalent.
Solution:

p q q ⇒p ∼p ∼q ( ∼ p) ⇒ ( ∼ q)

T T T F F T
T F T F T T
F T F T F F
F F T T T T

Since entries of 3rd and 6th columns are identical.


∴ (q ⇒ p) ≡ {(∼ p) ⇒ (∼ q)}
Example 40: Show that ∼ ( p ⇒ q) ≡ { p ∧ (− q)} [Kurukshetra (B.E.) 2008]

Solution: If ∼ ( p ⇒ q) and p ∧ (∼ q) are equivalent, then


∼ ( p ⇒ q) ⇔ { p ∧ (∼ q)}
will be tautology (see 9.7.4), which is clear from the following truth table:

p q ~q p⇒q ∼ ( p ⇒ q) p ∧ ( ∼ q) ∼ ( p ⇒ q) ⇔ { p ∧ ( ∼ q)}

T T F T F F T
T F T F T T T
F T F T F F T
F F T T F F T

9.8 Algebra of Proposition


Now we shall study the Laws of Algebra of Proposition. These laws are some tautologies. Here we shall use
t for tautology and f for fallacy (contradiction).

9.8.1 Idempotent Law [U.P.T.U. (B.Tech.) 2008]

(i) p ∨ p ⇔ p, (ii) p ∧ p ⇔ p.
Proof: (i) Truth table for p ∨ p ⇔ p :

p p p∨ p p∨ p⇔ p

T T T T
F F F T

Since the column under p ∨ p ⇔ p contains only T ' s. Hence it is tautology.


Propositional Logic 435

(ii) Truth table for p ∧ p ⇔ p:

p p p∧ p p∧ p⇔ p

T T T T
F F F T

Hence, p ∧ p ⇔ p is a tautology.

Note: Here the notation ' ⇔' can be replaced by ' ≡ ' or by '='. So the notation '=' will be used in the following
laws.

9.8.2 Commutative Law


(i) p ∨ q = q ∨ p, (ii) p ∧ q = q ∧ p.
Proof: (i)

p q p∨q q∨ p p∨q=q∨ p
T T T T T
T F T T T
F T T T T
F F F F T

Similarly (ii) can be proved.

9.8.3 Associative Law [U.P.T.U. (B.Tech.) 2005]

(i) ( p ∨ q) ∨ r ⇔ p ∨ (q ∨ r); or ( p ∨ q) ∨ r = p ∨ (q ∨ r)
(ii) ( p ∧ q) ∧ r ⇔ p ∧ (q ∧ r); or ( p ∧ q) ∧ r = p ∧ (q ∧ r)

Proof: (i)

p q r p∨q ( p ∨ q) ∨ r q∨r p ∨ (q ∨ r) ( p ∨ q) ∨ r ⇔ p ∨ ( q ∨ r )

T T T T T T T T
T T F T T T T T
T F T T T T T T
T F F T T F T T
F T T T T T T T
F T F T T T T T
F F T F T T T T
F F F F F F F T
436 Discrete Mathematical Structures

(ii)

p q r p∧q ( p ∧ q) ∧ r q∧r p ∧ (q ∧ r) ( p ∧ q) ∧ r ⇔ p ∧ ( q ∧ r )

T T T T T T T T
T T F T F F F T
T F T F F F F T
T F F F F F F T
F T T F F T F T
F T F F F F F T
F F T F F F F T
F F F F F F F T

9.8.4 Distributive Law


(i) p ∨ (q ∧ r) = ( p ∨ q) ∧ ( p ∨ r) (ii) p ∧ (q ∨ r) = ( p ∧ q) ∨ ( p ∧ r)

Proof: (i) Disjunction is distributive over conjunction. Since the columns in the following table under
p ∨ (q ∧ r) and ( p ∨ q) ∧ ( p ∨ r) are identical. Hence, (i) is a equivalent.

p q r q∧r p∨q p∨r p ∨ (q ∧ r) ( p ∨ q) ∧ ( p ∨ r )

T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F T F F F
F F T F F T F F
F F F F F F F F
Propositional Logic 437

(ii) Conjunction is distributive over disjunction.

p q r q∨r p∧q p∧r p ∧ (q ∨ r) ( p ∧ q) ∨ ( p ∧ r )

T T T T T T T T
T T F T T F T T
T F T T F T T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F

Since the columns under p ∧ (q ∨ r) and ( p ∧ q) ∨ ( p ∧ r) are identical. Hence (ii) is a equivalent.

9.8.5 De-Morgan's Law


(i) ~( p ∨ q) ⇔ (~ p) ∧ (~ q) or ~( p ∨ q) = (~ p) ∧ (~ q) [U.P.T.U. (B.Tech.) 2003]

(ii) ~( p ∧ q) ⇔ (~ p) ∨ (~ q) or ~( p ∧ q) = (~ p) ∨ (~ q) [U.P.T.U. (B.Tech.) 2003]

Proof: (i)

p q p∨q ~ ( p ∨ q) ~p ~q (~ p) ∧ (~ q) ~ ( p ∨ q) ⇔ (~ p) ∧ (~ q)

T T T F F F F T
T F T F F T F T
F T T F T F F T
F F F T T T T T

(ii)

p q p∧q ~ ( p ∧ q) ~p ~q (~ p) ∨ (~ q) ~ ( p ∧ q) ⇔ (~ p) ∨ (~ q)

T T T F F F F T
T F F T F T F T
F T F T T F F T
F F F T T T T T
438 Discrete Mathematical Structures

9.8.6 Identity Law [U.P.T.U. (B.Tech.) 2008]

(i) The identity element (or identity statement) for conjunction is tautology t, and is such that

p∧t = t ∧ p = p
(ii) The identity element (or identity statement) for disjunction is contradiction (or fallacy) f and is such that

p∨ f = f ∨ p = p
Truth Table for (i)

p t p∧t t∧p

T T T T
F T F F

Truth Table for (ii)

p f p∨ f f ∨p

T F T T
F F F F

9.8.7 Complement Law


For every statement p there exists its negation (~ p) such that

(i) p ∨ (~ p) = t (ii) p ∧ (~ p) = f

9.8.8 Absorption Law [U.P.T.U. (B.Tech.) 2008]

(i) p ∨ ( p ∧ q) = p (ii) p ∧ ( p ∨ q) = p

p q ( p ∧ q) ( p ∨ ( p ∧ q)

T T T T
T F F T
F T F F
F F F F

From 1st and VIth column we see that

p ∨ ( p ∧ q) = p

(ii) Similarly as (i) part.


Propositional Logic 439

9.9 Truth-Table for Well Formed Formula


If we replace the propositional variables in a formula A by propositions, we get a proposition involving
connectives. The table given the truth value of such proposition obtained by replacing the propositional
variables by arbitrary propositions is called the truth table of A. If A have n propositional constants then
we have 2n possible combinations of truth values of propositions replacing the variables.

9.9.1 Null or Dominance Laws


(i) p∧ F =F =F ∧ p (ii) p∨T =T =T ∨ p
Proof: (i) Truth table for (i)

p F p∧F F ∧ p

T F F F

F F F F

Hence p ∧ F = F = F ∧ p

(ii) Truth table for (ii)

p T p∨T T ∨ p

T T T T
F T T T

Hence p ∨ T = T = T ∨ p

9.9.2 Negation Laws


(i) p ∧ (~ p) = F (ii) p ∨ (~ p) = T
Proof: (i) Truth Table for (i)

p (~ p) p ∧ (~ p)

T F F
F T F

Hence, from truth table we find p ∧ (~ p) = F


(ii) Truth table for (ii)

p ~p p ∨ (~ p)

T F T
F T T

Hence, from truth table we find p ∨ (~ p) = T


440 Discrete Mathematical Structures

9.9.3 Involution Laws [U.P.T.U. (B.Tech.) 2008]

~(~ p) = P
Proof: The truth table is

p ~p ~ (~ p)

T F T

F T F

Hence, from truth table we find


~(~ p) = p

9.9.4 Conditional Rules


( p ⇒ q) = (~ p ∨ q)
Proof: The truth table is

p q p⇒q ~p (~ p ∨ q)

T T T F T

T F F F F

F T T T T

F F T T T

Hence, from the table we find


( p ⇒ q) = (~ p ∨ q)

9.9.5 Contrapositive Law


( p ⇒ q) = (~ q) ⇒ (~ p)
Proof: The truth table is

p q ~p ~q p⇒q (~ q) ⇒ (~ p)

T T F F T T

T F F T F F

F T T F T T

F F T T T T

Hence, from the table we find


( p ⇒ q) = (~ q) ⇒ (~ p)
Propositional Logic 441

9.9.6 Biconditional or Equivalence Rules


(i) ( p ⇔ q) = ( p ⇒ q) ∧ (q ⇒ p) (ii) ( p ⇔ q) = ( p ∧ q) ∨ ((~ p) ∧ (~ q))
Proof: (i) The truth table is

p q p⇔q p⇒q q⇒ p ( p ⇒ q) ∧ ( q ⇒ p)

T T T T T T

T F F F T F

F T F T F F

F F T T T T

Hence, from the table we find ( p ⇔ q) = ( p ⇒ q) ∧ (q ⇒ p)

(ii) Similar table as of (i)

9.9.7 Exponential Law


( p ∧ q) ⇒ r = p ⇒ (q ⇒ r)
Proof: The truth table is

p q r p∧q ( p ∧ q) ⇒ r q⇒r p ⇒ (q ⇒ r)

T T T T T T T

T T F T F F F

T F T F T T T

T F F F T T T

F T T F T F T

F T F F T T T

F F T F T T T

F F F F T T T

Hence, we find from the table


( p ∧ q) ⇒ r = p ⇒ (q ⇒ r)

9.9.8 Absurdity Law


( p ⇒ q) ∧ ( p ⇒ ~ q) = (~ p)
442 Discrete Mathematical Structures

Proof: The truth table is

p q p⇒q ~q p ⇒~q ( p ⇒ q) ∧ ( p ⇒ ~ q) ~p

T T T F F F F

T F F T T F F

F T T F T T T

F F T T T T T

Hence, we find from the table


( p ⇒ q) ∧ ( p ⇒ ~ q) = (~ p)

Example 41: Confirm the truth value of the following:


(i) 4 + 6 = 12 ⇔ 2 + 4 = 8 (ii) 4 + 6 = 10 ⇔ 2 + 6 = 6
(iii) It is false that ‘Meerut’ is in U.K, then London is in India.

Solution: Let the first statement be denoted by p and second by q, then


(i) Statement Truth value
p ≡ 4 + 6 = 12 F

q≡2 + 4 = 8 F

∴ Truth table

p q p⇔q

F F T

Hence, the truth value of the statement 4 + 6 = 12 ⇔ 2 + 4 = 8 i.e., p ⇔ q is 'true' (T).

(ii) Statement Truth value


4 + 6 = 10 T

q= 2 + 4 = 6 T

∴ Truth table

p q p⇔q

T T T

Hence, the truth value of the statement 4 + 6 = 10 ⇔ 2 + 4 = 6 i.e., p ⇔ q is 'true' (T).

(iii) Statement Truth value


p ≡ Meerut is in U.K. F

q ≡ London is in India F

Thus, the statement 'Meerut' is in U.K. then London is in India' is denoted symbolically by p ⇒ q.
Propositional Logic 443

Hence, the statement 'it is false that Meerut is in U.K. then London is in India' is denoted symbolically by
~( p ⇒ q).
∴ Truth table

p q p⇒q ~ ( p ⇒ q)

F F T F

Hence, the truth value of the given statement is 'False' (F).

Example 42: Construct converse, inverse and contrapositive of the direct statement 'if 4 x − 2 = 10 then x = 3'

Solution: Let p ≡ 4 x − 2 = 10, q ≡ x = 3. Thus, the statement 'if 4 x − 2 = 10 then x ' = 3' is the direct
implication p ⇒ q.

(i) Converse: Converse of ' p ⇒ q ' is 'q ⇒ p' , hence the converse of given statement is as follows:
'' if x = 3 then 4 x − 2 = 10 ''

(ii) Inverse: The inverse of ' p ⇒ q' is '(~ p ⇒ (~ q)', hence the inverse of the given statement is as follows:
'' If 4 x − 2 ≠ 10 then x ≠ 3 ".

(iii) Contrapositive: The contrapositive of ' p ⇒ q' is '(~ q) ⇒ (~ p)', hence the contrapositive of the given
statement is as follows:
"If x ≠ 3 then 4x-2 ≠ 10"

Example 43: Write the converse, inverse and contrapositive of the following direct statements:

(a) If ABCD is a square then ABCD is a rectangle.

(b) When sun rises then it is morning.


Solution: (a) Let p ≡ ABCD is a square,

q ≡ ABCD is a rectangle.

∴ The given statement is the direct implication ' p ⇒ q '.

(i) Converse: Since the converse of ' p ⇒ q' is 'q ⇒ p' so the converse of given statement is:

'If ABCD is a rectangle then ABCD is a square'.


(ii) Inverse: Since inverse of ' p ⇒ q' is ' (~ p) ⇒ (~ q)' so the inverse of given statement is:
'If ABCD is not a square then ABCD is not a rectangle'.

(iii) Contrapositive: Since contrapositive of ' p ⇒ q' is '(~ q) ⇒ (~ p)', so the contrapositive of the given
statement is:
'If ABCD is not a rectangle then ABCD is not a square'.

(b) Assuming p and q as above in (a), the given statement has:

(i) Converse: 'When it is morning then sum rises'.


444 Discrete Mathematical Structures

(ii) Inverse: 'When sun does not rise then it is not morning'.
(iii) Contrapositive: 'When it is not morning then sun does not rise'.

Example 44: Let p ≡ it is rainy season. q ≡ the mango is delicious, construct the following statements:
(i) p⇒q (ii) its converse, (iii) its inverse, (iv) contrapositive,

Solution:
(i) If it is rainy season, then the mango is delicious.
(ii) If the mango is delicious, then it is rainy season.
(iii) If it is not rainy season, then the mango is not delicious.
(iv) If the mango is not delicious, then it is not rainy season.
(v) If it is rainy season and mango is not delicious.

Example 45: If the truth value of p ⇔ q is: (i) F, (ii) T, then find the truth value of p ∨ q.
Solution: We know that the truth value of p ⇔ q is F, when either one of p and q has truth value F and
other T.
Truth table

p⇔q p q p∨q

F T F T
F F T T

Since the entries in the column under p ∨ q are of only T ' s, hence the truth value of p ∨ q is True' (T).

(ii) The truth value of p ⇔ q is T When its both components P and q has the same truth values (i.e., T or F).

Truth table

p⇔q p q p∨q

T T T T
T F F F

From truth table we see that the truth value of p ∨ q is sometimes T and sometimes F, hence the truth value
of p ∨ q cannot be delicious.

Example 46: If the truth value of p ∨ q is F, then decide the truth value of p ⇔ q.
Solution: We know that the truth value of p ∨ q is F, only in the condition 'when p and q both have truth
values F'. Hence the truth value of p ⇔ q is T (see following truth table).

p∨q p q p⇔q

F F F T
Propositional Logic 445

Example 47: If P ⇔ Q is true, then determine the truth value of P ∨ (~ Q ).


Solution: Truth table.

P ⇔Q P Q ~Q P ∨ (~ Q)

T T T F T
T F F T T

Hence, the truth value of P ∨ (~ Q ) is 'True' (T).

Example 48: If p is a statement such that for any statement Q, the statement P ∧ Q is false, then what do you
conclude about the truth value of P ?
Solution: We know that the truth value of P ∧ Q is 'True' when truth values of P and Q both are 'True', and
in all other cases the truth value of P ∧ Q is 'False'. Therefore, in the given condition, the truth value of P is
given by the third column of the following truth table:

P∧Q Q P

F F T
F T F
F F F

Example 49: If P is a statement such that for any statement Q the statement P ∨ Q is true, then what do you
conclude about the truth value of P?
Solution: The truth value of P is given by the third column of the following truth table:

P∨Q Q P

T T F
T F T
T T T

Example 50: Prepare the truth table of the statement

A = ( p ⇒ q ∧ r) ∨ (~ p ∧ q). [U.P.T.U. (B.Tech.) 2009]

or

Find a formula A that uses the variable p, q and r such that A is contradiction.

[U.P.T.U. (B.Tech.) 2009]


446 Discrete Mathematical Structures

Solution: Truth table for ( p ⇒ q ∧ r) ∨ (~ p ∧ q):

p q r q∧r p ⇒ (q ∧ r) ~p ~p∧q ( p ⇒ q ∧ r ) ∨ (~ p ∧ q) = A

T T T T T F F T
T T F F F F F F
T F T F F F F F
T F F F F F F F
F T T T T T T T
F T F F T T T T
F F T F T T F T
F F F F T T F T

Example 51: Construct a truth table for the following statement:


(i) ( p ∨ q ⇒ s ) ⇔ ( p ⇔ s ) ∨ (q ⇒ s )
(ii) [( p ⇒ q) ∧ (q ⇒ r)] ⇒ [ p ⇒ r] [U.P.T.U. (B.Tech.) 2005]

Solution: (i) Truth table for ( p ∨ q ⇒ s ) ⇔ ( p ⇒ s ) ∨ (q ⇒ s ):

p q s p∨q p∨q⇒s p⇒s q⇒s ( p ⇒ s) ( p ∨ q ⇒ s) ⇔


∨ (q ⇒ s ) ( p ⇒ s ) ∨ (q ⇒ s )

T T T T T T T T T
T T F T F F F F T
T F T T T T T T T
T F F T F F T T F
F T T T T T T T T
F T F T F T F T F
F F T F T T T T T
F F F F T T T T T
Propositional Logic 447

(ii) Truth table for [( p ⇒ q) ∧ (q ⇒ r)] ⇒ [ p ⇒ r]:

p q r p⇒q q⇒r p⇒r ( p ⇒ q) ∧ ( q ⇒ r ) [( p ⇒ q) ∧ ( q ⇒ r ) ]


⇒ [ p ⇒ r]

T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T F F T
F T T T T T T T
F T F T F T F T
F F T T T T T T
F F F T T T T T

Example 52: Prove that the following statement is a tautology.

(~ B ) ∧ ( A ⇒ B ) ⇒ (~ A ) [U.P.T.U. (B.Tech.) 2005]

Solution: Truth table for given statement:

A B ~A ~B A⇒B ~ B ∧ ( A ⇒ B) (~ B ) ∧ ( A ⇒ B ) ⇒ (~ A )

T T F F T F T
T F F T F F T
F T T F T F T
F F T T T T T

Hence, (~ B ) ∧ ( A ⇒ B ) ⇒ (~ A ) is a tautology.

Example 53: If p ≡ Ram is beautiful, q ≡ Ram is mixable, r ≡ His friends like Ram,
then write the following statement in language:
(a) ( p ⇒ q) ∨ ( p ⇒ r) (b) p ⇒ (q ∨ r)
Examine, are the above statement equivalent?

Solution:
(a) If Ram is beautiful then either Ram is mixable or his friends like Ram.
(b) If Ram is beautiful then he is mixable or his friends like him.
448 Discrete Mathematical Structures

Combined truth table for (a) and (b):

p q r p⇒q p⇒r ( p ⇒ q) ∨ ( p ⇒ r ) q∨r p ⇒ (q ∨ r)

T T T T T T T T
T T F T F T T T
T F T F T T T T
T F F F F F F F
F T T T T T T T
F T F T T T T T
F F T T T T T T
F F F T T T F T

From above truth table, we see that the entries in sixth and eighth column are identical.
Hence, the statements given by (a) and (b) above are logically equivalent.

Example 54: Prepare the tables of the following statement:


(i) ( p ⇔ q) ∧ (r ∨ q) [U.P.T.U. (B.Tech.) 2007]

(ii) {( p ∨ q) ∧ r} ⇒ q
Solution: (i) Truth table of ( p ⇔ q) ∧ (r ∨ q):

p q r p⇔q r∨q ( p ⇔ q) ∧ ( r ∨ q)

T T T T T T
T T F T T T
T F T F T F
T F F F F F
F T T F T F
F T F F T F
F F T T T T
F F F T F F
Propositional Logic 449

(ii) Truth table of {( p ∨ q) ∧ r} ⇒ q:

p q r p∨q ( p ∨ q) ∧ r {( p ∨ q) ∧ r} ⇒ q

T T T T T T
T T F T F T
T F T T T F
T F F T F T
F T T T T T
F T F T F T
F F T F F T
F F F F F T

Example 55: Which of the following sentences are statements ? What are truth values of those that are
statements?
(i) May God bless you. (ii) Do you speak English?
(iii) 4 – x = 8 (iv) Seven is a prime number.
(v) Please try to solve the problem.
Solution: A statement (proposition)is a declarative sentence which is either true or false but not both.
These two values are 'truth' and 'false' denote by symbol 1 and 0 or T and F.
(i) It is not a statement [wish] (ii) It is not a statement.
(iii) It's not statement. (iv) It is a statement. It’s value is true.
(v) It's a command. It is not a statement.

Example 56: Write the negation of the following:


(i) If she studies, she will pass in exam. (ii) Anil is not rich and Kanchan is poor.
(iii) No one wants to buy my house. (iv) A cow is an animal.
(v) If the determinant of a system of linear equations is zero then either the system has no solution or it has an
infinite number of solution.
Solution:
(i) P : If she studies., Q : She will pass in exam.
Given statement: P → Q = ¬ P ∨ Q
Its negation: ¬ (¬ P ∨ Q ) = p ∧ ¬ q
i.e., If she studies, she will not pass in the exam.
(ii) P : Anil is not rich and Q : Kanchan is poor.
Given statement: (P ∧ Q )
Its negation: ¬ (P ∧ Q ) = ¬ P ∨ ¬ Q i.e., Anil is rich or Kanchan is not poor.
(iii) P : x wants to buy my home.
Given statement: ∀ x (¬ p)
Its negation: ¬ (∀ x (¬ p)) = ∃ x ( p) i.e., someone wants to buy home.
450 Discrete Mathematical Structures

(iv) P : A cow is an animal.


Its negation: ¬ P i.e., A cow is not an animal.
(v) P : Determinant of a system of linear equation is zero.
Q : System has no solution.
R : System has an infinite No. of solution.
Given statement: p → (Q ∨ R ) = ¬ P ∨ (Q ∨ R )
Its negation: ¬ (¬ P ∨ Q ∨ R ) = P ∧ ¬ Q ∧ ¬ R
If determinant of a system of linear equation is zero, system has solution and not has an infinite number of
solutions.

Example 57: If P = question paper is hard.


q = I will fail in the examination. Then translate the following sentences into symbols:
(i) Question paper is not hard and I will fail in the examination.
(ii) If I will not fail in the examination, then question paper is not hard.
(iii) If question paper is hard, then I will fail in the examination.
(iv) Question paper is not hard if and only if I will fail in the examination.
(v) If question paper is not hard then I will fail in the examination.
Solution: Given:
P = Question paper is hard. Q = I will fail in the examination.

(i) ¬ p∧ q (ii) ¬ q→ ¬ p (iii) p → q


(iv) ¬ p⇔q (v) ¬ p→ q

Example 58: If p ≡ it is 10 ‘o’ clock, q ≡ the train is late, then statement in words are the following resultants:
(i) q∨¬ p (ii) p∧ q (iii) p∧¬q
(iv) ¬ ( p ∧ q) ≡ ¬ p ∨ ¬ q (v) ¬ p∧¬q

Solution:
(i) q∨¬ p
The train is late or it is not 10 ‘o’ clock.
(ii) p∧ q
It is 10 ‘o’ clock and the train is late.
(iii) p∧¬q
It is 10 ‘o' clock or the train is not late.
(iv) ¬ ( p ∧ q) = ¬ p ∨ ¬ q
It is not 10 ‘o’ clock or the train is not late.
(v) The question paper is not hard and I will not fail in the examination.
Example 59: Determine whether the following formulate are tautology, contradiction and satisfiable:

(i) [ p ∧ ( p ⇒ q] ⇒ ¬ q (ii) ( p ⇒ q) ∧ (q ⇒ r) ∧ ( p ∧ ¬ r) (iii) p ∧ (q ∧ ¬ p)

Solution: Similar solution as example 14.


Propositional Logic 451

Example 60: Define the term proposition (or statement). Classify the following expression are statement or
not:
(i) May you live long. (ii) The population of India goes upto 100 million in year 2000.
(iii) x + y = 30 (iv) All roses are white. (v) 7 is a prime number.

Solution: Proposition or statement:


A statement (or proposition) is a sentence which is either true or false but not both.
(i) It is not a statement. (ii) It is a statement.
(iii) It is not a statement because it is true or false depending on the values of x and y.
(iv) It is a statement. (v) It is a statement.

Example 61: Consider the following:


p : He is a carpenter., Q : He is making a table.
Write down the following statement into symbols.
(i) He is a carpenter but is not making a table.
(ii) He is a carpenter or making table.
(iii) Neither he is a carpenter nor he is making a table.
(iv) It is false that he is a carpenter or making a table.
(v) He is not a carpenter nor he is making a table.

Solution: Given the following statements:


P : He is a carpenter. Q : He is making a table.
(i) p∧ ¬ Q (ii) p∨Q (iii) ¬ p∧¬Q
(iv) ¬ (p ∨ Q ) (v) ¬ p→ ¬ Q

Example 62: Consider the following.


p : You take a course in Discrete Mathematics,
q : You understand logic,
r : You get an A on the final exam.
Write in simple sentences the meaning of the following:
(i) q⇒r (ii) − p⇒−q (iii) ( p ∧ q) ⇒ r (iv) ( p ∧ q) ⇒ − r (v) − (− r)

Solution:
(i) If you understand logics then you get an A on the final exam.
(ii) If you will not take a course in Discrete Mathematics then you will not understand logic.
(iii) If you take a course in Discrete Mathematics and understand logic than you will get an A on the final
exam.
(iv) If you take a course in Discrete Mathematics and you understand logic then you will not get an A on the
final exam.
(v) You get an A on the final exam.
452 Discrete Mathematical Structures

Example 63: Determine whether the following formulas are tautology, contradiction and satisfactiable.

(i) p ∧ (q ∧ r) ⇒ ( p ∧ q) ∨ ( p ∧ r) (ii) [( p ∧ q) ⇒ p] ⇒ (q ∧ ¬ q)

(iii) p ∧ (q ∧ ¬ p)
Solution: (i)

p q r q∧r p ∧ (q ∧ r) p∧q p∧r ( p ∧ q) ∨ ( p ∧ r ) p ∧ (q ∧ r) ⇒ ( p ∧ q)


∨ ( p ∧ r)

T T T T T T T T T
T T F F F T F T T
T F T F F F T T T
T F F F F F F F T
F T T T F F F F T
F T F F F F F F T
F F T F F F F F T
F F F F F F F F T

Hence, it is a tautology.
(ii)

p q p∧q ( p ∧ q) ⇒ p ¬q q∧¬ q [( p ∧ q) ⇒ p] ⇒ ( q ∧ ¬ q)

T T T T F F F
T F F T T F F
F T F T F F F
F F F T T F F

Hence, it is a contradiction
(iii)

p q p∧q ¬ p q∧¬ q p ∧ ( q ∧ ¬ p)

T T T F F F
T F F T F F
F T F F F F
F F F T F F

Hence, it is a contradiction.
Propositional Logic 453

Example 64: Consider the following:


P : This computer is good. Q : This computer is cheap.
Write each of the following statements in symbolic forms:
(i) This computer is good and cheap. (ii) This computer is not good but cheap.
(iii) This computer is costly but good. (iv) This computer is neither good nor cheap.
(v) This computer is good or cheap.
Solution:
(i) P ∧Q (ii) (~ P )∧ Q (iii) ( p) ∧ (~ Q ) (iv) (~ p) ∧ (~ Q ) (v) P ∨Q

Example 65: Write in symbolic form the statement: The crop will be destroyed if there is a flood.
Solution: Let the statement be denoted as:

P : The crop will be destroyed. Q : There is a flood.


Q → P : If there is a flood, the crop will be destroyed.

Example 66: Write the following statement in symbolic form: If either Jerry takes Calculus or Ken takes
Sociology then Lary will take English.
Solution: Denoting the statement as.
P : Jerry takes Calculus. Q : Ken takes Sociology. R : Lary takes English
The given statement can be symbolizes as: (P ∨ R ) → R

Example 67: If p = He is tall, q = He is handsome, then write down the following statements in symbols (i.e.,
in the language of logic).
(i) He is tall and handsome. (ii) He is tall but not handsome.
(iii) It is false that he is short and handsome. (iv) He is neither tall nor handsome.
(v) It is not true that he is short or not handsome. (vi) He is tall or he is short and handsome.

Solution: In terms of statements letters p, q and logical connectives, the symbolic forms are.
(i) p∧ q (ii) p ∧ (− q) (iii) ~(~ p ∧ q)
(iv) (~ p) ∧ (− q) (v) ~(~ p ∨ ~ q) (vi) p ∨ (~ p ∧ q)

Example 68: Find the truth value of each of the following compound statement:
(i) If 4 + 3 = 9, then 5 + 5 = 10.
(ii) It is not true that 3 + 3 = 7 if and only if 6 + 6 = 14.
(iii) Paris is in England or London is in France.
(iv) It is not true 2 + 2 = 5 or 3 + 2 = 5.
(v) It is false that if Paris is in England then London is in France.

Solution:
(i) Let p stands for ‘4+3=9’ and q for ‘5+5=10’. Clearly p is false and q is true. So p ⇒ q is true. Hence the
given statement is true.
454 Discrete Mathematical Structures

(ii) Let p stands for ‘3+3=7’ and q for ‘6+6=14’. Let r denote ‘p if and only if q’. Clearly p and q are each false.
So p ⇔ q is true i.e., r is true. But the given statement is the negation of r and hence the given statement is
false.
(iii) Let p stands for ‘Paris is in England’ and q for ‘London is in France’. Here p and q are each false, the given
statement is p ∨ q which is false.
(iv) Let p stands for ‘2+2=5’ and q for ‘3+2=5’. So the given statement is ~( p ∨ q). Let r denote p ∨ q. Here p is
false and q is true and therefore p ∨ q i.e., r is true. Now the given statement is ~( p ∨ q)i.e., ~r, it is false.

(v) Let p ≡ Paris is in England. q ≡ London is in France.


So the given statement is ~( p ⇒ q). Here p and q are each false and therefore p ⇒ q is true. Consequently
the given statement i.e., ~( p ⇒ q) is false.

1. Are the following propositions?


(a) 10<3 (b) x+2 ≤ 5
(c) If I were a Prime Minister. (d) Aha ! what a good news?
(e) 4 is an even number.
2. Write the following sentences in symbolic notations:
(a) Neha will go to college or will live in the house and will study.
(b) Either Kirty is happy or sad. Kirty is not sad. Hence Kirty is happy.
(c) Either Garima is a girl or she does not like to study. Garima likes study. Hence, she is a girl.
3. Let p ≡ Mathematics is hard, q = 4 is even number, then write the following in proposition:

(a) p∧ q (b) p∨ q (c) ~( p ∧ q)


(d) ~( p ∨ q) (e) p ⇒ (~ q) (f) (~ p) ∧ q

4. Prove that p ⇔ ~(~ p), where p is a statement.

5. Prove that each of the following is a tautology:


(a) ~{(~ p) ∧ (~ q)} ⇔ ( p ∨ q) (b) ( p ⇒ q) ⇔ {(~ p) ∨ q}
(c) { p ∧ ( p ⇒ q)} ⇒ q (d) ~{ p ∧ (~ p)}
(e) [( p ⇒ q) ∧ (q ⇒ r)] ⇒ ( p ⇒ r) (f) p ∧ ( p → q) ⇒ q
(g) (~ q) ∧ ( p → q) ⇒ ~ p (h) ( p ∧ (~ q)) ∧ [(~ p ∨ ~ q)] ∨ q
(i) (~ p ∧ q) ⇒ (q → p) (Not a tautology)
(j) p ⇒ p ∨ q and q ⇒ ( p ∨ q) (k) ( p ∨ q) = ( p ∧ q)
(l) (~ p) ∨ q (m) ~{ p (~ p)}
(n) p ⇒ (~ p) ⇔ ~ p (o) ( p ⇒ q) ⇔ (~ p ∨ q)
[U.P.T.U. (B.Tech.) 2006]
Propositional Logic 455

6. Prove that following are contradictions:


(a) ( p ∨ q) ∧ { p ∨ (~ q)} ∧ {(~ p) ∨ q} ∧ {(~ p) ∨ ( ~ q)}
(b) [( p ∧ q) ∨ {q ∧ (~ r)}] ⇔ [{(~ p) ∧ r} ∨ {(~ q) ∧ (~ r)}]
7. Prove that the statements p ∨ q and ~( p) ∧ (~ q) are contradictory to each other.
8. Prove that (~ p) ∧ (~ q) and ~(~ p) ∧ ~(~ q) are contradictory to each other.
9. Prepare the truth table of the following:
(a) ( p ⇒ q) ∧ ~ q (b) ( p ⇔ q) ∧ (r ∨ q)
(c) ~( p ∧ q) ∨ ~(q ⇔ p) (d) [ p ⇒ (~ q ∨ r)] ∧ [~ q ∨ ( p ⇔ ~ r)]
(e) (q ⇒ p) ∨ ( p ⇒ q) (f) ( p ∨ q) ∧ [(− r) ∨ p ∧ q]
10. Show that p ⇒ (q ⇒ r) ≡ ( p ∧ q) ⇒ r.
11. Show that following is a tautology.
(i) ( p ⇔ q ∧ r) ⇒ (~ r ⇒ ~ p) (ii) p → (q → r) → [( p → q) → ( p → r)]
[U.P.T.U. (B.Tech.) 2005]

12. Show that [( p ∧ q) ⇒ p] ⇒ (q ∧ ~ q) is a contradiction.


13. (a) What is a proposition.
(b) Define the term logical operators.
(c) Explain various operators and give their truth tables at least five such operations.
14. Define the following terms with appropriate truth table
(a) Conjunction (b) Disjunction
(c) Conditional (d) Bi-conditonal
(e) Negation. [U.P.T.U. (B.Tech.) 2004]

15. What do you mean by Mathematical logic? Discuss the different logic connectives.
[P.T.U. (B.E.) Punjab 2005]

16. Discuss different logic connectives.


17. Construct the truth table of the following:
(a) (P ∧ Q ) ∧ (Q ∧ R ) ∧ (R ∧ S ) [U.P.T.U. (B.Tech.) 2003]

(b) ¬ P ∧ (¬ Q ∨ S ) ∨ (R ∧ S ) ∧ (S ∨ R ) [U.P.T.U. (B.Tech.) 2004]

18. Check the following statement by constructing truth table is it the tautology or not.
(a) P∨P =P (b) P ∨ (P ∧ Q ) = P (c) ¬ (P ∨ Q ) = ¬ P ∧ ¬ Q
19. Differentiate between the following with truth table
(a) Disjunction v/s. Conjunction
(b) Conditional v/s. Bi-Conditional
(c) Tautology v/s. Contradiction. [U.P.T.U. (B.Tech.) 2007]

20. Prove that following are contradictions.


(a) ( p ∨ q) ∧ { p ∨ (~ q)} ∧ {(~ p) ∨ q} ∧ {(~ p) ∨ ~ q)}
(b) [( p ∧ q) ∨ {q ∧ (~ r)}] ⇒ [{(~ p) ∧ r} ∨ {(~ q) ∧ (~ r)}]
456 Discrete Mathematical Structures

21. Establish the equivalence using truth table


( p ⇒ q) ⇒ (q ∧ q) ≡ (− p ⇒ q) ∧ (q ⇒ p)
22. Show that [[( p ∧ q) ⇒ p] ⇒ (q∧ ~ q) is contradiction
23. Show that

(a) p ⇒ (q ⇒ r) ≡ ( p ∧ q) ⇒ r (b) ( p ⇒ q) ⇒ ( p ∧ q) ≡ (− p ⇒ q) ∧ (q ⇒ p)
(c) ~( p ⇔ q) = p ⇔ (~ q). (d) ( p ∨ q) ⇒ ( p ∧ q) ≡ p ⇔ q
[U.P.T.U. (B.Tech.) 2009]

24. Prove that the statement p ∨ q and (~ p) ∧ (~ q) are contradictory to each other.
25. Construct the truth table of the following:
(a) ( p ∧ q) ∨ ( p ∧ q) ∨ ( p ∧ q) ∨ ( p ∧ q)
(b)  P ∧ ( Q ∧ R ) ∨ (Q ∧ R ) ∨ (P ∧ R ) [U.P.T.U. (B.Tech.) 2006]

26. What are the connectives? Define each of them through example.
27. Define the statement formula. Give some examples.
28. Construct the truth table of the following formula.
(i) Ø (p ∨ (Q ∧ R )) ⇔ ( p ∨ q) ∧ ( p ∨ R ) [U.P.T.U. (B.Tech.) 2006]

(ii) (G ∧ ¬H) ⇔ (G ∧ H )
(iii) ¬ (A ⇒ B)∨ (A ∨ ¬ B)
29. Show that the truth value of the following formula are independent of their components.
(i) ( p ∧ ( p → q)) ∧ → q [U.P.T.U. (B.Tech.) 2006]

(ii) ( p → q) ⇔ ( p ∨ q))
(iii) (( p → q) ∧ (q → p)) → ( p → r) [U.P.T.U. (B.Tech.) 2007]

30. Show that the given formula is a tautology.


{( p ∨ q)∧ ~(~ p ∧ (~ q ∨ ~ r)} ∨(~ p∧ ~ q) ∨ (~ p ∧ ~ r) [U.P.T.U. (B.Tech.) 2007]

31. Give a brief description of laws of equivalence.

32. Determine whether the following statements are tautology, contradiction or satisfiable.
(i) p ∧ (~ p)
(ii) p → (q → p)
(iii) [ p ∧ ( p → q)] → ~ q
(iv) ( p → q) ∧ (q → r) ∧ ( p ∧ ~ r) [U.P.T.U. (B.Tech.) 2003]

(v) q ∨ (~ q ∧ p)
(vi) ( p ∨ ~ q) ∧ (~ p ∨ ~ q) ∨ q [U.P.T.U. (B.Tech.) 2008]
Propositional Logic 457

1. (a) Yes; (b) No; (c) No; (d) No; (e) Yes.
2. (a) p ≡ Neha will go to college, q ≡ She will live in the house and r ≡ She will study.

∴ Statement: p ∨ (q ∧ r).
(b) p ≡ Kirty is happy, q ≡ Kirty is sad.

∴ Statement: ( p ∨ q) ∧ (~ q) ⇒ p.

(c) p ≡ Garima is a girl, q ≡ Garima does not like to study.

∴ Statement: ( p ∨ ~ q) ∧ q ⇒ p]

3. (a) Mathematics is hard and 4 is even number.

(b) Either Mathematics is hard or 4 is even number.

(c) It is not true that Mathematics is hard and 4 is even number.

(d) It is false that Mathematics is hard or 4 is even number.

(e) If Mathematics is hard then 4 is not even number.

(f) Mathematics is not hard and 4 is even number.


18. (a) Yes (b) Yes (c) No
32. (i) Contradiction (ii) Tautology
(iii) Satisfiable (iv) Contradiction
(v) Satisfiable (vi) Tautology

9.10 Normal Forms


Let p1 , p2, p3 , K pn be n given atomic variables. If these n atomic variables forms a statement formula
A ( p1 , p2, p3 , K pn ). Then we have 2n possible combinations of truth values (T or F ) of statements replacing

the variables.

The formula A is a Tautology if A has the truth value T for all possible assignments of the truth values to
the variables p1 , p2, p3 , K pn and A is called Contradiction if A has truth value F for all possible
assignments of the truth values of the n variables. A is said to be satisfiable if A has the truth value T for at
least one combination of truth values assigned to p1 , p2, p3 K pn

9.10.1 Decision Problem


The problem of determining whether a given statement formula is a Tautology or a Contradiction is
called a Decision Problem.
458 Discrete Mathematical Structures

9.10.2 Elementary Products


The formula which is product (conjunction) of the variables and their negations is called an elementary
product. If p and q are two given variables, then
p ∧ ~ p, ~ p ∧ q, p ∧ (~ p) are some examples of elementary product.

9.10.3 Elementary Sum


The sum of (disjunction) of variables p and their negation in a formula is called Elementary Sum.

If p and q are the given variables then p ∨ (~ p), ~ p ∨ q, ~ q ∨ p ∨ (~ p) are some examples of elementary
sum.

9.10.4 Disjunctive Normal Form


Let A be a given formula. Another formula B which is equivalent to B is called Disjunctive Normal Form
of A if B is a sum of elementary products.
A disjunctive normal form of a given formula can be formed as
(i) Replace ⇒, ⇔ by using the logical connectives ∧, ∨ and ~ or 
(ii) Use De Morgan’s laws to eliminate ~ before sums or products.
(iii) Apply distributive laws repeatedly and eliminate product of variables to obtain the required normal form.

Example 69: Obtain disjunctive normal form of


p ∧ ( p ⇔ q)
Solution: p ∧ ( p ⇔ q) = p ∧ (~ p ∨ q)
= { p ∧ (~ p)} ∨ { p ∧ q}

Example 70: Obtain disjunctive normal form of


~( p ∨ q) ⇔ ( p ∧ q)
Solution: Let P = ~( p ∨ q) and Q = ( p ∧ q)
∴ ~( p ∨ q) ⇔ ( p ∧ q)

⇒ P ⇔Q

⇒ (P ∧ Q ) ∨ (~ P ∧ ~ Q )

⇒ (− ( p ∨ q) ∧ ( p ∧ q)) ∨ (( p ∨ q) ∧ ~( p ∧ q))

⇒ (− p ∧ ~ q) ∧ ( p ∧ q) ∨ ( p ∨ q) ∧ (~ p ∨ ~ q)

[By Demorgan’s laws]

⇒ (~ p ∧ ~ q ∧ p ∧ q) ∨ (( p ∨ q) ∧ ~ p) ∨ (( p ∨ q) ∧ (− q))

⇒ (~ p ∧ ~ q ∧ p ∧ q) ∨ ( p ∧ (~ p)) ∨ (q ∧ (− p)) ∨ ( p ∧ (− q)) ∨ (q ∧ ~ q)

This is DNF
Propositional Logic 459

Example 71: Obtain disjunctive normal form of


p ∨ (~ p → (q ∨ (q → ~ r)))
Solution: p ∨ (~ p → (q ∨ (q → ~ ∨ r))) = p ∨ (~ p → (− q ∨ ~ r)))
= p ∨ ( p ∨ (q ∨ (~ p ∨ ~ r)))

= p ∨ p ∨ q ∨ ~q ∨ ~r

= p ∨ q ∨ ~q ∨ ~r

which is required disjunctive normal form.

9.10.5 Conjunctive Normal Form


Let A be a given formula, another formula B which is equivalent to A is called Conjunctive normal form if
B is a product of an elementary sum.

Example 72: Obtain conjunctive normal form:


~( p ∨ q) ↔ ( p ∧ q)
Solution: Let P = ~( p ∨ q) and Q = ( p ∧ q)
Now, P ↔Q

⇒ (P → Q ) ∧ (Q → P )

⇒ ~( p ∨ q) ↔ ( p ∧ q)

⇒ [~( p ∨ q) → ( p ∧ q)] ∧ [( p ∧ q) → ~( p ∨ q)]

⇒ [( p ∨ q) ∨ ( p ∧ q)] ∧ [~( p ∧ q) ∨ ~( p ∨ q)]

⇒ [( p ∨ q) ∨ ( p ∧ q)] ∧ [(~ p ∨ ~ q) ∨ (~ p ∧ ~ q)] [By Demorgan’s laws]

⇒ [( p ∨ q ∨ p) ∧ ( p ∨ q ∨ q) ∧ (~ p ∨ ~ q ∨ ~ p) ∧ (~ p ∨ ~ q ∨ ~ q)

which is required conjunctive normal form.

Example 73: Obtain DNF of:


(i) ( p → q) ∧ (~ p ∧ q) (ii) ( p ∧ ( p → q)) → q

Solution: (i) p → q is logical equivalent to (~ p ∨ q)


∴ ( p → q) ∧ (~ p ∧ q)

= (~ p ∨ q) ∧ (~ p ∧ q)

= (~ p ∨ ~ p ∧ q) ∨ (q ∧ ~ p ∧ q)

= (~ p ∧ q) ∨ (q ∧ ~ p)
(ii) p ∧ ( p → q) → q = ~(~ p ∧ ~ p ∨ q) ∨ q
= ~ p ∨ ~(~ p ∨ q) ∨ q

= ~ p ∨ ( p ∧ ~ q) ∨ q
460 Discrete Mathematical Structures

Example 74: Obtain CNF and DNF of ( p ∧ q) ∧ (q → p)


Solution: ( p ∧ q) ∧ (q → p) = (~ p ∨ q) ∧ (~ q ∨ p)
= [(~ p ∨ q) ∧ ~ q] ∨ [(~ p ∨ q) ∧ p]

= (~ p ∧ ~ q) ∨ (q ∧ p) This is DNF

= [(~ p ∧ ~ q) ∧ q][(~ p ∧ ~ q) ∧ p]

= (~ p ∧ q) ∧ (b ∧ ~ q)

This is CNF.

9.11 Connectivity NOR AND NAND


9.11.1 NOR or joint denial (↓) [U.P.T.U. (B.Tech.) 2005]

Let p and q be two statements.

The statement of the type p ↓ q read as ' Neither p nor q' is called joint denial or NOR statement.

Thus, p ↓ q = ~( p ∨ q)

To make it more clear the joint denial statement, in the example of conditional, neither the father had
promised to purchase a scooter nor the son has stood first in the examination.

It means that p ↓ q is true only when p and q both are false.

Truth Table for p ↓ q

p q p↓q

T T F
T F F
F T F
F F T

Example 75: Express the three connective ∨, ∧ and ~ in terms of the connective ↓.
Solution: Truth tables for three connectives are as follows:
(i)

p ~p p↓ p

T F F
F T T

∴ ~ p = p ↓ p.
Propositional Logic 461

(ii)

p q p∧q p↓ p q↓q ( p ↓ p) ↓ ( q ↓ q)

T T T F F T
T F F F T F
F T F T F F
F F F T T F

∴ p ∧ q = ( p ↓ p) ↓ (q ↓ q)

(iii)

p q p∨q p↓q ( p ↓ q) ↓ ( p ↓ q)

T T T F T
T F T F T
F T T F T
F F F T F

∴ p ∨ q = ( p ↓ q) ↓ ( p ↓ q).

9.11.2 NAND (↑) [U.P.T.U. (B.Tech.) 2005]

The connective NAND is denoted by symbol ↑ and is defined as “negation of AND of two statements’’.

If p and q are two statements then their NAND is denoted by p ↑ q. Thus

p ↑ q = ~( p ∧ q)

Thus, p ↑ q is false only in the case when both p and q are true.

Truth table for p ↑ q

p q p↑q

T T F
T F T
F T T
F F T

(3) XOR ( ⊗ )

The XOR of two statements is True if only if one of the two statements is true. In other words, if p and q are
two statements then their XOR is denoted by p ⊗ q and is True if p is true or if q is true but not p and q both
be true.
462 Discrete Mathematical Structures

Truth Table for p ⊗ q

p q p⊗q

T T F
T F T
F T T
F F F

Remark: The connection ↓, ↑ and ⊗ are called Derived Connections.

Example 76: Construct the truth table for propositions p ↑ q ↑ r and p ⊗ q ⊗ r.


[Rohtak (B.E.) 2007, Kurukshetra (M.C.A.) 2005, 2009]

Solution:

p q r p↑q p↑q↑r p⊗q p⊗q⊗r

T T T F T F T
T T F F T F F
T F T T F T F
T F F T T T T
F T T T F T F
F T F T T T T
F F T T F F T
F F F T T F F

9.11.3 Argument
In logical mathematic, We require the process of reasoning. Given a certain set of propositions (i.e.,
statements), we are required to derive other propositions by logical reasoning. The given set of
propositions is called Premises (or Hypothesis) and the proposition derived from this set is called
Conclusion.
OR

9.11.4 Argument
An argument is a process which yield a conclusion (i.e., another proposition) from a given set of
propositions, called premises. Let premises (i.e., given set of propositions) be p1 , p2, . . . , pn and let
argument yield the conclusion (i.e., another proposition) q, then such an argument is denoted by
p1 , p2. . . , pn |— q
Propositional Logic 463

9.11.5 Valid Argument


An argument p1, p2. . . , pn|— q is called Valid if q is true whenever all its premises p1 , p2, . . . , pn are true. An

argument is called Valid if and only if the premises implies the conclusion. Thus, the argument
p1 , p2, . . . , pn|— q is said to be valid if and only if the statement

( p1 ∧ p2 ∧ K ∧ pn ) → q is tautology.

9.11.6 Fallacy Argument


An argument which is not valid is said to be a fallacy or an invalid Argument.

9.11.7 Representation of an Argument


An argument p1 , p2, . . . , pn|— q is written as
p1 
p2 
premises
M 

pn 

q (Conclusion)
In the above representation premises are listed above the horizontal line and the conclusion below the
horizontal line.

Example 77: Show that the following argument is valid:


p∨ q
~p
q
Solution: Here the two premises are p ∨ q and ~p, and the conclusion is q. The given argument will be
valid if [( p ∨ q) ∧ ~ p] → q is a tautology. Now constructing the truth table

p q ~p p∨q ( p ∨ q) ∧ ~ p [( p ∨ q) ∧ ~ p] → q

T T F T F T
T F F T F T
F T T T T T
F F T F F T

Since all entries in the last column are of 'T ' only, therefore [( p ∨ q) ∧ ~ p] → q is a tautology. Hence the
given argument is valid.
464 Discrete Mathematical Structures

9.11.8 Law of Syllogism (or Transitive Rule)


We know that the statement [( p → q) ∧ (q → r)] → ( p → r) is a tautology and therefore the argument
p → q
premises
q → r 

p→ r (conclusion)

is a valid argument This is called law of syllogism.

9.11.9 Rule of Detachment


We know that the statement [ p ∧ ( p → q)] → q is a tautology, and therefore the argument
p  premises
p → q

q (conclusion)

is a valid argument. This is called Rule of Detachment. This rule is also known as Modus Ponens.

The validity of a given argument can be checked by the help of a truth table and also without using the
truth table.

Example 78: Show that the argument p, p → q, q → r | r is valid.

Solution:

First Method: Without using truth table.


Consider the following sequence of argument:

p (premise)

p→ q (premise)

q (conclusion by rule of detachment)

q→ r (premise)

r (conclusion by rule of detachment)

By the above sequence of valid arguments, it follows that the given argument is valid.

Second Method: By using truth table.

We shall construct truth table for the statement

[ p ∧ ( p → q) ∧ (q → r)] → r
Propositional Logic 465

p q r p→ q q→ r p ∧ ( p → q) p ∧ ( p → q) ∧ ( q → r ) = f ( say ) f → r

T T T T T T T T

T T F T F T F T

T F T F T F F T

T F F F T F F T

F T T T T F F T

F T F T F F F T

F F T T T F F T
F F F T T F F T

Since last column contains only T ' s, hence the given argument is valid.

Example 79: Show that the argument


p, p → q | q is valid
Solution: Here p and p → q are two premises and q is the conclusion. To show that the given argument is
valid, we shall show that [ p ∧ ( p → q)] → q a tautology by construction truth table.

p q p→ q p ∧ ( p → q) [ p ∧ ( p → q)] → q

T T T T T
T F F F T
F T T F T
F F T F T

Since last column contains only T 's, here the given argument is valid.

Example 80: Test the validity of the following argument:

If a man is a bachelor, he is worried (a premise)

If a man is worried, he dies young ( a premise)


Bachelors die young (conclusion)
Solution: Let p : A man (he) is a bachelor, q : He is worried, r : He dies young.

The given argument in symbolic form can be written as


p→ q (a premise)
q→ r (a premise)
p→ r (conclusion)
The given argument is true by law of syllogism.
466 Discrete Mathematical Structures

Example 81: Test the validity of the following argument: "If it rains then it will be cold. If it is cold then I
shall stay at home. Since it rains therefore I shall stay at home".
Solution: Let P : It rains, q : It will be cold; r : I shall stay at home.
The given argument in symbolic form can be written as
p→ q (a premise)
q→ r (a premise)
p (a premise)
r (conclusion

We shall construct the truth table for the statement


[( p → q) ∧ (q → r) ∧ p] → r.

p q r p→ q q→ r ( p → q) ∧ ( q → r ) ( p → q) ∧ ( q → r ) ∧ p [( p → q)
∧ ( q → r ) ∧ p] → r
T T T T T T T T
T T F T F F F T
T F T F T F F T
T F F F T F F T
F T T T T T F T
F T F T F F F T
F F T T T T F T
F F F T T T F T

Since last column contains only T ' s, hence the given argument is valid.

Example 82: Test the validity of the argument:


If two sides of a triangle are equal , then the opposite angles are equal.
Two sides of a triangle are not equal.

∴ The opposite angles are not equal


Solution: The statement above the horizontal line are two premises. The statement below the horizontal
line is the conclusion.
Let p : Two sides of a triangle are equal
q : The opposite angles of a triangle are equal.
The given argument in symbolic form can be written as

p→ q (a premise)

~p (a premise)

~q (conclusion)
Propositional Logic 467

We shall construct the truth table for statement.


[( p → q) ∧ ~ p] → ~ q

p q p→ q ~p ~q ( p → q) ∧ ~ p [( p → q) ∧ ~ p] → ~ q

T T T F F F T
T F F F T F T
F T T T F T F
F F T T T T T

The last column in the table shows that [( p → q) ∧ ~ p] → − q is not a tautology. Hence the given argument
is not valid.

Example 83: State whether the argument given below is valid. If it is valid, identify the tautology or
tautologies used:

If I drive to work then I will arrive tired

I drive to work.
∴ I will arrive tired.
Solution: Let p : I drive to work, q : I will arrive tired.
∴ The given argument, in symbolic form, may be written as
p→ q (a premise)

p (a premise)

∴ q (conclusion)

i.e., the argument is

p → q, p | q
which is valid.

Example 84: State whether the argument given below is valid or not valid. If it is valid, identify the
tautology used:
I will become famous or I will be writer.
I will not be a writer.
∴ I will become famous.

Solution: Let p : I will become famous


q : I will be writer
The given argument, in symbolic form, may be written as
468 Discrete Mathematical Structures

p∨ q (a premise)
~q (a premise)
∴ p (conclusion)
The given argument i.e., ( p ∨ q) ∧ (~ q) | p will be valid if the statement [( p ∨ q) ∧ (~ q)] → p is a
tautology. Now we construct the truth table for the above statement.

p q p∨q ~q ( p ∨ q) ∧ (~ p) [( p ∨ q) ∧ (~ q)] → p

T T T F F T
T F T T T T
F T T F F T
F F F T F T

Since last column contains only T ' s, hence the given argument is valid.

Example 85: Test the validity of the argument: If 8 is even then 2 does not divide 9. Either 7 is not prime or 2
divides 9. But 7 is prime, therefore, 8 is odd.
Solution: Let p : 8 is even; q : 2 divides 9; r : 7 is prime.
The given argument, in symbolic form, may be written as
p→ ~q (a premise)

− r∨q (a premise)

r (a premise)

∴ ~p (conclusion)
The given argument will be valid if the statement [( p → ~ q) ∧ (~ r ∨ q) ∧ r] → (~ p)is a tautology. We construct
the truth table:

p q r ~ p ~q ~r p→~q ~r ∨ q ( p → ~ q) ∧ (~ r ∨ q) f → (~ p)
∧ r = f ( say )

T T T F F F F T F T
T T F F F T F T F T
T F T F T F T F F T
T F F F T T T T F T
F T T T F F T T T T
F T F T F T T T F T
F F T T T F T F F T
F F F T T T T T F T

Since last column only contains T's hence, the given argument is valid.
Propositional Logic 469

Example 86: "If the labour market is perfect then the wages of all persons in a particular employment will be
equal. But it is always the case that wages for such persons are not equal therefore the labour market is not
perfect". Test the validity of the argument. [R.G.P.V. (Bhopal) 2009]
Solution: In the given case let
p1 : “The labour market is perfect”
p2 : “Wages fo all persons in a particular employment will be equal”
~p2 : Wages for such persons are not equal
~p1 : The labour market is not perfect.
The premise are p1 ⇒ p2, ~ p2 and the conclusions is ~ p1

The argument [( p1 ⇒ p2 ), (~ p2 )]|— ~ p1


valid if and only if ( p1 ⇒ p2 ) ∧ ~ p2 ⇒ ~ p1 is a tautology.

We construct the truth tables as below:

p1 p2 ~ p1 ~ p2 p1 ⇒ p2 ( p1 ⇒ p2 ) ∧ ~ p2 [( p1 ⇒ p2) ∧ ~ p2] ⇒ ~ p1

T T F F T F T
T F F T F F T
F T T F T F T
F F T T T T T

It follows that p1 ⇒ p2 ∧ ~ p2 ⇒ ~ p1 is tautology.

Hence, the argument is valid.

Note: Hence the conclusion is given by the symbol ⇒. But in some example it is given by → which has same
meaning.

Example 87: Test the validity of the following argument.

“If Ashok wins then Ram will be happy. If Kamal wins Raju will be happy. Either Ashok will win or Kamal will
win. However if Ashok win, Raju will not be happy and if Kamal wins Ram will not be happy. So Ram will be
happy if and only if Raju is not happy”. [Kurukshetra (B.E.) 2008]

Solution: Here let


p1 : Ashok wins p2 : Ram is happy p3 : Kamal wins p4 : Raju is happy.

The premises are p5 : p1 ⇒ p2, p6 : p3 ⇒ p4 , p7 : p1 ∨ p3 , p8 : p1 ⇒ ~ p4 , p9 : p3 ⇒ ~ p2.


The conclusion is p1 : p2 ⇔ ~ P4

The above argument is valid p1 : p2 ⇔ ~ p4 is a tautology so we construct the truth table.


470 Discrete Mathematical Structures

Since the given statement is a tautology. Hence, the argument is valid.

Example 88: Show that the following argument is not valid:


p
¬ q∨ r
¬ p⇒q
r [Rohtak (B.E.) 2007]

Solution: Let f = [{ p ∧ ( ¬ q ∨ r)} ∧ ( ¬ p ⇒ q)] ⇒ r.

Construct the truth table for f

p q r ¬ p ¬q ¬ q∨r ¬ p⇒q p ∧ ( ¬ q ∨ r ) ∧ ( ¬ p ⇒ q) f

T T T F F T T T T
T T F F F F T F T
T F T F T T T T T
F T T T F T T F T
T F F F T T T T F
F T F T F F T F T
F F T T T T F F T
F F F T T T F F T

Since f column does not contain all the truth values T. Thus it is not a tautology. Hence, the given
argument is not valid.
Propositional Logic 471

Example 89: Check the validity of each of the following arguments:

(a) p∧ q

¬ p⇒q
¬q
(b) r

p⇒¬q

q⇒r

(c) p∧ r

( p ⇒ q) ⇒ (r ⇒ s )

(d) [( p ⇒ q) ⇒ r] ⇒ s

r
s

Solution: (a) Let f = [( p ∧ q) ∧ (¬ p ⇒ q)] ⇒ ¬ q

Now, construct the truth table for f.

p q ¬p ¬q p∧q ¬ p⇒q ( p ∨ q) ∧ ( ¬ p ⇒ ¬ q) f

T T F F T T T F
T F F T F T F T
F T T F F T F T
F F T T F F F T

Since f column does not contain all T. Hence, the given argument is not valid.

(b) Let f = [{r ∧ ( p ⇒ ¬ q)} ∧ (q ⇒ r)] ⇒ p

Construct the truth table for f


472 Discrete Mathematical Structures

p q r q p⇔q q⇒r r ∧ ( p ⇔  q) ∧ ( q ⇒ r ) f

T T T F F T F T

T T F F F F F T

T F T T T T T T

F T T F T T T F
T F F T T T F T
F T F F T F F T
F F T T F T F T
F F F T F T F T

Since f column contain all the truth values T. Thus, it is a tautology and hence the given argument is valid.
(c) Let f = [( p ∧ r) ∧ [( p ⇒ q) ⇒ (r ⇒ s )]] ⇒ s
Construct the truth table

p q r s p∧r p⇒q r⇒s ( p ⇒ q) ⇒ ( r ⇒ s ) ( p ∧ r ) ∧[( p ⇒ q) f


⇒ (r ⇒ s)]

T T T T T T T T T T

T T T F T T F F F T

T T F T F T T T F T

T F T T T F T T T T

F T T T F T T T F T

T T F F F T T T F T

T F F T F F T T F T
F F T T F T T T F T
T F T F T F T F T F
F T T F F T F F F T
F T F T F T T T F T
T F F F F F T T F T
F T F F F T T T F T
F F T F F T F F F T
F F F T F T T T F T
F F F F F T T T F T

Since f column does not contain throughout T. Hence the given argument is invalid.
Propositional Logic 473

(d) F = [[[( p ⇒ q) ⇒ r] ⇒ s] ∧ r] ⇒ r
Construct the truth table for f

p q r s p ⇒ q ( p ⇒ q) ⇒ r (( p ⇒ q) ⇒ r) ⇒ s [(( p ⇒ q) ⇒ r ) ⇒ s ] ∧ r f

T T T T T T T T T
T T T F T T F F T
T T F T T F T F T
T F T T F T T T T
F T T T T F T T T
T T F F T T T F T
T F F T F T T F T
F F T T T T T T T
T F T F F T F F T
F T T F T T F F T
F T F T T F T F T
T F F F F T F F T
F T F F T F T F T
F F T F T T F F T
F F F T T F F F T
F F F F T F T F T

The f column contains throughout T. Hence, the given statement is valid.

Example 90: Check the validity of the following arguments. Show with the use of symbolic notation.

x 2 = y 2 only if x = y

x=y

x2 = y2 [U.P.T.U. (B.Tech.) 2005]

Solution: Let p ≡ x 2 − y 2 , q ≡ x = y, then

p⇒q

Let f = [( p ⇒ q) ∧ q] ⇒ p.

Construct the truth table for f


474 Discrete Mathematical Structures

p q p⇒q ( p ⇒ q) ∧ q f

T T T T T
T F F F T
F T T T F
F F T F T
Since f column does not contain T throughout so it is not a tautology. Hence the given argument is invalid.

9.12 Law of Duality


In this section, we consider only those statements which contain the connectives ∧, ∨ and ~only.
Two statements p and q are said to be dual of each other if either one can be obtained from the other by
replacing ∧ by ∨, ∨ by ∧ , T by F and F by T.

Example 91: Find the dual of the following:


(a) ( p ∨ q) ∧ r (b) ( p ∧ q) ∨ T (c) ~( p ∨ q) ∧ ( p ∨ ~( p ∧ s )

Solution: (a) Interchanging ∨ and ∧, we have, dual as ( p ∧ q) ∨ r


(b) Dual is ( p ∨ q) ∧ F (c) Dual is ~ ( p ∧ q) ∨ ( p ∧ ~ ( p ∨ s ))

9.12.1 Principle of Duality


It states that if any two statements are equal then their dual are also equal.
Example 92: Prove the following:
(a) ~( p ∧ q) = ~ p ∨ ~ q (b) ~( p ∨ q) = ~ p ∧ ~ q
Solution: We shall prove (a) result then by principle of duality (b) already proved. To prove (a), consider
the following table:

p q ~p ~q p∧q ~ ( p ∧ q) ~ p∨ ~q

T T F F T F F
T F F T F T T
F T T F F T T
F F T T F T T

From the table, it follows that ~( p ∧ q) = ~ p ∨ ~ q.


Examples 93: Write the dual of the following
(i) ( p ∧ T ) ∧ (F ∨ p' ) = F (ii) p ∧ ( p' ∧ q) = p ∧ q'
(iii) ( p ∨ q) ∧ r = p ∧ ( p ∧ r) (iv) p ∨ (q ∧ r) = ( p ∨ q) ∧ ( p ∨ r)

Solution: The dual are


(i) ( p ∨ F ) ∨ (T ∧ p' ) = T (ii) p ∨ ( p' ∨ q) = p ∨ q'
(iii) ( p ∧ q) ∨ r = p ∨ (q ∨ r) (iv) p ∧ (q ∨ r) = ( p ∧ q) ∨ ( p ∧ r)
Propositional Logic 475

1. Write the dual of the following:

(a) ( p ∨ q) ∧ r (b) ( p ∧ q) ∨ T

(c) ~( p ∨ q) ∧ ( p ∨ ~( p ∧ s ))

2. Prove the following:

(a) ~( p ∧ q) = ~ p ∨ ~ q (b) ~( p ∨ q) = ~ p ∧ ~ q

3. Show that the following argument is a fallacy:


p→ q
~p

~q
4. Check the validity of the following arguments:
p → q'
(a)
r' → q'

p → r'
(b) p
q
~ p→ r

q→ ~r

~r
(c) p
q
p∧ q→ r ∨ q
p ∧ q→ ρ ∧ q

r
5. Is the following argument valid? "If the labour market is perfect then the wages of all persons in a
particular employment will be equal. But it is always the case that wages for such persons are not equal.
Therefore the labour market is not perfect"
6. Express p → q and p ∧ q in terms of ↓.
7. Given that the value of p → q is true. Can you determine the value of ~ p ∨ ( p ↔ q) ?
8. Prove that the statement "if n is an integer, then n2 − n + 4 ! is a prime number" is false.
9. Define conditional and bi-conditional statements. Show that p → (q → r) = ( p ∧ q) → r
10. Define arguments and valid arguments with examples.
11. Make the truth table for ( p ↓ q) ∧ ( p ↓ r) where p ↓ q is a true statement if neither p nor q is true.
[U.P.T.U. (B.Tech.) 2005]
476 Discrete Mathematical Structures

1. (a) ( p ∧ q) ∨ r (b) ( p ∨ q) ∧ F
(c) ~( p ∧ q) ∨ ( p∧ ~( p ∨ s )
4. (a) valid (b) valid (c) valid
5. valid
6. p → q = (~ p ↓ q) ↓ (~ p ↓ q)
7. True

9.13 Predicate or Propositional Function or Open Sentence


In the previous articles we have discussed the simple statements and the logical techniques to combine
simple statements into compound statements. We cannot apply those techniques to the arguments of the
following forms:

All human are mortal. Newton is human. Therefore, Newton is mortal.

The validity of such type of argument depends upon the inner logical structure of simple statements it
contains.

The second premise of the above argument is a singular proposition; it states that the individual Newton
has the characteristic of being a human. We say ‘Newton’ the subject term and ‘human’ the predicate term.
The individuals are not necessarily persons, but may be any things, such as planets, stars, cities, animals
etc. of which the characteristics may be predicated. Similarly the characteristic can be designated by not
only adjectives but also by nouns, pronouns or verb.

In symbolic notation, we shall use small letters to denote the individuals such as the individual ‘Newton’
will be denoted by the small letter ‘n’ [the first letter of the name], and is called individual constant. The
characteristic will be denoted by the capital letter such as ‘mortal’ by M and ‘human’ by H. The symbolic
notation for ‘Newton is mortal’ will be used as M (n) and for ‘Newton is human’ as H (n). Some other
examples of singular propositions with the same characteristic are ‘Brijpal is human’. ‘Lakshay is human’
and their symbolic formulation are respectively ‘H (b)’, ‘H (l)’. Let us use the symbolic representations H ( x )
to denote the pattern common to all such singular propositions. The small letter ‘x’ is called ‘individual
variable’, and takes values from the set of individual constants. When an individual constant is substituted
for x, a singular proposition, is produced, such as H (n), H (b), H (l).
The singular propositions H (n), H (b), H (l) are either true or false i.e., they have their truth values but three
is no truth value (true or false) or H ( x ) since H ( x ) is not a proposition. The expressions of the type H ( x ) are
called ‘Propositional Functions’ or ‘Open Sentences’. Thus propositional functions are expressions
that contain individual variables and become propositions when their individual constants are replaced by
individual variables.
Propositional Logic 477

Definition: Let A be a given set. An expression denoted by P ( x ) is called a propositional function or,
simply, an open sentence or, a predicate on A if P (a) is true or false for each a ∈ A i.e. P (a) has a truth value for
each a ∈ A. In other words, P ( x ) is called a propositional function or, an open sentence if P ( x ) becomes a
statement whenever any element a ∈ A is substituted for the variable x.

Illustration: Let P ( x ) be ‘ x + 4 < 9 ’ ,

then P ( x ) is a propositional function on the set of natural numbers N.

Clearly P ( x ) is true for n = 1, 2, 3, 4 and false for x = 5, 6, 7, K Hence P ( x ) becomes a statement whenever any
element a ∈ N is substituted for x.

Illustration: Let P ( x )be ‘ x + 3 > 6’ , then P ( x )is a propositional function on the set of natural numbers N.

Illustration: Let P ( x ) be ‘ x + 3 > 6’, then P ( x ) is not a propositional function on the set of complex numbers
C, because inequalities are not defined on C.

9.13.1 Truth Set Definition


Let P ( x ) be a propositional function and D be its domain. The set of elements d ∈ D with the property that
P (d ) is true is called the Truth Set T (P ) of P ( x ). Symbolically:
T (P ) = { x : x ∈ D, P ( x ) is true} or T (P ) = { x : P ( x )}.

Illustration: If ‘ x + 3 > 6’ be a propositional function defined on N, then find the truth set of P ( x ).

We have P ( x ) ≡ ‘ x + 3 > 6’, D ≡ N.

∴ T (P ) = { x : x + 3 > 6, x ∈ N} = {4, 5, 6, K }.

Illustration: If P ( x ) be ‘ x + 2 < 3’ and D ≡ N, then find the truth set.

T (P ) = { x : x + 2 < 3, x ∈ N} = φ .

Illustration: If P ( x ) be ‘ x < 5’ and D ≡ {5, 6, 7, 8, . . . }, then

T (P ) = { x : x < 5, x ∈ D} = φ .

Illustration: If P ( x ) be ‘ x > 5’ and D ≡ N, then

T (P ) = { x : x > 5, n ∈ N} = {6, 7, 8, K }.

Illustration: If P ( x ) be ‘ x > 2’ and D ≡ {3, 4, 5, K }, then

T (P ) = {3, 6, 5, K } = D i.e., P ( x ) is true for every x ∈ D.


478 Discrete Mathematical Structures

9.14 Quantifiers
The restrictions namely ‘for every’ and ‘for some’ are called Quantifiers.
There are two types of quantifiers.

9.14.1 Universal Quantifier


Definition: The symbol ∀ which is read as ‘For Every’ or ‘For All’ is called the universal quantifier.

Let P ( x ) be a propositional function defined on the set D. If ‘for every x ∈ D, P ( x ) is a true statement’ then by
the use of universal quantifier (∀ ) it is written as
(∀ x ∈ D ) P ( x ) or ∀ x P ( x )or ∀ x, P ( x ). ...(1)

We see that the truth set of P ( x ) is the entire set D,

i.e., T (P ) = { x : x ∈ D, P ( x )} = D ...(2)

Illustration: The statement (∀ n ∈ N )(n + 2 > 1) is true since its truth set

T (P ) = {n : n ∈ N, n + 2 > 1} = {1, 2, 3, 4, K } = N.

Illustration: The statement (∀ n ∈ N )(n + 1 > 5) is false since its truth set

T (P ) = {5, 6, 7, K } ≠ N.

Illustration: The statement (∀ x ∈ R)( x 2 > − 1)where R is the set of real numbers, is true since its truth set

T (P ) = { x : x ∈ R, x 2 > − 1} = R.

Illustration: Let D be the set of all men, then the statement ‘All men are mortal’ is written as

(∀ x ∈ D ) (x is Mortal).

Illustration: Let { At }t ∈ T be a family of sets, where T is the index set. The intersection of family of sets
denoted by ∩ At may also be written as (by the use of ∀) follows
t ∈T
∩ At = { x : ∀ t ∈ T , x ∈ At }
t ∈T

Note: The truth set T(P) is also called ‘Universe of discourse’.

9.14.2 Existential Quantifiers


Definition: The symbol ∃ which is read as ‘There Exists’ or ‘For Some’ or ‘For at Least One’ is called
the Existential Quantifier.

Let P ( x ) be a propositional function defined on the set D. If ‘there exists an x ∈ D, such that P ( x ) is a true
statement’ or ‘for some x ∈ D, P ( x ) is a true statement’ or ‘for at least one x ∈ D, P ( x ) is a true statement’
then it is written as
Propositional Logic 479

( ∃ x ∈ D ) P( x ) or ∃ x P ( x ). ...(1)

Hence, we find that the truth set (or universe of discourse) is not the empty set, i.e.,

T (P ) = { x : x ∈ D, P ( x )} ≠ φ .

Therefore, we may state that


(i) if T (P ) ≠ φ then ∃ x P ( x ) is true,
and (ii) if T (P ) = φ then ∃ x P ( x ) is false.

Illustration: The statement ( ∃ n ∈ N )(n + 7 < 6) is false since

T (P ) = {n : n + 7 < 6} = φ .

Illustration: The statement ( ∃ x ∈ R)( x 2 − 1 = 0), R is the set of real numbers, is true since

T (P ) = { x : x 2 − 1 = 0} = {1, − 1} ≠ φ .

We see the variable x can take only two real values 1, − 1 for which x 2 − 1 = 0 is true.

Illustration: Let { At }t ∈ T be a family of sets. The union of family of sets denoted by ∪ At may also be
t ∈T
written as (by the use of ∃) follows:
∪ At = { x : ∃ t ∈ T , x ∈ At }.
t ∈T

9.15 Negation of A Quantifier


Let us consider the proposition. ‘All Indians are honest’. If M denotes the set of Indians, then it can be is
written as
(∀ x ∈ M ) ( x is honest).
This statement will become false, if we say that ‘there is an Indian who is not honest’ or in symbolic form
(∃ x ∈ M ) (x is not-honest).
Therefore, the negation of the statement ‘All Indians are honest’ will be ‘there is an Indian who is not
honest’ or in symbolic form ( ∃ x ∈ M )( x is not honest).
Thus the negation of ∀ x P ( x ) is ∃ x [~ P ( x )]; where P ( x ) denotes ‘x’ is honest’.

Hence, we see that the negation of a statement with ‘universal quantifier’ is a statement with ‘existential
quantifier’.
Again we consider the proposition. ‘Some Indian are honest’.

If M denotes the set of Indians, then this statement in symbolic form can be written as

(∃ x ∈ M )( x is honest).

This statement will become false, if we say that ‘No India is honest’ or in symbolic form

(∀ x ∈ M )( x is not honest).
480 Discrete Mathematical Structures

Therefore, the negation of the statement ‘some Indians are honest’ will be ‘No Indian is honest’. In
symbolic form, the negation of (∃ x ∈ M ) P ( x ) is (∀ x ∈ M )(~ P ( x )) where P ( x ) denotes ‘x is honest’.

Hence, we see that the negation of a statement with ‘existential quantifier’ is a statement with ‘universal
quantifier’.

9.16 De-Morgan Laws


If P ( x ) is a propositional function defined on the domain D, then negation of (∀ x ∈ D ) P ( x ) is
( ∃ x ∈ D )~ P ( x ), which can be written as
~(∀ x ∈ D ) P ( x ) ≡ ( ∃ x ∈ D )~ P ( x ) ...(1)

Similarly ~( ∃ x ∈ D ) P ( x ) ≡ (∀ x ∈ D )~ P ( x ) ...(2)

(1) and (2) are called De-Morgan Laws.


Note: The laws which hold for propositions also hold for propositional functions, for example:
(i) ~(P ( x ) ∨ Q ( x )) ≡ ~ P ( x ) ∧ ~ Q ( x ).
(ii) ~(P ( x ) ∧ Q ( x )) ≡ ~ P ( x ) ∨ ~ Q ( x ) etc.

Example 94: Use quantifiers to say that 3 is not a rational number. [U.P.T.U. (B.Tech.) 2008]

Solution: A( x ): x is prime, B( x ): x , x is prime and C ( x ): x is rational


∀ x, x ∈ A ( x ), B( x ) → ~ C ( x ) i.e., square root of every prime number is not rational

Example 95: Let M ( x ) be ‘‘x is mammal’’. Let A( x ) be ‘‘x is an animal’’. Let W ( x ) be ‘‘x is warm blooded’’.
Translate into a formula; Every mammal is warm, blooded. Translate into English.
(∃ x )( A( x ) ∧ (~ M ( x ))) [U.P.T.U. (B.Tech.) 2008]

Solution: Formula for ‘‘every mammal is warn blooded’’ is ∀ x (M ( x ) → W ( x ))


(∃ x )( A( x ) ∧ (~ M ( x ))
Translated into English is there are some animals there are not mammals.

Example 96: The proposition:


(i) There is a dog without a toil can be written as (∃ a dog) (the dog without toil).
(ii) There is an integer between 2 and 8 inclusive may be written as ( ∃ an integer) (the integer is between 2 and 8).

Example 97: Nagate the proposition ‘‘All integers are greater then 8’’.
[Nagpur (B.E.) 2005; Pune (B.E.) 2004, 2007; M.K.U. (B.E.) 2008; Rohtak (M.C.A.) 2009]

Solution: The given proposition can be written as (∀ integer x ) ( x > 8)

The negation is ( ∃ an integer x ) ( x ≤ 8) i.e., There is an integer less than or equals to 8

Remark: In negation a proposition ‘‘for all’’ becomes ‘‘there is’’ and ‘‘there is’’ becomes ‘‘for all’’.

The symbol ∀ becomes ∃ and ∃ becomes ∀.


Propositional Logic 481

Example 98: Translate the following statements given in English into equivalent statements of
Propositional/Predicate Calculus, after introducing appropriate symbolism.
(i) Some pet dogs are dangerous
(ii) Some physicists are not good in chemistry
(iii) Americans will stop driving big cars only if there are comfortable small cars.
(iv) Not all birds can fly
(v) Himadari, who is a doctor, is a good sports man also
(vi) Sum of two positive integers is greater than either of integers.
(vii) Some cats are black but all buffaloes are black
(viii) Some patients like all doctors
(ix) Some people have six fingers on one hand
(x) Some people help every body
(xi) Some mangoes are green
(xii) Some real numbers are integers
(xiii) Some mathematicians are not good in computer science
(xiv) All lions have tails
(xv) All cows are not white
(xvi) All frogs are brown
(xvii) All lions are dangerous animals
(xviii) All integers are either odd integers or even integers
(xix) All cows have four legs
(xx) All fish except shark are kind to children
(xxi) All men are mortal
(xxii) Any integer is either positive or negative
(xxiii) Every integer is also a real number
(xxiv) Nine plus ten equal nineteen
(xxv) Let A subset of B. Express this fact in predicate calculus.
(xxvi) Some irrational numbers x and y, the number x y is a rational numbers
(xxvii) Couple’s only surviving child is male
Solution: (i) Some Pets dogs are dangerous
Let P ( x ): x is pet dog and D( x ): x is dangerous
∴ In predicate calculus we have
x P ( x ) → D( x )
(ii) Some physicists are not good in chemistry
Let P ( x ): x is a physicist and C ( x ): x is good in chemistry
∃ x P( x ) → C ( x )
482 Discrete Mathematical Structures

(iii) Americans will stop driving big cars only if there are comfortable small cars.
Let A( x ): x is American will stop driving big cars and C ( x ): x is comfortable small cars
In predicate calculus, we have
C ( x ) → A( x )
(iv) Not all birds can fly.
Let B( x ): x is bird and F ( x ): x is fly

In predicate calculus, we have

~(∀ B( x )) → F ( x )
(v) Himadari, who is a doctor, is a good sports person also
Let x : denote Himadari, D( x ): is doctor and S( x ): x is sport person
In predicate calculus, we have
( ∃ x ) D( x ) ∧ S( x )
(vi) Sum of two positive integers is greater than either of the integers
Let I( x ): x is positive integer, GT ( x, y ): x is greater then y and Su ( x, y ): sum of x and y
Thus, in predicate calculus, we have
(∀x )(∀y )(I( x ) I( y ))(GT (Su ( x, y ) GTSu ( x, y ), y )))
(vii) Some cats are black but all buffaloes are black
Let C ( x ): x is a cat, B( x ): x is a black, and BF ( x ): x is buffalo
∴ ∃ x ∈ C ( x ) ⇒ B( x )
and ∀x BF ( x ) ⇒ B( x )
(viii) Some patients like all doctors
Let P ( x ): x is patient, and D( y ): y is doctor, ( x, y ): x likes by y
∴ x P( x ) y
(ix) Some people have six fingers on one hand
Let P ( x ): x is people, S( x ): x is a people having six fingers on one hand

Therefore in predicate calculus, we have

∃ x ∈ P ( x ) → S( x )
(x) Some people help everybody

Let P ( x ): x is a people, HB( y ): y is human being, and H ( x, y ): x helps y

∴ The given statement can be expressed as

∃ x ∈ P ( x ) → H ( x, y ) ∀ x ∈ (P ( x ) ∧ HB( y ))

or ∃ x ∈ P ( x ) → ∀ y ∈ (P ( x ) ∧ HB( y )) → H ( x, y )
(xi) Some mangoes are green
Let M ( x ): x are mangoes and G( x ): x are green
∴ In predicate calculus, we have
∃ x (M ( x ) → G( x ))
Propositional Logic 483

(xii) Some real numbers are integers


Let R ( y ): y is real number and I( y ): y is an integer
∴ In predicate calculus, we have
∃ y ∈ R ( y ) → I( y )
(xiii) Some mathematicians are not good in computer science
Let M ( x ): x is a mathematician and G( x ): x is good in computer science
∴ The given statement can be expressed in predicate calculus as
∃ x ∈ M ( x ) → ~ G( x )
(xiv) All lions have tails
Let L( x ): x is lions and T ( x ): x is tails
In predicate calculus, we have
(∀ x )(L( x ) → T ( x ))
(xv) All cows are not white
Let C ( x ): x is cow and W ( x ): x is white
∴ In predicate calculus, we have
∀ x C( x ) → ~ W ( x )
(xvi) All frogs are brown
Let F ( x ): x is frogs, B( x ): x is an brown frog
∴ In predicate calculus, we have
∀ x ∈ F ( x ) → B( x )
(xvii) All lions are dangerous animals
Let L( x ): x is a lion, D( x ): x is a dangerous animal
∴ In predicate calculus, we have
∀ x ∈ L( x ) → D( x )
(xviii) All integers are either odd integers or even integers
Let I( x ): x are integers, O ( x ): x is odd, E ( x ): x is even
∴ In predicate calculus, we have
∀ x I( x ) → ~(O ( x ) ∨ E ( x ))
(xix) All cows have four legs
Let C ( x ): x is cow, F ( x ): x has four legs
∴ In predicate calculus, we have
∀ x (C ( x ) → F ( x ))
(xx) All fish except shark are kind to children
Let F ( x ): x is a fish, S( x ): x is a shark, K ( x ): x is kind to child
∴ In predicate calculus, we have
∀ x (F ( x ) ≠ S( x )) → K ( x )
484 Discrete Mathematical Structures

(xxi) All men are mortal


Let H ( x ): x is man, M ( x ): x is mortal
∴ In predicate calculus, we have
(∀ x )(C ( x ) → M ( x ))
(xxii) Any integer is either positive or negative
Let I( x ): x is an integer, P ( x ): x is positive integer
∴ In predicate calculus, we have
∀ x ∈ I( x ) → {P ( x ) ∨ N ( x )}
(xxiii) Every integer is also a real number
Let I( x ): x is an integer
R ( x ): x is real number
∴ In predicate calculus, we have
∃ x ∈ I( x ) → R ( x )
(xxiv) Nine plus ten equal nineteen
Let N ( x ): x is nine, T ( x ): x is ten, C ( x, y ): sum of x and y
NT ( x ): is nineteen
∴ In predicate calculus, we have xy (N ( x ) T ( y ) sum ( x, y ) NT ( x )
(xxv) Let A be subset of a set B. Express this fact in predicate calculus.
Let A( x ): x is an element of A, B( x ): x is an element of B
∴ In predicate calculus, we have
∀ x ∈ A( x ) ∧ B( x )
(xxvi) Let I( x ): x is an irrational number, Q ( x ): x is an rational number, EX P ( x, y ): x y

∴ In predicate calculus, we have


(∃ x, y )[ I( x ) ∧ I( y ) → Q (EX P ( x, y )]
(xxvii) Couple’s only surviving child is a male
Let S C ( x ): x is couple’s surviving child, M ( x ): x is male
∴ In predicate calculus, we have
∃ x ∈ SC ( x ) → M ( x )

Example 99: Let Q ( x ) ≡ x is a rational number, R ( x ) ≡ x is a real number


E ( x, y ) ≡ ‘ x = y’, G( x, y ) ≡ ‘ x > y’.
Translate the following sentences into symbols:
(i) π is a real number. (ii) e is a real number.
(iii) 4/5 is a rational number. (iv) 3 is an irrational number.
(v) Every rational number is a real number.
(vi) Some real numbers are rational. (vii) The square of every real number is not negative.
Propositional Logic 485

Solution: (i) R(π ),


(ii) R (e), (iii) Q(4 / 5), (iv) ~ Q ( 3),
(v) ∀ x [Q ( x ) ⇒ R ( x )], (vi) ∃ x [ R ( x ) ∧ Q ( x )], (vii) ∀ x R ( x ) ⇒ ~ G(0, x 2 )].
Note that G(0, x 2 ) means 0 > x 2 i.e., x 2 is negative and therefore ~ G(0, x 2 ) means x 2 is not negative.

Example 100: Negate each of the following statements:


(i) ∀ x (| x| = x ), (ii) ∀ x ( x + 1 > x ),

(iii) ∀ x ( x ≠ 1, x ≠ 2), (iv) ∃ x ( x 2 < 0),

(v) ∀ x ( x ≠ 0) ⇒ ( x 2 > 0), (vi) ∃ x | x| = 0),

(vii) ∃ x ( x 2 = x ), (viii) ∃ x ( x + 2 = x ),
2 2
(ix) ∃ x ( x = 1 and x − 2x + 3 = 0), (x) If there is a will there is a way,
(xi) All men are mortal. (xii) All integer are greater than zero.
[U.P.T.U. (B.Tech.) 2008]
Take the universal set as set of real numbers from (i) to (ix).

Solution: (i) ∃ x ~(| x| = x ) or ∃ x (| x| ≠ x ).


(ii) ∃ x ~( x + 1 > x ) or ∃ x ( x + 1 ≤ x ).
(iii) ∃ x (( x − 1)( x − 2) = 0) or ∃ x ( x 2 − 3x + 2 = 0).
(iv) ∀ x ~( x 2 < 0) or ∀ x ( x 2 ≥ 0).
(v) ∃ x [( x ≠ 0) ∧ ( x 2 < 0)].
(vi) ∀ x ~(| x| = 0) or ∀ x (| x| ≠ 0).
(vii) ∀ x ~( x 2 = x ) or ∀ x ( x 2 ≠ x ).

(viii) ∀ x ( x + 2 ≠ x ).
(ix) ∀ x ~( x 2 = 1 and x 2 − 2x + 3 = 0).
or ∀ x (x 2 ≠ 1 or x 2 − 2x + 3 ≠ 0).
(x) We know that ~( p ⇒ q) ≡ p ∧ ~ q . Thus required negation is:
There is a will and there is no way.
(xi) Some men are not mortal.
(xii) Let A( x ) denote ‘‘x is an integer’’
and (B )x denoted ‘‘x is greater than 0’’
Then given proposition can be written as ( ∃ x ∈ A( x )(− B( x )))

Example 101: Let D = {1, 2, 3, 4, 5, 6 K }, negate the following statements:


(i) (∀ x ∈ D )( x + 4 ≥ 8), (ii) (∀ x ∈ D )( x + 2 < 9), (iii) ( ∃ x ∈ D )( x + 5 = 9),
2
(iv) ( ∃ x ∈ D )( x + 1 > 6), (v) ( ∃ x ∈ D )( x = 6), (vi) (∀ x ∈ D )( x 2 > 25),

Solution: (i) ( ∃ x ∈ D )( x + 4 < 8),


(ii) ( ∃ x ∈ D )( x + 2 ≥ 9), (iii) (∀ x ∈ D )( x + 5 ≠ 9), (iv)(∀ x ∈ D )( x + 1 ≤ 6),
2 2
(v) (∀ x ∈ D )( x ≠ 6), (vi) ( ∃ x ∈ D )( x ≤ 25),
486 Discrete Mathematical Structures

Example 102: Negate the statement ‘He is poor and laborious’.


Solution: We know that ~( p ∧ q) ≡ ~ p ∨ ~ q .
Hence the negation of the given statement is:
‘It is false that he is poor and laborious’. ≡ ‘He is not poor or he is not laborious’.

Example 103: Negate the statement ‘It is daylight and all the people have arisen’.
Solution: We know that ~( p ∧ q) ≡ ~ p ∨ ~ q .
Hence the negation of the given statement is:
‘It is false that it is daylight and all the people have arisen’.
≡ ‘It not daylight or it is false that all the people have arisen’.
≡ ‘It is not daylight or some one has not arisen’.

Example 104: Negate the statements:


(i) ∃ x P ( x ) ∨ ∀ y Q ( y ). (ii) ∀ x P ( x ) ∧ ∃ y Q ( y ).

Solution: (i) We know that ~( p ∨ q) = ~ p ∧ ~ q .


∴ ~[ ∃ x P ( x ) ∨ ∀ y Q ( y )] ≡ ~ ∃ x P ( x ) ∧ ~ ∀ y Q ( y ) ≡ ∀ x ~ P ( x ) ∧ ∃ y ~ Q ( y ).

Q ~ ∃ x P ( x ) ≡ ∀ x ~ P ( x ) and ~ ∀ y Q ( y ) ≡ ∃ y ~ Q ( y )
(ii) We know that ~( p ∧ q) ≡ ~ p ∨ ~ q .
∴ ~[ ∀ x P ( x ) ∧ ∃ y Q ( y )] ≡ ~ ∀ x P ( x ) ∨ ~ ∃ y Q ( y ) ≡ ∃ x ~ P ( x ) ∨ ∀ y ~ Q ( y ).

Example 105: Write the three properties of equivalence relation in symbolic notations.
Solution: Let R ( x, y ) denote that x has a relation R with y, then the three properties for R to be an
equivalence relation are:
(i) Reflexivity: ∀ x R ( x, x ).
(ii) Symmetric: ∀ x, y [ R ( x, y ) ⇒ R ( y, x )].
(iii) Transitivity: ∀ x, y, z [ R ( x, y ) ∧ R ( y, z ) ⇒ R ( x, y )].

Example 106: Negate the statement ∃ x ∀ y [ P ( x ) ∨ ~ Q ( y )].


Solution: ~ ∃ x ∀ y [ P ( x ) ∨ Q ( y )] ≡ ∀ x ∃ y [~ P ( x ) ∧ Q ( y )].

Example 107: Negate the statement ∀ x ∃ y [ P ( x, y ) ⇒ Q ( y )].

Solution: ~ ∀ x ∃ y [ P ( x, y ) ⇒ Q ( y )] ≡ ∃ x ∀ y [ P ( x, y ) ∧ − Q ( y )] [Q ~( p ⇒ q) ≡ p ∧ ~ q].

Example 108: Write the following statement into symbols


(using quantifier and the symbol ‘<’ for ‘less than’ ):
(i) A number x, is less than 7 and greater than 5.
(ii) For a given number x there is a greater number y.
(iii) For two given numbers x and y, there is a number z such that the difference of x and y is less than the product
of x 2 and z.
(iv) The numbers x, y, z are such that x + y is greater than xz.
Propositional Logic 487

Solution:
(i) ∃ x [ x < 7 ∧ 5 < x]. (ii) ∀ x ∃ y ( x < y ).
2
(iii) ∀ x ∀ y ∃ z (| x − y| < x z ). (iv) ( ∃ x )( ∃ y )( ∃ z )( xz < x + y ).

Example 109: Write the following sentences into symbols:


(i) The square of any rational number is not 2.

(ii) Two non-parallel coplanar straight lines have a common point.


(iii) If there is no prize, then a person does not purchase a ticket.

Solution: (i) Let Q ( x ) = x is a rational number, E ( x, y ) ≡ ‘ x = y’.


The given sentence in symbols, using quantifiers, is
∃ x [Q ( x ) ∧ E ( x 2, 2)].

(ii) Let P ( x ) = x is a point, L( x ) = x is a straight line, I( x, y ) = the point x is on


y, D( x, y ) = x, y are non-parallel and coplanar.
The given sentence in symbols is
∀ mn [ L(m) ∧ L(n) ∧ D(m n) ⇒ ∃ x {P ( x ) ∧ I( x, m) ∧ I( x, n)}].
(iii) Let P ( x ) = a prize, T ( x ) = a ticket, M ( x ) = a person, A( x, y ) = x purchases y.
The given sentence is symbols is:
{~ ∃ x P ( x )} ⇒ ∀ x ∀ y {M ( x ) ∧ T ( y ) ⇒ ~ A( x, y )}.

Example 110: ‘If the product of two rational numbers is zero, then at least one factor is zero’. Write this
statement into symbols.
Solution: Let P ( x ) ≡ product of rational numbers is x and F ( x, y ) ≡ x in a factor of y.
The given sentence is symbols is

∀ x [ P ( x ) ∧ ( x = 0) ⇒ ∃ y [ F ( x, y ) ⇒ ( y = 0)}].

Example 111: Show that the negation of (∀ x )(P ( x )) is ( ∃ x )(~ P ( x )).


Or

If the projection of P ( x ) on D is a propositional function, then show that


~(∀ x ∈ D : P ( x )) ≡ ( ∃ x ∈ D : ~ P ( x )).
Solution: Here following two cases arise:

Case (i): The truth value of (∀ x ∈ D : P ( x )) is T. In this case P ( x ) is satisfied for all x ∈ D . Therefore, there
is an x ∈ D for which ~ P ( x ) is not satisfied.
So the truth value of ( ∃ x ∈ D : ~ P ( x )) is F.

Case (ii): The truth value of (∀ x ∈ D : P ( x )) is F. In this case P ( x ) is not satisfied for some x ∈ D, therefore,
~ P ( x ) is satisfied for some x ∈ D.
So the truth value of ( ∃ x ∈ D : ~ P ( x )) is T. Hence
~(∀ x ∈ D : P ( x )) ≡ ( ∃ x ∈ D : ~ P ( x )).
488 Discrete Mathematical Structures

Example 112: Write the following predicate into symbolic language:


(i) For every real number there is a greater real number.
(ii) Every irrational number is a real number.
(iii) The number divisible by an even number is even.
(iv) Every teacher of a college is learned.
(v) All students are not wise.
(vi) Some people like to listen only instrumental music.
(vii) If the product of a finite number of numbers is zero, then at least one factor is zero.
(viii) The function f ( x ) is continuous at x = a if for every ε > 0 there exists a δ > 0 such that

| f ( x ) − f (a)| < ε where | x − a| < δ .

Solution: (i) Let R ( x ) ≡ x is a real number, G( x, y ) ≡ x > y.


Then the given statement in symbols is
∀ x [ R ( x ) ⇒ ∃ y [{R ( y ) ∧ G( y, x )}].
(ii) Let I( x ) ≡ x is irrational number, R ( x ) ≡ x is real number.
Then ∀ x [ I( x ) ⇒ R ( x )].
(iii) R ( x ) ≡ x is a number, E ( x ) ≡ x is an even number
D( x, y ) ≡ y is divisible by x.
Then ∀ x, y [ E ( x ) ∧ R ( y )] ∧ D( x, y ) ⇒ E ( y )].
(iv) T ( x ) ≡ x is a teacher of college, L( x ) ≡ x is learned.
∴ ∀ x [T ( x ) ⇒ L( x )].
(v) S( x ) ≡ x is student and W ( x ) ≡ x is wise.
∴ ~ ∀ x [ S( x ) ∧ W ( x )].
(vi) P ( x ) ≡ x is people, I( x ) ≡ x is instrumental music, H ( x, y ) ≡ x likes to listen y.
∴ ∃ x [ P ( x ) ∧ H ( x, y ) ⇒ Q ( y )].
(vii) P ( x ) ≡ Product of finite number of members
F ( x, y ) ≡ x is a factor of y.
∴ ∀ x [ P ( x ) ∧ ( x = 0) ⇒ ∃ y {F ( y, x ) ⇒ ( y = 0)}].
(viii) F ( x ) ≡ The function f is continuous at x.
∴ [ ∀ ε > 0 ∃ δ > 0 ∀ x {| x − a| < δ ⇒| f ( x ) − f (a)| < ε}] ⇒ f (a).

Example 113: Write the following predicate into symbolic form:


(i) There are real numbers which are greater than all real numbers.
(ii) Some ladies lawyer are such that they are also homely ladies.
(iii) Some ladies are lawyer and also homely ladies.
(iv) Every student is a member of N . C . C . or N . S. S. , but some students are not players.
(v) If a and b are non-zero integers and p is a prime number such that p| ab then p| a or p| b.
Propositional Logic 489

Solution: (i) Let R ( x ) ≡ x is real number


G( x, y ) ≡ x > y.
Then the given predicate in symbolic form is
∴ ∀ x [ R ( x ) ⇒ ∃ y {R ( y ) ∧ G( x, y )}].
(ii) W ( x ) ≡ x is lady, L( x ) ≡ x is lawyer , H ( x ) ≡ x is homely lady.
Then ∃ x [W ( x ) ∧ L( x ) ∧ H ( x )].
(iii) Same as (ii).
(iv) S( x ) ≡ x is student. N ( x ) ≡ x is a member of N.C.C. M ( x ) ≡ x is a member of N.S.S. P ( x ) ≡ x is a player.
Then ∀ x [ S( x ) ⇒ {N ( x ) ∧ M ( x )}] ∧ ∃ y [ S( y ) ∧ ~ P ( y )].
(v) I( x ) ≡ x is a non-zero integer, P ( x ) ≡ x is prime number, D( x, y ) ≡ x is divisible y.
Then ∀ a, b, p [ I(a) ∧ I(b) ∧ P ( p) ∧ D( p, ab)] ⇒ [ D( p, a) ∨ D( p, b)].

Example 114: Write the following predicates into symbolic form:


(i) All are not mortal. (ii) All are immortal.
(iii) For all real numbers x, y, z addition is an associative operation.

Solution: Let x denote any person and M ( x ) ≡ x is Mortal. Then


(i) ~ ∀ x [ M ( x )]. (ii) ∀ x ⇒ [~ M ( x )].
(iii) Let x, y, z be real numbers. Then ∀ x, y, z [( x + y ) + z = x + ( y + z )].

Example 115: Write the following predicate into symbols and also write its negative in symbols:

‘‘Every rational number is a real number’’.

Solution: Let Q ( x ) ≡ x is rational number, R ( x ) ≡ x is real number, and P ( x ) ≡ Q ( x ) ⇒ R ( x ).


Then symbolic form of given predicate is ∀ x P ( x ).
Negative: ∃ x [~ P ( x )] i.e., ∃ x [~ Q ( x ) ⇒ R ( x )].

1. Show that negative of ∃ x (~ P ( x )) is ∀ x (P ( x )).


[Hint: ~ ∃ x (~ P ( x )) = ∀x (~~ P ( x )) = ∀ x P ( x )] .
2. Write the empty set φ and universal set U by the use of quantifier.
3. Show that ~ ∀ x P ( x ) ≡ ∃ x (~ P ( x )).
4. Define quantifiers, universal quantifiers and existential quantifiers by giving an example.
5. Define existential and universal quantifiers.
6. Which are existential and universal quantifiers? Write three-three statements using each.
7. Explain the following terms and also give examples to explain them:
(a) Quantifier. (b) Universal quantifier.
(c) Existential quantifier. (d) Negation of a quantifier.
490 Discrete Mathematical Structures

8. Define Predicate.
9. Translate the following sentences in quantified expressions of Predicate logic
(a) All students need financial acid
(b) Some students need financial aid [U.P.T.U. (B.Tech.) 2009]
10. Show that the following are not equivalent
∀ x ( P( x ) → Q( x ) ∀ x ∀ y P( x, y )
(a)  (b) 
∀ x P( x ) → ∀ x Q( x ) ∀ y ∀ x P( x, y )
[U.P.T.U. (B.Tech.) 2009]
11. Find out which statements are propositions
(a) Close the door (b) Beware the dogs
(c) 3 + x = 10 (d) This statement is true
12. Which of the following are statements:
(a) Grass is yellow (b) is the number 5 is prime
(c) Give me pen (d) { y : y 2 = 4 = { 2, − 2}
(e) a 2 + b 2 ≥ 0 (f) White roses are beautiful
(g) If dogs can bark, then no home guarded by a dog needs to fear intruders
(h) (7 x + 5 y = 12 : ( x, y ) = (1, 1), x, y ∈ N )
13. Let p be the proposition ‘‘x is an even number’’ and let q be the statement ‘‘x is the product of two integer’’.
Translate into symbols each of the following statements
(a) Either x is an even number, or x is a product of two integers
(b) x is an odd number, and x is a product of two integers
(c) Either x is an even number and a product of integers, or x is an odd number and is
not a product of integers
(d) x is neither an even number nor a product of integers
14. Negate the following propositions
(a) All the triangles have the sum of their angle equal to 180°
(b) There is an integer between 4 and 8 inclusive
(c) All students live in the hostels
(d) For all x in S, 0 + x = 0
(e) All differentiable functions are continuous
15. If p ≡ It is about 6:45 PM

q ≡ Sangam Train is about to depart, then find


(a) p∧ q (b) p∨ q (c) q ∨ (~ p)
(d) p ∧ (~ q) (e) ~( p ∧ q) (f) ~( p ∨ q)
(g) ~p⇒q (h) (~ p ⇒ p)
16. What are two types of quantifiers?
Propositional Logic 491

2. X = φ ≡ V x ( x ∉ X ), X = ∪ ≡ Vx( x ∈ X )

2. X = φ ≡ V x ( x ∈ X ), X = ∪ ≡ V x ( x ∈ X )
11. (a) No (b) No (c) No (d) Yes
12. (a) Yes (b) No (c) No (d) Yes (e) Yes (f) Yes
(g) Yes (h) Yes
13. (a) p ∨ q (b) p ∧ q (c) p ∧ q ∨ (~ p ∧ ~ q) (d) φ ~ p ∧ ~ q
14. (a) There is a triangle whose sum of angles ≠ 180°
(b) All integers are not between 4 and 8 inclusive
(c) Some students do not leave in hostels
(d) There exists an x in S such that 0 + x ≠ 0
(e) Not all differentiable functions are continuous.
15. (a) It is about 6:45 p.m. and Sangam train is about of depart
(b) Either it is about 6:45 p.m. or Sangam train is about to depart
(c) Either Sangam Train is about to depart or it is not about 6:45 p.m.
(d) It is about to 6:45 p.m. and Sangam train is not about to depart
(e) It is false that it is about 6:45 p.m. and Sangam train is about to depart.
(f) Neither it is about to 6:45 p.m. nor Sangam train is about to depart.
(g) It is not about to 6:45 p.m., then Sangam train is about to depart
(h) If the Sangam train is not about to depart, then it is about to 6:45 p.m.

Multiple Choice Questions


1. The proposition P ∧ P is equivalent to
(a) 0 (b) p (c) − p (d) none of these
2. The proposition ~( p ∧ q) is equivalent to
(a) ~ p ∨ ~ q (b) ~ p ∧ ~ q (c) p ∧ q (d) none of these
3. The number of rows in the truth table of a compound statement having n distinct primary or atomic
statements is
(a) 2n (b) n2 (c) |_n (d) 28
4. Which of the following is a tautology
(a) ~[ p ∧ (~ p)] (b) p ∧ p (c) ~ p ∧ ~ p (d) p ∨ p
5. Which of the following are tautologies
(a) (( p ∨ q) ∧ q) ⇔ q (b) ( p ∨ q) ∧ (~ p) = q
(c) ( p ∨ q) ∧ p ⇒ q (d) ( p ∨ ( p → q)) → p
6. p ∨ q is false when
(a) p is true, q is false (b) p is true, q is true
(c) p is false, q is true (d) p is false, q is false.
492 Discrete Mathematical Structures

7. If T ( x ): x is teacher, M ( x ): x is male, then symbolic representation of the statement ‘‘All teacher are
male’’ is
(a) ∀ x [T ( x )] ⇒ M ( x ) (b) ∀ x {T ( x ) ∨ M ( x )}
(c) ∀ x {T ( x ) ∧ M ( x )} (d) ∃ x {T ( x ) ∧ ~ M ( x )}
8. The proposition p ∧ (~ ∨ Q ) is
(a) A tautology (b) A contradiction
(c) Logically equivalent to P ∧ Q (d) Logically equivalent to P ∨ Q
[U.P.T.U. (M.C. A.) 2008]

State True or False


1. If 6 < 2 then − 6 > − 7
2. Real part of (1 + 2i )3 is 4
3. 3 divide 9 and 3 + 5 = 12
4. 5 divide 20 and 2 + 7 = 9
5. Every complex number is a rational number.

Fill in the Blank(s)


1. The ................... condition that the figure PQRS is a rectangle is that it is a quadrilateral.
2. The .................. condition that I am more than 40 years old is that I am more that 20 years old.
3. The ................. condition that p, q is odd is that p is odd and q is odd.
4. The ................. condition that I am more than 40 years old is that I am more than 60 years old.

Multiple Choice Questions

1. (b) 2. (a) 3. (a) 4. (a) 5. (a) and (b) 6. (d)

7. (a) 8. (c)

State True or False

1. T 2. T 3. F 4. T 5. F

Fill in the Blank(s)

1. necessary 2. necessary 3. necessary and sufficient

4. sufficient

qqq
Unit-5

C hapter
10. : Trees and their Proper ties
11. : Graph Theor y
12. : Recur rence Relations
13. : Discrete Numeric and Generating Functions
14. : Combinatories
15. : Polya's Theorem
10.1 Introduction
The concept of a tree is the most important tool for the study of graph theory, especially for those
interested in application of graph. In this chapter, first of all we shall define a tree and study its properties.
We shall also introduce and discuss other graph theoretic terms related to trees. Thereafter, we shall
introduce the concept of spanning tree-another important notion in the the ory of graphs. The re lationships
among circuits, trees, and so on, in a graph are explored.

10.2 Tree
In the study of graph of a network we obtain several circuit (closed paths) through which current can
flow. Such circuits, are necessary for the flow of current. However, by deleting some branches from the
graph we can check the current to flow. By deleting branches and rejecting the closed path, the residual
graph is known as a “tree”.
A Tree is a connected graph without any circuits.

Illustrations
(i) All the trees with at most five vertices are shown in Fig. 10.1.

Fig. 10.1

(ii) The adjoining Fig. 10.2 shows six trees with six vertices:

Fig. 10.2
496 Discrete Mathematical Structures

(iii) The adjoining Fig. 10.3 shows a river with its tributaries and sub-tributaries:

Fig. 10.3: River tree

The process of deleting the branches from a graph can be done by several methods. In the adjoining
Fig. 10.4 (a) a graph is shown and in Fig. 10.4 (b) and Fig. 10.4 (c) two trees are shown amongst
several possibilities.

(a) (b) (c)


Fig. 10.4

In every tree, the remaining branches of the tree are just sufficient to join all nodes. Hence we can
define precisely a tree as. Any set of branches in the original graph, just sufficient in number to
connect all the nodes, is called a tree.
If ni denotes the total number of nodes, then it can easily be seen that the minimum number of
branches to join all nodes is (ni − 1) and we shall not get any closed path (circuit).
If the number of branches is greater than (ni − 1), then only we shall get closed path.
Hence n = ni − 1
where n = number of tree branches, ni = total number of nodes.
The remaining branches are said to be Lines.
Thus, if l is the number of lines, then b = l + n where b denotes the total number of Branches.

10.2.1 Rooted Tree [U.P.T.U. (B.Tech.) 2007]

A Rooted Tree is a tree with a distinguished ver tex, called the Root. Any vertex of a tree may be designed
as the root, but we shall cus tomarily draw a rooted tree with the root at the top (or at the bottom) and
circled or triangled.
Trees and their Properties 497

Illustrations

(i) In the adjoining Fig. 10.5 rooted trees with 4 vertices are shown:

Fig. 10.5: Rooted Tree with Four Vertices

(ii) In the ad joining Fig. 10.6 all rooted trees with 5 ver tices are shown:

Fig. 10.6: Rooted Trees with Five Vertices

10.2.2 Ordered Rooted Tree


If edges leaving each vertex of a rooted tree T are labeled, then T is called an Ordered Rooted Tree. The
vertices of an ordered rooted tree can be labeled as follows : we assign 0 to the root of the tree. We next
assign 1, 2, 3, 4, ... to the vertices immediately following the root of T accordingly as the edges were
ordered. The remaining vertices can be ordered as follows : If p is the label of a vertex v of T then
p . 0, p . 1, p . 2 , K are assigned to the vertices immediately following v accordingly as the edges were
ordered. An ordered rooted tree is shown in the Fig. 10.7 as follows:

(Root) 0

3
1
3.0 3.1
1.0 1.1 1.2 2

2.0 2.1 2.2

2.1.0 2.1.1
Fig. 10.7
498 Discrete Mathematical Structures

10.2.3 Expression Tree


If an algebraic expression involving addition (+), subtraction (−), multiplication (× ), division (÷) and index
(↑) can be expressed as an ordered rooted tree, then it is called an Expression Tree.

10.2.4 Arborescence
Let G be a directed graph. G is said to be an Arborescence if:
(i) G contains no circuit neither directed nor semi-circuit; and
(ii) G has exactly one vertex v of zero in-degree.
The vertex v of zero degree in G is called the Root of the
v (root)
Arborescence.
Fig. 10.8
From the definition, it is clear that on arborescence is a directed tree in
which there is exactly one vertex of in-degree zero. If G is an arborescence then every vertex of T is
reachable, from the root, and the root is not accessible from any other vertex of G. If v is a vertex of
out-degree zero, in G then v is necessarily a pendant vertex. An arborescence is sometimes referred to as an
out-tree.

Theorem 1: An arborescence is a tree in which every vertex other than the root has an in-de gree of exactly
one.
Proof: Let G be an arborescence with n-vertices. G can have at most n − 1, edges, because of condition (i). If
v1 , v2 , K , vn denote the vertices of G, then the sum of in degree of all vertices in G, i.e.,
d − (v1 ) + d − (v2 ) + K + d − (vn ) ≤ n − 1

exactly one of the terms on the left-hand side of the above equation is zero (by condition (ii)) and the
remaining terms must all be positive integers, therefore each of the remaining terms must be 1. Now, since
there are exactly n − 1, vertices of in-degree one and one vertex of in-degree zero. G has exactly n − 1 edges.
Since G is without circuits, G must be connected. Hence, G must be a tree, in which every vertex other than
the root has an in-degree of exactly one.

Theorem 2: In an arborescence there is a directed path from the root R to every other vertex.
Proof: Let us consider a path P which start from the root R and traverses as far as possible in an
arborescence. P can end only at a pendant vertex because otherwise we get a vertex whose in-degree is two
or more. But then it would be a contradiction. Hence P ends at a pendant vertex. Now since an
arborescence is a connected and every directed path from R ends at a pendant vertex, every vertex line on
some directed path from the root R.

Theorem 3: A cir cuit-less diagraph G is an arborescence if there is a vertex v in G such that every other vertex
is ac ces sible from v and v is not acces si ble from any other ver tex.
Proof : G is circuit-less and every vertex in G is accessible from v, therefore G is con nected and hence G is a
tree. Further we are given that v is not accessible from any other vertex, therefore d − (v ) = 0. Since every
vertex is accessible from v, therefore in-degree of every vertex other than v is at least one. Since G is a tree,
it has n − 1 edges, where n is the number of vertices in G. Therefore sum of in-degrees of all the vertices in G.
Now there are n − 1 vertices whose in-degree is at least one. From this, we conclude that in-degree of each
n − 1 vertices (other than v) is one. By the orem 1, G is an arborescence.
Trees and their Properties 499

10.3 Decision Trees or Sorting Trees


Decision trees or sorting trees are labeled rooted trees which occur in applications, especially in computer
programming and computer algorithms, the root represents a starting point, later vertices represent later
decision points and one proceeds downward through the tree, choosing as edge at each step according to
observe data. A special class of rooted trees, called Binary Rooted Trees, is of particular interest, since
they are extensively used in the study of computer search methods, binary identification problems, and
variable-length binary codes.

10.3.1 Binary Tree [U.P.T.U. (B. Tech) 2007, 2009]

A Binary Tree is defined as a tree in which there is exactly one vertex of degree two, and each of the
remaining vertices is of degree one or three. Since the vertex of degree two is distinct from all other
vertices, this vertex serves as a root. Thus every binary tree is a rooted tree. When the trees are levelled, the
root v constitute level o, the neighbouring vertices of v constitute level 1, the Neighbouring neighbors of
vertices having level 1 are assigned level 2 and so on.

If the level of any vertex x is i, then its neighboring vertices on next level (i+1) are called its Children or
descendants. The vertices on previous level are called Father or Predecessor. A rooted levelled tree in
which any vertex has at most two children is called binary tree. If every vertex of a binary tree has either
two children or no child, then such a binary tree is called a full or Complete Binary Tree.

10.3.2 Pendant Vertex in a Tree


A pendant vertex in a tree is defined as a vertex of degree one. A non-pendant vertex in a tree is called an
Internal Vertex. Two prop erties of bi nary trees fol low di rectly from the def inition:

1. The number of vertices n in a binary tree is always odd. This is because there is exactly one vertex of
even degree, and the remaining n − 1 vertices are of odd degrees. Since the number of vertices of odd
degrees is even, n − 1 is even. Hence n is odd.

2. Let p be the number of pendant vertices in a binary tree T . Then n − p − 1 is the number of vertices of
degree three.

Therefore, the number of edges in T equals


1
[ p + 3 (n − p − 1) + 2] = n − 1
2
n+1
∴ p= ... (1)
2

It follows from (1) that the number of internal vertices in a binary tree is one less than the number of
pendant vertices.
500 Discrete Mathematical Structures

10.3.3 Level of Vertices in a Binary Tree Level 0

In a binary tree a vertex vi is said to be at Level li if vi is at Level 1


a distance of li from the root. Thus the root is at level 0. Level 2
Illustration: Level 3
A 13-vertex, four-level binary tree is shown in Fig. 10.9.
Level 4
The number of vertices at levels 1, 2, 3 and 4 are 2, 2, 4
and 4, respectively. Fig. 10.9: 13-level binary tree

10.3.4 Binary Decision Tree


If a student passes both of the first two tests, or fails both, there is no decision needed from test 3. We have
emphasized the path to the outcome for a student who passes the first test, fails the second, and passes the
third : the student passes the course. Observe that in a binary tree, each decision has only two possible
outcomes : YES or NO, TRUE or FALSE, 0 or 1, etc.

Illustration:
A student must pass two from three tests to pass a course, the binary decision tree appears in the adjoining
Fig. 10.10 with label P denoting “pass” and label F denoting “fail”.

Test 1 F
P
Test 2
F P F P
Test 3
P F
F P

Out come Fail Fail Pass Fail Pass Pass

Fig. 10.10: A Binary Decision Tree

Example 1: What is a ‘Binary search Tree’? A binary search tree T and an ITEM of information is given write
the algorithm which finds the location of ITEM or inserts ITEM as a new node in tree.
[U.P.T.U. (B.Tech) 2008]
Solution: Definition is given in article.
Algorithm: A binary search tree T and an ITEM of information as given
Step 1: Compare ITEM with the root N of the tree.
(i) If ITEM< N, proceed to the left child of N
(ii) If ITEM > N, proceed to the right child of N
Step 2: Repeat step 1 until one of the following obtains.
(i) We meet a node N such that ITEM=N. In this case the search is successful.
(ii) We meet an empty subtree, which indicate the search in successful. Insert ITEM in place of the empty
subtree.
Trees and their Properties 501

Example 2: Show that Hamiltonian path is a spanning tree. [U.P.T.U. (B.Tech) 2006]

Solution: A Hamiltonian circuit in a graph G is a closed path that transverse every vertex in G exactly
once. According to the definition of Hamiltonian path each vertices transversed. So the Hamiltonian path
contains all vertices of graph G. The Hamiltonian path does not transverse a particular vertex twice. So
therefore it is a graph without cycle. Then it is called Spanning Tree. Hence, the Hamiltonian path is a
spanning tree.

Theorem 4: Prove that a binary tree with n nodes has exactly (n + 1) null branches.

[U.P.T.U. (B. Tech.) 2006]

Proof: We shall prove this theorem by induction.

Let n = 1, then tree 0 level only one node has two null branches in case of binary tree.

At level 0 ⇒ 1 node → 0
→ Level 1 2

At level 1 ⇒ 2 node → → Level 2 1


2

→ Level 3 2
2

m–1
At level m = 2 node →
Fig. 10.11

When n = m, n = m + 1 null branches holds, then show (m + 1)nodes there are (m + 2)null branches

At (m + 1) level the nodes are 2m +1 . For 2m +1 number of branches = 2.2m +1 = 2m + 2

this show (m + 1) nodes has (m + 2) null branches hence theorem is tree for all value of n.

Results: 1. A full m-ary tree with internal vertex has n = m i + 1 vertices.

2. There are at most mh leaves in an m-ary tree of height h.

Uses of trees: Trees are generally used. [U.P.T.U. (M.C.A.) 2001]

(i) to represent the geneology of family.

(ii) to represent a river along with its tributaries and sub-tributaries.

(iii) in sorting of mail according to pin codes.

(iv) in computer programming and switching theory.


502 Discrete Mathematical Structures

10.4 Tree Searching (Traversing) [U.P.T.U. (B.Tech.) 2007, 2008, 2009]

The process of visiting and performing some computation at each


vertex of a tree is called Searching or Performing a Tree Search. vL vR
This process is known as walking or Traversing the Tree. Let each
vertex of a binary tree has exactly n children (off spring). Each of vL
these children are labeled with different numbers from 1 to n or with vR vR vL
English alphabet A to Z. The labeled tree is some times called vR

Positional Binary Tree. The root of the tree is not labeled. Since it vL vL
is not an off spring of any vertex. The position of the off spring is vR
indicated by the direction of the edges as shown in 10.12. As each Fig. 10.12
vertex of positional binary tree has two potential off-spring, these
off-spring will be denoted by vL (left off spring) and vR (right off spring).
There are three standard recursive methods (or algorithms) for searching (traversing) a positional binary
tree T with root v, as given below:
(1) Depth first order search or pre order search
(2) In order search or systematic order search
(3) Post order search.
Depth first order search: Depth first order search algorithm is as follows:
Step 1: Visit the root v of the tree.
Step 2: If vL exists, then search the left subtree TL of T is pre-order.
Step 3: If vR exists, than search the right subtree TR of T in pre-order.

Illustration:
Let a positional tree T be shown in Fig. 10.13 with root vertex a. The left subtree TL consists of vertices
b, d, e, h, i and j and its right subtree TR consists of vertices c, f , g, k and l .

b c
g
d f
e
l 11
h 3 2 k 9 10
6 8
i 5
4 j 7
1

Fig. 10.13: Example of Pre-Order Search


Trees and their Properties 503

First we apply pre-order search on left subtree TL numbered as l. For this, we start pre-order search of TL1
by first visiting its roots vertex b and then vertices d, h, e, i and j in this order. Similarly, applying pre-order
search of right subtree TR numbered as 7. The pre-order search of TR 7 starts by first visiting its root vertex c
and then vertices f , k, g and l in this order. The result of complete pre-order search of the given tree is the
string a b d h e i j c f k g l.

10.4.1 Systematic Order Search (SOS Algorithm)


Systematic order search algorithm is as follows:
Step 1: Search the left subtree TL if it exists in order.
Step 2: Visit the root of the tree.
Step 3: Search the right subtree TR , if it exists in-order.
For the in-order search we first search root vertex a and then right subtree TR . Then in-order search of left
subtree TL starts from its root vertex b numbered as TL1 and then searches vertices d and h. Since search of
tree with one vertex only prints the left of the vertex, therefore the order of search is h d b. Now we proceed
to search subtree TL 4 and search vertices i, e and j in this or der, which gives the string i, e, j. Af ter
completing search of left subtree TL , we visit the root ver tex a. This yields the string h d b i.e. j a. Proceed to
search right subtree TR starting from subtree 8, 9 and 7 and then search subtree 10 and 11. This gives the
string f k c g l. The result of complete in-order search of the given tree is the string h d b i e j a f k c g l.

10.4.2 Post-order Search


The steps of post-order search algorithm are as follows:
Step (1) Search left subtree TL if it exists in post-order.
Step (2) Search right subtree TR , if it exists in post-order.
Step (3) Visit the root of the tree.
The post-order search of T as shown in Fig. 10.13 searches subtree TL , TR and then search root vertex a, float
is, in post-order search subtree TL and TR 7 will be searched before root of the tree. Similarly subtrees TL 2 and
TL 4 will be searched before root of subtree TL1 , and so on. The post-order search of TL1 gives the string
h d i j e b. In the same way the post-order search of TR 7 gives the string k f l g c.
The result of complete post-order search of the given tree is the string:
h d i j e b k f l g c a.

Example 3: Show the result of per forming pre-order, in-order and post-order searches of the binary tree
shown in Fig. 10.14.
Solution: The result of pre-or der, in-or der and post-order tree search al gorithm is the follow ing:
a

Pre-order a b d c e f g c
b

In-order b d a c g f e e
d

f
Post-order d b g f e c a
g
Fig. 10.14
504 Discrete Mathematical Structures

Example 4: Show the result of performing pre-order, in-order and post-order searches of the binary tree
shown in Fig. 10.15 .
Solution:

Pre-order a b d h i e c f
In-order h d i b e a f c
Post-order h i d e b f j k

Fig. 10.15

10.5 Binary Tree Construction


Case 1: When both pre-order search and in-order search of binary tree T are given:
Step (1) Identify the root vertex of T by choosing the first vertex (node) in its pre-order search.
Step (2) Find left child of the root vertex. For the first we use in-order search of T to find the vertices in the
left vertices subtree TL of T . It is obvious that all these vertices are at the left side of the root vertex and then
left child of the root vertex is obtained by choosing the first vertex in the pre-order search of TL , that
appears in the pre-order of T .
Step (3) Find the right subtree TR of T by using in-order search of T . Then right child of the root vertex is
obtained by choosing the first root vertex in the pre-order search of TR .
Step (4) Repeat steps (2) and (3) with each new vertex until all vertices are visited in pre-order search to
draw complete binary tree.
Case 2: When both post-order search and in-order search of binary tree T are given:
Step (1) Iden tify the root vertex of T by choos ing the last vertex in its post-or der search.
Step (2) Find the left child of the root ver tex ob tained in Step (1). For this first use in-order search of T to
find ver tices in the left subtree TL of T , and the left child of the root ver tex is ob tained by se lecting the last
vertex in the post-order search of TL .
Step (3) Similarly, find the right child of the root vertex obtained in Step (1). For this first we use in-order
search of T to find the vertices in the right subtree TR of T , and then the right child is ob tained by choos ing
the last vertex in the post-order search of TR .
Step (4) Repeat steps (2) and (3) with each new vertex until all vertices are visited in the post-order to
draw complete binary tree.
Trees and their Properties 505

Example 5: Let the pre-order and in-order search of a binary tree T yield the fol lowing se quence of ver tices
(nodes):

In-order d b p h q s e a c r k f l

root node
Pre-order a b d e h p q s c f k r l

root node
[U.P.T.U. (B.Tech) 2009]
(a) Draw the binary tree T .
(b) Find depth (height) of T and the decedents of vertex b.
a
Solution: Since the root of the binary tree T is the first vertex in
pre-order search, therefore choose vertex a as the root vertex of T . To
b c
find left child of root vertex a first mark in in-order search all nodes that
are to the left of a. These vertices constitute a subtree TL of a. The left e
f
d
subtree TL consists of the vertices d, b, p, h, q, s and e which are to the left
h k
of root vertex a. Then left child of a is then obtained by choosing the next
p f l
vertex (root) in the pre-order, i.e. vertex b. This vertex is to the left of a in q
in-order search. Thus b is the left child of a. s
Fig. 10.16

Similarly, the right subtree TR of root vertex a consists of the vertices c, r, k, f and l and c is the root of TR i.e.
c is the right child of T . To draw the tree as shown in Fig. 10.16 repeat the above process for each new
vertex until all the nodes of pre-order search are considered.
(b) The depth (height) of T is 5 and decedents of b are d, e, h, p, q, s.

Example 6: Suppose the pre-order and in-order search of a binary tree T give the fol lowing se quence of nodes.

In-order d b g e h a c f

root node
Pre-order a b d e h p q s

root node
a
Draw the binary tree T and find its height.
Solution: As the first vertex in the pre-or der search of a bi nary tree is the c
b
root ver tex, so ver tex a is the root vertex of the bi nary tree to be drawn.
e
The binary tree drawn by using same method as discussed in Ex. 6 is d f
h
shown in Fig. 10.17.
g
Fig. 10.17
506 Discrete Mathematical Structures

Example 7: Sup pose the post-or der and in-or der search of a bi nary tree T yield the fol lowing se quence of
nodes (vertices):

In-order d b g e h a c f

root node
Pre-order d g h e b f c a

root node

[U.P.T.U. (B.Tech.) 2003]


Solution: Since we know that the last vertex in the post-order search is the root vertex of the binary tree.
Therefore, vertex a is the root vertex. In the in-order search all vertices
d, b, g, e, and h which are left to a constitute left subtree of a and vertices, c a
and f that are right to a constitute right subtree of a. In post-order search
the next vertex on the left of root vertex is vertex c. This vertex is on the b c
right of root vertex a in in-order search. Thus vertex c is the right child of a.
e
Similarly, vertex f in post-order search is also on the right of root vertex a in d
h f
in-order search. Therefore it is the child of vertex c which is the right child
g
of a.
Fig. 10.18
To draw the tree as shown in Fig. 10.18 repeat the above process for each
vertex until all vertices of post-order search are considered.

10.6 Relationship between General Trees and Binary Trees


A general tree Tg can be converted into a unique binary Tb tree as follows:
1. The number of vertices (nodes) in a binary tree Tb is equal to that of the general tree Tg .
2. The root vertex of Tb is same as the root vertex of Tg .
3. The first child (from left) of root vertex v0 in Tg is the left child of the root vertex in Tb, and right child
root vertex in Tb is the sibling of root vertex in Tg .
4. Repeat Step (2) and (3) for each new vertex of general tree till corresponding binary tree is drawn.

Example 8: Consider the general tree shown in Fig. 10.19. Draw the corresponding binary tree.
1 1
2
2
4 5 3
5 3
8 9 6 4
6 7 10 7
8
11
9 10 11 12 13 14 12 13
Fig. 10.19: General Tree
14

Fig. 10.20: Binary Tree

Solution: Apply the procedure for converting a general tree into a binary tree and then we obtain a binary
tree as shown in Fig. 10.20.
Trees and their Properties 507

Example 9: Consider the general tree Tg as shown in Fig. 10.21. Draw the corresponding binary tree Tb.

Fig. 10.21: General Tree

Fig. 10.22: Binary Tree

Solution: Applying the procedure for converting a general tree into a binary tree, we obtain a binary tree
as shown in Fig 10.22.

10.7 Maximum and Minimum Possible Height of An n-Vertex Binary Tree


It is well known that one of the most straight applications of binary trees is in search procedures. Each
vertex of a binary tree represents a test with two possible outcomes. We start at the root, and the outcome
of the test at the root sends us to one of the two vertices at the next level, where further test are made, and
so on. Our search will be terminated after reaching a specified pendant vertex (the goal of the search. For
such a search procedure it is often important to construct a binary tree in which, for a given number of
vertices n, the vertex farthest from the root is as close to the as possible. Clearly, there shall be only one
vertex (the root) at level 0, at most two vertices at level 1, at most four vertices at level 2, and so on.
Therefore, the maximum number of vertices possible in a k-level binary tree is
20 + 21 + 22 + K + 2k ≥ n.

The maximum level, lmax , of any vertex in a binary tree is called the height of the tree. It is easy to see that
the minimum possible weight of an n-ver tex bi nary tree is
min lmax = [log 2 (n + 1) − 1] ...(1)
where [ n] denotes the smallest integer greater than or equal to n.
If we construct a binary tree for a given n such that the farthest vertex is as far as possible from the root,
then we must have exactly two vertices at each level, except at the 0 level. Therefore
n −1
max lmax = ...(2)
2
508 Discrete Mathematical Structures

For n = 11, binary trees realizing both these extremes are shown in Fig. 10.23.

Level
........................................... 0
Level
0 ............................. .................................. 1

........................... 2
1 ...................
................... 3
2 ..............
............ 4
3 ...
... 5
(a) (b)

Fig. 10.23

11 – 1
Min lmax = [log 2 12 – 1] = 3 and Max lmax = =5
2

Example 10: Show that the number of vertices in a binary tree is odd
[P.T.U. (B.E.) Punjab 2009; M.K.U. (B.E.) 2003, 2007]
Solution: Let T be a binary tree with n vertices. T contains exactly one vertex of degree 2 and the remaining
vertices of T are of degree one or three. Therefore number of odd degree vertices in T is (n – 1) . But number of
odd degree vertices in graph is even. Therefore (n – 1) must be even, then n is odd.

Example 11: Find the minimum height of the tree with 9 vertices [U.P.T.U. (M.C.A.) 2004]

Solution: We have number of vertices n = 9


We know minimum height of binary tree
= [log 2(n + 1) − 1] = [log 2(9 + 1) − 1 = log 2(10 − 1)] = 4 – 1 = 3

Example 12: Let T be a binary tree with n vertices and p is the number of pendant vertices in T, show that the
number of vertices of degree 3 in T is n – p + 1. [Nagpur (B.E.) 2005; Pune (B.E.) 2007]

Solution: The tree T has p vertices of degree one and one vertex in T is of degree 2. Then number of
remaining vertices (vertices of degree 3) = n – p – 1.
n+1
Example 13: Let T be a binary tree with n vertices. Show that the number of pendant vertices in T is .
2
Solution: Let p = number of pendant vertices in T

The number of edges in T = n – 1

∴ The degree sum is T = 2 (n – 1)

⇒ p × 1 + 3(n – p – 1) + 2 = 2(n – 1)
n+1
⇒ p + 3n – 3p – 3 + 2 = 2n – 2 or (n + 1 = 2p or p=
2
Trees and their Properties 509

Example 14: Find the maximum possible height of a binary with 13


vertices and draw graph of tree. [U.P.T.U. (B.Tech.) 2002]

Solution: Here, n = 13
n − 1 13 – 1
We know maximum possible height of the binary tree = = =6
2 2
Fig. 10.24: Binary tree of maximum
height with 13 vertices.
10.7.1 Path Length of a Tree
In analysis of algorithms we are generally interested in computing the sum of the level of all pendant
vertex. This quantity is known as the Path Length of a Tree. The Path Length of a Tree is de fined as
the sum of the path lengths from the root of all pendant vertices. The importance of the path length of a
tree lies in the fact that this quantity is often di rectly related to the execution time of an algorithm.

10.8 Spanning Tree


Let G = (V, E ) be any connected graph. A spanning tree (or a skeleton or a maximal tree subgraph) in G is a
subgraph T = (V, E ′ ) of G which is a tree. Note that we have three requirements:
1. T has the same vertex V of vertices as does G.
2. T is a tree.
3. T is a subgraph (so E ′ ⊆ E ).
In other words, a subgraph T of a connected graph G is said to be a spanning tree of G if the subgraph T is a
tree and contains all the vertices of G.
Nevertheless, spanning trees within a given graph are easy to find; a connected graph that is not itself a
tree will generally have many spanning trees. Let G be a connected graph with n vertices and e edges. Let T
be a spanning tree of G. Then
(1) The edges of spanning tree T are called Branches of T .
(2) The edges of G that are not in the given spanning tree are called Chords of T .
A chord is sometimes referred to as a Tie or a Link. For example, edges b1 , b2, b3 , b4 and b5 are branches of
the spanning tree shown in Fig. 10.25 (b), while edges c1 , c2, c3 , c4 , c5, c6 and c7 are chords rel ative to this
spanning tree.

c1 b1
b1
b2
b2

c2 b3 b5
b4 b3 b5
c3
c4 b4
c5 c6
c7

(a) (b) A spanning tree T


Fig. 10.25
510 Discrete Mathematical Structures

Remember that branches and chords are defined only with respective to a given spanning tree. An edge
that is a branch of one spanning tree T1 of a graph G may be a chord with respect to another spanning tree T2
of G.
(3) The co-spanning tree T ∗ of a spanning tree T of a connected graph G is the subgraph of G having all the
vertices of G and exactly those edges of G which are not in T .
It may be observe that a co-spanning tree may not be connected.
It is sometimes convenient to represent a connected graph G as a union of two subgraphs T and T ; that is
T ∪ T = G,
where T is a spanning tree, and T is the complement of T in G. Since the subgraph T is the collection of
chords, it is quite appropriately referred to as the chord set (or tie set or co-tree) of T .

Illustration: 10.26 we picture the eight spanning trees of Fig. 10.27.

10.8.1 Some Properties of Spanning Trees or Theorems on Trees


Since a tree is a connected graph, a spanning tree is defined only for a connected graph. If G is an arbitrary
graph with k components (connected subgraphs) then each of the k components does have a spanning tree.
Thus a disconnected graph with k components has a spanning forest consisting of k spanning trees (A
collection of trees is called a forest).

Theorem 5: Every connected graph has at least one spanning tree.


Proof: Let G be a connected graph. If G has no circuit then it is own spanning tree. If G has a circuit then
delete an edge from the circuit. It is clear that the graph obtained by removing an edge from a circuit in G
will remain connected. If there are more circuits, repeat the process until we get a connected, circuit free
graph that contains all the vertices of G. Then it is clear that this graph will be a spanning tree of G.

Theorem 6: With respect fo any of its spanning trees, a connected graph with n vertices and e edges has n − 1
tree branches and e − n + 1 chords. [Rohtak (B.E.) 2009]

Proof: Let G be a graph with n vertices and e edges and let T be any spanning tree of G. Then T has n vertices
and n − 1 edges. The remaining e − n + 1 edges in G are chords.
Hence the graph G with n vertices and e edges has n − 1 tree branches and e − n + 1 chords.
For example, the graph in Fig. 10.25 (a) has 6 vertices and 12 edges (i.e. n = 6 and e = 12). This graph has 5
tree branches (b1 , b2, b3 , b4 , b5 ) and e − n + 1 = 12 − 6 + 1 = 7 chords, {c1 , c2, c3 , c4 , c5, c6 , c7 } with respect to
the spanning tree given in Fig. 10.25 (b).
Note that any other spanning tree will also yield the same number.
Trees and their Properties 511

Theorem 7: There is one and only one path between every pair of vertices in a tree T.
[Kurukshetra (B.E.) 2009]
Proof: Since T is a connected graph, there must exist at least one path between every pair of vertices in T .
Now suppose that between two vertices v and w of T there are two distinct paths. The union of these two
paths will contain a circuit and T cannot be a tree. Hence we conclude that there is one and only one path
between every pair of vertices in a tree T .

Conversely or Theorem 8: If in a graph G there is one and only one path between every pair of vertices,
then G is a tree.
Proof: Existence of a path between every pair of vertices assures that G is connected. A circuit in a graph
(with two or more ver tices) im plies that there is at least one pair of ver tices v and w such that there are two
distinct paths be tween v and w. Since G has one and only one path between every pair of vertices, also G can
have no circuit. Therefore, G must be a tree.

Theorem 9: A tree with n vertices has (n − 1) edges.


Proof: Let T be a tree with n ver tices. Clearly, there is no cir cuit in T . We now prove the theorem by
induction on the number of vertices. Let T = (V, E ). Then we have to show that | V | = | E | + 1.
If | V | = n = 1 then | E | = 0, because a tree has no circuit. Hence the given
statement is true for n = 1.
If| V | = n = 2 then it is clear that| E | = 1. Hence the given statement is true for
n = 2.
Similarly, if| V | = n = 3 then it is clear that| E | = 2. Hence the given statement Fig. 10.28: Trees with one,
is true for n = 3 . two and three Vertices

The above facts can be justified from the adjoining Fig. 10.28.
Assume that the theorem holds for all trees with fewer than n vertices.
We now consider a tree T with n vertices. In T let ek be an edge with end vertices vi and v j . According to
Theorem 7, there is no other path between vi and v j except ek . Therefore, deletion of ek from T will
disconnect the graph, as shown in Fig. 10.29 Furthermore, T − ek consists of exactly two components and
since there were no circuits in T to begin with, each of these components is a tree. Both these trees t1 and t 2,
have fewer than n vertices each. Therefore, by induction hypothesis, each contains one less edge than the
number of vertices in it. Thus T − ek consists of n − 2 edges (and n vertices). Hence T has exactly n − 1 edges.

t1 t2

ek vj
vi

Fig. 10.29

Theorem 10: Any connected graph with n vertices and (n − 1) edges is a tree.
Proof: The proof of this theorem is left as an exercise to the reader.
512 Discrete Mathematical Structures

10.8.2 Minimally Connected Graph


A connected graph is said to be minimally connected if removal of any one edge from it disconnect the
graph.

Theorem 11: A graph is a tree if and only if it is minimally connected.


Proof: A minimally connected graph has no circuit, otherwise we could remove one of the edges in the
circuit and still leave the graph connected. Thus a minimally connected graph is a tree.
Conversely, if a connected graph G is not minimally connected, there must exist an edge ei in G such that
G − ei is connected. Therefore, ei is in same circuit, which implies that G is not a tree. This completes the
proof of the theorem.

Theorem 12: A graph G with n vertices, n − 1 edges, and no circuits is connected.


Proof: Suppose there exists a circuit less graph G with n vertices and
n − 1 edges which is disconnected. In this case G will consists of two or
more circuit less components.
e
Without loss of generality, let G consist of two components, g1 and g 2.
v1 v2
We now add an edge e between a vertex v1 in g1 and v2 in g 2 as shown in
Fig. 10.30 since there was no path between v1 and v2 in G, adding e did
not create a circuit. Thus G ∪ e is a circuit less, connected graph (i.e. a g2
g1
tree) of n vertices and n edges, which is not possible by virtue of
Fig. 10.30
Theorem 9. Thus a graph G with n vertices, n − 1 edges and no circuit is
connected.

10.9 Rank and Nullity of a Graph


Let G = (V, E ) be a graph, and let | V | = n,| E | = e,
number of components = number of connected subgraph = k. Then we define
rank r = n − k and nullity v = e − n + k
Note that the rank of a connected graph is n − 1, and the nullity e − n + 1. It may be observed that
rank of G = number of branches in any spanning tree of G,
nullity of G = number of chords in G,
rank + nullity =number of edges in G.

10.10 Fundamental Circuits


Before defining fundamental circuits in a graph, we prove the following:

Theorem 13: A connected graph G is a tree if and only if adding an edge between any two vertices in G creates
exactly one circuit.
Proof: Let G be a connected graph, and let it is a tree. Let a and b be any two vertices in G. Since G is a tree,
there exists one path between vertices a and b. Add an edge between a and b then we find that an additional
path between a and b will be created and hence it creates exactly one circuit.
Trees and their Properties 513

Conversely, suppose that G is a connected graph such that adding an edge between any two vertices in G
creates exactly one circuit. We now show that G is a tree. In order to show that G is a tree, it is sufficient to
show that G has no circuit because G is already connected. Suppose, if possible, that G has a circuit. Then
adding an edge between two vertices of the circuit will create two circuits because there are two paths
between these vertices in the circuit. But it contracts our hypothesis. This completes the proof.

Definition: A circuit forward by adding a chord to a spanning tree T of a connected graph G is called a
fundamental circuit of G.

10.10.1 Number of Fundamental Circuits in a Connected Graph


Let G be a connected graph with n vertices and e edges. Let T be a spanning tree of G. Then G has n − 1 tree
branches and e − n + 1 chords. Since adding a chord to the spanning tree creates one fundamental circuit, it
follows that the graph has exactly e − n + 1 fundamental circuits. the set of these e − n + 1 fundamental
circuits is called fundamental system of circuits relative to the spanning tree.

10.11 Finding all Spanning Trees of a Graph


Consider a connected graph G. Then it is easy to observe
a e a a
that there are a large number of spanning trees in the given f
b b b
connected graph G. In many applications we require all
g c c
spanning trees. There is one reasonable way to generate d d d
spanning trees of a graph G is to start with a given spanning h h
tree, say T1 (abcd in Fig. 10.31). Add a chord, say h, to the k T1 T2
tree T1 . This will forms a fundamental circuit (bchd in Fig.
10.31). Removal of any branch, say c, from the e
e
fundamental circuit bchd just formed will create a new b
f
spanning tree T2. g
g
This generation of one spanning from another, through h
h
addition of a chord and deletion of an appropriate branch,
T3 T4
is called a cyclic interchange or elementary tree
Fig. 10.31
transformation.

Note that such a transformation is a standard operation in the iteration sequence for solving certain
transportation problems.

In the above mentioned elementary tree transformation, instead of deleting branch c d, we could have
deleted d or b and thus would have obtained two additional spanning trees abch and achd. After generating
these three trees, we can restart with T1 and add a different chord, say e, f or g and repeat the process of
obtaining a different spanning tree each time a branch is deleted from the fundamental circuit formed.
Thus, we have a procedure for generating spanning trees for any given graph G.

The above mentioned procedure for generating spanning trees for any given graph raises many questions
as mentioned below:
514 Discrete Mathematical Structures

Theorem 14: A tree with two or more vertices has at least two pendant vertices.
Proof: Consider a tree T of n vertices and therefore T has n − 1 edges. We know that each edge contributes
two degrees and so the sum of degrees of all vertices in T is equal to 2 (n − 1). This sum of degrees i.e.
2 (n − 1) is to be divided among n vertices. Let m be the number of vertices of degree one in T .
Then n − m vertices in T will have degree 2 or more (since no vertex in a tree is of degree zero) and the sum
of degrees of these n − m vertices is 2 (n − 1) − m. Hence, we have
2 (n − 1) − m
≥ 2 i.e., m ≥ 2
n−m

Hence a tree with two or more vertices has at least two pendant (i.e., of degree one) vertices.
Summary: From the above theorems we conclude that a tree has following five different but equivalent
definitions. Thus a graph G with n vertices is said to be tree if:
(i) the graph G is connected and has n − 1 edges.
(ii) the graph G is circuit less and has n − 1 edges.
(iii) the graph G is connected and is circuit less.
(iv) there exist exactly one path between every pair of vertices in G.
(v) the graph G is a minimally connected graph.

10.11.1 Pendant Vertices in a Tree


Earlier, we have defined a pendant vertex as a vertex of degree one. A non-pendant vertex in a tree is called
an internal vertex.

Theorem 15: In a tree (with two or more vertices). There are at least two pendant vertices.
Proof: In a tree with n vertices, there are n − 1 edges in the tree, and so the sum of degrees of all vertices in
the tree = 2 (n − 1). Now 2 (n − 1) degrees are to be divided amongst n vertices so that no vertex is of degree
zero (since in a tree no vertex can have zero degree). If all the vertices be of degree 2, then the sum of
degrees of all vertices will be 2n, which is not true. If there is only one vertex of degree one, then the sum of
degrees of all vertices = 2n − 1, which is also not true.
If there are two vertices of degree one, then the sum of degree of all vertices = 2n − 2 = 2 (n − 1)
Hence, there are at least two pendant vertices in a tree.

10.11.2 Edge-Connectivity
The number of edges in the smallest cut set is defined as the edge connectivity of the graph. Here by
smallest cut-set we mean that cut set which has fewest number of edges. The rank of the graph = n − k
where n is the number of vertices and k is the number of components. Since removal of a cut-set from a
connected graphs partitions the graph into two components, we can define the edge connectivity of a
connected graph as follows:
“The Edge Connectivity of a connected graph is defined as the minimum number of edges whose
removal reduces the rank of the graph by one.” [U.P.T.U. (M.C.A.) 2003, 2008]
Illustration: The edge connectivity of a tree is one because removal of an edge from the tree disconnects the
graph. [Rohtak (M.C.A.) 2004, 2007]
Illustration: The edge connectivity of the complete bipartite graph k2, 3 is 2. In general, edge connectivity of
K m, n is P, where P = min {m, n}.
Trees and their Properties 515

10.11.3 Vertex Connectivity


The vertex connectivity of a connected graph G is defined as the minimum number of vertices whose
removal from G leaves the remaining graph disconnected.
Illustration: The vertex connectivity of any tree is one.

Illustration: The vertex connectivity of complete bipartite graph K m, n is minimum of m and n.

Example 15: Find the vertex connectivity of the graph in given Fig. 10.32.

Fig. 10.32 [Pune (B.E.) 2009]


Solution: The vertex connectivity of this graph is one because removal of the vertex v disconnects the
graph.

Separable Graph: A connected graph whose vertex connectivity is one is called Separable Graph.
Otherwise it is called non-separable.

Cut-vertex: A cut-vertex is a vertex in a separable graph whose removal disconnects the graph. Cut-vertex
is also called an articulation point. A given separable graph can have more than one cut-vertex.
[U.P.T.U. (M.C.A.) 2005]

Illustration: The graph in the following figure is separable and both v1 and v2 are cut-vertices.

v1 v2

Fig. 10.33

Example 16: Prove that in a tree every vertex of degree greater than one is a cut-vertex.

Solution: Let G be a tree and let v be a vertex in G whose degree is greater than one. v
Since degree v is greater than one, it means there are at least two vertices v1 and v2 which
are adjacent to v, removal of v will put v1 and v2 in different components because there is v1 v2

no other path between v1 and v2. Hence removal of v disconnects the graph. Thus v is a
cut-vertex.

Fig. 10.34
516 Discrete Mathematical Structures

Example 17: Find the edge connec tiv ity and ver tex connec tiv ity of the graph.

a b

c d
Fig. 10.35
Solution: If we remove a and f any two vertices does not disconnect the graph. However, removal of three
vertices a, b and f disconnects the graph. Hence Vertex Connectivity is three.

Similarly if we remove a and f any two edges does not disconnect the graph but the set of any three edges
incident on a vertex forms a cut set. Hence Edge Connectivity is three.

Example 18: Construct a graph with the following properties.

Edge connectivity of G = 4, vertex connectivity = 3 and degree of every vertex G ≥ 5.

Solution: We have the following graph:

v1 e1 e4
v10 v7
e2
v2 e3 v5

v9 e4 v8
v3 v6
Fig. 10.36

The vertex connectivity of this graph is three because removal of v1 , v2, v3 and v4 , v5, v6 disconnects the
graph. The edge connectivity of this graph is four

S = {e1 , e2, e3 , e4 } is one such cut-set. Also degree of each vertex is 5.

Theorem 16: A vertex v is a cut-vertex of a connected graph G iff there exist two vertices x and y distinct from
v such that every path between x and y passes through v.

Proof: First suppose that v is a cut-vertex of a connected graph G. Then G − v, the graph obtained after
removal of vertex v from G, is disconnected. Let x be a vertex in one of the component G1 of G − v and y be a
vertex in the complement of G1 in G − v. Since x and y are in different components of G − v, there exist no
path between x and y in G − v. But G is connected implies there exist paths between x and y in G. Hence
every path between x and y passes through v.

Conversely, suppose v lies on every path between x and y. Then the vertices x and y are not connected in
G − v. Thus the graph G − v is disconnected. Hence v is a cut-vertex.
Trees and their Properties 517

Theorem 17: Prove that the edge connectivity of a graph G cannot exceed the degree of the vertex with
smallest degree in G.
Proof: Let v be the vertex with the smallest degree in a given graph G. Vertex v can be separated from G by
removing the d (v ) edges incident on v. Hence removal of d (v ) edges disconnects the graph. Thus edge
connectivity ≤ d (v ). This completes the proof.

Theorem 18: The vertex connectivity of any graph G is always less than or equal to edge connectivity of G.
Proof: Let p denote the edge connectivity of G. Therefore, there exists a cut-set S in G containing p edges.
Then S partitions the vertices G into two subsets V1 and V2 such that every edge in S joins a vertex in V1 to a
vertex in V2. By removing at most p vertices from V1 or V2 on which the edges of S are incident, we will be
able to delete S from G (together with all other edges incident on these vertices). Thus, removal of at most p
vertices from G will disconnect the graph. Hence vertex connectivity is less than or equal to p.
Corollary: Every cut-set in a non-separable graph with more than two vertices contains at least two
edges.
Proof: By definition, a graph G is non-separable if its vertex connectivity is at least two. In view of above
theorem, edge connectivity ≥ vertex connectivity. hence edge connectivity of a non-separable graph is at
least two which is possible if the graph has at least two edges.

Theorem 19: The maximum vertex connectivity of a connected graph with n vertices and e edges is the
integral part of the number 2e / n .
(The integral part of a number x is denoted as [ x]).
Proof: We know that every edge of a graph contributes two degrees. Thus sum of degrees of all the
vertices in G is 2e. Since this sum (2e) is divided among n vertices, therefore there must be at least one vertex
in G whose degree is less than or equal to 2e/n. Therefore,
edge connectivity of G ≤ 2e / n [By Theorem 17]
⇒ vertex connectivity ≤ edge connectivity ≤ 2e/n [By Theorem 18]
⇒ maximum vertex connectivity possible = [ 2e/n], the integral part of 2e/n.

Example 19: Sketch all spanning trees of the graph:

a e
f b

g
d c
h
Fig. 10.37

[R.G.P.V. (B.E.) 2009; Rohtak (M.C.A.) 2004, 2008; U.P.T.U. (M.C.A.) 2006]
518 Discrete Mathematical Structures

Solution:

(1) (2) (3)

(4) (5) (6)

(7) (8) (9)

(10) (11) (12)

(13) (14) (15)

Fig. 10.38
Trees and their Properties 519

Example 20: Find the rank and nullity of the fol lowing graph G .
v1 e1 v2 e2 v5

e3 e7
e4 e6
e8

v3 e5 v4
Fig. 10.39

Solution: Number of vertices, n = 5


Number of edges, e = 8
∴ Rank of the graph G = n − 1 = 5 − 1 = 4
Nullity of the graph G = e − n + 1 = 8 − 5 + 1 = 4

Example 21: If a form (water tank) consisting of seven walled plots of land, as shown in
figure 10.40 and these plots are full of water then find out how many walls will have to be broken
so that the complete water can be drained out:

Solution: Here n = 12, e = 18 and k = 1 (because the graph is connected). Fig. 10.40

Since tree is always without circuit, so to form a spanning tree we have to remove all the chords. Thus,
The number of chords = e − n + k = 18 − 12 + 1 = 7
Hence just removing 7 walls complete water will be drained out.

Example 22: Find the rank and nullity of the following disconnected graph:
v5
e7
e12
v1 e5 v4 v9
e10
e2 e1 e4 e11 v8
e6 v6
e8 e9

v2 e3 v3 v7
Fig. 10.41
Solution: Here number of vertices, n = 9;
number of edges, e = 12;
number of components = maximum number of connected subgraphs.
k=2
∴ rank of the graph = n − k = 9 − 2 = 7
nullity of the graph = e − n + k = 12 − 9 + 2 = 5
520 Discrete Mathematical Structures

Example 23: Find all spanning trees for the graph G shown below:
v2 v3 v6

v1 v4 v5
[U.P.T.U. (M.C.A.) 2005]
Fig. 10.42

Solution: All spanning trees of the given graph G are shown below in Fig. 10.43.
v2 v3 v6 v2 v3 v6 v2 v3 v6

v1 v4 v5 v1 v4 v5 v1 v4 v5

T1 T2 T3
Fig. 10.43

Observe that there is a circuit (v1 v2v3 in Fig. 10.42) of the given graph G. The spanning tree T1 is obtained by
deleting edge v1 v3 from the circuit, the spanning tree T2 is obtained by deleting edge v1 v2 from the circuit,
while the spanning tree T3 is obtained by deleting edge v2v3 from the circuit. Thus, there are at all three
distinct spanning trees for the given graph G.

Example 24: What is the total number of nodes in a full binary tree with 20 leaves?
[P.T.U. (B.E.) Punjab 2007, 2009]
Solution: Let n = total number of leaves
i = internal nodes = n – 20
n–1
Then = m or n = mi + 1
i
n–1
But i= ⇒ n = 2i + 1
2
∴ n = 2(n – 20) + 1 ⇒ n = 39
Hence, full binary tree with 20 leaves has total of 30 nodes.

Example 25: If there are 60 players in a single-knockout tournament, how many matches must be played?
Solution: We know
Number of matches played = Number of players – 1.
or i = t – 1 (in term of binary tree)
i = 60 – 1 = 59
Trees and their Properties 521

Example 26: Show that total number of vertices in a full binary tree is always odd.
[Delhi (B.E.) 2005, 2009; Pune (B.E.) 2007]
Solution: We know that in full binary tree, there is exactly one vertex of even degree i.e., root and
remaining (n – 1) vertices are of odd degree. But number of vertices of odd degree in any graph is always
even. Thus (n − 1) is even. Hence n is odd.

Example 27: Find number of leaves in a full binary tree with n vertices. [Rohtak (B.E.) 2007]
n–1
Solution: The number of internal vertices i =
2
n −1 n + 1
then number of leaves t = n – i = n – =
2 2

Example 28: Consider the rooted tree in Fig. 10.44. a

(a) What is the root T ? c


b e
(b) Find the leaves and the internal vertices of T.
d
(c) What are the leaves of c and e? h
g
(d) Find the children c and e
f
(e) Find the descendants of the vertices a and c.
Fig. 10.44
Solution:
(a) The vertex a is distinguished as the only vertex located at the top of the tree. Therefore a is the
root.
(b) The leaves are those vertices that have no children. These are b, f , g and h. The internal vertices
are c, d and e.
(c) The levels of c and e are 1 and 2 respectively.
(d) The children of c are d and e and of e are g and h
(e) The descendants of a are b, c, d, e, f , g, h. The descendants of c are d, e, f , g, h.

Example 29: A tree has two vertices of degree 2, one vertex of degree 3 and three vertices of degree 4. How
many vertices of degree 1 does it have?
Solution: Let a be the required number. Now,
Total number of vertices = 2 + 1 + 3 + a = 6 + a e = (n – 1)
The number of edges = (6 + a – 1) = 5 + a
So, total degree of tree = 2 × 2 + 1 × 3 + 3 × 4 + 1 × a = 19 + a
19 + a  
So, the number of edges = 2e = ∑ deg (vi )
2  i 

19 + a
Now, = 5+ a⇒ a= 9
2
Thus, there are 9 vertices of degree one in the tree.
522 Discrete Mathematical Structures

Exercise
1. (a) Draw all distinct trees with exactly five vertices. [R.G.P.V. (B.E.) Bhopal 2008]

(b) Draw all distinct trees with exactly six vertices.


(c) Draw all distinct rooted trees with exactly five vertices. [R.G.P.V. (B.E.) Bhopal 2008]

2. (a) Define a tree and give an example.


(b) Define a rooted tree and explain it by an example.
(c) Define a binary tree and give an example. [R.G.P.V. (B.E.) Rajpur 2009]

3. Show that if n is the number of vertices in a binary tree, then n is odd.

4. Draw the complete graph on four vertices and find all spanning trees within it.

5. If a graph G has n vertices and the subgraph T of G has n − 1 edges and no circuits, show that G is
connected and that T is a spanning tree in G.

6. Prove that every connected graph has at least one spanning tree.

7. Prove that the number of labeled trees with n vertices (n ≥ 2) is 2n − 2.

8. Show that a connected graph of n vertices and e edges has n − 1 tree branches and (e − n + 1)
chords. [U.P.T.U. (M.C.A.) 2002]

9. Show that a connected graph G is a tree if adding an edge between any two vertices in G creates
exactly one circuit.

10. Draw the all spanning trees of the following graph.

e4
e1
e9
e2

e8 e3

e6 e5
e7
Fig. 10.45

[Hint: See example 39]


Trees and their Properties 523

11. Find the rank and nullity of the following disconnected graph.

12. Show that the edge connectivity and vertex connectivity of the graphs in the following figure is each
equal to three.

13. List all cut-sets with respect to the vertex v1 , v2 in the graph.

v1

v2

Fig. 10.50

14. (i) Give an example of a graph whose edge connectivity is one.

(ii) Give an example of a graph whose vertex connectivity is one.


(iii) Give an example of a graph whose edge connectivity and vertex connectivity both
are equal to one.

15. Give an example of a simple regular graph of degree three that is separable.

16. Write notes on trees and its properties

17. Define the following terms

(a) Rooted tree (b) binary tree (c) binary search tree [U.P.T.U. (B.Tech.) 2007, 2009]
524 Discrete Mathematical Structures

18. Show that a Hamiltonian path is a spanning tree [U.P.T.U. (B.Tech.) 2004, 2006]

19. Prove that a binary tree with n nodes has exactly (n + 1) null branches. [U.P.T.U. (B.Tech.) 2005]

20. What is binary search tree? A binary search tree T and an ITEM of information is given. Write the
algorithm which finds the location of ITEM in T or insert ITEM as a new node in the tree.
[U.P.T.U. (B.Tech.) 2008]

21. Discuss one application of a rooted tree in the study of computer science.
[U.P.T.U. (M.C.A.) 2002]

22. Prove that far any tree T = (V, E ), T has at least two pendent vertices.
[P.T.U. (B.E.) Punjab 2005; M.K.U. (B.E.) 2006, 2009]
23. Discuss two important applications of binary trees. [U.P.T.U. (M.C.A.) 2001; Delhi (B.E.) 2008]

24. State the theorems when a graphs G with n vertices is said as tree.
[U.P.T.U. (M.C.A.) 2001, 2004; Bangalore (B.E.) 2007; M.K.U. (B.E.) 2005]

25. How many internal vertices does a full binary tree with h levels have?
[Hint n = m i +1]

26. What is a binary rooted tree? Indicate its importance and show that maximum height of an N vertex
binary tree is [log 2(N + 1) – 1] [Rohtak (M.C.A.) 2002, 2005, 2007]
Trees and their Properties 525

11. Rank = 6, nullity = 2


14. Consider the adjacent graph. This graph has edge connectivity and vertex connectivity both equal to
one.

Fig. 10.51

15. A regular graph of three degree that is separable.

Fig. 10.52

Objective Type Quesitons

Multiple Choice Questions


1. A tree is— [Rohtak (M.C.A.) 2008]
(a) always disconnected graph (b) always a connected graph
(c) may be connected or disconnected (d) none of these

2. Consider the rooted tree below—


(i) The siblings of E are
(a) D and F (b) H and I (c) H only (d) none of these
(ii) The leaves of tree T
(a) C , D, E , F , K (b) G, H , D, I, J (c) A, C , D, E , H , I (d) none of these

A R

C B

D E
F
G

H I J
Fig. 10.53
526 Discrete Mathematical Structures

3. A tree has
(a) Self loop as well as parallel edges (b) Self loop but not parallel edges
(c) neither self loop nor parallel edges (d) none of these
4. A tree with n vertices has— [Rohtak (M.C.A.) 2005]
(a) n edges (b) (n + 3) edges (c) (n – 1) edges (d) none of these

5. Which of the following sequences denotes the post order traversal sequence of the tree—
(a) fegedba (b) gcbdafe (c) gcdbfea (d) fedgcba

b e

c
f
d

g
Fig. 10.54

6. Number of vertices in a binary tree—


(a) can be even or odd (b) must be even
(c) must be odd (d) neither odd nor even

7. In a binary tree each vertex can have


(a) at the most 2 children (b) 5 children
(c) 4 children (d) none of these

8. The number of pendant vertices in a binary trees with vertices is—


n+1 n–1
(a) 0 (b) 1 (c) (d)
2 2

9. If every vertex of a binary tree has either two children or no child, it is called—
[M.C.A.) (Bhopal) 2008]
(a) Full or complete binary tree (b) Spanning tree
(c) Null graph (d) Forest

10. The number of paths between any two vertices of a tree—


(a) is exactly one (b) are 2
(c) are 3 (d) none of these

11. If height of a tree is 10, the highest level of tree is—


(a) 10 (b) 9 (c) 4 (d) 3

12. The depth of complete binary tree with nodes is—


(a) [log 2(n + 1)– 1] (b) log 3 (n + 1)– 1 (c) log 2 n + 1 (d) log 2[ n – 1) + 1
Trees and their Properties 527

13. The minimum height of a binary tree with 9 vertices is —


(a) 3 (b) 4 (c) 10 (d) none of these

14. If height of a tree is 10, the highest level of tree is


(a) 10 (b) 9 (c) 5 (d) 20

15. The number of possible binary tree with 3 nodes is


(a) 12 (b) 20 (c) 5 (d) 15

Fill in the Blank(s)


1. Maximum number of edges in a planar graph with n vertices is ............... .
[U.P.T.U. (M.C.A.) 2008]

2. The largest possible number of leaves in an n-tree of height k is .............. .


[U.P.T.U. (M.C.A.) 2008]

3. A complete n-ary tree with m internal vertices contains ................ vertices.


[U.P.T.U. (M.C.A.) 2007]

4. The maximum number of vertices on level n of a binary tree is ............. Where n ≤ 0.


528 Discrete Mathematical Structures

Multiple Choice Questions

1. (b) 2. (i) b (ii) b 3. (c) 4. (c) 5. (c)

6. (c) 7. (a) 8. (c) 9. (a) 10. (a)

11. (b) 12. (a) 13. (a) 14. (b) 15. (c)

Fill in the Blank(s)

1. e ≤ (3n − 6) 2. 2k – 1 3. nm+1 4. 2n

qqq
11.1 Graph [M.K.U. (B.E.) 2003, 2007; Raipur (B.E.) 2006]

A Linear Graph (or simply a Graph) G = (V, E ) consists of a set of objects V = {v1 , v2 , K , }, whose elements
are called Vertices (or Nodes) and another set E = {e1 , e2 , K }, whose elements are called Edges (or Lines or
Branches) such that each ek is identified with an unordered pair (vi, v j ) of vertices. The vertices vi, v j associated
with edge ek are called the end vertices of ek .
The most common representation of a graph is by means of a Diagram, in which the ver tices are
represented as points and each edge as a line segment joining its end vertices. We often referred to this
diagram itself as the graph.
We denote by | V | the number of vertices and by | E | the number of edges of the graph G = (V, E ).
It may be observed that this definition permits an edge to
e1
be associated with a vertex pair (vi, vi ). Such an edge
v1 v2
having the same vertex as both its end vertices are called
e3
a Self-loop (or simply a loop). Also note that the
def inition allows more than one edge as sociated with a e4 e2
e5 v5
given pair of vertices. Such edges are referred to as
Parallel Edges. e7

In the adjoining Fig. 11.1 we have shown a graph with v3 e6 v4


five vertices and seven edges. Edge e1 shows a self-loop Fig 11.1: Graph with five vertices and seven edges
and edges e4 and e5 show parallel edges.

11.1.1 Simple Graph [Raipur (B.E.) 2006; Nagpur (B.E.) 2006; Osmania (B.E.) 2003]

A graph that has neither self-loops nor parallel edges is 1


1
called a Sim ple Graph.
It should also be noted that, in drawing a graph, it is
immaterial whether the lines are drawn straight or curved,
2 4
long or short, what is important, is the incidence between 2 4
the edges and vertices.
The two graphs drawn in Fig. 11.2 (a) and (b) are the same
because incidence between edges and vertices is the same 3 3
in both cases. (a) (b)
Fig. 11.2: Same graph drawn differently
530 Discrete Mathematical Structures
v1 e1 v2
Sometimes, in a diagram of a graph two edges may seem
to intersect at a point that does not represent a vertex.
e5
Such edges should be thought of as being in different e4
e2
planes and thus, having no common point.
In the adjoining Fig. 11.3 diagram of a graph is shown in e6
which edges e5 and e6 have no common point. v4 e3 v3

Fig. 11.3: Edges e 5 and e 6 have no common point

11.1.2 Multigraph [R.G.P.V (B.E.) Bhopal 2005, 2007, 2009]

A multigraph G = (V, E ) consists a set of vertices V and a set of edges E such that edge set E may contain
multiple edges and self loops.

Illustration

(i) Undirected Multigraph (ii) Directed Multigraph

e6 e7
v1 e2 v2 e3
v1
v2
e5
e1 e3 e1 e2 e4 e5

e4 v3 v4 v3
v4 e6
Fig. 11.5
Fig. 11.4

In Fig 11.4, e4 and e5 are multiple In Fig. 11.5 the edges e1 , e2 and e4 , e5 are multiple
edges, e6 is self loop. edges and e7 is self loop.

(iii) Traversable Multigraph


Consider a multigraph G = (V, E ) . If the multigraph G consist a path
which includes all vertices and whose edge list contains each edge of
v1 v2
graph exactly once. Then, the multigraph G is called a
traversable is that it should be connected and have either zero or two
vertices of odd degree. v5
The necessary and sufficient condition for a multigraph to be
traversable is that is should be connected and have either zero or two
vertices of odd degree.
v4 v3
Illustration
Fig. 11.6
The given multigraph has three even degree vertices i.e. v3 , v4 and v5 and two
odd degree vertices i.e. v1 and v2. Hence, it is traversable multigraph.

11.1.3 Finite and Infinite Graphs


A graph with a finite number of vertices as well as a finite number of edges is called a Finite Graph;
oth erwise, it is an Infinite Graph. We can picture a finite graph by representing each vertex with a point
and each edge {vi, v j } with a line between points vi and v j .
Graph Theory 531

In the adjoining Fig. 11.7 (a) and (b) both picture the same finite graph {(v1 , v2 ), {v1 , v5}, {v2, v3 },
{v2, v4 }, {v3 , v5}. If {vi, v j } is an edge, we say that vertices vi and v j are adjacent. In the adjoining Fig.
11.7, v1 is adjacent to v2 but
v2
v4

v1
v2 v1 v5

v5 v3
v3
v4
(a) (b)
Fig. 11.7: Representations of the same finite graph

Portions of two infinite graphs are shown in Fig 11.8 (a) and (b).

(a) (b)
Fig 11.8: Portions of two infinite graphs

In this chapter we shall confine ourselves to the study of finite graphs and unless otherwise stated the term
“Graph” will always mean a Finite Graph.

11.1.4 Incidence and Adjacency


Let ek be an edge joining two vertices vi and v j of a graph G = (V, E ). Then the edge ek is said to be Incident
on each of its end vertices vi and v j . For example, In the graph of Fig. 11.1 edge e2 is incident on vertices
v2 and v4 .

Two vertices in a graph G = (V, E ) are said to be Adjacent if there exists an edge joining the vertices. For
example, in the graph of Fig. 11.1, vertices v1 and v3 are adjacent while vertices v1 and v4 are not adjacent.

Two non-parallel edges of a graph G = (V, E ) are said to be Adjacent if they are incident on a common
vertex. For example, edges e2 and e3 in the graph of Fig. 11. 1 are adjacent because they are incident on a
common vertex v2 while edges e4 and e7 are not adjacent.
532 Discrete Mathematical Structures

11.1.5 Degree of a Vertex [Nagpur (B.E.) 2003]

The Degree of a Vertex v in a graph G, written as d (v ), is equal to the number of edges which are incident
on v with self-loop counted twice. For example, in the graph of Fig. 11.7 (a), we have
d ( v1 ) = 2, d ( v 2 ) = 3, d ( v 3 ) = 2, d ( v 4 ) = 1.

v2 v6
11.1.6 Isolated Vertex v5
A vertex in a graph G having no edge incident on it is called an Isolated
Vertex. In other words, a vertex v is said to be isolated vertex if degree v4
of v is zero; that is, d (v ) = 0. For example, the vertex v6 in the graph of v1
Fig. 11.9 is isolate vertex.
v3
Fig. 11.9
11.1.7 Pendant Vertex
A vertex v in a graph G is said to be pendant vertex if its degree is one; i.e. d (v ) = 1. For example, the
vertex v5 in the graph of Fig. 11.9 is a pendant vertex.

v2
11.1.8 Null Graph
v1 v4
A graph G = (V, E ) is said to be null graph if the set of vertices V is non-empty but the set
of edges E is empty. A null graph is thus a graph in which every vertex is an isolated v3
vertex. A null graph of four vertices is shown in Fig. 11.10.
Fig 11.10
We now derive three simple but important results on degree of vertices.

Theorem 1: The sum of the degrees of all vertices in a graph G is equal to twice the number of edges in G.
[U.P.T.U. (M.C.A.) 2000, 2004; M.K.U. (B.E.) 2009; Rohtak (B.E.) 2005, 2008;
Nagpur (B.E.) 2005, 2008; Pune (B.E.) 2005, 2008]

Proof: Let G = (V, E ) be a graph. Then the number of edges in G is| E |. Since each edge in G is incident on two
vertices, it contributes 2 to the sum of the degrees of the graph. v9
Thus, the sum of degrees of all the vertices in G is given by
v2
∑ d (v ) = 2| E | v5 v10
v ∈V
v7 v8
This result is also known as Handshaking Lemma. v1 v4
To verify the above theorem, consider the graph in the Fig. 11.11. v3 v6
In this graph, we have Fig. 11.11
d (v1 ) = 2, d (v2 ) = 4, d (v3 ) = 2, d (v4 ) = 4, d (v5 ) = 2
d (v6 ) = 3, d (v7 ) = 2, d (v8 ) = 2, d (v9 ) = 1, d (v10 ) = 0
10
Therefore, ∑ d (vi ) = 22 = 2 × 11 = twice the number of edges.
i =1
Graph Theory 533

11.2 Directed Graph (Digraph) [R.G.P.V. (B.E) Bhopal 2006; Raipur (B.E) 2006]

A Directed Graph (or in short a di graph) G = (V, E ) consists of two sets : a fi nite set V = {v1 , v2, v3 K } of
vertices and a finite set E = {e1 , e2, e3 K } of edges and each edge is identified by some ordered pair of
vertices (vi, v j ). A di graph is also known as Oriented Graph.
Thus, if ek = (vi, v j ) is an edge then this edge in digraph is represented e1
by a line segment between the vertices vi and v j along with an arrow
from vi and v j , where vi is called the Initial Vertex and v j is called v1 v2
the Terminal Vertex of the edge ek . Also the edge ek is incident out e2
of the vertex vi and is incident into the vertex v j .
e3 e4
e7
Illustration
This is directed graph with four vertices and seven edges. v4
In this graph edge e2 is incident out of the vertex v1 and is incident into e5 v3
the vertex v2. The edge e1 is incident out of v2 and is incident into v1 e6
and so on. Fig. 11.12

Note: All definition is common in graph and digraph only difference is in direction only change in definition
of graph by directed graph.

11.2.1 Even and Odd Vertices


A vertex is said to be even or odd vertex accordingly, as its degree is an even or an odd number. For
example, in the graph of Fig. 11.11, vertices v1 , v2, v3 , v4 , v5, v7 , v8 and v10 are even vertices whereas v6
and v9 are odd vertices.

Theorem 2: The vertices of odd degree (odd vertices) in a graph is always even.
[U.P.T.U. (M.C.A.) 2001; P.T.U. (B.E.) Punjab 2005, 2008; M.K.U. (B.E.) 2007; R.G.P.V. (B.E.) Raipur 2007]

Proof: Let G = (V, E ) be a graph. Let Ve and V0 denote the set of even and odd vertices in G. Then Ve ⊆ V and
V0 ⊆ V such that
V = Ve ∪ V0 and Ve ∩ V0 = φ
Hence, ∑ d (v ) = ∑ d (v ) + ∑ d (v )
v ∈V v ∈ Ve v ∈ V0

⇒ 2| E | = 2k + ∑ d (v )
v ∈ V0
[Q ∑ d (v ) = an even number = 2k, say ]
v ∈ Ve

⇒ ∑ d (v ) = 2 (| E | − k ) = an even number.
v ∈ V0
534 Discrete Mathematical Structures

But each term d (v ) in the L.H.S. is odd, the total number of terms in the sum must be even (to make the sum
an even number). Thus, the number of vertices of odd degree must be even; i.e.
| V0 | = an even number.

11.2.2 In-Degree and Out-Degree of a Vertex [Kurukshetra (M.C.A.) 2008]

In a directed graph, the number of edges incident into a vertex vi is called In-Degree of the vertex vi and is
denoted by d − (vi ). e 6

The number of edges incident out of a vertex vi is called Out-Degree of v3


v4
the vertex vi and is denoted by d + (vi ). Thus, for a vertex vi, we have e5

In-degree of vi = d − (vi ) = number of vertices in {w |(w, vi ) ∈ E }. e7 e4 e3


e8
+
Out-degree of vi = d (vi ) = number of vertices in {w |(vi, w ) ∈ E }

Illustration v2
v1 e1
In the directed graph in the adjacent Fig. 11.13
e2
d − (v1 ) = 1, d + (v1 ) = 3
Fig. 11.13
d − (v2 ) = 4, d + (v2 ) = 0
d − (v3 ) = 1, d + (v3 ) = 2

d − (v4 ) = 2, d + (v4 ) = 3

It may be seen that d (v ) = d + (v ) + d − (v )

For any vertex v in a directed graph, where d (v ) denotes the degree of vertex v in the corresponding
undirected graph.
Thus, Isolated Vertex in a directed graph is that vertex whose in-degree and out-degree both are zero.
A vertex v in a directed graph is Called Pendant Vertex if
d + (v ) + d − (v ) = 1

Notice that every edge in a directed graph contributes 1 to the sum of the in-degrees as well as to the sum of
out-degrees. Hence, we have the following theorem.
Source and Sink: A vertex in a diagraph with zero in degree is called a Source. A vertex in a diagraph
with Zero out Degree is called a Sink.

Theorem 3: In a directed graph G = (V, E ) with | E | edges, sum of the in - degrees = sum of the out-degrees
=| E |. In other words
∑ d − (vi ) = ∑ d + (vi ) = | E |
vi ∈ V vi ∈ V
Graph Theory 535

Example 1: Define the term ‘Degree’. What is the total degree of the given e5
graph? v4
v5
(v , v , K v5 ) are vertices  e4
Here,  1 2  in the graph
& (e1 , e2 , K e10 ) are edges e3
e6 e7 e2

e1
e8 v v2
1 e10
e9
v3
Fig. 11.14

Solution: We denotes the degree of vertices vi by d (vi ). The degree of all vertices are as
d (v1 ) = 7, d (v2 ) = 4, d (v3 ) = 1, d (v4 ) = 5, d (v5 ) = 3
Then total degree of graph = 7 + 4 + 1 + 5 + 3 = 20

11.3 Isomorphic Graphs [U.P.T.U. (B.Tech.) 2006, 2007, 2008; Raipur (B.E) 2008;

P.T.U.(B.E.) Punjab 2001, 2003, 2007]

Let G = (V, E ) be a graph, if ei ∈ E we write t (ei ) = (v j , vk ), where v j and vk are the terminals of ei; then t is
called Terminal Function of G.

11.3.1 Isomorphism of Two Graphs


[U.P.T.U. (B.Tech.) 2006, 2007, 2008 ; Raipur (B.E.) 2008]

Two graph G1 = (V1 , E1 ) and G 2 = (V2, E 2 ) are said to be Isomorphic if there ex ists a one-to-one
correspondence f : V1 → V2 between their vertex sets (V1 and V2 ) and one to one correspondence g : E1 → E 2
between their edge set (E1 and E 2 ) such that the corresponding edges of G1 and G 2 are incident on the
corresponding vertices of G1 and G 2; that is, if ei ∈ E1 , v j , vk ∈ V1 , then
t (ei ) = (v j , vk ) if t (g(ei )) = ( f (vi ), f (vk ))
In other words, two graph G1 and G 2 are isomorphic if and only if vertices and edges correspond one-to-one
and that edge incidence relationship is preserved. For example, Fig 11.15 show a pair of isomorphic
undirected graph.

Fig. 11.15
536 Discrete Mathematical Structures

Example 2: Show that the graphs given below are isomorphic.


v1
u1 1 u2
e4 e9 e1
10
9 u5 5 v5
u6 v4 e8 v2
e5
4 8 e12
6 2 e10
e3 e2
v8 v6
12 u8 7 u7 11 v3
e7 e11 e6
u4 u3
3
v7
Fig. 11.16
Solution: We can establish the correspondence between the two graphs as follows:
Vertex correspondence:
u1 ↔ v1 , u2 ↔ v2, u3 ↔ v3 , u4 ↔ v4 , u5 ↔ v5,

u6 ↔ v6 , u7 ↔ v7 , u8 ↔ v8
Edge correspondence: 1 ↔ e1 , 2 ↔ e2, 3 ↔ e3 , 4 ↔ e4 , 5 ↔ e5, 6 ↔ e6 , 7 ↔ e7 ,
8 ↔ e8 , 9 ↔ e9 , 10 ↔ e10 , 11 ↔ e11 , 12 ↔ e12
Thus, the two graphs are isomorphic.

Example 3: Show that the graphs given below are not isomorphic.

v4
u5

u1 u2 u3 u4 v1 v2 v3 v5 v6

u6

(a) (b)
Fig: 11.17

Solution: The two graphs in Fig. 11.17 are not isomorphic because
(i) If the graph in Fig 11.17 (a) is isomorphic to the graph in Fig 11.17(b) then vertex u4 in (a) must
correspond to the vertex v3 in (b), since d (u4 ) = 3 = d (v3 ) and there are no other vertices of degree
three.
(ii) There are two pendant vertices u5 and u6 , adjacent to u4 in Fig 11.17(a) while there is only one
pendant vertex v4 , adjacent to v3 in Fig 11.17(b).

Example 4: Draw the equivalent labeled graphs for G1 and G 2 if


G1 = ({v1 , v2, v3 }, {(v1 , v2 ), (v1 , v3 ), (v2, v3 )})
G 2 = ({w1 , w2, w3 }, {(w1 , w2 ), (w1 , w3 ), (w2, w3 )})
[Rohtak (M.C.A.) 2005, 2002]
Graph Theory 537

Solution: In the adjoining Fig 11.18 we have shown the equivalent labeled graphs G1 and G 2 (no vertex
labeling):
v3 w2

80
110 100 110

v1
100
v2 w1 w3
80
Fig. 11.18

11.4 Regular Graph [U.P.T.U. (B.Tech.) 2002]

A graph in which all vertices are of equal degree is called a Regular Graph (or simply a regular).

Example 5: The graph of three utilities is a regular graph of degree 3 (see the adjoining Fig. 11.19)

House House House


H1 H2 H3

Gas Water Elect-


ricity
G W E

Fig. 11.19

It may be observe that in many applications of graph theory in computer science, the topology (V, E ) of a
graph is supplemented by additional information relating to either V or E or both. We can make this more
precise by defining the concept of a labeled graph.

11.5 Subgraph [M.K.U. (B.E.) 2006; Raipur (B.E.) 2006, 2009; Rohtak (B.E.) 2004]

A graph g is said to be a subgraph of a graph G if all the vertices and all the edges of g are in G, and each edge
of g has the same end vertices in g as in G.

In other words, a Subgraph of a graph G is any graph obtained from G by a deletion of edges and/or
vertices from G. Note that when a vertex v is deleted, all edges terminating at v must also be deleted.
538 Discrete Mathematical Structures

Example 6: The graph in Fig. 11.20 (b) is a subgraph of Fig. 11.20 (a):

v5
f
v1
v4
a h
c v1 a
b
v4
v2 g c
i e b
d v2
e
v3 d
j v3
v6
(a) (b)
Fig 11.20: Graph (a) and one of its subgraph (b)

Example 7: In Fig. 11.21 all graphs (b) to (i) are subgraphs of (a):

a 2 b a 2 b a a b a b

1 1 1 3 1 3 1 4
3 4 4

d 5 c d 5 c d 5 c d 5 c 5
d c
(a) (b) (c) (d) (e)
a b a a b a

1 4 1 3
3 4

d 5 c d c d c c

(f ) (g) (h) (i)


Fig 11.21: Graph (a) and its subgraph (b) to (i)

The above definition clearly shows that a subgraph can be thought of as being contained in (or a part of)
another graph. Thus, the symbol from set theory, g ⊂ G, is used in stating “g is a subgraph of G”. Hence, we
have the following definition of a subgraph of a graph.
A graph H = (V1 , E1 ) is said to be a Subgraph of G = (V, E ) if
V1 ⊆ V and E1 ⊆ E
If V1 = V, then H is said to be a Spanning Subgraph of G. If V1 is a non-empty subset of vertices of the
graph (V, E ) then the subgraph (V1 , E1 ) generated by V1 is de fined by [ v, w] ∈ E1 ⇔ v, w ∈ V1 and [ v, w] ∈ E .
The following observation can be made immediately:
1. Every graph is its own subgraph.
2. A subgraph of a subgraph of G is a subgraph of G.
3. A single vertex in a graph G is a subgraph of G.
4. A single edge in G, together with its end vertices, is also a subgraph of G.
Graph Theory 539

11.5.1 Complement of a Subgraph


Let G′ = (V′ , E ′ ) be a subgraph of a graph G = (V, E ). The Complement of Subgraph G′ with respect to the
graph G is the subgraph G′ ′ = (V′ ′ , E ′ ′ ), where E ′ ′ = E − E ′ and V′ ′ containing only the vertices with which
the edges in E are incident.

Example 8: Fig 11.22 (c) shows the com plement of the subgraph in Fig. 11.22 (b) with re spect to the graph
in Fig. 11.22 (a).
b c b c
b c
g a g
a d d g
h a
h d
h
f e
f e e
f
(a) (b) (c)
Fig. 11.22

Thus, the complement of a subgraph G′ with respect to graph G is obtained from G by removing the edges of G′

11.6 Operations on Graphs


11.6.1 Union of Two Graphs [R.G.P.V. (B.E.) Raipur 2007]

If G1 = (V1 , E1 ) and G 2 = (V2, E 2 ) are two graphs then their Union G1 ∪ G 2 is another graph G 3 = (V3, E 3 ) such
that V3 = V1 ∪ V2 and E 3 = E1 ∪ E 2.

11.6.2 Intersection of Two Graphs [R.G.P.V. (B.E.) Bhopal 2005]

The intersection of two graphs G1 = (V1 , E1 ) and G 2 = (V2, E 2 ), denoted as G1 ∩ G 2 is another graph
G 3 = (V1 ∩ V2, E1 ∩ E 2 ); that is, the vertex set of G 3 consists of only those vertices which are common in both G1
and G 2, and the edge set of G 3 consists of only those edges which are common in both E1 and E 2.

11.6.3 Ring Sum of Two Graphs


The ring sum of two graphs G1 = (V1 , E1 ) and G 2 = (V2, E 2 ) denoted as G1 ⊕ G 2, is the graph
G 3 = (V1 ∪ V2, E1 ∪ E 2 − E1 ∩ E 2 ). That is, the ring sum of two graphs G1 and G 2 is a graph consisting of the
vertex set V1 ∪ V2 and of edges that are either in G1 or G 2 but not in both.
540 Discrete Mathematical Structures

The union, intersection and ring sum of two graphs G1 and G 2 are shown in Fig. 11.23 below:
v1 v1 e8 v6

e1 e2 e1 e7
e9
v2 v3
e3
v2 e3 v3 e10
e4 e5

v4 v5
e6
v5
Graphs G1 Graphs G2
v1 e8 v6
v1 e8 v6

e7 e9
e1 v1
e7 e9
e2 e2

v2 v3 e10
e3 e1 v2 v3 e10

e4 e5 e4 e5

v2 v3
v4 v5 e3 v4 v6 v5
e6
G1∪G1 G1∩G2 G1⊕G2

Union of two graphs Intersection of two graphs Ring sum of two graphs
G1 and G2 G1 and G2 G1 and G2
(a) (b) (c)
Fig. 11.23

11.6.4 Decomposition
A graph G is said to be decomposed into two subgraphs G1 and G 2 if
G1 ∪ G 2 = G
G1 ∩ G 2 = a null graph.
For example, the graph G and its decomposed graphs are shown in Fig. 11.24 (a) and Fig. 11.24 (b), (c) as
follows:
v1

v2 v3
v2 v3 v1

v4 v5 v2 v3 v4 v5
(a) (b) (c)
Fig. 11.24
Graph Theory 541

It may be observe that in many applications of graph theory in computer science, the topology (V, E ) of a
graph is supplemented by additional information relating to either V or E or both. We can make this more
precise by defining the concept of a labeled graph.

11.7 Labeling of a Graph


(i) If SV and SE are sets, a labeling of the graph G = (V, E ) is a pair functions

f : V → SV , vertex labeling,

g : E → SE , edge labeling.

(ii) If G = (V, E ) is labeled by f and g and G1 = (V1 , E1 ) is labeled by f1 and g1 then G and G1 are Equivalent
Labeled Graphs if there is a bijection h : V → V1 such that :

(1) G and G1 are equivalent as unlabeled graphs.

(2) f (v ) = f1 (h (v )) ∀ v ∈ V so corresponding vertices have the same label, and

(3) g [(v, w )] = g1 ([ h (v ), h (w )]) ∀ v, w ∈ V; i.e. corresponding edges have the same label.

We often label only the edges or only the vertices, the above still applies but with

f : V → SV 
 vertex labeling only
g = constant 

f = constant 
 edge labeling only
g : E → SE 

Observe that the edges or vertices (or both) of a labeled graph carry information that supplements or
replaces the usual identifying names.

Example 9: If V = {v1 , v2, v3 , v4 , v5}, E = {[ v1 , v4 ], [ v2, v3 ], [ v3 , v4 ], [ v4 , v5]},

f : V → {Indian cities},
Delhi
g : E → N,
199
f (v1 ) = Delhi , g ([ v1 , v4 ]) = 199 Agra
500 90
f (v2 ) = Meerut , g ([ v2, v3 ]) = 697 Aligarh
Bhopal
f (v3 ) = Bhopal, g ([ v3 , v4 ]) = 500 697

f (v4 ) = Agra, g ([ v4 , v5]) = 90 Meerut


Fig. 11.25
f (v5 ) = Aligarh.

Then to label after drawing the diagrams of the graph.


542 Discrete Mathematical Structures

11.8 Complete and Bipartite Graphs


[U.P.T.U. (B. Tech.) 2007, 2009; P.T.U. (B.E.) 2005, 2008; M.K.U. (B.E.) 2005, 2008]

A graph G = (V, E ) is said to be complete if for all vi, v j ∈ V we have [ vi, v j ] ∈ E .


The complete graph on n vertices is denoted by K n.
The following Figs. 11.26 and 11.27 shows the graphs K1 , K 2, K , K 6

K1 K2 K3
(a) (b) (c)
Fig. 11.26

K4 K5 K6
(d) (e) (f )
Fig 11.27

A graph G is Regular of Degree k or k-regular if every vertex has degree k.


A graph G = (V, E ) is said to be Bipartite if there is a partition (V1 , V2 ) of V; i.e. V = V1 ∪ V2, V1 ≠ φ, V2 ≠ φ and
V1 ∩ V2 = φ, such that no two vertices of V1 are adjacent and no two vertices of V2 are adjacent. In other
words, each edge of G connects a vertex of V1 to a vertex of V2. A bipartite graph is said to be complete if for
every pair v1 ∈ V1 and v2 ∈ V2 we have [ v1 , v2] ∈ E if| V1 | = m and| V2 | = n, then the Complete graph (V, E ) is
written km, n.

Example 10: Show that graph in Fig. 11.28 is complete bipartite graph. [Pune (B.E.) 2008]
v4

v1
v5

v2 v6

v3
v7
Fig. 11.28
Graph Theory 543

Solution: Let G = (V, E ) be given graph.


Here, V = {v1 , v2, v3 , v4 , v5, v6 , v7 }
The set V can be partitioned into two subset H and S given by
H = {v1 , v2, v3 } and S = {v4 , v5, v6 , v7 }.
It is clearly observe that each edge of G connects a vertex of H to a vertex of S. Also each vertex of H is
connected to each vertex of S. Hence, the given graph is complete bipartite graph and represents k3, 4 .

Example 11: Show that the graph are complete bipartite.


v3
v1 v3

v1 v4

v5

v6
v2
v2 v4
v7
(k2, 5) (k2, 2)
(a) (b)
Fig. 11.29

Example 12: Show that a complete bipartite graph K m, n has mn edges.


Solution: Let G = (V, E ) denote the given graph K m, n. By definition V can be partitioned into two subsets H
and S containing m and n number of vertices respectively. Now, by definition of complete bipartite graph
each vertex of H is connected to each vertex of S. Hence, total number of edges in K m, n = mn.

Illustration: The marriage relationship is a set of men and women ({vi, v j }) is an edge if vi and v j are married
is simple example of bipartite graph.

Example 13: Show that the maximum number of edges in a complete bipartite graph of n vertices is n2 / 4 .
[Nagpur (B.E.) 2007]

Solution: Let G be a complete bipartite graph with n vertices. Let n1 and n2 be the number of vertices in the
partitions V1 and V2 of vertex set of G. Since G is complete bipartite, each vertex in V1 is joined to each vertex
in V2 by exactly one edge. Thus, G has n1 n2 edges, where n1 + n2 = n. But we know that maximum value of
n1 n2 subject to n1 + n2 = n is n2 / 4. Thus, the maximum number of edges in G is n2 / 4.

Example 14: Prove that a graph is bipartite iff all its circuits are of even length. [U.P.T.U (M.C.A.) 2004]

Solution: Let G be a bipartite graph and let V1 and V2 be the partition of the vertex set of G. Let
v1 , e1 , v2, e2, v3 , K , en, vn + 1 , where vn + 1 = v1 be any circuit C in G. Since G is bipartite, the vertices
vi, i = 1, 2 , K , n, belong alternately to V1 and V2. Without loss of generality, we assume that v1 ∈ V1 . Since V1
and V2 are disjoint, vi ∈ V1 iff i is odd and v j ∈ V2 iff j is even. That is v1 , v3 , v5 , K belong to V1 and
v2, v4 , v6 , K belong to V2. Now, since C is a circuit and v1 ∈ V1 , therefore vn + 1 ∈ V1 . Hence, n + 1 is odd.
Thus, n is even and so the length of circuit C is even.
544 Discrete Mathematical Structures

Conversely, suppose every circuit of a graph G has even length. We arbitrarily select a vertex in each
component of G and paint each of them with colour 1. We now successively paint all the vertices of G as
follows. If a vertex has colour 1 then any vertex adjacent to it will be painted with colour 2. Next, if a vertex
has colour 2, then any vertex adjacent to it will be painted with colour 1. Continue this process till every
vertex in G has been painted. Since every circuit in G is of even length, no adjacent vertices will have the
same colour. Let V1 be the set of all those vertices in G which have colour 1 and V2 be the set of all those
vertices which have colour 2. Then V1 and V2 are a partition of the vertex set of G such that no two vertices in
V1 or V2 are adjacent. Hence, G is bipartite.

Example 15: If the intersection of two paths in a graph is a disconnected graph, show that the union of the
two paths has at least one circuit.
Solution: Let P1 and P2 be two paths in a graph G such that P1 ∩ P2 is disconnected graph. We want to show
P1 ∪ P2 contains a circuit. Since P1 ∩ P2 is disconnected, it has a pair of vertices u, v such that there is no path
between u and v in P1 ∩ P2. Since u, v are in P1 ∩ P2, both u and v are in P1 as well as in P2. Since P1 and P2 are
paths, there exists a path in P1 as well as in P2 connecting u and v. Since as there is no path in P1 ∩ P2
connecting u and v, we may assume that these paths in P1 and P2 connecting u and v are edge-disjoint. Now,
union of these two paths connecting u and v forms a circuit in P1 ∪ P2 as shown in the Fig. 11.30.
P1

u v

P2
Fig. 11.30

Example 16: Is it possible for a bipartite graph to contain a triangle as a subgraph?


Solution: A graph G is said to contain a triangle if G has a subgraph isomorphic with K 3 , the complete
graph of three ver tices. It is clear that triangle is a circuit to length 3. But we know from Example 14 that a
bipartite graph can not contain a circuit of odd length. Hence, a bi partite graph can not contain triangle as a
subgraph.

Exercise
1. Let G be a 3-regular graph with n vertices. What is the sum of the degree of the vertices? Show that in
such a graph n must be even.

2. For what values of n is the complete graph K n a subgraph of K m ?

3. Is it possible for a bipartite graph to contain a circuit C n with n odd as subgraph? Give a reason for
your answer. For what values of n, the circuit graph C n is bipartite?

4. Prove that a graph is bipartite if and only if it contains no circuit of odd length.

n2
5. Prove that an n vertex simple graph is not bipartite if it has more than edges.
4

6. Construct a simple n regular graph with 2n (n ≥ 3) vertices having no triangles.


Graph Theory 545

7. Prove that the union of any two distinct paths (Paths having no edge in common) joining two
vertices contains a circuit.
8. Prove that a connected graph G remains connected after removing an edge e from a circuit.
9. Is it possible for wheel Wn (n ≥ 3) to be bipartite?
10. Draw the complement of the circuit graph C 4 .
11. How many edges has each of the following graphs?
(a) K10 (b) K 5, 7 (c) W8 (d) The Petersen graph
(e) The octahedron.
12. Give an example of each of the following:
(a) a bipartite platonic graph (b) a complete graph that is a wheel
(c) a complete platonic graph.
13. Which of the following is a bipartite graph? [Kurukshetra (M.C.A.) 2004, 2009]

(a) (b)
Fig. 11.31

14. State and prove first theorem of Graph Theory. [R.G.P.V. (B.E.) Raipur 2009]

15. Draw a diagram for each of the following graph, G( V, E )


(i) V = {v1 , v2, v3 , v4 , v5, v6 } and E = {(v1 , v4 ), (v1 , v6 ), (v3 , v4 ), (v4 , v4 ), (v3 , v5 ), (v6 , v6 )}
(ii) V = {v1 , v2, v3 , v4 } and E = {v1 , v2 ), (v4 , v1 ), (v3 , v1 ),(v3 , v4 )}
(iii) V = {v1 , v2, v3 , v4 , v5} and E = {(v1 , v5 ), (v3 , v4 ), (v2, v3 ), (v2, v5 ), (v1, v5 )}
16. Find the degree of each vertex in multigraph in Fig. 11.32. [U.P.T.U. (B.Tech.) 2004]

v1 v2

v3
v4

v5

Fig. 11.32

17. Suppose a graph has five vertices. Find the maximum of edges in G if
(i) G is graph (ii) G is multigraph
18. Can a simple undirected graph of 8 vertices has 40 edges excluding self-loops?
[U.P.T.U. (B.Tech.) 2002]
546 Discrete Mathematical Structures

1. 3n / 2 2. n≤m 3. No, C n is bipartite if n is even


6. K m, n 9. No, because Wn (n ≥ 3) contains triangles. 10.

Fig. 11.33

11. (a) 45 (b) 35 (c) 14 (d) 15 (e) 12


12. (a) Cube (b) K 4 (d) Tetrahedron

13. Both are bipartite.

15.

Fig. 11.34

16. deg (v1 ) = 4, deg (v2 ) = 3, deg (v3 ) = 2, deg (v4 ) = 3, deg (v5 ) = 4

17. (i) There are 5c2 = 10 ways of choosing two vertices from the set V of the vertices of G and
hence number of edges are 10 in G

(ii) Since multiple edges are permuted can have any number of edges (and loops), finite or
infinite, hence no such maximum number of edges in G exists.

18. No, because maximum number of edges would be


n (n − 1) 8 × 7
= = 28
2 2
Graph Theory 547

11.9 Matrix Representation of Graphs


A matrix representation of a graph to a computer is very convenient and useful way. Matrices and graphs
have many important applications in electrical networks analysis and operations research. Some of the
main advantages of matrix representation of a graph are : matrices are easily stored and manipulated in a
computer. Simple operations of matrix algebra provide us to evaluate paths and circuits etc. of a graph.
In matrix representation of a graph the vertices of the graph are ordered.
Usually, there are two ways to represent and store a graph in a computer, namely:
(i) by incidence matrix and
(ii) by adjacency matrix. Firstly we shall consider matrix representation of undirected graphs.

11.9.1 Incidence Matrix


Let G = (V, E ), where V = {v1 , v2 , K , vn} is the set of n vertices and E = {e1 , e2 , K , em } is the set of m edges,
be a graph having no self loops. Then the incidence matrix A = [ aij ] is a n × m matrix defined by
1 , if jth edge e j is incident on ith vertex vi, and
aij = 
0 , otherwise

In the incident matrix A, n rows correspond to the n vertices and m columns correspond to m edges. From
the above definition, it is clear that any element of A is either 0 or 1 and therefore, incident matrix is also
known as (0, 1) matrix or a bit matrix. The incidence, matrix is also known as vertex edge
incidence matrix. The incidence matrix A of G is also denoted by A (G ) .

The incidence matrix of a graph G depends upon the ordering of the vertices and edges of G. Therefore, for
different ordering we shall get different incidence matrix of the same graph G. But by interchanging some
of the rows and columns of the matrix, any one of the incidence matrix of G can be obtained from another
incidence matrix of G.

Example 17: Write the incidence matrix of the graph in Fig. 11.35 (a) and (b).
v5
e5
e4 v1 e1 v2 e2
e6 v3 v3
v4
e4
e2 e7 e3
e7 e3 v4
e5

v1 e1 v2 v5 e6 v6

(a) (b)
Fig 11.35
548 Discrete Mathematical Structures

Solution: (a) The graph in Fig. 11.35 (a) has 5 vertices and 7 edges. The incidence matrix A of the given
graph is given by
e1 e2 e3 e4 e5 e6 e7
v1 1 0 1 0 0 0 1
v2 1 1 0 0 0 0 0
 
A = v3  0 1 1 1 0 0 0
v4  0 0 0 1 1 1 1
 
v5 0 0 0 0 1 1 0

Observation: We clearly observe the following for the incidence matrix A of a graph G without self loops:
(i) The sum of each row is equal to the degree of the corresponding vertex.
(ii) We know that every edge is incident on exactly two vertices, therefore each columns of the incidence
matrix A has exactly two 1’s.
(iii) If a row has all zero’s then the corresponding vertex is an isolated vertex.
(iv) In case the graph has parallel edges then the corresponding columns in A are identical.
(v) If the incidence matrix is given, then the corresponding graph can be drawn.
(vi) In case the graph G is disconnected and G1 and G 2 are its components, then the incidence matrix A (G )
of G may be written as:

A(G1) O
A(G) =
O A(G2)

(b) The given Fig 11.35 (b) has 6 vertices and 7 edges. The incidence matrix A of the given graph is
given by
e1 e2 e3 e4 e5 e6 e7
v1 1 0 0 0 0 0 1
v2 1 1 1 1 0 0 0
 
v 0 1 0 0 0 0 0
X= 3
v4  0 0 0 1 1 0 0

v5  0 0 0 0 1 1 1
 
v6  0 0 1 0 0 1 0

11.9.2 Adjacency Matrix [U.P.T.U. (B.Tech.) 2009]

Sometimes to represent the graph by adjacency matrix is more convenient.


Let G be graph with n vertices and no parallel edges (self loops are allowed), then the adjacency matrix of G
is an n × n symmetric matrix A = [ aij ] defined by
1 , if there is an edge between ith and jth vertices, and
aij = 
0 , if there is r edge between them.

r if there is an edge between ith and jth vertices


Note: aij = 
0 otherwise when where is loop in graph.
Graph Theory 549

Example 18: Write the adjacency matrix of the graph in Fig. 11.36.

v5 v 4 v5 v3
v3
v6 v4

v1 v2 v1 v2
(a) (b)
Fig. 11.36

Solution: (a) The given graph has six vertices. The adjacency matrix A of the given graph is given by
v1 v2 v3 v4 v5 v6
v1 0 1 0 0 1 1
v2 1 0 1 1 0 0
 
v3  0 1 0 1 0 0
A=
v4  0 1 1 0 1 0
 
v5 1 0 0 1 1 0
 
v6 1 0 0 0 0 0

Observations: We clearly observe the following for the adjacency matrix A of a graph G (without parallel
edges).

(i) The principal diagonal of A has all zero’s if and only if G has no self loop.

(ii) If G is without self loops then the sum of any row (or any column) is equal to the degree of the
corresponding vertex, since the matrix A is symmetric.

(iii) Permutations of columns and of the corresponding row simply implies the reordering of vertices.

(iv) In case the graph G is disconnected and G1 and G 2 are its components, then the adjacency matrix A (G )
can be written as:
 A (G1 ) M O 
A (G ) =  . . . L L 
 
 O M A (G 2 )

(v) If the adjacency matrix is given then the corresponding graph can be drawn.
(vi) If two graphs G1 and G 2 are given, then they are isomorphic if and only if the adjacency matrix of one
can be derived from the adjacency matrix of the other by simply interchanging some of the columns
and the corresponding rows. Similarly,
(b) v1 v2 v3 v4 v5
v1 0 1 0 1 1
v2 1 0 1 0 0
 
X = v3  0 1 1 1 1
v4 1 0 1 0 1
 
v5 1 0 1 1 0
550 Discrete Mathematical Structures

Example 19: Draw the graph (undirected graph) repre sented by the following adjacency matrix A:

v1 v2 v3 v4 v5
v1 1 1 1 0 0
v2 1 1 1 0 0
 
A = v3 1 1 0 1 0
v4  0 0 1 1 1
 
v5 0 0 0 1 0

Solution: The required graph shown by A is given in Fig. 11.37.

Fig. 11.37

Example 20: Draw the multigraph whose adjacency matrix A is given by

v1 v2 v3 v4
v1 0 4 0 0
v2  4 1 1 1
A=  
v3  0 1 1 2
v4 0 1 2 2

Solution: The required multigraph shown by A is as given by Fig. 11.38.

v1 v2

v3 v4
Fig. 11.38

0 2 0 1
2 1 1 1
Similar problem; X =  
0 1 0 1
1 1 1 0

Graph Theory 551

Example 21: Draw the graph whose incidence matrix A is given by


e1 e2 e3 e4 e5 e6
v1 1 0 0 0 0 0
v2 1 1 1 0 0 0
 
A = v3  0 1 0 1 1 1
v4  0 0 0 0 1 1
 
v5 0 0 1 1 0 0

Is this a simple graphs ? [M.C.A. (Delhi) 2009]

Solution: The re quired graph is as shown in Fig. 11.39.

v1 e1 v2

e3
e2

e6
v5 e4 v3
e5 v4
Fig. 11.39
Since this graph contain parallel edges so it is not a simple graph

11.10 Matrix Representation of Digraphs


11.10.1 Incidence Matrix
Let G = (V, E ), where V = {v1 , v2 , K , vn} is the set of n vertices and E = {e1 , e2 , K , em } is the set of m edges, be
a digraph having no self loops. Then the incidence matrix A = [ aij ] of G is a n × m matrix defined by
= 1, if the jth edge e j is incident out of the ith vertex vi,

aij = − 1 , if the jth edge e j is incident into the ith vertex vi,
= 0, if e is not incident on v
 j i

Example 22: Find the incidence matrix of the digraph shown in Fig. 11.40.

v1 e1
v2

e6 e5 e3
e2

e7 v4 e4 v3

v5
Fig. 11.40
552 Discrete Mathematical Structures

Solution: The given digraph has five vertices and seven edges. The required incidence matrix A is a 5 × 7
matrix given by
e1 e2 e3 e4 e5 e6 e7
v1  1 0 0 0 1 −1 0
v2  − 1 − 1 − 1 0 0 0 0
 
A = v3  0 1 1 1 −1 0 0
v4  0 0 0 −1 0 1 − 1
 
v5  0 0 0 0 0 0 1

Example 23: Draw the digraph whose incidence matrix A is given by

e1 e2 e3 e4 e5 e6 e7 e8 e9
a − 1 − 1 0 1 0 0 0 0 0
b  1 0 1 0 0 0 0 −1 0
 
c  0 1 −1 0 −1 −1 0 0 0
A=  0
d 0 0 −1 0 0 −1 1 1
 
e  0 0 0 0 1 1 1 0 0
 0
f  0 0 0 0 0 0 0 − 1

Solution: The digraph corresponding to given incidence matrix is as shown in Fig 11.41

Fig. 11.41

11.10.2 Adjacency Matrix [U.P.T.U. (B. Tech) 2009]

Let G be a digraph with n vertices v1 , v2 , K , vn, then the adjacency matrix of G is an n × n matrix A = [ aij ]
defined by

 r, if r edges are directed from ith vertex vi to jth vertex v j ,


aij = 
 0 , otherwise.

Note: that r = 1 if digraph has no parallel edges.


Graph Theory 553

Example 24: Find the adjacency matrix of the di graph shown in Fig 11.42

e10
e1
a b

e2 e4
e3 e5 e8
e
e9
e7 d e6 c

Fig. 11.42

Solution: The adjacency matrix of the given graph is


a b c d e
a 0 1 0 1 0
b 0 1 2 0 0
 
A = c 1 0 0 1 1
d 0 0 0 1 0
 
e 0 0 1 0 0

Example 25: Draw the digraph whose incidence matrix is A given in solution to ex ample 24.
Solution: See Fig 11.43 (a)
e10
e1
a b

e2 e4
e3 e5 e8
e
e9
e7 d e6 c

Fig. 11.43

Observations: If A is the ad jacency matrix of a digraph G, then


(i) The sum of ith row is equal to the out degree of the vertex vi
(ii) The sum of ith column is equal to the in-degree of vertex vi
(iii) The sum of entries in A is equal to the number of edges in G.

Example 26: Write the incidence matrix of the graph.

e v4
v5 d
f
v3
c
b

v1 a v2
Fig. 11.44
554 Discrete Mathematical Structures

Solution: The given graph has five ver tices and six edges. The incidence matrix is shown below:
a b c d e f
v1  1 0 0 0 0 0
v2  − 1 1 −1 0 0 0
 
v3  0 − 1 0 1 1 1
v4  0 0 0 0 − 1 − 1
 
v5  0 0 1 −1 0 0

Example 27: Show the adjacency matrix of the following graph.


v2 e3
e1 e2 v3
v1

e10 e4
e9 e5 v5
v9 e11
e6
v7 e8 v4
e7
e12 v6
v8
Fig. 11.45

Here, (v1 , v2 , K , v9 ) are vertices


 
& (e1 , e2 , K , e12 ) are edges 
Solution: The adjacent matrix of the given graph is
v1 v2 v3 v4 v5 v6 v7 v8 v9

v1 0 1 1 0 0 0 1 0 0
v2 0 0 0 0 0 0 0 0 0
 
v3 0 0 1 1 0 0 0 0 0
v4 0 0 0 0 1 1 1 0 0
 
A = v5 0 0 0 1 0 0 0 0 0
0 
v6  0 0 0 0 0 1 0 0
v7 1 0 0 0 0 0 0 0 1
 
v8 0 0 0 0 0 0 1 0 0
v9 0 0 0 0 0 0 0 0 0

Example 28: Show the incidence matrix of the following graph.

Here, (v1 , v2 , K , v6 ) are vertices


 
 & (e1 , e2 , K , e10 ) are edges 

Fig. 11.46
Graph Theory 555

Solution: The graph has 6 vertices and 10 edges. The incidence matrix A (G )of the given graph is given by
e1 e2 e3 e4 e5 e6 e7 e8 e9 e10
v1 1 1 1 0 0 0 0 0 0 0
v2  0 1 1 1 0 0 0 0 0 0
 
v3  0 0 0 1 1 1 1 1 0 0
A (G ) =
v4  0 0 0 0 0 0 0 1 1 1
 
v5  0 0 0 0 0 0 1 0 1 1
v6 1 0 0 0 1 1 0 0 0 0

Example 29: Determine the adjacency of the graph.


v1 v2

v3 v4

v5
Fig. 11.47

Solution: The adjacency matrix of the given graph is


v1 v2 v3 v4 v5
v1 0 1 1 0 0
v2  0 0 0 1 0
 
v3  0 0 0 1 1
v4  0 0 0 0 1
 
v5 0 0 0 0 0

Example 30: Consider the directed graph. Determine the in-degree and out degree of each of vertices of the
graph.

2 3

Fig. 11.48

Solution: Out degree of vi = d + (vi ), In degree of vi = d − (vi )


So in the given graph, the out degree of the vertices are
d + (v1 ) = 2 , d + (v2 ) = 2, d + (v3 ) = 1
The in-degree of vertices are
d − (v1 ) = 1 , d − (v2 ) = 1 , d − (v3 ) = 3
556 Discrete Mathematical Structures

Example 31: Draw the graph represented by adjacency matrix A given by


0 1 1 0 0
1 0 1 0 0
 
A = 1 1 0 1 0
0 0 1 0 1
 
0 0 0 1 1 

Solution: The ad jacency matrix v2


v1 v2 v3 v4 v5
v1 0 1 1 0 0
v2 1 0 1 0 0 v1 v3
 
A = v3 1 1 0 1 0 ⇒
v4  0 0 1 0 1
  v4
v5 0 0 0 1 1  v5
Fig. 11.49
Example 32: Draw the undirected graph cor re spond ing to in cidence ma trix
1 0 0 1 1
1 1 0 0 0
 
0 1 1 0 1
0 0 1 1 0

Solution: Incidency matrix


v1 a v2
a b c d e
v1 1 0 0 1 1 e
v2 1 0 d b
1 0 0
 ⇒
v3  0 1 1 0 1
v4 0 0 1 1 0 v4 c v3
Example 33: Find the incidence ma trix to repre sent the graph Fig. 11.50
v1 e1 v2

e4 e5 e2

v3
v4 e3
Fig. 11.51
Graph Theory 557

Solution: Incidence matrix corresponding to graph


e1 e2 e3 e4 e5

v1 1 0 0 1 1
v2 1 1 0 0 0
 
v3  0 1 1 0 1
v4 0 0 1 1 0

Example 34: Find the adjacency matrix to represent the graph.

v4 v3

v1 v2

Fig. 11.52

Solution: Adjacency matrix


v1 v2 v3 v4
v1 0 1 0 1
v2 1 0 1 1
 
v3  0 1 0 0
v4 1 1 1 0

Example 35: Write the adjacency matrix for the graph.

x1 x2

x5
a c
x6
x3 x7
x4

e x8 d
Fig 11.53

Solution: Adjacency matrix ( A ).


a b c d e
a 0 1 1 1 1
b 1 0 1 0 0
 
A = c 1 1 0 1 1
d 1 0 1 0 1
 
e 1 0 1 1 0
558 Discrete Mathematical Structures

Example 36: Draw the graph with following incidence matrix.


e1 e2 e3 e4 e5 e6
v1 1 1 1 0 0 0
v2  0 0 1 1 0 1
 
v3  0 0 0 0 1 0
v4 1 1 0 1 0 0
 
v5 0 0 0 0 1 0

Solution: e6

v5

v2

e5
e3 e4

e2

v1 v4 v3

e1
Fig. 11.54

Example 37: Find the adjacency matrix for the following graphs.

Fig. 11.55
Solution:
(a) The adjacency matrix. (b) The adjacency matrix.
a b c d u1 u2 u3 u4 u5
a 0 1 1 1 u1 0 1 0 0 0
b 0 1 1 0 u2 0 0 1 0 0
A=    
c 1 0 0 1 u3 0 1 0 1 0
d 0 0 0 0 u4 1 0 0 0 1
 
u5 1 0 0 0 1 

Example 38: Draw the graph having following matrix as its adjacency matrix.
v1 v2 v3 v4
v1 0 1 2 3
v2 1 0 3 2
 
v3  2 3 0 1
v4  3 2 1 0
Graph Theory 559

Solution: Adjacency matrix corresponding to given matrix is


v1 v2

v3 v3

Fig 11.56

Example 39: Is there exist a graph G that corresponding to the following incidence matrix? Justify your
answer.
1 0 1 1 1 0
0 1 1 0 0 0
 
0 0 0 0 1 0
1 1 0 0 0 1 
 
0 0 0 1 0 1 
Solution: Yes there exists a graph G that corresponding to the following incidence matrix.
Observations about incidence matrix:
(i) The sum of each row is equal to the degree of the corresponding vertex.
(ii) We know that every edge is incident on exactly two vertices, therefore each columns of the incidence
matrix A has exactly two 1’s.
(iii) If a row has all zero’s, then the corresponding vertex is an isolated vertex.
(iv) In case the graph has parallel edges then the corresponding column in A are identical.
(v) If the incidence matrix is given, then the corresponding graph can be drawn.
Example 40: Find the incidence matrix for the following graph.

v3 v6
a
v2
e b
h
v4
g
f c

v1 v5
d
Fig. 11.57
Solution: The incidence matrix A for the given graph as follows:
a b c d e f g h
v1 0 0 0 1 0 1 0 0
v2  0 0 0 0 1 1 1 1
 
v3  0 0 0 0 0 0 0 1
A (G ) =
v4 1 1 1 0 1 0 0 0
 
v5  0 0 1 1 0 0 1 0
v6 1 1 0 0 0 0 0 0
560 Discrete Mathematical Structures

Example 41: Find the adjacency matrix for the following graph.
e8 v3
e4
v2
v4
e3
e5
e1 e7
e2 v5

v1 e6 v6
Fig 11.58

Solution: The adjacency matrix of the given graph is follows:


v1 v2 v3 v4 v5 v6
v1 0 1 0 0 1 1
v2 1 0 0 1 1 0
 
v3  0 0 0 1 0 0
v4  0 1 1 0 1 1
 
v5 1 1 0 1 0 0
v6 1 0 0 1 0 0

Example 42: Is it possible to make the incidence matrix of the following graph? If it is not possible then why?
Here, (v1 , v2 , K , v4 ) denotes the vertices and (e1 , e2 , K , e7 ) denotes the edges in the graph.

e1
v1 v2

e2
e7 e3

v4 e6 v3
e5
e4
Fig. 11.59

Solution: No, it is not pos sible to make the incidence ma trix of the given graph, be cause the graph
contains two self loops.
Example 43: Show the incidence ma trix of the following given graph.
v8 e7 v7
e12
e13 e4 e6
v9 v1 v2

e5
e1 e3

v3
e11 e8
v4 e2
e10 e9
v6 v5

Fig. 11.60
Here, (v1 , v2 , K , v9 ) denotes the vertices and (e1 , e2 , K , e13 ) denotes the edges in the graph.
Graph Theory 561

Solution: The in cidence matrix of given graph as follows :


e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13
v1 1 0 0 1 0 0 0 0 0 0 0 1 1
v2  0 0 1 1 1 1 1 0 0 0 0 0 0
 
v3  0 1 1 0 0 0 0 1 1 0 0 0 0
v4 1 1 0 0 1 0 0 0 0 1 1 0 0
 
v5  0 0 0 0 0 0 0 1 1 0 0 0 0
v6  0 0 0 0 0 0 0 0 0 1 1 0 0
 
v7 0 0 0 0 0 1 1 0 0 0 0 0 0
v8  0 0 0 0 0 0 0 0 0 0 0 1 0
 
v9  0 0 0 0 0 0 0 0 0 0 0 0 1

Example 44: Draw the graph having following matrix as its adjacency matrix.
0 3 2 2
3 0 1 2
 
2 1 0 1
2 2 1 0

Solution: The graph corresponding adjacency matrix is: v1 e1


v2
v1 v2 v3 v4
e7 e2
v1 0 3 2 2 e3
v2  3 0 1 2
 
v3  2 1 0 1 v4 e6 v3
e5
v4  2 2 1 0 e4
Fig. 11.61

Example 45: If a graph G = (V, E ) is defined by


V = {v1 , v2, v3 , v4 , v5},
E = {[ v1 , v2], [ v1 , v5], [ v2, v3 ], [ v2, v4 ], [ v3 , v4 ], [ v3 , v5], [ v4 , v5]},
| V | = 5, | E | = 7,
then find the adjacency matrix and incidence matrix of the graph G. [R.G.P.V. (B.E.) 2007]

Solution: The diagram of the graph G is shown in Fig. 11.62.


e2
v1 v5

e1 e6 e7
v2 e4
v4
e3
e5
v3
Fig. 11.62
562 Discrete Mathematical Structures

Let A and M denote the adjacency matrix and the incidence matrix of the graph G respectively. Then
v1 v2 v3 v4 v5 e1 e2 e3 e4 e5 e6 e7
v1 0 1 0 0 1  v1 1 1 0 0 0 0 0
v2 1 0 1 1 0 v2 1 0 1 1 0 0 0
   
A = v3 0 1 0 1 1  and M = v3 0 0 1 0 1 1 0
v4  0 1 1 0 1  v4  0 0 0 1 1 0 1 
   
v5 1 0 1 1 0 v5 0 1 0 0 0 1 1 

11.11 Walk [P.T.U. (B.E.) 2005, 2009; R.G.P.V. (B.E.) 2007]

Let G = (V, E ) be a graph. Then by a walk we shall mean a finite sequence of edges of the form.
{v0 , v1 }, {v1 , v2}, {v2, v3 }, {v3 , v4 } , K , {vn − 1 , vn}
The Length of a walk is the number of edges it contains.

11.11.1 Open and Closed Walk


The walk is Closed if v0 = vn; otherwise, it is Open. A Simple Walk is a walk in which no edge appears
more than once. For example, in the graph shown in Fig. 11.63 (a)., a walk 1,2,4,5,1,3 and 1,2,4 are both
open walks from d to c, but only the graph 11.63 (b) is simple.
a 2 b a 2 b

1 4 1 4
3

d 5 c d 5 c

(a) (b)
Fig. 11.63

11.12 Paths
Let G = (V, E ) be a directed graph. A path in G is a finite sequence of edges (ei1 , ei2 K eik ) such that the
terminal vertex of ei j coincides with the initial vertex of ei( j + 1 ) for 1 ≤ j ≤ k − 1.
A path is said to be simple if it does not include the same edge twice.
A path is said to be elementary if it does not meet the same vertex twice.

Illustration: Let V = {v1 , v2, v3 , v4 , v5, v6 , v7 , v8 , v9 , v10 } and


E = {e1 , e2, e3 , e4 , e5, e6 , e7 , e8, e9 , e10 , e11 , e12, e13 },
where e1 = (v1 , v2 ), e2 = (v2, v3 ), e3 = (v3 , v4 ),
e4 = (v4 , v7 ), e5 = (v4 , v5 )
e6 = (v5, v9 ), e7 = (v9 , v1 ), e8 = (v5, v3 ), e9 = (v5, v8 ),
e10 = (v8 , v6 ), e11 = (v6 , v4 ), e12 = (v6 , v5 ), e13 = (v9 , v10 ).
Graph Theory 563

Then G = (V, E ) is a graph.

v6

Fig. 11.64

In Fig. 11.64 the sequence of edges (e1 , e2, e3 , e4 ) is a path; the sequence of edges (e1 , e2, e3 , e5, e8 , e3 , e4 ) is a
path, but not a simple one; the sequence of edges (e1 , e2, e3 , e5, e9 , e10 , e11 , e4 ) is a simple one and the
sequence of edges (e1 , e2, e3 , e5, e6 , e13 ) is an elementary simple path.

11.13 Circuit
Let G = (V, E ) be a graph. A circuit is a path (ei1 , ei2 , K , eik ) in which the terminal vertex of eik coincides with
the ini tial vertex of ei1 .

A circuit is said to be simple if it does not includes the same edge twice.

A circuit is said to be el e mentary if it does not meet the same vertex twice.

Illustration: In Fig. 11.64 (e1 , e2, e3 , e5, e9 , e10 , e12, e6 , e7 ) is a simple circuit, but not an elementary one;
(e1 , e2, e3 , e5, e6 , e13 ) is an elementary circuit.

Theorem 4: Let G = (V, E ) be a directed or undirected graph with n vertices. If there is a path from vertex v1 to
ver tex v2, then there is a path of no more than n − 1 edges from vertex v1 to vertex v2 .

Proof : Let there be a path from v1 to v2 and let (v1 , K , vi, K , v2 ) be the sequence of vertices that the path
meets when it is traced from v1 to v2. Suppose there are l edges in the path, then there would be l + 1 vertices
in the sequence.

If l > n − 1, then there must be a vertex vk that appears more than once in the sequence, that is
(v1` , K , vi , K , vk , K , vk , K , v2 ). Let us delete the edges in the path that leads vk back to vk , then we have
a path from v1 to v2 that has fewer edges than the original one. We shall repeat this argument until we have
a path that has n − 1 or fewer edges.
564 Discrete Mathematical Structures

11.14 Connected, Disconnected, Strongly Connected and Weakly Connected Graphs


An undirected graph G is said to be Connected if there is a path between every two vertices, otherwise it is
said to be disconnected.
A directed graph G = (V, E ) is said to be Connected if the undirected graph derived from it by ignoring the
directions of the edges is connected and is said to be Disconnected otherwise.
A directed graph G = (V, E ) is said to be Strongly Connected if for every two vertices a and b in the graph
there is a path from a to b as well as a path from b to a.
A directed graph G = (V, E ) is said to be Weakly Connected if the corresponding undirected graph is
connected but G is not strongly connected.

Illustration: Fig. 11.65(a) shows a connected graph. However, we observe that it is not strongly connected,
while Fig. 11.65(b) shows a disconnected graph.

(a) (b)
Fig. 11.65
It is well known that calculations with the adjacency matrix reveal important information about the nature
of a graph.

Theorem 5: Let A be the adjacency matrix of a graph G = (V, E ) with| V | = n then ( A k )ij is the number of paths
of length k from vi to v j .
Proof: We shall prove this result by applying induction method on k.
For k = 1, a path of length 1 is just an edge of G. Hence, the result is true for k = 1 by virtue or definition of A.
Assume that this result is true for k − 1, then we consider A k . Let
( A k − 1 )ij = α ij and Aij = aij
n
Then ( A k )ij = ( A k − 1 A )ij = ∑ α iq aqj
q =1

By induction hypothesis, where


α iq = number of paths of length k − 1 from vi to vq,
aqj = number of paths of length 1 from vq to v j .
We then have α iq aqj = number of paths of length k from vi to v j where vq is the next to last vertex in the path
n
and therefore ∑ α iq aqj = number of paths of length k from vi to v j .
q =1

Hence, the result is true by reduction for all k.


Graph Theory 565

11.15 Applications of Graphs


11.15.1 Konigsberg Bridge Problem
The Konigsberg bridge problem is perhaps the
best-known example in graph theory. It was a long A
standing problem until solved by Leonhard Euler
(1707-1783) in 1736, by means of a graph.
Two islands, C and D, formed by the Pregel River in C D
Konigsberg were connected to each other and to the
banks A and B with seven bridges, as shown in Fig. 11.66.
The problem was to start at any of the four land area of
B
the city A, B, C or D, walk over each of the seven bridges
exactly once, and return to the starting point (of course, Fig. 11.66: Konigsberg Bridge Problem
without swimming across the river).
Euler represented this situation by means of a graph as shown in
Fig. 11.67 The vertices represent the land areas and the A
edges represent the bridges. Euler proved that a solution
to this problem does not exist.
C D

B
Fig. 11.67: Graph of Konigsberg Bridge Problem

11.15.2 Utilities Problem


There are three houses H1 , H 2 and H 3 each to be connected to each of the three utilities— water (W ), gas
(G ) and electricity (E )—by means of conduits. The problem is : Is it possible to make such connections
without any crossovers of the conduits?

H1 H2 H3

H1 H2
H3
W
G W
W G E
Fig. 11.68: Three-utilities problem Fig. 11.69: Graph of Three-utilities Problem

In the Fig. 11.68 we have shown that how this problem can be represented by a graph — the conduits are
shown as edges while the houses and utility supply centers are vertices. This graph cannot be drawn in the
plane without edges crossing over. Thus, the answer to this problem is no.
566 Discrete Mathematical Structures

11.15.3 Planarity Problem


Much research has been done on graphs which are planar; that is, which can be drawn in the Euclidean plane
without intersecting edges. The graph in Fig. 11.70 (a) is planar, since it can be redraw on Fig. 11.70 (b).

(a) (b)
Fig. 11.70: Planar graph

Two graphs are said to be homeomorphic if one can be obtained from the other by operations of the
follow ing kind:

(a) Replace an edge {vi, v j } by a new vertex vx and two edges {vi, vx } and {vx , v j }, so that

vi vj vi vx vj

(a) (b)
Fig. 11.71

(b) For a vertex vk of degree 2, replace vk and edges {vi, vk } and {vk , v j } by a single edge {vi, v j }, so that

vi vk vj vi vj

(a) (b)
Fig. 11.72

The graphs in Fig. 11.73 are homeomorphic; the degree 2 vertex v3 is deleted and degree 2 vertex v6 is
added, to convert graph (a) to graph (b).
v3 v2
v2
v6

v1 v4

v1 v4
v5
v5
(a) (b)
Fig. 11.73
Graph Theory 567

11.15.4 Four-Color Problems


In cartography, a map is normally colored in such a way that no countries with common boundary have the
same color. In the map, the four colors R = red, Y = yellow, G = green, B = blue suffice. Cartographers soon
formulates a question surprisingly difficult to answer.

Y G
R R
G R Y Y
G
Y
B
G
R
Y B
Y R
G Y

Fig. 11.74 Coloring of a Map

Can every map be colored by four colors?


If we replace each country by a vertex and join vertices if the corresponding countries have a common
boundary, we shall obtain the following equivalent graph-theoretic problem.
Four-color Problem: Can we color (or label) the vertices of any planar graph with four colours so that
no two adjacent vertices have the same color ?
Appeal and Hake (1976), by computer-aided research, have yielded an affirmative answer to this question.
Special properties of graphs for which two or three colors suffices have also been studied. Note that any
tree is two -color able.

11.15.5 Traveling Salesperson Problem


In this problem, a salesperson is required to visit n cities on a trip. The problem is to find a route by which
the salesperson can visit each city once and return home, with minimum distance traveled.
The relevant graph to this problem is the complete graph on n vertices, each vertex representing a city. The
graph is weighted, each edge being labeled with the distance between the two cities represented by its
terminals.

11.15.6 Transportation Problem


In the adjoining Fig. 11.75 a weighted directed graph is 8
4 t
shown whose vertex 's' is called a source and 't' a sink. The
weights of the arrows are to be interpreted as capacities, 8
the weight of an arrow is the maximum amount of some s 3
2
commodity that can be transported along that arrow in 3
unit time. We can ask for the maximum amount that can be 5 3
transported from s to t in unit time.
4 6
Fig. 11.75: Max-Flow=Min-Cut
568 Discrete Mathematical Structures

A cut in this graph is a cut-set that leaves s and t in different compo nents. The ca pac ity of a cut is the sum of
the ca pac ities of its arrows. The Max-flow Min-cut Theorem asserts that the maximum possible flow
from s to t equals the minimum of the capac ities of all cuts between s and t.
We can also associate with each arrow a cost, the cost of unit flow through that arrow and then ask for the
flow pattern which transports commodities from s to t at minimum unit cost. This problem is known as the
Transportation Problem.

Exercise
1. Draw all simple graphs of one, two, three and four vertices.

2. Draw graphs representing problems of


(a) two houses and three utilities
(b) four houses and four utilities, say, gas, water, electricity and telephone.
[P.T.U. (B.E.) Punjab 2009]

3. Can a graph with 7 vertices be isomorphic to its complement?


4. Draw the graph represented by the following adjacency matrices:
0 1 1 0 0 0 1 1 1 0
0 1 1 0 1
0 1 1  1 0 0 0 0 1 0 0 0 1
1 0 1  0 1 1    
(a) (b)   (c) 1 0 0 1 1 (d) 1 0 0 1 0
  1 1 0 1
1 1 0 0 0 1 0 0 1 0 1 0 1
0 1 1 0    

0 0 1 0 0 0 1 0 1 0

5. Determine the adjacency matrices and incidence matrices by the pictures below:

v5
v1 e1 v2 v2

e1 e2 e4
e9 e2
e6 v3
e7 e3 v4
v3 v1 e5
v6
e8 e7 e6
e3 e8
e5

v5 e4 v4 v7 v6
(a) (b)

Fig. 11.76 Fig. 11.77

6. Show that the maximum degree of any vertex in a simple graph with n vertices is n − 1.

7. Show that the maximum number of edges in a simple graph with n vertices is n (n − 1)/ 2 .

8. If G = (V, E ) is a graph with | V | = n, then what is the maximum possible value for | E | ?

9. How many distinct graphs are there on n vertices?


Graph Theory 569

10. Prove that a simple graph with n vertices must be connected if it has more than [(n − 1)(n − 2)]/ 2
edges.

11. Prove that if a connected graph G is decomposed into two subgraphs g1 and g 2, there must be at least
one vertex common between g1 and g 2.

12. Let a, b and c be three distinct vertices in a graph. There is a path between a and b and also there is a
path between b and c. Prove that there is a path between a and c.

13. Find the connected components of the graphs in Fig. 11.78


v1 v2 v3

v5 v6

v4

v7
v8 v9
Fig. 11.78

14. Draw the graph G whose adjacency matrix A=[aij ] is given by

0 1 0 1 0
1 0 0 1 0
 
A = 0 0 0 1 1
1 1 1 0 1
 
0 1 1 1 0

15. Find the adjacency matrix and incidence matrix of the multigraph shown in Fig. 11.79.

v1
v2 e1
e2 v3
e4
e5 e6

v4 e7 v5

e8
Fig. 11.79
570 Discrete Mathematical Structures

1.

(a) (b) (c) (d) (e) (f )


1-Vertex 2-Vertex 3-Vertex
graph graph graph

(g) (h) (i) (j) (k)


4-Vertex graph
Fig. 11.80

(a) H1 H2

Elect-
Gas Water ricity
G W E

(b) H1 H2 H3 H4

Gas Water Elect- Telep-


ricity hone
G W
E T

Fig. 11.81
3. No

4. v1 v2
v1
v1 v2
v1
(a) (b) v2 v3 (c) v3 (d) v3
v2 v3
v4 v5
v4 v4 v5
Fig. 11.82
Graph Theory 571

v1 v2 v3 v4 v5 v6 e1 e2 e3 e4 e5 e6 e7 e8 e9
v1 0 1 0 1 0 0 v1 1 0 0 0 0 0 0 1 0
v2 1 0 1 1 0 1 v2 1 1 0 0 0 0 0 0 1
   
v3  0 1 0 1 0 1 v3  0 1 1 0 0 0 1 0 0
5. (a) A= M =
v4 1 1 1 0 1 0 v4  0 0 1 1 0 0 0 1 1
   
v5  0 0 0 1 0 1 v5  0 0 0 1 1 0 0 0 0
v6 0 1 1 0 1 0 v6 0 0 0 0 1 1 1 0 0
v1 v2 v3 v4 v5 v6 v7 e1 e2 e3 e4 e5 e6 e7 e8
v1 0 1 0 0 0 0 1 v1 1 0 0 0 0 0 0 1
v2 1 0 1 0 0 0 0 v2 1 1 0 0 0 0 0 0
   
v3  0 1 0 1 0 0 1 v3  0 1 1 0 0 0 1 0
(b) A = v4 0 0 1 0 1 1 0 M = v4  0 0 1 1 0 1 0 0
   
v5  0 0 0 1 0 1 0 v5  0 0 0 1 1 0 0 0
v6  0 0 0 1 1 0 0 v6  0 0 0 0 1 1 0 0
   
v7 1 0 1 0 0 0 0 v7 0 0 0 0 0 0 1 1 

8. n(n – 1)
2
13. The connected components are (v1 , v2, v5, v6 ), (v3,v4 , v7 ), (v8 , v9 )
14. v1 v5

v4
v2

v3
Fig. 11.83
15. v1 v2 v3 v4 v5 e1 e2 e3 e4e8 e5 e6 e7
v1 0 0 1 0 1 v1 1 1 0 0 0 0 0 0
v2  0 1 0 1 1 v2  0 0 1 1 0 1 0 0
   
v3 1 0 0 1 0 = Adjacenty matrix, v3 1 0 0 0 0 1 0
0 = Incidence matrix
v4  0 1 1 0 1 v4  0 0 0 0 1 1 1 1
   
v5 1 1 0 1 0 v5 0 1 0 1 0 0 1 1 

11.16 Basic Terminology


11.16.1 Directed Graph
A Directed Graph G is defined abstractly as an ordered pair (V, E ), where V = {v1 , v2, K } is a non-empty
set and E = {e1 , e2, K , } is a binary relation on V. The elements v1 , v2, K in V are called the Vertices and the
ordered pairs ek = (vi, v j ) in E are called the Edges of the directed graph. An edge is said to be incident with
the vertices it joins. The edge (vi, v j ) is Incident with the vertices vi and v j . More specifically, we say that
the edge (vi, v j ) is incident from vi and is incident into v j . The vertex vi is called the Initial Vertex and the
vertex v j is called the Terminal Vertex of the edge (vi, v j ). Directed graphs are usually represented
geometrically as a set of marked points V with a set of arrows E between pair of points (end vertices).
572 Discrete Mathematical Structures

Illustration: Let V = {a, b, c, d} and E = {e1 , e2, e3 , e4 , e5, e6 } be such that


e1 = (a, b), e2 = (b, a), e3 = (b, d ), e4 = (d, d ), e5 = (d, a) and e6 = (c, c).
Then G = (V, E ) is a directed graph as shown in the Fig. 11.84.
e1
a b a b
e2

e5
e3 c

d c
e4 e6
d

Fig. 11.84 Fig. 11.85

11.16.2 Parallel Edges in a Graph


Let G = (V, E ) be a graph. Then all edges having the same pair of end vertices are called Parallel Edges
Illustration, the edges e1 and e2 in Fig. 11.84 are parallel edges.

11.16.3 Undirected Graph


An Undirected Graph G is de fined abstractly as an ordered pair (V, E ) where V is a non-empty set and E is
a multi-sets of two elements from V. An undirected graph can be represented geometrically as a set of
marked points V with a set of lines E between the points.
Illustration: G = ({a, b, c, d}, {{a, b}, {a, d}, {b, c}, {b, d}, {c, c}}) is an undirected graph as shown in Fig.
11.85 above.
From now onwards, when it is clear from the context, we shall use the term graph to mean either a directed
Graph, or an un di rected graph, or both.

11.17 Planar Graphs


A graph G is said to be planar if it can be drawn on a plane in such a way that no edges cross one another
except at common vertices. A graph G that cannot be drawn on a plane with out crossing of its edges is
called Non-planar.
For example, Fig. 11.86 (a) shows a planar graph. Note that the graph in Fig. 11.86 (b) is also planar
because it can be redrawn as that shown in Fig. 11.86 (c) whereas the Fig. 11.86 (d) shows a non-planar
graph.
v1
v2
v4 v3 v1 v5
v2 v4 v3
v5
v2
v1 v4
v3 v4 v1 v2 v3 v6

(a) (b) (c) (d)


Fig. 11.86
Graph Theory 573

11.17.1 Map
A particular planar representation of a finite planar graph is called Map.

11.17.2 Regions
A plane representation of a planar graph G divides the plane into R5
regions. A Region is characterized by the set of edges forming its v3
R4
boundary. A region of a planar graph is an area of the plane that is
bounded by edges and is not further divided into subareas. v2 v6
v1 R2 v5
Illustration R1 R3

A map with six vertices and nine edges divides the plane into five v4
regions in which four regions R1 , R 2, R 3 and R 4 are bounded Fig. 11.87
whereas the outer region R 5 of the graph is unbounded.

Example 46: Find whether the complete graph k6 and complete bipartite graph k3, 3 are isomorphic or not.

[U.P.T.U. (B.E.) 2002]

n(n – 1)
Solution: k6 and k3, 3 both contain 6 vertices. But k6 is complete graph and has edges
2
6×5
i.e. = 15 edges
2

But k3, 3 is complete bipartite graph and therefore number of edges = 3×3=9 edges.

Hence k6 is not isomorphic to k3, 3 .

Example 47: Determine which graph given below are bipartite graph.
[Pune (B.E.) 2004, 2008; Rohtak (M.C.A) 2004, 2007;
Kurukshetra (B.E.) 2005; P.T.U. (B.E.) 2007; M.K.U. (B.E.) 2007]

c a
e d a b
d
f
c
a e b d c b c
f
f a b
e f e d
G1 G2 G3 G4
(i) (ii) (iii) (iv)
Fig. 11.88
574 Discrete Mathematical Structures

Solution
(i) This is bipartite graph because we can divide its vertex set v = {a, b, c, d, e, f } into sets v1 = {a, b},
v2 = {c, d, e, f } such that V1UV2 = V and V1 ∧ V2 = φ.
(ii) It is not bipartite graph because we can not partition its vertex set into two parts.
(iii) This is bipartite graph because we can divide its vertex set
V = {a, b, c, d, e, f } in two sets V1 = {a, d, e} and
V2 = {b, c, f } and V1 ∪ V2 = V and V1 ∩ V 2 = φ
(iv) It is not bipartite graph because we can not partition its vertex set into two parts.

Example 48: How many edges has each of the following graph

(i) K10 (ii) K 5, 7 [U.P.T.U. (B.Tech.) 2003]

Solution
n(n – 1) 10 × 9
(i) Since K10 is complete graph of 10 vertices, then the number of edges = = = 45
2 2
(ii) Since K 5,7 is complete bipartite graph. Then the number of edges = 5 × 7 = 35

Illustration: Which of the following graph of Fig. 11.89 represent bipartite graph and planar graph? If
planar graph redraw the same.

H1 H2 H2

G E W

(i) (ii)
Fig. 11.89

Both graphs are complete bipartite graph K 3, 3 and K 4, 4 respectively. These graph can not be draw on
plane.

Example 49: How many edges must a planar graph have if it has 7 regions and 5 nodes. Draw one such
graph.

Solution: We have regions (r) = 7, nodes = v = 5 then by Euler formula v − e + r = 2


1 2 7
⇒ 5 – e + 7 = 2 or e = 10 6
4 3
The graph must have to edges one such planar graph is shown in Fig. 11.90. 5
Fig. 11.90
Graph Theory 575

Example 50: A connected planar graph has nine vertices having degrees 2, 2, 2, 3, 3, 3, 4, 4 and 5. How
many edges are there? [Osmania (B.E.) 2009]

n
Solution: We have by handshaking lemma ∑ d(vi ) = 2e
i=1

⇒ 2 + 2 + 2 + 3 + 3 + 3 + 4 + 4 + 5 = 2e ⇒ e = 14

By Euler's formula v – e + r = 2 ⇒ r = 7. Thus, there are 14 edges and 7 faces.

11.18 Euler’s Formula


A planar graph may have several different plane representation. We shall prove in the following theorem
that the number of regions in each representation is same.

Theorem 6: (Euler’s Formula). A connected planar graph with n vertices and e edges has e − n + 2
regions. [U.P.T.U. (B. Tech.) 2009]

Proof: We prove this theorem by induction on the number of edges e of G, where G is connected planar
graph.
Suppose e = 1 then n may be equal to 1 or 2.
In case e = 1, n = 2, then the number of regions r = 1 − 2 + 2 = 1. R2
[See Fig. 11.91(a)]. R1
Clearly graph in Fig. 11.91 (a) has one region (only infinite region).
In case e = 1, n = 1, then number of regions r = 1 − 1 + 2 = 2 . From e=1, n=2 e=1, n=1
Fig. 11.91 (b), it is clear that the graph has two regions, namely R1 (a) (b)
and R 2. Fig. 11.91
Hence the result is true for e = 1.

Now suppose that the result holds for all graph having at most e − 1 edges. Let G be a connected graph with e
edges and r regions.

In case G is a tree then e = n − 1 and number of regions is 1 (only infinite region). In this case by the formula,
we have
r = e − n + 2 = (n − 1) − n + 2 = 1

Thus, the theorem holds when G is a tree. Now consider the case when G is not a tree. In this case, G has
some circuits. Select an edge, say ‘c’, in some circuit. Deleting this edge ‘c’ from the plane representation of
G, we see that the regions are merged into a new region.

Therefore G − {c} is a connected graph with n vertices, e − 1 edges and r − 1 regions (where the number of
regions in G is r). Thus, by induction hypothesis, we have
r − 1 = (e − 1) − n + 2 or r=e−n+ 2

This proves the theorem.


576 Discrete Mathematical Structures

11.19 Eulerian Paths and Circuits


11.19.1 Eulerian Path
A path in a graph is said to be an Eulerian Path if it traverses each edge in the graph once and only once.

11.19.2 Eulerian Circuit


A circuit in a graph is said to be an Eulerian Circuit if it traverses each edge in the graph once and only
once.
A closed walk in a graph which includes all the edges of the graph, is called an Euler Line (or Eulerian
Circuit) and the graph is called an Euler Graph.

11.19.3 Eulerian Graph [U.P.T.U. (B.Tech) 2006, 2007, 2008]

A graph which contains an Eulerian circuit is called an Eulerian Graph.

Illustration: In Fig. 11.97 four Eulerian graphs are shown:

Fig. 11.92 Fig. 11.93 Fig. 11.94 Fig. 11.95

Illustration
An Euler graph is shown in Fig. 11.96. The closed walk has been indicated by arrows.
v1

v9 v10
v2 v3

v8 v4
v7
v11 v5 v12

v6
Fig. 11.96: Euler graph

The closed walk v1 → v2 → v3 → v4 → v5 → v6 → v7 → v8 → v9 → v10


→ v8 → v11 → v7 → v5 → v12 → v4 → v2 → v10 → v1 is an Eulerian circuit (Euler line) in this graph. Hence
it is an Euler graph.
Graph Theory 577

Theorem 7: The nec es sary and suffi cient condition for a con nected graph G to be an Euler graph is that ‘all
vertices of G are of even degree’.
Proof: The condition is necessary. Let G be an Euler graph then to prove that all vertices of G are even.
Since G is an Euler graph and therefore, G has an Euler line i.e., G contains a closed walk which in cludes all
the edges of G. In tracing this closed walk we observe that every time the walk meets a vertex v (say) it goes
through two New Edges incident on v with one edge we entered v and with the other edge we exited v. This
happens for all intermediate vertices of the walk and also for the terminal vertex, since we exited and
entered the same vertex at the start and end of the closed walk respectively. Hence each vertex of G is of
even degree.
The condition is sufficient. Suppose all vertices of G are of even degree, then to prove that G is an Euler
graph. It is suf ficient to prove that there exists a closed walk which con sists of all edges of G. We construct a
walk starting from an arbitrary vertex v, (say) and go ing through the edges of G in such a way that each
edge is traced once and only once. Since each vertex is of even degree, we can exist from each vertex we
enter. In the start, we exited from vertex v, therefore, eventually we reach vertex v when walk comes to an
end. Let this closed walk (we have traced) be denoted by g. If g includes all edges of G, then G is an Euler
graph.
In case, g does not include all edges of G. Remove from G all edges of g and let g′ be a subgraph of G formed
remaining edges. Also each vertex of g′ is of even degree. Since G is connected, therefore, g′ must touch g at
least at one vertex u (say). Again construct a new walk in g′ which starts from the vertex u, this new walk
will terminate at u, since all vertices of g′ are even. Now we combine the walk in g′ with g and obtain a new
walk which begin and ends at the vertex v and consists of more edges than g. If the walk thus obtained
includes all the edges of G, then G is an Euler graph, otherwise above process is repeated until there are
edges in G which are not included in the walk. Ultimately we obtain a closed walk that includes all edges of
G and hence G is an Euler graph.

Theorem 8: A connected graph G is an Euler graph if and only if G is the union of some edges-disjoint circuits.
Proof: Suppose that the graph G is a union of some edge-disjoint circuits. Since the degree of each vertex
in a circuit is two, the degree of every vertex in G is even. By Theorem 3, G is an Euler graph.
Conversely, let G be an Euler graph. Then by Theorem 3, every vertex in G has even degree. Let v be any
vertex of G. Then d (v ) ≥ 2. Thus, there are at least two edges incident at v. Let v1 be any vertex adjacent to v.
Since degree of the vertex v1 is also even, there is a vertex v2 which is adjacent to v1 and is different from v.
Continuing in this way, we finally arrive at a vertex which has previously been traversed. If vi is the first
such vertex (that is, a vertex which has been previously traversed), then the part of the walk which begins
and ends at vi is a circuit C. We remove C from G and consider the graph G1 = G − C . Since every vertex in C is
of degree 2, it follows that every vertex in G1 must have even degree (the graph G1 may be disconnected).
From G1 , remove another circuit in exactly the same way as we removed C from G. Continue this process
until no edges are left. Thus, G is the union of circuits C , C1 , K , no two of which have common edges. This
completes the proof.
Corollary: Every vertex of a connected Euler graph is contained in some circuit.
578 Discrete Mathematical Structures

11.19.4 Unicursal Graph


v5 e6 v4
In defining an Euler graph, some authors drop the requirement that
e3
the Euler line be closed. For Example, the walk v1 , e7 , v5, e6 , v4 ,
e7 e4 v3
v3 , e2, v2 in the graph in Fig. 11.97 which includes all the edges of e5
the graph and does not retrace any edge, is not closed. We shall call e2
such an open walk that traces (or covers) all edges of a graph v1 e1 v2
without retracing any edge a Unicursal Line or an Open Euler Fig. 11.97
Line. A graph that has a unicursal line will be called Unicursal Graph.

Illustration : De fine an Eu ler graph and show that a given connected graph G is an Euler graph if G has n
ver ti ces of odd de grees. It may be noted that by add ing an edge be tween the ini tial and fi nal verti ces of an open
Eu ler line (i.e., unicursal line) we shall get an Euler line. Thus, a connected graph is unicursal if it has ex actly
two vertices of odd degree.

Theorem 9: Let G = (V, E ) be a connected graph with 2k odd vertices (k ≥ 1). Then there exist k edge-disjoint
subgraphs such that they together contain all edges of G and that each is a unicursal graph.
Proof: Let G be a connected graph with 2k odd vertices. Let the odd vertices of G be named
v1 , v2, v3 , K , vk ; w1 , w2, K , wk . And k edges in the graph G between the vertex pairs
(v1 , w1 ), (v2, w2 ), K , (vk , wk ) to form a new graph G ∗ . Observe that in G ∗ , every vertex is of even degree and
hence G ∗ is Euler graph. Let ρ be any Euler line in G ∗ . Now if we remove from ρ the k edges we added in G to
get G ∗ then ρ will be split into k walks, each of which is a unicursal line and each edge of G is present in
exactly one of these unicursal lines. This completes the proof.

Theorem 10: (Kuratowski’s Theorem). A graph is planar if and only if it does not contain any subgraph
that is isomorphic to within vertices of degree 2 to either the graph K 3, 3 or K 5.

Example 51: Which of the following graphs are Eulerian?


(i) the complete graph K 5 (ii) the complete bipartite graph K 2, 3

(iii) the graph of the octahedron (iv) the Petersen graph.


Solution
(i) We know that the degree of each vertex in the complete graph K 5 is 5 − 1 = 4 which is even. Hence
degree of each vertex in K 5 is even. Since K 5 is also a connected graph, therefore by Theorem 3, K 5 is
an Euler graph.
(ii) The graph K 2, 3 is given below:

v3
v1
v4
v2
v5
Graph K2,3

Fig. 11.98

It is clear that each vertex in the graph K 2, 3 is not of even degree. Hence the graph K 2, 3 is not Euler.
Graph Theory 579

(iii) We know that each vertex in the graph of the octahedron is of degree 4 which is even. Hence the
graph of the octahedron is an Euler graph.
(iv) It is clear that the Petersen graph is not an Euler graph because each vertex of this graph is of degree
3 which is not even.

Example 52: For what values of n is the graph K n Eulerian ?


Solution: We know that K n, the complete graph of n vertices is a connected graph in which degree of each
vertex is n − 1. Since a graph is Eulerian (i.e., an Euler graph) if and only if it is connected and degree of
each vertex is even, we conclude that K n is an Euler graph if and only if n is odd.

Example 53: A connected planar graph has six vertices each of degree 4. Determine the number of regions
into which this planar graph can be split.
Solution: The given planar graph has 6 vertices each of degree 4. Therefore, the sum of degrees of
vertices = 4v = 4 × 6 = 24.
Since the sum of degrees of vertices is equal to twice the number of edges, we must have
2e = 24 or e = 12
Now from Euler’s formula, the number of regions.
r = e − v + 2 = 12 − 6 + 2 = 8

Example 54: Show that K 5 is non-planar.


or
Prove that the complete graph with five vertices is non-planar. Give example also.
Solution: The graph K 5 has 5 vertices and 10 edges. Thus 3v − 6 = 3 × 5 − 6 = 9, so the condition e ≤ 3v − 6
is not satisfied. Therefore K 5 is not a planar graph.

Example 55: Show that K 3, 3 is non-planar.


Solution: The graph K 3, 3 has no circuit of length 3. It has 6 vertices and 9 edges. Thus, 2v − 4 = 2 × 6 − 4 = 5,
so the condition e ≤ 2v − 4 is not satisfied. Therefore K 3, 3 is not a planar graph.

Graph K3,3
Fig. 11.99

11.19.5 Properties of Eulerian Graph


1. Eulerian graph is always connected.
2. Eulerian graph does not contain any isolated or pendant vertices.
3. All the vertices of an Eulerian graph are of even degree.
4. Eulerian graph can be decomposed into circuits.
It may be observe that the existence of Eulerian paths or Eulerian circuits in a graph is related to the
degrees of the vertices. We now establish a necessary and sufficient condition for the existence of Eulerian
paths or circuits in an arbitrary graph.
580 Discrete Mathematical Structures

11.20 Hamiltonian Path [U.P.T.U. (B.Tech.) 2008]

A path which contains every vertex of a graph G exactly once is called Hamiltonian Path.

11.20.1 Hamiltonian Circuit [U.P.T.U. (B. Tech.) 2007]

A circuit that passes through each of the vertices in a graph G exactly once except the starting vertex (which
is also end vertex) is called Hamiltonian circuit.

11.20.2 Hamiltonian Graph [U.P.T.U. (B.Tech.) 2008; R.G.P.V. (B.E.) Bhopal]

A graph G is said to be Hamiltonian graph if it contains a Hamiltonian circuit.

It may be observe that every graph that has a Hamiltonian circuit also has a Hamiltonian path (by
removing any one edge from the Hamiltonian circuit). However, it is interesting to note that there are
graphs with Hamiltonian paths that have no Hamiltonian circuits.

Example 56: Which of the following graphs have a Hamiltonian circuit? [R.G.P.V. (B.E.) Bhopal 2008]

v1
v1 v2

v2 v5
v3

v3 v4 v4 v5
(i) (ii)
Fig. 11.100

Solution
(i) This graph has a Hamiltonian circuit v1 , v2, v3 , v4 , v5, v1 .
(ii) No Hamiltonian circuit is possible in this graph as there are four edges incident at v3 .

Example 57: Show that the following graphs have Hamiltonian circuits.
v6 v5

v1 v4

v7 v8

v2 v3

(i) (ii)
Fig. 11.101
Graph Theory 581

Solution
(i) This graph has a Hamiltonian circuit v1 , v2, v3 , v8 , v7 , v6 , v5, v4 , v1 as shown by dark line in
Fig.11.102 as follows:
v6 v5
v6
v5
v1
v4
v1 v4

v8 v8
v7 v7

v2 v3 v2 v3
Fig. 11.102: Graph and its Hamiltonian Circuit

(ii) This graph has a Hamiltonian circuit. One such circuit is shown by dark line in Fig. 11.103 as follows.

Fig. 11.103: Graph and its Hamiltonian Circuit

Example 58: Draw a graph with six vertices containing an Eulerian circuit but not Hamiltonian circuit.
[R.G.P.V. (B.E.) Bhopal 2001; Pune (B.E.) 2008]

Solution: The re quired graph is as shown in Fig. 11.104

Fig. 11.104
Theorem 11: Let G be a linear graph of n vertices. If the sum of the degrees of each pair of vertices in G is n − 1
or larger, then to prove that there exists a Hamiltonian path in G. [R.G.P.V. Nagpur (B.E.) 2009]

Proof: Let G be a linear graph of n vertices. Firstly, we shall prove that the graph G is a connected graph.
We shall prove it by contradiction. Let the graph G has two (or more) disconnected components. Suppose
one component has m1 vertices and let u1 be one of these vertices. Again suppose that another component
has m2 vertices and let u2 be one of these vertices. The degrees of u1 and u2 are at the most m1 − 1 and m2 − 1
respectively. Thus the sum of degrees of u1 and u2 is at the most m1 + m2 − 2, which is less than n − 1. This
give a contradiction and hence G is a connected graph. Now we shall show that there exists a Hamiltonian
path in G. Suppose there is a path of m − 1 edges, where m < n, in G which meets the sequence of vertices
u1 , u2, K , um . Now following cases arise.

Case (i) Either u1 or um may be adjacent to a vertex which is not in the path, then the path is extended to
cover this vertex and a path of m edges is obtained.

Case (ii) If case (i) does not happen then both the vertices u1 and um will be adjacent only to the vertices that
are in the path.
582 Discrete Mathematical Structures

Now we shall show that there exists a circuit containing exactly the vertices u1 , u2, u3 , K , um . In case the
vertex u1 is adjacent to the vertex um then the circuit u1 , u2, u3 , K , um , u1 exists.

Therefore, let us suppose that u1 is not adjacent to um , but u1 is adjacent only to vertices uP1 , uP2 , K , PPq ,
where 2 ≤ Pr ≤ m − 1, r = 1, 2, K , q. Now um may be adjacent to one of the vertices uP1 − 1 , uP2 − 1 , K , uPq − 1 ,
assume that um is adjacent to ur −1 , then the circuit (u1 , u2, K , ur − 1 , um , um −1 , K , ur , u1 ) will contain
exactly u1 , u2, K , um .

um–1
ur

Fig. 11.105

In case um is not adjacent to any of the vertices uP1 − 1 , uP2 − 1 , K , uPq − 1 , then um will be adjacent to at the
most m − q − 1 vertices. As a result the sum of the degrees of vertices u1 and um will be adjacent at the most
n − 2 vertices which is less than n − 1 consequently we get a contradiction.

Thus, we have a circuit containing all the vertices u1 , u2, u3 , K , um . Now let us choose a vertex ui, say,
which is not in the circuit. Since the graph G is connected, therefore, there is a vertex u j that is not in the
circuit with an edge joining ui and u j for some u j in {u1 , u2, K , um }. Removing the edge joining

uj um–1
u1 um
u2 uj–1 ur–1 ur

u1
Fig. 11.106

u j −1 and u j , we obtain a Hamiltonian path (ui, u j , u j +1 , K , ur −1 , ...... u1 , u2, K , u j − 1 ) containing m


edges.

u1 uj um–1
um
u2 uj–1 uj+1 ur–1 ur

u1
Fig. 11.107

The above process is repeated step by step until we have a Hamiltonian path with n − 1 edges.
Graph Theory 583

Theorem 12: In a complete graph with n vertices there are (n − 1)/ 2 edge-disjoint Hamiltonian circuits, if n
is odd number ≥ 3.
Proof: Let G be a complete graph of n vertices. Then G has 5
n–2
3
n (n − 1)/ 2 edges. Since a Hamiltonian circuit in G contains n
edges, therefore the number of edge-disjoint Hamiltonian
circuits in G cannot exceed (n − 1)/ 2. We shall show that n 2
1
there are (n − 1)/ 2 edge-disjoint Hamiltonian circuits when n
n–1 n–3
is odd. The subgraph of a complete graph of n vertices as 4
shown in Fig. 11.108 is a Hamiltonian circuit. Fig. 11.108
If we keep the vertices fixed on a circle and rotate the
polygonal pattern anti-clockwise by
360 (360) (360) (n − 3) (360)
, 2. , 3. , K, ..., .
(n − 1) (n − 1) (n − 1) 2 (n − 1)

degrees, we find that each rotation results in producing a Hamiltonian circuit that has no edge in common
with any of the previous ones. Thus, we have obtained (n − 3)/2 new Hamiltonian circuits, all edge-disjoint
n−3 n −1
from the one in Fig. 11.108 and also edge-disjoint among themselves. Hence, we have +1=
2 2
edge disjoint Hamiltonian circuits.

Example 59: Find Euler circuit for the graph.

b d f

a c g
e
h i j

Fig. 11.109

Solution: Let us name the edges.

e2
b e6 f
e1 e11 e3
e7 c
e10 e13 g
a e0 e8 e12
h e9 e4
j
e5
Fig. 11.110

Euler cir cuit for the graph is


e9 e0 e1 e2 e3 e4 e5 e8 e10 e7 e6 e11 e13 e12 e9
584 Discrete Mathematical Structures

Example 60: Show that the graph shown below does not have a Hamiltonian circuit.

v1

v7
v2 v6
v8 v12
v13
v15
v16
v11
v9 v14
v3 v5
v10

v4
Fig. 11.111
A
Solution: We label the vertex v1 by A and all the vertices ad jacent to it by B. Then
we label all the vertices adjacent to B by A. We con tinue this pro cess until all the B
B B
vertices are labeled. If there is a Hamiltonian path or cir cuit then it must pass A A
A A
through the vertices A and B alternately. But we see that there are nine A vertices B
and seven B vertices as shown be low: B
B A
Therefore, the existence of a Hamiltonian circuit and path is not possible. A A
A

B
Fig. 11.112

Example 61: If G is a connected planar graph, then prove that it has a vertex with degree 5 or less.
Solution: Let each vertex of G have degree ≥ 6.

∑ log (V ) = 2| E |
V ∈V

2 1 2
⇒ 6| V | ≤ 2| E | ⇒ | V| ≤ | E| ∴ | V| ≤ | E | but | R| ≤ | E|
6 3 3
1 2
∴ | V| + | R | ≤ | E | + | E | ⇒ | V | + | R |, = | E |
3 3
By Euler’s formula | V | + | R | = | E | + 2 ∴ | E | + 2 ≤| E | ⇒ 2 ≤ 0, a contradiction
Each vertex x of G can not have a vertex degree ≥ 6 ⇒ each vertex of G of degree ≤ 5.
Graph Theory 585

Exercise
1. Draw a graph that has a Hamiltonian path but not have a Hamiltonian circuit.

2. Find a minimum Hamiltonian circuit for the following graph.

5 4
5 B 2 C 8
3
2 3 5

D 2 E

Fig. 11.113

3. Define Hamiltonian path and circuit. Give properties of Hamiltonian circuit.


4. Show that the following graphs are Eulerian graphs.

e5 v4
e5 e4
e6 e3
v2
e1 e2
v1 v3

Fig. 11.114 Fig. 11.115

5. (i) Show that the complete graph K 5 is an Eulerian graph.


(ii) Show that the complete bipartite graph K 4, 4 is an Eulerian graph.

6. Differentiate between Graph and digraph.

7. Prove that the complete graph of five vertices is non-planar. Give example also.

8. Define the bipartite graph and planar graph with examples.

9. State and prove Konigsberg problem.

or
Write a short note on Konigsberg problem.

10. Define the following terms with example.

(i) Planar graph (ii) Euler graph


586 Discrete Mathematical Structures

1. K n, n−1 for any n ≥ 1


2.
A
5
5
C
B 2
5

D 2 E
Fig. 11.116

11.21 Graph Colouring


11.21.1 Colouring [U.P.T.U. (B.Tech.) 2007]

A colouring of a graph G is an assignment of colours to its vertices so that no two adjacent vertices have the
same colour.

11.21.2 K-Vetex Colouring


A K-vertex colouring of a graph G is an assignment of K- colours to the vertices of G such that no two
adjacent vertices receive the same colour.
Colour Class: Every graph with n vertices is n-colourable. The set of all points with any one colour is
independent and is called a Colour Class.

11.21.3 Proper Colouring


If a graph is n-colourable, then the vertex set V(G ) can be partitioned into n colour classes. The colouring a
graph is called Proper Colouring. The graph shown in Fig. 11.117 is a properly coloured graph.
a2
a2

a1 a3
a3 a1

a3 a2
Fig. 11.117
Generally colours are represented by positive integers. Thus n-colouring of a graph G is a function f: V(G )
→ (1, 2, K N ). Such that f (V1 ) ≠ f (V2 ) whenever {V1 , V2}, E (G ). The vertex colouring of two different graph
are shown in the graph of Fig. 11.118 and 11.119.
Graph Theory 587

Fig. 11.118 Fig. 11.119

11.22 Chromatic Number [U.P.T.U (B. Tech.) 2009]

The chromatic number of a graph G, is the minimum number of colours required to colour the vertices of
G r . Such that no two adjacent vertices receive the same colour. The chromatic number of a graph G is
denoted by X (G ). We find the following properties
(i) The Chromatic number of an isolated vertex is one.
(ii) The Chromatic number of a graph having atleast one edge is atleast two.
(iii) The chromatic number of a path pn, (n ≥ 2) is two.
(iv) The chromatic number of a wheel graph is 3 if it has odd number of vertices and u if it has even
number of vertices.
(v) If G is graph consisting of simply are circuit, with n ≥, 3, is 2 Chromatic if n is even and 3 chromatic if
n is odd.
Another definition of the chromatic number.
The Chromatic number of a graph G is the least integer K, such that G has K-colouring.

Theorem 13: There exists a K-colouring of a graph G if and only V(G ) can be partitioned into K subsets
V1 , V2...Vk such that no two vertices in Vr (r = 1, 2. . . . K ) are adjacent.

Proof: Let f : V(G ) → (1, 2, . . . . K ) be a colouring of G and let Vr = { ∈ f (V ) = r, 1 ≤ r ≤ K }


Therefore Vr denotes the set of vertices coloured r. Then V = V1 ∪ V2 ∪. . . . ∪ VK forms a portion of
V, such that no two vertices in Vr = (1 ≤ r ≤ k ) are adjacent.

Conversely, let V = V1 ∪ V2 ∪ . . . . . ∪ Vk be a portion of V(G ) such that no two vertices in Vr = (1 ≤ r ≤ k ) are


adjacent. The function
f : V(G ) → (1, 2. . . . K ) defined by f (V ) = r if V ∈ Vr is a K-colouring of G.

Theorem 14: If H is a subgraph of G, then X (H ) ≤ X (G ).

Proof: Let X (G ) = K and f denote a K-colouring of G. Then F restricted to V(H) is a K-colouring of H.

Hence X (H ) ≤ K ⇒ X (H ) ≤ X (G )
588 Discrete Mathematical Structures

Theorem 15: A graph G is 2-chromatic if and only if G is bipartite.


Proof: Let G be 2-Chromatic. Then the vertex set V(G ) can be partitioned into two colour classes which are
in pendant sets. Hence the two colour classes from a partition of G. Therefore G is bipartite.
Conversely: Let G be a bipartite graph. The vertex set V(G ); can be partitioned into two independent set V1
and V2. We can use colour C1 to paint the vertices of V1 and use colour C 2 to paint the vertices of V2. Hence V
is 2-Chromatic.

Theorem 16: Every tree with two or more vertices is 2-Chromatic.


Proof: Let T be tree and V be any vertex in T. Assign colour 1 to the vertex V. Assign all the P vertices
adjacent to V with colour 2 and assign colour 1 to all vertices adjacent to the vertices of colour 2.
Continue this process till every vertex in T is coloured. In last we find that, all the vertices at odd distances
from V have colour 2 and the vertices.
2 1
2
2 2
1 2
2 1 2
2
1 1
2
1 1
V 2
2
Fig. 11.120

Which are at even distance from v have colour 1. Since T’s connected and has atleast two vertices it
contains atleast are edge T is not 1-colourable. Hence T can be property coloured with 2 colours. Hence
chromatic number T is 2.

11.23 Edge Colouring [R.G.P.V. (B.E.) Bhopal 2004]

Assignment of colours to the edge of a graph G. So that no two adjacent edge receive the same colour is
called on Edge Colouring of G.

K-edge colouring of a graph G is an assignment of K-colours to the edges of G such that no two edges of G receive
the same colour.

11.23.1 K-edge Colourable [Pune (B.E.) 2004, 2008]

A graph G is said to be K-edge colourable; if there exist K-edge colouring of G.


Edge-Chromatic Number: The minimum number K, such that a graph G has K-edge colouring is said to
be the edge-Chromatic number of G. The edge chromatic number of a graph G is denoted by X ′ (G ) . Thus
X ′ (G ) denoted the minimum number of colours required to colour the edge of the graph G. Such that no
two adjacent edges of G receive the same colour.
Graph Theory 589

Theorem 17: A graph G containing atleast one edge is 2-chromatic if and if it contains no odd cycles.
[Nagpur (B.E.) 2007, 2009]

Proof: Let G be a connected graph with cycles of only even lengths. Consider a spanning tree T of G. We
know that T can be properly coloured with two colours. Now add edges (of G which are not in T) one by
one. Since G has no cycles of odd length the end vertices of every edge being replaced are differently
coloured in T. Thus G is properly coloured with two colours i.e.G is 2-chromatic.
Conversely, Let G be a 2-coloured graph with atleast one edge. If G has a cycle of odd length, we would
need atleast three colours just for that cycle. G is 2-chromatic, hence G contain no odd cycles.

11.24 Five-Colour Theorem [M.K.U. (B.E.) 2005]

We shall now show that every planar graph can be properly coloured with five colours.

Theorem 18: Every Planar graph is 5-colourable.

Proof: We shall prove this theorem by induction on the number n of vertices. Since any planar graph with
1, 2, 3, 4 or 5 vertices can be properly coloured with five colours, we consider that vertices of every planar
graph with n − 1 vertices can be properly coloured with five colours, and then prove that any planar graph G
with n vertices requires five colours for proper colouring.

Let G be a planar graph with n vertices. Since G is planar, it must have atleast one vertex of degree five or
less. Let V denote this vertex.

Let G′ = G – V, then G′ has n − 1 vertices and G′ requires no more than 5 colours. Suppose that the vertices of
G′ have been properly coloured and now we add the vertex V and all the edges incident of V to G′. If the
degree of is 1, 2, 3 or 4, we can assign a colour to V so that the vertices of G are properly coloured. Now we
consider the case in which the degree of V is 5 and all the five colours are used for colouring the vertices of
G adjacent to V. Let V1 , V2, V3 , V4 and V5 denote the vertices of adjacent to V in G coloured with C1 , C 2, C 3 , C 4

and C 5 respectively.

Let H1 denote the subgraph of G generated by the vertices coloured C1 and C 3 . If V1 and V2 belong to the
different components of H1 interchange the colours C1 and C 3 in the component containing V1 and assign
ten colour C 3 to the vertices V1 and V3 . We find the proper colouring of G by assigning colour C1 to the vertex
V. If V1 and V3 are in the same component of H, then there exists a V1 – V3 path in G all of whose points are
coloured alternatively with the colours C1 and C 3 . Since G is planar a similar path between the vertices V2
and V4 coloured alternatively with colours C 2 and C 4 cannot exist. let H 2 denote the subgraph generates by
the vertices coloured C 3 and C 4 then V2 and V4 belong to different components of K. We can interchange the
colours C 2 and C 4 in the component containing V2. When the vertices V2 and V4 are assigned the colour C 4 ,
we can choose the colour C 2 to paint the vertex V and obtain a proper colouring of G.
590 Discrete Mathematical Structures

11.25 Four Colour Conjecture


The four colour problem states that every plane map however complex, can be coloured with four colours
in such a way that two adjacent regions get different colours, fascinated mathematicians. This problem
solved by Appel and Hanken in 1976.

11.25.1 Four Colour Conjecture


Every planar graph is 4-colourable.
Illustration: The graph K 4 is a planar graph and K 4 is 4-colourable Fig. 11.121

4
3
2

Fig. 11.121

11.25.2 Independent Sets d b


c
e
A set of vertices in a graph G is said to be an independent set of vertices if no two
a
vertices in the set are adjacent.
Fig. 11.122
In the graph of Fig. 11.122 {a, c, d} and {b, e} are independent sets.
c

b
d e

a
Fig. 11.123

In the graph of Fig. 11.123 {a, c, e} is an independent set.


Remark: A single vertex in any graph constitutes an independent set and every subset of an independent
set is independent.

Maximally Independent Set


Let G be any graph. A subset V′ of the vertex set V(G ) is called a Maximally Independent V3 V4
Set of G if.
V2
(i) V′ is an independent set of G
(ii) If V′ is any other independent set of G, then V′ is not a proper subset of G.
V1
{V2, V3,V4 } and {V2} are maximally independent set of graph shown in Fig. 11.124. Fig. 11.124
Graph Theory 591

11.26 Chromatic Polynomials


The number of different colouring of a graph on n vertices that can be obtained using λ colours or fewer
colours can be expressed as a polynomials of G. The chromatic polynomial of G is denoted by Pn(λ ).
Let G be a graph on n vertices. If C r denotes the different ways of properly colouring of G. Using exactly r
distinct colours, then these r colours can be chosen out of λ colours in (λ r ) distinct ways.
There are C r (λ r ) distinct ways of properly colouring the graph G using exactly r colours out of λ colours
since r can be any positive integer from 1 to n the chromatic polynomial is

∑ ( λr ) C r
n

r =1

Where each C r has to evaluated individually for the given graph. If G is a graph with atleast one edge, then
G requires atleast two colours for proper colouring of G, therefore C1 = 0. If G has n vertices, then can be
properly coloured using in n ! ways, therefore C1 = 0. If G has n vertices, then can be properly coloured using
n colours in n ! ways. therefore C n = n ! .
If G is a complete graph (K n ) on vertices, we have C r = 0 for r = 1, 2, 3 . . . . n – 1 and C n = n !
Hence,

∑ ( rλ ) C r =
n
λ (λ – 1)(λ – 2). . . . . . (λ – n + 1)
Pn(λ ) = . n!
r =1
n!

= λ (λ – 1)(λ – 2). . . . . (λ – n + 1)
If G = K 4 (i.e. complete graph on 4 vertices)

We have C1 = C 2 = C 3 = 0 and C 4 = 4!
∴ The chromatic polynomial of G is
λ (λ – 1)(λ – 2)(λ – 3)
P4 (λ ) = ⋅ 4!
4!
= λ (λ – 1)(λ – 2)(λ – 3)
Theorem 19: Let u and v be two non-adjacent vertices of a graph G and G′ be a graph obtained by adding an
edge between u and v(i . e. G′ = G + uv ). Let G ′ ′ = G – uv. i.e. G′ ′ be the simple graph obtained from G by fusing
the vertices u and v together and replacing sets of parallel edges with single edges. Then
Pn(λ ) of G = Pn(λ ) of G′ + Pn–1 (λ ) of G′′
Proof: The λ colouring of G is of two types:
(i) λ colouring if G assigning different colours to the vertices of u and v.
(ii) λ colouring assignment the same colour to u and v.
∴ The number of ways of properly colouring G such that u and v have different colours.
= Number of ways of properly colouring G′ and the number of ways of properly colouring G
such that u and v have same colour.
= Number of ways of properly colouring G′′
Pn(λ ) of G = Pn(λ ) of G′ + Pn–1 (λ ) of G′′
592 Discrete Mathematical Structures

11.27 Uniquely Colourable Graph


A graph that has only one chromatic partition of its vertices is called a uniquely colourable graph. The
graph in the following example is uniquely colourable.

Example 62: Show that the graph in Fig. 11.125 is uniquely colourable.
V5 V4

V3
V1 V2
Fig. 11.125

Solution: This graph has 8 edges. We first find all maximal independent sets of this graph.

φ = V1 V2 + V1 V3 + V1 V5 + V2V3 + V2V4 + V3 V4 + V3 V5 + V4 V5

⇒ φ′ = (V1′ + V2′ )(V1′ + V3′ )(V1′ + V5′ )(V2′ + V3′ )(V2′ + V4′ )(V3′ + V4′ )(V3′ + V5′ )(V4′ + V5′ )

= (V1′ + V2′ V3′ V5′ )(V2′ + V3′ V4′ )(V3′ + V4′ V5′ )(V4′ + V5′ )

= (V1′ V2′ + V1′ V3′ V4′ + V2′ V3′ V5′ + V2′ V3′ V4′ V5′ )(V3′ V4′ + V3′ V5′ + V4′ V5′ )

= V1′ V2′ V3′ V4′ + V1′ V2′ V3′ V5′ + V1′ V2′ V4′ V5′ + V1′ V3′ V4′ + V1′ V3′ V4′ V5′

+ V1′ V3′ V4′ V5′ + V2′ V3′ V4′ V5′ + V2′ V3′ V5′ + V2′ V3′ V4′ V5′

= V1′ V3′ V4′ + V2′ V3′ V5′ + V1′ V2′ V4′ V5′ [Using a + ab = a]

Thus, three maximal independent sets are

{V2, V5}, {V1 , V4 } and {V3 }


Thus {{V2, V5}, {V1 , V4 } {V3 }} is the only chromatic partition since there is only one chromatic partition of G,
it is uniquely colourable. Moreover this graph is 3-chromatic.

Example 63: Find the chromatic polynomial of the graph given below.
c

d b

a
Fig. 11.126
Graph Theory 593

Solution: The procedure for obtaining the chromatic polynomial of a graph is illustrated below:
c

d b

c c
a
G
d b b

a a
λ(λ–1) (λ–2) (λ–3) λ(λ–1) (λ–2)
G′ G″
Fig. 11.127

Hence the chromatic polynomial of the given graph is


P4 (λ ) = λ (λ – 1)(λ – 2)(λ – 3) + λ (λ – 1)(λ – 2) = λ (λ – 1)(λ – 2)2

Example 64: Show that the regions of a planar graph can be 2-coloured if each vertex is of even degree.
[Rohtak (B.E.) 2008]

Solution: Let G be a graph in which each vertex is of even degree. Therefore G a


is an Euler graph and hence all cut sets of G have even number of edges. Thus all
circuit in dual G * of G are of even length and hence vertices of G * can be
2-coloured. Thus, the regions of G can be two-coloured.

Example 65: Find the chromatic polynomial of the complete bipartite graph K 2, s .
[Delhi (B.E.) 2005]

Solution: If vertices a and b have the same colour then total number of way of b
K2,s
proper colouring K 2, 5 is K (K – 1)5. If a and b have different colour then there are
Fig. 11.128
K (K – 1)(K – 2)5 different ways of colouring.

Thus Pn(λ ) = K (K – 1)5 + K (K – 1)(K – 2)5

Example 66: Find all maximal independent sets of the graph in Fig. 11.129
c
f

a
b e
g
d
Fig. 11.129
594 Discrete Mathematical Structures

Solution: This graph has 8 edges. We make the function


f = ab + bc + bd + ce + de + ef + eg + gf

by expressing each edge ( x, y ) as product xy.

By De-Morgan's rule, we have

φ′ = (a ′ + b′ )(b′+ c′ )(b′+ d′ )(c′+ e′ )(d′+ e′ )(e′+ f ′ )(e′+ g′ )(g′+ f ′ )

φ′ = (b′+ a′ c′ d′ )(e′+ c′ d′ f ′ g′ )(g′+ f ′ ) using (a + b)(a + c) = a + b c

φ′ = (b′ e′+ b′ c′ d′ f ′ g′+ a′ c′ d′ e′+ a′ c′ d′ f ′ g′ )(g′+ f ′ ) using aa = a

φ = b′ e′ g + b′ e′ f ′ + b′ c′ d′ f ′ g′+ a′ c′ d′ e′ g′+ a′ c′ d′ e′ f ′ + a′ c′ d′ f ′ g′ using a + a = a and aa = a

Now if we exclude from the vertex set of G the vertices appearing in any of the six terms, we get a maximal
independent set. The six maximal independent sets are
{a, c, d, f }, {a, c, d, g} {a, e}, {b, f }{b, g} {b, e}

Example 67: Show that the chromatic polynomial of a graph G is


λ (λ – 1)(λ – 2). . . (λ – n + 1)

if and only if G is a complete graph on n vertices.

Solution: With λ colours, the first vertex of a G can be coloured in λ ways. A second vertex can be
coloured in (λ –1) ways, the third vertex can be coloured in λ –3 ways if and only if the third vertex is
adjacent to first two vertices and the nth vertex can be coloured in λ – n + 1 ways if and only if every vertex is
adjacent to every other, that is if and only if G is complete.

Example 68: Show that a simple graph with 7 vertices each of degree 4 is non-planar.
[R.G.P.V. (B.E.) Raipur 2007]

Solution: Let G be a simple graph with 7 vertices each of degree 4. Then sum of degree of all vertices in G
is equal to 7×4=28. Thus, number of edges e in G is given by
2e = 28 ⇒ e = 14

If the graph is planar then by Euler's formula


f = e – n + 2 = 14 – 7 + 2 = 9

Suppose that there are x regions of degree 3 and (9 – x ) regions of degree 4. Then

3x + 4 (9 – x ) = 28 ⇒ x=8

Hence there would be 8 regions of degree 3 and 1 region of degree 4 (observe that G cannot have any
region of degree ≥ 5). Any region of degree 3 requires 3 colours to colour its vertices. Hence G is not
2-colourable. But by Example-69 (on the next page) if G is a planar graph with each vertex of even degree
then it is 2-colourable. Contradiction proves that G is not planar.

Note: By degree of a region we mean number of edges forming the boundary of the region.
Graph Theory 595

Example 69: Find the chromatic polynomial of the graph shown in Fig. 11.130

V2
V1

V3
V5

V4
Fig. 11.130

Solution: G has a triangle therefore G requires minimum 3 colours for proper colouring.

∴ C1 = 0, C2 = 0
When we have three colours the vertices of the triangle formed by 3 points for example say V1 , V2, V3 can be
properly coloured in 3 ! ways. The vertex V4 can be assigned the colour of V2 and V5 can be assigned the of the
vertex V3 .

Thus C3 = 3 ! = 6
When we have 4 colours. We can take any four vertices say V1 , V2, V3 and V4 of G and properly be coloured
with the 4 colours in 4 ! ways. The fifth vertex can be assigned the colour the vertex V2 or of V3 . Thus
C 4 = 2. 4 ! = 48 and we have C 5 = 5 !
Hence, the chromatic polynomial of G is
(λ –1)(λ – 2) λ (λ –1)(λ – 2)(λ – 3) λ (λ –1)(λ – 2)(λ – 3)(λ – 4)
P5(λ ) = 3 ! + 2. 4 ! + 5!
3! 4! 5!

= λ (λ – 1)(λ – 2) + 2λ (λ –1)(λ –2)(λ –3) + λ (λ –1)(λ –2)(λ –3)(λ –4)

= λ (λ – 1)(λ – 2)[1 + 2(λ –3) + (λ –3)(λ – 4)] = λ (λ – 1)(λ – 2)[ λ 2 – 5λ + 7]

Example 70: Find the chromatic polynomial of the graph in Fig. 11.131

d c

e
a b
Fig. 11.131

Solution: Since this graph has non-adjacent vertices, choose any pair of non-adjacent vertices in the
graph. Let us choose a and c. We now draw an edge between a and c to obtain the graph G′. We will also
fuse vertices a and c to obtain G′′ as shown in the following Fig. 11.132
596 Discrete Mathematical Structures

d c

e
a b
d c d
(a) e

a b b
x=(a, c)
(b) (c)
Fig. 11.132
Again taking b and d as non-adjacent vertices in Fig (b) and (c) and applying the same procedure we get.

d
d e c e

x b
a b

d c e c b
e
e e

a b a b x b x b

Fig. 11.133

All the four graph are now complete graphs, therefore chromatic polynomial of the given graph is the sum
of chromatic polynomial of these four complete graphs. Hence, chromatic polynomial of the given graph is
P5(λ ) = λ(λ –1) (λ –2) (λ –3) (λ – 4) + 2λ (λ –1) (λ –2) (λ –3) + λ (λ –1) (λ –2) = λ(λ –1) (λ –2) (λ 2 –5λ + 7 ).

Example 71: Let G be a simple graph with n vertices which is regular of degree r. Prove that chromatic
n
number of G ≥ .
n–r [Pune (B.E.) 2007; Rohtak (M.C.A.) 2006]

Solution: Let C i be the number of vertices in any proper colouring of G which receives the colour i, where
1 ≤ i ≤ k, the chromatic number of G. Then
Ci ≤ n – d for each 1 ≤i ≤ k
Now n = C1 + C 2 + . . . . . . + C k .
≤ (n – d ) + (n – d ) + . . . . . . . (n – d ) k times

= k(n – d )
n
Thus k≥
n–d
Graph Theory 597

Exercise
1. Determine whether the graphs shown is a simple graph a multigraph and a pseudograph.
a b a
a d
d b

b c c d c

(i) (ii) (iii)


Fig. 11.134
2. Consider the following graphs and determine the degree of each vertex.

b d v1 v2

v5

a c e v4 v3

(i) (ii)
Fig. 11.135

3. Find the in-degree and out-degree of each vertex of the following directed graphs

Fig. 11.136

4. How many vertices do the following graphs have if they contain.


(a) 16 edges and all vertices of degree 2
(b) 21 edges, 3 vertices of degree 4 and others each of degree 3.

5. Show that the following graphs are isomorphic.


(a) e'

a e d' c'

c
a d a' b'
(i) (ii)
Fig. 11.137
598 Discrete Mathematical Structures

(b)

Fig. 11.138
6. Determine wether the following graphs are isomorphic
(a) v2 v2

v1 v3 v1 v3

v5 v4 v5 v4

(i) (ii)
Fig. 11.139
(b) v1
v2 v'1 v'2
v'5
v5 v6 v'6

v8 v7 v'7
v'8

v4 v3 v'4 v'3
(i) (ii)
Fig. 11.140
(c) a b a′ b′

f c f′ c′

e d e′ d′

(i) (ii)
Fig. 11.141

(d)

Fig. 11.142
Graph Theory 599

7. Determine which of the following graphs contain and Eulerian Circuit. If it does, find out on Eulerian
circuit fo.r the graphs.

c v3
v2

d v4
(a) b (b)

a e v1
f v5
Fig. 11.143
v2

e1
e2 e3 e4 a b

(c) v1 v5 v3 (d) c
d
e7 e6
e8 e5 e

v4
Fig. 11.144

8. Determine whether the given graph has a Hamilton circuit. If it does, find such a circuit.

a b c
a b
f g
(a) c (b) d e h

e d i j

Fig. 11.145

v1 v3 a b
v0 v2
(c) v7 v4 (d) e d c

v6 v5 f g
Fig. 146

9. Explain the vertex colorings problem.


10. Distinguish between k-coloring of a graph and chromatic number of a graph.
11. What is meant by k-critical graph
12. Find the chromatic number of each graph.

Fig. 11.147
600 Discrete Mathematical Structures

(iii) (vi)

Fig. 11.148

(v) (vi)

Fig. 11.149

13. Define parallel edge, simple graph, regular graphs and degree of vertex with example.

[M.K.U. (B.E.) 2001, 2004, 2007, 2009, Rohtak (B.E.) 2005; Nagpur (B.E.) 2004, 2009; Pune (B.E.) 2008)
14. Define each of the following with given example. [U.P.T.U. (B.Tech.) 2006]

(i) Isomorphic graph [U.P.T.U. (B. Tech.) 2006]

(ii) Planar graph


(iii) Complete graph
(iv) Finite graph and infinite graph
(v) Homomorphic graph [U.P.T.U. (B. Tech.) 2006]

(vi) Hamiltonian circuit and graph and both [U.P.T.U. (B. Tech.) 2007]

(vii) Bipartite and complete bipartite graph [U.P.T.U. (B. Tech.) 2007, 2009]

(viii) Euler graph


(ix) Graph Coloring [U.P.T.U. (B. Tech.) 2006]

(x) Cromatic number of graph [U.P.T.U. (B. Tech.), 2009]

15. G and G are bipartite, what can be concluded about G? [U.P.T.U. (B.Tech.) 2006]

16. Differentiate between Euler and Hamiltonian graph with examples. [U.P.T.U (B. Tech.) 2008]
n(n – 1)
17. Show that the maximum number of edges in a simple graph with n vertices is
2
18. A graph G has 21 edges, 3 vertices of degree 4 and other vertices are of degree 3. Find the number of
vertices in G.
19. Nine members of a club meet each day for lunch at a round table. They decide to sit such that every
member has different neighbours at each lunch. How many days can this arrangement last?
20. Construct a cubic graph on 10 vertices. Draw three different representations.
21. Suppose you are married and you and your husband visited a party with 3 other married couples. No
one shakes hands with himself or his wife. How many hands you have shaken and how many did
your husband shake. Give limits.
Graph Theory 601

22. What is the largest number of vertices in a graph with 35 edges if all vertices are degree atleast 3.

23. If a graph with n vertices is regular of degree r, what is sum of the degree of the vertices?

24. Draw the graphs of the chemical molecules (a) CH4 (b) C 2H6

25. Draw two graphs with same degree sequence {2, 3, 4, 5, 6}

26. Find the number of vertices, the number E of edges and the number R of regions of the graph.

Fig. 11.150

27. A graph g has 21 edges, 3 vertices of degree 4 and other vertices are of degree 3. Find the number of
vertices in G.
28. How many edges has each of the following graph?
(a) K7 (b) K 3, 6

1. (i) Simple graph (ii) pseudo graph (iii) multigraph


2. (i) d(a)=2, d(b)=4, d(c)=4, d(d)=3, d(e)=3
(ii) d(v1 )=4, d(v2)=4, d(v3 ) = 4, d(v4 )=4, d(v5 ) = 4

3. (i) in-degree v1 = 2 out-degree v1 = 1

in-degree v2 = 1 out-degree v2 = 2

in-degree v3 = 2 out-degree v3 = 1

in-degree v4 = 2 out degree v4 = 2

in-degree v5 = 0 out degree v5 = 3

(ii) in-degree a = 5 out-degree a = 2


in-degree b = 1 out-degree b = 5
in-degree c = 1 out-degree c = 6
in-degree d = 4 out-degree d = 2
4. (a) .16 (b) .13
6. (a) not isomorphic (b) not isomorphic
(c) not isomorphic (d) isomorphic
602 Discrete Mathematical Structures

7. (a) degree of a = 3 is not even therefore no Eulerian circuit.


(b) every vertex is of even degree. Therefore the graph contains an Eulerian circuit
v1,v2 v3 v4 v2 v5 v1 is Eularian.
(c one Eulerion circuit v2 e4 v3 e5 v4 e6 v6 e3 v2 e2 v5 e7 v4 e8 v1 e1 v2
(d) a b c d c e d b e a e a is one Eulerian circuit.
8. (a) a b c d e a is a Hamilton circuit
(b) d a e b c h g f j i d is a Hamilton circuit.
(c) v0 v7 v2 v3 v4 v5 v6 v0 is a Hamilton circuit.
12. (i) 2 (ii) 4 (iii) 2 (iv) 3 (v) 3 (vi) 3
18. 13
19. 4 days
20.

Fig. 11.151 Fig. 11.152 Fig. 11.153


21. 23
22. 11
23. nr
H H H
  
24. (a) HC H (b) H  C C  C  H
  
H H H

25.

Fig. 11.154 Fig. 11.155

26. v = 6, E = 9, R = 5
27. 13
28. (a) 35, (b) 18
Graph Theory 603

Objective Type Quesitons


Multiple Choice Questions

1. The number of distinct simple graphs with up to three nodes is—


(a) 15 (b) 10 (c) 7 (d) 9
2. Let G be a graph with 100 vertices 1 to 100. Two vertices i and j are adjacent if (i – j) = 8 or (i − j) = 12 .
The number of connected components in G is—
(a) 8 (b) 4 (c) 12 (d) 25
3. The total number of edges in a complete graph of n vertices is—
n n(n – 1)
(a) n (b) (c) n2 – 1 (d)
2 2
4. Maximum number of edges in an n-node undirected graph without self loops is—
n(n – 1) n(n + 1)
(a) n2 (b) (c) n–1 (d)
2 2
5. In a directed graph—
(a) directions are fixed (b) underlying graph is fixed
(c) both (a) and (b) (d) none of (a) and (b)
6. In any undirected graph, the sum of degree of all the vertices
(a) must be even (b) is twice the number of edges
(c) must be odd (d) both a and b
7. A directed complete graph of n vertices, contains
(a) One arrow between every pair of distinct vertices
(b) Two arrow between every pair of distinct vertices
(c) (n–1) arrow between every pair of distinct vertices.
(d) none of these
8. A DAG is a—
(a) directed graph (b) undirected graph
(c) directed acyclic graph (d) directed complete graph
9. In a connected cycle free graph, one of the vertex level is 4 then—
(a) 4 is depth of the tree (b) depth of tree is atleast 4
(c) depth of tree is at the most 4 (d) none of these
10. The number of vertices of odd degree in a graph
(a) is always even (b) is always odd
(c) can be even as well as odd (d) none of these
604 Discrete Mathematical Structures

11. The edge set E in a graph G(V, E )

(a) must be empty (b) must be non-empty


(c) can be empty or non-empty (d) none of these
12. The number of vertex in a loop is—
(a) 0 (b) 1 (c) 2 (d) 4
13. Degree of pendent vertex is—
(a) 1 (b) 2 (c) 0 (d) 4
14. In-degree of a source is a digraphs is —
(a) 0 (b) 1
(c) 2 (d) none of these
15. Degree of each vertex of an Eular graph—
(a) is always even (b) is always odd
(c) can be even or odd (d) none of these
16. Degree of each vertex of a cycle is—
(a) 0 (b) 1 (c) 2 (d) 3
17. The sum of degrees of all vertices in a graph with e edges is equal to—
(a) e (b) e2 (c) 2e (d) e+1

18. Which of the following statements are tree?


(a) Every cycle is a Hamiltonian graph
(b) Any graph obtained by adding edges to a Hamiltonian graph is also Hamiltonian
(c) A Hamiltonian graph always has a pandent vertex
(d) Trees are always Hamiltonian
19. If the region of any map are coloured so that adjacent region have different colours, then no more
than K colors are required. What is value of K?
(a) 5 (b) 4 (c) 3 (d) 2
20. A trail is an open walk if edges are—
(a) are repeated (b) are not repeated
(c) may or may not be repeated (d) none of these
21. The edge set E in a graph G(V, E )

(a) must be empty (b) non-empty


(c) may be empty or non-empty (d) none of these
Graph Theory 605

State True or False


1. Consider the following statements
S1 : The trivial graph is the graph with one vertex and no edges.
S2: The empty graph is the graph with no vertices and no edges. Which of the following statement is
correct?
(a) S1 and S2 are both true (b) S1 is true, S2 is false
(c) S1 is false, S2 is true (d) S1 and S2 both are false
2. Determine which of the following statements is true and which are false.
(a) The chromatic number of K p is p.

(b) The chromatic number of any cycle is 2.


(c) The chromatic number of any non-trivial tree is 2.
(d) Every planar graph is 5 colorable.
(e) Every planar graph is 4 colorable.
(f) Every tree is a bipartite graph.
(g) Every planar graph is a plane graph.
(h) K 5 is non-planar.
(i) K 3, 3 is non-planar.
(j) The Peterson graph is non-planar.
(k) Every sub graph of planar graph is planar.
606 Discrete Mathematical Structures

Multiple Choice Questions

1. (d) 2. (b) 3. (d) 4. (b) 5. (a) 6. (d)


7. (a) 8. (c) 9. (b) 10. (a) 11. (c) 12. (b)
13. (a) 14. (a) 15. (a) 16. (c) 17. (c) 18. (a) and (b)
19. (b) 20. (b) 21. (c)

State True or False

1. (a)
2. (a) True (b) False (c) True (d) True (e) True (f) True
(g) False (h) True (i) True (j) True (k) True

❑❑❑
Recurrence Relations 607

12.1 Recursive Formula


A formula which defines any term of a sequence in terms of any number of its previous terms or which
express any term of a sequence as a function of its previous terms is called Recursive and the relation is
called a Recurrence Relation.

Illustration: The nth term an of the sequence 3, 8, 13, 18, 23, ... can be written as
an = an–1 + 5 , for n ≥ 2. and a1 = 3
This formula is called Recursive Formula and relation is called recurrence relation, some times is called
Difference Equation. The beginning information a1 = 3 is called Initial Condition or Boundary

Condition for the sequence.


Remark: The recurrence relation can be written in different forms as equation.
f ( x + 3h) + 3 f ( x + 2h) + 4 f ( x + h) + 8 f ( x ) = 0 is recurrence relation. It is also written as

ar + 3 + 3ar + 2 + 4 ar +1 + 8 = 0

 or

 y h+ 3 + 3y h+ 2 + 4 y h+1 + 8 = 0

 or

ux + 3 + 3ux + 2 + 4 ux +1 + 8 = 0

12.1.1 Order of the Recurrence Relation


The order of the recurrence relation or difference equation is defined to be the difference between highest
and lowest subscripts of f ( x ) or ar or y h.

Illustration

The equation ar + 3ar –1 = 0 is of first order recurrence relation.

The equation 7 f ( x ) + f ( x + 1) + 5 f ( x + 2) = k( x ) is a second order difference equation or recurrence


relation.
608 Discrete Mathematical Structures

12.1.2 Degree of the Recurrence Relation or Difference Equation


The degree of a recurrence relation or difference equation is defined to be the highest power of f ( x )or ar or y h.

Illustrations
1. y h3+ 3 + 2y 2h+ 2 + 2y h+1 = 0 2. y h+ 4 + y h+1 + y h = 0

3. ar4 + ar3–1 + 5ar2– 2 + 3ar – 3 = 0 4. f ( x + 2h) + 4 f ( x + h) + 2 f ( x ) = 0

The degree of (1) is 3, degree of (2) is 1, degree of (3) is 4 degree of (4) is 1.


A recurrence relation is called Linear, if it is of degree one, it is called Quadratic if its degree is 2. A
recurrence relation is called Homogeneous, if it contains no terms that depend only on the variable n.
The recurrence relation which is not homogeneous is called non-homogeneous or inhomogeneous.

Illustration of Recurrence Relations


1. ar = ar – 1 + r2 is Non-Homogeneous of Order 1 and Degree 1

2. ar = r ar – 2 + 2r is Non-Homogeneous of Order 2 and Degree 1

3. ar = ar2−2 is Homogeneous of Order 2 and no Degree

4. ar = ar –1 + ar – 2 + K + a0 is Homogeneous of no Order r and Degree 1

12.1.3 General Solution


A function f (r) is said to be a General Solution to the homogeneous recurrence relation Particular
Solution. A function g(r) is said to be a Particular Solution to the recurrence relation if it satisfies the
recurrence equation together with initial conditions.

12.2 Linear Recurrence Relation with constant Coefficients


A recurrence relation is called linear if its degree is one. The general form of linear recurrence relation
with constant coefficients is coar + c1 ar −1 + c2ar – 2 + . . . + ck ar – k = f (r)
where c0 , c1,c2. . . . ck are constants and f (r) is some function which satisfies the given equation.

12.2.1 Linear Homogeneous Recurrence Relation with Constant Coefficients


The equation is said to be linear homogeneous recurrence relation or difference equation iff f (r) = 0 and it
will of order n and non-homogeneous if f (r) ≠ 0.

Illustration: The recurrence relation


ar + 4 + 2ar + 3 + 5ar + 2 + 9ar +1 + 7 ar = 0 is a linear homogeneous equation of order 4.

Illustration: The recurrence relation


ar + 3 – 4ar +1 + ar = 3r + 5r is a linear non-homogeneous equation of order 3.
Recurrence Relations 609

12.2.2 Method to Find the Solution of Homogeneous Relation


Let us consider a linear homogeneous difference equation or linear recurrence relation with constant
coefficients.
c0 ar + c1 ar –1 + c2ar – 2 + . . . + ck ar – k = 0 ...(1)
where c0, c1, c2 . . . ck are constants.

The solution of (1) is of the form A α 1κ , where α1 is the Characteristic Root and A is constant determine
by the boundary conditions.

Now substituting ar = Aα r , ar –1 = A α r –1 , ar – 2 = Aα r – 2K ar – k = Aα r − k in the R.H.S of (1) then equate to


zero, we find

c0 Aα r + c1 Aα r –1 + c2 Aα r – 2 + . . . + ck Aα r – k = 0

or Aα r – k (c0α k + c1α k –1 + c2α k – 2 + K + ck ) = 0

or coα k + c1α k –1 + c2α k – 2 + K + ck = 0 ...(2)

Which is the characteristic equation of the difference equation (1). Therefore, if α 1 is one of the roots of the
characteristic equation (1), a characteristic equation of k th degree has k Characteristic Roots.

12.2.3 Case of Distinct Roots


Let α1 , α 2, α 3 . . . α k are the distinct characteristic roots of (2). Then the solution of homogeneous
recurrence relation is given by ar = A1 α1r + A2α 2r + K + Akα κr , Where A1 , A2, A3 ... Ak are constants.

12.2.4 Case of Equal Roots


If any characteristic root is repeated say α1 , is repeated m times, then the solution of homogeneous
recurrence relation is given by
ar = ( A1 rm –1 + A2rm – 2 + K + Am –1 r + Am ) α1r

12.2.5 Case of Complex Roots


Let α + i β and α – i β be the complex roots of ar + 2 + 2car +1 + dar = 0, then the solution of the homogeneous
recurrence relation is given by
ar = ρ r ( A1 cos r θ + A2 sin rθ )

where ρ and θ is obtain as


Let α + i β = ρ (cos θ + i sin θ ) and α – i β = ρ (cos θ – i sin θ )
Equating real and imaginary parts
α = ρ cos θ, β = ρ sin θ ⇒ α 2 + β 2= ρ 2 and tan θ = (β / α) or a = tan –1 (β / α)
610 Discrete Mathematical Structures

12.2.6 Case of Equal Complex Roots


Let (α + iβ ) be the repeated (twice) root of the characteristic equation, then the solution of the
homogeneous recurrence relation is given by
ar = ρ r[( A1 + A2r) cos r θ + ( A3 + A4 r) sin r θ] where ρ = α 2 + β 2 and θ = tan –1 (β / α)

Example 1: Solve the following recurrence relations


(i) ar +1 – 1. 5 ar = 0, r > 0 [U.P.T.U. (B.Tech.) 2005, 2006]
(ii) ar = 5ar –1 + 6ar – 2, r ≥ 2, a0 = a1 = 3 [U.P.T.U. (B.Tech.) 2006]
(iii) ar + 2 – ar +1 − 6ar = 0 [U.P.T.U. (B. Tech.) 2002]
(iv) ar = 6 ar −1 − 11 ar – 2 + 6 ar – 3 , r ≥ 3 with condition a0 = 2, a1 = 5, a2 = 15 [R.G.P.V. (B.E.) Bhopal 2007]
(v) ar – 7 4ar –1 + 10ar – 2 = 0 given that a0 = 0, a1 = 3 [U.P.T.U. (B.Tech.) 2003]
(vi) ar – 4 ar –1 + 4ar – 2 = 0 given that a0 = 1 and a1 = 6

(vii) y n + 2y n–1 – 15y n– 2 = 0, n ≥ 2 given that y 0 = 0, y1 = 1


also find generating function as sequence y 0, y1 , y 2K [R.G.P.V. (B.E.) Bhopal 2004, 2006]
(viii) ar + 6ar −1 + 12ar − 2 + 8ar − 3 = 0 [U.P.P.V. (B.Tech.) 2003]
(ix) 4ar – 20ar –1 + 17 ar – 2 − 4ar − 3 = 0
(x) 2an+ 2 – 11an+1 + 5an = 0, n ≥ 0, a0 = 2, a1 = – 8 [R.G.P.V. (B.E.) Raipur 2008]
(xi) an= –3 an–1 − 3 an– 2 – an– 3 with initial conditions a0 = 1, a1 = – 2 and a2 = –1

(xii) ar – 4ar –1 + 13 ar – 2 = 0

Solution: (i) We have ar +1 – 1. 5 ar = 0, r > 0 ...(1)


r r +1
Put ar = Aα ⇒ ar +1 = A α in (1)

Aα r +1 – 1. 5 Aα r = 0 ⇒ Aα r (α – 1. 5) = 0 But Aα r ≠ 0

Then α = 1. 5, then solution of homogeneous recurrence relation is given by


ar = A1α 1r or ar = A1 (1. 5)r

(ii) We have ar = 5 ar –1 – 6 ar – 2, r ≥ 2, a0 = a1 = 3
∴ ar – 5ar –1 + 6 ar – 2 = 0 ...(1)
r r –1 r–2
Put ar = A α , ar –1 = A α , ar – 2 = A α in (1)
 5 6
Aα r – 5A α r –1 + 6 A α r – 2 = 0 or Aα r 1 – + 2  = 0 But Aα r ≠ 0
 α α 
⇒ α 2– 5 α + 6 = 0 , this is the characteristic equation.
⇒ (α – 3) (α – 2) = 0 ⇒ α = 2, 3 i . e. α1 = 2, α 2 = 3
Then the solution of homogeneous recurrence relations is given by
ar = A1 (α1 )r + A2(α 2 )r

ar = A1 (2)r + A2(3)r ...(2)


Recurrence Relations 611

Put r = 0, 1 and used a0 = a 1 = 3


a0 = A1 + A2 or 3 = A1 + A2

a1 = 2A1 + 3A2 or 3 = 2A1 + 3A2


Solve these equations we get A1 = 6, A2 = – 3
The required solution ar = 6(2) – 3(3r )
r

(iii) We have ar + 2 – ar +1 – 6ar = 0


The characteristic equation is α2 – α – 6 = 0 ⇒ (α – 3)(α + 2) = 0 or α = 3, – 2

Which is the characteristic roots of the equation.


Therefore, the solution of the given recurrence relation is
ar = A1 (3)r + A2 (– 2)r

(iv) We have ar = 6ar –1 − 11ar – 2 + 6ar – 3 , r ≥ 3 with characteristic equation is


α 3 – 6 α 2 + 11 α – 6 = 0

∴ (α – 1)(α – 2)(α – 3) = 0 ⇒ α = 1, 2, 3
Which is the characteristic roots of the given equation. Therefore, the solution of the given recurrence
relation is
ar = A1 (1)r + A2(2)r + A3 (3)r ...(1)

Now to find A1 , A2, A3 by putting r = 0, 1, and 2 in (1) we get


a0 = A1 + A2 + A3 given that a0 = 2, a1 = 5, a2 = 15
a1 = A1 + 2A2 + 3A3
a2 = A1 + 4 A2 + 9 A3
or 2 = A1 + A2 + A3 , 5 = A1 + 2A2 + 3A3 , 15 = A1 + 4 A2 + 9 A3
Solving these equations we get A1 = 1, A2 = −1 and A3 = 2 .
Therefore, the solution of the given homogeneous recurrence relation is
ar = 1 − 2r + 2. 3r
(v) We have ar − 7 ar −1 + 10 ar − 2 = 0 with a0 = 0 , a1 = 3 ...(1)
The characteristic equation of (1) is
α 2 – 7α + 10 = 0 ⇒ (α − 5)(α − 2) = 0 or α = 5, 2
Which is the characteristic roots of the equation. Therefore the solution of given recurrence relation is
ar = A1 (5)r + A2(2)r ...(2)

Where A1 , A2 be two constants which is to be determine by a0 = 0, a1 = 3


Put r = 0, 1 in (2) we find
a0 = A1 + A2 = 0 ...(3)
a1 = 5A1 + 2A2 = 3 ...(4)
Solve (3) and (4) we get A1 = 1 and A2 = – 1
Hence, the homogeneous solution of given recurrence relation is ar = (5)r – 2r
612 Discrete Mathematical Structures

(vi) We have ar – 4ar –1 + 4ar – 2 = 0 ...(1)


with boundary condition a0 = 1 and a1 = 6
The characteristic equation is
α 2– 4α + 4 = 0 ⇒ (α – 2)2 = 0 or α = 2, 2

which is repeated roots


Therefore, the solution of given homogeneous recurrence relations is
ar = ( A1 + A2r)(2)r ...(2)

But a0 = 1, a1 = 6 , then put r = 0, 1 in (2)


a0 = A1 ⇒ A1 = 1
a1 = ( A1 + A2 ) 2 ⇒ 6 = ( A1 + A2 ) 2 ⇒ A1 + A2 = 3
∴ A2 = 2
Hence ar = (1 + 2r)(2r )
(vii) We have y n + 2y n–1 – 15y n– 2 = 0, n ≥ 2 ...(1)
given condition y 0 = 0, y1 = 1.
The characteristic equation is α 2 + 2α −15 = 0 ⇒ (α + 5)(α –3) = 0 or α = 3, α = – 5

Therefore, the solution of given homogeneous recurrence is


∴ y n = A1 (–5)n + A2(3)n ...(2)
Put n = 0, in (2), we find
y 0 = A1 + A2 ⇒ A1 + A2 = 0 ...(3)
and y1 = – 5A1 + 3A2 ⇒ – 5A1 + 3A2 = 1 ...(4)
Solve (3) and (4), we get
–1 1
A1 = , A2 =
8 8
 –1  n 1 n 1
∴ y n =   ( –5) + 3 = [ 3n – (–5)n]
 8 8 8
1 1
Now, y 0 = 0, y1 = 1, y 2 = (9 – 25) = –2, y 3 = (27 + 125) = 19
8 8
Hence, the required generating function is
A(z ) = y 0 + y1 z + y 2z 2 + K

⇒ A(z ) = 0 + 1z – 2z 2 + 19z 3 + . . .

⇒ A(z ) = z – 2z 2 + 19z 3 + . . .

(viii) We have ar + 6ar –1 + 12ar – 2 + 8ar – 3 = 0


The characteristic equation of given recurrence relation is
α 3 + 6 α 2+ 12 α + 8 = 0 ⇒ (α + 2)3 = 0 or α = – 2, – 2, – 2

Hence, the required solution of homogeneous recurrence relation is


Ar = ( A1 + A2r + A3 r2 )(–2)r
Recurrence Relations 613

(ix) We have 4 ar – 20 ar –1 + 17 ar – 2 – 4 ar – 3 = 0
The characteristic equation of given recurrence relation is
4 α 3 – 20 α 2 + 17α – 4 = 0

⇒ 4 α 3 – 16 α 2– 4 α 2 + 16 α + α – 4 = 0

⇒ 4 α 2(α – 4) – 4 α (α – 4) + (α – 4) = 0

⇒ (α – 4)(4 α 2– 4 α + 1) = 0 ⇒ (α – 4)(2α –1)2 = 0 ⇒ α = 4 , α = 1/2, 1/2

Which is the characteristic roots of given equation.


Therefore, the solution of homogeneous recurrence rotation is
r
 1
ar = ( A1 + A2r)   + A3 (4)r
 2

(x) We have 2 an+ 2 – 11 an+1 + 5 an= 0 ...(1)


with boundary condition a 0 = 2 and a1 = – 8
The characteristic equation is
2α 2 – 11α + 5 = 0
∴ 2α 2 – 10 α – α + 5 = 0 or (α – 5)(2α – 1) = 0 or α = 5, 1/2
Which are characteristic roots of the equation
Therefore, the solution of the given homogeneous recurrence relation is
an = A1 (5)n + A2(1/2)n ...(2)
Where A1 , A2 be constant which is to be determine by given boundary condition a0 = 2, a1 = – 8. Now put
n = 0, 1 in (2)
a0 = A1 + A2 ⇒ 2 = A1 + A2
1 A
a1 = 5A1 + A2 ⇒ – 8 = 5A1 + 2
2 2
Solve these equation we get A1 = – 2, A2 = 4
Therefore, the solution of homogeneous recurrence relation is
n
 1
an = (–2)(5)n + 4   , n ≥ 0
 2

(xi) We have an = − 3an −1 − 3an − 2 − an − 3 ...(1)


with boundary conditions a0 = 1, a1 = − 2 and a2 = − 1
The characteristic equation is
α 3 + 3α 2 + 3α + 1 = 0 or (α + 1)3 = 0, α = – 1, – 1, – 1
The roots are repeated
Therefore, the solution of homogeneous recursion relation is
an = ( A1 + A2n + A3 n2 )(–1)n ...(2)
Now to find A1 , A2 and A3 by given condition, put n = 0, 1, 2 in (2) and used a0 = 1, a1 = – 2, a2 = – 1
We get 1 = A1 , –2 = ( A1 + A2 + A3 )(–1)1 , –1 = ( A1 + 2A2 + 4 A3 )(–1)2
Solve these equations we get A1 = 1, A2 = 3, A3 = – 2
614 Discrete Mathematical Structures

Therefore, the solution of homogeneous recurrence relation is


an = (1 + 3n – 2n2 )(–1)n

(xii) We have ar – 4 ar –1 + 13 ar –2 = 0
4 ± 16 – 52 4 ± 6 i
The characteristic equation is α 2 – 4α + 13 = 0 ⇒ α= = = 2 ± 3i
2 2
2 + 3i = ρ ei θ = ρ cos θ + i ρ sin θ

ρ cos θ = 2, ρ sin θ = 3 ⇒ ρ 2 = 4 + 9 = 13, ρ = 13

divide tan θ = 3/2, θ = tan –1 ( 3/2)

Hence, the homogeneous solution of the given recurrence relation is


ar = ρ r ( A1 cos r θ + A2 sin rθ )

  3 
⇒ ar = (13)r / 2  A1 cos r (tan –1 ( 3 / 2) + A2 sin r  tan –1  
  2 

1+ 3
Example 2: Solve the recurrence relation y n+ 2 – y n+1 + y n = 0 given that y 0 = 1 and y1 =
2
Solution: We have y n+ 2 – y n+1 + y n = 0
1± 1–4 1±i 3
The characteristic equation is α 2 – α + 1 = 0 ⇒ α= =
2 2
Compare α = ρ ei θ

1+i 3
= ρ (cos θ + i sin θ)
2
3 1 3 π
⇒ ρ cos θ = 1/2, ρ sin θ = square ρ 2 = + , ρ = 1 divide tan θ = 3, θ = tan –1 ( 3) =
2 4 4 3
π   π n
Then, the solution of homogeneous recurrence relation is y n = (1)n( A1 cos  n + A2 sin   ... (1)
3   3

1+ 3
The initial condition is y 0 = 1 and y1 = then put n = 0, 1 in (1), we get
2
y 0 = A1 ⇒ A1 = 1
π π 1 + 3 A1 3
y1 = A1 cos + A2 sin ⇒ = + A2
3 3 2 2 2
3 1 3 1 3 3 3
∴ A1 = 1, A2 = + – or A1 = 1, A2 = , A2 = =1
2 2 2 2 2 2 3
Put A1 , A2 in (1) we get general solution of given recurrence relation.
 nπ nπ 
y n = (1)n  cos + sin 
 3 3
Recurrence Relations 615

12.3 Non-homogeneous Linear Recurrence Relation or Difference Equations


A non-homogeneous linear recurrence relation of k-th order with constant coefficient is given by
c0 ar + c1 ar –1 + c2ar – 2 + . . . + ck ar – k = f (r) ...(1)

Where c0 , c1 , c2, K ck are constants.

12.3.1 The Total Solution or General Solution of (1) Consists of Two Parts, Namely
(i) Homogeneous Solution (ii) Particular Solution

Then Total or General or Complete solution is given by

ar = homogeneous solution+particular solution.

The homogeneous solution has been discussed in before articles. Now we shall discuss the methods of
determining Particular Solution (1).

12.3.2 Particular Solution


There is no general method for determining the particular solution of a recurrence relation (difference
equation). However, there are a number of special technique for finding particular solution of (1). We
shall discuss Method of Undetermined Coefficients.

12.3.3 Method of Undetermined Coefficients


This method is useful in finding the particular solution when f (r) consists of terms having certain special
forms. In this method, we consider a trial solution consisting of unknown constant coefficients
corresponding to each term which is present in f (r) . The unknown coefficients are determined by putting
the trial solution in the recurrence relation.
The trial solution (ar , suppose) to be used in different cases are given in following table:

S. No. Terms in f ( r ) Trial solution = a r

1. br ar = Abr

2. a pdynomial of degree k in r ar = A0 + A1 r + A2r2 + ...+ Ak rk

3. br (a polynomial of degree k in r) ar = br ( A0 + A1 r + A2r2 + . . . + Ak rk )

4. sin br or cos br ar = A sin br + B cos br

5. br sin br ar = br ( A cos br + B sin br)

6. br cos br ar = br ( A cos br + B sin br)


616 Discrete Mathematical Structures

Example 3: Determine the particular solution for the difference equation: ar – 4 ar –1 + 4 ar – 2 = 2r


[U.P.T.U. (B.Tech.) 2003; R.G.P.V. (B.E.) Bhopal 2006; Delhi (B.E.) 2008]

Solution: We have ar – 4 ar –1 + 4 ar – 2 = 2r ...(1)


The characteristic equation of (1) is given by
α2 – 4 α + 4 = 0 ⇒ (α – 2)2 = 0 or α = 2, 2

Here f (r) = 2r , since 2 is a characteristic root of multiplicity 2, the general form of the particular solution of
(1) is taking as
ar = A 2r ⋅ r2 ...(2)
Put r = r – 1, r – 2 in (2), we get ar –1 = A 2 ( r –1 ) 2
(r – 1) and ar – 2 = A2r – 2 (r – 2
2)
Put these values in (1), we get
Ar2 2r – 4 A 2( r –1 )(r – 1)2 + 4 A 2( r – 2)(r – 2)2 = 2r
⇒ 2A 2r = 2r ⇒ A = 1/2
Hence, the required particular solution is given from (2)
1
ar = 2r r2 ⇒ ar = 2r –1 r2
2

Example 4: Determine the particular solution for the recurrence relation ar – 3ar –1 + 2ar – 2 = 2r

[U.P.T.U. (B.Tech.) 2002; P.T.U. (B.E.) Punbab 2007; R.G.P.V. (B.E.) Bhopal 2005]
Solution: We have ar − 3ar –1 + 2ar – 2 = 2r ...(1)
2
The characteristic equation is α – 3α + 2 = 0 ⇒ (α – 2)( α – 1) = 0 ⇒ α = 1, α=2
Since 2 is characteristic root of multiplicity, the general form of the particular solution of recurrence
relation (1) is
ar = Ar2r ...(2)
Put r = r – 1, r = r – 2 in (2), we get ar –1 = A(r – 1) 2( r –1 ), ar – 2 = A(r – 2) 2( r – 2)
Now, put these values in (1), we obtain
1
A 2r = 2r
Ar2r – 3A(r – 1) 2( r –1 ) + 2A(r – 2) 2( r – 2) = 2r ⇒ ⇒ A=2
2
1
Hence, the required particular solution is given from (2) ar = r 2r
2

Example 5: Determine the particular solution of the recurrence relation.


(i) ar – 2ar –1 = f (r), where f (r) = 7 r [R.G.P.V. (B.E.) Bhopal 2007; Rohtak (B.E.) 2008]
(ii) ar – 2ar –1 = 6r, a1 = 2 [Bhopal (B.E.) 2008]
(iii) ar – 2ar –1 + 3ar – 2 = 1 [Raipur (B. E.) 2009]
r
(iv) ar + ar –1 = 3r2 [M.K.U. (B.E.) 2005, 2009]
(v) ar – 7 ar –1 = 3.7 r [P.T.U. (B.E.) Punjab 2009]
2
(vi) ar + 5ar –1 + 6ar – 2 = 3r [M.K.U. (B.E.) 2003; Kurukshetra (B.E.) 2005]
2
(vii) ar + 5ar –1 + 6ar – 2 = 3r – 3r + 1 [Osmonia (M.C.A.) 2007; Delhi (B.E.) 2008]
Recurrence Relations 617

Solution: (i) We have ar − 2ar –1 = 7 r ...(1)


Let the particular solution corresponding to the term 7 r on R.H.S. of (1)
ar = A1 + A2r ...(2)
Put r = r – 1 in (2) ⇒ ar –1 = A1 + A2(r – 1) ...(3)
Put (2) and (3) in (1), we get
A1 + A2r – 2 ( A1 + A2 (r – 1)) = 7 r
(– A1 + 2A2 ) + (– A2 ) r = 7 r
Comparing like terms on both sides, we find
– A1 + 2A2 = 0, – A2 = 7 ∴ A2 = – 7, A1 = – 14
Hence, the required particular solution is given as from (2) ar = – 14 – 7 r
(ii) We have ar – 2 ar –1 = 6r, a1 = 2 ...(1)
The particular solution corresponding to the term 6 r on R.H.S. of (1)
ar = A1 + A2r ...(2)
Put r = r – 1 in (2) ⇒ ar –1 = A1 + A2(r – 1)
Put ar , ar –1 in (1), we obtain
A1 + A2r – 2 ( A1 + A2(r – 1)) = 6 r ⇒ (– A1 + 2A2 ) + r(– A2) = 6r
Equating like term on both sides, we get
– A1 + 2A2 = 0, – A2 = 6 ⇒ A1 = – 12, A2 = – 6
Hence, the required particular solution is given from (2) ar = 12 – 6 r
(iii) We have ar – 2ar –1 + 3ar – 2 = 1 ...(1)
The particular solution corresponding to the term on R.H.S. of (1) ar = A ...(2)
Put r = r – 1, r – 2 in (2) we get ar –1 = A, ar – 2 = A then put in (1), we get
A–2 A + 3 A =1 ⇒ 2A = 1 ⇒ A = 1/2
1
Therefore, the particular solution is ar = .
2
(iv) ar + ar –1 = 3 r2r ...(1)
r
The general form of the particular solution (1) is ar = ( A1 + A2r)2 ...(2)
Put (2) in (1), we get
( A1 + A2r)2r + ( A1 + A2(r – 1))2r –1 = 3r2r
Equate the coefficient of like term of r
3 1 3
A2 = 3, – A2 + A1 = 0
2 2 2
2
On solving, we get A2 = 2, A1 =
3
Therefore, the particular solution is
2 
ar =  + 2 r 2r
3 
(v) We have, ar − 7 ar –1 = 3.7 r ...(1)
The general form of the particular solution (1) is ar = A. r.7 r ...(2)
r r –1 r
Put in (1), we get Ar.7 – 7 A(r – 1)7 = 3.7 ⇒ A=3
r
Then, the required particular solution ar = 3 r 7
618 Discrete Mathematical Structures

(vi) We have ar + 5ar –1 + 6ar – 2 = 3r2 ...(1)


The general form of the particular solution of recurrence relation (1) is
ar = A1 + A2r + A3 r2 ...(2)
Where A1 , A2, A3 be constant which is to be determine. Put this expression in (1), we obtain
( A1 + A2r + A3 r2 ) + 5 {( A1 + A2 (r – 1) + A3 (r – 1)2 )} + 6 {( A1 + A2(r – 2) + A3 (r – 2)2 )} = 3r2
⇒ 12A3 r2 – (34 A3 – 12 A2 ) r + (29 A3 + 17 A2 + 12A1 ) = 3r2
⇒ 12A3 = 3, 34 A3 – 12 A2 = 0, and 29 A3 + 17 A2 + 12A1 = 0
On solving these equations, we get
115 17 1
A1 = , A2 = , A3 =
288 24 4
Therefore, the particular solution of (1) is
115 17 1
ar = + r + r2
288 24 4
(vii) We have ar + 5ar –1 + 6ar – 2 = 3r2 – 3r + 1 ...(1)
The particular solution of given recurrence relation is of the form
ar = A1 + A2r + A3 r2 ...(2)
Put this relation (2) in L.H.S. of (1), we find
( A1 + A2r + A3 r3 ) + 5{( A1 + A2(r – 1) + A3 (r – 1)2 )} + 6 {( A1 + A2(r – 2) + A3 (r – 2)2} = 3r2 – 3r + 1
⇒ 12A3 r2 – (34 A3 – 12A2 ) r + (29 A3 – 17 A2 + 12A1 ) = 3r2– 2r + 1
Comparing like power of r on both sides, we get
12A3 = 3, 34 A3 – 12A2 = 2, and 29 A3 – 17 A2 + 12A1 = 1
71 13 1
On solving these equations, we get A1 = , A2 = , A3 =
288 24 4
71 13 1
Hence, the required particular solution of (1) is ar = + r + r2
288 24 4

Example 6: Solve the recurrence relation given below:


(i) ar + 6ar –1 + 9ar – 2 = 3 given that a0 = 0, a1 = 1
[U.P.T.U. (B. Tech.) 2004; R.G.P.V. (B.E.) Bhopal 2004, 2005, 2006, 2007]
r
(ii) ar – 6ar –1 + 8ar – 2 = r. 4 given a0 = 8, a1 = 22 [U.P.T.U. (B.Tech.) 2009; P.T.U. (B.E.) Punjab 2004, 2007]
r
(iii) ar + 2 – 2ar +1 + ar = 2 given that a0 = 2 and a1 = 1 [U.P.T.U. (B.Tech.) 2004]
(iv) What is recursion and recurrence relation. Solve the following recurrence relation using initial
condition as s(k ) – 9s(k – 1) + 8s(k – 2) = 9k + 1, s(0) = s(1) = 1 [U.P.T.U. (B.Tech.) 2008]
(v) ar − 5ar –1 + 6ar – 2 = 7 r [U.P.T.U. (B.Tech.) 2005]
n
(vi) an = 2an–1 + 3an– 2 + 5 , n ≥ 2 with given a0 = –2, a1 = 1

[P.T.U. (B.E.) Punjab 2004, 2008; Kurukshetra (B.E.) 2007]


(vii) un – 4un–1 + 4n– 2 = 2n or ar – 4ar –1 + 4ar – 2 = 2r [M.C.A. (Rohtak) 2008; U.P.T.U. (B.Tech.) 2003]
2
(viii) ar + 4ar –1 + 4ar – 2 = r – 3r + 5
(ix) y r – 4 y r –1 + 4 y r – 2 = 3r + 2r or ar – 4ar –1 + 4ar – 2 = 3r + 2r
Recurrence Relations 619

(x) ar – 5ar –1 + 6ar – 2 = 2r + r, r ≥ 2 with boundary condition a0 = 1 and a1 = 1.


[R.G.P.V. (B.E.) Bhopal 2002, 2009]
r
(xi) ar – 4ar –1 + 4ar – 2 = (r + 1)2 , a0 = 1, a1 = 2, a2 = 3
[R.G.P.V. (B.E.); Raipur 2003, 2008; Rohtak (B.E.) 2004, 2007]
2
(xii) ar − 4ar –1 + 4ar – 2 = (r + 1) , r ≥ 2 [R.G.P.V. (B.E.) Bhopal 2003]
2
(xiii) 6ar − 7 ar –1 – 20ar – 2 = 3r – 2r + 8 [M.K.U. (B.E.) 2005, 2009]
2 r
(xiv) ar + 2 – 6ar +1 + 8ar = 3r + 2 – 5. 3 [Osmonia (B.E.) 2006, 2008; R.G.P.V. (B.E.) Raipur 2009]
(xv) ar + 3 – 3ar + 2 + 3ar +1 – ar = 24(r + 2) [Kurukshetra (B.E.) 2005, 2008; Delhi (B.E.) 2009]
Solution:(i) The given recurrence relation is
ar + 6ar –1 + 9ar – 2 = 3 ...(1)
The characteristic equation of (1) is given as
α2 + 6α + 9 = 0 ⇒ (α + 3)2 = 0 or α = – 3, – 3
Therefore, the general homogeneous solution is
ar = ( A1 + A2r)(– 3)r ...(2)

Since (– 3) is a characteristic root of multiplicity 2, the general form of particular solution of (1) is given as
ar = A3 + A4 r + A5r2 ...(3)
Put this expression in (1), we get
{ A3 + A4 r + A5r2} + 6 { A3 + A4 (r – 1) + A5(r – 1)2}
+ 9 { A3 + A4 (r – 2) + A5(r – 2)2} = 3
⇒ 16 A5 r2 + (16 A4 – 48 A5 ) r + (16 A3 – 24 A4 + 42A5 ) = 3
Comparing like terms on both sides, we get
3
16 A5 = 0 ⇒ A5 = 0 , 16 A4 – 48 A5 = 0 ⇒ A4 = 0 , and 16 A3 – 24 A4 + 42A5 = 3 ⇒ A3 =
16
3
Then from (3) ar =
16
Hence, total solution as (i) is
ar = homogeneous solution + particular solution
3
⇒ ar = ( A1 + A2r)(–3)r + ...(4)
16
The given boundary condition is a0 = 0, a1 = 1
Put r = 0, 1 in (4), we get
3 3
a0 = A1 + , a1 = ( A1 + A2 )(– 3) +
16 16
3 3
or o = A1 + , 1 = ( A1 + A2 )(– 3) +
16 16
–3 −1
⇒ A1 = and A2 =
16 12
Put these value in (4), we get required solution
–3 1  3
ar =  − r (– 3)r +
 16 12  16
620 Discrete Mathematical Structures

(ii) The given recurrence relation is


ar – 6ar –1 + 8ar – 2 = r. 4r ...(1)
given a0 = 8, a1 = 22
The characteristic equation of (1) is
α 2 – 6 α + 8 = 0 or (α – 2)(α – 4) = 0 ⇒ α = 2, 4
Therefore, the homogeneous solution is
ar = A1 2r + A2 4r ...(2)
The general form of particular solution is
ar = r( A3 + A4 r)4r ...(3)
Put this relation (1), we find
{r( A3 + A4 r)4r } – 6 {(r – 1){( A3 + A4 (r – 1)}4r –1 } + 8 {(r – 2){ A3 + A4 (r – 2)} 4r – 2} = r. 4r
This expression holds for all values of r and in particular for r = 0, we have
3
(– A4 + A3 )– (–2A4 + A3 ) = 0 or A3 + A4 = 0 ...(4)
2
For r = 1, we get
4 ( A4 + A3 ) – 2 (– A4 + A3 ) = 4
or 3A4 + A3 = 2 ...(5)
On solving (4) and (5), we find A4 = 1, A3 = – 1
Therefore, the particular solution of (1) is given from (3) ar = r(r – 1) 4r
Hence, the general (total) solution is
ar = homogeneous solution + particular solution
⇒ ar = A1 2r + A2 4r + r(r – 1) 4r ...(6)
The initial condition a0 = 8, a1 = 22
Put r = 0 , 1 in (6) , we get
a0 = A1 + A2 ⇒ A1 + A2 = 8 ...(7)
a1 = 2A1 + 4 A2 ⇒ 2A1 + 4 A2 = 22 ...(8)
Solve (7) and (8), we find A1 = 5, A2 = 3
Hence, required total solution is ar = 5. 2r + 3. 4r + r(r − 1) 4r
(iii) The given recurrence relation is ar + 2 – 2ar +1 + ar = 2r ...(1)
2 2
The characteristic equation of (1) is α – 2α + 1 = 0 or (α – 1) = 0 or α = 1, 1
r
Therefore, the general homogeneous solution is ar = ( A1 + A2r)(1) ...(2)

The general form of particular solution of (1) is given as ar = A3 2r ...(3)


Put this in the given recurrence relation
A3 2r + 2 – 2A3 2r +1 + A3 2r = 2r
⇒ 4 A3 – 4 A3 + A3 = 1 or A3 = 1
Put in (3) ⇒ ar = 2r ...(4)
Hence, general (total) solution is ar = ( A1 + A2r) + 2r ...(5)
Now, applying the initial condition a0 = 2, a1 = 1 in (5)
Recurrence Relations 621

Put r = 0, 1 in (5), we find


a0 = A1 + 1 ⇒ A1 + 1 = 2 ⇒ A1 = 1
a1 = A1 + A2 + 2 ⇒ A1 + A2 + 2 = 1 ⇒ A2 = – 2
∴ ar = (1 – 2r)(1)r + 2r
(iv) We have the recurrence relation
s(k )– 9s(k – 1) + 8s(k – 2) = 9k + 1, s(0) = s(1) = 1
or
ak – 9ak –1 + 8ak – 2 = 9k + 1, a0 = a1 = 1 ...(1)
The characteristic equation of (1)
(α )2 − 9 α + 8) = 0 or (α − 8)(α − 1) = 0 or α = 1, 8
k k
Therefore, the general homogeneous solution is ak = A1 (1) + A2(8)
The general form of particular solution of (1) is given as ak = A1 k + A2k 2 ...(2)
Put this value in (1), we get
( A1 k + A2k 2 )– 9( A1 (k – 1) + A2(k – 1)2 ) + 8 { A1 (k – 2) + A2(k – 2)2} = 9k + 1
Comparing the like term on both sides we get
– 221 –9
A1 = , A2 =
98 14
Put in (2)
–221 9 2
ak = k– k ...(3)
98 14
221 9 2
Hence, general solution is ak = A1 (1)k + A2(8)k – k– k ...(4)
98 14
(v) The given recurrence relation is ar – 5ar –1 + 6ar – 2 = 7 r ...(1)
The characteristic equation of (1) is given
α 2 – 5α + 6 = 0 ⇒ (α – 3)(α – 2) = 0 or α = 2 , 3.
Therefore, the homogeneous solution is ar = A1 2r + A2 3r ...(2)
r
The general form of particular solution of (1) is given as ar = A 7 ...(3)
Where A is constant
Put (3) in (1), we get
49
A 7 r – 5A 7 r –1 + 6 A 7 r – 2 = 7 r or 49 A – 35A + 6 A = 49 or A =
20
Put in (3)
49 r
ar = 7 ...(4)
20
Hence, general solution is
49 r
ar = A1 2r + A2 3r + 7
20
(vi) an = 2an–1 + 3an– 2 + 5n, n ≥ 2 and a0 = – 2, a1 = 1 ...(1)

The characteristic equation of (1) is


α 2 – 2α – 3 = 0 ⇒ ( α – 3)(α + 1) = 0 or α = – 1, α = 3
622 Discrete Mathematical Structures

Therefore, the homogeneous solution is an = A1 (–1)n + A2(3)n ...(2)

The general form of particular solution of (1) is an = A 5n ...(3)


Where A is constant, Put (3) in (1), we obtain
25
A 5n – 2A 5n–1 − 3A 5n– 2 = 5n ⇒ 25 A – 10 A – 3A = 25 ⇒ 12A = 25, A =
12
25 n
Put in (3) an = 5 ...(4)
12
25 n
Hence, general solution is an = A1 (–1)n + A2(3)n + 5 ...(5)
12
Applying the initial conditions a0 = – 2, a1 = 1 . Put n = 0, 1 in (5)
25 125
a0 = A1 + A2 + and a1 = – A1 + 3A2 +
12 12
25 125
or A1 + A2 + =–2 and – A1 + 3A2 + =1
12 12
–17 –27
⇒ A1 = , A2 =
24 8
Put in (5), we get
–17 27 25 n
an = (–1)n – (3)n + 5
24 8 12
(vii) The given recurrence relation ar – 4 ar –1 + 4 ar – 2 = 2r ...(1)
2 2
The characteristic equation is α – 4 α + 4 = 0 (α – 2) = 0 or α = 2, 2
r
Therefore, the homogeneous solution is ar = ( A1 + A2r)2 ...(2)
Since 2 is a characteristic root of multiplicity 2, the general form of the particular solution of (1) is
ar = Ar2 2r ...(3)
Put this in (1), we find
Ar2 2r – 4 A(r – 1)2 2r –1 + 4 A(r – 2)2 2r – 2 = 2r
⇒ A = 1/2
1
Put in (3) ar = rr 2r
2
1 2 r
The general solution ar = ( A1 + A2r)2r + r 2 ...(1)
2
(viii) The given recurrence relation is ar + 4ar –1 + 4ar – 2 = r2 – 3r + 5 ...(1)
The characteristic equation of (1) is
α 2 + 4α + 4 = 0 ⇒ (α + 2)2 = 0 or α = –2, – 2
r
Therefore, the homogeneous solution is ar = ( A1 + A2r)(–2) ...(2)
The general form of particular solution of (1) is ar = ( A3 + A4 r + A5r2 ) ...(3)
Put this value in (1), we find
( A3 + A4 r + A5r2 ) + 4 { A3 + A4 (r – 1) + A5(r – 1)2} + 4 { A3 + A4 (r – 2) + A5(r – 2)2} = r2 – 3r + 5
7 13 1
Comparing like power of r on both sides then solve, we get A3 = , A4 = , A5 =
9 27 9
Recurrence Relations 623

1  13 
Then put in (3), we get ar = 7 – r + r2
9  3 
1 13 
Therefore, the total solution is ar = ( A1 + A2r)(–2)r + 7 – r + r2
9  3 

(ix) This part is similar to part (x)


(x) The given recurrence relation is ar – 5ar –1 + 6ar – 2 = 2r + r ...(1)

with boundary conditions a0 = 1, a1 = 1.


Therefore, the characteristic equation of (1) is
α 2 – 5α + 6 = 0 or (α – 3)(α – 2) = 0 or α = 2, 3
Therefore, the general homogeneous solution of given equation (1) is
ar = A1 2r + A2 3r ...(2)
The general form of particular solution is
ar = A3 r2r + A4 r + A5 ...(3)
Put this relation in (1), We get
( A3 r2r + A4 r + A5 )– 5{ A3 (r – 1)2r –1 + A4 (r – 1) + A5} + 6 { A3 (r – 2) 2r – 2 + A4 (r – 2) + A5} = 2r + r
 5 3  r 5  r
⇒  A3 – A3 + A3  r2 +  A3 – 3A3  2 + [ A5 + 5A5 + 5A4 + 6 A5 – 12A4 ]
 2 2  2 
+ [ A4 – 5A4 + 6 A4 ] r = 2r + r
–1
or A3 2r + ( 2A5 – 7 A4 ) + 2A4 r = 2r + 1
2
Comparing like power on both sides, we get
1
– A3 = 1, 2A5 − 7 A4 = 0 , 2A4 = 1
2
1 7
⇒ A3 = –2, A4 = , A5 =
2 4
Put these values in (3), we get particular solution.
1 7
ar = – 2r2r + r+
2 4
Hence, the total solution of (1) is
1 7
ar = A1 2r + A2 3r – 2r. 2r + r+ ...(4)
2 4
Put r = 0, 1 in (4) then used a0 = 1, a1 = 1 , we find
7 1 7
1 = A1 + A2 + and 1 = 2A1 + 3A2 – 4 + +
4 2 4
3
or A1 + A2 = – ...(5)
4
11
2A1 + 3A2 = ...(6)
4
17
On solving (5) and (6), we get A1 = – 5, A2 =
4
17 r 1 7
Hence the required solution of (1) is ar = –5. 2r + . 3 – 2r. 2r + r +
4 2 4
624 Discrete Mathematical Structures

(xi) The given recurrence relation is ar – 4ar –1 + 4ar – 2 = (r + 1)2r ...(1)


with boundary conditions a0 = 1, a1 = 2, a2 = 3.
The characteristic equation of the given recurrence relation is
α 2 – 4α + 4 = 0 ⇒ (α – 2)2 = 0 or α = 2, 2
r
Hence, the homogeneous solution is ar = ( A1 r + A2 )2 ...(2)
Since 2 is a characteristic root of multiplicity 2, the general form of particular solution is
ar = r2( A3 r + A4 ). 2r ...(3)
Put this relation in (1), we find
r2( A3 r + A4 )2r – 4 {(r – 1)2( A3 (r – 1) + A4 )2r –1 } + 4 {(r – 2)2( A3 (r – 2) + A4 )} = (r + 1)2r
⇒ A3 {r3 – 2(r – 1)3 + (r – 2)3 }2r + A4 {r2 – 2(r – 1)2 + (r – 2)2}2r = (r + 1)2r
⇒ A3 (6r – 6) 2r + 2A4 2r = (r + 1) 2r
⇒ 6 A3 r2r + (–6 A3 + 2A4 )2r = r2r + 2r
Comparing the like terms on both sides
6 A3 = 1 and – 6 A3 + 2A4 = 1 ⇒ A3 = 1/6 and A4 = 1
Put these value in (3)
r 
ar = r2  + 1 2r
6 
r 
Hence, the required total (general) solution is ar = ( A1 r + A2 )2r + r2  + 1 2r
6 
(xii) The given recurrence relation is ar – 4ar –1 + 4ar – 2 = (r + 1)2 ...(1)
The characteristic equation of (1) is
α 2 – 4α + 4 = 0 ⇒ (α – 2)2 = 0 or α = 2, 2
r
Therefore, the homogeneous solution of (1) is ar = ( A1 + A2r)2 ...(2)
2
The general form of particular solution is ar = A3 + A4 r + A5r ...(3)
Put this relation in, we find
{ A3 + A4 r + A5r2} – 4 { A3 + A4 (r – 1) + 5(r – 1)2} + 4 { A3 + A4 (r – 2) + 5(r – 2)2] = 1 + 2r + r2
⇒ ( A3 – 4 A3 + 12A5 ) + ( A4 – 8 A5 )r + A5r2 = 1 + 2r + r2
Comparing like terms on both sides, we obtain
A3 – 4 A4 + 12A5 = 1, A4 – 8 A5 = 2, A5 = 1
On solving these equations, we obtain A3 = 29, A4 = 10, A5 = 1
Put these value in (3), we get particular solution ar = 29 + 10 r + r2
Hence, the required total or general solution of (1) is ar = ( A1 + A2r)2r + 29 + 10r + r2
(xiii) The given recurrence relation is 6ar – 7 ar –1 – 20ar – 2 = 3r2 – 2r + 8 ...(1)
The characteristic equation of given recurrence relation is
5 –4
6α 2 – 7α – 20 = 0 or (2α – 5)(3α + 4) = 0 or α = ,
2 3
r r
 5  – 4
Therefore, the homogeneous solution is, ar = A1   + A2   ...(2)
 2  3
The particular solution of given equation (1) is ar = A3 r2 + A4 r + A5 ...(3)
Recurrence Relations 625

Put this expression in (1), we obtain

6 { A3 r2 + A4 r + A5} – 7{ A3 (r – 1)2 + A4 (r – 1) + A5} –20 { A3 (r – 2)2 + A4 (r – 2) + A5} = 3r2 – 2r + 8


⇒ –21 A3 r2 + (94 A3 – 21 A4 ) r + (–87 A3 + 47 A4 – 21 A5 ) = 3r2 – 2r + 8
Comparing like term on both sides, we get
–21 A3 = 3, 94 A3 – 21 A4 = –2, and – 87 A3 + 47 A5 = 8
On solving these equations, we get
1 80 3109
A3 = – , A4 = – , A5 = –
7 147 3087
r2 80r 3109
Thus, the particular solution is ar = – – –
7 147 3087
r r
 5  4 r2 80 r 3109
Hence, the required general solution is ar = A1   + A2  –  – – –
 2  3 7 147 3087
(xiv) The given recurrence relation is ar + 2 – 6ar +1 + 8ar = 3r2 + 2 – 5. 3r ...(1)
The characteristic equation of given recurrence relation is
α2 – 6α + 8 = 0 or (α – 2)(α – 4) = 0 or α = 2, 4
r r
Thus, the homogeneous solution is ar = A1 2 + A2 4 ...(2)
2 r
The general form of particular solution of (1) is ar = ( A3 r + A4 r + A5 ) + A6 3 ...(3)
Put this value in (1), we find
{ A3 (r + 2)2 + A4 (r + 2) + A5} + A6 3( r + 2) – 6 { A3 (r + 1)2 + A4 (r + 1) + A5 + A6 3r +1 }
+8 { A3 r2 + A4 r + A5 + A6 3r } = 3r2 + 2 − 5. 3r
Comparing coefficients of like terms on both sides, we get
3A3 = 3, 3A4 – 8 A3 = 0 , 3A5 – 4 A4 – 4 A4 – 2 A3 = 2, 9 A6 – 18 A6 + 8 A6 = –5
44
or A3 = 1, A4 = 8/3 , A5 = , A6 = 5
9
Then, particular solution is
8 44
ar = r2 + r + + 5. 3r
3 9
8 44
Hence, required total (general) solution is ar = A1 2r + A2 4r + r2 + r + + 5. 3r
3 9
(xv) The given recurrence relation is ar + 3 – 3ar + 2 + 3ar +1 – ar = 24 (r + 2) ...(1)
The characteristic equation of given recurrence relation is
α 3 – 3α 2 + 3α – 1 = 0 ⇒ (α – 1)3 = 0 or α = 1, 1, 1
2
Hence, the general homogeneous solution is ar = A1 r + A2r + A3 ...(2)
Since (1) is the characteristic root of multiplicity 3, the general form of particular solution of (1) is given as
ar = A4 r4 + A5 r3 ...(3)
Put this relation in (1), we find.
{ A4 (r + 3)4 + A5(r + 3)3 } – 3{ A4 (r + 2)4 + A5(r + 2)3 } +3{ A4 (r + 1)4 + A5(r + 1)3 } – { A4 r4 + A5r3 } = 24r + 48
Then 24 A4 r + 36 A4 + A5 = 24r + 48
or 24 A4 = 24, 36 A4 + A5 = 48
On solving, we get A4 = 1, A5 = 12
626 Discrete Mathematical Structures

Then from (3), we get ar = r4 + 12r3 ...(4)


Hence total solution of (1) is
ar = homogeneous solution + particular solution
⇒ ar = A1 r3 + A2r + A3 + r4 + 12r3 .

12.4 Recursive Algorithm [Delhi (B.E.) 2005, 2009; M.K.U. (B.E.) 2007, 2009]

An algorithm is a finite step-by-step list of well defined instructions to perform a certain task.

Illustration: To find out the output f ( x ) for a given function f with input X where X = list of values.
The list of instructions given to the computer to compute f ( x ) will be an algorithm. The particular choice of
the algorithm to compute f ( x ) may be depend on complexity of the algorithm.

Illustration: If you purchase a new car, then the instruction sheet that comes with the new car is an
algorithm for assembling the car.

12.4.1 Recursively Defined Function [U.P.T.U. (B.Tech.) 2005]

A function is called Recursively Defined if the function of the function refers to itself, and satisfying the
following steps:
(i) There must be certain arguments for which the function does not refer to itself, these arguments are
called Base Values.
(ii) Each time function does not refer to itself, the argument of the function must be closer to a base
value.
Illustration: Let us consider a numeric function
a = (3° , 31 , 32, . . . . 3r , . . . ) or ar = 3r , r ≥ 0
But the numeric function a = (3° , 31 , 32, . . . 3r K ) can be represented as ar = 3 ar –1 ...(1)
Together with initial condition a0 = 1. This relation is called a recursive specification of the value of a at r. If
we are to given ar –1 then ar can be determine as 3 time ar –1 . Again if we know the value of ar – 2, then ar −1 can
be determined as 3 time ar −2 and so on. Hence to determine the value of ar for any r. For this we have to
know a0 , where a0 is the base value.
Example 7: Calculate 15 using recurrence definition. [P.T.U. (B.E.) Punjab 2006; U.P.T.U. (B. Tech.) 2005]

Solution: We have to find 11 steps.


(1) 5 = 5. 4 (2) 4 = 4. 3 (3) 3 = 3. 2 (4) 2 = 2. 1
— — — — — — — —
(5) 1 = 1. 0 (6) 0 = 1 (7) 1 = 1.1 = 1 (8) 2 = 2.1 = 2
— — — — —
(9) 3 = 3. 2 = 6 (10) 4 = 4 . 6 = 24 (11) 5 = 5. 24 = 120
— — —
This also definition of recursive of factorial function
Recurrence Relations 627

Exercise
@ Recurrence Relation
1. Solve the following recurrence relation
(i) ar + 3ar –1 = 0 (ii) ar + 4ar –1 + 4ar – 2 = 0
(iii) ar – 4ar –1 + 6ar – 2 – 4ar – 3 + ar – 4 = 0 (iv) ar – 8ar –1 + 15ar – 2 = 0
(v) ar + ar –1 – ar – 2 – ar – 3 = 0 (vi) ar + ar – 4 = 0

2. Solve the following recurrence relations:


(i) ar + 3ar –1 + 2ar – 2 = 0, given that a0 = 1 and a1 = 2
(ii) ar – 7 ar –1 + 10ar – 2 = 0, given that a0 = 0 and a1 = 3
(iii) 2 ar − 5 ar –1 + 2 ar – 2 = 0, given that a0 = 0 and a1 = 1
3 1 1
(iv) ar – ar –1 + ar – 2 = 0 , given that a0 = 0 and a1 =
2 8 4
(v) ar + 2ar –1 + 2ar – 2 = 0, given that a0 = 0 and a1 = – 1
(vi) ar – 6ar –1 + 8ar – 2 = 0, given that a0 = 3 and a1 = 2, find also a5

3. Solve the following recurrence relations


(i) ar – 6ar –1 + 8ar – 2 = 3r2 – 12 r + 14
(ii) 6ar – 7 ar –1 – 20ar – 2 = 3r2 – 14r + 24 [P.T.U. (B.E.) Punjab 2007]
r
(iii) ar – ar – 2 = 9. 3 [R.G.P.V. (B.E.) Bhopal 2004, 2008]

4. Solve the following recurrence relation (difference equation).


(i) ar + 2 – 3ar +1 + 2ar = 2r (ii) ar + 2 – 5ar +1 + 6ar = 4r

(iii) ar + 2 – 6ar +1 + 8ar = 3r2 + 2 (iv) 2ar + 2 – 3ar +1 + ar = r2− 4r + 3

(v) ar + 2 – 4ar = 9r2 (vi) ar + 3 + 2ar + 2 – 5ar +1 – 6ar = 32

(vii) ar + 3 + ar + 2 – 8ar +1 – 12ar = 2 r2 + 5 (viii) ar + 2 – 4ar +1 + 4ar = r2. 2r

5. Solve the following recurrence relations.


(i) Sk – 2Sk –1 + Sk – 2 = 2 with So = 25, S1 = 16
(ii) G k – 7G k –1 + 10 G k – 2 = 6 + G k with G 0 = 1, G1 = 2
[Delhi (B.E.) 2004, Nagpur (B.E.) 2005, 2007; Pune (B.E.) 2008]

(iii) ar – 3ar –1 – 4 ar – 2 = 4r (iv) ur − 4 ur –1 + 4 ur − 2 = 3r + 2r

(v) ar = 7 ar −1 − 10 ar − 2, a0 = 4, a1 = 17 (vi) ar − 8 ar −1 + 16 ar − 2, a2 = 16, a3 = 80


(vii) ar − 4 ar –1 + 11ar – 2 + 30ar − 3 = 0 given the initial condition a0 = 0, a1 = – 35, a2 = – 85
(viii) ar = ar –1 + 6ar – 2 – 30 with a0 = 20, a1 = −5
(ix) dr = 2dr –1 – dr – 2 with d1 = 1. 5 and d2 = 3 [U.P.T.U. (M.C.A.) 2002, 2005]
628 Discrete Mathematical Structures

6. Solve the following recurrence relation


(i) an+1 – 1. 5 an = 0, n ≥ 0
(ii) an = 5an–1 + 6an– 2, n ≥ 0, a0 = a1 = 3 [U.P.T.U. (B.Tech.) 2005, 2006, 2007]
(iii) ar – 2ar –1 – 3ar – 2 = 0, r ≥ 0 , a0 = 3, a1 = 1

7. Given that a0 = 0, a1 = 1, a2 = 4 and a3 = 12, satisfy, the recurrence relation an + c1 an–1 + c2an– 2 = 0
determine an .

8. Show that ar = –2. (2)r is the solution of the non-homogeneous linear recurrence relation
ar = 3ar –1 + 2r .

9. Identify each of the given recurrence as linear homogeneous of constant coefficient. If the relation is
a linear homogenous relation, gives its degree.

(i) ar = 3ar –1 (ii) ar = 3ar –1 – 2ar – 2 (iii) ar = ar2–1 + ar – 2 (iv) ar = 3r ar –1

10. Find the first four terms of the sequence defined by each of the recurrence relations and initial
conditions.
(i) an = an2–1 (ii) bk = bk –1 + 2bk – 2 (iii) bk = kbk –1 + k 2bk – 2

11. Find a recurrence relation for the number of ways a persons can climb n steps when
(a) (i) the person can skip at most one step at a time (ii) at most two steps at a time
(b) What are the initial conditions?
12. What is meant by recursively defined function? Give the recursive definition of factorial function.
[U.P.T.U. (B.Tech.) 2006]
13. Write a short note on recursive algorithm.
[P.T.U. (B.E.) Punjab 2005; Rohtak (M.C.A.) 2002, 2004, 2008; Delhi (B.E.) 2007]

14. What is the recurrence relation for the nth fibonacci number Fn?
Recurrence Relations 629

1. (i) ar = A(–3)r (ii) ar = ( A1 r + A2 )(–2)r

(iii) ar = A1 r3 + A2 r2 + A3 r + A4 (iv) ar = A1 5r + A2 3r

(v) ar = ( A1 r + A2 )(–1)r + A3 (vi) ar = ( A1 cos (θ1 r) + A2 sin (θ1 r) + ( A3 cos (θ 2r) + A4 sin (θ 2r)

2. (i) ar = A1 (–2)r + A2(–1)r , ar = (–3)(–2)r + 4 (–1)r

 2   1 
r r
(ii) ar = 5r – 2r (iii) ar =   2r –   
 3   2 
 
r r r r
 1  1  1  1
(iv) ar = A1   + A2   , ar =   –  
 2  4  2  4

 3πr 3πr  3πr


(v) ar = (2)r/ 2  A1 cos + A2 sin , ar = (2)r / 2 cos
 4 4  4

(vi) ar = A1 , 22 + A2 4r , ar = 5. 2r + (–2). 4r , a0 = –1888


r r
8 44  5  – 4 r2 4 1513
3. (i) ar = A1 2r + A2 4r + r2 + r+ (ii) ar = A1   + A2   – + r–
3 9  2  3 7 147 3087
9 –r
(iii) ar = A1 + A2(–1)r – 3
8
4. (i) ar = A1 2r + A2 + r2r –1 (ii) ar = A1 2r + A2 3r + 4r/2
r
8 44  1 r3 9r2 127
(iii) ar = A1 2r + A. 4r + r2 + r+ (iv) ar = A1 + A2   + – +
3 9  2 3 2 6
20
(v) ar = A1 2r + A2(–2)r – 3r2 – 4r – (vi) ar = A1 (–1)r + A2 2r + A3 (–3)r – 4
3
r2 r 17 2r 4
(vii) ar = A1 . 3r + ( A2r + A3 )(–2)r – + – (viii) ar = ( A1 r + A2 )2r + (r – 4r3 + 5r2 − 2r)
9 27 54 48
5. (i) Sk = 25 – 10k + k 2 (ii) G k = −9(2k ) + 2. (5)k + (8 + 2k )

4r(4)r
(iii) ar = A1 (–1)r + A2(4)r + (iv) ur = (r2 + 7 r − 22)2r –1 + (12 + 3r)
5
(v) ar = 1. (2)r + 3(5)r (vi) ar = (2 + r)4r –1

(vii) ar = 4 (–3)r + 1. (2)r + (−5)5r (viii) ar = 11(−2)r + 4 ⋅ (3)r + 5


3
(ix) dr = r
2
6 15
6. (i) an+1 = (1. 5)n+1 a0 (ii) an = (6)n + (–1)n
7 7
(iii) ar = 2 – 3r
630 Discrete Mathematical Structures

7. an = n ⋅ 2n–1

9. (i) yes, degree 1 (ii) yes, degree 2 (iii) No


10. (i) 2, 4, 16, 256 (ii) 1, 1, 3, 5 (iii) 1, 1, 6, 27
11. (a) (i) an = an–1 + an– 2, n ≥ 2 (ii) an = an–1 + an– 2 + an– 3 , n ≥ 3
(b) (i) a1 = 1, a2 = 2 (ii) a1 = 1, a2 = 2, a3 = 3
14. Fn = Fn−1 + Fn− 2 with F0 = 0, F1 = 1

Objective Type Quesitons


Multiple Choice Questions and Short Questions
1. The solution of recurrence relation 2ar = ar –1 is
(a) ar = A . 3 − 2 (b) ar = A . 3− r (c) ar = A . 2− r (d) none of these

2. The solution of recurrence relation ar − 16ar – 2 = 0 is


(a) ar = A1 4r + A2(–4)r (b) ar = A1 3r + A2 4r
(c) ar = A1 + A2r (d) None of these

3. The recurrence relation an = 7 an–1 + n3 is

(a) non-homogeneous of order 1 and degree 3


(b) non-homogeneous of order 1 and degree 1
(c) homogeneous of order 1 and degree 1
(d) none of these
4. The solution of recurrence relation 3ar + 8ar –1 + 4ar – 2 = 0 is
r
 –2
(a) ar = A.4r (b) ar = A1   + A2(–2)r
 3
4
 2
(c) ar = A1 (–2)r + A2  –  (d) none of these
 3

5. The characteristic roots of the characteristic equation ( x − 2)( x − 3)4 = 0 are

(a) x = 2 of multiplicity 1 and x = 3 of multiplicity 4


(b) x = 2 and x = 3 (c) x=2 (d) x=3
6. The recurrence s(n) = 2s(n – 1) + n for n ≥ 2 and s(n) = 1 evaluates to
(a) 2n+1 – n – 2 (b) 2n – n (c) 2n + n (d) 2n+1 – 2n – 2

7. The number of bacteria in a colony double every hour. If a colony begins with 5 bacteria, how many
bacteria will be there after 3 hour, 6 hours? 1900 hours? After n hours? Find a recurrence relation to
represent the same.
(a) an = an–1 + an– 2 (b) an = 3an–1 + 2an– 2 (c) an = 2an–1 (d) an = an–1 + 5
Recurrence Relations 631

8. Which of the following are linear non-homogeneous recurrence relations with constant coefficients?
Find the order
(a) an + an–1 = 3 (b) an– 2 + 5an–1 + 6an = 0
(c) an = nan–1 (d) an = 3an–1 + 2an– 2 + an– 3

State True or False


1. The solution of s(n) − ns(n − 1) = 0 is n! is true or false.

2. Say true or false


(i) an = 3an−1 + n2 is non homogeneous of order 1 and degree 1

(ii) an = n an − 2 + 2n is non homogeneous of order 2 and degree 1

(iii) an = an2−2 is no homogeneous of degree 2

(iv) an = an2−1 + an− 2 an− 3 an− 4 is homogeneous of order 4 and degree 3.

(v) an = an−1 + an− 2 + K + a0 is homogeneous of no order and degree 1

Fill in the Blank(s)


1. Recurrence relation for the closed from an = 2(7 n ) is .......... .

2. The sum of the co-efficient in the expansion of (w + x + y + z )5 is .......... .

3. The co-efficient of z n in the expansion of (1 − az )–1 is .......... .

4. The difference between highest and lowest subscripts of ar is called ......... .

5. The characteristic equation of Q (k ) + 2Q (k − 1) − 6 Q (k − 4) = 0 is ......... .


632 Discrete Mathematical Structures

Multiple Choice Questions


1. (c) 2. (a) 3. (b) 4. (b) 5. (a)

6. (d) 7. (c) 8. (a) No (b) yes, order 2 (c) No (d) yeas, order 3

State True or False


1. T 2. (i) T (ii) T (iii) F (iv) T (v) T

Fill in the Blank(s)


1. an+1 = 7 an, a0 = 2

2. 45

3. n − 1 + r C n(ar )

4. order of recurrence relation

5. λ 4 + 2λ 3 − 3λ 2 − 6 = 0

❑❑❑
Discrete Numeric and Generating Functions 633

13.1 Discrete Numeric Functions


A function whose domain is the set of non-negative integers and whose range is the set of real numbers is
called a Discrete Numeric Function or a Numeric Function. The numeric function often termed as
Sequence.

If a : N → R is a discrete numeric function, then a0 ,a1 , a2,... ar , ... denote the values of the function ‘ a ’ at
0, 1, 2, . . . r i.e. a(0) = a0 , a(1) = a1 , a(2) = a2 ... a(r) = ar K .

The numeric function ‘ a ’ is written as a = {a0 , a1 , a2, K ar K }

13.1.1 Representation of Numeric Functions


Numeric function can be written in any of the following ways:
(i) A numeric function can be specified by exhaustively listing its values, for example
(a0 , a1 , a2. . . ar , . . . ) or (100, 103, 114.27,...)
(ii) A numeric function can also be represented by writing down the explicit formula of its general
terms.

Illustrations

(1) f (r) or ar = 3r2 + 8, r ≥ 0 or a or f = 3r2 + 8

3 + 2r, 0 ≤ r ≤ 4
3r , 0≤r≤ 9 
(2) g(r) or br =  (3) h(r) or cr = 4 – r, r > 4 and r is odd
5r – 2, r ≥ 9 
4r, r > 4 and r is even

–5, r = 6, 7, 8. . . . .
(4) i (r) or dr =  (5) j (r) or er = 100 (2. 08)r , r ≥ 0
0 , otherwise

Illustration: Let ar denote the altitude of an aircraft in thousands of meters at the rth minute. Let the aircraft
takes of after spending 10 minutes on the ground, climbs up at a uniform speed at an altitude 10 thousand
meters in 10 minutes, starts to descend uniformly 2 hours of flying time and lands 10 minutes later. Then the
numeric function ar of the altitude of the aircraft is given by
634 Discrete Mathematical Structures

0 , 0 ≤ r ≤ 10
r − 10 , 11 ≤ r ≤ 20

ar = 10 , 21 ≤ r ≤ 130
140 – r , 131 ≤ r ≤ 140

0 , r ≥ 140

Example 1: In a process control system, monitoring device measures the temperature in side a chemical
reaction chamber once only 30 sec. Let ar denote the rth reading in degrees centigrade. Determine an expression
for ar if it is known that the temperature rises 100°C to 120°C at a constant rate in the first 300 sec and stays at
120°C from then on.

Solution: Let ar = rth reading and the temperature increase from 100 to 120°C at constant rate for first
300 sec.

Therefore, a0 = 100, a1 = 102, a2 = 104, ... a10 = 120 where the reading are taken at the interval of 30 sec.
Since temperature remain constant after 300 sec then
ar = 120, r ≥ 11.

Therefore the discrete numeric function ar can be defied as


100 + 2r, 0 ≤ r ≤ 10
ar = 
120 , r ≥ 11

Example 2: Every particle inside a nuclear reactor splites into three particles in each minute. If one particle
is inserted into the reactor every minute beginning at t = 0, express the process in the form of numeric function.
[R.G.P.V. (B.E.) Raipur 2009]

Solution: The number of particles in the reactor at t = 0 is a0 = 1

The number of particles in the reactor at t = 1 is a1 = 3 × 1 + 1 = 4 (as one particle is added at t = 1)

Similarly, the number of particles at t = 2 is


a2 = 3 × 4 + 1 = 13
The number of a particles at t = 3 is
a3 = 3 × 13 + 1 = 40 and so on
The number of particles in r minutes is
s = 1 + 4 + 13 + 40 . . .upto r terms

⇒ s = 1 + 4 + 13 + 40 + . . . + ar –1 + ar
s= + 1 + 4 + 13 + . . . . r terms
subtract
0 = 1 + 3 + 9 + 27 + . . . r term – ar
1(3r − 1) 1 r
or ar = 1 + 3 + 9 + 27 + . . . . . r term or ar = = (3 – 1)
3– 1 2
Discrete Numeric and Generating Functions 635

13.2 Manipulation of Numeric Functions


13.2.1 Sum of Numeric Functions [U.P.T.U. (M.C.A.) 2002]

Let a and b are two numeric functions. Then their sum a + b is a numeric function whose value at r is equal
to the sum of the values of the two numeric function a and b at r.

Illustration: Consider the two numeric functions a and b where


0 0≤r≤3  2 – 3r 0 ≤ r ≤ 2
ar =  – r and br = 
2 + 3, r≥4 2 r + 5, r≥3

2 − 3r , 0≤r≤2

Then cr = ar + br = 11 , r=3
2– r + 2 r + 8 , r ≥ 4

13.2.2 Product of Numeric Functions [U.P.T.U. (M.C.A) 2002]

Let a and b be two numeric functions. The product of a and b is denoted by ab is also numeric function
whose value at r is equal to the product of the values of two numeric function a and b at r
0 , 0 ≤r ≤ 3 2 – 3r , 0 ≤r ≤ 2
ar =  – r and br = 
 2 + 3 , r≥4 2r + 5 , r≥3
0 , 0≤ r≤3
Then cr = ar ⋅ br =  – r
(2 + 3)(2 r + 5) , r ≥ 4

Illustration: Consider two functions a and b where


1 , 0 ≤r ≤ 2  2r + 1 , 0 ≤r ≤1
ar =  and br = 
 3r , r≥3  r– 5 , r≥2
Then the sum of a and b is
2r + 2 , 0≤r≤ 1

cr = ar + br = –2 , r=2
4 r – 5 , r ≥3

The product of a and b is
2r + 1 , 0≤r≤ 1

dr = ar br = –3 , r=2
3r2 – 15r , r ≥3

13.2.3 Multiplication of Numeric Function by a Real Number


Let a be a number function and α be any real number. Then α a is a numeric function whose value at r is
equal to α time ar . The function α a is called a Scaled Version of a with scaling factor α.

Illustration: If a = 3r3 – 1 and α = 10 then α a = 10 (3r3 – 1)


636 Discrete Mathematical Structures

13.2.4 Numeric Function S i a


Let a be a numeric function and i a positive intiger. Then S i a is a numeric function whose value at r is 0 for
r = 0, 1, 2, ... i – 1 and is ai–1 for r ≥ i

Let the numeric function S ia be denoted by b. Then

1 , 0 ≤ r ≤ i −1
br = 
ar − i, r ≥i, r ≥i

denote the value of S ia at r.

Illustration: Consider the numeric function a where

1 , 0 ≤ r ≤ 10
ar = 
2 , r ≥ 11

Then S7 a is a numeric function whose value at r is given by

0 , 0 ≤ r ≤ 6
0 , 0≤r≤6 
br =  = 1 , 7 ≤ r ≤ 17
ar –7 , r ≥7 2 , r ≥ 18

13.2.5 Numeric Function S –i a


Let a be a number function and i be a positive integer. Then S – ia is a numeric function whose value at r is
ar + i for r ≥ 0 .

Illustration

Let a be a numeric function where


 1 , 0 ≤ r ≤ 10
ar = 
2 , r ≥ 11

Then S –5a is a numeric function defined by


1 , 0≤r≤5
br = 
2 , r ≥ 6

Illustration: Let
2 , 0≤r≤8
ar = 
5 , r≥ 9

be numeric function of value f. Then find br of the numeric function g = S 6 f and g = S –7 f .

For r = 0, 1, 2, 3, 4, 5 i . e. b0 = b1 = b2 = b3 = b4 = b5 = 0 i.e. br = 0, 0 ≤ r ≤ 5

For r ≥ 6, i = 6
Discrete Numeric and Generating Functions 637

b6 = a6 – 6 = a0 = 2
b = a
7 – 6 = a1 = 2
7
b
 8 = a 8 – 6 = a2 = 2
− − − − − − − − − − −

− − − − − − − − − − − , br = 2, 6 ≤ r ≤ 14
− − − − − − − − − − −

b12 = a12– 6 = a6 = 2
b13 = a 13 – 6 = a7 = 2

b14 = a14 – 6 = a8 = 2

b15 = a15– 6 = a9 = 5
b = a , br = 5, r ≥ 15
 16 16 – 6 = a10 = 5

and so on

0 0≤r≤5

Thus, br = 2 6 ≤ r ≤ 14
5 r ≥ 15

Now to find g = S –7 f .

b0 = a( 0 +7 ) = a7 = 2
b = a(1 +7 ) = a8 = 2
 1 2 , 0 ≤ r ≤ 1
b then br = 
= a( 2+7 ) = a9 = 5 5 , r≥2
 2
b3 = a( 3 +7 ) = a10 = 5

13.2.6 Accumulated Sum of a Numeric Function


Let a be a numeric function. Then the Accumulated sum of numeric function a is a numeric function b
whose value at r i.e. br be is given by
r
br = ∑ ai , r ≥ 0
i= 0

13.3 The Forward Difference and the Backward Difference of a Numeric Function
[Rohtak (B.E.) 2006; U.P.T.U. (M.C.A.) 2005]

The Forward Difference of a numeric function a is a numeric function denoted by ∆ a whose value at r is
given by
∆ar = ar +1 – ar , r ≥ 0

The backward difference of numeric function a is a numeric function denoted by ∇a whose value at r is
given by
∇ar = ar – ar −1 r ≥ 1
638 Discrete Mathematical Structures

Example 3: Determine (i) S 2a and S –2a (ii) ∆ a and ∇a


for the following numeric function.
2 , 0≤ r≤3
ar =  – r
2 , r≥4
[U.P.T.U. (M.C.A.) 2002; Uttranchal (M.C.A.) 2005, 2009; P.T.U. (B.E.) Punjab 2008]

Solution:
(i) The value of the numeric function b = S 2a is calculated as follows
br = 0, 0 ≤ 1 and br = ar –1 , r ≥ 2
Therefore, b0 = b1 = 0
b2 = a2– 2 = a0 = 2
b3 = a3 – 2 = a1 = 2
b4 = a4 – 2 = a2 = 2
b5 = a5– 2 = a3 = 2
b6 = a6 – 2 = a4 = 2–4 + 5

b7 = a7 – 2 = a5 = 2–5 + 5
and so on
∴ br = ar – 2 = 2−( r – 2) + 5
0 , 0 ≤r ≤1

Thus, br = 2 , 2≤r ≤ 5
2–( r – 2) + 5 , r≥6

The value of the numeric function c = S –2a is given by


cr = ar +2
∴ co = a0 + 2 = a2 = 2
c1 = a1 + 2 = a3 = 2
c2 = a2+ 2 = a4 = 2– 4 + 5

c3 = a3 + 2 = a5 = 2– 5 + 5
and so on
cr = cr + 2 = 2–( r + 2) + 5

2 0 ≤1
or cr =  – ( r + 2)
 2 r≥2

(ii) Value of numeric function b = ∆a is given by


br = ar +1 – ar
b0 = a1 – a0 = 2 – 2 = 0
b1 = a2 – a1 = 2 – 2 = 0
b2 = a3 – a2 = 2 – 2 = 0
Discrete Numeric and Generating Functions 639

49
b3 = a4 – a3 = (2– 4 + 5)– 2 =
16
b4 = a5 – a4 = (2– 5+ 5) – (2– 4 + 5) = 2– 5 – 2– 4

b5 = a6 – a5 = (2– 6 + 5) – (2– 5+ 5) = 2– 6 – 2– 4

and so on br = ar +1 – ar = 2– ( r +1 ) – 2– r = 2– r (2–1 – 1) = 2– ( r +1 )
0 0≤r≤2

Therefore, br = 49/16 r=3
– 2– ( r +1 ) r ≥ 4

Now to find the numeric function c = ∇a where


0 r=0
cr = 
ar − ar –1 r ≥1

Therefore c0 = 0
c1 = a1 – a0 = 2 – 2 = 0
c2 = a2 – a1 = 2 – 2 = 0
c3 = a3 – a2 = 2 – 2 = 0
c4 = a4 – a3 = 2– 4 + 5 – 2 = 2– 4 + 3 = 49/16

a5 = a5 − a4 = (2– 5 + 5)– (2– 4 + 5) = 2– 5 – 2– 4

a6 = a6 − a5 = (2– 6 + 5)– (2– 5 + 5) = 2– 6 – 2– 5

and so on cr = 2– r – 2– ( r –1 ) = 2– r – 2– r +1 = 2– r (1 – 2)

0 , 0≤r≤3

Thus, cr = 49 / 16 , r=4
– 2– r , r≥5

13.3.1 Convolution of Numeric Functions


Let a and b be two numeric functions. The Convolution of a and b, denoted by a ∗ b is numeric function c
such that
r
cr = ∑ ai br – i
i= 0

Example 4: Let a and b be two numeric functions defined as


ar = 2r , r ≥ 0 and br = 3r , r ≥ 0
obtain a * b. [Delhi (B.E.) 2006; R.G.P.V. (B.E.) Raipur 2008;
R.G.P.V. (B.E.) Bhopal 2001, 2002, 2007]

Solution: Let c be the convolution of a and b. Then


r r
cr = ∑ ai br – i = ∑ 2 i 3r – i, r ≥ 0
i= 0 i= 0
640 Discrete Mathematical Structures

Example 5: Let f and g be two numeric functions whose values at r i.e. ar and br are given as follows:
2 0≤r≤2
ar = 
0 r≥3

2 0≤r≤2
br = 
0 r≥3

Find f * g.

Solution: Let cr denote the value of the numeric function


h= f ∗ g at r, then
r
cr = ∑ ai br – i
i= 0

or cr = a0 br + a1 br –1 + a2br – 2 + . . . + ar bo
Putting r = 0, 1, 2, 3 . . . . . . we find

c0 = a0 b0 = 2. 2 = 4
c1 = a0 b1 + a1 b0 = 2. 2 + 2. 2 = 8
c2 = a0 b2 + a1 b1 + a2b0 = 2. 2 + 2. 2 + 2. 2 = 12
c3 = a0 b3 + a1 b2 + a2b1 + a3 b0 = 2. 0 + 2. 2 + 2. 2 + 0 . 2 = 8
c4 = a0 b4 + a1 b3 + a2b2 + a3 b1 + a4 b0 = 2. 0 + 2. 0 + 2. 2 + 0 . 2 + 0 . 2 = 4
c5 = a0 b5 + a1 b4 + a2b3 + a3 b2 + a4 b1 + a5b0 = 2. 0 + 2. 0 + 2. 0 + 0 . 2 + 0 . 2 + 0 . 2 = 0
Similarly, c6 = c7 = c8 . . . . . . = 0 V r ≥ 5

13.4 Asymptotic Behavior of Numeric Functions [U.P.T.U. (B.Tech.) 2009]

The way in which the value of the numeric function f or ar = {a0 , a1 , a2, . . . } varies for larger values of r is
called Asymptotic Behavior of that numeric function.

Illustrations
1. The value of numeric function ar = 6 (r ≥ 0) remains constant for increasing r
6
2. The value of ar = (r ≥ 0) decrease for increasing r.
r

13.4.1 Asymptotic Dominance


Suppose f and g are two numeric functions and m, k be positive constant if | br| ≤ mar or | br| ≤ m| ar| or
| f ( x )| ≤ c| g( x )| for r ≥ k

Than f is said to be asymptotically dominate g or g is said to be asymptotically dominated by f


Discrete Numeric and Generating Functions 641

Illustrations
1. br = (1 + 0. 04)5r asymptotically dominates ar = (1 + 0. 3r), r ≥ 0 for k = 9, and m = 1.

2. Let a and b be two numeric functions such that


3
ar = 2r + 3, r ≥ 0 and br = + 4, r ≥ 0
r
2 2
Then a asymptotically b because for m = and k = 3 we obtain | br| ≤ ar for r ≥ 3
3 3

13.4.2 Properties of Asymptotic Dominance


1. For any numeric function a,| a|, asymptotically dominates a.

2. If b is asymptotically dominated by a, then for any constant α, α b is asymptotically dominated by a.

3. If b is asymptotically dominated by a, then for any integer i , S ib is asymptotically dominated by S ia.

4. If both b and c are asymptotically dominated by a, then for any constants α and β, α b + β c is also
asymptotically dominated by a.

5. If c is asymptotically dominated by b and b is asymptotically dominated by a, then c is asymptotically


dominated by a.

13.5 O(f) or order f or BIG-OH of f [U.P.T.U. (B. Tech.) 2009]

Let f and g be two numeric functions, then f is O (g ) read as “ f is big-oh g” if there exist constant m and k
such that | f (n)| ≤ m| g(n)| V n ≥ k.

If f is o (g ), then rate of growth of f is not-greater then that of g. It can be write as g ∈ o ( f ) which is read as g
is of order f.

If the function be as log e n , n, n3 , 2n, then the values of these functions for certain values of n are given

below.

Function f(n)

n log 2n n n3 2n

5 3 5 53 25

10 4 10 103 210

100 7 100 106 2100

1000 10 1000 109 21000


642 Discrete Mathematical Structures

We observed that the function log 2n grow most slowly while function 2n grows most rapidly.

O ( f ) also denotes the set of all numeric functions that are asymptotically dominated by f If
 f = r2
 2
 g = 10r + 25
h = 5 – r
 1
 i = r2 log r – r2
 2
Then g is O ( f ), h is O ( f ), i is not O ( f ) and f is O (i ). Hence g is O ( f ) and h is O (i )

13.5.1 Some Results


1. f is O (| f|)

2. If b is O( f ), then α b is also O ( f ), α is constant and S ig is also O (S i f )

3. If both g and h are O ( f ), then α g + β h is O ( f ), α , B are constant.

4. If h is O (g ) and g is O ( f ), then h is O ( f )

5. It is possible that h is both O ( f ) and O (g ) while neither g is O ( f ) nor f is O (g ).

13.5.2 Big Omega Q(f) and Big theta θ(f) Notations [U.P.T.U. (B.Tech.) 2009]

For a numeric function f Q ( f ) denotes the set of all numeric functions g, such that there exist positive
constant k and m with | br| ≥ mar , for r ≥ k (ar is positive) where ar , br are the values of function f and g at
r. If g is in Q ( f ), then grows at least as fast as f.

Example 6: The numeric function a is defined as


1 , 0 ≤ r ≤ 10
ar = 
2 , r ≥1

Determine (i) S 5a (ii) S –7 a


Solution:
(i) For the numeric function a, the numeric function S ia is given by
0 , 0 ≤ r ≤i – 1
(S ia)r = 
ar –1 , r ≥ i

0 0 ≤r ≤ 4

Put i = 5, (S 5a)r = 1 5 ≤ r ≤ 15
2 r ≥ 16

(ii) The numeric function S ia is defined as


(S – ia)r = ar + i, r ≥ 0

1, 0 ≤r ≤ 3
Put i = 7 then (S –7 a)r = 
2, r≥4
Discrete Numeric and Generating Functions 643

Example 7: Let a, b and c be numeric functions such that a * b = c . Given that


1 , r = 0
 1 , r = 0
ar = 2 , r = 1 and br = 
0 , r ≥ 2 0 , r ≥ 1

Determine b [U.P.T.U (B.Tech.) 2004; M.K.U. (B.E.) 2005, 2009; R.G.P.V. (B.E.) Bhopal 2002, 2003;
P.T.U. (B.E.) Punjab 2006, 2008; Uttranchal (M.C.A.) 2007]
r
Solution: We have cr = ∑ aibr – i
i= 0

or cr = a0 br + a1 br –1 + a2br − 2 + . . . + ar b0
Then, c0 = a0 b0 ⇒ 1 = 1. b0 or b0 = 1 = (–2)0
c1 = a0 b1 + a1 b0
⇒ 0 = 1. b1 + 2.1
⇒ b1 = – 2 = (–2)1
and c2 = a0 b2 + a1 b1 + a2b0
0 = 1. b2 + 2(– 2) + 0.1
⇒ b2 = 22 = (– 2)2

Continuous this way we get br = (– 2)r

Example 8: Let a and b be two numeric functions such that


r2
ar = r2 + r + 1, r ≥ 0 and br = – r – 2, r ≥ 0
2
Show that a asymptotically dominates b and b asymptotically dominates a
[Delhi (B.E.) 2007; Osmania (B.E.) 2008]

Solution: For k = 1 and m = 1, we have


| br| ≤ mar , r ≥ k
Thus a asymptotically dominates b
Again, for m = h and k = 7, we have
| ar| ≤ mbr , r ≥ 7
 r2 
as r2 + r + 1 ≤ 4  – r – 2 , r ≥ 5r + 9
 2 

Thus, b also asymptotically dominates a.

Example 9: For the following pairs of functions, determine their asymptotic behaviour
an = n2 log n
 3
bn = n [U.P.T.U. (B.Tech.) 2003]

Solution: b asymptotically dominates a if there exists two positive constant m and k such that
| an| ≤ m b, n r≥k
2 3
| n log n| ≤ mn r≥k
644 Discrete Mathematical Structures

Let m=2 n=4


2 3
| n log n| ≤ 2n r≥4
Which is always true for m = 2 and k = 4. Therefore, b asymptotically dominates a. But a does not
asymptotically dominate b.

Example 10: Show that O (log r) ⊂ O (r) .


limit log r
Solution: We have r→ ∞ r = 0

Then for any positive constant m, ∃ a positive integer k such that


log r
≤m whenever r ≥k
r

or |log r |≤ mr whenever r≥k

or log r is O (r) or O (logr) ⊂ O (r).

Example 11: Let a and b be two numeric functions given by


 1  1
a = r+O   and b= r+O 
 r  r

Show that ab = r3 / 2 + O ( r ). [Pune (B.E.) 2003, 2006, 2009]

Solution: We have
  1    1 
ab = r + O     r + O   
  r    r 

 1  1  1  1 
= r3 / 2 + r O   + r O   + O  O 
 r  r  r  r 

 1  1 
= r3 / 2 + O ( r ) + O   + O  3 / 2 
 r r 

= r3 / 2 + O ( r ) .

Example 12: Simplify the expression


  1 
log n + O  n  [ n + O ( n )].
[M.K.U. (B.E.) 2005]
Solution: We have
  1 
log n + O  n  [ n + O n )]

 1  1
= n log n + n O   + log n O ( n ) + O   O ( n )
 n  n
 1 
= n log n + O (1) + O ( n log n) + O  
 n
  1  
= n log n + O ( n log n) + O (1) Q O  n  ⊂ O (1)
 
= n log n + O ( n log n) [Q O (1) ⊂ O n log n)]
Discrete Numeric and Generating Functions 645

Example 13: Show that the numeric function a where

ar = α 0 + α 1r + α 2r2 + . . . + α nr,n

where α i ’s are constants is O (rn ) .

Solution: We have | ar| = |α 0 + α1 r + α 2r2 + K + α nrn| ≤|α 0|+|α1| r+|α 2| r2 + . . . +| α n| rn

≤ (|α 0|+|α1| + . . . + |α n|) rn

Now for k = |α 0|+|α1|+ K+|α n| and n = 1,


we have | ar| ≤ krn whenever r ≥ 1

Thus a is asymptotically dominated by rn. Consequently, a is O (rn ).

Example 14: Let f , g and h be three numeric functions whose rth terms are denoted by ar , br and cr respectively
and h = fg show that ∆cr = ar +1 (∆br ) + br (∆ar ) [Pune (B.E.) 2009]

Solution: We have ∆cr = cr +1 – cr = ar +1 br +1 – ar ⋅ br (cr = ar br ) = ar +1 br +1 – ar +1 br + ar +1 br – ar br


= ar +1 (br +1 – br ) + br (ar +1 – ar ) = ar +1 (∆br ) + br (∆ar )

f
Example 15: Let f and g be numeric functions whose values at r are denoted by ar and br . Let h = be the
g
quotient of f and g, whose value at r is denoted by cr , then prove that
br (∆ar ) – ar (∆br )
∆ cr =
br⋅ br +1 [Nagpur (B.E.) 2004, 2007]

ar +1 ar  a  a b − ar br +1 ar +1 br – br ⋅ ar + ar br – ar br +1
Solution: We have ∆cr = cr +1 – cr = – cr = r  = r +1 r =
br +1 br  br  br br +1 br +1 br

br (ar +1 – ar )– ar (br +1 – br ) br (∆ar )– ar (∆br )


= =
br +1 ⋅ br br +1 br

Exercise
@ Numeric Functions
1. A ball is dropped to the floor from a height of 40 cm. Suppose that the ball always rebounds to reach
half of the height from which it falls.
(a) Let ar denote the height it reaches in rth rebound. Sketch the numeric function a.

(b) Let br denote the loss in height during rthrebound. Express br in terms a r . Also sketch
the numeric function b.
(c) A second ball is dropped from a height of 15m to the same floor at the same time as
the first ball reaches the highest point of its second rebound. Let cr denote the
second ball reaches to its rthrebound. Express cr in terms of a r .
646 Discrete Mathematical Structures

2. The process of assigning n children to n sets in a class room can be brocken down into (i) choosing a
child for the first set and (ii) assigning the other (n – 1) children to the remaining sets. Let an denote
the number of ways of assignments of n children to n seats.
(a) write a recurrence relation an
(b) calculate a6 from the relation.

3. Let a and b be two numeric functions defined by


0 , 0 ≤r≤4 1 – 2r , 0 ≤ r ≤ 2
ar =  r , br = 
2 + 3 , r ≥ 5 r + 2 , r ≥ 3
obtain a+ b and a b

4. Let a be a numeric function such that


2 , 0 ≤r ≤3
ar =  – r
 2 + 5 , r≥4

find S 2a and S –2a

5. Determine the convolution a * b where ar = 1 V r ≥ 0 and br = 2r V r ≥ 0

6. Let a, b and c be numeric functions such that a * b = c . Given that


1 , r=0
 1 , r=0
ar = 2 , r =1 and cr = 
0 1 , r ≥1
, r ≥2

determine b

7. Let a be a numeric function such that


ar = r3 – 2r2 + 3r + 2

Determine ∆ a, ∆ 2 a, ∆ 3 a, ∆ 4 a

8. Let a be a numeric function such that ar is a polynomial of the form α 0 + α1 r + α 2r2 + K + α k rk

Show that ∆ k +1 a is equal to 0

9. Let a be a numeric function such that


0 , 0 ≤r ≤2
ar =  − r
2 + 5 , r ≥ 3
(a) Find ∆a and ∇ a (b) Show that S –1(∇a) = ∆a

10. Let a and b be two numeric functions such that


r2 –1000 , 0 ≤ r ≤ 10
ar = – 10, r ≥ 0 and br = 
10 –100 r , r > 10
Show that a asymptotically dominates b
Discrete Numeric and Generating Functions 647

11. Let a = 3r and b = 2r V r ≥ 0


(a) Show that a dominate b asymptotically (b) Does b dominate a asymptotically?
(c) Show that a * b dominate b asymptotically (d) Does a ∗ b dominate b asymptotically?

12. Let a = log r. Show that ε > 0, a is O (rε )

a + ar / 2 + a 2 + . . . + a i , r = 2i
13. Given a numeric function a, let br =  r r/2 r/2
0 , r ≠ 2i

If a is O ( r ), show that b is O ( r log r)

14. Let a and b be numeric functions such that


r 2 , if r is even 
ar =   and br = r2
2r , if r is odd 

Show that b asymptotically dominates a but a does not asymptotically dominate a.

15. Discuss the discrete numeric functions and their sum and product with example.
[U.P.T.U. (M.C.A.) 2002; R.P.V. (B.E.) 2008]

16. Consider the function f (n) = 2n and g(n) = 3n. Show that f is O (g ) but g is not O ( f ).
[U.P.T.U. (M.C.A.) 2001]

r
 1 3
1. (a) ar = 40  , r ≥ 0 (b) br = 40 – ar , r ≥ 0 (c) cr = ar , r ≥ 0
 2 2

2. an = nan–1 , n ≥ 1, a6 = 720

1 – 2r , 0≤r≤2
 0 , 0≤r≤4
3. a r + br = 2r + 2 , 8≤r≤4 , a r br = 
r . 2– r + 2– r +1 + 3r + 6 , r ≥5
2– r + r + 5 , r≥ 5 

0 , 0 ≤ r ≤1
2  2 , 0 ≤ r ≤1
4. S a = 2 , 2≤r ≤ 5 and S –2a =  – r
2– r + 5 , r ≥ 6 2 + 5 , r ≥2

5. a * b = 2r +1 – 1, r ≥ 0

6. br = (–2)r , r ≥ 0
648 Discrete Mathematical Structures

7. ∆ar = 3 r(r − 1) + 2r + 2, ∆ 2ar = 6 r + 2, ∆ 3 ar = 6, ∆ 4 ar = 0

9. Let b = ∆ a and c = ∇a. Then


0 , 0 ≤r≤ 2 0 , 0 ≤r≤ 3
 49  49
br =  , r=3 , cr =  , r=4
 16–( r +1 )  16– r
 –2 , r≥4  –2 , r ≥ 5

11. (b) b does not dominate a (d) a * b dominate b asymptotically.

13.6 Generating Functions


If {a1 , a2, a3 , K anK } is a sequence of real or complex numbers, then the power series given by

A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . + anz n + . . .
r =0

is called the Generating Function for the given sequence.


{an}∞n=1 , where an = coefficient of z n in A(z ) = (n + 1)th term in this series

or
Let (a0 , a1 , a2, . . . ar , . . . ) be a numeric function a. Then the infinite series in terms of a parameter z,

a0 + a1 z + a2 z 2 + K + ar z r

is called Generating Function of the numeric function a


The following table given generating functions for some simple numeric functions:

General term of numeric Generating function


S. No.
function a A( z )
1
1. ar = 1 A(z ) =
1–z
z
2. ar = r A(z ) =
(1 – z )2
z(z + 1)
3. ar = r2 A(z ) =
(1 – z )3
2z
4. ar = r(r + 1) A(z ) =
(1 – z )3

5. ar = nC r A(z ) = (1 + z )n
1
6. ar = α r A(z ) =
1 – az
Discrete Numeric and Generating Functions 649

Theorem 1: Let a, b and c be numeric functions and let A(z ), B(z ), and C (z ) be respectively the generating
functions of a, b and c. Show that
(i) If br = αar , for some constant α, then B(z )=α A(z )

(ii) If cr = ar + br , then C (z ) = A(z ) + B(z )

(iii) If c is the convolution of a and b; i.e.c = a * b, then C (z ) = A(z )B(z )

(iv) If br = ar ar , where α is a constant, then B(z ) = A(αz ).

Proof: (i) Let br = α ar , r ≥ 0.


a = (a0 , a1 , a2, . . . , ar , . . . ) and b = (b0 , b1 , b2, . . . , br , . . . )
2 r
Then A(z ) = a0 + a1 z + a2z + K + ar z + K

and B (z ) = b0 + b1 z + b2z 2 + K + br z r + . . .

= αa0 + αa1 z + αa2z 2 + K + αar z r + K [Q br = αar , r = 0, 1, 2, 3, . . . ]

= α (a0 + a1 z + a2z 2 + K + ar z r + K ) = αA(z ).

(ii) Let cr = ar + br , r ≥ 0.
Let the generating function of c be
C (z ) = c0 + c1 z + c2z 2 + K + cr z r + K .

Then C (z ) = (a0 + b0 ) + (a1 + b1 )z + (a2 + b2 )z 2 + K + (ar + br )z r + . . .

= (a0 + a1 z + a2z 2 + K + a r z r + K ) + (b0 + b1 z + b2z 2 + . . . br z r + . . . )

= A(z ) + B(z ).
(iii) Let c = a * b. Then
r
cr = ∑ ai br – i, r ≥ 0.
i= 0
2
Now A(z ) = a0 + a1 z + a2z + K + ar z r + . . . and B(z ) = b0 + b1 z + b2z 2 + K + br z r + K

Multiplying, we get
A(z ) B(z ) = (a0 + a1 z + a2z + . . . + ar z r + K ). (b0 + b1 z + b2z 2 + . . . + br z r + . . . )

= a0 b0 + (a1 b0 + a0 b1 )z + (a2b0 + a1 b1 + a0 b2 )z 2 + . . . + (ar b0 + ar –1 b1 + K + a0 br ) z r + K

 r 
Q cr = ∑ ai b( r –1 ) 
 i= 0 
= c0 + c1 z + c2z 2 + K + cr z r + K = C (z )
(iv) Let br = α r ar , r ≥ 0. Then the generating function of b is
B(z ) = b0 + b1 z + b2z 2 + . . . + br z r + K

= α 0 a0 + α1 a1 z + α 2a2z 2. . . + α r ar z r + K [Q br = α r ar ]

= a0 + a1 (α z ) + a2(α z )2 + K + ar (α z )r + . . . = A(α z ) .
650 Discrete Mathematical Structures

Theorem 2: Let A(z ) be the generating function of the numeric function a = ( a0 , a1 , a2, K , ar , . . . ). Then
1
A(z ) is the generating function of the numeric function b which is accumulated sum of a.
1–z
1
Proof: We have = 1 + z + z2 + . . . + zr + . . . . ...(1)
1–z
1
Hence is the generating function for the numeric function (1, 1, 1, 1, . . . ).
1–z
We know A(z ) = a0 + a1 z + a2z 2 + . . . + ar z r + . . . ...(2)

is the generating function for a.


Multiplying (1) and (2), we find
1
A(z ) = a0 + (a0 + a1 ) z + (a0 + a1 + a2 )z 2 + K + (a0 + a1 + a2 + K + ar )z r + K
1–z
1
Thus, A(z ) is the generating function for the numeric function b where br = a0 + a1 + a2 + K + ar
1–z
1
Therefore, b is accumulated sum of a and A(z ) is the generating function of b.
1–z

Example 16: Find the generating function of the following series 1, – 1, 1, – 1, 1, – 1, . . . .


Solution: The given series can be directed as a0 = 1, a1 = – 1, a2 = 1, a3 = –1 . . . . .
The required generating function is given by

1
∑ ar z = a0 + a1 z + a2z 2 + K = 1 – z + z 2 – z 3 + . . . = = (1 + z )–1
r
A(z )=
r =0
1+ z
a
[sum of infinite G.P. series S∞ = ]
1−r

Example 17: Find the generating function of the following series 1, 1, 1, 1, 1, 1, 1 .


Solution: The given series is directed as
a0 = 1, a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1.
The required generating function is given by

1 – z7
a(z ) = ∑ ar z r = a0 + a1 z + a2z 2+ a3 z 3 + a4 z 4 + a5z 5 + a6 z 6 = 1 + z + z 2 + z 3 + z 4 + z 5 + z 6 =
1–z
r =0

Example 18: Find the generating function for the following sequences
(i) {a, a, a, a, , K } (ii) bn = a rn, n ≥ 0
(iii) 1, 0, 0, 1, 0, 0, 1, 0, 0 (iv) ar = c (m, r) or m c , r ≥ 0
r [U.P.T.U. (B.Tech.) 2005]

Solution: (i) Here ar = a for r = 0, 1, 2, 3. . .


Hence, the required generating function is given by

A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + a3 z 3 + K
r =0
a
A(z ) = a + az + az 2 + az 3 + . . . . = a (1 + z + z 2 + z 3 + K ) =
1–z
Discrete Numeric and Generating Functions 651

(ii) Here ar = bn = a rn,


Hence, the required generating function is given by

∑ ar z = a0 + a1 z + a1 z 2 + . . . ∞
r
A(z ) =
r= 0

a  1 
= a + a rz + a r2z 2 + ar3 z 3 + . . . ∞ = sum of infinite G. P. = (1 – r)
1– rz
(iii) Here, a0 = 1, a1 = 0, a2 = 0, a3 = 1, K
Hence, the required generating function is given by

1
A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . = 1 + 0 + 0 + z3 + 0 + 0 + z6 + K = 1 + z3 + z6 + . . . ∞ =
1 – z3
r =0

(iv) Here, a0 = c (m, 0), a1 = c(m, 1), a2 = c(m, 2)K


Hence, the required generating function is given by

A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . = mc 0 + mc1 z + mc 2 z 2 + K = (1 + z )m
r =0

Example 19: Find the generating function of each of the following discrete numeric functions
(i) 2, 4, 8, 16, 32, K (ii) 0, 1, – 2, 4, – 8, K
r
(iii) 1, – 2, 3, − 4, 5, − 6 . . . (–1) (r + 1) [U.P.T.U. (M.C.A) 2001]
2 3 4 r+1
(iv) 1, , , ,K r
3 9 27 3 [U.P.T.U. (B. Tech.) 2009]
(v) 2, 3, 5, 9, 17, 33. . . [U.P.T.U. (B.Tech.) 2003]
(vi) 2, 5, 13, 35, K

Solution: (i) Here, a0 = 2, a1 = 4, a3 = 8, a4 = 16, a5 = 32. . .


Hence, the required generating function is given by

A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . = 2 + 22 z + 23 z 2 + K = 2[1 + 2z + (2z )2 + . . . ] = 2/(1 – 2z ),| 2z| <|
r =0

(ii) Here, a0 = 0, a1 = 1, a2 = –2, a3 = 4, a4 = – 8, . . .


The generating function is given by

A(z )= ∑ ar z r = a0 + a1 z + a2z 2 + K
r =0

= 0 + z – 2z 2 + 4z 3 – 8z 4 + . . .
z
= z(1 – 2z + 4z 2 – 8z 3 + . . . = z(1 – (2z ) + (2z )2 – (3z )3 + . . . ) = ,|–2z| <|
1 – 2z
(iii) Here, a0 = 1, a1 = –2, a2 = 3, a3 = – 4, . . .
The require generating function is given by

1
A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + K = 1 – 2z + 3z 2 – 4z 3 + . . . =
(1 + z )2
r =0
652 Discrete Mathematical Structures

2 3 4
(iv) Here, a0 = 1, a1 = , a2 = , a3 = ,...
3 9 27
The required generating function is given by

A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . . ∞
r =0
2 3 4 3
=1 + z + z2 + z + .... ∞
3 9 27
2 3
 z  z 1 9
= 1 + 2( z/3) + 3   + 4   + . . . ∞ = =
 3  3 (1 – z /3)2 (3 – z )2
(v) Here, a0 = 2, a1 = 3, a2 = 5, a3 = 17, a4 = 33, . . .
The required generating function is given by
A(z ) = a0 + a1 z + a2z 2 + . . .

= 2 + 3z + 5z 2 + 17 z 4 + 33z 5 + . . .
= (1 + z + z 2 + z 3 + z 4 + . . . ) + (1 + 2z + (2z )2 + (2z )3 + . . . .
1 1 2 – 3z
= (1 – z )–1 + (1 – 2z )–1 = + =
1 – z 1 – 2z 1 – 3z + 2z 2
(vi) Here, a0 = 2, a1 = 5, a2 = 13, a3 = 35, . . .
The required generating function is given by

A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + ...
r =0
= 2 + 5z + 13z 2 + 35z 3 + . . .
= [1 + 2z + (2z )2 + (3z )3 + . . . ]+ [1 + 3z + (3z )2 + (3z )3 + . . . ]
1 1 2 – 5z
= (1 – 2z )–1 + (1 – 3z )–1 = + =
1 – 2z 1 – 3z 1 – 5z + 6z 2

Example 20: Determine the generating function of a numeric function ar , where


2r if r is even 
(i) ar =  r 
–2 if r is odd [U.P.T.U. (B. Tech.) 2007, 2008;
R.G.P.V. (B.E.) Bhopal 2001, 2004, 2006, 2009]
1 , 0≤r≤3
3 , 4≤r≤6
(ii) ur = 
4 , r =7
5 , r≥8 [Delhi (B.E.) 2007; P.T.U. (B.E.) Punjab 2008]
Solution: (i) The required generating function is given by
∞ ∞
A(z ) = ∑ ar z r = ∑ (–1)r 2r z r
r =0 r =0
= 20 z 0 – 21 z + 22 z 2 – 23 z 3 + K
= 1 – 2z + (2z )2 – (2z )3 + . . .
1
= (1 + 2z )–1 =
1 + 2z
Discrete Numeric and Generating Functions 653

(ii) Here, u0 = u1 = u2 = u3 = 1 , u4 = u5 = u6 = 3, u7 = 4 , u8 = u9 = u10 = . . . . . = 5


The required generating function is given by

A(z ) = ∑ ur z r = u0 z o + u1 z1 + u2z 2 + . . .
r =0
= (1 + z + z 2 + z 3 ) + (3. z 4 + 3. z 5+ 3z 6 ) + 4z7 + (5. z 8 + 5. z 9 + 5. z10 + . . . )
= (1 + z + z 2 + z 3 ) + 3(z 4 + z 5 + z 6 ) + 4z 4 + 5(z 8 + z 9 + z10 + . . . )

Example 21: Obtain the generating function of the numeric function


ar = 2r + 3r , r ≥ 0
Solution: The required generating function of the given numeric function is given by
∞ ∞ ∞ ∞
A(z ) = ∑ ar z r = ∑ (2r + 3r )z r = ∑ 2r z r + ∑ 3r z r
r =0 r =0 r =0 r =0
= [1 + (2z ) + (2z )2 + . . . ] + [1 + (3z ) + (3z )2 + . . . ]
1 1 2 – 5z
= (1 – 2z )–1 + (1 – 3z )–1 = + =
1 – 2z 1 – 3z 1 – 5z + 6z 2

Example 22: Find the generating function for the finite sequence
3, 3, 3, 3, 3, 3, 3 [U.P.T.U. (B.Tech.) 2003]

Solution: Here, a0 = a1 = a2 = a3 = a4 = a5 = a6 = 3
The required function is A(z ) = a0 + a1 z + a2z 2 + a3 z 3 + a4 z 4 + a5z 5 + a6 z 6

⇒ A (z ) = 3 + 3z + 3z 2 + 3z 3 + 3z 4 + 3z 5 + 3z 6

= 3 (1 + z + z 2 + z 3 + z 4 + z 5 + z 6 )

3(1 – z7 )  th a (1 – rn )
= By sum of n term of G. P. = 
1–z  (1 – r) 

Example 23: Find the generating functions of the following numeric functions
(i) ar = 7. 3r
(ii) ar = 2r [U.P.T.U. (B.Tech.) 2002; Uttranchal (M.C.A.) 2007]
r
(iii) ar = (r + 1)3 [R.G.P.V. (B.E.) Bhopal 2005, 2008]
r r r r
(iv) ar = 5 + (–1) 3 + 8 + 3cr [R.G.P.V. (B.E.) Bhopal 2005, 2008; P.T.U. (B.E.)
Punjab 2002, 2005, 2009; M.K.U. (B.E.) Tamil Nadu 2006, 2008]

Solution: (i) The required generating function of given series ar = 7. 3r is given by


∞ ∞
A(z ) = ∑ ar z r = ∑ 7. 3r z r
r =0 r =0
= 7{1 + (3z ) + (3z )2 + (3z )3 + . . . }
 a 
1 7 By infinite sum of G. P. =
=7⋅ =  1 – r
1 – 3z 1 – 3z  
a = 1, r = 3z 
654 Discrete Mathematical Structures

(ii) The required generating function of given series ar = 2r is given by


∞ ∞
A(z )= ∑ ar z r = ∑ 2r z r
r =0 r =0

= 1 + (2z ) + (2z )2 + (2z )3 + K


1  a 
= By infinite G. P. S∞ =
1 – 2z  1 – r 
(iii) Here, ar = (r + 1)3r
The required generating function of given series is given by
∞ ∞
A(z ) = ∑ ar z r = ∑ (r + 1)3r z r
r =0 r =0
∞ ∞
A(z ) = ∑ r 3r z r + ∑ 3r z r
r =0 r =0

= {0 + 1 ⋅ (3z ) + 2(3z )2 + 3(3z )3 + K }+{1 + (3z )1 + (3z )2 + (3z )3 + . . . }


1

= (3z ){1 + 2⋅ (3z ) + 3⋅ (3z )2 + . . . }+{1 + (3z ) + (3z )2 + (3z )3 + K }


= 3z{(1 – 3z )–2} + (1 – 3z )–1
3z 1 1
= + =
(1 – 3z )2 1 – 3z (1 – 3z )2
(iv) Here,
ar = 5r + (–1)r 3r + 8r + 3cr

The required generating function of given series ar is given by



A(z ) = ∑ ar z r
r =0

= ∑ {5r + (–1)r 3r + 8r + 3cr }z r
r =0

= (1 + 5z + 52 z 2 + 53 z 3 + K ) + (1 – 3z + 32 z 2 – 33 z 3 + . . . )
+ (1 + 8z + 82 z 2 + (8z )3 + . . . ) + (3c0 + 3c1 z + 3c2z 2 + . . . )

= (1 – 5z )–1 + (1 + 3z )–1 + (1 – 8z )–1 + (1 + z )3


1 1 1
= + + + (1 + z )3
1 – 5z 1 + 3z 1 – 8z

4 – 27 z – 25z 2 + 94z 3 + 367 z 4 + 361z 5 + 120z 6


=
(1 – 5z )(1 + 3z )(1 – 8z)

Example 24: Let c = a * b ,where ar = 2r , br = 3r , r ≥ 0 obtain the generation function of c.

Solution: Let A(z ), B(z ) and C (z ) be generating function of a, b and c. Then


1 1 3 2
C (z ) = A(z ) B(z ) = ⋅ = −
1 − 2z 1 – 3z 1 – 3z 1 – 2z
Discrete Numeric and Generating Functions 655

Example 25: Determine the numeric function corresponding to each of the following generating functions.
1
(i) A(z ) =
5 – 6z + z 2 [U.P.T.U. (M.C.A) 2003, 2004, 2006]
2
(1 + z )
(ii) A(z ) =
(1 – z )4 [R.G.P.V. (B.E) Bhopal 2005, 2007, 2008]
2
(iii) A(z ) =
1 − 4z 2 [U.P.T.U. (B.Tech.) 2005]
4
z
(iv) A(z ) =
1 − 2z [Uttranchal (M.C.A.) 2010]

7 z2
(v) A(z ) =
(1 – 2z )(1 + 3z ) [U.P.T.U. (M.C.A.) 2005]
n n
(vi) A(z ) = (1 + z ) + (1 – z ) , n is positive integer [U.P.T.U. (M.C.A) 2003, 2004]
1
(vii) A(z ) =
1 – z3 [R.G.P.V. (B.E.) Bhopal 2005, 2006]
5
z
(viii) A(z ) =
(5 – 6z + z 2 ) [R.G.P.V. (B.E.) Bhopal 2001, 2005, 2006]

Solution: (i) We have


1 1 1 1 1  1 1 1 1
A(z ) = = =  −  = ⋅ – ⋅
5 – 6z + z 2 (5 – z )(1 – z ) 4 1 – z 5 – z  4 1 – z 20  z
1 – 
 5

Therefore, the required numeric function corresponding to A(z ) is given by


r
1 1  1
ar = –   , r≥0
4 20  5
r +1 
1   1
= 1 –   , r ≥ 0
4   5 
(1 + z )2
(ii) We have A(z ) =
(1 – z )4
= (1 + z )2(1 – z )–4
4 . 5 2 4. 5. 6 3 4 . 5. 6. . . (r + 3) r
= (1 + 2z + z 2 )(1 + 4z + z + z + ... + K+ z + ...
|2 |3 |r
 4 . 5  2  4 . 5. 6   4 . 5. 6. . . r + 3 4. 5. 6 . . . r + 1  r
= 1 + 4 z +  + 1 z +  + 4 z 3 + . . . +  +  3 + K
| 2   | 3   |r | r– 2 

Therefore, the coefficient of 3r is A(z ), i.e.


4. 5. 6. . . (r + 3) 4. 5. 6 . . . (r + 2) 4. 5. 6 . . . (r + 1)
ar = + 2⋅ +
| r | r–1 | r– 2
4. 5. 6 . . . (r + 1) (r + 2)(r + 3) 2(r + 2) 
=  + + 1
| r– 2  r(r – 1) r–1 
656 Discrete Mathematical Structures

4 . 5. 6 . . . (r + 1)(2r2 + 4r + 3) (r + 1)(2r2 + 4r + 3)
= 2. =
|r 3

Thus, the numeric function corresponding to A(z ) is


(r + 1)(2r2 + 4r + 3)
ar = ,r≥0
3
2 2 1 1
(iii) We have A(z ) = = = +
1 − 4z 2 1 – 2z )(1 + 2z ) 1 – 2z 1 + 2z

The required generating function corresponding to A(z ) is given by


ar = 2r + (–2)r , r ≥ 0
0 , r is odd
=  r +1
 2 , r is even.

z4
(iv) We have A(z ) = = z 4 (1 – 2z )–1 = z 4 (1 + (2z ) + (2z )2 + . . . ) = z 4 + 2z 5 + 22 z 6 + . . .
1 – 2z
Therefore, the required generating function is given by
0 , 0 ≤ r ≤4
ar =  r – 4
2 , r ≥5

7 z2 7 z2
(v) We have, A(z ) = =
(1 – 2z )(1 + 3z ) 1 + z – 6z 2

7 z2
=
 1 1 
–6z 2 1 – – 
 6z 6z 2 
7 7(z + 1)
=– +
6 6(1 + z – 6z 2 )

7 7(z + 1)
=– +
6 6(1 – 2z )(1 + 3z )

7 7 2 3 
=– +  + 
6 6  5(1 + 3z ) 5(1 – 2z )

7 2 3 
= –1 + + 
6 5(1 + 3z ) 5(1 – 2z )

7 2 –1 3 –1 
= –1 + (1 + 3z ) + (1 – 2z ) 
6 5 5 
7 2 2 3  3 2 3
= –1 + (1 – 3z + (3z ) – (3z ) + . . . + {1 + (2z ) + (2z ) + (2z ) + . . . }
6 5  5
Therefore, the required generating function corresponding to A(z ) is given by
7  2 3
 6  + 5 + 5 r =
–1 , 0
0 , r = 0
 
ar =  i.e. ar = 7  3 r 2 
2 + (–3)r , r ≥ 1
7  2 ⋅ (–3)r + 3 2r , r ≥ 1  6  5 5 
 6  5 5
Discrete Numeric and Generating Functions 657

(vi) We have A(z ) = (1 + z )n + (1 – z )n


= (1 + nc1 z + nc 2 z 2 + . . . + nc r z r )+ (1 – nc r z + nc 2 z 2 + K + (–1)r nc r z r )
= 2 + 2nc 2 z 2 + 2nc 4 z 4 + . . . + 2nc 2r z 2r + . . .
Therefore, the numeric function corresponding to A(z ) is given by
0 , r is odd or r > n
ar = 
 2 ⋅ ncr , r is even
1
(vii) We have A(z ) = = (1 − z 3 )–1 = 1 + z3 + z6 + z9 + K z3r + . . .
1 – z3
Therefore, the required numeric function corresponding to A(z ) is given by
1 , if r = 3k , k = 0, 1, 2, 3. . . . .
ar = 
0 , if r ≠ 3k , k = 0, 1, 2, 3. . .
z5  1 
(viii) We have A( z ) = = z5
5 – 6z + z 2
(5 – z )(1 – z )
 
51 1  5 1 1 
=z  –  =z  – 
 4(1 – z ) 4(5 – z )  4(1 – z ) 201 − z  
  5 
–1
1 5 1 5 z
= z (1 – z )–1 – z 1 – 
4 20  5

1 5 
2
1 5  z  z
= z [1 + z + z 2 + . . . . . ] – z 1 +   +   + . . . . 
4 20   5  5 
1 5 1 5 z6 zr
= (z + z 6 + . . . + z r )– (z + + . . . + ( r – 5)
4 20 5 5
Therefore, the required generating function is given by
0 , if 0≤ r≤4

ar =  1 1  1 
–   , if r ≥5
 4 20  5r – 5 

0 , if 0 ≤ r ≤ 4

= 1  1 
– 1 – r – 4  , if r≥5
 4  r 

Example 26: Using generating functions evaluate the sum 12 + 22 + 32 + K + r2


[U.P.T.U. (M.C.A.) 2002; Pune (M.C.A.) 2004, 2008; Rohtak (B.E.) 2006]

Solution: We know
1
= 1 + z + z2 + . . . + zr
1–z
Differentiating both sides of the above identity with respect to (z), we get
1
= 1 + 2z + 3z 2 + . . . + rz r –1 + . . . .
(1 – z )2
658 Discrete Mathematical Structures

Multiplying both sides by z, we get


z
= z + 2z 2 + 3z 3 + . . . + r z r + . . . .
(1 – z )2
Differentiating both sides with respect to z, we get
1+ z
= 12 + 22 z + 32 z 2 + . . . + r2z r –1 + . . . .
(1 – z )3
Multiplying both sides by z, we get
z(1 + z )
= 02 + 12 z + 22 z 2 + 32 z 3 + . . . + r2z r + . . .
(1 – z )3
z(1 + z )
⇒ is the generating function of the numeric function
(1 – z )3
(02, 12, 22, 32, . . . , r2, . . . ).
Then,
1  z(1 + z )
= 02 + (02 + 12 )z + (02 + 12 + 22 )z 2 + . . .
1 – z (1 – z )3 

+ (02 + 12 + 22 + . . . + r2 )z r + . . . .
z(1 + z )
Thus 02 + 12 + 22 + . . . + r2 = coefficient of z r in .
(1 – z )4
1
From the Binomial theorem, we know that the coefficient of z r in is
(1 – z )4
(– 4)(– 4 – 1). . . (– 4 – r + 1) 4 . 5. 6 . . . (r + 3) (r + 1)(r + 2)(r + 3)
(– 1)r = =
r! r! 1 . 2. 3
z(1 + z )
Therefore, the coefficient of z r in is
(1 − z )4
r(r + 1)(r + 2) (r – 1) r (r + 1) r(r + 1)(2r + 1)
= + =
1 . 2. 3 1 . 2. 3 6
r(r + 1)(2r + 1)
Hence 12 + 22 + K + r2 =
6

Example 27: Using generating functions, evaluate the sum


3. 2. 1 + 4 . 3. 2 + 5. 4 . 3. K + (r + 1) r (r – 1).
Solution: We will first obtain a generating function for the numeric function
ar = (r + 1)r(r – 1).
1
(1 – z )–1 = = 1 + z + z2 + z3 + . . . + zr + . . . .
1–z
Differentiating both sides three times with respect to z, we have
6
= 3. 2. 1 + 4 . 3. 2z + 5. 4 . 3z 2 + . . . + (r + 1) r(r – 1) z r + . . . .
(1 – z )4
Multiplying both side by z 2, we find
6z 2
= 3. 2. 1 z 2 + 4 . 3. 2 z 2 + . . . + r(r + 1)(r – 1) z 2
(1 – z )4
Discrete Numeric and Generating Functions 659

1  6z 2  6z 2
Then  =
(1 – z ) (1 – z )  (1 – z )5
4

6z 2 6z 2 6
The coefficient of z r in 5
= coefficeint of z r in = coefficeint of z r – z in
(1 – z ) (1 – z )5 (1 – z )5
6 × 5. 6 . 7. . . (r – 2 + 5 – 1) 6. 1 . 2. 3. 4. 5. . . . (r + 2) 6 | (r + 2 )
= = =
|r– 2 1 . 2. 3. 4 . . . . | (r – 2 ) |4 | r– 2
6 | r +2
Hence, 3. 2. 1 + 4. 3. 2 + . . . + (r + 1) r(r – 1) =
|4 | r– 2

n
Example 28: Use generating function to show that ∑ C (n, k )2 = C (2n, n) where k is positive integer.
k=0 [Bangalore (B.E.) 2004, 2009]

Solution: We know C (2n, n) is the coefficient of z n in the expansion (1 + z )2n


∴ {(1 + z )2n = {(1 + z )n}2 = [C (n, 0) + C (n, 1) z + C (n, 2) z 2 + . . . + C (n, n)z n]2

The coefficient of z n in this expansion


= C (n, 0)C (n, n) + C (n, 1) C (n, n – 1) + K + C (n, n) C (n, 0)
= C (n, 0)2 + C (n, 1)2 + K + C (n, n)2
n
Hence ∑ C (n, k ) 2 = C (2n, n)
k =0

Example 29: Suppose the sequence < an > where 0 ≤ n ≤ ∞ has generating function f ( x ) .
(i) What sequence is generated by the function g( x ) = (1 + x ) f ( x )?
f (x)
(ii) What sequence is generated by the function h( x ) = ?
1+ x [U.P.T.U. (B.Tech.) 2002, 2003]

Solution: We have f ( x )= a0 + a1 x + a2 x 2 + K + ar x 2 + K

g( x ) = (1 + x ) f ( x )
= (1 + x ){a0 + a1 x + a2 x 2 + K + ar x r + . . . }

= a0 + (a0 + a1 )x + (a1 + a2 )x 2 + K + (ar –1 + ar )x r + K

Thus, the sequence corresponding to g( x ) suppose < br > is


a0 if r = 0
br = 
ar –1 + ar if r ≥ 1
f (x)
(ii) We have h( x ) = = f ( x )(1 + x )–1
1+ x
⇒ h( x ) = (a0 + a1 x + a2 x 2 + . . . + ar x r + . . . )(1 – x + x 2 – x 3 + . . . + (–1) r x r )

= a0 + (a1 – a0 )x + (a2 + a1 a0 )x 2 + K

+ (ar + ar –1 (–1) + ar – 2(–1)2 + K + a1 (–1)r –1 + a0 (–1)r x r

Hence, if < cn > is sequence corresponding to the generating function h( x ), then


cr = ar + ar –1 (–1) + ar – 2(–1)2 + . . . + a1 (–1)r –1 + a0 (–1)r , r ≥ 0
660 Discrete Mathematical Structures

Example 30: Find the generating function for f n = 3n, n ≥ 0

Solution: The generating function for this sequence


1
A(z ) = 1 + (3z ) + (3z )2 + (3z )3 + . . . . = (1 – 3z )–1 =
1 – 3z

Example 31: Find the generating function of the sequence y 0 , y1 , y 2. . . . y n defined as follows
y n + 2y n–1 – 15y n– 2 = 0 for n ≥ 2.

with boundary condition y 0 = 0, y1 = 1.


Solution: We know generating function

A( x ) = y 0 + y1 x + y 2 x 2 + . . . . = ∑ y nx n
n= 0

Multiplying x n on both sides then take summation n = 2 to ∞ to equation.


y n + 2y n–1 – 15y n– 2 = 0
∞ ∞ ∞
⇒ ∑ y n x n + 2∑ y n–1 x n – 15∑ y n– 2 x n = 0
n= 2 n= 2 n= 2

⇒ ( A( x )– y 0 – y1 x ) + 2[ xA( x )– y 0 ] – 15x 2 A( x ) = 0

But y 0 = 1, y1 = 1 ⇒ ( A( x )– x ) + 2[ xA( x )– 0] – 15x 2 A( x ) = 0

A( x ){1 + 2x – 15x 2] = x
x x
A( x ) = =
1 + 2x – 15x 2 (1 – 3x )(1 + 5x )

13.7 Solution of Recurrence Relations by the Method of Generating Functions


Consider the recurrence relation

c0 ar + c1 ar –1 + c2ar – 2 + . . . + cr ar – k = f (r) ...(1)

Where c0 , c1,c2. . . cr be constant and this relation valid for r ≥ k. Multiplying z r on both sides of (1) then take

summation r = k to r = ∞ we obtain.

∞ ∞
∑ (c0 ar + c1 ar –1 + c2ar – 2 + K + ak ar – k )z r = ∑ f (r)z r
r =k r =k

But we have
∞  ∞ 
∑ c0 ar z r = c0  ∑ ar z r – a0 – a1 z – a2z 2. . . – ak –1 z k –1 
r =k r = 0 
Discrete Numeric and Generating Functions 661
∞  ∞ 
∑ c1 ar –1 z r = c1 z  ∑ ar z r – a0 – a1 z – a2z 2K – ak – 2 z k – 2 
r =k r = 0 

∞ ∞
∑ cr ar – k z r = ck z k ∑ ar z r
r =k r =0

Put these values in (1) and write



A(z )= ∑ ar z r
r =0

We obtain

1 ∞
 ∑ f (r)z + c0 (a0 + a1 z + . . . + ak –1 z )
r k –1
A(z ) = k
c0 + c1 z + . . . + ck z r = k


+ c1 z( a0 + a1 z + K + ak – 2z k – z + . . . . + ck –1 z k –1 (a0 )

We get ar from A(z ). Which is the solution of given equation.

13.7.1 Table of Some Generating Functions


S.No. Sequence Generating Functions
1
1. ar = 1 A(z ) =
1–z
1
2. ar = (–1)r A(z ) =
1+ z
1
3. ar = α r A(z ) =
1 – αz
1
4. ar = (–α )r A(z ) =
1 + αz
1
5. ar = r + 1 A(z ) =
1 – z2
z
6. ar = r A(z ) =
(1 − z)2
z(z + 1)
7. ar = r2 A(z ) =
(1 – z )3
αz
8. ar = rα r A(z ) =
(1 – αz )2
1
9. ar = A(z ) = ez
|n

10. ar = c(n , r) A(z ) = (1 + z )r


662 Discrete Mathematical Structures

Example 32: Solve the recurrence relation ar – 7 ar –1 + 10 ar – 2 = 0 V ≥ 2


given that a0 = 10, a1 = 41 using generating functions. [U.P.T.U. (M.C.A) 2001]

Solution: We have ar – 7 ar –1 + 10 ar – 2 = 0 ...(1)


Multiplying z r on both sides then take summation r = 2 to ∞, we find
∞ ∞ ∞
∑ ar z r – 7 ∑ ar –1 z r + 10 ∑ ar − 2 z r = 0
r =2 r =2 r =2

( A(z )– a0 – a1 z )– 7 z( A(z ) − a0 ) + 10z 2 A(z ) = 0


a0 + (a1 – 7 a0 ) z
⇒ A(z ) =
1 – 7 z + 10z 2
a0 + (a1 – 7 a0 )z
= [But a0 = 10, a1 = 41]
(1 – 2z )(1 − 5z )
10 + (–29)z
⇒ A(z ) =
(1 – 2z )(1 – 5z )
c1 c2
⇒ A(z ) = +
1 – 2z ) 1 – 5z
10 – 29z c c2
= 1 +
(1 – 2z )(1 – 5z ) 1 – 2z 1 – 5z
Put 2z = 1, z = 1/2 we get c1 = 3
Again put 1 – 5z = 0 or z = 1/5 we get c2 = 7
3 7
⇒ A(z ) = +
1 – 2z 1 – 5z
∞ ∞ ∞
⇒ ∑ ar z r = 3 ∑ 2r z r + 7 ∑ 5r z r
r =0 r =0 r =0
r
Equating the coefficient of z on both sides, We get
ar = 3⋅ 2r + 7. 5r

Example 33: Solve the recurrence relation ar – 7 ar –1 + 10 ar – 2 = 0


by the method of generating functions with initial conditions a0 = 3 and a1 = 3 .
[U.P.T.U. (M.C.A.) 2008]

Solution: We have
ar – 7 ar –1 + 10 ar – 2 = 0 ...(1)
r
Multiplying z on both sides of (1) then take summation r = 2 to ∞ we get
∞ ∞ ∞
∑ ar z r – 7 ∑ a( r −1 ) z r + 10 ∑ ar – 2z r = 0
r =2 r =2 r =2

(a2z + a3 z + . . . )– 7 (a2z + a3 z + . . . ) + 10 (a0 z + a1 z 3 + . . . ) = 0


2 3 2 3 2

⇒ ( A(z )– a0 – a1 z )– 7 z( A(z )– a0 ) + 10z 2 A(z ) = 0

Put a0 = 3, a1 = 3.
Discrete Numeric and Generating Functions 663

3 + 24z 3 + 24z
∴ A(z ) = 2
=
10z – 7 z + 1 (5z – 1)(2z – 1)

3 + 24z A B
= +
(5z – 1)(2z – 1) 5z – 1 2z – 1
1
Put 5z – 1 = 0 or z = ⇒ A = – 13
5
1
Put 2z – 1 = 0 or z = ⇒ B = – 10
2
13 10
⇒ A(z ) = – But A(z ) = ∑ ar z r
1 – 5z 1 – 2z
∞ ∞ ∞
⇒ ∑ ar z r = ∑ 13(5)r z r – ∑ 10(2)r z r
r =0 r =0 r =0
r
Comparing the coefficient of z on both sides, we get
ar = 13(5)r – 10 (2)r

Example 34: Solve the recurrence relation ar + 2 – 2ar +1 + ar = 2r

by the method of generating function with initial conditions a0 = 2 and a1 = 1


[U.P.T.U. (B.Tech.) 2003, 2004; P.T.U. (B.E.) Punjab 2008; M.K.U. (B.E.) 2004, 2009]

Solution: We have ar + 2 – 2ar +1 + ar = 2r ...(1)

Multiplying z r on both sides then take summation r = 0 to ∞ we get


∞ ∞ ∞ ∞
∑ ar + 2 z r – 2 ∑ ar +1 z r + ∑ ar z r = ∑ 2r z r
r =0 r =0 r =0 r =0
∞ A(z )– a0 – a1 z  A(z )– a0  1
Using A(z ) = ∑ ar z r ⇒
z 2
– 2
 z
 + A(z ) =
 1 – 2z
r =0

Put a0 = 2, a1 = 1 we obtain.

z2
⇒ A(z )– 2 – z − 2z( A )z – 2z + z 2 A(z ) =
1 – 2z

z2
(z 2 – 2z + 1) A(z ) = 2 + 3z +
1 – 2z

z2
(1 – z )2 A(z ) = 2 + 3z +
1 − 2z

2 3z z2
⇒ A(z ) = 2
+ 2
+
(1 – z ) (1 – z ) (1 – 2z )(1 – z )2
By partial fraction
1 3z 1
⇒ A(z ) = + +
(1 – z )2 (1 – z )2 1 – 2z
664 Discrete Mathematical Structures
∞ ∞ ∞ ∞
⇒ ∑ ar z r = ∑ (r + 1)z r + 3 ∑ rz r + ∑ 2r z r
r =0 r =0 r =0 r =0
r
Equating the coefficient of z on both sides, we get
ar = (r + 1) + 3r + 2r

Example 35: Solve S(n)– 2S(n – 1)– 3S(n – 2) = 0, n ≥ 0 with S(0) = 3 and S(1) = 1 using generating function.
[U.P.T.U. (B.Tech.) 2005, 2008]
Solution: We have S(n)– 2S(n – 1)– 3S(n – 2) = 0 ...(1)
With generating function

∑ S(n)z
n
A(z ) = ...(2)
n= 0

Multiplying (1) by z n on both sides then take summation n = 2 to n = ∞.


∞ ∞ ∞
∑ S(n)z n – 2∑ S(n – 1)z n – 3∑ S(n – 2)z n = 0 ...(3)
n= 2 n=1 n= 2

But ∑ S(n)z n = S(2) z 2 + S(3)z 3 + . . . = A(z )– S(0)– S(1) z
n= 2

∑ S(n – 1)z n = S(1)z 2 + S(2)z 3 + . . . = z [ S(1)z + S(2)z 2 + . . . ] = z[ A(z )– S(0)]
n= 2

∑ S(n – 2)z n = S(0)z 2 + S(1)z 3 + . . . = z 2[ S(0) + S(1) z + . . . ] = z 2 A(z )
n= 2

Put these values in (3) when S(0) = 3, S(1) = 1


[ A(z )– S(0)– S(1) z] – 2z ( A(z )– S(0)} – 3{z 2 A(z )] = 0

⇒ ( A(z )– 3 – z )– 2z( A(z )– 3)– 3z 2 A(z ) = 0

⇒ A(z ){1 – 2z – 3z 2} = 3 – 5z
3 − 5z
⇒ A(z ) =
1 – 2z – 3z 2
By partial fraction
3 – 5z 3 – 5z A B
= = +
1 – 2z – 3z 2 (1 – 3z )(1 + z ) 1 – 3z 1 + z
Put 1 – 3z = 0, z = 1/3 ⇒ A = 1
Put 1 + z = 0, z = – 1 ⇒ B = 2
1 2
∴ A(z ) = +
1 − 3z 1 + z
∞ ∞ ∞
⇒ ∑ S(n)z n = ∑ 3n z n + 2 ∑ (–1)n z n
n= 2 n= 0 n= 2
n
Equation the coefficient of z on both sides
⇒ S(n) = 3n + 2(–1)n
Discrete Numeric and Generating Functions 665

Example 36: Solve by the method of generating functions the recurrence relation
1
ar – 2ar –1 + ar – 2 = 2r , r ≥ 2
4
with the boundary condition a0 = 2 and a1 = 1 [U.P.T.U. (B.Tech.) 2005]

Solution: The given recurrence relation is


1 r
ar – 2ar –1 + ar – 2 = 2 ...(1)
4
Let the generating function of the given sequence be

A(z ) = ∑ ar z r ...(2)
r =0

Multiplying z r on both sides of (1) then take summation r = 2 to r = ∞, we find.


∞ ∞ ∞ ∞
1
∑ ar z – 2∑ ar –1 z r + ∑ ar – 2z 4 r∑
r r
= 2r z r
r =2 r =2 r =2 =2

1 1 
⇒ [ A(z )– a1 z – a0 ] – 2[ z A(z )– a0 ] + z 2 A(z ) = – 2z – 1
4 1 – 2z 
1 1 
⇒ (1 – 2z + z 2 ) A(z ) – a1 z – a0 + 2a0 z = – 2z – 1
4 1 – 2z 

But a0 = 2, a1 = 1
1 1 
⇒ (1 – 2z + z 2 ) A(z ) – z − 2 + 4z = – 2z – 1
4 1 – 2z 

1 1 
⇒ (1 – 2z + z 2 ) A(z ) = − 14z + 7
4 1 – 2z 

7 z2 – 7 z + 2
⇒ A(z ) =
(1 – 2z )(1 – z )2

7 z2 – 7 z + 2 A B Cz
Let 2
= + +
(1 – 2z )(1 – z ) 1 – 2z 1 – z (1 – z )2

⇒ 7 z 2– 7 z + 2 = A (1 – z )2+ B(1 – z )(1 – 2z ) + Cz(1 – 2z )


⇒ A = 1, B = 1, C = –2
1 1 2z
Thus, A(z ) = + –
1 – 2z 1 – z (1 – z )2

Using generating functions ∑ ar z r = ∑ 2r z r + ∑ z r – 2∑ r z r


Equating the coefficient of z r on both sides ar = 2r + 1 – 2r

Example 37: Solve by method of generating functions the recurrence relation.


ar – 5ar –1 + 6ar – 2 = 2 r + r, r ≥ 0

with boundary conditions a0 = 1 and a1 = 1 [U.P.T.U (M.C.A) 2001]


666 Discrete Mathematical Structures

Solution: The given recurrence relation is


ar – 5ar –1 + 6ar – 2 = 2r + r ...(1)
Let the generating function of given sequence is

A(z ) = ∑ ar z r ... (2)
r =0
Multiplying z r on both sides then take summation r = 2 to r = ∞ to (1)
∞ ∞ ∞ ∞ ∞
∑ ar z r – 5 ∑ ar –1 z r + 6 ∑ ar – 2 z r = ∑ 2r z r + ∑ r z r
r =2 r =2 r =2 r =2 r =2
∞ ∞ ∞
⇒ ∑ ar z r – 5z ∑ ar –1 z r –1 + 6z 2 ∑ ar – 2 z r – 2
r =2 r =2 r =2
∞ ∞
= ∑ (2z )r + z ∑ rz r –1
r =2 r =2

⇒ A(z )– a1 z – a0 – 5z[ A(z )– a0 ] + 6z 2 A(z )

 1   1 
= – 2z – 1 + z  – 1
1 – 2z   (1 – z )2

4z 2  1 
(1 – 5z + 6z 2 )A(z ) – a1 z – a0 + 5a0 z = +z 2
– 1
1 – 2z (1 – z ) 
4z 2  1 
⇒ (1 – 5z + 6z 2 )A(z )– 1 + 4z = +z 2
– 1
1 – 2z (1 – z ) 
1 − 8z + 27 z 2 – 35z 3 + 14z 4
⇒ A(z ) =
(1 – z )2(1 – 2z )2(1 – 3z )
5 1 3 2 17
⇒ A(z ) = + – − +
4(1 – z ) 2(1 – z )2 1 – 2z (1 – 2z )2 4(1 – 3z )
[By partial fraction]
⇒ By using generating function we get
∞ ∞ ∞ ∞ ∞ ∞
5 1 17
∑ ar z r = 4 r∑
z r + ∑ (r + 1)z r – 3 ∑ 2r z r – 2 ∑ (r + 1)2r z r +
2 4 ∑ 3r z r
r =0 =0 r =0 r =0 r =0 r =0
r
Equating the coefficient of z on both sides, we get
5 1 17 r
ar = + (r + 1)– 3 2r – 2(r + 1)2r + 3 , r≥0
4 2 4

Example 38: Using generating function, solve the recurrence relation ar = 3ar –1 + 2, r ≥ 1, with a0 = 1
[U.P.T.U. (B.Tech.) 2002]
Solution: The given recurrence relation ar = 3ar –1 + 2 ...(1)

The generating function of the given sequence is A(z ) = ∑ ar z r ...(2)
r =0
Discrete Numeric and Generating Functions 667

Multiplying z r on both side of (1) then take summation r = 1 to ∞, we get


∞ ∞ ∞
∑ ar z r = 3 ∑ a( r −1 ) z r + 2∑ z r ...(3)
r =1 r =1 r =1

But ∑ ar z r = a1 z + a2 z 2 + ... = A(z )− a0
r =1

∑ ar –1 z r = a0 z + a1 z 2 + a2z 3 + . . . = z (a + a1 z + a2z 2 + . . . = zA(z )
r =1

z
∑ z r = z + z 2 + z 3 + . . . = z(1 + z + z 2+ . . . ) =
1–z
r =1

Then (3) becomes as


2z
A(z )– a0 = 3{zA(z )} + , Put a0 = 1
1–z
2z 1+ z
A(z ){1 – 3z} = 1 + =
1–z 1–z
(1 + z )
⇒ A(z ) =
(1 – z )(1 – 3z )
1+ z A B
By partial fraction = +
(1 – z )(1 – 3z ) 1 – z 1 – 3z
Now, (1 + z ) = A(1 – 3z ) + B(1 – z )
⇒ 1 = A + B, 1 = –3A – B or 3A + B = –1
Solve we get A = –1, B = 2.
2 1
Therefore A(z ) = –
1 – 3z 1 – z
∞ ∞ ∞
⇒ ∑ ar z r =2 ∑ 3r z r – ∑ z r
r =0 r =0 r =0
r
Equation the coefficient of z on both sides we get
ar = 2. 3r – 1
668 Discrete Mathematical Structures

Exercise
@ Generating Functions
1. Find the generating functions of the following:
(i) 2, 4, 8, 16, 32 ... (ii) a0 , 3a1 , 9a2, 27 a3 , K
(iii) 2, – 2, 2, – 2K. (iv) 3, – 3, 3, – 3, 3, – 3. . .
(v) 3, 9, 27, 81, . . . . (vi) 1, – 2, 3, – 4, K [U.P.T.U. (M.C.A.) 2001]

(vii) 1, 0, 1, 0, K

2. Find the generating function of the following numeric function:


(i) ar = 3 (ii) ar = r + 3
(iii) ar = 2 r + 3, r ≥ 0 (iv) ar = 3r

(v) ar =  r +r 4 , r ≥ 0 (vi) ar = r(3 + 5r)

1
(vii) ar = ,r ≥ 0 (viii) ar = r(r – 1) [R.G.P.V (B.E.) Bhopal 2006, 2009]
| +1
r

3. Find the sequence {ar } having the generating function A(z ) given by:
z z z
(i) (ii) 2
+
1 – 2. z (1 – z ) 1–z

1 z5
(iii) (iv)
1 – 5z 1 – 3z [R.G.P.V. (B.E.) Bhopal 2007]
2
1+ z
(v)
4 − 4z – z 2 [R.G.P.V (B.E.) Bhopal 2006, 2009]

4. Applying the generating function technique to solve the following recurrence relations:
(i) ar + 2 + 2ar +1 + ar = 1 + r [U.P.T.U.(M.C.A.) 2002]
(ii) ar + 2– 2ar +1 + ar = 2r
(iii) ar = 4 (ar –1 – ar – 2 ) + 2 [U.P.T.U. (M.C.A.) 2003]
r
(iv) ar = 6ar –1 – 12ar – 2 + 8 ar – 3 + 3

5. Solve by the method of generating functions the following recurrence relations:


(i) 2ar – ar –1 = 1 given that a0 = 0
(ii) ar – 2ar –1 = 2(r – 1)
1
(iii) ar − 2ar –1 + ar – 2 = ⋅ 2r , given that a0 = 2 and a1 = 1
4
(iv) 4ar – 4ar –1 + ar – 2 = 42– r , given that a0 = 0 and a1 = 1

(v) ar + 2 – 7 ar +1 + 10ar = 0 , given that a0 = 0 and a1 = 3


(vi) ar + 2 – 5ar +1 + 6ar = 0, given that a0 = 1, a1 = 2
1
(vii) ar + 2 + 3ar +1 – 4ar = , given that a0 = 0, a1 = 0
r!
Discrete Numeric and Generating Functions 669

6. Find the generating function for the sequence.


1 if 0 ≤ r≤ 3

A = {ar } where ar = 5 if 4 ≤ r ≤7
0 if r≥ 8

7. Define generating function of a sequence.

2
1. (i) A(z ) = ,| 2 z| <| (ii) A(3x )
1 − 2z
2
(iii) A(z ) = ,| − z| <| (iv) A(z ) = 3/(1 − z )
1–z
3 1
(v) A(z ) = (vi) A(z ) =
1 − 3z (1 − z )2
1
(vii) A(z ) = ,| z 2| <|
1 − z2
3 z 3
2. (i) A(z ) = (ii) A(z ) = +
1−z (1 − z )2 1−z
3– z 1
(iii) A(z ) = 2 (iv) A(z ) =
(1 − z ) 1 − 3z
1 3z 5z(1 + z )
(v) A(z ) = (vi) A(z ) = +
(1 + z )5 (1 − z )2 (1 – z )3

(vii) A(z ) = (ez − 1)/z (viii) A(z ) = 2z 2/(1 – z )3

3. (i) a0 = 0, ar = 2r –1 , r > 0 (ii) ar = r

0 , 0 ≤r ≤ 4
(iii) ar = 5r (iv) ar =  r – 5
3 , r≥5
2r − 1
4. (i) ar = (c0 + c1 r)(–1)r + (ii) ar = a0 + c1 r + 2r
6
 r2 
(iii) ar =  c0 + c1 r +  2r (iv) ar = (c0 + c1 r + c2r2 ) 2r + 27. 3r
 2

1
5. (i) ar = 1 – (ii) ar = A ⋅ 2r – 2(r + 1)
2r
(iii) ar = 1 − 2 r + 2r (iv) ar = 2–( r +1 )(r2+ 3r)

(v) ar = – 2r + 5r (vi) ar = 1 – 2r + 3r
∞ 
1 (–1)k (4)k −1 1  1 1 1

r
(vii) ar =  +  + – (–4) –
5 k = 0  |r − k |k  5 5 | 4r

6. 1 + z + z 2 + z 3 + 5z 4 + 5z 5 + 5z 6 + 5z7
670 Discrete Mathematical Structures

Objective Type Quesitons


Multiple Choice Questions
1. Let f , gand h be three numeric functions whose rth terms are ar , br and cr respectively and h = fg
then:
(a) ∆cr = ar +1 (∆br ) + br (∆ar ) (b) ∆cr = ar (∆br ) + br (∆ar )
(c) ∆cr = ar –1 (∆br –1 ) + br –1 (∆ar ) (d) none of these

2. Domain of the discrete numeric function is:


(a) set of natural numbers (b) set of integers
(c) set of complex numbers (d) set of rational numbers
3. The forward difference of a numeric function f whose value at r is ar is:
(a) ar –1 – ar (b) ar +1 – ar (c) ar + ar +1 (d) ar – ar –1

4. Numeric function ar is said to asymptotically dominate another numeric function br , if for two
positive constants m and k.
(a) | br2| ≥ m| ar| (b) | br| ≤ m| ar| (c) | br3| ≥ m| ar| (d) none of these
 1
If f = r + O   , g = r + O   then f g:
1
5.
 r  r
(a) r3 / 2 + O ( r ) (b) r3 / 2 + O (r) (c) r1 / 2 + O ( 2) (d) none of these

6. The number of positive integral solutions of the equation:


x + y + z = 9 is
(a) 8c0 (b) 8c1 (c) 8c2 (d) none of these

7. Generating function for the sequence 1, 2, 4, 8, 16, 32 ... is:


1 1 1 4
(a) (b) (c) (d)
1+ z (1 + z ) 2 (1 – 2z ) 1+ z

8. Generating function for f r (z ) = 3r , r ≥ 0 is


1 4
(a) (b) (1 + 3z )–1 (c) (d) none of these
1 + 3z (4 + 3z )

9. The generating function of 2ar +1 – ar = 4, a0 = 3 is:


r r r
 1  1  1
(a) ar = 4 +   (b) ar = 4 –   (c) ar =   (d) none of these
 2  2  2

10. The function A(z ) = e2z generate the sequence:


2 4 8 1 1 1
(a) 1, , , ,... (b) 1, , , ,...
|1 | 2 | 3 2 4 8
1 1 1
(c) 1, 1, , , ,... (c) none of these
2 4 16
Discrete Numeric and Generating Functions 671

State True or False


1 – z7
1. Generating function for 1, 1, 1, 1, 1, 1, 1, is is true or false.
1–z
az
2. The generating function for r ar is is true or false.
(1 – az )2

3. The generating function of recurrence relations


ar – 3ar –1 + 3ar – 2 – ar – 3 = 0 is
ar = A1 + A2r + A3 r2 is true or false.

4. The recurrence relation


ar = ar –1 + 5 with a1 = 2
The recursively defines sequence is 7, 12, 17, K is true or false.

Fill in the Blank(s)


1. The generating function of the Fibonacci sequence is .......... .
2. The generating function of the sequence of Binomial coefficient C (n, 0), C (n, 1),
C (n, 2). . . . . . . . . . C (n, n) n ≥ 1 is .......... .
3. The generating function of the sequence S(k ) = bak is .......... .

4. 1
.......... is the generating function of sequence S(n) = .
n!
5. .......... is the generating function of the sequence Sn = 3n, n ≥ 0 .
672 Discrete Mathematical Structures

Answer
Multiple Choice Questions
1. (a) 2. (a) 3. (b) 4. (b) 5. (a) 6. (c) 7. (c)
8. (d) 9. (b) 10. (a)

State True or False


1. True 2. True 3. True 4. True

Fill in the Blank(s)


z b 1
1. 2 2. (1 + z )n 3. 4. ez 5.
1 − z⋅z 1 − az 1 − 3z

❑❑❑
14.1 Counting Techniques
14.1.1 Permutation
The different arrangement which can be made out of a given number of things by taking some or all at a
time, are called Permutations.
For example, consider arranging the digits 1, 2 and 3. The possible arrangements as follows:
123, 132, 231, 213, 312, 321.
These are 6 permutations. Here the same three digits 1, 2 and 3 have been used but the number changes
when the order of digits is changed.
Thus, forming numbers with given digits means arranging the digits and hence it is the problem of
permutation.

? Notations
Let r and n be positive integers such that 1 ≤ r ≤ n.
n
Then, the number of all permutations of n things taking r at a time is denoted by P (n, r) or Pr

Theorem 1: Let 1 ≤ r ≤ n. Then the number of all permutations of n dissimilar things taken r at a time is given by
n n
Pr = n (n − 1)(n − 2). . . . (n − r + 1) = .
n − r

Theorem 2: The number of all per muta tions of n differ ent things taken all at a time is given by n Pn = n.

n n n n n n
Proof: We have, Pr = Put r = n, we find Pn = = = = n.
n − r n − n 0 1

Theorem 3: Prove that 0 = 1.


Proof: We have,
n n
Pr = [put n = r]
n − r
n n
⇒ Pn = (n Pn = n)
0
n n
⇒ n = ⇒ 0 = = 1.
0 n
674 Discrete Mathematical Structures

Example 1: Evaluate the following:


12 6 8 30
(i) P4 (ii) P4 (iii) P8 (iv) P2

12 12 12 12 × 11 × 10 × 9 × 8
Solution: (i) P4 = = = = 11, 880
12 − 4 8 8

6 6 6 6 × 5 × 4 × 3 × 2 6
(ii) P4 = = = = 360 or P4 = 6 × 5 × 4 × 3 = 360
6 − 4 2 2

8
(iii) P8 = 8 = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40, 320

30 30 30 30 × 29 × 28


(iv) P2 = = = = 870
30 − 2 28 28

20
Example 2: If Pr = 6, 840, find r.
20
Solution: We have, Pr = 6, 840

20
⇒ = 6, 840
 −r
20

20 20 × 19 × 18 × 17
⇒ =
20 − r 17

20 20
⇒ = ⇒ 20 − r = 17 or r = 3
20 − r 17

n
Example 3: If P4 = 20 × nP2, find n.

Solution: We have, n P4 = 20 × nP2


⇒ n (n − 1)(n − 2)(n − 3) = 20n (n − 1)
(n − 2)(n − 3) = 20 or n2 − 5n − 14 = 0 or (n − 7 )(n + 2) = 0 or n = 7 (as n ≠ − 2)

( n + 5) 11 (n − 1) ( n + 3 )
Example 4: Pn + 1 = × Pn, find n.
2
Solution: We have,
n+ 5 11 (n − 1) ( n + 3 )
Pn + 1 = × Pn
2

⇒ n + 5 =
11 (n − 1) n + 3
(n + 5) − (n + 1) 2 n + 3 − n
(n + 5)(n + 4) n + 3 11 (n − 1) n + 3
⇒ = ×
4 × 3 2 3
⇒ (n + 5)(n + 4) = 22 (n − 1)
⇒ n2 + 9n + 20 = 22n − 22
⇒ n2 − 13n + 42 = 0 or (n − 6)(n − 7 ) = 0 or n = 6, 7.
Combinatories 675

Example 5: If n P4 = 2 × 5P3 , find n.

Solution: n
P4 = 2 × 5P3

⇒ n (n − 1)(n − 2)(n − 3) = 2 × 5 × 4 × 3
⇒ n (n − 1)(n − 2)(n − 3) = 120
⇒ (n2 − 3n)(n2 − 3n + 2) = 120

⇒ m (m + 2) = 120 where m = n2 − 3n

⇒ m2 + 2m − 120 = 0

⇒ (m + 12)(m − 10) = 0
⇒ m = − 12, or m = 10
2 2
⇒ n − 3n = − 12 or n − 3n = 10

⇒ n2 − 3n + 12 = 0 or n2 − 3n − 10 = 0

3± 9 − 48
⇒ n= or (n − 5)(n + 2) = 0
2
3 ± i 39
⇒ n= or n = 5 or n = − 2
2
⇒ n=5 [neglecting negative and imaginary value]

9
Example 6: Find n if P5 + 5 ⋅ 9 P4 = 10 Pn.
9
Solution: We have, P5 + 5 ⋅ 9 P4 = 10 Pn

⇒ 9 + 5 ⋅ 9 = 10
 −5
9 9 − 4 10 − n

⇒ 9 + 5 ⋅ 9 = 10
4 5 10 − n

⇒ 9 + 9 = 10
4 4 10 − n

9 10 × 9
⇒ 2×  =
4 (10 − n)

⇒ 5 × 4 = 10 − n

⇒ 10 − n = 5 ⇒ 10 − n = 5 ⇒ n = 5.

Example 7: Prove that


n −1
n
Pr = Pr + r ⋅ ( n − 1 )Pr − 1
676 Discrete Mathematical Structures

n − 1 + r ⋅ n − 1  1 r 
Solution: R.H.S. = ( n − 1 )Pr + r ⋅ ( n − 1 )Pr − 1 = = n − 1  + 
n − 1 − r (n − 1) − (r − 1)  n − r − 1  n − r 
 1 r   n−r+ r 
= n − 1  +  = n − 1  
 n − r − 1 (n − r) n − r − 1  (n − r) n − r − 1 

n n − 1 n
= = = nPr = L. H. S.
(n − r) n − r − 1 n − r

Example 8: Prove that


n −1
(i) n Pn = nP( n − 1 ) (ii) n Pr = n ⋅ P( r − 1 )

n n n n n − 1
Solution: (i) n
Pn − 1 = = = n = nPn (ii) n
Pr = = = n ⋅ ( n − 1 )Pr − 1
n − (n − 1 ) 1 n − r (n − 1 ) − (r − 1 )

Exercise
1. Prove that 9 P3 + 3 ⋅ 9 P2 = 10 P3 .

2. Prove that n Pn = 2 ⋅ nP( n − 2).

3. Find all permutations of 7 objects taken 3 at a time.

( n −1)
4. (i) If n P4 : nP5 = 1 : 2, find n. (ii) If P3 : ( n + 1 )P3 = 5 : 12, find n.
2n + 1
(iii) If Pn − 1 : ( 2n − 1 )Pn = 3 : 5, find n.
11
5. If Pr = 12Pr − 1 , find r.

6. (i) If 2n
P3 = 100 × nP2, find n. (ii) If 16 nP3 = 13 n + 1 P3 , find n. (iii) If n P5 = 20 × nP3 , find n.

3. 210 4. (i) 6 (ii) 8 (iii) 4 5. 9 6. (i) 13 (ii) 15 (iii) 8

14.1.2 Permutation with Repetition


If out of n objects in a set, p objects are exactly alike of one kind, q objects exactly alike of second kind and r
objects exactly alike of third kind and remaining objects are all different then the number of permutation
of n objects taken all at a time is
n
=
 q r
p
Combinatories 677

Theorem 4: The number of permutations of n dif fer ent ob jects taken r at a time when each object may be
re placed any number of times in each arrangement is nr .
Proof: The number of permutations of n objects taken r at a time is the same as the number of ways of
filling r places with n different objects.
1st 2nd 3rd rth Place

No. of ways
n n n n

Number of ways of filling first place = n,


Number of ways of filling second place = n, (Since the object used in filling the first place can be
repeated)
Number of way of filling third place = n,
......................................................................
......................................................................
......................................................................
Number of way of filling rth place = n
Therefore, by the fundamental principle of counting, the required number of permutations
= n ⋅ n ⋅ n . . . . . r (times) = nr

Simple Practical Problems on Permutation


Example 9: How many ways are there to arrange the nine letters in the word ALLAHABAD.
Solution: Since the word ALLAHABAD contains 4A’s and 2L’s, therefore, the total number of
9
arrangement of nine letters in the word ALLAHABAD =  = 7, 560 ways.
4 2

Example 10: Find the number of different messages that can be represented by sequences of four dashes and
three dots.
7
Solution: The number of different message sent by 4 deshes and 3 dots = = 35
4 3

Example 11: Find the number of ways to point 12 offices so that 3 of them are green, 2 of them pink, 2 of
them yellow and the remaining one white.
12
Solution: The required number of ways = = 1, 66, 320
  2 5
3 2

Example 12: The letters of the word “TUESDAY” are arranged in a line each arrangement ending with letter
S. How many different arrangements are possible? How many of them start with letter D?
Solution: There are seven different letter in the word “TUESDAY”
678 Discrete Mathematical Structures

when last place is filled with letter S then remaining 6 places can be filled by 6 letters in
6
P6 = 6 ! ways = 720 ways

Now, when the letter ‘D’ is also fixed, then remaining 5 places can be filled by 5 letters in
5
P5 = 5! ways = 120 ways.

Example 13: How many signals can be made by using 6 flags of different colours when any number of them
may be hoisted at a time?
Solution: Number of signals that can be made using 1 flag = 6 P1 = 6

6!
Number of signals that can be made using 2 flags = 6 P2 = = 6 × 5 = 30
(6 − 2)!
6!
Number of signals that can be made using 3 flags = 6 P3 = = 6 × 5 × 4 = 120
(6 − 3)!
6!
Number of signals that can be made using 4 flags = 6 P4 = = 6 × 5 × 4 × 3 = 360
(6 − 4)!
6!
Number of signals that can be made using 5 flags = 6 P5 = = 6 × 5 × 4 × 3 × 2 = 720
(6 − 5)!

Number of signals that can be made using 6 flags = 6 P6 = 6 ! = 720

Therefore the total signals that can be made = 6 + 30 + 120 + 360 + 720 + 720 = 1, 956

Example 14: Find the number of 4 digit numbers that can be formed using the digits 1, 2, 3, 4 and 5 if no
digit is used more than once in a number. How many of these number will be even?
Solution: (i)

5! 5!
4 places can be filled by 5-digits in 5 P4 ways = ways = ways = 120 ways
(5 − 4)! 1!
(ii) 2 or 4

2 ways

For even numbers, unit’s place can be filled in 2 ways (either digit 2 or digit 4)
If units place is filled by any one digit, then remaining 3 places can be filled by remaining 4 digit in
Combinatories 679

4 4!
P3 = = 4 ! = 24 ways
(4 − 3)!

Hence, total number of ways = 2 × 24 = 48 ways.

Example 15: How many 4 letter words, with or without meaning, can be formed out of the letters of the
word ‘LOGARITHMS’ if repetition of letters is not allowed?
Solution: The word ‘LOGARITHMS’ contains different letters
∴ the number of required words = number of arrangements of 10 letters, taken 4 at a time
= 10 P4 = 10 × 9 × 8 × 7 = 5, 040
Example 16: It is required to seat 5 men and 4 women in a row so that the women occupy the even places.
How many such arrangement are possible?
Solution: In a row of 9 positions, the 2nd, 4th, 6th and 8th are the even places.
These 4 places can be occupied by 4 women in 4 P4 = 4 = 24 ways
The remaining positions can be occupied by 5 men in 5 P5 = 5 = 120 ways
∴ the total number of seating arrangements = 24 × 120 = 2, 880.

Example 17: How many words, with or without meaning, can be founded by using all letters of the word
‘DELHI’, using each letter exactly once?
Solution: The word ‘DELHI’ contains 5 different letters.
∴ the number of required words = number of arrangements of 5 letters taken all at a time
= 5P5 = 5 = 5 × 4 × 3 × 2 = 120.

Example 18: In an examination hall, there are four rows of chairs. Each row has 8 chairs, one behind the
other. There are two classes appearing for the examination with 16 students in each class. It is desired that in
each row all students belong to the same class and that no two adjacent rows are allotted to the same class. In
how many way can these 32 students be seated?
Solution: There are 2 ways of selecting the rows for a class i . e. , either I and III or II and IV.
16
Now, 16 students of one class can be arranged in 16 chairs in P16 = 16 ways
and 16 students of another class can be arranged in 16 remaining chairs in 16 P16 = 16 ways

∴ the required number of ways = [ 2 × 16 × 16 ]

Example 19: How many odd numbers greater than 80,000 can be formed using the digits 2, 3, 4, 5 and 8. If
each digit is used only once in a number?
Solution:

8 3 or 5

1 way 2 way

Since, it is an odd number greater than 80,000, therefore unit’s place can be filled by 2 ways (either by
digit 3 or by digit 5) and ten thousand’s can be filled by only 1 digit i . e. , 8.
Also other 3 places can be filled by remaining 3 digits in 3 P3 = 3! ways
Total number of ways = 2 × 1 × 3! = 12 (By F.P.C.).
680 Discrete Mathematical Structures

Example 20: How many four-digit numbers (between 1,000 and 10,000) are there with distinct 2 of these,
how many are odd numbers ?

Solution: (i) Total number of arrangements of ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 taking 4 at a time is
10
P4 . But these arrangements, also include those numbers which has 0 at thousand’s place. Such numbers
are not the four digit numbers. So, we have to exclude those three digit numbers when 0 is in thousand’s
place, we have to arrange remaining 9 digits by taking 3 digits at a time. The number of such arrangements
is 9 P3 .

Hence, the total number of four digit numbers = 10 P4 − 9 P3 = 5, 040 − 504 = 4, 536.

(ii) Now, since we want the odd number, therefore unit’s place can be filled in 5 (1 or 3 or 5 or 7 or 9)
ways.

1 or 3 1 or 3
or 5 or or 5 or
7 or 9 0 7 or 9

9 8
P3 ways 5 ways 1 ways P2 ways 5 ways

The required number of odd numbers = number of all 4 digited number (including 0) having an odd digit in
thousand’s place − number of these 4 digited odd numbers which have 0 in thousand’s place
= 5 × 9 P3 − 1 × 8 P2 × 5 = 5 × 9 × 8 × 7 − 8 × 7 × 5 = 2, 240 .

Example 21: Find the number of permutations of n different things taken r at a time each of which includes 3
particular things ?
Solution: Given r places, 3 places by particular things can be filled in r P3 ways.
n− 3
Now, we have to fill up the remaining (r − 3) places with the remaining (n − 3) things in Pr − 3 ways.
n− 3
Total number of permutations = r P3 × Pr − 3 .

Example 22: Find the number of permutations of n different things taken r at a time from which three
particular things are to be excluded.
Solution: We exclude the 3 particular things from the total number of things and form permutations of
the remaining (n − 3) things taken r at a time.
n− 3
Therefore, the required number of permutations = Pr .

Example 23: How many permutation can be made out of the letters of the word ‘TRIANGLE’. How many of
these will begin with T and end with E ?
Solution: The word TRIANGLE contains 8 different letters.
The number of all permutation made out of 8 letters = 8 P8 = 8 = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40, 320.

If the word starts with the letter T and ends with letter E then, the number of ways to form the words = 8 P6
8 8
= = = 20 ,160
|8 − 6 2
Combinatories 681

Example 24: In how many ways can 10 books be arranged on a shelf so that a particular pair of books shell
be (i) always together (ii) never together ?
Solution: Since a particular pair of books is always together, let us tie these two books together and
consider the pair as one book. Then, we shall have to arrange 9 books on the shelf.
9
This can be done P9 = 9 ways

Now, in each of these arrangements, the two books comparising the particular pair can be arranged among
themselves in 2 i . e. , 2 ways.
∴ the required number of ways = 2 × ( 9)
10
(ii) We know that 10 books can be arranged on the shelf in P10 = 10 ways

Also, the number of ways of arranging 10 books so that a particular pair is always together = 2 × ( 9)
∴ the number of ways of arranging 10 books so that a particular pair is never together
= ( 10 − 2 9) = (10 × 9 − 2 × 9) = (8 × 9)

Example 25: There are 6 English, 4 Sanskrit and 5 Hindi books. In how many ways can they be arranged on
a shelf so as to keep all the books of the same language together?
Solution: Let us make one packet for each of the books on the same language.
Now, 3 packets can be arranged in 3 P3 = 3 = 6 ways

6 books on English can be arranged in 6 = 720 ways

4 books on Sanskrit can be arranged in 4 = 24 ways

5 books on Hindi can be arranged in 5 = 120 ways

∴ the required number of ways = 6 × 720 × 24 × 120.

Example 26: In how many ways 9 pic tures can be hung of 6 picture nails on a wall (in a row) ?
Solution: Here, it is ob vious that only 6 pic tures out of 9 will be hung and 3 will be left out. The number
of ways in which pic tures can be hung on 6 picture nails on a wall is the same as the number of
arrangements of 9 things, taking 6 at a time.
Hence, the required number = 9 P6 = 9 × 8 × 7 × 6 × 5 × 4 = 60, 480.
Example 27: A tea party is ar ranged for 16 people along the two sides of a long table with 8 chairs on each
side. Four men wish to sit on one par tic ular side and two on the other side. In how many ways can they be
seated ?
Solution: The or der of seat ing arrangement is as below,
M1M2M3M4

S1 S2 S3 S4 S5 S6 S7 S8

SI SII SIII SIV SV SVI SVII SVIII


MI MII
682 Discrete Mathematical Structures
8
(i) 4 persons (M1 , M 2, M 3 , M 4 ) are to sit one-one side in any one side in any of 8 chairs in P4
ways.

(ii) 2 persons (M1 and M 2 ) wist to sit at other side on any of the 8 chairs. This can be in 8 P2 ways.

(iii) Rest 10 persons can sit on any of the remaining 10 chairs in 10 chairs in 10 P10 ways.

∴ Total number of ways of sitting = 8 P4 × 8


P2 × 10 P 10 (by using F.P.C.)

Example 28: In how many ways can 6 balls of different colours, namely, white, black, blue, red, green and
yellow be arranged in a row in such a ways that the white and black balls are never together ?
Solution: Let x be the number of all arrangements, each one of which contains white and black balls
together. And, let y be the number of arrangements, none of which contains white and black balls together.
Then, x + y = 6 P6 = 6 = 720.

Now, considering a white and a black ball tied together as one ball.
The number of ways of arranging the 5 balls = 5P5 = 5 = 120 .

Also, these 2 balls may be arranged among themselves in 2 = 2 ways.

Q x = 2 × 120 = 240 , So, y = 720 − 240 = 480


Hence, the requisite number of ways = 480.

Example 29: In how many ways can the word ‘PENCIL’ be arranged so that N is always next to E ?
Solution: Keeping E and N together and considering then as one letter, we have to arrange 5 letters at 5
places. This can be done in 5 P5 = 5 = 120 ways.

Example 30: The principal wants to arrange 5 students on the platform such that the boy Salim occupies the
second position and such that the girl Sita is always adjacent to the girl Rita. How many such arrangements
are possible?
Solution: Let the seats be arranged as shown O S O O O
I II III IV V
Keep Salim fixed at the second position. Since, Sita and Rita are to sit together, none of the two can occupy
the first seat. This seat can be occupied by any of the remaining two students in 2 ways. Now, two seats,
namely, III , IV, V, may be occupied by Sita and Rita in 4 ways. The remaining seat may now be occupied by
the 5th student in one way only.
∴ the number of required arrangement = 2 × 4 × 1 = 8.

Example 31: Find the number of ways in which 5 boys and 3 girls can be seated in a row so that two girls are
together.
5
Solution: The 5 boys may occupy 5 places in P5 = 5 = 120 ways.

Since no. two girls are to sit together, we may arrange the 3 girls at the 6 places. i . e. , X B X B X B X B X B
6
Now, the 3 girls at 6 places may be seated in P3 = 6 × 5 × 4 = 120 ways.
∴ The required number of ways = 120 × 120 = 14, 400.
Combinatories 683

Example 32: How many permutations of the letters of the word ‘APPLE’ are there ?
Solution: Here there are 5 objects, two of which are of same kind and the others are each of its own kind.
5
∴ The required number of permutations = = 60.
2 × 1 × 1 × 1

Example 33: (i) Find how many arrangements can be made with the letters of the word ‘MATHEMATICS’.
(ii) In how many of them are the vowels together?
Solution: (i) There are 11 letters in the word ‘MATHEMATICS’
Out of these letters M occurs twice. A occurs twice, T occurs twice and the rest are all different.

11
∴ Required number of arrangement = = 49, 89, 600.
2 × 2 × 2

(ii) The given word consists of 4 vowels namely A, E, A and I. Treating these four vowels as one letter, we
have to arrange 8 letters (MTHMTCS) + (AEAI);

out of which M occurs twice, T occurs twice and the rest are all different.
8
∴ The number of such arrangements = = 10, 080
( 2) × ( 2)
Corresponding to each such arrangement, the four vowels in which A occurs twice and the rest are
4
all different, can be arranged amongest themselves in = 12 ways.
2
∴ Total number of arrangements in which vowels are always together = 10080 × 12 = 1, 20, 960
Example 34: In the different permutations of the word ‘EXAMINATION’ are listed as in a dictionary, how
many items are there in the list before the first word starting with E ?
Solution: Starting with E, we have to find the number of arrangements of the remaining 10 letters,
EXAMINATION, out of which there are 2I’s, 2N’s, 2 A's and the rest of the letters are distinct.
10
The number of such arrangements is = = 4, 53, 600
2 × ( 2) × ( 2)
Clearly, we will have to start the next word with E, so the required numbers of items = 4, 53, 600.

Example 35: How many numbers greater than a million can be formed with digits 2, 3, 0, 3, 4, 2, 3 ?
Solution: Any number greater than one million will contain all the seven digits.
Now, we have to arrange seven digits, out of which 2 occurs twice, 3 occurs thrice and the rest are distinct.
7
The number of such arrangements = = 420
( 2) × 3

These arrangements will also include those which contain 0 at the million’s place. Keeping 0 fixed at the
million’s place, the remaining 6 digits out of which 2 occurs twice, 3 occurs thrice and the rest are distinct
6
can be arrange in = = 60 ways.
( 2) × 3
∴ The number of required numbers = 420 − 60 = 360.
684 Discrete Mathematical Structures

Example 36: In a shipment, there are 40 floppy disks of which 5 are defective, determine:
(i) In how many ways can we select five floppy disks?
(ii) In how many ways can we select five non-defective floppy disks?
(iii) In how many ways can we select five floppy disks containing exactly three defective floppy disks?
(iv) In now many ways can we select five disks containing at least 1 defective floppy disk?
[U.P.T.U. (B.Tech.) 2004]
Solution: (i) The required number of ways
| 40 40 × 39 × 38 × 37 × 36 ×| 35
= 40 C 5 = = = 39 × 38 × 37 × 12 = 6580088
5
| | 35 5 × 4 × 3 × 2 ×| 35

(ii) The non-defective floppy are 35


35
The number of ways to select five non-defective floppy = 35C 5 =
| | 30
5
35 × 34 × 33 × 32 × 31 ×| 30
= = 324632
5 × 4 × 3 × 2 × 1 ×| 30
35C 2 × 5C 3
(iii) The number of ways to select five floppy contain exactly 3 defective floppy disks =
40 C 5
35C 4 × 5C1 + 35C 3 × 5C 2 + 35C 2 × 5C 3 + 35C1 × 5C 4
(iv) The required selection =
40 C 5
Example 37: Given a cube and four identical balls. In how many way can the balls be arranged on the corners
of the cube?. Two arrangements are considered the same if by any rotation of the cube they can be transformed
into each other. [U.P.T.U. (B.Tech.) 2005]

Solution: The balls can be arranged on the eight corners of the cube in the number of ways.
|8 8 × 7 × 6 × 5 ×| 4
= 8C4 = = = 70 ways
4
| | 4 |4 × 4 × 3 × 2

Now, two arrangements are same iff the two corners between the two arrangements become common.

Hence, the total ways =70 – 65 = 65

Example 38: (a) How many selections any number at a time may be made from three white balls, four green
balls, one red ball one black ball, if at least one must be chosen.

(b) There are twelve students in the class. Find the number of ways that the twelve students take three
different tests if four students are to take each test. [U.P.T.U. (B.Tech.) 2008]

Solution: (a) Total number of balls = 9.

The probability that no ball is chosen = 1

Then, number of selection = | 9 – 1 = 362880 − 1 = 362879

|12
(b) The required number of ways = = 369600
|3 |3 |3 |3
Combinatories 685

14.1.3 Circular Permutations


So far we have been considering the arrangements of objects in a line. Such permutation are known as
linear permutations. In circular permutations, what really matters is the position of an object relative to
the others. If we consider the linear permutations ABCD, BCDA, CDAB and DABC. Then, clearly they are
distinct.
Now, we arrange A, B, C, D along the circumference of a circle as shown

A D C B
D B C A B D A C
B A D

C
If we consider the position of an object retative to others then we find that the above four arrangements are
the same.

Theorem 5: The number of circular permutations of n different objects, is n − 1.

Proof : Fixing the position of an object can be done in n ways, as the position of anyone of them may be
fixed. Thus, each circular permutation corresponding to n linear permutations depending upon where
from we start.
n
Since, there are n linear permutations, it follows that there are i . e. , (n − 1) circular permutations.
n

Theorem 6: The number of ways in which n persons can be seated round a table is n − 1.

Proof: Let us fix the position of one person and then arrange the remaining (n − 1) persons in all possible
ways. Clearly, this can be done in (n − 1) ways. Hence, the required number of ways = n − 1.

Theorem 7: Show that the number of ways in which n different beads can be arranged to form a necklace is
1
(n − 1) .
2
Proof : Fixed the position of one bead, the remaining (n − 1) beads can be arranged in n − 1 ways.

In case of arranging the beads, there is no distinction between the clockwise and anticlockwise
1
arrangements. So, the required number of ways = (n − 1) .
2

Example 39: A gentleman has 6 friends to invites. In how many ways can he send invitation cards to them, if
he has 3 servants to carry the cards ?
Solution: Two friends can be invited by the same servant. Hence, in this problem, the servant is
repeatable (R ) and the friend is non-repeatable (NR ).
Number of ways = [ R ]NR = 36 = 729 .
686 Discrete Mathematical Structures

Example 40: A telegraph has 5 arms and each arm is capable of 4 distinct positions, including the position
of rest. Find the total signals that can be made ?
Solution: Two arms may have the same position, but same arms cannot have two positions at a time.
Hence, position is repeatable (R), but arm is non-repeatable (NR )
Number of ways = [ R ]NR = 45 = 1, 024
But, in one case, when all the 5 arms will be in rest position, no signal will be made.
Hence, the required number of signals = 1, 024 − 1 = 1, 023.

Example 41: Find the number of way in which 3 friends can stay in 2 hotels ?
Solution: Two friends can stay in the same hotel but same friend cannot stay in two hotel at a time.
Hence, hotel is repeatable (R ) and friend is non-repeatable (NR ).
Number of ways = [ R ]NR = [ 2]3 = 8.

Example 42: Find the number of ways in which Dr. Bansal can give 2 hotels to his 3 sons?
Solution: A son can get 2 hotels but a hotel cannot be given again and again.
Hence, son is repeatable (R ) but hotel is non-repeatable (NR ).
Number of ways = [ R ]NR = (3)2 = 9.

Example 43: Find the number of ways in which 6 pictures can be hung on 9 picture nails (in a row)?
Solution: A picture can not hung on two picture nails at a time, but two pictures can hung on one picture
nail. Hence, picture nail is repeatable (R ) but picture is non-repeatable (NR ).
Number of ways = [ R ]NR = (9)6 .

Example 44: In how many ways can 8 students be arranged in


(i) a line (ii) a circle.
Solution: (i) The number of ways in which 8 students can be arranged in a line = 8
= 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40, 320.
(ii) The number of ways in which 8 students can be arranged in a circle = 8 − 1 = 7
= 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5, 040.

Example 45: In how many ways can a party of 4 men and 4 women be seated at a circular table so that no
two women are adjacent ?
Solution: The 4 men can be seated at the circular table such that there is a vacant seat between every pair
of men.
The number of ways in which these 4 men can be seated at the circular table = 3 = 6.

Now, the 4 vacant seats may be occupied by 4 women in 4 P4 = 4 = 24 ways.


∴ The required number of ways = 6 × 24 = 144.

Example 46: In how many ways can 7 persons sit around a table so that all shall not have the same
neighbours in any arrangements.
Solution: 7 persons set at a round table in 6 ways.
But, in clockwise and anticlockwise arrangements, each person will have the same neighbours.
1
So, the required number of ways = × 6 = 360.
2
Combinatories 687

Exercise
1. In how many ways can 5 person occupy 3 vacant seats?

2. In how many ways can 5 children stand in a queue.

3. In how many ways can 4 different books, one each in Chemistry, Physics, Biology and Mathematics
be arranged in a shelf?

4. Seven students are contesting the election for the presidentship of the students union. In how many
ways can their names be listed on the ballot papers?

5. Find the number of different 4 letter words that can be formed from the letters of the word
‘NUMBERS’.

6. Ten students are participating in a race. In how many ways can the first three prizes be won?
7. In how many ways can 6 boys and 5 girls be arranged for a group photograph if the girls are to sit on
chairs in a row and the boys are stand in a row behind them?

8. How many words can be formed from the lettes of the word ‘SUNDAY’? How many of these begin
with D?

9. In how many ways can the letters of the word ‘FAILURE’?

10. Find the number of permutations of the letters of the word ‘ENGLISH’. How many of these begin with
E and end with I?

11. In how many arrangements of word ‘GOLDEN’ will the vowels never occur together ?

12. In how many ways can 6 books on Economics, 5 on History and 3 on Hindi be arranged on a shelf so
that the books on each subject are always together?

13. A child has plastic toys bearing the digits 2, 2 and 5. How many three digit numbers can it make,
using them?

14. There are three blue balls, four red balls and five green balls. In how many ways can they be
arranged in a row?

15. How many arrangement can be made out of the letters of the word.
(a) INDIA (b) ENGINEERING (c) EXAMINATION

16. How many numbers can be formed with the help of the digits 5, 4, 3, 5, 3 ?

17. In how many ways can 6 persons be arranged in


(a) a line (b) a circle

18. There are 5 men and 5 ladies to dine at a round table. In how many ways can they seat themselves so
that no two ladies are together?
688 Discrete Mathematical Structures

Answer
1. 60 2. 120 3. 24 4. 5,040

5. 840 6. 720 8. 720; 120 9. 576

10. 5,040; 120 11. 480 12. 31,10,400 13. 3

14. 2,520 15. (a) 60 (b) 2,77,200 (c) 49,89,600 16. 30

17. (a) 6, (b) 120 18. 4 × 5 = 2, 880

14.2 Combinations
Combinations: Each of the different groups or selections which can be formed by taking some or all of a
number of objects, irrespective of their arrangements, is called a combination. The total number of
 n
combinations of n distinct objects taking r (1 ≤ r ≤ n) at a time is denoted by C (n, r) or nC r or   .
r

where, nC r is defined only when n and r integers such that n ≥ r and n > 0, r ≥ 0.

Illustration: The combinations of 4 objects a, b, c, d taking 2 at a time are ab, ac, ad, bc, bd, cd

14.2.1 Difference between a Permutation and a Combination


In combination, only a group is made and the order in which the objects are arranged is immaterial. In
permutation, not only a group is formed, but also an arrangement in definite order is considered.
Note: We used the word ‘arrangement’ for permutation and selections for combinations.
Theorem 8: The number of all com binations of n distinct objects, taken r at a time, is given by
n n
Cr =
 n − r
r
n
Proof: Let the number of all combinations of n objects, taken r at a time, be x. Then, C r = x.

Now, each combination contains r objects, which may be arranged amongst themselves is r ways.
Thus, each combination gives rise to r permutations.
∴ x combinations will give rise to x × r permutations.

So, the number of permutations of n things, taken r at a time is x × r


n
Hence, Pr = x × r = nC r × r

n
Pr n  n 
n n
∴ Cr = = Q Pr = 
r  n − r
r  n − r 
n n ( n − 1) ( n − 2) .... n factors
Note: We can write Cr = .
r
Combinatories 689

n
Theorem 9: Let 0 ≤ r ≤ n. Prove that C r = nC n − r .

n n n
Proof: We have Cn − r = = = nC r .
n−r
n − r n − (n − r) r 

Theorem 10: To prove that nC r + nC r − 1 = ( n + 1 )C r .

Proof: We have,
n n n n n n ⋅ (n − r + 1) n ⋅ r
C r + nC r −1 = + = + = +
r n − r r − 1 n − (r − 1) r n − r r − 1 n − r + 1 r ⋅ (n − r + 1) r n − r + 1
 n  (n + 1) n n + 1 n +1
=  ⋅ {n − r + 1 + r} = = = Cr
  
r n − r + 1   
r n − r + 1  n + 1 − r
r

Theorem 11: If 1 ≤ r ≤ n, prove that n × ( n − 1 )C r − 1 = (n − r + 1) × nC r − 1 .

Proof: We have n × ( n − 1 )C r − 1 = n × n − 1 =
n × n − 1

r − 1 × (n − 1) − (r − 1) r − 1 n − r

n (n − r + 1) n
= = (n − r + 1) × = (n − r + 1) × nC r − 1
r − 1 × n − r × (n − r + 1 ) r − 1 × n − r + 1

n
Cr n−r+1
Theorem 12: If n and r are positive integers such that 1 ≤ r ≤ n then n
= .
C r −1 r

Proof : We know that


n n n n
Cr = and C r −1 =
r n − r r − 1 × n − r + 1
n
n r − 1 n − r + 1 r − 1 × (n − r + 1) n − r  n − r + 1
×  = 
Cr
∴ = = 
n
C r −1 r n − r n r × (r − 1) n − r  r 

n +1
Theorem 13: If 1 ≤ r ≤ n, prove that nC r + nC r + 1 = C r +1.

n n n
Proof: C r + nC r +1 = +
 
r n − r (r + 1 ) n − r − 1
n n
= +
r × (n − r ) n − r − 1 (r + 1 ) r × n − r − 1

n  1 1 
=  + 
 
r n − r − 1  n − r r + 1

n (n + 1) (n + 1) n
= × =
r n − r − 1 (n − r)(r + 1) (r + 1) r × (n − r) × n − r − 1

= n + 1 = n + 1 = n +1
C r +1
r + 1 n − r r + 1 (n + 1) − (r + 1)
690 Discrete Mathematical Structures

Theorem 14: Prove that nC p = nC q ⇒ p = q or p + q = n.

Proof: We have, nC p = nC q = nC n − q

⇒ p=q or p=n−q or p + q = n.

Evaluate
Example 47: If n Pr = 720 and nC r = 120, find r.
n
n Pr
Solution: We know that Cr =
r
720 720
∴ 120 = ⇒ r = = 3
r 120

Hence, r = 3.

2n 2n × [1 ⋅ 3⋅ 5 . . . . (2n − 1)]
Example 48: Prove that Cn = .
n
2n 2n 2n
Solution: Cn = = 2
n 2n − n ( n)
(2n)(2n − 1)(2n − 2). . . . . . 4 ⋅ 3⋅ 2⋅ 1
=
( n)2
[ 2n (2n − 2)(2n − 4). . . . 4 ⋅ 2] × [(2n − 1)(2n − 3). . . . 5⋅ 3⋅ 1]
=
( n)2

2n [ n (n − 1)(n − 2). . . . 2⋅ 1][(2n − 1)(2n − 3). . . . 5⋅ 3⋅ 1]


=
( n)2

2n n [1 ⋅ 3⋅ 5 . . . . (2n − 3)(2n − 1)]


=
( n)2

2n × [1 ⋅ 3⋅ 5 . . . . (2n − 3)(2n − 1)]


= .
n

Example 49: If nC r − 1 : nC r : nC r + 1 :: 3 : 4 : 5 find n and r.


n n
C r −1 3 C 4 r 3 r+1 4
Solution: = and n r = ⇒ = and =
n
Cr 4 C r +1 5 n−r+1 4 n−r 5

⇒ 3n − 7 r = − 3 and 4n − 9r = 5
⇒ r = 27, n = 62
Combinatories 691

Exercise
1. Verify that 8 C 4 + 8C 3 = 9C 4 .

2. (i) If nC7 = nC 5, find n. (ii) If nC10 = nC14 , find nC 27


20 20
(iii) If Cr = C r + 6 , find r. (iv) If n Pr = 1680 and nC r = 70, find n and r.
n +1 n −1
(v) If C r + 1 : nC r = 11 : 6 and nC r : C r − 1 = 6 : 3, find n and r.

3. If n
C r : 15C r − 1 = 11 : 5 find r.

4. If 18 C r = 18C r + 2, find r C 5.
25 24
5. Find C 22 − C 21 .

Answer
2. (i) 12 (ii) 2925 (iii) 7 (iv) n = 8, r = 4 (v) n = 10, r = 5 3. 8 4. 56
5. 276

14.3 Practical Problems on Combinations


Example 50: In how many ways can a committee of 5 members be selected from 6 men and 5 ladies,
consisting of 3 men and 2 ladies?
6 × 5× 4 5× 4
Solution: 3 men out of 6 and 2 ladies out of 5 can be selected in 6 C 3 × 5C 2 = × = 200 ways.
3× 2×1 2×1

Example 51: A committee of 5 is to be formed out of 6 men and 4 la dies. In how many ways can this be done,
when (a) atleast 2 ladies are included (b) atmost 2 ladies are included.
Solution: (a) We have to make selection of
(i) (2 ladies out of 4) and (3 men out of 6) or (ii) (3 ladies out of 4) and (2 men out of 6) or
(iii) (4 ladies out of 4) and (1 man out of 6)
The number of ways of these selections are

Case (i) 4 C 2 × 6C 3 = 6 × 20 = 120 , Case (ii) 4 C 3 × 6C 2 = 4 × 15 = 60 ,


Case (iii) 4 C 4 × 6C1 = 1 × 6 = 6.
∴ Total number of ways to select such a committee = 120 + 60 + 6 = 186
(b) We have to make a selection of
(i) (1 lady out of 4) and (4 men out of 6) or (ii) (2 ladies out of 4) and (3 men out of 6)
The number of ways of these selections are

Case (i) 4 C1 × 6C 4 = 4 × 15 = 60 , Case (ii) 4 C 2 × 6C 3 = 6 × 20 = 120


692 Discrete Mathematical Structures

Case (iii) No of lady is selected then


Number of ways of selecting committee = 6C 5 = 6
∴ the required number of ways = 60 + 120 + 6 = 186

Example 52: An examination paper containing 12 questions consists of two parts, A and B, part A contains
7 questions and part B contains 5 questions. A candidate is required to attempt 8 questions, selecting atleast 3
from each part. In how many ways the candidate select the questions ?
Solution: We have,
(i) (3 out of 7 from A) and (5 out of 5 from B) or (ii) (4 out of 7 from A) and (4 out of 5 from B) or
(iii) (5 out of 7 from A) and (3 out of 5 from B)
The number of ways of these selections are

Case (i) 7 C 3 × 5C 5 = 35 × 1 = 35, Case (ii) 7 C 4 × 5C 4 = 35 × 5 = 175,

Case (iii) 7 C 5 × 5C 3 = 21 × 10 = 210


∴ the number of ways of selecting the questions = (35 + 175 + 210) = 420 .

Example 53: If 20 lines are drawn in a plane such that no two of them are parallel and no three are
concurrent, then in how many points will they intersect each other ?
Solution: Since, no two lines are parallel and no three pass through the same point, their point of
20 × 19
intersection, (i . e. , number of ways of selecting two lines from 20 lines) = 20C 2 = = 190 .
2×1

Example 54: How many lines can be drawn through 21 points on a circle ?
Solution: One line can be drawn by joining any 2 points, from 21 given points.
21 × 20
∴ Total no. of lines = 21C 2 = = 210.
2×1

Example 55: There are 15 points in a plane, no three of which are collinear. Find the number of triangles
formed by joining them.
Solution: One triangle is formed by selecting a group of 3 points from 15 given points.
15 × 14 × 13
∴ No. of triangles = 15C 3 = = 455.
3× 2×1
Example 56: Everybody in a room shakes hands with everybody else. The total number of handshakes is 66.
How many people are there in the room?
Solution: Let there are n persons in the room.
∴ Total no. of handshakes is same as the number of ways of selecting 2 persons among n
persons, i . e. , nC 2.
n
∴ C 2 = 66 [given]
n (n − 1)
= 66 ⇒ n2− n − 132 = 0
2
⇒ (n − 12)(n + 11) = 0 ⇒ n = 12 or n = − 11
But, no. of persons cannot be negative then n = 12.
Combinatories 693

Example 57: Determine the number of 5 cards combination out of a deck of 52 cards, if there is exactly one
ace in each combination.
Solution: One ace can be se lected from 4 aces and 4 other cards can be se lected from remaining 48 cards.
48 × 47 × 46 × 45
∴ No. of ways = 4C1 × 48C 4 = 4 × = 7,78, 320.
4 × 3× 2×1

Example 58: From a class of 25 students, 10 are to be chosen for an ex cursion party. There are 3 students
who de cide that ei ther all of them will join or none of them will join. In how many ways can they be cho sen?
Solution: There are two possibilities:

Case I: When the 3 particular students join the party. In this case, we have to select 7 more students from the
22
remaining 22 students. This can be done in C7 ways.

Case II: When the 3 particular students do not join the party. In this case, we have to select 10 students from
22
the remaining 22 students. This can be done in C10 ways

22 22 22 × 19 × 17 × 3 × 8
So, total number of ways = C7 + C10 = 170544 + 646646 = (720 + 2,730) = 8,17,190 .
10 × 9 × 8

Example 59: A committee of 12 is to be formed from 9 women and 8 men. In how many ways this can be
done, if atleast 5 women have to be included in a committee? In how many of these committees:
(a) the women are in majority, (b) the men are in majority?
Solution: The committee can be selected in the following way:

9 Women 5 6 7 8 9
→ (at least 5 women)
8 Men 7 6 5 4 3

∴ Total, number of ways = 9C 5 × 8C7 + 9C 6 × 8C 6 + 9C7 × 8C 5 + 9C 8 × 8C 4 + 9C 9 × 8C 3

= 1, 008 + 2, 352 + 2, 016 + 630 + 56 = 6, 062


Number of committees in which women are in majority = 2, 016 + 630 + 56 = 2,702
Number of committees in which men are in majority = 1, 008.

Example 60: If m parallel lines in a plane are intersected by a family of n parallel lines, find the number of
parallelograms formed.
Solution: A parallelogram is formed when two lines from the set of m parallel lines are intersected by the
other 2 lines from another set of n parallel lines.
Hence, the number of parallelograms formed in this case
m (m − 1) n (n − 1) mn (m − 1)(n − 1)
= mC 2 × nC 2 = × = .
2 2 4

Example 61: A student is allowed to select at most n books from a collection of (2n + 1) books. If the total
number of ways in which he can select at least one book is 255, find the value of n.
Solution: The stu dent may select at most n books out of (2n + 1) books. Thus, according to the given
condition.
2n + 1 2n + 1 2n + 1 2n + 1
C1 + C2 + C3 + . . . . + C n = 255
694 Discrete Mathematical Structures
1 2n + 1 2n + 1 2n + 1 2n + 1
⇒ [2 ⋅ C1 + 2 ⋅ C2 + 2⋅ C3 + . . . . + 2⋅ C n] = 255
2
1 2n + 1 2n + 1
⇒ [( C1 + C1 ) + (2n + 1 C 2 + 2n + 1
C 2 ) + . . . . + (2n + 1 C n + 2n + 1
C n )] = 255
2
1 2n + 1 2n + 1
⇒ [( C1 + C 2n ) + (2n + 1 C 2 + 2n + 1
C 2n − 1 ) + . . . .
2

+ (2n + 1 C n + 2n + 1
C n + 1 )] = 255 (Q mC r = m
Cm − r )

1 2n + 1 2n + 1 2n + 1 2n + 1
⇒ [( C1 + C2 + C3 + . . . . + C 2n )] = 255
2
1 2n + 1 2n + 1 2n + 1 2n + 1
⇒ [( C0 + C1 + C2 + K + C 2n + 1 ) − (2n + 1 C 0 + 2n + 1
C 2n + 1 )] = 255
2
1 2n + 1
⇒ [2 − (1 + 1)] = 255 (Q nC 0 + nC1 + nC 2 + . . . . + nC n = 2n )
2

⇒ 22n + 1 − 2 = 510 or 22n + 1 = 512 or 22n + 1 = 29 or 2n + 1 = 9 or n = 4 .

Example 62: A committee of 5 is to be formed out of 6 gents and 4 ladies. In how many ways this can be done
when
(i) at least 2 ladies are included, (ii) at most 2 ladies are included.
Solution: Total gents = 6, Total ladies = 4
(i) At least 2 ladies out of 4 ladies are included in the following ways
(1) 3 gents out of 6 gents + 2 ladies out of 4 ladies = 6C 3 × 4C 2 ways

(2) 2 gents out of 6 gents + 3 ladies out of 4 ladies = 6C 2 × 4C 3

(3) 1 gent out of 6 gents + 4 ladies out of 4 ladies = 6C1 × 4C 4

The total number of ways of forming the committee = 6C 3 × 4C 2 + 6C 2 × 4C 3 + 6C1 × 4C 4 = 120 + 60 + 6 = 186
(ii) At most 2 ladies out of 4 ladies are included in the following ways
(1) No lady and 5 gents = 6C 5 ways

(2) 1 lady and 4 gents = 4C1 × 6C 4 ways

(3) 2 ladies and 3 gents = 4C 2 × 6C 3 ways

Thus, the required ways of forming committee = 6C 5 + 4C1 × 6C 4 + 4C 2 × 6C 3 = 186 .

Example 63: A polygon has 44 diagonals. Find the numbers of its sides.
n (n − 3)
Solution: The number of diagonals of n sided polygon = nC 2 − n =
2
n (n − 3)
Given that: = 44
2

⇒ n2 − 3n = 88 or n2 − 3n − 88 = 0 or (n − 11)(n + 8) = 0 or n = 11 [Q n > 0]
Combinatories 695

Example 64: A box contains 5 different red and 6 different white balls. In how many ways can 6 balls be
selected so that there are at least two balls of each colour?
Solution: Total red balls = 5. Total white balls = 6
6 balls can be selected from the box so that there are at least two balls of each colour in the following ways:
(i) 2 red balls and 4 white balls = 5C 2 × 6C 4 ways
(ii) 3 red balls and 3 white balls = 5C 3 × 6C 3 ways
(iii) 4 red balls and 2 white balls = 5C 4 × 6C 2
Hence, the required ways = 5C 2 × 6C 4 + 5C 3 × 6C 3 + 5C 4 × 6C 2 = 150 + 200 + 75 = 425

Example 65: In how many ways can 21 identical books on English and 19 identical books on Hindi be placed
in a row on a shelf so that two books on Hindi may not be together?
Solution: Let E denote the position of an English book and H of Hindi book on a shelf. Since no two books
of Hindi must be together on the shelf therefore, we first arrange all books of English in a row. Since all the
books of English are identical so they can be arranged in a row in only one way as shown below
H E H E H E H ...... H E H E
As there are 21 books of English so there will be 22 places for Hindi books. Now we have 19 identical books
of Hindi, therefore out of 22 places, 19 places.
22 22 × 21 × 20
Total no. of ways = 22C19 = = = 1540
19
  22 − 19 3 × 2 ×1

Example 66: In how many ways can a cricket team be selected from a group of 25 players containing 10
batsmen, 8 bowlers, 5 all-rounders and 2 wicket keepers ? Assume that the team of 11 players requires 5
batsman, 3 all-rounders, 2 bowlers and 1 wicket keeper.
Solution: The selection of team is divided into 4 phases :
(i) 5 batsman out of 10 batsman can be selected in 10 C 5 ways.
(ii) 3 all-rounders out of 5 all-rounders can be selected in 5C 3 ways.
(iii) 2 bowlers out of 8 bowlers can be selected in 8 C 2 ways.
(iv) 1 wicket keeper out of 2 wicket keepers can be selected in 2C1 ways.
∴ Team can be selected in 10 C 5 × 5C 3 × 8C 2 × 2C1 ways = 1, 41,120 ways.

Example 67: In how many ways can a committee of 3 ladies and 4 gentlemen be appointed from a group
consisting of 8 ladies and 7 gentlemen ? What will be the number of ways, if Aishwarya of this committee
refuses to serve in a committee in which Salman is a member?
Solution: (i) 3 ladies can be selected from 8 ladies in 8 C 3 ways and 4 gentlemen from 7 gentlemen in 7 C 4
ways.
∴ No. of ways in which the committee can be appointed = 8C 3 × 7 C 4 = 56 × 35 = 1, 960.
(ii) First we find the no. of committees of 3 ladies and 4 gentlemen in which both Aishwarya and
Salman are members. In this case, we can select 2 other ladies from the remaining 7 in 7 C 2 ways
and 3 other gentlemen from remaining 6 in 6 C 3 ways.
∴ No. of ways in which both Aishwarya and Salman are always included = 7 C 2 × 6C 3 = 21 × 20 = 420.
Hence, the required no. of committees in which Aishwarya and Salman do not serve together
= 1, 960 − 420 = 1, 540.
696 Discrete Mathematical Structures

Exercise
1. In how many ways can a cricket team be chosen out of a batch of 15 players, if
(a) there is no restriction on the selection (b) a particular player is always chosen
(c) a particular player is never chosen.
15 14 14
[Hint: (a) C11 (b) C10 (c) C11 ]

2. Out of 5 men and two women, a committee of 3 is to be formed. In how many ways can it be formed if
at least one women is to be included?
3. From a class of 32 students, 4 are to be chosen for a competition. In how many ways can this be
done?
4. In how many ways can a student choose 5 courses out of 9 courses if 2 courses are compulsory for
every student?
5. A question paper has two parts, part ‘A’ and part ‘B’, each containing 10 questions. If the student has to
choose 8 from part ‘A’ and 5 from part ‘B’. In how many ways can he choose the questions ?
6. From a class of 25 students, 10 are to be chosen for an excursion party. There are 3 students who
decide that either all of them will join or none of them will join. In how many ways can the ten be
chosen?
7. A cricket team of 11 players is to be selected from 16 players including 5 bowlers and 2 wicket
keepers. In how many ways can a team be selected so as to consist of exactly 3 bowlers and 1 wicket
keeper?
8. (i) How many straight lines can be obtained by joining 12 points, 5 of which are collinear?

(ii) How many triangles can be obtained by joining 12 points, five of which are collinear ?
9. A polygon has 44 diagonals. Find the number of its sides.
10. In a village, there are 87 families of which 52 families have at most 2 children. In a rural
development programme 20 families are to be chosen for assistance, of which at least 18 families
must have at most 2 children. In how many ways can the choice be made?
11. A bag contains 4 red, 3 white and 2 blue marbles. 3 marbles are drawn at random. Determine the
number of ways of selecting at least 1 white marble in this selection.
12. In how many ways can 5 white balls and 4 black balls be arranged in a row so that no two black balls
are together.
13. A man has 6 friends. In how many ways can he invite one or more to a party?
14. A boy has 3 library tickets and 8 books of his interest in the library of these 8, he does not want to
borrow chemistry part II, unless chemistry part I is also borrowed.
15. Out of 6 teachers and 8 students, a committee of 11 is to be formed. In how many ways can this be
done, if the committee contains
(i) exactly 4 teachers, (ii) at least 4 teachers.
16. In how many ways can a cricket team be selected from 17 players in which 5 players can bowl ? Each
cricket team must include 2 bowlers?
Combinatories 697

1. (a) 1,365 (b) 1,001 (c) 364 2. 25 3. 35,960 4. 35

5. 35,960 6. 1,464 7. 722 8. (i) 57 (ii) 210

9. 11 10. 52
C18 × 35
C2 + 52
C19 × 35
C1 + 52
C 20

11. 64 12. 20 13. 63 14. 41

15. (i) 120 (ii) 344 16. 2,200

14.4 Permutations and Combinations with Unlimited Repetitions


Let U (n, r) denote-permutation of n-objects with unlimited repetitions, and V(n, r) denote the number of
r-combinations with unlimited repetitions, then
U (n, r) = nr and V(n, r) = (n − 1 + r, n − 1) consider the set {∞, a1 , ∞, a2, . . . . ∞, an} where a1, a2, K an are all
distinct. Any r-combination is of the form { x1 , a1 , x 2, a2K x n, an} where each x i is non-negative integer and
x1 + x 2 + K + x n = r
The number x1 + x 2 + K + x n are called Repetition Numbers. Conversely any sequence of non-negative
n
integers x1 + x 2 + K + x n, where ∑ xi = r
i=1

Corresponding to a − r combination { x1, a1 , x 2, a2, K x n, an}. The following results are made.
The number of r-combinations of {∞, a1 , ∞, a2, . . . ∞, an}
= The number of non-negative integers solution of x1 + x 2 + x 3 + K + x n = r
= The number of ways of placing r-indistinguishable balls in n numbered boxes.
= The number of binary number with n − 1 one r and r-zeros = C (n – 1 + r, r) = C (n – 1 + r, n – 1)

Example 68: How may solution are there to x1 + x 2 + x 3 + x 4 + x 5 = 16 . Where each x i ≥ 27


Solution: Let x i = y i + 2 where y i ≥ 0
∴ x1 + x 2 + x 3 + x 4 + x 5 = 16
Then y1 + 2 + y 2 + 2 + y 3 + 2 + y 4 + 2 + y 5 + 2 = 16
or y1 + y 2 + y 3 + y 4 + y 5 = 6
∴ The number of integer solution of x1 + x 2 + x 3 + x 4 + x 5 = 16
is the same as the number of integral solution as y1 + y 2 + y 3 + y 4 + y 5 = 6
Therefore, there are C (5 – 1 + 6, 6) = C (10, 6) such solution.

Example 69: How many integral solutions are there of x1 + x 2 + x 3 + x 4 + x 5 = 30 ?


Where x1 ≥ 2, x 2 ≥ 3, x 3 ≥ 4, x 4 ≥ 2, x 5 ≥ 0 [U.P.T.U. (B.Tech.) 2009]

Solution: Let x1 = y1 + 2, x 2= y 2 + 2, x 3 = y 3 + 4, x 4 = y 4 + 2, x 5 = y 5 + 2
Now, x1 + x 2 + x 3 + x 4 + x 5 = 30
698 Discrete Mathematical Structures

Then, y1 + 2 + y 2 + 2 + y 3 + 4 + y 4 + 2 + y 5 + 2 = 30
or y1 + y 2 + y 3 + y 4 + y 5 = 19
The number of integral solutions of x1 + x 2 + x 3 + x 4 + x 5 = 30
Where x1 ≥ 2, x 2 ≥ 3, x 3 ≥ 4, x 4 ≥ 2, x 5 ≥ 0
is the same as the number of integral solution of y1 + y 2 + y 3 + y 4 + y 5 = 19
Therefore, there are C (5 − 1 + 19, 19) = C (23, 19) such solution

Example 70: Enumerate the number of non-negative integral to the inequality x1 + x 2 + x 3 + x 4 + x 5 ≤ 19


[R.G.P.V. (B.E.) Raipur 2005, 2009; Pune (B.E.) 2008]
Solution: We can express the given inequality
x1 + x 2 + x 3 + x 4 + x 5 ≤ 19
As x1 + x 2 + x 3 + x 4 + x 5 = 0
x1 + x 2 + x 3 + x 4 + x 5 = 1
x1 + x 2 + x 3 + x 4 + x 5 = 2

x1 + x 2 + x 3 + x 4 + x 5 = 19
The number of non-negative integral solution of x1 + x 2 + x 3 + x 4 + x 5 = 0 is C(5 − 1 + 0, 0)
The number of non-negative integral solution of x1 + x 2 + x 3 + x 4 + x 5 = 1 is C(5 − 1 + 1, 1)
........................................................
........................................................
The number of non-negative integral solution of x1 + x 2 + x 3 + x 4 + x 5 = 19 is C(5 − 1 + 19, 19)
∴ The number of non-negative integral solution of
x1 + x 2 + x 3 + x 4 + x 5 ≤ 19
is C (5 − 1 + 0, 0) + C (5 − 1 + 1, 1) + K + C (5 − 1 + 19, 19)

Example 71: Find the number of 3-combinations of {∞, a1 , ∞ , a2, ∞, a3 , ∞, a4 } [Osmania (B.E.) 2008]

Solution: We have n = 4, r = 3
6 × 5× 4
∴ The number of 3-combination of the given set is C(4 − 1 + 3, 3) = C(6, 3) = 6 C 3 = = 20
3× 2

Example 72: Find the number of non-negative integral solution to


(i) n1 + n2 + n3 + n4 = 20 [U.P.T.U. (B.Tech.) 2004]

(ii) C1 + C 2 + C 3 + C 4 = 25 [U.P.T.U. (B.Tech.) 2005]

Solution: We have n = 4, r = 20
∴ The number of non-negative integral solution
|23
= C (4 – 1 + 20, 20) = C(23, 20) = 23C 20 = = 1, 771
|20 |3

(ii) The given equation is C1 + C 2 + C 3 + C 4 = 25


We have n = 4, r = 25
The number of solutions = C(4 − 1 + 25, 25) = C(28, 25) = 28 C 25 = 3276
Combinatories 699

Example 73: Find the number of ways of placing 8 similar balls in 5 numbered bones.

[M.K.U. (B.E.) 2004]

Solution: The number of ways of placing similar balls in 5 numbered boxes


| 12
= C(5 − 1 + 8, 8) = C(12, 8) = 12C 8 = = 495
|8 |4

Example 74: How many outcomes are possible by casting a 6 faced die 10 times. [Kurukshetra (B.E.) 2007]

Solution: The number of ways of costing a 6 faced die 10 times

|15
= C(6 – 1 + 10, 10) = C(15, 10) = 15C10 = = 30, 03.
|10 |5

Example 75: How many solution does x1 + x 2 + x 3 = 13 have where x1 , x 2, x 3 are non-negative integers with
x1 ≤ 4, x 2 ≤ 5 and x 3 ≤ 6 . [U.P.T.U. (B.Tech.) 2003; P.T.U. (B.E.) Punjab 2006; Nagpur (B.E.) 2004, 2008]

Solution: Let S be the set of all integers solutions of the given equation with each x i ≥ o, i = 1, 2, 3 and let
A1 , A2 and A3 be the set of integer solutions with x1 > 4, x 2 > 5 and x 3 > 6 or equivalently x1 ≥ 5, x 2 ≥ 6 and
x 3 ≥ 7 respectively. Then the number of solutions with 0 ≤ x1 ≤ 4, 0 ≤ x 2 ≤ 5 and 0 ≤ x 3 ≤ 6 will be
| A′1 ∩ A′ 2 ∩ A′ 3 |.
15 × 14
Now | S| =total number of solutions =13 + 3 –1 C13 =15C13 = = 105
2×1
10 × 9
| A1| = number of solutions with x1 ≥ 5 =(13 – 5)+ 3 –1C13 – 5 = 10C 8 = = 45
2×1
9×8
| A2| = number of solutions with x 2 ≥ 6 =(13 – 6 )+ 3 –1C13 – 6 = 9C7 = = 36
2×1
8 ×7
| A3| = number of solutions with x 3 ≥ 7 =(13 –7 )+ 3 –1C13 –7 = 8C 6 = = 28
2×1
4×3
| A1 ∩ A2| = number of solutions with x1 ≥ 5 and x 2 ≥ 6 =(13 – 5– 6 )+ 3 –1C13 – 5– 6 = 4C 2 = =6
2×1

| A1 ∩ A3| = number of solutions with x1 ≥ 5 and x 3 ≥ 7 =(13 – 5–7 )+ 3 –1C13 – 5–7 = 3C1 = 3

| A2 ∩ A3| = number of solutions with x 2 ≥ 6 and x 3 ≥ 7 =(13 – 6 –7 )+ 3 –1C13 – 6 –7 = 2C 0 = 1

| A1 ∩ A2 ∩ A3| = number of solutions with x1 ≥ 5, x 2 ≥ 6 and x 3 ≥ 7

= 0, since x1 ≥ 5, x 2 ≥ 6 and x 3 ≥ 7 and so x1 + x 2 + x 3 would exceed 13. Now by the


principle of inclusion-exclusion, we have

| A′1 ∩ A′ 2 ∩ A′ 3 | =| S|–| A1|–| A2|–| A3| + | A1 ∩ A2| + | A1 ∩ A3| + | A2∩ A3|–| A1 ∩ A2∩ A3|

= 105 – 45 – 36 – 28 + 6 + 1 + 3 − 0 = 6.

Thus, the number of solutions with 0 ≤ x1 ≤ 4, 0 ≤ x 2 ≤ 5 and 0 ≤ x 3 ≤ 6 is 6.


700 Discrete Mathematical Structures

Example 76: How many integer solutions are there to the equation.

x1 + x 2 + x 3 + x 4 = 13, 0 ≤ x i ≤ 5, i = 1, 2, 3, 4
[U.P.T.U. (B.Tech.) 2002; M.K.U.(B.E.) 2006]
Solution: Let S be the set of all integer solutions of the given equation with each x i ≥ 0 and let Ai be the set
of integer solutions with x i > 5 or equivalently x i ≥ 6. Then the number of solutions with 0 ≤ x i ≤ 5 will be
| A′1 ∩ A′ 2 ∩ A′ 3 ∩ A′ 4 |.
16 × 15 × 14
Now | S| = 13 + 4 –1C13 = 16C13 = = 560
3× 2×1
10 × 9 × 8
| Ai| =(13 − 6 ) + 4 −1C13 – 6 =10C7 = = 120
3× 2×1
| Ai ∩ A j| =(13 − 6 – 6 ) + 4 –1C13 − 6 − 6 = 4C1 = 4.

Since each x i ≥ 6, therefore the sum of three x i's would exceed 13. Therefore,
| Ai ∩ A j ∩ Ak| = 0.
Similarly, | A1 ∩ A2 ∩ A3 ∩ A4| = 0.
Now by the principle of inclusion-exclusion theorem, we have
4
| A′1 ∩ A′ 2 ∩ A′ 3 ∩ A′ 4 | =| S|– ∑| Ai|+| ∑| Ai ∩ A j| ∑
− | Ai ∩ A j ∩ Ak| + | A1 ∩ A2 ∩ A3 ∩ A4|
i=1 1 ≤ i < j ≤4 1 ≤ i< j< k ≤ 4

= 560 – 4C1 × 120 + 4C 2 × 4 – 4C 3 × 0 + 4C 4 × 0 = 104.

Hence the number of integer solutions with 0 ≤ x i ≤ 5 is 104.

Exercise
1. A committee of seven is to be formed from a boys and 5 girls. In how many ways can this be done.
When the committee contains.
(i) exactly three girls (ii) atleast three girls
2. A student is select two answer out of 10 questions in an examinations
(i) how many choices he has?
(ii) how many if he must answer the first three questions?
(iii) how many if he must answer atleast four of the five questions?
3. In how many ways 5 white balls and 3 black balls can be arranged in row so that no two black balls
may be together.
4. Among 20 members of a team, there are two wicket keepers and five bowlers. In how many ways can
eleven persons be chosen to include only are wicket keeper and atleast three bowlers?

5. Out of 5 officers and 10 clerks in an office, a committee consisting of 2 officers and 3 clerks is to be
formed. In how many ways committee be done if
(i) Any officers and any clerk can be included (ii) Are particular clerk must be in the committee?
(iii) Are particular officer cannot be in the committee.
Combinatories 701

6. A box contains 3 white 3 black balls and 4 red balls. In how many ways three balls be drawn from the
box if atleast one black ball is to be include in the draw?
7. Find the 3-combinations of {3, a, 2, b, 2, c, 1, d}
8. Find the number of 4-combinations of {∞, a1 , ∞, a2, ∞, a3 , ∞, a4 , ∞, a5}
9. Find the number of non-negative integral solution to x1 + x 2 + x 3 + x 4 + x 5 = 50
10. How many integral solutions are there to x1 + x 2 + x 3 + x 4 + x 5 = 20 , where x i ≥ 2 V i = 1, 2, 3, 4, 5
11. Find the number of integral solution to x1 + x 2 + x 3 + x 4 + x 5 = 20
where x1 ≥ 3, x 2 ≥ 2, x 3 ≥ 4, x 4 ≥ 6, x 5 ≥ 0

12. How many different outcomes are possible form tossing 10 similar dice?

13. Enumerate the number of non-negative integral solutions to the inequality


x1 + x 2 + x 3 + x 4 + x 5 ≥ 19

14. Find the number of integral solution to x1 + x 2 + x 3 + x 4 + x 5 ≥ 50


where x1 ≥ 4, x 2 ≥ 7, x 3 ≥ –14, x 4 ≥ 10

Answer
1. (i) 1260 (ii) 1716 2. (i) 45 (ii) 21 (iii) 35 3. 20 4. 54054

5. (i) 720 (ii) 210 (iii) 360 6. 64

7. aaa, aab, aac, aad, bba, bbd, cca, ccb, ccd, abc, abd, acd, bcd 8. 70 9. 316, 251

10. C(14, 10) 11. C(9, 5) 12. 3003

13. C (5 – 1 + 0, 4) + C (5 − 1 + 1, 4) + K + C (5 − 1 + 19, 4) 14. C(54, 3)

14.5 Pigeonhole Principle


This principle is also known as Dirilhlet Drawer Principle or the Shoe Box Principle. It can be stated
as follows.

14.5.1 Theorem of Pigeonhole Principle [U.P.T.U. (B.Tech.) 2005, 2006, 2007; U.P.T.U. (M.C.A.) 2008]

If n pigeons are assigned to m pigeonholes, and m<n, then at least one pigeonhole contains two or more
pigeons.
Proof: Let H1 , H 2. . . H m denote m pigeonholes and P1 , P2, K Pm , Pm +1 , . . . Pn denote n pigeons. We consider
the assignment of n pigeons to m pigeonholes as follows:
Let the pigeon P1 is assigned to pigeonhole H1 , pigeon P2 is assigned to pigeonhole H 2... and pigeon Pm to
pigeonhole H m . This assigns as many as pigeons possible to individuals pigeonholes. Since m < n, there are
(n − m) pigeons that have not yet been assigned. At least one pigeonhole will be assigned to a second
pigeon.
702 Discrete Mathematical Structures

Example 77: Show that among 13 people, there are at least two people who were born in the same month.
Solution: We consider 13 peoples as pigeons and 12 months (January, February, ... December) as the
pigeonholes. Here the number of pigeons is grater than the number of pigeonholes, therefore by
pigeonhole principle there will be atleast two people who were born in the same month.

Example 78: If eight people are chosen in any way from some group, at least two of them will have been born
on the same day of the week. [Delhi (B.E.) 2005]

Solution: Here each person (pigeon) is assigned to the day of the week (pigeonhole) on which he or she
was born. Since there are eight people and only seven days of the week, then by pigeon hole principle at
least two people must be assigned to the same day of the week.

Example 79: Show that if we choose 9 single shoes out of 8 distinct pairs of shoes, then we are sure to have a
pair. [Rohtak (B.E.) 2008]

Solution: Here 8 distinct pairs correspond to 8 pigeonholes and 9 single shoes correspond to pigeons. It
means m = 8 and n = 9, m < n then by pigeonhole principle, there must be one pigeonhole with 2 shoes
which means that we have chosen atleast one pair.

Example 80: Find the minimum number of students in a class so that three of them are born in the same
month. [Kurukshetra (B.E.) 2007; Osmania (B.E.) 2009]

Solution: Here n = 12 (months) which represent the number of pigeonholes.


m = k + 1 = 3 or k = 3, k is positive integer

Hence, the minimum number of pigeons = kn + 1 = 2 × 12 + 1 = 25 students.

Example 81: How many students must there be in a class to guarantee that at least two students receive the
same score in the final examination if the examination is graded on a scale from zero to one hundred points.

Solution: Here m = 2 But m = k + 1, k is any integer

then k + 1 = 2⇒ k = 1
m=101

So, total number of students in class to guarantee that atleast two students receive the same score.
= kn+ 2 = 1 × 101 + 1 = 102 .

Example 82: Show that if any five integers from 1 to 8 are chosen, then atleast two of them will have a sum 9.

Solution: Let A = {1, 2, 3, 4, 5, 6, 7, 8, }

The different sets, each containing two numbers whose sum is equal to 9 are
A1 = {1, 8}, A2 = {2, 7}, A3 = {3, 6}, A4 = {4, 5}.

Each of the five number chosen from 1 to 8 must belong to one of these sets. The four sets are consider as
pigeonholes and five chosen numbers are taking as pigeon. Since m = 4, n = 5 i . e. 4 < 5 Then by pigeonhole
principle we can say that the two of the selected numbers must belong to the same set whose sum is 9.
Combinatories 703

Example 83: 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.
Solution: Let the pigeonholes be labelled with the different numbers of hands shaken and we put the
people (pigeons) into their correct pigeonhole. Suppose there are n people, then since only shake hands
with each person at most once, the lables on the pigeonholes will go from o to (n–1) i.e. we have n holes
and n people. It is not possible for the o th and (n − 1)th the holes both to be occupied, because if one person
has shaken hands with nobody then there can not be any one person who has shaken hands with every
other person. Thus, we have at most (n − 1) holes occupied at any one time. Hence, by the pigeonholes
principle at least one of the holes has two occupants, which shows that there are at least two people who
have shaken hands the same number of time.

Example 84: What shall be the minimum number of words that must begin with the same alphabet at 27
English words.
Solution: Here, m = k n + 1 = 27 (Pigeonholes), n = 26 (number of alphabet)=(pigeons) – 1, where k is
any integer
∴ k × 26 + 1 = 27 ⇒ k = 1 and m = k+1 = 2
Hence at least two words must begin with the same alphabet.

Example 85: If there are 13 boys in a class, then find minimum number of boys born in the same months.
Solution: Consider month as pigeons i.e. n = 12 then find pigeonholes m. But n = 12, k n + 1 = 13

⇒ k × 12 + 1 = 13 ⇒ k = 1 , then m = k + 1 = 2

Example 86: Show that if seven numbers from 1 to 12 are chosen, then two of them will add up to 13.
Solution: There are six sets each containing two number that add up to 13 as follows:

A1 = {1, 12}, A2 = {2, 11}, A3 = {3, 10}, A4 = {4, 9} A5 = {5, 8}, A6 = {6, 7}
Each of the seven numbers belongs to one of these six sets. Since there are 6 sets, then by pigeonholes
principle two of the numbers chosen belong to the same set. These numbers add upto 13.

Example 87: If 20 candidates appear in a competitive examination then show that there exists at least two
among them whose Roll number differ by a multiple of 19. [U.P.T.U. (B.Tech.) 2004]

Solution: Let X be the set of Roll number of 20 candidates and Y be the set of remainder when any positive
integer is divided by 19.
i.e., Y = {0, 1, 2, . . . , 18}.

Here we define a function f : X → Y as f ( x ) = the remainder obtained when any positive integer is divided
by 19. Since | X | = 20 and | Y| = 19 i . e. ,| X | >| Y|, therefore by the pigeonhole principle function f cannot be
one-one. This shows that there exists two distinct Roll numbers x1 and x 2 such that f ( x1 ) = f ( x 2 )
x1 , x 2 can be written as x1 = 19n1 + f ( x1 ) and x 2 = 19n2 + f ( x 2 )
where n1 and n2 are positive integers.
This gives x1 – x 2 = 19 (n1 – n2 ). [Q f ( x1 ) = f ( x 2 )]
Now n1 – n2 is an integer. Therefore x1 − x 2 is a multiple of 19.
Hence there are at least two candidate whose Roll numbers differ by a multiple of 19.
704 Discrete Mathematical Structures

Example 88: If any 51 integers are chosen from the set {1, 2, 3, . . . . , 100} then show that among the chosen
integers there exist two integers such that one is multiple of the other. [U.P.T.U. (B.Tech.) 2005]

Solution: We know that every positive integer x can be written as=2p. r, where r is odd and p ≥ 0 (for
example, 12 = 22. 3 and 13 = 20 . 13). We shall call this odd integer r the odd part of integer x.
If x is in {1, 2, . . . . ,100} then its odd part r can only be in {1, 3, 5, . . . , 99}.

Let S be any set of 51 integers chosen from the set {1, 2, 3, . . . , 100}. Define a function
f : S → {1, 3, 5, 7, . . . , 99} by f ( x ) = odd part of x.
Since | S|=51 and |{1, 3, 5, 7, K , 99}| = 50, it follows from the pigeonhole principle that f cannot be
one-to-one. Thus there exist two integers x and y in S such that their odd parts f ( x ) and f ( y ) are same. That
is, f ( x ) = f ( y ). Therefore, we have
x = 2p⋅ r and y = 2q. r for some integers p and q.

If p ≥ q then x = 2p– q, y and therefore x is a multiple of y. If p < q then y is a multiple of x. Thus either x is
multiple of y or is multiple of x.

Example 89: Let any given five points to be placed in the interior of an equilateral triangle of side 1.
Show that there exists two points within a distance of at most 1/2.
Solution: Let us divide the given equilateral triangle into four equal triangles
(pigeonholes) as shown in the figure. The given five points (pigeons)
P1 , P2, P3 , P4 , P5, say, will be placed in these four triangles. By the pigeonhole
principle at least two of them must belong to one of the four small triangles. P4 P5
Clearly the distance between these points (P4 and P5 as shown in the Fig. 14.1)
1 P3
cannot exceed the side of the triangle which is .
2
P1 P2
1
Hence we conclude that there exists two points within a distance of at most . Fig. 14.1
2

Example 90: Given any five points inside a square of side 1, show that there exists two points within a
distance of at most 1/ 2 .
Solution: Let us divide the given square into four equal squares as shown in the Fig. 14.2 1/2 1/2
The given five points (pigeons) will be placed in these four squares (pigeonholes). By the
1/2
pigeonhole principle at least two of them must belong to one of the four small squares. The
distance between these two points cannot exceed the length of the diagonal of the small
1 2 1
square which is 1 + 12; i . e. , .
2 2
1 Fig. 14.2
Hence we conclude that there exists two points within a distance of at most .
2
Example 91: Show that any sequence of n2 + 1 distinct integers contains an increasing subsequence of length
n+1.
Solution: Suppose a1 , a2, a3 , . . . , an2 +1 is a sequence of n2 + 1 distinct integers (pigeons). Corresponding

to each ak , we now consider an ordered pair ( x k , y k ), where x k is the length of a longest increasing
subsequence starting at ak and y k is the length of a longest decreasing subsequence starting at ak .
Combinatories 705

Suppose, if possible, that there is no increasing or decreasing subsequence of length n + 1 in the sequence ai
of n2+1 integers. Then it is clear that the set {( x k , y k ) has at most n2 distinct ordered pairs (pigeonholes).
It follows by the pigeonhole principle that there must exist two elements ai and aj in the sequence which
correspond to the same ordered pair; i.e.,( x i, y i ) = ( x j , y j ). But this is not possible because if ai < aj then we
must have x i > x j and if ai > aj then we must have y i > y j . In each case, we have a contradiction. This
moves that there is either an increasing subsequence or a decreasing subsequence of length n + 1 .

14.5.2 The Extended Pigeonhole Principle


Theorem: If n pigeons are assigned to m pigeonholes, then one of the pigeonholes must contain at least
n – 1 n   p  p
+ 1 or + 1 pigeons =   denotes the largest integer, less than or equal to the rational number   .
 m   m  q
   q
Proof: We shall prove this theorem by contradiction. Let each pigeonhole contain no more than 
n – m
 m 
 n − 1  pigeons in all but  n − 1  m(n − 1) n −1
pigeons. Then, there are at most m ⋅ < ⇒ =n–1
 m   m  m  m 

i.e. there (n − 1) pigeons in all. Which is contradiction our assumption. Hence one of the pigeonholes must

contain at least 
n – 1
+1 pigeons.
 m 

Example 92: Show that if any 26 people are selected then we may choose a subset of 4 so that all 4 were born
on the same day of the week.
Solution: We assign each person to the day of the week on which she or he was born. Then number of
pigeons (people) are to be assigned to 7 pigeonholes with n = 26 and m = 7 at least.
n −1  n −1  26 − 1 
+ 1 or +1 = + 1 = 4 people
 m   m   27 
must have been on the same day of the week.
Example 93: There are 38 different time periods during which classes at university can be scheduled if there
are 677 different classes, how many different rooms will be needed?
Solution: Assign each class to a time period then 677 different classes (pigeons) has to be assigned to 38
pigeonholes. Here n = 677, m = 38 .
Then by generalized pigeonhole principle, one of the pigeonholes must contain at least
 677 
+ 1 = [17. 81] + 8 = 17 + 1 = 18 pigeons
 38 

Example 94: In a group of six people, each pair of individuals consists of two friends or two enemies. Show
that there are either three mutual friends or three mutual enemies in the groups.
Solution: Let A be one of the six people of group. There are either three or more among the other five
people who are friends of A or enemies of A. Then by generalized pigeonhole principle five objects are
divided into two sets, one has at least  + 1 = 3 objects. Let B, C and D are friends of A . If any two of these
5 
 2 
individual are friends then these two and A form a group of three mutual friends. Otherwise B, C and D
form a set of three mutual enemies. In the second case suppose B, C and D are enemies of A. If any two of
these individual are enemies then these two and A form a group of three mutual enemies otherwise B, C
and D form a group of three mutual friends.
706 Discrete Mathematical Structures

Example 95: How many letters one must choose from the set of 15 A ’ s, 20’ s B and 25’ C, so that 12 identical
letters will always be included in the selection.
Solution: We see that there are three types of letters (pigeonholes) to be chosen from the set having
15A ’ s , 20B ’ s and 25C’ s, so that 12 identical letters should always be included in the selection is the smallest
n −1
integer n such that k + 1 = 12, k=
 3 

n – 1
or + 1 = 12 ⇒ [ n – 1] = 11 × 3 ⇒ n = 34
 3 

Thus, 34 is the minimum number of letters to be chosen from the set having 15A ’ s 20B ’ s and 25’ C so that 12
identical letters will always be included in the selection.

Example 96: What is the minimum number of students required in a class to be that at least five will receive
the same grade if there are four possible grades A, B, C and D.
Solution: There are four grade A, B, C, D which is the pigeonholes and at least 5 students must receive the
same grade. We have to find minimum number of students which is pigeons (n) such that
n −1
+1 = 5
 4 

n −1
or =4 or (n − 1) = 16 or n = 17.
 4 

Example 97: Show that if seven colours are used to paint 50 cars, at least eight cars will have the same
colour.

Solution: Let n = 50 cars = pigeons, m = 7 colours = pigeonholes

n – 1  50 – 1 
Then, by generalized pigeonhole principle +1 = + 1 = 8 Cars
 m   7 

will be the same colour.

Example 98: Show that among 1000 people there are at least 84 people who were born in the same month.
Solution: Where n = 1000 people = pigeons, m = 12 months = pigeonholes
n −1 1000 − 1 
Then, by generalized pigeonhole principle, we have  +1 = + 1 = 83 + 1 = 84 people.
 m   12 

who were born in the same month.

Example 99: Prove that among 1,00,000 people there are two who born on the same time.
[R.G..P.V. (B.E.) Bhopal 2001, 2007]

Solution: Let n = pigeons = 1,00,000 people.


A person can be born at any second = 24×60×60 = 86, 400 seconds i . e. , m = 86, 400 = pigeonholes. By
generalized pigeonhole principle
1, 00, 000 − 1 
 86, 400  + 1 = (1.16) + 1 = 1 + 1 = 2 people are born on same time.
 
Combinatories 707

Exercise
@ Pigeonhole
1. State and prove pigeonhole Principle.
[U.P.T.U. (B.Tech.) 2007; U.P.T.U. (M.C.A.) 2008; R.G.P.V. (B.E.) Bhopal 2001, 2002, 2003, 2009;
Rohatak (B.E.) 2007; P.T.U. (B.E.) 2005; M.K.U. (B.E.) 2005, 2009]
2. If a bag contains several white, red and black shoes, then find the minimum number of shoes that a
person needs to choose in order to get two pairs (4) shoes of the same colour.

[Hint: n = 4, k + 1 = m = 5 ⇒ kn + 1 = 17]

3. If there are several black, white and green balls in a bag, then find the number of balls that must be
choosen to be sure of getting pair of balls with the same colour.
4. A professor tells three stories from ‘Panchtantra’ in his class each year. How many stories does the
professor require in order to never repeat exactly the same triple of stories over a period of 12 years.
5. If there are 104 different pairs of people who know each other at a party of 30 people, show that
some person has at most acquaintances.
6. Given any ten points inside an equilateral triangle of side 1, show that there are two points within a
distance of at most 1/3.
[Hint: Divide the given triangle into 9 square triangle]
7. How many persons must be chosen in order that atleast 7 of them will have birthdays in the same
calender month?

  n − 1 
Hint:  12  + 1 = 7

8. How many letters one must choose from the set of 15 A' s 20 B' s and 25C ' s , so that 12 identical letters
will always be included in the selection.
9. Show that atleast in any of the seven classes there must be two that meet on the same day that no
class hold on Sunday.
10. 11 shoes are selected from 10 pairs of shoes. Show that there is a pair of matched shoes among the
selection.
11. Show that in a set of five distinct integers, there must exists two integers with the same remainder
when divided by 4.
12. Show that if any five numbers from 1 to 8 are chosen then two of them will add upto 9.
13. Show that if any 30 people are selected, then we may choose a subset of 5 so that all 5 were born on
the same day of the week.
14. If 30 processors are inter connected, show that atleast two processors are directly connected to the
same number of processors.
15. There are four doors to enter a hall and three doors to leave the hall. In how many ways can a person
enter and leave the hall?
16. Explain the pigeon hole principle. [U.P.T.U. (M.C.A.) 2009]
708 Discrete Mathematical Structures

2. 17 3. 4 4. 6 7. 73 8. 34 15. 12

Objective Type Quesitons


Multiple Choice Questions
1. There are 4 black, 3 green and 5 red balls. In how many ways can they be arranged in a row?
|12 |12 |4 |3 |5
(a) (b) (c) (d) none of these
|4 | 3 | 5 |4 | 8 | 12

2. The value of 2 p(n, n − 2) is


(a) p(2n, n) (b) P (n, n − 2) (c) p(n, n) (d) none of these

3. How many words of three distinct letters can be formed from the letters of word LAND?
(a) 24 (b) 28 (c) 20 (d) 10

4. The number of circular permutations of n different objects is


(a) |n (b) |n − 1 (c) |n + 1 (d) none of these

5. In how many ways can a party of 9 persons arrange themselves around a circular table?
(a) |9 (b) |8 (c) |7 (d) none of these

6. How many five digit numbers can be formed with digits 2, 3, 5, 7, 9 which are
(a) odd (b) even
(c) greater then 30,000 (d) lie between 30,000 and 90,000

7. If p(n, 4) : p(n 3) = 9 : 1 the value of n


(a) 9 (b) 8 (c) 24 (d) none of these

8. The number of permutation of the letters in the name ‘TIMTIM’.


(a) 100 (b) 120 (c) 180 (d) none of these

9. If a class has students from 3 states in India, then the minimum number of students that must be
chosen from the class to be sure to have students belonging to the same state is
(a) 4 (b) 1 (c) 3 (d) 1

10. In how many way can three boys and two girls sit in a row?
(a) 48 (b) 24 (c) 120 (d) none of these

11. I have 4 friends; in how many ways can I invite them for dinner?
(a) 20 (b) 10 (c) 15 (d) none of these

12. If a set A = {2, 4, 7, 9, 10, 12}, then the number subsets of A having less then 4 elements are
(a) 26 (b) 12 (d) 12 C 4 (d) none of these
Combinatories 709

State True or False

1. Suppose that you work into a theater that has a single row of 6 seats. If 2 seats are to be occupied
then 30 seating arrangements are possible it is true or false.

2. If nc = nc then n = 7 is true or false.


2 5

3. We can arrange the letter in the words NOON by six ways is true or false.

4. True or false:

(i) n p = nc | r (ii) nc + nc = nc
r r r r −1 r +1

5. If (n + 1) or more pigeons are placed into n pigeonholes then there is at least one pigeonhole
containing two or more pigeons is true or false.

6. The permutation can either be odd or even but not both.

Fill in the Blank(s)


1. If n pigeons are assigned to m pigeonholes then, one of the pigeonhole must contain at least
.......... pigeons. [U.P.T.U. (M.C.A.) 2008]

2. If n pigeon holes are occupied by k n + 1 or more pigeon, where k is a positive integers then at lest one
hole is occupied by .......... or more pigeons. [M.C.A. (Rohtak) 2009]

3. The number of 3- combination f (∞, a1 , ∞, a2, ∞, a3 , ∞, a4 ) is .......... .

4. The total number of combinations of n things taken 1, 2, 3. . . n at a time ......... .

5. c (n, r) = . . . . . . . . . .
710 Discrete Mathematical Structures

Answer
Multiple Choice Questions
1. (a) 2. (c) 3. (a) 4. (b) 5. (b)
6. (a) 96 (b) 24 (c) 96 (d) 72 7. (a) 8. (c) 9. (a) 10. (c)
11. (c) 12. (a)

Stage True or False


1. T 2. T 3. T 4. (i) T (ii) F 5. T 6. T

Fill in the Blank(s)


1. km+1 2. k+1 3. 20 4. 2n – 1 5. c(n, n − r)

❑❑❑
Polya's Theorem 711

15.1 Introduction to Polya's Theorem


15.1.1 Cycle Structure
Let S={a, b, c, d} is a set and P1 =  a b c d be a permutation on A of degree 4.
 b d c a 
Cyclicaly it can be represented as (a b d )(c). In that permutations we have
1 cycle of length 1, 0 cycle of length 2, 1 cycle of length 3 and 0 cycle of length 4.
or denoting length of cycle by i and number of cycle of length i by σ i, we have,
σ1 = 1, σ 2 = 0, σ 3 = 1, σ 4 = 0
Now, we can say the type of permutation (σ1 , σ 2, σ 3 , σ 4 ) is (1, 0, 1, 0)

15.1.2 Cyclic Structure


The permutation is written as Y11 Y20 Y13 Y40 or Y11 Y13 where Yi = dummy variables without any significance.
The subscripts of Y indicate length of cycles and exponents or indices of Y denote number of the
corresponding cycles. The cycle structure can also be defined as Y1σ1 Y2σ2 Y3σ3 . . . . YKσκ

where σ i is the number of cycles of length i, i = 1, 2, . . . k.

Illustration: If the set S = {a, b, c, d, e, f , g, h} of degree 8 and P = (a, b, c)(c)(d, e, f ), (g ) is an 8 degree.


Permutation acting on S, then cycle structure of P is Y12 Y20 Y32 Y40 Y50 Y60 Y70 Y80 = Y12 Y32

Illustration: Let S = {a, b, c} be a set. Total number of possible permutations on S are 6 as


(a)(b)(c), (a, b)(c), (a, c)(b), (a)(b, c), (a, b, c), (a, c b)

Their cyclic structures are Y13 , Y1 Y2, Y1 Y2, Y1 Y2 Y3 , Y3

15.1.3 Cycle Index of a Permutation Group


The expression obtained on summing the cycle structure of all (say m) the elements in the permutation
group P (of order m) divided by the number of elements (i.e. permutation in P (= m) is called the cycle
index of P and is denoted by Z(P).

Illustration: If the set S = (a, b, c) then cycle structures of all its permutation (elements of cycle group P) are

Y13 , Y1 Y2, Y1 Y2, Y1 Y2 Y3 , Y3


712 Discrete Mathematical Structures

1 2
Therefore, the cycle index of P is given by Z(P ) = (Y1 + 3Y1 Y2 + 2Y3 )
6
Similarly, the cycle index of permutation group of degree 4 and order 4 shown in example is given by
1
Z(P ) = (Y14 + Y22 + 2Y4 )
4

15.1.4 Figures, Configurations and Content in Relation to Polya's Theorem


Let there are two finite sets, the domain set D and the range set R, Let P be a permutation group on D.
Elements P of set R are called Figures and functions from D to R are called Configurations. Suppose a
quantity denoted by symbol or a real number say W(P) denote the content or Weight of the element P ∈ R .
A mapping from D to R shall consist of a sequence of |D| or n (D) elements of set R so that the i thelement
[ = f (di )] in the sequence is the image of the i thelement (di ) of set D under f.

The Content W(f) of a mapping is defined as the product of the content of all its images. Thus
W ( f ) = II W[ f (di )]
d ∈D
All mapping from D to R are divided into equivalence classes by a permutation group P acting on set D. The
weight of an entire equivalence class of functions from D to R is defined to be the common weight of
functions in this class.

Polya's Theorem helps us in counting the number of equivalence classes with various weight when D, R, P
and weight W(P) for each P ∈ R are given.

15.1.5 Figure Counting Series and Configuration Series


The weight assignment of element of set R can be described by means of a figure counting series given by

∑ aq X
q
A( X ) =
q= 0

Where aq = the number of elements in set R with weight X q. Similarly the number of configuration is
expressed in terms of configuration counting series given by

B( X ) = ∑ bm X m
m =0

where bm = the number of different configuration with weight X m .

15.2 Polya's Enumeration (or Counting) Theorem


Statement:-
The configuration counting series B(x) is obtained by substituting the figure counting series A( x i ) for each
y i in the cycle index Z(P ; Y1 , Y2. . . Yk ) of the permutation group P i.e.

(
B( x ) = Z P ; ∑ aq x q, ∑ aq x 2q, ∑ aq x 3 q. . . . . . . . ∑ aq x kq, ) ...(1)
Polya's Theorem 713

OR
in case we suppose weight function W defined in R to be two dimensional, the counting series shall be
given by A( x, y ) = ∑ amn x m y n, where amn denotes the number of figure of weight (m, n) in R and
configuration counting series is given by B( x, y ) = ∑ bmn x m y n

where bmn denotes the number of orbits (= equivalence classes of configurations) of weight x m y m in R D ,
then the Polya's Theorem can be stated as follows.
The configuration counting series is obtained by substituting the figure counting series into the cycle index of
the configuration group, i.e. B( x, y ) = Z(P , A( x, y )) = Z(P , f ( x, y ), F ( x 2, y 2 ). . . . f ( x k , y k )) ...(2)
[M.K.U. (B.E.) 2005, 2007, U.P.T.U. (M.C.A.) 2008]
Proof: To prove this theorem we shall prove this theorem with the help of a well known counting formula
due to Burnside which is stated below as a theorem.
Theorem: Let P be a permutation group on a set X with orbits σ1 , σ 2, σ 3 … σ n and Let w be a function which
assign a weight to each orbit. w is defined on X so that w( x ) = w(σ i ) whenever x ∈ σ i then the sum of the weight
of orbits is given by
n
| P |. ∑ w(σ i ) = ∑ ∑ w (x) ...(3)
i=1 α ∈ P x ∈ αx

15.2.1 Corollary (Burnside’ s Lemma)


1
The number N(P) of the Permutation group P is given by N (P ) =
| P |α ∈P
∑ t k (α) ...(4)

Main Proof: Let α be a permutation in a group P and α be the corresponding permutation in the power
group E p. Let φ be a configuration fixed by α and C be the cycle of length k in the disjoint cycle
decomposition α.
Then φ(a) = φ(ba) for each element a in the representation of b satisfying the condition that all elements
permuted by b have the same image under φ.
Again if element of each cycle of permutation α have same image under a configuration φ, then α fixes φ .
All configuration fixed by α are obtained independently by choosing an element e ∈ R for each cycle C of α
and putting φ(a) = e for all values of a permuted by C. Then if the weight W (r) = ( p. q) where p = w1 r, q = w2r
and C has length k, the cycle C contributes a factor of

∑ ( x p y q )kto the sum ∑ w(φ )


e ∈R φ=α φ
p q k
∴ ∑ (x y ) = A( x k , y k ) ...(5)
e ∈R
s
Now for each α in P we find ∑ w(φ ) = ∏ A( x k , y k )⋅ t k (α) ...(6)
φ=α φ k =1

Taking summation (6) over all permutation α in P( or over α in E p) and dividing both sides by| P| = | E p|, we
find
s
1 1
| E P|
∑P ∑ w (φ ) =
| P |
∑ ∏ A( x k , y k ). t k (α) ...(7)
φ =α φα ∈E α ∈ P k =1
714 Discrete Mathematical Structures

The R.H.S. of (7) is Z(P , A( x, y ), which is R.H.S. of (2). To see that L.H.S. of (7) is B( x, y ) , we see that the
sum of weight of orbits for power group E p is given by
n
∑ w(σ i ) = ∑ B pq( x p y p ) = B( x, y ) ...(8)
i=1

Now, it follows from (3) that left hand sides of (7) and (8) are equal. Therefore
Z(P , A( x, y )) = B( x, y ), which prove the theorem.

15.3 Applications of Polya's Theorem in Graph Enumeration


15.3.1 Enumeration of Simple Groups
Theorem: To count the number of all unlabelled simple graphs of n vertices.
1
Proof: Such a graph shall be the mapping or configuration of the set D comprising of all n(n − 1)
2
unordered pair of vertices (n(n − 1) pair of vertices for diagraph). There will be two elements in the set R say
r1 and r2 with contents x1 and x 0 respectively. If a pair of vertices is joined by an edge in G then its vertex
pair maps into r1 with content x1 . If the vertex pair is not joined by an edge it maps into the element r2 with

content x 0 (= 1) .

Now, the figure counting series is A( x ) = ∑ aq x q = a1 x 0 + a2 x1 = 1 + x (as a1 = a2 = 1)

permutation group shall be the group of permutation on the pairs of vertices induced by Sn, the full symmetric
group on the n vertices of G = R n. Therefore, the configuration counting series can be obtained by putting 1 + x
for y1 , 1 + x 2 for y 2, 1 + x 3 for y 3 . . .1 + x n for y n in the the cycle index Z(R n ).

1 3
Illustration: For number of vertices n = 3 , Z(R 3 ) = (Y1 + 3Y1 Y2 + 2Y3 )
6

Putting Y1 = 1 + x, Y2 = 1 + x 2, Y3 = 1 + x 3 in Z(R 3 ) , the configuration counting series is


B( x ) = 1 + x + x 2 + x 3 . The coefficient of x i in B( x ) gives the number of configuration number of
non-isomorphic simple graphs with 3 vertices) with content x i (i.e. edges). Therefore the number of
non-isomorphic simple graph of three vertices with 0, 1, 2 and 3 edges is one each.

Illustration: If the number of vertices n = 4, the figure counting series is again A( x ) = 1 + x and the cycle
1
index is given by Z(R 4 ) = (Y16 + 9Y12 Y22 + 8Y32 + 6Y2 Y4 ) from Z(R 4 ), we can find the configuration counting
24
series (after simplification) as follows

B( x ) = 1 + x + 2x 2 + 3x 3 + 2x 4 + x 5 + x 6

in which the confident of x ishall give the number of non-isomorphic simple graphs with four vertices and i
edges.
Polya's Theorem 715

Note: In case of multigraph (having at most two parallel edges) the domain D remains the same as in simple
graph. The range R contain three elements say r1 (denoting no edge between a pair of vertices) r2 (denoting
one-edge between a pair of vertices) and r3 (denoting two edge between a pair of vertices) with contents x 0 , x1
and x2 respectively.

This figure counting series is A( x ) = 1 + x + x 2

Remark: For a diagraph the figure-counting series remain the same as in case of simple graph. But the
cycle index changes as the domain consists of all n(n − 1) ordered pair of vertices.

Example 1: Using the Polya's Theorem, find the solution of the following problem.
Suppose that we are given a cube and four (identical balls). In how many ways can the balls be arranged on the
corners of the cube? Two arrangements are considered the same if by any rotation of the cube they can be
transformed into each other. [U.P.T.U. (M.C.A.) 2003-2004, U.P.T.U. (B.Tech.) 2005]

Solution: In Polya's terms the domain D is the set of 8 corners of the cube and the range R consists of 2
elements i.e. “presence of a ball” and “absence of a ball” whose contents are x1 and x 0 respectively. The
elements of figure-counting series is given by.

A( x ) = ∑ ar x i = a0 x 0 + a1 x1 = 1 + x ...(1)
i= 0

Since a0 = the number of figure with content zero=1 and a1 = the number of figure with content one=1.
The number of configuration of different mappings assigning ball to the corners of the cube=28 = 256.

The permutation group P on the domain set D = the set of all permutation that can be produced by rotation
of the cube. These permutation with their cyclic structure are as:
(i) One identity permutations whose cycle structure is Y18 .
(ii) Three 180° rotations around lines connecting centres of opposites forces of the cube whose
cycle structure is Y24 .
(iii) Six 90° rotation (clockwise and anti-clockwise) around lines connecting centres of opposite
faces of the cube whose cycle structure is Y42 .
(iv) Six 180° rotation around lines connecting midpoints of opposite edge of the cube whose
cycle structure is Y24 .
(v) Eight 120° rotation around lines connecting opposite corners of the cube whose cycle structure
is Y12 × Y33 .
Now, the cycle index of this group having those 24 Permutation is
Z(P ) = (Y12 + 9Y24 + 6Y42 + 8Y12 Y33 )/24 ...(2)
Then by Polya's theorem, we put the figure counting series (= 1 + x ) from (1) for y1 ,1 + x 2 for y 2, 1 + x 3 for
Y3 and 1 + x 4 for Y4 in (2) to the configuration counting series given by
B ( x ) = 1 + x + 3x 2 + 3x 3 + 7 x 4 + 3x 5 + 3x 6 + x7 + x 8 ...(3)
4
The required number of configuration (arrangement of ball) with four balls (i.e. of content x )=the
coefficient of x 4 in B( x ) given by (3) = 7.
716 Discrete Mathematical Structures

These different arrangements are shown diagrammatically.

Fig. 15.1

Example 2: State Polya's enumeration theorem. Use it to determine all unlabelled, simple graph of four
vertices. [U.P.T.U. (M.C.A.) 2007, 2008]

Solution: For n = 4, B( x ) = 1 + x + 2x 2 + 3x 3 + 2x 4 + x 5 + x 6 than we have one graph with no edge, 1


graph with 1 edge, 2 graphs with 2 edges, 3 graphs with 3 edges, 2 graphs with four edges and one graph
each with 5 and 6 edges as shown below.

Fig. 15.2

Example 3: Use Polay's theorem to determine all unalabelled simple group of five vertices.
[Raipur (B.E.) 2006]
1
Solution: We have, Z(R 5) = [ Y110 + 10Y14 Y23 + 20Y1 Y33 + 15Y12Y24 + 30 Y2Y42 + 20Y1 Y3 Y6 + 24Y52
120
and B( x ) = 1 + x + 2x 2 + 4 x 3 + 6 x 4 + 6 x 5 + 6 x 6 + 4 x7 + 2x 8 + x 9 + x10

Exercise
1. Define the following terms with example:
cyclic structure, figures, configurations and permutation
2. Explain Polya's Counting Theorem. [U.P.T.U. (M.C.A.) 2008]

3. Describe Polya's Counting Theorem.


4. State and prove Polya's Counting Theorem.
5. Give the statement of Burnside's Lemma.
6. Given a cube and four (identical) balls. In how many ways can balls are arranged on the corners
of the cube? Two arrangements are consider the same if by any rotation of the cube they can be
transformed into each other. [U.P.T.U. (B.Tech.) 2005]

❑❑❑

You might also like