A - Discrete Structures CP Gandhi
A - Discrete Structures CP Gandhi
SC EIE
S oCIoRES
DISCRETE STRUCTURES
DISCRETE
STRUCTURES
For
By
Dr SATINDER BAL GUPTA Dr C.P. GANDHI
B.Tech., (CSE), MCA, UeC-NET, Ph.D (CS) Ph.D (Mathematics), UeC-NET
Prof. Deptt. of Computer Science & Applications Associate Professor; Deptt. of Mathematics,
Vaish College of Engineering, Rohtak, Rayat & Bahra Institute of Engineering
Haryana. & Bio-Technology, Kharar,
Email :[email protected] Chandigarh.
Email :[email protected]
-
Limits of Liability/Disclaimer of Warranty: The publisher and the author make no representation or warranties with respect to the
accuracy or completeness of the contents of this work and specifically disclaim all warranties. The advice, strategies, and activities
contained herein may not be suitable for every situation. In performing activities adult supervision must be sought. likewise,
common sense and care are essential to the conduct of any and all activities, whether described in this book or otherwise. Neither
the publisher nor the author shall be liable or assumes any responsibility for any injuries or damages arising herefrom. The fact that
an organization or Website if referred to in this work as a citation and/or a potential source of further information does not mean
that the author or the publisher endorses the information the organization or Website may provide or recommendations it may
make. Further, readers must be aware that the Internet Websites listed in this work may have changed or disappeared between when
this work was written and when it is read.
All trademarks, logos or any other mark such as Vibgyor, U5P, Amanda, Golden Bells, Firewall Media, Mercury, Trinity, Laxmi
appearing in this work are trademarks and intellectual property owned by or licensed to Laxmi Publications, its subsidiaries or
affiliates. Notwithstanding this disclaimer, all other names and marks mentioned in this work are the trade names, trademarks or
service marks of their respective owners.
"Discrete Structures" primarily meant for B.Tech. and M.C.A. students of various
Indian Universities, has been written by taking into consideration the students' capability of
solving the mathematical as well as graphical problems in a systematic and logical manner.
The authors have certainly left no stone unturned in presenting the subject matter in a
comprehensive and lucid way.
The various topics like
• Basic Counting Principles
• Inclusion· Exclusion Principle
• Equivalence Relations and Partitions
• Recurrence Relations and their Solutions by Generating Functions
• Permutation and Symmetric Group
• Direct Products of Groups
• Dihedral Groups
• Applications of Groups in Coding Theory
• Rings
• Applications of Boolean Algebra in Logic Circuits and Switching Designs
• Applications of Graphs and Trees in Computer Science,
have been explained in an explanatory and methodological way. Further, the MCQs have also
been provided at the end of the concerned chapters. This book gives an inkling of the capability
of the authors and confirms that the authors must have been successful teachers.
Errors or misprints, if any, are unintentional and regretted. Any suggestion/
recommendation for improvement of the subject matter of the book, are invited.
(v)
CONTENTS
Chapters Pages
7. 15. Solution of Recurrence Relation by the Method of Generating Functions 207 ...........
8.6. Semi-group 22 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................. ..................
9.5. (a) Ring with Zero Divisors ................................. ................ ................. ................. 315
9.5. (b) Ring Without Zero Divisors ........................... ................ ................. ................. 315
9.6. Ring of Integers Modulo m (m 2: 1) ..................... ................. ................ ................. 317
9.7. Boolean Ring ..................................................... ................. ................. .................. 319
9.8. Direct Product of Rings ..................... ................. ................ ................ .................. 320
9.9. Morphism of Rings ........................... ................. ................. ................ .................. 32 1
9.10. Subring ........................ . . . ................ ................. ................. ................. .................. 324
9. 1 1. Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................ ................. ................. ................. 326
9. 12. Integral Domain ............. ................. ................ ................. ................. .................. 328
9. 13. Field .............................. . . ................. ................ ................. ................. .................. 334
9.14. Gaussian Integers ................. ................ ................. ................. .................. 336
9. 14. Ideals ............................ . . ................. ................. ................. ................. .................. 341
9. 15. Sum of Ideals ....................................................................... ................. .................. 344
9.16. Quotient Ring ....................................................................... ................. ................. 345
9. 17. Fundamental Theorem of Ring Homomorphism ................ ................. ................. 345
9.18. Principal Ideal ..................................................................... ................. .................. 347
9.19. Principal Ideal Domain (P.LD.) ......................... ................. ................ .................. 347
9.20. Euclidean Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................. .................. 348
9.21. Associate ................................................................................................................... 349
10. Boolean Algebra ............................................................................... 352-446
10. 1. Partially Ordered Relation ...................................................................................... 352
10.2. Comparable Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. .................. 353
10.3. Non·Comparable Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................. 353
10.4. Linearly Ordered Set or Totally Ordered Set ...................... ................ ................. 353
10.5. Hasse Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................. 354
10.6. Lattice . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................ ................. ................. ................. 361
10.7. Boolean Algebra ............... ................ ................. ................ ................. ................. 364
10.8. Unary Operation . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . ................ ................. ................. .................. 364
10.9. Binary Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . ................ ................. .................. 364
10. 10. Boolean Algebra as a Lattice .............................. ................ ................. ................. 365
10. 1 1. Alternate Definition of Boolean Algebra ............. ................ ................ ................. 365
10.12. Boolean Sub·algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . ................ ................. .................. 373
10. 13. Atoms of a Boolean Algebra ............ ................. ................. ................ .................. 374
10. 14. Isomorphic Boolean Algebras ................. ................. ................ .................. 378
10. 15. Representation Theorem . . . . . . . . . . . . . . .. . . . ................ ................. ................ .................. 378
10. 16. Laws of Boolean Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................ .................. 379
10. 17. Principle of Duality ............................................ ................. ................ .................. 384
10. 18. Boolean Expression or Boolean Function ................ ................. ................. 388
10. 19. Literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ................. ................. .................. 388
10.20. Fundamental Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . ................ ................. .................. 388
10.21. Sum· of· Products form or SOP Form .................. ................ ................. ................. 388
10.22. Complete sum·of·Products form ........................ ................. ................. ................. 388
(xii)
11. 12. Undirected Complete Graph ............. ................ ................. ................. ................. 455
11. 13. Connected Graph .............................. ................. ................ ................. .................. 456
11. 14. Disconnected Graph ......................... ................. ................ ................. .................. 456
11. 15. Connected Component ..................... ................. ................ ................. .................. 456
11. 16. Subgraph .......................................... ................. ................. ................. .................. 457
(xiii)
12.3. Directed Trees ............... . . ................. ................. ................ ................. ................. 525
12.4. Ordered Trees .................................... ................. ................ ................. ................. 526
12.5. Rooted Trees ..................................... ................ ................. ................. .................. 527
12.6. Path Length of a Vertex ................... ................. ................ ................. .................. 527
12.7. Forest .............................................. .. ................ ................. ................. .................. 528
12.8. Binary Tree ....................................... ................. ................ ................. .................. 528
12.9. Basic Terminology ............................ ................ ................. ................. .................. 528
12. 10. Binary Expression Trees ................... ................ ................. ................ .................. 534
12. 1 1. Complete Binary Tree ...................... ................. ................ ................. .................. 535
12. 12. Full Binary Tree ............................... ................ ................. ................. .................. 535
12. 13. Traversing Binary Trees ................... ................ ................. ................ .................. 537
12. 14. Algorithms ......................................................... ................. ................. .................. 538
12. 15. Binary Search Trees ........................................... ................ ................. .................. 545
12. 16. Inserting into a Binary Search Tree .................. ................. ................ ................. 545
12. 17. Spanning Tree ...................................................................... ................. ................. 549
12. 18. Applications of Trees ............................................................................. .................. 550
12. 19. KruskaYs Algorithm to Find Minimum Spanning Tree ......................................... 550
13*. Propositional Calculus ................................................................... 558--601
13. 1. Basic Logic Operations ............................................................................................ 558
13.2. Statement ......................................... ................. ................ ................. .................. 558
13.3. Proposition ....................................... ................. ................. ................. .................. 558
13.4. Propositional Variables ..................... ................. ................ ................ .................. 559
13.5. Truth Table ....................................... ................. ................ ................. .................. 559
13.6. Combination of Propositions .............................. ................. ................. ................. 560
13.7. (a) Laws of the Algebra of Propositions ............. ................ ................. ................. 565
13.7. (b) Variations in Conditional Statement ............ ................ ................ ................. 566
13.8. Principle of Duality ............................................ ................. ................ .................. 567
13.9. Logical Implication ............................................. ................. ................ .................. 568
13. 10. Logically Equivalence of Propositions ................ ................ ................. ................. 569
13. 1 1. Tautologies ......................................................... ................. ................. .................. 570
13. 12. Contradiction ....................................................................... ................. .................. 571
13. 13. Contingency .......................................................................... ................. ................. 571
13. 14. Functionally Complete Sets of Connectives ........................ ................ ................. 573
13. 15. Argument ............................................................................. ................. .................. 574
13. 16. Proof of Validity ................................ ................. ................ ................. ................. 578
13. 17. Quantifiers ....................................... ................. ................. ................. .................. 583
13. 18. Existential Quantifier ........................................ ................ ................. .................. 583
13. 19. Universal Quantifier .......................................... ................. ................ .................. 583
13.20. Negation of Quantified Propositions .................. ................. ................ ................. 585
13.21. Propositions with Multiple Quantifiers ............. ................ ................. ................. 586
(xv)
14.22. If A is a Non·singular Square Matrix, then so is A' and (Aj-l = (A-l)' .................... 622
14.23. If A and B are Two Non·singular Square Matrices of the Same Order,
then adj (AB) = (adj B) (adj A) ................................................................................. 623
14.24. Solution of Simultaneous Linear Equations by Matrix Inversion Method
or Matr� Method ..................................................................................................... 625
14.25. If A is Non·singular Matrix, then the System of Equations AX = B has
a Unique Solution given by X = A-l B ..................................................................... 626
14.26. Rank of a Matrix ............................................... ................. ................. .................. 630
14.27. To Determine the Rank of a Matr� A ............... ................ ................. ................. 63 1
14.28. Echelon Form of a Matrix ..................................................................... .................. 63 1
14.29. Rank of a Matrix by Using Echelon Form ............................................ ................. 63 1
14.30. Solution of a System of Linear Equations (Rank Method) or
(Gauss Jordan Method) ........................................................................ .................. 635
15.2. Finite and Infinite Sequence ............. ................ ................ ................. ................. 649
15.3. Arithmetic Progression (AP.) 650
. . . . . . . . . . . . . . . . . . . . . . . ._ _ _ _ . . . . . . . . . . . . ._ _ _ _ . . . . . . . . . . . . ._ _ _ ..................
15.7. Single AM. between any Two given Numbers 667 . . . . . . . . . . . . . . ._ _ _ _ . . . . . . . . . . . . ._ _ _ _ .................
15.8. n AM.s between any Two given Numbers 667 .......................... ................ .................
15. 13. Sum to Infinity of a G.P . ................... ................ ................. ................ 687
..................
The book entitled "Discrete Structures" is strictly according to the latest syllabus of
various Indian universities as per details given below:
Sr. N. Name of the University Subject Subject Code
(xvii)
SYLLABUS
1. Logic
Statements-Truth Tables-connectives-Normal forms-Predicate Calculus-Inference theory
for statement calculus and Predicate Calculus.
2_ Combinatorics
Review of Perm utation and combination-Mathematical Inducation -Pigeon hole principle
Principle of inclusion and exclusion-Generating function-Recurrence relations.
3_ Groups
Semi groups-Monoids-groups-permutation group-Consets-Lagranges theorem-Group
homomorphism-Kernal-Rings and Fields (definitions and examples only).
4_ Lattices
Partial ordering-Posets-Hasse diagram-Lattices-Properties of Lattices-Sub Lattices
Special Lattices-Boolean Algebra.
5_ Graphs
Introduction to Graphs-Graph terminology-Representation of Graphs-Graph
Isomorphism-Connectivity-Euler and Hamilton Paths
(xviii)
SYLLABUS
SECTION A
Mathematical Logic: Statements and Notation, Connectives; Negation; Conjunction; Disjunction; State
ment Formulas and Truth Tables; Logical Capabilities of programming Languages; Conditional and
Biconditional; Well formed Formulas; Tautologies; Equivalence of Formulas; Duality Law; Tautological
Implications; Formulas with distinct Truth Tables; Functionally Complete sets of connectives; other
connectives; Two state devices and Statement logic; Normal forms; principal disjunctive normal forms;
principal conjunctive normal form; ordering and Uniqueness of Normal Forms; Completely parenthe
sized Infix Notation and Polish Notation; The Theory of Interference for the statement calculus; Valid
ity using Truth Table; Rules of Inference; Consistency of Premises and Indirect Method Of Proof; Auto
matic Theory Proving; The Predicate Calculus; predicates; The Statement Function, variables and Quan
tifiers; Predicate Formulas; Free and Bound Variables; The Universe of Discourse; Inference Theory of
the Predicate Calculus, Valid Formulas and Equivalences; Some Valid Formulas over Finite Universes;
Special Valid Formulas Involving Quantifiers; Theory of Inference for the Predicate Calculus; Formula
Involving More Than One Quantifier.
SECTION B
UNIT-I
Set Theory: Introduction to set theory, Set operations, Algebra of sets, combination
ofsets, Duality, Finite and Infinite sets, Classes of sets, Power Sets, Multi sets, Cartesian
Product, Representation of relations, Types of relation, Binary Relations, Equivalence
relations and partitions, Partial ordering relations and lattices, Mathematics Induction,
Principle ofInclusion and Exclusion, Propositions. Function and its types, Composition
of function and relations, Cardinality and inverse relations. Functions and Pigeon Hole
principles.
UNIT-II
Propositional Calculus: Basic operations: AND, OR, NOT, Truth value of a compound
statement, propositions, tautologies, contradictions. Techniques of Counting: Rules of
Sum of products, Permutations with and without repetition, Combination. Recursion
and Recurrence Relation: Polynomials and their evaluation, Sequences, Introduction to
AP, GP and AG series, partial fractions, linear recurrence relation with constant
coefficients, Homogeneous solutions, Particular solutions, Total solution of a recurrence
relation using generating functions.
UNIT-III
Algebric Structures: Definition, elementary properties of algebric structures, examples
of a Monoid, Submonoid, Semi-group, Groups and rings, Homomorphism, Isomorphism
and Automorphism, Subgroups and Normal subgroups, Cyclic groups, Integral domain
and fields, Cosets, Lagrange's theorem, Rings, Division Ring.
UNIT-IV
Graphs And Trees: Introduction to graphs, Directed and Undirected graphs,
Homomorphic and Isomorphic graphs, Subgraphs, Cut points and Bridges, Multigraph
and Weighted graph, Paths and circuits, Shortest path in weighted graphs, Eurelian
path and circuits, Hamilton paths and circuits, Planar graphs, Euler's formula, Trees,
Rooted Trees, Spanning Trees and cut-sets, Binary trees and its traversals.
(xx)
SYLLABUS
SECTION A
Set Theory and Propositional Calculus: Introduction to set theory, Set operations,
Algebra of sets, Duality, Finite and Infinite sets, Classes of sets, Power Sets, Multi sets,
Cartesian Product, Representation of relations, Types of relation, Equivalence relations
and partitions, Partial ordering relations and lattices
Function and its Types: Composition offunction and relations, Cardinality and inverse
relations.
Introduction to propositional Calculus: Basic operations: AND, OR, NOT, Truth
value of a compound statement, propositions, tautologies, contradictions.
SECTION B
Techniques of Counting and Recursion and Recurrence Relation: Permutations
with and without repetition, Combination. Polynomials and their evaluation, Sequences,
Introduction to AP, GP and AG series, partialfractions, linear recurrence relation with
constant coefficients, Homogeneous solutions, Particular solutions, Total solution of a
recurrence relation using generating functions.
SECTION C
Algebric Structures: Definition and examples of a monoid, Semigroup, Groups and
rings, Homomorphism, Isomorphism and Automorphism, Subgroups and Normal
subgroups, Cyclic groups, Integral domain and fields, Cosets, Lagrange's theorem.
SECTION D
Graphs and Trees: Introduction to graphs, Directed and Undirected graphs,
Homomorphic and Isomorphic graphs, Subgraphs, Cut points and Bridges, Multigraph
and Weighted graph, Paths and circuits, Shortest path in weighted graphs, Eurelian
path and circuits, Hamilton paths and circuits, Planar graphs, Euler's formula, Trees,
Spanning trees, Binary trees and its traversals.
(xxi)
SYLLABUS
UNIT-I
Connectives: Statement formulae, Equivalence of Statement formulae, Functionally
complete set of connectives - NAND and NOR connectives, implication, Principal
conjunctive and disjunctive normal forms.
UNIT-II
Inference calculus: Derivation process - Conditional proof - Indirect method of proof
Automatic theorem proving - Predicate calculus.
UNIT-III
Partial ordering: Lattices - Properties - Lattices as algebraic system - sub lattices -
Direct product and homomorphism - Special lattices - Complemented and Distributive
lattices.
UNIT-IV
Graphs: Applications of graphs - degree - pendant and isolated vertices - isomorphism
sub graphs - walks - paths and circuits - connected graphs - Euler graphs - operations
on graphs - More on Euler graphs - Hamilton paths and circuits - complete graph.
UNIT-V
Trees: Properties of Trees - Pendant vertices in a Tree - Distance and Center in a Tree
- rooted and binary trees - spanning trees - Fundamental Circuits - Distance between
spanning trees shortest spanning trees - Kruskal algorithm.
(xxii)
SYLLABUS
PART-A
1. Sets, Relations and Functions: Introduction, Combination of Sets, Ordered pairs,
Proofs of general identities of sets, Relations, Operations on relations, Properties of
relations and Functions, Hashing Functions, Equivalence relations, Compatibility re
lations, Partial order relations. [Chapters 1, 2, 3] [7]
2_ Rings and Boolean Algebra: Rings, Subrings, Morphism of rings, ideals and quo
tient rings, Euclidean domains, Integral domains and fields. Boolean Algebra, direct
product, Boolean sub-algebra, Boolean Rings, Application of Boolean algebra (Logic
Implications, Logic Gates, Karnaugh Map) [Chapters 9, 10] [8]
3_ Combinatorial Mathematics: Basic counting principles Permutations and Combina
tions, Inclusion and Exclusion Principle. Recurrence relations, Generating Function,
Applications. [Chapters 5A, 5B, 6, 7J [7]
PART-B
4_ Monoids and Groups: Groups, Semigroups and Monoids. Cyclic Subgroups and
Submonoids, Subgroups and Cosets, Congruence Relations on Semigroups. Morphisms.
Normal Subgroups. Homomorphism, Isomorphism, Dihedral Groups, Applications.
[Chapter 8] [7]
5_ Graph Theory: Graph-Directed and Undirected, Eulerian Chains and cycles,
Hamiltonian chains and cycles Trees, Chromatic number, Connectivity, Graph coloring,
Planar and connected graphs, Isomorphism and Homomorphism. Applications.
[Chapters 11, 12] [7]
Note_ Chapters to be read for "Discrete Structures" (BTCS 402): Chapters No., 1, 2, 3,
5A, 5B, 6, 7, 8, 9, 10, 1 1, and 12 only.
(xxiii)
SYLLABUS
SECTION A
Sets and Relations: Definition of sets, Subsets, Complement of a set, Universal set,
Intersection and Union of sets, De-Morgan's laws, Cartesian products, Equivalent sets,
Countable and Uncountable sets, Minset, Partitions of sets, Relations: Basic definitions,
graphs of relations, Properties of relations. [Chapters 1, 2]
SECTION B
Algebra of Logic: Propositions and logic operations, Connectives, Tautologies and
Contradiction, Equivalence and implication, Principle of Mathematical Induction,
Quantifiers. [Chapters 4, 13]
SECTION C
Matrix Algebra: Introduction of a Matrix, its different kinds, Matrix addition and
Scalar multiplication, Multiplication of matrices, Transpose etc. Square matrices, Inverse
and Rank of a square matrix, Solving simultaneous equations using Gauss eliminations,
Gauss Jordan and Matrix Inversion methods. [Chapter 14]
SECTION D
Graphs: A general introduction, Simple and Multigraphs, directed and Undirected
graphs, Eulerian and Hamiltonian Graphs, Shortest path algorithms, Chromatic number,
Bipartite graph, Graph coloring. [Chapter 11]
Note_ Chapters to be read for "Computer Mathematical Foundation (MCA 104 N2):
Chapters No., 1, 2, 4, 1 1, 13 and 14 only.
(xxiv)
SYLLABUS
Set Theory, Relation, Function, Theorem Proving Techniques : Set Theory: Definition of sets,
countable and uncountable sets, Venn Diagrams, proofs of some general identities on sets
Relation: Definition, types of relation, composition of relations, Pictorial representation of
relation, Equivalence relation, Partial ordering relation, Job-Scheduling problem Function:
Definition, type of functions, one to one, into and onto function, inverse function, composition
of functions, recursively defined functions, pigeonhole principle. Theorem proving Techniques:
Mathematical induction, Proof by contradiction.
Un it-II
Algebraic Structures: Definition, Properties, types: Semi Groups, Monoid, Groups, Abelian
group, properties of groups, Subgroup, cyclic groups, Cosets, factor group, Permutation groups,
Normal subgroup, Homomorphism and isomorphism of Groups, example and standard re
sults, Rings and Fields: definition and standard results.
Un it-III
Propositional Logic: Proposition, First order logic, Basic logical operation, truth tables, tau
tologies, Contradictions, Algebra of Proposition, logical implications, logical equivalence, predi
cates, Normal Forms, Universal and existential quantifiers. Introduction to finite state ma
chine Finite state machines as models of physical system equivalence machines, Finite state
machines as language recognizers
Un it-IV
Graph Theory: Introduction and basic terminology of graphs, Planer graphs, Multigraphs and
weighted graphs, Isomorphic graphs, Paths, Cycles and connectivity, Shortest path in weighted
graph, Introduction to Eulerian paths and circuits, Hamiltonian paths and circuits, Graph
coloring, chromatic number, Isomorphism and Homomorphism of graphs.
Un it-V
Posets, Hasse Diagram and Lattices: Introduction, ordered set, Hasse diagram of partially,
ordered set, isomorphic ordered set, well ordered set, properties of Lattices, bounded and
complemented lattices. Combinatorics: Introduction, Permutation and combination, Binomial
Theorem, Multimonial Coefficients Recurrence Relation and Generating Function: Introduc
tion to Recurrence Relation and Recursive algorithms ) Linear recurrence relations with con
stant coefficients, Homogeneous solutions, Particular solutions, Total solutions ) Generating
functions , Solution by method of generating functions.
(xxv)
SYLLABUS
MODULE-I
Set Theory: Sets, Venn diagrams, Operations on Sets; Laws of set theory, Power set
and Products; Partitions of sets, The Principle of Inclusion and Exclusion.
MODULE-II
Relations, Digraphs and Lattices: Relations, Paths and Digraphs; Properties and
types of binary relations; Manipulation of relations, Closures, Warshall's algorithm;
Equivalence and partial ordered relations; Posets and Hasse diagram; Lattice.
MODULE-IV
Functions and Pigeon Hole Principle: Definition and types of functions: Injective,
Surjective and Bijective; Composition, Identity and Inverse; Pigeon-hole principle.
MODULE-V
Generating Functions and Recurrence Relations: Series and Sequences;
Generating functions; Recurrence relations; Recursive Functions: Applications of
recurrence relations e.g. , Factorial, Fibonacci, Binary search, Quick Sort etc.
MODULE-VI
Graphs and Subgraphs: Definitions, Paths and circuits: Eulerian and Hamiltonian;
Planer graphs, Graph coloring; Isomorphism of graphs; Subgraphs and Subgraph
isomorphism.
MODULE-VII
Trees: Trees and weighted trees; Spanning trees and minimum spanning tree;
Isomorphism of trees and sub trees; Prefix codes.
MODULE-VIII
(xxvi)
SYLLABUS
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 offunctions, 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 colouring.
Recurrence Relation and Generating Function: Recursive definition of functions,
Recursive algorithms, Method of solving recurrences.
Combinatorics: Introduction, Counting Techniques, Pigeonhole Principle, Polya' s
Counting Theory.
(xxvii)
1 SETS
1 .1 . INTRODUCTION
In this chapter) we will study some basic laws of algebra of sets) Venn-diagrams) repre
sentation of various sets) ordered and unordered partition of sets.
Set. A set is defined as a collection of distinct objects of same type or class of objects.
The objects of a set are called elements or members of the set. Objects can be numbers,
A = {I, 2, 3, 4, 5}
alphabets) names etc.
I. Finite Set. If a set consists of specific number of different elements, then that set is
Q = {2, 4, 6, 8}.
R = {months of year}, are finite sets.
II. Infinite Set. If a set consists of infinite number of different elements or if the counting
of different elements of the set does not come to an end, the set is called infinite set.
e.g., I = {The set of all integers}.
E = {x : x E N, x is a multiple of 2}, are inifinite sets.
III. (Principle of Extension) Equality of Sets. Two sets A and B are said to be
equal and written as A = B if both have the same elements. Therefore, every element which
belongs to A is also an element of the set B and every element which belongs to the set B is also
an element of the set A.
A=B (x E A <=? x E B).
If there is some element in set A that does not belong to set B or vice·versa then A '" B
i.e., A is not equal to B.
Remarks 1. A set does not change if one or more of its elements are repeated.
2. Aset does not change if we change the order in which its elements are tabulated.
IV. Disjoint Sets. Two sets A and B are said to be disjoint if no element of A is in B
and no element of B is in A. e.g., if R = {a , b, c}, S = {k, p, m}, then R and S are disjoint sets.
V. Family of Sets. If a set A contains elements which are itself sets, then it is called
family of sets or a set of sets. e.g., if A = {{I, 2}, {3, 4}, q,}, then A is set of sets.
VI. Subset of a Set. If every element of a set A is also an element of a set B, then A is
called subset of B and is written as A c B. B is called superset of A.
e.g., A c B = {x : x E A => X E B}
(a) Proper Subset. If A is subset ofB and A '" B, then A is said to be proper subset ofB.
If A is a proper subset of B, then B is not subset of A i.e., there is at least one element in B
which is not in A. e.g.,
(i) If A = {2, 3, 4}, B = {2, 3, 4, 5}, then A is a proper subset of B.
(ii) The empty set q, is a proper subset of every set.
SETS 3
Example. How many subsets can be formed from a set of n elements ? How many of
these will be proper and how many improper ? (P.T.U. B.Tech. May 2007)
n
Sol. There are C 1 subsets each consisting of one of the elements of the given set.
There will be n C2 subsets each consisting of any two of the n elements of the given set.
Also, there will be n C3 subsets each consisting of any three of the n elements of given set.
At last, there will be n Cn subsets consisting of all the n elements of the given set.
Also, there will be one set <p.
n n n
subsets will be proper and 1 (one) subset improper i.e., the set itself.
A set is obtained from a set formula by replacing the variables by definite sets. When
the set variables appearing in two set formulas are replaced by any sets and both the set
formulas are equal as sets, then we call that both the set formulas are equal. The equality of
set formulas are called set identities. Some of the identities describe certain properties of the
operations involved. These properties describe an algebra called algebra of sets.
6 DISCRETE STRUCTURES
Table 1
General Identities of Set Theory
(i) Idempotent Laws (vi) Identity Laws
(a) A u A = A (a) A u � = A
(b) A n A = A (b) A n U = A
(ii) Associative Laws (c) A u U = U
(a) (A u B) u C = A u (B u C) (d) A n � = �
(b) (A n B) n C = A n (B n C) (vii) Complement Laws
(iii) Commutative Laws (a) A u N = U
(a) A u B = B u A (b) A n N = �
(b) A n B = B n A (c) U' = �
(iv) Distributive Laws (d) �' = U
(a) A u (B n C) = (A u B) n (A u C)
(viii) Involution Law
(b) A n (B u C) = (A n B) u (A n C) (a) (N)' = A
(v) De Morgan's Laws
(a) (A u B)' = N n B'
(b) (A n B)' = N u B'
The Table 1 shows general identities of sets. We now prove these identities.
Theorem I. Prove Idempotent laws i.e.,
(a) A u A = A (b) A n A = A.
Proof. (a) To prove A u A = A
Since, for any set A and B, B c A u B, therefore A c A u A
Let xE AuA => XE A or xE A => XE A
AuAcA
As A u A c A and A c A u A => A = A u A. Hence proved.
(b) To prove A n A = A
Since, for any set A and B, A n B c B, therefore A n A cA
Let xE A => X E A and x E A
XE An A AcAnA
As A n A c A and A c A n A => A = A n A. Hence proved.
Theorem IV. Prove Distributive Laws i.e., (a) Intersection of sets is distributive w.r.t.
union of sets i.e.,
A n (B u C) = (A n B) u (A n C)
(b) Union of sets is distributive w.r.t. intersection of sets i.e.,
A u (B n C) = (A u B) n (A u C).
Proof. (a) To prove A n (B u C) = (A n B) u (A n C)
Let x E A n (B u C) x E A and x E B u C
=> (x E A and x E A) and (x E B or x E C)
=> (x E A and x E B) or (x E A and x E C)
=> XE A n B or xE A n C
=> X E (A n B) u (A n C)
Therefore) A n (B u C) c (A n B) u (A n C) ... (1)
Again, let Y E (A n B) u (A n C) => Y E A n B or Y E A n C
8 DISCRETE STRUCTURES
(y E A and Y E B) or (y E A and Y E C)
(y E A or Y E A) and (y E B or Y E C)
YEA and (y E B u C)
Y E A n (B u C)
Therefore, (A n B) u (A n C) c A n (B u C) ... (2)
Combining (1) and (2), we get A n (B u C) = (A n B) u (A n C). Hence proved.
(b) To prove A u (B n C) = (A u B) n (A u C)
Let X E A u (B n C) => x E A or x E B n C
(x E A or x E A) or (x E B and x E C)
(x E A or x E B) and (x E A or x E C)
(x E A u B) and (x E A u C)
X E (A u B) n (A u C)
Therefore, A u (B n C) c (A u B) n (A u C) ... (1)
Again, let Y E (A u B) n (A u C) => Y E A u B and Y E A u C
=> (y E A or Y E B) and (y E A or Y E C)
(y E A and Y E A) or (y E B and Y E C)
YE A or (y E B n C)
Y E A u (B n C)
Therefore, (A u B) n (A u C) c A u (B n C) ... (2)
Combining (1) and (2), we get A u (B n C) = (A u B) n (A u C). Hence proved.
The total numbers of unique elements in the set is called the cardinality of the set. The
cardinality of the countably infinite set is countably infinite e.g., It is denoted by n(A) or I A I
or A or card(A).
1. Let P= {k, I,
m, n}. Then the cardinality of the set P is 4.
2. Let A is the set of all non-negative even integers i.e., A = {O, 2, 4, 6, 8, 10, .........}
As A is countably infinite set, hence the cardinality of this set is countably infinite.
3. The cardinality of an empty set <jJ is zero, i.e., n(<jJ) = 0
Example 1. Find the cardinal number of each set:
(a) {Monday, Tuesday, ... , Sunday}
(b) {x : x is a letter in the word "BASEBALL'}
(c) {x : x" = 9, 2x = 8}
(d) The power set P(A) of A = {l, 5, 7, ll }
(e) Collection of functions from A = {a, b, c} into B = {l, 2, 3, 4}
if) Set of relations on A = {a, b, c}.
Sol. The cardinal number of a set 'A' is denoted by n(A).
(a) Given set A = {Monday, Tuesday, ...... , Sunday}
This contains 7 elements viz.)
Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday.
.. n(A) = 7.
(b) Let A = {x : x is a letter in the word "BASEBALL"}
The number of letters in the word "BASEBALL" is 5 (B, A, S, E, L)
.. n(A) = 5.
(c) Let A = {x : x2 = 9, 2x = 8}
Here x2 = 9 => x = ± 3. Also, 2x = 8 => x = 4,
which is not possible.
.. n(A) = O.
(d) A = { 1 , 5, 7, 1 1} i.e., A contains 4 elements
. . P(A) will contain 2 = 1 6 elements
4
The cartesian product of two sets P and Q in that order is the set of all ordered pairs
whose first member belongs to the set P and second member belongs to set Q and is denoted by
P x Q i.e.,
P x Q = {(x, y) : x E P, y E Q}.
Similarly, A x B x C = {(a, b, c) : a E A, b E B, c E C}. It is common to denote A x A by A2 ,
3
A x A x A by A etc. Also we denote (A x B) x (A x B) by (A X B)2 , (A x B) x (A x B) x (A x B) by
3
(A X B) etc.
Example 1. Let P = {a, b, c} and Q = {k, I, m, n}. Determine the cartesian product of
P and Q.
Sol. The cartesian product of P and Q is
{(a, (a, (a, (a, }
SETS 13
Theorem XII. If S and T have n elements in common. Show that S x T and T x S have
n 2 elements in common.
Proof. Suppose) a set R, consisting of n common elements of S and T.
Then, R e S and R e T
Let (x, y) E (R x R) <=} X E R and Y E R
<=} (x E R and Y E R) and (x E R and Y E R)
<=} (X E S andy E T) and (X E T andy E S) ( -: R c S ; R c T)
<=} (x, y) E (S X T) and (x, y) E (T x S)
<=} (x, y) E (S x T) n (T x S)
Therefore, (R x R) = (S x T) n (T x S).
The right hand side contains ordered pairs common to both S x T and T x S.
The left hand side R x R has n2 elements ( .: R has n elements)
Since, the two sets are equal, both have the same number of elements.
Hence, S x T and T x S have n2 common elements.
SETS 15
ILLUSTRATIVE EXAMPLES
Example 7. Let E = {{I, 2, 3}, {2, 3}, {a, b}}, F = {{a, b}, {I, 2}}. List the elements of E.
Determine whether the following statements are true or not
(i) {a, b} c F (ii) [{1, 2, 3}] c E
(iii) F C E (iv) q, C F
(v) l E E (vi) {2, 3} E E.
Sol. Given E = {{1, 2, 3}, {2, 3}, {a, b}}
The elements of E are {1, 2, 3}, {2, 3}, {a, b}
(i) False. Since {a, b} is one of the three elements of E
(ii) True. Since {1, 2, 3} is an element from E therefore, {{1, 2, 3}} is a subset of E
(iii) False. Since {1, 2} E F but {1, 2} 'l E
(iv) True. The empty set is a subset of every set
(v) False. Since 1 is not an element of E
(vi) True. Since {2, 3} is one of the three elements of E.
Example 8. If A = {x : 3x = 6}. Does A = 2 ?
Sol. Given A = {x : 3x = 6} = {2}. Now 2 E A but A ", 2.
Example 9. Determine which of the following sets are equal: q" {OJ, {q,}.
Sol. The set (OJ contains one element, namely, zero.
The set q, contains no element as it is an empty set.
The set {q,} also contains one element, the null set.
Hence) each given set is different from the other sets.
Example 10. Describe a situation where the universal set U may be empty.
Sol. Let U is the set of town councillor in a given city. It is possible that in a given year,
there are no such councillors and hence U = q,.
Example 14. LetA, B, C be non-empty sets such that A c B, B e e and C c A. What can
be deduced about these sets ?
Sol. Given A c B, B e e => Ace
B e e, C c A => BcA
Now A c B, B c A => A=B
C c A, A c e => C=A
Hence A) B) C are equal sets.
Example 15. If A is a subset of the null set q" then A = q,. Prove it.
Sol. We know that the null set q, is a subset of every set. In particular, q, c A. Also given
A c q,. Hence A = q,.
Example 19. (a) Let N is the set of all natural numbers. Let P denotes the set ofall finite
subsets ofN. What is the cardinality of set P ? Give reason.
(b) Find the cardinal number of the following sets
(a) A = {a. b. c • y. z}
. . .• (b) B = {l. - 3. 5. 7. - SO}
(C) C = {X E N : x" = 7) (d) D = {5. 10. 15. 20 ) • ...
Sol. (a) The number of subsets of any set is given by 2 n , where n is number of elements
in the set. As the number of subsets of set N is 2ft) hence there are 2 n number of subsets in set
P. Therefore, the cardinality of set P is 2n .
(b) (a) The cardinality of A = 26 since there are 26 letters in the English alphabet.
(b) The cardinality of B = 4
(c) The cardinality of C = 0 (zero) as there is no x E N whose square is 7.
(d) Countably infinite
(e) Countably infinite
Example 20. Determine which of the following are true and which are false. Justify
your answer.
(a) 3 E {I, 3, 5}
(b) Let A = {(a, b)}, then
(i) a E A (ii) A E A (iii) {a, b} E A (iv) n(A) = 2
(c) {3} E {I, 3, 5} (d) {3} c {I, 3, 5} (e) {3, 5} c {I, 3, 5}
(f) {I, 3, 5} c {I, 3, 5} (g) q, C q, (h) q, E q,
(i) q, c {q,} (j) q, E {q,} (k) {q,} E q,
(T) {q,} c {q,} (m) {q,} E {q,}
(n) {a, b} c {a, b, c. {a, b, ell (0) 1 E {a + 2b : a, b are even integers}.
Sol. (a) True. Since 3 is a member of {I, 3, 5}. Hence, 3 E {I, 3, 5}.
(b) (i) False. The only member of the set A is the element {a, b}. Hence, a 'l A.
(ii) False.
SETS 19
Example 21. (i) If A = {I, 2, {I, 3}, q,}, determine the following sets
(P.T.V. B. Tech. May 2009)
(a) A - {1) (b) A - q, (e) A - {q,) (d) A - {1, 2).
(ii) If A = (q" {q,}}, determine whether the following statements are true or false.
(a) q, E P(A) (b) q, c P(A) (e) {q,} C P(A) (d) {q,} c A
(e) {q,} E P(A) (f) {q,} E A ) {q,
(g ( )) c P(A) (h) ({q,)) c A
(i) ({q,)) E P(A) (j) ({q,)) E A.
Sol. (i) Given set A = {1, 2, {1, 3}, q,}
The elements of A are 1, 2, {1, 3}, q,.
. . {1}, {q,} are subset of A
(a) A - {1} = (x : x E A and x " ( 1)) = {2, {1, 3}, q,}.
(b) A - q, = {x : x E A and x " q,} = A = {1, 2, {1, 3}, q,}.
(e) Since q, is an element of A, therefore, {q,} is a subset of A containing the element q,.
.. A - {q,} = {x : x E A and x " (q,)) = {1, 2, ( 1, 3)) .
(d) Since 1, 2 are elements of A therefore, {1, 2} is a subset of A.
.. A - {1, 2} = {x : x E A and x " ( 1, 2)) = {{1, 3}, q,}.
(ii) Given A = (q" (q,)) i.e., the elements of A are q" {q,}
.. P(A) = {q" {q,}, ({q,)), {q" (q,m i.e.,
The elements of P(A) are q" {q,}, ({q,)), (q" (q,))
(a) True, since q, is an element of P(A).
(b) True, since the empty set is a subset of every set
20 DISCRETE STRUCTURES
(c) True, since <I' is an element of P (A) , therefore, {<I'} is a subset of P (A)
(d) True, since <I' is an element of A, therefore, {<I'} is a subset of A
(e) True, since <I' is an element of P(A) , therefore, {<I'} is a subset of P (A)
if) True, since {<I'} is an element of A
(g) True, since {<I'} is an element of P(A) , therefore, ({<I'll is a subset of P(A)
(h) True, since {<I'} is an element of A, therefore, {{<I'll is a subset of A
(i) True, since ({<I'll is an element of P(A)
(j) False, since ({<I'll is not an element of A.
Example 22. Determine whether each of the following statements is true or false. Ex-
plain your answer.
(a) A u P(A) = P(A) (b) A n P(A) = A
(c) {A} u P(A) = P(A) (d) {A} n P(A) = A
(e) P(A) - {A} = P(A).
Sol. (a) A u P(A) = P(A).
False. P (A) contains all subsets of A but does not contain all elements of A. Therefore,
A u P(A) '" P(A) .
(b) A n P(A) = A.
False. Since power set of A contains all subsets of A but no elements of A, hence there is
no element common to both the sets. Therefore, A n P (A) '" A.
(c) {A} u P(A) = P (A)
True. P(A) contains all subsets of A and {A} is also an element of P(A) .
(d) {A} n P (A) = A.
False. {A} is common to both {A} and P (A) because P(A) contains all subsets of A but
their intersection is not A. Therefore, {A} n P(A) '" {A}
(e) P (A) - {A} = P (A) .
False. {A} is also an element of P(A) . Therefore, P (A) - {A} '" P (A) .
Example 23. Consider the sets
A = {I, 2, 3, 4, 5, 6}, B = {4, 5, 6, 7, 8, 9}, C = {I, 3, 5, 7, 9}.
Find (i) A EB B (ii) B EB C
(iii) A n (B EB C), (A n B) EB (A n C) and show that both are equal.
Sol. (i) By definition, A EB B = (A u B) - (A n B)
But A u B = {I, 2, 3, 4, 5, 6, 7, 8, 9}
A n B = {4, 5, 6}
(A u B) - (A n B) = The elements which are in A u B but not in A n B
= {I, 2, 3, 7, 8, 9} = A EB B
(ii) Proceed as in Part (i)
B EB C = {I, 3, 4, 6, 8}
(iii) Using part (ii), A n (B EB C) = {I, 3, 4, 6} ... (1)
Also A n B = {4, 5, 6}, A n C = {I, 3, 5}
.. (A n B) u (A n C) = {4, 5 , 6, 1 , 3}
(A n B) n (A n C) = {5}
SETS 21
� n m ffi � n � = � n m u � n � - � n m n � n �
= {I, 3, 4, 6} ... (2)
From (1) and (2)
A n (B ffi C) = (A n B) ffi (A n C).
Example 24. Determine the following sets :
(a) q, u {q,} (b) q, n {q,} (c) {q,} u {a, q" (q,))
(d) {q,} n {a, q" (q,)) (e) q, ffi {a , q" (q,)) (f) {q,} ffi {a, q" (q,)) .
Sol. (a) q, is an empty set and {q,} is a singleton set containing the element q,
.. q, u {q,} = {q,}
(b) q, n {q,} = q,
(c) {q,} u {a , q" (q,)) = {a, q" (q,))
(d) {q,} n {a, q" (q,)) = {q,}
(e) We know that A ffi B = (A - B) u (B - A)
Take A = q" B = {a, q" (q,))
A - B = The set of elements which are in A and not in B = q,
B - A = The set of elements which are in B and not in A = {a, q" (q,))
A ffi B = (A - B) u (B - A) = q, u {a, q" (q,)) = {a, q" (q,))
(f) Take A = {q,}, B = {a, q" (q,))
A - B = The set of elements which are in A and not in B
= {q,} [since q, is an element of A]
B - A = The set of elements which are in B and not in A = {a, (q,))
A ffi B = (A - B) u (B - A) = {q,} u {a, (q,)) = {a, (q,)) .
Example 25. Let A, B, C be sets. Under what conditions is each of the following true ?
(a) (A - B) u (A - C) = q, (b) (A - B) n (A - C) = q,
(c) (A - B) ffi (A - C) = q,.
Sol. (a) This is true if A = B = C or A, B and C are null sets.
(b) This is true if A = B = C or all three sets are null sets.
(c) This is true if A c B and A c C.
It is also true if A c B and A g; C but B = C.
(b) We prove A u (B - A) = A u B
Let X E A u (B - A) <=? X E A or x E B - A
<=?
<=?
x E A or x E B
xE Au B
A u (B - A) c A u B
I
A u (B n C)
= (A u B) n (A u C)
Hence A u (B - A) = A u B
(P. T. U. B.
Tech. 2008)
13. (a) Determine the power set of A � { , c, d} a b,
(b) Distinguish between �, {�}, {a}, o. (P. T. U. M. C.A. May 2008)
14. Prove that
(a) (A n B) c Ae (A u B) (An B) c B c (A u B).
(b)
15. Prove that
(a) A Ell (B Ell C) � (A Ell B) Ell C A Ell B � B Ell A
(b)
(c) If A Ell C � A Ell B, Then C � B (d) A n (B Ell C) � (A n B) Ell (A n C)
where denotes the symmetric difference of two sets
EB
(P. T. U. M c.A.
Dec. 2006)
18. (a) If A � { +, - } and B � {OO, 01, la, ll} . Find A B x (P. T. U. B.
Tech. May 2005)
(b) How many elements of A4 and (A B)3 have ? x
Answers
1. (a) n(A) � 4 nCB) � 28
(b)
(c) n(C) � a (d) Infinite
(e) neE) � 6.
2. No, since 3 A does not in B.
E
3. (a) No. since 3 A but 3 B as B contains even numbers.
E rt
(b) Yes, since each
Therefore, A is aelement of A isofalsoC. an element of C. Also, 1 C but 1 A. Hence, A C.
proper subset E tt t:-
12. � 0u � - 0 n � � 0u � n 0n � � 0 u � n W u �
� 0n � u 0n B' u (B n � u (B n �
� � u (A n B") u (B n N) u � � (A n B") u (B n N)
� (A -B) u (B -A)
14. (a) Let x An B x A and x B
E � E E
Now x A A B C A
E =:::} II ... (1)
Further, if x Ai then x Au B
E E I Definition of A u B
ACAuB ... (2)
Combining (1) and (2), An B C A C A u B.
17. Let n(A) � m, nCB) � n, Then
Total number of subsets of A = 2 m
Total number of subsets of B = 2 n
2n (2m-n 1) � 56 � 8.7 � 23 (23 - 1)
_
n= 3, m- n = 3 m = 6. ==>
(ii) U 1\ = S
i=l
In other words, a partition P of S is a subdivision of S into disjoint non empty sets. The
subsets in a partition are called cells.
1 . 1 0. VENN-DIAGRAMS
8 8
An B= �
Fig. 1 . 1 Fig. 1 . 2
1 . 1 1 . CROSS PARTITION
If [A" A" ...... , Am] and [B" B" ...... BJ be partitions of a set X. Then the set P = {Ai n Bj ,
i = 1, 2, ... m; j = 1, 2, . . . n} is called cross partition.
I ILLUSTRATIVE EXAMPLES I
Example 1. Let S = {red, blue, green, yellow}. Determine which of the following is a
partition of S
(a) Pl = {{red}, {blue, green}} (b) P2 = {{red, blue, green, yellow}}
(c) P3 = [<I>, {red, blue}, {green, yellow}} (d) P4 = [{blue}, [red, yellow, green}}.
Sol. (a) No, since P, = [{red}, {blue, green}] .
Here P, cannot be a partition of S since yellow does not belong to any cell in P ,.
(b) Yes, since P, = {red, blue, green, yellow}
Here P, is a partition of S since P, has one element which is S itself.
(c) No, since P 3 = [<I>, {red, blue}, {green, yellow}]
Here P 3 cannot be a partition. Since the empty set <I> cannot belong to a partition.
SETS 29
(d) Yes, since P4 = [{blue}, {red, yellow, green}]
Here P 4 is a partition since each cell in P 4 is disjoint and their union is S.
Example 2. Let S = {I, 2, 3, ...... , 8, 9}. Determine whether or not each of the following is
a partition of S
(a) [{I, 3, 5}, {2, 6}, {4, 8, 9}]
(b) {{I, 3, 5}, {2, 4, 6, 8}, {5, 7, 9}}
(e) {{I, 3, 5}, {2, 4, 6, 8}, {7, 9}}
(d) Let X = {I, 2, 3, ... 8, 9}. Determine whether or not each of the following is a partition
of X.
(i) [{l, 3, 6}, {2, 8}, {5, 7, 9}}
(ii) [{l, 5, 7}, {2, 4, 8, 9} {3, 5, 6}}
Sol. (a) No, since 7 does not belong to any cell
(b) No, since {I, 3, 5} and {5, 7, 9} are not disjoint
(e) Yes, as each cell is disjoint and their union is S .
(d) (i) Given X = {I, 2, 3, . . . 8, 9}
Let P 1 = [{I, 3, 6}, {2, 8}, {5, 7, 9}]
Take A, = {I, 3, 6}, � = {2, 8}, � = {5, 7, 9}
Clearly A" � and � are mutually disjoint sets.
Also A, U � U � = {I, 2, 3, 6, 5, 7, 8, 9} '" X (since 4 E X is not in A, U � U A3)
:. P 1 is not a partition of X
(ii) Let P, = [{I, 5, 7}, {2, 4, 8, 9}, {3, 5, 6}]
Take B, = {I, 5, 7}, B, = {2, 4, 8, 9}, B3 = {3, 5, 6}
Clearly, B" B, and B3 are mutually disjoint sets. Also
B, u B, U B3 = {I, 2, 3, 4, 5, 6, 7, 8, 9} = X
:. P, is a partition of X.
Example 3. Find all partitions of S = {a, b, c, d}.
Sol. Each partition of X contains either 1, 2, 3 or 4 distinct sets. The partitions are as
follows:
(1) {{a, b, e, d}}
(2) {{a}, {b, e, d}}, lib}, {a, e, d}}, {{e}, {a, b, d}}, lid}, {a, b, e}},
{{a, b}, {e, d}}, {{a, e}, {b, d}}, {{a, d}, {b, e}}
(3) {{a}, {b}, {e, d}}, {{a}, {c}, {b, d}}, {{a}, {d}, {b, e}},
lib}, {e}, {a, d}}, lib}, {d}, {a, e}}, {{c}, {d}, {a, b}}
(4) {{a}, {b}, {e}, {d}}
There are fifteen different partitions of X.
Example 4. Determine whether or not each of the following is a partition of the set N of
positive integers.
(a) {in : n > 5}, {n : n < 5}} (b) {in : n > 5}, {O}, {l, 2, 3, 4, 5}}
2 2
(e) {{n : n > ll}, {n : n < ll}}.
Sol. (a) No, since 5 does not belong to any cell
(b) No, since {O} is not a subset of N
(c) Yes, the two cells are disjoint and their union is N.
30 DISCRETE STRUCTURES
Example 5. Find all the partitions of S = {I, 2, 3j.
Sol. Each partition of S contains either, 1, 2 or 3 different cells.
The partition containing 1 cell is {I, 2, 3} = S
The partitions containing 2 different cells are {{I}, {2, 3}}, {{2}, {I, 3}}, {{3}, {I, 2}}
The partitions containing 3 different cells are {{I}, {2}, {3}}
Hence, there are five different partitions of S.
Example 6. Consider the set Z of integers. Determine which of the following is a parti-
tion ofZ ?
(i) P1 = {{nj " n E Z}
(ii) P1 = {n : n E Z, n < OJ, P2 = {OJ, P3 = {n : n E Z and n > OJ
(iii) P1 = {n " n E Z and n .'2 OJ, P2 = {n " n E Z and n '" OJ
(iv) P1 = {n E Z : I n I = k, k = - 1, 0, 1, 2, .... .j, P2 = {n E Z = I n I = - Ij.
Sol. (i) Yes, since for different value of n, we have different sets and all the sets are
mutually disjoint.
(ii) Yes, since P" P, and P3 are mutually disjoint and
P 1 u P, u P3 = {n : n E Z, n < O} u {O} u {n : n E Z, n > O} = Z
(iii) No, since P, and P, are not mutually disjoint as 0 E both P, and P,
(iv) No, since P, = {n E Z = I n I = - I} = <jJ, as the empty set <jJ cannot belong to any
partition.
Example 7. A student, on an exampaper, defined the term partition in the following
way.
"Let A be a set. A partition of A is any set of non-empty subsets A l' A2' ...... ofA such that
each element of A is in one and only one of the subsets A /' Is this definition correct ? Why ?
Sol. From the given definition of partition, it is possible that an element of A is in one
and only one of the subsets 1\. Take
A = {a, b, c}, A, = {a, c}, � = {b, c}, � = {c, a}
Clearly A, u � u � = {a, b, c} = A
'"
But A, n � <jJ. Hence the given definition is not correct.
Example 8. Let {Al' A2, ...... An} be a partition of the set A and if B is any non-empty
'"
subset of A. Prove that {A i n B : Ai : n B <jJ} is a partition of A n B.
Sol. Since {A" �, ... An} is a partition of A, therefore, the sets Ai are non-empty and
n
U i=
mutually disj oint and A A . Also, B is non-empty subset of A, therefore,
i= l
n
= U (B n AJ
i= l
Next, we show that all B n 1\ are mutually disjoint. For this consider, for i j '"
(B n 1\) n (B n A) = B n (Ai n A) I Associative law
= B n <jJ I Since 1\ are mutually disjoint
= <jJ
'"
Hence, the set {Ai n B : Ai n B <jJ} is a partition of A n B.
SETS 31
i=l i=l
(P.T.U. M.C.A. Dec. 2005)
3
Sol. U A i = A, U � U � = {I, 2} U {2, 3} U {I, 2, 3, 6} = {I, 2, 3, 6}.
i= l
3
n A i = A, n � n � = {I, 2} n {2, 3} n {I, 2, 3, 6} = {2} n {I, 2, 3, 6} = {2}.
i= l
Example 10. Let X = {I, 2, 3, 4, 5, 6, 7, 8, 9} and consider the following partitions ofX
given by Pi = [{l, 3, 5, 7, 9}, (2, 4, 6, 8}) and P2 = [{l, 2, 3, 4}, {5, 7}, (6, 8, 9).
Find the cross partition P.
Sol. Take A, = {I, 3, 5, 7, 9}, � = {2, 4, 6, 8}
B, = {I, 2, 3, 4}, B, = {5, 7}, B3 = {6, 8, 9}
A, n B, = {I, 3},
A, n B, = {5, 7}, A, n B3 = {9}
� n B, = {2, 4}
� n B, = <1>, A, n B3 = {6, 8}
.. The required cross partition of X is given by
P = [{I, 3}, {5, 7}, {9}, {2, 4}, {6, 8}]
(<I> cannot belong to the partition of a set).
Example 11. IfA andB are two sets. Represent each ofthe following as Venn-diagrams.
(a) A u B (b) A n B (c) A'.
Sol. (a) A u B, {x : x E A or x E B]. The Venn-diagram is shown in the Fig. 1.3.
Fig. 1.3
(b) A n B = {x : x E A and x E B]. The Venn-diagram is shown in the Fig. 1.4.
Fig. 1.6
There are eight regions since there may be elements
(i) in A, B and C (ii) in A and B, but not in C
(iii) in A and C, but not in B (iv) in B and C, but not in A
(v) in only A (vi) in only B
(vii) in only C (viii) in none of A, B, C.
Note: A =
Venn diagram of four sets All �) As and A4 will contain 24 16 regions.
Example 13. (i) Let A and B be sets such that (A n B) c B and B Cl A. Draw the Venn
diagram.
(ii) Let A, B and C be sets such that A c B, A c C, B n C c A, A c (B n C). Draw the Venn
diagram.
(iii) Let A, B, C be sets such that (A n B n C) = <p, A n B = <p, B n C = <p, A n C = <p. Draw
the Venn diagram.
(iv) Let A and B are sets such that:
(a) A n B = B. Draw its Venn diagram
(b) A u B = A and A ", B. Draw its Venn diagram.
Sol. (i) (A n B) c B. It means every member of A is also a
member of B. Hence A c B. Also B Cl A means A and B are not equal.
Hence, A is a proper subset of B i.e., A c B. The correspond·
ing Venn diagram is shown in Fig. 1. 7 (a)
(a)
(b)
(e)
SETS 33
B c;;; A
(d )
Example 14. Draw a Venn diagram of the sets A, B and C Fig. 1.7
(i) where A c B, A and C are disjoint, but B and C have
elements in common.
(ii) where A c B, B and C are disjoint, but A and C have elements in common.
Sol. (i) The required Venn diagram is shown in the Fig. 1.8.
Fig. 1.8
(ii) If A and C have an element in common, say x, then x E A and x E C
Also A c B => x must belong to B
Now x E B and x E C and hence, B and C are not disjoint. But it is given that B and
C are disjoint. Hence, No such Venn diagram exists.
Example 15. Using Venn diagrams, prove De Morgan's laws.
Proof. We show (A u B)' = N n B'
Consider the Venn diagram of two arbitrary sets A and B as shown in the Fig. 1.9(a)
Case I. Venn diagram for (A u B)'
Shade A u B with strokes in horizontal direction as shown in Fig. 1.9(b)
(A u B)' is the area outside of A u B as shaded in Fig. 1.9(b). Hence, the Venn diagram
for (A u B)' is shown in the shaded portion of the Fig. 1.9(c).
'
(a) Sets A and B (b) A u B is shade (e) (A u B) is shaded
Fig. 1.9
34 DISCRETE STRUCTURES
Case II. Venn diagram for A' n B'
The area outside A is N. Shade N with strokes that slant upward to the right ). (¢'
Fig. l.lO(a)
The area outside B is B'. Shade B' with strokes that slant downward to the right ( �).
Fig. 1. lO(a).
'
(a) A is shaded with¢' '
(b) A n B' is shaded
Be
is shaded with �
Fig. 1 . 1 0
C C C
(a) Sets A, B and C (b) A and B n C are shaded (c) A u (B n C)
Fig. 1 . 1 1
• ••••••'
A
., c
A A
c c
c c
OJ A B
(a) Sets A and B (b) A and B' are shaded (e) A n B' is shades
Fig. 1 . 1 5
The crosshatched area is the intersection A n B' shown in the shaded portion of Fig.
1. 15(c)
Example 19. If A, B are any sets. Draw the Venn-diagrams of
(i) A - B (P.T.U. M.C.A. May 2008)
(ii) B - A
(iii) A EB B, where EB denotes the symmetric difference of two sets.
(P.T.U. M.C.A. May 2008)
Sol. (i) A - B = {x : x E A and x 'l B}. The Venn-diagram is shown in Fig. 1. 16.
Fig. 1 . 1 6 Fig. 1 . 17
(ii) B - A = {x : x E B and x 'l A}. The Venn-diagram is shown in the Fig. 1. 17.
(iii) A EB B = (A u B) - (A n B). The Venn-diagram is shown in the Fig. 1. 18.
Fig. 1 . 1 8
SETS 37
Example 20. Represent A EB B = (A u B) - (A n B), using Venn diagram.
Sol. Consider the Venn diagram for any two sets A and B as shown in the Fig. 1.19
CD A B A B
CD
(a) Sets A and B (b) A u B and A n B are (e) A Ell B is shaded
shaded
Fig. 1 . 1 9
Shade A u B with upward slanted strokes (�) and A n B with downward slanted
strokes (�) as shown in Fig. 1. 19(b)
Then, A EB B consists of the area in Fig. 1. 19(b) with strokes in one direction or another,
but not both, as shown in the shaded portion of the Fig. 1. 19(c).
Example 21. Using Venn diagram, prove the following ,'
If A EB B = A EB C, then B = C. (Cancellation law)
Sol. Consider a Venn diagram for any three sets A, B and C as shown in the Fig. 1.20(a)
A B
c
(a) Sets A, B and C (b) A Ell B is shaded with (1111) (e) (A Ell B) Ell C is shaded
C is shaded with (�� )
Fig. 1 .20
For the Venn diagram of A EB B, shade A EB B with strokes in one direction (�) and
shade A EB C with strokes in another direction (�) as shown in Fig. 1.20(b).
Further, consider the area with strokes in one direction or another, but not in both in
the following Fig. 1.20(c).
Now if A EB B = A EB C, then the areas shaded in Fig. 1.20(c) must be empty. Thus
B = B n C = C. Hence proved.
Example 22. Using Venn diagram, prove
(A EB B) EB C = A EB (B EB C). (Associative law)
38 DISCRETE STRUCTURES
Sol. Consider a Venn diagram for any three sets A, B and C as shown in Fig. 1.2 1(a).
A B
(a) Sets A, B and C (b) A Ell B is shaded with � (e) (A Ell B) Ell C is shaded
C is shaded with �
Fig. 1 .2 1
A B
C
(a) A is shaded with � (b) A Ell (B Ell C) is shaded
B Ell C is shaded with �
Fig. 1 .22
Since the area represented by Fig. 1.21(c) and Fig. 1.22(b) is same, therefore
(A 8l B) 8l C = A 8l (B 8l C)
SETS 39
3. Determine whether or not each of the following is a partition of the set Z of positive integers.
(a) [in : n > 5}, {n : n 5}]
< (b) [in : n > 5}, {O}, {I, 2, 3, 4, 5}]
<
(c) {n : n2 > ll}, {n : n2 l l}
4. Consider two sets A and B. Draw the Venn-diagrams of
(i) An B" (h) (B -A)"
(iii) B n N (iv) A n (B u C)
(v) (A n B) u (An C)
5. Consider the sets Ai B, C. Draw the Venn-diagrams of
(i) A- (B u C) (il) N n (B u C)
(iii) N n (C -B)
6. If A and B are two sets) then
(i) AEll B � B Ell A (Commutative law)
(ii) An (B Ell C) � (An B) Ell (B n C). (Distributive law)
7. Using Venn diagram, represent the following sets
(a) N u (B u C) (b) N n (B - C)
(c) An B"n C" (d) N n (B u C)
(e) Au (B- C).
8. The description of the shaded region in Fig. 1 .23 using the operations on sets, is
B
Fig. 1 .23
(i) C u (A n B) (h) C - (A n C) u (C n B) u (A n B)
(iii) C -(A n C) n (C n B) n (A n B)
(iv) Au B u C - (C u (A n B». (P. T. U. B. Tech. Dec. 2008)
40 DISCRETE STRUCTURES
Answers
1. (a) No (b)Yes (e) No (d) Yes
2. (a) No (b) No (e) Yes (d) No
3. )
(a No (b) No (e) Yes
4. (,) r------, (h)
A n Be = A - B (B _ A)e
(iii) (iv) , (v)
B n AC = B - A
A n (B u C) = (A n B) u (A n C)
5. (,) (h)
u
A -(B C) A' n (B u C)
(iii)
AC n (C - B)
SETS 41
7. (a)
' cex" (b)
'C@"
AC u (8 u C) is shaded AC n (8 - C) is shaded
(c)
'C@" (d)
A n Be n CC is shaded
re/
AC n ( 8 u C) is shaded
(e)
r&/
A u ( 8 - C) is shaded
8. (ii)
Hints
8. Consider the Venn diagram for any three sets Ai B and C as shown in Fig. 1.24(a).
Shade An C by strokes slanted upward (¢')
Shade e ll B by strokes slanted downward (�)
Shade An B by strokes drawn parallel ( )
=
Thus, the total area is (A C) (C B) (A B) as shown in the shaded portion of Fig. 1.24(a).
II U II u II
'(E§)"
8
C C
(a) (A n C) u (C n B) u (A n B) (b) C - (A n C) u (C n B) u (A n B)
is shaded
Fig. 1.24
Hence C - (A n C) (C n B) (A n B) is the area shown in the shaded portion of Fig. 1.24(b).
u u
1 . 1 3. COUNTABLE SET
A set X is said to be countable if it is either finite or enumerable.
1 . 1 5 . FUNDAMENTAL PRODUCT
Let A" �, .. An be n distinct sets. A fundamental product of these sets is a set of the
form
A; n A2* n �* n ... n An*
where Pc,* is either Pc, or Pc,'. There are 2n such fundamental products and any two such
fundamental products are disjoint and the union of all the fundamental products is equal to
the universal set.
SETS 43
Let A be any set and {B " B" ... Bn} be a set of subsets of A. Then a set of the form
D, n D, n . . . n D n where each Di may be either Bi or B,' is called a minset or minterm generated
by E l ) B2 ! . . . ) En '
A set is said to be in minset normal form or canonical form if it is expressed as the union
of distinct non·empty minsets or it is <p.
1 . 1 6. MAXSETS OR MAXTERMS
Let A be any set and {B " B" ... Bn} be a set of subsets of A. Then a set of the form
D, u D, u . . . . . . u D n , where each Di may be either Bi or B,' is called maxset generated by
E l ) B2 ! ... En '
Remark 1. The set of maxsets donot necessarily form a partition of A.
Remark 2. Let beform
A any asetpartition
and E ll ofB2!A.' " En be subsets of A. Then the set afnon-empty minsets
generated by
E l l B2! ' " E n
I ILLUSTRATIVE EXAMPLES
Example 1. Consider A = {I, 2, 3, 4, 5, 6} and B 1 = {I, 3, 5}, B2 = {I, 2, 3}. Obtain all
possible minsets of A generated by B l and B2'
Sol. For given n sets B" B" . . . Bn, there are 2n minsets. The possible minsets for the
given sets B, and B, are given as
B{ = {2, 4, 6}; B� = {4, 6, 6}
A, = B, n B, = {I, 3}; � = B, n B� = {6}
� = B{ n B, = {2}; A, = Bf n B� = {4, 6}
Also, each element of A appears exactly once in one of the four min sets B, n B" B, n B�,
B{ n B" B{ n B�. Hence they form a partition of A.
Example 2. Let A = {I, 2, 3, 4, 5, 6} and let B l = {I, 3, 5}. B2 = {I, 2, 3}. Find the maxsets
generated by B l and B2. So maxsets form a partition ofA ?
Sol. Here Bf = [2, 4, 6]; B� = [4, 6, 6]
The possible number of maxsets generated by n sets is 2 n . The maxsets generated by B,
and B, are
M, = B, u B, = [1, 2, 3, 6]
M, = Bf u B, = [2, 4, 6] u [1, 2, 3] = [1, 2, 3, 4, 6]
M3 = B, u B� = [1, 2, 3] u [4, 6, 6] = [1, 2, 3, 4, 6, 6]
M, = Bf u B� = [2, 4, 6] u [4, 6, 6] = [2, 4, 6, 6]
Now M, n M, = [2, 3] # <p. Therefore M" M" M3, M, cannot form a partition of A.
Example 3. Consider A = [1, 2, 3, 4, 5, 6, 7, 8, 9} and let Bl = [5, 6, 7J, B2 = [2, 4, 5, 9],
B3 = [3, 4, 5, 6, 8, 9]. Find the minsets generated by B 1, B2, B3•
44 DISCRETE STRUCTURES
(a) Do these minsets form a partition ofA ?
(b) How many different subsets ofA can you create using B l' B2 and B 3 with the stand
ard set operations ?
Sol. (a) The possible number of minsets generated by n sets is 2n. The minsets gener
ated by B" B, and B3 given below:
Here Bf = [1, 2, 3, 4, 8, 9], B� = [1, 3, 6, 7, 8], B£ = [1, 2, 7 ]
The min sets generated by B" B, and B3 are
A, = B, n B, n B3 = [5]
A, = Bf n B, n B3 = [4, 9]
A, = B, n B� n B3 = [6]
A, = B, n B, n B� = q,
A5 = Bf n B� n B3 = [3, 8]
� = B, n B� n B£ = [7]
A, = Bf n B, n B� = [2]
A" = Bf n B� n B� = [1]
(b) From part (a), the minsets generated by B" B, and B 3 are
P, = {5}, P, = {4, 9}, P3 = {6}, P, = {3, 8},
P5 = {7}, P6 = {2}, P7 = {I}
Clearly, Pi n Pj = q" i j '"
7
Fig. 1 .25
(c) (i) The minset normal form for Bf (using Venn diagram) is given as
Bf = A,; u A" U A5 U A,;
= (Bf n B, n B�) u (Bf n B, n B 3) u (Bf n B� n B,) u (Bf n B� n B�
(ii) The minset normal form for B, n B, (using Venn diagram) is
B, n B, = A, u A, = (B, n B, n B,) u (B, n B, n B3 ')
(iii) The minset normal form for B� n B� (using Venn diagram) is
B� n B� = A5 U A,; = (Bf n B� n B,) u (Bf n B� n B�
Example 6. Consider the universal set
U = {l, 2, 3, 4, , IO} and the subsets
..
1. Let A and B be sets and N and B' denote their complements. Then
(A - B) u (B - A) u (A u B) equal to
(a) A u B (b) N u B'
(c) A n B (<1) N n B'.
2. The number of elements in the power set P(A) of the set A = {{q,}, 1, {2, 3}} is
(a) 2 (b) 4
(c) 8 (<1) None.
3. Let P(A) denote the power set of A. Which of the following is true ?
(a) P(P(A» = P(A) (b) P(A) n A = P(A)
(c) P(A) n P(P(A» = {q,} (<1) A 'l P(A)
4. Let A be a finite set containing n elements, then P(A x A) contains
'
(a) 2 2" (b) 2 n
(c) (2 n)' (<1) None elements.
5. Let A be an infinite set and A" A", ..... , An be n sets such that A, u A" u A" u ...... u An
= A. Then
(a) At least one of the sets 1\ is a finite set
(b) No more than one of the sets Ai can be finite
(c) At least one of the sets 1\ is an infinite set
(d) None.
6. Let A = {3, {I, 4}, 5}, then P(2A) is
(a) {A, 3, 1, 4, {I, 3, 5}, {I, 4, 5}, {3, 4}, q,} (b) {A, 3, {I, 4}, 5}
(c) {A, {3}, {3, {I, 4}}, {3, 5}, q,} (<1) None.
7. Consider the following statements :
T1 : 3 infinite sets A, B and C such that A n (B u C) is finite
T, : 3 two rational numbers x and y such that x + y is rational. Then
(a) Only T, is correct (b) Only T, is correct
(c) Both T, and T, are correct (<1) None ofT, and T, are correct.
8. In a room containing 28 females, there are 18 females who speak English, 15 females
speak French and 22 speak German, 9 females speak both English and French, 1 1
females speak both French and German whereas 1 3 speak both German and English.
How many females speak all the three languages.
(a) 9 (b) 8
(c) 7 (<1) 6.
9. The number of substrings of all lengths that can be formed from a character string of
length n is.
(a) n (b) n'
n(n - 1) (<1)
n(n + 1)
(c)
2 2
SETS 49
10. The symmetric difference of two sets A and B is denoted by A Ell B. Which of the following
is true.
(a) A Ell B = (A u B) - (A n B) (b) A Ell B = (A - B) u (B - A)
(c) Both (a) and (b) are true (d) None.
11. A set A has 10 members. Then the number of members of P(A) is
(a) 10 (b) 2 10
(c) lOF(A) (d) none.
12. A set A has 5 members. The number of proper subsets of A is
(a) 25 (b) 2 5 - 1
(c) 25 + 1 (d) none.
Answers and Explanations
1. (a) (A - B) u (B - A) u (A u B) = A u B.
2. (c) A contains 3 elements, so P(A) will contain 23 = 8
elements.
3. (c) P(A) contains all subsets of A but no elements of A.
Hence, there is no element common to A and P(A) . Also,
there is no element common to P(A) and P(P(A» .
. . P(A) n P(P(A» = <p.
(A - 8) u (8 - A) is shaded with
�.
2 . 1 . INTRODUCTION
In the previous chapter, we have discussed various operations on sets to generate more
sets from given sets. We now discuss one more property of sets which is known as cartesian
products of sets which will help us in understanding the concept of relations.
Let A and B be any two sets. Then by an ordered pair ofelements, we mean a pair (x, y)
where x E A, y E B.
For example, the ordered pairs (1, 1), (2, 3), (3, 5) represent different points in a plane.
Let A and B be any two non·empty sets. Then a binary relation or simply a relation R
from A to B is a subset of A x B. Thus,
R is a relation from A to B iff R c A x B.
Notation. IfR is a relation from a non·empty set A to a non·empty set B and if (x, y) E R,
we write xRy (read as x is related to y by the relation R).
50
RELATIONS 51
For example, consider A = (1, 2, 3). Then the relation R, defined by R, = {(I, 1), (2, 2),
(3, 3), (1, 3), (2, I)} is a reflexive relation on A.
The relation R, defined by R, = {(I, 1), (3, 3), (2, 1), (3, 2)} is not a reflexive relation on A,
since (2, 2) 'l R,.
The identity relation and universal relation on a non-empty set is a reflexive relation.
(b) Irretlexive relation. A relation R on a set A is said to be irreflexive if (a, a) 'l R \j
a E A. In other words, a relation R on a set A is not irreflexive if there exists at least one a E A
such that (a, a) E R.
Example. Consider R = {(a, b) : a '" b} on the set A = {a, b} i.e., R is the relation of
inequality on the set A, thus R is irreflexive since for every a E A, (a, a) 'l R.
Example. Let A be a non-empty set and R be a relation on A = {a : a is a computer
science student) defined by R = {(a, b) : a scored less than b}
Then for all a E A, (a, a) 'l R i.e., R is an irreflexive relation.
Remark. Every identity relation on a non-empty set Ais a reflexive relation, but not conversely.
= =
Consider A {a, b, c} and define a relation R by R {(a, a), (b, b), (c, c), (a, b)}. Then R is a reflexive
relation on A but not an identity relation on A due to the element (a, b) in R.
(e) Symmetric relation: Let A be any set. Then a relation R on the set A is called
symmetric iff
(x, y) E R => (y, x) E R for all x, Y E A.
For example, the identity relation and universal relation on a non-empty set A are
symmetric relations on A.
Consider A = (1, 2, 3, 4) and define relations R, and R, as follows :
R, = {(I, 3), (1, 4), (3, 1), (2, 2), (4, I)}
R, = {(I, 1), (2, 2), (3, 3), (1, 3)}
In R" (1, 3) E R, => (3, 1) E R,
(1, 4) E R, => (4, 1) E R,
(2, 2) E R, => (2, 2) E R,
Thus, the relation R, is a symmetric relation on A.
In R" (1, 3) E R, =p (3, 1) E R,. Thus R, is not a symmetric relation.
(d) Transitive relation: Let A be any set. Then a relation R is said to be transitive iff
(x, y) E R and (y, z) E R => (x, z) E R for all x, y, Z E A.
For example, the identity relation and universal relation are transitive relation on any
non-empty set.
Consider A = The set of all straight lines in a plane. Define a relation "is parallel to" on A.
Take 1" I" 13 E A. Then 1, is parallel to I, and I, is parallel to 13 , It implies that 1, is
parallel to 13 also. Hence the relation "is parallel to" is a transitive relation.
(e) Antisymmetric or Asymmetric or Non-symmetric relation: Let A be any set. A
relation R on A is said to be a antisymmetric iff
(x, y) E R and (y, x) E R => x = y for all x, Y E A.
RELATIONS 53
or A relation R on a non· empty set A is Antisymmetric if whenever xRy andyRx, then x = y,
Le.
if whenever (x, y), (y, x) E R then x = y
On the other hand, a relation R on a non·empty set A is not anti symmetric if there
exists x, Y E A such that (x, y) and (y, x) E R but x '" y.
Example. The relation "S;' (read as less than or equal to) is antisymmetric since whenever
a '" b and b '" a, then a = b.
2 . 1 0. EQU IVALENCE RELATION (P. T. U. B. Tech. May 2013, May 2012, May 2010, Dec. 2007)
Let A be any set. Then a relation R on A is said to be an equivalence relation on A iff it
satisfies the following :
(i) It is reflexive
(ii) It is symmetric
(iii) It is transitive.
Theorem L IfR and S are two equivalence relations on a set A, then
(a) R n S is also an equivalence relation on A. (P. T.U. M. C.A. Dec. 2006)
(b) R u S may or may not be an equivalence relation on A.
(P.T.U. B.Tech. Dec. 2013; P.T.U. M.C.A. Dec. 2006)
. . (l)
Proof. Given R is a relation on A. It means R is a subset of A x A. It implies
RcAxA
Also, S eAx A . . . (2)
(1) and (2) gives R n S e A x A i.e. , R n S is a subset of A x A. Hence R n S is a relation
on A.
We show R n S is an equivalence relation on A.
(i) Reflexivity. Let x E A be any arbitrary element of A.
As R and S are equivalence relations on A. It implies R and S are reflexive relations on A.
If x E A => (x, x) E R and (x, x) E S.
=> (x, x) E R n S for all x E A.
Hence R n S is reflexive on A.
(ii) Symmetry. Let x, Y E A such that (x, y) E R n S. It means (x, y) E R and (x, y) E S.
As R and S are symmetric relations on A.
.. (y, x) E R and (y, x) E S
=> (y, x) E R n S.
Hence (x, y) E R n S => (y, x) E R n S for all x, Y E A.
Therefore R n S is symmetric on A.
(iii) Transitivity. Let x, y, Z E A such that (x, y) E R n S, (y, z) E R n S.
We show (x, z) E R n S.
Now, (x, y) E R and (x, y) E S. Also, (y, z) E R and (y, z) E S.
As R, S are transitive on A
.. (x, y) E R, (y, z) E R => (x, z) E R
Also, (x, y) E S, (y, z) E S => (x, z) E S
=> (x, z) E R n S.
Hence R n S is an equivalence relation on A.
Further, we show R u S may or may not be an equivalence relation.
Consider A = {a, b, c} . Define the relations R and S by
R = {(a, a), (b, b), (c, c), (a, b), (b, a)}
S = {(a, a), (b, b), (c, c), (b, c), (c, b)}
54 DISCRETE STRUCTURES
Clearly, R and S are equivalence relations on A.
But R u S = {(a, a), (b, b,), (c, c), (a, b), (b, a), (b, c), (c, b)}
Here (a, b) E R u S, (b, c) E R u S.
But (a, c) 'l R u S . . R u S is not transitive.
Hence R u S cannot be equivalence relation on A.
2. 1 1 . COMPATIBLE RELATION
A binary relation on a set which is reflexive and symmetric is called a compatible rela·
tion. Every equivalence relation is a compatible relation. But every compatible relation may
not be an equivalence relation.
Let A is the set of persons and define R on A by R such that for a, b E A, (a, b) E R if a is
a friend of b, then R is reflexive and symmetric. Hence R is compatible.
Let a, b, c E A such that (a, b) E R, (b, c) E R. Here, a is a friend of b, b is a friend of c but
a may or may not be a friend of c. Hence R may or may not be transitive.
Example. Let A = {x : x is a English word}. Let R be a relation on A such that
R = {(a, b) : a, b E A and a and b has one or more letters common}. We
show R is a compatible relation.
(i) Reflexive. Every English word has letters same as itself. Therefore R is reflexive.
(ii) Symmetric. If a has one or more letters same as that of b, then b also has one or
more letters same as a. Hence R is symmetric.
Therefore, R is a compatible relation. But R is not transitive.
Take a = book, b = kite, c = ten (any English word).
Here (a, b) = (book, kite) E R (as book and kite has 'k' common)
(b, c) = (kite, ten) E R. But (a, c) = (book, ten) 'l R.
R is not an equivalence relation.
2.12. PARTIAL ORDER RELATION (P. T. U. B. Tech. Dec. 2013, May 2006)
A relation R on a set A is called a partial relation if it is
(i) reflexive
(ii) anti· symmetric
(iii) transitive.
For example, define a relation 'c;;;' on A. We show the relation ' c;;;' is a partial order
relation on A.
(i) Let B E P(A). Then B c;;; B is true. Therefore, ' c;;;' is reflexive.
(ii) Let B" B, E P(A) and if B, C;;; B" B, C;;; B,. Then B, = B 2 is true.
. . \::;,' is anti-symmetric.
(iii) Let B" B" B3 E P(A) and if B, C;;; B" B, C;;; B3 , then B, C;;; B3 is true.
Hence the relation ie' is transitive.
The relation ie' is a partial order relation.
Let A" � . . . , An are n sets. Then the set of all ordered n·tuples (a" a2 , ... , a) where a,
E A, a, E A, . . . , an E A is called the product of the sets A" �, ... An ' and is denoted by A, x �
A3 X ... x An or II Ai .
n
X
i=1
RELATIONS 55
Hence, we write A x A = A'
A x A x A = A'
A x A x ... A = An
2.14. TERNARY RELATION
Fig. 2 . 1
Remark. In general RoS SoK Also, (RoS) -l S-l oR-l
-:f- =
Theorem II. Let A, B and C be three sets and R be a relation from A to B, S a relation
from B to C. Then (RoSt1 = S-l oR-l
Proof. Let a E A, b E B, c E C. Then (a, b) E R, (b, c) E S
<=? (a, c) E RoS <=? (c, a) E (ROS) -l ( 1)
But (b, c) E S <=? (c, b) E S-"
ILLUSTRATIVE EXAMPLES
Example 6. (a) IfA is a set containing n elements. Find the number ofrelations from A
to A.
(b) If A = (1, 2). Find all possible relations from A to A.
Sol. (a) We know that if a set A has m elements and B has n elements, then total
number of relations from A to B is 2 m".
Therefore, the total number of relations from A to A is 2" x " = 2n ' .
2'
(b) A contains 2 elements :. Total number of relations from A to A = 2 = 42 = 16.
The various relations are
q" {(I, 2), (2, 1) , ( 1, 1) , (2, 2)}, {(I, 2), (2, I)}, {(I, 2), ( 1, I)}, {(I, 2), (2, 2)}, {(2, 1) , ( 1, I)},
{(2, 1) , (2, 2)}, {(I, 1), (2, 2)}, {(I, 2), (2, 1), (1, I)}, {(I, 2), (1, 1), (2, 2)}, {(2, 1), (2, 2), (1, I)},
{(I, 2), (2, 1), (2, 2)}, {(I, 2), (2, 1), (1, 1), (2, 2)}, {(I, 1), (2, 2)}, {(I, 1), (2, 2), (1, 2)}, {(2, 1),
(1, 1), (1, 2)}
Example 7. What are the properties of relations ? Explain with examples.
(P.T.V. Dec. 2005)
Sol. There are many properties of relations. These properties tell the nature and type of
the relations. The following are the main properties.
(i) Reflexive. Consider a binary relation R on a set A. If for x E A, (x, x) E R for all
x E A, then R is called reflexive relation.
For example, consider A = (1, 2) and R = {(I, 1) , (2, 2)}.
Then R is reflexive relation.
(ii) Irreflexive relation. A relation R is called irreflexive if for every x E A, (x, x) 'l R.
For example, consider A = (1, 2) and R = {(I, 2), (2, 2)}
then R is irreflexive since (x, x) 'l R for every x E A.
(iii) Symmetric relation. Consider a binary relation R on a set A. The relation R is
called symmetric if whenever (x, y) E R => (y, x) E R
For example, consider A = {(I, 2)} and R = {(I, 2), (2, 1), ( 1, I)}
Then R is symmetric relation.
(iv) Asymmetric relation. A relation R is called asymmetric relation if for every
(x, y) E R => (y, x) 'l R for all (x, y) E A.
For example, consider A = (1, 2) and R = {(I, 1), (1, 2), (2, 2)}
This relation R is asymmetric as (1, 2) E R, but (2, 1) 'l R.
(v) Antisymmetric relation. A relation R on a set A is called an antisymmetric if
whenever (x, y) E R, (y, x) E R then x = y.
For example, P(A) = The set of all subsets of A and let 'c;;;' is a relation on P(A) .
Let A c;;; E, E c;;; A for A, B E P(A).
Then clearly B = A. Hence 'c;;;' is antisymmetric relation.
(vi) Transitive relation. Let R be a relation on a set A. Let (x, y) E R, (y, z) E R => (x, z)
E R for x, y, Z E R. Then R is called transitive relation.
For example, consider A = (1, 2, 3) and R = {(I, 2), (2, 1), (1, 1), (2, 2)} is a transitive
relation.
RELATIONS 61
Example 8. Give an example of a relation which is
(a) Neither reflexive nor irreflexive
(b) Both symmetric and antisymmetric
(c) Both reflexive and symmetric
(d) Each reflexive, symmetric and transitive
(e) Both symmetric and transitive but not reflexive.
Sol. (a) Neither reflexive nor irreflexive
Recall that a relation R on a set A is said to be reflexive if aRa \j a E A. Also a relation
R on a set A is said to be irreflexive if (a, a) 'l R \j a E A.
Let A = {I, 2, 3} and define R = {(I, 1), (1, 2), (1, 3), (3, 3)}.
Here R is not reflexive since (2, 2) 'l R where as 2 E A.
It is also not irreflexive since (1, 1) E R.
(b) Both symmetric and anti symmetric
Recall that a relation R on a set A is symmetric if (a, b) E R => (b, a) E R. Also a
relation R is antisymmetric if (a, b) E R and (b, a) E R => a = b.
Take A = (1, 2, 3) and R = {(I, 1), (2, 2)}
Then, R is symmetric and antisymmetric
(c) Both reflexive and symmetric
Take A = {I, 2, 3} and R = {(I, 1), (1, 2), (2, 1), (2, 2), (3, 3)}.
Here R is reflexive and symmetric relation on A.
(d) Each reflexive, symmetric and transitive
Let L be the set of lines in the Evclidean plane. Let R be the relation on L defined by "is
parallel to".
If 1, E L, then 1, 11 1, => R is reflexive. If 1" I, E L such that 1, Il l" then
I, 11 1, => R is symmetric.
If 1 " I" 13 E L such that 1, Il l, and I, 11 13 , then 1, 11 13 , Hence R is transitive also.
(e) Both symmetric and transitive but not reflexive.
The empty relation <p on any finite set A is symmetric and transitive but not reflexive.
Example 9. Consider the following relations on the set A = (1, 2, 3, 4), defined by
(i) R = {(I, 1), (1, 2), (1, 3), (3, 3)}
(ii) S = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3)}
(iii) T = {(1, 1), (1, 2), (2, 2), (3, 3)}
(iv) <p = Empty relation
(v) U = Universal relation.
Determine whether or not each of the above relations on A is
(a) Reflexive (b) Symmetric (c) Transitive (d) Antisymmetric.
Sol. (a) Reflexive. The universal relation on A = {I, 2, 3, 4} is reflexive. The empty
relation <p on A = {I, 2, 3, 4} is not reflexive.
Also R, S and T are not reflexive since there exists an element a E A such that (a, a) 'l R,
S, T.
(b) Symmetric
(i) R = {(I, 1), (1, 2), (1, 3), (3, 3)}. Here R is not symmetric since (1, 2) E R, but (2, 1) 'l R.
(ii) S = {(I, 1), (1, 2), (2, 1), (2, 2), (3, 3)}. Hence (a, b) E S => (b, a) E S for all a, b E S
:. S is symmetric.
62 DISCRETE STRUCTURES
(iii) T = {(I, 1), (1, 2), (2, 2), (2, 3)}. Here T is not symmetric since (1, 2) E T => (2, 1) " T
(iv) The empty relation on any non-empty set is always symmetric.
(v) The universal relation on any non-empty set is always symmetric.
(c) Transitive
(i) R = {(I, 1), (1, 2), (1, 3), (3, 3)}. Here (a, b) E R, (b, c) E R => (a, c) E R 'd a, b, c E R
(ii) S = {(I, 1), (1, 2), (2, 1), (2, 2), (3, 3)}
Here (a, b) E S, (b, c) E S => (a, c) E S 'd a, b, C E S. Hence S is transitive.
(iii) T = {(I, 1), (1, 2), (2, 2), (2, 3)}. Here (1, 2) E T, (2, 3) E T => (1, 3) E T
.. T is not transitive.
(iv) The empty relation on A is always transitive.
(v) The universal relation on any non-empty set A is always transitive
(d) Antisymmetric
(i) R = {(I, 1), (1, 2), (1, 3), (3, 3)}. We know that a relation R is called antisymmetric
relation on A iff (a, b) E R, (b, a) E R => a = b . . R is antisymmetric.
(ii) S = {(I, 1), (1, 2), (2, 1), (2, 2), (3, 3)}. Here (a, b) E S, (b, a) E S => a '" b 'd a, b E S.
.. S is not antisymmetric. Since (1, 2) E S, (2, 1) E S => 1 '" 2.
(iii) T = {(I, 1), (1, 2), (2, 1), (1, 3), (3, 3)}. Here (1, 2) E T, (2, 1) E T => 1 ", 2.
:. T is not antisymmetric.
(iv) The empty relation on A is not antisymmetric.
(v) The universal relation on any non-empty set. For if, let a, b (a '" b) E A. If aRb, b R a
and if R is antisymmetric, then, we must have a = b, which is a contradiction. Hence
the universal relation on A is not antisymmetric.
Example lO_ Each of the following defines a relation on the set N ofpositive integers
R : x >y
S : x + y = lO
T : x + 4y = 10 for all x, y, E N
Determine which of the relations are
(a) reflexive (b) symmetric
(c) transitive (d) antisymmetric
SoL (a) Reflexive_ None are reflexive. For e.g., (1.1) " R, S and T
(b) Symmetric_ Take x = 3, y = 6, then clearly y > x, but x 1: y R is not symmetric
If (x, y) E S, then x + y = 10 => y + x = 10
=> (y, x) E S. Hence S is symmetric.
Also for x = 6, y = 1, x + 4y = 10 holds
Le., (6, 1) E T, but (1, 6) " T i.e., T is not symmetric.
(c) Transitive_ Let (x, y), (y, z) E R => x > y and y > Z
=> x > z :. (x, z) E R for all x, z E N
R is transitive
But S is not transitive.
For e.g., (3, 7) E S since 3 + 7 = 10; (7, 3) E S since 7 + 3 = 10
But (3, 3) " S as 3 + 3 = 6 '" 10
RELATIONS 63
Further, if (x, y) E T, then x + 4y = 10
( )
(y, z) E T, then y + 4z = 10
10 - x
Consider x + 4z = x + 10 - y = x + 10 - ---
4
4x + 40 - 10 + x 5x + 30
= = '" 10
4 4
.. (x, z) 'l T. Hence T is not transitive.
(d) Antisymmetric. If x > y and y > x, then x = y \;j x, Y E N
. . R is antisymmetric.
Let (2, 8) E S => (8, 2) E S but 2 '" 8
. . S is not antisymmetric.
If (x, y) E T, then x + 4y = 10
(y, x) E T, then y + 4x = 10
x + 4y = y + 4x
3y = 3x => x = y \;j x, Y E N
.. T is antisymmetric.
Example 11. (a) Find the numbers of relations from A = (a, b, c) to B = (1, 2).
(b) Define ternary relation and give an example. (P.T.V., B.Tech. Dec. 2006)
(c) Define anti-symmetric relation with an example.
Sol. (a) We know that if a set contains m elements and B contains n elements, then
total number of relations from A to B is 2mn.
Here m = 3, n = 2 required number of relations from A to B = 26 = 64.
(b) A ternary relation is a set of ordered triples. In particular, if S is a set, then a subset
of S x S x S is called a ternary relation on S. For example, If L is a line, then "betweenness" is
a ternary relation among poin ts of L.
(c) A relation R is said to be antisymmetric relation if (x, y) E R, (y, x) E R => y = x
For e.g., consider A = The set of natural numbers. Define R as (x, y) E R iff x Iy.
Then we know that if x divides y, y divides x then x = y for all x, y E R
Hence the relation defined above is an antisymmetric relation.
Example 12. (a) Give an example to show that a reflexive relation on a set A is not
necessarily symmetric.
(b) Prove that a relation R on a set A is symmetric iff R = R-i .
(P.T.U. M.C.A. Dec. 2005)
Sol. (a) Consider A = (1, 2, 3) and define a relation R by R = {(I, 1), (2, 2), (3, 3), (1,3)}.
Here (x, x) E R for all x E A. :. The relation R is reflexive. But (1, 3) E R => (3, 1) 'l R.
:. The relation R is not symmetric.
(b) Let R is symmetric on A. We show R = R-l
Let (x, y) E R for all x, Y E A
=> (y, x) E R I R is symmetric
(x, y) E R-l By definition of inverse relation
R C R-1 ( 1)
64 DISCRETE STRUCTURES
Again let (x, y) E R-1 for all x, Y E A
=> (y, x) E R By definition of inverse relation
=> (x, y) E R I R is symmetric
=> R� c R (2)
From (1) and (2) R = R-1
Converse. Let R = R-l We show R is symmetric
Let (x, y) E R
=> (x, y) E R-1
=> (y, x) E R for all x, Y E A. I R = R-1
i.e., R is symmetric.
Example 13. Let R be a relation on the set ofall lines in a plane defined by (11, 12) E R
<=?1 1 is parallel to lz Show that R is an equivalence relation.
Sol. Let A = The set of all lines in a plane and I E A. Since I is parallel to I for each I E A.
:. R is reflexive.
Also let (1" I,) E R for all 1" I, E A. Then by definition of R, 1, is parallel to I, => I, is also
parallel to 1" It means (I" 1,) E R.
. . R is symmetric.
Finally, Let (1" I,) E R, (I" I,) E R for all 1" I" 13 E A.
Now, (1" I,) E R => 1, is parallel to I,
(I" I,) E R => I, is parallel to 13 ,
It means 1, is parallel to 13 , :. (1" I,) E R i.e., R is transitive. Hence we can say that the
relation R is an equivalence relation.
Example 14. Show that the relation "is congruent to" on the set of all triangles in a
plane is an equivalence relation.
Sol. Let A = The set of all triangles in a plane.
R = The relation on A defined by (T" T ,) E R <=? T, is congruent to T, for all
T" T, E A
Reflexivity. Let T1 E A, then T1 '" T1 is true
.. (T" T,) E R for all T, E A. Hence R is reflexive.
Symmetry. Let T" T, E A such that (T" T,) E R
Now, (T" T,) E R => T, '" T, => T, '" T,
=> (T" T,) E R for all T" T, E A
. . R is symmetric.
Transitive. Let T" T" T3 E A such that
(T" T,) E R, (T" T3 ) E R
Now, (T" T,) E R => T, '" T,
(T" T,) E R => T, ", T3
.. T, '" T3
=> (T T,) E R. . . R is transitive.
l'
Hence the relation R is an equivalence relation.
Example 15. Let A be a non-empty set and R be a relation on thepower set P(A) defined
by (A, B) E R <=? A c B for all A, B E P(A). Examine whether R is an equivalence relation or not.
Is R antisymmetric ?
Sol. Let A E P(A). Since A c A for all A E P(A)
.. (A, A) E R. i. e., R is reflexive.
Let (A, B) E R for all A, B E P(A) .
RELATIONS 65
is equivalence relation.
�
66 DISCRETE STRUCTURES
(b) Reflexive. (a, b) - (a, b) if ab = ba = ab, a, b are non zero integers
which is true
is reflexive
�
=> bc = ad
cb = da a, b, c, d are non-zero integers
(c, d) �
(a, b)
. . is symmetric
�
is transitive
�
Let (a, b) E R i.e. , a is a brother of b. Then (b, a) may not belong to R (If b is a female,
then b cannot be brother of a). Hence R is not symmetric.
RELATIONS 67
Further, if (a, b) E R and if a and b are male, then both a and b are brothers of each
other. Consequently (b, a) E R, but a '" b.
. . R is not antisymmetric.
Transitive. If (a, b) E R and (b, c) E R. We show (a, c) E R.
Case I. If (a, b) E R, then a has to be male.
If (b, c) E R, then b has to be male.
. . a and b are both male. Consequently (a, c) E R. Hence R is transitive.
Thus, R is neither an equivalence relation nor a partial order relation.
(c) Reflexive. No book costs more than itself, nor pages fewer than itself. Hence
(a, a) 'l R, therefore R is not reflexive.
Symmetric. If (a, b) E R, then the cost of the book 'd is more than the cost of the book
'b' . Here, (b, a) 'l R (since the cost of the book 'b' is less than the cost of the book 'd)
. . R is not symmetric.
Consequently R is not an equivalence relation, not a partial order relation.
Example 19. LetA = (a, b, c). Let R be a rekLtion an A defined by R = {(a, a), (a, b), (b, c),
(c, a)}. Find the reflexive closure of R.
Sol. Given relation R = {(a, a), (a, b), (b, c), (c, a)} is not reflexive. Adding the ordered
pairs (b, b), (c, c) in R, the required reflexive closure of R is given by
RR = {(a, a), (a, b), (b, c), (c, a), (b, b), (c, c)}.
Example 20. Let A = (1, 2, 3, 4) and let R is defined by R = {(1, 2), (2, 3), (3, 4), (2, 1)}.
Find the transitive closure of R.
Sol. Given R = {(I, 2), (2, 3), (3, 4), (2, I)}
Here (1, 2), (2, 1) E R. If R is transitive. Then there should be (1, 1) E R.
Similarly, (1, 2) E R, (2, 3) E R. If R is transitive, there should be (1, 3) E R
If (1, 3) E R, (3, 4) E R. We should also have (1, 4) E R
Also (2, 1) E R, (1, 2) E R. If R is transitive, there should be (2, 2) E R.
If (2, 3) E R, (3, 4) E R, we should have (2, 4) E R.
Hence the required transitive closure of R is given by
RT = {(I, 2), (2, 3), (3, 4), (2, 1), (1, 1), (1, 3), (1, 4), (2, 2), (2, 4)}
Example 21. Consider A = {I, 2, 3, 4}, and R, S be the relations defined by
R = {(1, 2), (1, 1), (1, 3), (2, 4), (3, 2)}
S = {(1, 4), (1, 3), (2, 3), (3, 1), (4, I)}.
Find RoS,
Sol. We compute the elements of RoS. Consider the Fig. 2.6.
R S
Fig. 2 . 6
RoS = {(I, 3), (1, 4), (1, 1), (2, 1), (3, 3)}
68 DISCRETE STRUCTURES
Example 22. Let R and S be the relations on A = (1, 2, 3, 4) A defined by
R = {(1, 1), (3, 1), (3, 4), (4, 2), (4, 3)}
8 = {(1, 3), (2, 1), (3, 1), (3, 2), (4, 4)}
(a) Find the composition relation RoS
(b) Find the composition relation SoR
(c) Find the composition relation R2 = RoR
(d) Find the composition relation R3 = RoRoR.
Sol. (a) lRl and 183 => (1, 3) E R08
Also 3R1 and 1 8 3 => (3, 3) E R08
3R4 and 484 => (3, 4) E R08
4R2 and 281 => (4, 1) E R08
4R3 and 38 1 => (4, 1) E R08
4R3 and 382 => (4, 2) E R08
Thus, R08 = {(I, 3), (3, 3), (3, 4), (4, 1), (4, 2)}
(b) First use 8 and then R.
183 and 3R1 => (1, 1) E 80R
183 and 3R4 => (1, 4) E 80R
281 and lRl => (2, 1) E 80R
381 and lRl => (3, 1) E 80R
484 and 4R2 => (4, 2) E 80R
484 and 4R3 => (4, 3) E 80R
Thus, 80R = {(I, 1), (1, 4), (2, 1), (3, 1), (4, 2), (4, 3)}
(c) Here R = {(I, 1), (3, 1), (3, 4), (4, 2), (4, 3)}
R = {(I, 1) , (3, 1), (3, 4), (4, 2), (4, 3)}
(1, 1) E R and (1, 1) E R => (1, 1) E RoR
(3, 1) E R and ( 1, 1) E R => (3, 1) E RoR
(3, 4) E R and (4, 2) E R => (3, 2) E RoR
(3, 4) E R and (4, 3) E R => (3, 3) E RoR
(4, 3) E R and (3, 4) E R => (4, 4) E RoR
(4, 3) E R and (3, 1) E R => (4, 1) E RoR
.. RoR = R' = {(I, 1) , (3, 1) , (3, 2) , (3, 3), (4, 4) , (4, I)}
(d) Here R3 = RoRoR = R'oR
But R' = {(I, 1) , (3, 1) , (3, 2) , (3, 3), (4, 4), (4, I)} I Using Part (c)
R = {(I, 1) , (3, 1) , (3, 4) , (4, 2) , (4, 3)}
( 1, 1) E R' and ( 1, 1) E R => ( 1, 1) E R'oR
(3, 1) E R' and ( 1, 1) E R => (3, 1) E R'oR
(3, 3) E R' and (3, 1) E R => (3, 1) E R'oR
(4, 4) E R' and (4, 2) E R => (4, 2) E R'oR
(4, 1) E R' and ( 1, 1) E R => (4, 1) E R'oR
.. RoRoR = R'oR = {(I, 1) , (3, 1) , (4, 2) , (4, I)} .
Example 23. Find the number of relations from A = {a, b, c} to B = {I, 2}.
Sol. A contains 3 elements and B contains 2 elements. There are 3 x 2 = 6 ordered pairs
in A x B.
Hence, total number of subsets of A x B is 2 6 = 64. Therefore,
Total number of relations from A to B = 64 .
RELATIONS 69
Example 24. Let R be a relation on A = {I, 2, 3, 4} defined by "x is less than y". Write R
as a set of ordered pairs. Find the inverse R-1 of the relation R. Can R-1 be described in words?
Sol. R consists of the ordered pairs (x, y) where x < y. Thus
R = {(I, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}
Reverse the ordered pairs of R to obtain R-l
Thus, R-l = {(2, 1), (3, 1), (4, 1), (3, 2), (4, 2), (4, 3)}
R-l is the relation (Ix is greater than y"
Yes, R-l can be described in words, i.e. , R-l is the relation " x is greater than y".
Example 25. Let R be a relation from A = (1, 2, 3, 4) to B = (x, y, z) defined by
R = {(1, y), (1, z), (3, y), (4, x), (4, z)}
(a) Find the domain and range of R
(b) Find the inverse relation R-1 ofR.
Sol. (a) The domain of R consists of the first elements of the ordered pairs of R and the
range consists of the second elements. Thus,
dom (R) = {I, 3, 4} and
Range (R) = {x, y, z}
(b) R-l is obtained by reversing the ordered pairs in R Thus,
R-l = {(y , 1), (z, 1), (y , 3), (x, 4), (z, 4)}.
Example 26. Let A = {I, 2, 3, 4, 6} and R be the relation "x divides y". Write R as set of
ordered pairs. Find the inverse R-1 of the relation R. Can R-1 be described in words.
Sol. We know that xly (read as x divides y) if there exists an integer z such that y = xz.
We find those numbers in A which are divisible by 1, 2, 3, 4 and 6.
Since 111, 112, 113, 114, 116, 2/2, 2/4, 2/6, 3/3, 3/6, 414, 416
Thus, R = {(I, 1), (1, 2), (1, 3), (1, 4), (1, 6), (2, 2), (2, 4), (2, 6), (3, 3), (3, 6), (4, 4), (4, 6)]
Reverse the ordered pairs of R to obtain R-1 Thus,
R-1 = {(I, 1), (2, 1), (3, 1), (4, 1), (6, 1), (2, 2), (4, 2), (6, 2), (3, 3), (6, 3), (4, 4), (6, 4)]
Yes, R-1 can be described by the statement "x is a multiple of y".
Example 27. Let R and 5 be the relations on A = {I, 2, 3} defined by
R = {(1, 1), (1, 2), (2, 3), (3, 1), (3, 3)}
5 = {(1, 2), (1, 3), (2, 1), (3, 3)}
(a) Find R n 5, R u 5
(b) Find R'.
Sol. (a) R n S = {(I, 2), (3, 3)}
R u S = {(I, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 3)}
(b) Using the fact that A x A is the universal relation on A. Hence,
A
1 2 3 4 6
, [' i]
1
2 0 0 1
3 0 o 1 0
4 0 o 0 1
6 0 o 0 0
(a) ( b)
72 DISCRETE STRUCTURES
(b) The required diagraph is shown in Fig. 2. 12(c)
Diagraph of R
(c) (d)
Fig. 2.12
(c) Given R = {(I, 1), (2, 2), (2, 3), (3, 2), (4, 2), (4, 4)}. The diagraph of R is shown in
Fig. 2. 12(d)
(i) R is not relflexive since (3, 2) E R
(ii) R is not antisymmetric since (4, 2) E R, (2, 2) E R, but 4 '" 2
(iii) R is transitive
Example 34. Find the transitive closure RT ofthe relationR an A = {I, 2, 3, 4} defined by
the directed graph as shown in Fig. 2. 13.
Sol. From the directed graph,
lR2, 2R2, 2R4, 4Rl, 4R3, 3R2, 3R4
:. R = {(I, 2), (2, 2), (2, 4), (4, 1), (4, 3), (3, 2), (3, 4)}
Now (2, 4) E R, (4, 1) E R => (2, 1) 'l R
. . We add (2, 1) in R.
3
Also (1, 2) E R, (2, 1) E R => (1, 1) 'l R
. . We add (1, 1) in R Fig. 2.13
(1, 2) E R, (2, 4) E R => (1, 4) 'l R . . We add (1, 4) in R
(1, 4) E R, (4, 3) E R => (1, 3) 'l R . . We add (1, 3) in R
(2, 1) E R, (1, 3) E R => (2, 3) 'l R . . We add (2, 3) E R
(3, 2) E R, (2, 1) E R => (3, 1) 'l R . . We add (3, 1) in R
(3, 1) E R, (1, 3) E R => (3, 3) 'l R . . We add (3, 3) in R
(4, 1) E R, (1, 2) E R => (4, 2) 'l R . . We add (4, 2) in R
(4, 1) E R, (1, 4) E R => (4, 4) 'l R . . We add (4, 4) in R
. . The transitive closure of R is given by
RT = {(I, 2), (2, 2), (2, 4), (4, 1), (4, 3), (3, 2), (3, 4), (2, 1), (1, 1), (1, 4), (1, 3),
(2, 3), (3, 1), (3, 3), (4, 2), (4, 4)}
The number of order pairs in Rr is 16
.. RT = A x A.
Example 35. (a) Let R be a relation on a set A. Give a procedure to find the symmetric
and reflexive closure ofR.
(b) Using the procedure ofpart (a), find the reflexive closure ofR and symmetric closure
of R where A = {I, 2, 3} and R = {(1, 1), (1, 2), (2, 3)}.
RELATIONS 73
Sol. (a) The symmetric closure ofR is R u R-l The reflexive closure ofR is R u /j.A where
/j.A is the diagonal relation
(b) The symmetric closure of R is
R U R-l = {(I, 1), (1, 2), (2, 1), (2, 3), (3, 2)}
Also /j.A = The diagonal relation on A = (1, 1), (2, 2), (3, 3)
:. The reflexive closure of R is
R U /j.
A = {(I, 1), (1, 2), (2, 3), (2, 2), (3, 3)}
Complement of a Relation
Let R is a relation from a set A to a set B i.e., R is a subset of A x B. The complement of
R, denoted by R is defined by R = {(a, b) : (a, b) 'l R}
Example 36. Consider the sets A = {I, 2, 3, 4} and B {a, b, c}.
Let R = {(1, a), (1, b), (2, b), (2, c), (3, b), (4, b)}. Find R
Sol. A x B = {(I, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3, b), (3, c), (4, a), (4, b), (4, c)}
:. R= A x B - R. The set of all ordered pairs in A x B but not in R
= {(I, c), (2, a), (3, a), (3, c), (4, b), (4, c)}.
Example 37. Let A = {a, b, c, d, e} andR be a relation onA whose corresponding diagraph
is given below Fig. 2. 14. Find R .
1
Sol. From the diagraph,
R = {(a, b), (a, e), (a, d), (b, c), (b, d), (b, e), (c, c), (d, d), (e, e)}
(a, a), (a, b), (a, c), (a, d), (a, e), (b, a), (b, b),
I
(b, c), (b, d), (b, e), (c, a), (c, b),(c, c), (c, d),
Also A x A =
(c, e),(d, a), (d, b), (d, c), (d, d), (d, e),(e, a),
(e, b), (e, c), (e, d), (e, e)
. . R = A x A - R. The set of all ordered pairs in A
= {(a, a), (a, c), (b, a), (b, b), (c, a), (c, b), (c, d),
x A but not in R
(c, e), (d, a), (d, b), (d, c), (d, e), Fig. 2.14
(e, a), (e, b), (e, c), (e, d)}
19. (i) Let A be a set of non-zero integers and let be the relation on A x A defined by
� d) (a, b) � (e,
if = Prove that is an equivalence relation.
ad be. �
(ii) Show that the relation of set inclusion is not an equivalence relation.
c
(iii) Let R be the relation on the set of positive integers defined by R = {(a, b): a + b
is even}. Is R
an equivalence relation ?
(iv) Consider the relation of perpendicularity on the set L of lines in the Euclide an plane. Is
� �
an equivalence relation ?
20. Prove the following :
(a) If R and S are reflexive relations on a set A, then R S is also reflexive II
(e) If R is reflexive relation on A. Then R-l and R S are reflexive for any relation S on A
u
(d) Show, by a counter example, that R and S may be transitive relations on A, but R S need u
not be transitive.
(e) If R is any relation on A, show that R R-1 is symmetric. u
R � {(x, y) : x
+ 3y � 12}
Write R as a set of ordered pairs.
(a)
Find : domain of R, range of R, and R-1
(b) (i) (ii) (iii)
Find the composition relation RoR.
(c)
25. Consider a relation whose directed graph is shown in the following (Fig. Determine its 2 .15).
inverse R-l and its complement R , Also draw the directed graphs of R-l and R ,
Fig, 2,15
Let � (1, 2), (2, 3), (3, 3) � [1, 2, 3] ,
26,
of R,Rusing composition of relation
and A R. Find the reflexive, symmetric and transitive closure
Answers
5.Reflexive and transitive,
6, (a) (2, 2) (3, 2), (4, 2), (5, 2), (3, 3), (4, 3), (5, 3), (4, 4), (5, 4), (5, 5),
(b) (iii), (a) 7, Yes, No
8, (b) (c)
and are partitions,
9, {{I}, {2}, {3}}, {{I}, {2, 3}}, {{2}, {I, 3}}, {{3}, {I, 2}}, {{I, 2, 3}} ,
10, (i) {(4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (4, 5), (5, 6), (4, 6)}
(ii) {(4, 4), (5, 5), (6, 6), (7, 7)} (ii,) {(4, 4), (5, 5), (6, 6)}
(iv) {(4, 4), (4, 3), (3, 4), (4, 2)} (v) {(4, 4), (4, 5), (5, 4), (4, 6)}
11. R is reflexive, symmetric, transitive. R is not irreflexiv8, asymmetric, antisymmetric.
12, R
(i) � {(I, 1), (2, 2), (3, 3)} R (h) � {(I, 2), (2, 1), (2, 3)}
R
(iii) � {(I, 1), (2, 2), (3, 3), (1, 2), (2, 3), (2, 1), (3, 2)}
(iv)R � {(I, 1), (2, 2), (2, 3), (3, 2)} R (v) � {(I, 2), (2, 1), (1, 1), (3, 2)}
(vi)R � {(I, 1), (2, 3), (3, 3)} R (vi,) � {(I, 1), (2, 2), (3, 3), (2, 3)}
13, (a)� Reflexive closure of R
� � {(2, 1), (2, 3), (3, 2), (3, 3), (2, 2), (4, 2), (1, 1), (4, 4)}
(b) �
Rs Symmetric closure of R � {(2, 1), (2, 3), (3, 2), (3, 3), (2, 2), (4, 2) (1, 2), (2, 4)}
14, (a)Not true, take R S � {(I, 2)}, � {(2, 3)}
True True True True,
(b) (c) (d) (e)
15, �
Rr The transitive closure of R � {(a, a) , (b, c) , (a, b), (b, b), (c, c), (c, b), (b, a)}
16, RoS
(i) � {(I, 3), (1, 5), (3, 5)}
SoR
(ii) � {( 1 , 3), (1, 5), (3, 5)}
(iii) =
RoS SoK But in general, RoS SoR t:-
RELATIONS 77
17. (a)None (b) S is symmetric
R and T
(c) (d) R and T.
18. R
(a) � {(I, 1), (2, 2)} (b) R � {(I, 2), (2, 1), (2, 3)}
R
(c) � {(I, 2)}
21. RoS � fCc, x), (d, y), (d, z)} .
24. (a) (9, 1), (6, 2), (3, 3)
(b) (1) {9, 6, 3} (ii) (1, 2, 3) (iii) {(I, 9), (2, 6), (3, 3)}
(c) {3, 3} .
25. (1) R-1 � reb, a), (c, a), (b, b), (c, b), (d, c), (d, d), (a, d), (b, d)]
a}---+-b---{
}---+----{ c
Hints
19. (�)
We must show that is reflexive, symmetric, and transitive.
�
We have
(a) Reflexivity : since
(a, b) (a, b)
� ab = ba.
Hence is reflective. �
(c) Transitivity :
Suppose (a, b) - (c,
d) andgives (ad)
d) Then (c,
and and . Multiplying
- (e, f). ad � be cf � de
corresponding terms of the equations (de), Canceling (ef) = (be)
from C -:f- 0 d -:f- 0
both sides of the equation yields and hence at = be, f). Thus is transitive. Accord
(a, b) (e, � �
(b)Let E R n S
(a, b) E R and E S
=c} (a, b) (a, b)
But R and S are symmetric, therefore, E R and E S E RnS
(b, a) (b, a) =c} (b, a)
Hence R S is symmetric.
II
(e)Let E R R If E R
(a, b) U (a, b) ER =c} (b, a)
Hence E R R-1 , :. R R-1 is symmetric,
(b, a) u u
78 DISCRETE STRUCTURES
ILLUSTRATIVE EXAMPLES
Example 1. Let A = (1, 2, 3, 4, 5, 6) and R be an equivalence relation on A defined by
R=n � � � � � � � � � � � � � � � � � � � � � � � � �
Find the equivalence classes of R (i.e., the partition of A induced by R). Also find AIR.
Sol. For each a E A, let [a] denotes the set of those elements of A to which a is related
under R. Thus,
[a] = {x E A: (a, x) E R}
Here, the set [a] is called equivalence class of a in A:
Start with an element ' l' of A:
Le., [1] = {x E A . (1, x) E R}
Clearly, (1, 1) and (1, 5) both belong to R. i.e., the elements 1 and 5 are related by ' 1'
.. [1] = { I, 5} = A" say.
Next, pick an element from A which does not belong to [1], these are 2, 3, 4 or 6.
Consider an element, '2' , say, which dose not belong to [1]. We find [2].
The elements related to 2 are 2, 3 and 6 (since (2, 2), (2, 3) and (2, 6) all belong to R)
Therefore, [2] = {2, 3, 6} = �, say
We next, pick an element which does not belong to [1] or [2]. Clearly, 4 is the only
element. Now, the elements related to 4 is 4. (since (4, 4) E R). Hence,
[4] = {4} = �, say
The sets A" �, A3 form a partition of A since A" A, and � are mutually disjoint sets
and A, U � U � = A:
Finally,
AIR = The set of all equivalence classes of elements of A under an equivalence relation R
= [{I}, {2}, {4}]
Example 2. Consider the set W = {sheet, last, sky, wash, wind, sit}. Find WIR where R
is the equivalence relation on W defined by "has the same number of letters as"
Sol. For each W E W, let [w] denotes the set of all those elements of W to which w is
related under R. Thus,
[w] = {x E W. (w, x) E R}
Here, the set [w] is called equivalence class of w in W.
Consider the set
W = {w1 ! W2 ! W3! W4! W5! w6 } where
w1 = " sheet" ) w2 = (11ast" ) W3 = ilS ky" )
w4 = ((wash", W5 = ((wind" and W6 = ((sit"
Start with an element, say, w, ofW. Here [w,] denotes the set of those elements ofW to
which ' w,' is related under R.
80 DISCRETE STRUCTURES
Now, the element ' W ,' has 5 letters and the only element, which has same number of
letters as of (w 1' is w1 ' Hence
{w,} = {sheet} = W" say,
Next, pick an element from W which does not belong to [w,], these are w, w3 W, ' W5 or
' '
Consider an element 'w,', say, which does not belong to [w,]. We find [w,].
The elements related to (w2' are W2 ! w4 and W5 (since these elements have same number
of letters as of 'w,')
Therefore,
[W,] = {last, wash, wind} = W, say,
We next, pick an element which does not belong to [w,] or [w,]. Clearly, W3 and W6 are
the only elements.
The elements related to ' W3' are W3 are W6 (since these elements have same number of
letters as of ' W3 ')
Thus, [w3 ] = {sky, sit} = W3 say
Clearly, the sets W" W, and W, form a partition ofW since W" W, and W3 are mutually
disjoint sets and W, U W, U W3 = W. Hence
WIR = The set of all equivalence classes of elements ofW under an equivalence relation R
= [{sheet}, {last, wash, wind}, {sky, sit}]
Answers
1. =
[(2, 5)] {(I, 6),
4), (2, 5), (3, (6,
(4, 7), (5, 8), 9)}
2. =
SIR [{I, 6, 1 1 , 16}, {2, 7, 12, 17}, {3, 8, 13, 18}, {4, 9 , 14, 19}, {5, 10, 15, 20}]
3. W/R = [{sheet, sky, sit}, {last}, {wash, wind}]
Hints
1. (a) Please see example page in this chapter.
17 65
�
(b) (2, 5) (c, d) iff +
2 d 5 = or+ c d - c = 5 - 2 = 3 \j c,
dE A
6),
(1, 4), (2, 5), (3, and (6, are the only elements to which is related.
(4, 7), (5, 8) 9) (2, 5)
=
[(2, 5)] {(I, 6),
4), (2, 5), (3, (4, 1), (5, 8),
(6, 9)}
2. x =y (mod (read as is congruent to y(mod means that y is divisible by
5) "
x 5)") x- 5.
By definition,
relation SIR is the set of all equivalence classes of elements of S under an equivalence
R. Therefore, we are required to find the equivalence classes of the elements of S.
Start with an element of S. The elements of S to which is related under R are I, 6, 16
'1' '1' 11,
(since = l(mod = 6(mod = (mod and = 6(mod Therefore,
1 5), 1 5), 1 11 5) 1 5».
[1] {I, 6, = etc. 1 1 , 16}
3. Please see example (page in this chapter.
2 79)
RELATIONS 81
This method is to be applied for large sets and relations. This algorithm is a more
efficient algorithm to compute the transitive closure.
Consider a relation R defined on a set
A = (a" a" ...... an>. If {x" x,, ...... xn} is a path in R, then any vertex other than x, and xn
is called interior vertex of the path. Also for 1 < k < n, we define a Boolean matrix Wk as
follows.
if any, come from the set {a" a2 , ...... an}' In other words, W n = MR'
The (i,j)th element ofWk is 1 iff there is a path from ai to a in R whose interior vertices,
If we define Wo = Mw then we can find a sequence Wo W l ' W" ...... Wn whose first term
is Wo = MR and the last term is Wn = MR'
'
Each matrix Wk can be computed from Wk_1 using the following algorithm (Warshall's
algorithm) .
Step I. First transfer ali I's in Wk_1 to Wk'
Step II. List the locations P " P" ... in column k of Wk _ l ' where the entry is 1 and
locations al ) a2 ! in row k of Wk_1 J where the entry is L
••••••
Step III. Put l's at all the positions (Pi' q) ofWk (if they are not already there).
Example 1. Using Warshall's algorithm, find the transitive closure ofR defined on
A = {I, 2, 3, 4} and
R = (1, 1), (1, 4), (2, 1), (2, 2), (3, 3), (4, 4).
1
1
Wo = MR = 0
[ 0
1
0
0
1
0
]
Sol. If MR denotes the matrix representation ofR, then (Take Wo = MR)
[ ]
'
{(P " q,), (P " q,), (P" q,), (P" q2 ) = (1, 1), (1, 4), (2, 1), (2, 4)}. Thus
1 0 0 1
1 1 0 1
W, = 0 0 1 0
0 0 0 1
For k = 2. In column 2 of W" l's is at positions 2. Hence P , = 2.
In row 2 of W" l's are at positions 1, 2 and 4.
Hence q, = 1, q, = 2, q3 = 4.
Therefore, to obtain W2 , we put Is at the positions:
{(P " q,), (P " q,), (P " q, ) = (2, 1), (2, 2), (2, 4)}. Thus (using W,)
[ ]
82 DISCRETE STRUCTURES
1 0 0 1
1 1 0 1
W, = 0 0 1 0
0 0 0 1
[ ]
In row 3 ofW" ' 1' is at position 3. Hence q, = 3
Thus, we put ' 1' at the position: {(P " q,) = (3, 3)}. Thus (using W,)
1 0 0 1
1 1 0 1
W3 = 0 0 1 0
0 0 0 1
For k = 4. In column 4 ofW3 , l's are at positions 1, 2 and 4. Hence P , = 1, P, = 2, P3 = 4.
In row 4 of W3 ' 1' is at position 4. Hence q, = 4
'
[ ]
Therefore, we put l's at the positions:
{(P" q,), (p" q,), (P3 q,) = (1, 4), (2, 4), (4, 4)}. Thus (using W3 ).
'
1 0 0 1
1 1 0 1
W4 = 0 0 1 0 = MR'
o 0 0 1
Hence, from the matrix MR', the transitive closure of R is given by
W = {(I, 1), (1, 4), (2, 1), (2, 2), (2, 4), (3, 3), (4, 4)}
Example 2. Let A = {I, 2, 3, 4} and letR = (O, 2), (2, 3), (3, 4), (2, I)}. Find the transitive
[� � � �
closure ofR using Warshall's algorithm.
Sol. Let MR denotes the matrix representation of R. Take Wo = Mw we have
0 1 0 0'
Wo = MR = and n = 4 (As MR is a 4 x 4 matrix)
o 0 0 0
We compute W4 by using warshalYs algorithm.
For k = 1. In column 1 of Wo ' ' 1' is at position 2. Hence P, = 2.
[ ]
In row 1 ofWo ' 1' is at position 2. Hence q, = 2. Therefore, to obtain W l ' we put ' l' at the
'
position: {(P" q,) = (2, 2)}. Thus
0 1 0 0
1 1 1 0
W, = 0 0 0 1
o 0 0 0
For k = 2. In column 2 of W" l's are at positions 1, 2. Hence P, = 1, P, = 2.
RELATIONS 83
In row 2 of W" l's are at positions 1, 2 and 3. Hence q , = 1, q, = 2, q3 = 3
Therefore, to obtain W" we put ' 1' at the positions :
{(P " q,), (P " q,), (P " q3) (p" q,), (P2' q,), (p" q3) = (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3)}.
]
'
Thus (using W,)
1 1 0
1 1 0
o 0 1
0 0 0
For k = 3. In column 3 of W" l's are at positions 1, 2. Hence P , = 1, P, = 2
In row 3 ofW" ' 1' is at the position 4. Hence q , = 4
[ ]
Therefore, to obtain W3 we put l's at the positions: {(P" q,), (P" q,) = (1, 4), (2, 4)}.
Thus (using W,)
1 1 1 1
1 1 1 1
W3 = 0 0 0 1
o 0 0 0
For k = 4. In column 4 of W3 , l's are at positions 1, 2, 3. Hence P , = 1, P2 = 2, P3 = 3
[
In row 4 ofW3 , ' 1' is at no position, and no new l's are added and hence MR' = W4 = W3 .
Thus
1 1 1 l'
1 1 1 1 �
W4 = W3 = 0 0 0 1 = MR
o 0 0 0
Thus, the transitive closure of R is given as
[ ] [ ]
R� = {(I, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 4)}
Example 3. Let A = (1, 2, 3, 4) and let R and S be the relation on A described by
0 0 0 1 1 1 0 0
0 0 0 0 0 1 0 0
MR
= 0 1 0 0 ' Ms = 0 0 1 0
0 0 1 0 0 1 0 1
Use Warshall's algorithm to compute the transitive closure of R u S.
(P.T.U. B. Tech. December 2008)
Sol. Let MR u
s denotes the matrix representation or R u S, then
1 0 1 1
WO = MR u S =
1 0 0o
1 1 0 0
1 1 1 o
For k = 1. In column 1 of Wo ' '1' is at position 1. Hence P, = 1.
In row 1 ofWo l's are at positions 1, 2, and 4.
'
Hence q, = 1, q, = 2, q3 = 4.
[
Therefore, to obtain W" we put l's at the positions:
{(P " q,), (P " q,), (P " q,) = (1, 1), (1, 2), (1, 4)}. Thus (using Wo)
1 1 0 l'
W, =
o 1 0 0 = Wo
0 1 1 0
o 1 1 1
For k = 2. In column 2 of W" l's are at positions 1, 2, 3 and 4. Hence P , = 1, P2 = 2, P3
= 3, P 4 = 4
In row 2 ofW" '1' is at position 2. Hence q, = 2
Therefore, to obtain W, , we put l's at the positions:
[
{ (P " q,), (p" q,), (P3 ' q,), (P4 ' q,) = (1, 2), (2, 2), (3, 2), (4, 2)}
Thus (using W,)
1 1 0 l'
W, =
o 1 0 0 = W,
0 1 1 0
o 1 1 1
For k = 3. In column 3 of W" l's are at positions 3, 4. Hence P , = 3, P, = 4
In row 3 of W" l's are at positions 2 and 3.
Hence q, = 2, q, = 3
Therefore, to obtain W3 we put l's at the positions :
'
[
{ (P " q,), (P" q2) ' (P 2' q,), (P 2' q2) = (3, 2), (3, 3), (4, 2), (4, 3)}.
Thus (using W2)
1 1 0 l'
o 1 0 0
W3 = 0 1 1 0 = W2
o 1 1 1
For k = 4. In column 4 of W3 , l's are at positions 1 and 4. Hence P, = 1, P, = 4 in row 4
of W3 , l's are at to obtain W4 , positions 2, 3 and 4. Hence q, = 2, q, = 3, q3 = 4.
Therefore, to obtain W4 we put l's at the positions:
[ ]
{(P " q,), (P" q,), (P" q,), (P " q,), (P 2 ' q,), (P" q3) = (1, 2), (1, 3), (1, 4), (4, 2), (4, 3), (4, 4)}
Thus (using W,)
1 1 1 1
o 1 o 0 =
W4 = 0 1 1 0 M (R U S)�
o 1 1 1
RELATIONS 85
Thus, the transitive closure of R u S is given as
(R u S) � = { ( I , 1), (1, 2), (1, 3), (1, 4), (2, 2), (3, 2), (3, 3), (4, 2), (4, 3), (4, 4)}
Example 4. Let A = {I, 2, 3, 4, 5} and
R=n � � � � � � � � � � � � � � � � �
S = (O, 1), (2, 2), (3, 3), (4, 4), (4, 5), (5, 4), (5, 5)}
Find the transitive closure of R u S by using Warshall's algorithm.
[ � �l ' [� � � l
Sol. Let MR and Ms denote the matrix representation of R and S respectively. Then
1 1 0
1 1 0
MR = 0 0 1 Ms = o 0
0 0 0 �1 �1
o 0 1 1 0 0 0 0 1 1
0 0 0 o 1
]j � � � � � �]
1 1 0 0
1 1 0 0
= 0 0 1 1
o 0 1 1 o 0 0 1
o 0 0 0 o 0 0 1
!]
1 1 0 0
1 1 0 0 Iv 1 = 1
= 0 0 1 1 O v l = 1 etc.
o 0 1 1 1v0 = 1
o 0 0 1 OvO=O
]
We now compute W5 by WarshalYs algorithm. Here n = 5. (As MR u S is a 5 x 5) matrix
and
1 1 0 0 0
1 1 0 0 0
WO = MR u S = 0 0 1 1 0
o 0 1 1 1
o 0 0 1 1
For k = 1. In column 1 of Wo' l's are at positions1, 2. Hence P , = 1, P , = 2.
In row 1 ofWo l's are at positions 1, 2. Hence q, = 1, q, = 2
'
Therefore, to obtain W" we put l's at the positions:
{ (P " q,), (P" q,), (p" q,), (p" q,) = (1, 1), (1, 2), (2, 1), (2, 2)}
[� � � � �l
Thus (using W0>
W, = = Wo
o 0 1 1 1
o 0 0 1 1
86 DISCRETE STRUCTURES
For k = 2. In column 2 of W" l's are at positions 1, 2. Hence P , = 1, P , = 2
In row 2 ofW" l's are at positions 1, 2. Hence q , = 1, q, = 2
Therefore, to obtain W" we put l's at the positions:
{ (P " q ,), (P" q,), (P" q, ), (P" q,) = (1, 1), (1, 2), (2, 1), (2, 2)}.
[� � � � �l
Thus (using W,)
W = = W1
' 0 0 1 1 1
o 0 0 1 1
For k = 3. In column 3 of W" l's are at the positions 3, 4. Hence P , = 3, P, = 4.
In row 3 ofW" l's are at the positions 3 and 4. Hence q , = 3, q, = 4
Therefore, to obtain W3 , we put l's at the positions:
{ (P " q,), (p" q,), (p" q,), (p" q,) = (3, 3), (3, 4), (4, 3), (4, 4)}
� � � � �]
Thus (using W,)
W3 = = W,
o 0 1 1 1
o 0 0 1 1
For k = 4. In column 4 of W3 , l's are at positions 3, 4, 5. Hence P , = 3, P, = 4, P3 = 5.
In row 4 ofW3 , l's are at the positions 3, 4 and 5. Hence q, = 3, q, = 4, q3 = 5.
Therefore, to obtain W" we put l's at the positions:
{(P" q,) , (P" q,), (P" q3)' (p" q ,), (p" q,), (p" q,), (P3' q ,), (P3' q,), (P3' q3)
=(3, 3), (3, 4), (3, 5), (4, 3), (4, 4), (4, 5), (5, 3), (5, 4), (5, 5)}. Thus (using W,)
]
1 1 0 0 0
1 1 0 0 0
W, = 0 0 1 1 1
o 0 1 1 1
o 0 1 1 1
:
For k = 5. In column 5 ofW" l's are at the positions 3, 4, 5. Hence P , = 3, P, = 4, P3 = 5.
In row 5 of W" l's are at the positions 3, 4, 5. Hence q , = 3, q, = 4, q3 = 5.
[
This is similar to the case for k = 4. Hence
1 1 0 0 0
1 1 0 0 0
W5 = W, = 0 0 1 1 1 = M (RuS) �
o 0 1 1 1
o 0 1 1 1
Thus, the transitive closure of R u S is given as
(R u S) � = {(I, 1), (1, 2), (2, 1), (2, 2), (3, 3), (3, 4), (3, 5), (4, 3), (4, 4), (4, 5),
(5, 3), (5, 4), (5, 5)}
RELATIONS 87
Compute Wl ' W3 as in Warshall's algorithm. Also find Roo, the transitive closure of R.
[� I
W2 !
[� I
3. Let A = (I, 2, 3, 4).
For thes algorithm.
relation R whose matrix is given, find the matrix of the transitive
closure by using Warshall'
0 0
�j
1 0
,
(I) MR
[ ]
1 0 0 1
1
,�
1 0
0 1
0 0
,
(n) MR
[
1 0 0
,� 0 0
0 1 �j
II
0 0 0
(iii) 0 1 1 0 (iv) 1 0 0
o 1 1 0 o 1 0
1 0 0 1 o 0 1
[� � � � �l' � � � � �:
4. Let A = {a, b, c, d, e] and let R and be the relations on described by
S A
MR � Ms �
0 0 1 1 0 0 1 0 0 0
1 0 1 0 0 0 1 0 1 0
Use Warshall's algorithm to compute transitive closure of R u S.
[
Answers
J
1 1 1
1. MW � 1 1 1 ,
1 1 1
where R� � {(I, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}
2. Wl �W2 �W3 � [� � � � �l
1 0 0 1 0
o 1 0 0 1
3.
R� �
()1 � �
jo 1
1 0
[I
(il) i
j
{(I I), (1, 4), (2, 2), (3, 4), (3, 5), (4, 1), (4, 4), (5, 2), (5, 5)}
o 1
� 0 o 1
1 0
1 0
0 0 o 1 1 0 o 1
[ ] [ ]
88 DISCRETE STRUCTURES
1 0 0 1 1 1 1 1
(iii) 0 1 1 0 (iv) 1 1 1 1
o 1 1 0 1 1 1 1
1 0 0 1 1 1 1 1
4. (R u S)� � {(a, a), (a, b), (a, ) (a, d), (a, e) , (b, a), (b, b), (b, c) , (b, d), (b, e) , (c, a), (c, b), (c, c) (c,
c, d),
(c, e) , (d, a), (d, b), (d, c), (d, d), (d, e), (e, a), (e, b), (e, c), (e, d), (e, e)}
(a) Neither reflexive nor anti· symmetric (b) Symmetric and reflexive
(c) Transitive and reflexive (d) Transitive and symmetric.
2. A relation R is defined on the set of integers as xRy iff (x + y) is even. Which of the
following statement is TRUE ?
(a) R is not an equivalence relation
(b) R is an equivalence relation having one equivalence class
(c) R is an equivalence relation having two equivalence classes
(d) R is an equivalence relation having three equivalence classes.
3. The time complexity of computing the transitive closure of a binary relation on a set of
n elements is known to be
(a) O(n) (b) O(n log n)
(e) o (n3/2) (d) O(n3).
4. The number of equivalence relations of the set {I, 2, 3, 4} is
(a) 4 (b) 15
(c) 16 (d) 24.
5. Let R be non·empty relation on a collection of sets defined by ARB if and only if A n B <p. �
3 . 1 . FUNCTION
Let A and B be two non·empty sets. A function or a mapping ffrom a set A into a set B
is a rule which associates to each element 'a of A, a unique element 'b' of B such that f(a) = b.
The element 'b' is call1ed image of ' a under fand 'a is called pre· image of b.
This fact is denoted by f : A --; B and read as "f is a function from A to B".
Remark If f: A -----t B is a function from A to B, then
(i) each element of A has one and only one image in B.
(ii) Different elements of A can have same images in B.
Theorem I. Let A and B be two finite sets having m and n elements respectively. Then
total number offunctions from A to B is nm.
Proof. Given, number of elements in A = m
Number of elements in B=n
Now, fis a function from A to B. It means each element of A can be associated to any one
of n elements of the set B. Therefore, total number of functions from set A to set B is equal to
the number of ways of doing m jobs where each job can be done in n ways i.e.,
1st element of A can be associated in n ways.
2nd element of A can be associated in n ways
I ILLUSTRATIVE EXAMPLES
Example 1. If a set A has n elements, how many functions are there from A to A.
Sol. If a set A has n elements, then there are nn functions from A to A.
Example 2. If A has m elements and B has n elements, how many functions are there
from A to B and from B to A.
90
FUNCTIONS 91
Sol. A has m elements and B has n elements. So, the total number of functions from A
to B are nm and the total number of functions from B to A are mn .
Example 3. If A = {2, 3, 4} and B = {5, 6}. Determine all functions from A to B.
Sol. The total number of functions from A --; B are 2 3 = 8, which are
(i) {(2, 5), (3, 5), (4, 5)} (ii) {(2, 6), (3, 6), (4, 6)}
(iii) {(2, 5), (3, 5), (4, 6)} (iv) {(2, 5), (3, 6), (4, 6)}
(v) {(2, 6), (3, 5), (4, 5)} (vi) {(2, 6), (3, 6), (4, 5)}
(vii) {(2, 6), (3, 5), (4, 6)} (viii) {(2, 5), (3, 6), (4, 5)}
Example 4. Let F be the set ofone-one functions from A to B where A = {I, 2, 3, ....... , n},
B = {I, 2, 3, ...... , m} and m :> n :> 1.
(a) How many functions f are members ofF ?
(b) How many functions f in F satisfy the property f(i) = 1 for some 1 <:i <:n ?
(c) How many functions f in F satisfy the property f(i) < f(j) for all 1 <: j <:n ?
Sol. (a) Given neAl = n, nCB) = m
Total number of functions which are 1-1 = neAl x nCB) = nm
Hence (nm' functions are members of F.
(b) There are 'n'functions (the cardinal number of A is n) satisfying the property f(i) = l.
(c) The number of functions satisfying
Fig. 3 . 1
Sol. (i) The image of 1 = f(l) = 3, f(2) = 3, f(3) = 1 and f(4) = 1.
(ii) The image of f(A) consists of all the image values.
Therefore, f(A) = {I, 3}.
Example 8. Let X = {x, y, Z, k} and Y = {I, 2, 3, 4}. Determine which of the following are
functions ? Give reasons if it is not. Find range if it is a function.
(i) f = {(x, 1), (y, 2), (z, 3), (k, 4)} (ii) g = {(x, 1), (y, 1), (k, 4)}
(iii) h = {(x, 1), (x, 2), (x, 3), (x, 4)} (iv) I = {(x, 1), (y, 1), (z, 1), (k, 1)}
(v) d = {(x, 1), (y, 2), (y, 3), (z, 4), (k, 4)}.
Sol. (i) It is a function. Range (f) = {I, 2, 3, 4}.
(ii) g not a function because every element of X does not relate with some element of Y
i.e., z is not related with any element of Y.
(iii) h is not a function because element x has more than one image in set Y. i.e., x E X
has four images 1, 2, 3, 4.
(iv) It is a function. Range (l) = {I}.
(v) d is not a function because element y has more than one image in set Y. i.e., y E X
has two images 2 and 3.
Example 9. Let A = {I, 2, 3, 4} and B = {a, b, c} and C = {a, �, y}. Consider the following
two functions f ,' B --; C and g " A --; C given as
(i) f = {(a, a), (b, �), (c, y)} (ii) g = (O, a), (3, �), (2, y)}
Determine whether or not each function is everywhere defined.
Sol. (i) fis everywhere defined since dam (f) = {a, b, c} = E.
(ii) g is not everywhere defined since dam (f) = {I, 2, 3} '" A = {I, 2, 3, 4} .
Fig. 3 . 3
Injective Function.
94 DISCRETE STRUCTURES
(a) Find the image of each element ofA.
(b) Find the image off
(c) Find the graph f
(d) Find f(s) where S = {a, b, d}
(e) Find tl (7) where T = {y, z}
(/) Find tl (w)
Sol. (a) From the given diagram, the images of each element of A = {a, b, c, d} are given
as f(a) = y, f(b) = x, f(c) = Z, f(d} = y.
(b) 1m(/) = The set of all images ofthe elements in A
= {x, y, z}
(c) Graph f = {(a, f(a» ; a E A}
= {(a, y), (b, x), (c, z), (d, y)}
(d) Here S = {a, b, d}
.. f(S) = {f(a), f(b), f(b)} = {y, x, y} = {x, y}
(e) Here, T = {y, z}
From the given diagram
t' (T) = {a, d, c} = {a, c, d}
(/) t' (w) does not exist since the element w has no its pre-image.
Bijective Function.
FUNCTIONS 95
(a) Injective (One-to-One) Functions. Let f : X --; Y. The function f is called one·to·
one or injective if different elements in X have different images in Y i.e., if f(x,) = f(x,)
===> Xl = X2 V X l ) X2 E X.
Another way of defining injective function is that every element of domain X has a
unique image in the co·domain Y and there is no element ofY which is image of more than one
element of domain X.
For example : Consider, X = {x, y, z, k} and Y = {I, 2, 3 , 4} and fis function from X to Y
such that
f = {(x, 1), (y, 2), (z, 3), (k, 4)}
The function f is injective function as every element of domain X has a unique image in
the co· domain Y (Fig. 3.7).
Y -+-------+_ 2
Z -1-----+-. 3
K -f-----..,... 4
x Y
Fig. 3.7
Remark Number of one-one functions. If A and B are finite sets having m and n
that 1 :0:;; n :s; m) then number of onto functions from A to B is given by Ln (_ l)n-r nCr rm
r =
1
a
2 b
3 Y
4 c
5 d
z
X Y P Q
Fig. 3.8 Fig. 3 .9
(c) Bijective (One-to-One Onto) Functions. A function which is both injective (one·
to·one) and surjective (onto) is called a bijective (one·to·one·onto) function.
For example : Consider, P = {x, y, z}, Q = {a, b, c} and { : P --; Q such that
{ = {(x, a), (y, b), (z, e)}
The { is one·to·one and also it is onto. So it is a bijective function (Fig. 3.9).
Remark 1. To Check whether tis onto or not
Let {: A --; B be the given function.
Step I. Take y E B such that {(x) = y
Step II. Solve {(x) = y for x and obtain x in terms of y. Let x = g(y).
Step III. If for all values of y E B, the values x obtained from x = g(y) are in the set A,
then { is on to.
If there are some y E B for which x is not in A, then {is not into.
Remark 2. Number of Bijections. If Aand B are finite sets and!: A-----t B is a bijection, then A
and B have the same number of elements. If A has n elements, then the number of bijections from A to
=
B Total number of arrangements of n items taken n at a time n C n = n = !.
(d) Into Functions. Let {: X --; Y. The function {is called an into function if the range
of {is not equal to the co·domain Y. Therefore, there must be an element of co·domain Y which
is not the image of any element of domain X.
For example : Consider, X = {I, 2, 3} , Y = {k, I, m, n, p} and { : X --; Y such that
{ = {(I, k), (2, n), (3, p)}
In the function f, the range i.e., {k, n, p} fc co·domain of Y i.e., {k, I, m, n, p}
Therefore, it is an into function (Fig. 3. 10).
FUNCTIONS 97
x y x y
Fig. 3.10 Fig. 3.11
(e) One-One Into Functions. Let { : X --; Y. The function { is called one·one into func·
tion if it is one·one but not onto (See Fig. 3. 1 1).
For example : Consider, X = {k, I, m}, Y = {I, 2, 3, 4} and { : X --; Y such that
{ = {(k, 1), (I, 3), (m, 4)}
The function { is one·one into function (Fig. 3. 1 1).
if) Many One Functions. Let {: X --; Y. The function {is said to be many one function
if there exists two or more than two different elements in X having the same image in Y.
For example : Consider X = {I, 2, 3, 4, 5}, Y = {x, y, z} and { : X --; Y such that
{= {(I, x), (2, x), (3, x), (4, y), (5, z)}
The function { is a many one function. (Fig. 3. 12)
x y x y
Fig. 3.12 Fig. 3.13
(g) Many One Into Functions. Let { : X --; Y. The function { is called many·one into
function if and only if it is both many one and into function.
For example : Consider X = {a, b, c}, Y = {I, 2} and { : X --; Y such that
{ = {(a, 1), (b, 1), (c, I)}
As the function {is many· one and into, so it is a many· one into function (Fig. 3. 13).
(h) Many One Onto Functions. Let { : X --; Y. The function {is called many·one·onto
function if and only if it is both many one and onto.
For example : Consider, X = {I, 2, 3, 4}, Y = {k, l} and { : X --; Y such that
{ = {(I, k), (2, k), (3, I), (4, I )}
The function {is many· one (as two elements have the same image in Y) and it is onto (as
every element of Y is the image of some element X). So, it is many· one onto function
(Fig. 3.14).
98 DISCRETE STRUCTURES
x y
Fig. 3.14
3.9. EQUAL FU NCTIONS
Consider two functions f and g from a set X to a set Y. The functions f and g are called
equal functions if and only if f(a) = g(a), for every at D = D f n Dg or
Two functions f and g are equal iff
(i) Dom (f) = Dom (g)
(ii) Co·domain (f) = Co· domain (g)
(iii) f (x) = g (x) 'II X E D where D = Dom (f) n Dom (g)
The functions f and g are called unequal functions if there exist at least one element
a E X such that f(a) # g(a).
2 -ir-----_f_.
3 -t----_t_.
4 ---,f-----......
5 +----�
A A
Fig. 3.15
3.10. (b) CONSTANT FU NCTION
Let f be a function with domain A. Then f is called a constant function if for every
x E A, f(x) = c, c is some constant
Example 12. For given sets A and B, how many constant maps are there from A into B ?
Sol. For each x E A, the constant map is given by f(x) = b, b E B
Let n(B) = I B I , the number of elements in B, then there are I B I constant maps.
FUNCTIONS 99
k ---\-----++
m
A A y x
Fig. 3.16 Fig. 3.17
The inverse function of f is shown in Fig. 3. 17 i. e., f -1 = { (k, 1), (m, 2), (I, 3)}
3 . 1 2. HASHING FU NCTION
Any function defined by f : k --; A, where k denotes the set of keys and A is a set of
physical address, is known as Hashing function.
One of the most popular Hash functions is modulus function, written as mod f(n).
Uses: Hash functions are widely used in many applications such as symbol table of
compilers, direct addressing in memory operations, direct access in file handling etc. In these
cases, the program is supplied with a key, using this key, the program has to locate the required
record of information. To make direct record retrieval in an easy and smooth way, we need
some relationship between the record key and record storage position. For direct access, we
require some methods of assigning addresses to the keys. This method for the same is known
as Hashing function.
Example 14. Let H : K --; L be a hash function where L consists of two digit addresses
00, 01, 02, ... , 49. Find H (12304) using. (P.T.U. B.Tech May 2013)
(i) Division Method (ii) Folding Method
Sol. (i) Division Method: The prime number close to 49 is 47. Thus, the hash address
generated by H(12304) is obtained by dividing 12304 by 47. This gives you the remainder 37,
which is the required hash address.
(ii) Folding Method: Divide the key 12304 k" k, and ka into three parts and then add
to obtain the hash address.
ki k2 ka
H(12304) = 12 , 30 , 4
k, is reversed, so the required hash address is 12 + 03 + 4 = 19.
1 00 DISCRETE STRUCTURES
ILLUSTRATIVE EXAMPLES
Example 1. Let A = (1, 2, 3, 4) and B = (a, b, c, d). Determine which of the following are
functions. If so, /ind the range of each functions.
(a) f c A x B, where f = {(1, a), (2, b), (3, c), (4, d)}
(b) f c A x B, where f = {(1, a), (2, a), (3, b), (4, d)}
(c) f c A x B, where f = {(1, a), (2, b), (3, c)}
(d) f c A x B, where f = {(1, a), (2, b), (2, c), (3, a), (4, a)}
(e) f c A x A, where f = {(1, 1), (2, 1), (3, 1), (4, 1)}.
Sol. (a) f = {(1, a), (2, b), (3, c), (4, d)}
From Fig. 3. 18, we observe that each element of A is
associated to a unique element of B. :. fis a function. Also,
range f = (a, b, c, d)
A
Fig. 3.18 B
(d) f = {(1, a), (2, b), (2, c), (3, a), (4, a)}
From Fig. 3.21, we observe that the element
2 E A is not associated uniquely to elements of B.
:. f is not a function.
Fig. 3.21
FUNCTIONS 1 01
(e) f = {(I, 1), (2, 1), (3, 1), (4, I)}
From Fig. 3.22, we observe that each element of A is
associated to a unique element of A.
:. f is a function from A to A.
Also range f = {I}.
Example 2. Let W = {a, b, c, d}. Determine whether
each of the following sets of ordered pairs is a function
from W into W.
(a) {(b, a), (c, d), (d, a), (c, d), (a, d)} Fig. 3.22
(b) {(d, d), (c, a), (a, b), (d, b)}
(c) {(a, b), (b, b), (c, b), (d, b)}
(d) {(a, a), (b, a), (a, b), (c, d), (d, a)}.
Sol. (a) Yes, although the element c appears as the first coordinate in two ordered
pairs, but these two ordered pairs are equal.
(b) No, the element b does not appear as the first coordinate in any ordered pair. Also,
the two ordered pairs (d, d) and (d, b) have the same first element.
(c) Yes, as each element of W appears as the first coordinate exactly in one ordered
pair.
(d) No, the element a appears as the first coordinate in two different ordered pairs.
Example 3. Let F: R --; R be a function which assigns to each real number x its square x2.
Describe different ways of defining f
Sol. There are three ways of defining f
(i) f(x) = x' (ii) x --; x'
(iii) y = x'
The symbol --; is called barred row and reads as "goes into".
In (iii), x is called independent variable and y is called dependent variable.
Example 4. If x, y E {I, 2, 3, 4}. Then which of the following are functions in the given
set ?
(a) fi = {(x, y) : y = x + I}
(b) f2 = {(x, y) : x + y > 4}
(c) f3 = {(x, y) : y < x}
(d) f4 = {(x, y) : x + y = 5}.
Sol. (a) We first express f, as a set of ordered pairs. Here f, = {(I, 2), (2, 3), (3, 4)}
f, is not a function since the element 4 is not appeared in first place of any ordered pair
of f"
(b) Here, f, = (1, 4), (2, 4), (3, 4), (2, 3), (3, 2), (4, 1), (4, 2), (4, 3)
We observe that 2, 3, 4 have appeared more than once as first component of the ordered
pairs in f,. :. f, is not a function.
(c) Here, f3 = {(2 , 1), (3, 1), (4, 1), (3, 2), (4, 2), (4, 3)}
We observe that 3, 4 have appeared more than once as first component of the ordered
pairs of t,. :. f3 is not a function.
(d) Here, f4 = {(I, 4), (2, 3), (3, 2), (4, I)}
We observe that each element of the given set has appeared as first component in one
and only one ordered pair of f4 .
:. f4 is a function.
Example 5. Let A = {I, 2}, B = {3, 6} and f : A --; B is given by f(x) = x2 + 2, g : A --; B is
given by g(x) = 3x. Is f = g ?
1 02 DISCRETE STRUCTURES
Sol. Given f: A � B i.e., fis a function from A to B.
. . Domain f= (1, 2), co-domain g = (3, 6)
Also g : A � B i.e., g is a function from A to B
. . Domain g = (1, 2), co-domain g = (3, 6)
Also, f(l) = 1 + 2 = 3,g(1) = 3
f(2) = 4 + 2 = 6,g(2) = 6
=> f(x) = g(x) for all x E Dom. f, Dom. g. This f and g are equal functions.
Example 6_ Let fbe a function with domain A and codomainB. Let the relation k cA xA
is defined on A as (x, y) E k iff f(x) = f(y). Show that k is an equivalence relation.
Sol. Since f(x) = f(x) for all x E A
.. (x, x) E k i. e., k is reflexive
Let (x, y) E k => f(x) = f(y) for all x, Y E A
=> f(y) = f(x)
=> (y, x) E k i.e., k is symmetric
Further, if (x, y) E k, (y, z) E k. Then
f(x) = f(Y), f(y) = f(z)
f(x) = f(z) for all x, z E A
(x, z) E k .. k is transitive.
Hence the relation k is an equivalence relation.
Example 7_ Determine if the following function is one-one.
(a) To each person on the earth, assign the number which corresponds to his age.
(b) To each country in the world, assign the lattitude and longitude of its capital.
(c) To each book written by only one author, assign the author.
(d) To each country in the world, which has a prime minister, assign its prime minister.
Sol. (a) No, as many people in the world can have the same age.
(b) Yes different countries have different capitals.
(c) No, as we can have different books by the same author.
(d) Yes, as different countries in the world have different prime ministers.
Example 8_ Let A = B = {I, 2, 3, 4, 5}. Define a function f: A � B such that f is one-one
and onto function. (P.T.V. B.Tech. Dec., 2005)
Sol. Let f(x) = x for all x E A, then
f(l) = 1, f(2) = 2, f(3) = 3, f(4) = 4, f(5) = 5.
i.e., different elements of A have different images in B.
--T---�----f-- 2
.. f is one-one (Fig. 3.23).
--+---�--�� 3
----,f---+--+- 4
Also, each element of B is the images of some
5
elem ent of A.
f is onto also. -+--+-----'.'"""
A B
Example 9_ LetA =B = {I, 2, 3, 4}. Define functions Fig. 3.23
f: A � B (ifpossible) such that
(i) f is one-to-one and onto
(ii) f is neither one-to-one nor onto
(iii) f is onto but not one-to-one
(iv) f is one-to-one but not onto.
FUNCTIONS 1 03
Sol. (i) The function { = {(I, 1), (2, 4), (3, 2), (4, 3)} is one-to-one and onto (Fig. 3.24).
(ii) The function { = {(I, 1), (2, 1), (3, 2), (4, 3)} is neither one-to-one nor onto (Fig. 3.25).
2 �\----1r:. 2
2
3
4 .-1--.-:><:::\:::.:
3 3
4 4
A B
Example 10_ Consider the sets X and Yand let {: X --; Y. Determine whether the {allow
ing functions are :
(a) one-to-one function (b) onto function
(c) one-to-one onto (d) neither one-to-one nor onto.
(i) X = {x, y, z} ; Y = {1, 2, 3, 4}, { = {(x, 1), (y, 1), (z, 3)}
(ii) X = {a, b, c, d} = 1', { = {(a, a), (b, c), (c, d), (d, b)}
(iv) X = {Y1' Y2' yJ ; Y = {k, I}, { = {(Y 1' I), (Y2' I), (Y3' k)}.
Sol. (i) From the Fig. 3.26, we observe that the elements x, y E X are not uniquely
associated to elements of Y
:. {is not one-one
Also 4 E Y has in its pre-image in X. Hence, {is not onto.
x x y
Fig. 3.26 Fig. 3.27
1 04 DISCRETE STRUCTURES
x y
Fig. 3.28 Fig. 3.29
one-one, but not onto as the element c has not its pre-image in X.
(iv) From Fig. 3.29 we observe that
f is not one-one, but onto.
Example 1 L Which of the following functions are one-one, onto or both ?
(a) f . R --; R defined by f{x) = r - 3x
(b) f Z --; Z defined by f{x) = - x + 2
(c) f . N x N --; N defined by f{m, n) = 2m3n
(d) f . N --; N defined by f{n) = n2 + n
(e) f N --; N x N defined by f{n) = (n, 1 10 - n I).
SoL (a) Onto_ f . R --; R is a function from R to R
.. Co-domain f = R.
Also, range f= If(x) ; X E R} = {x'l - x . X E R} = R
. . Co-domain f = range f
Hence the function f: R --; R is onto.
One-one_ Let x, y E R such that f(x) = fly)
=> x'l - X = y3 _ y
=> 3
x'l _ y _ (x - y) = 0
=> (x- y) (x' + y' + xy) - (x - y) = 0
=> (x- y) (x' + y' + xy -l) = 0
But x' + y' + xy - 1 '" 0 'd x, Y E R
x - y = 0 => x = y
:. f is one-one.
(b) One-one_ We know that a function fis one-one if f(x) = fly) => x = y for all x, y E Dr
Let x, y E Z (= Dr) and consider f(x) = fly)
=> - x + 2 = - y + 2 => - x = - y
=> x = y. :. f . Z --; Z is one-one.
Onto . Let y E Z such that f(x) = y for all x E Z
-x+ 2 =y
x = 2 -y
FUNCTIONS 1 05
For each Y E Z, we observe that x E Z
.. { is onto.
(c) One-one. We know that { : A --; E is one· one iff {(x) = {Iy) => x = y for all x, y E Dr
Here domain {= N x N
Let (m " n,), (m" n,) E N x N such that
{(m" n,) = (m" n,)
2m1 - m2 .
= 1 = 20.30
3ni - n2
m 1 - m 2 = 0, n1 - n2 = 0
m 1 = m 2 ! n 1 = n2
(m " n,) = (m" n,)
{ : N x N --; N is one·one.
Onto. A function, {: A --; E is said to be onto iff for Y E E, there exists x E A such that {(x) = y
Now, 1 E N, but there is no (m, n) E N x N such that {(m, n) = 1
.. { is not onto.
(d) One-one. Let {(x) = {Iy) => x' + x = y' + y
=> x' - y' + x - y = O => (x - y) (x + y + 1) = °
=> x - y = 0, => x =y I x + y + 1 '" 0, for x, Y E N
{ : N --; N is one·one.
Onto. Let Y E N such that {(x) = y => x' + x = y
- 1 ± F+4Y
x' + x - y = O => x= 2
(l Take Y = 1, we get x = - 1 + J5
;
.. { : N --; N is not on to.
(e) One-one. Let m, n E N such that {(m) = {(n)
=> (m, I 10 - m I ) = (n, I 10 - n I )
m = n, 1 1O - m l = I lO - n l
m = n, lO - m = lO - n
m = n, for all m, n E N
. . { : N --; N x N is one· one.
Onto. Given { : N --; N x N is a function from N to N x N. Therefore co· domain {= N x N
Also range {= {{(n) : n E N} = (n, I 10 - n I )
1 06 DISCRETE STRUCTURES
N x N '" co-domain
f : N --; N x N is not on to function.
Example 12. Let A = B = {I, 2, 3, 4, 5}. Define functions f A --; B (ifpossible) such that
(a) fis one-one and onto (P.T.U. B.Tech. Dec. 2005)
(b) f is neither one-one nor onto
(c) f is one-one but not onto
(d) f is onto but not one-one.
Sol. (a) Define f : A --; B such that
f(x) = x for all x E A = B
Le., f(l) = 1 , f(2) = 2, f(3) = 3
f(4) = 4, f(5) = 5
i.e., different elements of A have different images in B
Fig. 3.30.
.. f : A --; B is one-one. Also, we observe that
for each Y E B, there exists x E A such that f(x) = y. Hence f
is on to also. A B
(b) Define f : A --; B such that Fig. 3.30
f(x) = 1 for all x E A, 1 E B one-one and onto
Le., f(l) = 1, f(2) = 1,
f(3) = 1 , f(4) = 1 , f(5) = 1
i.e., different elements of A have same images in B Fig. 3.3 1.
f : A --; B is not one-one. 2
Also 2, 3, 4, 5 E B have no images in A. 3
.. f : A --; B is not on to 4
(c) Since A = B, :. There is no function which is one 5
one but not onto. A B
(d) Again, as A = B, :. There is no function which is Fig. 3.31
onto, but not one-one.
Example 13. Consider the function f ,' N x N --; R defined by f(x, y) = (2x + 1) 2Y - 1,
where N is the set of natural numbers including zero. Show that f is bijective.
Sol. One-one. Let f (x" Y,) = f (x" Y,) => (2x, + 1)2Y' - 1 = (2x2 + 1)2Y' - 1
(2x, + 1)2Y' = (2x2 + 1)2 "' , which can hold if
2X, + 1 = 2x, + 1 and 2Y' = 2Y'
Le., if Xl = x2 and
Hence, (x" Y,) = (x" y,).
:. f is one-one.
Onto. For each (x, y) E N x N, (2x + 1) 2Y - 1 E R
such that f(x, y) = (2x + 1) 2Y - 1. Hence range of f = R = co-domain f
:. fis onto.
Hence, f is bijective.
FUNCTIONS 1 07
Example 14. Consider the function f ,' N � N, where N is the set of natural numbers
including zero defined by f(n) = n2 + 2. Check whether the function f is (i) one-one (ii) onto.
Sol. One-one. Let m, n E N such that f (m) = f (n)
=> I m t:- - n since m, n E N
:. f is one-one.
Onto. Given f(n) = n' + 2, n E N
Let m = f(n) = n' + 2 => n' = m - 2 => n = ± �m - 2
For m E N, n 'l N (take m = 1, then n = ± R = ± i)
:. f is not on to.
Example 15. Which of the following functions are injections, surjections, or bijections
on R
(a) f(x) = - 2x (b) g(x) = x2 - 1.
Sol. (a) We know that a function f: R � R is one-one iff f(x) = fly) => x = y for all x, y E R
Let f(x) = fly)
- 2x = - 2y
x = y for all x, y E R.
.. f : R � R is one-one (injection)
Also, let y E R such that f(x) = y
- 2x = y =>x=- y (1)
2
Now, y E R, we observe that the values of x given by (1) are in R. . . f : R � R is onto
(surjection). Since f : R � R is one-one and onto. :. f is bijection also.
(b) Let g(x) = gly) for all x, y E R
x2 - 1 = y2 - 1 => X' = y2
x=±y
g = R � R is not one-one.
Also, co-domain g = R and
Range Rg = {g(x) : x E R} = {x' - 1 : x E R}
= (0, ) '" R = co-domain
=
.. g : R � R is not onto.
Alternatively: Let y = g (x) = x2 - 1
=> x' = l + y => x = ± .,f1+Y
For y E R, 3 x 'l R. Take
y = -2, then x = ± � = ± i 'l R
Hence g is not onto
Example 16. Consider the function f ,' N � N where N is the set of natural numbers.
Defined by f(n) = n2 + n + 1. Show that fis one-one but not onto. (P.T.V. B.Tech. Dec. 2008)
Sol. Given function f : N � N, where N is the set of natural numbers., is defined by
f(n) = n2 + n + 1.
1 08 DISCRETE STRUCTURES
We know that a function f : X --; Y is one-one if f(x,) = f(x,) => x, = x, \;j x" x, E X
Also f : x --; y is onto if for each Y E y, there exists at least one x E X such that f(x) = y.
One-one_ Let n" n, E N such that f(n,) = f(n,)
::::::} n1 2 + n1 + 1 = n2 2 + n2 + 1
::::::} n1 2 - n2 2 + n1 n2 = 0
-
::::::} either n1 = n2 or n1 + n2 - 1 = 0
If n, + n, 1 = 0, then n, = 1 n, 'l N for n, E N
- -
2 2
Now for each m E N, there exist n 'l N. Hence f is not onto.
Example 17_ Give an explicit formula for a function from the set of integers to the set of
positive integers which is (P.T.V. B. Tech. May 2009)
(a) one-one but not onto
(b) onto but not one-one
(c) one-one and onto
(<1) neither one-one nor onto.
SoL Recall that a function f : X --; Y is called one-one if whenever
f(x,) = f(x,)
::::::} Xl = x2 for all Xl ) X2 E X.
Also a function f : X --; Y is called an onto function if for each y E Y, there is x E X such
that f(x) = y.
Case I. One-one but not onto
Define f : Z --; Z+ by
f(x) = 2x
Let f(x) = fly) => 2X = 2Y => x = y \;j x, Y E Z
:. f is one-one.
If f(x) = y, then 2X = y
=> x = log, y
Now for y E Z+, X = log, y is not an integer. Hence the function f(x) : Z --; Z+ defined by f(x)
= 2x is not an onto function.
x -1
-1 -1
(a) (b)
-2 o 2
-1
(e)
Fig. 3.32
110 DISCRETE STRUCTURES
Sol. (a) Recall that a set of points on a coordinate diagram is a function iff every vertical
line contains exactly one point of the set. Hence the graph given in Fig. 3.32(a), (b) represents
functions. But, the graph given in Fig. 3.32(c) does not represent a function. Since the vertical
line drawn through the graph (Fig. 3.32) meets in two points.
Example 19. Determine which of the graphs in the followings figures (Fig. 3. 33) are
functions from R to R.
-2 o 2
-2
(a) (b)
Fig. 3.33
Sol. If a vertical line is drawn, it does not contain exactly one point. Hence, both the
graphs (a) and (b) do not represent any function.
Example 20. Consider the functions defined as f(x) = 2', g(x) = x'I x, h(x) = x2, d(x) = x'I
-
and their graphs as shown below (Fig. 3.34). Determine which of the functions are one-one.
Which of them are onto ?
o g(x) x3 - x
=
f(x) 2'
=
(a) (b)
o o
h(x) x'
=
d(x) x3
=
(e) (d)
Fig. 3.34
FUNCTIONS 111
Sol. Recall that a set of points on a coordinate diagram is a function iff every vertical
line contains exactly one point of the set. Hence, the graphs shown in Fig. 3.34(a) , (b), (c) and
(<1) represent functions.
Also, if a horizontal line is drawn through the graph and if it meets the graph in atmost
one point, then the function is one-one. If each horizontal lines intersect the graph in at least
one point, then the function is onto.
(a) The function f(x) = 2x is one-one since the horizontal line drawn through the Fig.
3.34(a) contains atmost one point. But the function f is not onto since some horizontal lines
(those below x-axis) contain no point of t.
(b) The function g(x) = x3 - x is not one-one. Since, the horizontal line drawn through the
graph contains more than one points. Also, every horizontal line (those either below x-axis or
above x-axis) contains at least one point of g. Hence g is onto.
(c) If we draw horizontal lines through the graph of the function d(x) = x2 , these lines
intersect the graph in two points. Hence the function d(x) = x2 is not one-one. Also, there are
horizontal lines (below the x-axis), which donot intersect the graph of d(x) at all. Hence d(x) is
not onto.
(d) The function d (x) = x3 is one-one and onto since every horizontal line (either above
or below x-axis) intersects the graph of d(x) in exactly one point.
Example 21. Let A c Z and f: A --; N be a one-one function where Z is the set ofintegers
and N is the set of natural numbers. Let R be a relation on A defined as under :
(x, Y) E R iff fly) = kf(x) for k E N. Prove that R is a partial order relation.
(P.T.V. B. Tech. Dec. 2008)
Sol. Given f : A --; N is a one-one function where A c Z, the set of integers. The relation
R on A is defined as below :
(x, Y) E R <=? fly) = kf(x) for all x, Y E Z. We show R is a partial order relation i.e.
(i) R is reflexive
(ii) R is antisymmetric
(iii) R is transitive.
To show R is transitive_ Consider f(x) = 1 . f(x) = kf(x) where k = 1 E N.
=> (x, x) E R. Hence R as reflexive.
To show R is antisymmetric.
Let (x, y) E R => fly) = k,t(x), k, E N (1)
Let Iy, x) E R => f(x) = klly), k2 E N (2)
Using (2) in (1), we have fly) = k,k2 fly)
=> (1 - k,k2) fly) = 0
=> 1 - �� = 0
I If Y E Z, then fly) E N since f : Z --; N is a function. Hence fly) # 0
k,k2 = 1
But k" k2 E N and (3) implies k, = 1 = k2
.. from (2) f(x) = klly) = fly)
=> x=y I f is one-one
Hence the relation R is antisymmetric.
To show R is transitive_
112 DISCRETE STRUCTURES
Let (x, y) E R => f(y) = k/(x) for x, Y E Z, k, E N
(y, z) E R => f(z) = k,t(y) for x, y, E Z, k2 E N
or f(z) = k2 (k/(x»
= k2k, f(x) = k2k, f(x)
= k f(x) where k = k2k, E N
(x, z) E R
Hence R is transitive also.
Therefore, the relation R is a partial order relation.
b
e ��------��
(a) (b)
(e)
2. Consider the figure given below :
(a) Find the graph of the function and write f as a set of ordered pairs
(b) Find f(S) where S = {I, 3, 5}
(c) Find f -1 (T) where T = {I, 2}
(d) Find f -1 (3).
FUNCTIONS 1 13
Let =
pairs)X is {I,a function
2, 3, 4}. Determine whether each of the following relations on X (set of ordered
3. (a)
from X into X.
(i){� {(2, 3), (1, 4), (2, 1), (3, 2), (4, 4)}
(ii)g � {(3, 1), (4, 2), (1, I)}
� {(2, 1), (3, 4), (2, 1), (4, 4)}
3 1 then show that { (1)
(iii) h
6. = < < =
Let A {x : - 1 x I} B and f : A B is a function defined by [(x) 2 Examine whether tis
-----t = ..::. ,
bijective or not.
7. Let I(x) '\jx-=
1
� ) is a function on R. Find the domain of f
-4
8, (a) If A � {I, 2, 3}, B � { b, c} . Find the number of injections from A to B.
a,
(b) Find the number of bijective functions from A to itself when A contains 106 elements.
(a)
(c) If X � {a, b} and Y � {I, 2, 3} . Find the number n of functions from Xinto Y (b) From Y into X
If X has I X elements and Y has I Y I elements. Show that there are I Y I I X I functions
(d)
from X into I y, (Hint. Use theorem I)
3 . 1 5. INVERSE FUNCTION
Let f : A --; A and if there is a function g : A --; A such that gof = fog = lA' then g is called
inverse of f and is denoted by rl i.e., g = rl
If f : A --; B is a one-one and onto function, then the function defined by g : B --; A is
called inverse of f
Example. Consider the functions f: R --; R and g : R --; R defined by f (x) = X4 and g (x)
= X . Then for each x E R, f (x) and g (x) are inverses of one another.
1 l4
116 DISCRETE STRUCTURES
Sol. Here f and g are inverses of one another if
(fog) (x) = Ix and (go/) (x) = Ix
Now (fog) (x) = f (g (x» = f (X'I4) = (X'i') ' = x = Ix
Also (go/) (x) = g (f (x» = g (x') = (X') lI' = X = Ix
Hence f = g-l and g-l = f
I ILLUSTRATIVE EXAMPLES
(d) If f(x) = -x
x+1
, g(x) = -1
x- 1
' find (fog)(x)
(e) If f(x) = x + 5, g(x) = x2, find (gof)(x), where f: R --; R, g : R --; R is given.
(/) If f : R --; R and g: R --; R are two functions defined by f (x) = sinx and g(x) = x2.
Find fog and got Is fog = got? (P.T.U. B.Tech. May 2013)
Sol. (a) (fogofog)(x) = f(g(f(g(x» » = f(g(f(x'l» = f(g(x6»
(d) [ )
(fog)(x) = f(g(x» = f __
1
x -I
1 1
=
--
x -I
1
+1
=
x -I
l +x-l
=
1
x
I x
{(x) = __
x+l
x -I x -I
(e) (go/) (x) = g(f(x» = g(x + 5) = (x + 5)' = x2 + 25 + lOx.
(/) (fog) (x) = f (g(x» = f(x') = sin x2
(go/) (x) = g (f (x» = g (sin x) = (sin x)' = sin' x
Thus, gof ", fog
Example 4. Consider the functions f, g : R --; R defined by
f(x) = x' + 3x + 1, g(x) = 2x - 3.
Find the composition functions
(i) fat (ii) fog (iii) got
Sol. (i) (fo/)(x) = tIf(x) 1 = f(x' + 3x + 1)
= (x' + 3x + I) ' + 3(x' + 3x + 1) + 1
FUNCTIONS 119
{O , when n �s even
h(n) = 1 , when n �s odd.
�c-----+... a a
-+----+-... b b
��---+... c �---�. c
Fig. 3.37
So, !' = {(a, b), (b, a), (e, e)}.
(iv) The f is fafafafi.e., fa! , (Fig. 3.38).
4
(fa! ') (a) = f[f 3 (a)] = f(b) = a, (fa! ') (b) = f[f 3 (b)] = f(a) = b
(fa! ') (c) = f[f 3 (c)] = f(c) = c
FUNCTIONS 121
3
f
a a a
b b b
c c C
f4
Fig. 3.38
So , t' = {(a, a), (b, b), (c, e)}.
Example 8. Consider the functions f, g and h as in Figs. 3. 39, 3.40 and 3.41.
x,--'I'"-
----++ --\,------.1-+ Z,
Z3 -f----,.". k3
h
Fig. 3.41
Determine (i) got (ii) ho(gof) (iii) (hog)of
Sol. (i) Consider Fig. 3.42.
x,----'I-----++ --\-------{+ Z,
---,'+ 1----+-+ k,
--\-
---1
9 h
Y2 Z2 k2
Y3
Y4 -+-------'\+ k3
5+y
3x = 5 + y ::::::} x = 3 --
5+y
For each y E R, we have x = 3- E R. . . fis onto also. Hence fl exists.
-
5+ X
f-l (X) = --
3
5-x
(b) Try yourself, f' (X) = 8- '
-
(b) hen)
Let (,�g,n -h 1.areThen
functions Z to Z, on the set of integers, given by fen) n2 , g(n) n + = =
find (i)from
ga(joh) (ii) fa(goh) (iiI) ha(jag).
I,
= ax =
12. Let [(x) + b, g(x) ex + d where a, b, e and d are constants. Determine for which constants a,
b, c, d it is true that fag � gal
Answers
L (a) 79 (b) 29 (c) 4a2 + 20a + 23
(d) 2a2 + 8a+ 5 (e) 4x2 + 4x - 1 (f) 2x' - 3
(g) 4x + 3 x'
(h) - 4x'
2, (b) (i) (n - 1) 2 + 1 (ii) n2 (iii) (n + 1) 2 - 1
3, f2 � 2, 3}, f-l � f
{I, 4, (gof)(-2) � 3, (jag) (-2) � 5
5, (I) No (il) Yes
1 26 DISCRETE STRUCTURES
8. No, since {is not one-one. Also, {is not onto 9.g- l (X) =F
2
10. (a) 4x + 5 (b) 2x' + 6x+ 7
(c) 4x-9 (d) 8x- 21
11. h-1 (x) 75xx -3
� --
-7
�
12. (a- I) d (c - l)d.
M U LTIPLE CHOICE QU ESTIONS ( MCQs)
1, I y I = 97
(c) I x I = 97, I y I = 97
(b) I x I = 97, I y I =
(d) None of these.
1
given that there are exactly 97 functions from x to y. From this one can conclude that
(a) I x I =
4. Let R denote the set of real numbers. Let f : R x R --; R x R be a bijective function
( 1 )]
[_1_,_
defined by f (x, y) = (x + y, x - y). The inverse function of f is given by
[; ;]
x+y x-y
x y x y
(c) f - I (x, y) = , (d) f -l (x, y) = [2 (x - y), 2(x + y)].
5. Let A and E be sets with cardinalities m and n respectively. The number of one·to·one
mapping from A to b where m < n is
(a) mn (b) np m
(c) e
m
(d) nem.
n
6. Let A be set of integers greater than one and smaller than thousand. Let b denote set of
books in library, I E I = 999. Let f : A --; E, assigning a unique number to each book fis
(a) one to one, onto (b) one to one, and not onto
7.
(c) not one to one, onto
1 1) 1
Let f(x) = x' + x and g(x) = x + then fog is :
(a) x' + 3x +
(d) not one to one, not onto.
(b) x' + x + 1
(c) (x + I) (x +
' + (d) None of the above.
8. Each of the function 2n and n1cg n has growth rate ... that of any polynomial.
(a) Greater than (b) Less than
(c) Equal to (d) Proportional to.
106
� 100 W 100 1
9. The number of bijective functions from A to A when A contains elements is
1
(c) (d) None.
FUNCTIONS 1 27
Adding, 2X = X, + Y,
(x, y) -_ (Xl + Y Xl Y )
1
'
- 1
- f-1
_
(x" y,)
(; ;)
2 2
x y ,x y
f-1 (x, y) = .
5. (b)
6. (b) Consider the function f : A --; B defined by f(a) A B
= a - I for all a E A, then each element of A has 2 ----'\-----4
different images in B. So fis one·one. 3 ---\-----.H> 2
But the element 999 has not its preimage in A. 4 3
Therefore, f is not onto since, if 999 E B, then
there should be 1000 in A such that
9 9 9 -f----�� 9 9 8
f(1000) = 1000 - 1 = 999
Hence f is one·one, but not onto. 999
7. (c) fog (x) = f(g(x» = f(x + 1) = (x + 1) 2 + X + l.
8. (b)
9. (b) The number of bijective functions from f : A --; B where A and B have the same
number of elements say, n is n !.
10. (a) One-one. Let f(n,) = f(n2) => 2n, + 3 = 2n2 + 3
n1 = n2 f is one-one • •
m-3
Onto. Let f(n) = m => 2n + 3 = m ::::::} n = --
2
m-3
For each m E N, n = -- 'l N
2
:. f is not on to.
MATHEMATICAL
INDUCTION
4. 1 . PRINCIPLE O F MATHEMATICAL INDUCTION
The process to establish the validity of a general result involving natural numbers is
the principle of mathematical induction.
Peano, a mathematician defined the natural number in the following way. According to
him, the member of set N satisfying the following properties are called natural number.
1. 1 E N.
2. For all n E N, there exists a unique n' E N, such that
(a) m' = n' <=? m = n
(b) There exists no element p in N such that p ' = 1.
3. If S c N and
(a) 1 E S
(b) X E S => x' E S then S = N.
x' is called the successor of x and x is known as predecessor of x'.
These properties are called Peano's Axioms.
The number x' and x + 1.
Therefore 2 = 1', 3 = 2' = (1')', 4 = 3' = (2')' = «1 ')')' and so on.
: 6(r + 1) ]
(2)
[
I Using
r(r + 1X2r + 1) + 6(r + 1) 2 r(2r + 1)
= (r + 1)
6
6 6
(r + 1Xr + 2X2r + 3)
= -'---'- :-'-'- --'-
_ _
(3)
As per) is true, hence per + 1) is true.
6
P(l) = 13 = [ ; 1) ] , = (I)' = 1
1(1
per) = 13 + 2 3 + 3 3 + ... +
[ ; 1) ]
,
r(r
r = is true (2)
1 30 DISCRETE STRUCTURES
Adding (r + 1)3 on both sides
[ +�+ f
4
(r l r 2)
= (3)
As per) is true, hence per + 1) is also true.
From (1), (2) and (3), we conclude that
1 3 + 2 3 + 3 3 + . . . + n3 = [ n(n2+ r
1)
1. 2 + 2 . 3 + 3 . 4 + . . . + n(n + 1) =
n(n + 1)(n + 2)
3
is true for n = I, 2, 3, 4, . Hence proved.
Example 4. Prove by Mathematical Induction :
1 1
--- + -- +
1
+ ... + 1
": n
1 . 3 3 .-5 -
5-.-
7 - - l)(2=-n---:-:-
-::(2=-n --:- + l) 2n + 1
MATHEMATICAL INDUCTION 1 31
Sol. Basic Step. For n = 1,
1 1 1 1
(2 - 1X2 + 1) 3 2(1) + 1 3
Hence pen) is true for n = l. (1)
Induction Step. For n = r,
+ . . . + -::- -::"-:---,,.-,
1 1 1 1 r .
per) = + -- +
-- -- -
-- IS true (2)
1.3 3. 5 5.7 (2r - 1X2r + 1) 2r + 1
1
Adding on both sides
(2r + 1X2r + 3)
1 1 1 1 1
P(r + 1) = -- + +
-- + ... +
-- + ------
= -- + -;:- c"-:- =
r 1 r(2r + 3) + 1
- -
I Using (2)
2r + 1 (2r + 1X2r + 3) (2r + 1X2r + 3)
2 (2r + l)(r + 1)
= 2r + 3r + 1 (r + 1)
(3)
(2r + 1X2r + 3) (2r + 1)(2r + 3) (2r + 3)
As per) is true, hence per + 1) is also true.
From (1), (2) and (3), we conclude that
1 1 l I n
-- +-- + -- + . . . + ------
1.3 3.5 5.7 (2n - 1)(2n + 1) 2n + 1
is true for n = I, 2, 3, 4, . Hence proved.
Example 6. Show that 1 + 2 + 22 + 2' + ... + 2" = 2"+1 - 1 by induction (for n :> 0).
(P.T.U. M.C.A. Dec. 2005)
Sol. Consider pen) = 1 + 2 + 2' + 23 + ... + 2" = 2"+1 - l.
Basis ofInduction. For n = 0,
P(o) = 1 = 2 ' - 1 = 1
It is true for n = 0. (1)
1 32 DISCRETE STRUCTURES
Induction Step. For n = r,
P(r) = 1 + 2 + 2' + 23 + . . . + 2' = 2,+1 - 1 is true. (2)
Adding 2'+1 to both sides,
P(r + 1) = 1 + 2 + 2' + 23 + ... + 2' + 2'+1 = 2'+1 - 1 + 2 rt 1 I Using (2)
= 2(2rt1) - 1 = 2'+' - 1 (3)
As P(r) is true, hence P(r + 1) is also true.
From, (1), (2) and (3), we conclude that
1 + 2 + 22 + . . . + 2n = 2n+1 _ I , is true for n = I , 2, 3, .
1
-a n+l
Example 7. Prove by induction that for n :> 0 and a '" 1 ; 1 + a + a2 + ... + an =
I-a
(P.T.U. M.C.A. May 2007)
Sol. Basis ofInduction. For n = 1,
1 - a 1+ 1 I - a'
1 + a' = -,- -- = I + a
I-a 1- a
It is true for n = l. (1)
Induction Step. For n = r,
1 - ar + 1
P(r) = 1 + a + a' + ... + a' = is true (2)
I-a
Adding a'+1 to both sides,
P(r + 1) = 1 + a + a' + ... + a' + a'+1
1 - ar+ 1 1 - a r+2
= -,__ + ar + 1 = (3)
I-a 1- a 1- a
I Using (2)
As P(r) is true, hence P(r + 1) is also true.
From (1), (2) and (3), we conclude that
1 - an+ 1
1 + a + a2 + . . . + an = is true for n ;::: O. Hence proved.
I-a
Example 8. Show that for any integer n, 11 n+2 + 122n+1 is divisible by 133.
Sol. Let P(n) = I I n+' + 12'n+1
Basis of Induction. For n = 1,
P(I) = 113 + 123 = 3059 = 133 x 23
So, 133 divides P(I). ( 1)
Induction Step. For n = r,
P(r) = 11'+' + 12,,+1 = 133 x s, say, (2)
Now, for n = r + I,
P(r + 1) = l lrt'+1 + 12' (c) +3 = 1l [133s - 12 " +1 ] + 144 . 12' rt 1 I Using (2)
= I I x 133s + 12,,+1 . 133 = 133[lls + 12" +1] = 133 x t, say (3)
As (1), (2) and (3) all are true, hence P(n) is divisible by 133.
MATHEMATICAL INDUCTION 1 33
Example 9. Prove by induction that the sum of the cubes ofthree consecutive integers is
divisible by 9.
Sol. Let pen) = n3 + (n + 1)3 + (n + 2) 3
pen) is divisible by 9
P(l) = 1 + 8 + 27 = 36
which is divisible by 9. ( 1)
For n = r,
per) = r3 + (r + 1) 3 + (r + 2) 3 = 9 . q, say, (2)
For n = r + 1 , per + 1) = (r + 1) 3 + (r + 2) 3 + (r + 3) 3
= r3 + (r + 1) 3 + (r + 2) 3 + [9 r' + 27r + 27] I Using (2)
= 9q + 9(r' + 3r + 3) = 9[q + r' + 3r + 3 ]
= 9.s, say, (3)
From (1), (2) and (3), we have the required result by induction. Hence proved.
1 1 1 13
Example lO. Prove -- + -- + . . . + - -, for n :> 2. > 24
n+1 n+2 2n
Sol. For n = 2,
1 1
= 7 13
L.H.S. =
2+ 1
+
2+2 12 > 24 = R.H.S. ( 1)
It is true for n = 2. Now, for n = r, where r > 2
1 1 1 13
-- + -- + . . . + - > (2)
r+l r+2 2r 24
For n = r + I,
1 1 1 1 1 13 1 1 1
L.H.S. = -- + -- + ... + - + + >- +
-- +
-- - -- -- --
r+2 r+3 2r 2r + 1 2r + 2 24 2r + 1 2r + 2 r + 1
[Using (2)]
13 2r + 2 + 2r + 1 - 2(2r + 1) 13 1 13
= -+ =-+ >-
24 (2r + lX2r + 2) 24 (2r + lX2r + 2) 24
As n = r is true. Thus, the result is also true for n = r + 1. Hence, we have the result for
n :> 2 by induction. Hence proved.
Example 12. Show that 2" x 2" - 1 is divisible by 3 for all n :> 1 by induction.
Sol. Basis ofInduction. For n = 1,
2' X 2' - 1 = 3 divisible by 3.
It is true for n = l.
Induction Step. For n = r,
per) = 2' 2' - 1 = 3s, say Le., 2,+1 - 1 = 3s ( 1)
For n = r + I ,
2 '+1 . 2 '+1 - 1 = 2'+1 (3s + 1) - 1 I Using (1)
= 3s . 2 "" + 2"" 1 = 3s . 2 '+1 + 3s
-
= 3s(2'+1 + 1).
It is divisible by 3. Hence, we have the required result by induction.
n(2n - 1)(2n + 1)
Example 13. Show that 1 2 + 32 + 52 + ... + {2n - 1)2 = .
3
Sol. Basis of Induction. For n = 1,
1(2 x 1 - lX2 x 1 + 1)
(2 x 1 _ 1)' = 1 = =1
3
It is true of n = l.
Induction Step. For n = r,
r(2r - 1)(2r + 1)
l' + 3' + 5' + . . . + (2r - 1)' = is true. ( 1)
3
For n = r + I ,
per + 1) = l ' + 3' + 5' + . . . + (2r - 1)' + [2(r + 1 ) - 1]'
r(2r - lX2r + 1) r(2r - lX2r + 1) + 3(2r + 1)2
= + (2r + 1)' = I Using (1)
3 3
(2r + 1)[2r 2 - r + 6r + 3] (2r + 1)[2r 2 + 5r + 3]
= -=----=-=---::-,------'-'.
-"'-
3 3
2
(2r + 1)[2r + 3r + 2r + 3] (2r + lX2r + 3Xr + 1)
= �--�--------�
3 3
which proves the result for n = r + l.
n(2n - lX2n + 1)
So, l' + 3' + 5' + . . . + (2n - 1) , = .
3
Example 14. Prove that n{n + 1){n + 2) is a multiple of 6.
Sol. pen) = n(n + l)(n + 2)
MATHEMATICAL INDUCTION 1 35
5 3 15
Basis of Induction. For n = 1,
1 1 7
5 + 3' + 15 = 1, which is a natural number.
It is true for n = l.
Induction Step. For n = r,
(-.! r5 -.! r3 � r)
5
+
3
+
15
is a natural number (1)
For n = r + I,
1 1
- (r + 1) 5 + - (r + 1) 3 +
7 (r + 1)
-
5 3 15
1 5 1
= - (r + 5r' + lOr3 + lOr' + 5r + 1) + - (,-" + 3r2 + 3r + 1) +
7 (r + 1) -
5 3 15
=
5
(�r5 � r3 � r)
+
3
+
15
+ (r' + 2r3 + 3r' + 2r) + 1
1 1 l I n
13.
1 x 4 4 x 7 7 x 10 + ...... + (3n - 2)(3n + 1) = 3n + 1 ' n E N.
--+--+ --
---
14.
21 + 221 + 231 + ...... + �1 = 1 - �1 , n E N.
15. a + ar + ar2 + .. " .. + ar - a(1_rn)
n- l _
1 -r , n E N.
16. �
2 + 4 + 6 + ...... + 2n n(n + 1), n E N.
17. Prove by mathematical induction that 2 - 24n - 25 is divisible by 576.
52n +
18. Prove by mathematical induction that (23 - 1) is divisible by 7 for all values of n E N.
n
19. Prove by Mathematical Induction that 2 + 1 is divisible by 43 for each positive integer n,
6n +
72n +
U.
(P. T. M.
c.A. May.
2008)
Answers
1. 13 is odd 2. 17 is even, No
Hint
8. Let k2 + k 2\ where \ E N.
�
Now (k + 1)' + (k + 1) k2 + 3k + 2 (2\ -k) + 3k + 2 2(\ + k + 1).
� � �
SA
BASIC COUNTING
PRINCIPLES
5 . 1 . INTRODUCTION
In this chapter, we will discuss some methods of counting which acts as 'building blocks'
for all counting problems.
5.2. BASIC COUNTING PRINCIPLES (P. T. U. B. Tech. Dec. 2006 ; Dec. 2005)
There are mainly two counting principles namely
(i) Sum Rule (ii) Product Rule.
These two principles form the basis of permutations and combinations and hence known
as basic counting principles.
5.3. S U M RULE
If there are two jobs such that they can be performed independently in m and n ways.
Then number of ways in which either of the two jobs can be performed is m + n.
ILLUSTRATIVE EXAMPLES
Example 1. In a class there are 10 boys and 8 girls. The teacher wants to select either a
boy ar a girl to represent the class in a function. In how many ways the teacher can make this
selection ?
Sol. The teacher can select a boy in 10 ways and a girl in 8 ways.
By sum rule, the number of ways of selecting either a boy or a girl = 10 + 8 = 18.
Example 2. There are 3 students for a classical, 5 for mathematical and 4 for physical
science scholarship. In how many ways, one of these scholarships be awarded ?
Sol. Classical scholarship can be awarded in 3 ways
Mathematical scholarship can be awarded in 5 ways
Physical science scholarship can be awarded in 4 ways.
1 38
BASIC COUNTING PRINCIPLES 1 39
1. Inmany
a class
ways,there
canarea student
8 male choose
teachers9 mathematics
and 5 female teachers
professorteaching
? 9 mathematics class. In how
2. There are 3 students for a classical, 5 for mathematical and 4 for physical science scholarship, In
how many ways can these scholarships awarded?
3. The flag of aThere
differently, newlyareformed countrycolours
six different is in thetoform 'D 'D "D
be used. How many of three
suchblocks,
designseacharetopossible
be coloured
?
4. InII and
a monthly
III of test,
the the
book teacher
If there decides
are 12 that there
questions inwill be
chapterthree
I, 10questions,
in chapterone
II from
and 6each
in chapter
chapter Ii
III.
In how many ways can three questions be selected?
5. Find the total number of ways of answering 5 objective type questions, each questions having 4
choices.
6. How many three digit numbers can be formed without using the digits 0, 2, 3 , 4, 5, 6 ?
7. How many numbers are there between 100 and 1000 such that 7 is in the unit place.
8. A gentleman has 6 friends to invite. In how many ways can be send invitation cards to them, ifhe
has three servants to carry the cards.
Answers
1. 13. 2. 3 x 5 x 4 � 60. 5 6 x 5 x 4 � 120
3.
4. 12 x l0 x 6 �720 5. 4 x 4 x 4 x 4 x 4 = 4 . 6. 4 x 4 x 4 = 64
7. 9 x 10 x 1 � 90 8. 3 x 3 x 3 x 3 x 3 x 3 � 36 � 729.
PERMUTATIONS AN D
58 COMBINATIONS
n ,=
The factorial n can also be written as
n(n - 1) ,= n(n - 1) (n - 2) ,
We have,
=
1 =1, = 1.
n(n - l)(n - 2)(n - 3)
and 0 '
......... 1.
and
Hence
(3 + 4) ,= ,=
6 + 24
7 7x6x 5x4x 3x2x
3 , + 4 , '" (3 + 4) ,
1 = 5040
1 42
PERMUTATIONS AND COMBINATIONS 1 43
Theorem I. Prove that the number of different permutations of n distinct objects taken r
at a time, r :::; n is given by
n pr =
n! = n (n - l)(n - 2) ... (n - r + l).
( n - r) !
Proof. The number of permutations of n distinct objects taken r at a time is like filling
of r places with n objects.
The first place can be filled in by any one of the n objects. So, this can be done in n ways
.. n p1 = n.
The second place can be filled in by any one of the n - 1 objects because after filling first
place. We are left with (n - 1) objects. Thus, the first two places can be filled in n(n - 1) ways.
n P2 = n(n - l)
Similarly, the third place can be filled in by any one of the remaining (n - 2) objects.
Therefore, the first three places can be filled in n(n - 1) (n - 2) ways.
Proceeding in this way, we have the number of permutations of n different objects taken
r at a time, given by
n Pr = n(n - l)(n - 2) ... (n - r - l)
n(n - lXn - 2) ... (n - r + 1)(n - r) ! n!
= =
(n - r) ! (n - r) !
Theorem II. (a) Prove that the number ofpermutations of n things taken all at a time
is n I.
Proof. We know that (theorem I)
n! =_ n ! =_
n!
np =
n (n - n) ! O ! 1
=nI
Theorem II. (b) Prove that nPr = n. n-1Pr_T
Proof. We know np = n! n (n - I) !
= I Theorem. I
r (n - r) ! (n - r) !
=n.
(n - I) ! n�p� .
(n - 1 - (r - I» ! = n .
Example 1. Determine the value of the following
(ii) 9 P3 (iii) 20 P2 (iv) 52 Pr
• 4 _ 4! 4 x 3 x 2 ! = 12
Sol. (,) P2 - (4 - 2) ! =
2!
• • 9 _ 9! 9 x 8 x 7 x 6 ! = 504
(,,) Pa - (9 _ 3) ! =
6!
1 44 DISCRETE STRUCTURES
... 20 ! 20 x 19 x 18 !
(m) 20 P2
_
- (20 _ 2) ! = 18 ! = 380
. 52 _ 52 ! = 52 x 51 x 50 x 49 x 48 !
(w) P4 - 48 ! = 6497400.
(52 - 4) !
Example 2. Determine the value of n if
(i) 4 x n P3 = n+ 1 P3 . (ii) 6 x n P3 = 3 x n+ 1 P3 . (iii) 3 x n P4 = 7 x n- 1 P4 .
Sol. (i) 4x
n ! = (n + I) ! [..
. np n!
, = (n - r) !
]
(n - 3) ! (n + 1 - 3) !
. 4xn! (n + l) x n !
-
(n - 3) ! ( n - 2)(n - 3) !
4(n - 2) = (n + 1) => 4n - 8 = n + 1
3n = 9 n = 3.
(ii) 6 x n p3 = 3 x n + 1 p3
6x
n! = 3x
(n + I) !
(n - 3) ! ( n + 1 - 3) !
. 6 x n! =
3 (n + 1)(n !)
(n - 3) ! ( n - 2)(n - 3) !
=> 6(n - 2) = 3 x (n + 1) => 6n - 12 = 3n + 3
=> 6n - 3n = 12 + 3 3n = 16
=> n = 6.
]
(iii) 3 x np 4 = 7 x n-1 p4
3x
(n - 4) ! T
(n--:::
n ! = 7 x (n - I) !
- I--"- =!
- 4)
[.: n p, nl
(n - r) !
3 x n x (n - 1) ! = 7 x--(n --"1)'-'-!
(n - 4Xn - 5) ! -'---(n -'--:
-" 5) :: !
3n = 7 (n - 4) => 3n = 7n - 28
3n - 7n = - 28 => - 4n = - 28
n = 7.
Example 3. How many variahle names of 8 letters can be formed from the letters a, b, c,
d, e, f, g, h, i if no letter is repeated ?
Sol. There are 9 letters and 8 are to be selected.
:. Total number of variable names of 8 letters is = 9p 8 =
9 .1 9!
=-= 9 .I .
(9 - 8) ! I!
Example 4. There are 10 persons called on an interview. Each one is capahle to be
selected for the job. How many permutation are there to select 4 from the 10 ?
Sol. There are 10 persons and 4 are to be selected.
:. Total number of permutations to select 4 persons = lO p,
PERMUTATIONS AND COMBINATIONS 1 45
10 ! 10 x 9 x 8 x 7 x 6 !
= -:-:-::-----:-:-
-:- = = 5040.
(10 - 4) ! 6!
Example 5. How many 6-digit numbers can be formed from the digits 0, 1, 2, 3, 4, 5, 6, 7,
if no digit is repeated.
Sol. There are 8 numbers are 6 are to be selected.
8! 8!
.. Total number of 6-digit numbers = 8 P6 = =
(8 6) ! 2 ! _
8x7x6x5x4x3x2!
= = 22560.
2!
5.7. PERMUTATION WITH RESTRICTIONS
The number of permutations ofn different objects taken r at a time in whichp particular
objects do not occur is n -P P r
The number of permutations of n different objects taken r at a time in which p particu
lar objects are present is n -p P r _p x rpp .
Example 6. How many 6-digit numbers can be formed by using the digits 0, 1, 2, 3, 4, 5,
6, 7, 8 if every number is to start with '30' with no digit repeated.
Sol. All the numbers begin with '30' . So, we have to choose 4-digits from the remaining
7-digits.
:. Total number of numbers that begins with '30' is
7p 7! 7x6x5x4x3!
= = = 840.
4 (7 - 4) ! 3!
Example 7. In how many ways 5 different microprocessor books and 4 different digital
electronics books be arranged in a shelf so that all the four digital electronics books are together ?
Sol. Consider the four digital electronics books as one unit. Thus, we have 6 units that
can be arranged in 6 I ways.
For each of these arrangements, 4 digital electronics books can be arranged among
themselves in 4 I ways.
:. Total number of arrangements in which all the four digital electronics books are
together is
= 6 I x 4 I = 720 x 24 = 17280.
Example 8. How many permutations can be made out of the letter of word "COMPU
TER" ? How many of these
(i) begin with C ? (ii) end with R ?
(iii) begin with C and end with R ? (iv) C and R occupy the end places ?
Sol. There are 8 letters in the word 'COMPUTER' and all are distinct.
:. The total number of permutations of these letters is 8 I = 40320.
1 46 DISCRETE STRUCTURES
(i) Permutations which begin with C.
The first position can be filled in only one way i.e., C and the remaining 7 letters can be
arranged in 7 I ways.
. . Total number of permutations starting with C are = 1 x 7 I = 5040.
(ii) Permutations which end with R.
The last position can be filled in only one way i.e., R and the remaining 7 letters can be
arranged in 7 I ways.
. . The total number of permutations ending with R are = 7 I x 1 = 5040.
(iii) Permutations begin with C and end with R.
The first position can be filled in only one way i.e., C and the last place can also be filled
in only one way i.e., R and the remaining 6 letters can be arranged in 6 I ways.
. . The total number of permutations begin with C and end with R is
= 1 x 6 I x 1 = 7 20 .
(iv) Permutations is which C and R occupy end places.
C and R occupy end positions in 2 I ways i.e., C, R and R, C and the remaining 6 letters
can be arranged in 6 I ways.
The total number of permutations in which C and R occupy end places is
= 2 I x 6 I = 1440.
5.S. PERM UTATIONS WHEN ALL OF THE OBJ ECTS ARE NOT DISTINCT
Theorem III. The number ofpermutations of n objects, of which n objects are of one
1
kind and n2 objects of another kind, when all are taken at a time is
n!
n] ! n2 !
Proof. Let us assume that the number of required permutations be K. Now consider a
single particular permutation of these K permutations, in which n, objects of one kind is
followed by n, objects of other kind.
Also, assume that all n, object are distinct from all n, objects.
So, number of permutations of n, objects taken all at a time is = n , Pn = n, I
,
Also, the number of permutations of n, objects taken all at a time is = n, Pn = n, I
,
By the fundamental principle of counting, these K permutations will give rise to n, I n, I
permutations by arranging the objects of one kind within the places occupied by them.
Therefore, K permutations will give rise to K. n, I n, I permutations.
n
For n distinct objects, the number of permutations is = p n = n I
n!
Therefore, K x n 1 ! n2 ! = n !
Example 9. Determine the number ofpermutations that can be made out ofthe letters of
the word 'PROGRAMMING'.
Sol. There are l l ietters in the word 'PROGRAMMING' out of which G's, M's and R's
are two each.
The total number of permutations is
11!
= -::-:-
---: ,---
:-c --:-
---:
11 x 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 !
= -----,-
-----,-
-::- ----:
-- ----:
:- ,---
:- --- -- = 4989600.
2!x2! x2! 2 x 1x2x 1x2!
Example 10. There are 4 blue, 3 red and 2 black pens in a box. These are drawn one by
one. Determine all the different permutations.
Sol. There are total 9 pens in the box out of which 4 are blue, 3 are red and 2 are black.
The total number of permutations
=
9! =
9x8x7x6x5x4! = 1080.
4!x3!x2! 4!x3x2x1x2x1
Example 11. How many different variable names can be formed by using the letters a,
a, a, b, b, b, b, c, c, c ?
Sol. There are total 10 letters out of which 3 are as, 4 are b's and there are 3 c's.
Total number of permutations
=
10 ! = 10 x 9 x 8 x 7 x 6 x 5 x 4 !
3 ! x 4 ! x 3 ! 3 x 2 x 1x 4 ! x 3 x 2 x 1
= 10 x 3 x 4 x 7 x 5 = 4200.
Example 12. How many 7-digits numbers can be formed using digits 1, 7, 2, 7, 6, 7, 6 ?
Sol. There are total 7-digits out of which 3 are 7's and 2 are 6's.
7!
.. Total number of permutations is = = 420.
3 I. x 2 I.
5.9. PERM UTATIONS WITH REPEATED OBJECTS
Theorem IV. Prove that the number of different permutations ofn distinct objects taken
r at a time when every object is allowed to repeat any number of times is given by n'.
Proof. Assume that with n objects we have to fill r place when repetition of objects is
allowed.
Therefore, the number of ways of filling the first place = n
The number of ways of filling second place = n
Example 14. How many 2-digits even numbers can be formed by using the digits 1, 3, 4,
6, 8 when repetition of digits is allowed ?
Sol. We have three even numbers and two odd number.
Thus, number of ways of filling unit's place = 3.
Number of ways of filling ten's place = 5.
:. Total number of two digits even numbers = 3 x 5 = 15.
Example 15. In how many ways can 5 software projects be allotted to 6 final year stu-
dents when all the 5 projects are not allotted to the same student ?
Sol. We have 5 projects and 6 students.
Each projects can be allotted in 6 ways.
Thus, the number of ways of alloting 5 projects is = 6 x 6 x 6 x 6 x 6 = 65 .
Number of ways in which all projects allotted to same student = 6.
Therefore, total number of ways to allocate 5 projects to 6 students = 65 - 6 = 7770.
or K _
_
n x (n - I) ! or K = (n - 1) I
n
Hence proved.
Example 16. In how many ways can these letters a, b, c, d, e, fbe arranged in a circle ?
Sol. There are 6 letters and hence the number of ways to arrange these 6 letters in a
circle is
= (6 - 1) I = 5I = 120.
Example 17. In how many ways 10 programmers can sit on a round table to discuss the
project so that project leader and a particular programmer always sit together ?
Sol. There are total 10 programmers but project leader and a particular programmer
always sit together. So, both become a single unit and hence there are (10 - 2 + 1) = 9 remains.
Thus, these 9 units can be arranged on round table in (9 - 1) I ways.
The two programmers i.e., project leader and a particular programmer can be arranged
in 2 I ways.
Therefore, the total number of ways in which 10 programmers can sit on a round table
IS
= (9 - 1) I x 2 I = 8Ix2I = 80640.
Example 18. Determine the number of ways in which 5 S
software engineers and 6 electronics engineers can be sitted at
a round table so that no two software engineers can sit together.
S S
Sol. There are 6 electronics engineers that can be ar·
ranged round a table in (6 - 1) I ways. There are 5 software
engineers and they are not to sit together so we have six places
E E
for software engineers and can be placed in 6 I ways as shown
in Fig. 5.2. S S
Therefore, total number of ways to arrange the engi·
neers on a round table is S
= (6 - 1) I x 6 I = 5 I x 6 I
1. Compute 4 5 6 7
!, !, !, !. Compute (a) 13!
2.
7!
11! (b) 10! .
3. Simplify (a) (n n!1) !
_
(b) (n +n !2) !
Findnif (a) nP �72, (b) nP4 �42 nP2, (c) 2nP2 � 2nP2 - 50.
Find the number2 of distinct permutations
4.
5. that can be formed all the letters of each word
(a) RADAR (b) UNUSUAL.
LONG ANSWER TYPE QUESTIONS
6. Therecan
ways areafour
manbustravel,
lines between A and B, and three bus lines between B and c. In how many
(a) By bus from A to C by way of B
(b) Round-trip by bus from A to C by way of B
(c) Round-trip by bus from A to C by way of B ifhe does not want to use a bus line more than once.
7. Find the number of ways that a party of seven persons can arrange themselves
(a) In a row of seven chairs (b) Around a circular table.
Intwohowbooks
manyof ways can four books of mathematics, threeallbooks
booksofofhistory
8. ) threesubject
booksareof chemistry,
sociology be arranged on a shelf so that the same together ?
9. How manyby (a)
followed automobile licensedigits
three different plates(b)canif the
be made if each
first digit is notplate
zero.contains two different letters
10. Thereonearecansixdrive
that roads between A and B and four roads between B and C. Find the number of ways
(a) From A to C by way of B (b) Round-trip from A to C by way of B
(c) Round-trip from A to C by way of B without using the same road more than once.
11. (a) Find the number of ways in which five persons can sit in a row.
(b) How many ways are there if two of the persons insist on sitting next to one another.
(c) Solve part (a) assuming they sit around a circular table.
(d) Solve part (b) assuming they sit around a circular table.
12. Find the number of ways in which five large books, four medium size books, and three small
books can be placed on a shelf so that all books of the same size are together.
13. (a) Find the number of permutations that can be formed from the letters of word ELEVEN.
(b) How many of them begin and end with E ?
(c) How many of them have the three Es together ?
(d) How many begin with E and end with N?
14. (a) In how many ways can three boys and 2 girls sit in a row ?
(b) In how many ways can they sit in a row if the boys and girls are each to sit together ?
(c) In how many ways can they sit in a row if just the girls are to sit together ?
15. (a) In how many ways can you arrange the letters in the word CONGRESS ?
(b) In how many ways, the two SiS not together ?
16. How many words can be obtained by arranging the letters of the word 'UNIVERSAL' in different
ways ? In how many of them
(a) E, R, S occur together?
(b) No two of the letters E, R, S occur together ? (P. U. B. Tech. May
T. 2008)
17. Find
dashes. the number of different messages that can be represented by sequences of 4 dots and 6
(P.T.U. B.TechMay 2013)
PERMUTATIONS AND COMBINATIONS 151
Answers
1. 4 � 24, 5 � 120, 6 � 720, 7 � 5040
I I I I
, r ! (n - r) ! r !
Thus, _ n
.e !
.:...:. .,
nCr = ---:- - ,---,- ) 1 :::; r ::; n.
(n - r) ! r !
Theorem VII. Prove that the number of combinations of n things taken all at a time is
one.
Proof. We know that
nCn = (n - nn)! ! n ! =
n!
--
O! n! =1 [ .: 0 I = 1]
Theorem VIII. Prove that the number of combinations ofn things taken none at a time
�s one.
Proof. We know that
nco n ! ,.......,. - -
n-
! --n! -
_
_ - -
- -
(n - O) ! O ! n ! O ! n ! - 1 [ ' : 0 1 = 1]
Theorem IX. Prove that nC r = nCr> 1 :::; r :::; n.
Proof. We know that n _
ncn - ' = n! n! n!
----:--,--- --, = n c "
-
n - (n - r) ! (n - r) ! (n - n + r) ! (n - r) ! r ! (n - r) !
Remark. If n Cr = nCm J then either m = r or m + r = n .
PERMUTATIONS AND COMBINATIONS 1 53
numbers 2010)
(n ; 1
(P.T.V. B. Tech. Dec
J
Proof. Here = n+ 1 C" Consider
nC + nC' =
n! n'-
+ .,--- ----:.,-;: ---"-! ---
,-1
r ! x (n - r) ! (r - 1) ! x (n -- r +--:-:
1)-:-!
n! + .,---�..,.-�� n!
=
r (r - I) ! x (n - r) ! (r -I)! x (n - r� + 1)� -�
(n-- r)!
n ! x (n - r + 1) + n ! x r n ! x (n - r + 1 + r)
= = -:--------:-'-
r (r - I) ! x (n - r) ! x (n - r + 1) r ! x (n - r + 1) !
=
n ! x (n + 1) = (n + I) ! n
= + 1C '
r ! x (n - r + I)! r ! x (n + l - r) !
ILLUSTRATIVE EXAMPLES
(a) When a particular programmer is included every time then the remaining = 5 - 1
= 4 programmers can be selected from the remaining = 10 - 1 = 9 programmers. This can be
done in 9 C, ways
9! '9 x 8 x 7 x 6 x 5 !
= = = 126.
4 ! (9 - 4) ! 4x3x2x 1x5!
(b) When a particular programmer is not included at all, then the five programmers
can be selected from the remaining = 10 - 1 = 9 programmers.
This can be done in 9 C5 ways
9! 9 x8x7x6x5x4!
= -::-:-c
:::- -:::-:- = = 126.
5 ! (9 - 5) ! 5 x4x3 x2 x 1x 4!
5 . 1 2. PIGEONHOLE PRINCIPLE (P. T. U. M G.A. 2005)
TheoremX. Show that ifnpigeons are assigned to m pigeonholes and m < n, then there
is at least one pigeonhole that contains two or more pigeons.
Proof. Let us label the n pigeons with the numbers 1 through n and the m pigeonholes
with the numbers 1 through m. Now starting with pigeon 1 and Pigeonhole 1, assign each
pigeon in order to the pigeonhole with the same number. So we can assign as many pigeons as
possible to distinct pigeonholes, but as we know that pigeonholes are less than pigeons i.e.,
m < n. Thus, there remains n - m pigeons that have not yet been assigned to a pigeonhole.
Hence, there is at least one pigeonhole that will be assigned a second pigeon.
Example 6. Show that ifany four numbers from 1 to 6 are chosen, then two ofthem will
add to 7.
Sol. Make three sets containing two numbers whose sum is 7.
A = {I, 6}, B = {2, 5}, C = {S, 4}. The four numbers that will be chosen assigned to the set
that contains it.
As there are only three sets, two numbers that are chosen is from the same set whose
sum is 7.
Example 7. Show that at least two people must have their birthday in the same month
if 13 people are assembled in a room.
Sol. We assigned each person the month of the year on which he was born. Since there
are 12 months in a year.
So, according to pigeonhole principle, there must be at least two people assigned to the
same month.
Example 8. Show that if any eight + ve integers are chosen, two of them will have same
remainder when divided by 7.
Sol. Take any eight +ve integers. When these are divided by 7 each have some remain·
der. Since there are eight integers and only seven distinct remainders because number 7 can
generate only 7 remainders, so two +ve integers must have same remainder.
Example 1. How many different B-bit strings are there that end with 0111 ?
Sol. An 8-bit strings that end with 0 1 l l can be constructed in 4 steps i.e.,
By selecting 1st bit, IInd bit, IIIrd bit and IVth bit and each bit can be selected in 2
ways.
Hence, the total no. of 8-bit strings that end with O l l l is
= 2 . 2 . 2 . 2 = 2' .
Example 2. How many 2-digits numbers greater than 40 can be formed by using the
digits 1, 2, 3, 4, 6, 7
(a) When repetition is allowed (b) When repetition is not allowed.
Sol. (a) When repetition is allowed
We have to find the numbers greater than 40. Therefore,
Ten's place can be filled up by 3 ways.
Unit' s place can be filled up by 6 ways.
. . The total number of 2-digits numbers greater than 40 is = 3 x 6 = 18.
(b) When repetition is not allowed
Ten's place can be filled up by 3 ways.
Unit' s place can be filled up by 6 ways.
. . The total number of 2-digits numbers greater than 40 is = 3 x 6 = 16.
Example 3. How many words can be constructed of three English alphabets ?
(a) When repetition of alphabets is allowed
(b) When repetition is not allowed.
Sol. There are 26 alphabets in English. Therefore,
(a) When repetition is allowed
First alphabet of word can be selected in 26 ways.
Second alphabet of word can be selected in 26 ways.
Third alphabet of word can be selected in 26 ways.
Hence, total number of words of three alphabets constructed is
= 26 x 26 x 26 = 17676.
Example 6. How many permutations can be made out ofthe letters ofthe word "Basic" ?
How many of these
(i) begin with B ? (ii) end with C ?
(iii) B and C occupy the end places ?
Sol. There are 5 letters in the word 'Basic' and all are distinct.
The number of permutations of these letters
= 5 I = 5 x 4 x 3 x 2 x 1 = 12 0.
(i) Permutations which begin with B
The first position can be filled in only one way i.e., B and the remaining 4 letters can be
arranged in 4 I ways.
. . Total number of permutations starting with B = 1 x 4 I = 24.
(ii) Permutations which end with C
The first position can be filled in only one way i.e., C and the remaining 4 letters can be
arranged in 4 I ways.
. . Total number of permutations ending with C = 4 I x 1 = 24.
1 58 DISCRETE STRUCTURES
(iii) Permutations in which B and C occupy end places
B and C occupy end positions in 2 I ways i.e., B, C and C, B and the remaining 3 letters
can be arranged in 3 I ways.
. . Total number of permutations in which B and C occupy end places in = 2 I x 3 I = 12.
Example 7. Show that nc, + nC, _ l = n + l C" where n :> r :> 1 and n and r are natural
numbers. (P.T.V. B.Tech. Dec. 2010)
Sol. Take L.R.S. of equation i.e.,
n c + n c, = n! n!
, - 1 r ! x (n r) ! + -;-
- (r - 1) ! x (n - r + C""7
----,
c-:-----;---
I) !
n! n!
= +
r(r - I) ! x (n - r) ! (r - I) ! x (n - r + I)(n - r) !
n ! x (n - r + 1) + n ! x r n ! x (n - r + 1 + r)
= -- ������� =
r(r - I) ! x (n - r) ! x (n - r + 1) r ! x (n - r + I) !
n ! x (n + 1)
= = n + ' C'
r ! x (n - r + I) !
Renee proved.
Example 8. In the 'Discrete Structures Paper' there are 8 questions. In how many ways
can an examiner select five questions in all if first question is compulsory.
Sol. Since the first question is compulsory, the examiner has to select 4 questions from
the remaining 7 questions.
Therefore, the number of ways to select 5 questions = 7 C,
7! 7x6x5x4!
= = = 35
4 ! x (7 - 4) ! 4 ! x 3 x 2 x I '
Example 9. Determine the number of triangles that are formed by selecting points from
a set of 15 points out of which 8 are collinear.
Sol. When we take all the 15 points, the number of triangles formed is 15C3 .
As 8 points lie on the same line, they do not form any triangle. Thus, sC3 triangles are
lost.
The total number of triangles produced is
15 C - 8C _ I5 ! 8! 15 x 14 x 13 x I2 ! 8x7x6x5!
3 -
3 3 x (15 - 3) ! =
3 !(8 - 3) ! 3 x I2 ! 3x2x Ix5!
I5 x I4 x I3 8 x 7 x 6
= = 910 - 56 = 854.
3 3x2x 1
Example 10. How many lines can be drawn through 10 points on a circle ?
Sol. As all the points on the circle are not collinear. Thus, no lines will lost.
. . The total number of lines drawn through a circle = lO C,
IO ! 10 x 9 x 8 !
= = = 45.
2 ! x (10 - 2) ! 2 x 1x 8 !
Example 11. Determine the number ofdiagonals that can be drawn byjoining the nodes
of octagon.
Sol. The number of lines that can be formed by joining 2 out of 8 points = s c,
8x7
= -= 28
-
2
PERMUTATIONS AND COMBINATIONS 1 59
40 ! 40 x 39 x 38 x 37 x 36 x 35 !
= = = 658008.
5 ! (40 - 5) ! 5 ! x 35 !
(b) There are 40 - 5 = 35 non-defective floppy disks out of which we have to select 5.
This can be done in 3 5C5 ways.
35 ! 35 x 34 x 33 x 32 x 31 x 30 !
= = = 324632.
5 ! (35 - 5) ! 5 x 4 x 3 x 2 x 1 x 30 !
(c) To select exactly three defective floppy disks out of total 5 we have 5 C3 ways and the
remaining 2 floppy disks can be selected in 3 5 C, ways.
Therefore, the total number of ways to select 5 floppy disks out of which exactly 3 are
defective = 5 C3 x 3 5 C,
5! 35 ! 5 x 4 x 3 ! 35 x 34 x 33 !
= -'-:-,,- :c-:- x = x --:--,--:
2 x 1 x - 33-:-
:-: !
-
3 ! (5 - 3) ! 2 ! x (35 - 2) ! 3 ! x 2 x 1
= 5950.
(d) There are five defective floppy disks out of which at least 1 must be selected. We
know that the total number of ways to select 5 floppy disks out of total 40 disks = ' D C5 .
Also, the number of ways to select 5 floppy disks with number one defective
= 3 5 C5 ·
Therefore, the total number of ways to select 5 floppy disks out of which at least one is
defective
= ' D C5 - 3 5 C5 = 611625.
Example 13. If a finite set A has n elements. Then the power set of A i.e., P(A) has 2n
elements.
Sol. By defination, p eA) is the set of subsets of A.
There are n c, subsets each consisting of one of the n elements of the given set.
There are n c, subsets each consisting of any two of the n elements of the given set
Similarly, there are n C3 subsets each consisting of any three of the n elements of the
given set
There are n Cn subsets each consisting of all the n elements of the given set. Also, there
will be one set {q,}
1 60 DISCRETE STRUCTURES
Total number of subsets = (n c , + ... + n cn> + 1
= n c o + n C + ... + n Cn
1
= (1 + l) n = 2n .
Remark. Number of proper subsets of A = 2n - 1, There is only one improper subset i.e.) the set
itself.
Example 14. (a) How many subsets of {I, 2, 3, ... 10j contain at least 7 elements ?
(P.T.U. B Tech Dec. 2005)
(b) If T = {I, 2, 3, 4, 5}. How many subsets of T have less than 4 elements ?
(c) A set contains (2n + 1) elements. If the number of subsets of this set which contains at
most n elements is 8192, find n. (P.T.U. B. Tech. December 2008)
(<1) A bag contains 6 white marbles and 5 red marbles. Find the number of ways in which
4 marbles can be drawn from the bag if
(i) They can be of any colour
(ii) 2 must be white and 2 red. (P.T.U. B.Tech May 2011)
Sol. (a) Let A = {I, 2, ... 1O} i.e., A has 10 elements.
There are lO C7 subsets each consisting of any 7 of the 10 elements of the given set.
There are lO CS subsets each consisting of any 8 of the 10 elements of the given set. There are
lO Cg subsets each consisting of any 9 of the 10 elements of the given set. There are lO C
lO
subsets consisting of all the 10 elements of the given set.
Total number of subsets containing at least 7 elements
= lO C7 + lO C + lO C + lO C
8 9 10
= lO C + lO C + lO C + lO C nC = nC
3 2 1 0 r n-r
= 120 + 45 + 10 + 1 = 176.
(b) The total number of subsets containing at least 4 elements (Proceeding as in part (a»
= 5 C, + 5 C = 5 C, + 5C = 5 + 1 = 6
5 O
Also, total number of subsets = 25 = 32
. . Required number of subsets containing less than 4 elements
= Total number of subsets - (Number of subsets containing at least 4 elements)
= 32 - 6 = 26.
6x5 5x4
Required number of ways = 6C, x 5C, = -- x = 150.
--
lx2 lx2
Example 15. Suppose that there are n people in a room (n :> 1) and they all shake hands
n (n - lJ
with one another. Show that hand shakes will have occured.
2
(P.T.V. B. Tech. Dec. 2005)
Sol. When two persons shake hands, it is counted as one hand shake.
.. Total number of hand shakes
= Number of ways of selecting 2 persons among n persons
n(n - 1) n(n - 1)
= n c, = = .
1.2 2
Example 16. A bag contains 6 white marbles and 5 red marbles. Find the number of
ways in which four marbles can be drawn from the bag if
(a) They can be any colour
(b) Two white and 2 red
(c) They are of same colour.
Sol. Total number of marbles = 6 + 5 = 1 1
(a) Number of ways in which four marbles (of any colour) can be choosen
1 1. 10. 9 . 8 .
= " C4 = = 330
1. 2 . 3 . 4
(b) Two white marbles can be choosen in 6 C, ways and 2 red marbles can b e choosen 5 C,
ways.
Total number of ways of choosing 2 white marbles and 2 red marbles
6.5 5.4
= 6 C, x 5 C = - x - = 150
' 1. 2 1.2
(c) The four marbles drawn are of either white colour or red colour.
The four white marbles can be choosen in 6 C4
The four red marbles can be choosen in 5C4
. . Total number of ways of choosing either 4 white marbles or 4 red marbles
= 6 C4 + 5 C 4 = 6 C, + 5C, = 15 + 5 = 20.
Example 17. How many committees of 5 with a given chair person can be selected from
12 persons ?
Sol. The chair person can be choosen in 12 ways. Once the chair person has been se·
lected, we have to chose 4 persons from remaining 11 persons. This can be done in " C4 ways.
Required number of ways = 12 x "C4
1 1 x 10 x 9 x 8
= 12 x = 3960.
lx2x3x4
Example 18. Seven members ofa family have total (2886 in their pockets. Show that at
least one of them must have at least (416 in his pocket.
Sol. Let us assume the members be the pigeonholes and the Rupees the pigeons. Now
2886 pigeons are to be assigned to 7 pigeonholes. Using the extended pigeonhole principle,
where n = 2886 and m = 7, we have [(2886 - 1) 17] + 1 = 41 6. Hence, there are 416 Rupees in one
member's pocket.
1 62 DISCRETE STRUCTURES
Example 19. How many people must you have to guarantee that at least 9 of them will
have birthdays in the same day of the week ?
Sol. Let us assume the days of week the pigeonholes and the people the pigeons. Now
we have 7 pigeonholes and we have to find pigeons. Using the extended pigeonhole principle,
we have
[(n - 1)17] + 1 = 9
[(n - 1)17] = 9 - 1 = 8
n-1=8x7
n = 56 + 1 = 57.
Thus, there must be 57 people to guarantee that at least 9 of them will have birthdays
in the same day of the week.
13. A woman has 11 close friends of whom six are also women
(a) In how many ways can she invite three or more to a party ?
(b) In how many ways can she invite three or more of them if she wants the same number of men
as women (including herself) ?
14. A student is to answer 10 out of 13 questions in an exam,
)
(a How many choices he has ?
(b) How many if he list answer the first two questions ?
ill
(c) How many if he must answer the first or second question but not both ?
(d) How many if he must answer exactly three out of the first five questions ?
(e) How many if he list answer at least three of the first five questions ?
ill
PIGEONHOLE PRINCIPLE
15. Find the minimum number of students in a class to be sure that three of them are born in the
same month.
16. Suppose a laundry bag contains many red, white and blue socks, Find the minimum number of
socks that one needs to choose in order to get two pairs (4 socks) of the same colour,
17. Find the minimum number of students need to gurantee that five of them belong to the same
class, (Freshman, phamore, Junior, senior)
student must
but thetakestudent
five classes
cannotfrom
takethree
areastwo
of study,
classesVarious
in any classes
18. A are offered in each
discipline, more than given area,
( )
a Using the Pigeonhole principle, show that the student will take at least one class in each area
(b) Using the inclusion-exclusion principle, show that the student will have to take at least one
class in each area,
19. Use Pigeonhole Principle to prove that an injection cannot exist between a finite set and a A
finite set B if the cardinality of is greater than the cardinality of B.
A
Answers
1. sC3 � 56 2. 6 C 5 C2 8C 4 14000
x X = 3. 7 C 5 C2 350
x =
4. 4.41 1021
x 5. ( )
3
a 23 - 1 7,� (b) 4. 6. (i) 37 1
(ii) 360 (iii) 6 7.252 8. 310
9. 18 10. 56 11. ( )
a 45 (b) 120
12. ( )
a 462 (b) 210 (c) 252 13. ( )
a 1981
(b) 325 14. (a) 286 (b) 165 )
(c 110
(d) 80 )
(e 276 15. 25 16. 10
17. 17.
Hints
4. The first committee can be selected in 385C5 ways, The second committee can be selected in 380C5
ways,
.. Required number of ways 385C5 380C5 ,
= x
6. (b) The word SUBSET contains 6 words with 2 S's.
Required number of words �2! , =
8. A question can be answered in 3 ways. Either by writingtrue-false or not to answer any question.
1st question can be answered in 3 ways
2nd question can be answered in 3 ways
10th question can be answered in 3 ways 0
.. Total number of ways = 3 3 3 ' 3 = 31
x x x
9. Required number of ways = 3C 1 2C 1 3C 1 , "
x X
As we know the cardinality of the set P is the number of unique elements in set P. It is
denoted as I P I and read as cardinality of set P. Some times it is also denoted by n(P).
1 67
1 68 DISCRETE STRUCTURES
Proof. In counting the elements of AuB, we first count those elements which are in A.
These are neAl. The only other elements of AuB are those elements which are in B, but
not in A. Since A and B are disjoint, . . No element of B is in A.
Hence there are nCB) elements which are in B.
.. n(AuB) = neAl + nCB).
Theorem II. Let P, Q and R are three finite sets. Then (P. T.U. B. Tech. Dec. 2010)
I PuQuR I = I P I + I Q I + I R I - I PnQ I
- I P nR I - I Q n R I + I P n Q nR I.
Proof. Using theorem I, we have
I P u (Q u R) I = I P I + I Q u R I - I P n (Q u R) I
= I P I + I Q I + I R I - I Q n R I - I P n (Q u R) I . . . (1)
As P n (Q u R) = (P n Q) u (P n R)
So I P n (Q u R) I = I P n Q I + I P n R I - I (P n Q) n (P n R) I
= I PnQ I + I PnR I - I PnQnR I OO
Putting (2) in (1), we get
I PuQuR I = I P I + I Q I + I R I - I PnQ I - I PnR I
- I QnR I + I PnQnR I
Theorem III. General Exclusion-Inclusion Principle.
Let A" �, ... Am denote finite sets. Let Sk be the sum of the cardinalities
n(Ai 1 n Ai n . . . n Aik) of all possible k-tuple intersections of the given m sets. Then
'
n(A, u A, u A3 . . . u Am> = s, - s, + S3 ... + (- l) m-1 sm
Remark 1. For 4, we have
m=
8 neA,) + n(A.,), + n(A3) + n(A4)
I
=
8 neA, + n(A �) + n(As n A4) + n(A4 n A,) + neA, n �) + n(A n A4)
832 neA, A." �) +2 n(A." n � n A4) + n(� n A4 n A,) + neA, n A." n A24)
= n A.,,) n
= n n
84 neA,
= n A." n A." n A,,)
Remark 2. A set of the form At n Ai As* A:; where each At is either A or �c, is called
II " " II
P 5 = Ac n B n C, P 6 = Ac n B n Cc,
P 7 = k n � n C, P8 = k n � n �
These eight fundamental products correspond to
the eight disjoint regions as shown in the Venn
diagrams of sets A, B, C. (see Fig. 6.2)
Fig. 6.2
I ILLUSTRATIVE EXAMPLES
=> n(M n P n B) = 70 - 65 = 5
(b) To find the number of students studying exactly one
of the subjects we use Venn·diagram (see Fig. 6.4)
5 study all three subjects
7 - 5 = 2 study Maths and Physics but not
all three
15 - 5 = 10 study Maths and Biology but not
all three Fig. 6.4
INCLUSION-EXCLUSION PRINCIPLE 1 71
I A I = [�]
5 0
= 250 ; [ ]
500
I B I = -- = 166 ;
3
I C I = [�]
5 0
= 100
I AnB I = [ ]
500
--
2x3
= 83
'
I An C I = [ ]
500
--
2x5
= 50
I BnC I = [ ]
500
3x5
= 33 ; I AnBn C I = [ ]
500
3x3x5
= 16.
[ �] [ ]
C denotes the set of number of integers divisible by 9.
1O 0 1000
So I A1 = = 200 ; I B I = = 142
[ ] [ ]
7
1000 1000
I C I = - - = 1 11 ; I AnB I = = 28
[ ] [ ]
9 5x7
1000 1000
I An C I = = 22 I BnC I = = 15
[ ]
5x9 ' 7x9
1000
I An B n C I = = 3.
5x7x9
(a) The number of integers divisible by 5, 7 and 9
I A u B u C I = 200 + 142 + 1 1 1 - 28 - 22 - 15 + 3
= 39l.
The number of integers not divisible by 5, nor by 7, nor by 9
= Total number of integers - number of integers divisible by 5, 7 and 9
= 1000 - 391 = 609.
(b) The integers divisible by all the three integers = 3
28 - 3 = 25 integers divisible by 5 and 7 but not by all the three
22 - 3 = 19 integers divisible by 5 and 9 but not by all the three
200 - 25 - 19 - 3 = 153 integers divisible by 5 but not by 7, not by 9.
Example 11. How many integers between 1 and 300 (inclusive) are :
(P.T.U. B.Tech. May 2010)
(a) divisible by at least one of 3, 5, 7 ?
(b) divisible by 3 and 5, not by 7 ?
(c) divisbile by 5 but neither by 3 nor by 7 ?
INCLUSION-EXCLUSION PRINCIPLE 1 75
[ 300]
neAl = 3 = 100 , nCB) = [-300]
5- 60 =
n(C) = [-300]
7- = 42
n(C n A) = [3300x 7 ]
-- = 14
n(A n B n C) = [3 x3005 x 7 ] =2
�
Cii) nCA B) nCA) + nCB), where A, B are finite disjoint sets.
u
5. Aandsurvey wasZee
550 like conducted
TV. Also,among 1000 people ofthese 595 like Metro channel, 595 like star Movies
395 of them like Metro channel and Star Movies
350 of them like Metro channel and Zee TV
400 of them like Star Movies and Zee TV
250 of them like Metro channel, Star Movies and Zee TV,
Find
(a) How many of them who not like Metro channel, do not like Star Movies and do not like Zee TV?
do
(b) How many of them who like Metro channel, do not like Star Movies and do not like Zee TV ?
6. Ingames
a class of 60 boys, 45 boys play cards and 30 boys play carrom,
? How many play cards only and how many plays carroms only ? How many boys play both
CPT. U. B.Tech. May 2008, 2010)
INCLUSION-EXCLUSION PRINCIPLE 1 77
7. Given that
U all students in a university
=
A Day students
=
B mathematics majors
=
C graduate students
=
Also � n(
n(U)who16,are000,mathematics ) � � �
A 9000, nCB) 300 and n(G) 1000, Assume that the number of day
students
number of day graduate studentsmajorsis 700.isDetermine
250, 50 of which are graduate
the number students,
of students who areand the total
(a) evening students
(b) non-mathematics majors
(c) under graduate (day or evening)
(d) day graduate non-mathematics majors
(e) evening graduate students
if) evening graduate mathematics majors
(g) evening under graduate non-mathematics majors.
8. In a class of 80 students, 50 students know English, 55 know French and 46 know German. 37
students
none of theknow EnglishFind
languages. and French, 28 students know French and German, 7 students know
)
(a How many students know all the three languages ?
(b) How many students know exactly two languages ?
)
(c How many know only one language ?
9. Among integers 1 to 1000
( )
a How many of them are not divisible by 3 nor by 5 nor by 7 ?
(b) How many are not divisible by 5 or 7 but divisible by 3 ?
10. It is known that in a university, 60% of teachers play tennis, 50% play bridge, 70% jog, 20% play
tennis andjogbridge,
and play40%tennis
play bridge and jogJustify
and 30%
teachers and bridge. this play
claim.tennis and jog. It is claimed that 20%
Answers
L (a) (,) 12 (ii) 18 (iii) 2 (b) (,) 450 (ii) 325
2, (a) 146 (b) 22 3, ( )
a 5 (b) 4 ()
c2
(d) 4 (e) 6 (/) 11 (g) 23 (h) 2.
5, ( )
a 155 (b) 100 15, 30, 15,
6,
7, ( )
a 7000 (b) 15700 ()
c 15000 (d) 650 (e) 300
(/)and (g) cannot be determined with the given information.
8, ( )
a 12 (b) 54 (c) 7
9, ( )
a 457 (b) 229 10. The claim is not true.
Hints
L (a) � �
(ii) n(P -B) n(P) - n(P n B) 30 - 12 18 �
� �
(ii,) nCB - P) nCB) -n(P n B) 14 - 12 2 �
1 78 DISCRETE STRUCTURES
(b) 20 watch all the three games.
Fig. 6.7
Number of people watch exactly one of the three games 190 + 95 + 40 325.
= =
3.
2
Fig. 6.8
5. (a) Number of People who like at least one of the channels
�
n (M u S u Z) n(M) + n(S) + n(Z) - n(M n S) - n(S n Z) - n(Z n M) + n(M n S n Z)
595 + 595 + 550 - 395 - 350 - 400 + 250 845
� �
Required
Zee TV 1000of-845
..not like number People 155.
who do not like Metro channel, do not like Star Movies, and do
� �
8. � � � �
Given n(A) 50, nCB) 55, n(G) 46, n(A n B) 37, nCB n G) 28, n(A n G) 25. � �
n(A u B u C) number of students knowing none of the language 7
= =
� n (u) -n(A u B u G) 7 �
� �
80 -n(A u B u G) 7 n(A u B u G) 73 � �
)
(a Number of students knowing all the three languages is given by n(A B C) II II
�
Now, n(A u B u G) n(A) + nCB) + n(G) - n(An B) -nCB n G) - n(G n A) + n(An B n G)
=:::} n(A B C) 12. Hence, there are 12 students who know all the three languages.
II II =
(b) Using Venn diagram, students knowing exactly two languages
� n(A n B) + n (B n C) + n(A n C) - 3 X n (A n B n C) A B
� 37 + 28 + 25 - 3 X 12 � 54.
(c) language
Using Venn0 +diagram,
2 + 5 number of students knowing only one
= = 7.
n(A) � [ 1000J
-
· 1000J · 1000J
3- � 333, nCB) � [ 5- � 200, n(G) � [ 7- � 142
- -
(a) The number of integers that are not divisible by 3 nor by 5 nor by 7
� n(A n B n C) � n(A u B u C) � U - n(A u B u C) (1)
But, n(A u B u G) � 333 + 200 + 142 - 66 - 47 - 28 + 9 � 543
:. From (1), n(A n B n � 1000 - 543 � 457
C)
(b) Number of integers that are not divisible by 3 but not by 5 nor by 7
�n(A n B n C) n(A n B u C ) n(A - B u C )
� �
7 AN D GEN ERATING
FUNCTIONS
7. 1 . INTRODUCTION
In this chapter) we will discuss the formation of recurrence relations and their solutions.
The closed form expressions of recurrence relations and its solutions using generating functions
is also discussed in this chapter.
7.2. RECURRENCE RELATIONS (P.T.U. B.Tech. Dec. 2006)
Let S be a sequence of numbers. A recurrence relation on S is a formula that relates all,
but a finite number of terms of S, to previous terms of S.
For e.g the Fibonacci sequence is defined by the relation.
.•
I ILLUSTRATIVE EXAMPLES
=-
3 3 K-1 + - 2K+l +
K- 1 ... (2)
' 2 '
Changing K to K - 2 in (1), we get
S(K - 2) = 3 K-3 + 2 K-1 + K - 2
= _ ..!c . 2K+l +
3 - 2K ... (4)
2
Eliminating 3K-1 from (2) and (3), we get
S(K - 1) - 3S(K - 2) = G-f) 2K+l +
K - 1 - 3(K - 2)
1
4
5 (
= _
4K + -
3 ' _ 3)K ... (2)
2 '
Changing K to K - 2 in (1), we get
S(K - 2) = 2 . 4K-2 - 5 . (- 3) K-2 = 2 . 4K . 4-2 - 5 . (- 3) K . (- 3)-2
.!c
= . . 4 K _ � . ( _ 3) K ... (3)
8 9
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 1 83
335 . (
Eliminating 4K from (1) and (2) , we get
S(K) - 4S(K _ 1) 230 . (
= _ 5 . (_ 3) K _ _ 3) K = _ _ 3) K ... (4)
= � -1 a � - ..!5 1
n n
( )f[
.fn = J5 1 -
2 J [
1 +-..!5
- - -2- 1f ) IS the requlre
1-J..!5 .
. d soIutlOn.
1
Example 9. Solve the recurrence relation tn = 4(tn _1 - tn _ 2 ), subject to initial conditions
tn = 1 for n = 0, 1.
Sol. Given equation is tn - 4tn + 4tn _ 2 = 0
-1
Its order = n - (n - 2) = 2
The characteristic equation is a2 - 4a + 4 = 0 => (a - 2)2 = 0 => a = 2, 2
The solution is given by tn = (C, + C2n)2n
Using tn = 1 for n = 0 in (1), we get 1 = C,
Using tn = 1 for n = 1 in (1), we get 1 = (1 + C�2 => C2 = - "2
1
( �n) 2n = (2 - n) 2n
tn = 1- -1
, is the required solution.
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 1 87
Example 10. Given that white tiger population of Orissa is 30 at time n = 0 and 32 at
time n = 1. Also the increase from time n - 1 to time n is twice the increase from time n - 2 to
time n -1. Find the recurrence relation and solve it for growth rate of tiger.
{
Sol. Given initial conditions are
30, n� 0
tn = 32, n� 1
3tn_1 - 2tn_2 , n> 1
n - 1 to time n is tn - tn _ I "
I
Increase from time
Increase from time n - 2 to time n - 1 is tn -1 - tn _ 2'
According to given,
tn - tn _ 1 = 2(tn _1 - tn _ )
::::::} tn = 3tn _ 1 - 2tn _ 2
For n > 1, the recurrence relation is tn - 3tn _ 1 + 2tn _ 2 = 0
The characteristic equation is
a2 - 3a + 2 = 0 => a2 - 2a - a + 2 = 0
=> (a - 1) (a - 2) = 0 => a = 1, 2
. . The solution is tn = C, + C2 2 n
For n = 0, 30 = C, + C2 ... (1)
For n = 1, 32 = C, + 2C2 ... (2)
Solving (1) and (2), we get C, = 28, C2 = 2
. . The required solution is tn = 28 + 2n + 1 .
l ± ..j1+4 l±
s= 2 - ---
2
.J5
Therefore, the required solution of the given homogeneous recurrence relation is
h = C, \ [
1 .J5
+ C
1- J5
2 2. r [ r
Example 12. Find the solution of the homogeneous recurrence relation ar 4 + 2ar 3 + +
+ 3ar 2 + 2ar 1 + ar = o.
+ +
2 C2 = 2 - 1 = 1 => C2 = "2
1
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 1 89
an = {an-12,+ 3� nn ?-= 2l
Sol. For n � 2) an = an _ 1 + 3 ... (1)
Changing n to n - 1 in (1), we get
an_1 = an _ 2 + 3 = an _ 2 + 3(1) ... (2)
Using (2) in (1), we get
an = (an _ 2 + 3) + 3 = an_2 + 6 = an _ 2 + 3(2) ... (3)
Changing n to n - 2 in (1), we get
an _ 2 = an _ 3 + 3 ... (4)
Using (4) in (3), we get
an = (an _ 3 + 3) + 6 = an _ 3 + 9 = an _ 3 + 3(3) ... (5)
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 191
Proceeding in this way) we get
an = an _ 4 + 3(4)
an = an _ i + 3 (i)
Repeating this process for i = n - 1 times) we get
an = a, + 3(n - 1)
= 2 + 3(n - 1) I a, = 2
= 3n - 1) is the required solution.
Example 18. Solve the recurrence relation
Hn = {Hn-1 + (n - l), n ?- 2
O� n=1
by substitution (iterative) method.
Sol. For n ?- 2, Hn = Hn _ 1 + n - 1 ... (1)
Changing n to (n - 1) in (1), we get
Hn _ 1 = Hn _ 2 + n - 2 ... (2)
Using (2) in (1), we get
Hn = (Hn _ 2 + n - 2) + n - 1
= Hn _ 2 + [(n - 2) + (n - l)] ... (3)
Changing n to n - 2 in (1), we get
Hn _ 2 = Hn _ 3 + n - 3 ... (4)
Using (4) in (3), we get
Hn = Hn _ 3 + [(n - 3) + (n - 2) + (n - 1)]
Proceeding in this way) we get
Hn = Hn - r. + {(n - i) + (n - i - I) + ... + (n - 3) + (n - 2) + (n - l)l
For i = n - 1) we get
Hn = H, + [1 + 2 + 3 + ... + (n - 3) + (n - 2) + (n - 1)]
= 0 + L(n - 1) = (n -2 l)n is the required solution.
'
(a) t
n
=
{t -11 , nn _ l
• �0
>
n +n
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 1 93
r
(ii) S(K) = 6 (� (iii) S(K) = (2 + K) 10K
10. (a) t = 3n
n n
1
(b) t = __ (_ 4 + ../15)n -
2../15
�
2" 15
(- 4 - ../15)n
ILLUSTRATIVE EXAMPLES
2
=> C = 6- - = -
1
3 9
2 2
(2) gives (K) = � . (- 5)K + �2 , is the required solution.
S
2
Example 2_ Solve the following recurrence relation
T(K) - 7T(K - 1) + lOT(K - 2) = 6 + 8K
where T(O) = 1, TO) = 2. (P.T.U. B.Tech. Dec. 2005)
Sol. The given equation is
T(K) - 7T(K - 1) + 10T(K - 2) = 6 + SK ... (1)
Its order = K - (K - 2) = 2
The characteristic equation is a2 - 7a + 10 = 0
a2 - 5a - 2a + 10 = 0 => a(a - 5) - 2(a - 5) = 0
(a - 5) (a - 2) = 0 => a = 5, 2
The homogeneous solution of (1) is given by
Th (K) = C , . 5 K + C2 . 2 K
To find the particular solution of (1), we observe that R.H.S. of (1) is a linear equation of
the form 6 + SK. Therefore, assume the particular solution of (1) as
Tp(K) = do + d,K
Here Tp(K - 1) = do + d,(K - 1)
Tp(K - 2) = do + d, (K - 2)
Using all these in (1), we get
do + d,K - 7(do + d,(K - 1» + 10 (do + d,(K - 2» = 6 + SK
=> (do - 7do + 7d, + 10do - 20d,) + (d, - 7d, + 10d,) K = 6 + SK
4do - 13d, + 4d,K = 6 + SK ... (2)
1 96 DISCRETE STRUCTURES
Equating the coefficients of constant term, in (2), we get
4do - 13d, = 6 ... (3)
Equating the coefficient of K in (2), we get
4d, = 8 => d, = 2
. . From (3), 4do - 26 = 6 => 4do = 32
do = 8
Tp(K) = 8 + 2K
Hence the general solution of (1) is given by
T(K) = Th(K) + Tp(K)
= C, . 5K + C2 . 2 K + 8 + 2 K ... (4)
Given T(O) = 1 gives 1 = C, + C2 + 8 ... (5)
T(l) = 2 (4) gives 2 = 5C, + 2 C2 + 10 ... (6)
Multiplying (5) by 2 and subtracting from (6), we get
o = - 3C , + 6 => C, = 2
From (5), 1 = 2 + C2 + 8 => C2 = - 9
. . (4) reduces to T(K) = 2 . 5K - 9 . 2K + 8 + 2K, is the required solution.
Example 3. Find the general solution of the following recurrence relation
S(K) - 3S(K - 1) - 4S(K - 2) = 4K (P.T.U. B.Tech. May 2010)
Sol. The given equation is
S(K) - 3S(K - 1) - 4S(K - 2) = 4K ... (1)
Its order = K - (K - 2) = 2
The characteristic equation is a2 - 3a - 4 = 0
a2 - 4a + a - 4 = 0 => a(a - 4) + (a - 4) = 0
(a + 1) (a - 4) = 0 => a = - 1, 4
The homogeneous solution is given by
Sh(K) = C , (- l)K + C24K ... (2)
Particular solution. Corresponding to the term 4K, [R.H.S. of (1)], we assume the
general form of the solution as do 4K but due to occurence of this term in equation (2), we
multiply this by suitable power ofK so that none of the term will occur in equation (2). Hence,
we multiply by K. Hence the particular solution of (1) becomes as
Sp(K) = doK 4K
Here Sp(K - 1) = do(K -1) 4K-I
Sp(K - 2) = do(K - 2) 4K-2
Using all these values in (1), we get
doK 4K - 3do(K - 1) 4K-I - 4do(K - 2) 4K-2 = 4K
Dividing by 4K-2, we get
16 Kdo - 12do(K - 1) - 4do(K - 2) = 16
do(16K - 12K + 12 - 4K + 8) = 16
20do = 16 => do = 4/5
S P(K) = � K 4K
5
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 1 97
The general solution of (1) is given by
A1 _
17
= - �3 ) A2 = �9 ) A3 _ _
27
_
- 2A2 (r + 1)2 + A, r3 + A2 r2
= A, (r3 + S + 6r2 + 12r) + A2(r2 + 4 + 4r)
- 2A, (r3 + 1 + 3r2 + 3 r) - 2A2(r2 + 1 + 2r) + A, r3 + A2 r2
= (12A, + 4A2 - 6A, - 4A)r + (SA, + 4A2 - 2A, - 2A)
= (6A,)r + (6A, + 2A) ... (3)
Equating equation (3) with R.R.S. of equation (1), we get
1
6A, = 3 A, = "2
. .
6A, + 2A2 = 5
1
Therefore, the particular solution is ar(p) = 2' T3 + r2 .
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 1 99
Example 8. Find the particular solution of the recurrence relation
ar + 2 + ar + 1 + ar r . 2r.
=
. .. (1)
Sol. Let us assume the general form of the solution a,(p) = (Ao + A, r) . 2'
Now, put this solution in the L.H.S. of equation (1), we get
ad 2 + ad 1 + a, = 2 [Ao + A, (r + 2)] + 2d 1 [Ao + A, (r + 1)] + 2' (Ao + A, r)
d 2
= 4. 2' (Ao + A,r + 2A,) + 2 . 2' (Ao + A, r + A,) + 2' (Ao + A, r)
= r. 2'(7A,) + 2' (7Ao + 10A,) ... (2)
Equating equation (2) with R.H.S. of equation (1), we get
7A, = 1 A, = 71
6A, = 1 A1 = .!.6
- 6A, + 2Ao = 1
Therefore, the particular solution is
+1
( )
ar(p) = r2. 2' % + 1
Example 10. Solve S(n) - 6S(n - 1) + 9S(n - 2) 3n = (P.T.V. B. Tech. May 2010)
Sol. Given equation is S(n) - 6S(n - 1) + 9S(n - 2) = 3.3n ... (1)
Its order = n - (n - 2) = 2
200 DISCRETE STRUCTURES
The characteristic equation is a2 - 6a + 9 = 0
(a - 3)2 = 0 => a = 3, 3
. . The homogeneous solution of (1) is given by
Sh (n) = (C, + C2n) 3n ... (2)
n + 1
Corresponding to the term 3 [R.H.S. of (1)], we assume that general form of the
solution as do 3n+1 , but due to occurence of this term in equation (2), we multiply this by
suitable power of n so that none of the term will occur in equation (2). Thus multiply by n2•
Hence the particular solution of (1) becomes as
Sp(n) = do n23n
Here Sp(n - 1) = do(n - 1)2 3n-1
Sp (n - 2) = do(n - 2)2 3n-2
Using all these in (1), we get
don23n - 6do(n - 1)2 3n-1 + 9do (n - 2)2 3n-2 = 3 . 3n
Dividing by 3n-2, we get
9don2 - 18 do(n - 1)2 + 9do(n - 2)2 = 27
=> do[9n - 18n2 - 18 + 36n + 9n2 + 36 - 36n] = 27
2
=> 1
do [54] = 27 => do = '2
Sp(n) = � n2 . 3n
2
The general solution is given by
S(n) = Sh(n) + Sp(n) = (C, + C2n) 3n + '21 n2 . 3n.
Example 11. Solve the following recurrence relation
Q(J) - Q(J - 1) - 12Q(J - 2) = (- 3y + 6 . 4J
Sol. Given equation is
Q(J) - Q(J - 1) - 12Q(J - 2) = (- 3)" + 6 . 4J ... (1)
Its order = J - (J - 2) = 2
The characteristic equation is a2 - a - 12 = 0
a2 - 4a + 3a - 12 = 0 => a(a - 4) + 3(a - 4) = 0
(a - 4) (a + 3) = 0 => a = 4, - 3
The homogeneous solution of (1) given by
Qh (J) = C,4J + C2(- 3)J ... (1)
To find the particular solution of (1), we observe that the R.H.S. of (1) is a combination
of the terms (- 3)J and4J. But these terms also occur in the homogeneous solution (1). Therefore
we assume the particular solution of (1) as
Qp(J) = doJ(- 3)" + d,J 4J
Here Qp (J - 1) = do (J - 1) (- 3)J-1 + d,(J - 1) 4J-1
Qp(J - 2) = do(J - 2) (- 3)J-2 + d,(J - 2) 4J-2
Using all these values in (1), we get
doJ (- 3)J + d,J 4J - [do(J - 1) (- 3)J-1 + d,(J - 1) 4J-1] _ 12 [do(J - 2) (- 3)"-2 + d,(J - 2) 4J-2]
= (- 3)J + 6 . 4J
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 201
do (- S)"-2 [9J + 3(J - 1) - 12(J - 2)] + d, 4J-2 [16J - 4(J - 1) - 12(J - 2)] = (- S)" + 6 . 4J
or do(- S)"-2 (- 21) + d, 4J-2 (28) = (- 3)" + 6 . 4J
or Equating the coefficients of (- 3)J, we get -
21 do = 1 => d - � =
9 0
7
Equating the coefficient of 4J, we get => d1 =
96 = 24
28 7
=> d22K-2(8) = 2K
8d2 = 1
4
. . . (5)
do(1 - r) = a => d0 = _a
_
1-r
Sp (K) = -a
1-r
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 203
. . . (2)
1 - r IS
a(l - rK) . .
= . d soIutlOn.
the requlre
where {a,
r = O, 1,5
f(r) = 6, otherwise
given that ao = a1 = 0. (P.T.U. B.Tech. Dec. 2006)
Sol. Given equation is
8 ( r) + 5 8 (r - 1) + 6 8 ( r - 2) = f(r) ... (1)
Its order = r - (r - 2) = 2
The characteristic equation is a2 + Sa + 6 = 0
a2 + 3a + 2a + 6 = 0 => a(a + 3) + 2(a + 3) = 0
(a + 3) (a + 2) = 0 => a = - 3, - 2
The homogeneous solution of (1) is given by
8 h ( r) = C , (- 3)' + C2 ( - 2)'
To find the particular solution,
Case I. When r = 0, 1, 5, then from given, we have f(r) = O. Consequently, 8p(r) = 0
Hence the general solution of (1) is given by
8(r) = 8h(r) + 8p(r) = C, (- 3)' + C2 (- 2)'
Case II. When r '" 0, 1, 5, then we are given f(r) = 6
. . Let 8p(r) = do
=> 8p(r - 1) = do
8p(r - 2) = do
Using all these in (1), we get do + 5do + 6do = 6
=> 12do = 6 => do = 1/2
8p(r) = "21
The required general solution is given by
204 DISCRETE STRUCTURES
Example 15. Solve S(K) - 4S(K - 1) + 3S(K - 2) = K2 (P.T.U. B.Tech. May 2012)
Sol. Given equation is S(K) - 4S(K - 1) + 3S(K - 2) = K2 . . . (1)
Its order = K - (K - 2) = 2
The characteristic equation is a2 - 4a + 3 = 0
a2 - 3a - a + 3 = 0 => a(a - 3) - (a - 3) = 0
(a - 3) (a - 1) = 0 => a = 1, 3
The homogeneous solution of (1) is given by
K K
Sh(K) = C , . 1 + C2 3 = C , + C 2 3 K . . . (2)
Let the particular solution of (1) is given by
Sp(K) = K(Ao + A, K + A2K2)
(We have multiplied by K since (2) contains the constant term)
3
=> Sp(K) = AoK + A , K2 + A2K
.. Sp(K - 1) = Ao (K - 1) + A , (K 1 ) 2 + A2 (K - 1) 3
_
Sp(K - 2) = Ao (K - 2) + A, (K - 2) 2 + A2 (K - 2) 3
Using all these in (1), we get
3 3
AoK + A, K2 + A2K - 4[Ao (K - 1) + A , (K - 1) 2 + A2 (K - 1) ]
+ 3[Ao (K - 2) + A, (K - 2) 2 + A2 (K - 2)3] = K2
=> Ao [K - 4(K - 1) + 3(K - 2)] + A, [K2 - 4K2 + SK - 4 + 3K2 - 12K + 12]
3 3 3
+ A2 [K - 4K + 12K2 - 12K + 4 + 3K - lSK2 + 36K - 24] = K2
- 2Ao + A, [- 4K + S] + A2 [- 6K2 + 24K - 20] = K2
Equating the coefficient of powers of K, we get
Coefficient of K2 , A2 = - -
1
6
Coefficient of K, - 4A, + 24A2 = 0
- 4A , - 4 = 0
A, = - 1
20
Coefficient of constant term, - 2Ao + SA , - 20A2 = 0 => - 2Ao - S + - = 0
6
2Ao = _ 4S + 20 2S
=> Ao = _ 14 = _ 7...
6 6 6 3
ILLUSTRATIVE EXAMPLES
Example 1. Consider a sequence <8n> defined by 8(n) = 2", n :> O. Obtain its generating
function. (P.T.V. B.Tech. May 2010)
Sol. By definition, the required generating function is given by
� � �
1 a
=
1 - 2z
S
Sum of infinite G.P. is . - -
�
l-r '
where a= First term, r = common ratio
206 DISCRETE STRUCTURES
Example 2. If S(n) = ban, n :> 0, obtain its generating function.
(P.T.V. B.Tech. May 2012)
Sol. By definition, the generating function is given by
� � �
z) = L L -
S(n) zn
zn = -
=
1 +- Z +-
Z2 + -
Z3 + ..... . =
n=O n ! O ! I! 2 ! 3 !
G(S,
n=O
Z2 Z3
= 1 + z + - + - + ...... = = e2 .
2! 3!
Example 5. Obtain partial fraction decompositions for the expression
G/'"S z) = 1 - 611z- 29z
+ 30z2 I.
and identi'
y the sequence having the expression asgeneratingfunction.
6 - 29z = 6 -"::":
29z
"':-
Sol. Consider G(S , z) = 2
l- 11z + 30z "'3"'0- z;;-'---'6z - 5-
2 z +""'l
=
6 - 29z 6 - 29z
= -c::-----:-c-c--,,-
6z(5z - 1) - (5z - 1) (6z - 1) (5z - 1)
_ 6:..:- 29:..:=Z _
=_ +
A __
B
Let -,-:- :-:-= ----:-:-
(6z - 1) (5z - 1) 6z - 1 5z - 1 ... (1)
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 207
Multiplying (1) by (6z - 1) (5z - 1), we get
6 - 29z = A(5z - 1) + B(6z - 1) ... (2)
Put 5z - 1 = 0 in (2), we get 6 - 2 = B : (� ) -1 => B = 1
= 7.6n - 5n
b
Then G(S, z) = --
1 - az
Sen) = n + 1, n � 0 G(S, z) =
1
(1 - z)
2
Sen) = (n + 1) bn , n � 0 G(S , z) =
(1 - bz)
1
2
Z
Sen) = n, n � O G(S, z) = 2
(1 - z)
1
Sen) = - ' n �
n .,
0 G(S, z) = e<
S(n) ::::
nCr. 0
:::; r :::; n G(S, z) = (1 + z)n
7.15. SOLUTION OF RECURRENCE RELATION BY THE METHOD OF GENERATING
FUNCTIONS
Recurrence relation can also be solved by using the generating functions. Let the recur
rence relation is
+ 1 +
Sen) C , Sen - ) C 2 S(n - ) 2 + ...... +
C S(n - K) = fen), n :> K
zn
k
Multiplying both sides by and summing up from n = K to where K = order of the =,
L S(n) zn + C, L zn + C2 L zn + ...
�
S(n - 1) S(n - 2)
n=K n=K n=K
zn = L f(n)zn
� �
+ CK L S(n - K)
n=K n=K
S(n)zn ,
�
Writing each term in the form L we will get the solution in terms of G(S, z).
n=O
Using the results of 7.13, we can find the required solution. The following examples illustrate
the concepts more clearly_
Example 6. Solve the recurrence relation S(K) - 3S(K - 1) - 2 = 0, K?- 1, where S(O) = 1,
by using generating functions.
Sol. Given equation is S(K) - 3S(K - 1) = 2 ... (1)
zK, we get
Multiplying (1) by
S(K) zK - 3S(K - 1) zK = 2zK
Summing up for all K ?- 1 , we get, (order = K - (K - 1) = 1)
� � �
= S(O) + L S(K) zK
K=l
�
� 2 3 z
L... zK = z + z + z + ...... 00 = _
_
1-z
K=l
Using all these in (2), we get
2z
G(S, z) - S(O) - 3 zG(S, z) = 1-z
--
RECURRENCE RELATIONS AND GENERATING FUNCTIONS 209
(1 - 3z) G(S, z) = -- 2z
1-z
+1 I S(O) =1
2z + 1- z z+l
= =
1-z 1-z
1+z
G(S , z) = ... (3)
( 1 - z ) (1 - 3z)
Consider
l+z
---'--- = -- +
(1 - z) (1 - 3z)
A
1-z
B
1 - 3z
-- ... (4)
Example 7. Find the generating function from the recurrence relation given by
S(K) - 6S(K - 1) + 5S(K - 2) = 0 where S(O) = 1, S(1) = 2.
(P.T.V. B.Tech. Dec. 2010)
Sol. Given recurrence relation is
S(K) - 6S(K - 1) + 5S(K - 2) = 0 ... (1)
Its order = K - (K - 2) = 2
Multiplying (1) both sides by zK and summing up from K = 2 to =, we get
� � �
L S(K) zK = G(S, z) - 1 - 2z
[� )
K =2
[ ) [� )
,
= z(G(S, z) - 1) = zG(S, z) - z
210 DISCRETE STRUCTURES
� � �
= 1 +z+ L S(n) zn
n =2
�
L S(n) zn = G(S, z) - 1 - z
n =2
� � �
[ ]
n =2 n =2 n =l
=z [� ]
S(n) zn - S(O) = z[G(S, z) - 1] = zG(S, z) - z
2z + 1
G(S, z) = -'--=-::"":"0-
":
1 + z - z2 )
is the required generating function.
Example 9. Use generating functions to solve the recurrence relation.
ak = ak_1 + 2ak_2 + 2k where ao = 4, a 1 = 12. (P.T.U. B.Tech May 2010)
Sol. Given recurrence relation can be written as
ak - ak_ 1 - 2ak_2 = 2k . . . (1)
Multiplying both sides of (1) by zk and summing up from k = 2 to k = =
, we get
�
-� -2 � �
DO DO DO DO
k k k
L..J ak Z L..J ak-l Z L..J ak - 2 Z = L..J 2k Z
k
. . . (2)
Consider
k=2
G(S, z) = L
�
k=2
ak z
k
=
k=2
ao + a,z + L
� k=2
ak z
k
= 4 + 12z + L akz k
k=O k=2 k=2
k
L ak z = G(S, z) - 4 - 12z . . . (3)
k=2
(Changing k to k+ 1)
= Z [ aD +
k�
f ak z
k
- aD J [ f 4J
= Z
k=O
ak z
k
- = zG(S, z) - 4z
. . . (4)
Further (Changing k to k + 2)
. . . (5)
Also = 1 + 2z + L 2k Zk - 1 - 2z = 1 + 2z + L 2k Zk
k=2 k=O
3
= 1 + 2z + L (2z)' = 1 + 2z + (1 + 2z + (2z)2 + (2z) + . . . =
)
k=O
= 1 + 2z + --
1
1 - 2z . . . (6) Is� = __
1 -r
a
1
G(S, z) - 4 - 12z - (zG(S, z) - 4z) - 2(z2 G(S, z» = 1 + 2z + --
1 - 2z
1 1
(1 - z - 2z2) G(S, z) = 1 + 2z + -- + 4 + 12z - 4z = 5 + 10z + --
1 - 2z 1 - 2z
5(1 + 2z) (1 - 2z )
=> (2z - 1) (z + 1) G(S, z) =
(1 _ 2z )
212 DISCRETE STRUCTURES
,
G (S z) = -----
5(1 - 4z 2 ) + 1
-' --'----'----
-- = -,------,-:-
- --,-:--
6 - 20Z2
,-,- . . . (7)
(2z _ 1)2 (Z + 1) (z + 1) (2z - 1)
Consider
6 - 20Z 2 = A + B + C
-
(Z + -
- 2z'::'-
1)-'(:":
":' z-+-1 -
_ 1)72 - 2z- _ 1)72
--1 -(2-z-''- . . . (8)
6 = A - B + C = -- - B + -
14 2
9 3
14
B = -- + - - 6 =
2 -14 + 6 - 54 =
-62
9 3 9 9
From (7) G(S, z) = - 14 1 62 1 2
"9 ' Z + 1 - "9 ' 2z - 1 + "3 '
1
(2z _ 1)2
Hence) the required solution is
ak = - 149 ( _1)k + 62
9
2k + �3 . (k + 1) 2k
=1 +z+ L F(K) ZK
K =2
�
L F(K) ZK = G(F, Z) - 1 - Z
K=2
�
Also L F(K - 1) zK = z L l
F(K - 1) zK- = z L F(K) zK I Changing K to K +1
K=2
[ ] {�;) ]
K =2 K =l
= z (G(F, z) - 1) = zG(F, z) - z
� �
is the required generating function (or closed form expression) for the Fibonacci sequence.
9. <'
(a) Find the generating function
= = =
(b) Find the sequence which satisfies the given recurrence relation.
214 DISCRETE STRUCTURES
10. If Sen) + 3S(n - 1) - 4S(n -2) = 0, n 2 where S(O) = 3, S(l) = - 2,
;>
(a) Find the generating function
(b) Find the sequence which satisfies the given recurrence relation.
Determine partial fraction decomposition and identify the sequence having the expression as a
generating function for the following expressions
11.
Answers
G(S, z) = 1 -12z 2. G(S, z) = -- a 3. G(S, z) =
2
1-z (1 - Z 2 )
1.
Hint
7. Sen) = U(n) + Yen) + T(n) where U(n) = 2,3n, Yen) = 5, T(n) = 7(- l)n,
4. Find a recurrence relation for the number of ways to arrange flags on a flag pole n feet
tall using 4 types of flags ; red flags 2 feet high, or white blue, and yellow flags each 1
foot high.
(a) an = 2an + 3an _2 (b)
an = an _ 1 + an _ 2
(c) an = 3an _ 1 + an _ 2 (d) None of these.
5. Find a recurrence relation for the number of n-digit ternary sequences that have an
even number of 0's
(a) an = an _ 1 + 3n - 1 (b)
an = an _ 1 + 3n
( ) an = an + 3
c n (d) None of these.
6. Suppose a coin is flipped until 2 heads appear and then the experiment stops. Find a
recurrence relation for the number of experiments that end on the nth flip or sooner.
(a) an = an _ 1 + 2(n - 1) (b)
an = an _ 1 + (n - 1)
( ) an = an 1 + n
c (d) None of these.
-
7. The number of bacteria in a colony doubles every hour. If a colony begins with 5 bacteria,
how many bacteria will be there after 3 hours, 6 hours? 1900 hours? after n hours? Find
a recurrence relation to represent the same.
(a) an = an _ l + an _ 2 (b)
an = 3an _ l + 2an _ 2
( ) an = 2an _ 1
c (d) an = an _ 1 + 5.
8. Suppose that a person deposits '< 10,000 in a saving account at a bank yielding 1 1 % per
year with interest compounded annually_ How much amount will person have in the
account after n years?
(a) an = 1 . 1 1 an _ 1 (b)
an = 0 . 1 1 an _ 1
(c) an = 1.10 an _ 1 (d) an = 1 1 . 1 an _ I '
9. Which of the following represent the sequence 1 , 2, 5, 1 1 , 26, ...
(a) tn = tn _ 1 + tn _ 2 , to = 1, t 1 = 2 (b)
tn = tn _ l + 3tn _ 2 ' to = 1, t, = 2
( ) tn = 2tn - 1 + 1 , to = 1 , t , = 2
c (d) tn = 2 tn 1 + 2, to = 1, t, = 2.
-
10. There are n guests in a hall. Each person shakes hand with every body else exactly
once. Let Hn = No. of handshakes that occur. The recurrence relation is
(a) Hn = Hn _ 1 + n (b) Hn = Hn 1 + (n - 1)
-
( ) Hn = Hn 1 + n - 2
c (d) None.
-
Answers and Explanations
1. (d).
2. (a) Here an = number of different ways of distributing prizes worth '< n.
an _ 1 = number of different ways of destributing prizes worth '< 1 each.
an _ 4 = number of different ways of distributing prizes worth '< 4 each.
Required recurrence relation is an = 3an _ 1 + 5 an - 4'
3. (b).
4. (c) Let an = number of ways of arrange flags on a flag pole n feet tall.
If red flags are used, then they are to be arranged on a flag pole 2 feet high
. . number of ways to arrange such flags = an _ 2 (As we need only 1 flag)
If white, blue or yellow flags are used, then they can be arranged on a flag pole 1 feet high.
Number of ways of arrange such flags = 3an _ 1 (As we need 3 different flags)
The required recurrence relation is an = 3an 1 + an _ 2 '
-
216 DISCRETE STRUCTURES
5. (a).
6. (b).
7. (c) Initial number of bacteria = aD = 5
At the end of 1 hour, the number of bacteria doubles Le., a, = 10 = 2 x 5 = 2ao
At the end of 2 hours, 2 a = 20 = 2 x 10 = 2a,
At the end of 3 hours, a3 = 40 = 2 x 20 = 2a2
At the end of n hours, = an 2an
I' _
8. (a) D
Initial amount A = '< 10,000.
Now, amount after n years = Amount after (n - 1) years + Interest earned in nth year
or An = An -1 + (11 %) An _ 1 = An _ 1
( 1+
11
100
) =
111
100
An - 1 = 1.11 An - 1 '
tn = tn 1 + 3tn 2 '
_ _
10. (b)Here H n denotes the number of handshakes that occur. Then H, = O. For n :> 2,
Consider one of the guests, say, Mr. X . , By definition, the number of handshakes made
by remaining (n - 1) guests among themselves is Hn l' Now, the guest Mr. X will _
8.1 . INTRODUCTION
In the present chapter) we introduce the concept of algebraic system) binary operations
and groups. The study of cyclic groups) normal groups) group homomorphism etc. help us in
understanding various applications of computer science. Groups play an important role in
coding theory.
Consider a non-empty set A and a function f such that f : A x A --; A, then f is called a
binary operation on A whose domain is the set of ordered pairs of elements of A. If * is a binary
operation on A) then it may be written as a * b.
A binary operation can be denoted by any of the symbols +) -) *) 8\ A) 0) v) /\ etc.
The value of the binary operation is denoted by placing the operator between the two
operands.
e.g., (i) The operation of addition is a binary operation on the set of natural numbers.
(ii) The operation of subtraction is a binary operation on set of integers. But) the operation
of subtraction is not a binary operation on the set of natural numbers because the subtraction
of two natural numbers may or may not be a natural number.
(iii) The operation of multiplication is a binary operation on the set of natural numbers)
set of integers and set of complex numbers.
(iv) The operation of set union is a binary operation on the set of subsets of a universal
set. Similarly) the operation of set intersection is a binary operation on the set of subsets of a
universal set.
217
218 DISCRETE STRUCTURES
* a1 a2 a3 an
a1 a1 *a1 a1 * a2
a2 a2*a1 a2* a2
a3 as * as
an a *a
n n
The empty cell in the ph row and kth column represent the element a; *ak •
ILLUSTRATIVE EXAMPLES
Example 1. Consider the set A = {I, 2, 3} and a binary operation * on the set A defined by
a * b = 2a + 2b. Represent operation * as a table on A.
Sol. The table of operation is shown below: (Table S.I)
Table 8. 1
* 1 2 3
1 4 6 8
2 6 8 10
3 8 10 12
8.5. PROPERTIES OF BINARY OPERATIONS
There are many properties of the binary operations which are as follows :
1. Closure Property. Consider a non·empty set A and a binary operation * on A. Then
A is closed under the operation *, if a * b E A, where a and b are elements of A.
For example, the operation of addition on the set of integers is a closed operation. i.e., if
a, b E Z , then a + b E Z \;j a, b E Z.
Example 2. Consider the set A = {- i, D, I}. Determine whether A is closed under
(i) addition (ii) multiplication.
Sol. (i) The sum of the elements is (- 1) + (- 1) = - 2 and 1 + 1 = 2 does not belong to A.
Hence A is not closed under addition.
(ii) The multiplication of every two elements of the set are
-1 *0=0; -1*1 = -1; -1*-1=1
0*-1=0; 0*1 = 0;
1 *- 1 = - 1 ; 1 *0 = 0;
Since, each multiplication belongs to A hence A is closed under multiplication.
MONOIDSAND GROUPS 219
Example 3. Consider the set A = {I, 3, 5, 7, 9, .. .}, the set of odd +ve integers. Determine
whether A is closed under (i) addition (ii) multiplication.
Sol. (i) The set A is not closed under addition because the addition of two odd numbers
produces an even number which does not belong to A.
(ii) The set A is closed under the operation multiplication because the multiplication of
two odd numbers produces an odd number. So) for every a, b E A, we have a * b E A.
2. Associative Property. Consider a non·empty set A and a binary operation * on A.
Then the operation * on A is associative, if for every a, b, c, E A, we have (a * b) * c = a * (b * c).
Example 4. (a) Consider the binary operation * on Q, the set of rational numbers,
defined by
a * b = a + b - ab \;j a, b E Q.
Determine whether * is associative.
(b) Consider the binary operation * on the set N ofpositive integers defined by
a * b = ab
Determine whether * is associative?
Sol. (a) Let us assume some elements a, b, C E Q, then by definition
(a * b) * c = (a + b - ab) * c = (a + b - ab) + c - (a + b - ab)c
= a + b - ab + c - ca - be + abc = a + b + c - ab - ac - be + abc.
Similarly, we have
a * (b * c) = a + b + c - ab - ac - be + abc
Therefore, (a * b) * c = a * (b * c).
Hence * is associative.
(b) * will be associative if
a * (b * c) = (a * b) * c \;j a, b, c E N
Take a = 2, b = 2, c = 3 and consider
a * (b * c) = 2 * (2 * 3) = 2 * 2 3 = 2 * 8 = 28 = 256
and (a * b) * c = (2 * 2) * 3 = 2 2 * 3 = 4 * 3 = 43 = 64
Hence a * (b * c) '" (a * b) * c
* is non-associative.
3. Commutative Property. Consider a non·empty set A and a binary operation * on A.
Then the operation * on A is commutative, if for every a, b E A, we have a * b = b * a.
Example 5. (a) Consider the binary operation * on Q, the set ofrational numbers, defined
by
a * b = a2 + b2 \;j a, b E Q.
Determine whether * is commutative.
(b) Consider S = {a, b, c, d} and be a binary operation on S defined by as shown in the
*
following table.
220 DISCRETE STRUCTURES
Table 8.2
* a b c d
a a b c d
b b a a b
c c b a a
d d a a a
Determine (i) whether * is associative ?
(ii) whether * is commutative?
Sol. (a) Let us assume some elements a, b E Q, then by definition
a * b = a2 + b2 = b 2 + a2 = b * a
Hence * is commutative.
(b) (i) Let a, b, e E S and consider
b * (e * c) = b * a = b
and (b * c) * e = a * e = e
b * (e * c) '" (b * c) * e
Thus) * is non-associative
(ii) b * e = a and e * b = b
::::::} b * c * c * b
* is non-commutative
Example 6. Consider the binary operation * and Q, the set of rational numbers defined by
ab
a * b = - \;j a, b E Q.
2
Determine whether * is (i) associative (ii) commutative.
Sol. (i) Let a, b E Q, then we have
ab ba
a*b=-=-=b*a
2 2
Hence * is commutative.
(ii) Let a, b, C E Q, then by definition we have
ab
( ) ab
(a * b) * e = '2 * e = -
-2-
2
' e abc
=4
abc
Similarly, () be
a * (b * c) = a * '2 = -- = 4
2
2
abc
Therefore) a * (b * c) = a * (b * c)
Hence) * is associative.
4. Identity. Consider a non· empty set A and a binary operation * on A. Then the opera·
tion * has an identity property if there exists an element, e, in A such that
a * e (right identity) = e * a(left identity) = a \;j a E A.
' '
Theorem I. Prove that e/ = e where e/ is a right identity and e is a left identity ofa
/ /
binary operation.
Proof. We know that e/, is a right identity.
. .. (1)
MONOIDSAND GROUPS 221
Also, we know that et is a left identity.
Hence, el l! * e/ = e/ . .. (2)
From (1) and (2), we have e/ = e/,.
Thus, we can say that if e is a right identity of a binary operation, then e is also a left
identity.
Example 7. Consider the binary operation * on 1+, the set ofpositive integers defined by
ab
a * b = 2' Determine the identity for the binary operation *, if exists.
Sol. Let us assume that e be a +ve integer number, then
e * a = a, a E 1+
ea
- = a => e = 2 ... (1)
2
Similarly,
ae
-=a or e=2 ... (2)
2
Form (1) and (2) for e = 2, we have e * a = a * e = a
Therefore,2 is the identity element for *.
5. Inverse. Consider a non-empty set A and a binary operation * on A. Then operation
* has the inverse property if for each a E A, there exists an element b in A such that
a * b (right inverse) = b * a (left inverse) = e, where b is called an inverse of a.
6. Idempotent. Consider a non· empty set A and a binary operation * on A. Then the
operation * has the idempotent property, if for each a E A, we have
a * a = a V a E A.
7. Distributivity. Consider a non·empty set A and two binary operations * and + on A.
Then the operation * distributes over +, if for every a, b, C E A, we have
a * (b + c) = (a * b) + (a * c) [Left distributivity]
and (b + c) * a = (b * a) + (c * a) [Right distributivity]
8. Cancellation. Consider a non·empty set A and a binary operation * on A. Then the
operation * has the cancellation property, if for every a, b, C E A, we have
a * b = a * c => b = c [Left cancellation]
and [Right cancellation]
Example 9. Consider the algebraic system ({D, i), *), where * is a multiplication opera
tion. Determine whether ({D, i), *) is a semi-group.
Sol. Closure property. The operation * is a closed operation on the given set since
0 * 0 = 0 ; 0 * 1 = 0 ; 1 * 0 = 0 ; 1 * 1 = 1.
Associative property. The operation * is associative since we have
(a * b) * c = a * (b * c) \;j a, b, c
Since, the algebraic system is closed and associative. Hence, it is a semi-group.
Example 10. Let S be a semi-group with an identity element e and if b and b' are inverses
of an element a E S, then b = b' i.e., inverse are unique, if they exist.
Sol. Given b is an inverse of a, therefore, we have
a*b=e=b*a
Also, b' is an inverse of a, therefore, we have
a * b' = e = b' * a
Consider b * (a * bi = b * e = b ... (1)
and (b * a) * b' = e * b' = b' ... (2)
Now, S is a semi-group, associativity holds in S i.e., b * (a * bi = (b * a) * b'
e=} b = b'. I Using (1) and (2)
Example 11. Let N be the set of positive integers and let * be the binary operation of
least common multiple (L. c.lYI) on N. Find
(a) 4 * 6, 3 * 5, 9 * i8, i * 6
(b) Is (N, *) a semi-group
(c) Is N commutative
(d) Find the identity element ofN
(e) Which elements of N have inverses ?
Sol. (a) Let x, Y E N and x * y = L.C.M. of x and y
.. 4 * 6 = L.C.M. of 4 and 6 = 12
3 * 5 = L.C.M. of 3 and 5 = 15
9 * 18 = L.C.M. of 9 and 18 = 18
1 * 6 = L.C.M. of 1 and 6 = 6
(b) We know that the operation of L.C.M. is associative, i.e.,
a * (b * c) = (a * b) * c \;j a, b, c E N
. . N is a semi-group under *.
(c) Also for a, b E N,
a * b = L.C.M. of a and b = L.C.M. of b and a = b * a
N is commutative also.
MONOIDSAND GROUPS 223
(d) For a E N, consider a * 1 = L.C.M. of a and 1 = a
1 * a = L.C.M. of 1 and a = a
.. a*l=a=l*a
i.e., 1 is the identity element of N.
(e) Consider a * b = 1 i.e., L.C.M. of a and b is 1, which is possible iff a = 1 and b = 1.
i.e.) the only element which has an inverse is 1 and it is its own inverse.
Example 12. Consider the set Q of rational numbers and let * be the operation on Q
defined by a * b = a + b - ab
1
(a) Find 3 * 4, 2 * (- 5), 7 * '2
(b) Is (Q, *) a semi-group ?
(c) Is Q commutative ?
(d) Find the identity element of Q.
(e) Which elements of Q have inverses and what are they ?
Sol. Given a * b = a + b - ab for a, b E Q
(a) 3 * 4 = 3 + 4 - 12 = - 5
2 * (- 5) = 2 + (- 5) - (- 10) = 2 - 5 + 10 = 7
1 1 7
7 * - = 7 + - - - = 4.
2 2 2
(b) Q will be a semi-group if it holds associativity under * for a, b, C E Q.
Consider a * (b * c) = a * (b + c - be)
= a + (b + c - be) - a(b + c - be)
= a + b + c - be - ab - ac + abc ... (1)
(a * b) * c = (a + b - ab) * c
= a + b - ab + c - (a + b - ab) c
= a + b + c - ab - ac - be + abc
= a + b + c - be - ab - ac + abc ... (2)
From (1) and (2),
a * (b * c) = (a * b) * c
Hence) (Q) *) is a semi-group.
(c) For a, b E Q
Consider
a * b = a + b - ab = b + a - ba = b * a
. . Q is commutative.
(d) Let e is the identity element of Q, therefore, for a E Q, we have
a + e - ae = a
e - ea = 0
e(l - a) = 0
e = O if a i" l
The identity of Q is O.
224 DISCRETE STRUCTURES
(e) If x is the inverse of a E Q, then a * x = 0 (identity)
a + x - ax = O
a + x(l - a) = 0
a = x(a - 1)
a
x= -- ) a :t 1
a-1
Thus a has an inverse _
a
_
.
a-1
Example 13. Consider a non-empty set S with the operation a * b =a
(a) Is the operation associative ?
(b) Is the operation commutative ?
(c) Show that the right cancellation law holds.
(d) Does the left cancellation law hold ?
Sol. (a) For a, b, c E S,
Consider
a * (b * c) = a * b = a
and (a * b) * c = c * a = a
* is associative.
(b) For a '" b E S,
Consider
a * b = a and b * a = b
a * b ", b * a
* is not commutative.
(c) For a, b, C E Q,
Consider
a*c=b*c
a=b I Using given a *b=a
Right cancellation laws hold.
(d) The left cancellation law does not hold. For example, suppose b '" c, then
a*b=a*c
=> b = c) a contradiction
Hence) the result.
8.7. SUBSEMI-GROUP
Example 15. Let A and B are the sets of even and odd positive intergers. Then (A, x)
and (E, x) are subsemigroups of(N, +). Is (A, +) subsemigroup of(N, +) ? Is (E, +) subsemigroup
of (N, +) ?
Sol. Given A = {set of even positive integers}
B = {set of odd positive integers}
Also N is a semigroup under addtion and multiplication. Let m, n E A
::::::} m x n E A i.e.) A is closed under multiplication. Therefore) A is a subsemigroup of N
under multiplication.
Similarly) B is also closed under multiplication. Therefore) B is also a subsemigroup of
N under multiplication.
Further) sum of two even positive integers is also a positive even integer. Therefore, A
is also closed under addition. Hence A is a subsemigroup of (N, +).
But sum of two positive odd integers is not always an odd integer (e.g., 5 + 3 = 8 (even»
B is not closed under +. Hence B is not a subsemigroup of (N, +).
For example, Consider a semi-group (N, +), where N is the set of all natural numbers
and + is an addition operation. The algebraic system (E, +) is a subsemi-group of (N, +), where
E is a set of all even natural number.
or a + c = (b + d) (MOD 3)
Thus) the relation is a congruence relation.
Example 19. Consider the set A = {a, b}. Let (A*, -) is the semi-group generated by A, also
let R is a relation on A defined by aR� iff a and � have the same number of a's.
Show whether the relation R is a congruence on (A*, .).
Sol. First of all we will show that R is an equivalence relation. So, for that we will check
reflexive) symmetric and transitive properties of the relation R.
Reflexive. aRa for any a E A* since a has same number of a's as itself. Thus, R is
reflexive.
Symmetric. If a and � have same number of a's, then aR� or we can say �Ra. Thus, R
is symmetric.
Transitive. If aR�, it means a and � have same number of a's. If �Ry, it means � and y
have same number of a's. It implies a and y have same number of a's i.e., aRy. Thus, R is
transitive.
Hence, R is an equivalence relation.
To show that R is a congruence relation, let us assume that aRa, and �R�" It means a
and a, have same number of a's and � and �, have same number of a's. We know that the
number of a's in a . � is the sum of number of a's in a and the number of a's in �.
From the above discussion, we can say that the number of a's in a .� is same as in aI" � '
l
Hence (a . �) R (a, . �,) which shows that R is a congruence relation.
Example 20. Consider the semi-group (I, +), where + is an addition operation. Let
f(x) = x2 - 2x- 3 and also let R is a relation on I defined by aRb ifff(a) = f(b). Show whether R
is a congruence relation.
Sol. We first show that the relation R is an equivalence relation on the set 1.
(i) f(a) = f(a) => aRa i.e., R is symmetric
(ii) aRb => f(a) = f(b) => f(b) = f(a) i.e., bRa. Hence R is symmetric
(iii) If aRb, bRc, thenf(b) = f(b) andf(b) = f(c) => f(a) = f(c) => aRc i.e., R is transitive
To check whether R is congruence relation or not, we will try to find two pair of num
bers aRb and cRd but (a + b) R (c + d), if possible. Then we will say R is not a congruence
relation.
Thus, we have
2RO Le., f(2) = f(O) = - 3
and - 2R4 i.e., f(- 2) = f(4) = 5
But (2 + (- 2» R (0 + 4) Le., 0 R 4
As f(O) = - 3 and f(4) = 5
Hence, R is not a congruence relation.
Example 21. Let (S,*) be a commutative semi-group. Show that ifx * x = x and y * y = y,
then (x * y) * (x * y) = x * y.
Sol. Take L.H.S. (x * y) * (x * y)
= (x * y) * (y * x) (8, *) is a commutative semi-group]
=x*y*y *x=x*y *x [ .; y * y = y]
=x*x*y .
[ ; Commutative semi-group]
=x*y [ .; x * x = x]
= (x * y) * (x * y) = x * y.
MONOIDSAND GROUPS 229
Example 22. Let ({x, y), .) be a semi-group where x . x = y show that
(i) x . y = y . x (ii) y . y = y.
Sol. (i) To show that x . y = y. x
We have X . X . X = X . X . x ::::::} x . y = y . x [ .: x . x = y]
Hence proved.
(ii) To show that y . y =y
We know that the set (x, y) is closed under the operation. Therefore, we have two cases
x. y = x) x . y = y
Case. I Let x.y=x
Consider y . y = y . (x . x) = (y . x) . x [ ": . is associative]
= (x . y) . x [ .: x . y = y . x]
=x.X [ .: x . y = x]
=y
Case. II Let x.y=y
Consider y . y = (x . x) . y [ .: x . x = y]
= x . (x . y) [ ": . is associative]
=x.y [ .: x . y = y]
=y
Hence proved.
Example 23. Let (A, *) be a semi-group. Further more, for every a and b in A, if a # b
then a * b # b * a.
(a) Show that for every a in A, a * a = a
(b) Show that for every a, b in A, a * b * a = a
(c) Show that for every a, b, c in A, a * b * c = a * c.
Sol. (a) We know that A is a semi-group.
.. (a * b) * c = a * (b * c)
Now putting b = a and c = a) we have
(a * a) * a = a * (a * a)
Since A is not commutative semi-group. i.e.) a * b t:- b * a)
H�� a*a=a ... (1)
(b) Let us assume that b E A, then we have
b*b=b
Multiplying both sides by a, we get
a * b * b = a * b or (a * b) * b = a * b [ ": * is associative]
Hence) a*b=a ... (2)
So, a * b * a = (a * b) * a * is associative]
=a*a a * b = a from (2)]
=a a * a = a from (1)]
(c) We know that a * b * c = (a * b) * c [ ": * is associative]
=a*c [ .: a * b = a from (2)]
230 DISCRETE STRUCTURES
Sol. By definition
Z4 = (O. 1. 2. 3. +4)
G = {I . 3. 7. 9. x l O}
We first show that (Z4 ' +4) and (G. x lO) are both semi-groups under the addition modulo
4 and multiplication modulo 10 respectively.
The addition modulo table (Table 2a) for Z4 and the multiplication modulo table (Table 2b)
for G are shown below.
Table 2
+4 0 1 2 3 X ,O 1 3 7 9
0 0 1 2 3 1 1 3 7 9
1 1 2 3 0 3 3 9 1 7
2 2 3 0 1 7 7 1 9 3
3 3 0 1 2 9 9 7 3 1
(a) (b)
From Table 2a. we observe that each element in the interior of the table is also on
element of Z4' It means Z4 is closed under +4"
Also) for a, b, C E Z4) we know
a +4(b +4 c) = (a +4 b) +4 c is true
i.e., associativity holds in Z4'
Hence) (Z4 ) +4) is a semi-group
Similarly) we can prove that (G) x l O) is a semigroup.
To show f is a semi-group homomorphism. We need to show
f(a +4 b) = f(a) x , O f(b) \j a. b E Z4
We first find (a +4 b)
Now) the only elements in Z4 are 0) 1) 2 or 3. Therefore) the value of a +4 b can be either
o or 1 or 2 or 3 (since Z4 is closed under +4)' Consider the following possibilities:
(1) If the value of a +4 b is 0
(2) If the value of a +4 b is 1
(3) If the value of a +4 b is 2
(4) If the value of a +4 b is 3
We discuss the case (1) when the value of a +4 b is O.
From Table 2. we observe that a and b can take the following possible values.
MONOIDSAND GROUPS 231
a b a +4 b f(a +4 b)
0 0 0 1
1 3 0 1
2 2 0 1
3 1 0 1
Similarly, the various values of [(a) x lO [(b) are calculated in Table 4.
Table 4. Calculation of [(a) x,O [(b)
a b f(a) f(b) f(a) xlO f(b)
0 0 1 1 l X10 1 :::: 1
1 3 3 7 3 x,O 7 21 1
= =
2 2 9 9 9 x,O 9 81 1
= =
3 1 7 3 7 x,O 3 21 1
= =
On comparing Table 3 and Table 4, we observe that the last column of these two tables
are identitcaL It means
[(a +4 b) = [(a) x,O [(b) \;j a, b E Z4
Hence, fis a semi-group homomrphism
To show fis 1-1 and onto: Here [ : Z4 --; G such that [(0) = 1 , [(1) = 3 , [(2) = 9, [(3) = 7.
S.l)
Consider the following (Fig.
Z4 G
Fig. 8.1
Since different elements of Z4 have different images in G, therefore, fis one-one.
Also, each element of G has its pre-image in Z4' Therefore, fis onto also.
Thus, we have shown that f is homomorphism, one-one and onto. Thus, S 4 == G.
232 DISCRETE STRUCTURES
Example 25. Let M be the set of 2 x 2 matrices over integers of the types (� �) s. t.
ad - bc '" O.
Define f: M --; M such that f(A) = det. A \;j A E M. Then f is a semi-group homomorphism
on (M, x), but not on (M, +).
Sol. We know that (M, +) and (M, x) are both semi-groups. Let A, B E M and consider
f(A + B) = det. (A + B)
'" det . A + det . B
'" f(A) + f(B)
Thus, f is a not a semi-group homomorphism on (M, +).
Now, consider f(AB) = det. (AB)
= (det. A) (det. B)
= f(A) f(B)
Thus, f is a semi-group homomorphism on (M, x).
Example 26. Let - be a congruence relation on a semi-group S. Let q, : S --; SI- be the
natural mapping from "S to the quotient space of S by - " (denoted by SI-) defined by
q,(a) = fa]
then q, is a semi-group homomorphism.
Sol. Let a, b E S and consider
q,(ab) = lab] = [a][b]
= q,(a)q,(b)
thus) q, is a semi-group homomorphism.
Remark. We know that SIR denotes the set of all equivalence classes of elements of S under an
equivalence relation R. Also, if R is a congruence relation on S, then SIR forms a semi-group under the
operation on the equivalence classes.
8.11 FUN DAMENTAL THEOREM OF SEMI-GROUP HOMOMORPHISM
Theorem. Let f: S --; S' be a semi-group homomorphism. Let - be a relation on S defined
by "a - b iff(a) = f(b)" then
(i) ,..., is a congruence relation on S
(ii) SI- is isomorphic to f(S)
Proof. (i) We know that a relation R on a given set S is said to be a congruence relation
on S if R is an equivalence relation on S and satisfies the following.
If aRa', bRb' => abRa'b' \;j a, b E S
We first show that R is an equivalence relation on S.
(a) Reflexive. Since f(a) = f(a) => a - a \;j a E S
�
is reflexive
(b) Symmetric. Let a - b => f(a) = f(b) => f(b) = f(a) => b - a \;j a, b E S
�
. . is symmetric
(c) Transitive. Let a - b => f(a) = f(b) \;j a, b E S
Let b - c => f(b) = f(c) \;j b, c E S
It implies that f(a) = f(b) = f(c)
f(a) = f(c) => a - c \;j a, c E S
�
is transitive
MONOIDSAND GROUPS 233
Hence) � is an equivalence relation on S.
We next show that R is a congruence relation on S.
Let a � a' and b � b'. Then
f(a) = f(ai and f(b) = f(bi
Consider f(ab) = f(a) f(b) I As f is a homomorphism
= f(ai f(bi
= f(a'bi
ab � a'b'
. . � is a congruence relation on S
(ii) To show S/� is isomorphic to f(S).
Define q, : S/� --; f(S) by
q,([a]) = f(a)
We show q, is well-defined) homomorphism) one-one and onto.
(a) q, is well-defined. Consider [aJ = [bJ => a � b
=> f(a) = f(b)
=> q,([a]) = q,([b])
. . q, is well·defined
(b) q, is homomorphism. Consider q,([aJ [b]) = q,([ab])
= f(ab)
= f(a) f(b) I fis a semi·group homomorphism
= q,([a]) q,([b])
. . q, is homomorphism
(c) q, is one-one. Let q,([a]) = q,([b])
=> f(a) = f(b)
a�b
[aJ = [bJ
. . q, is one-one
(d) q, is onto. Let Y E f(S) => 3 a E S such that y = f(a)
Now q,([a]) = f(a) = y
Th us q, is onto
Hence, q, : S/� --; f(S) is an isomomorphism
Example 27. Let F be a free semi-group on A = {a, b}. Define f = F --; Z such that f(u)
= l(u) where l(u) denotes the length of the word 'u' in F. Let a � b if f(a) = f(b). Show that f is a
homomorphism. Also, FI� is isomorphic to N.
Sol. Suppose up u2 E F and consider
f(u , u) = l(u , u) = l(u,) l(u) = f(u,) f(u)
:. f is a homomorphism
Also, for u E F, f(F) = l(u) = a natural number
.. f(F) = N
By fundamental theorem of semi-group homomorphism, F/� is isomorphic to f(F) = N
Thus F/� is isomorphic to N
234 DISCRETE STRUCTURES
Example 28. Let M be the set ofall 2 x 2 type matrices over integers of the type (� �)
and let f: M --; Z be a function defined by
f(A) = det. A
Let A � B if f(A) = f(B). Then MI� is isomorphic to Z.
Sol. We know that (M, x) is a semi·group under the multiplication of matrices. Also
(Z, -) is a semi·group
Let A, B E M and consider
f(AB) = det. (AB) = (det. A) (det. B)
= f(A) f(B)
Thus, f is a semi·group homomorphism from M to Z. By fundamental theorem of semi·
group homomorphism, M/� is isomorphic to f(Z).
But f(Z) = (b E Z: There exists A E M for which f(A) = b)
= (b E Z: det. A = b)
=Z
l\V� is isomorphic to Z
8.12. MONOID (P.T.U. B.Tech., Dec. 2013, May 2013, Dec. 2012, May 2008)
Let us consider an algebraic system (A) 0») where 0 is a binary operation on A. Then the
system (A, 0) is said to be a monoid if it satisfies the following properties.
(i) The operation 0 is a closed operation on set A.
(ii) The operation 0 is an associative operation.
(iii) There exists an identity element w.r.t. the operation o.
Examples. (N, x), (Z, +), (Q, +) are monoids
Example 29. Consider an algebraic system (L +), where the set 1 = {O, 1, 2, 3, 4, .. .} the
set of natural numbers including zero and + is an addition operation. Determine whether (L +)
is a monoid.
Sol. Closure property. The operation + is closed since sum of two natural numbers is
a natural number.
Associative property. The operation + is an associative property since we have
(a + b) + c = a + (b + c) \;j a, b, c E I.
Identity. There exists an identity element in set I w.r.t. the operation +. The element 0
is an identity element w.r.t. the operation +. Since) the operation + is a closed) associative and
there exists an identity. Hence, the algebraic system (I, +) is a monoid.
Example 30. Let S be a finite set and F(s) be the collection of all functions f : S --; S
under the operation ofcomposition offunctions. Show that F(s) is a semi-group. Is F(s) a monoid?
Sol. Let t. g, h E F(s), then we know that composition of functions is associative i.e.,
fo(goh) = (fog)oh \;j f, g, h E F(s). Hence, F(s) is a semi-group. Also the identify function
is an identify element of F(s).
F(s) is a monoid.
8.13. SUBMONOID
Let us consider a monoid (M, 0), also let 8 c M. Then (8, 0) is called a submonoid of
(M, 0), if and only if it satisfies the following properties.
MONOIDSAND GROUPS 235
(i) S is closed under the operation o.
(ii) S is associative under the operation o.
(iii) There exists an identity element e E S.
e.g., Let us consider) a monoid (M) *»)where * is a binary operation and M is a set of all inte
gers. Then (M ' *) is a submonoid of (M, *), where M, is defined as
l
i
M, = {a I i is from 0 to n, a positive integer and a E M}.
Examples 31. Since N e Z and Z c Q,
N is a submonoid of Z and Z is a sub monoid of Q.
Theorem II. Let [M; *i be a monoid and K is a non-empty subset of M. Then K is a sub-
monoid of M iff
(i) a, b E K => a * b E K i.e. K is closed under *
(ii) For each a E K, there exists e E K such that a * e = e * a = a.
Proof. Let K is a submonoid of M. Then, by defination, K must be closed under *. Also
for each a E K, there exists e E K such that a * e = e * a. Hence (i) and (ii) hold
Converse. Let (i) and (ii) hold
From (i), a, b E K => a * b E K i.e., K is closed under *
Also) if a) b) C E K and K c M. :. a, b, C E M. But M is a monoid
.. a * (b * c) = (a * b) * c \;j a, b, c E K
i.e., the associativity holds for each element of K.
From (ii). K has an identity element
K is a monoid. But K c M
K is a submonoid of M under *.
L Let * be the operation on the set R of real numbers defined by a * b :::: a + b + 2ab
(a) Find 2 * 3, 3 * (- 5), 7 * (1/2)
(b) Is (R, *) a semi-group ? Is it commutative ?
(c) Find the identity element
(d) Which elements have inverses and what are they ?
Let S be a semi-group with identity e and let b and b' be inverses of a. Show that b :::: b' i.e.,
inverses are uniques, if they exist.
2.
Prove that for any commutative monoid (M *), the set of idempotent elements of M form a
;
submonoid.
3.
(a) Is A a semi-groups ?
(b) Is A commutative ?
(c) Does A have an identity element ?
(d) Which elements, if any have inverses and what are they ?
Let A be a non-empty set with the operation * defined by a * b :::: a, and assume A has more
than one element.
8.
Answers
1. (a) 17, - 32, ""2
29
(b) Yes, Yes
(d) The element (a, b) has an inverse if a -:f- 0 and its inverse is (�, - %)
5.
16, as there are two choices a or b for each of the four products aa, ab, ba and bb (Fig.). Further,
From Fig. 8.1
9.
Consider (a * b) * (a * b) = a * (b * a) * b I Associativity
= a * (a * b) * b I Commutative
= (a * a) * (b * b)
=a*b
S is closed under *.
Also e * e :::: e e S i.e., S has an identity element. Therefore, S is a submonoid.
::::} E
4. (a * b) * (a * b) = a * (b * (a * b» I Associativity
= a * ((b * a) * b) I Associativity
= a * ((a * b) * b) I a * b :::: b * a
= a * (a * (b * b» Associativity
= (a * a) * (b * b) I Associativity
ILLUSTRATIVE EXAMPLES
Example 1. Determine whether the algebraic system (Q, +) is a group where Q is the set
of all rational numbers and + is an addition operation.
Sol. Closure Property. The set Q is closed under operation +, since the addition of two
rational numbers is a rational number.
Associative Property. The operation + is associative, since (a + b) + c = a + (b + c) 'd a,
b, C E Q.
Identity. The element 0 is the identity element. Hence a + 0 = 0 + a = a 'd a E Q.
Inverse. The inverse of every element a E Q is - a E Q. Hence the inverse of every
element exists.
Since, the algebraic system (Q, +) satisfies all the properties of a group, hence (Q, +) is
a group.
Example 2. Which of the following are groups under addition N, Z, Q, R, C ?
Sol. The set of integers Z, the set of rationals Q, the set of reals R, the set of complex
numbers C, are all groups under addition. (Prove yourself as in Example-I)
But N) the set of natural numbers donot form a group under addition. Since) N does not
have additive identity. (0 'l N).
Example 3. Let S be the set of n x n with rational entries under the operation of matrix
multiplication. Is S a group ?
Sol. We know that matrix multiplication is associative. But inverse does not always
exist. As we know that if I A I '" 0, then A-I exists.
Example 4. Prove that G = {l, 2, 3, 4, 5, 6} is a finite abelian group of order 6 under
multiplication modulo 7. (P.T.V. B.Tech. May 2010, 2009)
Sol. G = {I, 2, 3, 4, 5, 6, x7}
Consider the multiplication modulo 7 table as shown below (Table 8.5). Recall that
a x 7 b = The remainder when ab is divided by 7
X7 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
Table 8.5
MONOIDSAND GROUPS 239
From the table, we observe that each element inside the table is also an element of G. It
means that G is closed under multiplication modulo 7.
Also for eacha) b) C E G
a x 7 (b x 7 c) = (ax 7 b) x 7 c i.e., associative law hold.
From the table, we observe that the first row inside the table is identical with the
top-row of the table. Therefore, 1 is the identity (multiplicative) of G.
a - 1'
a
-- E Q, if a te 1
a-I
Therefore, every element has inverse such that a t:- 1 .
Since, the algebraic system (Q, *) satisfy all the properties of a group. Hence, (Q, *) is a
group.
240 DISCRETE STRUCTURES
Theorem III. Show that the identity element in a group is unique.
Proof. Let us assume that there exists two identity elements i.e., e and e' of G.
Since) e E G and e' is an identity. We have e'e = ee' = e
Also) e' E G and e is an identity. We have e'e = ee' = e'
e = e'
Hence) identity in a group is unique.
Theorem V. Show that (a- it i = a for all a E G, where G is a group and a- i is an inverse
ofa.
Proof. Given that a- I is an inverse of a. Then) we have
aa- 1 = a- 1 a = e
This implies that a is also an inverse of a- I . Therefore (a- l)- 1 = a.
Theorem VII. Prove the left cancellation law in a group G holds i.e., ab = ac => b =c
\;j a, b, c E G.
Proof. Consider ab = ac.
Then) we have b = eb = (a- 1 a)b = a- I (ab) = a- I (ac) [ .: ab = ac]
= (a- l a)c = ec = c Associativity
ab = ac => b = c.
Theorem VIII. Prove the right cancellation law in a group G holds i.e., ba = ca =>
b =c \;j a, b, c E G.
Proof. Consider ba = ca.
Then, we have b = be = b(aa- l) = (ba)a- l = (ca)a- l [ .: ba = cal
'
= c(aa- ) = ce = c I Associativity
ba = ca => b = c.
MONOIDSAND GROUPS 241
Theroem IX. Let G be a group and a, b E G. Then the equation a * x = b has a unique
solution given by x = a-i * b.
Proof. Given a) b E G and G is a group under *) therefore) a-I exists in G
Hence a-I * b E G. G is closed
Consider a*x=b
= (a * a-I) * b I a * a-I = e
l
= a * (a- * b) Associativity
x = a-I * b Left cancellation law
Uniqueness. Let the equation a * x = b has two solutions) say) Xl and x2) then we have
a * x, = b ... (1)
a * x2 = b ... (2)
(1) and (2) gives a * x, = a * x2
::::::} Xl = X2 Left cancellation law
(Fig. 8.3).
* e x
e e x
x x e
Fig. 8.3
The group of order 3 has three elements i.e., one identity element and two other elements.
Example 7. Let ({e, x, yj, ) be a group of order 3. The table of operation is shown in
*
(Fig. 8.4).
* e x y
e e x y
x x y e
y y e x
Fig. 8.4
Example 8. Consider an algebraic system ({O, 1). +) where the operation + is defined as
shown in (Fig. 8.5).
+ o 1
o o 1
1 1 o
Fig. 8.5
The system ({O. l), +) is a group. In this 0 is identity element and every element is its
own lnverse.
Theorem XI. If G is a finite group of order n and a E G, then there exists a positive
integer m such that am = e and m ::; n.
Proof. Consider the elements of the group G as a, a2, a3, ... an+1 . These are n + 1 elements.
Since I G I = n. Therefore two of its elements, say, aJ\ aq must be equal, i.e., aP = aq,
p < q. Take m = q - p
am = aq-p = uP . a-P
= aq . (al')-l = aq . (aq)-l
=e
Further, since p, q are among n + 1 ,
.. l S p < q S n + l � q - p = m S n.
8.18. SUBGROUP (P.T. U. B.Tech. May 2013, May 2007, May 2006)
Let us consider a group (G, *) . Also, let S c G ; then (S, *) is called a subgroup iff it
satisfies following conditions :
(i) The operation * is closed operation on S.
(ii) The operation * is an associative operation.
MONOIDSAND GROUPS 243
(iii) As e is an identity element belonged to G. It must belong to the set S i.e., The identity
element of (G, *) must belongs to (S, *) .
(iv) For every element a E S, a- I also belongs to S.
Since Z c Q, Z is a subgroup of Q under addition.
For example, let (G, +) be a group, where G is a set of all integers and (+) is an addition
operation. Then (H, +) is a subgroup of the group G, where H = {2m : m E G}, the set of all even
integer.
For example, let G be a group. Then the two subgroups of G are G and G, = (e), e is the
indentity element.
Example 9. Let (L +) be a group, where I is the set of all integers and (+) is an addition
operation. Determine whether the following subsets of G are subgroups of G.
(a) The set (G1, +) of all odd integers. (b) The set (G2 , +) of all positive integers.
Sol. (a) The set G, of all odd integers is not a subgroup of G. It does not satisfy the
closure property, since addition of two odd integers is always even.
(b) Closure property. The set G2 is closed under the operation +, since addition of two
even integers is always even.
Associative property. The operation + is associative since (a + b) + c = a + (b + c) for
every a, b, C E G2"
Identity. The element 0 is the identity element. Hence, 0 E G2.
Inverse. The inverse of every element a E G2 is - a tl G2. Hence, the inverse of every
element does not exists.
Since the system (G2 , +) does not satisfy all the conditions of a subgroup. Hence, (G2 , +)
is not a subgroup of (I, +).
Example 10. Consider the group Z of integers under addition. Let H be the subset of Z
consisting of all multiples of a positive integer m i.e.,
H = {...... , - 3m, - 2m, - m, 0, m, 2m, 3m, ..... }
Show that H is a subgroup of Z.
Sol. For r, s E Z, rm, sm E H.
Consider rm + sm = (r + s) m E H
Le., H is closed under addition.
For rm E H, - rm E H and consider rm + (- rm) = (r - r) m = 0 E H
i.e., 0 is the identity of H and - rm is the inverse of rm.
Hence, H is a subgroup of Z.
Theorem XII. A subset H of a group G is a subgroup of G iff
(i) The identity element e E H
(ii) H is closed under the same operation as in G
(iii) H is closed under inverses i.e., if a E H, then a-1 E H.
Proof. Given G is a group and H is a subset of G. Let H is a subgroup of G, then, by
definition, (i), (ii), (iii) are true.
Converse. Let (i), (ii), (iii) hold. We show H is a subgroup ofG. We show the associativity
of elements of H.
Let a, b, C E G and since H c G :. a, b e E H
Since elements of G are also elements of H
. . Associativity holds for H. Hence the Theorem.
Another statement : A subset H of a group G is a subgroup of G iff a * b-I E H.
\f a, b E H
244 DISCRETE STRUCTURES
Theorem XIII. Let Hi and H2 be subgroup of group G, neither of which contains the
other. Show that there exist an element of G belonging neither to Hi nor H2 .
Proof. Given H, and H2 are subgroups of G. Also H , q; H2 and H2 q; H" We show that
there exists an element belonging neither to H I nor H2 o Let) if possible) there is an element a
belonging to H , and H2 i.e., a E H , n H 2 .
Now a E H I and since H I is a subgroup of G . . . .. (1)
But a E H2 and since H 2 is a subgroup of G .. . .. (2)
(1) and (2) gives H , c H2 , a contradiction.
Hence the theorem.
Theorem XIV. If H and K are two subgroups of G, then H n K is also a subgroup of G.
(P.T.U. B.Tech. Dec. 2012, May 2010, Dec. 2007)
Proof. We know that a subset H of a group G is a subgroup of G iff ab-I E H \;f a, b E H.
Let a, b E H n K. We show ab-I E H n K.
Now a E H n K => a E H and a E K
Also b E H n K => b E H and b E K
Since H is a subgroup of G and a, b E H
=> ab-I E H (Using theorem X) ... (1)
Also K is a subgroup of G and a, b E K
=> ab-I E K ... (2)
I
From (1) and (2), ab- E H n K. Hence H n K is a subgroup of G.
IfH and K are two subgroups of a group G, then give an example to show that H K mayu
not be a subgroup of G
Cor.
Similarly, ay = e
Hence ya = e = ay
===> y is the inverse of a. Hence the theorem.
MONOIDSAND GROUPS 245
Theorem XVI. Let H be a subgroup of G. Then
(a) H = Ha <=? a E H
(c) aH = bH
(d) HH = H.
Proof. (a) Let Ha = H. If e E H => e a E Ha = H
=> aE H l ea = a
Conversly, Let a E H. As H is a subgroup and h E H, a E H
=> haE H I H is closed under multiplication.
HaeH ... (1)
Again) if h E H) a E H and since H is a subgroup of G) I
h a- E H (Theorem X)
=> I
(ha- ) a E H a
h(a-I a) E Ha => h e E Ha
hE Ha
HeHa ... (2)
From (1) and (2) Ha = H
(b) Let Ha = Hb and we show ab-I E H
Now a = e a E Ha
=> a E Ha = Hb
=> a E Hb => a = hb, h E H
=> ab-I = (hb)b-I = h(bb-I) = he = h E H
=> ab-I E H
Conversly, Let ab-I E H => ab-I = h, h E H
=> a = hb
=> Ha = Hhb = Hb I For h E H, Hh = H
(c) Proceed yourself as in Part (b).
(d) Let h E H. Then,
H = Hh V h E H I Using part (a)
H e HH e H
HH = H.
Example 11. Consider an algebraic system (G, *), where G is the set ofall non-zero real
ab
numbers and * is a binary operation defined by a * b = 4' Show that (G, *) is an abelian
group.
ab
Sol. Closure property. The set G is closed under the operation *. Since, a * b = "4 is
a real number. Hence) belongs to G.
Associative property. The operation
ab ( )
* is associative. Let a, b,
(ab)c abc
(a * b) * c = "4 * c = 16 = 16 '
C E G) then we have
Similarly, a * (b * c) = a *
( )
bC
4
=
a(bc) abc
16
=
16
.
Identity. To find the identity element, let us assume that e is a positive real number.
Then for a E G,
ea
- = a or e = 4
4
Similarly, a*e=a
ae
- = a or e = 4.
4
Thus, the identity an element in G is 4.
Inverse. Let us assume that a E G. If a- I E Q is an inverse of a) then a * a- I = 4
1
aa - - 1
16
-- = 4 or a =
1
4 a
Similarly, a- * a = 4 gives
a- I a 1
16
-- = 4 or a- = -
4 a
Th us, the inverse of an element a in G is �.
a
Commutative. The operation * on G is commutative.
ab ba
a * b = - = - = b * a.
4 4
Thus, the algebraic system (G, *) is closed, associative, has identity element, has in
verse and commutative. Hence, the system (G, *) is an abelian group.
Example 12. Let (Z, *) be an algebraic structure, where Z is the set of integers and the
operation * is defined by n * m = maximum (n, my. Determine whether (Z, *) is a monoid or a
group or an abelian group.
Sol. Closure Property
We know that n * m = max. (n,m) E Z \;j n, m E Z
Hence * is closed.
Associative property. Let us assume a, b, c E Z.
MONOIDSAND GROUPS 247
Then, we have a * (b * c) = a * max. (b, c) = max. (a, max. (b, c» = max. (a, b, c)
Similarly, (a * b) * c = max. (a, b, c)
Hence * is associative.
Identity. Let e be the identity element. Then max. (a, e) = a
Hence) the minimum element is the identity element.
Inverse. The inverse of any element does not exist. Since) the inverse does not exist)
hence (Z) *) is not a group or abelian group but a monoid as it satisfies the properties of
closure) associative and identity.
o 1
o o o
1 o 1
Fig. 8.6
(b) Associative property. The operation 0 is associative. Let a, b, c E G, then we have
(a 0 b) 0 c = a 0 (b 0 c) e.g., (0 0 1) 0 1 = (0) 0 1 = 0
Similarly, 00 (1 0 1) = 0 0 (1) = O.
(c) Identity. The element 1 is the identity element as for every a E {O, I}: We have
1 0 a = a = a 0 1.
(d) Inverse. There must exist an inverse of every element a E {O, I}, such that
a 0 a- 1 = 1
But the inverse of element 0 does not exist.
Therefore, since the inverse of every element a E {O, I} does not exist. Hence ({O, I), 0)
is not a group.
(ii) The three distinct groups (G, 0), where G c S and G has 2 elements is as follows
(a) ({I, 3), 0) (b) ({I, 5), 0) (c) ({I, 7), 0).
Example 14. Determine whether a semi-group with more than one idempotent element
can be a group. (P.T.V. B.Tech. Dec. 2010)
Sol. Let (A, *) be a semi· group with two idempotent elements a and b (a ", b). Then we
have
... (1)
b * b = b. ... (2)
Now assume that A is a group with identity element e.
a*e=a and b*e=b
248 DISCRETE STRUCTURES
From (1) and (2),
a*e=a=a#a ::::::} e=a I Left Cancellation Law
Also b*e=b=b"b => e=b I Left Cancellation Law
a=e=b
which is a contradiction to a i:- b.
Hence (A, *) can not be group.
Example 15. Let (G, 0) be a group. Show that if (G, 0) is an Abelian group then,
(a 0 b) 2 = a2 0 b 2 for all a and b in G. (P.T.V. B.Tech. Dec. 2010)
Sol. Let us assume G is an Abelian group, then
(a 0 b)2 = (a 0 b) 0 (a 0 b) = a 0 (b 0 a) 0 b o is associative]
= a o � 0 � o b = � 0 � 0 (b o � = � o b 2 I G is abelian
Hence, 2 2 2
(a 0 b) = a 0 b \;j a, b E G.
Example 16. Let G be a group of 2 x 2 matrices with rational entries and non-zero
determinant. Let H be a subset of G consisting of matrices whose upper right entry is zero. Then
show that H is a subgroup of G.
Let A, B E H where A =
(a1
c,
Consider AB = c,(a1
�)
d1 2 E H
A= (� �) . I A
I� �I
I = = ad
Also All = d) A 2 = - C, A2 =
1 0,
1 A22 =a
adj A = (
A ll A 12
A 21 A 22
) ( 0)
T
d
= -c a
Hence H is a subgroup of G.
MONOIDSAND GROUPS 249
Example 17. Let G be a group of real numbers under multiplication. Let H = {- I, I}.
Then show that H is a subgroup of G under multiplication.
Sol. Consider the multiplication table of H under multiplication.
-1 1
-1 1 -1
1 -1 1
From the table, we observe that each element in the table belongs to H.
Hence H is closed under multiplication.
Also, the inverse of - 1 is - 1 and of 1 is 1. Thus each element of H has its inverse.
Therefore H is a subgroup of G under multiplication.
Example 18. Consider the group of integers Z under +. Let E = The set of even integers.
Then show that E is a subgroup of Z under +.
Sol. Given E = {2m : m E Z} i.e., the set of even integers. Clearly E is a subset of Z.
Let a, b E E => a = 2m, m E Z
b = 2n, n E Z
a + b = 2m + 2n = 2(m + n) E E 1 m, n E Z m+nE Z
i.e., E is closed under +. Also for each a E E) we have a = 2m) m E Z
- a = - 2m = 2(- m) = 2 t, t = - m E Z
-aE E
Th us each element belonging to E has additive inverse.
E is a subgroup of Z under +.
Example 19. Let Z be a group of integers under +. Let Z+ is the set of non-negative
integers. Is Z+ a subgroup of Z ?
Sol. Z+ = {O, 1, 2, 3, ...}
Clearly Z+ is a subset of Z. But Z+ is not a subgroup of Z. Since the elements of Z+ do not
have additive inverses. For e.g., 2 E Z\ but - 2 tl Z+ .
Example 20. Consider Z12 = [0, I, 2, ... I ll, the group under addition modulo 12. Let
H = [0, 3, 6, 9]. Show that H is a subgroup of Z1 2 under +1 2'
Sol. Given H = [0, 3, 6, 9]. Clearly H is a subset of Z, 2 '
Let a, b E H => a + 1 2 b is also in H. :. H is closed under + 1 2 ' Also we have
3 + ,2 9 = 0, 0 is the identity of Z, 2
6 +,2 6 = 0
9 +,2 3 = 0
each element of H has its inverse.
H is a subgroup of Z, 2 under addition modulo12.
Example 21. Consider the group of integers Z under +. Let 2Z and 3Z are two subgroups
of [Z; +]. Is 2Z n 3Z a subgroup of Z ?
Sol. We know that if H and K are two subgroups of a group G. Then H n K is also a
subgroup of G. Using this result, we can say that 2Z n 3Z is a subgroup of Z. (Theorem XII)
250 DISCRETE STRUCTURES
Example 22. Consider Z,5' the group under addition modulo 16. Let H, = [0, 6, 10] ,
H2 = 4, 8, 12]. Are H , and H 2 subgroups of Z , 5 under +,5 ?
[0,
Sol. To check whether H, is a subgroup of Z,5' compute the following Table 8.6.
Table 8.6
+,5 0 5 10
0 0 5 10
5 5 10 0
10 10 0 5
From the Table 8.6, we observe that each element which is in the interior of the addition
table is also in H" :. H , is closed under + ' 5 ' Also we have 6 + , 5 10 = 0, 10 + , 5 6 = 0, 0 is the
identity . . each element of H, has its inverse. :. H I is a subgroup of Z 15"
To check, whether H2 is a subgroup of Z , 5 compute the following Table 8.7.
'
Table 8.7
+,5 0 4 8 12
0 0 4 8 12
4 4 8 12 1
8 8 12 1 5
12 12 1 5 9
From the Table 8.7, we observe that there are some elements in the interior of the
addition table, which are not in H2 (e.g., 9 'l H ) . Hence H2 is not closed under + 5' :' H2 is
'
not a subgroup of Z , 5 '
Example 23. Let H and K be groups.
(a) What do you mean by the direct product of H and K?
(b) What is the identify element of H x K ?
(d) Describe and write the multiplication table of the group G = Z2 X Z2'
(c) What is the order of H x K ?
Sol. (a) Let G = H x K be the cartesian product of H and K with the operation * defmed by
(h, k) * (h', k') = (hh', kk')
Then G is group called the direct product of H and K.
(b) Let eR is the identity element of H and eK be the identity element of K, then (eR , e0
is an identity element of H x K.
(c) o(G) = o(H x K) = o(H) x o(K)
(d) As, Z 2 = {O, I} has two elements . . o(Z) = 2
.. o(G) = o(Z2 x Z) = o(Z) x o(Z) = 2 x 2 = 4
. . G has four elements namely a = (1, 0), b = (0, 1), c = (1, 1), e = (0, 0).
The multiplication table of G, = Z2 X Z2 is shown below (Table 8.8):
Table 8.8
* e a b c
e e a b c
a a e c b
b b c e a
c c b a e
MONOIDSAND GROUPS 251
Here) a2 = e) b2 = e) c2 = e
Since the table is symmetric, therefore G is abelian.
L If a, b, c are elements of a group G and a * b :::: c * a. Then b :::: c ? Explain your answer.
(P. T. U. B.Tech, Dec. 2006, May 2005)
2. Discuss the relation between groups and monoids ? Is every monoid a group ? Is every group a
monoid ?
3. Which of the following are groups ?
(i) M2xS(R) with matrix addition
(ii) M2x2(R) with matrix multiplication
(iii) The positive real numbers with multiplication
(iv) The non-zero real numbers with multiplication
(v) The set [- 1, 1] with multiplication.
4. Give an example of (i) a finite abelian group (ii) an infinite non-abelian group.
5. Let V :::: {e, a, b, c}. Let * be defined by x * x:::: e for all x E V. Write a complete table for * so that 0/, *)
is a group.
6. Which of the following subsets of the real numbers is a subgroup of [R, +] ?
(a) The rational numbers (b) The positive real numbers
(c) H {� K is an integer}
= : (d) H {2K : K is an integer}
=
7.
8. Show that [Zn; x,J, n :;:': 2 is a monoid with identity.
9. Show that the intersection of any number of subgroups of G is a subgroup of G.
10. Let G be a group and a, b E G. Then the equation x * a :::: b has a unique solution given by
x :::: b * a-I .
11. Let G be a group of order is prime. Find all subgroups of G.
Prove that congruence modulo H, a b (mod H) is an equivalence relation in G.
p, p
12. ==
Answers
2. No, Yes (Every group is a monoid)
3. (i), (iii), (iv), (v) are groups
4. (i) G :::: {e, a, b, c} is a finite abolian group under defined by the following Table 8.9:
*
Table 8.9
*
e a b c
e e a b c
a a e c b
b b c a e
c c b e a
252 DISCRETE STRUCTURES
(ii) M2x2(R), the set of all 2 x 2 matrices (� �} ad- be :;tO is an infinite non-abelian group w.r.t.
the matrix multiplication.
5. See Q. 4 (i) 6. (a) and (c) 11. {e) and G itself.
Hints
L Given a, b, G. Consider a * b :::: c * a. We claim b c. For, if, b :::: c, then
CE -:f-
a * b :::: a * c c * a unless G is abelian. Hence the given statement is a false statement. However,
-:f-
the given statement is a true statement if G is an abelian group. In this case,
a * b :::: c * a :::: a * c I G is abelian
b=c Left cancellation law
2. The set N of natural numbers is a monoid under +, but not a group under +.
3. M2x2(R) with matrix multiplication is not a group.
Take A = (i i) . I A I = I i i l = 1 - 1 = 0
=:::} I A I :::: 0 i.e., the matrix is singular and hence A-I does not exist.
11. By Lagrange's theorem, the order of a subgroup H of G divides the order of G. Hence O(H) :::: 1 or p.
,
Sol. There are n(H) ways of choosing an element from any coset and there are [G : H]
distinct cosets. Hence. the desired number is n(H) [G HI
MONOIDSAND GROUPS 253
ILLUSTRATIVE EXAMPLES
Example 1. Let us consider a group (G, *) , where G is a set having elements {O, I} and *
is a binary operation. Also, let H = {I} is a subgroup of G. Determine all the left cosets ofH in G.
Sol. There are only 2 left cosets i.e.,
1 * H = H = { 1}
o * H = {OJ.
Example 2. Let (I, +) is a group, where I is the set of all integers and + is an addition
operation and let H = {. .. , - 4, - 2, 0, 2, 4, 6, 8, .. .} be the subgroup consisting of multiples of 2.
Determine all the left cosets of H in I.
Sol. There are two distinct left cosets of H in I.
o + H = { ... , - 6, - 4, - 2, 0, 2, 4, 6, ...} = H
1 + H = {... - 5, - 3, - 1 , 1, 3, 5, 7, ...}
2 + H = {... - 4, - 2, 0, 2, 4, ......} = H
3 + H = {... , - 5, - 3, - 1 , 1, 3, 5, ...} = 1 + H
so on.
There is no other distinct left coset because any other left coset coincides with the cosets
given above.
Example 3. Let G = (1. +) be a group, where l is the set of integers and + is an addition
operation, also let G 1 = {. ..... - 14, - 7, 0, 7, 14, 21, ..... .} be a subgroup consisting of the multiples
of 7. Determine the cosets of G 1 in I.
Sol. The set I has 7 different cosets (left or right) of Gl ' which are as shown below.
0 + H = {...... - 14, - 7, 0, 7, 14, 2 1 , ......}
1 + H = {...... - 13, - 6, 1 , 8, 15, 22, ......}
2 + H = {...... - 12, - 5, 2, 9, 16, 23, ......}
3 + H = {...... - 1 1 , - 4, 3, 10, 17, 24, ......}
4 + H = {...... - 10, - 3, 4, 1 1 , 18, 25, ......}
5 + H = {...... - 9, - 2, 5, 12, 19, 26, ......}
6 + H = {...... - 8, - 1 , 6, 13, 20, 27, ......}
7 + H = {...... - 14, - 7, 0, 7, 14, 2 1 , ......} = H
All other cosets coincides with any one of the cosets shown above) hence we will not
count them.
Theorem I. If b E a * H (left coset), then
a * H = b * H. Also, if b E H * a (right coset), Then H * a = H * b
Proof. Case I. Let x E a * H, we show x E b * H
Now x E a * H ::::::} there exists an element h E H such that x = a * h
I I
Also b E a * H => There exists an element h2 E H such that b = a * h2
254 DISCRETE STRUCTURES
b * h2-1 = (a * h;) * h2-1 = a * (h2 * h2-1) = a * e = a
a = b * h2-1
x = a * h 1 = (b * h2-1) * h 1 = b * (h2-1 * h 1)
H and H is subgroup of G
h2-1 E H and h2-' * h , E H
Hence x = b * (h2-1 * h,) E b * H
=> XE b * H
=> a*Hcb*H ... (1)
Similarly, if x E b * H) we can easily show that x E a * H.
=> b*Hca*H ... (2)
from (1) and (2), a*H=b*H
Case II. Let x E H * a. We show x E H * b. Now x E H * a => There exists an element
h, E H such that x = h, * a
Also b E H * a => There exists an element h2 E H such that b = h2 * a
=> h2-1 * b = h2-1 * (h2 * a) = (h2-1 * h;) * a
=e*a=a
a = h2-1 * b
X = h 1 * a = h 1 * (h2-1 * b) = (h 1 * h2-1) * b
Since hp h2 E H and H is a subgroup of G. . . h, * h2-1 E H
Hence x = (h, * h2-1) * b E H * b
=> XE H * b
=> H*a cH*b
Similarly) if x E H * b) we can easily show that x E H * a
=> H*bcH*a
Hence H *a=H*b
Theorem II. Let H be a subgroup of a group G. Then the right cosets Ha form a parti-
tion of G. Or
Any two right (left) cosets in a group G are either disjoint or equal.
Proof. Let Ha and Hb be two right cosets and suppose Ha n Hb '" q,. We show Ha = Hb
Let x E Ha n Hb => x E Ha and x E Hb
=> x = h,a and x = h 2 b for some h I ' h2 E H
=> h, a = h2 b E Hb
=> h,a E Hb
=> Ha c Hb
Also h2 b = h,a E Ha
=> h2 b E Ha
=> Hb c Ha
Hence Ha = Hb
Lagrange's Theorem
(P.T. U. B.Tech. Dec. 2007, 2006, May 2006, May 2012, May 2013)
Theorem III. If G is a finite group and H is a subgroup of G, then o(H) 1 0(G).
Proof. Since H is a subgroup of a finite group G) . . H is also finite) say)
H = {h I ' h2 , ... hnl . where each hi is distinct.
We claim H and any coset Ha have the same number of elements.
MONOIDSAND GROUPS 255
Consider Ha = {h , a, h2a, ... hna}. We claim all hia's are distinct. For if,
hp = hja
=> h, = hJ 1 Right cancellation law
a contradiction, since h/s are distinct. Thus, H and Ha have same number of elements.
Now G is finite :. The number of distinct right cosets of H in G is also finite, say, k.
k
Let G = Ha, u Ha2 u ... u Hak = i�' Ha i
O. Let H = [(� �} a ", 0] . Then H is a normal subgroup of G. (P.T.V. B.Tech. Dec. 2010)
Sol. We first show that H is a subgroup of G.
(� �} (� �J
Let h I ' h2 E H such that
hl = h2 = 1 a ", o, a, ,,, o
Now
)( ) =( )
0
a
al 0
0 a1
aal 0
0 aal E H I aa , '" 0
(o ) I I
i.e., H is closed under matrix multiplication. Further) For A E H)we have
a 0 a 0 2
A=
a ) I A I = 0 a =a
Also All = a, A 2 = 0, A2 = 0, A22 = a
1 1
(� �r (� �)
]
adj A = =
( ) ( )
Thus each element belonging to H has multiplicative inverse. Hence H is a subgroup of G.
[ l
Further, For g= a b E G, h= a 0 E H, ConsIder
.
c d 0 a
(: J ( J ( J ( J ( J ad�bC �
-
b a 0 a b -I a b a 0 ad bc
[ : [ :� :
ghg-l = = c d 0 a a -c
d 0 a c d
ad - bc ad - bc
(
a 2 ba ad bC ab bC
= ea da
J -
=
a
�=
c
�
ad - bc :
[ ::d �
-c a
:(
cad - dae - cab + da 2
ad - bc ad - bc ad - bc ad - bc
� � �)
a - C)
O
b
= a (ad _ bC) = E H
ad - bc
Hence H is a normal subgroup of G under matrix multiplication.
Example 5. Let G be a group of two by two invertible real matrices (� �).- ad - bc cj' 0
A_
- ( a 0
)
° b , ab '" 0, B= (a, 0
)
° b, ' a, b, '" °
[) :
matrix multiplication.
d -b
:[ :
0 ad - bc ad -bc
[
b -c a
ad - bc ad - bc
�
-b a 2 d - b 2c - a 2b + b 2 a
b2
db
) ad bc
-c
ad - bc
a = ad - bc ad - bc
cad - dbc - cab + dab
"H
ad - bc ad - bc ad - bc ad - bc
Hence H is not a normal subgroup of G under matrix multiplication.
Example 6. Let G be the group of non-singular 2 x 2 matrices under matrix multiplica
tion. Let H be the subset of G consisting of the lower triangular matrices i.e.; matrices of the
form (� �) where ad '" O. Show that H is a subgroup of G, but not a normal subgroup.
Sol. Let A, B E H such that
A= (a,
c,
Consider AB = (a,
c,
( a,a2 °
-- c 1a 2 + d1c2 d1d2 E ) H
Take
=
( 1 2) ( 1 0 ) ( 3 2 ) -
1 3 1 1 -1 1
( ) ( 23
1 2
= 1 3
-2)
-1
=
(7 )
9
-
-
4
5 'l H.
Consider xy = h , k , h2 k2 = h, h2 (h2-1 k, h) k2 E HK
Let h2 E H => h2-1 E H e G => h2-1 E G
Since K is a normal subgroup of G) and k l E K)
.. h2-1 k, h2 E K
=> (h 2-1 k, h) k2 E K
=> h , h 2 (h2-1 k, h) k2 E HK
Thus HK is closed under multiplication.
Further) For x E HK) we have
X-I = (h, k,)-' = k,-' h,-' = h,-'(h, k,-' h,-')
Leth, E H e G => h , E G. Also k, E K
=> k,-' E K
Since K is a normal subgroup of G
h 1 k1-1 h 1-1 E K
=> h,-' (h, k,-') h,-' E HK
Thus y-l E HK.
Finally, e E H, e E K => e . e E HK => e E HK
Thus HK is a subgroup of G.
Theorem VII. Let H is a subgroup of a group G. Then H is a normal subgroup of G iff
aH = Ha \j a E G.
Proof. Let H is a normal subgroup of G. Then for a E G, we have
aHa-1 = H
(aH a-1)a = Ha
aH(a-1 a) = Ha
aH e = Ha
aH = Ha
Theorem VIII. The intersection of any number of normal subgroups of G is a normal
subgroup of G.
260 DISCRETE STRUCTURES
Proof. Let HI ' H2, H3, .... be a collection of normal subgroups of a group G. Let
ghg-I E H
=> H is a normal subgroup of G.
Cor. Prove that intersection of two normal subgroups is again a normal subgroup.
(P.T. U. B.Tech. May 2007, May 2006)
Remark. Union of two normal subgroups may not be a normal subgroups
Consider G :::: The group of integers under +
H I :::: { ... - 6, - 4, - 2, 0, 2, 4, 6 ...}
H2 :::: { ... - 12, - 9, - 6, - 3, 0, 3, 6, 9, 12, ...} are subgroups of G under +.
But H , U H2 = {... - 4, - 3, - 2, 0, 2, 3, 4, 6, ...}
Since 2 E H , U H2 , 3 E H , U H2 => 2 + 3 = 5 'l H, U H 2 i.e., H , u H2 is not closed under +.
Hence H , u H2 is not a subgroup of G under +.
Theorem IX. Let G is a group and H is a normal subgroup of G. Let G IH denotes the
collection of right (left) cosets of H in G. Show that G IH is a group under the coset multiplica
tion defined by
aHbH = abH V a,b E G
Proof. (i) Closure Property. By definition, G/H = {aH : a E G}
Let aH , bH E G/H and consider
(aH) (bH) = a(Hb)H = a(bH)H I Ha = aH <=? H is normal in G (Theorem VII)
= (ab) HH
= abH I HH = H
Hence coset multiplication is well-defined i.e., G/H is closed under coset multiplication.
(ii) Associativity. Let aH, bH, cH E G/H for all a, b, c E G
Consider aH(bH cH) = aH(bcH) = abcH I Using (i)
Also (aHbH)cH = (abH)cH = abcH
=> aH(bHcH) = (aHbH)cH
Thus associativity holds in G/H.
(iii) Identity. Let aH E G/H for a E G.
Consider (aH)H = a(HH) = aH I HH = H
=> H is the identity element of G/H.
(iv) Inverse. Let aH E G/H and consider
(a-I H) (aH) = (a-I a)H = eH = H
Le., a-I H is the inverse of aH
Thus G/H is a group under coset multiplication.
MONOIDSAND GROUPS 261
= as+r I r + s = s + r as Z is abelian
=> G is abelian.
Theorem XII. Every subgroup of a cyclic group is cyclic.
(P.T.V. B.Tech. Dec. 2009)
Proof. Let G = <a> i.e., G is a cyclic group with a as its generator. Let H be a subgroup
of G.
Case I. If H = (e), then H = <e> i.e., H is a cyclic group with e as a generator.
Case II. If H '" [e], then o(H) :> 2 i.e., there exists e '" a E H.
Since H is a subgroup) it must be closed under inverses and so contains positive powers
of a. Let m is the smallest power of a such that am E H. We claim b = am is a generator of H. Let
X E H. But H c G . . X E G.
Since G is a cyclic group G with a as its generator. :. x = an for some n E Z.
Dividing n by m) we get a quotient q and remainder r. i.e.,
n = mq + r) 0 :::; r < m
Now an = amq+r = amq . ar = bq . ar
ar = b-q a
=> •
n
Here an ) b E H and since H is a subgroup . . b-q an E H which means ar E H.
But m was the least positive integer of a such that am . E H and r < m .
. . We must have r = 0
Hence an = b q for some q E Z
::::::} X = an = bq i.e.) every element x E H is of the form bq for some q E Z
. . H is cyclic.
Theorem XIII. If G is a cyclic group of order n and a is a generator of G. Let (n, k) = d.
Then the order of the cyclic group generated by ka is !!:. where d is the greatest common divisor
d
of n and k.
Proof. Proof of this theorem is beyond the scope.
Example 10. Find the order of the cyclic subgroup generated by 18 in Z30'
MONOIDSAND GROUPS 263
Sol. We know that 1 is a generator of Z30' Also 18 = 18(1) i.e., k =18, a = 1, n = 30
The greatest common divisor of (n, k) = (30, 18) = 6 = d
8.25. MORPHISMS
The word 'morphism ' is a combination of various terms like, homomorphism,
isomorphism, actomorphism, endomorphism etc.
8.25. 1 . Group Homomorphism
(P. T. U. B. Tech. May 2007, May 2006)
A mapping <p from a group (G,.). into a group (G, * ) is said to be a group homomorphism if
<p (a . b) = <p (a) * <p(b) \;j a, b E G
8.25.2. Group Isomorphism (P.T. U. B. Tech. Dec. 2007)
A homomorphism <p which is one-one and onto is called isomorphism and the groups G
and G' are called isomorphic, written as G G'. ==
8.26. KERNEL f
8.27. IMAGE f
The image f is the set of the images of the elements under f i.e.,
rm(!) = (b E G' : f(a) = b for a E G) where f is a homomorphism of G to G'.
'
The term 'range [ is also used for 'image [ .
'
Example 15. Let G be a group of real numbers under addition and let G' be the group of
positive real numbers under multiplication. Define f: G � G' by f(a) = 2".
Show that f is a homomorphism. Also show that G and G' are isomorphic.
Sol. Given fis a mapping from (G, +) to (G', .) defined by f(a) = 2a
Let a, b E G and consider
f(a + b) = 2a+ b = 2a . 2b = f(a) . feb)
Hence f : G � G' is homomorphism.
MONOIDSAND GROUPS 267
To check f is one-one. Let f(a) = f(b)
2a = 2 b => a=b
f is one-one.
To check f is onto : For each a E R, we have 2a is a positive real number. Thus
f(a) = 2a is onto.
Hence f: G � G' is an isomorphism and the groups G and G' are isomorphic i.e., G G'. ==
Example 16. Let f : G --'> G' be defined by f(Z) = 1 Z 1 where G = group of non-zero
complex numbers under multiplication and 0' = group of non-zero real numbers under multi
plication. Show that f is a group homomorphism. Also describe geometrically the Kernel K of
the homomorphism f.
Sol. Let Zl ' Z2 E G be any two non-zero complex numbers.
Consider f(Z, Z) = 1 Z, Z 2 1 = 1 Z, 1 1 Z2 1 = f (Z,) f(Z)
. . f is a group homomorphism.
Also by definition,
Kernel f = { Z E G : f (Z) = 1 , 1 is the identity of G'}
= { Z E G : 1 Z 1 = I},
which is a circle with unit radius.
Example 17. Let G be the group of two by two invertible matrices (� �)- ad - bc '" O.
A
Define 8 : G --'> G by 8 (A) = 2 . Show that 8 is a group homomorphism.
1 A1
A B
Sol. Let A, B E G such that 8 (A) = 2 , 8 (B) = TB7
1A1
AB AB
Consider 8(AB) = 2 = A 2 B I2
I AB I I I 1
A B
=
A
1 1
2 . TB7 = 8 (A) . 8 (B)
. . 8 is a group homomorphism.
Example 18. Let G be a group and g E G. Define a function f : G --'> G by f(x) = gxg-1
Show that g is an isomorphism of G to G.
Sol. Given f : G --'> G is a function defined by f(x) = gXg-l for each x E G
Let x, y E G and consider
f(xy) = g(xy)g-l = g(xg-1gy)g-1 = (gXg-l)(gyg-l) = f(x)f(y)
i.e., f is a homomorphism of G to G.
To show f is one-one : Let f(x) = fry)
gxg-' = gyg-l
(gxg-1)g = (gyg-l)g
268 DISCRETE STRUCTURES
We lastly show that 8 is onto. Let y E G'. Since G' is the Image of G under f, there exists
x E G such that f(x) = y => 8(Kx) = y i.e., 8 is onto. Therefore we have proved that 8 is
homomorphism) one-one and onto
G I K = G'.
Example 20_ Let Z be the additive group of integers. Examine whether the function
f: Z --; Z defined by f (x) = 2x 'd x E Z is a group isomorphism? (P.T.V. B.Tech. May 2013)
SoL Let x, y E Z and consider
f (x + y) = 2 (x + y)
= 2x + 2y
= f (x) + f (y)
. . f is a group homomorphism
To show f is one-one:
Let f (x) = f (y)
=> 2x = 2y
=> x = y 'd x, Y E Z
. . f is one-one
To show f is onto:
Let y E Z and consider x E Z such that
y = f (x) = 2x
y
x= -'
2
MONOIDSAND GROUPS 271
If y =
3
3 E Z, then x = "2 'l Z. f is not onto.
Hence f is not a group isomorphism.
Example 21. (a) Let G be a group of non-zero complex numbers under multiplication.
Let G/ be the group of non-zero real numbers under multiplication. Consider the mapping
f : G � G'defined by f(z) = I z I . Show that G 1 Ker f,= G�
(b) Define 8 : Z � Zl O by
8(n) = The remainder when n is divided by 10. Show that 8 is a homomorphism from Z
to Zl O ' Also find Ker 8 and prove that Z 1 Zl O Zl O'
=
{
= qE Q : f = q V a, b E N}
= Q\ the set of +ve rational numbers
Hence, S/� is isomorphic to ( Q+ , +).
Further, since S/- and (Q + , +) are isomorphic, both S/� and (Q + , +) have same identity
as well as same inverse.
But, Q + , the set of positive rational number has no identity (additive) as well as no
inverse (additive) therefore) S/� has no identity and no inverse.
Example 24. Show that G = {I, - 1, i, - i} is a group under multiplication. Also G '" Z4 by
giving an explicit isomorphism r G --; Z4'
Sol. Given G = {I, - 1 , i, - i} such that i2 = - 1 . Clearly
G is a group under multiplication. (prove yourself)
Z4 = {O, 1 , 2, 3}
Define f: G --; Z4 by
f (l) = 0, [ (- 1) = 2 2
f (i) = 1 , [ (- i) = 3 ---,f----T+ 3
G ", Z4'
G Z4
Theorem xx. Any finite cyclic group of order n is isomorphic to Zn'
(P.T.V. B.Tech. Dec. 2012)
Proof. Let G = <a> be a finite cyclic group, with a as its generator and let o(G) = n
Define f : Z --; G by f(m) = am
Let m, r E Z such that f(m) = am, f(r) = a'
Consider f(m + r) = am+, = am . a' = f(m) f(r)
Thus fis a homomorphism of Z to G.
By fundamental theorem of group homomorphism. Z I Ker f", G
But if s E Ker f, then by definition,
f(s) = e, e E G
<=?
<=? o(a)ls
<=? nls
<=? s = nk) for some k
<=? S
E <n>
<=? Ker f= <n>
Hence Z I <n> '" G or G '" Zn where Zn = Z/<n>.
'
276 DISCRETE STRUCTURES
Remark.
(xyx-l)i = (xyx-11) (xyx-l1) (xyx-') ... (xyx-l) (j times)
= xy(X- X) y (X- X) ... (yX-l) (j times)
:::: xyjxl
MONOIDSAND GROUPS 277
3
Example 3. Let G = Dn and H = {Yo y2. y yn-1. y n = e}
• . . .•
Then GIH is isomorphic to the Multiplicative group {i. -I}. where Dn is the dihedral
group of order 2n.
Sol. Define W = {I, -I} and 8 : G --; W by
8(yi) = 1, lsisn
i
8(xy ) = -1, 1 ::; i ::; n
We show 8 is a homomorphism from G to W.
By definition,
6. -----t
7. Show that any infinite cyclic group is isomorphic to additive group of integers.
8. What are the generators of the additive group z?
278 DISCRETE STRUCTURES
9. Which of the following groups are cyclic ? Explain
(i) [Q, +] (ii) [ , ,]
W (iii) [6z, +J,
10. Determine the order of the cyclic subgroup generated by the element
(i) Z 25' 15 (ii) Z64 ' 2,
11. Prove that if o(G) > 2 and G is cyclic, then G has atleast two generators.
12. Which of the following functions are homomorphism ?
(i) [ : R* -->
W defined by [(a) I a I
(ii) [ : Z 5 --> Z2 defined by [(n) 0 if n is even and [(n) 1 if n is odd,
=
13.
(i) Z 1 2 into Z 12 (ii) Z 1 2 into Z4 (iiL) Z9 into Z8·
14. If G is an abelian group and let f is a function from G into G, defined by [(x) x" Is [ a
homomorphism ? an isomorphism ?
=
(b) On the basis of part (a), describe a set of bijection on the set of integers.
(P, T, U, B, Tech, May 2005)
17. Consider Z20 :::: {O, 1, ... , 19} under addition modulo 20. Let H be the subgroup generated by 5.
(a) Find the elements and order of H. (b) Find the cosets of H in Z20.
18. Consider G :::: {1, 5, 7, 11, 13, 17} under multiplication modulo 18.
(a) Construct the multiplication table of G.
(b) Find 5-1, 7-1, and 17-1
(c) Find the order and subgroups generated by: (i) 5, (ii) 13,
(d) Is G cyclic ?
19. Consider G :::: {1, 5, 7, 11) under multiplication modulo 12. (a) Find the order of each element
(b) Is G cyclic? (c) Find all subgroups,
20. Let 8 N x N. Let * be the operation on 8 defined by (a, b) * (a', b') (aa', bb'),
(a) Show that * is associative. (Hence S is a semigroup.)
= =
(b) Define [: (8, *) --> (Q, x) by [(a, b) alb, 8how that [is a homomorphism,
(c) Find the congruence relation � in S determined by the homomorphism f, i.e., x � y if f(x) :::: fCy).
=
(d) Describe S/�. Does S/� have an identity element? Does it have inverses?
21. Consider the set N of positive integers and let * denote the operation of least common multiple
(l.c,m,) on N,
(a) Find 4 * 6, 3 * 5, 9 * 18, and 1 * 6,
(b) Is (N, *) a semigroup ? Is it commutative ?
(c) Find the identity element of *.
(d) Which elements in N, if any, have inverse and what are they ?
MONOIDSAND GROUPS 279
22. Let Q be the set of rational numbers and let * be the relation on Q defined by a * b :::: a + b - ab
(a) Find 3 * 4, 2 * (- 5) and 7 * "21
(b) Is (Q, *) a semi-group ? Is it commutative ?
(c) Find the identity element for *.
(d) Do any of the elements in Q have an inverse ? why ?
Answers
L 4Z, 1 + 4Z, 2 + 4Z, 3 + 4Z,
o(G) :::: 36 :::: 6.
Take G :::: Z36 and H :::: <6> i.e., a cyclic group with 6 as its generator :. [G : H] :::: o(H)
2.
6
Also by Lagrange's theorem, o(H) I o(G) is true. The answer is not unique.
8. 1, - 1 9. (iii), 6 is a generator
10. (i) 5, (ii) 32 12. (i) (i,) No (iii) Yes
14. Yes, Yes
15. (a) Table 8,13
Table 8.13
+ 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
(c) 2- 1 1 1
4, 3- 3, 5- 1
(d) <2> {I, 2, 4} and <3> {I, 3}
= = =
(e) Yes,
= =
(a)
=
= = =
280 DISCRETE STRUCTURES
(ii) <13> = the subgroup generated by 13 = {I, 7, 13} and order « 13» = 3
(d) Yes,
19. (a) 0(1) = 1, 0(5) = 2, 0(7) = 2, 0(11) = 2
(b) No
(c) G, {1J, {I, 7}, {I, 5}, {I, ll}
20. (c) The congruence relation is given as: (a, b) (c, d) if ad :::: be
� �
(d) yes
21. (a) 4 * 6 = 12, 3 * 5 = 15, 9 * 18 = 18, 1 * 6 = 6
(b) Yes, since the operation of least common multiple is associative. Also a * b :::: b * a i.e., the
operation of least common multiple is commutative. Hence, (N, *) is a commutative semi
group.
(c) 1
(d) The only element which has an inverse is 1 and it is its own inverse
(a) 3 * 4 = -5, 2 * (-5) = 7, 7 * "2 = 4
1
22.
(b) Yes, (Q, *) is a commutative semi-group
aa-I_ .
(c) 0 is the identity element
Hints
4. See Proof of Lagrange's theorem.
9. (i), (ii) Let Q :::: <g> is a generated by g i.e., <g> :::: {nq : n Z}. But this set contains only integral
E
multiples of q, not every element in Q. Hence Q cannot be cyclic.
10. See example 10.
12. (ii) Consider [(2 +5 4) = [(6) = [(I) = 1
Also [(2) +, [(4) = 0 + 0 = O.
14. [(xy) = (xy)' = x'y' I Since G is abelian
= [(x) fry)
15. (d) (i)
2 +6 2 +6 2 = 0 .. 0(2) = 3
<2> = {I, 2, 4}
(ii) 3 +6 3 = 0 .. 0(3) = 2
<3> = {I, 3}
(e) 0(2) = 3, 0(3) = 2
4 +6 4 :::: 2, 4 +6 4 +6 4 :::: 2 +6 4 :::: 0
0(4) = 3
5 +6 5 :::: 4, 5 +6 5 +6 5 :::: 4 +6 5 :::: 3
5 +6 5 +6 5 +6 5 :::: 3 +6 5 :::: 2
5 +6 5 +6 5 +6 5 + 6 5 :::: 2 +6 5 :::: 1
.. 0(5) = 5
Also, 1 +6 1 +6 1 +6 1 +6 1 + 6 1 :::: 0
.. 0(1) = 6 = o(G)
G is cyclic as there is an element 1 G such that
E
0(1) = o(G).
MONOIDSAND GROUPS 281
16. Given G is a group under * and a E G. Also f: G G is defined by -----t
f(x) a * x \j E G X
=> x + a :::: y + a
=> x :::: y.
Hence f is one-one
Let Y E Z such that f(x) Y =
x + a :::: y
Zx :::: y - a E
Also for each Y E Z, we can find x E Z such that f(x) :::: y. Hence f is onto.
Since f is one-one and onto,
f is a bijection.
17. See examples on "cosets" and example 14, Art. 8.24 (cyclic group) in this chapter
18. See examples 11, Art. 8.24 (cyclic group) in this chapter
19. See examples 12,13 Art. 8.24 (cyclic group) in this chapter
20. (c) We know that a relation on a non-empty set S is said to be a congruence relation on S if
�
X => 3
Similarly, Y (c, d) where c, d E N.
= = =
� = � =
a c
b d
ad = be
Thus, (a, b) (c, d) if ad be
� ... (1)
Here, the relation defined by (1) is an equivalence relation (example 17 (b) page 65 chapter 2
=
"Relations" )
�
For this, we show if (a, b) (a',b') and (c, d) (c', d,), then we must have
� �
2 2, 3
(c) 1 * a :::: l.c.m., of 1 and a :::: 1 for any positive integer a. 3 1, 3
Also, a * 1 :::: l.c.m., of a and 1 :::: 1 1, 1
.. 1 is the identity element of N
(d) Let a E N and b is the inverse of a such that a * b :::: 1 l.c.m., of 4 and 6 = 2 x 2 x 3 = 12
::::} l.c.m. of a and b :::: 1, which is possible iff a :::: 1, b :::: 1
. . The only number which has an inverse is 1 and it is its own inverse.
22. (c) Let e is the identity element for *, then for every 1 a E Q, we have
-:f-
a * e :::: a ::::} a + e - ae :::: a
e - ae :::: O
=> 0
e(l - a) = => e= 0
Hence, the identity element is o.
MONOIDSAND GROUPS 283
a - x (1 - a) , a" 1
a
=> = => x = --
a-1
This a a-_1 is the inverse of a (a t:- 1).
_
Theorem. Show that the direct product of Gl and G2' denoted by G = G X G2' is also a
The group G = G, X G2 , is know as direct product or external direct product of G, and G2 .
1
ILLUSTRATIVE EXAMPLES
(c) Is G abelian?
(d) Is G cyclic?
(e) Is G ", Zi
Sol. (a) By definition the direct product of the groups G, and G2, we know G = G, X G2
is the cartesian product of G , and G2 . Therefore
)
o(G) = o(G , x G = o(G ,) o(G )
(b) We know Z2
= {O, 1}
Here o( Z)=2
Therefore, o(G) = 0(Z2 Z) o(Z) (Z) = 4
x = x
G = Z2 X Z 2 contains 4 elements) hence
G= {(O, 0), (1, 0), (0, 1), (1, 1)} = {e, a, b, c}
where e = (0, 0), a = (1, 0), b = (0, 1), c = (1, 1).
The multiplication table of G is shown below (Table S.15).
Table 8.15
* I a b c
I I a b c
a a I c b
b b c I a
c c b a I
Here a * a = (1, 0) * (1, 0) = (1, 0) = a
b * b = (0, 1) * (0, 1) = (0, 1) = b
c * c = (1, 1) * (1, 1) = (1, 1) = c
(c) Also, the Table S.15 is symmetrical , therefore, G is abelian.
(d) Since a * a = a
=> o(a) = 2
Similarly, o(b) = 2, o(c) = 2
Thus, all the elements of G are of order 2. It means that G does not have any element
whose order equals to 4, the order of G. Hence G cannot be cyclic.
Zn'
(e) We know that a finite cyclic group of order n is isomorphic to the group of integers
modulo n. Here, G is not cyclic. Hence G ;;t' Z4'
Example 2. Let H and K be any two groups and G = H x K be the direct product of the
groups H and K under the binary operation * defined by
(h, k) (h', k') = (hh', kk') \;j h, h' E H, k, k' E K
*
8 is well-defined
Homomorphism. Consider
8(h', h;) = (h , h2 , e) = (h I ' e) (h2 , e)
= 8(h',) 8(h ;)
8 is homomorphism
One-one. Consider
8(h;) = 8(h; )
h, = h2
(h I ' e) = (h2 , e)
h'l = h;
8 is one-one
Onto, Let h E H, e E Ie}, then by the definition of cartesian product of two sets.
(h, e) E H x (e) = H'
=> h' E H' where h' = (h, e)
Also 8(h') = (h, e)
8 is onto
Hence H' = H
(ii) To show H' � G (read as H' is a normal subgroup of G), we first show H' is non-empty
subset of G.
For e E H, (e, e) E H x= H'
(e)
=> (e, e) E H'. Thus H' '" <p .
Also, h E H, e E K
=> (h, e) E H x K = G => h' E G => H' (;; G
Hence, H' is a non-empty subset of G.
We next show H' is a subgroup of G
Let h;, h; E H' => h; = (h I ' e), h'2 = (h2 , e)
Consider h; h'i .' = (h I ' e) (h2 , e)-l = (h I ' e) (hi.'. e)
= (hI ' h2-1 , e) \;j h I ' h2 E H
E H x [e]
l
h; h;- E H
H' is a subgroup of G
286 DISCRETE STRUCTURES
We next show H' is a normal subgroup of G. Let g E G =Hx K => 3 h, E H, k, E K
such that g = (h I ' k,)
Let h' E H' h' = (h, e)
=>
Consider gh' g-I = (h I ' k,) (h, e), (h I ' k,)-'
= (h I ' k ,) (h, e) (h ," k,-')
= (h I ' k,) (hh,-" k,-') e E (e) is the identity
= (h , hh ,-" k, k ,')
= (h, hh,-" e) E H x (e) = H'
Since h I ' h E H and H is a group, therefore h,' E H => h,hh,' E H
=> gh'g-' E H' \j h' E H', g E G
Hence H' is a normal subgroup of G.
(iii) Since H' is a normal subgroup of G, therefore, G/H' is well-defined
Define [ : H x K --; K such that [(h, k) = k \j h E H, k E K
[ is well-defined: Consider
(h I ' k,) = (h2 , k)
k , = k2
[(h I ' k,) = [(h2 , k)
. . [is well-defined I :
[(h, k) = k \j h E H
.
L Consider G :::: Z2 X Z3. Describe and find the multiplication table of the group G :::: Z2 X Z3
(a) Is G abelian? (b) Is G cyclic?
(c) Is G = Z6?
Answer
L Z2 X Z3 = {(O, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2))
(a) Yes (b) Yes, G is cyclic group generated by (1, 1) ,
(d) Yes, G = Z6
Hints
(b) Consider (1, 1)= (1, 1)
(1, 1) + (1, 1)= (1 +2 1, 1 +3 1) = (0, 2)
(1, 1) + (1, 1) + (1, 1)= (1 +2 1 +2 1, 1 +3 1 +3 1) = (1, 0)
(1, 1) + (1, 1) + (1, 1) + (1, 1)= (1, 0) + (1, 1)
= (1 +2 1, 0 +3 1) = (0, 1)
(1, 1) + (1, 1) + (1, 1) + (1, 1) + (1, 1) (0, 1) + (1, 1) = (1, 2)
=
(1, 1) + (1, 1) + (1, 1) + (1, 1) + (1, 1) = (1, 2) + (1, 1) = (1 +2 1, 2 +3 1) = (0, 0)
Hence every element of G can be expressed in some powers of (1, 1).
Therefore, G is a cyclic group with (1, 1) as generator
(c) Since 0 (1, 1) = 6 = 0 (Z 2 X Z,)
G :::: Z 2 X Z 3 is cyclic group of order 6.
Also, any finite cyclic group of order n is isomorphic to Zn
" � X Z 3 = Z6 M G=�
Fig. 8.6
Clearly, f is both one·one and onto (see Fig. 8.6) and we say, f : S --; S is a permutation
on S.
288 DISCRETE STRUCTURES
Hence, we can say that if a set S contains n elements, thenA(S), the set of all permutations
on S) will contain n Cn = n! elements.
We next introduce a notation to represent these permutations.
3, (3)
The function f : S --; S defined on a non-empty and a finite set S = {I, 2, 3} such that
[1 3 31 J
f (1) = 2, f (2) =f = 1 can be expressed in array from as shown below:
2
f= 2
5, 3, 6,
Consider another example of a permutation g : S --; S, defined on S = {I, 2,
such that g(l) = g(2) = g(3) = 1 , g(4) = g(5) = 2, g(6) = then, g can be expressed in 6, 3, 4, 5, 6}
[15 3 31 46 5 46 J
array form as shown below:
2
g= 2
, 345 34
given as below:
1------------,
Fig. 8.7
We wish to find the following elements (gof)(l), (gof)(2), (gof)(3), (gof)(4), (gof)(5).
To find (gof)(l): Notice that compositions of permutations expressed in array brackets,
is carried out from right bracket to left bracket, by going from top to bottom (in right bracket)
and then again from top to bottom (in left bracket). Hence, to find (gof)(l), we start from the
right bracket in the following manner:
In Fig 8.7, we notice that 4 4,
2 (right bracket), 2 --; (left bracket), => 1 --;
1 --;
This is equivalent to say that (gof)(l) = g(f(l» = g(2) = which means '1 ' goes to
4 '4'.
2 --; 4 4
To find (gof)(2): We start from '2' in the right bracket as shown below:
(right bracket), --; 2 (left bracket), => 2 --; 2
This is equivalent to say that (gof)(2) = g(f)(2» = g(4) = 2 => 2 --; 2
MONOIDSAND GROUPS 289
To find (gof)(3): Start from '3' (in the right bracket), 3 --; 3, 3 --; 1 => 3 --; 1.
To find (gof)(4): Here 4 --; 5, 5 --; 3 => 4 --; 3
To find (gof)(5): Here 5 --; 1, 1 --; 5 => 5 --; 5
Hence) go[= [ � 1 a� 2 3 4
4 2
2 3 4
4 3 5 �J
[1 1 J
:
2 3 4
_
- 4 2 3
Consider [ =
[1 2 3 4 5
2 3 5 6 4 1 6J
We try to express 'f ' in a single row:
Here, 1 � 2, 2 -----t 3, 3 -----t 5, 5 -----t 1, i.e., we started from '1 ' and ended in '1 '. This fact can
be represented as (1235).
Also,4 --; 6, 6 --; 4 it can be expressed as (46).
Hence [ = (1235)(46), is in a single row representation.
The product of (1235) and (46)
[1
Consider a permutation [ given by
1 6J
2 3 4 5
[=
6 5 4 3 2
In cyclic notation, [= (1625)(34)
Here, (625) is called a cycle and the set {I, 6, 2, 5} is called an orbit of the elements 1,
6, 2 and 5.
Also {3, 4} is an orbit of the elements 3 and 4.
.-----------------------------------------------.
f(x,) = X2 , f(x,) = X3 , f(x3) = x4 , f(xn_l) = xn, f(xJ = x, •••
Example 1.
[
1 2 3 4 5 6 7
Consider f = 2 4 6 1 7 3 5 . Express f as a product of disjoint J
cycles.
Sol. We wish to find the disjoint cycles of f.
.-----------------�
Here, 1 -> 2, 2 -> 4, 4 -> 1 => (124) is a cycle of f.
.----------�
Also 3 -> 6, 6 -> 3 => (36) is a cycle of f.
Further, 5 -> 7, 7 -> 5 => (57) is a cycle of f
f=
[12 4 6
2 3 4
1 7
5
[
= (124)(36)(57).
[1
We now develop a procedure for multiplication of cycles (not necessarily disjoint).
J
2 3 4 5 6 7 8
Consider f =
1 7
[1
4 6 8 3 5 2
J
2 3 4 5 6 7 8
g= 2 4 6 8 1 3 5 7
We find fog in cyclic notations.
We first express f and g a product of cycles (not necessarily disjoint).
MONOIDSAND GROUPS 291
f = (14387)(26)
g = (124875)(36)
'
a
1�4�4�8�8 � 1 � 8
'
As '1 goes to '8 , we start with '8' as shown in the below pattern.
'
8 �7�7 � 5� 5 � 8 � 5
As '8' goes to '5 ' , we start with '5' as shown in the below pattern
5 � 5 �5 �1 �1
This completes the cycle (185).
Now) we are left with the remaining elements 2, 3, 4, 6, 7.
Start with '2 ' as shown in the below pattern.
2 � 2�6 �6 �3
7 �1�1�2�2
This completes the cycle (237)
Now, we are left with the remaining elements 4 and 6 only.
Start with '4' as shown in the below patter.
4�3�3�3�6
6 �6�2�4�4
This completes the cycle (46) and there are no elements left with us.
Hence, the only cycles of f are (185), (237) and (46), which are disjoint also.
Hence from (1), fog = (14387)(26)(124875)(34)
= (185)(237)(46),
which shows that the composition of any two permutations on a finite set can be expressed as
a product of disjoint cycles
Example 3, Let f = (13)(27)(456)(8) and g = (1237)(648)(5)
What is the cycle form of fog? or Write fog as a product of disjoint cycles.
°1 °2 a3 °4 't"l 't"2 "3
SoL Let fog = (13)(27)(456)(18)(1237)(648)(5) , say . . . (1)
292 DISCRETE STRUCTURES
Start with '1 ' as shown in the below manner.
1 � 3 � 3 °3 ) 3 °4 ) 3 � 7 � 7 � 7 => 1 --; 7
I A cycle that does not contain an element fixes the element
'
Start with '7 as shown in the following pattern.
3 � 1 °2 ) 1 � 1 °4 ) 1 � 2 � 2 � 2 => 3 --; 2
Start with '2 ' as shown in the below manner.
4 � 4 °2 ) 4 � 5 °4 ) 5 � 5 � 5 � 5 => 4 --; 5
Start with '5' as shown in the following manner.
6 � 6 02 ) 6 0, ) 4 04 ) 4 � 4 � 8 � 8 => 6 --; 8
Start with '8' , as shown in the following manner.
8�8 °2
) 8 0, ) 8 °4 ) 8 � 8 � 6 � 6 => 8 --; 6
This completes the cycle (68) and we are left with no element with us.
Thus, the only cycles of fare (1732), (45) and (68) and these cycles are disjoint also.
Hence, from (1),
fog = (13)(27)(456)(8)(1237)(648)(5)
= (1732)(45)(68)
which shows that the composition of any two permutations on a finite set can be expressed as
a product of disjoint cycles.
Remark 2. Every permutation on a finite set containing elements 1) can be expressed as
'n'
a product of (or and the decomposition of a permutation into a product of
(n >
transpositions 2-cycles) 2-
cycles is not unique. It means to say that
(a1a2a3 ... ak ) = (a1ak)(a1ak_1)(a1ak_2) ... (a1a2)
= (a2ak)(a2ak_1)(a2ak_2) ... (a2a1)
= (a,ak)(a3ak_1)(a3ak_2) ... (a3a2)(a3a1)
3 � 4 � 1 => 3 --; 1
294 DISCRETE STRUCTURES
This completes the cycle (13).
4 � 1 � 2 => 4 --; 2
This completes the cycle (24).
Hence, (1234)2 = (1234)(1234) = (13)(24) . . . (1)
°1 °2 a3
(1234)3 = (1234)(1234)2 = (1234)(13)(24) I using (1)
2 � 3 °2 1 1 0, 1 1 => 2 --; 1
This completes the cycle (1432).
Hence, (1234)3 = (1432) . . . (2)
Finally, (1234)4 = (1234)(1234)3 I using (2)
CJ1 CJ2
= (1234)(1432)
2 �3 02 ) 2 => 2 --; 2
4 � 1 � 4 => 4 --; 4
(1234)4 = (1234)(1432) = 1. (Since each element goes to itself).
Property 5. The product of a permutation on a finite set and its inverse is always
equals to 1.
Consider f = (a, b , )(a2 b) (a3 b ) (a4 b4) ' then
r' = «a, b ,)(a2 b ) (a3 b ) (a4b4» -
1
= (a4b4)(a3 b) (a2 b) (a, b,)
fri = (a, b,)(a2 b) (a3 b) (a4b 4)(a4b 4)(a3 b) (a2 b ) (a, b,)
= I (Prove it)
1
4
5
5
6
6
7
7
2 J
.
[31
J
2 3 4 5 6 7
Sol. Let f=
4 1 5 6 7 2
We first express f as a product of transpositions (2-cycles)
Here f = (13)(24567) = (13)(27)(26)(25)(24) (See remark 2, above)
. . Since f is the product of 5 (odd) transpositions, hence f is an odd permutation
Theorem I. The order of a permutation on a finite set, written as a product of disjoint
cycles, is the least common multiple of the lengths of the disjoint cycles.
Proof. This is beyond the scope of the syllabus.
Example 6. Find the order of the following permutations
(i) (12)(13)(14)(15)(1 6)
(ii) (24)(26)(28)(13)(15)(1 7)
Sol. (i) Let f = (12)(13)(14)(15)(16) = (165432)
. . its order = 6 (number of distinct elements in f)
(ii) Let f = (24)(26)(25)(13)(15)(17) = (2864)(1753)
Clearly, right hand side is a product of two disjoint cycles.
. . Required order = Lc.m. of the lengths of (2864) and (1753) = 4
Example 7. Find the order of the following permutation.
f = (123)(234)(456)(67)
Sol. Given permutation is not a product of disjoint cycles. Hence) we first express it as
a product of disjoint cycles.
°1 0"2 a3 °4
Consider f = (123)(234)(456)(67) , say . . . (1)
The elements of the given permutation fare 1) 2) 3, 4, 5, 6 and 7.
Start with '1 ' as shown in the following manner.
1 � 2 02 ) 3 °3 ) 3 04 ) 3 => 1 --; 3
Start with '3' as shown in the following manner.
3 � 1 °2 1 1 °3 1 1 °4 1 1 => 3 --; 1
This completes the cycle (13)
We are left with 2, 4, 6, 6 and 7
Start with '2' as shown in the following manner.
°2 °3 °4
2�3 )4 )5 ) 5 => 2 --; 5
296 DISCRETE STRUCTURES
Start with '5' as shown in the following manner.
5 � 5 °2 ) 5 0, ) 6 °4
) 7 => 5 --; 7
Start with '7' as shown in the following
7 � 7 02 ) 7 03 ) 7 04
) 6 => 7 --; 6
Start with '6' as shown in the following manner.
6 � 6 °2 ) 6 °3 ) 4 °4 ) 4 => 7 --; 6
This completes the cycle (25764) and we are left with no elements.
Hence, the only cycles of f are (13) and (25764) which are also disjoint.
:. From (1)
f = (123)(234)(456)(67)
= (13)(25764)
Hence, order of f= l.c.m of the lengths of (13) and (25764) = l.c.m of 2 and 5 = 10
Example 8. Let f=
[� �:;: �J and
g=
[� �!:� �J
Compute each of the following:
(a) f-1 (b) gof (c) fog
[1 2 3 4 5 6
Sol. (a) f = 2 1 3 5 4 6
J
On expressing f as a product of transpositions) we get
f = (12)(3)(45)(6)
r' = «12)(3)(45)(6» -1 = (6) (45) (3) (12) ... (1)
We now express [-1 in the array form.
From (1), We notice that 6 --; 6, 4 --; 5 and 5 --; 4, 3 --; 3, 1 --; 2 and 2 --; 1.
[
1 2 3 4 5 6
f-1 = 2 1 3 5 4 6
J
(b) gof =
( 1 2 3 4 5 6) : (1 2 3 4 5 6 )
J,
1- - - - - - - - - - - - - - - I
: J..
6 1 2 4 3 5 : 2 1 3 5 4 6 , ,
[11 62
• __ 1
_ 3 4 5 6 J
2 3 4 5 (see Multiplication of cycles)
Example 9. Find a-i ba where a = (135)(12), b = (1579).
0"1 0"2
Sol. a = (135)(12) = (135)(12) , say
MONOIDSAND GROUPS 297
[
is a one-one and onto mapping defined by
J
1 2 3 ... n
0=
0(1) 0(2) 0(3) . . . 0(n)
Then, Sn forms a group under the composition of mappings and called symmetric group
of degree n.
Theorem II. Show that Sn (n :> 1) is a group under the composition of mappings.
Proof. Let f, g E Sn => f, g are both one·one and onto maps on a a finite set S. Since f, g
are both one-one and onto, their compostion maps fog, got are also one-one and onto maps
=> fog, gof are also permutations on S. Hence, fog, gof E Sn
Sn is closed under the composition of mappings.
298 DISCRETE STRUCTURES
Also) Sn has identity mapping I) each permutation on Sn has its inverse. Further)
associativity under the composition of mapping also holds in Sn "
Hence) Sn forms a group under the composition of mappings.
Theorem III. Show that Sn (n :> 1) forms a group under the composition of mapping
with order o(Sn) = n!.
Proof. By definition, elements of Sn are of the form
[1
2 3 ...
° = o(1) o(2) o(3) . . . 0( )
nn J
where CJ is a one-one and onto map on the set S = (1) 2) 3) . . . ) n)
Now, there are 'n' choices of o(1). Once, o(1) is determined, there are (n - 1) choices for
o(2) (since ° is one·one, we must have o(1) "" o(2» . After o(2) is determined, there are (n - 2)
choices for o(3). Continuing in this manner, we observe that there is (n - (n - 1» = 1 choice for
° =
1 [11 23 �} [� 22 �J ; [� 21 :J
°2 = °3 =
6.
Consider H = (E, o,l where o(H) = 2.
Also, o ( S) = 3! =
o(S3)
:. Number of distinct right (or left) cosets of H in S3 = [S3 H] = o(H) = = 3.
:
6
"2
300 DISCRETE STRUCTURES
Thus, there are 3 distinct right cosets as well as 3 distinct left cosets of H in S3'
We now find these cosets.
For any ° E S3' all left cosets of H in S3 are given below
0,H = {0 1 ' 0,00,} = {0 1 ' E } = H
02H = {02 , 0200,} = {0 1 ' <P2}
°3H = {03 , °3°0 ,} = {03 , <P,}
<p, H = {<P I ' <P, 00 I} = {<PI ' 03} = 03H
<p2H = {<P2 ' <P200,} = {<P2' O2} = 02H
Thus, H, 02H and 03H are the only distinct left cosets of H in S3'
Also, all right cosets of H in S3 are given below.
H = {E, 0,}
HO, = {0 1 ' 0 , 00 ,} = {E, 0 ,} = H = {0 1 ' E}
H02 = {02 , 0,002} = {0 1 ' <P,}
H03 = {03 , 0,00 3} = {0 <P2}
l'
6.
divides the order of G.
Therefore, any subgroup of 83 must have order 2 or 3 since its order must divide 0(8) =
Using part (a), the only subgroups of 83 are
H , = {E}, H2 = 83, H3 = {E, 0,}
H4 = {E, O2}, H5 = {E, 03} , H6 = {E, <PI ' <P2}
The subgroups H3, H4, H5 and H6 are either of order 2 or 3 since 2 or 3 divide = 0(8).6
6
Also, H, = {E} and H2 = 83 are trivial subgroups of 83,
Therefore, 83 has subgroups.
(c) (i) To find AB: Multiplying each element of A by each element of B, we get
AB = (01 ' 0){<p1 ' <p)
= {0, <PI' 0 1 <P2 ' 02 <P I' °2 <P2}
But 01 <P, = 02 (from the multiplication table of 83 (Fig. A»
°1 <P2 = °3
02 <P, = 03 = 01 <P2
02 <P2 = 01
.. AB = {02, 03' 0,} = {0 1' 02' Gal
(ii) To find 03A: Multiplying 03 by each element of A, we get
03A = {0PI' 0P2} = [<PI ' <P2] [see multiplication table of 83 (Table 1)].
(iii) To find A03: Multiplying each element of A by 03 ' we get
Ap = {0,03, 0203} = {<P2' <P,}
(d) Every subgroup of a finite group must divide the order of the group.
Here H = gp(0,) = {E, 0,}
K = gp(0) = {E, O2}
HK = {E, 0,}{E, O2}
6
= {E , EG2 , CJ l E , CJ 1 0"2} = {Ep CJ2 ' CJ p 4' 1}
o(HK) = 4, which does not divide
:. HK cannot be a subgroup of 83
302 DISCRETE STRUCTURES
(e) A group G is cyclic if 3 on element of a E G such that o(a) = o(G).
Here o(S) = 6, but there is no element in S3 whose order is 6.
Hence, 83 is not cyclic.
(j) 83 is non-abelian since CJ 1 0CJ2 t:- °2°° 1 ,
Again, f and g-l are even permutations and the product of two even permutation is an
even permutation, therefore, fOg-I E An vt, g E An
. . An is a subgroup of Sno
Let g E Sn and consider gofog-l .
The product of even permutations is an even permutation.
=> gofog-l E An E gf E S n
. . An is a normal subgroup of Sno
To find the order of An' Let (J is any odd permutation. Also, (12) being a transposition,
is also an odd permutation. This implies (12) (J is an even permutation (The product of two odd
permutation is an even permutation).
Thus, there are atleast as many even permutations as there are odd ones. On the other
hand, for every even permutation q" the permutation (12) q, is an odd permutation. It follows
that there are atleast as many odd permutations as there are even permutations. Hence,
there is an equal number of even and odd permutations. 20(An) = o(Sn)
o(Sn ) n!
o(An) = 2- '2
- =
Example 13. Consider the symmetric group S3 = {E, "1' ''2' "3' ¢4' ¢2,}.
Let A3 be the alternating group defined by A3 = (E , ¢1' ¢2 j.
Is A3 a normal subgroup of Sl.
Sol. We know that An is a subgroup of Sn (n :> 2) (Theorem III above)
0(S3 ) �
[S3:A3l = Index of A3 in S3 = 0(A3 ) = 3! = 2
2
Since index of A3 in S3 is 2, A3 is a normal subgroup of S3'
MONOIDSAND GROUPS 303
Coding theory plays an important role in developing the techniques to provide reduant
information in transmitted data. These techniques are useful in detecting) and sometimes in
correcting) errors. Some of these techniques make use of group theory_ To understand these
techniques) we first introduce the basic terminology of coding theory_
8.37. MESSAGE
It is a basic unit of information. A message is a sequence of characters from a finite
alphabete defined by the set B = {D. 1}.
8.38. WORD
To represent data, every character or symbol is first expressed in binary form. Then a
'
'word is a sequenc of m O's and l 's.
Let B = {O, 1} and let + be the operation defined on B as in the following table.
�I� �
then, B is a group under +. Also every element in B is its own inverse
Generally, we define
Bm = B x B x B x B ... x B (m times)
then, B is also a group under the binary operation EB defined by
m
(xp x2 , ... xm) E8 (Y 1 ' Y2' ... , Ym) = (Xl + Y 1 ' x2 + Y2' ... , xm + Ym)
The identity of Bm is (0, 0, ... , 0) and every element is its own inverse. Now B has two
elements and since Bm = B x B x B x ... x B is a product of m factors) therefore Bm has 2m
elements. Thus) order of the group Bm is 2m.
Consider the basic process of sending a word from one point to another point over a
transmission channel as shown in the following figure.
Transmitted Transmission Received
channel
the function e is called (m, n) encoding function. If b E Bm, then e(b) is called code word
representing b.
To transmit the code words by means of a transmission channel) consider the following
figure.
MONOIDSAND GROUPS 305
Encoded word
sent Received
If a word b E Bm is transmitted, then each code word x = e(b) is received as the word x,
in Bn. If different words in Bm will be assigned different code words in Bn. Then the encoding
function e : Bm � Bn is one-one.
For the transmission channel to be noiseless, we should have x = xt for all x E Bn.
Generally) errors in transmission do occur. We say that the code word x = e(b) has been
transmitted with k or fewer errors if x and xt differ in atleast one but not more than k positions.
Let e : Bm --; Bn be an (m, n) encoding function. We say that e detects k or fewer errors. If
whenever x = e(b) is transmitted with k or fewer errors; then xt is not a code word.
8.40. WEIGHT
If x E Bn, the number of l 's in x is called the weight of x and is denoted by 1 x I.
8.41 . PARITY CHECK CODE
B m --; Bm+ l
{ O,
Consider the following encoding function e : defined by e(b) = b, b2....bm
if I b I is even
where b E Bm and bm+l _
- 1, if I b I is odd
i.e.) b m l is zero iff the number of l 's in b is an even number and we say that every code word
+
e (b) has even weight. Also bm l is 1 iff the number of l 's in b is an odd number and we say
that every code word e(b) has+ an odd weight.
The function e : Bm --; Bm+l is called parity (m, m+1) check code.
It should be noted that if the received word has an odd weight, then we can say that the
code word was transmitted correctly_
The following illustration explains this concept more clearly. Consider the encoding
function e : B3 --; B4 defined by
e(OOO) = 0000 If b = 000, then
e(001) = 001 1 1 b 1 = Number of l 's in 000 = zero (even)
e(010) = 0101
e(Ol1) = 0110 If b = 010, then
e(100) = 1001 1 b 1 = Number of l 's in 010 = one (odd)
e(101) = 1010
e(110) = 1100
e(l 11) = 1 1 1 1
Further, if the received word has even weight) then we cannot conclude that the code
word was transmitted correctly) since the encoding function e : Bm � Bn does not detect an
even number of errors.
8.42. HAMMING DISTANCE
Consider x, y E Bm. Then, the Hamming distance d(x, y) between x and y is the weight
x EB y I of x EB y. i.e.) the distance between x = xp x2 ... x and y = yp Y2 ... ) Y is the number
m in which x and ymdiffer. Also the
of values of i such that xi '" Yi' that is, the number of positions
function d(x) y) is known as distance function.
306 DISCRETE STRUCTURES
Theorem XXI. Properties of distance function
Let b E Em and let x = e(b) E En be the code word representing b, then x will be transmit
ted and received as Xc
If x, # x, then d(x, x,) Co- k + 1. Hence x would be transmitted with k + 1 or more errors,
that is) if x is transmitted with k or fewer errors) then xt cannot be a code word. This means
that e can detect k or fewer errors.
Converse. Suppose that the minimum distance between code words is r where r ::; k.
Let X,y E Em such that d(x, y) = r. If x, = y, then x is transmitted and received as y, then r S k
k or fewer errors.
errors have been committed and have not been detected. Thus) it is not true that e can detect
Cor. A code can correct k or fewer errors iff the minimum distance between any two
code words is at least 2k + 1.
8.44. GROUP CODES
An (m, n) encoding function e : Em � En is called a group code if
e(E m) = (e(b) : b E Em} is a subgroup of En .
I ILLUSTRATIVE EXAMPLES
L Find the
(i) 1011 (ii) 0110 (iii) 1110 (iv) 011101
Example weight of the given words
defined as
e(OO) = 0000, e(10) = 0110
e(Ol) = 1011, e(11) = 1 1 00 (P.T.V. B.Tech. Dec. 2012)
Sol. We first find the distances between pairs of code words.
d(OOOO, 01 10) = I (0000) EB (0110) I =2 0110
d(OOOO, 1011) = I (0000) EB (1011) I =3 + 1011
d(OOOO, 1100) = I (0000) EB (1 100) I =2 1101
d(01 10, 1011) = I (0110) EB (1011) I =3 0110
d(01 10, 1 100) = I (0110) EB (1100) I =2 + 1100
1010
1011
+ 1100
0111
The required minimum distance is 2.
308 DISCRETE STRUCTURES
Example 4. Consider (2, 6) encoding function e: B2 --; B6 defined as
e(OO) = 000000; e(10) = 101010
e(Ol) = 0111 10; e(11) = 1 1 1000
(a) Find the minimum distance of e
(b) How many errors will e detect ?
Sol. (a) We first find the distances between each pairs of code words.
d(OOOOOO, 101010) = I (000000) EB (101010) I = 3 101010
d(OOOOOO, 0111 10) = I (000000) EB (01 1 110) I = 4 + 011110
d(OOOOOO, 11 1000) = I (000000) EB (111000) I = 3 110100
d(101010, 0111 10) = I (101010) EB (01 1 110) I = 3
101010
d(101010, 11 1000) = I (101010) EB (11 1000) I = 2 + 11 1000
010010
The required minimum distance is 2.
(b) The code will detect k or fewer errors iff its minimum distance is at least k + 1. Since
the minimum distance is 2) we have
2 :> k + 1 or k+ 1 s2 or k s 1.
The code will detect one or fewer error.
Example 5. Consider the encoding function e : B2 --; B6 defined as
e(OO) = 001000 ; e(Ol) = 010100
e(10) = 100010 ; e(11) = 1 1 0001
How many errors it can detect and correct ?
6
Sol. Proceeding as in example 4) the minimum distance of e B2 � B is 3.
:
The code can detect k or fewer errors iff the minimum distance is at least k + 1. Here the
minimum distance is 3.
Therefore, 3 :> , k + 1 or k + 1 s 3 or k S 2.
Thus, the code will detect 2 or fewer errors.
The code will correct k or fewer errors iff the minimum distance is at least 2 k + 1. Here
2k + 1 s 3 or 2k S 2 or k S 1.
the minimum distance is 3.
So 3 :> 2k + 1 or
Thus) the code will correct 1 or fewer errors.
Example 6. Consider e B3 --; B8 defined by
:
e(OOO) = 00000000
e(OOl) = 1011 1000
e(OlO) = 00101101
e(Oll) = 10010101 Code words
e(100) = 10100100
e(101) = 10001001
e(1 l O) = 0001 1100
e(1 1 1) = 00110001
(a) How many errors will e detect ?
(b) How many errors will e correct ?
Sol. We first find the distances between pairs of code words. There are 28 distinct pairs
of code words. Proceeding as in example 4) the minimum distance is 3.
MONOIDSAND GROUPS 309
(a) The code will detect k or fewer errors iff the minimum distance is at least k + 1. Here
the minimum distance is 3
. . 3 :> k + 1 or k + 1 S 3 or k S 2
Thus, the code will detect 2 or fewer errors.
(b) The code will correct k or fewer errors iff the minimum distance is at least 2k + 1.
Here the minimum distance is 3)
so 3 :> 2k + 1 or 2k + 1 s 3 or 2k S 2 or k S 1
Thus) the code will correct 1 or fewer errors.
Example 7. Consider e B2 � B5 defined by
:
e(OO) = 00000
I
e(Ol) = 01110 code words
e(10) = 10101
e(11) = 1 101 1
Show that the encoding function e B2 � B5 is a group code.
:
Sol. Let H = {OOOOO, 01110, 10101, 11011} be the set of all code words. Consider the
following table.
Ell 00000 0 1 1 10 10101 11011
00000 00000 0 1 1 10 10101 11011
0 1 1 10 01110 00000 11011 10101
10101 10101 1 1011 00000 01110
1 1011 11011 10101 01110 00000
From the above table, we observe that every element in the interior of the table belongs
to the set H. Hence H is closed under Ell.
The first row inside the table coincides with the elements listed in H = {OOOOO, 01110,
10101, 11011}
Identity element of B5 is 00000.
Also Ell is an associative operation. i.e. For x, y, Z E H, x Ell (y Ell z) = (x Ell y) Ell z is true.
Finally) each element of H is its own inverse. Since
00000 Ell 00000 = 00000
01110 Ell 01110 = 00000 01110
10101 Ell 10101 = 00000 + 01110
11011 Ell 11011 = 00000 00000
5
Hence H is a subgroup of B and the given encoding function is a group code.
8.45. MORE APPLICATIONS OF GROUPS (P.T. U. B. Tech. Dec. 2005)
By using group code, we can find the solutions of many coding problems by using the
concept of Group theory. A coding problem is a problem which is used to represent distinct
messages by means of a sequence of letters from a given alphabet. A sequence of letter from an
alphabet is called a word. A code is a collection of word that is used to represent distinct
messages. A word in a code is called codeword. A blackcode is a code consisting of words
that are of the same length. The concept of 'Group Theory' can be applied in many situations
which arise in coding problem which is clear from the following discussion.
310 DISCRETE STRUCTURES
In error correction : Suppose a codeword is transmitted from its origin to its destina
tion. During the course of transmission) some of the information might cause some of the l 's in
the codeword to be received such as noises). Let A denote the set of all binary sequences of
length n. Let EB be a binary operation on A such that for x, Y E A. Let x EB Y denotes the
sequence of length n that has l 's when x and y differ and has O's when x and y are same. We
observe that (A, EB) is a group with all zero word as its identity and every word is its own
inverse. Further for x, Y E A, we define the distance between x and y denoted by d(x, y) to be
the weight of x EB y, say, w(x EB y). The weight of x means the number of l 's in x. For example,
the weight of 1 110000 is 3.
By using the Minimum Distance Decoding Criterian, it has been proved that a
code of distance 2t + 1 can correct t or lesser transmission error.
Group codes: A subset G of A is called a group code if (G, EB) is a subgroup of (A, EB)
where A is the set of binary sequences of length n.
By using Minimum Distance Decoding Criterion, we can determine the transmit
ted word corresponding to a received word. Let (G, EB) is a group code.
Let y be a received word and d(xi, y) = The distance between and xi and y = w(xi EB y).
The weight of the word is the coset G EB y are the distances between the code words in G
and y. Let e denotes one of the words of smallest weight. Then, according to the Minimum
Distance Decoding Criterian, e EB y = is the transmitted code word. Thus, by using the
Xl
axioms of group theory, we can find the transmitted code words and group codes.
e(OO) 00000
Code words.
=
e(10) = 001 1 1
e(01) = 0 1 1 10
e(l1) = 11111
e(OOO) = 00000000
e(001) = 1011 1000
e(010) = 00101101
e(011) = 10010101 Code words
e(100) = 10100100
e(101) = 10001001
e(110) = 00011100
e(111) = 00110001
How many errors e will detect ?
MONOIDSAND GROUPS 31 1
5. Consider the (3, 9) encoding function e : B3 -----t B9 defined as
e(OOO) = 000000000 ; e(100) = 010011010
e(001) = 0 1 1 100101 ; e(101) = 1 1 1 101011
e(010) = 010101000 ; e(110) = 00101 1000
e(011) = 110010001 ; e(111) = 110000 1 1 1
(a) Find the minimum distance of e.
(b) How many errors will e detect ?
6. Show that the (3, 7) encoding function e : B3 -----t B7 defined by
e(OOO) = 0000000 ; e(100) = 1000101
e(001) = 0010110 ; e(101) = 1010011
e(010) = 0101000 ; e(110) = 1101101
e(011) 0 1 1 1 1 10 ; e(111) = 1 1 1 1011
is a group code.
=
Answers
L (a) 1 (b) 3 (c) 0 (d) 5
2. 4
(a) (b) 3 3. 2
4. 2 or fewer errors. 5. (a) 3 (b) 2 or fewer.
1. .
The matrices [
cos 8 - sin 8 and 0a
sin 8 cos 8 ] [ �]
commute under the multiplication
(a) if a = b or 8 = nn, n is an integer (b) always
(c) never (d) if a. cos 8 '" b. sin 8.
2. The set of integers Z with the binary operations '*' defined as a * b = a + b + 1 for
a, b E Z, is a group. The identity element of this group is
(a) 0 (b) 1
(c) - 1 (d) 12.
3. Which of the following is TRUE ?
(a) The set of all rational negative numbers forms a group under multiplication
(b) The set of all non·singular matrices forms a group under multiplication
(c) The set of all matrices forms a group under multiplication
(d) Both (b) and (c) are true.
4. Which of the following statement is FALSE ?
(a) The set of rational numbers is an abelian group under addition.
(b) The set of rational integers is an abelian group under addition.
(c) The set of rational numbers form an abelian group under multiplication
(d) None of these.
312 DISCRETE STRUCTURES
5. Let A be the set of all non·singular matrices over real numbers and let * be the matrix
multiplication operator. Then
(a) A is closed under * but <A) *> is not a semi group
(b) <A, *> is a semi group but not a monoid
(c) <A, *> is a monoid but not a group
(d) <A, *> is a group but not an abelian group.
6. Some group (G, 0) is knwon to be abelian. Then, which one of the following is TRUE for G ?
(a) g = g-l for every g E G (b) g = g2 for every g E G
(c) ( goh)-2 = g2oh2 for every g, h E G (d) G is of finite order.
7. For ring ZlO = {O, 1, 2, .... , 9} of integers modulo 10, units of ZlO are
(a) 0, 1, 3 and 7 (b) 1, 3, 7 and 9
(c) 1, 2, 3, and 7 (d) 3, 7 and 9.
8. If a and b are positive integers, define a * b = a where a * b = a (modulo 7), with this *
operation) the inverse of 3 in group G {I) 2, 3, 4, 5, 6} is
(a) 3 (b) 1
(c) 5 (d) 4.
9. If the binary operation * is defined on a set of ordered pairs of real numbers as
(a, b) * (e, d) = (ad + be, bd) and is associative, then (1, 2) * (3, 5) * (3, 4) =
(a) (74, 40) (b) (32, 40)
(c) (23, 11) (d) (7, 1 1).
10. ' '
G = {e, a, b, e} is an abelian group with e as identity element. The order of the other
elements are
(a) 2, 2, 2 (b) 3, 3, 3
(c) 2, 2, 4 (d) 2, 3, 4.
( ) ( )
Answers and Explanations
C?S 8 - sin 8 B = a 0
1. (a) Let A = SIn
(
8 cos 8 ' 0 b
Then AB = ��: � - ���m� �) = (���:� -�����)
a + e + 1 = a � e + 1 = 0 � e = - l.
2 4 8
3. (b) If a = - 3' b = - 3' then ab = 9"' which is not a negative rational number. Hence the
set of negative rational numbers cannot form a group under multiplication.Hence the
alternative (a) is not true. Also the alternative (c) is not true since singular matrices do
not have inverses.
o
4. (c) If we take a = '1 ' then a-I does not exist. Hence, the alternative (c) is false.
5. (d) Since A is the set of all non·singular matrices over real numbers, then, if
AI' A2 E A � A" A2 E A. Hence A is closed under matix multiplication. Also matrix
multiplication is associative. Therefore (A) .) is a semigroup under matrices
multiplication.
10.
= (20 + 54, 40) = (74, 40).
(a) If a, b = c, a.c = b then a.a = e o(a) = 2
. . e a b c
If b.c. = a, then b . b = e . . o(b) = 2 e e a b c
Similarly, o(c) = 2. a a e c b
b b c e a
c c b a e
9 RINGS
9.1 . RING (P.T. U. B.Tech. Dec. 2009, May 2008, 2007, Dec. 2006, May 2005)
Let R be a non·empty set with two binary compositions, addition (+) and multiplication (.).
Then R is called a ring iff it satisfies the following :
I. R is an additive group under + i.e.)
(i) For a, b E R => a + b E R i.e.,
R is closed under addition
(ii) For a, b, c E R, a + (b + c) = (a + b) + c i.e.,
Associativity under addition holds in R.
(iii) For each a E R, 3 0 E R such that a + 0 = a = 0 + a i.e.,
R has additive identity.
(iv) For each a E R, 3 a E R such that a + ( a) = 0 i.e.,
- -
314
RINGS 315
ILLUSTRATIVE EXAMPLES
Example 1. Let Z be the set of integers, then (Z, +, .) is a ring. Also Z is a commutative
ring with unity.
Sol. We know that Z is an additive group under +. (See Chapter on 'Groups').
Also for a, b E Z => a. b E Z \;j a, b E Z i.e.,
Z is closed under multiplication.
For a, b, c E Z, a . (b . c) = (a. b) . c \;j a, b, c E Z i.e.,
Associativity under multiplication holds in Z.
For a, b, c E Z, a . (b + c) = a. b + a . c
(a + b) . c = a . c + b . c \;j a, b, c E Z
Hence we can say that Z is a ring.
Further, for a, b E Z, a . b = b . a \;j a, b E Z
. . Z is commutative also.
Also for a E Z, 3 1 E Z such that
1 .a=a=a. 1 \;j a E Z.
Z is a ring with unity (multiplicative identity).
Example 2. Show that E, the set of even integers is a commutative ring without unity.
Sol. Consider E = {... , - 4, - 2, 0, 2, 4, 6, ...}
For a, b E E, a + b E E \;j a, b E E. Le.;
E is closed under addition.
F or a, b, c E E, a + (b + c) = (a + b) + c \;j a, b, c E E. i.e.,
E is closed under association.
For a E E, there exists 0 E E such that
a + 0 = a = 0 + a \;j a E E. i.e.,
o is the additive identity of E.
316 DISCRETE STRUCTURES
For a E E, there exists - a E E such that a + (- a) = 0 = (- a) + a \;j a E E. i.e.,
E has additive inverse.
Also, for a, b E E => a + b = b + a \;j a, b E E.
Hence E is an additive group.
Further) for a, b E E) a . b E E v a) b E E. i.e.)
E is closed under multiplication.
For a, b, c E E, a . (b . c) = (a . b) . c \;j a, b, c E E. i.e.,
E is closed under association w.r.t. multiplication.
Also for a, b, c E E, a . (b + c) = a . b + a . c
(a + b) . c = a . c + b . c \;j a, b, c E E.
Also for a, b E E, a . b = b . a \;j a, b E R
. . E is a commutative ring.
But for a E E, there exists no 1 E E such that a . 1 = a = 1 . a
E is a commutative ring without unity (multiplicative identity).
Example 3. Show that the set M of2 x 2 matrices over integers form a non-commutative
ring with unity under matrix addition and multiplication.
Sol. Let M = {(� �): a, b, c, d E z}. We show M is a ring under matrix addition and
multiplication.
Let A, B E M => A + B E M \;j A, B E M.
Since sum of two matrices of the same order is again a matrix. Therefore M is closed
under matrix addition.
For A, B, C E M, A + (B + C) = (A + B) + C \;j A, B, C E M.
i.e.) matrix addition is associative.
For A E M, there exists 0 E M such that
A + O =A = O + A
The element 0 is called additive identity of M.
For A E M, there exists - A E M such that
A + (- A) = 0 \;j A E M.
The element - A is called additive inverse of A.
For A, B E M, A + B = B + A \;j A, B E M i.e., matrix addition is commutative.
M is an additive group.
We know that matrix multiplication is associative. i.e.,
A + (B + C) = (A + B) + C \;j A, B, C E M
Also A . (B + C) = A . B + A . C
(A + B) . C = A . C + B . C \;j A, B, C E M
i.e., left distributive law and right distributive law also hold.
Hence M is a ring under matrix addition and multiplication.
But matrix multiplication in general) is not commutative. i.e., we can have A, B E M for
which AB '" BA.
Hence M is non-commutative ring.
Lastly, For A = (� �) E M, there exists I = (� �) E M such that
A . I = A = I . A i.e.,
RINGS 317
I is the multiplicative identity of M.
Hence M is a non-commutative ring with unity.
9.6. RING OF INTEGERS MODULO m (m � 1 )
The set Zm = {O, 1, 2 , 3 , ... , m 1 , +m' xm} under the operation of addition and multipli
-
+, 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
6. 6
From Table I, we observe that each element inside the Table I is also in X. It means X is
closed under addition modulo Also addition modulo is associative. i.e.,
a +6 (b +6 c) = (a +6 b) +6 c V a, b, c E X.
The first row inside the table coincides with the top most row of the Table I. It means 0
is the additive identity of X.
From Table I, we observe that each element of X has an additive inverse. For e.g.,
Inverse of 1 is 5 (the element which is at the intersection of 1 and 5 is 0).
Similarly, Inverse of 2 is 4 etc. (2 +6 4 = 0)
. . X is an additive group under addition modulo (+6)' 6
Also Table I is symmetrical w.r.t. +6 It means a +6 b = b +6 a V a, b E X.
Consider the multiplication modulo table as shown in Table II.
Table II
x, 0 1 2 3 4 5
0 0 0 0 0 0 0
1 0 1 2 3 4 5
2 0 2 4 0 2 4
3 0 3 0 3 0 3
4 0 4 2 0 4 2
5 0 5 4 3 2 1
6
From Table II, we observe that each element inside the table is also in X. It means that
X is closed under multiplication modulo (X6)
Le.,
for
for a) b E X,
6
a x6 b E X v a, b E X.
Also multiplication modulo is associative i.e.,
a, b, c E X, a x6 (b x6 c) = (a x6 b) x6 C V a, b, c E X
318 DISCRETE STRUCTURES
Further, a x6 (b +6 C) = a X6 b + a X6 c
(a +6 b) x6 C = a x6 c + b x6 C \;f a, b, c E X
6
i.e., left distributive law and right distributive law also hold.
Hence X is a ring under addition modulo and multiplication modulo Also 6.
Table II is symmetrical w.r.t. x6. It means that X is a commutative ring. The second row
inside Table II coincides with the top most row of Table II. It means 1 is the multiplicative
identity of X.
Example 5. Consider the set Z together with binary compositions EB and 0 defined by
a EB b = a + b - l
a 0 b = a + b - abo (P.T.V. B. Tech. Dec. 2010)
Show that (Z, EB, 0) is a ring.
Sol. We first show that Z is an additive group under EB. Let a, b E Z. Since Z is a group
under +, we have a + b - 1 E Z \;f a, b E Z
=> a EB b E Z \;f a, b E Z, i.e.,
Z is closed under EB.
Let a) b) C E Z and consider
a EB (b EB c) = a EB (b + c - 1) = a + b + c - 1 - 1
= a + b + c-2 ... (1)
Also (a EB b) EB c = (a + b - 1) EB c = a + b - 1 + c - 1
=a+b+c-2 ... (2)
Hence from (1) and (2), a EB (b EB c) = (a EB b) EB c\;f a, b, c E Z
Z is closed w.r.t. association under EB.
For a E Z) consider a EEl 1 = a + 1 - 1 = a
1 EB a = 1 + a - 1 = a
a EB 1 = a = l EB a
i.e. 1 is the additive identity.
Also for a, b E Z, consider a EB b = 1
=> a+b- 1 = 1
b = 2 -a
Le., for a E Z, 2 - a is the additive inverse of a. Since,
a EB 2 - a = a + 2 - a - 1 = 1
2 - a EB a = 2 - a + a - 1 = 1
a EB 2 - a = 1 = 2 - a EB a.
Further for each a, b E Z, we have
a EB b = a + b - 1 = b + a - 1 = b EB a
.. Z is an additive group under EB.
Let a, b E Z => a . b = a + b - ab E Z \;f a, b E Z
=> a . b E Z Le., Z is closed under 0
Also a 0 (b 0 c) = a 0 (b + c - be) = a + b + c - be - a (b + c - be)
= a + b + c - be - ab - ac + abc
(a 0 b) 0 c = (a + b - ab) 0 c = a + b - ab + c - (a + b - ab) c
= a + b + c - ab - be - ac + abc
= a 0 (b 0 c)
i.e., Z is closed w.r.t. association under 0.
RINGS 319
For example: The ring R = (O, 1, +2' x) under addition and multiplication modulo 2 is
a Boolean ring.
Example 6. If R is a ring such that a2 = a \;f a E R. Show that
(i) a + a = 0 \;f a E R
(ii) a + b = 0 => a = b
(iii) R is commutative. (P.T.V. B.Tech., May 2009)
Sol. (i) Given a2 = a \;f a E R
=> (a + a) 2 = a + a
=> (a + a) (a + a) = a + a
a . (a + a) + a . (a + a) = a + a I Distributive law
::::::} a . a + a . a + a . a + a . a = a + a
Let Rp R2) ... Rn be n rings under the operations +p +2) ... ) +n and .1 ' 2) ... on respectively.
The direct products of these n rings is defined by p. where
n
P = iIT Rr = R, x R2 x R3 x ... x Rn.
=1
l'
Theorem I. IfR R2, ... Rn be n rings under the operation of +" +2' ... +n and " 2' ... n'
respectively. Then the direct product of R" R2, ... Rn is also a ring under the operation of
componentwise addition and multiplication.
n
Proof. Let P = iIT Ri be the direct product of RI ' R2, ... Rn'
I
Let a, b E P, then a = (ap a2 ) ••• an») ai E R) 1 :::; i :::; n
b = (bl ' b2 , ••• bn), bi E R, 1 <: i <: n
We first show P is an additive group under the operation of componentwise addition
defined by
a + b = (al + 1 b I ' a2 +2 b 2 ) ... an +n bn)
As Ri (1 :::; i :::; n) is a ring) it must be closed under +i . i.e., if ai) bi E Ri =} ai +i bi E Ri vi
::::::} (al +1 bp a2 +2 b2 ) ... an +n bn) E Rl X R2 X ... X Rn
=> a+bE P
Hence P is closed under the operation of componentwise addition.
If a) b, C E P, then a = (ap a2 , an) ' b = (b I ' b2 ) bn), C = (e l ' c2 , en)
••• ••• •••
Similarly, ° + a= a
Hence a+O=a=O+a
° = (0 ' 0 2' ... O n) is the additive identity of P
1
Further for a E p) consider
a + (- a) = (al ' a2 , an) + (- al ' - a2 , - an) = (a, + , (- a,l, a2 +2 (- a) , ... an +n (- an»
••• •••
Let (R, +, -) and [R', +', -'] be two rings. Then a mapping f : R --; R' is called a ring
homomorphism
(i) f (a + b) = f(a) +' f(b) \;j a, b E R
(ii) f (a . b) = f(a) -' f(b) \;j a, b E R.
Also) a ring homomorphism and one-one is called monomorphism. A ring homomor
phism and onto is called epimorphism.
Further) if in addition) fis one-one and onto) thenfis called on isomorphism and R and
R' are said to be isomorphic and we write R == R/.
322 DISCRETE STRUCTURES
Remarks : To check whether the two rings are isomorphic, we should check the following :
(a) Both rings should have same cardinality.
(b) Both rings should be commutative.
(c) Both rings should have same unity.
(d) If there exists an equation which is solvable in one ring, but not solvable in another ring, then
two rings cannot be isomorphic.
Lemma: If 8 is a ring homomorphism from a ring R to a ring R'. Then
(i) 8 (0) = 0, 0 E R' (ii) 8 (-a) = - 8 (a) \;j a E R
Proof. (i) Consider
8 (a) = 8 (a + 0) = 8 (a) + 8 (0) 8 is a ring homomorphism
=> 8 (a) + 0 = 8 (a) + 8 (0) I Adding 0 E R on L.H.S.
=> 0 = 8 (0) I Left cancellation law
=> 8 (0) = 0
(ii) Consider 8 (a + (--{I» = 8 (a - a) = 8 (0) = 0 I Using part (i)
=> 8 (a) + 8 (-a) = 0
=> 8 (-a) = - 8 (a)
Example 8. Consider the rings [Z, + , 'J and [2Z, + , 'J and define
f : Z � 2Z by f(n) = 2n \;j n E Z (P.T.U. B. Tech. Dec. 2010)
Is f a group homomorphism ? Is f a ring isomorphism ?
Sol. Z and 2Z are groups under addition.
Consider f : Z � 2Z defined by f(n) = 2n \;j n E Z
For m, n E Z, consider
f(m + n) = 2(m + n)
= 2m + 2n = f(m) + f(n) \;j m, n E Z
Hence f : Z � 2Z is a group homomorphism.
To check whether f is a ring isomorphism.
For m, n E Z, consider f(mn) = 2 mn
and f(m) f(n) = 2m . 2n = 4 mn.
f(mn) '" f(m) f(n) \;j m, n E Z
. . f : Z � 2Z cannot be a ring isomorphism.
Alternatively: We know that Z is a ring with unity and 2Z is also a ring but without
unity. Hence both rings donot have same unity. Therefore Z and 2Z are not isomorphic, i.e.,
Z ", 2Z.
Example 9. Examine whether [2Z, + , J and [3Z, +, J are isomorphic rings ?
Sol. Consider the equation x + x = x . x ... (1).
This equation makes sense in both rings.
For x = 2, (1) gives 2 + 2 = 2 . 2 => 4 = 4, which is true.
Thus equation (1) has a solution x = 2 E 2Z.
For x = 3, (1) gives 3 + 3 '" 3 . 3. This means x = 3 is not a solution of (1).
Hence we conclude that equation (1) has a solution in 2Z, but does not have a solution in
3Z. Therefore 2Z and 3Z cannot be isomorphic rings. (See Remark (d) of Art. 9.9.1)
Example 10. Show that following rings are not isomorphic.
(i) [Z, + , 'J and [M2X2 (R), + , 'J (ii) [3Z, + , 'J and [4Z, + , 'J
(iii) [R, + , 'J and [Q, + , 'J (iv) [Z2 x Z2' + , 'J and [Z4' + , l
RINGS 323
Sol. (i) We know that Z is a commutative ring and M2X2 (R) is a non-commutative ring.
(since for A, B E M2X2 (R), AB = BA is not true)
. . The rings [Z, + , .] and [M2X2 (R) , + ,.] cannot be isomorphic rings. (Remark (a) of
Art. 9.9.1)
(ii) Consider the equation x + x + x = x . x ... ( 1)
This equation maks sense in both rings 3Z and 4Z.
For x = 3, (1) gives 3 + 3 + 3 = 3.3 => 9 = 9, which is true.
Hence equation (1) has a solution x = 3 in 3Z.
For x = 4, (1) gives 4 + 4 + 4 '" 4 . 4
=> 12 ", 16,
Hence equation (1) has does not have a solution in 4Z
Therefore, 3Z and 4Z cannot be isomorphic rings. (Remark (d) of Art. 9.9.1)
(iii) We know that the set of real numbers R is uncountable and the set of rationals Q is
countable (see chapter on 'sets').
Hence R and Q cannot have same cardinality and therefore cannot be isomorphic.
(iv) By definition, Z 2 = [0, 1, +2 ' x 2]
.. Z 2 X Z2 = [(0, 0), (0, 1), (1, 0), (1, 1 )]
For (m, n) E Z2 x Z2' consider (m, n) . (1, 1) = (m, n) = (1, 1) . (m, n)
Le., (1, 1) is the unity (multiplicative identity) of Z2 x Z2'
Now Z4 = [0 ) 1) 2) 3) +r x4]
1 is the unity of Z4'
Thus Z2 x Z2 and Z4 do not have same unity. Therefore they cannot be isomorphic rings.
Example 1 1. Let R and R' be two rings. Define 8 .- R --'> R' by 8 (a) = 0 \;j a E R. Show that
8 is a ring homomorphism.
Sol. Let a, b E R. Since R is a ring and a, b E R it implies a + b E R and ab E R. Consider
8 (a + b) = 0 = 0 + 0
= 8 (a) + 8 (b)
Also 8 (ab) = 0
= 0.0
= 8 (a) 8 (b)
Hence 8 is a ring homomorphism.
X
Example 12. Let R be a commutative ring and suppose px = 0 \;j E R, p is prime. Show
that the mapping f .- R --'> R defined by f (x) = xP, E R is a ring homomorphism.
X
If f: R --; R' is a ring homomorphism, then the kernel of f, is the set of all those elements
whose image is the zero element of R/. Thus
Kerf = (r E R : f (r) = OJ.
:
Example 13. Let 8 R --; R' be a ring homomorphism from a ring R to the ring R'. Show
that Ker 8 is a subgroup of R under addition.
Sol. By definition, Ker 8 = (r E R : f (r) = OJ
Since 8 : R -----7 R' is a ring homomorphism)
8 (0) = 0, 0 E R'
=> Ker 8 # q,
Let x, y E Ker 8 => 8 (x) = 0, 8 (y) = O.
Consider 8 (x -y) = 8 (x) - 8 (y) = 0 - 0 = 0
=> x - Y E Ker 8 \;j x, Y E R
=> Ker 8 is a subgroup of R.
I:
Consider x - y = 3m - 3n = 3(m - n) E 3Z
nce m, n E Z => m - n E Z (Z is a ring)
3(m - n) E 3Z
=> x - Y E 3Z
Also x.y = 3m . 3n = 3(3mn) = 3k E 3Z
where k = 3 mn I since 3, m, n E Z and Z is a ring :. 3mn E Z I
Hence we can say that 3Z is a subring of Z.
(b) Consider the following subsets of ZS '
Z2 = [0, 1, +2' x 2l ; Z3 = [0, 1, 2, +3' X 3l
Z4 = [0, 1, 2, 3, +4 ' x 4] ; Z5 = [0, 1, 2, 3, 4, +5' x 5]
Z6 = [0, 1, 2, 3, 4, 5, +6) x6] ; Z7 = [0, 1, 2, 3, 4, 5, 6, +7 ) x7]
326 DISCRETE STRUCTURES
For a, b E Z2' we observe that a - b E Z2 V a, b E Z2
Also a . b E Z2 V a, b E Z2
Hence Z2 is a subring of Zs
For a, b E Z3' we observe that a - b E Z3 V a, b E Z3
Also a . b E Z3 V a, b E Z3
Hence Z3 is a subring of Zs
Similarly) we can prove that Z4' Z5) Z6) Z7 are all subrings of ZS"
9.1 1 . UNITS
Let (R, + , .) be a ring with unity. An element a E R is said to be a unit (or invertible) if
for 0 '" a E R, 3 b E R such that a . b = 1 = b . a or
An element is a unit if a has multiplicative inverse, a-I E R such that aa-1 = 1 = a-1a
Consider the rings (R, + ,.) and (Q, + , .). Every non-zero element in R (set of reals) and
4
Q (set of rationals) has a multiplicative inverse. For example, "3 E R has multiplicative inverse
3 4 3
- E R since - . - = 1.
4 3 4
The only elements in Z that have multiplicative inverses are - 1 and 1.
Theorem III. An element a in Zn is a unit iff a and n are relatively prime.
Proof. By definition, Zn = [0, 1, 2, 3, ... n - 1, +n' xn]
Let a E Zn be a unit. It means there exists an element b E Zn such that a xn b = 1 i.e., when
ab is divided by n, the remainder is 1. i.e., a xn b = 1 ::::::} ab = nq + 1, where q is the quotient.
=> ab - nq = 1 I For a, b E R, if3 x, y E R such that ax - by = 1, then g.c.d. (a, b ) = 1
=> (a, n) = l
Example 16. Determine the units (those elements which have multiplicative inverses)
for each of the following rings .-
(a) [Z, + , 'J (b) [Q, + , 'J
(c) [C, + , 'J (d) [M2x2(R) , + , 'J
(e) [Z2 ' +2' x 2J if) [Z6 ' + 6' x 6J
(g) [Zs ' +s' x sJ (h) [Z5' + 5' X 5J
(i) [Z x Z , +, 'J U) [Z/ , +, l
Sol. (a) The only units of Z are - 1 and 1. Since for each a E Z, a .l = a = 1 . a
a . (- 1) = - a = (- 1) . a
(b) Every non-zero element in Q has multiplicative inverse (unit)
(c) Every non-zero complex number in C has multiplicative inverse (unit)
(d) Every non-singular or invertible matrix is a unit of M2 2(R). x
Sol. Given A= (� �) # 0, B = (�
AB -- (0 �) (� �) = (�
But
0
A and B are zero divisors.
Example 20, Show that the ring Z29 of integers modulo 29 is an integral domain.
Sol. By using theorem VI, Zp has no zero divisors iffp is prime. Here p = 29, which is a
prime. Therefore) Z29 has no zero divisors. Consequently) Z29 is an integral domain.
Example 21. Show that the ring Z1 05 of the integers modulo 105 is not an integral
domain.
Sol. By using theorem VI, Zp has no zero divisors iff p is prime. Here p = 105, which is
a composite number. Consequently) Zl05 has zero divisors.
. . Zl05 cannot be an integral domain.
Theorem VII. The cancellation laws hold in a ring (R, + ,.) iffR has no zero divisors.
Or
A commutative ring R is an integral domain iff for a, b, c E R (0 '" a)
ab = ac => b = c.
Proof. Let R be an integral domain and consider ab = ac (0 # a)
=> ab - ac = O
=> a.(b - c) = 0 Left distribution law
=> either a = 0 or b - c = O Since R is an integral domain)
so it has no zero divisors
=> b-c=O l a#O
=> b = c.
Converse. Let cancellation laws hold in R. We show R is an integral domain.
Let a, b E R and 0 # a. Consider
a.b=0
a.b=a.O I a.0=0
b=O Cancellation law
Hence R is an integral domain.
Example 22. Consider X = [0, 2, 4, 6, 8, +1!Y xl!). Is X an integral domain ? Justify your
answer.
Sol. We first check whether X is a commutative ring under addition modulo 10 and
multiplication modulo 10. The addition modulo 10 table is shown in Table I.
Table I
+10 0 2 4 6 8
0 0 2 4 6 8
2 2 4 6 8 0
4 4 6 8 0 2
6 6 8 0 2 4
8 8 0 2 4 6
330 DISCRETE STRUCTURES
From Table I, we observe that every element inside the table is also in X. It means that
X is closed under addition modulo 10. i.e.,
a, b E X => a+l O b E X \;ja, b E X
Addition modulo 10 is associative i.e.)
For a, b, c E X, a+ l O (b+ lOc) = (a+ l O b) + 10 c \;j a, b, c E X
The first row inside the table coincides with the topmost row of the Table 1. It means 0
is the additive identity of X.
Also each element of X has an additive inverse. For example
Inverse of 2 is 8 (the intersection of 2 and 8 at zero) 1 2+ 1 0 8 = 0
Inverse of 4 is 6 etc. 1 4+ 1 0 6 = 0
Table I is symmetrical w.r.t. +10' It means a+lOb = b+ Oa \;j a, b E X.
'
Hence X is an additive group under +10"
Now consider the multiplication modulo 10 table as shown in Table II.
Table II
XlO 0 2 4 6 8
0 0 0 0 0 0
2 0 4 8 2 6
4 0 8 6 4 2
6 0 2 4 6 8
8 0 6 2 8 4
From Table II, we observe that each element inside the table is also in X. It means that
X is closed under multiplication modulo 10 i.e.,
For a, b E X, ax lObE X \;j a, b E X
Multiplication modulo 10 is associative. Also for a, b, C E X,
ax l O (b+ , Oc) = aX , o b+ l Oax l Oc I Left distributive law
(a+, O b) x l O c = ax l O c +, O ax l O c \;j a, b, c E X Right distributive law
Hence X is a ring under addition modulo 10 and multiplication modulo 10.
Now to check commutativity of X, from Table II, we observe that the table is symmetri
cal w.r.t. X 10. It means X is a commutative ring.
Finally, X is a ring without zero divisors as it is clear from Tabe II, i.e., there do not
exist non-zero elements whose product is zero.
Hence (X, +10' x lO) is an integral domain.
Example 23. Consider X = [0, 1, 2, 3, 4, 5, +6' xi Is X an integral domain ? Justify your
answer.
Sol. Proceeding as in example 4, we can prove that X is a commutative ring.
Also 2, 3 E X and 2 x6 3 = 0 i.e., product of two non-zero elements in X is a zero element.
Thus) X is a commutative ring with zero divisors. So X cannot be an integral domain.
Example 24. (i) Give an example of a finite integral domain
(ii) Give an example of an infinite integral domain ?
(iii) Give counter example to illustrate the fact that product of two integral domain may
not be an integral domain ?
RINGS 331
Sol. (i) We know that Zp is an integral domain iff p is prime. Thus Z2 = [0, 1, +2' x2] ,
Z 3 = [0) 1) 2 ) +3 ) x 3] are finite integral domain.
(ii) Z) the set of integers is an example of an infinite integral domain.
(iii) Consider Z2 = [0, 1, +2' x 2l ; Z3 = [0, 1, 2, +3 ' x 3l
Clearly) Z2 and Z3 are integral domains as 2 and 3 are primes.
Consider the product Z2 x Z3' We know that Z2 and Z3 are commutative rings with unity
so their product Z2 x Z3 is also a commutative ring with unity.
But (1, 0), (0, 2) E Z2 X Z3 are two non-zero elements and (1, 0) . (0, 2) = (0, 0) . i.e.,
Z 2 x Z3 has zero divisors and hence cannot be an integral domain.
Example 25. Find all zero divisors of Z1 5' Z6' Z20'
Sol. (i) Z,5 = [0, 1, 2, ...... 14, + 5 ' X, 5l
'
We know that an element m, in [Zn) +n' xn] is a zero divisor iff m is not relative prime to n.
Here n = 15. The only elements which are not relative prime to 15 are 3, 5, 6, 9, 10, 12.
Hence 3, 5, 6, 9, 10, 12, are zero divisors.
Also 3 x 1 5 5 = 0, 9 x 1 5 10 = 0, 5 X , 5 6 = 0 10 x 1 5 12 = 0 etc.
(ii) Z6 = [0, 1, 2, 3, 4, 5, +6 ' x 6l
The only elements which are not relative prime to 6 are 2, 3, 4
. . The zero divisors of Z6 are 2, 3, 4
Also 2 x 63 = 0, 3 x 64 = 0 etc.
(iii) Z20 = [0, 1, 2, 3, ...... 19, +20 ' x 20l
The only elements which are not relative prime to 20 are 2, 4, 5, 6, 8, 10, 12, 14, 16, 18.
Hence the zero divisors of Z20 are 2, 4, 5, 6, 8, 10, 12, 14, 16, 18.
Example 26. Consider the ring Zl O = {D, 1, 2, 3, ....., 9} of integers modulo 1 D.
(a) Find the unit of Zl O
(b) Find - 3, - 8, [51
(c) Let f(x) = 2x2 + 4x + 4. Find the roots off(x) over Zl O' By finding roots off(x), Conclude
that can a polynomial of degree n have more than n roots ?
Sol. (a) The units of ZlO are those integers which are relatively prime to 10. Clearly, the
units of ZlO are 1, 3, 7, 9.
(b) By - a in a ring, we mean that element such that a + (- a) = 0 = (- a) + a. Therefore,
- 3 = 7 (Since 3 + 7 = 0 = 7 + 3)
- 8 = 2 (Since 8 + 2 = 0 = 2 + 8)
By a-I in a ring, we mean that element such that a . a-I = 1 = a-I a
Therefore, 3-1 = 7 (Since 3.7 = 1 = 7.3)
(c) The roots of f(x) will be those elements from 0 to 9 which will yield O.
Put, x = O, f (0) = 4,
f (1) = 2 + 4 + 4 = 10 = 0
x = 2, f (2) = 8 + 8 + 4 = 20 = 0
x = 3, f (3) = 4,
x = 4, f (4) = 2, [ (5) = 4, [ (6) = 0, [ (7) = 0, [ (8) = 4, [ (9) = 2
Thus, f (1) = 0, f (2) = 0, [ (6) = 0, [ (7) = 0
Hence, the roots of f(x) are 1, 2, 6, 7.
332 DISCRETE STRUCTURES
Conclusion. This example shows that a polynomial of degree n can have more than n
roots over an arbitrary ring. But this cannot happen if the ring is a field.
L Consider the following sets. The operations involved are the usual operations defined on the sets.
(a) [Z, + , 'J (b) [Q, + , J (c) [C, + , J
(d) [M2+2 (R), + , J (e) [Z 2' +2' X2J (j) [Z 6' +6' X6J
[Z +
(g) s ' s ' s x J (h) [Z + X
5' 5' 5 J (i) [Z x Z, + , 'J
3
(J) [Z2 , + , 'J
(i) Which of the above sets are rings ?
(ii) Which of the above rings are commutative ? Are they rings with unity? Determine the unity
of the above rings.
2. Perform the indicated operations on the [Z8; +8' XsJ:
(i) 2x s (- 4) (ii) (- 3) Xs 5
(iii) (- 2) Xs (- 4) (iv) (- 3) xs 5 +s (- 3) Xs (- 5)
3. (a) Determine all solutions of the equation x2 - 5x + 6 :::: 0 in Z 12. Find all elements of Z12 which
satisfy this equation.
(b) Find all solutions of the equation .x2 - 5x + 6 :::: 0 in Z. Can there be any more than two
solutions to this equations in Z ?
4. Solve the equation x2 - 4x + 4 :::: °
(a) in Z 1 2 (b) in Z
(c) in M2x2 (R) (d) in Z3 '
5. For any ring [R; + , 'J, simplify
(i) (a + b) (c + d) for a, b, c, d E R
(ii) If R is commutative, show that (a + b)2 :::: a2 + 2ab + b2 a, b E R 'r:/
I In Z5 ' 5 = 0, 10 = 0 etc.
2
8. Given a :::: a for all a E R ... (1)
Let a, b E R. Since R is a ring, it is closed under addition. a + b E R
Using (1), (a + b)' = a + b
=> (a + b) (a + b) = a + b
=> (a + b).a + (a + b). b = a + b Right distributive law
=> a.a + b.a + a.b + b.b :::: a + b
=> a + b.a + a.b + b :::: a + b I a.a :::: a2 :::: a
=> b. a + a . b + b = b Left cancellation law
=> b. a + a . b = 0 Right cancellation law
=> a.b = b. a Ifx + y = O x :::: y
=>
9. Given (G, +) is an additive group. Also a.b :::: 0 E G 'r:j a, b E G . G is closed under multiplication.
:
=>
:. Associativity holds in G.
= =
C =:::}
10. Let R* be the set of units in R. We show R* is a group under multiplication. Let a, b E R* i.e., a
and b are units in R there exist a-I , b-1 E R such that aa-1 :::: 1 :::: a-I a and
=:::}
bb-1 1 b-1 b
Consider (ab) (b-1 a-I) a(bb-1) a-I a . 1 . a-I aa-1 1
= =
..
Hence ab is also a unit in R. Consequently ab E R* i.e., R* is closed under multiplication.
= =
ILLUSTRATIVE EXAMPLES
Also BA = (_ � �) (� �) = (� _ �) # AB
Hence M is not commutative and therefore cannot be field.
RINGS 335
+, 0 1 2 3 4 5 6
0 0 1 2 3 4 5 6
1 1 2 3 4 5 6 0
2 2 3 4 5 6 0 1
3 3 4 5 6 0 1 2
4 4 5 6 0 1 2 3
5 5 6 0 1 2 3 4
6 6 0 1 2 3 4 5
We first show that Z7 is a ring under addition modulo 7 and multiplication modulo 7.
From Table I, we observe that each element inside the table is also in Z7' It means that
Z is closed under + 7"
Addition modulo is always associative
The first row inside the table coincides with the top most row of Table 1. It means 0 is
the additive identity.
Each element of Z7 has additive inverse.
For example) Inverse of 1 is 6. Inverse of 2 is 5 etc. 1 1 +7 6 = 7 = 0
1 2 +7 5 = 7 = 0
Also Table I is symmetrical w.r.t. +7' It means Z7 is additive w.r.t. +7 i.e.)
For a, b E Z 7 ) a +7 b = b +7 a V a) b E Z7 '
. . Z7 is an additive group w.r.t +7"
Now consider the multiplication modulo 7 table as shown in Table II.
Table II
x7 0 1 2 3 4 5 6
0 0 0 0 0 0 0 0
1 0 1 2 3 4 5 6
2 0 2 4 6 1 3 5
3 0 3 6 2 5 1 4
4 0 4 1 5 2 6 3
5 0 5 3 1 6 4 2
6 0 6 5 4 3 2 1
From Table II, we observe that each element inside the table is also in Z7' It means Z7 is
closed w.r.t. x7" i.e.) for a) b E Z7 ::::::} aX7b E Z7 v a) b E Z7
Finally) For a) b) C E Z7)
a x 7 (b+7 c) = aX 7 b +7 a x7 c
(a +7 b ) X 7c = a X7c +7 6X 7 C is true for all a, b, C E Z7"
Hence Z7 is a ring w.r.t. addition modulo 7 and multiplication modulo 7.
336 DISCRETE STRUCTURES
Also the Table II is symmetrical w.r.t. x7. It means that Z7 is commutative i.e.,
aX 7 b = bX 7 a \;j a, b E Z7
Further, the second row inside the table coincides with the topmost row of Table II. It
means 1 is the multiplicative identity of Z7'
Hence) we have shown that Z7 is a commutative ring with unity. To show Z7 is a field)
we show each non-zero element of Z7 has multiplicative inverse.
6. 6.
The units of Z7 are those elements which are relative primes to 7. (See Topic on 'units')
The elements which are prime to 7 are 1) 2) 3) 4) 5) Hence the units of Z7 are 1) 2) 3) 4)
5) We can also check the elements which are units as below :
6 6
1 x 7 1 = 1; 2 X 7 4 = 1; 3 X 7 5 = 1;
4 x 7 2 = 1; 5 x 7 3 = 1; x 7 = 1.
Hence) each non-zero element of Z7 has multiplicative inverse. Therefore Z7 is a field.
9.14. GAUSSIAN INTEGERS
Any number of the form a + ib) a) b E Z is called a Gaussian integer.
Example 4. Show that the set J[iJ of Gaussian integers form a ring under addition and
multiplication. Is it an integral domain ? Is it field ?
Sol. Let X = [a + ib, a, b E ZJ be the set of Gaussian integers. Then X is a ring.
We check X for integral domain.
Let a + ib) c + id E X such that a) b) c) d are non-zero integers.
Consider (a + ib) (c + id) = 0
=> ac - bd + i(ad + bc) = 0 = 0 + Oi
ac - bd = 0, ad + bc = 0,
which is possible if either a = 0 = b or c = 0 = d i.e., if either a + ib = 0 or c + id = 0
Hence X is without zero divisor. Therefore, X is an integral domain.
Further, if 0 ", a + ib E X be any non·zero element of X where a, b E Z, then the multipli·
cative inverse of a + ib is
1 _ 1 a - ib
a - ib _ --;;
-- _ -- X __ _
2 --.".
-
2
a + ib a + ib a - ib a + b
a
Since -"2- --.,,. is not necessary an integer.
a + b2
X cannot be a field.
Example 5. The set of numbers of the form [a + b..{2, a, b E QJ is a field.
Sol. Let X = [a + b,fi; a, b E QJ . We show X is a ring.
Let x, Y E X => X = a, + b,,fi, al ' b, E Q
Y = a2 + b2 ,fi , a2 , b2 E Q
x + y = a, + b,,fi + a2 + b2 ,fi = a, + a2 + (b, + b) ,fi E X
I ': al ' a2 E Q => a, + a2 E Q
i.e.) X is closed under addition.
Addition of rationals is associative.
RINGS 337
= 2
a
a _ 2b 2 x 2
b
2b _ a 2
,fi E X ·I : a
'
b
a 2 - 2b 2 2b 2 _ a 2 E Q
Hence X is a field.
Example 6. The set of real numbers of the form fa + b,f2, a, b E Z] is an integral
domain. Is it a field ? (P.T.V. B. Tech. Dec. 2010)
Sol. Proceeding as in example 5, we can show that X = [a + b,fi, a, b E Zl is a commutative
ring. We show X is an integral domain. i.e., X has no zero divisor.
Let a + b ,fi , e + d,fi E X where a, b, e, d E Z
Consider (a + b ,fi) (e + d,fi) = 0
=> ae + 2bd + (ad + be) ,fi = 0 = 0 + o ,fi
=> ae + 2bd = 0, ad + be = 0,
which is possible only if either a = b = 0 or e = d = 0 Le., either a + b ,fi = 0 or e + d,fi = 0
Hence X is an integral domain.
338 DISCRETE STRUCTURES
Finally, we check X for multiplicative inverse. Consider 0 '" 5 + 3,[2 E X and c + d,[2 E X
such that
(5 + 3,[2) (c + d,[2) = 1 + 0,[2 = (c + d,[2) (5 + 3,[2)
1 1 5 - 3,[2
c + d,[2 - -
- 5 3,[2 - x "'::"':'F
-=---
+ 5 + 3,[2 5 - 3,[2
5 - 3,[2 5 3 . 5 3
= = "7 - "7 ,[2 'l X. Smce "7 ' "7 'l Z
25 18
_
X cannot be a field.
Example 7. Let D be the ring of all real 2 x 2 matrices of the form (� - �). Show that
D is isomorphic to the complex number C where D is a field.
Sol. Given D is a ring of real 2 x 2 matrices of the form (� - �). Define f : D --; C, by
( )
a -b
f b a = a + ib
( ) ( )
Thus f is a homomorphism.
a -b c -d
Further, Let f b a =f d c
a + ib = c + id
Equating real and imaginary part, we get a = c, b = d
Thus a + ib = c + id. . . f is one·one.
( )
Hence f : D --; C, defined by
a -b
f b a = a + ib is an isomorphism.
Theorem VIII. Every field is an integral domain. But the converse is not true.
(P.T.V. B.Tech. May 2010, May 2012)
Proof. Let F be a field. We show F is an integral domain. As F is a field, F must be
commutative. We show F is without zero divisors.
Let a, b E F such that a . b = 0 . .. (1)
RINGS 339
If a t:- 0) then as F is a field, each non-zero element of F has multiplicative inverse. i.e.,
for a E F, there exists a-I E F such that a a-I = 1 = a-I a
From (1), a.b = 0
1
a- (a.b) = a-I . 0 = 0 I a.O = 0 \;j a E R
(a-I a) . b = 0
lob = 0
b=O
Hence if a '" 0, then b=O
Similarly, if b '" 0, then a=O
Hence F is without zero divisors. Consequently F is an integral domain.
The converse is, however, not true.
Example of an integral domain, which is not a field. (P.T.V. B.Tech. Dec. 2013)
Z is an integral domain. But for 2 E Z, there is no a E Z such that 2a = 1 = a.2 i.e., 2 has
no multiplicative inverse.
Therefore, Z cannot be a field.
Theorem IX. Any finite non·zero integral domain is a field.
Proof. Let D = [ap a2) an] be a finite non-zero integral domain where each a/s are
••••••
distinct. We show D is a field. For this, we show F is commutative ring with unity and each
non-zero element of D has multiplicative inverse.
Since D is an integral domain, D must be commutative.
Let 0 t:- a E D and consider the set [aap aa2, aan] . We claim ••••••
We next claim that the elements aap aa2) aan are all distinct. For if) aai = aaj
••••••
= a( aio a) J
D is commutative
= (a aio ) a J
Associativity
= aa J
I a a· = a
'0
= x.
340 DISCRETE STRUCTURES
= (a aio ) a I D is commutative
J
= aa· = x
J
= a, a I D is commutative
J
aa· = 1 = a, a
J J
i.e., aj is the inverse of a that is) each non-zero element of D has multiplicative inverse.
Hence D is a field.
Example 8. [Zp' +p' Xj, p is prime, is a field.
Sol. We know that ZP ) p is prime) is an integral domain. Since Zp is finite and non-zero)
therefore Zp is a field (use theorem IX above)
L Write out the addition, multiplication and inverse (additive) table for the following fields:
(a) [Z,; +" x,l (b) [Z3 ; +3' X3l
(c) [Z5; +5' X5l
2. Find all numbers in Z2 :::: [0, 1, +2' X2] that satisfy the following equations:
(a) x'3 - 1 0 (b) x' + 1 0
(c) x + x' + x + 1 0 (d) x3 + x + 1 o.
= =
Determine all values of x from the given fields which satisfy the given equations:
= =
3.
(a) x + 1 - l over Z" Z3' Z5 (b) 2x + 1 2 over Z3' Z5
(c) 3x + 1 2 over Z5'
= =
Write out the operation tables for [Z22, +2' x2]. Is Z22 a ring ? an integral domain ? a field? Justify
=
4.
your answers.
Answers
1. a
( )
W: o
1
0 1
1 0
Addition Table
¥ o
1
0 0
0 1
Multiplication Table
f 1 1
Inverse Table
(b) +3 0 1 2 X3 0 1 2
if
0 0 1 2 0 0 0 0 1 2
1 1 2 0 1 0 1 2 2 1
2 2 0 1 2 0 2 1
Addition Table Multiplication Table Inverse Table
RINGS 341
(c) + 5 ° 1 2 3 4
° ° 1 2 3 4
1 1 2 3 4 °
2 2 3 4 ° 1
3 3 4 ° 1 2
4 4 ° 1 2 3
Addition Table
X5 ° 1 2 3 4 a a-I
° ° ° ° ° ° 1 4
1 ° 1 2 3 4 2 3
2 ° 2 4 1 3 3 2
3 ° 3 1 4 2 4 1
4 ° 4 3 2 1
Multiplication Table Inverse (additive) Table
2. (a) 1 (b) 1 (c) 1 (d) None.
(a) ° (over Z2) ' 1 (over Z,) , 3(over Z5) (b) 2(over Z,), 3(over Z,) (c) 2(over Z5)
x= x= x=
3.
x2 (0, 0) (0, 1) ( 1, 0) ( 1, 1)
Z22 is a ring.
Z22 is not an integral domain. Since (1, 0), (0, 1) Z22 be any two non-zero elements and
E
is a ring with zero divisors.
( 1 , 0) . (0, 1) :::: (0, 0) i.e., Z2
2
Z2 2 can not be a field. For if, is a field, it must be an integral domain, which is not so.
Z22
ILLUSTRATIVE EXAMPLES
Example L Show that {OJ is an ideal in any ring R. (P.T.V. B.Tech May 2010)
Sol. Let 0 E {OJ and consider 0 - 0 = 0 E {OJ
For r E R, r . 0 = 0 E {OJ
o . r = 0 E {OJ
. . {OJ is an ideal of R.
Example 2_ Let M be the ring of 2 x 2 matrices over reaIs. Give an example of a left ideal,
which is not a right ideal and an example of a right ideal, which is not a left ideal.
Sol. Consider {(� �): E R}
L= a, b
Consider A B (� �) (� �) (� � � �) E L V a, b, c, d E R
- = =
Let R E M be any matrix over reals such that
R (� n= a, ER
�, y, 8
RA = (� �) (� ) ( )
a 0 au + �b
Consider b = O ya + 8b E L
AR = (� �) (� ) ( )EL
� ay a8
But 8 = by b8
Hence L is a left ideal, but not a right ideal of M
If we take K {(� �):
= E R} , then we can show that K is a right ideal, but not a left
a, b
ideal of M.
Example 3_ The set of even integers is an ideal of z.
Sol. Consider E, the set of even integers given by E = [2m : m E Zl
Let a) b E E ::::::} a = 2m) m E Z) b = 2n) n E Z
.. a - b = 2 m - 2 n = 2(m - n) E E l ·: m, n E Z => m - n E Z
For r E Z) consider
ra = r(2m) = 2(rm) E E
ar = (2m) r = 2(mr) E E
1
m E Z, r E Z => rm E Z
Similarly, mr E Z
Hence E is an ideal of Z.
RINGS 343
Example 4. Let M be a ring of 2 x 2 matrices over integers. Consider the set
(P.T.U. B. Tech. Dec. 2010)
L= [(� �) : E z] .
a, b Show that L is a left ideal of M. Is L right ideal of M?
Let A, B E L A = (� �) ; a, b E Z ; B = (� �) ; c, d E Z
=>
A - B = (� �) - (� �) = (��� �) E L a-c E Z
=>
I b, d E Z b - d E Z =>
RA = (� �H� �) = (;:: �) E L
�, a, b E Z
a, a + �b E Z
=> a
8, a, b E Z
y, a + 8b E Z
=> y
L
Hence is a left ideal of M. Also
AR = (� �H� �) = (��
L is not a right ideal of M.
Example 5. Every ideal of a ring R is a subring of R. But the converse is not true.
K R,
Sol. Let be an ideal of then we have
For a, bEK => a - bEK EK \;j a, b ... (1)
E R) E K) E K
For r ra ar ... (2)
K R.
We show is a subring of i.e.,
We show (i) for a, b EK => a-bE K \;j a, bEK ... (3)
EK
(ii) for a, b EK
=> a . b EK
\;j a, b ... (4)
Now (3) is trivial by using (1). To show (4),
Let bE KeR => bE R. K R E K,
Since is an ideal of and a we have
abEK I Using (2»
Hence K is a subring of R.
Consider Z, the set of integers and Q, the set of rationals. We know that Z is a subring
of Q. We show Z is not an ideal of Q.
Take 3 Z,E i E Q, then 3 . i = % 'l Z i.e., Z cannot be an ideal of Q.
Example 6. If is an ideal of R and 1
K E K,
then K= R
Sol. Given K is an ideal of R, so K is a subset of R i.e., K c R. Also r E R and 1 E K
=> r.1 E K I K is an ideal of R
rE K RcK =>
K=R
344 DISCRETE STRUCTURES
Example 7. If F is a field, then F has no proper ideals.
Or
If F is a field, then the only ideals of F are <0> and F itself.
Sol. Let, if possible. S is any proper ideal of F and 0 # a E S. As S c F => 0 # a E F.
But F is a field and 0 # a E F. There exists a-I E F (Every non·zero element of F has a multipli·
cative inverse).
6
Now a E S) a-I E F and since S is an ideal of F) then aa-1 E S ::::::} 1 E S
Hence S = F. I see example above
Hence the only ideals of F are 0 and F itself.
Theorem X. Intersection of two ideals of a ring R is an ideal of R.
(P.T.V. B. Tech. May 2013)
Proof. Let A and B are two ideals ofR, then, <jJ # A c R, <jJ # � c R => <jJ # A n B c R i.e.,
A n B is a non·empty subset of R. We show A n B is an ideal of R.
Let x, Y E A n B => x, Y E A and x, y E B. As A and B are ideals of R
x - Y E A, x - Y E B => x - Y E A n B
For r E R) X E A => rX E A and xr E A I A is an ideal of R.
Also for r E R, X E B => rX E B and xr E B I B is an ideal of R
Hence rX E A, rX E B => rX E A n B
Also xr E A, xr E B => xr E A n B
Hence the theorem.
Example 8. Let T : R --; S be a ring homomorphism. Show that the kernel of T is a two
sided ideal of R. (P.T.V. B.Tech. May 2013)
Sol. By definition:
Ker T = {r E R : f (r) = 0, where 0 E S}
Let x, Y E Ker T => T (x) = 0, T (y) = 0
Consider T (x -y) = T (x) - T (y) = 0 - 0 = 0
=> x- Y E Ker (T)
Further, if r E R and x E Ker T
Then T (rx) = T (r) T (x)
= T(r) · 0 = 0
Hence rx E Ker T
Similarly, T (xr) = T (x) T (r)
= 0 . T (r)
=0
xr E Ker T
Hence, kernel of T is a two sided ideal of R.
9.15. SUM OF IDEALS
Let A and B be two ideals of a ring R, then the sum of the ideals A and B, denoted by
A + B, is defined by A + B = [a + b : a E A, b E B]
Theorem XI. IfA and B are two ideals of R, then A + B is an ideal of R.
Proof. 0 = 0 + 0 E A + B => A + B # <jJ i.e., A + B is non· empty subset of R.
RINGS 345
Let x) Y E A+ B ::::::}
x = a1 + bp a1 E A) b I E B
Y = a2 + b2 ) a2 E A) b2 E B
x - y = a, + b, - (a2 + b) = a, - a2 + b, - b2 E A + B
.: a ' a2 E A and A is an ideal of R
l
a, - a2 E A. Similarly b, - b2 E B
Further, for r E R, x E A + B, consider rx = r(a, + b,) = ra, + rb, E A + B
I ': r E R, a, E A and A is an ideal of R. :. ra, E A Similarly, rb, E B
Also xr = (a, + b,) r = a, r + b , r E A + B
I ': r E R, a, E A and A is an ideal of R . . a, r E A. Similarly b , r E B
Hence A + B is an ideal of R.
9.16. QUOTIENT RING (P.T. U. B.Tech. May 2010, Dec. 2007, 2006, May 2005)
by
3.
(x + J) + (y + J) x + + J = y
(x + J) (y + J) "y + J \j x, E R.
= y
Hint
2. Consider H4 {4n ; n E ZJ
=
(4n) r 4(nr) E H4
ar = = n, r E Z =:::} nr E Z
r r(4n) 4(rn) E H4
a = = r, n E Z =:::} rn E Z
Hence H4 is an ideal of Z
Further, H4 { ..... 8, - 4, 0, 4, 8, .....J
=
H4 + 1 {..... - 7, - 3, 1, 5, 9, .....J
=
H4 + 4 {.... - 4, 0, 4, 8, .....J H4
= =
ILLUSTRATIVE EXAMPLES
9.21 . ASSOCIATE
Let R be a commutative ring with unity. An element a E R is said to be an associate of
bE R if a = bu, where u is a unit in R. If a is an associate of b, we write a "'" b.
Example 3. (a) Find the associates of 4 in ZUY where Zl O denotes the integers modulo 1 D.
(b) Find the associates of 5 in Zl O'
(c) Find the associates of n in Z.
Sol. (a) The units of ZlO are those numbers which are relative prime to 10.
.. The units of Z l O are 1, 3, 7, 9.
Multiplying each of the units by 4, we get
1.4 = 4, 3.4 = 12 = 2, 7.4 = 28 = 8, 9.4 = 36 = 6
Thus, 2, 4, 6, 8 are the associates of 4 in Z lO 0
(b) Similarly, the associates of 5 can be obtained by multiplying each of the units by 5,
we get
1.5 = 5, 3.5 = 15 = 5, 7.5 = 35 = 5, 9.5 = 45 = 5.
Th us, the only associate of 5 in Z l O is 5 itself.
(c) The units of Z are - 1 and 1. Multiplying each of the units by n, we get - n and n, as
the associates of n in Z.
Example 4. Consider the ring
Z1 2 = {D, 1, 2, 3, ... , I I} of integers modulo 12.
(a) Find the units of Z1 2
(b) Find the roots of f(x) = x2 + 4x + 4 over Z1 2
(c) Find the associates of 2.
Sol. (a) The units of Z,2 are those elements which are relative prime to 12.
Hence, the units are 1, 5, 7, I I .
(b) Put x = 0, 1, 2, ..... , 11 in f(x) = x2 + 4x + 4, we get
when x = 0, f(O) = 4
x = 1, f(l) = 1 + 4 + 4 = 9
x = 2, f(2) = 4 + 8 + 4 = 16 = 4
x = 3, f(3) = 9 + 12 + 4 = 25 = 1
x = 4, f(4) = 16 + 16 + 4 = 36 = 0 etc.
Also, when x = 10, f(10) = 100 + 40 + 4 = 144 = 0
The roots of f(x) are x = 4, 10
(c) The units of Z, 2 are 1, 5, 7, 1 1
The associates of 2 are obtained by multiplying each unit by 2 , we get
1.2 = 2, 5.2 = 10, 7.2 = 14 = 2, 1 1.2 = 22 = 10
The associates of 2 are {2, 7}.
TheoremXII. Show that relation ofbeing associates is an equivalence relation in a ring R.
Proof. Reflexive. For x E R, we can write x = x . 1 where 1 is a unit in R. Hence x "'" x.
i.e., is reflexive.
,...,
Symmetric. Let a - b => there exist some unit u E R such that b = au.
350 DISCRETE STRUCTURES
Now au-1 = (bu)u-1 = b(uu-1 ) = b
b = au-\ u-1 is also a unit in R
b-a
Hence "'" is symmetric.
Transitive. If a - b => there exists some unit u E R such that a = bu
If b - c => there exists some unit u , E R such that b = u , c. We show a - c.
Now a = bu = (u,c)u = c(u,u)
::::::} a "'" c.
As U,
u 1 are units in R and units form a subgroup.
Hence "'" is transitive.
Relation of being associates is an equivalence relation.
1. Consider the ring Z l O = {O, 1, 2, ... 9} of integers modulo 10. The 3-1 is
(a) 3 (b) 7
(c) 6 (d) none.
2. Consider the ring Zs = {O, 1 , 2, 3, ... 7} of integers modulo 8 and f(t) = t2 + 6 t be a
polynomial in Zs' Then the number of roots of f(t) is
(a) 2 (b) 1
(c) 4 (d) none.
3. Consider the ring Z, 2 = {O, 1 , 2, ... 1 1} of integers modulo 12. The associates of 2 are
(a) 2, 10 (b) 2, 2
(c) 2, 4 (d) none.
4. Consider the ring ZlO = {O, 1 , 2, ... 9} of integers modulo 10. The units of Zl O are
(a) 1, 3, 7, 9 (b) 3, 7, 9
(c) 3. 1 (d) 1 .
5. Consider the ring Z7 = {O, 1 , 2, ... 6} of integers modulo 7, which of the following is true.
(a) Z7 is an integer domain (b) Z7 is a field
(c) Z7 has no zero divisors (d) all of the above.
6. If F is a field, then the number of proper ideals of F is
(a) 2 (b) 1
(c) ° (d) none.
7. If I and J are two ideals of a ring R. Which is false ?
(a)I n J is an ideal of R (b) I u J is an ideal of R
(c)I u J may or may not be an ideal of R (d) none.
S. Which of the following is true ? The ring of integers (Z, .) . +,
(a) is an integral domain (b) is a field
(c) is a division ring (d) none.
RINGS 351
9. Which of the following statement is not true ?
(a) Every field is an integral domain
(b) Any finite non·zero integral domain is a field
(c) Every ideal of a ring R is a subring of R
(d)
All are true.
10. Which of the following is a false statement ?
(a) The ring of integers is an integral domain
(b) The ring of integers is a Euclidean domain
(c) The ring of integers is a P.LD.
(d) None.
secondly, if x S y and y S x, then we have x = y and lastly if x S y and y S z, it implies x S z for all
1. The set N of natural numbers form a poset under the relation ':s;' because firstly x :::; x,
x, y, z E N.
2. The set N of natural numbers under divisibility i.e., 'x divides y' forms a poset be
cause x/x for every x E N. Also if x/y and y/x, we have x = y. Again if x/y, y/z we have x/z, for
every X,y,Z E N.
3. Consider a set S = {I, 2} and power set of S is P(S). The relation of set inclusion C is a
partial order relation. Since, for any sets A, B, C in P(S), firstly we have A C A, secondly, if A
c B and B e A, then we have A = B. Lastly, if A c B and B e C, then A c C. Hence, (P(S), C) is
a poset.
ILLUSTRATIVE EXAMPLES
Example 1. Consider the set Z of integers. Define aRb by b = a', for some positive integer r.
Show that R is a partial order relation on Z
Sol. (i) Since a = a1 aRa i.e., R is reflexive
• •
(ii) Let aRb and bRa. Then there exist positive integers r and s such that
b = ar and a = b S
Now a = bS = (ar) S = ars
Consider the following possibilities
(a) If rs = 1 , then r = 1 , s = 1 and hence a = b. Therefore, R is antisymmetric
(b) If a = 1 , then b = l' = 1 = a. Therefore, R is antisymmetric
352
BOOLEAN ALGEBRA 353
(c) If b = 1, then a = 1' = 1 =a
. . R is antisymmetric.
(d) If a = 1 , then b = (
- - 1)' = - 1 (since b # 1) and hence a = b. Therefore,
R is antisymmetric.
Hence) in all the cases) R is antisymmetric.
(iii) Let aRb, bRc, then there exist positive integers r and s such that
b = ar) c = bS
c = b S = (ary = ar\ for some positive integer rs. Hence aRc
R is transitive also.
Therefore) R is a partial order relation.
Example 8. Consider a set S = {a, b, c}. Is the relation of set inclusion 'c' is a partial
order relation on P(S) where P(S) is a power set of S ?
Sol. The power set of S is
P(S) = {{a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}, q,}
Now consider any sets A, B and C in P(S).
1. Since every A c A, hence it is reflexive.
2. If A c B and B C A, we have A = B. Hence it is antisymmetric.
3. If A c B, B c C, we have A C C. Hence it is transitive.
. . (P(S), C) is a poset.
Example 9. Consider a set A = {4, 9, 1 6, 36}. Is the relation 'divides' a partial order
relation.
Sol. The relation 'divides' is a partial order relation if it satisfies the property of reflex·
ivity, antisymmetry and transitivity.
1. Since for every a E A, we have a/a. Hence, 'divides' is reflexive.
2. If alb and bla, we have a = b for any a, b E A. Hence, 'divides' is antisymmetric.
3. If alb and blc, we have alc for any a, b, c E A. Hence, the relation 'divides' is a partial
order relation and (A, f) is a poset.
Example 10. Consider A = {I, 2, 3, 5, 6, 10, 15, 30} is ordered by divisibility. Determine
all the comparable and non-comparable pairs of elements ofA.
Sol. The comparable pairs of elements of A are :
{1, 2}, {1, 3}, {1, 5}, {1, 6}, {1, 10}, {1, 15}, {1, 30}
{2, 6}, {2, 10}, {2, 30}
{3, 6}, {3, 15}, {3, 30}
{5, 10}, {5, 15}, {5, 30}
{6, 30}, {10, 30}, {15, 30}.
356 DISCRETE STRUCTURES
The non-comparable pair of elements of A are :
{2, 3}, {2, 5}, {2, 15}
{3, 5}, {3, 10}, {5, 6}, {6, 10}, {6, 15}, {10, 15}.
Example 11. Consider the set I = {I, 2, 3,..... .} is ordered by divisibility. Determine
whether each of the following subsets of I are linearly ordered or not.
(i) {2, 4, 8} (ii) {3, 6, 9, I I}
(iii) {I} (iv) {2, 4, 6, 8, 10, ..... .}.
Sol. (i) The subset is linearly ordered, since every pair of elements is comparable i.e., 2 1 4 1 8.
(ii) The subset is not linearly ordered, since the pair (3, 11) is not comparable.
(iii) The subset is linearly ordered) since the set containing one element is always lin
early ordered.
(iv) The subset is not linearly ordered since every pair of elements is not comparable i.e.,
neither 4/6 nor 6/4.
Example 12. Consider the set A = {4, 5, 6, 7}. Let R be
the relation S on A. Draw the directed graph and the Hasse
diagram of R.
Sol. The relation S on the set A is given by
R = {{4, 5}, {4, 6}, {4, 7}, {5, 6}, {5, 7}, {6, 7}, {4, 4},
6}--+_--{
{5, 5}, {6, 6}, {7, 7}}
The directed graph of the relation R is as shown in
Fig. 10.1.
To draw the Hasse diagram of partial order, apply Fig. 10.1
the following points : 7
1. Delete all edges implied by reflexive property i.e.,
6
(4, 4), (5, 5), (6, 6), (7, 7).
2. Delete all edges implied by transitive property i.e.,
5
(4, 7), (5, 7) and (4, 6).
3. Replace the circles representing the vertices by dots. 4
Fig. 10.2
4. Omit the arrows.
The Hasse diagram is as shown in Fig. 10.2.
Example 13. Draw the directed graph of relation determined by the Hasse diagram on
the set A = {I, 4, 6, 8} as shown in Fig. 10.3.
Sol. The directed graph is shown in Fig. 10.4.
3 4
m
k
/ �
in Fig. 10.9. Determine the value of set A and also determine the set R
where R is the corresponding relation.
Sol. The set A = {{I}, {2}, {I, 2}, q,} and
{1 ) {2 )
R = {({I), (I}), ({2), (2}), ({I, 2), (I, 2}), {q" q,}, ({I),
(I, 2}), ({2), (I, 2}), (q" (I}), (q" (2}), (q" (I, 2})}. "" � /
Here the relation R is (set inclusion) c. Fig. 10.9
358 DISCRETE STRUCTURES
Example 17. Let A = {i, 2, 3, 4}, and let r be the relation <: on A. Draw the digraph and
the Hasse diagram of r.
Sol. The elements of the relation <: on A which means first element is less than or equal
to the second element is as follows.
r = {(I, 1), (2, 2), (3, 3), (4, 4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}
Now, draw the directed graph of the relation r as shown in Fig. 10.10.
Fig. 10.10
After, drawing the directed graph, convert it into the Hasse dia·
gram. The Hasse diagram is shown in Fig. 10.11. 4
Fig. 10.11
Example 18. Let B = {2, 3, 4, 6, i2, 36, 48}, and let s b e the
48 36
relation, "divides" on B. Draw the Hasse diagram of S.
Sol. The Hasse diagram of the relation S onset B is shown
in Fig. 10.12. 12
The easy way to draw the Hasse diagram is to find the
elements of relation r, then draw directed graph of it and after
that convert it into Hasse diagram. 6 4
3 2
Fig. 10.12
Example 19. Let A be the set of strings of O's and i 's of length 3 or less. Define the
relation of d on A by xdy ifx is contained within y. e.g. (Oi)d(10i). Draw the Hasse diagram for
this relation.
Sol. Firstly find all the elements of the set A as given below.
A = {O, 1, 00, 01, 10, 1 1 , 000, 001, 010, 011, 100, 101, 110, 11 1}.
BOOLEAN ALGEBRA 359
Now to draw the Hasse diagram, write all the elements having length 3 in one row at
the top as these elements are not contained in any other element. Then in the second row)
write all the elements having length 2 and connect them with elements having length 3 and
are contained in them. Repeat the above process for elements having length 1.
The Hasse diagram of the relation d is shown in Fig. 10.13.
Fig. 10.13
Example 20. Let A be the set of strings of O's and 1 's of length 3 o r less. Define the
relation of d on A by xdy if x is a prefix ofy e.g. (lO)d(lOl). Draw the Hasse diagram for this
relation.
Sol. Using the procedure followed in the previous example, the Hasse diagram is shown
in Fig. 10.14.
00 10 01 11
Fig. 10.14
360 DISCRETE STRUCTURES
L Let L = {1, 3, 5, 7, 15, 21, 35, 105} and let <; be a relation/(divides) on L. Then (L, <;) is a poset.
2. Let M = P(A), the power set of A where A = {a, b, c) and C be a relation on M. Show that (M, C) is
a poset. Also draw its Hasse diagram.
Let D30 {l, 2, 3, 5, 6, 10, 15, 30} and let the relation/(divides) be a partial order relation on Dso.
Draw the Hasse Diagram of D30.
3. ::::
Answers
2. See Fig. 10. 15
[a. b. el
[a. bl [b. el
[al [el
Fig. 10.15
3. See Fig. 10.16
30
6 15
2 5
Fig. 10.16
4. D s = {1, 2, 4, 8};
DSG = {1, 2, 5, 10, 25, 50};
D!DO! = {1, 7, 11, 13, 77, 91, 143, 100l}
BOOLEAN ALGEBRA 361
6.
186
4I
I
17
2
I
I
D 16
(a) (b) (c)
Hint
5. If aand b are distinct least elements, then
since a is least element
a :s; b
Also b :s; a since b is least element
� a = b due to antisymmetry, a contradiction
Hence a = b.
1 0.6. LATTICE
A lattice L is a poset in which every pair of elements has a least upper bound (LUB) or
supremum and a greatest lower bound (GLB) or infimum.
Alternative definition of lattice.
A lattice is a partially ordered set in which
a 1\ b = Inf(a. b) a v b = sup (a. b). exists
for any pairs of elements a and b.
ILLUSTRATIVE EXAMPLES
Example 1. Consider the lattice L on the set Dm. the divisors of a positive integer m.
where a v b = l.c.m.(a. b) and a 1\ b = g.c.d.(a. b). Draw the diagram of the partial order induced
/36�
by L for m = 36.
Sol. The required Hasse diagram is shown below (Fig. 10.17).
4 /12� /8�
6�
�2/ 3/
�1/
Fig. 10.17
362 DISCRETE STRUCTURES
�l/
case a :::; b) whenever a /\ b = a.
The required Hasse diagram is shown in Fig. 10.36.
Example 3. Determine which of the posets shown in
Fig. i 0. i9 are lattices. Fig. 10.18
6
7 4
4 6
2
2 5
II III
Fig. 10.19
Sol. All the posets shown in Fig. 10.19 are lattices.
Example 4. Determine whether the posets shown in Fig. i 0.20 are lattices or not.
5
z
4 3
x
/\ b y
2
�I/ a
II III
Fig. 10.20
Sol. The posets shown in Figs. 10.20(II) and 10.20(III) are lattices. The poset shown in
Fig. 10.20(1) is not lattice as (x, y) has three lower bounds i.e r. s and t but the Inf (x. y) does
.•
e
5 6 3 5
4
4
2 3
2
a b
II III
Fig. 10.21
Sol. The poset shown in Fig. 10.21(II) is a lattice. The poset shown in Fig. 10.21(1) is not
lattice since the elements e andfhave no upper bound, hence SUP (e, f) does not exist. Similarly,
the elements a and b have no lower bound, hence INF (a, b) does not exist.
The poset shown in Fig. 10.2 1 (III) is lattice.
8,
0
8,
86
84 8s
(d)
8 83
2
8,
(e)
8,
364 DISCRETE STRUCTURES
<g) ::
(i)
� a,
�
Which of the posets are lattices ?
Answer
1. (i) (a), (b), (c), (d) and (h) are lattices,
Let S be a non-empty set. Then a function from S into S is called a unary operation on S.
A unary operation may be denoted by the symbols f, g, <p, 'If etc.
Thus, if [is a unary operation on a set S, then [(a) is unique element of S for all a E S.
For example. Let N be the set of natural numbers, and [ be a function from N to N
defined by [(n) = n2 for all n E N. Then [ is a unary operation on N. Also, for this unary
operation, [(3) = 9, [(8) = 64 etc.
Remark. The binary operations '+' and '.' used above have got nothing to do with ordinary addi
tion and multiplication of numbers. In fact, +, *, . are just symbols to represent Binary operations.
Similarly '0' and '1' are two specific elements ofB satisfying certain properties. These two numbers have
no bearing with the numbers 0 and 1 of the set of integers.
I ILLUSTRATIVE EXAMPLES
Example 1. Let S be a non-empty set and B denotes the set ofall subsets of S. Show that
{B, U, n, '} is a Boolean algebra. (P.T.V., B.Tech. May, 20 1 3)
Sol. Let X, Y, E B, Then X U Y, X n Y E B since X U Y, X n Y are also subsets of S.
.. u and n are binary operations on B.
If X' denotes the complement of X, then we write X' = S - X E B.
We verify the following laws :
Commutative laws. Let X, Y, E B, then
XuY=Yu X and X n Y = Y n X are always true. Hence commutative laws hold.
Distributive laws. Let X, Y, Z E B, then
X u (Y n Z) = (X u Y) n (X u Z)
366 DISCRETE STRUCTURES
X n (Y u Z) = (X n Y) u (X n Z),
are always true. Hence) distributive laws hold.
Identity laws, Let Q, S, X E B, then X u q, = X and X n S = X,
are always true. Hence, identity laws hold. Here q, is the zero element and S is the unit ele
ment of B.
Complement laws. Let X E B, then
X u X' = X u (S - X) = S
X n X' = X n (S - X) = q"
are always true. Hence, complement laws also hold. Hence, {B, n, U, '} is a Boolean algebra.
Example 2. Let B = {O, I}. Define the binary operations '+' and '.' on B as below .-
o 1 o 1
o 1 o o o
1 1 1 o 1
Let the unary operation "' is defined by 0'= 1 and 1 '= O. Show that {B, +, ., '} is a Boolean
algebra.
Sol. From the Table, it is clear that a + b and a . b are unique elements of B. Therefore,
'+' and '. ' are binary operations on B. We verify the following :
Commutative laws. Consider the following Tables. I and II.
Table I Table II
a b a+b b+a a b a.b b.a
0 0 0 0 0 0 0 0
1 0 1 1 1 0 0 0
0 1 1 1 0 1 0 0
1 1 1 1 1 1 1 1
From the above Tables, a + b = b + a 'i a, b E B
Also a . b = b . a 'i a, b E B
Hence commutative laws hold.
Distributive laws. Consider the following tables. III and IV.
Table III
a b c b.c a + (b.c) a+b a +c (a + b). (a + c)
0 0 0 0 0 0 0 0
1 0 0 0 1 1 1 1
0 1 0 0 0 1 0 0
0 0 1 0 0 0 1 0
1 1 0 1 1 1 1 1
1 0 1 0 1 1 1 1
0 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
BOOLEAN ALGEBRA 367
0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0
0 0 1 1 0 0 0 0
1 1 0 1 1 1 0 1
1 0 1 1 1 0 1 1
0 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1
defined by a' = !'.- 'i a E B. Show that {B, +, ., ' } is a Boolean algebra.
a
368 DISCRETE STRUCTURES
Sol. Given B = {I, 2, 3, 6} and the binary operations are '+' and '.'. The composition
tables for the binary operations are given as :
Table I Table II
+ 1 2 3 6 1 2 3 6
1 1 2 3 6 1 1 1 1 1
2 2 2 6 6 2 1 2 1 2
3 3 6 3 6 3 1 1 3 3
6 6 6 6 6 6 1 2 3 6
Each element inside the Table I and II are also element of B = {I, 2, 3, 6}. Therefore, '+'
'
and '. are binary operations on B. We verify the following :
Commutative laws. From Table I, it is clear that table I is symmetrical. Also Table II
is symmetricaL Therefore)
a+ b=b+ a and a. b = b . a \;f a, b E B
Identity laws. For a E B, consider the following tables. III and IV
Table III Table IV
a 1 a+1 a 6 a.6
1 1 1 1 6 1
2 1 2 2 6 2
3 1 3 3 6 3
6 1 6 6 6 6
From table III, a+ I=a \;f a E B
From table IV, a.6 = a \;f a E B
I is the zero element and 6 is the unit element. Hence Identity laws hold.
Table V Table VI
1 6 6 1 6 1
2 3 6 2 3 1
3 2 6 3 2 1
6 1 6 6 1 1
Complement laws. From table V, a + a' = 6 and from table VI a.a' = I
Complement laws hold
Distributive laws. For a, b, c E B,
a + (b.c) = (a + b) . (a + c)
and a . (b + c) = a.b + a.c also hold
For example) a = 3) b = 6) c = 2.
BOOLEAN ALGEBRA 369
a
Sol. We verify the following :
I. Commutative laws.
Given a + b = l.c.m (a, b) = l.c.m (b, a) = b + a
Also a · b = g.c.d. (a, b) = g.c.d. (b, a) = b ' a
Commutative laws hold.
II. Identity laws. Consider the following composition tables of the binary operations
'+' and '. ' defined in (1)
+ 1 2 5 7 10 14 35 70
1 1 2 5 7 10 14 35 70
2 2 2 10 14 10 14 70 70
5 5 10 5 35 10 70 35 70
7 7 14 35 7 70 14 35 70
10 10 10 10 70 10 70 70 70
14 14 14 70 14 70 14 70 70
35 35 70 35 35 70 70 35 70
70 70 70 70 70 70 70 70 70
1 2 5 7 10 14 35 70
1 1 1 1 1 1 1 1 1
2 1 2 1 1 2 2 1 2
5 1 1 5 1 5 1 5 5
7 1 1 1 7 1 7 7 7
10 1 2 5 1 10 2 5 10
14 1 2 1 7 2 14 7 14
35 1 1 5 7 5 7 35 35
70 1 2 5 7 10 14 35 70
370 DISCRETE STRUCTURES
a + (b . c) = (a + b) . (a + c)
Also a . (b + c) = 2 . (5 + 7) = 2.35 = 1
and a.b + a.c = 2.5 + 2.7 = 1 + 1 = 1
a . (b + c) = a.b + a.c
IV. Complement laws. Consider the following table :
70
a a' = - a + a' :::: l.c.m. (a, a') a.a' :::: g.c.d. (a, a')
a
1 70 70 1
2 35 70 1
5 14 70 1
7 10 70 1
10 7 70 1
14 5 70 1
35 2 70 1
70 1 70 1
70
a =
,
a
70
(i) x = 35 . (2 + 7') = 35 . (2 + 10) 1 7' = - = 10
1
7
= 35.10 2 + 10 = i.c.m. (2, 10)
=5 35.10 = g.c.d. (35, 10) = 5
(ii) Y = (35 . 10) + 14'
70
=5 + 14' = 5 + 5=5 1 14' = =5
14
(iii) z = (2 + 7) . (14. 10)' = 14.2' = 14.35 = 7 14.10 = g.c. 1 (14, 10) = 2
Remark. The set B of all positive factors (or divisors) of a positive integer m w.r.t. the operations
defined as :
B and a'
a + b = I.c.m. (a, b), a.b = g.c.d. (a, b) \j a, b E
m
= -
a
For example, if B {l, 4, 6, the set of divisors of The binary operations '+', '.' are
:::: 2, 3, 1212}, 12.
defined as usual and '" is defined by a' :::: - . Since
12 :::: 3 .4 Product of distinct primes, hence B cannot
-:f-
a Boolean algebra. We can also verify that complement laws do not hold on B.
a
A unary operation on B is defined as a' :::: � \j a E B. Show that (B, + , . , ') is a Boolean
u,
algebra.
a
2. Let B be the set of all positive factors of Two binary operations '+' and '. ' are defined as
105.
follows :
a + b I.c.m. (a, b), a.b g.c.d. (a, b) \j a, b E B.
= =
105
A unary operation on B is defined as a' :::: \j a E B. Show that (B, +, . , ') is a Boolean
u,
algebra.
a
3. Let B :::: 4) be the set of all positive factors of 4. Two binary operations '+' and '. ' are defined
as follows :
(1, 2,
372 DISCRETE STRUCTURES
'r:j a, b E B. A unary operation ' " on B is defined as
a + b :::: l.c.m. (a, b), a.b :::: g.c.d. (a, b)
a' :::: .±. Va E B. Show that (B, +, ., ') is not a Boolean algebra.
a
4. Let B :::: {l, 2, 4, 8} be the set of positive factors of 8. Two binary operations '+' and '.' are defined
as follows :
a + b I.c.m. (a, b), a.b g.c.d. (a, b) \j a, b E B.
= =
A unary operation on B is defined as a' :::: � 'r:j a E B. Show that (B, +, ., ') is not a Boolean
u,
algebra.
a
5. Let B {�, {I}, {2), {3), {I, 2), {I, 3), {2, 3), {I, 2, 3}). Show that (B,
= ') is a Boolean algebra.
U, n,
14. In the Boolean algebra (B, +, ., ,), show that (a + b) . [a.b' + b]' 0 \j a, b E B.
=
Hints
6. (i) L.H.S = (a + c.a') + b = (a + c) . (a + a') + b
(ii) L.H.8 = a.b + c.(a.b)' = (a.b + c) . (a.b)'
7. x.(x + y) + « (y' + x).y)' = x + (y'.y + x.y)'
= x + (0 + x.y)' = x + (x.y)' = x + (x + y') = (x + x') + y'
= 1 + y' = l.
12. L.H.8. = (a + b).a' + (a + b).c = a'.a + a'.b + c.(a + b) . (a + a')
:::: a'.b + c.(a + b.a') :::: a'.b + c.a + c.b.a'
:::: a'.b.l + a'.b.e. + a.c :::: a'.b.(l + c) + a.c
13. (i) Let a + b = O. Then
a = a + 0 = a + b.b' = (a + b) . (a + b') = 0 . (a + b') = O.
ILLUSTRATIVE EXAMPLES
Example 1. Determine whether or not each of the following subsets of D7V' is a sub·
algebra ?
(i) A = {I, 5, 10, 70} (ii) C = {I, 2, 35, 70}
Sol. (i) Consider the following composition tables :
Table I Table II
+ 1 5 10 70 1 5 10 70
1 1 5 10 70 1 1 1 1 1
5 5 5 10 70 5 1 5 5 5
10 10 10 10 70 10 1 5 10 10
70 70 70 70 70 70 1 5 10 70
From Table II, each element inside the table is from A = {I, 5,10, 70}. Therefore, A is
closed under '. '.
For complement, consider the following table :
, 70
a a = -
a
+ 1 2 35 70 1 2 35 70
1 1 2 35 70 1 1 1 1 1
2 2 2 70 70 2 1 2 1 2
35 35 70 35 70 35 1 1 35 2
70 70 70 70 70 70 1 2 35 70
From table III, each element inside the table III is from C. Therefore, C is closed under
'+'. From table IV, each element inside the table IV is from C. Therefore, C is closed under '. ' .
Also, consider the following table V.
Table V
'
70
a a :::: -
a
1 70 From table V, 1' :::: 70, 2' :::: 35, 35' :::: 2, 70' :::: 1. Hence, complement
2 35 of each element of C exists. Hence C is a Boolean algebra.
35 2
70 1
A non-zero element in a Boolean Algebra {B, , Y, /\} is called an atom if for every x E B,
-
-----=::: 2 1 0 �
� 30
2 / ��1 05
6 10
Fig. 10.22
(b) The prime divisors of 210 are 2, 3, 5, 7. Hence the set A of atoms is A = {2, 3, 5, 7}
(c) (i) By definition (complement), a set B is called subalgebra if it contains the elements
o and 1 and is closed under /\, v and ' I '.
1 = 210, 210 = 1
Thus, each element of B has its complement
The set B = {1, 2, 3, 6, 35, 70, 105, 210} is a subalgebra.
(ii) Take C = {1, 5, 6, 7, 30, 35, 42, 210}
Proceeding as in part (i), we can show that C is also a subalgebra.
(d) Here X = {1, 2, 6, 210}. We know that a set X is called sublattice if
avbE X, a /\ b E X for all a, bE X
Since, 1 v 2 = l.c.m of 1 and 2=2 E X
1 /\ 2 = g.c.d of 1 and 2=1 E X
Also, 1 v 6 = 6, 1 /\ 6 = 1 , 1 v 210 = 210, 1 /\ 210 = 1
Further, 2 v 1 = 2, 2 /\ 1 = 1 , 2 v 6 = 6, 2 /\ 6 = 2, 2 v 210 = 210, 2 /\ 210 = 2 etc.
.. X is a sublattice of D2 10
But complement of 2 = 105 'l X :. X is not a subalgebra
(e) Here Y = {1, 2, 3, 6}
Let a, b E Y, then a v b, a /\ b E Y for all a, b E Y
Y is a sub lattice of D2 10
Also "2 = 105 'l Y Y is not a subalgebra.
Example 3. Find the number of subalgebras of D21O•
Sol. A subalgebra of D2 10 must contain two) four) eight or sixteen elements.
(i) There can be only one two-element subalgebra which consists of greatest element
210 and least element 1 , i.e., {1, 210}
(ii) Any four-element subalgebra is of the form {1, x, x , 210}, i.e., consists of the greatest
element, least element, and a nonbound element and its complement.
There are fourteen nonbound elements in D2 10 which are
2, 3, 5, 6, 7, 10, 14, 15, 21, 30, 35, 42, 70, 105. Hence there are 14/2 = 7 pairs (x, x ).
Thus D 2 10 has seven four-element subalgebras.
(iii) An eight-element of subalgebra S will contain three elements s 1 ' s2 ) s3 where s1 ' s2
are any two of the four atoms of D 2 1 0 and s3 is the product of the other two atoms.
BOOLEAN ALGEBRA 377
7 = 143, 143 = 7
Also 11 v 91 = 1001, 1 1 1\ 91 = 1 Fig. 10.23
- -
1 1 = 91, 9 1 = 1 1 ,
Also 13 v 7 7 = 1001, 1 3 1\ 77 = 1
13 = 77, 77 = 13
Also 1 v 1001 = 1001, 1 1\ 1001 = 1
(ii) Any four-element subalgebra is of the form {1, x, x, 1001} i.e., consists of least
element) greatest element and a nonbound element and its complement.
There are six nonbound elements which are 7) 1 1 ) 13) 77) 91) 143. Hence there are
(iii) Since D, OOl contains 8 elements. The only eight-element subalgebra is D, OO ' itself.
Total number of subalgebras
=1 +3+ 1 = 5.
Two Boolean algebras B and B l are called isomorphic if there is a one-to-one corre
spondence f : B � B l which preserves the three operations +) * and for any elements a, b in BI
Le.,
f(a + b) = f(a) + f(b)
f(a * b) = f(a) * f( b) and f(a') = f(a)'.
For example, the following are two distinct Boolean algebras with two elements, which
are isomorphic.
1. The first one is a Boolean algebra that is derived from a power set P(S) under c (set
inclusion). i.e., let S = {aj, then B = (P(S), u, n, '} is a boolean algebra with two elements P(S)
= {<p, {all ·
2. The second one is a Boolean algebra {B, v, A, '} with two elements 1 andp {here p is a
prime number} under operation divides, i.e., let B = {I, pl. So, we have 1 A p = 1 and 1 v p = p
also l ' = p and p' = 1 .
algebra of all subsets of the set A of atoms. Let 0 " x E B such that x = a, + a2 + a3 + ..... + a, then
Let B be a finite algebra : Let A be the set of atoms of B and let P(A) be the Boolean
the function
f = B --; P(A) defined by f(x) = (ap a2, a3, ••••• , a,l is an isomorphism.
Hence) rcx + y) = {ap a2) ..... ) ar, bp b2) ..... ) bs) cp c2) ..... ) ct}
= {al) a2) .... ) ar) b l ) b2) ..... ) b) U {bl) b2) ..... ) bs) c I ) c2) ..... ) c)
= f (x) u f (y)
BOOLEAN ALGEBRA 379
Also f(xy) = (b" b2 , , b)
•••
II. Theorem. Let (B, +, ., ') is a Boolean algebra. For a E B, ifx E B be such that a + x = 1
and a . x = 0, then x = a'. Also 0' = 1 and l' = O.
Proof. Given a+x= l ... (1)
a.x = 0 ... (2)
Let a' be the complement of a, then by definition of Boolean algebra,
a + a' = 1 ... (3)
a . a' = 0 ... (4)
Consider x = x.l Indentity law
= x . (a + a') I Using (3)
= x . a + x . a' Distributive law
= a . x + x . a'
= 0 + x.a' I Using (2)
= a.a' + x.a' I Using (4)
= (a + x) . a' Distributive law
= 1.a' I Using (1)
= a' Identity law
Further) 1 is unit element of B) then
1.1' = 1' = 1'.1 ... (5)
Also, by complement laws, 1.1' = 0 ... (6)
From (5) and (6) l' = 0
Again) by complement law) 0 + 0' = 1 ... (7)
and if 0 is zero element of B) then
o + 0' = 0' = 0' +0 ... (8)
From (7) and (8), 0' = 1
III. Idempotent laws (P.T. U. B.Tech. May 2010)
Theorem. If {B, +, ., '} is a Boolean algebra, then
(i) a + a = a 'i a E B (ii) a.a = a 'i a E B.
Proof. (i) If 0 is zero element, then
a=a+O I Identity law
= a + a.a' Complement law
= (a + a) . (a + a') I Distributive law
= (a + a) . 1 Complement law
= a + a 'i a E B I Identity law
(ii) If 1 is unit element of B, then
a = a.l I Identity law
= a . (a + a') Complement law
= a.a + a.a' I Distributive law
= a.a + 0 I Complement law
= a.a I Identity law
IV. Boundedness law (P.T. U. B.Tech. May 2010)
Theorem. If (B, +, ., ') is a Boolean algebra, then
(i) a + 1 = 1 'i a E B (ii) a.O = O 'i a E B.
BOOLEAN ALGEBRA 381
= (b'.(a'.a» + (a'.(b'.b»
= (b'.O) + (a'.O) I Complement law
=0+0=0 ... (2) I Boundedness law
From (1) and (2),
(a + by = a'.b'
(ii) From Part (i), (a + by = a'.b'. Applying Principle of duality, (a. by = a' + b'.
IX. Cancellation laws. If {B, +, ., '} is a Boolean algebra, then
(i) If a + b = a + c and a' + b = a' + c, then b = c
(ii) If a.b = a.c and a'.b = a'.c, then b = c.
Proof. (i) Consider b = b + 0 I Identity law
= b + (a.a') I Complement law
= (b + a).(b + a') I Distributive law
= (a + b).(a' + b) I Commutative law
= (a + c).(a' + c) I Given
= (c + a).(c + a') I Commutative law
= c + (a.a') I Distributive law
=c+O Complement law
=c I Identity law
(ii) Consider b = b.l I Identity law
= b.(a + a') Complement law
= (b + a) . (b + a') I Distributive law
= (a + b).(a' + b) Commutative law
= (a + c).(a' + c) I Given
= (c + a).(c + a') Commutative law
=c+ (a.a') I Distributive law
=c+O Complement law
= c. I Identity law
Now we prove one more important theorem of Boolean algebra.
Theorem X. If {B, +, ., '} is a Boolean algebra. Then the following are equivalent
(i) a + b = b (ii) a.b = a
(iii) a' + b = 1 (iv) a.b' = O.
Proof. (i) => (ii) Let a + b = b and we show a.b = a
Consider a = a.(a + b) Absorption law
= a.b I Given
Let a.b = a and we show a + b = b
Consider b = b + (b.a) I Absorption law
= b + (a. b) Commutative law
=b+a I Given
=a+b Commutative law
Hence (i) and (ii) are equivalent
(i) => (iii) Let a + b = b and we show a' + b = 1
Consider a' + b = a' + (a + b) I Given
= (a' + a) + b Associative law
384 DISCRETE STRUCTURES
1 0. 1 7. PRINCIPLE OF DUALITY
The dual of any expression E is obtained by interchanging the operations + and * and
also interchanging the corresponding identity elements 0 and 1, in original expression E.
1. Show that {M; v. A. -} is a Boolean algebra where M = P(A). the power set of A and A = {a, b, c}.
2. Express each Boolean expression E (x, y, z) as a sum of products and then its complete sum of
products form
(a) E = x(>y' + x'y + y'z) (b) E = z(x' + y) + y'
3. Express E (x, y, z) :::: (x' + y)' + x'y in its complete sum of products form.
4. State the dual of
(a) a v (b A a) = a
( )
(c) a A b A b = a v b
1 1 0
1 0 1
0 1 1
0 0 0
7. Let [B; +, ., 1 be a Boolean algebra and let f(x, y, z) be a Boolean function of the variables x, y and
z.By using the following table, find the Boolean expression f(x, y, z).
x y z f(x, y, z)
1 1 1 1
1 1 0 0
1 0 1 0
0 1 1 1
1 0 0 0
0 1 0 1
0 0 1 0
0 0 0 0
8. Suppose B is a Boolean algebra with at least 100 elements. How many elements can B have ?
9. Using Boolean algebra, show that abc + abc + ab c + ab c = ab + be + ca.
(P. T. U. B. Tech. May 2008)
10. Consider the lattices Dm of divisors of m (where m > 1).
(a) Show that Dm is a Boolean algebra if and only if m is square-free, that is, if m is a product of
distinct primes. (P.T. U. B. Tech. Dec. 2013)
(b) If Dm is a Boolean algebra, show that the atoms are the distinct prime divisors of m.
386 DISCRETE STRUCTURES
11. Consider the following lattices: D20 ; D55 ; (c) Dgg ; (d) D13o. Which of them are Boolean
(a) (b)
algebras, and what are their atoms ?
12. Consider the Boolean algebra Dno. List its elements and draw its diagram. Find all its
(a) (b)
subalgebras. (c) Find the number of sublattices with four elements. (d) Find the set A of atoms of
Dno. (e) Give the isomorphic mapping f : Duo P(A) as defined in representation theorem.
-----t
110 1 2 5 11 10 22 55 110
10----- 212 �55
�>< 5 ><111 l� {2}l {5}l {11l } {2,l5} {2,l11} {5,l11} Al
_______ 1I ____
(a) D 10 (b) F : D, 1O --> PtA)
Hints
L We know that a lattice which contains a least element, a greatest element and which is both
complemented and distributive is called Boolean Algebra.
Here the least element is �, the greatest element is A. The complements of each element of B is
given below :
B Complement of B
� A
{aj {b, cj
{bj {c, aj
{cj {a, bj
{a, bj {cj
{b, cj {aj
{c, aj {bj
A �
Also {M, v, A, -} is a distributive lattice.
2. (a) Given E = x(xy' + x'y + y'z)
Express E as a sum of products forms, we get
E :::: xxy' + xx'y + xy'z :::: xy' + xy'z is the required sum of products forms.
Further E = xy' (z + z') + :q'z I xx' :::: 0
:::: xy'z + xy'z + xy'z
:::: xy'z + xy'z,
is the required complete sum of products form. l a + a :::: a
(b) Given E = z(x' + y) + y'
:::: x'z + zy + y', is the required sum of products form
Further, E = x'z (y + y') + (x + x')zy + (x + x') y' (z + z')
:::: x'zy + x'zy' + xzy + x'zy + y' (xz + xz' + x'z + x'z)
= � + � + = + � + ¢ + � + �� + ��
:::: x'yz + x'y'z + xyz + xy'z + xy'z' + x'y'z.
3. E :::: (x' + y)' + x'y :::: xy' + x'y, is the sum of products form I De Morgan's law
Further,
E = :q'(z + z') + x'y (z + z')
:::: xy'z + xy'z' + x'yz + x'yz', is the required complete sum-of-products form of E.
388 DISCRETE STRUCTURES
1 0. 1 9. LITERAL
A literal is a variable or complemented variable like x, x', y, y' etc in the Boolean expres-
SlOn.
Let [(Xl ) X2 ) ... ) X) be a Boolean expression. Then) [is said to be in sum-oi-products form
or minterm form if [ is a fundamental product or sum of two or more fundamental products)
none of which is contained in another.
If P, and P2 are fundamental products. Then, P , is said to be contained in P2 if the
literals of P I are also literals of P2 • For example) x'z is contained in x'yz since x' and z are
literals in x'yz. However) x'z is not contained in xy'z) since x' is not a literal in xy'z.
Products
2. A Boolean expressionf(xl, x2 ' , x,), in n variables can have a maximum of 2n such products.
•••
ILLUSTRATIVE EXAMPLES I
Example 1. Reduce the following Boolean products to either 0 or a fundamental product
(i) xyx' z and xyzy (ii) xyz'Xyx and xyz'Xy "z<
Sol. (i) xyx'z = xx'yz I Commutative law
=0 xx' = 0 (Complement laws)
Also, xyzy = xzyy I Commutative law
= xzy I Idempotent law
BOOLEAN ALGEBRA 389
(ii) xyz'xyx = xxxyyzl Commutative law
= xyzl I
Idempotent law
xyz'xy'z' = xxyy'zlzl Commutative law
= xyy'z' I Idempotent law
= o. I yy' = 0 (Complement law)
Example 2. Let {E, +, ., ] is a Boolean algebra. Show that
(i) a.b + a.b' + a'.b + acb'= 1 (ii) (a + b).acb'= 0
(iii) (a + b)' + (a + b ) ' = a' (iv) a.b + ((a + b').b)' = 1.
Sol. (i) a.b + a.b' + a'.b + a' . b'
= a.(b + bi + a'.(b + bi I Distributive law
= a.I + a'.1 Complement law
= a + a' I Identity law
=1 Complement law
(ii) (a + b).a'.b' = (a + b).(a + by I De Morgan's law
=0 Complement law
(iii) (a + by + (a + bi'
= a'.b' + a'.bl! De Morgan's law
= a'.(b' + b'i I Distributive law
= a'.(b' + b) I Involution law
= a'.I. Complement law
= a'. I Identity law
(iv) Please Try Yourself.
Example 3. Prove that a Boolean algebra cannot have three elements.
Sol. Let, if possible, {B, +, . , '} has three elements, say,
0, 1 and a (other than 0 and 1)
We claim a' t:- 0 and a' t:- 1
a' = 0 ::::::} a" = 0' = 1 ::::::} a = 1)
which is a contradiction. Hence a' -::f:- 0 I Involution law
Similarly) if a' = 1 ::::::} a" = I' ::::::} a = 0)
which is also a contradiction. Hence a' t:- 1. Therefore, we must have a' = a
Now a.a' = 0 Complement law
a.a = 0 I a' = a
a=O Idempotent law
a contradiction as a t:- O.
Hence, there cannot be a Boolean algebra containing three elements.
Example 4. Consider the Boolean expressions
f1 = xz' + y z + xyz'
f2 = xz' + xyz' + xyz
Reduce these expressions into sum-oi-products form
Sol. f1 = XZ' + y'z + xyz'
is not in a sum-of-products form since xz' is contained in xyz'
f1 = xz' + y'z + xyz'
390 DISCRETE STRUCTURES
= xz' + xyzl + y'z
= xz' + y'z I Absorption law
which is a sum-oi-products form
Also f2 = xz' + x'yzl + xy'z is already in sum-of-products form.
Example 5. Consider a Boolean expression
fla, b, c) = ((ab)' c)' ((a' + c) (b' + c'))' into a sum-oi-products form
(P.T.V. B.Tech. Dec. 20 1 3)
Sol. f,(a, b, c) = «ab)' c)' «a' + c) (b' + c')'
= «ab)" + c') «a' + c)' + (b' + c')') De Morgan's law
= (ab + c') «a' + c)' + (b' + c')') I Involution law
= (ab + c') (aile' + bile") De Morgan's law
= (ab + c') (ac' + be) I Involution law
= abac' + abbe + c'ac' + c'bc
= aabc' + abbe + ac'c' + be'c Commutative law
= abc' + abc + ac' + 0 By idempotent law aa = a
= abc' + abc+ ac' By complement law, e'c = 0
= abc' + ac' + abc
= ac' + abc I Absorption law
Example 6. Consider a Boolean expression f (x, y, z) = x(y'zY Reduce it to complete sum
oi-products form.
Sol. f(x, y, z) = x(y'z)'
= x(y" + z') De Morgan's law
= x(y + z') I Involution law
= xy + xz', which is in sum-of-products form
= xy(z + z') + x(y + y')z' By complement law, a + a' = 1
= xyz + xyzl + xyzl + xy'z'
= xyz + xyz' + xy'z' I a + a = a (Idempotent law)
which is in complete-sum-of-products form.
Example 7. Consider the Boolean expression
(i) flx, y, z) = z(x' + y) + y' (ii) fix, y, z) = (x' + y)' + xy
(iii) fix, y, z) = x(xy' + xy + y'z) (iv) fix, y, z) = (x + y)' (xy Y
Reduce to sum-oi-products form and hence to complete sum-oi-product forms.
Sol. (i) f,(x, y, z) = z(x' + y) + y'
= (x' + y) z + y' I Commutative law
= x'z + yz + y', which is sum-of-products form
= x'z(y + y)' + (x + x') yz + (x + x')y'(z+ z')
I By complement law, a + a' = 1
= x'zy + x'zy' + xyz + x'yz + (xy' + x'y') (z + z')
= x'yz + x'y'z + xyz + x'yz + xy'z + zy'z' + x'y'z + x'y'z'
I Commutative law
= x'yz + x'y'z + xyz + xy'z + xy'z' + x'y'z',
which is in complete sum-of products form.
BOOLEAN ALGEBRA 391
(ii) f2(x, y, z) = (x' + y)' + x'y
= x"y' + x'y De Morgan's law
= xy' + x'y, I Involution law
which is a sum-of-products form.
= xy' (z + z') + x'y(z + z') By complement law, a + a' = 1
= xy'z + xy'z' + x'yz + x'yzl
which is in complete-sum-of-products form.
(iii) f,(x, y, z) = x (xy' + x'y + y'z)
= xxy' + xxy + xy'z
= xy' + O + xy'z I Complement law and Idempotent law
= xy' + xy'z, which is in sum-of products form.
= xy'(z + z') + xy'z
= xy'z + xy'z' + xy'z
= xy'z + xy'z', a + a = a (Idempotent law)
which is in complete sum-of-products form.
(iv) Please try yourself Ans. x'y'z + x'y'z'.
Example 8. Let E = xy' + xyz' + x'yz', prove the following :
(i) xz' + E = E
(ii) x + E '" E (iii) z' + E ", E.
Sol. We know that A + E = E, A '" 0, iff the summands in the Complete sum-ai-products
form for A are among the summands in the complete sum-ai-products form for E.
Now E = xy' + xyzl + x'Y2, reduce it to Complete-sum-of-products form, we have
E = xy'(z + z') + xyz' + x'yz'
= xy'z + xy'z' + xyz + X'yzl
(i) Express xz' in complete-sum-of-products form.
xz' = x(y + y') z' = xyzl + xy'z'
Since the summands of xz' are among those of E, therefore xz + E = E
(ii) Express x in the complete-sum-oi-products form, we have
x = x(y + y')(z + z') = x(yz + yz' + y'z + y'z') I y + y' = 1 = z + z' (Complement law)
= xyz + xyzl + xy'z + xy'z', which is in complete-sum-oi-products form
Now the summand xyz of x is not a summand of E. Therefore) x + E t:- E
(iii) Express z' in Complete sum-oi-products form) we have
z' = (x + x') (y + y') z' I x + x' = 1 = y + y' (Complement law)
= (xy + xy' + x'y + xY)z'
= xyz' + xy'z' + :;:'yz' + :;:'y'z')
which is in Complete, sum-ai-products form.
But the summand :;:'y'z' of z' is not a summand of E. Therefore) z' + E t:- E.
1 0.23. MINTERM
Let {B) +) . /} is a Boolean algebra. Let xp x2) ... ) xn are n variables. A product of the form
Yl. Y2 .... ) Yn) where Yi = Xi or x/) i = 1) 2) ... ) n) is called a minterm in n variables Xl) x2) ... ) xn'
n
Total number of minterms in a Boolean function of n variables = 2 . For example)
392 DISCRETE STRUCTURES
(i) Minterms in variables x) y are x.y) x.y') x'.y) r.y' (4 terms)
(ii) Minterms in variables x) y) z are x.y.z, x.y.z', x.y'.z, x.y.z, x.y'.z', x.y'.z', x.y'.z, x.y'.z'
(8 terms)
The following theorem (without proof) gives a method of expressing a Boolean function
in terms of the minterms in the corresponding variables.
1 1 0
1 0 1
0 1 0
0 0 1
1 1 1 1
1 1 0 0
1 0 1 1
0 1 1 0
1 0 0 0
0 1 0 0
0 0 1 1
0 0 0 1
BOOLEAN ALGEBRA 393
Sol. From the truth table,
[(1 , 1 , 1) = 1 , [(1, 1 , 0) = 0, [(1 , 0, 1) = 1 , [(0, 1 , 1) = 0
[(1 , 0, 0) = 0, [(0, 1 , 0) = 0, [(0, 0, 1) = 1 , [(0, 0, 0) = 1 .
By Hoole's expansion theorem, we have
[(x, y, z) = [(1 , 1, l).x.y.z + [(1 , 1 , O).x.y.z' + [(1 , 0, l).x.y'.z + [(0, 1 , l).xy.z
+ [(1 , 0, O).x.y'.z' + [(0, 1 , O).x.y.z' + [(0, 0, l).x'.y'.z
+ [(0, 0, O).xy'z'
= l .x.y.z + O.x.y.z' + l .x.y'.z + O.x'.y.z + O.x.y'.z' + O.x'.y.z'
+ 1.x'.y'.z + 1 .x'.y'.z'
= x.y.z 0 + x.y'.z + 0 + 0 + 0 + x.y'.z + x.y'.z'
+
f(x, y, z) = x.y.z + x.y'.z + x'.y'.z + x'.y'.z'
= (x.z.y + x.z.y') + (x.y'.z + x.y'.z')
= x.z.(y + y') + x.y'.(z + z')
= x.z.l + x.y'.l = X.z + x.y'. I Complement law
x y z f(x, y, z) X A (y V z)
0 0 0 0 =
oA V (0 0)
0 0 1 0 =
(0
o A v 1)
0 1 0 0 =
o A (1 v 0)
0 1 1 0 =
o A (1 v 1)
1 0 0 0 =
1A (0 0)
V
1 0 1 1 =
1A (0 v 1)
1 1 0 1 =
1 A (1 v 0)
=
1 1 1 1 1 A (l v 1)
BOOLEAN ALGEBRA 395
Thus, the DNF of the function is
f(x, y, z) = (x /\ Y /\ z) V (x /\ y' /\ z) V (x /\ Y /\ Z').
I ILLUSTRATIVE EXAMPLES I
Example 1. Is P = xz� a prime implicant of E = xy' + xyzl + x'yz'?
Sol. We have proved in example 8 above,
xz + E = E, but x + E '" E, z' + E '" E
.. p = xz' is the prime implicant of E.
Example 2. Find the sum of adjacents products PI and P2 where
(i) PI = xyz� P2 = xy 'z' (ii) PI = x'yzt, P2 = xyz't
(iii) PI = x'yzt, P2 = xyz't (iv) PI = xyz� P2 = xyzt.
Sol. (i) PI + P2 = xyzl + XY'Z' = xz'y + xz'y' I Commutative law
= xz' (y + y')
= xz'.l I Complement law
= xz'
That sum of two adjacent products (squares) P and P2 is a fundamental product with one
1
less literal :
Note.
y y'
x xy
x' x'y xy'
Also) any complete sum-of-products Boolean expression f(x) y) of two variables) can be
represented in Karnaugh map by placing l 's in the corresponding squares. A prime implicant
of f(x, y) will be either a pair of adjacent squares or an isolated square (a square which is not
adjacent to any square of f(x, y» .
Also, the four possible fundamental products with two literals are :
xy, xy', x'y, x'y'.
xy'
xy
Also, the sixteen possible fundamental with four literals are :
xyzt, xyzt', xyz't', xyz't ;
xy'zt, xy'zt', xy'z't', xy'z't ;
:;:'y'zt, x'y'zt', x'y'z't', x'y'z't ;
x'yzt, x'yzt', x'yz't', x'yz't.
BOOLEAN ALGEBRA 397
1 0.34. LOOPING
The expression for the output Boolean expression can be simplified by properly combin·
ing those squares in the K·map which contain l 's. This process for combining these l 's called
looping.
1
The first represents xyz and the second represents xyz . We
note that in these two terms) only x appears both in complemented
xy 0
and uncomplimented form while y and z remain unchanged. '--'
These two terms can be looped (combined) to give a resultant
that eliminates the variable x as it appears both in complemented
xy 0 0
and uncomplimented form. Thus) the corresponding Boolean expres
SlOn IS
Fig. 10.24
f(x, y) = xyz + xyz = (x + xl yz = 1. yz = yz Complement law
Consider another example of a K-map of three variables as shown c c
below (Fig. 10.25) :
Xii 0 0
This map contains a pair of 1s that are horizontally adjacent.
The first represents ABC and the second represents ABC .
These two terms can be looped (combined) to give a resultant
AB (1 1)
that eliminates the variable C as it appears both in complemented
and uncomplimented form. Thus) the corresponding Boolean expres AB 0 0
SlOn IS
f(A, B) = ABC + ABC = AB (C + C ) = AB . 1 = AB AB 0 0
Consider another example of a K-map for three variables as F'19. 10.25
shown below (Fig. 10.26).
z
This map contains Is in the top row and bottom row respec
tively_ These two squares are also considered to be adjacent. These xy o
two 1s can be looped (combined) to give a resultant that eliminates the
variables x as it appears both in complemented and uncomplimented
3'y o o
form. Thus) the corresponding Boolean expression is
f(x, y, z) = x y z + xyz = (x + xl yz = 1. y z = yz
xy o o
Hence, from above discussion, we conclude that
"Looping a pair of adjacent 1s in a K-map eliminates the vari xy o
able that appears in complemented and uncomplimented form".
xy 0 1 xy 0 0 0 0 xy 0 0 0 0
zt zt zt zl zt zt zt zl
xy 1 0 0 0 xy 1 1 0 0
xy 1 1 1 1 xy 1 1 0 0
xy 1 1 1 1 xy 1 1 0 0
xy 0 0 0 0 xy 1 1 0 0
(a) (b)
zt zt zt zl zt zt zt zl
xy ? 0 0 Ii' xy 1 1 1 1)
xy 1 0 0 1 xy 0 0 0 0
xy 1 0 0 1 xy 0 0 0 0
xy 1 0 0 1 xy 1 1 1 1)
J
(c) (Ii)
Fig. 10.28
In Fig. 10.28 (a), only y remains unchanged
.. f(x, y, z, t) = y
400 DISCRETE STRUCTURES
In Fig. 10.28 (b), z remains unchanged
.. f(x, y, Z, t) = z
In Fig. 10.28 (c), t remains unchanged
f(x, y, Z, t) = t
In Fig. 10.28 (d), f(x, y, Z, t) = y .
1 0.38. KARNAUGH MAP METHOD FOR FINDING PRIME IMPLICANTS AND MINIMAL
FORM FOR A BOOLEAN EXPRESSION
First express the given Boolean expression in complete sum of products form.
The following algorithm can be used by which minimized Boolean expression can be
obtained.
1. Identify the ones which cannot be combined with any other ones and encircle them.
2. Identify the ones that can be combined in groups of two in only one way and encircle
them as groups.
3. Identify the ones that can be combined with three other ones, to make a group of four
adjacent ones) in only one way and encircle them as groups.
4. Identify the ones that can be combined with seven other ones, to make a group of
eight adjacent ones) in only way and encircle them as groups.
5. After identifying the essential groups of 2, 4 and 8 ones, if there still remains some
ones which have not been encircled) then these are to be combined with each other or with
other already encircled ones i.e., we should combine the left over ones in largest possible
groups and in as few groupings as possible.
Example 3. Use Karnaugh maps to find the prime implicants and minimal form of the
following Boolean expression
(i) flx, y) = xy + xy' (ii) !lx, y) = xy + xy + xy'
(iii) !lx, y) = xy + xy'. y y'
form.
Sol. (i) We first express f,(x, y) into complete sum·of·product
(1
x 1
Here f,(x, y) = xy + xy', which is already in complete sum·of·
products form. o o
The K·map for the two variables is shown below (Fig. 10.29)
Put 1s in the cells corresponding to the terms xy and xy' and 0 Fig. 10.29
elsewhere.
The two squares containing Is are .xy and xy'. From these terms) we note that the variable
x remains unchanged (as y appears in complemented and uncomplimented form). Hence) the
prime implicant of f,(x, y) is x. Hence
f/x) y) = x) is its minimal sum
(ii) f,(x, y) = xy + xy + xy', which is already in complete sum· y y'
'1'
of·products form.
x 0
The K·map for the two variables is shown below (Fig. 10.30).
l(i y
Put 1s in the cells corresponding to the terms xy, xy and as ,
x
else where. This map contains two pairs of adjacent squares.
(designated by the two loops). The vertices pair represents y and the
horizontal pair represents x. Hence y and x are the prime implicants.
Fig. 10.30
BOOLEAN ALGEBRA 401
Therefore)
fz<x, y) = y + X, is its minimal sum.
(iii) f3(x, y) = xy + xy' y y'
Put Is in the cells corresponding to the terms containing xy
and x'y' and 0 elsewhere. This map consists of two isolated squares
x
CD 0
which represent xy and xy' (Fig. 10.31). Hence xy and xy' are prime
implicants. Therefore
x
.
0 CD
f,(x, y) = xy + xy' is its minimal sum. Fig. 10.31
1 0.39. BASIC RECTANGLE FOR THREE VARIABLE K-MAP
A basic rectangle in a Karnaugh map of three variables is a square or two adjacent
squares or four squares which form a one-by-four or two-by-two rectangle. These basic rect
angles corresponds to fundamental products of three) two and one literal respectively. Hence,
the fundamental product represented by a basic rectangle is the product of just those literals
that appear in every square-of the rectangle.
Example 4. Find the fundamental product represented by each basic rectangle in the
following (Fig. 10. 32) Karnaugh maps
yz yz' y'z' y 'z yz yz' yz' y 'z
x 0 0 0 0 x 1 0 0 1
x' 0 1 1 0 x' 0 0 0 0
(a) (b)
yz yz' Y 2' y'z
x 1 0 0 1
x 1 0 0 1
(c)
Fig. 10.32
Sol. (a) The two 1s in Fig. 10. 32 (a) can be looped (combined) as shown in Fig. 10.33.
yz yz' Y2' y'z
x 0 0 0 0
x
'
0 Cl 0 0
Fig. 10.33
This map contains a pairs of 1s that are horizontally adjacent. The first represents xyz'
and the second represents x'y'z'. In these two forms, the variable y appears in complemented
and uncomplimented form) where x'z' remains unchanged. That is to say) x'z appear in all the
squares of the basic rectangle. Therefore, by definition, the fundamental product is P = xz'.
402 DISCRETE STRUCTURES
(b) The two Is in the given Fig. 10.32 (b) can be com yz yz' y'z' y'z
bined or looped as shown in Fig. 10.34.
This map contains a pair of Is in the left row and
right row. These two squares are also considered to be
adjacent.
The first square represents xyz and the second rep
Fig. 10.34
resents xy'z. In these two terms) y appears in complemented and uncomplimented form, while
xz remains unchanged. That is to say, xz appears in all the squares of the basic rectangle.
Therefore, by definition, the fundamental product P is given by
P = xz
(c) The four Is in given Fig. 10.32 (c) can be looped or yz yz y'z' y'z
combined as shown in Fig. 10.35.
The four Is in this map are considered to be adjacent
since the leftmost and rightmost columns are considered to
be adjacent. The fours squares that contain Is are
xyz, x'yz, xy'z, x'y'z. In these terms, we note that x Fig. 10.35
and y appears in complemented and uncomplement form whereas z remains unchanged. That
is to say, z appears in all the squares. Therefore, by definition, the fundamental product P is
given by
P=z
Example 5. Use Karnaugh map to find the prime implicants and minimal form for
each of the following complete-sum-of-products form
(i) flx, y, z) = xyz + xyz' + xyz' + xyz
(ii) fix, y, z) = xyz + xyz' + xy'z + xyz + x'y'z
(iii) fix, y, z) = xyz + xyz' + xyz' + xy'z'+ xy'z.
Sol. (i) Given Boolean expression, in complete-sum-of-products form is
f,(x, y, z) = xyz + xyz' + xyz' + xy'z ... (1) 1 yz yz' y'z' y'z
The K-map for three variables is shown in Fig. 10.36 x (1 1
1
given below :
Put Is in the cells corresponding to the terms xyz, x'
CD
xyz', x'yz', x'y'z and Os elsewhere.
All the four Is can be looped (combined) as shown @
in the figure.
Fig. 10.36
Corresponding to loop (1), the variable :ry appears
in both the squares since z appears in complemented and uncomplimented form. Therefore, .xy
is prime implicant of f,(x, y, z). Corresponding to loop (2), the term yz' appears in both the
squares since x appears in complemented and uncomplemented form. Therefore, yz' is prime
implicant of f,'(x, y, z).
Corresponding to loop (3), the prime implicant is xy'z. Hence, the required minimal
form is
f,(x, y, z) = xy + yz' + xy'z
(ii) Given Boolean expression in complete-sum-of-products form is
f (x, y, z) = xyz + xyz' + xy'z + xyz + xy'z
, ... (1)
The K-map for the three variables is shown in Fig. 10.37.
BOOLEAN ALGEBRA 403
Put 1s in the cells corresponding to the terms in (1)
and Os elsewhere. All the five 1s can be looped (combined)
as shown in the figure. The four 1s in the leftmost columns
and right most columns are considered to be adjacent.
Corresponding to loop (1), the variables x and y appear in x'
complemented and uncomplimented form while z remains
uncharged. That is to say, z appears in all the square.
Hence, the prime implicant of f,(x, y, z) is z. Fig. 10.37
Corresponding to loop (2), the variable z appears in complemented and uncomplemented
form and xy appears in both the squares. Therefore, the prime implicant of f,(x, y, z) is xy.
Therefore, required Boolean expression in minimal form is
f,(x, y, z) = z + xy
(iii) Given Boolean expression in complete-sum-of-products form is
f,(x, y, z) = xyz + xyz' + xyz' + xy'z' + xy'z
Proceed yourself as in part (i) and (ii), the minimal form is
f,(x, y, z) = xy + yz' + xy' (Corresponding to K-map of Fig. 10.38)
= xy + x'z' + x'y' (Corresponding to K-map of Fig. 10.39)
Fig. 10.38
:' I c: I (� I (:) I �) I
Fig. 10.39
Example 6. Find the fundamental product represented by each basic rectangle in the
K-maps shown below (Fig. 10.40)
zt zt' zIt' zIt zt zt' zIt' zIt zt zt' z't' z't
xy 0 0 0 0 xy 1 1 0 0 xy 1 0 0 1
xy' 0 0 1 1 xy' 0 0 0 0 xy' 1 0 0 1
x!y' 0 0 0 0 x'y' 0 0 0 0 x!y' 1 0 0 1
x!y 0 0 0 0 x!y 1 1 0 0 x'y 1 0 0 1
(a) (b) (c)
Fig. 10.40
Sol. (a) In Fig. 10.40 (a), the two 1s can be looped (or combined) as shown in Fig. 10.41
given in next page.
The variable t appears in complemented and uncomplemented form, while x, y', z appears
in both the squares. Hence,
404 DISCRETE STRUCTURES
The fundamental product P = xy'z'
zt zt' zIt' z't zt zt' z't' zIt
xy 0 0 0 0 xy
�lJ) 0 0
xy' 0 0 (1 1) xy' 0 0 0 0
x'y' 0 0 0 0 x!y' 0 0 0 0
x!y 0 0 0 0 x'y
(i� 0 0
"i\ r
uct P is given by
xy 0 0
P = yz
(c) In Fig. 10.39 (c), all the Is can be looped (combined) xy' 1 0 0 1
as shown in Fig. 10.43 given below :
The left most column and right most column are con x!y' 1 0 0 1
sidered to be adjacent. In these squares, the variables x, y, z
appear in complemented and uncomplemented form where
x!y
as the variable t appears in all the eight squares. Hence, the J/ 0 0
�
fundamental product P is given by P = t.
Fig. 10.43
Example 7. Find the minimal sum for the Boolean expressions f1 and f2 whose K-maps
are given below Fig. 10.44.
zt zt' zIt' z't zt zt' z't' zIt
xy 0 1 0 0 xy 1 0 0 1
xy' 1 1 1 1 xy' 0 1 0 0
x'y' 1 1 1 1 x'y' 1 1 1 1
x!y 0 0 0 0 x'y 1 0 0 1
Fig. 10.44
Sol. (a) All the Is can be looped (combined) as shown in Fig. 10.44 given in next page.
Corresponding to loop (1), the variables x, z, t appear in complemented and uncomplement
form whereas the variable y' appears in all the eight squares. Therefore, y' Is is the prime
implicant of f, (x, y, z, t).
BOOLEAN ALGEBRA 405
Corresponding to loop (2), the variable y appears in complemented and uncomplemented
form whereas the variables x, z, t' remains unchanged. By definition) the prime implicant is
the fundamental product of x, z, t' which is P = xzt'
The minimal form of f, (x, y, z) = y' + xzt'
zt zt' z't' z't 2 zt zt' z't' z't
-
xy 0 '1 0 0 xy
xy' /1 1 1 1 xy'
�
'-'
x'y' \,,1 1 1 V
x'y'
x'y 0 0 0 0 x'y
y y'
x
CD 0
x' 0
CD
Fig. 10.48
Enter Is in the cells corresponding to the terms xy and x'y' and Os elsewhere. The prime
implicants are xy and x'y'. The required minimal sum is f(x, y) = :ry + x'y'.
Example 10. Construct a K-map for the Boolean function whose truth table is given
below. Express the Boolean function, so obtained in its minimal sum.
BOOLEAN ALGEBRA 407
x y z f(x, y, z)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
x'y'z.
These squares contain the terms xyz) x'yz) xy'z and
The variables x and y appear in complemented and
Fig. 10.49
uncomplemented form whereas z remains unchanged.
Therefore) the prime implicant is z. Hence) the required minimal sum is
[(x, y, z) = z.
EXERCISE 1 0_5
L Let R be a basic rectangle in a Karnaugh map for four variables x, y, Z, t. Write the number of
literals in the fundamental product P corresponding to R interms of the number of squares in R.
2. Find the fundamental product P represented by each basic rectangle R in the Karnaugh map in
the figure given below :
,f ,f
zt zt' z't' z't zt zt' z't' z't zt zt' z't' z't
,f -/.
, ,f\ Ik xy
x'y ,f l' x'y
' -!/ 1'< x'y
x'y x'
y xy ,f ,f ,f ,f
(a) (b) (e)
408 DISCRETE STRUCTURES
3. Let E denotes the Boolean expression given in the Karnaugh map as shown below :
(a) Write E as a complete sum of products form.
(b) Find the minimal form of E.
zt zt' z't' z't
I\{; v'
' /j1;'\
x'y
x'y
'\( ,;;; 1/v'\
4. Consider the Boolean expressions El and E2 in variables x, y, z and t which are given by Karnaugh
maps in the following figure. Find the minimal forms of El and E2.
zt zt' z't' z't zt zt' z't' z't
xy
? v I�
, /./ ,/. v' IvI'\ xy' v' v'
x'y, \..v' v' v' v' x'y v' v' v' v'
,/
x'y x'y 7' IV
(a) E, (b) E2
5. Consider the Boolean expressions El and E2 in variables x, y, Z, t which are given by the Karnaugh
maps in the Figure. Find a minimal sum for (a) El (b) E2. ;
E, E2
(a) (b)
6. Use a Karnaugh map to find a minimal sum for :
(a) El :::: x'yz + x'yz't + y'zt' + xyzt'. (P.T. U. B.Tech. Dec. 2013)
(b) E2 :::: y't' + y'z't + x'y' zt + yzt'.
BOOLEAN ALGEBRA 409
zt zt' z't' z't zt zt' z't' z't
xy
7 7
'./ ,;)
xy v' v' 1/
x'y v' x'y'
GI v' v' v'
x'y v' v' Ir v'
I�v'
x'y
E, E2
(a) (b)
Find all possible minimal sums for each Boolean expression E given by the Karnaugh maps in
the Fig.
7.
x [2[IJZJ
yz yz' y'z' y'z yz yz' y'z' y'z yz yz' y'z' y'z
x
ITE0 x
ITE0
x'
EEIIJ x'
� x'
EEEEJ
(a) (b) (0)
8. Find all possible minimal sums for each Boolean expression E given by the Karnaugh maps in
the Fig.
zt zt' z't' z't zt zt' z't' z't zt zt' z't' z't
v' v' v' v' v' v' v'
xy v' v' v' v' v' v' v' v'
x'y v' v' x'y v' x'y v'
x'y v' v' v' v' x'y v' v' v' x'y v' v' v' v'
(a) (b) (0)
9. Use a Karnaugh map to find a minimal sum for each Boolean expression :
(a) E :::: xy + x'y + x'y'. (b) E :::: x + x' yz + xy 'z'.
Find a minimal sum for each Boolean expression :
(a) E :::: y 'z + y 'z't' + z't. (b) E :::: y'zt + xzt' + xy 'z'.
10.
11. Use Karnaugh maps to redesign each logic circuit L in the Fig. so that it becomes a minimal
AND-OR circuit.
A
AND B AND
C
AND AND
AND AND
(a) (b)
Fig. 10.50
410 DISCRETE STRUCTURES
Answers
1.
R P
8 (squares) 1 (literal)
4 (squares) 2 (literals)
2 (squares) 3 (literals)
1 (square) 4 (literals)
2.(a) P = x'yt' (b) P = y't (c) P = y.
3. (a) E :::: x'y'zt + x' y'zt' + x'yz't' (complete sum of product from)
(b) = y'z + xyz' + yz't
E (minimal form)
4. (a) Ej = y' + xzt' (b) E2 = yt + x'y' + y'zt'
5. (a) El :::: xzt' + xy'z' + x'y'z + x'z't'
(b) :::: x'y + yt + xy't' + xy't' + y'zt':::: x'y + yt + xy't' + x'z't.
E2
6. (a) El :::: zt' + xy't' + x'yt (b) E :::: zt' + xy't' + x'y't.
7. (a) E = xy' + :<y + yz = + x'y + xz'.
>y
'
(b) E = xy' + x'y + z. (c) E = x' + z.
8. (a) E :::: x'y + zt' + xzt + xy'z :::: x'y + zt' + xz't + xy't.
(b) = yz + yt' + zt' + xy'z' .
E
(c) E :::: x'y + yt + xy't' + x'zt :::: x'y + yt + xy't' + y'zt.
9. (a) E = x' + y; (b) E = xz' + yz.
10. (a) E = y' + z't; (b) E = xy' + zt' + y'zt.
11.
A -.__---r-' A -----r-'
B ----j-l><>L� B ---,>----L�
AND AND
C ----i::»i._..-/ C --po-t._..-/
AND AND
(a) (b)
Fig. 10.51
1 0.40. APPLICATIONS OF BOOLEAN ALGEBRA TO SWITCHING CIRCUITS
Switching circuit. It is an arrangement of wires and switches connected together to
the terminal of the battery. A Switch is a two state device used for allowing current to pass
through it or not to pass through it.
If current is allowed to pass through a switch, then it is said to be 'closed' or 'ON'. If
the current is not allowed to pass through a switch, them it is said to be 'Open' or 'OFF'. The
switches are denoted by the letters x, y, z or a, b, c.
Methods of connecting Two switches. There are basically two methods of connect·
ing two switches :
(i) Connecting switches in parallel
(ii) Connecting switches in series.
BOOLEAN ALGEBRA 41 1
If x and y are two switches connected in parallel, then we say, the bulb is 'ON' iff atleast
x
one of the switches x and y are closed. (Fig. 10.52)
r o-,--, y
Fig. 10.52 Fig. 10.53
If x and y are two switches connected in series) then we say) the bulb is 'ON' iff x and y
are both closed. (Fig. 10.53)
Further, if a switch is 'ON' , then its value is denoted by '1 ' and if a switch is 'OFF' . Then
its value is denoted by '0' .
x y x.y
.y
0 0 0
1 0 0
--_I X I •
•--- 0 1 1
Switches connected in series 1 1 1
If x and y are two switches such that y is closed when x is open and y is open when x is
closed, then y is written as x.
412 DISCRETE STRUCTURES
ILLUSTRATIVE EXAMPLES
Example 1. Consider the circuit as shown below. Express the circuit as a Boolean func
tion of the Boolean algebra of switching circuit (Fig. 10. 54).
ri X z i i X I
Y
i X'
1 '-----o � Y ...... z'..s-L-. Y'
......
Fig. 10.54
Sol. From the given circuit, the first portion represents x.y + z
The second portion represents x+ y.z'
The third portion represents x + y'.
All these three portion are connected in series.
The Boolean function of the given circuit is
f(x, y, z) = (xy + z) (x + yz') (x + y').
Example 2. Consider the Boolean function f(x, y, z) = (x.y.z') + x'.(y + z'). Construct a
circuit representing f(x, y, z) as a Boolean algebra of switching circuits.
Sol. Given Boolean function is
f(x, y, z) = x.y.z' + x.(y + z') ... (1)
From (1), the circuits corresponding to
x.y.z' and x.(y + z') are connected in parallel.
The term x.y.z' implies that the switches
x, y and z' are connected in series.
The terms x.(y + z') implies that the
switch x' and the circuit corresponding to y + z'
Fig. 10.55
are connected in series. The required circuit is
shown in Fig. 10.55.
Example 3. Consider the Boolean function
f(x, y, z) = (x.y. + z).(x' + y.z).(x' + z) (P.T.V. May 2012)
Construct the circuit corresponding to the Boolean function of the Boolean algebra of
switching circuits.
Sol. Given Boolean function is
re
f(x, y, z) = (x.y + z).(x + y.z').(x + z) ... (1)
i X'1 i X'
From (1), we observe that the
circuits corresponding to x.y + z ; x'
Y
+ y.z' and x' + z are connected in
...... i
z � y """' zl..s_L_. z
series. The term, x.y + z implies that
+
the circuit corresponding to x.y and
the switch z are connected in par
allel. The term, x + y.z' implies that
the switch x' and the circuit corre
sponding to y.z' are connected in Fig. 10.56
parallel.
BOOLEAN ALGEBRA 413
+
The term) x' z implies that the switches x' and z are connected in parallel. Hence, the
circuit of the given Boollean function is shown in Fig. 10.56.
Example 4. Simplify the circuit as shown below. (Fig. 10. 57)
Sol. Let f(x, y) denotes the Boolean function of the
1 Lx
� : = ::----+----0
given circuit in the Boolean algebra of switching circuits, .
then
f(x, y) = x.y' + x.y' + x.y ... (1) ...... y
We simplify (1). We have .
f(x, y) = x.y' + x.y' + x.y
= (x + x).y' + x.y
= 1.y' + x.y I Complement law Fig. 10.57
= y' + x.y
= (y' + X).(y' + y) I Disributive law
= (y' + X).1 Complement law
= y' + x
= x + y' ... (2)
Commutative law
From (2), we can say that the given circuit is equivalent
to the circuit in which the switches x' and y' are connected in Fig. 10.58
parallel. (Fig. 10.58)
Example 5. Simplify the circuits given below Fig. 10.59 by obtaining the Boolean ex
pressions. Also construct the switching circuit for the simplified Boolean expression.
X J-[ X
Y z
�. a •
•--
....b. �
l""b' •
-<l •
. -
--
.....
..... c·
..../c o--+----,
(b)
+ a •
•---<l ....b. · •
•
-- .....c·...
(c)
Fig. 10.59
Sol. (a) Let f(x, y) denotes the Boolean function of the given circuit in the Boolean
algebra of switching circuits.
414 DISCRETE STRUCTURES
First portion of the circuit represents x + y'
Second portion of the circuit represents x' + Y
Third portion of the circuit represents x' + y'
All these three portions are connected in series. Therefore, the Boolean function is
f(x, y) = (x + yj.(x' + y).(x' + yj ... (1)
Now to simplify (1),we have
f(x, y) = (x + yj.(x' + y).(x' + yj
= (x + yj.(x' + y.yj I Distributive law
= (x + yj.(x' + 0) I Complement law
= (x + yj.x'
= x.x' + y'.x'
0
= + y'.x' I Complement law
= x'.y' ... (2) I Commutative law
Hence from (2), we conclude that the given circuit is equiva
lent to the circuit in which the switches x' andy' are connected in
series. The circuit diagram for (2) is given in Fig. 10.60. Fig. 10.60
(b) Let f(x, y, z) denotes the Boolean expression of the given circuit in the Boolean alge
bra of the switching circuits.
In the top row, the first portion represents that the switch x and the circuit y.z are
connected in parallel and hence the top row represents the circuit
(x + y.z).z ... (2)
In the bottom row of the circuit, First portion represents that the switches x and y are
connected in parallel and the second portion represents that the switches x and z are con
nected in parallel. Both the circuits (x + y) {corresponding to the first portion of the bottom
row} and (x + z) (corresponding to the second portion of the bottom row) are connected in series
and hence the corresponding circuit is
(x + y).(x + z) ... (3)
The circuits represented by (2) and (3) are connected in parallel. Therefore, the Boolean
function is
f(x, y, z) = (x + y.z).z + (x + y).(x + z) ... (4)
Now to simplify (4), we have
f(x, y, z) = (x + y.z).z + (x + y).(x + z)
= X.z + y.z.z + y.z I Distributive law
= X.z + y.z + x + y.z I Idempotent law
= x + x.z + y.z I Idempotent law
= x + y.z ... (5) I Absorption law
From (5), we conclude that the given circuit is equivalent
to the circuit in which the switch x and the circuit y.z
are connected in parallel. The simplified circuit is shown in
Fig. 10.61.
Fig. 10.61
BOOLEAN ALGEBRA 415
(c) Let f(a, b, c) denoted the Boolean function of the given circuit in the Boolean algebra
of the switching circuits. Proceeding yourself as in part (i) and (ii), we have
tea) b) c) = a.b.c' + a.b'.c + a.b'.c' ... (1)
To simplify (1), we have
tea) b) c) = a.b.c' + a.b'.c + a.b'.c'
= a.b.c' + a.b'.(c + ci I Distributive law
= a.b.c' + a.b'.1 Complement law
= a.b.c' + a.b'
= a.(b.c' + bi I Distributive law
= a.(b + bi.(c' + bi
= a.1.(c' + bi
= a.(c' + bi
Complement law �-[::
= a.(b' + ci ... (2)
From (2), we conclude that the given circuit is equivalent
to the circuit as shown in Fig. 10.62. Fig. 10.62
L Express the following circuit (Fig. 10.112) as a Boolean function of the Boolean algebra of switching
circuits.
~......
+
y x'
Fig. 10.65
4. Express the following circuit (Fig. 10.66) as a Boolean function of the Boolean algebra of switching
circuits.
416 DISCRETE STRUCTURES
Fig. 10.66
5. Construct the circuit corresponding to the Boolean function x.(y' + z) + y.z' of the Boolean algebra
of switching circuits.
6. Construct the circuit corresponding to the Boolean function x.y + x'.(x + y + yj of the Boolean
algebra of switching circuits.
7. Construct the circuit corresponding to the Boolean function x.y + x.y' + x'.y of the Boolean algebra
of switching circuits.
8. Construct the circuit corresponding to the Boolean function x.y'.z + (y + z).x' of the Boolean algebra
of switching circuits.
Simplify the circuit (Fig. 10.67) given below :
r-C�Y'J-C· z
9.
x'
_ �z x ...... z'
Fig. 10.67
10. Simplify the circuit (Fig. 10.68) given below :
... z
x .
0---
- - ----
.--<0 y'
Fig. 10.68
11. Simplify the circuit (Fig. 10.69) : 12. Simplify the circuit (Fig. 10.70) given below :
z-------[ :
x }-( y
y z
X --[ Y'
3.
5. Fig. 10.71 6. Fig. 10.72
Ry. .: ,
}-= z o Y'
10. Fig. 10.76
�
r-[ : �
1
Fig. 10.75
cp Fig. 10.76
11. Fig. 10.77
z 12. Fig. 10.78
z
�� ��
Fig. 10.77 Fig. 10.78
13. Fig. 10.78(a)
a b
Fig. 10.78(a)
418 DISCRETE STRUCTURES
---[X J- Y
Switches in parallel
(i) (ii)
If the switches x and y are connected in parallel then the input current will reach the
output point when anyone of the two switches are in the ON (1) state. There will be no output
when both the switches x and y are in the off (0) state. The OR gate for two input signals x and
y is shown in Fig. (ii).
Also the truth table for OR gate is shown below. An output of signal is 1 when any of the
input signals is 1 and output is zero when both the inputs are zero.
Truth table for an OR gate
Input Output
x y x+y
0 0 0
1 0 1
0 1 1
1 1 1
An OR gate may have more than two inputs. The figure given below shows an OR gate
having three inputs. The truth table for OR gate with three inputs x, y, z is shown below :
Truth table for an OR gate
Inputs Output
x y z x +y +z
0 0 0 0
0 0 1 1
0 1 0 1
1 0 0 1
0 1 1 1
1 0 1 1
1 1 0 1
1 1 1 1
BOOLEAN ALGEBRA 419
AND gate. An AND gate is an electronic circuit that generates the output signal of 1 if
all the input signals are 1. Two or more switches connected in series behave as an AND gate.
0 0 0
1 0 0
0 1 0
1 1 1
An AND gate may have more than two inputs. The truth table for an AND gate with
three inputs is given below. The figure given below shows an AND gate having three inputs.
The AND gate with inputs x, y, z has output 1 only if x, y, z have value 1.
Truth table for an AND gate
Input Output
x y z x.y.z
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 0
0 1 1 0
1 0 1 0
1 1 0 0
1 1 1 1
-----ex...... y ...... z ...-- �===�=A�N�D=)I----X . y . z
420 DISCRETE STRUCTURES
NOT gate. A NOT gate is an electronic circuit that generates an output which is reo
verse of the input signal. A NOT gate is also called an inverter.
x----x--[>---- '
Input Output
x x'
0 1
1 0
We now list the various logic gates in the following Table :
SymbologicallBoolean Function
AND and
::� }-
{(x"x,) {(x" x,) {(x" x,)
:::: X1X2 :::: Xl A X2 :::: Xl · X2
OR or
�=[>-
{(x" x,) {(x" x,) {(x" x,)
x,---[>-
:::: Xl + X2 :::: Xl V X2 = X1+ X2
xx2' =[>-
= (x, -"2) :::: (xl A X2 ) = x1 · :\2
NOR not OR
-- --- --
xx2,+c>-
{(x" x,) {(x" x,) {(x" x,)
+
:::: xl X2 :::: Xl V X2 + .::t2
:::: Xl
Exclusive exclusive {(x" x,) {(x" x,) {(x" x,)
OR or = xl · x2 :::: Xl · X2 :::: Xl · X2
ILLUSTRATIVE EXAMPLES
Example 1. Find the Boolean expression {or the output o{ the given logic circuit
x
(Fig. Also draw the truth table {or the given logic circuit.
10. 79).
--------1 NOT>C>----,
x�
Y
,--
� __
Y ------1 NOT·.:>o-----'
(i) (ii)
BOOLEAN ALGEBRA 421
z ----1
(ii )
Fig. 10.79
X ------1 NOT
Sol. (i) Given circuit is shown below. Let 1
the inputs are x and y.
At point 1, the output is x' OR 3
y-----j NOTDo"'-
At point 2, the output is y'.
2
. . The inputs to the OR gate at point 3 --'
are x: and y'. Hence, at point 3, the output of the
OR gate is x: + y' (Fig. 10.S0).
Also, the truth Fig. 10.80
table for the given logic circuit is shown below :
Truth table
Inputs Output
x y x' y' x' + y'
0 0 1 1 1
1 0 0 1 1
0 1 1 0 1
1 1 0 0 0
(ii) Given circuit is shown below. Let the inputs are x and y.
1,
At point the output is x + y
At point 2, the output is x.y
x
Y
� OR
AND
4
At point 3, the output is (x.y)' 2 3
AND NOT
At point 4, the inputs are x+ y and (x.y)'
(Fig.
..
10.Sl).
The output at point 4 is (x + y).(x.y)' Fig. 10.81
Also, the truth table for the given logic circuit is shown below :
Truth table
Inputs Output
x y x +y x.y (x.y)' (x + y).(x.y)'
0 0 0 0 1 0
1 0 1 0 1 1
0 1 1 0 1 1
1 1 1 1 0 0
(iii) Given circuit is shown below. Let the inputs are x) y) z.
At point 1, the output is x + y
422 DISCRETE STRUCTURES
At point 2, the output is z'
(x + y).z'
At point 3, the output is 4
At point 4 , the output is «x + y).z')' z---i
(Fig. 10.82). Also, the truth table for the given
logic circuit is shown below : Fig. 10.82
Truth table
Inputs Output
x y z x +y z' (x + y).z' ((x + y).z)'
0 0 0 0 1 0 1
1 0 0 1 1 1 0
0 1 0 1 1 1 0
0 0 1 0 0 0 1
1 1 0 1 1 1 0
1 0 1 1 0 0 1
0 1 1 1 0 0 1
1 1 1 1 0 0 1
Example 2. Express the output Y as a Boolean expression in the inputs A, B, C for the
logic circuit shown below. (Fig. 10. 83)
� =a:::;;:r:E��
Fig. 10.83
Sol. At point 1, the output is A' BC
At point 2, the output is AB'C'
At point 3, the output is AB'
+
At point 4, the output is A'BC AB'C' AB'+
+
. . The required Boolean expression is Y = A'BC AB'C' AB'. +
Example 3. Express the output Yas a Boolean expression in the inputs A and B for the
logic circuit shown below : (Fig. 10. 84)
A -_�------1
B --..-+....+-
.. ----i
Fig. 10.84
BOOLEAN ALGEBRA 423
Sol. At point 1, the output is AB' (a small circle is the circuit)
At point 2, the output is (A + BY
At point 3, the output is (A' B')
At point 4, the output is AB' + (A + BY + (A'BY
The required Boolean expression is
Y = AB' + (A + B') + (A' BY = AB' + A'B' + A + B'.
�' �
f(x, y) = x.(x' + y)
Given expression contains comple x NOT x' + x . (x' + y)
ment of the variable x. So we draw NOT OR Y �
gate for x. In the next step, combine x' + Y
y --------'
-
x-
Y-"'l---1�
-----
--,
y,
AND
�
x y' + y
OR .
Fig. 10.87
In the third step, combine x.y' and y by an OR gate. The logic circuit for the Boolean
expression (1) is shown in Fig. 10.87.
Example 7. Find a logic circuit corresponding to the input/output table given below :
Inputs Output
x y z
1 1 1 1
1 1 0 0
1 0 1 0
1 0 0 1
0 1 1 0
0 1 0 0
0 0 1 1
0 0 0 0
Sol. Let [(x, y, z) be the Boolean expression corresponding to the given input/output
table. By BoDle's expansion theorem,
[(x, y, z) = [(1, 1, l).x.y.z + [(1, 1, O).x.y.z' + [(1, 0, l)x.y'.z + [(1, 0, O).x.y'.z'
+ [(0, 1, l).x.y.z + [(0, 1, O).x.y.z' + [(0, 0, l).x.y'.z + [(0, 0, O).x.y'.z'
= l.x.y.z + O.x.y.z' + O.x.y'.z + l.x.y'.z' + O.x'.y.z' + O.x'.y.z' + l.x'.y'.z + O.x'.y'.z'
= x.y.z + 0 + 0 + x.y'.z' + 0 + 0 + x.y'.z + 0
= x.y.z + x.y'.z' + r.y'.z. ... (1)
As (1) contains the complement of x, y, z, so,
In the first step, draw NOT gate for x, y, z
In the second step, draw AND gate to get x.y.z ; X, y'.z' ; r.y'.z.
BOOLEAN ALGEBRA 425
Fig. 10.88
In the third step, combine x.y.z ; x.y'.z' ; x.y'.z by an OR gate to get the required logic
circuit as shown in Fig. 10.88.
Example 8. Draw the logic circuit with inputs A, B and C and output Y which corre
sponds to the Boolean expression. Y = AB'C + ABC' + AB'C'.
Sol. Given expression is Y = AB'C + ABC' + AB'C'
Since it contains the complements of the variables B and C. Draw NOT gate for B
and C. In the next step,
Combine AB'C by AND gate
Combine ABC' by AND gate
Combine AB'C' by AND gate
+ +
Next combine AB'C ABC' AB'C' by OR gate.
Hence, the required logic circuit is shown below. (Fig. 10.89)
AB ---.--.---1AND -----.,
C j....
- t... -�+_-{)o__j
t-t-Ttt--L-----'"
AND
AND
Fig. 10.89
Example 9. Find the disjunctive normal form and also the corresponding combinato
rial circuit of the following Boolean functions :
W �
A B C I(A, B, C) A B C I(A, B, C)
0 0 0 1 0 0 0 0
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 0
0 1 1 0 0 1 1 1
1 0 0 0 1 0 0 1
1 0 1 1 1 0 1 0
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 0
426 DISCRETE STRUCTURES
Sol. (i) The disjunctive normal form of the Boolean function is
f= AB C + ABc + A B C + A B C + A B C + A B C
and the corresponding combinatorial circuit is shown in Fig. 10.90.
A
B \
C �
\ \ \
\
� I
\
�
I D-
\
�
\
�
\
�
Fig. 10.90.
(ii) The disjunctive normal form of the Boolean function is
f = A B C + A B C + AB C + A B C
and the corresponding combinatorial circuit is shown in Fig. 10.91.
"
A
B K \
C K
v �
\
� I ,
\ I
"
v �
... \
�
v �
Fig. 10.91.
BOOLEAN ALGEBRA 427
(a) (b)
Fig. 10.92
r-----v
4
is y'.
At point 2, the output of the NOT gate AN D J----===:J
y
L----�5
--= AND
At point 3, the output of the AND gate
is x.y.
At point 4, the output of the AND gate
is r.y'. Fig. 10.93
At point 5, the output of the AND gate
is x.y'.
At point 6, the output of the OR gate is x.y + x.y' + x.y'. (Fig. 10.93)
The Boolean expression for the first circuit is f(x, y) = x.y + x.y + x.y' ... (1)
The input/output table for the Boolean expression (1) is given below.
Table I
Inputs Output
x y x' y' x�y x�y' x.y' x�y + x�y' + x.y'
0 0 1 1 0 1 0 1
1 0 0 1 0 0 1 1
0 1 1 0 1 0 0 1
1 1 0 0 0 0 0 0
428 DISCRETE STRUCTURES
x---1
For the second circuit) the inputs are x and y.
At point 1, the output of the NOT gate is r.
At point 2, the output of the NOT gate is y'.
At point 3, the output of the OR gate is x' + y' y __---j
(Fig. 10.94).
Boolean expression of given circuit is Fig. 10.94
r + y' . . .. (2)
The input/output for the Boolean expression (2) is given below :
Table II
Inputs Output
' ' /
x y x y x + y/
0 0 1 1 1
1 0 0 1 1
0 1 1 0 1
1 1 0 0 0
From table I and table II, we observe that the outputs for the Boolean expression (1)
and (2) are same. Hence both the given circuits are logically equivalent
Example 11. Consider a logic circuit as shown below (Fig. 10.95). Find the Boolean
function representing the logic circuit. Also
Fig. 10.95
(a) Draw the equivalent logic circuit corresponding to f.
Sol. At point 1 , the output is x2
At point 2, the output is X3
At point 3, the output is x" x2
At point 4) the output is X1·X2, Xa
At point 5) the output is X1· X2 ·Xa· X4
The Boolean function of the given logic circuit is
f(xl ) x2) x) = Xl . X2 . Xa . X4 ... (1)
We now draw the equivalent logic cir
cuit representing (1), As (1) contains the
complement of x2 and x3) so
In the first step, draw NOT gate
representing x2
In the second step, draw NOT gate Fig. 10.96
representing X3
BOOLEAN ALGEBRA 429
In the fifth step, draw an AND gate representing ( x,. x2 ). (X 3 · x4 ) . Hence, the equivalent
logic circuit is shown below. (in Fig. 10.96)
Example 12. (a) Write the circuit diagram or gate diagram of
f( xl , X2' x
)=( Xl · x2
+ ) (( + ) + ) X . x2 x3 x3 ·
(b) Simplify the function in part (a) by using basic Boolean algebra laws.
(c) Write the circuit (gate) diagram of the result obtained in Part (b).
Sol. (a) Given Boolean expression is
f(xl ' x2 ' x,
)=( + )« + )+ )
X,.X2 X, . X2 x, x,
.. The circuit (or gate) diagram for the given Boolean expression is shown in Fig. 10.97.
X, __ ----1
X3 --""=
"C == __ ---.J
Fig. 10.97
(b) To simplify f, we have
f(xl 'x2 ' x,
)=( + )«
X,.X2 X, . X2 +)+ )
x3 x,
=( + x3 )(X,.X2 · X2 +( + » x3 x,
=( + )( +
x3 X, . X3 )( + )
X2 . X2 x, I Distributive law and Idempotent law
=( + )( +
x3 X, . X2 )( + )
X, . X2 x,
=( + )( +
x3 X, . X2 x,) Idempotent law
=( + )( +
x3 X, . X3 x2)
= + X3 X1·X2 ... (1)
(c) The circuit diagram of f(x" x2 ' x, ) given by (1) is given in Fig. 10.98.
Fig. 10.98
430 DISCRETE STRUCTURES
Example 13. Consider the given Fig. 10.99. __ -"
x..'_________ -,
(a) Write the Boolean function which represents
the given on-off circuit
(b) Simplify f algebraically obtained in
Part (a). Draw the on-off circuit diagram of this sim
plified representation.
(c) Construct the circuit (or gate) diagram of
the given on-off circuit diagram. Fig. 10.99
(d) Find the minterm normal from by using Venn diagram of the Boolean function
obtained in part (a) or part (b).
(e) Write the relative simplicity and advantages of the circuit gate diagrams found in
(c) and (d).
Sol. (a) From the given switching circuit, we note that the last portion represents the
circuit Xl + x2 ·
Also the switch x2 and the circuit Xl + x2 are connected
in series) so it represents X2.( X1 + x2 ). Also the switch Xl and the
circuit x2 . ( Xl + x2 ) are connected in paralleL Therefore) the
Boolean function representing the given on-off circuit is Fig. 10.100
f(xl ) x2) x) = Xl + X2 · (X1 + x2 ) ... (1)
(b) To simplify f algebraically, we have
Let f(xl ' x2) = x, + (X2 ,X, + X2 · X2 ) Distributive law
= x, + (X2 ,X, + 0) I X2 , X2 = 0
= x, + X2.X, = x, ... (2) Absorption law: a v (a 1\ b) = a
Also, the on-off circuit diagram of (2) is shown in Fig. 10.100.
(c) To draw the circuit (gate) diagram of the given switching circuit, we have, the Boolean
expression) representing the given on-off diagram) as
f(xl ' x2) = x, + X2 , (X, + x2 ) ••• (1)
Here (1) contains the complement of the variable x2 ' so
In the first step, draw NOT gate representing x2
In the second step) draw an OR gate representing Xl + x2
In the third step, draw an AND gate representing X2 , (X, + x2 )
In the fourth step, draw an OR gate representing x, + X2 , (X, + X2 )
Therefore, the required logic circuit diagram is shown in Fig. 10.101.
>"'-'-'''-1-x-, (x, + x )
Fig. 10.101
BOOLEAN ALGEBRA 431
(d) To find the minterm normal form of (1), consider the Venn diagram representing (2)
as given below : I (1) and (2) represents the same f(xl ' x2)
From the shaded portion I, the minterm is
X,
From the shaded portion II, the minterm
is X1 .X2
The required minterm normal form is
f(xl , x2) = X1 · X2 + X1 ·X2
(e) The circuit (or gate diagram) of the
Boolean function obtained in part (d) is given in Venn Diagram
Fig. 10.102.
Fig. 10.102
Relative advantages. There are three levels of gates in graph of part (c) and two
levels of gates in part (e) so the time 'cost' of the figure in part (e) is slightly less. For both
circuits, hardware costs are same.
Example 14. Consider the switching circuit
as shown in Fig. 10. 103.
(a) Find the Boolean expression representing
the switching circuit. X�X2
(b) Construct a logic or gate circuit
corresponding to the Boolean expression in Part (a)
(c) Simplify f algebraically
(d) Find the minterm normal form by using
Venn diagram and express it in a circuit gate dia-
gram Fig. 10.103
(e) Interpret the result. (P.T.V. B.Tech. Dec. 2010)
Sol. (a) First portion of the given Fig. 10.103 represents that the switches x, and x2 are
connected in paralleL Therefore, the circuit is Xl + x2•
Second portion of Fig. 10.103 represents that the switches x, and X3 are connected in
parallel therefore, the circuit is Xl + x3•
Now, both the circuits Xl + x2 and Xl + X3 are connected in parallel, it represents
(x, x2) + (x, + x,). Also, the portion on R.H.S. of Fig. 10.103 represents that the switches x,
+
and x2 are connected in series.
Therefore, the Boolean expression is
f(xl ' x2 ' x,) = [(x, + x2) + (x, + x,)] . x, , X2 ... (1)
(b) Since the Boolean expression (1) contains the complement of the variable x2 ' so in
the first step, draw NOT gate.
In the second step, draw an OR gate representing Xl + x2
In the third step, draw an OR gate representing Xl + x3•
432 DISCRETE STRUCTURES
In the fourth step, draw an OR gate representing (x, + X2) + (x, + x,)
In the fifth step, draw an AND gate representing X,. X2
In the sixth step, draw an AND gate representing «x, + x2) + (x, + x,» ,X" X2
The logic or gate circuit of the Boolean expression (1) is shown in Fig. 10.150.
X, --'---,-"----\
x2 --f----i
Fig. 10.104
(c) To simplify [algebrically or minimize the Boolean function (circuit), we employ Boolean
algebra laws.
Here [(x" x2 ' x,) = [(x, + x2) + (x, + x,)l .x,. x2
I Idempotent law
= X1 ·X1 · X2+ X2,X1 , X2 + X3 ·X1· X2 I By distributive law
= Xl X2 + O'XI + X3 ·X1 ·X2 ( -: X" X, = xl ' X2 , X2 = 0)
= X1 , X2 + X3 ·X1 · X2
= X"( X2 + X2·x,) By distributive law
= X" X2 (1 + x,) By distributive law
I Boundedness law
(d) From part (c), the Venn diagram representing [(x" x2) = X" X2 is shown in Fig. 10.105
From this Venn diagram, we find the
minterms.
From the shaded portion I, the minterm is
X1·X2·Xa"
From the shaded portion II, the minterm is
X1·X2·Xa"
The required minterm normal form is
Fig. 10.105
BOOLEAN ALGEBRA 433
Also, the circuit (or gate) diagram is shown in Fig. 10.106
X, _
_ ...r
- ,
X, _
_ ...r
- ,
X2
X3
Fig. 10.106
(e) Interpretation. We notice that f(x" x2 ' x,) = 1 when x, = 1, x2 = 0 and X3 = 0 or X3 = 1.
Thus current will b e conducted through the circuit when switch Xl is on) switch x2 is off, and
when switch Xl is either off or on.
Example 15. (a) Write all inputs and outputs from the given Fig. 1 0. 1 07 and show that
its Boolean function is f(xl' X
y
x,) = ((Xl + X2 ) ' X3 ) . (
X
,
+ x2).
Fig. 10.107
(b) Simplify f algebrically. (P.T.D. B.Tech. Dec. 2005)
(c) Find the minterm normal form off by using Venn-diagram.
(d) Draw and compare the circuit (or gate) diagrams ofparts (b) and (c)
(e) Draw the on·off switching diagram of f in part (a)
(j) Write the truth table of the Boolean function f in part (a)
(g) Interpret the result.
Sol. (a) The outputs are shown by the points 1, 2, 3 and 4 as shown in the following
Fig. 10.108 :
X3 ------'
Fig. 10.108
At Point 1, the output of the OR gate is x, + x2
At Point 2, the output of the AND gate is (x, + x2) • X
3
The required Boolean function is given as f(xl ' x2 ' x,) = (x, + x2 ) . X3 • (x, + x2) ••• (1)
434 DISCRETE STRUCTURES
(b) To simplify of algebraically, we have
[(x" X2 ' x,) = (x, + X2 ) . X3 .(X, + X2)
= (x, + X2) X3
• ... (2)
(c) To find the minterm normal form, we draw
the Venn diagram of the function [(xl ' x2 ' x,)
= (x, + X2). X3 , which is shown in Fig. 10.109 X,
Fig. 10.110
Also for part (c») the minterm normal form of f(xl , x2 ' x) is given as
f(xp x2) x) = X1· X2 , Xa + X1·X2 · Xa + X1. X2 . Xa ... (1)
To draw the circuit diagram, we proceed as follow.
Xl x2
Since (1) contains the complement of the variables Xl ' x2 ' x3 ' so, in the first step, draw an
OR gate representing " and x3 .
In the second step, draw an AND gate representing xl'x2 ,xa
In the third step, draw an AND gate representing X"X2 . X3
BOOLEAN ALGEBRA 435
X,
X2 -t--'-i::::----,
Fig. 10.111
Comparing the two circuits diagrams (Fig. 10. 1 10 and Fig. 1 1 1), we observe that the
circuit diagram shown in Fig. 10. 1 10 is less expensive as it involves less number of gates as
compared to the circuit diagram shown in Fig. 10. 1 1 1 .
(e) The on-off switching diagram off in Part (a) is shown in Fig. 10.112
Fig. 10.112
(f) The truth table of the Boolean function of f in Part (a) is shown below :
Xl X2 X3 Xl + X2 (Xl + X2 ) · X3 f
0 0 0 0 1 0
0 0 1 0 1 0
0 1 0 1 1 1
0 1 1 1 0 0
1 0 0 1 1 1
1 0 1 1 0 0
1 1 0 1 1 1
1 1 1 1 0 0
(g) Interpretation_ Current will flow only when one of the switches x, or x2 is ON and
X3 is OFF.
436 DISCRETE STRUCTURES
TEST YOUR KNOWLEDGE 1 0.7
L Consider the logic circuit as shown in Fig. 10.113. Express the output f as a Boolean expression
in the inputs A, B, C.
�::�:3E=��::l:::�A�N�D))�----'
L�V:::::j�A��N:J I �1
D \r------- r--O R
1 AND J�
Fig. 10.113
2. Express the output f as a Boolean expression in the inputs A, B and C for the logic circuit in the
following figures (Fig. 10.114).
'�
AND
f
B OR
C AND
(a) (b)
Fig. 10.114
3. Determine a Boolean expression for each of the switching circuit given in Fig. 10.115.
[�J-c-1'1---------'
(a)
Fig. 10.115
1'1-----'
(b)
4. Express the output Y as a Boolean expression in the inputs A, B, C for the logic circuit in the
following Fig. 10.116
(b) AB = ---.- -====
- - ---1 -
AN D
C ��=t++ =L����
AND
AND
Fig. 10.116
BOOLEAN ALGEBRA 437
5. Express the output Y as a Boolean expression in the inputs A, B and C for the logic circuit in Fig.
10.117 (a) and (b) :
A --.----.----1
B -t-t-t----cL/
c �+------1
(a) (b)
Fig. 10.117
6. Draw the logic circuit L with inputs A, B, C and output Y which corresponds to each Boolean
expression :
(a) Y AB'C + AC' + B'C.
= (b) Y NBC + NBC' + ABC'
=
�
�
x
�
x
Y AND
Y
(a) (b)
Fig. 10.118
10. Show that the logical circuits given in Fig. 10.119 are equivalent :
�-----1�»--'�
x
y
(a) (b)
Fig. 10.119
11. Show that the logical circuits given in Fig. 10.120 are equivalent :
�
x
� B-
x
y
y
(a) (b)
Fig. 10.120
438 DISCRETE STRUCTURES
12. Show that the logical circuits given in Fig. 10.121 are equivalent :
II � 8-
x
x
y t y
AND
(a) (b)
Fig. 10.121
(a) Consider the Booleanfunction/(x1 • x2 , xS' x4) :::: xI + (X2.(XI + x4) + xa . (x2 + x4» . Draw its circuit
(or gate) diagram.
13.
Answers
1. f(A. B. c) = A.B.C + A R C + AB
2. (a) f(A. B) = AB + BC (b) f(A. B) = AB + AC
3. (a) f(A. B. C) = A(B + A).C (b) f(A. B. C) = A(C + Il) + B. C
4. (a) Y = NBC + NC' + BC'; (b) A + B + C + NBC + AB'C'.
5. (a) Y = (AB')' + (N + B + C)' + AC (b) Y = (NBC)' + NBC' + (AB'C)' + AB'C'
6. (a) See Fig. 10.122 (b) Fig. 10.123
AB ---...-..----1
---
AB --.--�><>-f- '
+ +-CX>--1 -..-1f---...+----1 AND
C ----.-+
- --...+-'----1 C -nrt-n-r-----i.-.-/
AND
BOOLEAN ALGEBRA 439
13. Fig. 10.126
x, L...j "----"-- >"
X-,- --f-'
__
X4
, :.:
+ ",
X2_-+..L...j :>0----\-
X3 _-+y
X4 ---'----I ::::»----'
Fig. 10.126
1 0.46. SOME SPECIAL CASES OF BOOLEAN ALGEBRA
Consider the Boolean algebra {B, EB, *, '} where EB is a binary operation of addition
modulo 2. i.e .•
1 EB 1 = 0, 0 EB 1 = 1 ; 1 EB 0 = 1 , 0 EB 0 = 0
Generally, Xl X2
EB = X1X2 + X1X2 ·
I ILLUSTRATIVE EXAMPLES I
Example 1. Using laws of Boolean algebra. prove that xy + xz + yz = xy + (x EB y) z.
Sol. R.H.S. = xy + (x EB y) z
= xy + (xy' + x'y) z
= xy + xy'z + xyz = xy.1 + xy'z + xyz
= xy (1 + z) + :ry'z + xyz 1 1+a= l VaE B
= xy + xyz + xy'z + x'yz
= xy + xz (y + YJ + xyz
= xy + xz. 1 + xyz I Complement law
= xy + xz + xyz
= xy + xyz + xz
= Y (x + x'z) + xz
= y(x + Xl (x + z) + xz I Distributive law
= y.1.(x + z) + xz I Complement law
= yx + yz + xz = xy + xz + yz.
Example 2. Obtain the sum·oi-products canonical form of the Boolean expression
Consider
I De Morgan's law
440 DISCRETE STRUCTURES
I Involution law
= (x, + X2) (x, + X2 ) (XlX3 . XlX3 ) + ( Xl + X2) + (X, + X2») (X,X3 + X,X3 )
= (X, + X2) (X, + X2 ) (X, + X3) (X, + X3) + (X" X2 + X" X2) (X,X3 + X,X3)
= (Xl + X2) (Xl + X2) (Xl + Xa) + X1·X2 · X1· Xa + X1· X2 · X1· Xa
+ O + X1. X2 . Xa + X1 . X 2 . Xa + 0 I aa =O VaE B
= Xl ' X2 . Xl + Xl . X2 . Xa + Xl . X2 . Xl + Xl . X2 . Xa + Xl . X2 . Xa + Xl . X2 . :fa
= 0 + X1· X2 · Xa + X1,X2 + X1·X2 · Xa + X1, X2 , Xa + X1. X2 . Xa
= X1, X2 , Xa + X1·X2 ( 1 + xa) + X1·X2 · Xa + X1· X2 · Xa
CD CD CD CD CD
AB 00 01 11 10
AB 00 0 1 3 2
AB 01 4 5 7 6
AB 11 12 13 15 14
AB 10 8 9 11 10
Fig. 10.130
Enter 1s in the cells corresponding to the terms in the given expression (Fig. 10.131)
CD CD CD CD CD
AB 00 01 11
AB 00 0 1
1
3
AB 01 1 1
4 5 7
3 AB 11 1 1
12 13 15
1 1
AB 10 8 9 11
Fig. 10.131
Corresponding to loop (1), all the four 1s are vertically adjacent. The variables A and B
appear in complemented and uncomplemented form whereas the variables C) D remains un
changed. Therefore, the prime implicant is CD.
Corresponding to loop (2), all the four 1s in the top and bottom row are considered to be
adjacent. The variables A and D appear in complemented and uncomplemented form whereas
the variables B and C remains unchanged.
f(A, B, C, D) = CD + BC + B C D .
BOOLEAN ALGEBRA 443
Example 8. Minimize the following switching function
L m (0, 2, 8, 1 2, 13).
Sol. The largest term is 13, therefore, total number of variables
= 16 (N = 2', n = 4, N = 13)
Let f(A, B, C, D) be the required Boolean expression. The K-map for the variables A, B,
C, D is shown in Fig. 10.132.
C D CD CD CD CD
AB 00 01 11 10
AB 00 1 0 1 3
1
3
AB 01 4 5 7 6
AB 11 1 12 1 13 2 1 5 14
AB 10 1 8 1 9 11 10
Fig. 10.132
Corresponding to loop (1), the variable B appears in complemented and uncomplemented
form whereas the variables A) C ) D remains unchanged. Therefore) the prime implicant is
ACD.
Corresponding to loop (2), the prime implicant is AB C .
Answers
1. Ell yz Ell x'y'z
(i) fl(x, y, z) = xy (ii) f2(x, y, z) z Ell xy=
I I I tr::I
1
)
Fig. 10.133 Fig. 10.134
(iL) The K-map is given in Fig. 10. 134.
2. (i) The K-map is given in Fig. 10.135. (ii) The K-map in Fig. 10.136.
-- - -
- - - -
CD CD CD CD CD CD CD CD CD CD
AB 00 0 11 1 0 AB 00 0 1 11 1 0
AB 0 0 1 1 2 AB 00 1) (1
1 2
4 r- 5 II 7
0 3 0 3
AB 0 1 1 1 6 AB 01 5 7 6
4
1 )12 1 5 (1 14
AB 1 1 1 12 111 3 "T 1 5 14 AB l l 13
(1
11 1) 10
- 1 -
AB 1 0 8 9 11 10 AB 10 8 9
Fig. 10.135 Fig. 10.136
3. See Fig. 10. 137(a) and 10.137(b)
CD ciS CD C A ---.-IDo----1
AB
J) if0 1'--' B -....-+1
.. Do----1
AB 1
y
AB CI 1 1 1 C -IDO--+--'"
AB
'0 D ----+-----1
Fig. 10.137 (a) Fig. 10.137(b)
x+y +z= l ; xy = 0 ;
xz + w =1; .xy
+ zw = 0 ;
w
have the following solution for x, y, z and respectively.
(a) 0 1 0 0 (b) 1 1 0 1
(c) 1 0 1 1 (d) 1 0 0 0.
BOOLEAN ALGEBRA 445
2. What values of A, B, C and D satisfy the following simultaneous Boolean equations ?
A + AB = 0, AB = AC, AB + AC + CD = CD
(a) A = 1, B = 0, C = 0, D = 1
(c) A = 1, B = 0, C = 1, D = 1
(b) A = 1, B = 1, C = 0, D =0
(d) A = 1, B = 0, C = 0, D = O.
(d) All properties not altered when S is replaced by :> other than 0 and 1 element.
4. The Boolean function x y + y + xy is equivalent to
(a) x + y (b) x + y
(c) x + y (d) x + y.
5. The logic expression for the output of the circuit shown in the figure below is :
A
B
c ..------1
D -------1
(a) (A + B) (A + C) (b) (A + B) (A + C)
(a) A . B + C (b) AB + C
(c) AB + BC (d) None of the above.
8.
(a) 1
How many truth tables can be made from one function table
(b) 2
(c) 3 (d) 8.
9.
(a) AND function of several OR functions
The term sum·of·product in Boolean algebra means
(b)
(c)
OR function of several AND functions
AND function of several AND functions
10.
(d) OR function of several OR functions.
(i) x + y + z = 1 + 0 + 1 = 1
(ii) xy = 1.0 = 0
(iii) xz + = 1.1 + 1 = 1 + 1 = 1
w
- - - -
(iv) xy + zw = 1.0 + (1.1) = 0 + ( 1 + 1 ) = 0 + 0 + 0 = 0
2. (a) 3. (c)
4. (d) Given expression is x y + y + xy
= x y + xy + y
= x(y + y) + y
= x + y. I y +y = l
5. (a) Given figure is shown below :
A
B
c -----1
0 -------1
The output at the point 1 AB
is
1 1 . 1 . INTRODUCTION
In many problems dealing with discrete objects and binary relations) a graphical repre
sentation of the objects and the binary relations on them is a very convenient form of repre
sentation. This leads us naturally to a study of the theory of graphs.
1 1 .3. DIRECTED GRAPH (P.T.U., B.Tech. Dec. 2013, Dec. 2006, May 2005)
A directed graph is defined as an ordered pair (V, E) where V is a set and E is a binary
relation on V. A directed graph can be represented geometrically as a set of marked points V
with a set of arrows E between pairs of points. Also
The elements in V are called vertices.
The ordered pairs in E are called edges.
For e.g., consider the Fig. 11.1 given below. It is a directed graph.
a
Directed graph
b
o Loop
The vertex 'b' is a Pendent vertex since only one edge is inci
dent on it. Fig. 11.3
The vertex 'e' is an isolated vertex as it has no edge incident on it. Also deg e = O.
An undirected graph G consists of a set of vertices, V and a set of edges E. The edge set
contains the unordered pair of vertices. If (u, v) E E then we say u and v are connected by an
edge where u and v are vertices in the set V.
For example, let V = {I, 2, 3, 4} and E = {(1, 2), (1, 4), (3, 4), (2, 3)}. Draw the graph.
The graph can be drawn in several ways.
Two of which are as follows (Fig. 1 1.4 and Fig. 1 1 .5). These are directed graphs
2}--_--{
3}--___----{4
Fig. 11.4 Fig. 11.5
Consider the graph shown in Fig. 1 1 . 6 Determine the edge set and the vertex set of this
undirected graph.
2
3
Fig. 11.6
GRAPHS 449
The edge set is E = {(I, 2), (1, 4), (2, 3), (2, 4), (3, 4)}
The vertex set is V = {I, 2, 3, 4}.
A graph G = (V, E) is said to be a linear graph if its edges joining vertices lie along a line.
For example) •--• ..-- ...
. .
..-
- ...
. .
0--... . is a linear graph.
A graph containing only vertices and no edge is called a discrete or null graph. The
set E of edges in a graph G = [V, E] is empty in a discrete graph. Also each vertex in a discrete
graph is an isolated vertex.
A . , D
A D
·4 .,
. , ·3
B ., c Br:== . :: 7C(
::: ::::;:,==
Simple graph Multigraph
Fig. 11.8 Fig. 11.9
In Fig. 1 1 .9, the edges e4 and e5 are called multi edges.
1 1 .6. COMPLEMENT GRAPH
The complement of a graph is defined to be a graph which has the same number of
vertices as in graph G and has two vertices connected iff they are not connected in the graph G.
450 DISCRETE STRUCTURES
1 1 .7. (a) DEGREE (P.T. U., B.Tech. Dec. 2006, May 2005)
Let v be a vertex of an undirected graph. The degree of v, denoted by d(v), is the number
of edges that connect v to the other vertices in the graph. The degree of a graph cannot be
negative.
Multigraph
1 1 . 1 0. ADJACENT VERTICES
Two vertices are called adjacent if they are connected by an edge. If there is an edge
(ep e2») then we say that vertex e 1 is adjacent to vertex e2 and vertex e2 is adjacent to vertex e 1 .
Theorem I. Show that the sum of degree of all the vertices in a graph G, is even.
Proof. Each edge contribute two degrees in a graph. Also, each edge contributes one
degree to each of the vertices on which it is incident.
Hence) if there are N edges in G) then we have
2N = d(v,) + d(v ) + ...... + d(v N)
Thus) 2N is always even.
Another statement. The sum of the degrees of the vertices of a graph G is equal to
twice the number of edges in G.
Theorem II. Prove that in any graph, there are an even number of vertices of odd de-
gree. (P.T.V., M.e.A. Dec. 2005, B.Tech. Dec. 2012)
Proof. Consider a graph having vertices of degree even and odd. Now) make two groups
of vertices. One with even degree of vertices vp v 2) ... ) v k and other with odd degree of vertices
up u2 ) ... , un '
Suppose,
d(v,) + d(v) + ... + d(v k)
v=
V = d(u,) + d(u) + ... + d(un).
Now, we know that sum of degree of all the vertices is even (Theorem I). So, V + V is
even.
Since, V is the sum of K even numbers. Hence, it is even. But U is the sum of n odd
numbers. So, to be U an even number, n must be even. Hence proved.
ILLUSTRATIVE EXAMPLES I
Example 1. Verify that the sum of the degree of all the vertices is even for the graph
shown in Fig. 11. 14.
v, V2 V3
Fig. 11.14
452 DISCRETE STRUCTURES
Sol. The sum of degree of all the vertices is
= d(v,) + d(v ) + d(v ) + d(v4) + d(v 5) + d(v,) + d(v7) + d(vs)
= 2 + 3 + 3 + 3 + 3 + 4 + 2 + 2 = 22, which is even.
Example 2. Verify that there are an even number of vertices of odd degree in the graph
shown in Fig. 11. 15.
b c
a d
e
9 h
Fig. 11.15
Sol. The number of vertices of degree odd are 8 and each have degree three in the above
graph. Hence) we have even number of vertices of odd degree.
1 1 . 1 1 . PATH IN A GRAPH
Apath of length n is a sequence of n + 1 vertices of a graph in which each pair of vertices
is an edge of the graph.
1. A Simple Path
The path is called simple one if no edge is repeated in the path i.e., all the vertices are
distinct except that first vertex equal to last vertex.
2.
An Elementary Path. The path is called elementary one if no vertex is repeated in
the path i.e., all the vertices are distinct.
3. Circuit or Closed Path
The circuit or closed path is a path which starts and ends at the same vertex i.e., v 0 = v n 0
4.Simple Circuit Path. The simple circuit is a simple path which is a circuit.
Theorem III (a). Suppose a graph G contains two distinct paths from a vertex u to a
vertex v. Show that G has a cycle.
Proof. Consider two distinct paths from u to v be PI = (ep e2) e3) ...... ) en) and P2 = (e/)
e2') e3') ...... ) en')'
Now delete from the paths P , and P2 all the initial edges which are identical i.e., of we
have e 1 = e l ') e2 = e2') e3 = e3') ...... , ek = ek' but ek 1 t:- e'k l ' We will delete all the first k edges of
+ +
Example 3. Consider the graph shown in Fig. 11.16. Give an example of the following :
(i) A simple path from Vi to Ve ' V,
(ii) An elementary path from Vi to Ve '
(iii) A simple path which is not elementary from Vi to Ve '
(iv) A path which is not simple and starting from V2. �--+--� V2 V3
(v) A simple circuit starting from Vi '
(vi) A circuit which is not simple and starting from V2.
Sol. (i) A simple path from V, to VB is
V I ' v2 ) V3 ) V4) V5) V6 '
(ii) An elementary path from V, to VB is
V I ' V2 ) V3 ) V5) V4) V6 ,
(iii) A simple path which is not elementary from V, to VB is
V I ' V2 , V3 ) V5) V2 ) V4) V6 ,
(iv) A path which is not simple and starting from V2 is
V2 ) V3 ) V4) V5) V3 ) V4) V6 ,
(v) A simple circuit starting from V , is
Fig. 11.16
V I ' V2 , V4) V6 ) V5) V3 ) VI '
(vi) A circuit which is not simple and starting from V2 is
V2 , V3 ) V I ' V2 ) V5) V4) V2 ·
Example 4. Consider the graph shown in Fig. 11.17. Give an example of the following :
(i) An elementary path (ii) A simple path
(iii) A path which is not simple (iv) A simple path which is not elementary
(v) A simple circuit (vi) A circuit which is not simple.
a b c
d e
Fig. 11.17
454 DISCRETE STRUCTURES
Sol. There are many solutions to the above problems, but we will take only one for each.
(i) An elementary path is a, b, c, f, e, d.
(ii) A simple path is a, f, e, b, d.
(iii) A path which is not simple is a, b, e, e b, d.
(iv) A simple path which is not elementary is a, b, e, f, c, b, d.
(v) A simple circuit is a, b, c, f, a.
(vi) A circuit which is not simple is a, b, e, f, c, b, d, a.
Example 5. Consider the graph as shown in
Fig. 1 1 .18. V2
Determine the following :
(i) Pendent vertices
(ii) Pendent edges
(iii) Odd vertices
(iv) Even vertices
(v) Incident edges
(vi) Adjacent vertices.
Sol. (i) The vertex V5 is the pendent vertex. V3
(ii) The edge (V4 ' V5) or e5 is the pendent edge.
Fig. 11.18
(iii) The vertices V3 and V5 are odd vertices.
(iv) The vertices V V2 and V4 are even vertices.
F
Example 6. Consider the graph G shown in Fig. 11. 19. Find the complement of this
graph.
V2
v,
L_---3-;;V
Fig. 11.19
Sol. The complement of above graph is shown in Fig. 1 1.20. Here, we consider a com·
4
plete graph of vertices and then delete the edges that are in G from the complete graph. The
remaining graph is the complemented graph.
GRAPHS 455
v,
k,
6 3
V3 ��--�-'V--�---_+---3* 4
--
V2 .....--- - V3 .,...---vs
Fig. 11.23. K3 Fig. 11.24. Ks
1 1 . 1 4. DISCONNECTED GRAPH
A graph is called disconnected if there is no path between any two of its vertices.
1 1 . 1 5. CONNECTED COMPONENT
Example 9. Consider the graph shown in Fig. 11.25. Determine its connected components.
Fig. 11.25
Sol. The connected components of this graph is {a, b, c}, {d, e, fl, {g, h, i} and {j}.
Example 10. Consider the graphs shown in Figs. 11.26, 1 1.27 and 1 1.28. Determine
whether the graphs are (a) Connected graphs or (b) Disconnected graphs.
Also write their connected components.
GRAPHS 457
Vs
v,
Vs
Vs V6 9
Vs V7
V3 V4 v" V2
Vs
Fig. 11.26 Fig. 11.27 Fig. 11.28
Sol. (i) The graph shown in Fig. 1 1 .26 is a disconnected graph and its connected compo
nents are
{VI ' V2 , V3 , V4}, {V5' VB' V7 , V8} and {Vg , V l Q}'
(ii) The graph shown in Fig. 1 1.27 is a disconnected graph and its connected compo
nents are
(VI ' V) , {V3' V4}, {V5' VB}, {V7 ' V8}, {Vg , Vl Q}
and(VIl ' V,),
(iii) The graph shown in Fig. 1 1.28 is a connected graph.
Theorem IV. Let G be a connected graph with at least two vertices. If the number of
edges in G is less than the number of vertices, then prove that G has a vertex of degree 1.
Proof. Let G be a connected graph with n :> 2 vertices. Because graph G is connected, G
has no isolated vertices. Suppose G has no vertex of degree 1 . Then the degree of each vertex
is at least 2. This implies that the sum of the degrees of vertices of G is at least 2n. Hence, it
follows that the number of edges is at least n (': the sum of the degrees of vertices in any
graph is twice the number of edges), which is a contradiction. This implies that G contains at
least one vertex of degree 1.
F �-------+--� D
E
Fig. 11.29
458 DISCRETE STRUCTURES
Sol. The following are all subgraphs of the above graph (shown in Figs. 1 1 .30, 1 1 . 3 1 ,
1 1 .32, 1 1 .33). There may b e another subgraphs o f this graph.
B A.-------� C
A C F �------_e D
B B
A C A C
F D D
E E
Fig. 11.34
Sol. The four subgraphs of the directed graph are shown in Figs. 1 1.35, 1 1 .36, 1 1 .37
and 1 1 .38. There may be another sub graphs of this graph.
GRAPHS 459
� __�
__�__
____ V2 V2
V3
Fig. 11.35 Fig. 11.36
v, V2 .V�' __
__ ��__
__ �V2
V3 V3
Fig. 11.37 Fig. 11.38
Exrunple 13. Consider the multigraph shown in Fig. 11.39. Show two different subgraphs
of this multigraph which are itself multigraphs.
a
Fig. 11.39
Sol. The two different subgraphs of this multigraph which are itself multigraphs are
shown in Figs. 1 1.40 and 1 1.41. There may be another sub graphs of this multigraph.
a b a
d c
Fig. 11.40 Fig. 11.41
460 DISCRETE STRUCTURES
1 1 . 1 7. (a) SPANNING SUBGRAPH
A graph G, = (V 1" E ,) is called a spanning subgraph of G = (V. E) if G, contains all the
vertices of G and E '" E , .
For example : The Fig. 1 1.42 is the spanning subgraph of the graph shown in Fig. 1 1 .29.
B
A C
F D
E
Fig. 11.42. Spanning Subgraph.
1 1 . 1 7. (b) COMPLEMENT OF A GRAPH
D
Let G = (V,
plement of G = (V, E) If V = V and E does not contain edges of E. i.e., edges in
E are join of those pairs of vertices which are not joined in G.
Consider the graph shown in Fig. 1 1 .43.
The complement graph is shown in Fig. 1 1 .44 . Fig. 11.43
Note that a graph and its complement graph have same vertices.
then
If a graph G has n vertices and K" is a complete graph with n vertices,
x
Fig.
11.44
Consider K4• Then
X G
�-D G
Consider K6 . Then
G G
GRAPHS 461
� A
S =G-S
Consider the graph and its sub graph Then the complement of
subgraph S is
Note that in a complement of a sub graph, the number of vertices donot change.
For example, consider the graph shown in Fig. 11.45. We determine the cut set for this
graph.
V2
V3
v,
Fig. 11.45
For this graph, the edge set {(VI V5), (V7' V5)} is a cut set. After the removal of this set,
'
we have left with a disconnected subgraph. While after the removal of any of its proper subset,
we have left with a connected subgraph.
N=?I
b
(i) (ii)
3 4
... (1)
GRAPHS 463
Now) we prove that
k
L ni2 S n2 - (k - 1)(2n - k)
i=l
k k
Since L n; = n ==> L ni2 - k = n - k
i=l i=l
k
L (ni - 1) = n - k, squaring both sides
i=l
=> [(n, - 1) + (n2 - 1) + ...... + (nk - 1)] 2 = (n - k) 2
=> (n, - 1) 2 + (n2 - 1) 2 + ...... + (nk - 1)2 + 2[n , - 1 ) (n2 - 1) + ...... + (nk - 1)] = (n - k) 2
=> n , 2 + n22 + ...... + nk2 - 2(n , + n2 + ...... + nk) + k + Non-negative terms = (n _ k) 2
k k
2
L ni - 2 L ni + k + Non-negative terms = (n - k)2
i=l i=l
k
L n; - 2n + k + Non-negative terms = n2 + k2 - 2nk
i=l
k
L n; + Non-negative terms = n2 + k2 - 2kn + 2n - k
i=l
= n2 - 2n(k - 1)(2n - k) - n
k
L nf S n2 - (k - 1)(2n - k)
i=l
From (1), we have
Maximum number of edges in the graph G.
= � [n2 - (k - 1)(2n - k) - n]
1 2
= -[n - 2nk + k2 + n - k]
2
c
e
Fig. 11.48
The two cut points in this graph are c and d. The other vertices are not cut points since
removal of them does not divide the graph into more than one connected component.
Example 15. Give an example of a graph with six vertices that has no cut points.
Sol. The graph with no cut points is shown in Fig. 1 1.49. This graph does not contain
any cut point since removal of any vertex and the edges incident on it does not divide it into
more than one connected components.
a b
Fig. 11.49
Example 16. Consider the graph shown in Fig. 11.50. Determine the subgraphs
(i) G - v 1 (ii) G - v3 (iii) G - v5'
V, "'-------71 V2
V 3 "-
_ ______ -"V4
Fig. 11.50
Sol. (i) The subgraph G-V, is shown in Fig. 1 1.51.
(ii) The sub graph G-v3 is as shown in Fig. 1 1.52.
(iii) The sub graph G-V5 is as shown in Fig. 1 1.53.
GRAPHS 465
v,ec------" v2 v, .------. v2
V3�------� v, v3 __--------------------_e v,
a b c
d e �---_
Fig. 11.54
Sol. (a) The vertex b is cut point for G. Since, G-b has more than one connected compo·
nents as shown in Fig. 1 1 .55.
(b) The vertex e is also a cut point for G. Since G-e has more than one connected compo·
nents as shown in Fig. 1 1 .56.
a
•
c
• a c
9 9
d
•
e d .1
Fig. 11.55 Fig. 11.56
V, ""'::_
::- --'---__
e,
V3��--�
e3---·
Fig. 11.57
Sol. (i) The subgraph G-e, is shown in Fig. 1 1 .58.
(ii) The Subgraph G-e3 is shown in Fig. 1 1.59.
V, "":::----'---e
V, e,
V3 *"=-----;:-
e3---fiV, V3
Fig. 11.58 Fig. 11.59
(iii) The subgraph G-e4 is shown in Fig. 1 1 .60.
V, "":::----'---e
e,
e3---.. V,
V3 *"=-----;;-
Fig. 11.60
GRAPHS 467
Example 19. Consider the graph G shown in Fig. 11.61. Determine all the bridges of G.
Fig. 11.61
Sol. (a) The edge e, is a bridge for G. Since G--€, has more than one connected compo·
nents as shown in Fig. 1 1 .62.
(b) The edge e3 is a bridge for G. Since G-e3 has more than one connected components as
shown in Fig. 1 1.63.
v,
b a b c
c e, e d e
Fig. 11.64 Fig. 11.65
(b) The graph with no bridges is shown in Fig. 1 1 .65. This graph does not contain any
bridge since removal of any edge does not divide it into more than one connected components.
468 DISCRETE STRUCTURES
Example 21. Draw a graph whose every edge is a bridge.
Sol. The graph shown in Fig. 1 1 .66 is a graph whose every edge is a bridge because if
any edge is removed from the graph h, we got two components or a disconnected graph.
V, ....-
. ---.... V2
V3
Fig. 11.66
V, i---��--�
V3�-------� V4 V3 ____-
Fig. 11.67 Fig. 11.68
GRAPHS 469
Example 22. Show that the graphs shown in Fig. 1 1 . 69 and Fig. 1 1 . 70 are isomorphic.
a._------_.b .-------��'V2
V3
e *-------�d v,
Fig. 11.69 Fig. 11.70
Sol. Compare the degrees of vertices of two graphs and find the vertices from both the
graphs having same degrees and make the pairs of the vertices in decreasing order of degree.
If both the graphs contain vertices having same degree) then they are isomorphic otherwise
not. The pairs of vertices in decreasing order of degree are as follows :
d(a) H d(v) , d(d) H d(v ) , d(b) H d(v ,), d(e) H d(v4), d(c) H d(v5).
Since) both the graphs contain vertices having same degrees) hence they are isomorphic.
Example 23. Show that the graphs shown in Fig. 11.71 and Fig. 11.72 are not isomorphic.
a�------" b
k __ --
---- +- --
---- �m
�---· d n
Fig. 11.71 Fig. 11.72
Sol. The graphs are not isomorphic because the vertices of the graph shown in Fig. 1 1 .72
is having degree 3 but the graph shown in Fig. 1 1 .71 contains two vertices having degree less
than three.
Example 23. (a) List any five properties of a graph which are invariant under graph
isomorphism. (P.T.V., B.Tech. May 20 1 3)
Sol. The five properties are as follows:
1. Order : The number of vertices.
2. Size : The number of edges
3. Vertex Connectivity: The smallest number of vertices whose removal disconnects
the graph.
4. Edge Connectivity: The smallest number of edges whose removal disconnects the
graph.
5. Vertex Covering Number: The minimal number of vertices needed to cover all
edges.
6. Edge Covering Number: The minimal number of edges needed to cover all vertices.
470 DISCRETE STRUCTURES
Two graphs G , and G2 are called homeomorphic graphs if G2 can be obtained from G , by
a sequence of subdivisions of the edges of G 1 , In other words) we can introduce vertices of
degree two in any edge of graph G , . For example,
Consider the graph shown in Fig. 1 1 .74 and Fig. 1 1 .75. They are homeomorphic graphs.
v, ....-
. ------... v2
V3t1-------_.V,
Fig. 11.78
GRAPHS 471
Sol. The vertex and edge set of graph G = (V, E) is as follows
G = {{1, 2, 3}, {(1, 2), (2, 1), (2, 2), (2, 3), (1, 3)}).
Example 26. Let G = {{a, b, c, d} {(a, b), (b, c), (c, c), (d, d), (d, a))}. Draw the graph G.
Sol. The graph of G = (V, E) is shown in Fig. 1 1.79.
Fig. 11.79
Example 27. Consider the directed graph shown in Fig. 11.80. Determine the indegree
and outdegree of each of vertices of the graph.
}---3--.r
Fig. 11.80
Sol. The indegree of digraph is indeg (1) = 2, indeg (2) = 1, indeg (3) = 3
The outdegree of digraph is outdeg (1) = 3, outdeg (2) = 2, outdeg (3) = 1 .
A directed graph is called strongly connected if there is a directed path from any node u
to v and vice-versa) for any pair of nodes of the graph.
472 DISCRETE STRUCTURES
c
9
b
V3__-------.------�V4 d e e h
Fig. 11.81 Fig. 11.82 Fig. 11.83
Sol. The graph shown in Fig. 1 1 .81 is strongly connected because there is a path from
u
every vertex to v and also there is a path from v to u.
It is also weakly and unilaterally
connected because a strongly connected digraph is both weakly and unilaterally connected.
The graph shown in Fig. 1 1 .82 is weakly connected but not unilaterally connected be
cause there is no directed path from vertex a to b or a to c etc. but its undirected graph is
connected.
The graph shown in Fig. 1 1.83 is a disconnected graph. The components of this graph
are (g, a, c, f, h, b) and {e, d}.
V2 V3
Fig. 11.84. K3. Fig. 11.85. K5.
GRAPHS 473
1. (a) If V = {I, 2, 3, 4, 5} and E {(I, 2), (2, 3), (3, 3), (3, 4), (4, 5)). Find the number of edges and size
of graph G (V, E)
=
(b) Find the order and size of the graph G shown in the figure below :
=
a
d 0
(i) (ii) C
b
a b
d
(c) What is the difference between directed and undirected graph?
(d) Differentiate between paths and circuits. (P.T. U., B. Tech. May 2007)
2. (a) A graph G has 16 edges and all vertices of G are of degree 2. Find the number of vertices.
(b) 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.
(c) A graph G has 5 vertices, 2 of degree 3 and 3 of degree 2. Find the number of edges.
(a) How many nodes (vertices) are required to construct a graph with exactly 6 edges in which
each node is of degree 2?
3.
(b) Show that there does not exist a graph with 5 vertices with degrees 1, 3, 4, 2, 3 respectively.
(c) Can there be a graph with 8 vertices and 29 edges?
(d) How many vertices are there is a graph with 10 edges if each vertex has degree 2?
(e) Does there exist a graph with two vertices each of degree 4? If so, draw it.
4. (a) Draw a simple graph with 3 vertices
(b) Draw a simple graph with 4 vertices
(c) Give an example for
(i) simple graph (ii) non-simple graph (iii) Multigraph, with suitable diagrams
5. Show that the maximum number of edges in a graph with n vertices and no multiple edges are
n(n - 1)
2
6. Prove Handshaking theorem which states that the sum of degree of the vertices of a graph is
equal to twice the number of edges.
7. (a) Determine whether it is possible to construct a graph with 12 edges such that 2 of the vertices
have degree 3 and the remaining vertices have degree 4.
(b) Give an example of each of multigraph, weighted graph, simple graph, non-simple graph,
directed graph with suitable diagrams. (P.T. U., B.Tech. May 2005)
8. (a) Which of the graphs in the given figures are isomorphic ?
(iv)
(v) (vi)
(viii)
(ix) (x)
af----;lp c
e d
Fig. I Fig. II
GRAPHS 475
(c) Determine whether the following graphs are isomorphic or not.
a b s t
§
d
Fig. I
c
§
v
Fig. II
u
/
2
/
U
6
U4 U3 U5 u4
Fig. I Fig. II
9. (a) Draw the graph IT (complement of G) of the graph shown below. Also show that G and IT are
isomorphic. (P.T. U., B.Tech. Dec. 2002)
B f------'I D d c
A E a b
Fig. I Fig. II
(b) Draw the complement of the graph shown in the fig. II
10. Draw (a) a graph in which no edge is a cut edge.
(b) a graph in which every edge is a cut edge.
(c) only one cut vertex.
11. Find k, if a k-regular graph with 8 vertices has 12 edges. Also draw k-regular graph.
12. Consider the graph G shown below:
(a) Is G simple?
(b) What is order and size of incidence matrix for G?
(c) Find minimum and maximum degree for G.
476 DISCRETE STRUCTURES
13. Prove that in a simple graph with n vertices, each vertex has maximum degree (n - 1).
14. Prove that maximum degree of edges in a graph G with n vertices and no multiple edges are
n(n - ) 1
2
15. Suppose a directed graph has vertices. Show that if there is a path from vertex to v, then
m u
16. Construct a graph that has six vertices and five edges but is not a tree
(P.T. U., B.Teeh. Dec. 2012)
Answers
1. (a) Number of edges 4, Size of graph
= = 3 Order = 4, Size =
5 (b) (i) 6, (ii) Order 4, Size 7
= =
2. (a) 6 (b) 1
3. (a) 6 No
g
(c)
c c
7. (a) Not possible
8. (a) (i) and (vi) are isomorphic (ii) and (ix) are isomorphic
(iii) and (vii) are isomorphic (iv) and (v) are isomorphic
(viii) and (ix) are isomorphic
(c) Not isomorphic (d) Isomorphic
e"-I---\-...,,. c
()Z
(b)
Hints
2. (a) Let V , V . vn be n vertices such that deg (v) = 2, 1 i n. � �
Since sum1 of2 degree of all vertices is equal to twice the number of edges, i.e.,
.. Ideg(v) � 2 (Number of edges)
� deg(v,) + deg(v2) + . + deg(v,,) � 2 16 x
� 2 + 2 + . + 2 (n times) � 32
2n �32
� n � 16
(b) Let n be the number of vertices in G.
Since, sum of degree of all vertices is equal to twice the number of edges i.e.,
n
(e). . Here
Sum of degree of twothevertices
n = 2. Let e be number= of4 +edges.
4 = 8
Each vertex is of degree 4,
=:::} 2e = 8 e = 4 =:::}
n-2= - 18 = - 9
4 2
n = "2 + 2 = 21 3 ) not paSSl'ble.
9
8. (b) Both graphs have five vertices and six edges. However the graph (Fig. II) has a vertex of
degree namely, e, but the graph (Fig. I) has no vertex of degree 1. Hence the given graphs
are not 1isomorphic.
(c) Both graphs
vertices (Fig.2Iand
of degree andfour II) have 8 vertices and 10 edges. Also both graphs have four
Fig.vertices of degree 3. But deg(a) = 2, it must correspond to either
x, y, or
z. t4 in Fig. II. All these vertices in Fig. II is adjacent to another vertex of degree 2.
But this is not true for the vertex ain Fig. 1. Hence they cannot be isomorphic.
11. Given. V 8, E 12 � �
.. Sum of degree of all vertices = 2 12 = 24 x
Ifdegree
G = [V,of each
E] bevertex
a simple
is (2graph with 2 vertices, then the number of edges in G is 1 = 2 - 1 and
- I).
If G = [V, E] be a simple graph with n vertices, then maximum degree of each vertex = n - 1.
14. Let G be a simple graph with n vertices, then degree of each vertex in G is � n - 1
sum of degrees of n vertices in G � n(n - 1)
' n (n - 1)
2e <; n(n - 1) e � 2 where e is the number of edges in G.
=:::}
15. Suppose
sequencethere is a path
of vertices frompath
that the the meets
vertexwhento the
it is vertex
U v. Let [to v. If there are k edges
traced from U
." v] bein the
u 1 ' u2' . ' " ui' Uithe+1
'
path. There are k + 1 vertices in the sequence. Choose a number k > m - 1 such that the vertex,
say, should appear more than once in the sequence, that is,
ul' (u, . v).
. " ui' . " ue' . " u/ J "
Deleting the edges in the path that leads back to we have a path from to v that has fewer
ue ul' U
edges than
edges. Hencetheweoriginal one. Repeating
have proved that in athisdirected
processgraph
untilwith
we have a path that has (m - 1) or fewer
m vertices, if there is a path from
vertex to v, then there is also a path from to v of length m - 1 or less edges.
U U
data. So, we can write these lab ells in place of an ordered pair in the edge set. For e.g.,
The graphs shown in Figs. 1 1.86 and 1 1.87 are labelled graphs.
G {{I, 2, 3, 4, 5}, ie"� e2 , e3 , e4 , e5}}.
� G {{a, b, c, d}, ie"� e2 , e3 , e4}} .
�
GRAPHS 479
e,
a}-------��--�
4 d
Fig. 11.86. Undirected Labelled Graph. Fig. 11.87. Directed Labelled Graph.
1 1 .30. WEIGHTED GRAPHS (P.T. U., B.Tech. May 2007, Dec. 2006, May 2005)
A graph G = (V, E) is called a weighted graph if each edge of graph G is assigned a
positive number w called the weight of the edge e. For example,
The graph shown in Figs. 1 1 .88 and 1 1 .89 is a weighted graph.
7
N A"--+- -"S
8 11
7
D E�-_-"" F
M o 9
Fig. 11.88 Fig. 11.89
1 1 .31 . MULTIPLE EDGES
Two edges e, and e/ which are distinct are said to be multiple edges if they connect the
end points i.e., if e, = (u, v) and e/ = (u, v) then e, and e/ are multiple edges.
1 1 .32. MULTIGRAPH (P.T. U., B.Tech. May 2007, Dec. 2006, May 2005)
A multigraph G = (V, E) consists of a set of vertices V and a set of edges E such that edge
set E may contain multiple edges and self loops. For example,
Consider the following graph shown in Fig. 1 1 .90.
e2
V,.-------� ----�
e,
V3
Fig. 11.90. Undirected Multigraph.
480 DISCRETE STRUCTURES
In the above Fig. 11.91, e4 and e5 are multiple edges, e6 is a self-loop.
Fig. 11.92
The multigraph has three even degree vertices i.e., V3 , V4 and V5 and two odd degree
vertices i.e., VI and V2 " Hence it is a traversable multigraph.
{l'
ces, then the adjacency matrix of graph is an n x n matrix A = [ai) and defined by
_
if {vi ' Vj } is an edge i. vi is adjacent to vj
e. ,
aij - 0, if there is no edge between vi and vj
GRAPHS 481
If there exists an edge between vertex v i and vp where i is a row andj is a column then
value of aij = 1 .
If there is no edge between vertex v i and vp then value of aij = O.
Note that adjacency matrix of G is a symmetric matrix. Since simple graph does not
contain any self loop) so diagonal entries of adjacency matrix are all zero. Further) as adjacency
matrix contains 0 or 1 ) so it is also known as Boolean matrix.
Note. Degree of a vertex in G is equal to sum of entries in the ith row or ith column of the
vi
adjacency matrix.
For example, we find the adjacency matrix MA ofgraph G shown in Fig. 11.93.
B
Fig. 11.93
Since the graph G consists of four vertices. Therefore, the adjacency matrix will be a 4 x 4
matrix. The adjacency matrix is as follows in Fig. 1 1 . 94.
A B C D
degree of vertex ' is 3
T r
which is equal to sum of
'
1 1 c
B 1 0 1
MA = C 1 1 0 entries in third row 6/4 mm
D 1 1 1
of adjacency matrix.
Fig. 11.94
Adjacency List. In a adjacency list of a graph, we list each vertex followed by the
vertices adjacent to it. First write vertices of graph in a vertical column) then after each vertex)
write the vertices adjacent to it.
Consider the graph shown in Fig. 1 1 .95 the adjacency list is given below :
V I ; V2) V3
V2; Vp V3
V3; Vp V2) V4
Fig. 11.95
V4; V3
{0,l' ifotherwise
defined by
cij =
the vertex Vi incident by edge eJ
There is a row for every vertex and a column for every edge in the incidence matrix.
Note that incidence matrix of a graph need not be a square matrix. Entries in a row are
added to give degree of corresponding vertex.
482 DISCRETE STRUCTURES
For example ;
Consider the graph G = [V, E.]
where
shown in Fig. 1 1 .96.
The incidence matrix M l for G is shown below :
[� � �'
e 1 e2 e3
M, = �: 0
v4 0 1
Fig. 11.96
Fig. 11.97
Sol. The undirected graph consists of four vertices and five edges. Therefore, the inci
dence matrix is a 4 x 5 matrix) which is shown in Fig. 1 1.98
e , e2 e3 e4 e5
0 0 1
M, =
T
V2
V3
v4
0 1 1 0
1 1 0 0
0 0 1 1
Fig. 11.98
1]
(b) Representation of Directed Graph
{l. �f Vi ' Vj i.s an edge i.e., if Vi is initial vertex and Vj is final vertex
aiJ, = 0, If there IS no edge between vi and vj
If there exists an edge between vertex vi and Vj with v i as initial vertex and Vj as final
vertex, then value of aij = 1.
If there is no edge between vertex vi and Vj then value of aij = O .
The number of one's in the adjacency matrix of a directed graph is equal to the number
of edges.
For example : Consider the directed graph shown in Fig. 11.99. We determine its adjacency
matrix MA"
V, o-------�tOv2
V3 �------�V4
Fig. 11.99
Sol. Since the directed graph G consists of five vertices. Therefore, the adjacency matrix
will be a5 x 5 matrix. The adjacency matrix of the directed graph is as follows in Fig. 11.100.
V , v 2 v 3 v4 V 5
v, 0 1 1 0 0
v2 0 0 0 1 0
V3 0 1 0 1 1
MA = V4 0 0 0 0 1
V5 0 0 0 0 0
Fig. 11.100
(ii) Incidence matrix representation. If a directed graph consists of n vertices and
m edges then the incidence matrix is an n x m matrix C = [cijL defined by
1, if Vi is initial vertex of edge ej
c., = - 1, if Vi is final vertex of edge ej
'1
0, if Vi is not incident on edge ej
The number of one 's in the incidence matrix is equal to the number of edges in the
graph.
For example, Consider the directed graph G shown in
Fig. 11.101. Find its incidence matrix M['
V, e,
Fig. 11.101
484 DISCRETE STRUCTURES
Sol. The directed graph consists of four vertices and five edges. Therefore, the incidence
matrix is a 4 x 5 matrix which is shown in Fig. 1 1 .102.
e,e2 e3 e4 e5
l' T
0 0 0
M = V2a
I
v 1 1
0 -1
0 -1
1 0
v4 0 0 -1 1
Fig. 11.102.
(c) Representation of Multigraph
Represented only by adjacency matrix representation.
N
vertices, then the adjacency matrix of graph is an
If there are one or more than one edges between vertex Vi and Vj' where
a =
'J
is the number of edges .
0, otherwise.
If there exists one or more than one edges between vertex Vi and Vj then aij = N, where
N is the number of edges between Vi and v/
If there is no edge between vertex Vi and Vj then value of aij = O. For e.g.,
For example : Consider the multigraph shown in Fig. 11.103. We determine its adjacency
matrix.
Fig. 11.103
Sol. Since the multigraph consists of five vertices. Therefore, the adjacency matrix will
be an 5 x 5 matrix. The adjacency matrix of the multigraph is as follows in Fig. 1 1 . 104.
V, v 2 v3 v4 V5
v,
0 3 0 0 1
v
2 3 0 0 0 2
MA = V3 0 0 0 1 1
v4 1 0 1 1 0
V5 0 2 1 0 1
Fig. 11.104.
GRAPHS 485
ILLUSTRATIVE EXAMPLES
V2 .,::.-----� V3
V4
Fig. 11.106.
Example 2. Draw the undirected graph represented by incidence matrix MJ shown in
Fig. 11.107.
e, e2 e3 e4 e5 e 6
a 0 1 0 0 1 1
b 0 1 1 0 1 0
M, = c 0 0 0 1 0 1
d 1 0 0 0 0 0
e 1 0 0 1 0 0
Fig. 11.107.
486 DISCRETE STRUCTURES
d e, e
Fig. 11. 108.
r� � � �lj
Example 3. Draw the multigraph G whose adjacency matrix MA is shown in Fig. 11.109.
MA =
o 1 2 o
Fig. 11. 109.
Sol. The multigraph corresponding to the adjacency matrix MA is shown in Fig. 11.110.
v, V2
v,
Fig. 11.110
Example 4. Draw the directed graph G whose adjacency matrix MA is shown in
Fig. 1 1 . 1 1 1 .
a b c d e f
a 0 0 1 0 0 0
b 0 0 0 0 1 0
c 0 0 0 1 0 0
MA = d 0 0 0 1 1 0
e
0 0 0 0 1 1
f 0 1 0 0 0 1
Fig. 11.111
GRAPHS 487
Sol. The directed graph corresponding to the adjacency matrix MA is shown in Fig. 1 1 .112.
a b
Fig. 11.112
Example 5. Draw the directed graph G whose incidence matrix MI '8 shown in
Fig. l l . 1 13.
e1 e2 e3 e4 e5 e6 e 7 e8 e9
a -1 -1 0 1 1 0 0 0 0
b 1 0 1 0 0 0 -1 0 0
M1 = C 0 +1 -1 0 0 -1 0 0 1
d 0 0 0 -1 0 1 1 1 0
e 0 0 0 0 -1 0 0 -1 -1
Fig. 11.113
Sol. The directed graph corresponding to the incidence matrix MI is shown in Fig. 1 1. 1 14
a
d �----�e'-------. e
8
Fig. 11.114
V, u V2 = [a, b, d] = V and V, n V2 = q,
c, a b
. . [VI' V2] is a partition ofV.
Consider another graph shown in Fig. 11.116
This graph is also a bipartite graph.
Here V = [a) b) x, y, z]
Let V, = [a, b] , V2 = [x, y, z]
.. V, U V2 = V and V, n V2 = q, c d
Bipartite graphs are also called 2-colourable graphs as one can think Fig. 11.115
vertices in VI of one colour and in V2 of another colour and vertex is a b
joined by an edge to a vertex of same colour.
(b) Complete Bipartite Graph. A graph G = (V, E) is called a
complete bipartite graph if its vertices V can be partitioned into two
subsets VI and V2' such that each vertex of VI is connected to each
vertex of V2' The number of edges in a complete bipartite graph is
x y z
m. n as each of the m vertices is connected to each of the n
vertices. It is denoted by Km. n and m '" n. Fig. 11. 116
For example, the graphs shown in Fig. 11.117 are complete
bipartite graphs.
Fig. 11.117
A complete Bipartite graph KI' n is called a star graph.
Example 6. Draw the bipartite graphs K2•4 and K3• 4 ' Assuming any number of edges.
Sol. First draw the appropriate number of vertices on two parallel columns or rows and
connect the vertices in one column or row with the vertices in other column or row. The bipar
tite graphs �. and K3• are shown in Fig. 11.118 and Fig. 11.119 respectively.
4 4
u,
V, .,:'------.",. u2
V2 eE'------_ U3
Fig. 11. 118. Bipartite Graph �, 4 Fig. 11. 119 Bipartite Graph Ks, 4
GRAPHS 489
Example 7. Draw the complete bipartite graphs K3 4 and Kj 5'
Sol. First draw the appropriate number of vertices in two pa�allel columns or rows and
connect the vertices in first column or row with all the vertices in second column or row. The
graphs K3 4 and K, 5 are shown in Fig. 11.120 and Fig. 1 1.121 respectively.
• .
v, V2 V3
3, ��----"" b3
4 5
. . .
and 1 1 .124 respectively.
u,
V, �::::",,---,-r-""". U2
1 1 .36. EULER PATH (OR CHAIN) (P.T. U., B.Tech. Dec. 2007, Dec. 2006)
An Euler path (or chain) through a graph is a path whose edge list contains each edge of
the graph exactly once.
Example. If a graph G has more than two vertices of odd degree, then there can be no
Euler path in G. (P.T.V. B.Tech. May 2008)
Sol. Given, the graph G has more than two vertices of odd degree. We are required to
prove that there can be no Euler path in G.
Let G has three vertices say vp v 2 and v 3 of odd degree. As these three vertices are of
odd degree) therefore) any possible Euler path in G must arrive at each of vp v 2 ) v3 with no
way to return. One vertex of these three vertices vp v 2 ) v3 may be the beginning of the Euler
path and another the end, but this leaves the third vertex at one end of an untravelled edge.
Hence there is no Euler path.
1 1 .37. EULER CIRCUIT (OR CYCLE) (P.T.U., M.C.A. May 2007, P.T. U. B.Tech. Dec. 2006)
An Euler circuit (or cycle) is a path through a graph, in which the initial vertex appears
second time as the terminal vertex.
490 DISCRETE STRUCTURES
V,
E and vk + from V. If at vk there are several edges) choose one that is not a bridge to the
1
remaining graph) say {vk' Vk + I}' Extend P to P : vo) vp v2) ... ) vk) Vk + and remove {vk) Vk + I} from
1
edge set E.
Step 3. Repeat step 2 until no edges left in E.
Example 10. Use Fleury's algorithm to construct an Euler circuit for the graph shown
in Fig. 11.128.
P P
K Q
Fig. 11.128
492 DISCRETE STRUCTURES
Sol. Start from any vertex) as per step 1. So, choose vertex k as the starting vertex. The
summary of the results applying step 2 repeatedly is shown in the table-
2
6 where n is the number
n2 -32n + 6
of vertices and e the number of edges in G. (P.T.V., M.C.A. May 2007)
2 ! (n - 2 - 2) ! 2 (n - 4) ! 2 (n - 4) ! 2
1
e S "2 ( n2 - 5n + 6) + [deg(u) + deg(v)]
1
e S "2 ( n2 - 5n + 6) + (n - 1)
e S -"---'''-
-' --::---=c..:.__=_
...
n 2 - 5n + 6 + 2n - 2
2
1
Thus e S "2 (n2 - 3n + 6). Hence the theorem.
Remark. The converse of above theorem, however, is not true.
1 1 .43. RULES F O R CONSTRUCTING HAMILTON PATHS (OR CHAINS) A N D
HAMILTON CIRCUITS (OR CYCLES) I N A GRAPH
Rule I. If a graph G has n vertices, then a Hamilton path in G must contain exactly
(n - 1) edges and a Hamilton circuit in G must contain exactly n edges.
Rule II. In a Hamilton circuit, there cannot be more than three or more edges incident
with one vertex. i.e., every vertex V in a Hamilton circuit will contain exactly 2 edges incident
on V.
Also, If V is a vertex in G, then a Hamilton path must contain atleast one edge incident
on V and atmost 2 edges incident on V.
Remarks
(i) Multigraph cannot have Hamilton circuit.
(ii) Hamilton path, if it exists, is the longest simple path in a graph.
(iii) Each graph which has Hamilton cycle will have Hamilton path, the converse, however, is not
true.
(iv) Every complete graph Kn is Hamilton for n ;::': 3.
(v) A Hamilton graph with n vertices must have atleast n edges.
Example 11. The graph shown in Fig. 1 1 . 129 is a Hamiltonian graph. Determine
Hamiltonian circuit for this graph.
Sol. The Hamiltonian circuit is shown in Fig. 1 1 . 1 30.
2 6
V3 __--------------.. V4
Fig. 11.131
In this graph V V2) V3) V VI is both an Euler circuit as well as Hamiltonian circuit.
F
4)
Since using this path, we can traverse both vertices and edges exactly once.
Example 13. Give an example of a graph that has an Euler circuit and a Hamiltonian
circuit, which are distinct. (P.T.V., M.e.A. Dec. 2006)
Sol. The graph having an Euler circuit and a Hamiltonian circuit which are distinct is
shown in Fig. 11.132.
v,
V3
Fig. 11.132
The Euler circuit is V V3' V2' V3' V V2' V which visits each edge exactly once.
F
4' p
The Hamiltonian circuit is V V2' V V3' V which visits each vertex exactly once.
F
4' p
Example 14. Give an example of a graph which has an Euler circuit but not a
Hamiltonian circuit.
Sol. The graph having an Euler circuit but not a Hamiltonian circuit is shown in
Fig. 1 1.133.
V3
v,
Vs
Fig. 11.133
GRAPHS 495
The Euler circuit is Vp V5) V2) V5) V3) V4) V6) V3) V2) VI "
There is no Hamiltonian circuit. Since it is not possible to traverse each vertex of this
graph exactly once.
Example 15. Give an example of a graph which has a Hamiltonian circuit but not an
Euler circuit. (P.T. U., M.G.A. May 2008)
Sol. The graph having a Hamiltonian circuit but not an Euler circuit is shown in
Fig. 11.134.
V, "-----' V2
V3�------� V,
Fig. 11.134
The Hamiltonian circuit is V V2) V4) V3) V There is no Euler circuit. Since it is not
F
l'
Fig. 11.137
496 DISCRETE STRUCTURES
f-+---\--'lr b
e '<---\-----,1--1' c
d
Fig. 11.141 Fig. 11.142
(d) Given graph is 4-regular. every vertex is of degree 4 (even)
_ _G has an Euler' s circuit and hence G is an Eulerian graph.
Example 19_ State and prove Eulerian theorem on graph to show that Konigsberg's
graph is not proved to a solution.
SoL The word Konigsberg is the name of a town, situated on the bank of a river, Pregel
in Germany. This city has seven bridges. In 1736, L. Euler, the father of graph theory, proved
that it was not possible to cross each of the seven bridges once and only once in a walking tour.
A map of the Konigsberg is shown in the following Fig. 1 1. 143.
D
Konigsberg in 1 736
Fig. 11.143
Euler replaced the islands and the two sides of the river by points and the bridges by
curves as shown in Fig. 11. 144.
Figure 11. 144 is a multigraph. A multigraph is a said to be traversable if it can be
drawn without any breaks in the curve and without repeating any edges. i.e., if there is a path
which includes all vertices and uses each edge exactly once and such a path is called Travesable
TriaL
According to Euler, the walk in Konigsberg is possible iff the multigraph in Fig. 1 1. 144
is traversable. But Euler proved that the multigraph in Fig. 1 1 . 144 is not traversable and
hence the walk in Konigsberg is impossible. We prove it.
498 DISCRETE STRUCTURES
We know that a vertex is even or odd according as its C
degree is even or odd. Suppose a multigraph is travesable
and that a traversable trail does not begin or end at a vertex,
say, P. We claim that P is an even vertex. For whenever the
traversable trail enters P by an edge, there must always be
an edge not previously used by which the trail can leave P. �------�. B
Thus, the edges in the trail incident with P must appear in
pairs and so P is an even vertex. Further, if a vertex, Q is
odd, the traversable trail must begin or end at Q. Hence, a
multigraph with more than two odd vertices cannot be tra· D
versable. Fig. 1 1 . 144
Now the multigraph corresponding to the Konigsberg
bridge problem has four odd vertices. Thus, one cannot walk through Konigsberg so that each
bridge is crossed exactly once.
Euler actually proved the converse of the above statement, which is contained in the
following theorem, called Euler theorem.
Theorem V. A finite connected graph is Eulerian iff each vertex has even degree.
(P.T.V., M.C.A. May 2008, B.Tech. Dec. 2012)
Proof. We know that a graph G is called an Eulerian graph if there exists a closed
traversable Trial, called an Eulerian Trial. Suppose G is Eulerian and T is a closed Eulerian
trial. Let v be any vertex of G. We show the vertex v is of even degree. Since the trail T enters
and leaves the vertex v the same number of times without repeating any edge. . . v is of
even degree.
Conversly, Let each vertex of G has even degree. We construct an Eulerian Trial. Start
with a trial T 1 at any edge e. Extend T 1 by adding one edge after the other. If T 1 is not closed
i.e., IfT, begins at u and ends at v " u, then only an odd number of edges incident on v appear
in T,. Hence we can extend T, by another edge incident on v. Thus, we can continue to extend
T, until T, returns to its initial vertex u. i.e., until T, is closed.
IfT, includes all the edges in G, then T, is the required Eulerian Trial.
If T 1 does not include all edges of G, consider the graph H obtained by deleting all edges
of T, from G. Now H has each vertex of even degree (since T, contains an even number of the
edges incident on any vertex). Since G is connected, there is an edge e' of H which has an end
point u' in T l' We construct a trail T 2 in H begining at u' and using e'. Since all the vertices in
H have even degree, we can continue to extent T, in H until T, returns to u' as shown in the
following Fig. 11. 145. We can clearly put T, and T2 together to form a larger closed trial in G.
Proceeding the above process until all the edges of G are used, we finally obtain an Eulerian
trial and hence G is Eulerian.
U'
T, T,
Fig. 1 1 . 145
GRAPHS 499
V3 __----------------.. V4 V3 �------�V4
Fig. 11.146. 2·regular Graph. Fig. 11.147. Regular Graph.
Example 21. Draw a 2-regular graph offive vertices.
Sol. The 2-regular graph of five vertices is shown in Fig. 11.148
V, .---2----��V
V3 __----------�J\V4
Fig. 11.148
Example 22. Draw a 3-regular graph of five vertices.
Sol. It is not possible to draw 3-regular graph of five vertices. The 3-regular graph must
have an even number of vertices.
Theorem VI. Prove that K-regular graph must have even number of vertices when the
value of K is odd.
Proof. Consider a graph with n vertices. Let T is the sum of degrees of all the n vertices
of a K-regular graph. Then, we have
T=K.n
The sum T must be even (from the theorem V).
Now) suppose that K is odd, so the value of n must be even.
500 DISCRETE STRUCTURES
For e.g., the graph 6 is a planar graph. Also � is a planar graph because
K4 =
it can be re-drawn as
@ in which edges do not cross each other.
For example: The graphs shown in Fig. 11.149 and Fig. 11.160 are planar graphs.
v, ..
----
----
-- �
--
v "f"'-------jfV 2
V3�------�
V3 �------�
Fig. 11.149 Fig. 11.150
Theorem VII. A planar and connected graph has a vertex of degree less than or equal
to 5.
Proof. Let G be connected and planar and suppose) if possible) degree of each vertex x
E G is greater than 6.
Le., deg x > 6 => deg x :> 6 i.e., sum of degree of all vertices :> 6v
=> 2e ;::: 6v) where e and v are the number of edges and vertices respectively.
=> e ;::: 3v) which contradicts e :::; 3u - 6 < 3v.
Hence deg x S 6.
1 1 .46. REGION OF A GRAPH
Consider a planar graph G = (V, E). A region is defined to be an area of the plane that is
bounded by edges and cannot be further subdivided. A planar graph divides the plane into one
or more regions. One of these regions will be infinite.
(a) Finite Region. If the area of the region is finite, then that region is called finite
reglOn.
(b) Infinite Region. If the area of the region is infinite, that region is called infinite
region. A planar graph has only one infinite region.
Example 23. Consider the graph shown in Fig. 11. 151. Determine the number of re
gions, finite regions and an infinite region.
GRAPHS 501
V, ,c-----�
rs r3 V3
V4 r,
r, Vs
Fig. 11.151
Sol. There are five regions in the above graph i.e., rp r2) r3J r4 and r5.
There are four finite regions in the graph i.e., r2) r3, r4 and r5•
There is only one infinite region i.e., r r
Example 24. Draw aplanar representation ofgraphs shown in Figs. 1l. 152and 11.153.
v, v,
V2 �-------3" V3 V2 �-----\-----3"v3
V4*'"-------:i. Vs
v,
v,
V�
2 � ____ � V2·��-----3.V3
I!E------..".
V4'�-----�VS Vs
o
Fig. 11.156 Fig. 11.157
In Fig. 11.156 we have V = 2 and R = 1. Thus 2 + 1 - 1 = 2
In Fig. 1 1.157 we have V = 1 and R = 2. Thus 1 + 2 - 1 = 2. Hence. the result holds for
e = 1.
Let us assume that the formula holds for connected planar graphs with K edges.
Let G be a graph with K + 1 edges.
Firstly) we suppose that G contains no circuits. Now) take a vertex v and find a path
starting at v. Since G is circuit free) whenever we find an edge) we have a new vertex. At last
we will reach a vertex v with degree 1. So we cannot move further as shown in Fig. 11.158.
Now remove vertex v and the corresponding edge incident on v . So) we are left with a
graph G* having K edges as shown in Fig. 1 1.159.
G G'
v , ....
--------- �V2 v , ..
--------- .... v2
V3 �------e V4 V3 __
--------- __ V4
Fig. 11.160 Fig. 11.161
Now) as e is the part of a boundary for two regions. So) we only remove the edge and we
are left with graph G* having K edges (Fig. 1 1.161).
Hence) by inductive assumption) Euler's formula holds for G*.
Now, since G has one more edge than G\ one more region than G* with same number
of vertices as G*. Hence the formula also holds for G which, verifies the inductive step and
hence proves the theorem.
Example 26. Show that V E + R = 2 for the connected planar graphs shown
- m
a c e 9
b d h
(ii) The graph shown in Fig. 11.163 contains vertices V = 8, edges E = 15 and regions R
= 9. Putting the values, we have 8 15 + 9 = 2. Hence proved.
-
a 'O:------At
c d
d iE,-----..,.
Example 28. Show that the graphs shown in Figs. 1 1 . 1 67 and 11.168 are non-planar by
finding a subgraph homeomorphic to K5 or K3• 3.
V3 �---V--+----��- 4
If we remove the edge (V2' V7)' the graph G2 becomes homeomorphic to K3' 3' Hence it is
non-planar.
Theorem. Prove that every planar graph has at least one vertex of degree 5 or less
than 5.
Proof. Consider a graph G) whose all vertices are of degree 6 or more) then the sum of
the degrees of all the vertices would be greater than or equal to 6v. We know that the sum of
the degrees of the vertices is twice the number of edges. Therefore) we have
6v <: 2e
e
or <
v- ... (1)
3
But, any planar graph have the property,
2e
<
r- ... (2)
3
Also) from Euler's formula, we have
2=v-e+r ... (3)
Now, putting the value of v and r from (1) and (2) in (3), we have
e 2e
2 <: - - e + - = 0
3 3
Since, the statement 2 :::; 0 is not true, hence we conclude that there must exist some
vertex in G with degree 5 or less than 5.
Example 29. Let G = [V, EJ be a graph having at least 11 vertices. Prove that G or its
complement G is non planar.
Sol. Let if possible, G and G are planar. We know that G and G have same number of
vertices say, n. . . we have n ;::: 11
Now
n(n - 1)
E + I E I = set of edges in Kn = ... (1)
2
Since G and G are planar
I E I <: 3n - 6, E I <: 3n - 6
=> I E I + I E I <: 3n - 6 + 3n - 6
n(n - 1)
<: 6n 12
_
I Using (1)
2
n(n - 1) <: 12n - 24, which is not true for n :> 1 1
Hence G or G is non-planar.
GRAPHS 507
(a) A =
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
1
1
1
0
1
0
1
1
1
0
(b) A = [� �l3 0
0 1
1 2
1 2
5. (a) Consider the graph (Fig. I) G show in the given figure. Verify Euler Theorem i.e., V + R - E :::: 2.
B
A B c D
A�--�----�� C
E F G H
D
(i) Which of the graphs (a) , (b), (c) has Euler path ? Which have Euler circuit. If not, explain
why ?
(ii) Which of the graphs (a), (b), (c) have a Hamiltonian circuit ? If not, explain why ?
7. (a) Verify Euler's formula for the following graphs :
(b) Show that if G is a bipartite simple graph with vertical and e edges, then e :::: "4 .
u
u
8. Let G be a finite connected planner graph with at least three vertices. Show that G has at least
one vertex of degree 5 or less.
(a) Suppose a graph G contains two distinct paths from a vertex a to a vertex b. Show that G has
a cycle.
9.
(b) If a graph G has more than two vertices of odd degree, then prove that there can be no Euler
Path. M
(P.T. U., B.Tech. ay 2008)
10. Show that a connected graph G with n vertices must have atleast (n - 1) edges.
GRAPHS 509
11. Consider each graph G in the given figures:
B
A�---7B
A �--+---�--� C B
C �-*---7 D
D
EL----.3.IF
(a) (b)
(i) Find an Euler path or Euler circuit, if it exists. If not, explain why ?
(ii) Find a Hamilton path or a Hamilton circuit, ifit exists. If not, explain why ?
12. Draw the following graphs
(a) K" 5
, (b) K4 (c) K2, 3
13. If G is a simple, connected and planner graph with more than one edge, then
aXb
(i) 2 I E I ;> 3 I R I
�
(ii) II EV II ) the
3 I Vnumber
- I 6, where I E I denotes the number of edges, I R I ) the number of regions and
of vertices.
14. Show that Ks, 3 is non-planar graph.
15. Does the graph shown below has a Hamiltonian circuit?
(P, T. u,. Tech, Dec,
B 2012)
c d
Answers Fig. Q.15
1. (a) There are seven simple paths from A to F,
A� B � C � F, A �B � C � E � F,
A� B � E � C � F, A � D � E � F,
A�D � E � B � C � F, A �D � E � C � F
(b) There are nine trials. The seven simple paths of part and (a)
A�D � E � B � C � E � F; A� D � E � C � B � E � F
(c) d(A, F) 3 � �
(d) d(G) 3
(e) There are three cycles including the vertex A;
A�B � E � D; A� B � C � E � D � � A � B � C � F � E � D � A
if) There are six cycles in G. The three cycles are of part (e) and
B � C � E � B; C � F � E � C;B � C � F � E � B
2. (a) ABG, ABFG, AEBG, AEBFG (b) BGC, BFGC, BAEBGC, BAEBFGC
(c) d(A, C) 3 � �
(d) dim(G) 4
� II
[0 1 1
[0 00
3. (a) A � �
� �
(b) A o 2
1 1 1 1
510 DISCRETE STRUCTURES
4. (a) (b)
V2 V3
Hints
5. Here deg(A) = 3, deg(B) = 3, deg(C) = 4, deg(D) = 2, deg(E) = 2
Sum of degrees :::: 3 + 3 + 4 + 2 + 2 :::: 14
Also number of edges :::: 7
6. A graph G has an Euler path or 2 vertices have odd degree. A graph G has an Euler circuit
iff 0
if all the vertices are of even degree.
13. (a) Assume I E I > 1. If G has only one region (unbounded), then I R I = 1.
Since I E I > 1 => I E I �2
2 l E I � 3 l R l is true
GRAPHS 51 1
If I R I > 1, then each region is bounded by at least 3 edges. But in a planar graph, each edge
touches at most 2 region. Thus 2 I E I ;::.: 3 I R I
(b) From Part (a), we have
2 1 E I �3 1 R I � I R I <; "32 I E 1
I V I + I R I <; "32 I E I + I V I
I E I + 2 <; "32 I E I + I V I I Euler's formula
3 1 E I + 6 <; 2 I E I + 3 I V I
1 E 1 <; 3 1 V 1 - 6.
14. IfKSa3 is a planar graph, then we must have 2 I E I ;::.: 3 I R I . Where each region is bounded by
at le st three edges. But for K3, 3' each region is bounded by at least 4 edges . . We have
2 1 E I �4 1 R I
2 1 E 1 � 4 { I E 1 - 1 V 1 + 2) I Euler's formula
2 x 9 � 4 (9 - 6 + 2) For K3• 3 , 1 E 1 = 9, 1 V 1 = 6
18 ;::.: 20, a contradiction
Hence Ks, 3 is non-planar.
No, the graph does not contain Hamiltonian circuit. Since ;::.: n2 -Sn + 6 does not hold.
15. e
2
1 1 .51 . GRAPH COLOURING
Suppose that G = (y, E) is a graph with no multiple edges. A vertex colouring of G is an
assignment of colours to the vertices of G such that adjacent vertices have different colours. A
graph G is M·colourable if there exists a colouring of G which uses M·colours.
Proper Colouring, A colouring is proper if any two adjacent vertices and v have u
ILLUSTRATIVE EXAMPLES
Example 3. The chromatic number of graph cn' where cn is the cycle with n vertices is
either 2 or 3. (P.T.V., B.Tech. Dec. 20 1 3)
Sol. Two colours are needed to colour cn ' when n is even. To construct such a colouring,
simply pick a vertex and colour it black. Then move around the graph in clockwise direction
colouring the second vertex white, the third vertex black, and so on. The nth vertex can be
coloured white since the two vertices adjacent to it, namely the (n - l)th and the first are both
coloured black as shown in Fig. 1 1 . 1 70.
d
White
c Black
b White 9
Black White
a h
Fig. 11.170
When n is odd and n > 1, the chromatic number of cn is 3. To construct such a colouring,
pick an initial vertex. First use only two colours and alternate colours as the graph is tra
versed in a clockwise direction. However, the nth vertex reached is adjacent to two vertices of
different colours, the first and (n - l)th. Hence, a third colour is needed. (Fig. 1 1 .171)
GRAPHS 513
White
C Black Black e
b White White
Black Red
3 9
Fig. 11.171
Theorem I. The following are equivalent for a graph G :
(i) G is 2-colourable
(ii) G is bipartite
(iii) Every cycle of G has even length.
Proof. (i) => (ii)
If G is 2-colourable, then G has two sets of vertices V, and V2 with different colours, say,
red and blue respectively.
Since no vertices of VI or V2 are adjacent (being of same colour)
. . (VI' V) is a partition of G => G is bipartite.
(ii) => (iii)
Let G be bipartite and [VI' V2] be partition of vertices of G. Let x E V, be any vertex and
a cycle begins atx. Join this vertex to another vertex) say) y E V2 and then to a vertex in VI and
so on. This cycle will return to x E V, after it gets completed and will be of even length. (Since
G is a bipartite graph). Hence G has no odd cycle.
(iii) => (i)
Let each cycle in G is even. Let some vertex) say) x is coloured red) then its adjacent
vertex will have different colour) say, blue, and its adjacent vertex will have red colour because
every cycle has even length.
. . sequence of vertices of even cycles is RBR, RBRBR and so on.
Thus only two colours are used to colour the graph.
G is 2-colourable.
Example 4. Determine the chromatic number of the graphs shown in Fig. 1 1 . 1 72.
32 32
3, 3,
(a) (b)
Fig. 11.172
514 DISCRETE STRUCTURES
Sol. The graphs shown in Fig. l1.172(a), has the chromatic number X(G) = 2.
The graph shown in Fig. l1.172(b) has the chromatic number X(G) = 2, when n is an
even number and X(G) = 3, where n is odd.
Theorem II. Ifan undirected graph has a subgraph K3• then its chromatic number is at
least three.
Proof. Let G be an undirected graph. As G contains a complete graph K3, which is 3·
colourable. . . G cannot be coloured with one or two colours
IJf(G) :> 3.
Four Colour Theorem. Every planar graph is four colourable.
Five Colour Theorem. Every planar graph has chromatic number S 5.
Theorem III. The vertices of every planar graph can be properly coloured with five
colours.
Proof. We will prove this theorem by induction. All the graphs with 1, 2, 3, 4 or 5
vertices can be properly coloured with five colours. Now let us assume that every planar graph
with n - 1 vertices can be properly coloured with five colours. Next) if we prove that any planar
graph G with n vertices will require no more than five colours) we have done.
Consider the planar graph G with n vertices.
Since G is planar) it must have at least one vertex with degree five or less as shown in
theorem V. Assume this vertex to be 'u'.
Let G, be a graph of n - 1 vertices obtained from G by deleting vertex 'u'. The G, graph
requires no more than five colours (Induction hypothesis). Consider that the vertices in G,
have been properly coloured and now add to it 'u' and all the edges incident on u. If the degree
of u is 1, 2, 3, or 4, a proper colour to u can be easily assigned.
Now, we have one case left, in which the degree of u is 5, and all the 5 colours have been
used in colouring the vertices adjacent to u, as shown in Fig. 11.173.
V,
V
o
Colour 1 Colour 2
Colour 5
V2
V3
Colour 3
Colour 4
Fig. 11.173
Suppose that there is a path in G, between vertices Vo and v3 coloured alternately with
colours 1 and 4 as shown in Fig. 11.174.
GRAPHS 515
V
Colour 4 o
Colour 1
Colour 2
v4
Colour 5 u v2
Colour 3
Colour 1
Colour 4
V3
Colour 4
Colour 1
Fig. 11.174
Then a similar path between v, and v" coloured alternately with colours 5 and 3, can
not exist ; otherwise, these two paths will intersect and cause G to be non-planar.
Thus, ifthere is no path between v, and v, coloured alternately with colour 5 and 3 of all
vertices connected to v, through vertices of alternating colours 5 and 3. This interchange will
colour vertex v, with colour 5 and yet keep G, properly coloured. As vertex v, is still with
colour 5, the colour 3 is left over with which to colour vertex u which proves the theorem.
Example 5_ Consider the following graphs
R B
B B R
R R R B
B B R
1 1 .54. DIJKSTRA'S ALGORITHM FOR SHORTEST PATH (P.T. U., M.G.A. Dec. 2005)
This algorithm maintains a set of vertices whose shortest path from source is already
known. The graph is represented by its cost adjacency matrix, where cost being the weight of
the edge. In the cost adjacency matrix of the graph, all the diagonal values are zero. If there is
no path from source vertex Vs to any other vertex Vi' then it is represented by + In this
00.
3. Now, include that vertex in S which is nearest to V, and find shortest paths to all the
vertices through this vertex and update the values.
4. Repeat the step 3 until n - 1 vertices are not included in S if there are n vertices in
the graph.
After completion of the process, we get the shortest paths to all the vertices from the
source vertex.
Example 8. Find the shortest path between K and L in the graph shown in Fig. 11. 181
by using Dijkstra's Algorithm.
a 7 b
K�---+----�--���� L
c 6 d
Fig. 11.181
Sol. Step I. Include the vertex K in S and determine all the direct paths from K to all
other vertices without going through any other vertex.
S Distance to all other vertices
K a b d c L
K o 4(K) 2(K) 20(K)
Step II. Include the vertex in S which is nearest to K and determine shortest paths to
all vertices through this vertex and update the values. The nearest vertex is c.
Since) n 1 vertices included in S. Hence we have found the shortest distance from K to
-
Example 9. Find the shortest path between a and z in the graph shown in Fig. 1 1 . 1 82.
b 3 e
2 2
a z
c
4 2 3
d 4
Fig. 11.182
Sol. Step I. Include the vertex a in S and determine all the direct paths from a to all
other vertices without going through any other vertices.
S Distance to all other vertices
a a b c d e f z
Step III. Include the vertex in S which is 2nd nearest to S and determine shortest path
to all the vertices through this vertex. The 2nd nearest vertex is b.
S Distance to all other vertices
a, b c, a b c d e f z
14
23
s
20�� __oo__
__��
Fig. 11.183
Sol. Let S be the set of vertices of the given weighted graph. i.e., S = {s, a, b, c, d, t} as
shown in the Fig. 11.184.
Fig. 11.184
Step I. Include the vertex s in S and determine all the direct paths from s to all other
vertices without going through any other vertex.
S Distance to all other vertices
s a b c d
8 o 23(8) 20(s)
Step II. Include the vertex in S which is nearest to s and determine shortest paths to
all vertices through this vertex and update the values. The nearest vertex is C.
S Distance to all other vertices
s a b c d
s, c o 23(s) 39 (s,c) 20(s) 42(s, c)
Step III. The vertex which is 2nd nearest to 8 is a. Include this vertex in S
S Distance to all other vertices
s a b c d
S, C,
a o 23(s) 37(s, a) 20(s) 42(s, c)
Step IV. The vertex which is 3rd nearest to s is b. Include this vertex in S.
S Distance to all other vertices
s a b c d
S, c, a, b o 23(8) 37(s, a) 20(s) 40(8, a) 63(s, a, b)
GRAPHS 521
Step V. The vertex which is next nearest to s is (d). Include this vertex in S.
S Distance to all other vertices
s a b c d
S,c, a, b, d o 23(s) 37(s, a) 20(s) 40(s, a) 63(s, a, b)
Since n - 1 = S vertices are included in S. Hence we have found the shortest distance
from s to all other vertices. Thus, the shortest distance between s and t is 63 and the shortest
path is s, a, b, t.
Example 11. Show that e :> 3 V - 6 for the connected planar graphs shown in Figs.
1 1 .185 and 11. 186.
(a) (b) 0
*
(d)
2. Find the shortest path, by using either Breadth first search or Dijkstra's algorithm, from P to Q
in the following weighted graph.
4. Find the shortest path and its length from to by using Dijkstra's algorithm in the following
s t
graph.
(a)
A 3 D 4
C 6 F 4
(b)
a 7 b
2
s 3
e 6
3
c 4 d
Answers
L (a) 3 (b) 3 (c) 3 (d) 3 (e) 2 (j) 4 (g) 2 2. P Aj A2 A, A3 A6 Q.
3. 2 4. (a) s - A - D E H
- - - t. length = 13
(b) r- C - d - t.
GRAPHS 523
In what order do the nodes get included into the set of vertices for which the shortest
path distances are finalized?
(a) 0, 1, 2, 3, 4 (b) 0, 4, 1, 3, 2
(c) 0, 4, 3, 2, 1 (d) 0, 1, 4, 3, 2
8. How many edges are there in a graph with 20 vertices and the sum of the degrees (in·
degree and out·degree) is 100?
(a) 50 (b) 100
(c) 20 (d) 40
524 DISCRETE STRUCTURES
9. If G is a directed graph with 10 vertices, how many Boolean values will be needed to
represent G using an adjacency matrix?
(a) 50 (b) 100
(c) 200 (d) 1000
10. Which of the following is Not TRUE about the directed graphs?
(a) If a digraph is reflexive, then the diagonal elements of the adjacency matrix are 1.
(b) If G is a simple digraph whose adjacency matrix is A then the adjacency matrix of
GC, is the transpose of A.
(c) The diagonal elements of A . AT show the out degree of the vertices.
(d) The adjacency matrix of a directed graph is a symmetric matrix.
Answers and Explanation
1. (d) The self loop is counted twice, when degree is counted.
2. (c) The number of edges in a complete graph is n(n - 1)/2
3. (b) A complete bipartite graph having m :> 3 and n :> 3 is not a planar graph.
4. (b) The chromatic number of a complete graph of n vertices is n.
5. (c) K3• 3 has Hamiltonian circuit.
6. (b) The in·degree and out·degree is same as the number of edges.
7. (b) Apply the algorithm and it will be 0, 4, 1, 3, 2
8. (a) One edge contributes two degree.
9. (b) The adjacency matrix is of N x N dimension, where n is the number of vertices.
10. (d) The adjacency matrix of a directed graph is not a symmetric matrix.
12 TREES
1 2. 1 . INTRODUCTION
In this chapter. we will discuss a special class of graphs. called trees. The concept of
trees is frequently used in both mathematics and sciences. To understand the concept of trees)
it is essential to know the various common types of trees. Their basic properties and applica
tions.
1 2.2. TREE
A graph which has no cycle is called an acyclic graph. A tree is an acyclic graph or graph
having no cycles.
A tree or general tree is defined as a non-empty finite set of elements called vertices or
nodes having the property that each node can have minimum degree 1 and maximum degree
n. It can be partitioned into n + 1 disjoint subsets such that the first subset contains the root
of the tree and the remaining n subsets contains the elements of the n subtree. (Fig. 12.1)
525
526 DISCRETE STRUCTURES
Directed trees
Fig. 12.2
Fig. 12.3
The node which has outdegree 0 is called an external node or a terminal node or a leaf.
The nodes which has outdegree greater than or equal to one are called internal nodes or branch
nodes.
1 2.4. ORDERED TREES
If in a tree at each level) an ordering is defined, then such a tree is called an ordered
tree.
e.g., the trees shown in Figs. 12.4 and 12.5 represent the same tree but have different orders.
2 3 4 5 6 7 8 Players
Fig. 12.6
Proof. We know that T is a connected graph, in which there must exist at least one
path between every pair of vertices. Now assume that there exists two different paths from
some node a to some node b of T. The union of these two paths will contain a cycle and therefore
T cannot be a tree. Hence, there is only one path between every pair of vertices in a tree.
1 2.7. FOREST
If the root and the corresponding edges connecting the nodes are deleted from a tree, we
obtain a set of disjoint trees. This set of disjoint trees is called a forest. (Fig. 12.7b)
1 2.8. BINARY TREE
If the outdegree of every node is less than or equal to 2, in a directed tree then the tree
is called a binary tree. A tree consisting of no nodes (empty tree) is also a binary tree.
1 2.9. BASIC TERMINOLOGY
(a) Root. A binary tree has a unique node called the root of the tree.
(b) Left Child. The node to the left of the root is called its left child.
(c) Right Child. The node to the right of the root is called its right child.
(d) Parent. A node having left child or right child or both is called parent of the nodes.
(e) Siblings. Two nodes having the same parent are called siblings.
if) Leaf. A node with no children is called a leaf. The number of leaves in a binary tree
can vary from one (minimum) to half the number of vertices (maximum) in a tree.
(g) Ancestor. If a node is the parent of another node, then it is called ancestor of that
node. The root is an ancestor of every other node in the tree.
(h) Descendent. A node is called descendent of another node if it is the child of the
node or child of some other descendent of that node. All the nodes in the tree are descendents
of the root.
(i) Left Subtree. The subtree whose root is the left child of some node is called the left
subtree of that node.
(j) Right Subtree. The subtree whose root is the right child of some node is called the
right subtree of that node.
(k) Level of a Node. The level of a node is its distance from the root. The level of root is
defined as zero. The level of all other nodes is one more than its parent node. The maximum
number of nodes at any level N is 2N
(l) Depth or Height of a Tree. The depth or height of a tree is defined as the maximum
number of nodes in a branch of tree. This is one more than the maximum level of the tree i.e.,
the depth of root is one. The maximum number of nodes in a binary tree of depth d is 2d - 1,
where d :> 1.
(m) External Nodes. The nodes which has no children are called external nodes or
terminal nodes.
(n) Internal Nodes. The nodes which has one or more than one children are called
internal nodes or non-terminal nodes.
Theorem II. Let G be a graph with more than one vertex. Then the following are equiva-
lent :
(i) G is a tree.
(ii) Each pair of vertices is connected by exactly one simple path.
(iii) G is connected, but if any edge is deleted then the resulting graph is not connected.
TREES 529
(iv) G is cycle tree, but if any edge is added to the graph then the resulting graph has
exactly one cycle.
Proof. To prove this theorem, we prove that (i) => (ii), (ii) => (iii), (iii) => (iv) and finally
(iv) => (i). The complete proof is as follows :
(i) ::::::} (ii) Let us assume two vertices u and v in G. Since G is a tree, so G is connected
and there is at least one path between u and v. More over, there can be only one path between
u and v, otherwise G will contain a cycle.
(ii) => (iii) Let us delete an edge e = (u, v) from G. It means e is a path from u to v.
Suppose the graph result from G e has a path p from u to v. Then P and e are two distinct
-
paths from u to v, which is a contradiction of our assumption. Thus, there does not exist a path
between u and v in G e, so G e is disconnected.
- -
(iii) => (iv) Let us suppose that G contains a cycle c which contains an edge e = {u, v}. By
hypothesis, G is connected but G' = G e is disconnected with u and v belonging to different
-
components of G'. This contradicts the fact that u and v are connected by the path P = C e, -
To prove this.
Proof. We use induction on the number of vertices n of G.
Let us assume n = 1 i.e., G has only one vertex. Then G has 0 edges and so G is con·
nected and cycle free. Thus the theorem holds for n = 1.
Now, assume that n > 1 i.e., G has more than one vertex. Assume that (i), (ii) and (iii)
are equivalent for all graphs with less than n vertices.
We have to show that they are equivalent for G.
(i) => (ii) Suppose G is a tree. Then G is cycle free, so we have to show only that G has
n 1 edges. We know that G has a vertex of degree 1. Deleting this vertex and its edge, we
-
obtain a tree T which has n 1 vertices. Thus the theorem holds for T, so T has n 2 edges.
- -
(ii) => (iii) Suppose G is cycle free and has n 1 edges. We have to show only that G is
-
connected. Suppose G is disconnected and has k components) T T2) ... , Tk' which are trees
l'
since each is connected and cycle free, i.e., Ti has ni vertices and ni < n. Hence the theorem
holds for Ti, so Ti has ni 1 edges. Thus,
-
530 DISCRETE STRUCTURES
n = n1 + n2 + ... + n k
and n 1 = (n , 1) + (n2 1) + ... + (n k 1)
- - - -
= n1 + n2 + ... + nk k = n k
- -
Hence k = 1. But it contradicts our assumption that G is disconnected and has k > 1
components. Hence G is connected.
(iii) => (i) Suppose G is connected and has n 1 edges. We have to show only that G is
-
cycle free. Suppose G has a cycle containing an edge e. Deleting e, we obtain the graph H =
G e) which is also connected.
-
But H has n vertices and n 2 edges and therefore must be disconnected. Thus G is
-
I ILLUSTRATIVE EXAMPLES
Example 1. For the tree as shown in Fig. 12.8.
(i) Which node is the root ?
(ii) Which nodes are leaves ?
(iii) Name the parent node of each node.
Fig. 12.8
Sol. (i) The node A is the root node.
(ii) The nodes G, H, I, L, M, N, 0 are leaves.
(iii) Nodes Parent
B, C A
D, E B
F C
G, H D
I, J E
K F
L, M J
N, O K
TREES 531
Fig. 12.9
(i) List the children of each node. (ii) List the siblings.
(iii) Find the depth of each node. (iv) Find the level of each node.
Sol. (i) The children of each node is as follows :
Node Children
A B, C
B D, E
C F
D G, H
E I, J
F K
K L, M
(ii) The siblings are as follows :
Siblings
B and C
D and E
G and H
I and J
L and M are all siblings.
(iii) Node Depth or Height
A 1
B, C 2
D, E, F 3
G) H, I, J, K 4
L, M 5
(iv) Node Level
A o
B, C 1
D, E, F 2
G, H, I, J, K 3
L, M 4
532 DISCRETE STRUCTURES
Example 3. Show that if in a graph G there exists one and only one path between every
pair of vertices, then G is a tree.
Sol. The graph G is connected since there is a path between every pair of vertices. A
cycle in a graph exists if there is at least one pair of vertices (vp v2) such that there exist two
distinct paths from v , to v 2 • But the graph G has one and only one path between every pair of
vertices. Thus) G contains no cycle. Hence) G is a tree.
Example 4. Draw two different binary trees with five nodes having only one leaf
Sol. The two trees out of many possible trees with five nodes having only one leaf is
shown in Fig. 12.10.
(i) (ii)
Fig. 12.10
Example 5. (a) Draw two different binary trees with five nodes having maximum number
of leaves.
(b) Let T be a tree with n vertices. Determine the number ofleafnodes in a tree.
(P.T.U. B.Tech. Dec. 2008)
Sol. (a) There are many possible trees, out of which two different binary trees are shown
in Fig. 12.11.
(i) (ii)
Fig. 12.11
(b) Given T is a binary tree with n vertices.
Therefore, the tree with n vertices has
(n - 1) edges. Also, if L denotes the number of leaves and I be the number of internal nodes,
then
n=L+1
n -1
But 1= --
2
Using (2) in (1), we have
n -1 n -1 2n - n +1 n +1
n=L+ -- => L=n- --
2 2 2 2
Example 6. (a) How will you differentiate between a general tree and a binary tree ?
(b) Define a rooted tree with an example and show how it may be viewed as directed
graph.
TREES 533
Sol. (a)
4
4
(i) (ii)
Fig. 12.12
(b) Rooted tree: We first define the term 'directed tree' . A directed graph is said to be a
directed tree if it becomes a tree when the directions of the edges are ignored. For example,
the Fig. 12.13 is a directed tree.
> <E
�
�
Directed tree
Fig. 12.13
A directed tree is called a rooted tree if there is exactly one vertex whose incoming
degree is 0 and incoming degree of all other vertices are 1 . The vertex with incoming degree 0
is called the root of the rooted tree. The Fig. 12.14 is an example of a rooted tree.
Rooted tree
Fig. 12.14
534 DISCRETE STRUCTURES
In a rooted tree) a vertex whose outgoing degree is 0 is called a leaf or a terminal code
and a vertex whose outgoing degree is non zero, is called a branch node or an internal node.
Rooted tree may be viewed as directed graph. We know that a tree is a graph
which is connected and without any cycles. A rooted tree T is a tree with a designated vertex r)
called the root of the tree. Since there is a unique simple path from the root r to any other
vertex v in T, this determines a direction to the edges of T. Thus T may be viewed as a directed
graph.
*
Example 7. Construct the binary expression tree for the expression (a + b) (die).
Sol. The binary expression tree for the expression (a + b) * (die) is shown in Fig. 12.15.
*
Fig. 12.15
Fig. 12.16
Fig. 12.17
Sol. The value of expression tree is 7.
1 2. 1 1 . COMPLETE BINARY TREE
Complete binary tree is a binary tree if all its levels, except possibly the last, have the
maximum number of possible nodes as for left as possible. The depth of complete binary tree
having n nodes is log2 n + 1 .
For example : The tree shown in Fig. 12.18 is a complete binary tree.
Fig. 12.18
1 2. 1 2. FULL BINARY TREE
Full binary tree is a binary tree in which all the leaves are on the same level and every
non·leaf node has two children.
Fig. 12.19
536 DISCRETE STRUCTURES
For example : The tree shown in Fig. 12.19 is a full binary tree.
Theorem I. Prove that the maximum number of nodes on level n of a binary tree is 2n,
where n ;::: O.
Proof. This can be proved by induction.
Basis ofInduction. The only node at level n = 0 is the root node. Thus, the maximum
number of nodes on level n = 0 is 2° = 1.
Induction Hypothesis. Now assume that it is true for levelj, where n ?-j ?- O. There·
fore) the maximum no. of nodes on levelj is 2'.
Traversing means to visit all the nodes of the tree. There are three standard methods to
traverse the binary trees. These are as follows :
1. Preorder traversal 2. Postorder traversal
3. Inorder traversaL
1. Preorder traversal. The preorder traversal of a binary tree is a recursive process.
The preorder traversal of a tree is
(i) Visit the root of the tree.
(ii) Traverse the left subtree in preorder.
(iii) Traverse the right subtree in preorder.
2. Postorder traversal. The postorder traversal of a binary tree is a recursive process.
The postorder traversal of a tree is
(i) Traverse the left subtree in postorder.
(ii) Traverse the right subtree in postorder.
(iii) Visit the root of the tree.
3. Inorder traversal. The inorder traversal of a binary tree is a recursive process. The
inorder traversal of a tree is
(i) Traverse in inorder the left subtree.
(ii) Visit the root of the tree.
(iii) Traverse in inorder the right subtree.
Example 10. Determine the preorder, postorder, and inorder traversal of the binary tree
as shown in Fig. 12.20.
10
Fig. 12.20
538 DISCRETE STRUCTURES
Sol. The preorder, postorder and inorder traversal of the tree is as follows :
Preorder 1 2 3 4 5 6 7 8 9 10 11
Postorder 3 5 4 2 7 10 9 11 8 6 1
Inorder 3 2 5 4 1 7 6 9 10 8 11.
Example 1 1. Give the preorder, inorder and postorder traversals of the tree shown in
Fig. 12.21.
Fig. 12.21
Sol.
Preorder A, B, D, H, I, E, C, F, J, K, G, L, M
Inorder H, D, I, B, E, A, J, F, K, C, G, L, M
Postorder H, I, D, E, B, J, K, F, M, L, G, C, A.
1 2.14. ALGORITHMS
(a) Algorithm to Draw a Unique Binary Tree When Inorder and Preorder Traversal
of the Tree is Given
1. We know that the root of the binary tree is the first node in its preorder. Draw the
root of the tree.
2. To find the left child of the root node, first use the inorder traversal to find the nodes
in the left subtree of the binary tree. (All the nodes that are left to the root node in the inorder
traversal are the nodes of the left subtree). After that the left child of the root is obtained by
selecting the first node in the preorder traversal of the left subtree. Draw the left child.
3. In the same way, use the inorder traversal to find the nodes in the right subtree of
the binary tree. Then the right child is obtained by selecting the first node in the preorder
traversal of the right subtree. Draw the right child.
4. Repeat the steps 2 and 3 with each new node until every node is not visited in preorder.
Finally) we obtain the unique tree.
Example 12. Draw the unique binary tree when the inorder and preorder traversal is
given as follows :
Inorder B A D C F E J H K G I
Preorder A B C D E F G H J K I.
TREES 539
Sol. We know that the root of the binary tree is the first node in preorder traversal.
Now check A, in the inorder traversal, all the nodes that are left of A, are nodes of left subtree
and all the nodes that are right of A, are nodes of right subtree. Read the next node in preorder
and check its position against the root node, if it is left of root node, then draw it as left child,
otherwise draw it as right child. Repeat the above process for each new node until all the
nodes of preorder traversal are read and finally we obtain the binary tree as shown in Fig. 12.22.
Fig. 12.22
Example 13. Draw the unique binary tree when the following is given :
Inorder d b h e a f c ] g
Preorder a b d e h c f g ]
Sol. Thefirst node In preorder is a and hence a is the root node. Unique binary tree
is shown in Fig. 12.23.
Fig. 12.23
Example 14. Draw the unique binary tree when inorder andpreorder traversal of tree is
given as follows :
Preorder 10 9 8 7 6 5 4 3 2 1
Inorder 10 8 9 7 6 4 5 2 3 1
540 DISCRETE STRUCTURES
10
Fig. 12.24
Repeat the above process for each new node and we obtain the binary tree as shown in
Fig. 12.25.
13
Fig. 12.25
Example 16. Draw the binary tree when Inorder and Postorder traversal is given :
Inorder m k n ] o u s v q p r
Postorder m n k o u v s q r p I J.
Sol. We know that the last node in Postorder is the root node. hence j is the root. Now
applying the algorithm as above, we obtain the tree shown in Fig. 12.26.
Fig. 12.26
Example 17. Draw the unique binary tree when inorder andpreorder traversal oftree is
given as follows :
* * *
Inorder 3 a + b 6 c + d
* * *
Preorder + 3 a b + 6 c d
Sol. Unique binary tree is shown in Fig. 12.27.
542 DISCRETE STRUCTURES
Fig. 12.27
Example 18. Draw the binary expression tree, when inorder and postorder traversal of
the tree is given as follows :
*
Postorder k -m + n p q r t-I +
* *
Inorder k I +m n p + qlr
Sol. Binary expression tree is shown in Fig. 12.28.
•
Fig. 12.28
(c) Algorithm to Convert General Tree into the Binary Tree
1. Starting from the root node, the root of the tree is also the root of the binary tree.
2. The first child C , (from left) of the root node in the tree is the left child C, of the root
node in binary tree and the sibling of the C , is the right child of C , and so on.
3. Repeat the step 2 for each new node.
Example 19. Convert the following tree as shown in Fig. 12.29 into binary tree.
Q
Fig. 12.29
TREES 543
Sol. The root of the tree is the root of the binary tree. Hence A is the root of the binary
tree. Now B becomes the left child of A in binary tree, C becomes the right child of B, D
becomes right child of C and E becomes right child of D in the binary tree and similarly
applying the algorithm we obtain the binary tree as shown in Fig. 12.30.
Fig. 12.30
Example 20. Convert the general tree as shown in Fig. 12.31 into binary tree.
Fig. 12.31
Sol. The root node 1 in general tree is the root node of the binary tree. Now applying the
above algorithm we obtain the binary tree as shown in Fig. 12.32.
544 DISCRETE STRUCTURES
7
8
13
Fig. 12.32
Example 21. Convert the forest shown in Fig. 12.33 into binary tree.
Fig. 12.33
Sol. The root of the binary tree is the root node of the first tree (from left) and the root
node of the second tree becomes the right son of the root node in binary tree and the root node
TREES 545
Fig. 12.34
of the third tree becomes the right son of the right son in binary tree. Repeat this procedure for
each level and we obtain the binary tree as shown in Fig. 12.34.
Fig. 12.35
Example 22. Show the binary search tree after inserting 3, 1, 4, 6, 9, 2, 5, 7 into an
initially empty binary search tree.
Sol. The insertion of the above nodes in the empty binary search tree is shown in
Fig. 12.36.
I A
Insert 3
(i)
Insert 1
(ii)
Insert 4
(iii)
~
Insert 6
(iv)
Fig. 12.36
TREES 547
Example 23. Show the binary tree shown in Fig. 12.36 (viii) after deleting the root node.
Sol. To delete the root node, first replace the root node with the closest element of the
root. For this, first move one step left and then to the right as far as possible to the node. Then
delete the replaced node. The tree after deletion is shown in Fig. 12.37.
Fig. 12.37
Example 24. A binary search tree contains the values 1, 2, 3, 4, 5, 6, 7, 8, 9. The tree is
traversed in pre-order and the values are printed out. Determine the sequence of the print out
values.
Sol. First of all draw the binary search tree shown in Fig. 12.38.
Now traverse the tree in pre-order and get the output as below 1) 2) 3) 4) 5) 6) 7) 8) 9.
Fig. 12.38
Example 25. A binary search tree is generated by inserting in order thefollowing integers :
50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24.
Determine the number of nodes in the left subtree and right subtree of the root.
548 DISCRETE STRUCTURES
Sol. First of all draw the binary search tree as shown in Fig. 12.39.
I A
15 15 62
5
(i) (ii) (iii) (iv) (v) (vi)
50 50
24
(x) (xi)
Fig. 12.39
Thus, the number of nodes in left subtree of the root is 7 and right subtree of the root is 4.
Example 26. Consider the binary tree as shown in Fig. 12.40. Draw the binary tree for
each of the following operations, if applied to the binary tree.
(i) Delete the node V (ii) Delete the node E
(iii) Delete the root node R.
Fig. 12.40
TREES 549
Sol. (i) The binary tree after deleting node V is shown in Fig. 12.41.
(ii) The binary tree after deleting node E is shown in Fig. 12.42.
(iii) The binary tree after deleting root node R is shown in Fig. 12.43.
Example 27. Draw all the spanning trees of the graph G shown in Fig. 12.44.
A E
A E A E A E
Consider a connected weighted graph G = (V. E). A minimal spanning tree T of the
graph G is a tree whose total weight is smallest among all the spanning trees of the graph G.
The total weight of the spanning tree is the sum of the weights of the edges of the spanning
trees.
The minimum weight of the spanning tree is unique but the spanning tree may not be
unique because more than one spanning tree are possible when more than one edges exist
having the same weight.
Theorem IV. Prove that a simple graph is connected iff it has a spanning tree.
This algorithm finds the minimum spanning tree T of the given connected weighted
graph G.
1. Input the given connected weighted graph G with n vertices whose minimum span-
ning tree T) we want to find.
2. Order all the edges of the graph G according to increasing weights.
3. Initialise T with all vertices but do not include any edge.
4. Add each of the graph G in T which does not form a cycle until n - 1 edges are added.
Example 28. Determine the minimum spanning tree of the weighted graph shown in
Fig. 12.46.
A 6 B 5 C
4 4
2
D 6 E 5 F
Fig. 12.46
TREES 551
Sol. Using KruskaY s algorithm, arrange all the edges of the weighted graph in increasing
order and initialise spanning tree T with all the six vertices of G. Now start adding the edges
of G in T which do not form a cycle and having minimum weights until five edges are not
added as there are six vertices. (Fig. 12.47).
Edges Weights Added or Not Minimum Spanning Tree
(B, E) 2 Added
A B 5 c
(C, D) 3 Added
(A, D) 4 Added 3
(C, F) 4 Added 4 4
(B, C) 5 Added 2
(E, F) 5 Not added
(A, B) 6 Not added D E F
(D, E) 6 Not added Fig. 12.47
(A, F) 7 Not added.
Example 29. Write a shortnote on Prim's and Kruskal's algorithms and execute them
by giving a suitable example. (P.T.U. B.Tech. May 2008)
Sol. Prim's Algorithm. Let R be a symmetric and connected relation with n vertices.
The Prime's algorithm involves the following steps.
Step I. Choose a vertex v, of R. Let V = {v,} and E = { }
and for which the edge (V i ' V) does not form a cycle with members of E. Add
Step II. Choose a nearest neighbour Vi of V which is adjacent to Vj where Vi' Vj E V
V to V and (V ' V) to E.
i i
Step III. Repeat the step II until we get E = n 1 -
Then V contains all n vertices of R and E contains the edge of a minimum spanning tree
for R.
Example 30. We /ind the minimal spanning tree for the graphR shown below (Fig. 12. 48).
B
3 C A B
c D D
4
E
F
F
(i) ( i,)
Fig. 12.48
Sol. This graph R [Fig. 12.48(i)] has 6 vertices, namely, A, B, C, D, E, F. Therefore, any
spanning tree of R will have 5 edges. By Prim's algorithm, the edges are ordered by decreasing
lengths and are successively deleted (without disconnecting R) until we have five edges remain.
This gives the following data.
552 DISCRETE STRUCTURES
Edges AF BC AC BE CE BF AE DF BD
Length 9 8 7 7 6 5 4 4 3
Deleted edges ./ ./ ./ X X ./ X X X
Hence the minimal spanning tree of R will contains the edges {BE, CE, AE, DF, BD}.
This spaning tree has length 24 as shown in Fig. 12.48(ii) .
Kruskal's algorithm. Let R be a symmetric and connected relation with n vertices
and let S = [e" e2 , ... , ek] be the set of weighted edges ofR.
The Kruskal "algorithm involves the following steps".
Step I. Choose an edge e, in S of least weight. Let E = {e,}. Replace S with S - {e}
Step II. Select an edge in S of least weight that will not make a cycle with members of
{e) and S with S - {eJ
Step III. Repeat step II until we get E = n - 1
Example 31. Consider the graph R as shown below (Fig. 12.49). We find the minimal
spanning tree ofR.
A B B
9 6
C B
4 9
G
F 6 G F
()
, (ii)
Fig. 12.49
Sol. The graph R [Fig. 12.49(i)] has 7 vertices namely A, B, C, D, E, F and G. Therefore,
any spanning tree of R will have 6 edges. By Kruskal is algorithm, the edges are odered by
increasing length and are successively added (without forming any cycle) until 6 edges are
included. This gives the following data.
Edges CD CF DG DF BC BE FG DE AB BD AC EG
Length 4 4 4 5 6 6 6 7 8 8 9 9
Added edges ./ ./ ./ X ./ ./ X X ./ X X X
Therefore, the minimal spanning tree ofR will contain the edges {CD, CF, DG, BC, BE,
AB}. The minimum spanning tree of the graph [Fig. 12.49(i)] is shown in Fig. 12.49(ii).
Example 32. Find a minimum spanning tree of the labelled connected graph shown in
Fig. 12. 50.
A B
3
C D
E F
Fig. 12.50
TREES 553
Sol. Using KRUSKAL'S ALGORITHM, arrange all the edges of the graph in increasing
order and initialize spanning tree with all the vertices of G. Now, add the edges of G in T
which do not form a cycle and have minimum weight until n 1 edges are not added) where n
-
a d 3 e
6 2
2
b 3 c
Fig. 12.52
Sol. There are total three spanning trees ofthe graph G which are as shown in Fig. 12.53.
a d 3 e a d 3 e a d 3 e
- --"--... ---"--....
2 6 6 2
2 2 2
b 3 c b 3 c b c
(i) (ii) (iii)
Fig. 12.53
To find the minimal spanning tree, use the KRUSKAL' S ALGORITHM. The minimal
spanning tree is shown in Fig. 12.54.
554 DISCRETE STRUCTURES
2
(B, C) 3 Added
2
(D, E) 3 Added
(B, D) 6 Not added.
The first one is the minimal spalUling having the mini
mum weight = I I . b 3 c
Example 34. What are the properties of minimum
spanning tree. Fig. 12.54
Sol. Properties of Minimum spanning tree
A minimum spanning tree T of a graph G is a tree whose total weight is the smallest
among all the spanning trees of the graph G. It has the following properties.
(i) The total weight of the spanning tree is the sum of the weights of the edges of the
spanning trees.
(ii) The minimum weight of the spanning tree is unique.
L Draw all trees with exactly six vertices. (P.T. U. B. Tech. Dec. 2013)
2. Draw all trees with five or fewer vertices.
3. Find the number of trees with seven vertices.
4. Find a minimum spanning tree of the weighted graph shown below :
A B
E F
5. Find all spanning trees of the graph shown below :
6. Find all spanning trees of the graph shown in the following figure.
TREES 555
7. Find the minimal spanning tree of the following graph
A
(a) C D (b)
G
(c) Find the minimal spanning tree T for the weighted graph shown below :
2
2 2 2
2
3 3 3
Show that the sum of the degrees of the vertices of a tree with vertices is
3 3
8. n 2n -2.
Answers
L There are six such trees shown below :
t AD
4. C
W .A
F E
556 DISCRETE STRUCTURES
V "'V � V
(v) (vi) (vii) (viii)
6. There are twelve such spanning trees shown below.
A B
7. (a) (b)
G
F
1.
Answers and Explanations
(a) Apply the algorithm and check.
2. (a) External nodes in a tree are one more than internal nodes.
3. (b) The maximum number of nodes in a binary tree at depth d is one less than 2"-
4. (a) The number of external nodes is one more than number of internal nodes.
5. (d) The number of edges needed to connect vertices of a tree is one less than the number
of vertices.
6. (d) Draw the tree and see.
7. (b) The level of the tree is one less than its height.
S. (a) First the left subtree, then right subtree and then root.
10.
9. (c) Inorder traversal of EST gives nodes in ascending order.
(c) Preorder traversal of EST gives nodes in original order.
3 * PROPOSITIONAL
1 CALCULUS
P q -q pA-q -(p A - q)
T T F F T
T F T T F
F T F F T
F F T F T
Fig. 13.1
ILLUSTRATIVE EXAMPLES
Fig. 13.2
560 DISCRETE STRUCTURES
(ii) p q r p Aq q Ar r Ap (P A q) v (q A r) v (r A p)
T T T T T T T
T T F T F F T
T F F F F F F
T F T F F T T
F T T F T F T
F F T F F F F
F T F F F F F
F F F F F F F
Fig. 13.3
(iii) p q -p -q (- p) v (- q)
T T F F F
T F F T T
F T T F T
F F T T T
Fig. 13.4
(iv) p q r p vqvr
T T T T
T T F T
T F F T
T F T T
F T T T
F F T T
F T F T
F F F F
Fig. 13.5
Truth tables are used to determine the truth or falsity of the combined proposition.
p q P Aq
T T T
T F F
F T F
F F F
Fig. 13.6. Truth Table ofp A q.
2. Disjunction. It means ORing of two statements. Assume p and q be two proposi·
tions. Disjunction of p and q to be a proposition which is true when either one or both p and q
are true and is false when both p and q are false. It is denoted by p v q. (Fig. 13.7)
p q p vq
T T T
T F T
F T T
F F F
Fig. 13.7. Truth Table ofp v q.
3. Negation. It means opposite of original statement. Assume p be a proposition. Nega·
tion of p to be a proposition which is true when p is false) and is false when p is true. It is
denoted by - p. (Fig.13.S)
p -p
T F
F T
Fig. 13.8. Truth Table of - p.
Example 2. Consider the following :
p : He is rich
q : He is Generous.
Write the proposition which combines the proposition p and q using conjunction (A),
disjunction (v), and negation (-).
Sol. Conjunction. He is rich and generous i.e., p A q.
Disjunction. He is rich or generous i.e., p v q.
Negation. He is not rich i.e., - p
He is not generous i.e., q.,...,
3. XOR. Assume p and q be two propositions. XORing ofp and q is true if p is true or if
q is true but not both and vice versa. It is denoted by p EB q. (Fig. 1 3 . 1 1)
p q P ffi q
T T F
T F T
F T T
F F F
Fig. 13.11.
T T F F F F F F
T F T T F T F T
F T T F T F T T
F F F T T F F F
Fig. 13.14
564 DISCRETE STRUCTURES
As the truth table for both the proposition are same.
X EB Y = (X 1\ - Y) V ( X 1\ Y). Hence proved.
-
I. Idempotent Laws
(i) p v p = P (ii) p /\ p = p
II. Associative Laws
(i) (p v q) v r = p v (q v r) (ii) (p /\ q) /\ r = p /\ (q /\ r)
III. Commutative Laws
(i) p v q = q v P (ii) p /\ q = q /\ P
IV. Distributive Laws
(i) p v (q /\ r) = (p v q) /\ (p V r) (ii) p /\ (q V r) = (p /\ q) V (p /\ r)
V. Identity Laws
(i) p v f = p (ii) p /\ t = p
(iii) p v t = t (iv) p /\ f= f
where t denotes the true value and f denotes the false value.
VI. Complement Laws
(i) p v - p = t (ii) p /\ - P = f
(iii) - - p = P (iv) - t = f, - f = t
VII. De Morgan's Laws
(i) - p(v q) = - P /\ - q (ii) - (p /\ q) = - p v - q
Example 9. Show by using laws of algebra ofpropositions, the logical equivalence of
(p v q) /\ -P = - P /\ q.
Sol. (p v q) /\ - P = - P /\ (p V q) I Commutative law
= (- P /\ p) V (- P /\ q) I Distributive law
= f v (- p /\ q) I Complement law
= - P /\ q I Identity law
Example 10. Show that p v (p /\ q) = p by using laws of algebra ofpropositions t
Sol. p v(p /\ q) = (p /\ t) v (p /\ q) I Identity law
= P /\ (t v q) I Distributive law
= P /\ t Identity law
=p I Identity law
Example 11. Use the laws of algebra of logic propositions, show that
- (p v q) v (- P /\ q) = - p.
Sol. - (p v q) v (- P /\ q) = (- P /\ - q) V (- P /\ q) I De Morgan's law
= - P /\ (- q V q) I Distributive law
CO - P A t Complement law
= -p I Identity law.
566 DISCRETE STRUCTURES
rn rn
F F
T F F T
F T T F
F F T T
Fig. 13.18
As, the values in both cases are same, hence both propositions are equivalent.
Example 13. Show that proposition q --; p and - p --; - q is not equivalent to p --; q.
Sol. Construct truth table for all the above propositions :
p q -p -q p --> q q -->p - p --> - q
T T F F T T T
T F F T F T T
F T T F T F F
F F T T T T T
Fig. 13.19
As the values of p --; q in table is not equal to q --; p and - p --; - q as in Fig. 13.19. So
both of them are not equal to p --; q but they are themselves logically equivalent.
Example 14. Prove that the following propositions are equivalent to p --; q.
(i) - (p 1\ - q) (ii) - p v q (iii) - q --; - p.
Sol. Construct the truth table for all the above propositions :
p q -p -q -p v q - q --> -p (p 1\ - q) - (p 1\ - q) p --> q
T T
rn rn rn rn
F F F
T F F T T
F T T F F
F F T T F
Fig. 13.20
In the above table (Fig. 13.20) the values ofp --; q is equivalent to (i), (ii) and (iii), hence
they are equivalent to p --; q. Hence proved.
2. Biconditional. Statements of the form "if and only if" are called biconditional state
ments.
PROPOSITIONAL CALCULUS 567
It is denoted as p H q and read as "p if and only if q". The proposition p H q is true if
p and q have the same truth values and is false ifp and q do not have the same truth values.
Fig. 13.21. The name of biconditional comes from the fact that p H q is equivalent to (p --; q)
/\ (q --; pl·
The truth table of p H q is
p q pHq
T T T
T F F
F T F
F F T
Fig. 13.21. Truth Table of p H q.
For example : (i) Two lines are parallel if and only if they have same slope.
(ii) You will pass the exam if and only if you will work hard.
Example 15. Prove that p H q is equivalent to (p --; q) /\ (q --; p).
Sol. Construct the truth tables of both propositions :
p q pHq p q p --> q q --> p (p --> q) A (q --> p)
IT rn
T T T T T T
T F T F F T
F T F T T F
F F F F T T
P(P, q, ...) => Q (p, q, ...) if Q(P, q, ...) is true whenever P(P, q, ...) is true.
Example 17. Show that p H q logically implies p H q.
Sol. Consider the truth tables ofp H q and p --; q as in the following table. Fig. 13.24
p --; q is true whenever p H q is true. Hence p H q logically implies p --; q
p q pHq p --> q
T T T T
T F F F
F T F T
F F T T
Fig. 13.24
Example 18. Show that p logically implies p v q.
Sol. Consider the truth tables for p and p v q as in Fig. 13.25 Now p v q is true when
ever p is true. Hence p logically implies p v q.
p q pvq
T T T
T F T
F T T
F F F
Fig. 13.25
Example 19. Show that p 1\ q logically implies p H q.
Sol. Consider the truth tables of p 1\ q and p H q as in Fig. 13.26. Now p H q is true
whenever p 1\ q is true. Thus p 1\ q logically implies p H q.
p q p l\ q pHq
T T T T
T F F F
F T F F
F F F T
Fig. 13.26
Exmaple 20. Show that p H q does not logically imply p --; q.
-
Sol. Construct the truth tables ofp H q andp --; q as in Fig. 13.27. Recall that p H
-
p q -q pH-q p --> q
T T F F T
T F T T F
F T F T T
F F T F T
Fig. 13.27
PROPOSITIONAL CALCULUS 569
rn rn
F F
T F F T F
F T T F F
F F T T F
Fig. 13.28
Since) the final values of both the propositions are same) hence the two propositions are
equivalent.
Example 22. Show that the propositions -(p A q) and -p v - q are logically equivalent.
Sol. Construct the truth tables of - (p A q) and -p v - q as in Fig. 13.29. Since the truth
tables are the same) i.e.) both propositions are false in the first case and true in the other three
cases) the propositions "'" (p /\ q) and ,..., p v ,..., q are logically equivalent and we can write
- (p A q) = - p v - q
p q P Aq - (p A q) p q -p �q �p v � q
T T T F T T F F F
T F F T T F F T T
F T F T F T T F T
F F F T F F T T T
(a) (b)
Fig. 13.29
570 DISCRETE STRUCTURES
Example 23. Prove the associative law: (p 1\ q) 1\ r = p 1\ (q 1\ r).
Sol. Construct the required truth tables as in Fig 13.30. Since the truth tables are
identical) the propositions are equivalent.
p q r p 1\ q (p 1\ q) 1\ r q l\ r p l\ (q l\ r)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F F T F
F T F F F F F
F F T F F F F
t j
F F F F F F F
Fig. 13.30
Example 24. Prove that disjunction distributes over conjunction; that is, prove the dis
tributive law p v (q 1\ r) = (p v q) 1\ (p V r).
Sol. Construct the required truth tables as in Fig. 13.31. Since the truth tables are
identical) the propositions are equivalent.
p q r q l\ r p v (q l\ r) pvq p vr (p v q) 1\ (p V 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 F T F F
F F T F F F T F
t i
F F F F F F F F
Fig. 13.31
1 3.13. CONTINGENCY
A statement that can be either true or false depending on the truth values of its vari·
abIes) is called a contingency.
p q -p -q P A -q -P A q (P A - q) V (-p A q)
T T F F F F F
T F F T T F T
F T T F F T T
F F T T F F F
Fig. 13.37
Since, the value of the final column depends on the value of the different variables,
hence it is a contingency_
(iii) Construct the truth table of the proposition - (p v q) v ( p v q) as in Fig.
- - 13.38.
P q -P -q P 1\ q - (p 1\ q) -P v - q - (p v q) v (-p v - q)
T T F F T F F F
T F F T F T T T
F T T F F T T T
F F T T F T T T
Fig. 13.38
Since) the value of final column depends upon the value of different variables) hence it
is a contingency_
Example 30. Verify that proposition p v (p 1\ q) is tautology.
-
Sol. Construct the truth table for above proposition. (Fig. 13.39)
p q P 1\ q -(p 1\ q) p V - (p l\ q)
T T T F T
T F F T T
F T F T T
F F F T T
Fig. 13.39
Example 31. Determine whether the following is a tautology, contingency and a contra
diction :
(i) p --; (p --; q) (ii) p --; (q --; p) (iii) p 1\ p. -
Sol. (i) Construct truth table for p --; (p --; q) as in Fig. 13.40.
p q p -> q p -> (p -> q)
T T T T
T F F F
F T T T
F F T T
Fig. 13.40
Since) the value of last column depends on the value of different variables) hence it is a
contingency_
(ii) Construct truth table for p --; (q --; p) as in Fig. 13.41.
p q q -> p p -> (q ->p)
T T T T
T F T T
F T F T
F F T T
Fig. 13.41
p -p
T F F
F T F
Fig. 13.42
Example 32. Write an equivalent formula for P 1\ (R <=? 8) v (8 <=? P) which does not
involve biconditional.
Sol. We know that P <=? Q (P => Q) 1\ (Q => P)
'" ... (i)
So. apply eqn. (i) to formula to obtain the formula equivalent to
[P 1\ (R <=? S) v (S <=? P)],
which does not involve biconditionaL
= [P 1\ «R => S) 1\ (S => R» v «S => P) 1\ (P => S» ] .
574 DISCRETE STRUCTURES
Example 33. Write an equivalent formula for R v (S <=? T), which does not involve
biconditional as well as conditional.
Sol. We know that
(P <=? Q) = (P => Q) 1\ (Q => P) ... (i)
(P => Q) = - P I\ Q ... (ii)
So, applying the eqn. (i) and (ii) on the above formula, we can obtain an equivalent
formula) which does not involve biconditional as well as conditionaL
[R v (S <=? T)] = [R v «S => T) v (T => S» ]
= [R v «- S v T) v (- T v S» ] .
T T T
T F T
F T T
F F F
Fig. 13.43
P is true in line 1 and 2 andp v q is also true in line 1 and 2. Hence, argument is valid.
576 DISCRETE STRUCTURES
Example 39. Show that the rule modus ponens is valid.
p --> q
p
q
Sol. The truth table of this rule is as follows : (Fig. 13.44)
p q p --> q
I T T T
I
T F F
F T T
F F T
Fig. 13.44
The p is the true in line 1 and 2 andp --; q andp both are true in line 1 andp, p --; q and
q all are true in line 1 . Hence) argument is valid.
T T T T T T
T T F T F F
T F F F T F
T F T F T T
F T T T T T
F T F T F T
F F T T T T
F F F T T T
Fig. 13.45
p � q is true in lines 1 , 2, 5, 6, 7, 8.
q � r is true in lines 1, 3, 4, 5, 7, 8.
Both p -----7 q and q � r is true in lines 1 , 5, 7, 8 p � r is also true in lines 1, 5, 7, 8. Hence,
argument is valid.
T T F F T
T F F T F
F T T F T
F F
I T T T
I
Fig. 13.46
P --; q is true in line 1, 3 and 4. - q is true in line 2 and 4. Both p --; q and - q are true in
line 4. ,..., p is alsotrue in line 4. Hence) the argument is valid.
T T F T
T F F T
F
F
I T
F
T
T
T
F
I
Fig. 13.47.
P v q is true in line 1, 2 and 3. - p is true in line 3. Both p v q and - p is true in line 3.
As q is also true in line 3. Hence) argument is valid.
I T T T
I
T F F
F T F
F F F
Fig. 13.48
P A q is true in line 1 and p is also true in line 1. Hence) the argument is valid.
578 DISCRETE STRUCTURES
Example 44. Show that the rule of conjunction is valid.
p
q
P A q.
Sol. The argument is valid if p A q --; P A q is a tautology. The truth table for the above
proposition is as follows : (Fig. 13.49)
p q PAq P A q --> P A q
[
T T T
T F F
F T F
F F F
Fig. 13.49
As the proposition is a tautology_ Hence) the argument is valid.
rn
T T T T T
T F F F F
F T F T T
F F F T T
Fig. 13.50
Since) the argument is a tautology_ Hence) it is a valid argument.
1 3. 1 6. PROOF OF VALIDITY
We can test the validity of any argument by constructing the truth tables. But as the
no. of variable statements increases) the truth tables grow unwieldly. So) a more efficient
method to test the validity of the argument is to deduce its conclusion from its premises by a
sequence of elementary arguments each of which is known to be valid.
Example 46. Prove that the argument p --; � q, r --; q, r f- � p is valid without using
truth tables.
Sol. (i) p --; � q (Given)
(ii) r --; q (Given)
(iii) � q --; � r Contra positive of (ii)
(iv) p --; - r Hypothetical syllogism using (i) and (iii)
(v) r --; - p Contrapositive of (iv)
PROPOSITIONAL CALCULUS 579
Example 48. Prove that the argument p, q I- (p v r) 1\ q is valid without using truth
tables.
Sol. (i) p (Given)
(ii) pvr Rule of addition using (i)
(iii) q (Given)
(iv) (p v r) 1\ q Rule of conjunction using (ii) and (iii).
Example 49. Prove that the argument p ---, q, P 1\ r I- q is valid without using truth
table.
Sol. (i) p ---, q (Given)
(ii) p l\ r (Given)
(iii) p Rule of simplification using (i)
(iv) q Modus ponens using (i) and (iii).
Example 50. Prove that the argument (p ---, q) 1\ (r ---, s), (p v r) 1\ (q V r) I- q v s is valid
Sol. (i) (p ---, q) 1\ (r ---, s) (Given)
(ii) (p v r) 1\ (q V r) (Given)
(iii) (p v r) Simplification using (iii)
(iv) qvs Constructive dilemma using (i) and (iii).
Example 51. Prove that the argument (p 1\ q) V (r ---, s), t ---, r, - (p 1\ q) I- t ---, s is valid
without using truth tables.
Sol. (i) (p 1\ q) V (r ---, s) (Given)
(ii) t ---, r (Given)
(iii) - (p l\ q) (Given)
(iv) Disjunctive syllogism using (i) and (iii)
(v) Hypothetical syllogism using (ii) and (iii).
Example 52. Prove that the argument (p ---, q) 1\ (r ---, s), q ---, s, (q ---, s) ---, (p v r) I- q v s
is valid using deduction method.
580 DISCRETE STRUCTURES
Sol. (i) (p --; q) 1\ (r --; s) (Given)
(ii) q --; s (Given)
(iii) (q --; s) --; (p v r) (Given)
(iv) pvr Modus ponens using (iii) and (ii)
(v) qvs Constructive dilemma using (i) and (iv).
Example 53. Prove that the argument p --; (q v r), (s 1\ t) --; q, (q v r) --; (s 1\ t) I- p --; q
is valid without using truth table.
Sol. (i) p --; (q v r) (Given)
(ii) (s 1\ t) --; q (Given)
(iii) (q v r) --; (s 1\ t) (Given)
(iv) p --; (s 1\ t) Hypothetical syllogism using (i) and (iii)
(v) p --; q Hypothetical syllogism using (ii) and (iv).
Example 54. Prove that the argument p v (q --; p), -p 1\ r I- - q is valid without using
truth tables.
Sol. (i) p v (q --; p) (Given)
(ii) ""' p A r (Given)
(iii) -p Rule of simplification using (ii)
(iv) q --; p Disjunctive syllogism using (i) and (iii)
(v) -q Modus tollens using (iv) and (iii).
Example 55. Test the validity of following argument. If I will select in lAS examina
tion, then I will not be able to go to London. Since, I am going to London, I will not select in lAS
examination.
Sol. Let p be "I will select in lAS examination" and q be "I am going to London". Then
the above argument can be written in symbolic form as follows :
p -> - q
q
p q -p -q p -> - q
T T F F F
T F F T T
F I T T F T
I
F F T T T
Fig. 13.51
P --; - q is true in line 2, 3 and 4. q is true in line 1 and 4 and - p is true in line 3 and 4.
Hence) all three are true in line 4. So it is a valid statement.
PROPOSITIONAL CALCULUS 581
Example 56. Consider the following argument and determine whether it is valid.
Either I will get good marks or I will not graduate. If I did not graduate I will go to
Canada. I get good marks. Thus, I would not go to Canada.
Sol. Let p be "I will get good marks" and q be "I will graduate" and r be "I will go to
Canada". Thus) the above argument can be written in symbolic form as follows :
p v-q
�q�r
p
p q r -q -r p v-q - q -----t r
T T T F F T T
I T T F F T T T
I
T F F T T T F
T F T T F T T
F T T F F F T
F T F F T F T
F F T T F T T
F F F T T T F
Fig. 13.52
P v ,..., q is true in line 1, 2, 3, 4, 7, 8 and ,..., q � r is true in line 1, 2, 4, 5, 6, 7 andp is true
in line 1 , 2, 3 and 4. ,..., r is true in 2, 3, 6 and 8. All the above are true in line 2. Hence, the
argument is valid.
Example 57. Determine the validity of the following argument without using truth tables.
Either I will pass the examination, or, I will not graduate. If I do not graduate, I will go
to Canada. I failed : Thus, I will go to Canada.
Sol. Let p be "I will pass the examination" and q be "I will graduate" and t be "I will go
to Canada". Thus the above argument, in symbolic form can be written as
p v-q
- q --+ t
-p
Thus to prove the validity of the argument, use the standard results as follows :
(i) pv-q (Given)
(ii) - q --; t (Given)
(iii) -p (Given)
(iv) -q Disjunctive syllogism using (i) and (iii)
(v) Modus ponens using (ii) and (iv)
Hence proved.
582 DISCRETE STRUCTURES
Example 58. Determine the validity of the following argument using deduction method.
If I study. then I will pass examination. If I do not go to picnic. then I will study. But I
failed examination. Therefore, I went to picnic.
Sol. Let p be "I study" and q be "I will pass examination" and t be "I go to picnic". Then
the above argument is written in symbolic form as follows :
p --> q
� t - -> p
-p
Thus to prove the validity of the argument use the rules o f inference.
(i) p --'> q (Given)
(ii) - t --'> p (Given)
(iii) -p (Given)
(iv) --t Modus tollens using (ii) and (iii)
(v) Complement property using (iv)
Hence proved.
Example 59. Prove the validity of the following argument using truth tables as well as
deduction method.
"If the market is free then there is no inflation. If there is no inflation then there are price
controls. Since there are price controls, therefore, the market is free".
Sol. Let p be "The market is free" and q be "There is inflation" and r be "There are price
controls". Then the above argument can be written in symbolic form as follows :
p --> � q
�q�r
r
p
1st Method. By using truth tables
Construct the truth table of above argument (Fig. 13.53)
p q r -q p --> � q �q�r
T T T F F T
T T F F F T
T F F T T F
I T
F
F
T
T
T
T
F
T
T
T
T
I
F T F F T T
F F T T T T
F F F T T F
Fig. 13.53
P � ,..., q is true in line 3) 4) 5) 6) 7 and 8 ,..., q � r is true in line 1, 2, 4, 5, 6, 7 r is true in
line 1 , 4, 5, 7. All the above three are true in line 4 and 5. Also p is true in line 4. Hence the
argument is valid.
PROPOSITIONAL CALCULUS 583
1 3. 1 7. QUANTIFIERS
The following notation and theorem involving the universal quantifier 'i and the exis·
tential quantifier 3 will be used throughout this section:
('i x E A) p (x) or 'i x, p(x) , for every x E A, p(x) is true.
(3 x E A) p (x) or 3 x, p(x) , there exists x E A such that p(x) is true.
Here p(x) is a propositional function (or open·sentence or condition) on A, that is, p (a) is
true or false for every a in A.
Theroem (De Morgan): Let p(x) be a propositional function on A. Then
(i) -('i x E A) p (x) = (3 x E A) - p(x)
(ii) -(3 x E A) p (x) = ('i x E A) - p(x)
Remark: The above says, in words, that the following two statements are equivalent:
"It is not true that, for every a A, p (a) is true".
(i) E
"There exists an a A such thatp(a) is false".
(ii) E
and similarly, the following two statements are equivalent:
(i) "It is not true that there exists an a A such thatp(a) is true".
E
(ii) "For all a A, p(a) is false".
E
1 3. 1 8. EXISTENTIAL QUANTIFIER
If p(x) is a proposition over the universe U. Then it is denoted as CIx p(x) and read as
"There exists at least one value in the universe of variable x such that p(x) is true. The quan·
tifier 3 is called the existential quantifier.
There are several ways to write a proposition, with an existential quantifier i.e.,
(3x E A) p(x) or CIx E A such that p(x) or (CIx) p(x) or p(x) is true for some x E A.
Example 60. Let A(x) : x has a white colour, B(x) : x is a polar bear, C(x) : x is found in
cold regions, over the universe of animals. Translate the following into simple sentences :
(i) 3x (B(x) 1\ - A(x)) (ii) (3x) (- C(x))
(iii) (\fx) (B(x) 1\ C(x) --'> A(x)).
584 DISCRETE STRUCTURES
Sol. (i) There exists a polar bear whose colour is not white.
(ii) There exists an animal that is not found in cold regions.
(iii) Every polar bear that is found in cold regions has a white colour.
Example 61. Let K(x) : x is a two-wheeler, L(x) : x is a scooter. M(x) : x is manufactured
by Bajaj. Express the following using quantifiers.
(i) Every two wheeler is a scooter.
(ii) There is a two wheeler that is not manufactured by Bajaj.
(iii) There is a two wheeler manufactured by Bajaj that is not a scooter.
(iv) Every two wheeler that is a scooter is manufactured by Bajaj.
Sol. (i) (V x) (K(x) --; L(x»
(ii) (3 x) (K(x) A M(x»
(iii) (3 x) (K(x) A M(x) --; - L(x»
(iv) (V x) (K(x) A L(x) --; M(x»
Example 62. Determine the truth value of each of the following statements. (Here R is
the universal set.)
(i) V x, I x I = x (ii) 3 x, x" = x
(iii) V x, + 1 > x (iv) 3 x, x + 2 = x.
Sol. (i) False. Note that if Xo = 3 then I Xo I '" xo '
-
Example 65. Determine the truth value of each of the following statements (where R is
the universal set):
(i) 'd x2 = x;
X, (ii) 3 x, 2x = x; (iii) 'd x, x- 3 < x;
(iv) 3 x, x" - 2x + 5 = O
Sol. (i) False, for x = 2 does not satisfy x" = x.
(ii) True, for x = 0 satisfies 2x = x.
(iii) True) since every real number satisfies x - 3 < x.
(iv) False, since x2 - 2x + 5 = 0 has no real roots.
Example 66. Let A = {I, 2, 3, 4} be the universal set. Determine the truth value of each
statement:
(i) 'd x, x + 3 < 6 ; (ii) 3 x, x + 3 < 6; (iii) 3 x, 2x2 + x = 1 5
Sol. (i) False, since x = 4 does not satisfy x + 3 < 6.
(ii) True) since x = 1 satisfies x + 3 < 6.
(iii) False, since no number in A satisfies 2x2 + x = 15.
1 3.20. NEGATION OF QUANTIFIED PROPOSITIONS
When we negate a quantified proposition i.e., when a universally quantified proposition
is negated, we obtain an existentially quantified proposition and when an existentially quan
tified proposition is negated, we obtain a universally quantified proposition.
The two rules for negation of quantified proposition are as follows. These are also called
De Morgan's law.
(i) - 3 x p(x) '" 'd x - p(x) (ii) - 'd x p(x) '" 3 x - p(x).
Example 67. Negate each of the following propositions :
(i) All boys can run faster than all girls.
(ii) Some girls are more intelligent than all boys.
(iii) Some students do not live in hostel.
(iv) All students pass the semester exams.
(v) Some of the students are absent and the classroom is empty.
Sol. (i) Some boys can run faster than some girls.
(ii) All girls are more intelligent than some boys.
(iii) All students live in hostel.
(iv) Some students do not pass the semester exams.
(v) All students are present and the class·room is full.
Example 68. Negate each of the following propositions :
(i) 'dx P(x) I d y q(y) (ii) 'd x p(x) 1\ 'd y q(y)
(iii) 3 xp(x) v 'd y q(y) (iv) 3 xp(x) v 3 y q(y)
(v) (3 x E U) (x + 6 = 25) (vi) ('dx E U) (x < 25).
Sol. (i) - ('d x p(x) 1\ 3 y q(y»
'" - 'd xp(x) v - 3 y q(y) ( -:
- (p 1\ q) = - p v - q)
'" 3 x - p(x) v 'd y - q(y)
586 DISCRETE STRUCTURES
(v) - (3 X E U) (x + 6) = 25
", 'ix E U - (x + 6) = 25
'" ('ix E U) (x + 6) # 25
(vi) - ('i X E U) (x < 25)
'" 3 X E U - (x < 25)
'" (3 X E U) (x :> 25)
The proposition having more than one variable can be quantified with multiple quanti·
fiers. The multiple universal quantifiers can be arranged in any order without altering the
meaning of the resulting proposition. Also the multiple existential quantifiers can be arranged
in any order without altering the meaning of proposition.
The proposition which contains both universal and existential quantifiers) the order of
these quantifiers can't be exchanged without altering the meaning of proposition e.g., the
proposition 3 X 'i y p(x, y) means " There exists some X such that p(x, y) is true for every y".
Example 69. Write the negation for each of the following. Determine whether the result
ing statement is true or false. Assume U = R.
(i) 'i 3 m(:x2 < m)
X (ii) 3 m 'i x(:x2 < my.
Sol. (i) Negation of 'i x 3 m(:x2 < m) is 3 x 'i m (:x2 :> m). The meaning of 3 x 'i m(:x2 :> m)
is that there exists some x such that x2 ;::: m) for every m. The statement is true as there is some
greatest x such that x2 ;::: m) for every m.
(ii) Negation of 3 m 'i x (x2 < m) is 'i m 3 x (x2 :> m). The meaning of 'i m 3 x (x2 :> m) is
that for every m) there exists some x such that (x2 ;::: m). The statement is true as for every m)
there exists some greatest x such that x2 � m.
Example 70. Check the validity offollowing formula under given interpretation.
(a) 'i x 3 y P(x, y) under interpretation domain = {1, 2} and P(1, 1) = T, P(1, 2) = F, P(2, 1)
= T, P(2, 2) = T where T and F refer to true and false respectively.
(b) 'i x P(x) -; Q(a, f(x)) under interpretation domain = {1, 2} and a = 1, f(1) = 2, f(2) = 1,
P(1) = F, P(2) = T, Q(1, 1) = T, Q(1, 2) = T, Q(2, 1) = F and Q(2, 2) = T. Here T and F refer to true
and false respectively.
PROPOSITIONAL CALCULUS 587
Sol. (a) \;j x 3 y P(x, y) means for every x, there exists some y such that P(x, y) is true.
Since P(l, 1) = T and P(2, 1) = T. Hence, the formula is valid under the domain = {I, 2}.
(b) \;j x P(x) --; Q(a, f(x» means for every x, whenever P(x) is true implies Q(a, f(x» is also
true. So, under the domain {I, 2}, the different values of \;j x P(x) --; Q(a, f(x» are as follows :
x P(x) Q (a, {(x))
1 F T
2 T T
So, when P(x) is true, Q(a, f(x» is also true. Hence, the formula is valid.
I ILLUSTRATIVE EXAMPLES I
Example 1. Translate the following statements in proposition logic :
(i) If you study, you will get good marks. If you do not study, you will enjoy. Therefore,
either you will get good marks or you will enjoy.
(ii) If the catalogue is correct, then if the seeds are planted on April, flowers will bloom in
July.
(iii) If John is elected class representative, then either Mary is elected treasurer or Alice is
elected vice-treasurer.
(iv) Either taxes are increased or if expenditures rise, then the debt ceiling is raised.
Sol. (i) Let p be "You study" and q be "You will get good marks" and r be "You will
enjoy". Then the proposition logic is
p --> q
�p�r
q vr
(ii) Let p be "The catalogue is correct" and q be "Seeds are planted in April" and r be
"The flowers bloom in July". Then, proposition logic is
p --; (q --; r)
(iii) Let p be "John is elected class representative" and q be "Mary is elected treasurer"
and r be "Alice is elected vice-treasurer". Then) proposition logic is
p --; q v r
(iv) Let p be "Taxes are increased" and q be "Expenditures rise" and r be "The debt
ceiling is raised". Then proposition logic is
p v (q --; r).
Example 2. The meaning of proposition p --; q is "If p then q" or "q is a necessary
condition for p" or "p only if q" or "p is a sufficient condition for q".
Write the following statements in terms of above.
(a) p : New Delhi is capital of India q : India is in Asia.
(b) p : x" = 4 q:x=2
(c) p : x" = y 2 q : x = y.
(d) p = he works hard q : he is a Gold Medalist.
588 DISCRETE STRUCTURES
Sol. (a) (i) If New Delhi is capital of India, then India is in Asia.
(ii) India is in Asia is a necessary condition for New Delhi to be capital of India.
(iii) New Delhi is capital of India only if India is in Asia.
(iv) The fact that New Delhi is capital of India is a sufficient condition that India is in
Asia.
(b) (i) Ifx2 = 4, then x = 2
(ii) x = 2 is necessary for x2 = 4
(iii) x" = 4 only if x = 2
(iv) x2 = 4 is sufficient for x = 2.
(c) (i) If x" = y2 then x = y
(ii) x = y is necessary fo r x2 = y2
(iii) x" = y2 only if x = y
(iv) x2 = y2 is sufficient for x = y.
(d) (i) If he works hard then he is a Gold Medalist.
(ii) Gold medal is necessary for hard work.
(iii) He works hard only if he is a Gold Medalist.
(iv) Hard work is sufficient condition for Gold Medalist.
Example 3. Construct the truth table for the following statements
(i) (p --; p) --; (p --; - p) (ii) (- q --; - p) --; (p --; q).
Sol. (i) The truth table for (p --; p) --; (p --; -p) is as follows. (Fig. 13.54)
p -p p --+ p
T F T F F
F T T T T
Fig. 13.54
(ii) The truth table of statement (- q --; - p) --; (p --; q) is as follows. (Fig. 13.55)
Fig. 13.55
Example 4. Construct the truth table for following statements
(i) (p --; (q --; r)) --; ((p --; q) --; (p --; r))
(ii) p H (- p v - q)
(iii) (p --; p) v (p --; - p).
PROPOSITIONAL CALCULUS 589
Sol. (i) Truth table for (p --; (q --; r» --; «P --; q) --; (p --; r» is as follows. (Fig. 1 3.56)
p q r q --> r p --> q p --> r � (p --> (q --> r)) «P --> q) --> (p --> r)) K --> L
T T T T T T T T T
T T F F T F F F T
T F F T F F T T T
T F T T F T T T T
F T T T T T T T T
F T F F T T T T T
F F T T T T T T T
F F F T T T T T T
Fig. 13.56
(ii) Truth table for p H (- P v - q) is as following. (Fig. 13.57)
p q -p -q -p v � q p H (-p v � q)
T T F F F F
T F F T T T
F T T F T F
F F T T T F
Fig. 13.57
(iii) The truth table for (p --; p) v (p --; - p) is as follows. (Fig. 13.58)
p q -p -q p --> q -p v - q ( pv
� � q) --> q
T T F F T F T
T F F T I F T F I
F T T F T T T
F F T T T T F
Fig. 13.59
So. when p --; q is false, the value of (- p v - q) --; q is also false.
590 DISCRETE STRUCTURES
Example 6. Given the value ofp --; q is true. Determine the value of - p v (p H q).
Sol. Construct truth table for both statements. (Fig. 13.60)
p q -p p --> q pHq -P V (p H q)
T T F
I T T T I
T F F F F F
F T T I T F T I
F F T I T T T I
Fig. 13.60
So, when the value of p --; q is true i.e., in line 1, 3 and 4. The value of - p v (p H q) is
also true.
Fig. 13.61
p q -p -q pHq - (P H q) p H-q -p H q
rn rn [
T T F F T
T F F T F
F T T F F
F F T T T
Fig. 13.62
As the values of - (p H q) and p H -q and -p H q are same, hence they all are
equivalent.
PROPOSITIONAL CALCULUS 591
Example 9. From the following formulae find out tautology. contingency and
contradiction.
(i) - (A --; B) v (- A v (A 1\ B)) (ii) (H --; (J 1\ J)) --; - (H --; J)
=
(iii) (p H Q) (p 1\ Q) v (- P 1\ Q) .
Sol. (i) Construct the truth table for - (A --; B) v (- A v (A 1\ B» as in Fig. 13.63.
T T F T T F T
T F F F F T T
F T T T T F T
F F T T T F T
Fig. 13.63
As the last column of the table contains all T's, hence it is a tautology.
(ii) Construct truth table for (H --; I 1\ J) --; - (H --; I) as in (Fig. 13.64)
T T F T T F T T
T F F F F T T T
F T T F F T T T
F F T T F F F T
Fig. 13.65
As the last column contains all T's, hence the above formulae is a tautology.
Sol. Construct the truth table for A v (B 1\ C) --; (A v "8) v C as in (Fig. 13.66)
A B C B C B I\ C A v (B I\ C) (A v B) (A v B) v C A v (B 1\ C) --> (A v B) v C
T T T F F F T T T T
T T F F T T T T T T
T F F T T T T T T T
T F T T F T T T T T
F T T F F F F F F T
F T F F T T T F T T
F F T T F T T T T T
F F F T T T T T T T
Fig. 13.66
As the last column of the table contains all T's, hence it is a tautology.
Example 11. Determine whether the following are equivalent, using biconditional
statement.
(i) p H q '" (p 1\ q) ( P 1\ q)
V - -
Sol. To prove that the above pairs are equivalent. Prove that (p H q) H ((p 1\ q) ( P 1\ q)) V - -
p q -p -q p H q P 1\ q - p l\ - q (p 1\ q) V (- P 1\ - q) (p H q) H (p 1\ q) V (- p 1\ - q)
T T F F T T F T T
T F F T F F F F T
F T T F F F F F T
F F T T T F T T T
Fig. 13.67
As the proposition (p H q) H ((p 1\ q) ( V - P 1\ - q)) is a tautology, hence they are
equivalent.
(ii) Construct the truth table for ((p --; q) --; t) H ((p 1\ q) --; t) as in Fig.
- 13.68.
Example 15. Express the following formula using only - and /\.
(P 1- Q) t R
where 1- denotes NOR and t denotes NAND.
Sol. (P 1- Q) t R '" - (P v Q) t R P 1- Q ", - (P v Q)
'" - «- P v Q) /\ R) p t Q ", - (p /\ Q)
'" - «- - - (P /\ - Q» /\ R) P v Q '" - (- P /\ - Q)
'" - «- (P /\ - Q» /\ R) - -P = P
Note. t (NAND) and .j, (NOR) are dual of each other.
Example 16. Show that the connective t (Nand) is functionally complete.
Sol. To show that the connective t is functionally complete. We have to show that the
set of connectives (/\ , ,...)., and (v , ,...)., can be expressed in terms of t alone which is shown as
follows :
- P '" -P v - P '" - (P /\ P) '" P t P
P v Q '" - (-P /\ - Q) '" - P t - Q '" (P t P) t (Q t Q)
and p/\ Q '" - (P t Q) '" (P t Q) t (P t Q)
Since the above expresses /\, v and ,..., in terms of t alone. Hence t is functionally complete.
Example 17. Prove the validity of following arguments without using truth tables.
1. p v q, -p 1 - q 2. p, p --; q, q --; r 1 - r
3. p, q, (p /\ q) --; r 1 - r 4. p, (p /\ - q) --; - p 1 - p --; q.
Sol. 1 . (i) pvq (Given)
(ii) -p (Given)
(iii) q Disjunctive syllogism
594 DISCRETE STRUCTURES
2. (i) p (Given)
(ii) p --; q (Given)
(iii) q --; r (Given)
(iv) p --; r Hypothetical syllogism using(ii) and (iii)
(v) r Modus ponens using (iv) and (i)
3. (i) p (Given)
(ii) q (Given)
(iii) (p 1\ q) --; r (Given)
(iv) p l\ q Rule of conjunction using(i) and (ii)
(v) r Modus ponens using (iii) and (iv)
4. (i) p (Given)
(ii) (p 1\ - q) --; - p (Given)
(iii) - (p l\ - q) Modus tollens using (ii) and (i)
(iv) - - (p --; q) As - (p --; q) '" (p 1\ - q)
(v) p --; q Complement property using (iv).
Example 18. Prove that the argument (p 1\ q) --; r, p --; q 1- p --; «P 1\ q) 1\ r) is valid
without using truth table.
Sol. (i) (p 1\ q) --; r (Given)
(ii) p --; q (Given)
(iii) p --; (p 1\ q) Rule of absorption using (ii)
(iv) (p 1\ q) --; «P 1\ q) 1\ r) Rule of absorption using (i)
(v) p --; «P 1\ q) 1\ r) Hypothetical syllogism using (iii) and (iv).
Example 19. Prove that the following arguments are valid without using truth tables.
1. (p v q) --; - r, r v t, p 1- t
2. (p 1\ q) --; r, (r --; q), (r --; q) --; (q 1\ r) 1- (p 1\ q) --; (q 1\ r)
Sol. 1. (i) (p v q) --; - r (Given)
(ii) rvt (Given)
(iii) p (Given)
(iv) pvq Rule of addition using (iii)
(v) -r Modus ponens using (i) and (iv)
(vi) Disjunctive syllogism using (ii) and (v)
2. (i) p l\ q --; r (Given)
(ii) r --; q (Given)
(iii) (r 1\ q) --; (q 1\ r) (Given)
(iv) r --; (r 1\ q) Rule of absorption using (ii)
(v) (p 1\ q) --; (r 1\ q) Hypothetical syllogism using (i) and (iv)
(vi) (p 1\ q) --; (q 1\ r) Hypothetical syllogism using (v) and (iii)
PROPOSITIONAL CALCULUS 595
Example 20. Prove the validity offollowing argument using deduction system.
(l) A � B OO B � - C
(3) - C I\ D (4) A � D
:. B.
Sol. (i) A�B (Given)
(ii) B�-C (Given)
(iii) - C I\ D (Given)
(iv) A�D (Given)
(v) A�-C Hypothetical syllogism using (i) and (ii)
(vi) -C Simplification of (iii)
(vii) -A�C Transposition of (iv)
( viii) A Modus tollens using (vii) and (vi)
(ix) B Modus ponens using (i) and (viii)
T T T T T T T T
T T F T F F F T
T F F F T F F T
T F T 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
Fig. 13.69
As the last column contain all T's, hence the argument is valid.
Example 23. Translate the following into symbolic form and test the validity of the
argument.
If 6 is even then 2 does not divide 7. Either 5 is not prime or 2 divides 7. But 5 is prime,
therefore, 6 is odd.
Sol. Let p be "6 is even" and q be "2 divide 7" and r be "6 is primed". Thus, the above
argument in symbolic form can be written as
p --> � q
�rvq
r
�p
Construct the truth table to test the validity. (Fig. 13.70)
p q r -p -q -r p --> - q �rvq
T T T F F F F T
T T F F F T F T
T F F F T T T F
T F T F T F T T
F
F
T
T
I T
F
T
T
F
F
F
T
T
T
T
T
I
F F T T T F T F
F F F T T T T F
Fig. 13.70
in line 1 , 4, 6 and 7. All the three are true in line 4 and 6 and p is true in line 6. Hence,
P -----t ,..., q is true in line 3) 4) 5) 6) 7 and 8) ,..., r v q is true in line 1 ) 2) 3) 4, 5 and r is true
-
argument is valid.
PROPOSITIONAL CALCULUS 597
(a) p v q (b) p l\ q
(c) p l\ - q (d) - p v - q
(e) - (- p) (j) - (- P 1\ - q) (P. T. U. M.C.A. Dec. 2002)
Truth Value of Compound Statement
4. Determine the truth value of each of the following statements:
(a) 4 + 2 = 5 and 6 + 3 = 9 (b) 3 + 2 = 5 and 6 + 1 = 7
(c) 4 + 5 = 9 and 1 + 2 = 4 (d) 3 + 2 = 5 and 4 + 7 = 1 1 .
5. Determine the truth value of each of the following statements
(a) 1 + 1 = 5 or 2 + 2 = 4 (b) 2 + 5 = 9 or 3 + 7 = 8
(c) 1 + 1 = 5 or 3 + 3 = 4 (d) 2 + 5 = 9 or 1 + 7 = 8
598 DISCRETE STRUCTURES
Truth Tables
6. Find the Truth Table of
(a) � p A q (b) � (p v q)
(c) � (p v � q) (d) � (p q) p
¢c> = ¢c> �q = p
� ¢c> q.
(P.T. U M.C.A. May 2008)
Find the Truth Table for
.•
7.
(a) p v � q
Tautologies and Contradictions
8. Verify that the propositionp v � (p A q) is a tautology.
9. (a) Verify that the proposition (p A q) A � (p v q) is a contradiction.
(b) Prove that the sentence "It is raining or it is not raining" is a tautology.
M.C.A. Dec. 2006)
(c) Let c denotes contradiction. Then for any statement p,
(P.T. U .•
(i) p v c p
= (ii) P A C c.
= (P.T. U .• M.C.A. Dec. 2006)
Logical Equivalence
10. Show that the propositions � (p A q) and � p v � q are logically equivalent.
11. Show thatp v q � ( p A � q) by using Truth Tables.
= -
(c) � p v � q � P A q
= (d) � (� p A q) P v � q
=
Answers
L (a) It is not cold, (b) It is cold and raining.
(c) It is cold or it is raining. (d) It is raining or it is not cold.
(e) It is not cold and it is not raining.
(/) It is not true that it is not raining or it is false that it is not raining.
2. (a) p A q (b) p A � q
(c) � (� p v q) (d) � P A � q
(e) p v (� p A q) (j) � (� p v � q),
3. (a) Andrey speaks French or Danish.
(b) Andrey speaks French and Danish.
(c) Andrey speaks French but not Danish.
(d) Andrey does not speak French or Andrey does not speak Danish.
(e) It is false that Andrey does not speak French.
(j) It is false that Andrey speaks neither French nor Danish.
4. The Statement " p and q" is true only when both statements are true.
(a) false (b) True (c) False (d) True,
5. The statement "p or q" is false when both statements are false.
(a) True (b) False (c) False (d) True,
6. (a) p q �p �P A q (b) p q pvq � (p v q)
T T F F T T T F
T F F F T F T F
F T T T F T T F
F F T F F F F T
(c) p q �q pv�q � (p v � q)
T T F T F
T F T T F
F T F F T
F F T T F
600 DISCRETE STRUCTURES
T T F T T T F F F
T F T T T F F T F
F T F F F T T F F
F F T T F F T T T
11. p q pvq �p �q �P A � q � (� P A � q)
T T T F F F T
T F T F T F T
F T T T F F T
F F T T T
r r
Since the truth tables are identical, the propositions are equivalent
15. (a) His mother is not English and his father is not French.
(b) He does not study physics or he studies mathematics.
16. (a) He is not tall or not handsome.
(b) He has neither bland hair nor blue eyes.
(c) He is rich or happy.
(d) He has not lost his Job and he did go to work Today.
(e) Paris is not in France or London is not in England.
17. (a) If John is not poor, then he is not a poet.
(b) If Marc does not study, then he will not pass the test.
18. (a) If he does not win, then he does not have courage.
(b) If he is not strong, then he is not a sailor.
(c) If he tires, then he will not win.
(d) If it is not a rectangle, then it is not a square.
19. p H q is true whenever p and q have the same truth values.
(a) True (b) True (c) False (d) False.
20. p q p --> q v � P H � q
T T T T T T T T F F T
T F T F F F F T T T F
F T F T T T F F T F T
F F F T F T T F F T F
22. False
25. (a) False (b) True (c) True (d) False (e) True (j) True (g) False.
PROPOSITIONAL CALCULUS 601
1 4. 1 . (a) MATRIX
A set of mn numbers (real or complex) arranged in a rectangular array having m
rows (horizontal lines) and n columns (vertical lines). the numbers being enclosed by brackets
[ l or ( ). is called an m x n matrix (read as "m by n matrix").
An m x n matrix is also called a matrix of order m x n. Each of the mn numbers is
called an element of the matrix.
Here each element has two suffixes. The first suffix indicates the row and the second suffix
indicates the column in which the element lies. Thus, a23 is the element lying in the second
row and third column, ai is the element lying in the ith row andjth column.
j
For brevity, a matrix is usually denoted by a single capital letter A or B or C etc.
Thus, an m x n matrix A may be written as
A = [ai) m x n or A = [ai) , where i = 1 , 2, 3, ..... , m ; j = 1 , 2, 3, ..... , n.
1 4. 1 . (b) KINDS OF MATRICES
[../5o - - 3 1] IS.
Real Matrix. A matrix is said to be real if all its elements are real numbers.
a reaI rnatn. x.
r.;
e.g.,
,,2 7
Square Matrix. A matrix in which the number of rows is equal to the number of columns
is called asquare matrix, otherwise) it is said to be a rectangular matrix.
Thus) a matrix A = [ai) m x n is a square matrix if m = n and a rectangular matrix if m t:- n.
A square matrix having n rows and n columns is called "a square matrix of order n" or
"an n-rowed square matrix")
a'3
l�J
Column Matrix. A matrix having only one column and any number of rows i.e., a
Null Matrix. A matrix in which each element is zero is called a null matrix or a zero
matrix. A null matrix of order m x n is denoted by Om x n'
l� l � = 03 X 2 ' [� � � �] = 02 X4
Sub-matrix. A matrix obtained from a given matrix A by deleting some of its rows or
�l
column or both is called a sub-matrix of A.
= [� �] = I� � �
-
II
B is a sub-matrix of A
26 4 -
o o o
604 DISCRETE STRUCTURES
An n-rowed diagonal matrix is briefly written as diag. [dl ' d2 ) ) dnL where •••••••
dp d2 ) ...... ) dn are the diagonal elements. Thus) the above diagonal matrix A can be written
as diag. [2, - 1 , 0].
Scalar Matrix. A diagonal matrix in which all the diagonal elements are equal to a
scalar) say k) is called a scalar matrix.
Thus a scalar matrix is a square matrix in which all non-diagonal elements are zero
{O
and all diagonal elements are equal to a scalar) say k.
. . . when i '" j
�l r- � - � j �tJ
Leo) A= [ai) n x n IS a scalar matnx If aij = k when i = j
{O
all diagonal elements are equal to 1.
when i '" j
A = [aij ] n x n IS
. a unI. t matn. x 1. f aij =
1 when i = j
A unit matrix of order n is denoted by In ' If the order is evident, it may be simply
denoted by I.
Upper Triangular Matrix. A square matrix in which all the elements below the
principal diagonal are zero is called an upper triangular matrix.
Thus) A = [ai)n x n is an upper triangular matrix if aij = 0 for i > j.
2 3 4
Lower Triangular Matrix. A square matrix in which all the elements above the
principal diagonal are zero is called a lower triangular matrix.
Th us, A = [ai)n x n is a lower triangular matrix if aij = 0 for i < j.
-1 o o
For example, 5 6 o is a lower triangular matrix.
3 2 o
MATRIX ALGEBRA 605
Triangular Matrix. A square matrix in which all the elements either below or above
the principal diagonal are zero is called a triangular matrix. Thus) a triangular matrix is
either upper triangular or lower triangular.
Equal Matrices. Two matrices A and B are said to be equal (written as A = B) if and
only if they have the same order and their corresponding elements are equaL
Thus, if A = [ai)m x n and B= [bi)p x q' then A = B if and only if
(i) m = p and n =q (ii) ail bi}
= for all i andj.
Two matrices are said to be conformable for addition if they have the same order.
If A and B are two matrices of the same order) then their sum A + B is a matrix each
element of which is obtained by adding the corresponding elements of A and B.
In general) if A = [ai) mx
n and B = [bi)m x
n ) then A + B = C = n ) where = + [ci)mx cij aij bi)
Similarly, if A and B are two matrices of the same order, then their difference A - B is
a matrix whose elements are obtained by subtracting the elements of B from the correspond
ing elements of A.
For example) if
then A+B=
[23-21
+ 5-6 - 1 2] = [31 1 111]
+ -
_
5 - (- 6) -
and A B=
0-5 4- 7 5 -5
If A=
[b,a, ab22 ab; ] , then kA = [ka,
kb, kb2 kb3
In particular, - A = (-1)
[-ab:
A= _
-b3 ] •
-b22 -a3
-a
1 4.4. PROPERTIES OF MATRIX ADDITION
(i) Matrix addition is commutative i.e., A + B = B + A.
(ii) Matrix addition is associative i.e., (A + B) + C = A + (B + C).
(iii) For any matrix A, there exists a null matrix 0 of the same order as A such that
A + O = O + A = A.
(iv) For any matrix A, there exists a matrix - A of the same order as A such that
A + (- A) = (- A) + A = O.
606 DISCRETE STRUCTURES
ILLUSTRATIVE EXAMPLES
l 2 - :7l
5
Example 2. Express -9 12 as the sum of a lower triangular matrix and an
15 - 13
and
l� � �l
U�
- 0
l- � 7l l 0 l l00 00 0l
be the upper triangular matrix with zero leading diagonal such that
5 a ° O p q
12 4 � b c o + r
15 - 13 6 d e f
=>
l - 7l l 00
2
-9
5
12
15 - 13
4
6
� l
a +
b +
O+ p
c+O
d + e+O
o+ q
O+r
f+O
Equating the corresponding elements on the two sides
2 = a, 5 �p,
0 �l � 0 - 7
-7� q, -9� b, 12 = c, 4 = r, 15 � d, - 13 = e, 6� f
l- �
5
. . L�
l 0 0l 12
15 - 13
and U � 4 .
Two matrices A and B are said to be conformable for the product AB (in this very
order of A and B) if the number of columns in A (called the pre·factor) is equal to the number
of rows in B (called the post·factor).
Thus, if the orders of A and B are m x n and p x q respectively, then
(i) AB is defined if number of columns in A � number of rows in B, i.e., if n � p.
(ii) BA is defined if number of columns in B � number of rows in A, i.e., if q � m.
MATRIX ALGEBRA 607
Let A = [ai)m x n and B = [bi) n Xp be two matrices conformable for the product AB, then
n
AB is defined as the matrix C = [ci) m x p where cij = ai l b ) + ai2 b2j + ...... + ainbnj = L aik bkj
I
k=l
i.e., (i, j)th element of AB = sum of the products of the elements of ith row of A with the
corresponding elements of jth column of B.
The rule for multiplication of two conformable matrices is called row-by-column
method.
Consider A=
l
a ll a'2 a 13 l bll b12
a2 1 a22 a23 and B = b2 1 b22
l l
a3 I a32 a33 b3 1 b32
l l
Orders of A and B are 3 x 3 and 3 x 2 respectively. AB is defined and is of order 3 x 2.
Cll C 12
AB = C = C21 C22
C3 l C32
where cll = Sum of products of elements of 1st row of A and 1st column of B
ll
C31 = Sum of products of elements of 3rd row of A and 1st column of B
b ll
= [a31 a32 a33l b2 1 = a31 b ll + a32b21 + a33b31
b3 1
c32 = Sum of products of elements of 3rd row of A and 2nd column of B
608 DISCRETE STRUCTURES
Note. Another useful notation to remember matrix multiplication.
R :::: 1st Row
where R21 :::: 2nd Row
Ra � 3rd Row
l ��� l :::: [C1 C2],
B :::: I���
b3 1 b3 2 J
where C1 :::: 1st column, C2 :::: 2nd column
l � ; 1l l� ! �l ,
�
- -
-
Example 3. If A = and B = form the products AB and BA
l -m l
and show that AB '" BA.
� �
1 -2 0
Sol. AB = 2 3 1
=
l l(l) + + + + +
-3 1 2
+ ll l
- 2(0) 3(1) 1(0) - 2(1) 3(2) 1(2) - 2(2) 3(0)
2(1) 3(0) - 1(1) 2(0) 3(1) - 1(2) 2(2) 3(2) - 1(0) �
4 4 -2
1 1 10
- 3(1) 1(0) 2(1) - 3(0) 1(1) 2(2) - 3(2) 1(2) 2(0) -1 5 -4
J�II � � l ll � � �l
+ + + + + -
+
BA -
=
ll(l) ++ ++
2 0 -3 1 2
++ l l 7l
0(2) 2(- 3) 1(- 2) 0(3) 2(1) 1(3) 0(- 1) 2(2)
++ ++ ++
0(1) 1(2) 2(- 3) 0(- 2) 1(3) 2(1) 0(3) 1(- 1) 2(2) �
-5 0
-4 5 3
1(1) 2(2) 0(- 3) 1(- 2) 2(3) 0(1) 1(3) 2(- 1) 0(2)
+ + + + + + 5 4 1
Orders of AB and BA are the same but their corresponding elements are not equal.
Hence AB tc BA.
Example 4. fllustrate with the help of examples that multiplication of matrices is not
commutative in general, i.e., AB -::f:- BA. Point out the various possibilities.
Sol. Case I. AB is defined, but BA is not defined.
Let A be a matrix of order 2 x 3, and B be a matrix of order 3 x 4.
Then AB is defined and is a matrix of order 2 x 4, whereas BA is not defined.
Case II. AB and BA are both defined but their orders are different.
x 3 and B be a matrix of order 3 x 2.
Let A be a matrix of order 2
The product AB is defined and is a matrix of order 2 x 2.
The product BA is defined and is a matrix of order 3 x 3.
Since orders of AB and BA are different, AB tc BA.
Case III. AB and BA are both defined and are matrices of the same order, yet AB tc BA
(since corresponding elements are not equal).
MATRIX ALGEBRA 609
Let A= [� !] and B = [! �]
Here AB and BA are both defined and are of order 2 x 2.
AB = [� !] [! �] = [�� �]
BA = [
! �m !] = [! �]
Clearly, AB '" BA.
Hence multiplication of matrices is not commutative in general) i.e.) in generalAB t:- BA.
Note. If AB :::: BA, we say 'A and B commute' .
Example 5. Show by means of an example that the matrix AB = 0 does not necessarily
mean that either A = 0 or B = 0, where 0 stands for the null matrix.
Sol. Consider the matrices A = [� �] and B = [_ � �]
Here A ", 0, B '" O.
But AB = [ � �l � �] = [� = � � : �] = [� �] = O.
Example 6. Prove by an example that AB = AC does not imply that B = C.
Or
Give an example of matrices A, B, C such that B '" C, but AB = AC.
[� �] , B = [� �] , C = [� �]
[1 4] [1 5] [1(1) ++ 4(2) 1(5) ++ 4(1)] 0
Sol. Let A=
3
Example 7. Evaluate A2 - 3A + 91, ifI is the unit matrix of order = I� 3
3 and A l-3
-2
1
-1
2 l .
Sol. A2 = A x A J- 3 �1
l
� �l ll � � �l
-
-
-
-
l l(l) 2 -3 1 2
l
- 2(2) + 3(- 3) 1(- 2) - 2(3) + 3(1) 1(3) - 2(- 1) + 3(2)
2(1) + 3(2) - 1(- 3) 2(- 2) + 3(3) - 1(1) 2(3) + 3(- 1) - 1(2)
l�l
=
- 3(1) + 1(2) + 2(- 3) - 3(- 2) + 1(3) + 2(1) - 3(3) + 1(- 1) + 2(2)
- 12 - 5
=
l -7
11 4
11 - 6
. . A2 - 3A + 9I =
l l
- 12 - 5 11
I I l I
I �l
11 4 1 - 3 2 3 - 1 + 9 0 1
-7 11 - 6 -3 1 2
-2 3
0 0
0
l -7 1 1 1 1 �l
- 12 - 5 11 3 -6 9 9 0
= 11 4 1 - 6 9 - 3 + 0 9
11 - 6 - 9 3 6 0 0
l l - �l ·
- 12 - 3 + 9 - 5 - (- 6) + 0 11- 9 + 0 -6 1
=
A [3 ] ]
Example 8. By Mathematical Induction, prove that if
=
1 -1 '
A [
- 4 then n = 1 + 2n - 4n where n �s' any posawe
n 1 2n _
. . .
�nteger.
[1 +n2n ]
Sol. We prove the result by mathematical induction.
When n = 1, An =
- 4n
1 - 2n
- [ 1 1 - 2. 1 - 1 - 1
A' -
][ ]
1 + 2. 1 - 4. 1 3 - 4 =A
[1 +k2k ]
Let us assume that the result is true for any positive integer k.
let Ak =
- 4k ... (1)
[ ] ]
1- 2k
Now l
Ak+ = Ak . A =
1 + 2k - 4k [3 - 4 [Using (1)]
k 1 - 2k 1 - 1
MATRIX ALGEBRA 61 1
6 1
2. IfA J = � - �t nd B � 2 1 �1j , find 3A - 4B.
II 2 2j 1 5 -3
3. (a) If Am n and B
x
p are two matrices, state the conditions for the existence of
Xq
l
12. _
0 - tan �1
IfA = Cf.
J show that I + A = (I A) [smc� -sin a] .
cos
CI.
tun -2
_
13. ' CI. CI.
o
2 3]
23. (a) Show that A = l� 4 satisfies the matrix equation A3 - A2 - 18A - 301 ::::
-1 O.
1 1
o 1
f[ x
I ( ) = ex' - 5x + 6, find [(A), where A = 1 3 ,
-1 0
24.
[� J
CI.
1 O 0 0 O
26.
0 1 0 J
If E = O l and F = [ 1 0 0 , calculate EF and FE and show that E'F + FE' = E.
o 0
]
If A = [� �] , prove that An = [k; nkknn- 1 for all positive integers n.
[
27.
28. IfA = l� J 1 O
o 1
1 n l.n(n - 1)1
1 1 , then An = 0 1 2 � j for all positive integers n,
0 0
29. IfA = (� �J, 1 2 :::: (� �J and n is a positive integer, then prove that (aI 2 + bA) n :::: anI2 + nan-1 bA.
Factorise the matrix A :::: I� � - �l into the form LV, where L is lower triangular with each
-
30.
l3 7 4]
diagonal element one and U is upper triangular matrix.
Answers
2.
j
3. (a) (i) m = P. n = q (ii) n = p (iii) q = m
(iv) m = n = p = q x 3,
(b) = Y = 8
1 12 11
4. AB J-� ; !1 , BA J= i 7 8
l- 2 2 4] l-2 - 1 5
5. AB :::: I� = �l, no. ofcOls. in B -:f- no. ofroWS in A
l7 - 8 ]
8. BA J1� � 1� �� 1 [-20 - 26]
7. [
43 4]
3 - 43 l 4 3 3 9]
1 1 . (a) _
lj i -- 11 --103 j
-5 4 4
22. Os 3 24' -
II
x
0 -2 1
30. 7/5
3/5 41/ 19
1
�m 19/5 - 32/5 ,
0 327/19
614 DISCRETE STRUCTURES
1 4.7. TRANSPOSE OF A MATRIX (P.T. U., M.C.A. May 2008, May 2007)
Given a matrix A) then the matrix obtained from A by changing its rows into columns
[i r
and columns into rows is called the transpose of A and is denoted by A' or A'.
A square matrix A = [ai) is said to be symmetric if A' = A i.e., if the transpose of the
matrix is equal to the matrix itself.
Thus, for a symmetric matrix A = [aij L aij = aji
Le., (i, j)th element of A = U, i)th element of A
g�l
-1 2 3
h
For example, 2 b are symmetric matrices.
f
3
- �l,ll- � Jl
Thus, all diagonal elements of a skew-symmetric matrix are zero.
l1- �3 - �1 �
-
g
For example, are skew-symmetric matrices.
0 -f 0
I ILLUSTRATIVE EXAMPLES
Example 1. IfA and B are symmetric matrices, prove that AB -BA is a skew-symmetric
matrix.
Sol. A and B are symmetric matrices
=> A' = A and B' = B ... (1)
Now (AB - BA)' = (AB)' - (BA)' [.: (A - B)' = A' - B']
= B'A' - A'B' [.: (AB)' = B'A']
= BA - AB [Using (1)]
= - (AB - BA)
(AB - BA) is a skew-symmetric matrix.
MATRIX ALGEBRA 617
Example 2. Express the following matrix as the sum of a symmetric and a skew-symmetric
matrix,
l-� :l 7
3
0
1 5 l- 2
0 4
5 + 5l �l
+ 9
4 +0 = 9 6
4 l
1
6
t2
l
3
B = t(A + A,) =
325 .@.
2 3
1 + 1 7- 2 41-5- 0 l-50 05
A - A' = l- 2-7
5-1 0 - 4 5-5l 4 - 4 - �l
-
3-3 =
2 -2 �l
0 5
5
"2
-
. . C = t(A - A,) = "2 0
1
2 !l 2 -2 �l
9 0 5
"2 "2
A=B+C= .@. 3 + II 0
2 2
3
where B is a symmetric and C is a skew-symmetric matrix.
o
l
sin 8
l
O is orthogonal. Find the value of 1 A I .
cos 8
=
2
cos 8
o
0
+ sin 2 8
�
o sin 2 8
�
+ eos2 8
l
l J� � �
J lo 0 l =I
618 DISCRETE STRUCTURES
Since AA' = I) A is an orthogonal matrix.
cos 8 o sin 8
IAI= 0 1 0
- sin 8 0 cos 8
1
Expanding by second column)
a l b, CI AI A'
Thus, if A = a2 b2 c2 , then adj A = Transpose of A2 B,
� � � A, C,
where the capital letters denote the co-factors of corresponding small letters in
a 1 b I c1
IAI= a2 b2 C2
aa ba ca
[ a ll a'2 . . . . . . aln
��.1 ��� :::::: ���
.
Theorem. If A is an n-rowed square matrix, then A(adj A) = (adj A) A = I A I In '
[
Proof. Let A=
anI an2 . . . . . . ann
A ll . . . . . . A ln l
�
A 21 n
then adj A = Transpose of
... :::::: �.
[
A nI . . . . . . A nn
)
(where Ai is co-factor of aiJ in I A I)
A ll A 21 . . . . . . A nl l
A 12 A 22 . . . . . . A n2
... ... ..... .
A m A 2n . . . . . . A nn
iAl
A(adj A) = IA I
. .
Similarly,
Hence
Example 4. If A
II �l ,
J� i 2 3
verify that A(adj A) = (adj A)A = I A I I.
I� � ;l Jl�� �� �� l
Sol. A=
II 2 3 a3 b3 c3
AI = I � � 1 - 1, 1 � ; 1 3, 1 � � 1
= A2 = - = A3 = =-1
B, = - I � � 1 - 7, 1 i ; 1 3,
= B2 = = B3 = - 1� �1 5
=
1 � � 1 5, - I i � I = -3, 1 � i 1
+ + 2(- 1) + 1(- 7) + 3(5) 6
C, = = C2 = C3 = =-1
A(adj A) =
IIl�2(I -2�1) +3�l1(-7)ll 5� +-33(5); --�2(3)1l + 1(3) + 3(- 3) 2(- 1) + 1(5) + 3(- l)
=
1(- 1) ++ 2(-7) + 3(5) 1(3) + 2(3) + 3(- 3) 1(- 1) + 2(5) + 3(- 1)l
= 3(-1) 1(- 7) + 2(5) 3(3) + 1(3) + 2(-3) 3(- 1) + 1(5) + 2(- 1)
I�l � � l J�l �0 �l I I I
o°6 o
= = = A
- 1(1) ++ 3(1)
3(1) +- 5(2) - 1(3) + 3(2) - 1(3)l
1(2) -7(3)
= + 3(2) + 5(3)
6l0 °6 °0l 0I 01 �l I I I
5(2) -3(3) - 1(1) 5(1) -3(1) - 1(2) 5(3) -3(2) - 1(3)
o 0 6 I0 0
= = 6 = A
I A I Operating C2 � C2 C3 +
= 32 011 441 Expanding by third row
= 1 1� � 1 = 3 -2= 1
o
= 1 '" 0
= 1 -3-1 i l = 1, = - 1 -3-1 i l =- 1, = 1 -3-3 44 1 -_ 0
I A I :. A-' exists.
A, A2 A3
B, = -I � i 1 =-2, B2= 1 � i 1 = 3, B3 = - I � ! 1 =- 4
I � -1-3 1 = -2, =- 1 � -1-3 1 = 3, = I � -3-3 1 =- 3
2l B2B,B3 l lB, B2 B3 l l-2-21 -133 --3�l
C, = C2 C3
.. = A,
adj A Transpose of A
C
C 2' =
A , A2 A 3
=
= l3(2(0(333)))-3(-3(-1(222))) +++ 4(4(1(000))) 2(3(0(--- 3)3)3) -3(-3(-1(--- 3)3)3) +++ 4(4(1(--- 1)1)1) 3(2(0(444))) -3(-3(-1(444))) +++ 4(4(1(111)))l
J � = i �l
l-2 2 -3
l 30 -4- 1
622 DISCRETE STRUCTURES
A4 = A2 A2 =
l 3(3)0(3)-4- 1(0)(0) 4(-2)-2) 3(0(--4)4)-4(- 1(-- 1)1) 40(2)(2) 3(0(44))-4(0) 4(-3)l
X
-2 2
+ + +
-2(3) 2(0) -3(-2) -2(-4) 2(- 1) -3(2) -2(4) - 2(0) 1(0) -3(-3)
0(-3)
= + O( + +
0I 001 0°1l
+ + +
Now A4 = I
=
Io
=1
II j
adj (AB) = (adj B) (adj A).
0 -2
Example 6. If A = 2 2 4 , verify A2 - 3A + 21 = 0 and hence find A-1
0 0 2
4-6+2 0 0 �
o
= =
0 o
=> A2 - 3A + 2I = O ... (1)
To find A-I , multiplying (1) by A-I , we get A - 31 + 2A-I = 0
624 DISCRETE STRUCTURES
+-l 0
2A-1 = - A 31
-l l
=>
= l 0 0 -2 0� 0
-2 -2 ! 3 01
+
A-l = I
H I 112oo -2112 .
(i) � � = �1 j
aab
(ii) e b b .
lc a e
�j
6 0 -7
l3 3 j II 334 343j .
8. Find the inverse of each of the following matrices :
l� � �j
2 5
(i) (ii) 1 2 (iii) 1
1 2 1 1
9. If diag.
D = where
[d l ' d2, dsl, d,d2d3 " 0, then show that D-l = diag. [d,-' , d2-1 , d3-1].
2 2
MATRIX ALGEBRA 625
4 -1 3
12.
sin cos
8
8
8
8
= 1
tan 8/2
- tan 812
1
1
tan 812
tan 812
l r '
iI
2 1
Prove that the matrix is orthogonaL
"3 "3
14, 2 2
"3 "3
1 2
"3 "3
- �J
Answers
3
J
4 -4 0 1
3
"2 "2
3, (i) 3 -3 + 1 0
"2 "2
[ I[
4 -3 -7 -1 3
t (a + c) t (b + c) t (a - c) t (b - c)
I [� �]
a 0
8, (i)
1
2
1
2
1
4
3
4
11
4
3
4
(ii)
3
4
1
4
1
4
1
4
7
4
5
4
(iii) l- �-3 -3
1
j
O.
-1 0 1
1 1 5 6 1 13
2 4 4 4 4 4
(ii) if I A I = 0, we say that the system is consistent and has infinite solution or non
trivial solution.
Remark. A homogeneous system is always consistent.
626 DISCRETE STRUCTURES
A AX = B A-I
HAS A UNIQUE SOLUTION GIVEN BY X = A-1 B
Proof. Let is non·singular. exists.
Now
A-' Pre-multiplying by
IXX ==A-IA-IBB
Thus the system of equations AX = B has a solution given by X = A-I B.
X, X2 AX, = B AX = B,
Uniqueness :
Let and be two solutions of then
AXAX,2== AXB 2
=>
=> A-(A-I' A(A) X,X,) == (A-A-I' A(A)XX2)
=>
=> IX,Xl == XI�2i.e., the solution is unique.
I I
1.
ILLUSTRATIVE EXAMPLES
AX = B)
+
x + 3y + 4z = 6, by matrix inversion method.
A = l� 231 H X = m , B =lil
Sol. In matrix notations) given system of equations can be written as where
X = A-I B . .(1)
A-I: Al = 1 � ! 1 = - = - 1 ; A'2 = - I � ! 1 = - (4 - 3) = - 1
. . The given system has a unique solution given by
To find 8
A2 = 1 � 41 1 = 4 _ 1 = 3'' �3 =- 1 � ; 1 = - (3 - 1) = - 2
MATRIX ALGEBRA 627
A3I = I � ;I = 3- 2 = 1 ; A32 = - I � ; I = - (3 - 1) = - 2
A33 = 1 � � 1 = 2 - 1 = 1
l
All A '2 A 13 T l - l 3I ll
l
-
adj A = A 2I A 22 A 23 = - 1 -2
ll
A
A-I = a
l I -2 -2 -1
I 1
B,
2x - y + 3z = 9
3x - y - z = 2.
Sol. In matrix notations, given system of equations can be written as AX =
l� Jl X = m, B = lil
1
where A= -1
-1
1 1 2
I A I = 2 -1
3 -1 -1
3 = (1 + 3) - (- 2 - 9) + 2 (- 2 + 3)
= 4 + 11 + 2 = 17 # 0
The given system has a unique solution given by = A-I X B ... (1)
To find A-I : 1 31
A11 = --11 - 1 = 1 + 3 = 4 ''
1
1 = - (- 1 - 3) = 4
-1
A33 = 1 � _ � 1 = - 1 - 2 = - 3
628 DISCRETE STRUCTURES
4 -1
l rl Jl
A ll A '2 A 13
adj A = A 21 A 22 A 23
A 3 1 A 32 A 33
= 111 -74
4 -1 5
17 17 171
H �l
A-I = ��� = 17 -7
1 -1 11 -7 =
4 -3 171 174 -317
X =A-' B
17 17 17
From (1),
4 -1 5 16 -9 + 10 17
Hl
1711 -717 171 17 + 2 1717
l�l = lil
44 -63 = =
171 174 -317 4 + 3617 -6 3174
17 17 17 17 17
::::::} x 1) y - 1) z 2 ) is the required solution.
= = =
Example 3. Solve, by matrix inversion method.
x +y +z = 6
B,
x + 2y + 3z = 10
x + 2y + 4z = 1. (P.T.V., M.e.A. May 2007)
Sol. In matrix notations, given system of equations can be written as AX =
l� !l X =l�l B =ll�l
1
where A= 2
2
1 1 1
Here IAI = 123 6) - (4 - 3) + (2 - 2) 2 - 1 1 ,, 0
= (8 - = =
. .
124
The given system has a unique solution given by A-I X B = ... (1)
A'3 1 � � 1 A21 - I �I
�
= =-2 -2 = 0 ; = = - (4 - 2) = - 2
A22 1 � 4 1
1
' A23 1 1 1 - (2 - 1) 1 1
�
= = 4_ 1 = 3 ' =_ = =-
A31 1 1 1
1 � 1 - (3 - 1) - 2
�
1
=
3 '
=3_2= 1 ' A32
1 =_ = =
MATRIX ALGEBRA 629
A ll
adj A = A 21 l A '2
A 22
A 13
A 23
Tl =
2
l 0 -1 1
- 1 -2
3 II
-2
A 31 A 32 A 33
- l J�
-�1 - �l
l0
adj A
A-' =
IAI
-
From (1), X = A-'
+ + + + +
((iivi)) xx y2y z::3z:: 1=, 6,2x2x3y4y2z::=:: 2,7,3x3x 3y2y 4z::9z =:: 114 +
+ + + + Z + +
+ + +Y+
((vvi)) 57xx -6ylOy 4z5z==15,42,7x13x4y6y-3z2z= 1=9,31,2x llx 6z14y= 468z = 63
+ + + + + +
+ + + +
((vviii)) x2x 3yy 6z::4z =:: 2,2, x3x -y3y = 4z::2z :: 9,7, x5z-4y-8 = 2z::5x :: 73y +
+ + + +
+ + Y+Z + +
(i(xx)) x2yzy-zx =x6.y6::,:: x3xyz,- 3yz= 2.2zx2, x 4xy2y :::: 139zxyz,= 15.6yz2. tzx -xy :::: 17xyz.
Z
+ + + +
[Hint.Divide the equations by xyz and put ...!.. :::: u, ...!.. ::::
yX
w] v, � ::::
Z
2.
(xSolvei ) xlOxthey yfollowing
+ +Z
= 9,= 2x12, x5ylOy72 = 5z,= 12, x -z 1=0z = 12.
+ + Z
2x-y+z
x -y -2z:: :: -3 by matrix method.
(b) Solve for x, y, z, the following equations
x+y+z::
2x-y+z:: ::
:: 223
5. these x-2y + 3z
Does the system x -2y + 3z :::: 2x + y -4z:::: x-y + z:::: have non-trivial solutions ? If so, find
=
solutions.
0, 0, 0
Determine the value of). for which the equations 3x-2y + z::::
have non-trivial solutions.. Find the solutions.
6. 0, AX-
14y + 15z:::: + 2y -3z:::: 0, X 0
Answers
= = =
1. (i) = Y = 0,
xx -1y , z 1 z 1 xx 3,1, 4,2, zz -16
= (ii) = Y = = xx 3,1, 2, zz -23 (iii) = Y = 0, =
1
(vii) x -3, 4, z 1 x 2, -1, z (ix) x 1.2, 2,2, z 3,2
= Y = = (viii) = Y = = "2 = Y= =
1
"2 '3
1
(x::x):: x1, y 1::,:: 2,z:::: 3 z
= Y = ' = (xi)
xx:::: -11,, y::::3,-1,z z::5 :: -1 (xi ) x 1, 1, z 1.
= Y = = = Y = =
2. 3.
4. (a) (b)
5. Yes\ x5; x::; x1,:: 2y::k,2,:: 2zk,5z::k1, z:: where isxarbitrary.
6. =
= Y =
k,
= Y =
=
k,
= 4k,
1, 1, z 1
k
= Y = =
9.
,3; when x:::: y:::: z; whenConsistent3, equations
0Inconsistent.
7. A :::: A :::: 0,
10.
A :::: become identical.
; x:::: 2, y :::: 1, z:::: -4.
1 4.26. RANK OF A MATRIX (PT. u" M.GA May 2007)
Let A be any m x n matrix. It has square sub·matrices of different orders. The
determinants of these square sub· matrices are called minors of A. If all minors of order (r 1) +
are zero but there is at least one non-zero minor of order r, then r is called the rank of A.
Symbolically, rank of A = r is written as p(A) = r or r(A) = r.
MATRIX ALGEBRA 631
For example A =
l�
0
3
0
�l is in echelon form
where as B= l�
0
3
3
�l is non-echelon form
For example II 2l
r(A) = 3, where A = 0 3 0 .
0
0 0 4
632 DISCRETE STRUCTURES
I L LUSTRATIVE EXAMPLES
(.) [
,
-2
1 2
0
3
5
4
7
]
Sol. (i) Here A = [� _ � � �] is a 2 x 4 matrix.
A- [� ! 3
11 1
�l which is in echelon form
(ii) Here A = l� 4 l 2
6
3
2 is a 3 x 3 matrix.
5
r(A) S 3
l� -�l
2
A- 2 operating R3 --; R3 - R2
2 -1
- l� -�l 2
2
0
which is in echelon form.
..
"
r (A) = 2 (No. of non-zero rows in echelon form) .
[
Example 2_ Find the rank of the matrices
(i) l;
-4
3
2
5
4
0
12
-1
-1
-1 l . (ii) 2
3
4
2
"
3 2
1 3
,
. (P.T.V., M.C.A. May 2008)
D [;
6 8 7 5
3 -1
']
-1 -2 -4
-2
.
��� 3 1 3
- ll
6 3 0 -7
l- l
Interchanging C , and C4' we get
3 4 2
A- -1 2
-1 5 12
o
- 45 l , operating R2 --; R2 - Rl ' R3 --; R3 - R,
-l l
MATRIX ALGEBRA 633
- 0 -1 -4
3
0 2 8 -6
4
�l operating R3 --; R3 + 2R2
- -l l 0 -1 -4
0 0 0
3 4
�l which is in echelon form.
..
A0
r(A) <: 4.
[! 4 3 �2 IS. a 4 x 4 matrix.
2 1
8 7
.
n
Operating
[1
2 3
0
A-
-3 in''"'_'" '' =,' R,
-4 - 8
- 4 - 11
- [1 2 3
-4 - 8
0 -3
- 4 - 11
n
o�m'' ' R, > R, - "
'
- [1 2 3
-4 - 8
0 -3
0 -3
!l
""m'in, R, > R, - "
[�
- 0 0 -- 38
-
0
4
2 3
0
!l
w,", ill in �,,'"" 'O<ill
0
.. r(A) = 3 (No. of non-zero rows in echelon form) .
[!
3 -1
1 - 2 = � , interchanging R, and R
']
(iii) Here A0
-
1 3 2
3 0 -7
- [!
- 1 - 2 - <1
3 -1 -1
1 3 -2
3 0 -7
Operating R --; R - 2RI ' R3 --; R3 - 3RI ' R4 --; R4 - 6RI '
- [1
- 1 - 2 - <1
2 2
4 9 1� , operating R3 --; R3 + R2
5 3
9 12 17
634 DISCRETE STRUCTURES
- [j -15
99
-2
12123 117; ,
' 1 operating R4 --; R4 - R3
- [j -1
905
-2
1203
']
1707 '
. 9
operatmg R3 --; R3 - 5 R2
- [l -15
0
0
-2
333
50
-4
27
50
) which is in echelon form.
(iv) r� l
2 4
3 6 l 5 l
l(P.T.U.� , M.C.A.J
0
n
o 1 2
0
1 -l
1 (v) 3 4 (v,) -3 4 .
-�j
o 1 1 1 -2 3
(P.T.U., M.C.A. May 2007) (P.T.U., M.C.A. May 2007) 2008)
l�
Dec.
1 3
2. Determine the rank of the matrix A =
l 3 9
2 6
16 4 12 15
3. Find the rank of
l j l� j
j
3 2
i( v) l -Jj
(i)
3 -1 2 2
-6 2 4 (ii) 3 5 1
-3 1 2 3 4 6
li
-1 2 - 3 1 -3
�
(iii) 1 0 0 1
0
2
3 1 1
0
4
1 2 1 -2
(v)
l� j 2
1
3
-2
2
1
. (P.T.U., M.C.A. Dec. 2006)
MATRIX ALGEBRA 635
4. Determine the rank of AB where
-�
r� 1 1
1 -1 1 -2
A= -3 4 , B= 6 12
-2 3 6 10
Answers
L (i) 2 (ii) 2 (iii) 3 (iv) 3 (v) 3
(vi) 2,
2. 2 3. (i) 2 (ii) 2 (iii) 4 (iv) 2
(v) 3,
4. does not defined.
1 4.30. SOLUTION OF A SYSTEM OF LINEAR EQUATIONS (Rank Method) or (Gauss
}
Jordan Method)
l lll
In matrix notation) these equations can be written as
a ,x + b,y + c,z d'
a2 x + b2 y + c2z = d2
aa x + baY + ca z da
or
l l l�l
or
a , b, C '
where A = a2 b2 C2 is called the co·efficient matrix, X = is the column matrix of
l�:l
aa ba ca
l� l
tions.
Solving the matrix equation AX = B means finding X. i,e" finding a column matrix
l�l l�l ·
such that
X= = Then x = a, y = �, z = y.
636 DISCRETE STRUCTURES
The matrix equation AX = B need not always have a solution. It may have no solution or
a unique solution or an infinite number of solutions.
A system of equations having no solution is called an inconsistent system of equa
tions.
A system of equations having one or more solution is called a consistent system of
equations.
Thus for a system of non-homogeneous linear equations AX = B.
(i) if p[A : B] '" p(A), the system is inconsistent.
(ii) if p[A : B] = p(A) = number of unknowns, the system has a unique solution.
(iii) p [A : B] = p(A) < number of unknowns, the system has an infinite number of solutions.
The matrix [A : B] in which the elements of A and B are written side by side is called the
augmented matrix.
For a system of homogeneous linear equations AX = 0
(i) X = 0 is always a solution. This solution in which each unknown has the value zero
is called the Null Solution or the Trivial Solution. Thus a homogeneous system is always
consistent.
A system of homogeneous linear equations has either the trivial solution or an infinite
number of solutions.
(ii) if P (A) = number of unknowns, the system has only the trivial solution.
(iii) if P (A) < number of unknowns, the system has an infinite number of non·trivial
solutions.
I I L LUSTRATIVE EXAMPLES
Example 1. Solve, with the help of rank method or by Gauss Jordan method, the simul
taneous equations :
x + y + z = 3, x + 2y + 3z = 4, x + 4y + 9z = 6.
�
l� � � �l ' which is in echelon form
[4 X[Xl [�1
2X1 + 2x2 � x3 + x4 = 10.
Sol. In matrix notation, the given system of equations is AX = B, where
2 1 2 1� � 6�
3 3 �3
6 12 ' X = x : B = 36
A= 6 �6 ,
2 2 �1 1 x4 10
3
1
� �; : �
� J
�6 12 : 36
6
2 � 1 1 : 10
[A nl � [! 1 2 1
1 �1 �5
�9 0 9
1 -3 0
� 13
I!
OJ
.
' operatmg R3 --; R3 + 9R2 , R4 --; R4 - R2
- [j
OJ
(- '9)1
1 2 1
1 -1 -5
0 - 9 -36
- 13
_ 99 , operating R3
0 -2 5 17
- [j
1 2 1 OJ
1 -1
0 1
-54 - 13
11 ' operating R4 --; R4 + 2R3
0 -2 5 17
- [j
1 2 1
1 -1
0 1
0 0 13
-54 - ::1
39
' w'"' i, in '0" '"" '.<ill
638 DISCRETE STRUCTURES
r [A : = 4, r(A) = 4,
B] =4
number of unknowns
. . The system has a unique solution.
From 4th
row, 13x4 = 39 ::::::} x4 = 3
From 3,d x3 + 4X4 = 11
row, x3 + 12 = 11 x3 = 11 - 12 = - 1
=> =>
From d
2n x2 -x3 - 5x4 = - 13
row,
=> x2 = - 13 - 1 + 15 = 1
From 1st 2Xl + x2 + 2x3 + x4 = 6
row,
=> 2x, + 1 -2 + 3 = 6
=> 2X, = 4 x, = 2. =>
Hence Xl = 2, x2 = 1, x3 = - 1, x4 = 3 is the required solution
Example 3. Show that the equations
3x + 3y + 2z = 1, lOy + 3z = - 2, X + 2y = 4, 2x- 3y - z = 5,
are consistent and hence o btain the solutions for x, y, z by using Rank method.
Sol. In matrix notation, the given system of equations can be written as AX = B, where
'",m,"',,' ='.rix [A • nl 0
[1 1032 03
-3 -1
2
-ll m""'"",",,, R, """ R,. w. ..,
[A n 1 - [! 102 032
-33 -1
,.
-2! , operating R3 --; R3 - 3RI' R4 --; R4 -2R,
- [; 10
-3
2 0
-7 -1
32 -2
-11
-3
,
, operating R3 --; R3 + R4
- [; -10
2 03
10
-7 -11
-2
-14
-3 '] , operating R3 --; R3 + R2
- [; 2 0
100 43
-7 -1
-2'1
-16
-3
. R4--; R4 + 107 R2
, operatmg
--, l}
1200 403
[= 3,1 0 =03, w",,' " m ,,','on 'o,m.
l l l X = B,
Sol. In matrix notation, the given system of equations can be written as A
where
1 -3 -8 -1
A = 1l� ! -� ' X = lIX� , B = 1l l °�
where A= II 1
1 2
1 2
Augmented matrix [A : B]
=
l�
1 1
2
2 A3 l�l '
operating R2 --; R2 - Rl ' R3 --; R3 - R,
- l� 1
1
1 A-1
1
2
,, - 6
� l '
operating R3 --; R3 - R2
- l� �l
1 1
1 2
0 A-3 "-1
Case I. If A = 3, " '" 10, then
p(A) = 2, p(A : B) = 3 => p(A) '" p(A : B)
The system has no solution.
Case II. If A ", 3, " may have any value, then
3 - 2�1 -7
1414 22 _
R3 --; R3 - 2R2, R4 --; R4 2R2
_
'
operating +
3 21
-� � ,
-
which is in Echelon form
o 0
2 3
p(A) = < = number of unknowns
=> The system has an infinite number of non-trivial solutions given by (take x =
Xl 3x2 2X3 2 k)
+ + - 7X2 - X3
= 0) X3 7k =0 or =-
Leo) Xl 1 1k, =
x2 = k, 7k, k x3 = - where is any number.
Different values of k give different solutions.
Example 7. Solve the following system of homogeneous equations
2x + 3y - z = 0
x- y - 2z = 0
3x + y + 3z = O.
Sol. In matrix notation, the given system of equations can be written as AX = 0,
- 31
where A=
l� =Hx=m,o=ln
1
21 - 31 -- 21 2(- 3 2) - 3(3 + + + 3)
Here I A I = = 6) - 1(1
3 1 3
=- - =- "0 2 - 27 4 33
The system has a unique solution or trivial solution given by x = 0, y = 0, Z = o.
2. Using the loop current method on a circuit, the following equations were obtained :
7il -4i2 :::: 12, - 4ili+l' i122i2 -6iis.s :::: 0, -6i2 + 14is
By matrix method, solve for and
:::: o.
5. Test for consistency the equations 2x -3y + 7z :::: 5, 3x + y -3z :::: 13, 2x + 19y -47z:::: 32.
6. Solve the equations x + 3y + 2z:::: 0, 2x -y + 3z :::: 0, 3x -5y + 4z:::: 0, X + 17y + 4z:::: o.
7. For what values of a and do the equations x + 2y + 3z :::: 6, x + 3y + 5z :::: 9, 2x + 5y + az:::: have
b b
8.
(i) no solution (i ) a unique solution (i i) more than one solution ?
Find the value of k so that the equations x + y + 3z :::: 0, 4x + 3y + kz:::: 0, 2x + + 2z:::: have a °
non-trivial solution.
Y
10. Investigate the values of A and )..t so that the equations 2x + 3y + 5z :::: 9, 7x + 3y -2z :::: 8,
+ 3y + AZ :::: )..t have (i) no solution, (i ) a unique solution and (i i) an infinite number of
2xsolutions.
11. Determine the values of A for which the following set of equations may possess non-trivial solu
tion. 3x1 + x2 -AXs :::: 0, 4Xl -2X2 -3xs :::: 0, 2AX1 + 4X2 + A.xs :::: 0. For each permissible value of
determine the general solution.
A,Investigate
12. for consistency of the following equations and possible find the solutions :
if
13.
4x -2y +
k 6z = 8, xY + -3 z = -1 , 1 5 x -3 y + 9z =
For what values of the equations x + y + z:::: 1, 2x + + 4z:::: , 4x + + 10z:::: k2 have a solution
k 21.
and solve them completely in each case.
Y Y
14. Show that A 5, the system of equations 3x-y + 4z:::: 3, x + 2y -3z :::: -2, 6x + 5y + AZ:::: -3 have
if -:1- -
a unique solution. If A:::: -5, show that the equations are consistent. Determine the solutions in
each case.
15. Find the values of a and for which the equations x + ay + z:::: 3, x + 2y + 2z::::
b b,
are consistent. When will these equations have a unique solution ?
xShow+ 5ythat+ 3z::the:: 9simultaneous
16. linear equations -2x + + z:::: a; x -2y + z:::: ; x + y -2z:::: have
b c,
no solution unless a + + 0. In which case, the system has infinitely many solutions ? Find the
Y
3. "3 Z = "3
(x::i) x:: -1= 5,, y::=:: 4, z::' :: 4 (i,) xInconsistent
Y Y = 1, = 2, Z = 3 (i ') x=- 7' y 7' 7 =� Z = -�
4. 5.
6.
7.
x::(i) a:: 11=k8,, y:::: k15, z:::: -7k, where
b" (i-:I-
) a b
k8,is arbitrary
may have any value (i i) a = 8,b= 15
8. k=8 I-' (i ) A " 5, arbitrary (i i) A = 5, = 9 I-'
MATRIX ALGEBRA 643
.:,--".
-, 9
=
A - 5,
t:- x
:::: "7
4
- '7 :::: 0 ; A :::: - 5, ::::
9
:::: z
4 - 5k ,,
1.:::
3k
x -k where k is arb'ltrary.
-,Y
14. ' '
7 7
- .
Y - , Z ::::
15. If a :::: - 1, b :::: 6, equations will be consistent and have infinitely many solutions
If a :::: - 1, b -:f- 6, equations will be inconsistent.
If a -:f- - 1, b is arbitrary, equations will be consistent and have a unique solution.
Infinite solution when a + b + :::: o. When a :::: 1, b :::: 1, :::: - 2, the solution is k - 1, :::: k - 1,
c c x ::::
k, where k is arbitrary.
16. Y
z ::::
a ,x + b,y + c,z = d,
a2 x + b2 y + c2z = d2 ... (1)
a3 x + b3 y + c3 z = d3
where x) y) z are unknowns. The system in matrix form is AX = B) where
... (2)
Now) our aim is to reduce (2) to an upper triangular matrix. Let a1 t:- o. Then
c,
c�
: d'
j d�
l ... (3)
c3, :: d'3
Here a1 is called the first pivot and b2') c2') d2') b3') c3') d3' are transformed elements.
Now take 62' as the pivot (6 2' '" 0). Then
��2 R2 J�' �� c,
lo 0
R 3 ---> R 3 - ... (4)
644 DISCRETE STRUCTURES
Now if c3" t:- 0) from (4») the given system of linear equations is equivalent to
+ +
a lx b 1y c1z = d1
+
b 2'y c2'y = d2'
c3"z = d3"
Using back substitution Z = d3''1c3''
1
-
y- {d2' C3" - C2' d3''l
b'2C3"
1
and X- _
a
2 3"
b'c
I
I II
{d , b 2 c3 - b , d2 c3 I II
+ b,c2 d3 - b2 c,d3 }
I II "
L This method fails if any one of the pivots b2' or cs" becomes zero. In such cases by
::::
ap
2. Partial pivoting. From the first column of (2) [called the pivot column if -:f- 0, i 1, 2, 3] ai
select the component with the largest absolute value. This is called the pivot. Then at the second stage
i.e., from the second column of (3) select once again the component with the largest absolute value as the
pivot. Continue this process. This procedure is called partial pivoting. [Refer example (1)]
3. Complete pivoting. If we are not interested in the elimination of in a particular order, x, y, z
then we can choose at each stage the numerically largest co-efficient of the entire co-efficient matrix.
This requires an interchange of equations and also an interchange of the position of the variables.
Example 1. Solve the system of equations 3x + y - z = 3, 2x - 8y + z = 5, x - 2y + 9z = 8
using Gauss-elimination method.
-
Sol. The given system is equivalent to
[A : B] = l� 1 -1 ;
-8 < -53 1
-2 9 i 8
Now we will make A as upper triangular choosing 3 as pivot
2 3 1 -1 3
R 2 --; R 2 - - R,
3 0
26 5 -7
1R
R --; R - - 3 3
3 3 , 7 28
3 0 7
3 3
26
Now choosing -3 as the pivot from the 2nd column
3 1 -1 3
R3 --; R3 -
7
R2 - 0
26 5 -7
26 3 3
693 231
0 0
78 26
MATRIX ALGEBRA 645
or AX = B
[A : B] = l
3 0
1 2
2 3
3 0 1 i 2
o 2 _� ! 16
3 i 3
1 i 2
o 3
3 3
In second column, the component with largest absolute value is 3. So interchanging R2
and R3 ) we get
0
� R2
3 1 2
operating R3 --; R3 -
1 2
[A : B] - 0 3
3 3 3
4 16
0 2
3 9
646 DISCRETE STRUCTURES
3 0 1 2
1 2
0 3
3 3
14 44
0 0
9 9
3y = � - % � � - �( -
22
7 )
2 22 14 + 22 36 12 4
= - +- = = = => y=-
3 21 21 21 7 7
From first row, 3x + z = 2
22 14 + 22 36 12
3x = 2 - z = 2 + - = => x= -
7 7 7 7
Hence, the required solution is
12 4 22
x= Y= ,z= -
7' 7 7'
Example 3. Solve
2x + 3y + z =
9,
x + 2y + 3z = 6,
3x + y + 2z = 8, by Gauss-elimination method.
Sol. The given equations in matrix notations are
l� � m�l � lil or AX = B
l
3 1 2 18
[A : B] = 1 2 3 6 , operating R2 --; R2 - �Rl'
3
R3 --; R3 - �R,
3
2 3 1 19
3 1 2 8
o
5 7 10
3 3 3
7 1 11
o
3 3 3
MATRIX ALGEBRA 647
7
In second column) the component with largest absolute value is "'3' So interchaning R2
and R3 ) we get
f
3 1 2 8
7 1 11
0 operating R3 --; R3 - R2 ,
3 3 3
5 7 10
0
3 3 3
3 1 2 8
7 1 11
- 0
3 3 3
54 15
0 0
21 21
54 15 15 5
From third row) - Z� ::::::} z =
- �- -
21 21 54 18
7 1 11 7 1 1 z 11 5
From second row , -y - - z = - ::::::} -y = - + - = - + -
3 3 3 3 3 3 3 54
7 203 203 3 29
3Y � 54 => Y � 54 x 7 � 18
From first row, 2x + 3y + z � 9 => 2x � 9 - 3y - z
87 5 162 - 87 - 5 70 35
or 2x � 9 - - -- � :_::_ - -- - - ::::::} x = -
18 18 18 18 18
Hence) the required solution is
35 29 5
x � 18 , y � 18 ' z � '
18
Solve the following system of linear equations by (i) Gauss-elimination method (ii) Gauss Jordan method.
L 3x + 4y - z :::: 8 ; - 2x + y + Z :::: 3 ; x + 2y - z :::: 2
2. lOx + Y + z 12 ; x + lOy + z 12 ; x + y + 10z 12
� � �
3. 3x + Y + 2z 3 ; 2x - 3y - z - 3 ; x - 2y + z - 4
� � �
4. 2x - 6y + 8z 24 ; 5x + 4y - 3z 2 ; 3x + Y + 2z 16
� � �
5. x + 2y - z 3 ; 3x - Y + 2z 1, 2x - 2y + 3z 2
� � �
6. 2x - 3y + z - 1, x + 4y + 5 25, 3x - 4y + z 2
� � �
7. 2x + Y + 4z 12, 8x - 3y + 2z 20 ; 4x + lly - z 33
� � �
8. 2x + Y + z 10, 3x + 2y + 3z 18, x + 4y + 9z 16
� � �
9. x + 2y + z 8 ; 2x + 3y + 4z 20, 4x + 3y + 2z 16
� � �
10. 5x1 + 2X2 + xs :::: 12 ; - Xl + 4X2 + 2xs :::: 2, 2Xl - 3x2 + lOxs :::: - 45
648 DISCRETE STRUCTURES
11. Xl - X2 - X3 - X4 :::: 2 ; 2Xl + 4X2 - 3xs :::: 6, 3x2 - 4xs - 2X4 :::: - 1 ; - 2Xl + 4xs + 3x4 :::: - 3
12. Xl + 2X2 + 3xs + 4x4 :::: 20 ; 3x1 - 2X2 + 8xs + 4X4 :::: 26, 2Xl + x2 - 4xs + 7X4 :::: 10 ; 4Xl + 2X2 - 8xs - 4X4
=2
13. 5x1 + x2 + Xs + x4 :::: 4 ; Xl + 7X2 + Xs + x4 :::: 12, Xl + x2 + 6xs + x4 :::: - 5 ; Xl + x2 + X3 + 4X4 :::: - 6
14. 2Xl + x2 + 5X3 + x4 :::: 5 ; Xl + x2 - 3X3 + 4X4 :::: - 1, 3x1 + 6x2 - 2xs + x4 :::: 8 ; 2Xl + 2X2 + 2xs - 3x4 :::: 2
15. x + y + 2z - w :::: 5 ; x + 3y + 2z + w :::: 17, x + Y + 3z + 2w :::: 20 ; x + 3y + 4z + 2w :::: 27.
Answers
1. 1, 2, 3 2. 1, 1, 1 3. 1, 2, - 1 4. 1, 3, 5
5. - 1, 4, 4 6. 8.7, 5.7, - 1.3 7. 3, 2, 1 8. 7, - 9, 5
9. 1, 2, 3 10. 2, 3, - 4 11. 2, - 1 , - 2, 3 12. 4, 3, 2, 1
1 4
13. 1, 2, - 1, - 2 14. 2, - , 0, - 15. 1, 2, 3, 4.
5 5
ARITHMETIC
1 5A PROGRESSION
1 5.1 . SEQUENCE
Consider the following arrangement 3, 7, 11, 16, .
Each term of the above arrangement is four more than the proceeding term. We call it
uA
sequence Le.,
succession of numbers formed according to a certain rule, arranged in a certain
order ) is called a sequence."
The nth term of a sequence is denoted by Tn' tn' an' a(n) etc.
A A
1 5.2. FINITE AND INFINITE SEQUENCE
sequence containing finite number of terms is called a finite sequence. sequence
having infinite number of terms is called an infinite sequence.
For e.g., the sequence I, 3, 5, 7, 9 is a finite sequence and the sequence 2, 4, 6, 8, 10, .
) is an infinite sequence. Consider some more examples given below :
. . n(n + 1) (2n + 1)
Example 1. Wnte the first three terms oithe sequence < an>' where an = .
6
Sol. For n = 1, 2, 3, we have
Ix 2 x 3 2x3x5 3x4x7
a1 = = I, a2 = = 6, a3 = = 14.
6 6 6
Tn1
Example 2. Find Tw ior the sequence < Tn> where T, = 1, T2 = 6, Tn =T
n
' n :> 3.
-2
. Tn- 1
Sol. GlVen T, = 1, T2 = 6, Tn = - , n :> 3. Put n = 3, 4, 6, . . . . . , so that
Tn- 2
T2 6 T3 6 T4 1 1
T3 = = 1 = 6, T4 = = 6" = 1 T5 -
- - =-=-
T, T2 T3 6 6
1 1
6 6
Ts 6 Tg 6
Similarly, T g = -- = 1 = 6, T lO = = 6" = 1 .
T7 Ts
649
650 DISCRETE STRUCTURES
Example 3. Find the second term of the sequence where Tn = {_ 1)n-1 2n-1, n E N
(P.T.U., M.B.A. May 2003)
Sol. Given Tn (_ 1) n-1 2 n -1
= (1)
Put n = 2 in (1), T, = (- 1) ' 2 ' = - 2.
i.e, the result holds for n = m + 1, which completes the induction. Therefore by the principle of
mathematical induction, the given result holds for each n i.e.,
Tn = a + (n - l)d, n E N.
I I L L U STRATIVE EXAMPLES
Example 1. Find the 20th term and nth term of the sequence 4, 9, 14, 19 ...
Sol. Given sequence 4, 9, 14, 19, ... , is an AP. Here a = 4, d = common difference = 9 -
4 = 5. Using T n = a + (n - l)d, we have
T20 = 4 + (20 -1) (5) = 4 + 95 = 99
Also Tn = 4 + (n - 1) (5) = 5n - 5 + 4 = 5n - 1.
Example 2. Show that the sequence log a, log b' log b2' ... is an A.P.
a2 a3
a3 a 2 a b 3 a
T3 - T = log - - log - = log - x - = log -
' b2 b b 2 a2 b
a
Thus T, - T, = T3 - T, = ... = log b
.. The given sequence is an AP.
Example 3. Which term ofA.P. 3, 15, 27, 39, ... will be 132 more than its 54th term ?
(P.T.U., M.B.A. May 2006)
Sol. Here a = 3, d = 12, Let T, be the required term such that
T, + 132 = T5,
=> a + (r - l)d + 132 = a + (54 - l)d
=> (r - l)d + 132 = 53d (1)
12(r - 1) + 132 = 53 x 12 = 636
12(r - 1) = 636 - 132 = 504
504
r-l= - = 42
12
=> r = 43 i.e., the required term = T' 3 '
Example 4. Iflog10 2, log10 (2' - 1), log10 (2x + 3) form an A.P., /ind the value ofx.
Sol. Given loglO 2, loglO (2X _ 1), loglO (2X + 3) are in AP.
=> logl O (2X_ 1) - logl O 2 = log l O (2X + 3) - logl O (2X - 1)
2X - 1 2" + 3 2" + 3
2" - 1 --
=> log lO -- = log lO => --2
=
2 2" - 1 2" - 1
t-l t+3
=> = t = 2x => (t - I)' = 2t + 6
t - 1'
-- --
2
=> t' + 1 - 2t = 2t + 6 => t' - 4t - 5 = 0
=> t' - 5t + t - 5 = 0 => t(t - 5) + (t - 5) = 0
=> (t + 1) (t - 5) = 0 => t = - I, t = 5
When t = - 1, we have 2X = - 1, not possible
When t = 5, we have 2X = 5 => x = log, 5.
Example 5. Show that the sequence {n2 + 4} is not an A.P.
Sol. Let Tn = n' + 4 ' n E N .
T, = (I)' + 4 = 5, T, = (2)' + 4 = 8,
T3 = (3)' + 4 = 13, T, = (4)' + 4 = 20,
The given sequence is not an AP., because the differences T, - T" T3 - T" ...... are
not equal.
652 DISCRETE STRUCTURES
Example 6. For what value of n, the nth term of the series ,'
"3 + 10 + 1 7 + ...... " and "63 + 65 + 67 + ...... " are equal.
Sol. 1st series. We have 3 + 10 + 17 + .
Here a, = 3 and d, = 10 - 3 = 17 - 10 = 7
.. Tn = a, + (n - l)d, = 3 + (n - 1) 7 = 7n - 4.
lInd series. We have 63 + 65 + 67 + .
Here a, = 63 and d, = 65 - 63 = 67 - 65 = 2
.. Tn = a, + (n - 1) d, = 63 + (n - 1) 2 = 2n + 61.
Let nth term af given series be equal.
.. 7n - 4 = 2n + 6 1 ar 5 n = 65 i.e., n = 13.
Example 7. Determine the Ist term and the 40th term of the A.P. whose 7th term is 34
and 15th term is 74.
Sol. Let a be the first term and d, the camman difference af the A.P.
:. We have T7 = a + 6d = 34 (1)
and T, 5 = a + 14d = 74 (2)
(2) - (1) => Sd = 40 => d = 5.
Putting d = 5 in (1), we get a + 6(5) = 34 ar a = 34 - 30 = 4.
First term = a = 4 and 40th term = T,o = a + 39d = 4 + 39 (5) = 199.
4 2
-
Example 8. The 2nd, 31st and last terms ofan A.P. are 7 � , 2 and 6 2 respectively.
2
Find the first term and the number of terms.
Sol. Let a be the first term and d, the camman difference af the A.P.
:. We have
3 31
T2 = 7 - = -
4 4 '
1
2
1
T3 1 = - and last term ' I = - 6 - = -
2
13
2
. -
Naw T, = a + d and T3 1 = a + 30d.
a + d=
31
4
- (1)
1
and a + 30d = - (2)
2
( )
Let number af terms be n.
1 32 - n + 1 ' 33 - n
1 = Tn = a + (n - l)d = S + (n - 1) - - = = -- .
4 4 4
-- - -
33 - n
4
-
13
2
33 - n = - 26 "e., n = 59.
ARITHMETIC PROGRESSION 653
Example 9. If (p + l)th term of an A.P. is twice the {q + l)th term, prove that the
{3p + l)th term is twice the (p + q + l)th term.
Sol. Let a be the first term and d, the common difference of the AP.
We have Tp +1 = 2Tq+1 '
=> a + (p + 1 - l)d = 2[a + (q + 1 - l)d]
a + pd = 2a + 2qd => a = (p - 2q)d ... (1)
Now Top+l = a + (3p + l - l)d = (p - 2q)d + 3pd = 2(2p - q)d (Using (1 »
and Tp+q+1 = a + (p + q + 1 - l)d = (p - 2q)d + (p + q)d = (2p - q)d
.. T3P+1 = 2Tp+q+1'
Example 10. The fourth term of an A.P. is equal to three times the first term and the
seventh term exceeds twice the third term by one. Find the first term and the common difference.
Sol. Let a be the first term and d, the common difference of the AP.
.. Tn = a + (n - l)d , n E N
By the given conditions, T, = 3 T, (1) and T7 = 2T3 + 1 (2)
3d
(1) => a + 3d = 3a or a=- (3)
2
(2) => a + 6d = 2(a + 2d) + 1 or 2d = a + 1
3d d
or 2d = - + 1 or - = 1 or d = 2 [by (3)]
2 2
3
.. (3) => a = - (2) = 3.
2
Example 11. If m times the mth term of an A.P. is equal to n times its nth term,
then show that {m + n)th term of the A.P. is zero.
Sol. Let a be the first term and d, the common difference of the A P.
.. Tm = a + (m - l)d and Tn = a + (n - l)d
By the given condition, mTm = nTn
=> m{a + (m - l)d) = n {a + (n - l)d) => ma - na + m(m - l)d - n(n - l)d = 0
=> (m - n)a + (m2 - m - n 2 + n)d = O => (m - n)a + (m - n)(m + n - 1)d = O
(m - n){a + (m + n - l)d) = 0 => a + (m + n - l)d = 0 ( .,' m r' n)
.. Tm+n = O.
Example 12. Ifpth, qth, rth terms of an A.P. be a, b, c respectively, then prove that
p(b - c) + q (c - a) + r{a - b) = o.
Sol. Let A be the first term and d, the common difference of the AP.
We have Tp = a, Tq = b and T, = c
.. A + (p - l)d = a, A + (q - l)d = b and A + (r - l)d = c.
-
L.HB. = pCb c) + q(c - a) + rea - b)
= pleA + (q - l)d) - (A + (r - l)d] + q[(A + (r - l)d) - (A + (p - l)d)] + r[(A + (p - l)d)
- (A + (q - l)d)]
= p [d(q - 1 - r + 1)] + q [d (r - 1 - P + 1)] + r [d(p - 1 - q + 1)]
654 DISCRETE STRUCTURES
(iii) ka, kb, ke, k 'l" 0 are also in AP. (iv) � '�'I' k 'l" 0 are also in AP.
Proof. Given a, b, c are in AP.
.. b -a=e-b
(i) a + k, b + k = e + k will be in AP. if b + k - (a + k) = e + k - (b + k) i.e., if b - a = e - b,
which is true
(ii) a - k, b - k, e - k will be in AP. if b - k - (a - k) = e - k - (b - k) i.e., if b - a = e -b,
which is true
(iii) ka, kb , ke are in AP. if kb - ka = ke - kb i.e., if k(b - a) = k(e - b) i.e., if b - a = e - b,
which is true
a b c b a e b b-a e-b
(iv) k ' k ' k will be in AP if k - k � k - k i.e, if � i.e., if b - a = c - b, which
-- --
k k
is true
Theorem III. If each term of an AP. is
(i) increased by the same number (ii) decreased by the same number
(iii) multiplied by the same number (iv) divided by the same number,
then the resulting sequence is also an AP.
Proof. Let the given AP. is a, a + d, a + 2d (1)
(i) Let each term is increased by "k' , then the new sequence will be
a + k, a + k + d, a + k + 2d, .
This is again an AP. with common difference d and first term a + k.
(ii) Let each term of (1) is decreased by k. The new sequence will be
a - k, a - k + d, a - k + 2d, .
It is again an AP. with common difference d and first term a - k.
(iii) Let each term of (1) is multiplied by k '" 0 the new sequence will be
ka, k(a + d), k (a + 2d), .
It is again an AP. with common difference kd and first term ka.
(iv) Let each term is divided by k, k ", 0 the new sequence will be
a a + d a + 2d or a a d a 2d .
k '
- - +- - + -
k' k ' k k'k k 'k
d
It is again an AP with common difference , k '" 0 and first term !!:.- , k '" O.
k k
1 5.4. IMPORTANT OBSERVATIONS
(i) If sum of three numbers in AP. is given, the numbers are a - d, a, a + d.
(ii) If sum of four numbers in AP. is given, the numbers are a - 3d, a - d, a + d, a + 3d.
(iii) If sum offive numbers in AP. is given, the numbers are a - 2d, a - d, a, a + d, a + 2d.
Note. If sum of numbers in A,P, is not given, then the numbers are a, a + d, a + 2d, '
ARITHMETIC PROGRESSION 655
$ + ../c .,fa + $
if b - a = c - b if a, b, c are in AP., which is given to be true.
1 1 1 .
are m A. P .
hb i ' i r ' i h
", + -yc -yc + -ya va + "b
(vi) (b + C)2 a 2 , (c + a)2 - b 2 , (a + b)2 c 2 are in AP.
_ _
Example 14. The sum of the first three consecutive terms of an A.P. is 9 and the sum of
their squares is 35. Find Tn'
Sol. Let the first three consecutive terms of the AP. be a - d, a, a + d.
Sum = (a - d) + a + (a + d) = 9 (Given)
3a = 9 Le., a = 3.
. . The numbers are 3 - d, 3 , 3 + d.
ARITHMETIC PROGRESSION 657
(9 + d 2 - 6d) + 9 + (9 + d 2 + 6d) = 35
2d 2 = 35 - 27 = 8 Le., d 2 = 4 or d = ± 2.
Case I. d = 2. . . The numbers are 3 - 2 = I , 3, 3 + 2 = 6.
.. The AP. is I, 3, 6, . and Tn = a + (n - I)d = 1 + (n - 1)2 = 2n - 1 .
Case II. d = - 2. . . The numbers are 3 - (- 2) = 6, 3, 3 + (- 2) = 1.
The AP. is 6, 3, I , . and Tn = a + (n - l)d = 5 + (n - I) ( - 2) = - 2n + 7.
Example 15. Find four numbers in A.P. whose sum is 20 and the sum of whose squares
is 120.
Sol. Let the numbers be a - 3d, a - d, a + d, a + 3d.
.. Sum = (a - 3d) + (a - d) + (a + d) + (a + 3d) = 20 (Given)
4a = 20 i.e., a = 6
The numbers are 6 - 3d, 6 - d, 6 + d, 6 + 3d.
Also, sum of squares = (5 - 3d)2 + (5 - d)2 + (5 + d) 2 + (5 + 3d)2 = 120 (Given)
(25 + 9d2 - 30d) + (25 + d2 - 10d) + (25 + d 2 + 10d) + (25 + 9d 2 + 30d) = 120
20d2 = 20 i.e., d2 = I or d = ± 1.
Case I. d = 1. The numbers are 6 - 3(1), 6 - (1), 6 + (I), 6 + 3(1) or 2, 4, 6, 8.
Case II. d = - 1. The numbers are 6 - 3(- 1), 6 - ( - 1), 6 + (- I), 6 + 3(- 1) or 8, 6, 4, 2.
Example 16. If Xi8 = y2i = Z28, prove that 3, 3 logy x, 3 logz y and 7 log z are in A.P.
x
[ ) [
y (log k)/ 21 18
)
IOg X = 3 (lOg k) / 18 = 3 X 2l = 7..
3 10gy x = 3 log
2
_ 3 [ lOg y ) -_ 3 [ (lOg k)/ 21 ) -_ 3 x 28 _
3 10gz y - -4
log z (log k) / 28 21
1. Show that 4, 10, 16, 22, """ is an Find its 7th and 9th terms.
A,P,
Show that 6,5 -,4 1 2 is an Find its 10th and kth terms.
2.
3 -,4, 3 " "
' A,P,
3. Find the 20th, 25th and nth terms of the given by 21, 16, 11, 6, .
AP.
4. Show that log a, log ab, log ah2, is an Find its 7th and nth terms.
" " " A,P,
6. Each term of an is doubled. Is the resulting sequence also an ? If it is, write its first
A,P, A,P,
term, common difference and the nth term.
7. Determine the number of terms in the sequence 17) 14"21 ) 12, """) -38.
8. Which term of the 1, 6, 11, 16, ...... is 301
AP. ?
9. Which term of the series 20 + 16 + 12 + " is - 96 ? " "
5b, 5e are in
2 2 2
(ii) - , - , - are in
(i) 5a, AP.
bc ca ba AP.
(iii) b +
c, c + a, a + b are in b + e -4a ' e + a - 4b ' a + b -4e are In. ,
(,'v)
A,P,
3 3 3 A P,
b + c --,
c+a a + b 111
20. (i) If a + b + C -:f-
a b c are in show that a , -b , -c are also in
0 and --, --
A,P" - A,P,
(ii) If the numbers a2 , b 2 , c2 are in show that -b +1-c ' c +1 a , a+1 b are also in
A,P" - -- --
A,P,
(iii) If the numbers a2 , b2 , c2 are in show that -b--a ' -- b ' -- e are in
A,P"
+ c c + a a+ b A,P,
2 1. If log5 2, log5 (2X - 3), log5 ( 127 + 2X-1) are in then find the value of x,
A,P"
22. The sides of a right angled triangle are in show that these are in the ratio 3 : 4 : 5,
A,P"
ARITHMETIC PROGRESSION 659
23. The pth term of an AP, is q and the qth term is show that its rth term is p + q - r.
P,
24. If pth, qth, rth terms of an A.P. be a, b, c respectively, then show that a(q - r) + b(r - p)
+ c(p - q)�O.
25. Find the 8th and nth terms of the series n1 + 2nn+ 1 + 4nn+ 1 +
- --- ---
Can the 8th term be deduced from the nth term. If not, why ?
26. In any A,P, show that Tm+n + Tm_n 2Tm ,=
29. If a, b, c are inA'P' J show that bc_a2 ,ca_ b2 ,ab _ c2 are in A,P,
30. If the roots of the equation (b -c)x2 + (c - a)x + (a -b) 0 are equal, then show that a, b, c are in
=
AP.
31. Find three numbers in A,P, whose sum is -3 and product is 8.
32. (i) The sum of three numbers in A,P, is 9 and the sum of their squares is 59.Find the numbers.
(ii) The sum of three numbers in A,P, is 15 and the sum of the squares of the two extremes is 58,
Find the numbers,
33. Split 69 into 3 parts in A,P, such that the product of two smaller parts is 483,
34. Four numbers are in A,P" their sum is 16 and sum of their squares is 84, Find the numbers,
35. Divide 32 into four parts which are in A,P, such thatthe product of the extremes is to the product
of means as 7 15,
:
Answers
1. 40, 52 2. 0,
20- 2k 3. -74, -99, 26 - 5n 4. log ab6 , log abn- 1
3
5. 16/33 6. yes 7. 23 8. 61
9. 30 10. No 13. 14 14. - 47, 13- 4r
15. -8, 5r - 18 16. 1, 2 17. 0 18. 4, 9
14n + 1 2n2 - 2n + 1
21. 3 25
•
n , n N , 0 27. 13
17 + 2x
2 (2" -3)
:. Sides are 4d - d, 4d, 4d + d.
22. (a + d)' � a2 + (a - d:j2 � a � 4d '0
I
ro
25. Ts cannot be deduced from Tn because 'c.d,' is in terms of n,
27. Required numbers are 14, 21, 28, """) 98. a
29. be - a2, ea - b2, ab - e2 are in AP. if (ea - b2) - (be - a2) � (ab - e2) - (ea b2). _
m
= 2 (2a + (m - I)d) + a + (m + I - I) d I Using (2)
m+ l m+l
=- - (2a + md) = -- (2a + (m + 1 - 1)d)
2 2
i.e., the result holds for n = m + 1, which completes the induction. Therefore by the principle of
mathematical induction, the given result is true for each n i.e.,
n
8 n = "2 (2a + (n - l)d).
Particular Cases
n n n
(a) We know 8 n = - (2a + (n - 1)d) = - (a + a + (n - l)d) = - (a + l) '
2 2 2
The above form is used when the last term is known to us.
(b) We know 8 n = T, + T, + T3 + ". Tn
= (T, + T, + T3 + " . + T n_1 ) + T n = 8 n _ 1 + T n
===> Tn = Sn - Sn _ 1 J n > L For n = I, T l = 8 1 >
I I L L U STRATIVE EXAMPLES I
Example 1. Evaluate
(i) 2 + 4 + 6 + " . 50 terms (ii) 45 + 47 + 49 + ". + 99
"' 1 2 1
('") - + - + - + ". 25 terms.
9 9 3
28
88= (45 + 99) = 14 (144) = 2016.
' 2
2 1 1 1 2 3-2 1
(iii) Here T, - T, = 9 - 9 = 9' T3 - T, = 3 - 9 = -9- = 9
l I n
. . Given series is an A.P. with a = 9' d = 9 ' n = 25. :. Using 8 n = "2 (2a + (n - 1)d),
we have
662 DISCRETE STRUCTURES
Example 2. Find theA.P. in which the sum ofany number of terms is always three times
the square of the number of these terms.
Sol. Let the AP. be a, a + d, a + 2d, ...... .
By the given condition, 5n = 3n'.
Using Tn = Sn - Sn_ l J we have
Tn = 3n 2 - 3(n _ 1) 2 = 3n2 _ 3(n 2 - 2 n 1) = 6n - 3
+
T, = 6(1) - 3 = 3, T2 = 6(2) - 3 = 9, T3 = 6(3) - 3 = 15, .
3.
. . The AP. is 3, 9, 15, .
Example Find the sum ofall integers which are divisible by 7 and lying between 50
and 500.
Sol. Integers lying between 50 and 500 and divisible by 7 are 56, 63, 70, . . . . . . , 497.
:. Required sum = 56 + 63 + 70 + . . . . . . + 497
This is an AP. with a = 56 and d = 7
Let n be the number of terms . . . 497 = Tn
=> 56 + (n - 1)7 = 497 Solving, we get n = 64
64
.. Required sum = 5 4 =
6 2
+
(56 497) = 32(553) = 17696.
Example 4. How many terms of the sequence - 12, - 9, - 6, - 3, ...... must be taken to
make the sum 54 ?
Sol. The given sequence is - 12, - 9, - 6, -3, .
Here T2 - T, = 9 (- 12) = 3
- -
T3 - T2 = - 6 - (- 9) = 3
T4 - T3 = - 3 - (- 6) = 3
35 35
2
- +
53 5 = - [2( 2) (35 - 1)4] = - x 132 = 2310.
2
ARITHMETIC PROGRESSION 663
Example 6. If the first term of an A.P. is 2 and the sum offirst five terms is equal to
0
one-fourth of the sum of the next five terms, then :
(,) show that T2 = - 1 1 2 (i,) find the sum offirst 30 terms.
Sol. Let the AP. be a, a + d, a + 2d, ......
1
We have T, + T2 + T3 + T4 + Ts = "4 [T6 + T7 + Ts + Tg + TlO ]
( )
Conversely, let a, a + d, a + 2d, ...... be an AP.
n n d d n
5n =- [2a + (n - 1)d] = - [nd + (2a - d)] = - n2 + a - -
2 2 2 2
d d
= An2 + Bn, where A = - 2 and B = a - -.
2
5n = An2 + Bn, where A andB are constants, independent ofn.
Converse is also true.
Example 8. If the sum ofm terms ofanA.P. be n and the sum ofn terms be m, show that
the sum of m + n terms is - (m + n).
Sol. Let a be the first term and d, the common difference of the AP.
m
.. 5m = n => - [2a + (m - l)d] = n => 2am + m(m - 1)d = 2n (I)
2
n
and 5n = m => - [2a + (n - l)d] = m => 2an + n(n - l)d = 2 m (2)
2
664 DISCRETE STRUCTURES
2
m + n (-2) = - (m + n).
= -- (Using (3»
2
Example 9. If the sum offirst n, 2n, 3n terms ofan A.P. are 51' 52' 53 respectively show
that 83 = 3(82 - 81 ).
Sol. Let a be the first term and d, the common difference of the A.P.
n 2n 3n
= 2"""
.. 5, = "2 [2a + (n - I)d], 82 = 2""" [2a + (2n - I)d] and 83 [2a + (3n - I)d]
2
3n 3n
= -[4a + 4nd - 2d - 2a - nd + d] = [2a + (3n - l)d] = 83 = L.H.S.
-
2 2
Example 10. If the sum of m terms of an A.P. is to the sum of n terms of the same A.P.
is as m 2 : n2 ; prove that the ratio of its mth and nth terms is 2m - 1 : 2n - 1.
Sol. Let a and d be respectively the first term and common difference of the A.P.
8 m2
--"'- - -
By the given condition,
S n n2
m
- [2a + (m - l)d] 2a + (m 1)d m
2 -
n 2a + (n 1)d n
"2 [2a + (n - l)d]
-
Required ratio =
m
T a + (m - l)d a + (m - 1).2a
[by (I)]
T a + (n - l)d a + (n - 1).2a
n
1 + 2m - 2 2m - 1
=
1 + 2n - 2 2n - 1 .
(.: a ", 0. For if a = 0, then d would also be zero.)
2. Find the sum of indicated number of terms of each of the following A,P,
C') 5, 2, -1, ...... n terms. Cii) 0. 9 , 0.91, 0. 9 2, ...... 100 terms.
3. Find the following sums :
C') 2 + 5 + 8 + ..... + 44
2 1
C") 6+ 5 + 5 + ...... + .
.. 2
"3 "3 "3
4. If Sn denotes the sum of n terms of an A,P, whose common difference is d, show that
= d Sn - 2Sn_1 + Sn_2J n 2.
>
5. (0 Find the sum of 10 terms of the sequence (x + y)2 , x2 + y2 , (x y)2 , .....
_ .
x Bx - 2y 5x - By
(ii) Find the sum of 27 terms of the sequence -- ,
x+y x+y , x+y ,
-Y
. . . . . •
6. (0 Find the sum of all odd numbers between 100 and 200.
(ii) Find the sum of first 100 even natural numbers divisible by 5.
(iii) Find the sum of all natural numbers between 200 and 400 and divisible by 7.
(iv) Find the sum of all positive integers less than 500 and divisible by both 3 and 7.
7. (0 Find the rth term of the A,P., the sum of whose first n terms is 2n + 3n2 ,
(ii) Find the sum of first n terms of the A, P , whose kth term is given by 5k + 1,
(iii) Find the sum of first n terms of an A, P , whose nth term is 5 -6n, n N. E
8. (0 How many terms of the A,P, 4, 7, """ are needed to give sum 715 ?
I,
(ii) How many terms of the A, P , -6, - 11/2, -5, """ are needed to give sum -25 ?
9. (0 How
answer,many terms of the A,P, 18, 16, 14, """ are needed to give sum 78 ? Explain the double
(ii) If the first term of an A, P , is 22, the common difference is -4 and the sum to n terms is 64, find
n. Explain the double answer,
10. Solve the equation : 1 + 6 + 11 + """ + x 148, =
11. If Sl ' S2' Ss are the sums of n terms of three A,P,s, the first term of each being unity and the
respective common differences being 2, 3, show that Sl + Ss 2S2 ,
I, =
12. (0 Find the sum of first n terms of an A,P, whose 7th term is 30 and 13th term is 54,
(ii) If the 5th and the 12th terms of an A, P , are 30 and 65 respectively, what is the sum of the first
20 terms ?
13. If Sn denotes the sum of n terms of an A,P, show that S3 0 = 3 (S2 0 - S lO ) '
14. Find the common difference of an A,P, whose first term is 100 and the sum of whose first six terms
is five times the sum of the next six terms,
15. Show that the sum of first n even natural numbers is equal to (1 + �) times the sum of first n odd
natural numbers,
16. If the 12th term of an A,P, is - 13 and the sum of the first four terms is 24, what is the sum ofthe
first 10 terms ?
17. The sum f filrst n terms f an A, P . zero, show that the sum f next terms . am (m + ,
0 0 , IS 0 m IS -
n-l
n)
19. The first, second and the last terms of a finite are a, b, respectively. Show that the sum of AP, c
20. If the sums of the first p, q, r terms of an be a, b, respectively, show that A,P, c
a- � - � + -b � - � +-(p c - 0 ��
p q r
21. If the sum of first p terms of an is equal to the sum of first qterms, show that the sum of first
A,P,
p + q terms is zero,
22. If the pth term of an is ...!.q . and qth term is -..!.., show that the sum of pq terms is �2 (pq + 1).
A,P,
P
Answers
L (,) 1275 1260 (h) (iii)4225
2. ( ) n ( 13 - 3n) / 2
, 139.5 (h) 3. (i) 345 .. 5 2
(��) 6 -
27 [ 27Xx -+ y14Y ]
3
6. ( ) 10 (x2 + y2 - 7xy)
, (h) 6. (i) 7500 (ii) 50500
Hints
4. Sn - 2Sn_1 + Sn_2 = (Sn - Sn_l) - (Sn_l - Sn_2 ) = Tn - Tn_1 = d .
7. (,)
T, � S, - S,_l'
The is 5(l) + 5(2) + 5(3) + ......
(ii) AP. 1, 6. 11. 16
1, 1, Le.. • .
n
10. We have x � 1 + (n - 1)5 and 148 � -(1 + x).
2
14. S � 5(S -S ) 12 6S � 5S =c} 6 [� (200 + 5d)] � 5 [� (200 + lld)]
12 =c}
6 6 26 2
16. Solve a + 11 d � - 13 and
4 [2a + 3d] � 24 . -
2
17. If the be a. a + d. a + 2d then 2 [2a + (n - 1)d] � 0 implies d � �
AP. • . . . . . .
n-1. �
19. =::::}
c-a =n_l =:::}
b -a b-a
:. Sum � "2n (a + c) .
. p D
a � - (2A + (p - 1)D] lmplIes - � A + (p - 1) -
. . a
20.
2 p 2 etc.
21. Sp = implies � [2 a + (p - 1)d] � % [2a + (q - 1)d]
Sq
A, M ,
7 + 29 36
For example, the between 7 and 29 is ---2
� - = 18.
2
1 5.8. n A. M.s BETWEEN ANY TWO GIVEN NU MBERS
Let a, b be any two numbers. Let A" A2 , . . . . . . , An be the n AM.s between a and b .
. . By definition, a, A" A2 , ...... , An ' b are in AP. Let d be the common difference of this
AP.
b-a
Now b � Tn +2 a + (n + l)d.
� d � -
n+l
A1 � a + d � a + --
b-a
n+ 1
668 DISCRETE STRUCTURES
[--)
b-a
� = a + 2d = a + 2 n + 1
[ )
� = a + nd = a + n ��: .
ILLUSTRATIVE EXAM P L ES
3.
Example The sum of two numbers is 13/6. An even number ofA.Ms are being inserted
between them and their sum exceeds their number by 1. Find the number of A.M.s inserted.
Sol. Let the numbers be a and b. . . a + b = 13/6.
Let A" A" ...... , A n be the 2n (even number) AM.s between a and b .
'
.. A, + A2 + ....... + A2n= 2n (AM. between a andb)
=2n ( )
a+b
2
= n(a + b) = n x E = E n
6 6
Also A, + A2 + ...... + A2n = 2n + 1 (Given)
13 n . n =6.
6 n = 2n + 1 or "6 = 1 "e.,
an + bn
Example 4. Find n such that n 1 1 may be the A.M. between distinct numbers
a + bn
a and b.
a+b
Sol. The AM. between a and b is a + b . Let
2 2
1(n-3)+ 1 - -11
78
7 + (n - 3) --
=>
7 + (n - 2 - 1)d 11 => n + 1 11
Tn + l 24 7 + (n + 1 - 1)d 24 78
7 + n -- 24
n+ 1
=>
7n + 7 + 78n - 234 11
7n + 7 + 78n - 24
- =>
85n - 227 11 => 2040n 5448 = 935n + 77
85n + 7 24 -
=> l 105n = 5525 => n = 5.
670 DISCRETE STRUCTURES
Example 6. If the A.M between pth and qth terms of an A.P. be equal to the A.M
between rth and sth terms of the A.P., show that p + q = r + s.
Sol. Let the AP. be a, a + d, a + 2d, .
Tp = a + (p - lXl, Tq = a + (q - lXl, T, = a + Cr - lXl, T, = a + (s - lXl.
We are given that :
AM. between Tp and Tq = AM. between T, and T,
1. Findthe A,M. between 5 and 9. 2. Findthe AM. between (x y)2 and (x + y)2 .
_
Tm + l
-- =
r ::::::} Tm+1 =
r Tm r' arm-1 arm arm + 1 - 1
= = =
I By definition
Tm
i.e., the result holds for nm + 1. It completes the induction. Therefore by the principle of
=
1 5. 1 0. I M PORTANT OBSERVATIONS
a
(,) If product of three numbers in a G.P. is given, then the numbers are - , a, ar.
r
(i,) If product offour numbers in a G.P. is given, the numbers are '!!:'" !!:., ar, ar3 .
r3 ' r
(ii,) If product offive numbers in a G.P. is given, the numbers are '!!:'" !!:. , a, ar, ar'.
r2 ' r
Remark. Ifproduct of numbers in G,P, is not given, the numbers to be taken as a, ar, ar2, '
671
672 DISCRETE STRUCTURES
ILLUSTRATIVE EXAM P L ES
Example 1. Find the 12th term and general term of the sequence 3, 6, 12, 24,...
Sol. Given sequence 3 , 6, 12, 24, ... is a G.P. with a = 3, r = 2
Using Tn = arn - 1 , we have
T 2 = ar " = 3 x 2 " = 6144
'
Also Tn = arn-1 = 3 x 2 n -1 .
1 1
Sol. Given series is 4 '2 + 1 +..
-
= -112 = _ 2, 3 = 1_ = _ 2 and so on
T2 T
Here _
T, 114 T2 112 -
1
.. Given series is a G.P. with a = 4 ' r = 2. -
3.
n - 1 = 10 => n = 11 i.e., Tll = 256.
Example For what value ofn, the nth term of the series 5 + 10 + 20 + ... and 1280
+ 640 + 320 + ... are equal ?
Sol. In first series, a = 5, r = 2 . . Tn = arn -1 = 5 x 2n- 1
1 1
In second series, a = 1280, r = .. Tn = arn-1 = 1280 x --
2 n- 1
-
2
If nth term offirst series and second series are equal, then we must have
Example 5. The first term ofa G.P. is 1. The sum ofthird and fifth terms is 90. Find the
common ratio of the G.P.
Sol. Let r be the common ratio of the G.P. Here a = 1. We are given T3 + T5 = 90.
=> ar' + ar' = 90 => r' + r' = 90 (.; a = 1)
Example 7. If the 5th term of a G.P. is 16 and the 10th term is i, find the G.P. Also
find its 15th term.
Sol. Let a be the first term and r, the common ratio of the G.P.
Tn = arn-1 ) n E N.
1
We have T5 = 16 and Tl O = '2
1 1
ar 9
__
ar' = 16 and ar9 = - = __
2
2 ar ' 16
1
r=-
2
a + (n -":-:-:-
a-'-
---" + nd a + (n + l)d
IX/ = a + nd => (a + nd)' = [(a + nd) + d] [(a + nd) - d]
(a + nd)' = (a + nd)' - d' => d' = 0 i.e., d = 0
.. The sequence is a, a + 0, a + 2 (0) , ...... Le., a, a, a, .
. . Only a constant sequence can be both A.P. and G.P.
Example 10. If a, b, c, d in G.P', show that the following are also in G.P.
(i,) a2 + b 2 + c 2, ab + be + cd, b2 + c 2 + d2.
Sol. a, b, c, d are in G.P.
Let r be the common ratio of this G.P. b = ar, c = ar2 , d = ar3 ,
(,) a' - b', b' - c', e' - d' are in G.P.
(ar)2 _ (ar 2 )2 (ar2 )2 _ (ar ' )2
if if
a 2 _ (ar)2 = (ar)2 _ (ar2 )2
a 2r 2 ( 1 - r 2 ) a 2r 4 ( 1 - r2 )
if = 2 2 if r2 = r 2 , which is true.
a 2 (l _ r 2 ) a r (l _ r 2 )
(Since a, b, c, d are in G.P. therefore, a ", O. We also assume that r '" 1.)
.. a2 - b2 , b2 - c2 , c2 - d2 are in G,P.
(i,) a' + b' + c' , ab + bc + cd, b' + e' + cf2 are in G.P.
ab + bc + cd b2 + c2 + d2
a 2 + b 2 + c2 - ab + bc + cd
if
GEOMETRIC PROGRESSION 675
a 2 + (ar 2 ) + (ar2 )2
if
a 2r (l + r 2 + r4 ) a 2r 2 ( I + r 2 + r 4 )
= 2 if r = which is true.
T,
a2 ( 1 + r2 + r4 ) a (1 + r2 + r 4 )
if
Example 13. The product of three numbers in G.P. is 1000. If we add 6 to its second
number and 7 to its third number, the resulting three numbers form an A.P. Find the numbers
in G.P. (P.T.U., M.B.A March 1999)
a
Sol. Let the numbers in G.P. be -
r , a and ar.
a
Praduct = - . a . ar = 1000 (Given)
r
if = 1000 "e., a3 = (10)3 ar a = 10
676 DISCRETE STRUCTURES
10
The numbers are - , 10 and lOr.
r
10
New numbers are - , 10 + 6, lOr + 7. These are in A.P.
r
10 10
16 - - = (lOr + 7) - 16 => 16 - -r = lOr - 9
r
16r- 1O = lOr' - 9r => 2r' - 5r + 2 = 0 => r = 112, 2.
1 10
Case I. r = -
2 ' The numbers in G.P. are - , 10, 10 (112) Le., 20, 10, 5 .
112
Case II. r = 2. The numbers in G.P. are � , 10, 10(2) Le., 5, 10, 20.
2
Example 14. The sum of the first three terms of a G.P. is 7 and sum of their squares is
21. Determinate first five terms of the G.P.
Sol. Let the G.P. be a, ar, ar' , .
By the given conditions, a + ar + ar' = 7
(4)
(1) and (a)' + (ar)' + (ar')' = 21 ... (2)
(1) => a(1 + r + r') = 7 (3) (2) => a' (1 + r' + r') = 21 ...
4
Case I. r = 2. In this case, (3) => a(1 + 2 +
. 4) =7 => a=1
4
. . The G.P. is 1, 1(2), 1(2)2, ...... i.e., 1, 2,
The first five terms are 1, 2, , 8, 16.
. .
The fIrst fIve terms are 4, 2, 1 1
1, 2' 4'
Example 15. The sum of three numbers in G.P. is 56. If we subtract 1, 7, 21 from these
numbers in this order, we obtain an A.P. Find the numbers.
Sol. Let the numbers in G.P. be a, ar, ar'.
By the given conditions : a + ar + ar' = 56 (1)
and a - I, ar - 7, ar' - 2 1 are in A.P. (2)
(1) => a(l + r + r') = 56 (3)
(2) => (ar - 7) - (a - 1) = (ar' - 21) - (ar - 7)
ar - a - 6 = ar' - ar - 14 = a - 2ar + ar' = 8
GEOMETRIC PROGRESSION 677
1 2-a
=> (2 _ a) ' = 25 => a2 - 4a - 2 1 = 0 => a = - 3, 7
Case I. a = 3. In this case, the numbers are - 3, 1, 2 - (- 3), 25 i.e., - 3, 1, 5, 25.
-
... r;:: ! ! .
'
, ...... am-n , am , am+n ) ,
(w)
6. (0 Find the sequence whose nth term is 3n-1 , What type of sequence is it? What is the 5th term ?
(ii) Find the sequence whose nth term is 3 n - 1. Is it a G,P, ? What is its 6th term ?
7. Determine the number of terms in the sequence 5/2, 5, 10, "" ") 640.
8. (,) Which term of the G.P. 2, 2./2 , 4, ...... is 128?
(ii) Which term of the series 5 + 10 + 20 + " " " is 2560 ?
9. Is 512 a term of the sequence 11256, 1164, 1116, "",, ?
10. (0 The 5th, 8th and 11th terms of a G,P, are q and r respectively. Show that q2 = pr.
Pi
(ii) In any G,P, prove that Tn_r Tn+r = (Tn?'
x
11. (,) The 3rd term of a G.P. is 24 and 6th term is 192. Find the lOth term.
(ii) The 5th term of a G.P. is 16 and lOth term is 1/2. Find the G.P. Also find the 15th term.
12. (0 The fourth term of a G,P, is square of its second term and the first term is -3. Determine the
seventh term of the G ,P,
,p,
(ii) Find the G for which the sum of the first two terms is -4 and the fifth term is 4 times the
third term,
13. Ifa, b, c are in A,P" then show that for any non-zero real number k, the numbers ka, kb, ke are in G,P,
14. If x+y
__
1 � 1 are inA, P " show thatx,y, zare in G, P ,
, ,
__
2y y + z
15. (,) Find the value of x if -217, x, -7/2 are in G.P.
(ii) For what value(s) of k, the numbers 1 + k, � + k,
13 + k are in G,P, ?
6 18
16. If a, b,careinG,P" showthat __1_ , __1_ , __1_ areinA,P ,
loga m 10gb m loge m
If the mth, nth andpth terms of a G,P, are in G,Pb" show that
17.
18. m, n andp are in A,P,
19. If the pth, qth and rth terms of a G,P, are x, y andz respectively, show that :
(,) X'-' y'-P zp-q � 1 (h) (q- r) log x + (r - p) log y + -q) log z � O.
(p
20. ,p,
Find the value of x for which x + 9, x -6 and 4 are the first three terms of a G and calculate the
fourth term of the progression,
21. Ifthe pth, qth, rth and sth terms of an A,P, are in G,P" show that p -q, q-r, r - are also in G,P,
s
22. ,p"
If a, b, c are in G show that :
(,) a2, b2, are in G.P.
c' ( " a1 b1 c1 areln. G ,P ,
H! 2 ' 2 ' 2
25. If the (m +m!n)th term of a G,P, is p and (m - n)th term is q, show that mth and nth terms are ,J"Pq
andp(q/p) 2n respectively,
26. The
e be-<Jpth, qth and rth terms of anA,P , aswell asofa G,P, are a, b, crespectively, Provethatab-
=
ca-b 1 ,
GEOMETRIC PROGRESSION 679
27. p, q, r are in G and the equations px2 + 2qx + r 0 and d::xf! + 2ex + f 0 have a common root, then
Ifshow that ,p, = =
d e f
-,-,-
p q r are inA,P,
28. If a, b, c are in A,P.) b, c, d are in G,P, and .c! , J:.d. , .e! are in A,P, ; prove that a, c, e are in G,P,
29.
39
(0 The sum of first three terms of a G,P, is 10 and their product is 1, Find the three terms.
(ii) Obtain three consecutive terms a, b, c of a G,P, if a + b + 93 and abc 3375.
C= =
30. (0 The lengths of the sides of a triangle form a G. 8 , If the perimeter of the triangle is 37 eill ,and
the shortest side is of length 9 m ; find the lengths of the other two sides.
e
(ii) Find three numbers in G,P.) whose sum is 19 and the sum of their squares is 133.
31. (0 The sum of three numbers in G, P , is 56. Ifwe subtract 7, 21 from these numbers in this order,
I,
we obtain an A,P, Find these numbers,
(ii) The sumbyof 1three
reduced whilenumbers
the which
third is are consecutive
increased by 1, termsconsecutive
three of an A,P,terms
is 21. ofIf atheG second
,p, are term is
formed,
Find these numbers,
(iii) The sum of three numbers inA,P, is 15, If 1, 4 and 19 are added to these numbers respectively,
the resulting numbers are in G,P, Find the numbers,
32. (0 In a set of four numbers, the first three are in G,P, and the last three are in A, P , with common
difference 6, If the first number is the same as the fourth, find the four numbers,
(P. T. u., M.B.A. Dec.2000)
(ii) The sum offour numbers in G,P, is 60 and the AM, between the first and the last is 18, Find the
numbers,
Answers
L (,) 0.01 (ii) -an (iii) 1/2nf2 (iv) an n
2. (,) 28� (ii) 5/2 (iii) 3 (iv) ak2 -1
3. yes 6. (i)l, 3, 9, 27, """ ; G, P , ; 81
(ii) 2, 8, 26, 80, ...... ; This is not a G.P. ; 728 7. 9. 8. (,) 13th
(ii) lOth 9. No
16. ___ . _
1
__ . __
1 1_ are in A,P, iflogm a, logm b, logm are in A,P, iflogm !:... = logm
c .£ .
loga m 10gb m loge m a b
' logk b
lagk C
We have b= - 1 1 (1 1)
2- =bd, d = 2 :;- + ; or d� .
28.
a+c ' c
2 2 ce
--
c+e
32. (ii) Take numbers as a, ar, ar2, ar3 and use 1 + r + r2 + r3 = (1 + r)(1 + rZ).
GEOMETRIC PROGRESSION 681
Proof. Case I. r ic 1:
Let Tn = nth term of the given G.P. = arn-1 , n E N
.. S n = T, + T 2 + T3 + ··· + Tn_, + Tn
= a + ar + ar2 + ... + arn-2 + arn - 1 (1)
::::::} r S n = ar + ar2 + ar + ... + arn -1 + arn (2)
Subtracting (1) and (2), we get
(1 - r) Sn = a + 0 + 0 + ... + 0 - arn = a(l - rn)
a (1 - rn)
Sn= .
1-r
Case II. When r = 1, then from (1)
S n = a + a + a + .. + a(n times) = na
1 5. 1 2. PARTICULAR CASES
a (l - r n )
(a) We have Sn = , r < l.
l-r
Sn = _
a (rn - 1) a (rn - 1)
If r > l, then =
- (r - 1) r-1
(b) Using l = Tn = arn-1 , we have
l a (l - rn )
,r<l
1-r
Sn =
a (rn
- '--- - 1)
- -'- , r > 1
r-1
l a - arn _I r
,r<1
_ 1-r
-
a_
_ n-l__
r_ -1
. r__ ,r > 1
r-1
l a - Ir
-- r < 1
l -r '
= Ir - 1
-- , r > l
r -1
682 DISCRETE STRUCTURES
ILLUSTRATIVE EXAM P L ES
1+ 4 4 350
3 3
2 2 2
Example 2. Evaluate + + + 50
625 125 25 . . . .
2
. a= 2 125 = 5, 1 = 50.
Sol. Given series is a G.P. wIth 625 ' r = - 2-
625
2
50 x 5 - 625 156248 39062
Required sum = -- ' r > 1 =
Ir - a
=
3.
r- 1 5-1 625 x 4 625
Example Determine the number of terms in the G.P. (Tj if T1 = 3, Tn = 96 and
Sn = 189.
Sol. Let the G.P. be a, ar, ar' , . ..... We are given : Tl = 3, Tn = 96, Sn = 189.
a(l - rn) = 189
a = 3, arn-1 = 96,
1-r
189 = a -arn . r = __
1-r
-l 3 - 96r
1-r
_
Crass·multiplying, we get 189 - 189r = 3 - 96r. Solving, we get r = 2 .
.. arn-1 = 96 implies 3(2) n-l = 96 or 2 n-1 = 32 = 2 5 => n - 1 = 5 "e., n = 6.
./3
Example 4. How many terms of the G.P. ../3, 3, 3. , . . . . . . sum up to 39 + 13../3 ?
Sol. The given G.P. is ../3, 3, 3../3, . . . . . .
.,/3 (1- (.,/3)n ) = 39 - 39.,/3 + 13.,/3 - 39 => .,/3 (1- (.,/3 )n) = - 26.,/3
_
2 16
ar 4 1/16 1 1
Dividing (2) by (1), we get . r
--;;;: - - 1/2 Le., = - '8 or r = - -,
2
putting r = - � in (I) We get a -
'
( �) �=- Le., a = 1.
1--
1
256 = 255 X _
3
85
2 =-__
.
[8n =
a( l - r n ) r
1-r
lor r < 1
)
256 3 128
2
Example 6. Find the sum of 50 terms of the sequence 7, 7. 7, 7. 77, 7. 777, .
Sol. The given sequence is 7, 7.7, 7.77, 7.777, .
Required sum = 550
= 7 + 7. 7 + 7.77 + ...... 50 terms = 7 (1 + 1. 1 + 1 . 11 + ...... 50 terms)
7 7
= \) (9 + 9.9 + 9.99 + . . . . . . 50 terms) = \) [(10 - 1) + ( 10 - 0. 1) + ( 10 - 0.01)
+ ...... 50 terms]
7
= \) [(10 + 10 + 10 + ...... 50 terms) - (1 + 0. 1 + 0.01 + ...... 50 terms)]
7
= \) [500 - (Sum of G.P. of 50 terms with a = 1, r = 0. 1)]
9
[
= � 5 00 _
1 - 0.1
=
9
]
1 ( 1 - (0.1)50 ) � 500 � 1
9
1_
10 50
[ _ ( _ _
)]
= � (4500 - 10 + 10-4 9) = � (4490 + 10-4 9) .
81 81
Example 7. Find the sum of n terms of the sequence x + y, x2 + xy + y2, :x;3 + x2y + xy2
+ y3, ......
Sol. The given sequence is x + y, x2 + xy + y2 ) ;i3 + x2y + xy2 + y3 ) .
Required sum = (x + y) + (x2 + xy + y2) + (x3 + x2y + xy2 + y3) + ...... n terms
2 2 3 3 4 4
x y x y X y
-
_ _ _
= --
1
x-y
[(x' - y') + (x" - y3) + (X4 - y4) ...... n terms]
[ )] .
x-y
- (Sum of G.P. of n terms with a = y', r = y)]
1 X 2 ( l - xn ) y 2 (1 - y n
= __ _
X -y I -x l -y
Example 8. If S be the sum, P be the product, and R be the sum of reciprocals ofn terms
= an . r 2 .. (2)
1 1 1
R = - + - + -- + .. n terms
a ar ar 2
[ 1
1--
�
1 n r rn - 1
= -;;- = (3)
1- a (r -1) rn 1
(n
l '
I) =
(n- l)n
From (2), p2 = a .r 2 a2n r(n-lj n (4)
()
S
R
n
= a2n rn-1)n (5)
.
7. If a + b + """ + l IS. a geometrIc. serles,
. show that Its sum IS. Nb -- �a .
---
8. (0 The fourth and seventh terms of a G,P, are 1127 and 11729 respectively. Find the sum of n
terms of the G ,P,
(ii) The first term of a G, P , is 27 and its 8th term is 1181, Find the sum of its 10 terms,
n
US + """ + un = 1 - u .
1
9. Ifu= -- 1+ "
-
, , show that u+ u2 + --
A
10. The sum
common ratio of first
of thethree
,p,G terms of a G,P, to the sum of first six terms is as 125 : 152, Find the
Determine ,p,
11.
2186. the third term of a G whose common ratio is 3 and the sum to first seven terms is
12. Find the following sums :
(,) 9 + 99 + 999 + ...... terms
n (i,) 5 + 55 + 555 + ...... terms.
n
(iii) 0.6 + 0.66 + 0.666 + ...... terms
n (iv) 4 + 0. 4 + 0. 4 4 + 0.444 + ...... terms.
n
13. (0 Find the sum of the first terms of the sequence 7, 77, 777, 7777, '
n
(ii) Find the sum of the first 50 terms of the sequence 7, 7, 7 , 7, 7 7, 7, 7 77, '
686 DISCRETE STRUCTURES
16. If S" S2' S3 be the sums of n, 2n, 3n terms of a G.P., show that S, (S3 -S2) (S2 -S,)2 �
Answers
L 63(../2+ 2) 2.
2n--
-1
3. (i) 364 (3 + ./3) n
463
11 -- .
4 288
4. 463, 2059 ()
6. I 4 (il) 10
6. ()
I 265741 (ii) 3790 8. (i) % ( 3�J
l-
81
(ii) 2'" ( J
1 - 3'"
1
10.
3 1 L 18
5
( ) - ( 10n +1 (il) �81 ... 272 (9
(m) -
9 - - IOn J
1
12. I 9n - 10) (10n +1 9n - 10) n- 1 +-- 1
� [ � (IOn J
'
1
(iv) 4 + -.!. (9 +�
81 n - 10
lOn-, J 13. (i) - 1) - n
14. (
, a -an) + .:.b
II
(1 n (n
c.:...
=:- + l)
.c, =:-", (11)
· (a + br) 2
2
(1 - r n )
I-a 2 l-r
16. (11)
·
--
1
I-x
[ n
X (I_Xn) ]
I-x
(iii) _
[ _ X_n _ .a::,(-,l= -,=an--=-x,-n'-).]
1_ l_
__
I-a I-x I-ax _
_
Hints
3. (i) Use sum = Ir -a -
r-1
(h) Use sum = a - r -
-
1
- Ir
8
6. (ii) L (2i + 3i (2' + 2 2 + ...... + 28) + (1 + 3 + ...... + 37)
- 1) �
j= 1
7. Sum = a r a (b(bla)la)
- Ir
1- 1-
-I
27
729 Le., r=-3 i.e., a= 1.
1
GEOMETRIC PROGRESSION 687
a(l - r3 )
10.
1-r 125 =:::}
1
= 125
� r3 �
152
_1
a(l - r6) 152 1 + r3 152 125
1-r
(iv) 4 + 0. 4 + 0. 4 4 + 0.444 + ...... n terms
1 ) . . . . . . (n - 1) terms ]
4+ i[(l-�) + ( 1 1001 ) + ( 1 1000
12.
9 10
__ __
+
4 + i [e n - 1) -(� + __ + __ + . . . . . . (n - 1) terms) ]
�
1 1
9 10 100 1000
(�) Reqd. sum = 7 + 77 + 777 + " " " nterms
-97 [(10 - 1) + (100 - 1) + (1000 - 1) + . . . . . . n terms]
13.
(iii) Reqd. sum -- [(1 -a) + (x -a2x) + (x2 -a3x2) + ...... n terms1
1
�
I-a
� -- 1
I-a [(1 + x+x2 + """ nterms)-a(l + ax+ a2x2 + """ nterms)]
1 5. 1 3. SUM TO INFINITY OF A G.P.
=n fa (l-r n ) '
We know that for the G.P. a, ar, ar', ...... , the sum offirst n terms is given by
2n - 1
5 _
. Sn
As n increases, increases very rapidly.
keep on increasing as n increases. In this case, we do not expect to have a number
which may be equal to the sum to infinity of the G.P.
In the next theorem, we shall derive a formula to find the sum to infinity of a G.P.,
provided the common ratio of the G.P. is within certain limits.
Theorem VII. If a and r be respectively the first term and common ratio ofa G.P. such
S = _1 a-_r . 2000)
that I r I < 1, then prove that the sum to infinity (5) of this G.P. is given by
Proof. Let Sn denotes the sum of the first n terms of the given G.P.
a CI - rn )
Sn = ( -: r I < 1 implies r # 1)
l-r
n
lim a -a r
I ILLUSTRATIVE EXAM P L ES I
Example 1. Find the sum of the infinite series, 1 + 2 + 2
4
+2
8
+ ...
2
CP.T.V., M.B.A May 2000)
. a 1
Sol. Given series is an infinite G.P. with a = 1, r = ' Usmg S� = - ' we have
2 1 r
Sum of the given series = �
--
= 2.
1
2
Example 2. Prove that 91/3 . 91/9 . 91127 • ...... to = = 3.
Sol. 9'/3 . 9'/9 . 9'/27 ...... to =
1 1 1
-+-+-+ 00 1 1 1
= 9 3 9 27 .....
= 9 s where S is - + - + - + ..... to =.
3 9 27
We have 1 1 1
S = - + - + - + ...... to =
3 9 27
S=� =
1 - .!
1/3 -.!
2/3
=
2
(s
l
__
a
l-r
)
3
.. Required product = 9'" = 9 '/2 = 3.
Example 3. Find S� of the G.P. whose first term is 28 and the fourth term is �
4 '
Sol. Let a and r be respectively the first term and common ratio of the G.P.
By the given conditions
4
T, = a = 28 and T4 = ar = - .
49
4 I 1
28r = - => r = __ ::::::} r = - '
4 9 343 7
GEOMETRIC PROGRESSION 689
I r l = I�I � = <l
_ _
Putting the value of a in (3), we get [50 (1 - r)] (1 - r) = 2
, 2 1 1
(1 - r) - - - - 1 -r=±-
50 25 5
1 1 4
Case I. 1 - r = '5 ' In this case, r = 1 - '5 = '5 and I r l = I�I = �<l 4.
. . r = - ls vaI'd
5
1 .
(4) => ( �)
a = 50 1 - = 10
The G.P. is 10, 1 0 (415), 10(415) 2 , . "e., 10, 8, 32/5, .
a
__ = 23 (1)
1-r
Also a' + (ar)' + (ar2)' + ...... = 69 =
1
a"
1 - r2
= 69
529 ( 1 - r) 2
69
(l - r) ( l + r)
1-r 69 3
1+ r 529 23
690 DISCRETE STRUCTURES
23( 1 - r) = 3 + 3r
23 - 3 = 26r
26r = 20
20 10
r=- - =
From
10 ( )
3 69
(1), = 23(1 - r) = 23 1 - ]"3 = 23 x ]"3 = ]"3
26 13
. . 69 69 10 69 10
2
. . The requrred G.P. lS -, - X - , - X - , ..
13 13 13 13
( )13
Example 6. Find the sum the following infinite series O. 7 + 0.07 + 0.007 + . . .
(P.T.V., M.B.A. Dec. 2005)
Sol. Given series is
0.7 + 0.07 + 0.007 + . . . = = 7(0. 1 + 0.01 + 0.001 + ... =)
4. Show that :
(0 xl!S =x
Xl/2 , Xl/4 . "
""
00
(h) =
31/2 , 3 1/4 , 31/8 , " " ,,
00
3
y-l
5. If I x 1 < 1 andy= 1 + x + x' + ...... =. showthat x= y . --
1 + + + = x --"
ab a2 b2 """
00
xy
.,.
+y-l '
- -
7. ( 0 The sum of an infinite G,P, is 6 and its first term is 2, Find the series.
(ii) The common ratio of a G,P, is - 4/5 and the sum to infinity is 80/9, Find the first term,
8. If the first term of a G,P, is 729 and the seventh term is 64, find S"",.
9. Find the value(s) of p if S� forthe G.P. p. 1. lip is 25/4. • . . . . . .
10. The
commonsum ratio.
of an infinite G,P, is 6 and the sum ofits first two terms is 9/2. Find the first term and the
11. The
series.sum of infinite number of terms in G.P. is 15 and the sum of their squares is 45. Find the
GEOMETRIC PROGRESSION 691
12. The sum of an infinite is 57 and the sum of their cubes is 9747, find the
G,P, G,P,
(0 The first term of an infinite
13.
follow it, Find the series. is unity and any term is equal to the sum of all the terms that
G ,p,
(ii) If each term of an infinity is twice the sum ofthe terms following it, then findthe common
G,P,
ratio of the G ,P,
Answers
L
3
C') -
3
C"n) - 2. Ci)
4
3" Cii)
4 + 3 .J2
4 4 2
a + br2
5
C"n) -
, 4 8
C') 2 + - + - + . Cii) 16
3. C')
1- --
r 2 7.
3 9
8. 2187 or 2187 5-- 9. 5, '45 10 . a=3) r = -21 )" a=9) r=- -21
5+- 10 + - 20 12. 19, 383 76
1L
3 +. 9
•
Hints
3. (0 a+ br + ar2 + br3 + ar + br + """ = (a +ar2 + ar4 + "" ..) + (br + br3 + br5 + "" ..)
4 5
� a + br --2
l_r
--2 '
l_r
9. Use _ p_ � 25
I-lip 4
10. Eliminate a from _a_ �6 a +ar = -2 ,
l-r
'
9
=:::}
2a .
ar -1 =2arn [1 +r+ .. " ..] = -- rn
l-r
1 5. 1 4. GEOMETRIC MEAN
lfthree or more than three numbers are in G.P., then all the numbers lying between the
first and the last numbers are called geometric means between them. i,e,
lf a, G" G2 , ... Gn , b, be a G.P., then, G" G2 , ... G n are called geometric means CG.P.s)
between a and b.
Theorem VIII. To find single G,M between two givenpositive numbers,
Proof. Let a and b be two positive numbers and G be the single G.M. between them. Then,
by definition, a, G, b are in G.P.
G b
=> G2 = ab => G = .J;J;
a G
692
n
DISCRETE STRUCTURES
nn+' 1
Theorem IX. To find n G.M.s between two given positive numbers.
Proof. Let a and b be any two positive numbers and G" G2 , ... G , be n G.M.s between
rn +1 ab (b)n+a 1 1
them. Then, by definition, a, G" G" ... G , b are in G.P.
Now b =T = arn+1
(b)n+1
- -
= ::::::} r =
(b)n+a 21
G, = T, = ar = a -;;
n
G2 = T3 = ar2 = a -
n n+l a 1
G =T n (b)n+
= ar = a - .
Theorem X. The product of n G.Ms between any two positive numbers is equal to the
nth power of the G.M. between them.
2 + 3 + +n
=
=
)n
an [(� �l f
[[:j':']"" ", 4[:l% "'
i ,,% 0 .% ,,%
b)n.
o .
0 ."
I ILLUSTRATIVE EXAM P L ES I
Example 1. Insert 5 Geometric means between 320 and 5. (P .T.V., M.B.A. May
2(03)
Sol. Let G" G" G3, G4 , G5 be the required 6 G.M.s between 320 and 6. Then, by definition,
320, G" G" G3 , G 4 , G 5 , 6 are in G.P.
Now 6 = T7 = ar6 = 320 r6
r6 =
3:0 � 6� � (H � r= �
GEOMETRIC PROGRESSION 693
1
G " = T = ar = 320 x -=160
2
1
G = T3 = ar' = 320 x = 80-
' 4
1
G3 = T, = ail = 320 x = 40
-
8
1
G = T5 = ar' =320 x = 20
-
' 16
1
G5 = T6 = ar5 = 320 x
= 10' -
32
Example 2. The A.M. between two positive numbers is 34 and their G.Ms is 16. Find the
numbers.
Sol. Let the positive numbers be a and b.
a+b
.. A.M. = 34 => -- = 34 => a + b = 68 (1)
2
and G.M. = 16 => .,Jab = 16 => ab = 256 (2)
Now (a + b)' - (a - b)' = 4ab => (68)' - (a - b)' = 4(256)
=> (a- b)' = 3600 => a - b = 60 (3)
(We assume a > b)
(1) + (3) => 2a = 68 + 60 => a = 64
. . (1) => 64 + b = 68 => b=4
:. The numbers are 64, 4.
Example 3. Insert 5 G.M.s between 1/3 and 9 and verify that their product is the 5th
power of the G.M. between 1/3 and 9.
Sol. Let G" G" G3 , G" G5, be the 5 G.M.s between 113 and 9.
:. i , G " G" G3 , G" G5 , 9 are in G.P.
Let r be the common ratio of this G.P.
1
9 = T7 = - ,-6
3
G, = i �
r= = .]a, G, = G,r = ]a ../3 = 1, G3 = G,r = 1 ../3 = ../3 ,
Also, 5th power of the G.M. between i and 9 = [�i · 9 r = (../3) 5 = (../3) 4 ../3 = 9./3 .
Hence the result holds.
694 DISCRETE STRUCTURES
Example 4. If two G.M s gl and g and one A.M A be inserted between two numbers, then
2
2 2
show that 2A = '& + .& .
g2 gl
an + b n
Example 6. Find n such that n 1 1 may be the G.M. between distinct positive
a + bn
numbers a and b.
Sol. The G.M. between a and b is J;J; .
Let
GEOMETRIC PROGRESSION 695
n - -1 1 -1 n - -1
n n
a +b = a 2 b + 2 b 2
2 a
2 b2 = a ..!.2 bn - "!'2
n - "!' 1
::::::} an _
a _
bn
n - -I n - -I
=> a 2 (all2 _
b'/2 ) = b 2 (all2 _
b '/2 )
n - -I n - -I
a 2 =b 2 (: -
(ir� (:r
I
a:��
1
= 1 => = ::::::} n - - = 0 Le.,
2
b 2
Example 7. Ifthe A.M. between positive numbers a and b be equal to n times their G.M,
find the ratio of a to b.
a+b
Sol. We have A.M. = and G.M. = .,Jab .
2
By the given canditian, A.M. = n (G.M.)
a+b
= n .,Jab ar (Note this step)
2
a + b + 2.,Jab n + l
ar = I Companenda and dividenda
a + b - 2.,Jab n - l
e../a + $)2 n+l
(Assuming a > b)
e../a - $)2
ar ar
n-l
e../a + $) + e../a - $) .In+i + �
e../a + $) - e../a - $) .In+i - .In - 1
ar = I Companenda and dividenda
ar
2../a
=
.In+i + �
2$ .In+i - .In - 1
ar
a - en + 1) + en - 1) + 2.Jen + 1) en - 1)
-
(On squaring)
b en + 1) + en - 1) - 2.Jen + 1) en - 1)
2n + 2� n + �
=
�
2n - 2Vn-
=
�
- 1 n - Vn- -l
.
a : b = n + ·� : n - � .
696 DISCRETE STRUCTURES
14. If ana+1n bbnn+1 is the G,M, between positive numbers a and b, then find the value of
+
+
n,
15. If the AM, between positive numbers a and b is twice their G,M" then show that
16. If a, b, be in G,P, and x, y be the A,M, between a, b and b, respectively, show that :
c c
( ) 1 y1 b2
, -+- �-
x
(,,! - + - �
., a
xY 2.
c
Answers
L (,) .!:! (ii) 0. 0 4 2. 8 3. 3
15
1 9 4. 16 9. 20, 80 2, 8, 32, 128
4'4
7. 8. 10.
6. We have --b=
a+e
2
, x = -.Jab he ,
= , y = ..;be ab + be b(a + e) � b2
2
�
2
�a (100 - a) 4
9. If the numbers are a, 100 - a, then 2 5
16.
18. Let be of
r c.r. b, G 1, °2 ) C
.. G l � br. G2 � br2. c � brS .
.. G 13 + G23 � b3rS + b3r" � b3rS (1 + r3)
and b+e
( )
2abc � 2 -- be � (b + br3)b . br3 � bSrS (l + r3).
2
16 SEQUENCES
k=l
The sum of first n terms of the sequence 1', 2', 3' , ...... is denoted by Ln'.
.. Ln' = I' + 2' + 3' + ...... + n'.
In the next theorem, we establish a formula to find the value of Ln'.
2
-
2 2 2
+ 2 + 3 + ...... + II -
2 _ . n(n + lX2n + 1)
Theorem. P rove that Lll - 1 , II E N •
(n + 1) 3 - n3 = 3.n' + 3.n + 1
698
SEQUENCES 699
Adding these vertically, we get
(n + 1)3 - 13 = 3(1' + 2' + 3 ' + ...... + n') + 3(1 + 2 + 3 + ...... + n) + n
(n + 1) 3 - 1 = 3Ln' + 3Ln + n
3Ln' = (n + 1) 3 - 3Ln - n - 1 = (n + 1) 3 3 n
(n + 1) - (n + 1)
_
2
(n + 1) [2(n + I)' 3n 2] = n + 1 [2n' + n] = (n + 1) n (2n + 1) .
= _ _
�
Ln -
2
2
_
n(n + 1) (2n + 1)
, ll E N.
6
2 2
n
Remark. Ln2 Le., 1 2 + 22 + 32 + """ + n2 can also be written as Lk2 . k=l
10
Illustration. L k2 = I' + 2' + 3' + ...... + 10' = 10 (10 + 1) (20 + 1)
6
= 385.
k=1
10
Under the notation Ln' , we write Lk2 as (Ln') n = 10'
k=l
6 2
= (n + 1) [(n + 1) 3 - n(2n + 1) - 2n - 1]
700 DISCRETE STRUCTURES
[n(n2+ l)r
Ln3 =
k=l
k3 .
Illustration.
k=l
[7(72+ ]
± k3 = 13 + 23 + 33 + ...... + 73 = 1) 2
= 784.
7
Under the notation Ln3 , we write L k 3 as (Ln3) n = T
k=l
Tn = an3 + bn2 + cn + d.
Adding vertically, we get Sn = T, + T, + T3 + ...... + Tn
= a(1 3 + 23 + 33 + ...... + n3 ) + b(l' + 2' + 32 + ...... + n2) + c (1 + 2 + 3 + . . . . . . + n) + nd
Sn = aLn3 + bLn2 + cLn + nd.
The result holds.
I I L L U STRATIVE EXAMPLES I
Example 1. Find the following sums :
(i) 12 + 13 + 14 + ...... + 37 (ii) 12 + 22 + 32 + ...... + 202
(iii) 182 +192 + 202 + ...... + 472 (iv) 11 3 + 12" + 13" + ...... + 253
(v) 2" + 43 + 63 + ...... + 18".
SEQUENCES 701
Sol. (i) 12 + 13 + 14 + ....... + 37 = (1 + 2 + . . . . . . + 11 + 12 + 13 + 14 + ...... + 37)
- (1 + 2 + ...... + 11)
37(37 + 1) 11(11 + 1)
= (Ln) n=37 - (Ln) n=l1 = - = 703 - 66 = 637.
2 2
(ii) I' + 2' + 3' + ...... + 20' = (Ln') n=' O
20(20 + 1)(2(20) + 1) 20(21X41)
= =
6
= 2870.
6
(iii) 18' + 19' + 20' + ..... + 47' = (I' + 2' + 3' + ...... + 47') - (1' + 2' + 3' + ...... + 17')
= (Ln')n=47 - (Ln') n=17
47(47 + 1)(2(47) + 1) 17(17 + 1X2(17) + 1)
= 6 6
= 47(48) (95) _ 17(18) (35) = 35720 _ 1785 = 33935.
6 6
(iv) 11 + 12 + 13 + ..... + 25 = (1 + 23 + 3 3 + ...... + 25 3) - (1 3 + 2 3 + 33 + ...... + 103)
3 3 3 3 3
= (Ln3)n='5 - (Ln3) n=1O
Example 3. Find the sum of the series ,' 1.2.3 + 2. 3.4 + 3. 4. 5 + ...... to n terms.
1 4 4
Sol. The given series is . 2. 3 + 2. 3 . + 3. . 5 + ...... Let Tn be the nth term.
• •
nth term of nth term of nth term of
Tn = ( 1, 2, 3, ...... ) ( 2, 3, 4, ...... ) ( 3, 4, 5, ..... . )
= n(n + l)(n + 2) = n3 + 3n' + 2n.
Sum of n terms = 5n = 'ETn = 'En3 + 3'En' + 2'En
= [ n (n2+ 1)f + 3 n (n + 1�(2n + 1) + 2 n (n2+ 1)
lXn2 6) .
= n (n4+ 1) [n(n + 1) + 2(2n + 1) + 4] = + + +n(n
4
5n
53(1 + 85,) = [ n(n2+ 1)f [ 1+ 8. n(n2+ 1)] = n2 (n4+ 1)2 [1 + 4n' + 4n]
_ n2 (n + 1)2 (2n + 1)2
4
and
952' = 9 [ n(n + 1)(2n + 1)]2 = n2 (n+ 1)2 (2n + 1)2
2
6 4
.. S3 (l + 8S,) 9S2 • =
Example 6. Find the sum of all possible products of the first n natural numbers taken
two at a time.
time.
5 = Sum of all possible products of the first n natural numbers taken two at a
Sol. Let
'
We have (1 + 2 + 3 + . . . . . . + n)' = (1 + 2 2 + 3' + ...... + n') + 2 5 (Note this step)
=>
� �[(
(Ln)' = 'En' + 2 5 => 25 = ('En)' - 'En'
[
n (n + 1) n (n + 1) 2n + 1
3
]
_
4 2
n (n + 1) [3 ' 3 n(n + 1)(3n 2 - n - 2)
n + n - 4n - 2] - .
24 24
. 1 3 13 23 13 + 23 + 33
Example 7. Sum of the senes " - + + + + ...... to n terms.
1 1+3 1+3+5
Sol. Let Tn be the nth term of the given series.
3 3 3
1 + 2 + 3 + . . . . . . n terms (n + 1)2
Tn = ----
1 + 3 + 5 + . . . . . . n terms --- n
2 [2 (1) + (n - 1)2] 4
1
= - (n' + 2n + 1).
4
1
Sum of n terms = Sn = "LTn = - "L(n' + 2n + 1)
1
4
= -("Ln' + 2"Ln + n] = -
'[
1 n (n + 1) (2n + 1) + 2 n (n + 1) + n
6 2
( ) ]
4 4
n(2n 2
= !':...- [en + 1) (2n + 1) + 6 (n + 1) + 6] = + 9n + 13)
.
24 24
Answers
1. (,) 465 (ii) 31395 (ii,) 64009
2. (,) 5040 (ii) 2840 (ii,) 205200
3. (,) 5265 (ii) 9135 (ii,) 193600
10.
n (6n2 - 3n -1) + 1) (n + 3)
1 1 . 3n (n 12. -'-+--=-
n (n
-'-' (3n2 +=
1) = 5 n + 1)
- --=.
2 6
n (n + 1)2 (n + 2)
13. 8950 14. 15. n2 (2n2 - 1).
12
Hints
2 + 22 + 32 + ...... + n2 n (n + 1) (2n + 1)
14. Tn
� 1 � Ln2 �
L k3 + 2 L k2 + L k
n n n
In3 + 2 I n2 + In
16. L.H.8. k=l k=l k=l k=1
I n3 + I n2
( )
= L m + n - Lm = - '-:---
+ n) + n + 1)-'--- --'--
+ 1) --'-
(m (m m (m
2 2
[ .: x2 y2 (x - y)(x + y)]
_ �
1 7. 1 . INTRODUCTION
We know that the quotient of any two polynomials is called a rational function. In the
present chapter, we shall learn the techniques of resolving a fraction into partial fractions.
This method will help us to integrate any given rational function.
1 7.2. RESOLUTION OF A FRACTION INTO PARTIAL FRACTIONS
We know the method of finding the sum of two or more algebraic fractions by reducing
the denominators of fractions to a common denominator, which is their L. C.M. For example :
2 5 2x + 4 + 5x - 15 7x - l l
+-- = -- =� - --
x -3 x + 2 (x - 3)(x + 2) x2 - x - 6 '
The reverse process of breaking up a single fraction into simpler fractions whose
denominators are the factors of the denominator of the given fraction is called the resolution
of a fraction into its partial fractions.
2x 1 1
For example, = -- + -- .
--
2
x -1 x-1 x+1
1 1
Here __ and __ are the partial fractions of the fraction
x-1 x+1 x -1
+- .
1 7.3. METHOD OF RESOLUTION INTO PARTIAL FRACTIONS
( x)
((X))
If{(x) and g(x) are polynomials, then is a rational function or a rational fraction.
g(x)
If deg. {(x) < deg. {(x), then the rational fraction
( x)
g(x)
is called proper, otherwise
gx
is called
improper.
.
For exampIe, the ratlOnaI fractlOn
'
X
x2 + + 3
---'-'-----'.
- " ,--"
(x + 2)(x 2 + 7)
-
.
IS proper
.
an d th e ratlOnaI fractlOn
'
x3 + x + 9 .
IS �mproper.
x 2 + 5x - 6
( x) .
If is an improper rational fraction, then we can divide {(x) by g(x) so as to write ( x)
g( x ) g(x)
as the sum of a polynomial and a proper rational fraction.
. . Any improper fraction can be expressed as the sum of a polynomial and a
proper fraction.
705
706 DISCRETE STRUCTURES
It can be proved mathematically that any proper fraction may be resolved into partial
fractions and :
(i) if ax + b is any linear non-repeated factor in the denominator, then there corre-
A
sponds a partial fraction of the form __ .
ax + b
(ii) if ax + b is any linear factor repeated r (E N) times in the denominator, then there
A B C
corresponds partial fractions of the form __ , , ...... r terms.
ax + b (ax + b )2 ' (ax + b )3
(iii) if ax' + bx + c is any irreducible quadratic factor in the denominator, then there
Ax + B
ax 2 + bx + c '
corresponds a partial fraction of the form and
A B C D E
the types -- , -- , -- 2 and
x + 1 x - 2 x + 3 ) (x + 3) (x + 3)3
2
(ii) The partialfractions of the proper fraction
x :\ are of the types
(x - 7)(x + 2) (x + 2x + 3)
A B C Dx + E
x - 7 ) x + 2 ) (x + 2)2
-- and 2
X + 2x + 3
x3 + X + 7
(iii) The partial fractions of the proper fraction ----- ,,-- � _,;_ are of the types
-
(x - 1)(x + 2) 2 (X 2 + 5) 2
A B C Dx + E Fx + G
--;;,---- and 2
x - l ' x + 2 ' (x + 2) 2 ' x 2 + 5 (x + 5) 2
I L L U STRATIVE EXAMPLES
3x - 1
Sol. (i) x2 _ 1 is a proper fraction and the denominator has linear non· repeated factors.
Let ---
3x2 -l - 3x - 1
= -- + -- '
A B 3x - 1 A( x + 1) + B(x - 1)
x _1 (x - 1)(x + 1) x - 1 x + 1 (x- 1)(x + 1) (x - 1)(x + 1)
Multiplying by (x - 1)(x + 1), we get, 3x - 1 = A(x + 1) + B(x - 1) (1)
Now we find the values of A and B.
Method I. By comparing the coefficients of like powers ofx.
(1) => 3x - 1 = (A + B)x + (A - B).
A + B = 3 and A - B = - 1. Solving these equations, we get A = 1 and B = 2.
Method II. By giving specific values to x.
Let us put x = 1 and x = 2 in (1).
x = 1 => 3(1) - 1 = A(1 + 1) + B(1 - 1) => 2A = 2 => A = 1
x = 2 => 3(2) - 1 = A(2 + 1) + B(2 - 1) => 3A + B = 5 => B = 5 - 3A = 5 - 3(1) = 2.
. . A = 1 and B = 2.
Method III. In this method, it is always convenient to use those values of x which make
linear factors in the denominator zero.
Here x - 1 = 0 => x = 1 and x + 1 = 0 => x = - 1. We put x = 1 and x = - 1 in (1).
x= 1 => 3(1) - 1 = A(1 + 1) + B(O) => A = 2/2 = 1
-4
x=- 1 => 3(- 1) - 1 = A(O) + B(- 1 - 1) => B = _2 = 2.
A = 1 and B = 2.
3x - 1 1 2
-:-
--:- --
c-;- :-:-
--:
= -- + -- .
(x - 1)(x + 1) x - 1 x + 1
Remark. In the second method, we observe that
3x - l 3x - l
A= Value of � when x = 1 and B = Value of � when x=- l.
The value of A can be found out by putting x = 1 in the given proper fraction, after omitting x
-1 from..the denominator.+Similarly, the value of B can be found out by putting x = - 1 in the given proper
fraction, after omitting x 1 from the denominator.
Thus, when the factors in the denominator are and linear we can decompose the
non-repeated,
given proper fraction into partial fractions as follows :
= __ + = -- + --
(x - 1)(1 + 1) ( "' l C, l )':-
3x - 1 3( - 1) --=1C, 1 2
---,3",(::.:1)_--=1,--- + -::-_""' _""' 2 -4
(x - lXx + 1) l) (x - 1)2 ( - 2Xx + 1) x - l x + l "
(x + :7
This is called the short cut method of finding the values of A, B etc. It is very important to bear
in mind that this short cut method is to be used only when the denominator has only linear and non
repeated factors.
(ii) Given fraction is not a proper fraction. Dividing 6:0 + 5x2 - 7 by 3:0 - 2x - 1, we get
6:0 + 5x2 - 7 = (2x + 3)(3x2 - 2x - 1) + (8x - 4).
(.
6x 3 + 5x 2 - 7 8x - 4
= 2x + 3 + -:---:-=--::-; 3:0 - 2x - 1 = (x - 1)(3x + 1»
3x 2 - 2x - 1 (x - 1)(3x + 1)
[ ]
708 DISCRETE STRUCTURES
2x + 3 + 8(1) - 4 + 8 -�) 4 (
-
(� )
=
(x - 1)( 3(1) + 1) _ _ 1 < 3x + 1)
1_
(Using short-cut method)
4 - 20/3 2x + 3 + _ + 5
( )
= 2x + 3 + (x -I)4 +
4
=
x - I 3x + I
- "3 (3x + 1)
(iii)
2x + 1 is a proper fraction. Let the partial fraction corresponding to the fac-
(x + 2)(x - 3)2
tor x +
x + 2 and the partial fractions, corresponding to the factor (x - 3)' be �
2 be �
x -3
and
C
(x -3)"
.. 2x + l = A + B + -'-:-: C
(x + 2)(x - 3)' -+-
x-2 ---3 -:-(x-_ 3)O,
x-
Multiplying both sides by (x + 2)(x - 3)', we get
2x + 1 = A(x - 3)' + B(x + 2)(x - 3) + C(x + 2) (1)
Now x + 2 = 0 => x = - 2 and x - 3 = 0 => x = 3.
x = - 2 in (1) implies - 3 = A(- 5)' + B(O) + C(O) =>
-3
A=-
25
x = 3 in (1) implies 7 = A(O) + B(O) + C(5) => C = �
Comparing the coefficients of x' in (1), we get 0 = A + B.
B = -A=- (;:) =
3
25 '
-3 3 7
2x + 1 = ....2.iL + ....2.iL + 5 - - 3 + 3 + 7
-,-,,
-,---
(x + 2)(x -3)2 x + 2 x - 3 (x _ 3)2 25(x + 2) 25(x -- 3)
c-
-, -::-:-
5(x-'-_ cco
3)2
(,'v)
2x + 3 IS a proper fractlOn. . . I fractlOn
Let the partla ' correspond'mg to the
(x + I)(x 2 + 1)
factor x + 1 be � and the partial fraction corresponding to the factor x' + 1 be �
B +C .
x+1 x +1
--=
2x'--+-".-
3 = --
-
A + ---
Bx + C .
(x + 1)(x2 + 1) x + 1 x2 + 1
Multiplying both sides by (x + l)(x' + 1), we get
2x + 3 = A(x' + 1) + (Ex + C)(x + 1) (1)
x2 + 1 2 1) •
2(x + 1 ) 2(x-;;
(x + 1)(x 2 + 1) x + 1 +
(v)
x2 + 5 is a proper fraction with non·repeated irreducible quadratic
(x2 + x + 1)(x 2 - X + 2)
factors x' + x + 1 and x'5- x + 2.
Let
x2 + =
Ax + B + Cx + D
(x2 + + l)(x2 - x + 2) x 2 + x + 1 x 2 -x + 2
X
(vi)
x
(x - l)(x2 + 1)2 is a proper fraction. Let
x __
A
+
Bx + C + Dx + E
(x - 1)(x2 + 1) 2 x - 1 x 2 + 1 (x2 + 1)2
Multiplying by (x - l)(x' + I)', we get
x = A(x' + I) ' + (Bx + C)(x - l)(x' + 1) + (Dx + E)(x - 1) ... (1)
___--;;-x _ =
lI4
___
+
(- lI4)x + (- lI4) + (- lI2)x + lI2
(x - 1)(x 2 + 1)-;c2 x - I x2 + 1 (x2 + 1)2
1 x+l x-I
4(x2 + 1 ) 2(x2 + 1)2
=
4(x - 1)
710 DISCRETE STRUCTURES
(iv) 2x - 1
(v)
x2 + 2 (vi) 3x + 4
(x - 1) (x + 2) (x - 3) 2
(x + 1) (x2 + 4) x 2 - 5x + 6
(x + 1)( 2x + 1) x+1 2x
--
+1'
(ii) The factors in the denominator are linear and non-repeated, We use the short cut
[ ]
method to break up the given fraction
2x + 1 = 2: - 1) + 1 + 2) + 1 = - 1 + 5 = 1 1 + 5
2:
(x + 1)(x - 2) (x + 1)( - 1 - 2) (2 + 1)(x - 2) - 3(x + 1) 3(x - 2) 3 x + 1 x - 2 '
(iii) Since the given fraction is not a proper fraction, we have by long division,
3x - 2 = 1 + 3x - 2
::-:-
x2 x2
7:--
(x --: = = ' " (1)
-:-
1 +
- l)(x - 2) x2 -3x + 2 x2 - 3x + 2 (x - 1)(x - 2)
By short cut method :
3x - 2 = 3(1) - 2 + 3(2) - 2 = 1 4 1 4
- -- + = - -- + --
-,-(x --
- 1)::-
(x-,:- - ::-:-
2) (x -1)(1 - 2) (2 - l)(x - 2) (x - 1)( - 1) l(x - 2) x -I x -2
2 -,-,.,-
x,--- _' 1 4
(1) => -,-----,,-
(x -- l)(x -- 2) = 1 x - 1 + x - 2 '
__ --
x2 + 2 = z +2
(v) Let z = x2 ,
+ I)(x + 4) z + l-'-
-(-x';2 -- - -'
;
2 -
- - -'-
C - ':-
X-z-+-4:-:-)
z + 2 = -- A B
Let
(z + l)(z + 4) z + 1 z + 4 ' " z + 2 = A(z + 4) + B(z + 1)
+ --
z + 2 = � + 2/3 . . x2 + 2 = 1 + 2 .
(z + l)(z + 4) z+1 z+4 ' (x2 + 1)(x2 + 4) 3(x 2 + 1) 3(x2 + 4)
3x + 4 = 3x + 4 = A + B
(vi) Let
x 2 5x + 6 (x - 2)(x - 3) -
_ --2 -
x- x---3 .
Multiplying by (x - 2) (x - 3), we get 3x + 4 = A(x - 3) + B(x - 2) (1)
x - 2 = O � x = 2 =d x - 3 = O � x = 3.
We put x = 2 and x = 3 in (1)
x=2 � 3(2) + 4 = A(2 - 3) + B(2 - 2) � 10 = - A + 0 � A = - lO
x=3 � 3(3) + 4 = A(3 - 3) + B(3 - 2) � 13 = 0 + B � B = 13
3x + 4 = - 10 + 13 .
')(-x"----:3::) :- -
-;-(x---'"-=2:c: --2 -
x- --3
x-
Example 3. Resolve the following fractions into partial fractions
(i)
12x 2 -2x - 9
(4x2 - l)(x + 3)
(ii) -
x2 + 8x-
".---
+4
x3 - 4x-
2x
(iii)
(x2 + 2)(x2 + 3) '
Sol. (i) The factors of (4x' - 1)(x + 3) are linear and non-repeated.
Let 12x 2 - 2x - 9
(2x - 1)(2x + 1)(x + 3) = --A + --
2x - 1
B + C
+ 1 --
x +3
2x
=
A(2x + 1)(x + 3)+ B(2x - 1)(x + 3) + C(2x - 1)(2x + 1)
( 2x - 1)(2x + l)(x + 3)
12x2 - 2x - 9 = A(2x + 1)(x + 3) + B(2x - 1)(x + 3) + C(2x - 1)(2x + 1)
(1)
1
Now, 2x - l = O � 2x + 1 = 0 � x = - -
2 and x + 3 = 0 � x = - 3.
x=� � 3 - 1 - 9 = A(2) GJ + 0 + 0 � - 7 = 7A � A = - 1
-
12x 2=--
-;-:::-
(2x -=
-9
- 2x .,--
1)(2x --:-:
+ 1)(x ---:c-
+ 3)
-1
= -- + -- +
2x - 1
1
2x + 1
3
x +3 . -
x2 + 8x + 4 x2 + 8x + 4 - A B C
(ii) x3 - 4x = x(x + 2)(x - 2) = x + -- x + 2 + --
x -2 (1)
,
• • X + 8x + 4 = A(x + 2)(x - 2) + Bx(x - 2) + Cx(x + 2)
x=O => 0 + 0 + 4 = - 4A or A = - l
x = - 2 => 4 - 16 + 4 = 8B or B = - 1
x=2 => 4 + 16 + 4 = 8C or C = 3.
.
Hence (1) can be wntten as
x 2 + 8x + 4 = - 1 - 1 + . 3 .
3
x - 4x - x -- x-2
x + 2 --
...)
('" 2x Ax + B + Cx + D
(x + 2)(x + 3) "'x=02-+--=2=- x 2 + 3
2 2
(Ax + B) (x2 + 3) + (Cx + D) (x 2 + 2)
=
(x 2 + 2Xx2 + 3)
Multiplying by (x' + 2)(x' + 3), we get
2x = (Ax + B) (x' + 3) + (Cx + D) (x' + 2)
Equating the coefficient of :0 , both sides, we get
O=A+C (1)
Equating the coefficient of :0' , both sides, we get
O=B+D (2)
Equating the coefficient of x, both sides, we get
2 = 3A + 2C (3)
Equating the constant term, we get
0 = 3B + 2D (4)
From (1), C = - A and from (3), 2 = 3A - 2A => A = 2
.. C=-2
From (2) B = - D and from (4) - 3D + 2D = 0
=> D = 0, B = 0
2x 2x 2x
(i)
5x3 + 18x2 - lOx - 6 (ii)
X4 + x3 + 2X2 + 4x + 1
x(x + 3)(5x - 2) x(x + 1)
Sol. (i) Since the given fraction is not a proper fraction, we have by long division,
5x3 + l8x 2 - lOx - 6 = 1 + 5x2 - 4x - 6 (1)
x(x + 3)(5x - 2) 5x3 + l3x2 - 6x
We resoIve
5X 2 - 4x - 6 lnto
. partia . I fractlOns.
·
2
5x + 13x 2 - 6x
Let
5x 2 - 4x - 6 = - A + B + -- C
(2)
x(x + 3)( 5x - 2) x x + 3-- 5x -2
=
A(x + 3)(5x - 2) + Bx(5x - 2) + Cx(x + 3)
x(x + 3)(5x - 2)
PARTIAL FRACTIONS 713
.. 5x' - 4x - 6 = A(x + 3)(5x - 2) + Bx(5x - 2) + Cx(x + 3) (3)
When x = 0, (3) => - 6 = - 6A => A = l
When x = - 3, (3) => 45 12 - 6 = B(- 3)(- 15 - 2)
+ => B = 1
We reso1ve --
2x + 1 .
x2 + x
lnto partia
' I fractlOns.
'
Let
2x + 1 =
A
+
B A(x + 1) + Ex
= (2)
-;-
x(x + 1) -
x-+-1 --x(-;-x--
+:-:
1-)
.. 2x + 1 = A(x + 1) + Bx. (3)
When x = 0, (3) => 1 = A
When x = - 1, (3) => - 2 + 1 = - B or B = 1.
:. (2) =>
2x + 1 1
x(x + 1) = x - --1
x +1.
+
Example 5. Resolve the following fractions into partial fractions ,'
x2 + 1 3x + 1
(i) -----
- -,; (ii)
(x _ 1)2 (x + 3) (x -2f(x + 2) .
Sol. (i) Let
x2 + 1 = A + B + C
--
(x - 1)2 (x + 3) x - 1 (x - 1)2 X + 3 . --
.. x' + 1 = A(x - l)(x + 3) + B(x + 3) + C(x - I)' (1)
x= 1 => 1 + 1 = A(0)(4) + B(4) + C(O) => B = 112
=
x = - 3 => 9 + 1 A(- 4)(0) + B(O) + C(16) => C = 5/8
Let us put x = 0 in (1).
.. 0 + 1 = A(- 1)(3) + B(3) + C(l)
3A = 3B + C - 1 = 3
(-21) -5 -
+
8
-1=
9
8
A= �
8
.
1 = - 4A + 2 (f) ( ) 5
+ 4 - 16
7 5
2 - -4 - I = -4 => A = 16
=> 4A = -
5 5
3x + l = &16 + 7/4 - 5 / 16
(x 2)2(x + 2) -
- --2 (x - 2)2
x-
+
x +":::":' 2C-.
-"":
Example 6. Resolve the following fractions into partial fractions:
X4
-- X4
(i)
X4 -1 (ii)
-X-'-4---1-6
X 1
(iii)
X
x3 + x2 + +
Sol. (i) By long division, +- = 1 + --f:--
x
4
-1 x -1
X4 - (x2 - 1)(x2 +
Let
1 1
=
1 ex + D
=
A
+
B
+
-1 1) (x - I)(x + 1)(x2 + I) -
x---l -
x-+-l -"xC,2'-+--'- =-
I
(1)
Multiplying by (x - 1)(x + 1)(x2 + 1), we get
. . 1 = A(x + l)(x2 + 1) + B(x - 1)(x2 + 1) + (Cx + D)(x2 - 1)
=> X4
X4 - I 4(x 4(x +
1 1 1
(1) -- = 1 + --;-;-
----:
c
- 1) 1) 2(x 2 + 1)
X4X4 X4
16
(ii) By long division, =1+ (1)
-_
- 16 - 16
16 16 16
Consider -""4- = where y x2 .
x - 16 (x 2 _
4)(x 2 + 4) (y - 4)(y + 4)
PARTIAL FRACTIONS 715
16 16 2 2 2 2
=
7(y- y-+-4"") + ( - 4 + 4)(y + 4) = y - 4 - Y + 4 = x 2 - 4 - x 2 + 4
)(-
_--:4--:
(1) =>
x Ax + B C
(iii) Let
2
(x + l)(x + 1) =
x2 + 1
+
x+1 .
--
-x
'-_
_,-----' --- _
-21 x + -12 _2_
1
x+1 1
x2 + 1 x + 1 2(x 2 + 1) 2(x + 1) .
= + =
(x 2 +l)(x 1) +
Example 7. Resolve the following fractions into partial fractions :
( .) 22x 2
3
(ii)
x - x + 4x3 - 4x2 + Sx - 4
5 4
, (x + 1) (x2 + 2)3
2x3 Ax +B Cx + D
Sol. (i) Let =
(x2 + 1)2
2x3 = (Ax + B) (x' + 1) + (Cx + D)
=> 2x3 = Ax3 + Bx3 + (A + C)x + B + D
Comparing the coefficients, we get A = 2, B = 0, A + C = 0, B + D = °
Solving, we get A = 2, B = 0, C = - 2, D = 0.
2x 3
----,-
2x + 0 - 2x + 0 --
, -,;- = -- + =
2x--:-;;-
2x - ---",=
(x 2 + 1)2 x2 + 1 (x2 + 1)2 x2 + 1 ex2 + 1)2
4
.. Let x5 - x + 4x3 -4x2 + 8x - 4 = A x + B + Cx + D + ' Ex + F
(,,)
(x2 + 2)3 x2 + 2 (x2 + 2)2 (x 2 + 2)'
:. x5 - X4 + 4x3 - 4x' + 8x - 4 = (Ax + B) (x' + 2)' + (Cx + D) (x' + 2) + (Ex + F)
= Ax' + BX4 + (4A + C)x3 + (4B + D)x3 + (4A + 2C + E)x + (4B + 2D + F)
Comparing the coefficients, we get
A = 1, B = - l, 4A + C = 4, 4B + D = - 4, 4A + 2C + E = 8, 4B + 2D + F = - 4.
A = 1, B = - l, C = O, D = 0, E = 4, F = 0.
X5 - x 4 +...:
'-'-
--'-'
- ::.:,2 -=:;--.::.----=.
4x3;-- - 4x 2 + 8x -.:.:... 4 = --
x - 1 + 4x .
ex + 2)3 x 2 + 2 ex 2 + 2)3
716 DISCRETE STRUCTURES
1. (,). --1 + -
x -l 2x +3
1 (ii) 7(x2+ 2) + 7(3 -3 2x) (iii) 2 3 2
x -1 (x _1)
. x 2-1 3 2 (v) 2x1 + -::-:-----:::-
(w) - -
1 1
2(x -2) (x _ 2)2 .
(x _1)
(i) 4(x7+ 1) + 2(x 1+ 1)2 4(x 3+ 1)3 4x 2x 2 --
2. .. -1 ---+
(n)
1 1 + 1
-
x -1 4(x + 2)
(iii) 12(x5 -1) 4(x15+ 3) + 3(x16+ 2) (iv) 5(x21+ 4) 5(x21+ 9)
PARTIAL FRACTIONS 717
-4 - 2x
3.
2 x-6 + 1 _ ::2x +:::.
3_
-- + -- + - (ii) �
x + 1 x - 1 x2 + 4
(i) + -;;-
x +4 x + 2x + 5
2 2
(m) (w) -2 - --
""" -1 1 3 " 1 1
-- + -- + --
x - 1 x + 2 x2 + 9 x
2
x +1
1 1 1 "" 1 1 1
(")
1 )3
4. (i) 2 -
(iii)
1 1
+
x
(iv) _ � + 12 + 2 +
__ __ _ 2�
..::
2(x - 1) 2(x + 1) (x2 + 4) x x X +1 (x + 1)3
2 6 "
(v) 1 + -- - --
x +3 x + 4
2 2
INDEX
A B
718
I NDEX 719
• •
• • • •
• • • • • . . • • •
I S B N 978-93-80386- 3 5 - 5
I
9 7 8 9 3 8 0 3 8 6 3 5 5