B08CVQHQ8P
B08CVQHQ8P
DISCRETE STRUCTURES
& GRAPH THEORY
[Discrete Mathematics]
(For B.Tech. and M.C.A. students of all Colleges affiliated to Indian Universities)
By
J.P. Chauhan
M.Sc. (Mathematics)
C.C.S. University, Meerut (U.P.)
Dedicated
to
Lord
Krishna
Author & Publishers
About the Book
Covers the complete requirement of B.E., B.Tech., M.C.A. and B.Sc (C.S.) students.
The book presents a balanced treatment of the theory, technology and system design
techniques.
Acknowledgement
This book has been written in simple and lucid style for better understanding and
appreciation of study. It has been compiled systematically to enable sure one to evaluate detail
of the book. Needless to say, I am deeply indebted to the publisher, Shri Satyendra Rastogi, for
providing continuous support and enthusiasm.
This acknowledgement would fall short of completion if I fail to mention the entire team of
Krishna Prakashan Media (P) Ltd. I would like to thank the contributors for their creativity
and especially their excellent work.
Finally, we shall be very grateful to all instructors and students who send us their helpful
suggestions.
J.P. Chauhan
(iv)
Syllabus
ECS - 303
B.Tech. - A.K.T.U. (Sem. III)
(Compulsory for CS & IT) Elective for all other Branches
L T P
3 1 0
Unit-I
Set Theory: Introduction, Combination of sets, Multisets, Ordered pairs. Proofs of some general identities on
sets.
Relations: Definition, Operations on relations, Properties of relations, Composite Relations, Equality of
relations, Recursive definition of relation, Order of relations.
Functions: Definition, Classification of functions, Operations on functions, Recursively defined functions.
Growth of Functions.
Natural Numbers: Introduction, Mathematical Induction, Variants of Induction, Induction with Nonzero
Base cases. Proof Methods, Proof by counter example, Proof by contradiction.
Unit-II
Algebraic Structures: Definition, Groups, Subgroups and order, Cyclic Groups, Cosets, Lagrange's theorem,
Normal Subgroups, Permutation and Symmetric groups, Group Homomorphisms, Definition and
elementary properties of Rings and Fields, Integers Modulo n.
Unit-III
Partial order sets: Definition, Partial order sets, Combination of partial order sets, Hasse diagram.
Lattices: Definition, Properties of lattices Bounded, Complemented, Modular and Complete lattice.
Boolean Algebra: Introduction, Axioms and Theorems of Boolean algebra, Algebraic manipulation of
Boolean expressions. Simplification of Boolean Functions, Karnaugh maps, Logic gates, Digital circuits and
Boolean algebra.
Unit-IV
Propositional Logic: Proposition, well formed formula, Truth tables, Tautology, Satisfiability, Contradiction,
Algebra of proposition, Theory of Inference. Predicate Logic: First order predicate, well formed formula of
predicate, quantifiers, Inference theory of predicate logic.
Unit-V
Trees : Definition, Binary tree, Binary tree traversal, Binary search tree.
Graphs: Definition and terminology, Representation of graphs, Multigraphs, Bipartite graphs, Planar graphs,
Isomorphism and Homeomorphism of graphs, Euler and Hamiltonian paths, Graph coloring,
Recurrence Relation & Generating function: Recursive definition of functions, Recursive algorithms,
Method of solving recurrences.
Combinatories: Introduction, Counting Techniques, Pigeonhole Principle, Polya's Counting Theory.
(v)
3.9 Number of Functions 107
Unit-I
3.10 Recursively Defined Function 119
Chapter 1: Set Theory.......................(1-44) 3.11 Factorial Function 119
1.1 Set 3 3.12 Recursive Definition of Fibonacci
1.2 Types of Sets 4 Function 119
1.3 Subsets 6 3.13 Ackermann’s Function 120
1.4 Operations of Sets 7 3.14 Primitive Recursive Function 121
1.5 Principle of Duality 12 3.15 Growth of Functions 124
1.6 Cartesian Product of Sets 12 Chapter 4: Natural Numbers......(129-158)
1.7 Multiset 17 4.1 Peano’s Axioms 129
1.8 Operations on Multiset 18 4.2 Mathematical Induction 130
1.9 Venn Diagrams 20 4.3 Variant of Induction 147
1.10 Countable and Uncountable Gets 33 4.4 Proof Methods or Notion of Proof 147
Chapter 2: Relations.......................(45-78) 4.5 Method of Contraposition 148
2.1 Binary Relation 45 4.6 Proof by Contradiction 151
2.2 Total Number of Distinct Binary 4.7 Proof by Counter-Example 153
Relation from Set A to Set B 45 4.8 Proof by Cases 153
2.3 Some Operations on Sets 47
2.4 Operations on Relation 47 Unit-2
2.5 Properties of Relation 48
Chapter 5: Algebraic Structures.....(159-234)
2.6 Equality of Relation 49
5.1 Binary Operation on a Set 161
2.7 Composite Relation 49
5.2 Algebraic Structure 162
2.8 Recursion and Recurrence Relations 51
5.3 Group 164
2.9 Order of Relation 52
5.4 Some Definitions 166
2.10 Matrix Representation of Relations 54
5.5 Order of a Finite Group 167
2.11 Digraphs 56
5.6 Addition Modulo m 179
2.12 Equivalence Classes 59
5.7 Multiplication Modulo m 180
2.13 Quotent Set 60
5.8 Residue Classes of the Set of Integers 183
Chapter 3: Functions....................(79-128) 5.9 Order of an Element of a Group 186
3.1 Definition 79 5.10 Subgroup 198
3.2 Function (Mathematical Definition) 79 5.11 Cyclic Group 206
3.3 Classification of Function or Type 5.12 Simple Properties of Cyclic Group 207
of Functions 81 5.13 Cosets 209
3.4 Difference between Function and 5.14 Lagrange's Theorem 211
a Relation 86
5.15 Normal Subgroup 212
3.5 Kind of Mappings 87
5.16 Quotient Group or Factor Group 214
3.6 Even and Odd Functions 88
5.17 Permutation Group of Symmetric
3.7 Inverse Function (Inverse Mapping) 90 Group 216
3.8 Operations on Real Valued Function 101 5.18 Group Homomorphism 222
(vi)
5.19 Isomorphism of Groups 222 Chapter 7: Boolean Algebra........(303-366)
5.20 Properties of Homomorphism 7.1 Introduction 303
and Isomorphism 223 7.2 Boolean Algebra or Axioms of
5.21 Ring 226 Boolean Algebra 303
5.22 Type of Ring 227 7.3 Duality 307
5.23 Integral Domain 229 7.4 Theorems of Boolean Algebra 308
5.24 Field 229 7.5 Algebraic Manipulation of Boolean Expression
or Algebra of Propositions (A.P.) 312
5.25 Division Ring or Skew Field 229
7.6 Simplification of Booleam Function 325
5.26 Characteristic 229
7.7 Conjunctive Normal Form or Dual Canonical
5.27 Elementary Properties of a Ring 230 Form or Product of the Sums POS) Form 328
7.8 Minimization of Boolean Functions 341
Unit-3 Chapter 8: Logic Gates (Circuits)....(367-404)
Chapter 6: Partial Order Sets 8.1 Logic Gates and Circuits 367
and Lattices..............(235-302) 8.2 Combinational Circuits 368
6.1 Partial Order Set (Poset) 237 8.3 NAND-gate and NOR-gate 369
6.2 Total Ordering Relation or 8.4 Multiple Input Elements (or Gates) 373
Linearly Ordered or Chain 239 8.5 Equivalent Circuits 374
6.3 Immediate Predecessor or Immediate 8.6 Exclusive OR Gate or XOR Gate 375
Successor 239 8.7 Exclusive-NOR (XNOR) Gate 375
6.4 Hasse Diagram or Partially Ordered 8.8 Method for Draw Logic Circuit From
Set or Representation of Posets 240 Boolean Equation 376
6.5 Combination of Partial Order Sets 8.9 Method for Finding Boolean Function
or Components of Poset 259 or Expression From a Logic Circuit 376
6.6 Well Ordered Set 264 8.10 Digital Circuits or The Logic Diagram 376
6.7 Complete Order 265 8.11 Applications of Logic Gates 378
6.8 Dual of a Poset 265
6.9 Product of Two Posets 266 Unit-4
6.10 Isomorphic Posets 266 Chapter 9: Propositional Logic.....(405-492)
6.11 Lattice 269 9.1 Statement 407
6.12 Dual Lattice 276 9.2 Logical Connectives or Sentence
6.13 Properties of Lattices 276 Connectives 408
6.14 Sub-lattice 280 9.3 Kinds of Sentences 409
6.15 Isomorphic Lattice 281 9.4 Truth Value of A Statement 410
6.16 Distributive Lattice 283 9.5 Truth Tables 418
6.17 Complete Lattice 283 9.6 Basic Logical Operations 418
9.7 Kinds of Conditional 422
6.18 Complement of an Element in a Lattice 283
9.8 Algebra of Proposition 434
6.19 Complemented Lattice 283
9.9 Truth-Table for Well Formed Formula 439
6.20 Complemented Complete Lattice 284
9.10 Normal Forms 457
6.21 Bounded Lattice 284
9.11 Connectivity NOR AND NAND 460
6.22 Direct Product of Lattices 284
9.12 Law of Duality 474
6.23 Modular Lattices 284
(vii)
9.13 Predicate or Propositional Function or 11.19 Eulerian Paths and Circuits 576
Open Sentence 476 11.20 Hamiltonian Path 580
9.14 Quantifiers 478 11.21 Graph Colouring 586
9.15 Negation of A Quantifier 479 11.22 Chromatic Number 587
9.16 De-Morgan Laws 480 11.23 Edge Colouring 588
11.24 Five-Colour Theorem 589
Unit-5 11.25 Four Colour Conjecture 590
11.26 Chromatic Polynomials 591
Chapter 10: Trees and their
11.27 Uniquely Colourable Graph 592
Properties...............(493-528)
Chapter 12: Recurrence Relations..... (607-632)
10.1 Introduction 495
10.2 Tree 495 12.1 Recursive Formula 607
10.3 Decision Trees or Sorting Trees 499 12.2 Linear Recurrence Relation with
constant Coefficients 608
10.4 Tree Searching (Traversing) 502
12.3 Non-homogeneous Linear Recurrence
10.5 Binary Tree Construction 504 Relation or Difference Equations 615
10.6 Relationship between General Trees 12.4 Recursive Algorithm 626
and Binary Trees 506
10.7 Maximum and Minimum Possible Height Chapter 13: Discrete Numeric and Generating
of An n-Vertex Binary Tree 507 Functions.......................(633-672)
10.8 Spanning Tree 509
13.1 Discrete Numeric Functions 633
10.9 Rank and Nullity of a Graph 512
13.2 Manipulation of Numeric Functions 635
10.10 Fundamental Circuits 512
13.3 The Forward Difference and the Backward
10.11 Finding all Spanning Trees of a Graph 513 Difference of a Numeric Function 637
Chapter 11: Graph Theory..........(529-606) 13.4 Asymptotic Behavior of Numeric
Functions 640
11.1 Graph 529
13.5 O(f) or order f or BIG-OH of f 641
11.2 Directed Graph (Digraph) 533
13.6 Generating Functions 648
11.3 Isomorphic Graphs 535
13.7 Solution of Recurrence Relations by the
11.4 Regular Graph 537 Method of Generating Functions 660
11.5 Subgraph 537
Chapter 14: Combinatories.........(673-710)
11.6 Operations on Graphs 539
14.1 Counting Techniques 673
11.7 Labeling of a Graph 541
14.2 Combinations 688
11.8 Complete and Bipartite Graphs 542
14.3 Practical Problems on Combinations 691
11.9 Matrix Representation of Graphs 547
14.4 Permutations and Combinations with
11.10 Matrix Representation of Digraphs 551
Unlimited Repetitions 697
11.11 Walk 562
14.5 Pigeonhole Principle 701
11.12 Paths 562
11.13 Circuit 563 Chapter 15: Polya's Theorem.......(711-716)
11.14 Connected, Disconnected, Strongly Connected 15.1 Introduction to Polya's Theorem 711
and Weakly Connected Graphs 564 15.2 Polya's Enumeration (or Counting)
11.15 Applications of Graphs 565 Theorem 712
11.16 Basic Terminology 571 15.3 Applications of Polya's Theorem in Graph
Enumeration 714
11.17 Planar Graphs 572
11.18 Euler’s Formula 575
(viii)
Unit-1
C hapter
1. : Set Theor y
2. : Relations
3. : Functions
4. : Natural Numbers
1.1 Set
The theory of sets was developed by German Mathematician George Canter (1845-1918 A.D)
A well defined collection of distinct objects is called a Set.
(i) The objects in a set are called its members or elements.
(ii) We denote sets by capital letters, A, B, C, X, Y, Z, etc.
(iii) The elements of a set are also represented by small letters a, b, c, x, y, z etc.
If a is an element of a set A, we write a ∈A i.e a belongs to A or a is an element of A. If a does not belong to A,
it can be written as a ∉ A
Illustrations
(i) The collection of all natural numbers denoted by N.
(ii) The collection all vowels in the English alphabet is the set containing given elements, namely a,
e, i, o, u.
(iii) The solution of the equation x 2 – 5x + 6 = 0 i.e, 2 and 3
(iv) The rivers of India.
(v) The collection of all even numbers less than 8, is the set containing the numbers 2, 4, 6.
(vi) The collection of all integers, all rational numbers and all real numbers are denoted by Z, Q and R.
Solution:
(i) All factors of 12 are 1, 2, 3, 4, 6, 12
∴ A = {1, 2, 3, 4, 6, 12}
(ii) All even positive integers less than 20 are 2, 4, 6, 8, 10, 12, 14, 16, 18
Note:
(i) The repeated letters are taken only once
(ii) In a set relation, order is not important. Hence, the set of all factors of 12 can also be written as
{2, 4, 6, 1, 12, 3} instead of {1, 2, 3, 4, 6, 12}
n
Solution: We have E = x : x = , Where n ∈ N and 1 ≤ n ≤ 8
n + 1
Illustrations
(i) { x : x ∈ N and 2< x < 3} = φ (ii) { x : x ∈ R and x 2 = –1} = φ
Illustrations
(i) {0} is a singleton set whose element is 0
(ii) { x : x ∈ N and x 2– 9 = 0} = {3} which is singleton set.
Set Theory 5
1.3 Subsets
A set A is said to be subset of set B, if every element of A is also an element of B and we write, A ⊆ B.
If n ( A )= m then n [ P (A)] = 2m .
Example 4: Two finite sets have m and n elements. The total number of subsets of the first set is 56 more than
the total number of subsets of the second set. Find the values of m and n.
Solution: We know that if a set has m elements then total number of subsets of this set will be 2m .
∴ 2m = 2n + 56
⇒ 2m – 2n = 56
⇒ 2n(2( m – n) – 1) = 8 × 7
⇒ 2n(2( m – n) – 1) = 23 × 7 ...(1)
Now, since 23 is even and only 2n can be even in left hand side of equation (1), so
2n = 23
⇒ n=3
Now, since 7 is odd and only (2( n– m ) – 1) can be odd in left hand side of equation (1), so
2( m – n) – 1 = 7
2( m – 3 ) = 23
⇒ m– 3 = 3
⇒ m =6
Hence, n = 3 and m = 6
Example 5: Write down all possible subsets of A = { 2, 3} or {a, b} [U.P.T.U. (B. Tech.) 2007]
Thus, n( A ) = 2 and n (P ( A )) = 4 = 22
Example 9: If A = { 1, 2, 3, 4, 5} and B = { 4, 5, 6, 7, 8 }
C = { 7, 8, 9, 10, 11 } and D = { 10, 11, 12, 13, 14 }.
Find:
(i) A∪B (ii) B ∪C (iii) A ∪C
(iv) B∪D (v) (A ∪ B)∪ C (vi) (A ∪ B)∩ C
(vii) ( A ∩ B ) ∪ D (viii) ( A ∩ B ) ∪ (B ∩ C ) (ix) ( A ∪ C ) ∩ (C ∪ D )
Solution:
(i) A ∪ B = { 1, 2, 3, 4, 5, 6, 7, 8} (ii) B ∪ C = { 4, 5, 6,7, 8, 9, 10, 11}
(iii) A ∪ C = { 1, 2, 3, 4, 5, 7, 8, 9, 10, 11} (iv) B ∪ D = { 4, 5, 6, 7, 8, 10, 11, 12, 13, 14}
(v) ( A ∪ B ) ∪ C = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} (vi) ( A ∪ B ) ∩ C = { 7, 8}
(vii) ( A ∩ B ) ∪ D = { 4, 5, 10, 11, 12, 13, 14} (viii) ( A ∩ B ) ∪ (B ∩ C ) = { 4, 5, 7, 8}
(ix) ( A ∪ C ) ∩ (C ∪ D ) = { 7, 8, 9, 10, 11}
Solution:
(i) We have A1 = [0, 1], A2= [0, 2] ⇒ A1 ∪ A2 = [0, 1] ∪ [ 0, 2] =[0, 1, 2].
(ii) We have A3 = [ 0, 3], A4 = [ 0, 4] ⇒ A3 ∩ A4 = {0}
10
(iii) We have ∪ Ai = A5 ∪ A6 ∪ A7 ∪ A8 ∪ A9 ∪ A10
i=5
= [ 0, 5] ∪ [ 0, 6 ] ∪ [ 0, 7] ∪ [ 0, 8] ∪ [ 0, 9] ∪ [ 0, 10]
=[ 0, 5, 6, 7, 8, 9, 10 ] .
Set Theory 9
A' = { x ∈ U : x ∉ A} ⇒ x ∈ A' ⇔ x ∉ A
Example 14: If U = {1, 2, 3, 4, 5, 6, 7, 8} and A = {2, 4, 6, 8}, find (i) A' (ii) (A')'
Solution: We have
(i) A' = U – A = {1, 2, 3, 4, 5, 6, 7, 8} – { 2, 4, 6, 8 } = { 1, 3, 5, 7 }
(ii) ( A' )' = (U – A' ) = {1, 2, 3, 4, 5, 6, 7, 8} – { 1, 3, 5, 7 } = { 2, 4, 6, 8 } = A
or
⇒ x ∈ B or x ∈ A
⇒ x ∈B ∪ A
∴ A∪B ⊆B∪ A ...(1)
Similarly, we have B∪ A ⊆ A∪B ...(2)
A∪B =B∪ A
x ∈A∩B ⇒ x ∈ A and x ∈ B
⇒ x ∈ B and x ∈ A
⇒ x ∈B ∩ A
∴ x ∈A∩B ⇒ x ∈B ∩ A ⇒ A ∩ B ⊆ B ∩ A ...(3)
B∩ A ⊆ A∩B ...(4)
(2) Associativity: The sets are associative under the proposition of union and intersection i.e., if
A, B and C are three sets
Then (i) ( A ∪ B ) ∪ C = A ∪ (B ∪ C ) (ii) ( A ∩ B ) ∩ C = A ∩ (B ∩ C )
(4) Identity Laws: The empty set φ and universal set U are the identity elements of union and
intersection respectively
or
Proof: (i) A × (B ∪ C ) = {( x, y ): x ∈ A, y ∈ (B ∪ C )}
= {( x, y ): x ∈ A and y ∈ B or y ∈ C }
= {( x, y ): x ∈ A, y ∈ B or x ∈ A, y ∈ C }
= {( x, y ): ( x, y ) ∈ A × B or ( x, y ) ∈ A × C }
= (A × B) ∪ (A × C )
(ii) A × (B ∩ C ) = {( x, y ): x ∈ A, y ∈ B ∩ C }
= {( x, y ): x ∈ A and y ∈ B and y ∈ C }
= {( x, y ): x ∈ A, y ∈ B and x ∈ A, y ∈ C }
= {( x, y ): ( x, y ) ∈ A × B and ( x, y ) ∈ A × C }
= (A × B) ∩ (A × C )
(i) U' = φ (ii) φ' = U (iii) ( A' )' = A (iv) A ∪ A' = U (v) A ∩ A' = φ
Proof: We have
(i) U ' = { x ∈U : x ∉U ' } = φ
(ii) φ' = { x ∈ U : x ∉ φ} = U
(iii) ( A' )' = { x ∈ U : x ∉ A' } = { x ∈ U : x ∈ A} = A
(iv) A ∪ A' = { x ∈ U : x ∈ A ∪ A' }
= { x ∈ U : x ∈ A or x ∈ A' }
= { x ∈ U : x ∈ A or x ∉ A} = U
(v) A ∩ A' = { x ∈ U : x ∈ A ∩ A' }
= { x ∈ U : x ∈ A and x ∈ A' }
= { x ∈ U : x ∈ A and x ∉ A} = φ
14 Discrete Mathematical Structures
Theorem 4: State and prove Demorgan's laws or To prove the following relations
(i) ( A ∪ B )' = A' ∩ B' (ii) ( A ∩ B )' = A' ∪ B'
Proof:
(i) Let x ∈ ( A ∪ B )' ⇒ x ∉ ( A ∪ B )
⇒ x ∉ A and x ∉ B
⇒ x ∈ A' and x ∈ B'
⇒ x ∈ ( A' ∩ B' )
∴ x ∈ ( A ∪ B )' ⇒ x ∈ ( A' ∩ B' )
Then ( A ∪ B )' ⊆ A' ∩ B' ...(1)
Again y ∈ A' ∩ B' ⇒ y ∈ A' and y ∈ B'
⇒ y ∉ A and y ∉ B
⇒ y ∉A∪B
⇒ y ∈ ( A ∪ B )'
∴ y ∈ A' ∩ B' ⇒ y ∈ ( A ∪ B )'
Then ( A' ∩ B' ) ⊆ ( A ∪ B )' ...(2)
From (1) and (2) ( A ∪ B )' = A' ∩ B'
(ii) Let x ∈ ( A ∩ B )' ⇒ x ∉ ( A ∩ B )
⇒ x ∉ A or x ∉ B
⇒ x ∈ A' or x ∈ B '
⇒ x ∈ A' ∩ B'
∴ ( A ∩ B )' ⊆ A' ∪ B' ...(1)
Again y ∈ A' ∪ B' ⇒ y ∈ A' or y ∈ B'
⇒ y ∉ A or y ∉ B
⇒ y ∉( A ∩ B )
⇒ y ∈( A ∩ B )'
∴ A' ∪ B' ⊆ ( A ∩ B )' ...(2)
From (1) and (2), we have
( A ∩ B )' = A' ∪ B'
⇒ ( x ∈ A and x ∈ B ) or ( x ∈ A and x ∈ C )
⇒ x ∈ ( A ∩ B ) or x ∈ ( A ∩ C )
⇒ x ∈( A ∩ B ) ∪ ( A ∩ C )
∴ A ∩ (B ∪ C ) ⊆ ( A ∩ B ) ∪ ( A ∩ C ) ...(1)
Similarly it can be prove that ( A ∩ B ) ∪ ( A ∩ C ) ⊆ A ∩ (B ∪ C ) ...(2)
From (1) and (2), we have A ∩ (B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )
Proof:
(i) Let x ∈(B – A ) ⇒ x ∈ B and x ∉ A
⇒ x ∈ B and x ∈ A'
∴ x ∈ (B – A ) ⇒ x ∈ A'
Then (B – A ) ⊆ A'
(ii) ( A – B ) = A ∩ B' = B'– A'
Let x ∈ ( A – B ) ⇔ x ∈ A and x ∉ B
⇔ x ∈ A and x ∈ B'
⇔ x ∈ A ∩ B'
∴ A – B = A ∩ B'
Again ( A – B ) = { x : x ∈ A and x ∉ B }
= (B'– A' )
∴ A – B = A ∩ B' = B' – A'
(iii) A' – B' = B – A
Let x ∈( A'– B' ) ⇒ x ∈ A' and x ∉ B'
⇒ x ∉ A and x ∈ B
⇒ x ∈ B and x ∉ A
⇒ x ∈B – A
∴ ( A'– B' ) ⊆ (B – A ) ...(1)
16 Discrete Mathematical Structures
Proof: Let x ∈ A – (B ∪ C )
⇒ x ∈ A and x ∉ (B ∪ C )
⇒ x ∈ A and ( x ∉ B or x ∉ C )
⇒ ( x ∈ A and x ∉ B ) or ( x ∈ A and x ∉ C )
⇒ x ∈ ( A – B ) and x ∈ ( A – C )
⇒ x ∈( A – B ) ∩ ( A – C )
Then A – (B ∪ C ) ⊆ ( A – B ) ∩ ( A – C ) ...(1)
Again let y ∈( A – B ) ∩ ( A – C )
⇒ y ∈ ( A – B ) or y ∈ ( A – C )
⇒ ( y ∈ A and y ∉ B ) and ( x ∈ A and x ∉ C )
⇒ x ∈ A and ( x ∉ B and x ∉ C )
⇒ x ∈ A and ( x ∉ (B ∪ C )
⇒ x ∈ A – (B ∪ C )
Then ( A – B ) ∩ ( A – C ) ⊆ A – (B ∪ C ) ...(2)
From (1) and (2) A – (B ∪ C ) = ( A – B ) ∩ ( A – C )
(iii) A ∩ (B ∆ C ) = ( A ∩ B )∆( A ∩ C )
Proof:
(i) we have A – (B ∩ C ) = A ∩ (B ∩ C )'
= A ∩ (B' ∪ C ' ) (By Demorgon's law)
= ( A ∩ B' ) ∪ ( A ∩ C ' )
= (A – B)∪ (A – C )
Set Theory 17
(ii) A ∩ (B – C ) = A ∩ (B ∩ C ' )
= ( A ∩ B) ∩ C' (By Associativity)
= φ ∪ [( A ∩ B ) ∩ C ' ]
= [( A ∩ B ) ∩ A' ] ∪ [( A ∩ B ) ∩ C ' ]
= ( A ∩ B ) ∩ ( A ∩ C )'
= ( A ∩ B )– ( A ∩ C )
(iii) We have A ∩ (B ∆ C ) = A ∩ [(B – C ) ∪ (C – B )]
= [ A ∩ (B – C )] ∪ [ A ∩ (C – B )]
= [( A ∩ B )– ( A ∩ C )] ∪ [( A ∩ C )– ( A ∩ B )]
= (A ∩ B)∆ (A ∩ C )
1.7 Multiset
A collection of object that are not necessarily distinct, is called a Multiset.
In fact we can characterize a multiset as pair ( A, µ ), where A is the generic set and µ is the multiplicity
function defined as
µ : A → {1, 2, 3 K }
So that µ (a) = k where k is the number of times the element is in the multiset.
Since c ∉ A
Remark: Sets are merely special instants of multisets in which the multiplicity of an element is either 0 or 1
18 Discrete Mathematical Structures
1.7.3 Multisubset
A multiset P is said to be a multisubset of Q , if multiplicity of each element in P is less or equal to its
multiplicity in Q
i.e.if x ∈ P − Q ⇒ µ ( x ) = µ P ( x ) − µ Q( x )
Then P − Q = [ a, a, b, c]
Set Theory 19
⇒ x ∈ P ( A ) ∩ P (B )
∴ P ( A ∩ B ) ⊆ P ( A ) ∩ P (B ) ...(1)
Again, Let y ∈ P ( A ) ∩ P (B ), then
y ∈ P ( A ) ∩ P (B ) ⇒ y ∈ P ( A ) and y ∈ P (B )
⇒ y ⊆ A and y ⊆ B
⇒y ⊆ A∩B
⇒ y ∈ P( A ∩ B )
∴ P ( A ) ∩ P (B ) ⊆ P ( A ∩ B ) ...(2)
From (1) and (2)
∴ P ( A ∩ B ) = P ( A ) ∩ P (B )
⇒ y ∈ A and y ∉ B
⇒ y ∈( A – B )
∴ ( A ∩ B' ) ⊆ ( A – B ) ...(2)
Hence From (1) and (2) ( A – B ) = ( A ∩ B' )
20 Discrete Mathematical Structures
A ⊆ A ⇒ A ⊂ P( A )
⇒ A ∈ P (B )
⇒A⊆B ...(1)
Again B ⊆ B ⇒ B ∈ P (B )
⇒ B ∈ P( A )
⇒B⊆ A ...(2)
Solution:
(i) L.H.S = (A ∩ B)∪ (A – B)
= ( A ∩ B ) ∪ ( A ∩ B' )
= A ∩ (B ∪ B' ) [ B ∪ B' = U ]
= A ∩U
= A = R . H. S
(ii) L.H.S = A ∪ (B – A ) [(B – A ) = B ∩ A' ( A ∪ A' = U )]
= A ∪ (B ∩ A' )
= ( A ∪ B ) ∩ ( A ∪ A' )
= (A ∪ B)∩ U
= ( A ∪ B ) = R . H. S
Fig. 1.1
Set Theory 21
Fig. 1.2
Fig. 1.3
Two disjoint sets are shown by venn diagram as given in Fig. 1.4 A B
Fig. 1.4
1.9.5 Complement of a Set
The complement of a set A can be represented by shaded (stripes) portion as
given in Fig. 1.5. Let A and B be two intersecting subsets of U. In counting the
elements of ( A ∪ B ), the elements of ( A ∩ B ) are counted twice, once in counting
the elements of A and second time in counting the elements of B.
Fig. 1.5
∴ n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
If A∩B =φ then n( A ∩ B ) = 0
A–B B–A
n( A ∪ B ) = n( A ) + n(B )
A∩B
From the Venn diagram, it is also clear that
(i) n( A – B ) + n( A ∩ B ) = n( A )
A B
(ii) n(B – A ) + n( A ∩ B ) = n(B ) Fig. 1.6
(iii) n( A – B ) + n( A ∩ B ) + n(B – A ) = n( A ∪ B )
1 2 .5 .6
3 4 .7 .8
.9
A B
Fig. 1.7
Proof is theorem 10
22 Discrete Mathematical Structures
The set A – B, B – A, ( A ∩ B ) are disjoint and their union is ( A ∪ B ). A–B A∩B B–A
∴ n( A ∪ B ) = n( A – B ) + n( A ∩ B ) + n(B – A )
= n( A – B ) + n( A ∩ B ) + n(B – A ) + n( A ∩ B )– n( A ∩ B ) A B
Fig. 1.8
= n( A ) + n(B )– n( A ∩ B )
[∴ n( A – B ) + n( A ∩ B ) = n( A ) and n (B – A ) + n( A ∩ B ) = n(B )]
Hence
∴ n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
= n( A ∪ B ) + n(C )– n[( A ∪ B ) ∩ C ]
⇒ x ∈ A and (x ∉ A or x ∉ B )
⇒ (x ∈ A and x ∉ A ) or (x ∈ A and x ∉ B )
⇒ ( x ∈ φ ) or ( x ∈ A − B )
⇒ x ∈ φ ∪ (A − B)
⇒ x ∈( A − B )
∴ x ∈ A − ( A ∩ B ) ⇒ x ∈( A − B )
⇒ A − (A ∩ B) ⊆ A − B ...(1)
Again let x ∈ ( A − B ) ⇒ x ∈ A and x ∉ B
⇒ x ∈ A and x ∉ A ∩ B
⇒ x ∈ A − (A ∩ B)
∴ x ∈( A − B ) ⇒ x ∈ A − ( A ∩ B )
⇒ (A − B) ⊆ A − (A ∩ B) ...(2)
From (1) and (2) we find A − ( A ∩ B ) = A − B
Example 23: Assume A, B and C are arbitrary sets. You do not have to prove anything or provide counter
examples but only state if the following statements are true or false:
(i) {a, φ} ∈ {a, {a, φ}} (ii) If A ∈ B and B ⊆ C , then A ∈ C
(iii) If A ∈ B and B ⊆ C , then A ⊆ C (iv) If A ⊆ B and B ∈ C , then A ∈ C
(v) If A ⊆ B and B ∈ C , then A ⊆ C [U.P.T.U. (B. Tech) 2002]
Solution: (i) True (ii) True (iii) False (iv) False (v) True
Fig. 1.9
24 Discrete Mathematical Structures
Fig. 1.10
Solution:
Fig. 1.14
A ∪ B ⊂ A ∪ C, B ⊆
| C
(ii) Venn diagram for A ∩ B ⊆ A ∩ C but B ⊆
| C
A C
B
Fig. 1.15
A ∩ B ⊆ A ∩ C, B ≠ C
Set Theory 25
Example 27: Draw a Venn diagram to represent the following three facts:
(i) A∩B≠φ (ii) D ⊆ B ⊆C (iii) A∩D=φ (iv) ( A − B )′ (v) A − A′ (vi) A′ ∩ B
∪ ∪
A B
D
A∩B=φ B
C
Fig. 1.16
Fig. 1.17
(iii) A∩D=φ
A
D
Fig. 1.18
(iv) ( A − B )′
Fig. 1.19
(v) ( A − A′ ) (vi) A′ ∩ B
∪ ∪
A B
(A′ ∩ B)
A' A′
Fig. 1.20 Fig. 1.21
26 Discrete Mathematical Structures
In the Venn diagram, the set of babies and the set of people
who can manage crocodile are disjoint. Hence babies can not
manage crocodiles and the conclusion P is valid. Fig. 1.22
n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
n( A ∩ B ) = 27 + 35 – 50 = 12
Hence n( A ∩ B ) = 12
Example 30: In group of 50 people, 35 speaks Hindi, 25 speaks both English and Hindi and all people speak
at least one of the two languages. How many people speak only English and not Hindi? How many speak
English?
Solution: We have
Total number of people = 50
Total number of people speaking Hindi = 35
Let A be the set of people that speak Hindi, B be the set of people that speak English.
Let n( A ) = The number of people in the set A
n(B ) = The number of people in the set B
∴ n( A ∪ B ) = 50, n( A ) = 35, n( A ∩ B ) = 25
Set Theory 27
We know n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
⇒ n(B ) = n( A ∪ B )– n( A ) + n( A ∩ B )
⇒ n(B ) = 50 – 35 + 25 = 40
= 40 – 25 = 15
Example 31: A computer company must hire 20 programmers to handle system programming jobs and 30
programmers for applications programming. Of these hired, 5 are expected to perform jobs of both types. How
many programmers must be hired?
Solution: We have
Then n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
= 20 + 30 – 5 = 50 – 5 = 45
∴ The total number of programmers hired are 45.
Example 32: In a group of 60 people, 40 speak Hindi, 20 speak both English and Hindi and all people speak
at least one of the two languages. How many people speak only English and not Hindi? How many speak
English?
Solution: Let total people = 60
Hindi Speaking = 40
∴ n( A ) = 40, n( A ∩ B ) = 20, n( A ∪ B ) = 60
n(B – A ) = n( A ∪ B )– n( A ) = 60 – 40 = 20
28 Discrete Mathematical Structures
By venn diagram the shaded (stripes) portion (see Fig. 1.25) is the U=60
required number of people. Now the number of people, speaking
English n(B ).
20 20
∴ We have n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
⇒ n(B ) = n( A ∪ B ) + n( A ∩ B )– n( A ) A B
⇒ n(B ) = 60 + 20 – 40 = 40
Fig. 1.25
Example 33: In a class of 25 students, 12 have taken Mathematics, 8 have taken Mathematics but not
Biology. Find the number of students who have taken Mathematics and Biology and those who taken Biology
but not Mathematics?
Solution: By Venn Diagram.
Example 34: A school has 21 boys in basket ball team, 26 in hockey and 29 in football team. Now if 14 boys
play hockey and basketball, 15 boys play hockey and football, 12 boys play football and basketball and 8 boys
play hockey, football and basketball all three games, then what is total number of boys playing these games?
Solution: Let B,H,F denote the total number of boys playing basketball, hockey and football.
Then n(B ) = 21, n(H ) = 26, n(F ) = 29
n(H ∩ B ) = 14; n(H ∩ F ) = 15; n(F ∩ B ) = 12
and n(B ∩ H ∩ F ) = 8
Then n(B ∪ H ∪ F ) = n(B ) + n(H ) + n(F )– n(H ∩ B )– n(H ∩ F ) – n(F ∩ B ) + n(B ∩ H ∩ F )
= 21 + 26 + 29 – 14 – 15 – 12 + 8 = 84 – 41 = 43
Example 35: A class has 175 students. The following description gives the number of students studying one
more of the subjects in this class.
Mathematics 100; Physics 70; Physics and Chemistry 46; Mathematics and physics 30; Mathematics and
Chemistry 28; Physics and Chemistry 23; Mathematics, Physics and Chemistry 18.
Find:
(i) How many students are enrolled in Mathematics alone; Physics alone and Chemistry alone?
(ii) The number of students who have not offered any of these subjects.
Set Theory 29
Example 36: A survey shows that 73% of the Indians like apples, whereas 65% like oranges. What
percentage of Indians like both apples and oranges?
Solution: Let A = Set of Indians who like apples
Example 37: In a survey it is found that 21 people like product A, 26 people like product B and 29 like
product C. If 14 people like products A and B; 15 people like products B and C; 12 people like products C and A;
and 8 people like all the three products.
Find:
(i) How many people are surveyed in all?
(ii) How many like product C only?
Solution:
Then, we have
a + b + c + d =21
b + c + e + f = 26
c + d + f + g = 29
b + c = 14, c + f =15, c + d = 12
and c= 8
∴ c = 8, d = 4, f = 7, b = 6, g = 10, e = 5, a = 3
(i) Total number of surveyed people = a + b + c + d + e + f + g = 43
(ii) Number of people who like product C only = g = 10
Example 38: In a group of 52 persons, 16 drink tea but not coffee and 33 drink tea.
(i) How many drink tea and coffee both?
(ii) How many drinks tea and coffee both?
(iii) How many drink coffee but not tea?
Solution:
Let A = Set of persons who drink tea
and B = Set of persons who drink coffee A–B A∩B B–A
Then, A – B = Set of persons who drink tea but not coffee
And B – A = Set of persons who drink coffee but not tea
But n( A ∪ B ) = 52, n( A – B ) = 16 and n( A ) = 33 A B
Fig. 1.29
(i) Set of persons who drink tea and coffee both = ( A ∩ B)
Now, n( A – B ) + n( A ∩ B ) = n( A )
⇒ n( A ∩ B ) = n( A )– n( A – B ) = (33 – 16) = 17
Thus, 17 drinks tea and Coffee both
(ii) n( A ∪ B ) = n( A ) + n(B )– n( A ∩ B )
⇒ n(B ) = n( A ∪ B ) + n( A ∩ B )– n( A ) = 52 + 17 – 33 = 36
Now n(B – A ) + n( A ∩ B ) = n(B )
⇒ n(B – A ) = n(B )– n( A ∩ B ) = 36 – 17 = 19
Thus, 19 drinks coffee but not tea.
Example 39: In a group of 850 persons, 600 can speak Hindi and 340 can speak Tamil.
Find:
(i) How many can speak both Hindi and Tamil?
(ii) How many can speak Hindi only?
(iii) How many can speak Tamil only?
(i) Set of persons who can speak both Hindi and Tamil = ( A ∩ B )
∴ n( A ∩ B ) = n( A ) + n(B )– n( A ∪ B )
= 600 + 340 – 850 = 90
Thus, 90 persons can speak both Hindi and Tamil
(ii) Set of persons who can speak Hindi only = (A – B)
Now n( A – B ) + n( A ∩ B ) = n( A )
⇒ n( A – B ) = n( A )– n( A ∩ B ) = 600 – 90 = 510
Thus, 510 persons can speak Hindi only
(iii) Set of persons who can speak Tamil only = (B – A)
Now n(B – A ) + n( A ∩ B ) = n(B )
⇒ n(B – A ) = n(B )– n( A ∩ B ) = 340 – 90 = 250
Hence, 250 persons can speak Tamil only
Example 40: In an examination, 56% of the candidates fail in English and 48% failed in Science. If 18%
failed in both English and Science, find the percentage of those who passed in both the subjects.
Solution:
Failed in English only = 56 –18 = 38
Failed in Science only = 48 – 18 = 30
Failed in both English and Science = 18
Failed in one or both of the subjects = 38 + 30 + 18 = 86
Passed in both the subjects = (100 – 86) = 14
Example 41: In a group of 65 people, 40 like cricket,10 like both cricket and tennis. How many like tennis
only and not cricket? How many like tennis?
Solution:
Let A = Set of people who like cricket
30 10 25
B = Set of people who like tennis
i.e., n( A ) = 40, n( A ∩ B ) = 10
A B
∴ n( A – B ) = (40 – 10) = 30 Fig. 1.30
n(B – A ) = 65 ~(30 + 10) = 25
Number of people who like tennis only = 25
Number of people who like tennis = 25 + 10 = 35
Example 42: In a canteen, out of 123 students, 42 students buy ice-cream, 36 buy buns and 10 buy cakes, 15
students buy ice-cream and buns, 10 buy ice- cream and cakes, 4 buy cakes and buns but not ice-cream and 11
buy ice-cream and buns but not cakes. Draw Venn diagram to illustrate the above information and find:
(i) How many students buy nothing at all?
(ii) How many students buy at least two items?
(iii) How many students buy all the three items?
32 Discrete Mathematical Structures
Solution:
Define the sets A, B and C such that U
A B
A = Set of students who buy cakes,
B = Set of students who buy ice-cream,
10 6 21
C = Set of students who buy buns. 4
4 11
According to Question, we have 17
n( A ) = 10, n(B ) = 42, n(C ) = 36
n(B ∩ C ) = 15
C
n( A ∩ B ) = 10
Fig. 1.31
n{( A ∩ C )– B} = 4
n{(B ∩ C )– A} = 11
and n{( A – B ∪ C )– B} = 10
Now, we have n(B ∪ C ) = n(B ) + n(C )– n(B ∩ C )
= 142 + 36 – 15 = 63
n(B ∪ C )– n(B ) = 63 – 42 = 21
and n(B ∪ C )– n(C ) = 63 – 36 = 27
The above distribution of the student can be illustrated by Venn diagram (Fig. 1.31).
Now, total number of students buying some thing
= 10 + 6 + 21 + 4 + 4 + 11 + 17 = 73
(i) Number of students who did not buy anything.
= 123 – 73 = 50
(ii) Number of students buying at least two items
= 6 + 4 + 4 + 11 = 25 and
(iii) Number of students buying all three items = 4.
Example 43: In a city of 1000 families, it was found that 40% families buy newspaper A, 20 families buy
newspaper B, and 10% buy C. Only 5% families buy A and B, 3% buy B and C and 4% buy A and C and 2%
families buy all the three newspapers. Find the number of families which buy:
(i) A only (ii) B only (iii) None of A, B and C.
Solution: Let P, Q and R denote the set of families buying newspaper A, B and C respectively.
Then according to question, we have
n(P ) = 40% of 1000 = 400
n(R ) = 100, n(Q ) = 200
n(P ∩ Q ) = 50, n(Q ∩ R ) = 30
n(R ∩ P ) = 40
and n(P ∩ Q ∩ R ) = 20 and n(U ) = 1000,
Where U is the universal set.
Set Theory 33
Illustration: Any two closed intervals [ a, b] and [ c, d] are equipotent. We defined a mapping
f :[ a, b] → [ c, d ] such that
d − c
f (x) = c + ( x − a)
b − a
Illustration: The set A = {2, 4, 6, 8, K } is also denumerable because f (n) = 2n is a bijective map from the set
N onto the set A.
Theorem 13: The union of countable family of countable sets is countable. [U.P.T.U. (B. Tech.) 2009]
Proof: Let { A1 , A2, A3 K An, K } be a countable family of sets such that each An is countable.
we can write
.............................................
.............................................
An = {a n1 , a n2, a n3 , a n4 , K }
The following diagram demonstrates the above counting process:
................................................................................................
................................................................................................
Set Theory 35
a11
a21 , a12
..............................
..............................
a n1 , a( n −1 ) 2, K a1 n
..............................
..............................
It is clear that aij is the jth element of (i + j − 1)th row. Thus all the elements have been counted out. Thus ∪
An is countable.
This scheme arranges all the elements of N × N into sequence < a1 , a2, a3 , . . . > . Thus N × N is countable.
Hence, A × B is countable
Example 45: Show that the set Q of all rational numbers is denumerable.
0 −1 1 − 2 2
Solution: Let us define An = , , ,
, , K
n n n n n
36 Discrete Mathematical Structures
1 if ann ≠ 1
bn =
2 if ann = 1
Let y = 0 . b1 b2 b3 K bn K
The decimal expression of y is unique since no bn is equal to 0 or 9. Moreover y ∈[ 0, 1] and y is not equal to
f (n) for any n. In fact, y differs from f (1) in the first decimal place, it differ from f (2) in the second decimal
place and so on. But this contradicts the assumptions that every real number in [ 0, 1] is in the set
{ f (1), f (2), K }. Hence [ 0, 1] is uncountable.
Example 49: Find the cardinal number of each of the following sets
Exercise
1. Which of the following collections are sets?
(i) The collection of all students of your class
(ii) The collection of all planets of the solar system
(iii) The collection of all interesting dramas written by Shakespeare
(iv) The collection of all good athletes of India
(v) The collection of all those students of your class whose age exceeds 15 years
[U.P.T.U. (M.C.A.) 2004]
10. Write each of the following intervals in the set builder form.
(i) A =] – 2, 3[ (ii) B = [ 8, 11[ (iii) C = [–12, 6[
11. If A = {a, b, c, d, e, f }, B = {c, e, g, h} and C = {a, e, m, n}
(i) A∪B (ii) B ∪C (iii) A ∪C
(iv) B ∩C (v) C∩A (vi) A∩B
12. If A = {1, 2, 3, 4, 5}, B = {4, 5, 6, 7, 8}, C = {7, 8, 9, 10, 11} and D = {10, 11, 12, 13, 14} , find:
(i) (A ∪ B)∪ C (ii) (A ∪ B) ∩ C (iii) ( A ∩ B ) ∪ (B ∩ C ) (iv) ( A ∪C )∩(C ∪ D )
13. If A = {2x : x ∈ N and 1 ≤ x < 4}, B = { x + 2: x ∈ N and 2 ≤ x < 5}
and C = { x : x ∈ N and 4 < x < 8}, find:
(i) A∩B (ii) A∪B (iii) ( A ∪ B ) ∩ C
14. If A = {2, 4, 6, 8, 10, 12} and B = {3, 4, 5, 6, 7, 8, 10}, find: (A – B) ∪ (B – A)
1 1
15. If A = { : x ∈ N and x < 8} and B = { : x ∈ N and x ≤ 4}, find:
x 2x
(i) A∪B (ii) A∩B (iii) A–B (iv) B– A
16. If U = {1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {1, 2, 3, 4} B = {2, 4, 6, 8} and C = {1, 4, 5, 6}, find:
(i) A' (ii) B' (iii) C' (iv) (B' )'
(v) ( A ∪ B )' (vi) ( A ∩ C )' (vii) (B − C )'
17. Prove the following relations
(i) A ∪ B = B ∪ A (Commutative law) (ii) ( A ∪ B ) ∪ C = A ∪ (B ∪ C ) (Associative law)
(iii) A ∪ A = A (Indempotent law) (iv) A∩φ =φ∩Α=φ
(v) A ∩U = U ∩ A = A
18. If U = {1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {2, 4, 6, 8} and B = {2, 3, 5, 7} verify that
(i) ( A ∪ B )' = ( A' ∩ B' ) (ii) ( A ∩ B )' = ( A' ∪ B' )
Set Theory 39
21. In a group of 50 persons, 30 like tea, 25 like coffee and 16 like both. How many like:
(i) either tea or coffee (ii) neither tea nor coffee [Rohtak (M.C.A.) 2007]
22. A school award 42 medals in hockey, 18 in basketball and 23 in cricket. If these medals were bagged
by a total of 65 students and only 4 students got medals in all the three sports, how many student
received medals in exactly two of the three sports?
n ( A ∩ B ∩ C) = 4 then used.
n ( A ∪ B ∪ C) = n ( A ) + n (B) + n (C) + n ( A ∩ B ∩ C) – [ n ( A ∩ B) + n (B ∩ C) + n ( A ∩ C)]
23. In a survey of 100 students., the number of students studying the various languages are found as:
English only 18; but not Hindi 23; English and Sanskrit 8; Sanskrit and Hindi 8; English 26; Sanskrit
48 and not languages 24. Find.
(i) How many students are studying Hindi?
(ii) How many students are studying English and Hindi both? [M.K.U. (B.E.) 2004, 2008]
24. In a survey of 60 people it was found that 25 people read newspaper H, 26 read newspaper T, 26
read newspaper I, 9 read both H and I, 11 read H and T, 8 read both T and I and 3 read all the three
newspapers. Find
(i) The number of people who read at least one of the newspaper.
(ii) The number of people who read exactly one newspaper. [Osmania (B.E.) 2007]
25. Define finite and infinite sets. Distinguish these concepts with the help of suitable examples.
28. In a class of 120 students, 80 students study Mathematics, 45 students study History and 20 students
neither study History nor study Mathematics. What is the number of students who study both
Mathematics and History? [U.P.T.U. (M.C.A.) 2001]
[Hint:- 80 − x + x + ( 45 − x ) + 20 = 120]
40 Discrete Mathematical Structures
Answers
1. (i) (ii)
2. (i) A = {L, E , T , R } (ii) B = {−2, − 1, 0, 1, 2, 3, 4}
(iii) C = {1, 4, 9, 16, 25, 36, 49} (iv) D = {5, 10, 15} (v) E = {2, 3}
26.
28. 25
2. Let R be the universal set and X ∩ {2, 4, 8, 10} = 2, 8, then smallest set X = K and largest set X = K
3. Let A = {φ, b}, construct the following sets.
(i) A−φ (ii) {φ} − A
(iii) A ∪ φ ( A) (iv) A ∩ P ( A)
(v) φ−A [U.P.T.U. (M.C.A.) 2004]
44 Discrete Mathematical Structures
Answers
Multiple Choice Questions
1. (c) 2. (a) 3. (c) 4. (c) 5. (c) 6. (b) 7. (c)
8. (c) 9. (c) 10. (d) 11. (c) 12. (d) 13. (b) 14. (c)
qqq
Relations 45
2.1 Binary Relation [R.G.P.V. (B.E.) Bhopal 2006; Pune (B.E.) 2005; R.G.P.V. (B.E.) Raipur 2005]
Let A and B be non-empty sets, then any subset R of the Cartesian product A × B is called a Relation from A
to B and is denoted by R. Thus, R is a relation from A to B ⇒ R ⊆ A × B . Symbolically we write
R = {( x, y ): x ∈ A, y ∈ B and x R y}
where x R y denotes that x is R related to y.
Example 1: Let A = {1, 2, 5} and B = {2, 4} be two given sets. Now suppose a relation from the set A to B is
expressed by statement ‘is less than’.
Solution: We have A × B = {(1, 2), (1, 4), (2, 2), (2, 4), (5, 2), (5, 4)} when x < y, then some ordered pairs
are related and some are not. The subset A × B whose elements are related in the relation R is given by
R = {(1, 2), (1, 4), (2, 4)}
clearly R⊂ A×B
Example 2: Let A = {a, b, c}, B = {2, 4, 6, 10}. A relation R from A to B is given as follows a R 2, a R 4 ,
a R 6 , aR10 , b R 6 , c R10 , write R as set of ordered pair.
Solution: R = {(a, 2), (a, 4), (a, 6), (a, 10), (b, 6), (c, 10)}
Illustration: Let L be the set of all lines in a plane and R be a relation in L defined by ‘‘is perpendicular to’’,
then
R = {( x, y ): x, y ∈ L and x ⊥ y}
is a relation in L and R ⊆ L × L
Example 3: Let A = {2, 4, 6} and B = {1, 4, 5, 6} then find out the relation from A to B defined by ‘‘is less than
or equal to’’. Find out the domain and range of the relation. [Pune (B.E.) 2006]
4<
|1 ⇒ (4, 1) ∉ R i.e. 4 R1
4 = 4 ⇒ (4, 4) ∈ R i.e. 4 R 4
4 ≤ 6 ⇒ (4, 6) ∈ R i.e. 4 R 6
6 |≤ 4 ⇒ (6, 4) ∉ R i.e. 6 R 4
6 ≤| 5 ⇒ (6, 5) ∉ R i.e. 6 R 5
6 = 6 ⇒ (6, 6) ∈ R i.e. 6 R 6
Hence R = {( x, y ): x ∈ A, y ∈ (B ) and x ≤ y}
= {(2, 4), (2, 5), (2, 6), (4, 4), (4, 5), (4, 6), (6, 6)}
d (R ) = { x : x ∈ A and ( x, y ) ∈ R }
= {2, 4, 6}
r (R ) = { y : y ∈ B and ( x, y ) ∈ R } = {4, 5, 6}
Relations 47
X × Y = {(1, 8), (1, 9), (2, 8), (2, 9), (3, 8), (3, 9)}
Then complement relation R or R′ w.r.t. X × Y
R = {(2, 9), (3, 8)}
Example 6: Let A = {1, 2, 3} and relation (R ) is ≤ on A . Determine its inverse. [Nagpur (B.E.) 2007]
Solution: The relation R under ≤ is defined as
R = {(1, 2), (1, 3), (1, 1), (2, 2), (2, 3), (3, 3)}
−1
⇒ R = {(2, 1), (3, 1), (1, 1), (2, 2), (3, 2), (3, 3)}
Example 7: Find the R −1 to the relation R on A defined ‘‘ x + y’’ divisible by 2. For A = {1, 2, 3, 4, 6}
Solution: R = {(1, 1), (2, 2), (3, 3), (4, 4), (6, 6), (1, 3), (2, 4), (2, 6), (4, 6)
⇒ R −1 = {(1, 1), (2, 2), (3, 3), (4, 4), (6, 6), (3, 1), (4, 2), (6, 2), (6, 4)
A relation R on a set A satisfies certain properties. These properties are defined as.
(i) Reflexive Relation: A relation R on a set A is reflexive if a R a ∀ a ∈ A i.e. is (a, a) ∈ R V a ∈ R ⇒ each
element a of A is related to itself.
Illustration: Let A = {a, b} and R = {(a, a), (a, b), (b, b)}
Then R is reflexive as a R a, bR b ∈ R
(ii) Irreflexive Relation: A relation R on set A is irreflexive if, for every a ∈ A, (a, a) ∉ R
Illustration: In the set of natural numbers, the relation a divides b is anti-symmetric, since a divides b and b
divides a is possible only when a = b
i.e. (a, b) ∈ R and (b, a) ∈ R ⇒ a = b
(vi) Asymmetric Relation: A relation R on set A is asymmetric if (a, b) ∈ R then (b, a) ∉ R for a ≠ b
Illustration: Let A = {1, 2, 3} and R = {(1, 2), (1, 1), (2, 3), (3, 1)} is a asymmetric relation.
(vii) Transitive Relation: The relation R on set A is called transitive relation if a R b and b R c ⇒ aR c or
(a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R ∀ a, b, c ∈ A
Illustration: If A = {1, 3, 5} and R = {1, 3), (1, 5), (3, 5)} then 1 R 3 and 3 R 5 ⇒ 1 R 5
i.e. (1, 3) ∈ R and (3, 5) ∈ R ⇒ (1, 5) ∈ R
2.6 Equality of Relation [R.G.P.V. (B.E.) Bhopal 2003, 2007; Rohtak (M.C.A.) 2008]
Let A be non-empty set and R be a relation defined on A . Then R is said to be Equivalence Relation if it is
(i) Reflexive i.e. a R a ∀ a ∈ A
Let A, B and C be three non-empty sets and R be a relation from A to B and S be a relative from B to C . Then
the Composite Relation of the two relations R and S is a relation from A to C and denoted by SoR and
defined as
SoR = {(a, c): ∃ an element b ∈ B such that (a, b) ∈ R and
(b, c) ∈ S} where a ∈ A, c ∈ C
Hence we can say that
(a, b) ∈ R , (b, c) ∈ S ⇒ (a, c) ∈ SoR
50 Discrete Mathematical Structures
The composition of a relation with itself is denoted with power of a relation R . Let R be a relation on the set
A . Then RoR is the composition of R with itself and RoR = R 2. Similarly R 3 = R 2oR = RoRoR .
Example 9: Let A = {1, 2, 3}, B = { p, q, r} and C = { x, y, z} and let R = {(1, p), (1, r), (2, q), (3, q)}
and S = {( p, y ), (q, x ), (r, z )}
Compute RoS [P.T.U. (B.E.) 2008; M.K.U. (B.E.) 2006]
Solution:
Fig. 2.1
Here, order pair (1, p) in R and ( p, y ) in S produce the order pair (1, y ) in RoS . Order pair (1, r) in R and (r, z )
in S produce the order (1, z ) in RoS . Similarly (2, q) in R and (q, x ) in S ⇒ (2, x ) in RoS. Also (3, q) in R and (q, x )
in S ⇒ (3, x ) in RoS
Hence SoR = {(1, y ), (1, z ), (2, x ), (3, x )}
or
(1, p) ∈ R and ( p, y ) ∈ S ⇒ (1, y ) ∈ SoR
(1, r) ∈ R and (r, z ) ∈ S ⇒ (1, z ) ∈ SoR
(2, q) ∈ R and (q, x ) ∈ S ⇒ (2, x ) ∈ SoR
(3, q) ∈ R and (q, x ) ∈ S ⇒ (3, x ) ∈ SoR
Example 10: Let R = {(1, 1), (2, 1), (3, 2)} and R = {(1, 1), (2, 1), (3, 2)} compute R 2
Solution: R 2 = RoR ,
Now, (1, 1) ∈ R ⇒ (1, 1) ∈ R ⇒ (1, 1) RoR
(2, 1) ∈ R ⇒ (1, 1) ∈ R ⇒ (2, 1) ∈ RoR
(3, 2) ∈ R ⇒ (2, 1) ∈ R ⇒ (3, 1) ∈ RoR
Hence, RoR = {(1, 1), (2, 1), (3, 1)}
Proof: Let M R , M S and M T denote the matrices related to relation R , S and T respectively then,
M To ( SoR ) = M SoR . M T
= (M R . M S ). M T
= M R (M S . M T ) (Multiplication of matrix is associative)
= M R (M ToS )
= M ( ToS ) oR
∴ To (SoR ) = (ToS ) oR
Relations 51
Theorem 2: Let R be a relation from the set A to the set B and S be a relation from the set B to set C, then
(SoR )−1 = R −1 oS −1 . [U.P.T.U. (M.C.A.) 2003; U.P.T.U. (B.E.) 2002]
= (c, a) ∈ R −1 oS −1
∴ (SoR )−1 = R −1 oS −1
we get the set {0, 1, 2, 3 K } each element in the above set is a successor set of previous element, except 0.
In this definition (i) is the basis and it defines addition of 0. The recursive part defines addition of the
successor of y.
Illustration: 3 + 2 = 3 + S (1) = S (3 + 1) = S (S (3 + 0)) = S (S + 3) = S(4) = 5
ä Closure of Relation
Let R be a relation on a set A.R may or may not have some property P, such as reflexivity, symmetry or
transitivity. If there is a relation S with property P containing R such that S is a subset of every relation with
P containing R, then S is called the closure of R with respect to P.
Reflexive Closure: Let R be a relation on a set A, and R is not reflexive (i.e. some pairs of the diagonal
relation ∆ are not in (R ). A relation R1 = R ∪ ∆ is the reflexive closure of the relation R if R ∪ ∆ is the
smallest relation containing R which is reflexive.
∴ R1 = R ∪ ∆ = {(a, a), (a, b), (b, b), (b, c), (c, c)}
Symmetric Closure: Let R be relation on A which is not symmetric and R −1 be inverse relation of R on A
then symmetric closure R * is defined as
R ∗ = R ∪ R −1
Relations 53
Example 12: Is R = {(1, 2), (4, 3), (2, 2), (2, 1), (3, 1)} be a relation on S = {1, 2, 3, 4}? Find the symmetric
closure.
Solution: The symmetric closure can be found by taking the union of R and R −1
Now R −1 = {(2, 1), (3, 4), (2, 2), (1, 2), (1, 3)}
Then R ∗ = R ∪ R −1 = {(1, 2), (2, 1), (4, 3), (3, 4), (3, 1), (1, 3)}
ä Transitive Closure
The relation obtained by adding the least number of ordered pairs to ensure transitivity is called the
Transitive Closure of the relation. The transitive closure of R is denoted by R + . Let a relation R be
defined on A and contains m elements, one never needs more than m steps. Consequently to make a
relation R transitive, one has to add all pairs of R 2. All pairs of R 3 and so on upto all pairs of R m , unless
these pairs are already in R. Thus
R+ = R ∪ R2 ∪ R3 ... ∪ Rm
Example 13: Let A = {1, 2, 3, 4} and R = {(1, 2), (2, 3), (3, 4)} be a relation on A . Find transitive closure R + .
=φ
+
Hence R = R ∪ R2 ∪ R3 ∪ R4
= {(1, 2), (2, 3), (3, 4), (1, 3), (2, 4), (1, 4)}
Theorem 3: Let R be relation from A to B and let A1 and A2 be two subsets of A, then
(i) A1 ⊆ A2 ⇒ R ( A1 ) ⊆ R ( A2 ) (ii) R ( A1 ∪ A2 ) = R ( A1 ) ∪ R ( A2 )
Now x ∈ A1 ∪ A2 ⇒ x ∈ A1 or x ∈ A2
If x ∈ A1 , then x R y ⇒ y ∈ R ( A1 ), similarly if x ∈ A2 ⇒ y ∈ R ( A2 )
In either case y ∈ R ( A1 ) ∪ R ( A2 ) ∴ R ( A1 ∪ A2 ) ⊆ R ( A1 ) ∪ R ( A2 ) ...(1)
Again A1 ⊆ A1 ∪ A2 ⇒ R ( A1 ) ⊆ R ( A1 ∪ A2 )
A2 ⊆ A1 ∪ A2 ⇒ R ( A2 ) ⊆ R ( A1 ∪ A2 )
54 Discrete Mathematical Structures
Therefore R ( A1 ) ∪ R ( A2 ) ⊆ R ( A1 ∪ A2 ) ...(2)
From (1) and (2) R ( A1 ∪ A2 ) = R ( A1 ) ∪ R ( A2 )
be finite sets having m and n elements respectively. Then R can be represented by mn matrix and defined as
M R = {mij }
1 if (a, b) ∈ R
where mij =
0 if (a, b) ∉ R
Note: M SoT = M S . M T
Example 14: Let R be the relation from the set A = {1, 3, 4} on itself and defined by
R = {(1, 1), (1, 3), (3, 3), (4, 4)} then find relation matrix.
[R.G.P.V. (B.E.) Raipur 2007; M.K.U. (B.E.) 2005, 2009; Pune (B.E.) 2008]
Solution: Let M R denotes the matrix of R. The number of rows in M R = number of elements in A = 3.
Since the relation from the set A on itself, the number of columns in M R is also 3 i.e. M R is 3 × 3 matrix
Here a1 = 1, a2 = 3 and a3 = 4
b1 = 1, b2 = 3 and b3 = 4
Since 1 R1 ⇒ m11 = 1 as (a1 , b1 ) = (1, 1) = 1
1 3 4
1 1 1 0
= 3 0 1 0
4 0 0 1
Example 15: Let A = {1, 2, 3, 4, 8}, B = {1, 4, 6, 9} Let a R b iff a| b i.e. a divides b. Find the relation matrix.
[Delhi (B.E.) 2005]
Solution: We have R = {(1, 1), (1, 4), (1, 6), (1, 9), (2, 4), (2, 6), (3, 6), (3, 9), (4, 4)}
1 4 96
1 1 1 1
1
2 0 1 0
1
MR = 3 0 0 1
1
4 0 1 0 0
8 0 0 0 0
1 1 0 0
0 0 1 1
MR = find R
0 0 1 1
1 0 1 0
Solution: R = {(a, a), (a, b), (b, c), (b, d ), (c, c), (c, d ), (d, a), (d, c)}
1 1 1 1
0 0 0 0
MR =
1 1 1 1
0 1 0 0
Show that R is transitive [U.P.T.U. (M.C. A.) 2003; Rohtak (M.C. A.) 2007]
1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0
∴ M R2 = M R . M R = =
1 1 1 1 1 1 1 1 1 1 1 1
0 1 0 0 0 1 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0
So, M R2 + M R = + = = MR
1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 1 0 0 0 1 0 0
2.11 Digraphs
If A is a finite set and R is a relation on A, we can also represent R pictorially as
(i) Draw the small circle for each element of A and label the circle with corresponding element of A.
These circles are called vertices.
The directed graph representing a relation can be used to determine whether the relation has various
properties.
(i) A relation is reflexive iff there is a loop at every vertex of the directed graph. So that the ordered pair
of the form (a, a) occurs in the relation. If no vertex has a loop, then the relation is irreflexive.
(ii) A relation is Symmetric iff for every edge between distinct vertices in its digraph there is an edge in
the opposite direction, so that (b, a) is in the relation whenever (a, b) is in the relation. A relation is
anti-symmetric if no two distinct points in a digraph have an edge going between them in both
direction.
(iii) A relation is transitive iff whenever there is a directed edge from a vertex a to a vertex b and from a
vertex b to vertex c, then there is also a directed edge from a to c.
Fig. 2.2
Relations 57
Fig. 2.3
Solution: The relation R of the digraph is
R = {(a, a), (a, c), (b, c), (c, b), (c, c), (d, c)}
Example 20: Let R = {(1, 2), (2, 3), (3, 1)} and A = {1, 2, 3}, find the reflexive, symmetric and transitive
closure of R, using
(i) Composition of relation R
(ii) Composition of matrix relation R [R.G.P.V. (B.E.) Raipur 2005, 2009]
R 3 = R 2oR = {(1, 3), (2, 1), (3, 2)} o {(1, 2), (2, 3), (3, 1)}
M S = M . M ′ or M ∨ M ⊥
0 1 0 0 0 1 0 1 1
= 0 0 1 1 0 0 = 1 0 1
1 0 0 0 1 0 1 1 0
R S* = {(1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)}
⇒ R1 = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 1), (3, 3)}
0 1 0 0 1 0 0 0 1
Now M 2 = M . M = 0 0 1 0 0 1 = 1 0 0
1 0 0 1 0 0 0 1 0
0 0 1 0 1 0 1 0 0
M = M . M = 1 0 0 0 0 1 = 0 1 0
3 2
0 1 0 1 0 0 0 0 1
i.e. M T = M ∨ M 2 ∨ M 3 = M . M 2. M 3
0 1 0 0 0 1 1 0 0 1 1 1
= 0 0 1 1 0 0 0 1 0 = 1 1 1
1 0 0 0 1 0 0 0 1 1 1 1
⇒ R + = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}
3
Fig. 2.4
Relations 59
To find out the reflexive closure representation of R we add all the arrows
1 2
from points to themselves which is shown in Fig. 2.5
Fig. 2.5
Fig. 2.6
To find transitive arrow we add 1 to 1 since 1 → 2 → 3 → 1 . Similarly 2 to 2, 3
to 3. Again we add arrow 1 to 3, since 1 → 2 → 3. Similarly 2 to 1 and 3 to 2.
This is shown in Fig. 2.7 1 2
Fig. 2.7
Example 21: Let A = {a, b, c} and let R = {(a, a), (b, b), (c, c), (a, b), (b, a)} where R is clearly an equivalence
relation. Find equivalence classes of the elements of A .
Solution: The equivalence classes are
[ a] = {a, b}, [ b] = {b, a} = [ a], [ c] = {c}
and rank of R is 2.
1 2 3 4
1 0 0 0 0
2 1 0 0 0
3 1 1 0 0
4 1 1 1 0
If f and g Σ F , define an equivalence relation ~ by f ~ g iff f (3) = g (3) [Osmania (B.E.) 2006]
(i) Find the number of equivalence classes defined by ~
(ii) Find the number of elements in each equivalence class [U.P.T.U. (M.C.A.) 2004]
Solution: F be the collection of all function f : {1, 2, 3} → {1, 2, 3}
Total number function in f = 33 = 27
Again f and g are any two function in F such that f ~ g iff f (3) = g (3)
Then, (i) Number of equivalence classes defined by the relation ~ = 3
(ii) Number of elements in each class = 9
Example 25: Suppose A = {a, b, c, d } and π1 is the following partition π1 = {{a, b, c}, {d}}
(i) List the ordered pairs of the equivalence relations induced by π1 .
(ii) Draw the graph of the above equivalence relation. [Osmania (M.C.A.) 2009; U.P.T.U. (M.C.A.) 2004]
Fig. 2.9
Relations 61
Example 26: Let A be the set {1, 2, 3}, define the following types of binary relation on A.
(i) A relation that is both symmetric and anti-symmetric
(ii) A relation that is neither symmetric nor anti-symmetric [U.P.T.U. (M.C. A.) 2004]
Example 27: If R is an equivalence relation on A, then prove that R −1 is also equivalence relation on A.
[U.P.T.U. (M.C. A.) 2002-2003, 2005-2006]
⇒ ( x, x ) ∈ R −1 .
So R −1 is reflexive
(ii) Let x, y ∈ R , as R is symmetric relation
( x, y ) ∈ R ⇒ ( y, x ) ∈ R
⇒ ( y, x ) ∈ R −1 and ( x, y ) ∈ R −1
So ( y, x ) ∈ R −1 ⇒ ( x, y ) ∈ R −1
So R −1 is symmetric
(iii) Let x, y, z ∈ A, as R is a transitive relation
( x, y ) ∈ R and ( y, z ) ∈ R ⇒ ( x, z ) ∈ R
which means that ( y, x ) ∈ R −1 and (z, y ) ∈ R −1 ⇒ (z, x ) ∈ R −1
So R −1 is transitive
Hence, R −1 is an equivalence relation.
62 Discrete Mathematical Structures
Example 28: Let N = {1, 2, 3K } and a relation is defined in N × N as follows: (a, b) is related to (c, d ) iff
ad = bc, then show whether R is a equivalence relation or not. [U.P.T.U. (B.Tech.) 2006, 2008]
⇒ ad = bc
⇒ cb = da
⇒ ( c d ) R( a, b) . Hence, it is symmetric
Example 29: Let X = {1, 2, 3, K 7} and R = {( x, y ): ( x − y ) is divisible by 3}. Show that R is an equivalence
relation. [U.P.T.U. (B.Tech.) 2007]
Reflexive: ∀ a ∈ R ⇒ a − a = 0 ≤ 3
so R is reflexive.
⇒b−a≥3
∴ a − b ≤ 3and b − a ≥ 3 is possible only if a = b, so R is anti-symmetric.
Transitive: Let (a, b) ∈ R and (b, c) ∈ R
⇒ a−b≤3 and b−c≤3
then a−c≤6
⇒ R is not transitive
2
Let n be the number of distinct elements in a finite set, then binary relation = nn
(ii) R = {(1, 1), (1, 3), (2, 2), (3, 3), (3, 4), (4, 4)} is reflexive as a R a ∀ a ∈ A is anti-symmetric as no pair of
distinct elements x and y ∈ A exist such that ( x, y ) ∈ R and ( y, x ) ∈ R is not transitive as
1 R 3 , and 3 R 4 ⇒ 1 R 4
(iii) R = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (3, 4), (4, 3), (4, 4)} is reflexive as 1 R1 , 2R 2, 3 R 3 , 4 R 4 is
transitive as a R b, bR c ⇒ aR c is not anti-symmetric as 1 R 2 and 2 R1 but 1 ≠ 2
Example 32: Let R be a binary relation on the set of all strings of 0 ’s and 1’s such that
R = {(a, b)| a and b are strings that have same number of 0 ’s}. Is R reflexive, symmetric, transitive or a
partial order relation? [U.P.T.U. (B.Tech.) 2003]
Solution: Reflexive: Since every string is related to itself because it has same number of zeros.
Symmetric: Let a R b ⇒ a and b both have same number of zeros then b and a will have same number of
zeros.
⇒ b R a. Hence R is symmetric
64 Discrete Mathematical Structures
R = {(a, b), (b, c), (d, c), (d, a), (a, d ), (d, d )} . Determine
Solution: (i) Reflexive Closure: = R ∪ ∆ = R ∪ {(a, a), (b, b), (c, c), (d, d )}
= {(a, b), (b, c), (d, c), (d, a), (a, d ), (a, a), (b, b), (c, c), (d, d )}
= {(a, b), (b, c), (d, c), (d, a), (a, d ), (d, d )} ∪ {(b, a), (c, b), (c, d ), (a, d ), (d, a), (d, d )}
= {(a, b), (b, a), (b, c), (c, b), (d, c), (c, d ), (d, a), (a, d ), (d, d )}
R 2 = RoR = {(a, c), (d, b), (d, d ), (a, a), (a, c), (d, c), (d, a)}
R 3 = R 2oR = {(d, c), (d, d ), (d, a), (a, b), (a, d ), (a, c), (a, a), (d, b)} = R 2
R + = R ∪ R 2 = {(a, b), (b, c), (d, c), (d, a), (a, d ), (d, d ), (a, c), (d, b), (a, d ), (a, a)}
Example 34: Let S be the set of all points in a plane. Let R be a relation such that for any two points a and b,
(a, b) ∈ R if b is within two centimeter from a, show that R is not an equivalence relation.
[U.P.T.U. (B. Tech.) 2003; Kurukshetra (B.E.) 2008]
(i) Reflexive: ∀ a ∈ S ⇒ aR a i.e. every element of the plane is related to itself being within the 2 cm
from itself.
Example 35: Let A = {1, 2, 3, 4, 5, 6} and let R be the relation defined by x divides y written as x / y
(i ) Write R as a set of ordered pairs (ii ) Draw its directed graph (iii ) Find R −1
[Rohtak (B.E.) 2007; Delhi (B.E.) 2005]
Solution:
(i) R = {(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 4), (2, 6), (3, 6), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)}
Fig. 2.10
−1
(iii) R = {(2, 1), (3, 1), (4, 1), (5, 1), (6, 1), (4, 2), (6, 2), (6, 3), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)}
Example 36: Let S = {1, 2, 3, 4, 5} and A = S × S. Define relation on A: ( a, b) R( a′, b′ ) . Show that R is an
equivalence relation iff ab′ = a′ b [U.P.T.U. (B.Tech.) 2004; Pune 2003, 2007]
Solution: We have A = S × S
⇒ A = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5),
(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)}
∴ R = {((1, 1), (5, 5)), ((1, 1), (2, 2)), ((1, 1), (3, 3)), ((1, 1), (4, 4)) K }
Then R is an equivalence relation, if
⇒ ( a, b)R( a, b) ⇒ ab = ba
⇒ R is reflexive
⇒ a b′′ = a′′ b
⇒ ( a, b) R( a′′, b′′ )
Hence it is transitive
Therefore, R is an equivalence relation.
Example 37: If R and S are equivalence relations on the set A, show that the following are equivalence
relation.
(i) R ∩ S (ii) R ∪ S [U.P.T.U. (B.Tech.) 2003]
(a) Reflexive: ∀ a ∈ A, (a, a) ∈ R and (a, a) ∈ S, since R and S are equivalence relations. This implies
∀ a ∈ A , (a, a) ∈ R ∩ S
Hence, R ∩ S is reflexive
(ii) The union of two equivalence relation on a set is not necessarily an equivalence relation. For
example
A = {a, b, c} and R , S be two relation on A given as
R = {(a, a), (b, b), (c, c), (a, b), (b, a)}
and S = {(a, a), (b, b)(c, c), (b, c), (c, b)}
Each R and S is an equivalence relation on A . But R ∪ S is not transitive, because (a, b) ∈ R ∪ S and
(b, c) ∈ R ∪ S ⇒ (a, c) ∉ R ∪ S
Hence R ∪ S is not equivalence relation.
Example 38: Let A = R × R (R be the set of real numbers) and define the following relation on A.
( a, b) R( c, d ) ⇒ a2 + b2 = c2 + d 2
(ii) Describe geometrically what the equivalence classes are for this relation (justify).
[U.P.T.U. (B.Tech.) 2002; R.G.P.V. (B.E.) Bhopal 2006]
Relations 67
Hence R is reflexive.
Symmetric: ( a, b) R( c, d ) ⇒ a2 + b2 = c2 + d 2
⇒ c2 + d 2 = a2 + b2
⇒ ( c, d )R( a, b)
⇒ R is symmetric
Transitive: Let ( a, b) R( c, d ) ⇒ a2 + b2 = c2 + d 2
and ( c, d )R( e, f ) ⇒ c2 + d 2 = e2 + f 2
∴ a2 + b2 = e2 + f 2 ⇒ ( a, b)R( e, f )
⇒ R is transitive
Example 39: Let A = {1, 2, 3, 4, 6, 7, 8, 9} and let ~ be the relation on A × A defined as (a, b)~(c, d ) if
a + d = b + c . Prove that
(i) ~ is an equivalence relation
(ii) Find [(2, 5)], the equivalence class of (2, 5)
Solution: ~ is an equivalence, if
(a) Reflexive: (a, b)~(a, b) i.e. a + b = a + b which is true. Hence ~ is reflexive
(b) Symmetric: (a, b)~(c, d ) ⇒ a + d = b + c
⇒ b + c = a + d ⇒ c + b = d + a ⇒ (c, d )~(a, b)
Hence relation is symmetric.
(c) Transitive: Let (a, b)~(c, d ) and (c, d )~(e, f ) then a + d = b + c and c + f = d + e then add
a + d + c + f = b + c + d + e or a + f = b + e or (a, b)~(e, f ) then ~ is equivalence relation.
(i) R [(2, 5)] = {(2, 5), (1, 4), (3, 6), (4, 7 ), (5, 8), (6, 9)}
Example 40: Let A = {1, 2, 3, 4, 5, 6}, construct description of relation R on A for the following:
(i) R = {( j, k} : k is multiple of j}
(ii) R = {( j, k ): ( J − k )2 ∈ A}
(iii) R = {( j, k ): j divide k}
Fig. 2.11
(ii) R = {(1, 2), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (3, 4), (3, 5), (4, 2), (4, 3), (4, 5), (4, 6), (5, 3), (5, 4),
(6, 5)}
Fig. 2.12
(iii) R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 2), (2, 4), (2, 6)}
Fig. 2.13
(iv) R = {(1, 2), (1, 3), (1, 5), (2, 1), (3, 1), (5, 1)}
Fig. 2.14
Relations 69
Example 41: How many reflexive relation and symmetric relations are there on a set with n elements?
[Pune (B.E.) 2003, 2009; Kurukshetra (B.E.) 2007]
If R is symmetric, each of the n ordered pair ( a, a ) for a ∈ A must be in R and set of pairs elements
n (n − 1)
of the form (a, b) and (b, a) for a, b ∈ A be in R. There are such pairs. By product rule of
2
n( n −1)
counting, there are 2n. 2 2 = 2n ( n+1 )/ 2 symmetric relation.
Example 42: Let A be a set with 10 distinct elements. Determine the following
(i) Number of distinct binary relations on A
(ii) Number of different symmetric binary relation A [U.P.T.U. (B.Tech.) 2009]
2
Solution: (i) We know if a set A has n elements then number of distinct binary relation on ( A × A ) = 2n
But n = 10 in A.
2
Then number of distinct binary relation A = 2(10 ) = 2100
Example 43: If R1 and R 2 are two equivalence relations on a set A, then prove that R1 ∩ R 2 is also an
equivalence relation on A. [Rohtak (M.C.A.) 2008]
Solution:
(i) Reflexive: Let x ∈ A, then ( x, x ) ∈ R1 as R1 is reflexive, similarly ( x, x ) ∈ R 2 then ( x, x ) ∈ R1 ∩ R 2
Hence, R1 ∩ R 2 is reflexive
Example 44: Let A be the set of all integers and a relation R is defined as
R = {( x, y ): x ≅ y (mod m), m divide ( x − y ) where m is positive integer. Prove that R is an equivalence
relation. [U.P.T.U. (M.C.A.) 2008]
Exercise
@ Relation
1. Give an example of a relation which is:
(i) reflexive and transitive but not symmetric.
(ii) symmetric and transitive but not reflexive.
(iii) reflexive and symmetric but not transitive.
(iv) reflexive and transitive but neither symmetric nor anti-symmetric.
4. List the order pairs in the relation R from A = {0, 1, 2, 3, 4} to B = {0, 1, 2, 3} where (a, b) ∈ R if and only if
(i) a=b (ii) a+ b=3 (iii) a×b
(iv) a ⊥ b (v) g. c. d (a, b) = 1 (vi) lcm (a, b) = 2
5. Let A = {1, 2, 3, 4}, determine whether the relation are reflexive, symmetric, anti-symmetric or
transitive
(i) R = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}
(ii) R = {(1, 3), (4, 2), (2, 4), (3, 1), (2, 2)}
(iii) R = {(1, 2), (1, 3), (3, 1), (1, 1), (3, 3), (3, 2), (1, 4), (4, 2), (3, 4)}
Relations 71
6. Write down the relations in the square of the set {1, 2, 4, 8, 16, 32, 64}
7. Let f be a mapping of a set X onto a set B. Then if we define (a, b) ∈ R for a, b ∈ X provided
f (a) = f (b). Prove that R is an equivalence relation.
9. Show that the relation is congruent module 4 to on the set of integers {0, 1, 2, K 10} is an equivalence
relation.
10. Determine which of the following are equivalence relations and or partial ordering relations for the
given sets.
(a) A = {lines in the plane}: x R y iff x is parallel to y
R = {( x, y ): x ≤ y}
S = {( x, y ): x divides y}
12. For a set X with n elements, find how many relations on X, which are
(i) Symmetric [U.P.T.U. (M.C. A.) 2004]
(ii) Anti-symmetric [P.T.U. (B.E.) Punjab 2008]
(iii) reflexive [U.P.T.U. (B.Tech.) 2009]
(iv) irreflexive
(v) reflexive and symmetric [Pune (B.E.) 2007]
13. Let L be the set of lines in the euclidean plane and let R be the relation in L defined by ‘‘ x is parallel to
y’’. Is R a symmetric relation? Why? Is R a transitive relation?
RoRoR = {( x, 8 x )| x ∈ I}
RoSoR = {( x, 2x )| x ∈ I}]
19. On the set of integers the relation is defined by a R b ‘‘iff (a − b) is even integer’’. Show that R is an
equivalence relation.
20. Suppose S and T are two sets and f is a functions from S to T let R1 be an equivalence relation on T.
Let R 2 be binary relation on S such that ( x, y ) ∈ R 2 if and only if ( f ( x ), f ( y )) ∈ R1 . Show that R 2 is
also an equivalence relation. [U.P.T.U. (B.Tech.) 2009]
R = {( x, y )|( x − y ) is divisible by m}
Over the set of positive integer is an equivalence relation. Also show that if x1 = y1 , and x 2 = y 2
then ( x1 + x 2 ) = ( y1 + y 2 ) [U.P.T.U. (M.C.A.) 2008]
22. Given the relational matrices M R and M S , find M RoS , M ( R )–1 , M ( S )–1 , M ( RoS ) and show that
M ( RoS )− 1 = M ( S )− 1 o ( R )− 1
.
1 0 1 1 0 0 1 0
MR = 1 1 0 and M S = 1 0 1 0 1
1 1 1 0 1 0 1 0 [Raipur (B.E.) 2005, 2007]
R = {( x, y ): x + y is divisor of 24}
(i) Find the relational matrix M of R
(ii) Compute M 2 and use M and M 2 whether or not R is transitive
Relations 73
24. A number of binary relations are defined on the set A = {0, 1, 2, 3} Fig. Shows some diagrams of
relations.
Find the relation each case as a set of ordered pairs. Decide which of the following properties it has
(i) reflexivity (ii) symmetry (iii) transitivity
(a) 0 1 2 3 (b) 0 1
2 3
Fig. 2.15
Fig. 2.16
(c) (d)
0 1
1
2 3 3 2
Fig. 2.17 Fig. 2.18 Fig. 2.19
Answers
1. Let A = {1, 2, 3}
(i) R1 = {(1, 1), (2, 2), (3, 3), (1, 3)} is reflexive, transitive but not symmetric.
(ii) R 2 = {(1, 1), (3, 3), (1, 3), (3, 1)} is symmetric and transitive but not reflexive.
(iii) R 3 = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1), (2, 3), (3, 2)} is reflexive and symmetric but not
transitive.
(iv) Z * be the set of non-zero integers and R be the relation on Z * given by (a, b) ∈ R if a is a factor
of b, R is reflexive and transitive but not symmetric.
4. (i) {(0, 0), (1, 1), (2, 2), (3, 3)} (ii) {(0, 3), (1, 2), (2, 1), (3, 0)
(iii) {(1, 0), (2, 0), (3, 0), (4, 0), (2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)}
(iv) {(1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (3, 0), (3, 3), (4, 0)}
(v) {(0, 1), (1, 0), (1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (4, 1), (4, 3)}
(vi) {(1, 2), (2, 1), (2, 2)}
8. (a R = {(8, 1), (6, 2), (4, 3), (2, 4)} (b) R −1 = {(1, 8), (2, 6), (3, 4), (4, 2)}
10. (a) It is an equivalence relation but not a partial ordering relation, since R is not anti-symmetric.
(b) Not transitive, therefore, it is neither.
11. R = {(1, 1), (1, 2), (1, 3), (1, 6), (2, 2), (2, 3), (2, 6), (3, 3), (3, 6), (6, 6)}
S = {(1, 2), (1, 3), (1, 6), (2, 6), (3, 6)}
R ∩ S = {(1, 2), (1, 3), (1, 6), (2, 6), (3, 6)} = S
15. (i) {{1, 2, 3}}, {{1}, {2, 33}, {{2}, {1, 33}, {{3}, {1, 3}, {{13, 52}, {3}}
1 1 0 1 1 1
1 1 1 0 0 1 1 0 1
22. M ( R )− 1 = 0 1 1 , M ( S )− 1 = 0 1 0 M ( RoS )− 1 = 0 1 1
1 0 1 1 0 1 1 1 1
0 1 0 0 1 1
1 1 1 0 1 0 1 1 1 1 1 1
1 1 0 1 0 1 1 1 1 1 1 1
1 0 1 0 1 0 2 1 1 1 0 1 0
23. (i) M R = , M =
0 1 0 1 0 0 1 1 0 1 0 1
1 0 1 0 0 0 1 1 1 0 1 0
0 1 0 0 0 1 1 1 0 1 0 1
24. (a) {(2, 3), (3, 2)} Not reflexive and transitive but symmetric
(b) {(0, 1), (0, 2)} Not reflexive, symmetric but transitive
(c) {(0, 0), (0, 1), (0, 3), (1, 1), (1, 0), (2, 3), (3, 3)} Not reflexive, symmetric and transitive
(d) {(0, 0), (0, 1), (1, 1), (1, 2), (2, 2), (2, 0)} Not reflexive, symmetric and transitive
(e) {(0, 0), (0, 1), (0, 3), (1, 1), (1, 0), (3, 0)} Reflexive, symmetric but not transitive
25.
1
1
2 2
3
4
2. The relation R is defined on the set of natural numbers as {(a, b): a = 2b}. Then R −1 is given by
(a) {(2, 1), (4, 2), (6, 3) K } (b) {(1, 2), (2, 4), (3, 6) K }
−1
(c) R is not defined (d) none of these
3. A relation R defined on the set of integers by R = {(a, b): a divides b}. Then R is
(a) reflexive (b) symmetric
(c) transitive (d) none of these
4. Given two finite sets A and B such that n ( A ) = 2, n (B ) = 3. Then total number of relations from A to B is
(a) 4 (b) 8
(c) 64 (d) none of these
6. Consider the non-empty set consisting of children in a family. Consider a relation R : x R y iff x is
brother of y. Then R is
(a) symmetric and not transitive (b) transitive but not symmetric
(c) neither symmetric nor transitive (d) none of these
9. If R is symmetric, then
(a) xRy and y Rz ⇒ xRz (b) x Rx
(c) xRy ⇔ yR x (d) none of these
Relations 77
(a) o R1 (b) ( 2/ 3 ) R1
(c) 1 R( 2/ 3 ) (d) ( 4/ 3 ) R 0
2. Let R = {(3, 1), (1, 3), (3, 3)} be a relation defined on the set A = {1, 2, 3}. Then R is symmetric,
transitive but not reflexive.
4. Let R and R′ , may be, disjoint, be two symmetric relations on a set A. Then R ∩ R ′ must be symmetric.
2. A relation r on the set N of natural numbers is defined by r = {n, n + 3): n ∈ N }. Then range
r = N − {. . . . . . . . } .
3. Let R = {(1, 2), (1, 3), (2, 4)} be a relation defined on A = {1, 2, 3, 4}. Then RoR ......... .
[Raipur (B.E.) 2007]
5. If x, y ∈ I where I is the set of integers and relation x R y ⇒ x − y is an even integer, then relation R
will be .......... .
6. If f : x → y, where y = x 3 + 1 and its domain = {0, 1,2}, then its range will be ......... .
78 Discrete Mathematical Structures
Answers
Multiple Choice Questions
1. (c) 2. (b) 3. (c) 4. (c) 5. (c) 6. (b)
❑❑❑
3.1 Definition
3.1.1 Domain
Set of inputs (also called pre-image) is called domain. It is denoted by D f .
Here, the domain is N = {1, 2, 3, 4, . . . . . . . . }
3.1.2 Co-Domain
Set of possible outputs is called co-domain. Here, the co-domain is N = {1, 2, 3, 4, . . . . . . }
3.1.3 Range
Set of actual outputs (also called images) is called Range. It is denoted by R f .
Here, the range is {1, 4, 9, 16, . . . . . . }. Obviously R f ⊆ co-domain.
Fig. 3.1
D f = {a, b, c, d}. Co-domain = { p, q, r, s, t , u} and f (a) = p, f (b) = q, f (c) = r, f (d ) = s
80 Discrete Mathematical Structures
➤ Vertal Description
f is a function which assigns to each country in the world and its capital city
Fig. 3.2
Since every country has one and only one capital. Hence, f is a function.
D f is the set of the countries of the world. R f is the set of all the capital cities.
∴ f: A→ B such that x ∈ A ⇒ f ( x ) ∈ B i.e., f (India ) = New Delhi
➤ Tabular Form
A x 1 2 3 4 5
B y a b c d e
Fig. 3.3
Note:
(i) The set of first elements of ordered pairs of a function is called domain (D f ).
(ii) The set of second elements of the ordered pairs of a function is called range (R f ).
Functions 81
➤ Formula or an Equation
Let f : R→R
Then D f = R , R f = R + ∪ {0}
Fig. 3.4
if f ( x ) ∈ R ∀x ∈ A or y = f ( x ),
The curve y 2 = 4ax and x 2 = 4ay are the functions as they contains two dependent variable value of one
gives the result of other.
Note:
(1) The function is not defined if denominator of function is zero.
1
i.e., f ( x) = then function is not defined at x = 2
x–2
(2) The function is not defined if function becomes indeterminate for any value of x
➤ Range
It is the set of all the images of all the elements of domain, which is obtained as
x –1
i.e., Let f ( x ) = y, and f (x) =
x–2
x –1
∴ y=
x–2
⇒ yx – 2y = x – 1
2y – 1
⇒ ( y – 1) x = 2y – 1 or x=
y –1
For y = 1 there is no real values of x for which the above equation is satisfied.
Note: Usually the domain of a real function is an interval. For any two real numbers a and b where a < b, we
defined
(i) Closed interval [ a , b] = { x ∈ R : a ≤ x ≤ b} (ii) Open interval ] a , b[ = { x ∈ R, a < x < b}
(iii) Left-half open interval ] a , b] = { x ∈ R : a < x ≤ b} (iv) Right-half open interval [ a , b[ = { x ∈ R, a ≤ x < b}
(v) ] a , ∞ [= { x ∈ R : x > a } (vi) [a , ∞ [= { x ∈ R ; x ≥ a }
(vii) ] – ∞ , a [ = { x ∈ R : x < a } (viii) ] – ∞ , a] = { x ∈ R : x ≤ a }
x3 – 1
e.g., 2x 2 + x1 / 3 + 4, x 2 + 3x + 9, etc.
x3 + 1
Where n ∈ N and a1 , a2, . . . . . . . an ∈ R then f is called a polynomial function. Some time f ( x ) is also called a
polynomial in x.
Functions 83
➤ Degree of a Polynomial
The highest power of x having non-zero coefficient is called the degree of the polynomial. Here, if an ≠ 0
then degree of f ( x ) is n. Thus
(i) f ( x ) = ax + b, a ≠ 0 is a linear polynomial, having degree one.
(ii) f ( x ) = ax 2 + bx + c, a ≠ 0 is a quadratic polynomial, having degree two.
(iii) f ( x ) = ax 3 + bx 2 + cx + d, a ≠ 0 is a cubic polynomial, having degree three.
Illustrations:
x 2 + 5x + 7
(i) f (x) = 2
is function. As x 2 – 3x + 2 ≠ 0, the domain of function is R – {1, 2}.
x – 3x + 2
1
(ii) f (x) = , n ∈ N is function whose domain is R – {0}.
xn
Illustration:
2x 3 / 2 + 5x 2( x1 / 2 )3 + 5x
If g( x ) = = , then g is undefined if x < 0 and also if x 2 – 1 = 0 i.e., x = ±1
x2– 1 x2 – 1
x if x ≥ 0
f ( x ) =| x| =
– x if x < 0
1, when x > 0
Thus, we have, f ( x ) = 0 , when x = 0
–1, when x < 0
Clearly, D f = R and R f = (C )
Here, A = { x1 , x 2, x 3 } and B = {a, b, c} and f : A → B be such that f ( x1 ) = b,
f ( x 2 ) = b, f ( x 3 ) = b. Then, D f = { x1 , x 2, x 3 }, R f = {b} = Range of f
Fig. 3.5
D f = R, R f = R
(b) cos x: Since cos x is defined for all value of x ∈ R , its domain R = R . As value of cos x lies between –1
and +1, so range = [–1,1].
sin x
(c) tan x: We have tan x = which is not defined when cos x =0. And cos x = 0 ⇒ cos x = cos
cos x
π π π
(2n + 1) ⇒ x = (2n + 1) . Then domain R = R – {(2n + 1) , n ∈ I}. Since tan x take all value of x so
2 2 2
its range = R
1 π
(d) sec x: We have sec x = is not defined when cos x = 0 and cos x = 0 ⇒ cos x = cos (2n+1) ⇒
cos x 2
π π
x =(2n+1) . Then domain = R – {(2n + 1) , n ∈ I} , Range = R –] – 1, 1 [
2 2
cos x
(e) cot x: We have cot x = is not defined, when
sin x
sin x = 0 ⇒ sin x = sin nπ ⇒ x = nπ, n = 0, 1, 2, 3 ........
∴ Domain = R – {nπ : n ∈ I} and Range = R
1
(f) cosec x: We know cosec = is not defined,
sin x
1. sin –1 x [–1, 1] [– π 2, π 2]
2. cos–1 x [–1, 1] [ 0, π ]
3. tan –1 x R [– π 2 , π 2]
4. cot –1 x R ] 0, π[
π π
5. cosec–1 x R –] – 1, 1[ – 2 , 2 – {0}
π
6. sec –1 x R –] – 1, 1[ [ 0, π ] –
2
In other words, the mapping f will be a subset of A×B which satisfy the following two conditions:
(i) For each a ∈ A, (a,b) ∈ f for some b ∈ B (ii) If (a, b) ∈ f and (a, b' ) ∈ f ⇒ b = b'
But from the definition of relation, every subset of A × B is a relation from the set A to the set B. Hence every
mapping is a relation but every relation is not function.
If R is a relation from A to B, then the domain of R may be a subset of A, but if f is a function or mapping
from A to B, then the domain f will be A.
In relation R, any element of A can be associated to more than one elements in B and it is also possible that
some elements of A are not associated to any element in B. But in mapping f , every element of A is
associated to one and only one element in B.
Let f : X → Y be a mapping. If all distinct elements of the domain X has distinct f –images in Y, then the
mapping f is said to one-one or injective mapping.
if x1 ≠ x 2 ⇒ f ( x1 ) ≠ f ( x 2 )
or
if f ( x1 ) = f ( x 2 ) ⇒ x1 = x 2
(i) (ii)
(iii) (iv)
Fig. 3.8
Example 2: Show that the mapping f : R → R , where f ( x ) = – sin, x, x ∈ R is neither one-one nor onto.
Solution: Here f ( x1 ) = – sin x1 , f ( x 2 ) = – sin x 2, x1 , x 2 ∈ R .
∴ f ( x1 ) = f ( x 2 ) ⇒ – sin x1 = – sin x 2 ⇒ sin x1 = sin x 2.
Since f ( x1 ) = f ( x 2 ) even when x1 ≠ x 2.
∴ The mapping is not one-one.
Again, since the numerical value of sin x cannot exceeds 1, and so the mapping is not onto.
Example 3: Discuss the mapping f : R → R defined by f ( x ) = x 2, where R is the set of real numbers.
Solution: Here the domain of the mapping is R and f –image is the set of positive real numbers, because
the square of any real number is positive. Thus, f –image is a proper subset of its domain;
i.e., { f ( x ) : x ∈ R} ⊂ R.
Example 4: If X = {–1, 1} and f ( x ) = x 3 and f : X → X , then prove that f is one-one onto mapping.
Solution: Q f ( x1 ) = f ( x 2 ) ⇒ x13 = x 23 ⇒ x1 = x 2, x1 , x 2 ∈ X .
∴ mapping is one-one.
Since f (–1) = (–1)3 = –1 and f (1) = 13 = 1; i.e., each element of X is f –image of some element of X itself.
∴ mapping f is onto.
Thus, the given mapping is one-one onto mapping.
Functions 89
f ( x1 ) = f ( x 2 ) ⇒ x12 = x 22
⇒ x1 = + x 2
[Taking only + ve sign, since x1 , x 2 are positive integers]
∴ The mapping f is one-one.
Q Each element of N is not f–image of some elements of N itself, for instance, 2, 3, 5, 6, 7,
8,...etc. are not square of any positive integer. Thus, f is not onto.
∴ f is into mapping.
Hence, the given mapping is one-one into.
Example 6: Test the mapping f : R → R defined by f ( x ) = cos x for being one-one and onto, where R is the
set of real numbers.
or
Again we know that for all real values of x, the values of cos x oscillates from –1 to +1; i.e.,
–1 ≤ cos x ≤ 1( x ∈ R ). Therefore only those elements in R (range set) which lie between –1 and +1 are
f–images and remaining elements of this set are not associated to any element of the domain set. Thus, the
given mapping f is not onto; i.e., f is into. Therefore, it follows that the given mapping f is many-one into.
1
Example 7: Show that the mapping f : R → R , f ( x ) = , x ≠ 0 and x ∈ R is one-one onto, where R is the set
x
of non-zero real numbers.
Solution: Let x1 , x 2 ∈ R be any two non-zero real numbers, then
1 1 1
f ( x1 ) = f ( x 2 ) ⇒ = Q f ( x ) = x
x1 x 2
⇒ x1 = x 2
∴ f ( x1 ) = f ( x 2 ) ⇒ x1 = x 2.
⇒ f is one-one mapping.
Let y ≠ 0 be any real number such that f ( x ) = y;
1 1
i.e. y= ⇒x= .
x y
1
Q y ≠ 0, ∴ is also a non-zero real number
y
90 Discrete Mathematical Structures
1
Hence, for every y ≠ 0 there exists its pre-image ≠ 0 in R as shown below:
y
1 1 1
f = =y Q f ( x ) = x
y (1 / y )
1
It shows that { f ( x ) = : x ≠ 0, x ∈ R } = R
x
∴ f is onto.
Hence, the given mapping is one-one onto.
Example 8: Show that the mapping f : R → R , defined by f ( x ) = 3x + 5 is one-one into, where, R is the set of
real numbers.
Solution: f is one-one: Let x, y ∈ R be such that f ( x ) = f ( y ), then
f ( x ) = f ( y ) ⇒ 3x + 5 = 3y + 5 ⇒ 3x = 3y ⇒ x = y.
∴ f is a one-one mapping.
f is onto: Let z ∈ R (range of f ) be arbitrary, then let x ∈ R (domain of f ) be such that f ( x ) = z, then
z–5
f ( x ) = z ⇒ 3x + 5 = z ⇒ x = ∈ R.
3
z–5
Thus, for each member z in the range R of f, ∃ a member in the domain R of f such that
3
z – 5 3(z – 5)
f = + 5 = z.
3 3
This mapping from Y to X is called Inverse of f. The inverse of the mapping f is usually denoted by f –1 .
Thus, f ( x ) = y ⇔ f –1 ( y ) = x.
Thus, x = f –1 ( y ).
? Theorems
Theorem 1: Prove that if f : A → B is one-one onto mapping then f –1 : B → A will be one-one onto mapping.
[U.P.T.U. (B.Tech) 2007]
Again, let x be an arbitrary element of A, then for the mapping f there exists an element y in B such that
y = f ( x ).
But f –1 ( y ) = x ∀x ∈ A.
∴ { f –1 ( y ): y ∈ B} = A.
Thus, f –1 : B → A is onto.
Theorem 2: If f is one-one onto (bijective) function from the set A to the set B, then f –1 will be a unique
function.
Proof: Since f : A → B is one-one onto mapping and so its inverse will exists.
Theorem 3: The inverse of an inversible mapping is unique. [M.K.U. (B.E.) 2005, 2008]
Proof: Let f : A → B
By invertible mapping, if possible, let
g : B → A and h : B → A
92 Discrete Mathematical Structures
Example 10: If f : I → I, where f ( x ) = x 2 and I be the set of integers, then find f –1 (9) and f –1 (– 2).
Solution: We know that (– 3)2 = 9 and (3)2 = 9 and there is no other integer whose square is 9. Hence f –1 (9)
= {– 3, 3}, but there is no other integer whose square is – 2, therefore f –1 (– 2) = φ, null set.
Solution:
Remark: f –1 is not a mapping, because for that f must be one-one and onto which is not here.
Example 13: Let f : Q → Q be defined by f ( x ) = 3x + 5( x ∈ Q ), where Q is the set of rational then prove that
f is one-one and onto mapping. Find also the formula which define the inverse function f –1 .
Example 14: If Q is the set of rational numbers and f : Q → Q is defined by f ( x ) = 3x + 2, x ∈ Q , then prove
that f is one-one and onto. Find also f –1 .
⇒ x = (3 + y )1 / 2
Example 16: If f : X → Y and A and B are two subsets of X, then prove that
(i) f ( A ∪ B ) = f ( A ) ∪ f (B ). (ii) f ( A ∩ B ) ⊆ f ( A ) ∩ f (B ).
Solution:
(i) Let y be any arbitrary element of f ( A ∪ B ), then
y ∈ f ( A ∪ B ) ⇒ y = f ( x ), where x ∈ A ∪ B
⇒ y = f ( x ), where x ∈ A or x ∈ B
⇒ y = f ( x ) ∈ f ( A ) or y = f ( x ) ∈ f (B )
⇒ y = f ( x ) ∈[ f ( A ) ∪ f (B )]
⇒ y ∈ f ( A ) ∪ f (B )
∴ f ( A ∪ B ) ⊆ f ( A ) ∪ f (B ). ...(1)
Again, Let y be any arbitrary element of f ( A ) ∪ f (B ), then
y ∈ f ( A ) ∪ f (B ) ⇒ y ∈ f ( A ) or y ∈ f (B )
⇒ y = f ( x ), where x ∈ A or x ∈ B
⇒ y = f ( x ), where x ∈ A ∪ B
⇒ y = f ( x ), where f ( x ) ∈ f ( A ∪ B )
⇒ y ∈ f (A ∪ B)
∴ f ( A ) ∪ f (B ) ⊆ f ( A ∪ B ) ...(2)
y ∈ f ( A ∩ B ) ⇒ y = f ( x ), where x ∈ A ∩ B
⇒ y = f ( x ), where x ∈ A and x ∈ B
⇒ y = f ( x ), where f ( x ) ∈ f ( A ) and f ( x ) ∈ f (B )
⇒ y ∈ f ( A ) and y ∈ f (B )
⇒ y ∈ f ( A ) ∩ f (B )
Therefore f ( A ∩ B ) ⊆ f ( A ) ∩ f (B ).
Functions 95
x ∈ f –1 ( A ∪ B ) ⇒ f ( x ) ∈ A ∪ B
⇒ f ( x ) ∈ A or f ( x ) ∈ B
⇒ x ∈ f –1 ( A ) or x ∈ f –1 (B )
⇒ x ∈ f –1 ( A ) ∪ f –1 (B )
∴ f –1 ( A ∪ B ) ⊆ f –1 ( A ) ∪ f –1 (B ) ...(1)
x ∈ f –1 ( A ) ∪ f –1 (B ) ⇒ x ∈ f –1 ( A ) or x ∈ f –1 (B )
⇒ f ( x ) ∈ A or f ( x ) ∈ B
⇒ f ( x ) ∈ A ∪ B ⇒ x ∈ f –1 ( A ∪ B )
∴ f –1 ( A ) ∪ f –1 (B ) ⊆ f –1 ( A ∪ B ). ...(2)
x ∈ f –1 ( A ∩ B ) ⇒ f ( x ) ∈ A ∩ B
⇒ f ( x ) ∈ A and f ( x ) ∈ B
⇒ x ∈ f –1 ( A ) and x ∈ f –1 (B )
⇒ x ∈ f –1 ( A ) ∩ f –1 (B )
∴ f –1 ( A ∩ B ) ⊆ f –1 ( A ) ∩ f –1 (B ) ...(1)
x ∈ f –1 ( A ) ∩ f –1 (B ) ⇒ x ∈ f –1 ( A ) and x ∈ f –1 (B )
⇒ f ( x ) ∈ A and f ( x ) ∈ B
⇒ f (x) ∈ A ∩ B
⇒ x ∈ f –1 ( A ∩ B )
∴ f –1 ( A ) ∩ f –1 (B ) ⊆ f –1 ( A ∩ B ) ...(2)
Example 18: If f : X → Y be a mapping and { Aα }α ∈∆ be an indexed family of subsets of Y, then prove that
(i) f –1 ∪ Aα = ∪ f –1 ( Aα ) f –1 ∩ Aα = ∩ f –1 ( Aα )
α ∈∆ α ∈∆ (ii)
α ∈∆ α ∈∆
x ∈ f –1 ∪ Aα ⇔ f ( x ) ∈ ∪ ( Aα )
α ∈∆ α ∈∆
⇔ f ( x ) ∈ Aα for some α ∈ ∆
⇔ x ∈ f –1 ( Aα ) for some α ∈ ∆
⇔ x ∈ ∪ f –1 ( Aα )
α ∈∆
∴ f –1 ∪ Aα ⇔ ∪ f –1 ( Aα )
α ∈∆ α ∈∆
x ∈ f –1 ∩ Aα ⇔ f ( x ) ∈ ∩ ( Aα )
α ∈∆ α ∈∆
⇔ f ( x ) ∈ A α ∀α ∈ ∆
⇔ x ∈ f –1 ( Aα ) ∀α ∈ ∆
⇔ x ∈ ∩ f –1 ( A α )
α ∈∆
∴ f –1 ∩ Aα = ∩ f –1 ( Aα )
α ∈∆ α ∈∆
Solution:
(i) Let x ∈ f –1 ( A ) be arbitrary. Then
x ∈ f –1 ( A ) ⇒ f ( x ) ∈ A
⇒ f (x) ∈ B [Q A ⊆ B]
–1
⇒x∈f (B )
–1 –1
Hence f ( A) ⊆ f (B ).
(ii) Let x be any arbitrary element of f –1 ( A – B ), then
x ∈ f –1 ( A – B ) ⇔ f ( x ) ∈ A – B
⇔ f ( x ) ∈ A and f ( x ) ∉ B
⇔ x ∈ f –1 ( A ) and x ∉ f –1 (B )
⇔ x ∈[ f –1 ( A )– f –1 (B )]
Therefore, f –1 ( A – B ) = f –1 ( A )– f –1 (B ).
Functions 97
x ∈ f –1 (Y – A ) ⇒ f ( x ) ∈ Y – A
⇒ f ( x ) ∈ Y and f ( x ) ∉ A
⇒ x ∈ f –1 (Y ) and x ∉ f –1 ( A )
⇒ x ∈ X and x ∉ f –1 ( A ) [Q f –1 (Y ) = X ]
⇒ x ∈[ X – f –1 ( A )].
∴ f –1 (Y – A ) ⊆ X – f –1 ( A ) ...(1)
x ∈ X – f –1 ( A ) ⇒ x ∈ X and x ∉ f –1 ( A )
⇒ x ∈ f –1 (Y ) and x ∉ f –1 ( A ) [Q f –1 (Y ) = X ]
⇒ f ( x ) ∈ Y and f ( x ) ∉ A
⇒ f (x) ∈ Y – A
⇒ x ∈ f –1 (Y – A )
∴ X – f –1 ( A ) ⊆ f –1 (Y – A ) ...(2)
Example 20: Find the domain and range of the following function:
(i) f ( x ) = sin x – cos x (ii) f ( x ) = sin x
Solution:
(i) Domain of f ( x ) = sin x – cos x, the value of cos x and sin x lies between –1 and +1 for the given
function f (0) = –1, f (π ) = 1, so domain is R i.e., D f = R .
Range of f ( x ) = R f = [ 0, 1].
1
Example 21: Find the range of the function f ( x ) = .
2 – cos 3x
1
Solution: Let y =
2 – cos 3x
1 1
⇒ 2 – cos 3x = or cos 3x = 2 –
y y
1
⇒ –1 ≤ (2 – ) ≤ 1 (∴ –1 ≤ cos 3x ≤ 1)
y
98 Discrete Mathematical Structures
1 1
⇒ –1 ≤ 2 – and 2 – ≤ 1
y y
1 1
⇒y≥ and y ≤ 1 i.e., ≤ y ≤ 1
3 3
1
⇒ R f = Range ( f ) = , 1
3
0 ≤ x ≤ 1 ⇒ f ( x ) = x ⇒ f ( x ) ∈]0, 1[
1
and, x > 1 ⇒ f (x) = ∈[ 0, 1]
x
∴ Range f = R f =]0, ∞ [ ∪ [ 0, 1] ∪ ] 0, 1[ = [ 0, ∞ [
2 1
(i) – 2 < 0 ⇒ f (–2) = (–2) = 4 f = 1 / 3 and
(ii) 3
1
(iii) f (1) = 1 (iv) 2 > 1 ⇒ f ( 2) =
2
(v) – 3 < 0 ⇒ f (– 3) = (– 3)2 = 3.
x 2 + 2x + 3
Example 23: If g( x ) = then find R g = Range of g( x )
x
x 2 + 2x + 3
Solution: Let =y
x
⇒ x 2 + 2x + 3 = xy or x 2 + (2 – y ) x + 3 = 0 ∀x ∈ R
∴ (2 – y )2 – 4 × 1 × 3 = 0 (B 2 – 4 Ac = 0)
⇒ y 2 – 4 y + 4 – 12 ≥ 0
⇒ y2 – 4y – 8 ≥ 0
⇒ ( y – (2 – 2 3)( y – (2 + 2 3) ≥ 0
⇒ y ∈ (– ∞, 2 – 2 3) ∪ (2 + 2 3, ∞ )
i.e., y ∈ R – (2 – 2 3, 2 + 2 3) = R g
Functions 99
x2 – 2
Example 24: If f ( x ) = then find R f = Range of f ( x )
x2 – 3
x2– 2
Solution: Let y = ⇒ yx 2 – 3y = x 2 – 2
x2 – 3
⇒ x 2( y – 1 ) = 3 y – 2
3y – 2
⇒ x2 =
y –1
3y – 2 2
This is possible only if ≥0 ⇒ y ∈ (– ∞, ) ∪ (1, ∞ ) = R f
y –1 3
6 – 3x x – 1
Example 25: If g( x ) = cos–1 + cos ec –1 then find D g = domain of g.
4 2
6 – 3x x –1
Solution: Let φ ( x ) = cos–1 and ψ ( x ) = cos ec –1
4 2
6 – 3x
Then φ( x ) is defined when –1 ≤ ≤1
4
2 10
∴ Dφ = ,
3 3
∴ D ψ = (– ∞,–1) ∪ (3, ∞ )
10
∴ D g = D( φ + ψ ) = D φ ∩ D ψ = 3,
3
Solution:
(i) For each x ∈ R , x 2 is unique real number
∴ domain ( f ( x )) = R
Now y = x2 ⇒ x = ± y
Domain ( f ( x )) = R – (3)
1 1 1 + 3y
Also y= ⇒ x –3= ⇒ x =
x–3 y y
∴ Range of f ( x ) = R – {0}.
But, (9 – x 2 ) ≥ 0 ⇒ x 2 ≤ 9
⇒ x ≤ 3 or x ≥ – 3
⇒ –3≤ x ≤ 3
⇒ x ∈[–3, 3]
∴ Domain ( f ( x )) = [– 3, 3]
For each x ∈[– 3, 3], h( x ) will be unique value in the interval [0, 3]
Hence, range h( x ) = [ 0, 3]
1
(iv) k( x ) = 2
, k( x ) is not defined when (1 – x )2 = 0 i.e., x = ± 1
1– x
1
Clearly, x is not defined when 1 – < 0 i.e., when y < 1
y
(ii) Subtraction: ( f – g )x = f ( x )– g( x ) ⇒ D( f – g ) = D f ∩ D g
f f (x)
(iv) Division: x =
g g( x )
f
will be defined for those value of x for which both f and g are defined and also g( x ) ≠ 0.
g
∴ D( f / g ) = D f ∩ D g – { x : x ∈ D g and g( x ) = 0}
(v) Composition: Let X , Y, Z be three non empty sets, f : X → Y and g : Y → Z be two mapping, then
the composition of mappings f and g is the composition mapping denoted by 'gof ' and is a function.
(gof ): X → Z and defined as
(gof ) x = g [ f ( x )] ∀x ∈ X
Fig. 3.10
Theorem 4: Let f : X → Y and g : Y → Z be one-one and onto maps. Then the composite function
Proof: Since f and g are both one-one onto and therefore f –1 and g –1 both exists and both are one-one
onto
gof is one-one Let x1 , x 2 ∈ X then
(gof ) x1 = (gof ) x 2
⇒ g [ f ( x1 )] = g [ f ( x 2 )]
102 Discrete Mathematical Structures
⇒ g( y1 ) = g ( y 2 ) Where f ( x1 ) = y1 ∈ Y and f ( x 2 ) = y 2 ∈ Y
⇒ y1 = y 2 [g is one-one]
⇒ f ( x1 ) = f ( x 2 )
⇒ x1 = x 2 [ f is one-one]
gof is onto: Let z ∈ Z, since g is onto, hence there definitely exists an element y ∈ Y such that g( y ) = z.
Again f is onto, there exists an element x ∈ X such that f ( x ) = y.
(gof )x = g[ f ( x )] = g( y ) = z
It shows that for each z ∈ Z there exists an element x ∈ X such that (gof ) x = z
∴gof is onto mapping. Hence the mapping gof is one-one onto.
To prove that ( gof )–1 = f –1 og –1
If f : X → Y be given by f ( x ) = y, where x ∈ X , y ∈ Y
g : Y → Z be given by g( y ) = z, where y ∈ Y, z ∈ Z
∴ (gof )–1 (z ) = ( f –1 o g –1 ) z
⇒ (gof )–1 = f –1 o g –1
Theorem 5: Let f : P → Q be a one-one and onto mapping and I P and I Q be the identify functions of the sets P
and Q respectively. Then show that f –1 of = I P and fof –1 = I Q.
f –1 (q) = p, p ∈ P and q ∈ Q
Thus ( f –1 of ) p = p = I p( p)∀p ∈ P .
Hence f –1 of = I P
⇒ f ( p) = q = I Q(q) ⇒ fof –1 = I Q
f : X → Y, g : Y → Z, h: Z → T
[ ho(gof )] x = h [(gof )( x )]
= h [ g( f ( x ))]
= h [ g( y )] [ f ( x ) = y]
= h(z ) [ g( y ) = z]
Theorem 7: The composition of functions is not commutative i.e. fog ≠ gof . [U.P.T.U. (B.Tech.) 2009]
Proof: Let f : P → Q and g : Q → R be two functions. Then the function gof exists because the range of f is
a subset of the domain of g. But fog cannot exist unless the range of g is a subset of domain of f i.e. unless
R ⊂ P . As such we find that fog does not exist if R ⊂
| P but fog will be a function from Q to itself if P = R , .
Thus, if P = R
Now we find that both fog and gof exist but they cannot be equal of P and Q are two distinct sets, which are
their domains. However if P = Q = R , then both function gof and fog exist and both are from P to itself, even
then they may not be equal. Hence, in general the composition of functions is not necessarily commutative.
Example 28: Let A = {1, 2, 3, 4, 6} and let R be the relation on A defined ‘‘ x divides y’’ indicated as x|y ( x|y) if
there exist an integer z such that xz = y.
(i) Write R as a set of ordered pairs.
(ii) Find the inverse relation R −1 and describe R −1 in words. [U.P.T.U. (B.Tech.) 2003]
Solution: The ordered pairs in R are those elements in which second element of every ordered pair is
divisible by first element.
104 Discrete Mathematical Structures
(i) R = {(1, 2), (1, 3), (1, 4), (1, 6), (2, 4), (2, 6), (3, 6)}
Here 1 | 2, 2| 4 and 3| 6
R −1 = {(2, 1), (3, 1), (4, 1), (6, 1), (4, 2), (6, 2), (6, 3)}
Example 29: Show that there exists one to one mapping from A × B to B × A . Is it onto also?
Solution: Let ( x, y ) ∈ A × B ⇒ ( y, x ) ∈ B × A
Now, f : A × B to B × A
Let x1 , y1 , x 2, y 2 ∈ A × B
and f be defined as f ( x, y ) = ( y, x )
If f ( x1 , y1 ) = f ( x 2, y 2 )
⇒ ( y1 , x1 ) = ( y 2, x 2 )
⇒ y1 = y 2 and x1 = x 2
Hence it is one-one. It will be onto also every element of co-domain will be f -image of at least one element
of a domain.
Example 30: Let X = {1, 2, 3}, Y = { p, q} and Z = {a, b}, let f : X → Y be f = {(1, p), (2, p), (3, q)}
g : Y → Z be g = {( p, b), (q, b)}. Find gof and show it pictorially [U.P.T.U. (B.Tech.) 2003]
Fig. 3.11
Functions 105
f 2 [ f (b)] = a, f 2 ( f (c)] = c
f 3 [ f (b)] = b, f 3 [ f (c)] = c
Compute (i ) f −1 g ( x ) (ii ) h . f (g f −1 y ). (h . f ( x )
1
Where f ( x ) = x + 2, g ( x ) = 2
, h (x) = 3
x +1
Q y=x+2 ⇒ x=y−2
⇒ f −1 ( y ) = y − 2
1 1 1 − 2x 2 − 2 − (2x 2 + 1)
(i) f −1 [ g ( x )] = f −1 2 = 2 − 2= =
x + 1 x + 1 x2 + 1 x2 + 1
(ii) h { f (g f −1 ( y )} . {h f ( x )}
= h f (g ( y − 2) h f ( x )
1 1
=h f 2 h ( x + 2), Let =t
( y − 2) + 1 ( y − 2)2 + 1
= h f (t ) h ( x + 2)
= h (t + 2) 3
= 3. 3 = 9.
106 Discrete Mathematical Structures
Example 33: Show that the function f and g both of which are from N × N to N given by f ( x, y ) = x + y and
g ( x, y ) = xy are onto but not one-one. [U.P.T.U. (B.Tech.) 2003]
Then f ( x1 , y1 ) = f ( x 2, y 2 ). But x1 ≠ x 2, y1 ≠ y 2
Hence f is not one-one mapping
Again, g ( x, y ) = xy
Let x1 , y1 , x 2, y 2 ∈ N
and g( x1 , y1 ) = g( x 2, y 2 )
⇒ x1 y1 = x 2 y 2
It not necessarily x1 = x 2 and y1 = y 2
e.g. if x1 = 1, y1 = 5, x 2 = 5, y 2 = 1
Then g ( x1 , y1 ) = g ( x 2, y 2 )
But x1 ≠ x 2 and y1 ≠ y 2
Onto f is defined as f ( x, y ) = x + y
Since every element of N can be written as the sum of two elements of N. There will be no element in the
co-domain that does not have pre-image in domain. Hence it is onto. Similarly g is also onto.
Fig. 3.12
Find gof : X → Z [P.T.U. (B.E.) Punjab 2007]
Hence, gof = { p, s, p, q}
Functions 107
f = {(1, 2), (2, 3), (3, 1)} g = {(1, 2), (2, 1), (3, 3)}
h = {(1, 1), (2, 2), (3, 1)} s = {(1, 1), (2, 2), (3, 3)}
Solution: gof = {( x, x ): x ∈ R } = g [ f ( x )] = g ( x + 2) = x + 2 − 2 = x
fog = {( x, x ): x ∈ R } = f [ g ( x )] = f ( x − 2) = x − 2 + 2 = x = gof
fof = {( x, x + 4): x ∈ R } = f [ f ( x )] = f ( x + 2) = x + 4
= f [ h ( x − 2)]
= f [ 3 ( x − 2)]
= 3 ( x − 2) + 2 = 3x − 4
Example 37: Prove that the number of functions from A → A is less than number of relations from A → A
2
i.e. nn < 2n [U.P.T.U. (M.C.A.) 2004-2005]
⇒ (k + 1) < 2. 2k
⇒ (k + 1) < 2k +1
Thus, n < 2n ∀ n ∈ N
Example 38: If A is finite set and f : A → A1 is a one-one function, then f is onto also.
Solution: Let A = {a1 , a2, a3 K an} be finite set. Since f is a one-one function f (a1 ), f (a2 ) K f (an ) are all n
distinct elements of the set A. But A has only n elements.
Therefore, A = { f (a1 ), f (a2 ) K f (an )}
It means co-domain of f = Range of f . Therefore f is onto function.
Example 39: List all possible functions from X = {a, b, c} to Y = {0, 1} and indicate in each case whether the
function is one to one, is onto is one to one onto. [U.P.T.U. (B.Tech.) 2006]
f1 = {(a, 0), (b, 0), (c, 0)}, f 2 = {(a, 1), (b, 1), (c, 1)}
f 3 = {(a, 0), (b, 0), (c, 1)}, f 4 = {(a, 1), (b, 1), (c, 0)}
f 5 = {(a, 0), (b, 1), (c, 1)}, f 6 = {(a, 1), (b, 0), (c, 0)}
f7 = {(a, 0), (b, 1), (c, 0)}, f 8 = {(a, 1), (b, 0), (c, 1)}
3
The total number of function from X → Y is 2 = 8
The functions f 3 , f 4 , f 5, f7 , f 8 are onto functions. No functions is one-one and no function is one-one onto.
Functions 109
Fig. 3.13
Example 40: Let N be the set of natural numbers including zero. Determine which of the following functions
are one-to-one, which are onto and which are one-to-one onto.
1 if j is odd
(i) f : N → N , f ( j) = j2 + 2 (ii) f : N → N , f ( j) =
0 if j is even [U.P.T.U. (B.Tech.) 2006]
2
Solution: (i) For each value of j ∈ N its image f ( j) = j + 2 ∈ N
If j = a1 , a2 ∈ N , then f (a1 ) = a 12 + 2 and f (a2 ) = a22 + 2
As a1 ≠ a2 then a 12 + 2 ≠ a22 + 2
There exists value of f ( j) = 0, 1 for which the pre images (− 2), (− 1) does not belong to N
(ii) All odd value of j ∈ N have the same image (1) ∈ N . So f is not one-one
Example 41: Let f : R → R and g : R → R , where R be the set of real numbers. Find fog and gof , where
f ( x ) = x 2 and g ( x ) = x + 4 . State whether these functions are injective, surjective and bijective.
[U.P.T.U. B.Tech.) 2005]
Solution: We have
( fog ) x = f [ g ( x )] = f ( x + 4) = ( x + 4)2
(gof ) x = g [ f ( x )] = g [ x 2] = x 2 + 4
110 Discrete Mathematical Structures
f (− 1) = 1
The function f ( x ) = x 2 is not one-one (injective) as
f (1) = 1
It is not onto surjective because corresponding to negative values of f ( x ), the value of x shall be imaginary
and does not belong to R.
The function g ( x ) = x + 4 is one-one (injective). It is also onto (surjective) and hence it is bijective
(one-one and onto).
The function ( fog ) x = ( x + 4)2 is not one-one (injective) as for x = ± i ∉ R , the value of fog ( x )will be same.
It is also not onto (surjective) because corresponding to negative value of fog ( x ) ∈ R , there will not be a
value of x ∈ R .
The function (gof ) x = x 2 + 4 is not one-one (injective) as for x = ± i the value of (gof ) x will be the same. It
is not one-one (surjective) because corresponding to negative values of (gof ) x, the values of x shall be
imaginary ∉ R.
Example 42: Show that if f ( x ) is a function defined by f ( x ): N − {1} → N where f ( x ) is highest prime
factor of x, then f is
(i) not a one-one function (ii) not a onto function
Solution: (i) f (10) = highest prime factor of 10 = 5
f (15) = highest prime factor of 15 = 5
f (20) = highest prime factor of 20 = 5
Therefore f is a many-one function and is not a one-one function.
(ii) Again image of x ∈ N − {1} = the largest prime number that divide x = a prime number. Therefore the
range of f is a set of prime numbers. It means the range of f ≠ N so the function f is not an onto
function.
Example 43: Let f : R → R be a function defined by f ( x ) = px + q ∀ x ∈ R . Also fof = I R , find the values of p
and q. [Pune (B.E.) 2004, 2008; Delhi (B.E.) 2007; P.T.U. (B.E.) Punjab 2005, 2009]
Solution: ( fof ) x = I R ( x )
⇒ f ( f ( x )) = x
⇒ f ( px + q) = x
⇒ p ( px + q) + q = x
2
⇒ p x + pq + q − x = 0
⇒ x ( p2 − 1) + pq + q = 0 ∀ x ∈ R
⇒ p2 − 1 = 0 and pq + q = 0
⇒ p = ± 1 and q ( p + 1) = 0
⇒ p = 1 and q = 0 or p = − 1 and q is any real value.
Hence, either (i) p = 1 and q = 0 or (ii) p = − 1 and q = any real value.
Functions 111
Example 44: If f : A → B and g : B → A are two functions such that gof = I A , then f is
(i ) injective (one-one)
(ii) g is surjective [Rohtak (M.C.A.) 2005, 2009; Kurukshetra (B.E.) 2007]
Solution: Let x, y ∈ A
Then f (x) = f (y )
⇒ g ( f ( x )) = g ( f ( y ))
⇒ (gof ) x = (gof ) y
⇒ I A (x) = I A (y )
⇒ x=y
g ( y ) = g [ f ( x )] = (gof ) x = I A ( x )
⇒ g is onto.
Example 45: Composition of function is commutative. Prove the statement or give counter example.
[U.P.T.U. (B.Tech.) 2009]
or
Show that the function f ( x ) = x 3 and g ( x ) = x1 / 3 for all x ∈ R are inverse to one another.
and (gof ) x = g [ f ( x )] = g [ x 3 ] = x
1 1
Example 46: If f ( x ) = x 3 – , find the value of f ( x )+ f
x3 x
1
Solution: We have f ( x ) = ( x 3 – )
x3
3
⇒
1
1
f = –
1 = 1 – x 3
3
x x 3
1 x
x
1 1 1
Hence, f ( x ) + f = x 3 – 3 + 3 – x 3 = 0.
x x x
112 Discrete Mathematical Structures
1 + x x+ y
Example 47: If f ( x ) = log , show that f ( x ) + f ( y ) = f .
1 – x 1 + xy
1 + x
Solution: We have f ( x ) = log ...(1)
1 – x
1 + y
and f ( y ) = log ...(2)
1 – y
1 + x 1 + y
∴ f ( x ) + f ( y ) = log + log
1 – x 1 – y
1 + x 1 + y 1 + x + y + xy
= log = log
1 – x 1 – y 1 – x – y + xy
x+ y
1 +
x+ y 1 + xy 1 + x + y + xy
∴ f = log = log
1 + xy x+ y 1 + xy – x – y
1 –
1 + xy
x+ y
∴ f (x)+ f (y ) = f
1 + xy
1 1
Example 48: If f ( x ) = x 2 – , show that f ( x )+ f = 0
x 2 x
1 1 1 1
Solution: We have f ( x ) = x 2 – Put x = , we get f = 2 – x 2
x 2 x x x
1 1 1
∴ f (x)+ f = x 2 – 2 + 2 – x 2
x x x
=0
3x + 1
Example 49: If y = f ( x ) = , prove that f ( y ) = x
5x – 3
1 + x 2x
Example 50: f ( x ) = log , Show that f = 2 f (x)
1– x 1 + x 2
1 + x
Solution: We have f ( x ) = log
1– x
2x
1 + 2
x 2 = log 1 + 2x + x = log 1 + x = 2 log 1 + x = 2 f ( x ).
2
2x 1 +
∴ f = log
1 + x
2
1 – 2x
2
1 – 2x + x 1 – x 1 – x
1 + x2
Functions 113
f (x) = x – 1 and g( x ) = 4 – x 2 ,
Solution:
(i) We have, f ( x ) = x – 1 , g( x ) = 4 – x 2
∴ ( f – 2g )x = f ( x )– 2g( x ) = x – 1 – 2 4 – x2
(ii) We have, f ( x ) = x – 1 , g( x ) = 4 – x 2
∴ ( fg )x = ( fog )x = f [ g( x )] = f 4 – x2 = 4 – x2 – 1
Now ( fof )x = f [ f ( x )] = f ( x ) = x
∴ ( fog ) y = f [ g( y )] = f [ y 2] = y2– 1
1 x –1
Example 54: If f ( x ) = and g( x ) = . Find the value of g [ f ( x )].
1– x x
1 x –1
Solution: We have f ( x ) = , g( x ) =
1– x x
1
–1
1 1– x 1+ x –1 1– x
Then g[ f ( x )] = g = = × =x
1 – x 1 1– x 1
1– x
x–3
Example 55: Define composite function. Let f : N → R s.t f ( x ) = 2x – 3 and g : Z → R s.t g( x ) = , then
2
find formula for gof : N → R .
(2x – 3)– 3
Solution: We have (gof )x = g[ f ( x )] = g[ 2x – 3] = = x–3
2
114 Discrete Mathematical Structures
f f (x) 1 + x 2
Solution: We have x = = , ∀x ∈ R .
g g( x ) 1 – x
1
Example 59: Find the domain of the function. f ( x ) = + x + 2.
log10 (1 – x )
1
Solution: Let f ( x ) = g( x ) + h( x ), where g( x ) = and h( x ) = x+2
log10 (1 – x )
The function g( x ) defined for all real value of x for which 1 – x > 0 and x ≠ 0 i.e., x < 1 and x ≠ 0.
∴ Domain ( f ) =] – ∞, 1[–{0}
Again, h( x ) is defined for those real value of x for which x + 2 ≥ 0 i.e., x ≥ – 2
∴ Domain h( x ) = [–2, ∞ [
Now domain f = domain ( f + g )= domain ( f ) ∩ domain (g)
=] – ∞, 1[–{0} ∩ [–2, ∞[ = [–2, 1 – {0}]
cos–1 x
Example 60: Find the domain of the function. f ( x ) =
[ x]
g( x )
Solution: Let f ( x ) = , where g( x ) = cos–1 x and h( x ) = [ x] then,
h( x )
Find (i) (gof )(–5/ 3)– ( fog )(–5/ 3) (ii) (gof )(5/ 3)– ( fog )(5/ 3)
Solution: We have
(gof )( x ) = g[ f ( x )] = g([ x]) = [ x]
( fog )( x ) = f [ g( x )] = f ( x ) = [ x ]
Functions 115
Hence, all the required composite functions are defined and the domain of each is R. Now
(i) (gof )x = g[ f ( x )] = g( x 2 – 1) = 3( x 2 – 1) + 1 = 3x 2 – 2
(ii) ( fog )x = f [ g( x )] = g(3x + 1) = (3x + 1)2 – 1 = 9 x 2 + 6 x
(iii) ( fof )x = f [ f ( x )] = f ( x 2 – 1) = ( x 2 – 1)2 – 1 = x 4 – 2x 2
(iv) (gog )x = g[ g( x )] = g[ 3x + 1] = 3(3x + 1) + 1 = (9 x + 4)
π
Then show [ ho(gof )] x = 0 if x =
2
Solution: [ ho(gof )] x = h[(gof )x]
π
= h[ g ( f ( x ))] = h[ g ( x 2 )] = h (tan x 2 ) = log tan x 2 = log tan = log 1 = 0
4
( fog ) x = f [ g( x )] = f ( x 2 – 2) = 2( x 2 – 2) + 1 = 2x 2 – 4 + 1 = 2x 2 – 3
∴ (gof ) ≠ fog
Then, find (gof )x and ( fog )x and show that (gof ) x ≠ ( fog )x
Solution: (gof )x = g[ f ( x )] = g[ cos x] = (cos x )3 = cos3 x
Again ( fog ) x = f [ g( x )] = f [ x 3 ] = cos x 3
Q ( fog ) x ≠ (gof )x
116 Discrete Mathematical Structures
Example 66: Let f : A → A and g: A → A be two function defined on set A = {1, 2, 3, 4, 5} such that
f (1) = 3, f (2) = 5, f (3) = 3, f (4) = 1, f (5) = 2 . And g(1) = 4, g(2) = 1, g(3) = 1, g(4) = 2, g(5) = 3 find fog and gof .
Solution: Here f (1) = 3 ⇒ gof = g[ f (1)] = g(3) = 1 f (2) = 5 ⇒ gof = g[ f (2)] = g(5) = 3
f (3) = 3 ⇒ gof = g[ f (3)] = g(3) = 1 f (4) = 1 ⇒ gof = g[ f (4)] = g(1) = 4
f (5) = 2 ⇒ gof = g[ f (5)] = g(2) = 1 g(1) = 4 ⇒ fog = f [ g(1)] = f (4) = 1
Exercise
1. Let f ( x ) = (2x + 5) and g( x ) = x 2 + 1. Describe
(i) gof (ii) fog (iii) fof (iv) ff
x –1
2. If f ( x ) = , when x ≠ 1 and x ≠ –1. Show that ( fof –1 ) is an identify function.
x +1
1
3. If f ( x ) = x – 1 and g( x ) = . Describe
x
(i) c (ii) f –g
(iii) c (iv) f / g, find the domain in each case.
1
4. If f ( x ) = . Show that f [ f ( f ( x )] = x
1– x
x
5. Find the domain of the function f ( x ) =
x 2 – 3x + 2
1
6. Find the domain and range of f ( x ) = 2
x –1
1 – tan x
8. If f ( x ) = , show that f (cos θ ) = tan 2(θ / 2)
1 + tan x
2x – 1
9. If y = f ( x ) = , prove that f ( y ) = x
5x – 2
3x – 1, when x ≥ 1
12. If f ( x ) = then find f (0) and f (2)
– x, when x < 1
14. Let R be the set of all real number and f : R → R be function such that f ( x ) = sin x, x ∈ R and
g( x ) = x 2, x ∈ R . Then show gof = fog.
5
g : R → R be such that g = 1
4
Then, show that gof : R → R be a constant function.
1
17. If f : R → R where f ( x ) = x 2 + 2 and g : R → R where g( x ) = 1 – , then find
1– x
(i) fog (ii) gof
x
18. Show that f : R – {–1} → R – {1} given by f ( x ) = is invertible. Also find f –1 .
x +1
19. What do you mean by a function? Are y 2 = 4ax and x 2 = 4ay functions? Explain.
20. Defined the relation and function. What is the difference between a function and relation?
22. Explain with example that every function is a relation but every relation is not a mapping.
24. Consider the function f : R → R given by f ( x ) = x 3 + 1 . Prove that f is one-to-one and maps R onto R.
25. If f : N → N is defined by
2n if n is even
f (n) = Show that f is one to one.
n if n is odd
26. Let A = {1, 2, 3} and B = {a, b, c, d}. In each case, state whether the given function is injective,
surjective, bijective
(i) f = {(1, a), (2, d ), (3, b)} (ii) g = {(1, a), (2, a), (3, d )}
(iii) h = {(1, a), (2, b)}
118 Discrete Mathematical Structures
27. Determine which of the following are one-to-one, which are onto and which are one-to-one onto:
(i) f :N→ N f (x) = x 2 + 2 (ii) f :N→ N f ( x ) = x (mod 3)
1, x is odd
(iii) f :N→ N f (x) =
0, x is even
29. Let f = {(1, − 1), (4, − 2), (9, − 3), (16, 4)} and g = {(− 1, − 2), (− 2, − 4), (− 3, − 6), (4, 8)} show that gof
is defined while fog is not defined. Also, find (gof ).
30. Composition of functions is commutative. Prove the statement or give counter example.
[U.P.T.U. (B.Tech.) 2009]
31. Define bijection mapping. Let h be a set of points in the co-ordinate diagram of E × F which is
function of E into F.
(i) If the horizontal line contains at most one point h, what type of function h?
(ii) If each horizontal line contains at least one point of h, what type of function is h?
[U.P.T.U. (B.Tech.) 2005]
32. Let Fx be the set of all one-to-one mapping from X onto X, where X = {1, 2, 3}. Find all the elements
of Fx and find the inverse of each element.
[U.P.T.U. (B.Tech.) 2007]
Answers
–1 x 3x 2 – 4 x + 2 x2 + 2
16. f (x) = 17. (i) (ii)
1 – x (1 – x )2
x2 + 1
It is the function in which the definition of function refers to itself. This definition must have the following
properties so that it may not be circular.
(i) There must be certain arguments called Base Values for which the function does not refer to itself.
(ii) Each time the function refers to itself, the argument of function must be closure to a base value.
This definition is recursive since it refers to itself, 0 is the base value of the function
3 ! = 3. 2 ! K Level (1)
1 ! = 1 . 0 ! K Level (3)
It is called Fibonacci Function. Here value of Fn are defined in terms of smaller values of n that are closer
to the base values 0 and 1.
120 Discrete Mathematical Structures
Solution: an = 1 if n = 0 or a° = 1 and an +1 = a . an or an = a an −1
All these functions are initial functions. The initial function provides an infinite set of functions from
which other function can be built up by using the following strategies.
(i) Composition: If f is an n-ary function and g1 , g 2, K g n are k-ary functions, then f (g1 , g 2, g 3 , K g n )
is a k-ary function, where f (g1 , g 2, K g n )( x1 , x 2, K x k ) = f (g1 ( x1 , x 2, K x k ) K g n ( x1 , x 2 K x k ).
(ii) Primitive Recursion: Let g : N n → N and h : N n + 2 → N be functions. We can say that
f : N n +1 → N is defined from g and h by primitive recursion if f satisfies the conditions
f ( x1 , x 2, K x n, 0) = g ( x1 , x 2, K x n )
and f ( x1 , x 2, K x n, y + 1) = h ( x1 , x 2 K x n, y, f ( x1 , x 2 K x n, y )]
where y is inductive variable. Hence,
A function f is said to be Primitive Recursive if it can be obtained from the initial functions by a finite
number of operations of composition and recursion.
122 Discrete Mathematical Structures
Example 69: Show that the function f ( x ) = k, where k is constant, is primitive recursive function.
[U.P.T.U. (B.Tech.) 2005]
Example 70: Show that the function f < x, y > = x − y is partial recursive. [U.P.T.U. (B.Tech.) 2003]
Solution: Since every element of a domain maps to at most one element of the co-domain. Now, the
predecessor function.
p(0) = 0 , p ( y + 1) = y = U12
which is recursive function and from it the subtraction is
f ( x, 0) = x = U11 , f ( x, y + 1) = p ( f ( x, y )) = g ( x, y, f ( x, y ))
where g ( x, y, z ) = p (z ) = U 33
⇒ f is partial recursive function
1 if n is 1
n
g (n) = 1 + g if n is even
2
g (3n − 1) if n is odd and n > 1
Example 75: Show that the proper subtraction is primitive recursive and hence prove that 5 − 3 = 2.
Solution: We have P (0) = 0
P ( y + 1) = y = ∪ 12 ( y, P ( y ))
f ( x, y + 1) = P ( f ( x, y ) = g ( x, y, f ( x, y )
where g ( x, y, z ) = P (z ) = ∪ 33 ( x, y, z )
Example 76: Show that the function x ! is primitive recursive, where 0 ! = 1 and n ! = n * (n − 1)!
Solution: Let f ( x ) = x, then
f (0) = 0 ! = 1 = S (0)
and f ( x + 1) = ( x + 1)!
= ( x + 1) ∗ x !
= ( x + 1) ∗ f ( x )
124 Discrete Mathematical Structures
= x ∗ f (x) + f (x)
= ∪12 ( x, f ( x )) ∗ ?
= ∪ 22 ( x, f ( x )) + ?
= ∪ 22 ( x, f ( x )
Since the sum (+ ) and product (*) are primitive recursive, f ( x ) is primitive recursive.
| 3x 3 + 2x + 7| ≤ | 2| x 3|
Solution: The function f and g referred to in the definition of o-notation are defined as follows. For all
real number x
f ( x ) = x 2 + 2x + 1 and g ( x ) = x 2
For all real number x > 1
| x 2 + 2x + 1| = x 2 + 2x + 1 as x 2 + 2x + 1 > 0 for x > 1
≤ x 2 + 2x 2 + x 2
≤ 4x2
≤ 4| x 2|
Therefore, | f ( x )| ≤ 4| g ( x )| for all x > 1
Let C = 4, K = 1
⇒ | f ( x )| ≤ C | g ( x )| ∀ x > K
Hence, x 2 + 2x + 1 is o ( x 2 ).
Functions 125
Exercise
@ Recursively Defined
1. Show that the proper subtraction is primitive recursive and hence prove that 5 − 3 = 2 .
1 if x = y
7. Consider the function f ( x, y ) = show that this function is primitive function.
0 if x ≠ y
1
f (n) = f (n / 2) if n is even
1 + f (5n − 9) if n is odd and n > 1
show that f is not well defined.
13. Give big-oh estimates for the factorial function and the logarithm of the factorial function and the
logarithm of the factorial function where the factorial function an = n !is defined by n ! = 1, 2, 3, K n .
126 Discrete Mathematical Structures
14. What do you mean by recursively defined function? Give an example. [U.P.T.U. (M.C.A.) 2008]
15. Show that the function f ( x ) = k, where k is constant is primitive recursive. [U.P.T.U. (B.Tech.) 2005]
16. What is meant by a recursively defined function? Give the recursive definition of factorial
function. [U.P.T.U. (B.Tech.) 2002, 2006]
Answers
5. ( x + y )( xy + y ) 6. 3 ( x + y + z )2 + x − y + z
4. Total number of injective mappings from a set with m elements to a set with n elements, m < n is
n!
(a) mn (b) nm (c) (d) n!
(n − m)!
5. Let A be a set containing 10 distinct elements, then the total number of distinct functions from A
to A is
(a) 10 ! (b) 1010 (c) 210 (d) 210 − 1
10. Let X = {1, 2, 3}, Y = {a, b, c} then which of the following functions is a constant function f : X → Y
(a) f1 = {(1, a), (2, a), (3, a)} (b) f 2 = {(1, a), (2, a), (3, b)}
(c) f 3 = {(2, a), (3, b), (1, c)} (d) none of these
(a) 7 (b) 35
(c) 14 (d) none of these
7. f : N → N , f ( x ) = 3x + 1 is surjective.
2. Max { x, – x} is ......... .
1 + x 1+ b
4. If f ( x ) = ln then f is .......... .
1 − x 1 + ab
Answers
Multiple Choice Questions
1. (d) 2. B = C = E = F, A = D = G = H 3. (d) 4. (c) 5. (b)
6. T 7. F 8. F
5. 9 6. [ 4, 6] 7. x 2 cos x 2 8. {–2, – 3}
❏❏❏
Natural Numbers 129
The most basic mathematical system is the set N (natural number) of positive integers. The positive integer
can be defined by a set of axioms, known as Peano’s Axioms.
P1 There exists a natural number 1 i.e. 1 ∈ N
P2 There exists an injective mapping f : N → N . If n ∈ N then f (n) = n + 1 Successor of n
P3 There exists no number n ∈ N such that f (n) = 1
P4 If A be any subset of N such that 1 ∈ A and n ∈ A
⇒ f (n) ∈ A, then A = N
Remark
1. Axiom P1 asserts that N is non-empty.
2. Axiom P2 asserts that f (m) = f (n) ⇒ m = n
3. Axiom P3 asserts that the natural number 1 is a non-successor
4. Axiom P4 leads to the important principle known as the Principle of Mathematical Induction
Let P (n) be a statement involving the natural number n. To prove that P (n) is true for all natural number
n ≥ a, we proceed as follows:
Solution: For n = 1
L.H.S. = 1 . 2. 3 = 6
1
R.H.S. = (1 . 2. 3. 4) = 6
4
So, L.H.S. = R.H.S.
∴ (1) is true for n = 1 ...(2)
Assume (1) is true for n = k
i.e. 1 . 2. 3 + 2. 3. 4 + 3. 4 . 5 + K + k (k + 1)(k + 2)
1
= k (k + 1)(k + 2)(k + 3) ...(3)
4
Natural Numbers 131
Now for n = k + 1
L.H.S. = 1 . 2. 3 + 2. 3. 4 + K + k (k + 1)(k + 2) + (k + 1)(k + 2)(k + 3)
1
= k (k + 1)(k + 2)(k + 3) + (k + 1)(k + 2)(k + 3) (using 3)
4
1
= (k + 1)(k + 2)(k + 3)(k + 4)
4
= R. H. S. for n = k + 1 ...(4)
Hence (1) is true for all n ∈ N .
Solution: For n = 1
L.H.S. of (1) = 1
n (n + 1) 1 . (1 + 1)
R.H.S. of (1) = = =1
2 2
So, L.H.S. = R.H.S.
∴ (1) is true for n = 1 ...(2)
Assume (1) is true for n = k
k (k + 1)
i.e. 1 + 2+ 3+ 4 + K+ k = ...(3)
2
Now for n = k + 1
L.H.S. = 1 + 2 + 3 + 4 + K + k + (k + 1)
= (1 + 2 + 3 + 4 + K + k ) + (k + 1)
k (k + 1)
= +k+1 (from (3))
2
k 2 + k + 2k + 2 k (k + 1) + 2 (k + 1) (k + 1)(k + 2)
= = =
2 2 2
= R.H.S. for n = k + 1 ...(4)
Hence, (1) is true for all values of n ∈ N
Solution: For n = 1
L.H.S. of (1) = (1)2 = 1
n (n + 1)(2n + 1) 1 (1 + 1)(2 + 1) 6
R.H.S. of (2) = = = =1
6 6 6
So, L.H.S. = R.H.S.
∴ (1) is true for n = 1
132 Discrete Mathematical Structures
Solution: For n = 10
L.H.S. of (1) = 210 = 1024
Example 5: To show that any positive integer n greater than or equal to 2 is either a prime or a product of
primes. [U.P.T.U. (B.Tech.) 2004; U.P.T.U. (M.C.A.) 2008]
Solution: For n = 2, since 2 is prime, the statement is true. Assume that the statement is true for any
integer n,
2≤ n ≤ k
For the integer n = k + 1, if k + 1 is a prime, then the statement is true. If k + 1 is not a prime, then k + 1
cannot be written as pq, where p ≤ k and q ≤ k . According to the induction hypothesis, p is either a prime or
a product of primes. Also, q is either a prime or a product of primes. Consequently, pq is a product of
primes.
Natural Numbers 133
Prove that for all n ≥ 1, n3 + 2n is a multiple of 3 . [U.P.T.U. (B.Tech.) 2007; M.K.U. (B.E.) 2004, 2007, 2009]
= k 3 + 3k 2 + 3k + 1 + 2k + 2
= k 3 + 3k 2 + 5k + 3
= k 3 + 2k + 3k + 3k 2 + 3
= (k 3 + 2k ) + 3 (k 2 + k + 1)
134 Discrete Mathematical Structures
is divisible by 3.
∴ P (2) is true
Assume P (k ) is true for n = k
∴ P (k ) = k 4 − 4k 2 is divisible by 3
Now, for n = k + 1
P (k + 1) = (k + 1)4 − 4 (k + 1)2
= k 4 + 4k 3 + 6k 2 + 4k + 1 − 4k 2 − 8k − 4
= k 4 + 4k 3 + 2k 2 − 4k − 3
= k 4 − 4k 2 + 4k 3 + 6k 2 − 4k − 3
= k 4 − 4k 2 + 3 (2k 2 − 1) + 4k 3 − 4k
= k 4 − 4k 2 + 3 (2k 2 − 1) + 4k (k 2 − 1)
= (k 4 − 4k 2 ) + 3 (2k 2 − 1) + 4k (k − 1)(k + 1)
14243 14243 14442444 3
(i ) (ii) (iii)
∴ P (1) is true
Assume n = k i.e. P (k ) = k 2 + k is even number ...(2)
P (k + 1) = (k + 1)2 + (k + 1)
= k 2 + 2k + 1 + k + 1
= (k 2 + k ) + 2 (k + 1) ...(3)
1424 3 1424 3
(i) (ii )
Example 10: Show that n (n2 − 1) is divisible by 24, where n is any odd positive integer.
P (k + 2) = (k + 2)[(k + 2)2 − 1]
= (k + 2){k 2 + 4k + 3}
= (k + 2)(k + 3)(k + 1)
= k (k + 1)(k + 3) + 2 (k + 1)(k + 3)
= k (k + 1)(k − 1 + 4) + 2 (k + 1)(k + 3)
= k (k + 1)(k − 1) + 4k (k + 1) + 2 (k + 1)(k + 3)
= k (k 2 − 1) + 4k (k + 1) + 2 (k + 1)(k + 3)
= k (k 2 − 1) + 2k [ 2 (k + 1) + (k + 3)]
= k (k 2 − 1) + 2 (k + 1)(3k + 3)
= k (k 2 − 1) + 6(k + 1)2
Now, 6 (k + 1)2 is divisible by 24 for all odd n and k (k 2 − 1) is divisible by 24 by induction hypothesis.
Solution: For n = 1
L.H.S. of (1) = (1)4 = 1
R.H.S. of (1) = 101 = 10
∴ 1 < 10
⇒ n4 < 10n
L.H.S. = R.H.S. ...(2)
4 k
Assume the result for n = k i.e. k < 10 ...(3)
is true.
For n = k + 1 then show (k + 1)4 < 10( k +1 )
L.H.S. = (k + 1)4 = k 4 + 4k 3 + 6k 2 + 4k + 1 from (3)
< 10k + 4k 3 + 6k 2 + 4k + 1
< 10k + 10 [Q 4k 3 + 6k 2 + 4k + 1 ≥ 10]
(k + 1)4 < 10k +1 for k ≥ 1
Hence result is true for all n ≥ 1
∴ n4 < 10n V n ≥ 1
Solution: For n = 1
1 1
L.H.S. = =
1 .4 4
1 1
R.H.S. = =
3+ 1 4
Now for n = k + 1
1 1 1 1
L.H.S. = + +K+ +
1 . 4 4 .7 (3k − 2)(3k + 1) [ 3 (k + 1) − 2][ 3 (k + 1) + 1]
k 1
= +
3k + 1 [ 3 (k + 1) − 2][ 3 (k + 1) + 1]
k 1
= +
3k + 1 (3k + 1)(3k + 4)
k
= = R. H. S. ...(4)
3k + 4
= 49n + 24n −1
= 49 . 49k + 24k
= 25[ 49 m − 24k −1 ]
Solution: For n = 2
L.H.S. = (1 + x )2 = 1 + 2x + x 2 > 1 + 2x ...(2)
For n = k + 1 we have
(1 + x )k +1 = (1 + x )(1 + x )k from (3)
> (1 + x )(1 + kx )
= 1 + (k + 1) x + kx 2
n
n + 1
Example 16: | n < for n > 1, n ∈ N
2
for n = 2
2
3 9
L.H.S. = 2, R.H.S. = =
2 4
So L.H.S. < R.H.S.
∴ The results is true for n = 2 ...(1)
Assume the result for n = k i.e.
k
k + 1
| k < ...(2)
2
For n = k + 1, we have to show
k +1
k + 2
|(k + 1) <
2
k
k + 1
|(k + 1)= (k + 1) | k < (k + 1) ...(3)
2
(k + 1)( k + 1 )
= (from 2)
2k
∴ It is sufficient to prove
k +1
(k + 1)( k +1 ) k + 2
<
2k 2
Natural Numbers 139
k +1 k +1
k + 2 1
i.e. = 1 +
k + 1 k + 1
2
1 1
= 1 + (k + 1) + (k + 1)C 2 +K
k + 1 k + 1
1 − an +1
1 + a + a2 + a3 + K + an = when n ≥ 0
1−a
1 − an +1
Solution: Let P (n) = 1 + a + a2 + K + an = ...(1)
1−a
For n = 0, P (0) = 1 ⇒ P (0) is true
For n = 1,L.H.S. of (1) = 1 + a
1 − a2 (1 − a)(1 + a)
R.H.S. of (1) = = =1 + a
1−a (1 − a)
L.H.S. = R.H.S.
⇒ P (1) is true
Assume n = k i.e. P (k ) is true
1 − ak +1
i.e. P (k ) = 1 + a + a2 + K + ak = ...(2)
1−a
= (1 + a + a2 + K + ak ) + ak +1
1 − ak +1
= + ak +1 [from (2)]
1−a
1 − ak +1 + ak +1 − ak + 2 1 − ak + 2
= =
(1 − a) (1 − a)
(− 1)k −1 k (k + 1)
= + (− 1)k (k + 1)2 [from (2)]
2
1
= (− 1)
k −1
(k 2 + k ) + 2 (− 1)k (k 2 + 2k + 1)
2
1
= (− 1)k (k + 1)(k + 2) = R. H. S. of (1)
2
Hence (1) is true for n = k + 1 ∴ (1) is true for all n ≥ 1.
Example 19: If A be the set with n elements, show that power set of A has 2n elements.
Solution: Let P (n) be the statement that a set with n elements has exactly 2n subsets. i.e. P (n) = 2n
For n = 1 then P (1) = 21 = 2 i.e. if A = {a1 } then its only subsets is φ and {a1 }. Hence P (1) is true
Assume that P (k ) is true i.e. the set A = {a1 , a2, K ak } has 2k subsets.
Now the subset of A containing (k + 1) elements can be divided into two categories.
(i) Subsets not containing (2k + 1) and this number is 2k by induction hypothesis.
(ii) Subsets containing ak +1 which can be represented as {ak +1 }, {a1 , ak +1 }, {a2, ak + 2}, K {a1 , a2, . . . ak +1 }
and this number is 2k .
Thus the number of subsets of A = The number of subsets not containing ak +1 + The number of subsets
containing ak +1 = 2k + 2k = 2k +1 which is P (k + 1)
Example 20: If x and y denote any pair of real numbers for which 0 < x < y, prove by induction method
0 < x n < y n for all natural numbers n.
But ak +1 = ak + ak −1
or 2 ak +1 = 2k ak + 2k ak −1
k
= 2 (2k −1 ak ) + 22 (2k − 2 ak −1 )
Therefore, 2k +1 −1 ak +1 = 2k ak +1 = 2k ak + 2k ak −1 = 2 . k + 22 (k − 1)(mod 5 )
= (k + 1) mod (5)
Thus, P (k + 1) is true. Hence P (n) is true for all n
Example 22: The nth fibonacci number denoted by Fn is related by the reccurance relation
Fn+1 = Fn + Fn−1 , n ≥ 2 and F1 = F2 = 1
Solution: Let P (n) be the statement that the inequality is true for all positive integer n.
For n = 1, P (1) is true, since 1 ≤ 1
In this case it is also useful to verify P (2) directly i.e.
(1 + 5)
1≤
2
which holds true because 5 is greater than 1.
We assume that P (n) is true for all n = 1, 2, 3 K k
(1 + 5)
i.e. Fk ≤ t k −1 , Fk −1 ≤ t k − 2 and let t = and we observe that t is one of the solution of the
2
equation
x 2 − x − 1 = 0, we have t 2 − t − 1 = 0
i.e. t2 =t + 1
we want to prove that P (k + 1) is true. Now
Fk +1 = Fk + Fk −1 ≤ t k −1 + t k − 2
= t k − 2 (t + 1)
= tk−2 t2 = tk
which shows that P (k + 1) is true
Hence, by mathematical induction P (n) is true for n ≥ 2 .
Example 23: Using mathematical induction find a general formula on the basis of observations of the
following statements:
13 = 1
23 = 3 + 5
33 = 7 + 9 + 11
43 = 13 + 15 + 17 + 19
[P.T.U. (B.E.) Punjab 2004; Delhi (B.E.) 2007; R.G.P.V. (B.E.) Bhopal 2001, 2009;
Kurukshetra (B.E.) 2007; M.K.U. (B.E.) 2005, 2009]
3
Solution: Let P (1) = 1 = 1
P (3) = 33 = (7 + 9 + 1)
Hence by induction
P (n) = n3 = (n2 − n + 1) + {(n2 − n + 1 + 2}
Example 24: Prove that the sum of the cubes of three successive natural numbers is divisible by 9.
Solution: We have 13 + 23 + 33 = 36 divisible by 9, so the statement is true if the first of three successive
numbers is 1.
Assume that the sum
m3 + (m + 1)3 + (m + 2)3 , where m is some natural number is divisible by 9
i.e. m3 + (m + 1)3 + (m + 2)3 = 9k ...(1)
where k is a positive integer
Again the sum
(m + 1)3 + (m + 2)3 + (m + 3)3 = (m + 1)3 + (m + 2)3 + m3 + 9m2 + 27 m + 27
= 9k + 9 (m2 + 3m + 3) (from 1)
2
= 9 (k + m + 3m + 3) which is divisible by 9
Therefore, by mathematical induction the statement is proved.
= a [ bk + λ (a − b)] − bk . b [from 1]
k k
= b (a − b) + aλ (a − b) = (a − b)(b + aλ )
⇒ P (k + 1) is also divisible by a − b
Thus, P (k + 1) is divisible by a − b if P (k ) if divisible by (a − b). Therefore by mathematical induction an − bn
is divisible by (a − b) for all positive integers n.
For n = 2 ⇒ P (2) = x 2 − y 2 = ( x + y )( x − y )
⇒ P (2) is divisible by ( x + y )
Let x k − y k = ( x + y ) f ( x, y ) ...(1)
Again x k + 2 − y k + 2 = x k + 2 − x k y 2 + x k y 2 − y k + 2 = x k ( x 2 − y 2) + y 2 ( x k − y k )
= ( x + y ) [ x k ( x − y ) + y 2 f ( x, y )] [from (1)]
⇒ x k + 2 − y k + 2 is divisible by ( x + y )
Solution: For n = 1
L.H.S. of (1) = 1, R.H.S. of (1) = (1)2 = 1
L.H.S. = R.H.S.
∴ (1) is true for n = 1 ...(2)
Assume (1) is true for n = k
i.e. 1 + 3 + 5 + K + (2k − 1) = k 2 ...(3)
Now for n = k + 1
L.H.S. of (1) = 1 + 3 + 5 + K + (2k − 1) + (2k + 1)
= k 2 + 2k + 1 (from 3)
Now for n = k + 1
L.H.S. of (1) = 1 .1 ! + 2. 2 ! + K + k . k ! + (k + 1). (k + 1)!
= {(k + 1)! − 1} + (k + 1). (k + 1)!
= (k + 1)![1 + (k + 1)] − 1
= (k + 2)(k + 1)! − 1
= (k + 2)! − 1
= R. H. S. ...(4)
Hence (1) is true for all n ∈ N .
Natural Numbers 145
Exercise
@ Mathematical Induction
1. Show that 13 + 23 + 33 + K + n3 = (1 + 2 + 3 + K + n)3
12 22 n2 n (n + 1)
2. Show that + +K+ =
1 . 3 3. 5 (2n − 1)(2n + 1) 2 (2n + 1)
1 1 1 1 n
3. Show that + + +K+ =
1 . 2 2. 3 3. 4 n (n + 1) (n + 1)
1 1 1 n
4. Show that + +K+ =
1 . 3 3. 5 (2n − 1)(2n + 1) 2n + 1
5. It is know that for any positive integer n ≥ 2
1 1 1
+ +K+ − A > 0 , where A is constant. How large can A be?
n+1 n+ 2 2n
(2n)! 1
9. Prove that ≤ for all positive integer n.
22n (n !)2 (3n + 1)
1
2
1 1 1 13
+ +K+ > , n > 1, V n ∈ N
n+1 n+ 2 2n 24
n
2 2n
16. Show that 1 + ≥ 1 + V n ≥ 1.
3 3
17. Using mathematical induction show that for all positive integer n
(vii) 3n > n3 for each integer n ≥ 4 (viii) Show that 4n > 3n for all n ≥ 0
a (rn +1 − 1)
a + ar + ar2 + K + arn = for n = 0, 1, 2, K
r −1
19. Prove that 52n − 1 is divisible by 24 where n is positive’ integer. [R.G.P.V. (B.E.) Bhopal 2003, 2005]
n
(ii) ∑ r . ncr = n . 2n −1
r=0
(ii) P (n) is true for n = k + 1 assuming that the statement is true for n0 ≤ n ≤ k then the statement is true
for all n ≥ n0
Remark: This is powerful form of mathematical induction because in order to prove that the statement is
true for n = k + 1. We are allowed to make a stronger (ii)
We consider that P is true, and from the available information the conclusion q is shown to be true by valid
reference. In this methods of proof we construct a chain of statements P , P1 , P2, K Pn K q where P is either a
hypothesis of the theorem or an axiom and each to the implications p ⇒ p1 ,p1 ⇒ p2 K pn ⇒ q is either an
axiom or is implied by the implication preceding it.
Example 28: If a and b are odd integer, then a + b is an even integer. [U.P.T.U. (M.C.A.) 2008]
Example 29: Prove that product of two odd integers is an odd integer. [U.P.T.U. (B.Tech.) 2005]
Let a and b be two odd integers, then there exist two integers m and n such that
a = 2m + 1, b = 2n + 1
∴ ab = (2m + 1)(2n + 1) = 4 mn + 2m + 2n + 1 = 2 {2 (mn) + (m + n)} + 1 which is odd.
Example 30: Prove that for every positive integer n, n3 + n is even if n is even. [U.P.T.U. (B.Tech.) 2003]
Consider the hypothesis p, if x is an even integer then by definition of even integer x = 2k for some integer k
∴ x 2 = (2k )2 or x 2 = 4k 2 is clearly divisible by 2
Therefore x 2 is an even integer. Thus p → q.
Example 32: If a number such that x 2 − 7 x + 12 = 0, then show that x = 3, x = 4 by direct proof.
Solution: We have x 2 − 7 x + 12 = 0
⇒ x 2 − 7 x + 12 = ( x − 3)( x − 4) = 0
⇒ ( x − 3) = 0 or ( x − 4) = 0
∴ x − 3 = 0 ⇒ x = 3, x − 4 = 0 ⇒ x = 4
∴ x = 3 or x = 4.
Solution: Since | x| > | y| then | x|2 > | y|2 But | x|2 = x 2,| y|2 = y 2
Hence x2 > y2
This method of proof is very useful and a powerful at all levels of the subject mathematics. Indirect method
follows from the tautology
( p ⇔ q) ⇔ ((− q) ⇒ (~ p))
This states that the implication p ⇒ q is equivalent to ~ q ⇒ ~ p. To prove p ⇒ q indirectly, we assume that q
is false and then show that p is false.
More Generally, to prove the validity of an argument with premises p1 , p2, K pn and conclusion q by
indirect method, we consider second argument with premises
~ q, p1 , p2, K pi −1 , pi +1 , K pn
and conclusion ~ pi and prove the validity of this second argument.
Example 34: For any integer n > 2, prove that n prime ⇒ n odd. [U.P.T.U. (M.C.A.) 2008]
If n is even number greater then 2, then n = 2 k for some integer k > 1. Then n is divisible by 2 and n ≠ 2,
therefore n cannot be prime. Thus we have ~ q ⇒ ~ p
i.e. if n is any number bigger than 2, then n cannot be prime.
q : x is an even integer
let ~ q is true, then x cannot be even integer, therefore x must be odd, x is of the form
x = 2 k + 1 for some integer k
∴ x = 2k + 1 ⇒ x 2 = (2k + 1)2
⇒ x 2 = 4k 2 + 2k + 1
= 2 (2k 2 + k ) + 1
Let 2k 2 + k = n, ⇒ x 2 = 2n + 1 is odd
Thus we have ~q ⇒~ p
Hence, by contraposition x is even.
Solution: We will take as premises for the indirect proof all given premises except ~ s and the negation of
conclusion ~ r i.e. we shall show that the following argument is valid.
p
p ∧ q→ r ∨ s
q
~r
s
Now p
premises
q
p ∧ q a conclusion because p ∧ q → q ∧ p is always a tautology.
Now, p ∧ q a valid conclusion
q ∧ p a premise
r ∨ s a valid conclusion by modus ponens
~ r a premise
s a valid conclusion because (r ∨ s ) ∧ ~ r → s is tautology.
150 Discrete Mathematical Structures
8 p∨ s premise
{8} 9 s
10 s (~ s ) = F
1 q→ r premise
2 ~r premise
{1, 2} 3 ~q p → q, ~ q ⇒ ~ q
4 p→ q premise
{3, 4} 5 ~p p → q, ~ q ⇒ ~ q
6 p∨ r premise
{5, 6} 7 r
8 r ∧ (~ r) = f
1 V x [ D10 ( x ) → D 2 ( x )] premise
3 V x [ D 2 ( x ) → D 3 ( x )] premise
4 D 2 (b) → D 3 (b) ∪S
6 V x [ D10 ( x ) → D 3 ( x )] conclusion
Example 40: Show that 2 is not rational number. [U.P.T.U. (B.Tech.) 2004]
p
Solution: Let us consider 2 is rational. Then we can find integers such that = 2
q
where p and q have no common factor after cancelling the common factors squaring on both sides
p2
=2
q2
⇒ p2 = 2q2
⇒ p2 is even
⇒ pis even
⇒ p = 2 k for some integer k
⇒ (2k )2 = 2q2
⇒ 4k 2 = 2q2
⇒ q2 = 2k 2
⇒ q is even
∴ p and q have common factor of 2
which is contradiction to the statement that p and q have no common factors. Thus 2 is irrational.
Example 41: Suppose that the integers 1, 2, 3, 4 K 10 are randomly positioned around a circular wheel.
Show that sum of same set of 3 consecutively positioned numbers is at least 15.
Solution: (Proof by Contradiction)
Let ai = the number of position i on the wheel.
152 Discrete Mathematical Structures
a1 + a2 + a3 ≥ 15
a + a + a ≥ 15
2 3 4
M M M
a4 + a5 + a6 ≥ 15
...(1)
M M M
a + a + a ≥ 15
7 8 9
M M M
a + a + a ≥ 15
10 1 2
where a1 + a2 + a3 + K + a10 = 1 + 2 + 3 + 4 + K + 10
a1 + a2 + a3 < 15
a + a + a < 15
2 3 4
3
a + a 4
+ a5
< 15
M M M M
a10 + a1 + a2 < 15
a1 + a2 + a3 ≤ 14
a2 + a3 + a4 ≤ 14
M M M M
a10 + a1 + a2 ≤ 14
Adding we get
3 (a1 + a2 + a3 + K + a10 ) ≤ 10 × 14
⇒ 3 × (1 + 2 + 3 + K + 10) ≤ 140
10 (10 + 1) n (n + 1)
⇒ 3. ≤ 140 Σ n =
2 2
⇒ 3 × 5 × 11 ≤ 140
Example 42: Prove or disprove the statement. If x and y are real number
( x 2 = y 2) ⇔ ( x = y ) [U.P.T.U. (B.Tech.) 2004]
Example 43: Prove that the statement ‘‘if n is an integer, then n2 − n + 41 is prime number’’ is false.
[U.P.T.U. (M.C.A.) 2005]
2 2
Solution: If n = 41 then n − n + 41 = (41) which is not prime. Hence the statement is false.
4.8.1 Consistent
A collection of statements is consistent if the statement can all be true simultaneously.
H1 ∧ H 2 ∧ H 3 K ∧ H n
has the truth value T for some assignment of the truth values to the atomic variables appearing in
H1 , H 2, H 3 , K H n. And a set of formulae H1 , H 2, H 3 K H n is said to be inconsistent if their conjunction
H1 ∧ H 2 ∧ H 3 K ∧ H n ⇒ S ∧ (~ S ) (a contradiction)
We use notion of inconsistency in the method of proof called proof by contradiction (or indirect
proof). We now begin our discussion by setting the following two rules of inference.
Equivalence
E1 : ~(~ p) ⇔ P
E 2: P ∧ Q ⇔ Q ∧ P
E 3: P ∨ Q ⇔ Q ∨ P
E 4 : (P ∨ Q ) ∨ R ⇔ P ∨ (Q ∨ R )
E 5: (P ∧ Q ) ∧ R ⇔ P ∧ (Q ∧ R )
E 6 : P ∧ (Q ∨ R ) ⇔ (P ∧ Q ) ∨ (P ∧ R ) (Distributive laws)
E7 : P ∨ (Q ∧ R ) ⇔ (P ∨ Q ) ∧ (P ∨ R ) (Distributive laws)
E 8 : ~(P ∧ Q ) ⇔ (~ P ) ∨ (~ Q )
E 9 : ~(P ∨ Q ) ⇔ ~ P ∧ (~ Q )
E10 : P ∨ P ⇔ P
E11 : P ∧ P ⇔ P
E12: R ∨ (P ∧ (~ P )) ⇔ R
E13 : R ∧ (P ∨ (~ P )) ⇔ R
E14 : R ∨ (P ∨ (~ P )) ⇔ T
E15: R ∧ (P ∧ (~ P )) ⇔ F
E16 : P → Q ⇔ (~ P ∨ Q )
E17 : ~(P → Q ) ⇔ P ∧ (~ Q )
E18 : P → Q ⇔ ~ Q → ~ P
E19 : P → (Q → R ) ⇔ (P ∧ Q ) → R
E 20 : ~(P → Q) ⇔ P → (~ Q )
← ←
Natural Numbers 155
Solution
1 P Assumed
2 P→Q Rule P
4 S → Q P
5 Q → S P→Q → Q → P
←
6 S (3), (5)
7 R∨S P
8 R → S P→Q → P ∨ Q
←
9 S→ R P→Q → Q → P
←
10 R (6), (9)
11 R → Q P
12 Q (10), (11)
13 Q ∧ Q (3), (12)
Inconsistent
Solution: 1 P→Q P
2 Q → P T, (1)
3 Q P
4 P T, (2), (3)
Solution: 1 (P ∧ Q ) P
2 P ∨Q ∴ (P ∧ Q ) ⇔ P ∨ Q
3 P→Q ∴ P → Q ⇔ P ∨Q
4 Q ∨ R P
5 Q→R
7 R P
8 P Q, P → Q ⇒ P
156 Discrete Mathematical Structures
Exercise
@ Methods of Proof
1. Give a direct proof that if a and b are odd integers then a + b is even.
2. Prove by direct method
If x and y are rational numbers than x + y is rational.
3. Prove the using direct method
(i) Sum of two even integers is an even integer.
(ii) Sum of an even integer and an odd integer is an odd integer.
(iii) Product of an even integer and an odd integer is an even integer.
5. Prove that 3 is not a rational number (Prove by Contradiction). [U.P.T.U. (M.C.A.) 2004]
7. If a real number x is such that | x| > 5, then x 2 > 25 (give the proof by cases).
8. Prove by using contra positive method. If x 2 is an odd integer, then x is an odd integer.
[U.P.T.U. (M.C.A.) 2004]
9. Disprove the proposition (by counter-example) for every integer x there is an integer y where
y 2 = x. [M.K.U. (B.E.) 2004, 2007]
10. Find counter example if a > b then a2 > b2. [Delhi (B.E.) 2008]
(i ) p → q′ (ii) p (iii) p
r′ → q′ q q
p → r′ ~ p→ r p ∧ q→ r ∨ q
q→ ~r p ∧ q→ r ∧ q
~r r
p→ q
~p
~q
13. State and prove Peano‘s Axiom. Also show how its minimal property forms the basis for
mathematical induction? [U.P.T.U. (B.Tech.) 2005]
14. Prove using contrapositive that if x 2 − 4 < 0, then − 2 < x < 2 . [P.T.U. (B.E.) Punjab 2007]
Natural Numbers 157
3. e is
(a) natural number (b) rational number
(c) irrational number (d) integer
4. The value of 12 + 22 + 32 + K + n2 is
n(n + 1) n(n – 1) n(n + 1)(n + 1)
(a) (b) (c) (d) none of these
2 2 6
3. Set N of natural numbers is closed under the operation of subtraction but not under the operation of
division.
5. Cancellation laws in N, for both additive and multiplicative operation hold good.
6. 32n − 1 is divisible by 8 V n ∈ N
1 1 1 1 n
7. + + +K+ = , V n ∈ N.
1 . 2 2. 3 3. 4 n (n + 1) n + 1
158 Discrete Mathematical Structures
3. If a and b are add integers, then a+b is an .......... . [U.P.T.U. (M.C.A.) 2008]
5. n distinct straights lines drawn in a plane through a point divide the plane into .......... parts.
6. Suppose x, y, u, v are four real numbers such that x + y = u + v and x 2 + y 2 = u 2 + v 2 then
x n + y n = . . . . . . . . . . V n ∈ N.
Answers
Multiple Choice Questions
1. (b) 2. (c) 3. (d) 4. (c) 5. (a)
❑❑❑
Unit-2
C hapter
5. : Algebraic Str uctures
Algebraic Structures 161
Illustrations:
1. Addition ‘ + ’ is a binary operation on the set N of natural numbers. The sum of two natural
number is also a natural numbers. Therefore N is closed with respect to addition, i.e. a + b ∈ N V
a, b ∈ N . This operation of addition is binary over the sets I, Q , R and C also.
2. The usual operation of Subtraction ‘–’ is a binary operation over the sets I, Q , R , and C but it is
not binary in N because 5–8 = −3 ∈
/ N whereas 5 ∈ N, 8 ∈ N. Thus N is not closed with respect to
subtraction.
3. Let A be the set of all (n × n) matrices over the field R of real numbers. The operation of addition
and Multiplications of matrices in A are binary over A because the sum and product of two (n × n)
matrices in again a matrix of order (n × n).
Illustration:
Let ‘ o’ be a binary operation on the set R of real number defined by the rule
a o b = a + 2b V a, b ∈ R , then
(a o b)oc = (a + 2b)oc = (a + 2b) + 2c
and a o (b o c) = a o (b + 2c) = a + 2(b + 2c) = a + 2b + 4c
Thus (a, o b)o c =/ a o(b o c) .
Hence above rule is not Associative in R
162 Discrete Mathematical Structures
5.2 Algebraic Structure [M.K.U. (B.E.) 2002, 2005, 2009; P.T.U. (B.E.) Punjab 2004]
A non-empty set G equipped with one or more binary operations is called on algebraic structure.
Let symbols ∗ , + , . , o , ⊕, ∪, ∩, ∨, ∧ etc. denote binary operations on a set G. Then (G, ∗ ), (G, ⊕ ),
(G, ∗ , o, ∨, ∧ ) etc. are algebraic structure. (N , + ), (I, + ), (I, –), (R , + ), (R , + , . ) are all algebraic structures
addition (+) and multiplication (• ) are both binary operation on the set R of real numbers. Therefore
(R , + , . ) is on algebraic structures, equipped with two operation.
5.2.1 Semi-Group
[R.G.P.V. (B.E.) Bhopal, U.P.T.U. (B.Tech.) 2008; M.K.U. (M.C.A.) 2004, 2008, M.K.U. (B.E.) 2007, 2009]
Let G be a non-empty set and ∗ be a binary operation on G. (G, ∗ ) is said to be semi group if the operations is
∗ is associative.
OR
(G, ∗ ) is a semi group, if
(i) x ∗ y ∈ G for all x, y in G, and (ii) ( x ∗ y ) ∗ z = x ∗ ( y ∗ z ) for all x, y, z ∈ G
A semigroup (M, ∗) with an identity element with respect to the operation ∗ is called monoid.
OR
An algebraic system (M, ∗) is called a monoid, if
(i) M is closed with respect to ∗ i.e. if x, y ∈ M , then x ∗ y ∈ M .
(ii) ∗ is an associative operation i.e. for any x, y, z ∈ M ,
x ∗ ( y ∗ z ) = ( x ∗ y ) ∗ z.
(iii) Existence of identity element i.e. there exists a element e ∈ M such that
e ∗ x = x ∗ e = x for any x ∈ M .
Illustration : Let S be any non-empty set. Consider the power set P(S) together with the operation ∪ of union
of two sets, then ( P (S ), ∪ ) is a monoid with empty φ as identity element.
Algebraic Structures 163
Illustration: Let M = {0, 1, 2, 3. . . n − 1}, Let + n and x n denote the operation of addition modulo n and
multiplication modulo n respectively. Then (M , + n ) and (M , × n ) both are monoids. 0 and 1 are the identity
elements with respect to the operations + n and × n respectively.
Example 2: Let (A, ∗) be a semi group. Furthermore, for every a and b in A, if a ≠ b, then a ∗ b ≠ b ∗ a.
(i) Show that for every a ∈ A , a ∗ a = a.
(ii) Show that for every a, b ∈ A , a ∗ b ∗ a = a. [R.G.P.V. (B.E.) Bhopal 2004; U.P.T.U. (B.Tech.) 2007]
(iii) Show that for every a, b, c ∈ A.
a ∗ b ∗ c = a ∗ c.
Solution: By tautology we know that p ⇒ q ≡ ~ q
⇒ ~ p, where q and p are propositions.
= a ∗[ b∗ (a ∗ a)]
= a ∗ (b ∗ a)[Q a ∗ a=a] ...(3)
From (2) and (3), we have
a∗ (a∗ b∗ a) = (a∗ b∗ a)∗ a
∴ a∗ b∗ a = a . [by (1)] ...(4)
(iii) For any a, b, c ∈ A, we have
a ∗ b, c ∈ A and a, b ∗ c ∈ A [by closure property]
⇒ (a ∗ b) ∗ c ∈ A and a ∗ (b ∗ c) ∈ A [by closure property]
⇒ (a ∗ b) ∗ c = a ∗ (b ∗ c) [by associativity]
⇒ (a ∗ b) ∗ c = a ∗ (b ∗ c) = a∗ b∗ c∗ ∈ A
⇒ (a ∗ c) ∗ (a ∗ b ∗ c) = (a ∗ c) ∗[ a ∗ (b ∗ c) = [(a ∗ c)) ∗ a] ∗ (b ∗ c) [by associativity]
= (a ∗ c ∗ a) ∗ (b ∗ c) [by associativity]
= a ∗ (b ∗ c) [using (4)]
= a ∗[ b ∗ (c ∗ a ∗ c)] [using (4)]
= a ∗[(b ∗ c)] ∗ (a ∗ c) [by associativity law]
= [ a ∗ (b ∗ c)] ∗ (a ∗ c) [by associativity law]
= (a ∗ b ∗ c) ∗ (a ∗ c).
∴ a ∗ b ∗ c = a ∗ c.
Example 3: Prove that (A,+) is a semi-group where A be the set of all positives even integers and + be the
ordinary addition operation. [R.G.P.V.) (B.E.) Bhopal 2006]
5.3 Group [R.G.P.V. (B.E.) Bhopal 2006; 2009; U.P.T.U. (B.Tech.) 2006, 2007; Rohtak (B.E.) 2007, 2009]
An algebraic structure (G, ∗ ) where G is a non-empty set and ‘ ∗ ’ is a binary operation defined on G, is called
a group if the binary operation ∗ satisfies the following postulates (group axioms):
(2) Associativity: The binary operation ∗ is associative i.e., if a, b, c. are the elements of G then
(a ∗ b) ∗ c = a ∗ (b ∗ c) V a, b, c ∈ G
Algebraic Structures 165
(4) Existence of Inverse: For each element a ∈ G , there exists an element of G called the inverse
of a and denoted by a–1 such that
a–1 ∗ a = e = a ∗ a–1 , where e is the identity element for ∗.
Note 1: If we use the additive notation ‘ + ’ to denote the composition in G, then the inverse of an element a ∈ G
is denoted by the symbol –a i.e.,
(–a ) + a = 0 = a + (–a )
Note 2: If we use the multiplicative notation ‘ . ’ to denote the composition in G, then often we denote the
identity by the symbol ‘1‘, Thus 1 is an element of G such that
1 . a = a = a. 1 V a ∈ G
In multiplicative notation, we often denote the inverse of a by 1 /a. Thus 1/a is an element of G such that.
1 1
. a = 1 = a⋅
a a
In addition notation, we often denote the identity by the symbol ‘0’. Then 0 is an element of G such that
0 + a = a = a + 0.
Note 3: In addition notation, the element a + (–b) ∈ G is denoted by a − b. In multiplicative notation the
element a ⋅ b–1 ∈ G is denoted by a/b.
166 Discrete Mathematical Structures
Illustration: If N is the set of natural number, the set (N , + ) is a groupoid because the set N is closed with
respect to addition (sum of two natural number is a natural number). Thus 2+7=9 ∈ N.
Illustration: The set G = (–2, – 1, 0, 1, 2) is not a groupoid with respect to addition operation ‘ + ’ because
(–2) + (–1) = –3 ∈G
/ i.e. set G is not closed under additive operation.
(α ⋅ β ). γ = [(a + b 2 )⋅ (c + d 2)] ⋅ (e + f 2)
= [(ac + 2bd ) + (ad + bc) 2 ]. (e + f 2)
= α ⋅ (β ⋅ γ ).
Hence associative law is satisfied.
Example 4: Let A = {a, b}, which of the following tables define a semi group?. Which define a monoid on A.
[U.P.T.U. (B.Tech.) 2005]
∗ a b ∗ a b ∗ a b
a b a a b b a a b
b a b b a a b b a
b ∗ a = a and b ∗ b = b
Hence (i) is semi group as well as monoid.
(ii) Again (ii) table satisfied closure and associativity and there is no identity. Hence it is
semigroup but not monoid.
(iii) We have from (iii)
(a) Closure: Since all entries in composition table are in A. Hence closure property satisfied.
(b) Associativity: Since there are only two element in the set A. Hence associativity always
satisfied.
(c) Identity: V element of A there exist a, b, ∈ A such that identity of A.
Therefore, it is semi group as well as monoid.
Example 5: Show that the set I of all integers (Positive or negative including zero), i.e,
I = (. . . . , – 4, – 3, – 2, – 1, 0, 1, 2, 3, 4 . . . )
is an infinite abelion group with respect to the operation of addition of integers.
[Delhi (B.E.) 2004, 2006, 2009]
Example 6: The set of all rational number Q forms an infinite abelian group with respect to addition
composition.
Solution: Q = { p/q, where p and q are prime integers and q ≠ 0} is abelian group, if
1. Closure Property: By the definition of addition of rational numbers we know that the sum of
two rational number is also a rational number. Therefore closure is satisfied.
2. Associative Law: Let (P1 /q1 ), (P2/q2 ), (P3 /q3 ), be any three rational numbers. Then
p1 p p p1 p2q3 + q2 p3 p1 q2q3 + q1 p2q3 + q1 q2 p3
+ 2 + 3 = + =
q1 q2 q3 q1 q2 q3 q1 q2 q3
p1 p2 q3 + q1 q2 q3 p3 p1 p2 p3
= + = + +
q1 q2 q3 q3 q1 q2 q3
Therefore commutativity is also satisfied, since the underlying set Q is an infinite set, hence
(Q , + ) is an infinite abelian group.
Algebraic Structures 169
Example 7: Show that the set of all (m × n) matrices having their elements as integers (rational or real or
complex number) is an infinite abelian group with matrix addition as the composition.
[U.P.T.U. (M.C.A.) 2003]
Solution: Let M is the set of all (m × n) matrices with their elements as real number. The M formed infinite
abelian group if group with matrix addition as the composition.
1. Closure Property: Let A and B be two matrices of order (m × n) and A, B ∈ M . Then A + B ∈ M
because, the sum of two matrices of the same type is a matrix of the same type. Thus
M is closed with respect to matrix addition.
A = [ aij ]m × n, B = [ bij ]m × n, C = [C ij ]m × n
∴ A + (B + C ) = [ aij ]m × n + {[ bij ]m × n + [C ij ] m × n}
= (A + B)+ C
Thus the operation of addition of matrices is associative in the set of matrices.
4. Existence of Inverse: Let (– A ) ∈ M then A ∈ M where (– A) is the matrix whose elements are the
negative of the corresponding elements of A.
Also A + (– A ) = (– A ) + A = O [Null matrix of the type (m×n)]
Thus matrix (– A ) is the inverse of matrix A.
A + B = [ aij ]m × n + [ bij ]m × n
= [ bij ]m × n + [ aij ]m × n
=B+ A
2. Associative Law: The element of G are rational numbers and the addition of rational number
is associative.
3. Existence of Left Identity: We have 0+ 2 ⋅ 0 ∈G since 0 ∈Q.
If a + 2b is any element of G, then
(0 + 2 ⋅ 0) + (a + 2b ) = (0 + a) + 2(0 + b) = a + 2 b.
∴ 0 + 2 ⋅ 0 is the left identity
4. Existence of Left Inverse: Let a + 2 b ∈ G, then a + 2b ∈ G ∃ (– a)] + 2 (– b) ∈ G
[ a, b ∈ Q ⇒ – a, – b ∈ Q ]
such that [(– a) + 2(– b)] + [ a + 2b] = [(– a) + a] + 2[(– b) + b] = 0 + 2. 0
= the identity
∴ (– a) + 2 (– b) is the inverse of a + 2b.
Hence, G is a group with respect to addition.
Example 9: Show that the set of all integers I forms a group with respect to the binary operation ' * ' defined
by the rule.
a∗ b = a + b + 1 V a, b ∈ I.
Solution: I formed group if
1. Closure Property: Let a, b ∈ I, then
a ∈ I, b ∈ I ⇒ a + b + 1 i . e. , a ∗ b ∈ I
Therefore I is closed with respect to the operation ‘ ∗ ’
2. Associativity: If a, b, c ∈ I, then
(a ∗ b) ∗ c = (a + b + 1) ∗ c = (a + b + 1) + c + 1 = a + b + c + 2
and a ∗ (b ∗ c) = a ∗ (b + c + 1) = a + (b + c + 1) + 1 = a + b + c + 2
∴ (a ∗ b) ∗ c = a ∗ (b ∗ c) V a, b, c ∈ I
3. Existence of Left Identity: An element e ∈ I will be the left identity, if
e ∗ a = a V a ∈I
Now e∗a=e+ a+1
e + a + 1 = a ⇒ e = –1
Hence –1 ∈ I is the identity in I.
Algebraic Structures 171
= Aα +β ∈ G [Q α , β ∈ R ⇒ α + β ∈ R ]
Hence, closure property is satisfied.
2. Associativity: We know that for all 2×2 matrices, matrix multiplication satisfies associative
law
3. Existence of Identity: Since 0 ∈ R, Therefore
cos 0 – sin 0 1 0
A0 = =G
sin 0 cos 0 0 1
Since –α ∈ R
Thus, each element of G possesses inverse
Example 11: The set P (S ) of all possible subset of a non-empty set S under the composition ‘ ∗’ defined by the
rule. [Rohtak (B.E.) 2005; P.T.U. (B.E.) Punjab 2008]
( A ∗ B ) = A ∪ B V A ⊆ S, B ⊆ S .
Solution:
1. Closure Property
Since A ⊆ S, B ⊆ S ⇒ A ∪ B ⊆ S
⇒ A ∪ B ∈ P (S )
Therefore P (S ) is closed with respect to the given composition.
2. Associativity: We know that the union of sets always obey associative law i.c.
A ∪ (B ∪ C ) = ( A ∪ B ) ∪ C .
Therefore, no member of P (S ) can be the left inverse of A. Thus P (S ) is not a group but it is a monoid
under the given composition.
Example 12: Show that the set of cube roots of unity is an abelian group with respect to multiplication.
Solution: Cube roots of unity are obtained by solving the following equation:
x3 – 1 = 0
⇒ ( x − 1)( x 2 + x + 1) = 0
–1 ± (1 – 4) –1 1
⇒ x = 1, x = = ± i 3
2 2 2
(–1) i 3 (–1) i 3
∴ G = 1, + , – .
2 2 2 2
(–1) i 3 1 i 3
If we put + = ω, then – – = ω 2 and ω 3 = 1
2 2 2 2
∴ G = {1, ω, ω 2}.
Now we form a composition table.
Algebraic Structures 173
. 1 ω ω2
1 1 ω ω2
ω ω ω2 1
ω2 ω2 1 ω
Here ω ω 2 = ω 3 = 1 and ω 2ω 2 = ω 4 = ω 3 ω = 1 ω = ω
1. Closure Property: Since all the entries in the composition table are the elements of the G,
thus G is closed with respect to multiplication.
2. Associativity: Since the element of G are all complex number and we know that the
multiplication of complex number is associative because.
(1. ω ). ω 2 = 1. (ω. ω 2 )etc.
4. Existence of Inverse: From the composition table, we find that 1.1=1 (identity)
Therefore, the inverse of the element 1 ∈G is 1 itself, i.e.
ω. ω 2 = ω 2 ⋅ ω = 1
∴ ω –1 = ω 2 ∈G and (ω 2 )–1 = ω ∈G
Thus, the inverse of every element of G is in G.
5. Commutative Law: We know that the multiplication of complex number is commutative.
The number of element in the set G is 3. Therefore G is an abelian group of order 3 with respect
to multiplication.
Example 13: Show that the set four fourth roots of unity (namely 1,–1, i, –i) forms an obelian group with
respect to multiplication. [ U.P.T.U. (B.Tech.) 2008]
Solution: Let x = 11 / 4 ⇒ x 4 – 1 = 0
⇒ ( x 2 + 1)( x 2 – 1) = 0
⇒ x = 1, – 1, i , – i
∴ G = { 1, – 1, i , – i }
1. Closure Property: Since all the entries in the composition table are the element of the set G.
Therefore the set G is closed with respect to the multiplication and the operation of
multiplication is binary in G.
2. Associativity: The element of G are all complex numbers and the multiplication of complex
numbers obeys associative law i.e.
(1 . i ). (–i ) = 1 . [i (–i )] = 1
(1 . i ). (–1) = 1 .[i (–1)] = i etc.
Therefore, the given composition is associative in G.
3. Existence of Left Identity: From the composition table we see that the row headed by 1 just
coincides with the top row of the composition table. Thus we have
1(1) = 1, 1(–1) = – 1, 1 (i ) = i , 1(–i ) = – i
In other words, there exists an element
1 ∈G such that 1. a = a V a ∈ G
Therefore 1 is the left identity.
4. Existence of Left Inverse: We know that the identity element is its own inverse. From the
composition table, it is clear that
(1)–1 = 1 ; (–1)–1 = –1 ; (– i )–1 = i and (i )–1 = –i
1 0 –1 0 1 0 –1 0
Solution: Let A= ,B= ,C = and D =
0 1 0 1 0 –1 0 –1
1 0 1 0 1 + 0 0 + 0 1 0
Now A. A = = = = A.
0 1 0 1 0 + 0 0 + 1 0 1
Algebraic Structures 175
Similarly, B. B = A; C . C = A; D. D = A.
Similarly A. C = C ; A. D = D B B A D C
Similarly, finding all the possible products we from the composition table as C C D A B
given alongside. D D C B A
1. Closure Property: Since all the entries in the composition table are the elements of the set G,
therefore G is closed with respect to the multiplication of matrices.
2. Associativity: We know that the multiplication of (2 × 2)matrices obey associative law i.e. for
A, B, C , ∈ G.
( A. B ). C = B. C [Q A. B = B] [Q B. C = D]
=D
and A. (B. C ) = A . D.
=D
Therefore ( A. B. ). C = A. (B. C ) [Q B. C = D]
3. Existence of Left Identity: From the composition table we find that the row headed by the
element A just coincides with the top row of the composition table, therefore matrix A is left identity
element, because
A. A = A; A. B = B; A. C = C ; A. D = D
4. Existence of Left Inverse: From the composition table, it is clear that the left inverse of A is A, i.e.,
A –1 = A; B –1 = B; C –1 = C and D –1 = D
Hence, in the column headed by C we find that the left identity A occurs in the row headed by C
i.e., C . C = A. Therefore the left inverse of C is C and also the left inverse of D is D.
Therefore G is a group with respect to multiplication.
5. Commutative Law: The entries is the Ist, IInd, IIIrd and IVth rows of the composition table
coincide with the corresponding entries of the Ist, IInd, IIIrd and IVth columns. Therefore
composition in G is commutative. Since the number of elements in the set G is 4, therefore G is a
finite abelian group of order 4.
Example 15: Show that the set of n-nth roots of unity form a finite abelian multiplicative group of order n.
Solution: We have
(1)1 / n = (1 + 0 i )1 / n
Putting r = 0, 1, 2, 3, K n − 1 we get the n-nth roots of unity. Thus if G is the set of n-nth roots of unity, then
G = {1, e2πi/ n, e4 πi/ n, e6 πi/ n, . . . e[2( n–1 )πi]/ n}
or G = {1, ω, ω 2, ω 3 K ω n–1 } where ω = e2πi / n and ω n = 1.
1. Closure Property: Let a, b ∈ G , then both a and b are n − nth roots of unity. Therefore an = 1 and
bn = 1 .
2. Associativity: The elements of G are all complex numbers and the multiplication of complex
numbers is associative.
3. Existence of Left Identity: We have 1 ∈G and
1. a = a V a ∈ G
Therefore 1 is the left identity.
4. Existence of Left Inverse: The left inverse of 1 is 1. if ω r , 1 ≤ r ≤ n − 1, is any element of G, then
ω n– r is also an element of G such that
ω n− rω r = ω n = 1 [Q ω nth root of unity]
Theorem 1: Uniqueness of the identity element. The identity element in a group is unique.
Proof: Let e and e1 be two identity element of group G.
Then, we have
ee1 = e1 if e is the identity and ee1 = e if e1 is the identity.
But ee1 is an unique element of G. Therefore ee1 = e and ee1 = e1 ⇒ e = e1
Hence the identity is unique.
Theorem 3: If the inverse of an element ‘ a’ in a group is a–1 , then the inverse of a–1 is a, i.e, (a–1 )–1 = a
[U.P.T.U. (B.Tech.) 2004, U.P.T.U. (M.C.A.) 2001, 2002, 2005]
Theorem 4: Reversal law of inverse in groups. The inverse of the product of two element of a group is the
product of the inverse taken in the reverse order. [U.P.T.U. (B.Tech.) 2004]
= b–1 b [Q eb = b]
=e [from 2] ...(4)
From (3) and (4), we find
(ab)(b–1 a–1 ) = e = (b–1 a–1 )(ab).
Therefore, by the definition of inverse, we see
(ab)–1 = b–1 a–1
Remark: If the group is commutative, then (ab)–1 = a–1 b–1 , Since b–1 a–1 = a–1 b–1
Proof: Let a, b ∈ G and e be the identity element then a ∈ G ⇒ ∃ a–1 ∈ G such that a–1 a = aa–1 = e
Then a ∈ G, b ∈ G ⇒ a–1 ∈ G and b ∈ G
⇒ a–1 b ∈ G [by closure property]
Similarly, b ∈ G, a ∈ G ⇒ b ∈ G and a–1 ∈ G
⇒ ba–1 ∈ G [by closure property]
Now ax = b and ya = b
⇒ a (ax ) = a–1 b and ( ya)a–1 = ba–1
–1
[multiplying both side by a–1 ]
⇒ (a–1 a)x = a–1 b and y(aa–1 ) = ba–1 [by associative law]
–1 –1
⇒ ex = a b and ye = ba [Q a–1 a = e = aa–1 ]
⇒ x = a–1 b and y = ba–1 [Q ex = x, ye = e]
⇒ x = a–1 b is a solution of the equation ax = b and y = ba–1 is a solution of the equation ya = b
Now we shall show the uniqueness of the solutions. Let us suppose, if possible let x1 , x 2 be the two values
of x satisfying the equation ax = b and y1 , y 2 be the two values of y satisfying the equation ya = b. Then
ax1 = b, ax 2 = b and y1 a = b, y 2a = b
∴ ax1 = ax 2 ⇒ x1 = x 2 [by left cancellation law]
and y1 a = y 2a ⇒ y1 = y 2 [by right cancellation law]
Hence, the solution are unique.
Algebraic Structures 179
Where r is a least non-negative remainder when ordinary addition a + b, is divided by m. The remainder r
has got the value 0 ≤ r ≤ (m − 1). Therefore V a, b, ∈ G ⇒ a + m b ∈ G and so G is closed with respect to the
composition addition modulo m.
2. Associativity: Let a, b, c ∈ G arbitrarily. Then
a+ m(b + m c) = a + m(b + c) [Since b + m (= b + c)mod. m]
= The least non-negative remainder when a + (b + c) is divided by m
= The least non-negative remainder when (a+b)+c is divided by m
[Since a + (b + c) = (a + b) + c]
=(a + b) + m c [by the definition of + m ]
= (a + m b) + m c [Since a + b ≡ a + m b (mod.m)]
Therefore, ‘ + m ’ is a associative composition in G
Note: If we exclude the element zero 'o' from the set G then the remaining structure will not constitute a group.
Theorem 8: Multiplicative group of integers modulo p where p is prime. The set G = {1, 2, 3, K ( p − 1)} of
( p − 1) integers (where p is a prime integer) is a finite abelian group of order ( p − 1) with respect to the
composition multiplication modulo p. [R.G.P.V. (B.E.) Raipur 2005, 2009]
4. Existence of Left Inverse: Let a be any member of G. Then consider then following products:
1 × p a, 2 × p a, 3 × pa. . . . ( p − 1) × p a.
All these are the elements of G and we claim that no two of them are equal as shown following:
Let i and j be two distinct integers such that
1 ≤ i ≤ p − 1, 1 ≤ j ≤ p − 1 and i > j then i × p a = j × pa
⇒ i a and ja leave the same least non-negative remainder when divided by p
Algebraic Structures 181
Example 16: Prove that the set G = {0, 1, 2, 3, 4, 5} is a finite abelian group of order 6 with respect to addition
modulo 6 as the composition in G.
Solution: We have
+6 0 1 2 3 4 5
0 0 1 2 3 4 5
1 1 2 3 4 5 0
2 2 3 4 5 0 1
3 3 4 5 0 1 2
4 4 5 0 1 2 3
5 5 0 1 2 3 4
1. Closure Property: We see that all the entries of the composition table are the elements of the
set G. Therefore the set G is closed with respect to addition modulo 6 i.e. + 6 .
2. Associativity: Let a, b, c ∈ G arbitrarily. Then
a + 6(b + 6 c) = a + 6(b + c) [Since b + 6 c ≡ b + c (mod 6)]
= The least non-negative remainder when a + (b + c) is divided by 6
= The least non-negative remainder when (a + b) + c is divided by 6
= (a + b) + 6 c [Q a + (b + c) ≡ (a + b) + c]
= (a + 6 b) + 6 c [Q a + b ≡ a + 6 b(mod 6)]
Therefore the operation + 6 is associative in G.
3. Existence of Identity: We have 0 ∈G. If a is any element of G, then from the composition
table we have
0 + 6 a = a = a + 6 0 V a ∈G
Therefore 0 is the identity element.
182 Discrete Mathematical Structures
4. Existence of Inverse: From the composition table, we observe that the inverse of 0 is 0, the
inverse of 1 is 5, 2, is 4, 3, is 3, 4 is 2 and 5 is 1.
Illustration: 4 + 6 2 = 0 = 2 + 6 4 ⇒ 4 is the inverse of 2.
Example 17: Prove that the set G = {1, 2, 3, 4, 5, 6} is a finite abelian group of order 6 under the
multiplication modulo 7, as the composition in G i.e. ×7 or ×7 .
Solution: Let us form the composition table:
×7 1 2 3 4 5 6
1 1 2 3 4 5 6
2 2 4 6 1 3 5
3 3 6 2 5 1 4
4 4 1 5 2 6 3
5 5 3 1 6 4 2
6 6 5 4 3 2 1
1. Closure Property: From the composition table we see that all entries in the composition
table are the element of the set G. Therefore, G is closed with respect to multiplication modulo 7 i.e., .7 .
Illustrations:
(i) 8 ≡ 3 (mod 5) because 8 − 3 = 5 which is divisible by 5.
(ii) 27 ≡ – 3 (mod 5) because 27–(–3)=30 which is divisible by 5.
Theorem 9: The set of residue classes modulo m is an abelian group of order m with respect to addition of
residue classes.
Proof: I = {0, ± 1, ± 2, ± 3. . . } be the set of integers. If a ∈ I, then [ a] is a residue class modulo m if.
[ a] = { x: x ∈ I and x − a is divisible by m}.
Let I m be the set of all residue classes of I mod m, i.e. I m = {[ a]: a ∈ I}, we have
[ a] = [ b] ⇒ a ≡ b (mod m)
The set I m has m distinct element {[ 0], [1], [ 2] K [ m − 1]}.
Thus we have , I m = {[ 0], [1], [ 2] . . .[ m − 1]}
If a and b be any two integers then we define addition of residue classes [ a] and [ b] as follows:
[ a] + [ b] = [ a + b]
If [ a] = [ c] and [ b] = [ d], then it can be easily seen that
[ a] + [ b] = [ c] + [ d].
Therefore our addition of residue classes is well defined.
Now, we shall show that (I m , + ) is a group where ‘ + ’ represents the addition of residue classes.
1. Closure Property: If [ a], [ b] ∈ I m , then by definition,
[ a] + [ b] = [ a + b].
Since (a + b) is an integer, therefore [ a + b] ∈ I m . Thus I m is closed with respect to addition of
residue classes.
2. Associativity: Let [ a], [ b], [ c] ∈ I m arbitrarily.
Then [ a] + ([ b] + [ c]) = [ a] + [ b + c] [by def. of addition of residue classes]
=[ a + (b + c)] [by def. of addition of residue classes]
= [(a + b) + c] [Q add. of integers is associative]
= [ a + b] + [ c]
= ([ a] + [ b]) + [ c] .
184 Discrete Mathematical Structures
Theorem 10: The set of non-zero residue classes modulo a prime integer p is an abelian group of order ( p − 1)
with respect to multiplication of residue classes. [U.P.T.U. (M.C.A.) 2007]
Proof: Let I = {0, ± 1, ± 2, ± 3 K } be the set of integers. If a ∈ I, then [a] is a residue class modulo p of I, if
[ a] = [ x : x ∈ I and x − a is divisible by p]
We have [ a] = [ b] ⇔ a – b is divisible by p.
The residue class [0] is called the zero residue class. Also we have [ a] = [ 0] if and only if a is divisible by p.
Let I p be the set of all residue classes of I mod p. Then I p has p distinct elements i.e.
1. Closure Property: Let [ a], [ b] ∈ G arbitrarily. Then a and b are integers and a.b is not exactly
divisible by p. By definition, we have,
[ a][ b] = [ ab].
Since a, b ∈ G ⇒ ab ∈ G. Therefore [ ab] is also a residue class modulo p. But we have to show
[ ab] ≠ [ 0] i.e., p is not a divisor of ab
We have p| ab ⇒ p| a or p| b [∴ p is a prime]
But neither a nor b is divisible by p.
Therefore [ ab] ≠ 0 and [ ab] ∈ G and G is closed with respect to multiplication of residue classes.
Algebraic Structures 185
[1][ a] = [1 a] = [ a] = [ a][1].
4. Existence of Inverse: Let [ a] ∈ G i.e., [ a] [0] then a is not divisible by p. Consider the
following p − 1 products:
[1][ a] , [ 2][ a], K [ p − 1][ a].
By closure property all these products are the elements of G, We shall show that all these are distinct
elements of G. Let i and j (i ≠ j) be two integers, such that
1 ≤ i ≤ p − 1; 1 ≤ j ≤ p − 1 and i > j .
Thus, [i ][ a] = [ j][ a]
⇒ i a – j a is divisible by p
⇒ p|(i – j)a
⇒ p|(i – j) since p is not a divisor of a.
But according to our assumption i − j is a positive integer and i − j < p. So it is not divisible by p.
Therefore [i ][ a] ≠ [ j][ a]. Thus [1][ a], [ 2][ a], . . . , [ p − 1][ a] are the p − 1 distinct elements of G.
Therefore one of these elements must be equal to [1].
Let [ b][ a] = [1] = [ a][ b]. Then [ b] is the inverse of [a].
5. Commutativity: Let [ a],[ b] ∈ G arbitrarily. Then
[ a][ b] = [ ab] = [ ba] = [ b][ a].
Q Multiplication of residue classes is commutative.
Hence G is an abelian group with respect to multiplication of residue classes. Since the number
of distinct elements in G is p − 1, therefore the order of this group is p − 1.
186 Discrete Mathematical Structures
Remark 1: In any group G, the identity element is always of order 1 and it is the only element of order 1, i.e.
e1 = e and as such o(e) = 1. If o (a) = 1 then a1 = a = e.
Remark 2: If a is an element of group G and n is a positive integer such that an = e, then o (a) ≤ n, when n is a
least positive integers satisfying an = e, then o (a) = n and there exists any positive integer m (< n) such that
am = e, then o (a) < n.
Theorem 11: The order of an element a of a group (G, . ) is the same as the order of a–1 , i.e. o (a) = o (a–1 ) .
Proof: Let n and m respectively be the orders of a and a–1 i.e., o (a) = n and o (a–1 ) = m
⇒ (a–1 )n = e [Q e–1 = e]
⇒ o (a–1 ) ≤ n
⇒ m ≤ n.
⇒ (am )–1 = e
⇒ am = e [Q b–1 = e ⇒ b = e]
⇒ o (a) ≤ m
⇒ n ≤ m.
Now m ≤ n and n ≤ m ⇒ m = n.
–1
If o (a) = ∞, then the order of a cannot be finite because o(a–1 ) = m ⇒ o (a) ≤ m ⇒ o (a) is finite.
Theorem 12: The order of any integral power of an element a of any group (G, . )cannot exceed the order of a.
Proof: Let o (a) = n and ak be any integral power of a, we have to prove that o (ak ) ≤ o (a).
⇒ (an )k = ek
⇒ ank = e
⇒ (ak )n = e
⇒ o (a)k ≤ n
⇒ o (a)k ≤ o (a) .
Theorem 13: If o (a) = n for some a ∈ G, then am = e iff n is a division of m. [U.P.T.U. (B.Tech.) 2003]
Proof: The condition is necessary. Let us suppose that n is a divisor of m. Then there exists an integer
m
q such that = q or nq = m
n
Now am = anq = (an )q =eq = e [Q o (a) = n]
m
Thus, we have established that if o (a) = n and n is a divisor of m, then a = e.
Now am = e ⇒ o (a) ≤ m ⇒ n ≤ m.
Since m is an integer and n is a positive integer, therefore by division algorithm, there exists integers q and
r such that
m = nq + r where 0 ≤ r < n
Now am = anq+ r [Q m = nq + r]
nq r
=a a
= (an )q ar = eqar = ear = ar [Q an = e]
Therefore am = e ⇒ ar = e
Since 0 ≤ r < n, therefore ar = e suggests that r must be equal to zero otherwise o (a) ≠ n. Thus if o (a) = n then
there exists not positive integer r < n satisfying ar = e.
Hence m = nq ⇒ n is a divisor of m.
Theorem 14: The order of the elements a and x –1 ax are the same where a, x are any two element of a group
(G, . ) .
Proof: We have to prove:
o (a) = o ( x –1 ax ).
Suppose n and m are respectively the orders of a and x –1 ax i.e., o (a) = n and o ( x –1 ax ) = m
Now ( x –1 ax )n = ( x –1 ax )( x –1 ax )( x –1 ax ) K ( x –1 ax ) [n factors]
–1 –1 –1 –1
=x ax x ax x ax . . . x ax
188 Discrete Mathematical Structures
= x –1 (ae)(ae)(ae). . . ax
= x –1 an x [Since 0(a) = n ⇒ an = e]
= x –1 ex = x –1 x = e
This means that o ( x –1 ax ) ≤ n i . e, m ≤ n
Again o ( x –1 ax ) = m ⇒ ( x –1 ax )m = e
⇒ x –1 am x = e
⇒ x –1 am x = x –1 x
Theorem 15: If the order of an element a of a group is n and p is prime to n then the order of a p is n.
Proof: Let if possible the order of a p be m, i.e., o (a p ) = m.
Now, o (a) = n ⇒ an = e
⇒ (an )p = e p = e
⇒ (a p )n = e
⇒ o (a p ) ≤ n
⇒ m≤n
[because the order of any power of an element a cannot exceed the order of a]
Since p is prime to n, therefore there exist integers x and y such that
px + ny = 1.
Algebraic Structures 189
Therefore a = a1 = a px + ny = a px ⋅ any
= a px (an )y = a px e y = a px e = a px = (a p )x .
Now am = [(a p )x ]m = (a p )mx = [(a p )m ]x = (a pm )x .
= ex =e [Q o (a p ) = m ⇒ (a)pm = e]
Therefore o (a) ≤ m ⇒ n ≤ m.
Now, m ≤ n and n ≤ m ⇒ m = n.
Example 18: Find the orders of each element of the multiplicative group G = {1, – 1, i , – i }
Solution: Since 1 is the identity element, therefore o(1) = 1
Now (–1)1 = –1, (–1)2 = (–1)(–1) = 1 [identity element]
∴ o(–1) = 2.
Similarly (i )1 = i , (i )2 = –1, i 3 = –i , i 4 = 1 [identity element]
∴ o (i ) = 4
and (−i ) = – i , (−i )2 = – 1, (−i )3 = i , (−i )4 = –1
1
[identity element]
∴ o (i ) = 4
Hence o (1) = 1, o (–1) = 2, o (i ) = 4 and o (–i ) = 4
Example 19: Find the orders of each element of the multiplicative group ({1, ω , ω 2}, • ).
Example 20: Find the order of each element of the group G = {0, 1, 2, 3, 4, 5} , the composition in G is
‘addition modulo 6’.
Solution: In the given operation, the order of any element of (G, + 6 ) is the least positive integer n such
that
na = e
The identity element of group (G, + 6 ) is 0, therefore the order of this element is 1 i.e., o(0) = 1
Now 11 = 1, 12 = 1 + 61 = 2, 13 = 1 + 61 + 61 = 1 + 6 2 = 3,
14 = 1 + 61 + 61 + 61 = 1 + 6 3 = 4, 15 = 1 + 6 4 = 5 and 16 = 1 + 6 5 = 0 (Identity)
Therefore o(1) = 6
Similarly, 2 = 2, 22 = 2 + 6 2 = 4, 23 = 2 + 6 4 = 0
1
(identity)
∴ o(2) = 3
31 = 3, 32 = 3 + 6 3 = 0 (identity)
190 Discrete Mathematical Structures
∴ o(3) = 2
43 = 3(4) = 12 (mod 6)=0 (identity)
∴ o(4) = 3
and 5–6 = 6(5) = 30 (mod 6) = 0 (identity)
∴ o(5) = 6
Example 21: If a and b are any two elements of a group (G, . ) , then (b a b–1 )n = banb–1 for any integer n.
Solution: n being an integer it can assume positive values, negative values and also the value zero.
Therefore
(i) If n = 0 , then
(b a b–1 )0 = e [by definition]
0 –1 –1 –1
Also ba b = beb = bb =e
or (bab–1 )k +1 = bak b–1 bab–1 = bak eab–1 = bak ab–1 = bak +1 b–1.
Therefore the result is true for n = k + 1 if it is true for n = k. But we have seen that the result is true for n = 1.
Hence by mathematical induction it is true for all n > 0 .
(iii) If n < 0 and let n = – m where m > 0, then
(bab–1 )n = (bab–1 )– m = [(bab–1 )m ]–1 = (bam b–1 )–1
Solution: n being an integer, it can assume positive values, negative values and also the value zero,
therefore,
(i) Let n = 0, then by definition of identity element,
a0 = e, b0 = e, (ab)0 = e and a0 b0 = ee = e.
= (ak bk )(ab)
= (ak a)(bk b) = ak +1 bk +1
Thus the assertion is true for n = k + 1 if it is true for n = k. Therefore, by mathematical induction the
assertion is true for every positive integral value of x.
(iii) Let n < 0 , Let n = − m, where m is a positive integer.
Then (ab)n = (ab)– m = [(abm ]–1 = (am bm )–1
= a– m b– m
= anbn.
Therefore, from (i), (ii) and (iii), we have
(ab)n = anbn V a, b ∈ G and V n ∈ I.
Example 23: Let (G, ∗ )be a group. If (G, ∗ )is an abelian group, then show that a3 ∗ b3 = (a∗ b)3 for all a and b in G.
[R.G.P.V. (B.E.) Bhopal 2007]
= a ∗ (a ∗ b) ∗ b [using (1)]
= (a ∗ a) ∗ (b ∗ b)
= a2 ∗ b2 ...(2)
= [(a2 ∗ b) ∗ b] ∗ (a ∗ b)
= (a2 ∗ b) ∗ (b ∗ a) ∗ b
= a2 ∗ (b ∗ a) ∗ (a ∗ b)
192 Discrete Mathematical Structures
= a2 ∗ (a ∗ b) ∗ b2 [using (1)]
= (a2 ∗ a) ∗ (b ∗ b2 ) = a3 ∗ b3
Solution: We have,
b–1 ∗ a–1 ∗ b ∗ a = e ⇒ (b–1 ∗ a–1 )(b ∗ a) = e
⇒ a∗b = b∗a
⇒ G is abelian
Example 25: Prove that if for every element a in a group (G, ∗ ), a2 = e then G is abelian group.
Solution: Let a and b by any two element of the group G, then ab is also an element of group G, i.e.,
a, b ∈ G ⇒ a b ∈ G V a, b ∈ G
⇒ (a ∗ b)2 = e.
⇒ (a ∗ b)–1 = (a ∗ b)
But a2 = e ⇒ a ∗ a = e
⇒ a–1 = a ...(2)
Similarly
b2 = e ⇒ b–1 = b
b∗a = a∗b
Example 26: Prove that if every element of a group G is its own inverse, then G is an abelian group.
Solution: Let a and b any two elements of G. Then ab is also an element of group G.
Therefore (a ∗ b)–1 = a ∗ b (given)
⇒ G is abelian.
Algebraic Structures 193
Example 27: Prove that if every element of a group G except identity element is of order two, then G is
abelian.
Solution: Let a, b ∈ G
or (a ∗ b)(a ∗ b) = ee = a2 ∗ b2 [Q a2 = e and b2 = e]
Hence G is abelian.
Example 28: If G is a group of even order then prove that it has an element a ≠ e satisfying a2 = e.
Solution: Let G be a group of even order 2n, where n is a positive integer. We shall prove that G has
definitely an element a ≠ e such that a–1 = a. We shall prove it by contradiction.
Let G has no other element except e which is its own inverse. In a group when every element possesses a
unique inverse then the identity element e is its own inverse.
Now we separate the 2n – 1 elements of the set G ′ = A − {e} in the pairs of two elements of every pair is the
inverse of other. But we cannot do so because the odd integer 2n − 1 is not divisible by 2. Therefore our
initial assumption is wrong.
Example 29: If A is a group such that (ab)m = am bm for three consecutive integers m and for every a, b ∈ A,
then show that A is abelian group.
Solution: Let a, b ∈ A arbitrarily. Let m, m + 1, m + 2 be any three consecutive integers such that,
(ab)m = am bm ; (ab)m +1 = am +1 bm +1
⇒ am +1 abm +1 b = am +1 bm +1 ab
⇒ am +1 bm +1 = am bm (ba)
⇒ (ab)m +1 = (ab)m ba
Example 30: In a group A, if ba = am bm , then prove that the elements am bn– 2, am – 2bn, ab–1 have the same
order.
Solution: We have
am bn– 2 = am bn b–2
= bab–2 [Q b a = am bn]
= o (ab–1 ) ...(1)
= o (ab–1 ). ...(2)
m n– 2 –1 m–2 n
From (1) and (2), we have o (a b ) = o (ab ) = o (a b ).
Example 31: Show that any group of elements less than or equal to four must be abelian.
[Rohtak (M.C.A.) 2005, 2008, Delhi (B.E.) 2009]
Solution
1. When a group G of order 1 consisting of one element e(identity element) i.e., G = {e} then it is
obviously an abelian group.
2. When a group G of order 2 consisting of two elements say identity element e and a i.e.
G = {e, a}, then ea = ae = a ⇒ G is abelian
3. A group of order 3 consisting of three element
i.e., G = {e, a, b}, then the composition table will be as:
• e a b
e e a b
a a a2 ab
b b ab b2
Algebraic Structures 195
Since in any row of composition table of group, there exists every element once, then
Either a2 = e or ab = e.
And ba = e or b2 = e .
Now, if a2 = e then ab = b
But ab = a ⇒ a = e, which is impossible [Q a ≠ e]
Therefore ab = e and thus a2= b.
Similarly since in any column of composition table, there exists every element once, then b2 ≠ e.
Thus ba = e and b2 = a
Then the composition table as under:
• e a b
e e a b
a a b e
b b e a
Therefore ab = ba
∴ G is an abelian group.
4. A group of order 4 consisting of four element i.e. G = {e, a, b, c}.
Therefore the composition table as under:
e a b c
e e a b c
a b a2 ab ac
b b ba b2 bc
c c ca cb c2
The identity element e is its own inverse. Thus there should be atleast one element in G which is its own
inverse.
Let a–1 = a, b–1 = b and c–1 = c, then it is definite that G is abelian.
Also a–1 = a ⇒ aa = e ⇒ a2 = e
Since in any row of the composition table of group G there exist every element once, thus in the second
row, either
ab = b or ab = c
and either ac = c or ac = b
But ab = b ⇒ a=e
Which is a contradiction because a ≠ e
Thus ab = c and so ac = b
Similarly, since in any column there exists every element once. Therefore in the second column,
either ba = b or ba = c
196 Discrete Mathematical Structures
and either ba = c or ca = b
But ba = b ⇒ a = e
Which is a contradiction, because a ≠ e
Thus ba = c and so ca = b
Therefore ab = c = ab, bc = e = cb,
ca = b = ac
The composition table as under:
. e a b c
e e a b c
a a e c b
b b c a e
c c b e a
Hence G is abelian.
Example 32: Show that the set G = {1, – 1} with respect to multiplication operation, that is the algebraic
structure ({1, – 1}), .) is a finite abelian group of order 2.
Solution: The assumption table for the set G is as under:
. 1 –1
1 1 –1
–1 –1 1
1. Closure Property: Since every element of the table is in G, so G is closed with respect to
multiplication.
2. Associative Law: Since all elements of G are integers, so multiplication operation obeys
associative law.
3. Existence of Identity: From multiplication table, ∃ 1 ∈G such that
1. a = a = a.1 V a ∈ G,
Since the external column is identical to the column corresponding to 1.
Example 33: Prove that any group of three elements is necessarily abelian.
Solution: Let G = {e, a, b}, where e is the identity element, clearly, e–1 = e. Now, if a–1 = a and b–1 = b then
by Ex. 40, G is an abelian group.
Now, Let a–1 ≠ a and b–1 ≠ b. Since a–1 , b–1 ∈ G, so for the inverse of a and b there are two possibilities:
Example 34: Does the following table show a group? If yes, then what is the identity element?
* 0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 1 2
3 0 3 2 1
3. Existence of Identity: The identity element of G is 1, because the external column is identical
to the column of 1, i.e. 1 ∗ a = a = a ∗1 V a ∈ G.
Hence (G, ∗ ) does not show a group. However, 1 ∈G is its identity element.
Solution: Let o (a) = n, Then an = e, where e is the identity element of G and n is the least positive integer.
According to the question, am = e , so n ≤ m.
Now, by the method of division algorithms,
m = nq + r, where q, r ∈ I and 0 ≤ r < n.
Therefore ar = e ⇒ r = 0
Hence m = nq, q ∈ I ⇒ n| m or o (a)| m.
Remark 1: According to definition of subgroup each subgroup is a complex but every complex is not
necessarily a group.
Remark 2: Every group (G, ∗) whose order is greater than one has at least two different subgroups:
(i) The subset consisting of the identity element alone with ‘∗’ i.e., {(e), * }.
(ii) The entire set G with ‘ ∗ ’ i . e. , (G, ∗ ) .
Remark 4: The identity of the subgroup H is the same as that of G. For if e′ and e are the identities of H and
G respectively, then
a ∈ H ⇒ e′ a = a
and a ∈G ⇒ e a = a
Now e ′ a = ea ⇒ e ′ = e.
Remark 5: The inverse of a ∈ H is the same as the inverse of an element of G. For if b and c are the two
inverse then
b a = e ′ and ca = e
ba = ca ⇒ b = c [Q by remark 4: e=e′]
Remark 6: The order of an element a ∈ H is the same as the order of that as an element of G.
Theorem 18: If H is any subgroup of G, then H –1 = H . Also show that the converse is not true.
Hence H –1 = H .
If H is a complex of a group G and H –1 = H , then, it is not necessary that H is a subgroup of G. For example,
H = {–1} is a complex of the multiplicative group G = {–1, 1}. Also H –1 = {–1}, since –1 is the inverse of 1 in
G. But H = {–1} is not a subgroup of G. Since ((–1)– 1) = 1 ∉ H, therefore H is not closed with respect to
multiplication.
The condition are sufficient. Let H be a non-empty subset of a group G such that the condition (i) and
(ii) satisfy. We are to prove that H is a subgroup of G.
4. Existence of Inverse.
Since, a ∈ H ⇒ a–1 ∈ H [by condition (i)]
Therefore, each element of H possess inverse.
Hence, H itself is a group for the composition in G.
So, H is a subgroup of G.
Theorem 20: A necessary and sufficient condition for a non-empty subset H of a group to be a subgroup is
that
a ∈ H , b ∈ H ⇒ ab–1 ∈ H
Where b–1 is inverse of b in G.
Proof: The condition is necessary. Suppose H is a subgroup of G. Let a ∈ H , b ∈ H . Now each element
of H must possess inverse because H itself is a group.
∴ b ∈ H ⇒ b–1 ∈ H .
Further H must be closed with respect to multiplication i.e. the composition in G. Therefore
a ∈ H , b ∈ H ⇒ a ∈ H , b–1 ∈ H ⇒ ab–1 ∈ H .
Thus the condition (i), satisfies.
The condition is sufficient. Let H be the non-empty subset of group G such that
a ∈ H , b ∈ H ⇒ ab–1 ∈ H ...(1)
We are to prove that H is subgroup of G.
⇒ e ∈H .
2. Existence of Inverse: Let a be any element of H, then by the condition (1), we have
e ∈ H , a ∈ H ⇒ ea–1 ∈ H ⇒ a–1 ∈ H
3. Closure Property:
Let a, b ∈ H, then b ∈ H ⇒ b–1 ∈ H
Thus a, b ∈ H ⇒ a, b–1 ∈ H ⇒ a(b–1 )–1 ∈ H [by the condition (1)]
⇒ ab ∈ H .
Therefore, H is closed with respect to the composition ‘.’ in G
Proof: The condition is necessary. It is given that H is a subgroup of G. Let ab–1 be element of HH –1
Then a ∈ H, b ∈ H.
Since H itself is a group, therefore
b ∈ H ⇒ b–1 ∈ H
Thus a ∈ H , b–1 ∈ H ⇒ ab–1 ∈ H [by closure property]
–1 –1 –1
∴ ab ∈ HH ⇒ ab ∈H.
Hence HH –1 ⊆ H .
Cor. 2: A necessary and sufficient condition for a non-empty subset H of a group G to be a subgroup is that
HH –1 = H
4. Existence of Inverse
Now r − s ≥ 1 ⇒ r − s −1 ≥ 0
⇒ ar − s −1 ∈ B
⇒ ar – s ∗ a–1 ∈ B
⇒ e ∗ a–1 ∈ B
⇒ a–1 ∈ B
Thus a ∈ B ⇒ a–1 ∈ B V a ∈ B i.e. each element of B possesses inverse.
Finally, the element of B are also the element of A. Therefore the composition in B must be associative.
Hence B is a subgroup of A.
OR
Now a ∈ H1 ∩ H 2 ⇒ a ∈ H1 and a ∈ H 2
b ∈ H1 ∩ H 2 ⇒ b ∈ H1 and b ∈ H 2.
But H1 , H 2 are subgroups, therefore
a ∈ H1 , b ∈ H1 ⇒ ab–1 ∈ H1
a ∈ H 2, b ∈ H 2 ⇒ ab–1 ∈ H 2
Finally ab–1 ∈ H1, ab–1 ∈ H 2 ⇒ ab–1 ∈ H1 ∩ H 2.
Thus a ∈ H1 ∩ H 2, b ∈ H1 ∩ H 2 ⇒ ab–1 ∈ H1 ∩ H 2.
Hence H1 ∩ H 2 is a subgroup of G.
Theorem 24: Union of two subgroup is not necessarily a subgroup. [U.P.T.U. (B.Tech.) 2007]
⇒ Hx 2–1 = x 2–1 H
⇒ x 2–1 ∈ K . ...(2)
Now, we shall show x1 x 2–1 ∈K
∴ x1 x 2–1 ∈ K .
Thus x1 , x 2 ∈ K ⇒ x1 x 2–1 ∈ K .
Hence, K is a subgroup of G.
Algebraic Structures 205
Example 37: Prove that if G is an abelian group with identity e, then the element of G satisfying the equation
x 2 = e from a subgroup H of G . [M.K.U. (B.E.) 2008, M.K.U. (M.C.A.) 2005]
Solution: Let H = { x ∈ G: x 2 = e} .
Now x 2 = e ⇒ x = x –1
Then, if x ∈ H , then x –1 ∈ H and e2 = e
Therefore e ∈H
Let x, y ∈ H . Since G is abelian, therefore,
x y = y x = y –1 x –1 = ( xy )–1 [Q x = x –1 , y = y –1 ]
Thus ( xy )2 = e ⇒ xy ∈ H
Hence, H is a subgroup of G.
Example 39: Show that union of two subgroup is a subgroup if and only if one is contained in the other.
Solution: Suppose, H1 and H 2 are the two subgroup of group G. Let H1 ⊆ H 2 or H 2 ⊆ H1 . Then H1 ∪ H 2=H 2
or H1 . But H1 , H 2 are subgroups and therefore H1 ∪ H 2 is also a subgroup.
Conversely. Suppose H1 ∪ H 2 is subgroup. We are to prove that
H1 ⊆ H 2 or H 2 ⊆ H1 .
Let us assume that H1 is not a subset of H 2 and H 2 is also not a subset of H1 .
Now H1 is not a subset of H 2 ⇒ ∃ a ∈ H1 and a ∈
/ H2 ...(1)
and H 2 is not a subset of H1 ⇒ ∃ b ∈ H 2 and b ∈
/ H1 ...(2)
From (1) and (2), we have a ∈ H1 ∪ H 2 and b ∈ H1 ∪ H 2.
Since H1 ∪ H 2 is a subgroup.
Therefore ab = c (say) is also an element of H1 ∪ H 2.
But ab = c ∈ H1 ∪ H 2
⇒ ab = c ∈ H1 or H 2.
206 Discrete Mathematical Structures
A group (G, • ) is called cyclic if for a ∈ G, every element x ∈ G is of the form an, where n is some integer.
Symbolically, G = {an | n ∈ I}.
The element a is then called a generator of G. We may occur more than one generator of a cyclic group. If G
is a cyclic group generated by a then we write G = {a} or G = {a}.
Thus G is a cyclic group and the generator this group is i. Also we can write
G = {–i , (–i )2, (–i )3 , (–i )4 }.
Illustration: The multiplicative group of the three cube roots of unity viz., {ω,ω 2, ω 3 = 1} is a cyclic group of
order 3. The generators of this group are ω and ω 2.
Algebraic Structures 207
Illustration: The group G = ({0, 1, 2, 3, 4, 5}, + 6 ) is cyclic group. Here the generators are 1 and 5.
We see that
11 = 1, 12 = 1 + 61 = 2, 13 = 1 + 612 = 3, 14 = 1 + 613 = 1 + 6 3 = 4, 15 = 1 + 614 = 5,
16 = 1 + 615 = 1 + 6 5 = 0 .
Theorem 25: Every cyclic group is an abelian group. [Rohtak (B.E.) 2007]
Proof: Let G = {a} be a cyclic group, generated by a. Let x, y ∈ G arbitrarily, then there exists integers r and
s such that
x = ar , y = as
Therefore xy = ar as = ar + s [by law of indices]
s+ r s r
=a = a a = yx
∴ xy = yx V x, y ∈ G
Hence, G is an abelian group.
Then, we can write ar = (a–1 )– r . Since r is an integer, therefore –r is also an integer. Therefore every
element of G is generated by a–1 . Thus a–1 is also a generated of G.
Let m be the least positive integer, such that am ∈ H . Then we shall prove that H = {am }, i.e., H is cyclic
group generated by am .
Suppose at ∈ H arbitrarily. By division algorithm, ∃ integers q and r such that
t = mq + r, 0 ≤ r < m
Now am ∈ H ⇒ (am )q ∈ H [by closure property]
mq
⇒ a ∈H
mq –1
⇒ (a ) ∈H
208 Discrete Mathematical Structures
⇒ a– mq ∈ H
Also at ∈ H and a– mq ∈ H ⇒ at a– mq ∈ H
⇒ at – mq ∈ H
⇒ ar ∈ H [Q r = t − mq]
m
Now, m be the least positive integer such that a ∈ H and 0 ≤ r < m.
Thus every element at ∈ H is of the form of (am )q. So H is cyclic having am as its generator.
Example 41: Find the generator of cyclic group G = {a, a2, a3, a4 = e} [M.K.U. (M.C.A.) 2004, 2006, 2009]
Solution: The generator of this cyclic group is of order 4 as a4 = e. The generator of this cyclic group are
all the elements a p where p are 1 and 3. Therefore a and a3 are the generators of the given cyclic group.
Example 42: How many generators are there of the cyclic group G of order 10.
[Bhopal (M.C.A.) 2004, 2006, 2009]
Example 43: Show that the group G = {1, 2, 3, 4, 5, 6} ×7 is cyclic. How many generators are there.
[Delhi (B.E.) 2006, 2009]
Example 44: Prove any group G of order 3 is cyclic. [Delhi (M.C.A.) 2007]
Solution: Since the order of G is 3, therefore, there are exactly two distinct elements except e ∈ G
Let G = {e, a, b}
Now, a ∈ G, b ∈ G ⇒ ab ∈ G. [Closure]
Algebraic Structures 209
∴ G = {e, a, a2}
Hence a3 = aa2 = ab ⇒ a = e
Hence, G is cyclic and the generation of G is a
5.13 Cosets
Let G be a group on which the group operation is multiplication and H be a subgroup of G. Let a ∈ G then,
the set Ha = {ha : h ∈ H }
is called a right coset of H in G generated by a. If group operation is addition. Then left coset and right coset
of H in G generated by a.
H+ a = {h + a: h ∈ H ] [Right coset]
a+ H = {a + h: h ∈ H ] [Left coset]
Remark: (1) If e be identity of G, then He = H = eH
(2) e ∈ H ⇒ a e ∈ H a ⇒ a ∈ H a, e ∈ H ⇒ ae ∈ aH ⇒ a = Ha
Example 45: If G is an additive group of all integers and H is additive subgroup of all even integers of G, then
find all the cosets of H in G.
Solution: We have G = {0, ± 1, ± 2, ± 3, . . . }
and H = {0, ± 2, ± 4, . . . }
Let 0, 1, 2 ... ∈G then
H + 0 = {0, ± 2, ± 4, ± 6 . . .
H + 1 = {0 + 1, ± 2 + 1, ± 4 + 1 . . . } = {. . . 3, – 1, 1, 3. . . }
H + 2 = {0 + 2, ± 2 + 2, ± 4 + 2, . . . } = {. . . – 4, – 2, 0, 2, 4, . . . . } = H
Hence, H and H +1 are two distinct cosets.
Theorem 28: If H is any subgroup of G and h ∈ H , then Hh = H = hH .
Proof: Let h ∈ H ⊆ G, then we have to show Hh = H and hH = H suppose h′ be any arbitrary element of H.
Then h′ h ∈ Hh
Since H is a subgroup, then
210 Discrete Mathematical Structures
h′ ∈ H , h ∈ H ⇒ h′ h ∈ H
Thus h′ h ∈ H h ⇒ h′ h ∈ H
∴ h′ h ∈ H and h h′ ∈ H h ⇒ H h ∈ H ...(1)
–1 –1
Again h′ = h′ e = h′ (h h) [ h h = e, e + h′ = h′ ]
Theorem 29: If a and b are any two elements of a group G and H is a subgroup of the group, then
Ha = Hb ⇔ ab–1 ∈ H and aH = bH ⇔ b–1 a ∈ H
Proof: Let H is subgroup of G and a, b ∈ G such that
Ha = Hb
If e be the identity then
e ∈ H ⇒ e a ∈ Ha ⇒ a ∈ Ha
But Ha = Hb ⇒ a ∈ Hb
⇒ ab–1 ∈ Hbb–1
⇒ ab–1 ∈ He
⇒ ab–1 ∈ H
⇒ ab–1 ∈ H
Conversely: Let H is subgroup of G and a, b ∈ H such that ab–1 ∈ H
Then, show Ha = Hb
as ab ∈ H ⇒ H (ab)–1 = H
–1
⇒ H (ab)–1 = Hb [ h ∈Η ⇒ Hh = H ]
⇒ Hae = Hb [ ae = a]
⇒ Ha = Hb
Therefore, Ha = Hb ⇔ ab–1 ∈Η
Similarly, aH = bH ⇔ b–1 a ∈ H
Theorem 30: If a, b are two distinct elements of a group G and H is any subgroup of G, then
a ∈ Hb ⇔ Ha = Hb
and a ∈ bH ⇔ aH = bH
Algebraic Structures 211
⇒ ab–1 ∈ He (bb–1 = e)
⇒ ab–1 ∈ H
⇒ Hab–1 ∈ H
⇒ Ha(b–1 b) = Hb
⇒ Hae = Hb [ ae = a]
⇒ Ha = Hb
Conversely, Let Ha = Hb
if a ∈ Ha ⇒ a ∈ Hb
Similarly we can prove a ∈ bH ⇒ aH = bH
Theorem 31: Any two right (left) cosets of a subgroup are either disjoint or identical.
[R.G.P.V. (B.E.) Bhopal 2005; 2008]
Proof: Let H is a subgroup of G and let Ha and Hb be any two right cosets of H in G. Then to show that Ha
and Hb are either disjoint or identical i.e. either Ha ∩ Hb = φ or Ha = Hb. Suppose Ha and Hb are not disjoint.
Then there exists at least one element c such that c ∈ Ha and c ∈ Hb.
⇒ a = (h1–1 h2 ) b [ ae = a]
⇒ Ha = H (h1–1 h2 ) b
⇒ Ha = Hb
Therefore, either Ha ∩ Hb = φ or Ha = Hb.
Similarly we can prove that either a H = b H or aH ∩ bH = φ
The order of each subgroup of a finite group is a divisor of the order of the group.
Proof: Let G is finite group of order n i . e. O (G ) = n
i . e. G = {a1 , a2, a3 , . . . an}.
and H is subgroup of G of order m i.e. O (H ) = m
i.e. H = {h1 , h2, h3 , K hm }.
Therefore, each right cost of H in G has m distinct elements but we know the union of all left or right coset
of H in G is equal to group i.e.
G = Ha1 ∪ Ha2 ∪ Ha3 . . . ∪ Hak
Where Ha2 = {h1 a2, h2a2, . . . hm a2}
Ha3 = {h1 a3 , h2a3 , . . . hm a3 }
Hak = {h1 ak , h2ak , . . . hm ak }
Now number of elements in G = number of elements in Ha1 + number of elements in Ha2 + . . . + number of
elements in Hak
⇒ n = m + m + m + . . . + k time
⇒ n = mk
n
⇒ k=
m
O (G )
⇒ k=
O (H )
⇒ O (H ) is divisor of O(G)
Remark: The converse of Lagrange's theorem is not true. If G is finite group of order n and m is a positive
integer, such that m is divisor and m is a positive integer, such that m is divisor of n, then it is not necessary
that G has definitely a subgroup of order m.
Theorem 32: Use Lagrange's theorem to show that any group of prime order can have no proper
subgroup. [R.G.P.V. (B.E.) Raipur 2003, 2005, 2008]
Proof: Let G be a group of prime order p. Let H be subgroup of G and let O (H ) = m, by Lagrange’s theorem
O(H) is a divisor of O (G ) i.e., m is a divisor of p
Proof: Let x H x –1 = H V x ∈ G
⇒ x H x –1 ⊆ H V x ∈ G
⇒ H is normal subgroup of G.
Converse, H is normal subgroup of G. Then
x H x –1 ⊆ H V x ∈ G ...(1)
Algebraic Structures 213
Also, x ∈ G ⇒ x –1 ∈ G
∴ x –1 H ( x –1 ) ⊆ H V x ∈ G ⇒ x –1 H x ⊆ H V x ∈ G
⇒ x( x –1 Hx )x –1 ⊆ xHx –1 V x ∈ G
⇒ H ⊆ x H x –1 ...(2)
Theorem 34: A subgroup H of a group G is a normal subgroup iff left coset of H in G is a right coset of H in G.
Proof: Let H be a normal subgroup of G
Then x H x –1 = H V x ∈ G ⇒ ( xHx –1 ) x = H x V x ∈G
= he = h
–1
∴ x ∈ G, h ∈ H ⇒ xhx ∈ H , then H is normal subgroup of G.
Theorem 36: The intersection of any two normal subgroup of a group is a normal subgroup.
Proof: Let H and K be two normal subgroup of a group G. Since H and K are subgroups of G, therefore
H ∩ K is also a subgroup of G. Then to show H ∩ K is a normal subgroup of G.
Let x ∈G and n ∈ H ∩ K ⇒ n ∈ H, n ∈ K
Now x ∈G, n ∈ H and H is normal subgroup of G ⇒ xnx –1 ∈ H
Again x ∈ G, n ∈ K and K is normal subgroup of G ⇒ x n x –1 ∈ K
∴ x n x –1 ∈ H , x n x –1 ∈ K ⇒ x n x –1 ∈ H ∩ K
Thus, x ∈ G, n ∈ H ∩ K ⇒ x n x –1 ∈ H ∩ K
Hence, H∩K is a normal subgroup of G.
214 Discrete Mathematical Structures
Example 46: Let Pn be any symmetric group on n symbols. Prove that An is a normal subgroup of Pn.
Solution: Let α ∈ pn and β ∈ An. Since β is an even permutation and α may be odd or even. Then we have to
show that α βα −1is an even permutation.
If α is odd, then α –1 is also odd. Now α β is odd
⇒ αβα −1 is even.
If α is even ⇒ α –1 is also even. Now α β is even ⇒ αβα −1is even
Thus, α ∈Pn, β ∈ An ⇒ αβα −1 ∈ An. Hence An is a normal subgroup of Pn
Example 47: If G is a group and H is a subgroup of Index 2 in G, prove that H is a normal subgroup of G.
Solution: Let H be a subgroup of index 2 in a group G. Then the number of distinct right (left) cosets of H
in G is 2. Let x ∈G. If x ∈ H , then xH = H = Hx.
If x ∈
/ H then Hx is distinct from H and xH is distinct from H. But H is of index 2. Therefore the number of
distinct right (left) costs in right (left) coset decomposition of G will be 2. Therefore the cosets H, Hx, xH
are such that G = H ∪ Hx = H ∪ xH . But there is no element common in H and xH. Therefore we must have
Hx = xH .
Theorem 37: The product of two right (left) cosets in G is also right (left) coset in G.
[M.K.U. (B.E.) 2005, 2008, Rohtak (M.C.A.) 2007]
Theorem 38: The set of all cosets of a normal subgroup is a group with respect to multiplication.
Proof: Let G/H be the collection of all cosets of H in G i.e. G/H = {Ha: a ∈ G}
= (Hab)Hc
Proof: We have
number of elements in G O (G )
O (G / H )=number of distinct right cosets of H is G = =
number of elements in H O (H )
Remark: The number of distinct left (or right) cosets H in G is called index of H in G.
Theorem 40: There exists a one-to-one correspondence between the elements of subgroup H and those of any
cosets of H in G. [U.P.T.U. (M.C.A.) 2005, M.K. U. (B.E.) 2004, 2008, Pune (B.E.) 2007]
∴ f is onto
Note: If G is finite group and H is subgroup of G, then for any two left cosets of H in G have the same number
of elements.
216 Discrete Mathematical Structures
Theorem 41: If aH and bH are two distinct left cosets of H in G, then there exists a one to one correspondence
between aH and bH.
Proof: Consider the mapping f : aH → bH
Defined by f (a h) = bh Vh ∈ H
Now f (ah1 ) = f (ah2 ), where h1 , h2 ∈ H
⇒ bh1 = bh2
⇒ h1 = h2 [by left cancellation law]
Thus f is one-one
f is onto mapping, since b h ∈ b H is the f image of ah ∈ aH
Thus f as defined above is a objective mapping from aH in bH.
Let S be finite set consisting n elements, then the set of all one-one onto mapping from S to S forms a group
with respect to composition of mapping. This group is called Permutation Group or symmetric group on
n symbols of degree n and is denoted by Sn .
where f (a1 ), f (a2 )..... f (an )are the f -images of a1 , a2, ... an respectively. So it is permutation of n symbols.
5.17.1 Permutation
A one-one mapping of a finite set S onto itself is called permutation.
The number of elements in a finite set S is known as the degree of permutation. It is denoted by
a a2 a3
f = 1 or
a2 a1 a3
∴ f =g
a1 a2 a3 . . . an a1 a2 a3 . . . an
f = , g = be two arbitrary permutation
f (a1 ) f (a2 ) f (a3 ) K f (an ) g(a1 ) g(a2 ) g(a3 ) K g(an )
on S. Then composition of f and g is denoted by fg or fog.
such that
a a2 a3 K an a1 a2 a3 K an
fog = fg = 1
f (a1 ) f (a2 ) f (a3 ) . . . f (an ) g(a1 ) g(a2 ) g(a3 ) . . . g(an )
a1 a2 a3 K an
= But in generally fog ≠ gof
f (g(a1 )) f (g(a2 )) f (g(a3 )) . . . f (g(an ))
1 2 3 1 2 3
Illustration: Let S = {1, 2, 3} and f = ,g= be two permutation on S then
2 3 1 3 2 1
1 2 3 1 2 3 1 2 3
fog = fg = =
2 3 1 3 2 1 2 1 3
1 2 3 1 2 3 1 2 3
gof = gf = =
3 2 1 2 3 1 1 3 2
∴ fog ≠ gof .
218 Discrete Mathematical Structures
a a2 a3 K an
f = 1
b1 b2 b3 . . . bn
then there exists a permutation called inverse f and denoted by f –1 such that fof –1 = f –1 of = I
b b2 . . . bn
where f –1 = 1
a1 a2 . . . an
1 2 3 4 5 1 2 3 4 5 –1
Example 48: If A = ,B = then find AB, BA and A
2 3 1 5 4 1 3 4 5 2
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
Solution: We have AB = =
2 3 1 5 4 1 3 4 5 2 3 4 1 2 5
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
BA = =
1 3 4 5 2 2 3 1 5 4 2 1 5 4 3
–1
1 2 3 4 5 2 3 1 5 4
A –1 = =
2 3 1 5 4 1 2 3 4 5
Theorem 42: If S a set of n symbols, then the set Sn of all permutation on S is a group with respect to the
operation product of two permutation.
Proof: We know product of two permutations on n symbols is again a permutation. The product of
permutation is associative. The identity permutation I defined on S acts as the identity element of the
group. If f is permutation on S, then f –1 is also a one-one mapping on S onto itself. Hence f –1 is also a
permutation in S such that f f –1 = f –1 f = I. Thus Sn is group.
Note:
(i) The order of S n = n !
(ii) For n ≤ 2, the group S n is abelian for n ≥ 3, the group S n is non-abelian.
1 2 3 4
Illustration: Let S = {1, 2, 3, 4} then f = is cyclic permutation. It is written as f = (1 2 3 4) .
2 3 4 1
5.17.8 Transposition
A cycle of length 2 is called Transposition
Illustration: Let S = {1, 2, 3, 4, 5, 6} if f = (1 4 5) and g = (2, 3, 6) Then f and g are disjoint cycle
permutation on S.
Note:
1. The product of two disjoint cycles is commutative
2. Even permutation can be written as a product of disjoint cycles and transposition
220 Discrete Mathematical Structures
Illustration: Let f = (123) and g = (45) be two permutations on 5 symbols 1, 2, 3, ...5. Then
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
f g= =
2 3 1 4 5 1 2 3 5 4 2 3 1 5 4
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
gf = =
1 2 3 5 4 2 3 1 4 5 2 3 1 5 4
∴ f g=g f
1 2 3 4 5 6 7 8 9
Illustration: Let f =
2 3 1 4 8 6 9 7 5
1 2 4 5 6 3 4 1 3 5 2 6
=
1 2 4 6 3 5 1 3 5 4 2 6
1 2 4 5 6 3 1 3 4 5 6 2
= = = (1 3 4)
3 2 1 6 6 4 3 4 1 6 6 2
Example 50: Express the following permutation as the product of disjoint cycles
g = (1 3 2 5)(1 4 3)(2 5 1)
1 3 2 5 4 1 4 3 2 5 2 5 1 3 4
⇒ g=
3 2 5 1 4 4 3 1 2 5 5 1 2 3 4
1 3 2 5 4 1 2 3 5 4
= = = (1 2)(3 5 4)
2 5 1 4 3 2 1 5 4 3
1 2 3 4 5 6 7 8
Example 51: Show that f = is even
7 3 1 8 5 6 2 4
1 7 2 3 4 8 5 6
Solution: We have f =
7 2 3 1 8 4 5 6
⇒ f = (1 7 2 3 )(4 8)(5)(6)
⇒ f = (1 7 )(1 2)(1 3)(4 8)
⇒ f is expressed as product of 4 transposition, therefore f is even permutation.
Algebraic Structures 221
1 2 3 4 5 6 7 8
Example 52: Show that f = is odd
1 4 3 6 5 8 7 2
1 2 4 6 8 3 5 7
Solution: We have f =
1 4 6 8 2 3 5 7
f = (2 4 6 8)
⇒ f = (2 4)(2 6)(2 8)
⇒ f is expressed as product of three transposition, therefore f is odd permutation.
1 3 2 4 5 2 4 5 3 1 2 3 1 4 5
Solution: We have f = O O
3 1 2 4 5 4 5 2 3 1 3 2 1 4 5
1 3 2 4 5 2 3 1 4 5
⇒ f = O
3 1 4 5 2 3 2 1 4 5
1 3 2 4 5
⇒ f =
2 1 4 5 3
⇒ f = (1 2 4 5 3)
Example 54: Find the elements and multiplication table of the symmetric group S3 . [U.P.T.U. (B.Tech.) 2007]
S3 = ( f1 , f 2, f 3 , f 4 , f 5, f 6 )
1 2 3 1 2 3 1 2 3
Here f1 is Identity permutation, Now f 4 f 5 = = = f1
2 3 1 3 1 2 1 2 3
1 2 3 1 2 3 1 2 3
f5 f3 = = = f6
3 1 2 2 1 3 3 2 1
Let (G, ∗ ) and G′ , ∆) be any two groups. A mapping f from G to G′ i.e. f : G → G′ is called a homomorphism
of G to G′ if
f (a ∗ b) = f (a) ∆ f (b) V a, b ∈G.
Illustration: Let G be a group of all real numbers under addition and let G′ be the group of non-zero real
numbers under multiplication and f : G → G′ defined by f (a) = 2aV a ∈ G, then it is homomorphism because.
Illustration: Let G be a group of integers under addition and G′ = G, and let f ( x ) = 3x V x ∈ G , then
f ( x + y ) = 3( x + y ) = 3x + 3y = f ( x ) + f ( y )
Let (G, ∗ ) and (G′ , ∆ ) be two groups. A mapping f : G → G′ defined by f (a∗ b) = f (a)∆f (b) is called
Isomorphism, if f is a one-one and onto mapping. We can say a one-one onto homomorphism is an
isomorphism. Thus every isomorphism is necessarily a homomorphism. But converse is not true.
Algebraic Structures 223
5.19.1 Endomorphism
Let (G, ∗ ) be a group. A mapping f : G → G′ is called endomorphism if f (a ∗ b) = f (a) ∗ f (b)
5.19.2 Automorphism
Let (G, ∗ ) be a group. A mapping f : G → G defined by f (a ∗ b) = f (a) ∗ f (b) is called automorphism if f is
objective mapping.
Let a ∈ G ⇒ f (a) ∈ G′ [ f : G s G′ ]
Now e ′ f (a) = f (a) = f (ae) [ae=a]
a–1 a = e = aa–1
Now, a–1 a = e ⇒ f (a–1 a) = f (e)
⇒ f (a–1 ) = [ f (a)]–1
(iii) Let e be identity of G, then f (e) is the identity of G′. Let the order of a ∈ G be finite and it be
equal to n i.e. o (a) = n. Then
an = e ⇒ f (an ) = f (e)
⇒ f (a a a K aK n time)= f (e)
⇒ f (a) f (a) K f (a)K n time = f (e) . [f is isomorphism]
⇒ [ f (a)]n = e′ [ f (e) = e′ ]
⇒ o[ f (a)] ≤ n ...(1)
m
If possible, O [ f (a)] = m, then [ f (a)] = e′ [ e′ = f (e)]
⇒ o (a)≤ m ...(2)
Theorem 44: If f is a homomorphism of a group G into group G′ with kernel k is normal subgroup of G.
Proof: Let f be a homomorphism of a group G into a group G′. Let e and e′ be the identities of G and G′
respectively. Let k be the kernel of f. Then
k = { x ∈ G: f ( x ) = e ′ }
Since f (e) = e ′, therefore at least e ∈ G ⇒ k ≠ φ
Let a, b ∈ k ⇒ f (a) = e ′ , f (b) = e ′
∴ f (ab ) = f (a) f (b–1 ) = f (a)[ f (b)]–1 = e ′ (e ′ )–1 = e ′ e ′ = e ′
–1
⇒ ab–1 ∈ k
Thus a ∈ k, b ∈ k ⇒ ab–1 ∈ k
Therefore k is subgroup of G. Now to prove k is normal in G. Let g ∈ G,
k1 ∈ k = ⇒ f (k ) = e ′
∴ f (gk1 g –1 ) = f (g ) f (k1 ) f (g –1 ) = f (g ) e ′ [ f (g )]–1
= [ f (g )][ f (g )]–1 = e ′ ]
⇒ g k1 g –1 ∈ k
Example 55: Show that the multiplicative group G = {1, ω, ω 2} is isomorphic to permutation group of
G′ = {I, (a b c), (a c b)} on three symbols.
Solution: We can see that
O (1) = 1, O (ω ) = 3, O (ω 2 ) = 3
O (I ) = 1, O (abc) = 3, 0(acb) = 3
f (ω ⋅ ω 2 ) = f (ω )ω 2
Hence, G ≅ G′
Example 57: If G be the multiplicative group of three cube roots of unity i . e. G = {1, ω, ω 2} where ω 3 = 1 and
G′ be the additive group of integers module 3 i.e. G′ = {0, 1, 2} + 3
Solution: Formed composition table for G = {1, ω, ω 2} and G′ = {0, 1, 2}
. 1 ω ω2 +3 0 1 2
1 1 ω ω2 0 0 1 2
ω ω ω2 1 1 1 2 0
ω2 ω2 1 ω 2 2 0 1
226 Discrete Mathematical Structures
Solution: Let a, b ∈ G ⇒ a b ∈ G.
f : G → G is a homomorphism
⇒ f (a) = a2, f (b) = b2 and f (ab) = (ab)2
⇒ (aa)(bb) = a (ba) b
⇒ a (ab) b = a (ba) b
⇒ ab = ba [by cancellation law]
⇒ G is abelian group.
5.21 Ring [U.P.T.U. ( B.Tech.) 2008; R.G.P.V. (B.E.) Bhopal 2002, 2006, 2009]
An algebraic system (R , + , . ) is called ring if the binary operations ‘ + ’ and ‘ . ’ R satisfy the following
properties.
(i) (R , + ) is an abelian group (ii) (R , . ) is semi group
(iii) The operation ‘ . ’ is distributive over ‘ + ’ let a, b, c ∈ R then
(a) a ⋅ (b + c) = a ⋅ b + a ⋅ c (b) (b + c)⋅ a = b ⋅ a + c ⋅ a
Illustration: The set R consisting of a single element o with two binary operations defined by 0 + 0 = 0 and
0. 0 = 0 is a ring
This ring is called the Null Ring or the Zero Ring.
0 a
Illustration: The set of all matrices of the form where a, b being real numbers with matrix addition
0 b
and matrix multiplication is a ring. [U.P.T.U. (B.Tech.) 2006]
Example 59: The set of integer I with respect to ‘ + ’ and ‘ . ’ is a ring. [U.P.T.U. (B.Tech.) 2006]
( I, . ) is a Semi Group
(vi) Closure Property: Since multiplication of two integers is an integers i.e.
a, b ∈ I ⇒ a ⋅ b ∈ I V a, b ∈ I
A non-zero element a of a ring R is called zero divisor or a divisor of zero if there exists an element b ≠ 0 ∈ R
such that either ab = 0 or b a = 0
Example 60: Suppose M is a ring of all 2×2 matrices with their elements as integers,the addition and
multiplication of matrices being the two ring compositions. Then M is a ring with zero divisions.
0 0
Solution: The null matrix O = is zero element of this ring.
0 0
1 0 0 0
Let A = ≠ O, B = ≠ O ∈R
0 0 1 0
1 0 0 0 0 0
Then AB = = =O
0 0 1 0 0 0
Thus the product of two non-zero elements of the ring is equal to the zero element of the ring. Hence M is a
ring with zero divisors.
Proof: Let R is without zero divisors, let a, b, and c be any elements of R such that ab = ac, a ≠ 0.
Now, ab = ac ⇒ ab – ac = 0 ⇒ a (b − c) = 0
Since R is without zero divisors then
a(b − c) = 0 ⇒ either a = 0 or b − c = 0 but a ≠ 0 then b − c = 0 or b = c
Thus, cancellation law hold in R
Similarly, right cancellation law hold in R
Conversely, Let cancellation laws hold in R if possible ab = 0 a ≠ 0, b = 0.
Then ab = 0 ⇒ ab = a0 [ a0 = 0]
⇒ b=0 [by left cancellation law]
Again ba = 0 ⇒ ba = 0 a ⇒ b = 0 [by right cancellation law hold in R]
Algebraic Structures 229
Illustration: The ring of rational numbers (Q , + , • ) is an integral domain with zero element and unit
element.
Illustration: The ring of real number (R , + , • ) is an integral domain with zero element and unit element.
Illustration: The set of rational numbers under addition and multiplication (Q , + , • ) is field
Illustration: The set of real numbers under addition and multiplication (R , + , • ) is field
5.26 Characteristic
Let (D, + , • ) be an integral domain. D is said to be characteristic p, if p is the smallest positive integer such
that pa = 0 V a ∈ D.
230 Discrete Mathematical Structures
Now R is a group with respect to addition, therefore applying right cancellation law for addition in R, we
get 0=a0.
Similarly we have 0a = (0 + 0) a = 0a + 0a. [by right distributive law]
∴ 0 + 0a = 0a + 0a. [Q 0 + 0a = 0a]
or
Every finite integral domain is a field. [R.G.P.V. (B.E.) Bhopal 2002, 2004, 2005, 2007, 2009]
Proof: Let D be a finite commutative ring without zero divisors having n elements a1 , a2, K an. In order to
prove that D is a field, we must produce an element 1 ∈ D such that 1a = a V a ∈ D. Also we should show that
for every element a ≠ 0 ∈ D there exists an element b ∈ D such that ba = 1.
All these are elements of D. Also they are distinct. For suppose that aai = aaj for i ≠ j .
ai – aj = 0 ⇒ ai = aj , contradicting i ≠ j.
∴ aa1 , aa2, . . . , aan are all the n distinct elements of D placed in some order. So one of these elements will be
equal to a. Thus there exists an element, say, 1 ∈ D such that
a1 = a = 1a. [Q D is commutative]
We shall show that this element 1 is the multiplicative identity of D. Let y be any arbitrary element of D.
Then from the above discussion for some x ∈ D, we shall have ax = y = xa.
Now 1 y = 1(ax ) [Q ax = y]
= (1a)x = ax [Q 1a = a]
=y [Q ax = y]
= y .1 [Q D is commutative]
Thus 1 . y = y = y . 1, V y ∈ D. Therefore 1 is the unit element i.e., the multiplicative identity of the ring D.
Now 1 ∈ D. Therefore from the above discussion one of the n products aa1 , aa2, . . . , aan will be equal to 1.
Thus there exists an element, say, b ∈ D such that ab = 1 = ba.
∴ b is the multiplicative inverse of the non-zero element a ∈ D. Thus every non-zero element of D is
inversible. Hence D is a field.
Theorem 48: Every field is an integral domain.[R.G.P.V.) (B.E.) Bhopal 2002, 2009, P.T.U. (B.E. Punjab 2007, 2009]
Proof: Since a field F is a commutative ring with unity, therefore in order to show that every field is an
integral domain we should show that a field has no zero divisors.
Let a, b be elements of F with a ≠ 0 such that ab = 0.
But the converse is not true i.e., every integral domain is not a field. For example, the ring of integers is
an integral domain and it is not a field. The only invertible elements of the ring of integer are 1 and –1.
232 Discrete Mathematical Structures
= a2 + ab + ab + b2 [ ba = ab]
= a2 + 2ab + b2 ...(1)
@ Algebraic Structures
1. Define group and prove that if every element of a group G is its own inverse then G is abelian group.
[U.P.T.U. (B.Tech.) 2009]
2. Write short notes on groups and semi groups
P.T.U. (B.E.) Punjab 2004, 2006, 2009; R.G.P.V. (B.E.) Bhopal 2003, Pune (B.E.) 2005, 2007
Nagpur (B.E.) 2008; M.K.U. (B.E.) 2007]
5. (i) Differentiate between semigroup and subgroup with example. [U.P.T.U. (B.Tech.) 2008]
(ii) How monoid, ring and field are related to each other? [U.P.T.U. (B.Tech. 2008]
6. Let A = {a, b}. Which of the following tables define a semigroup? Which define a monoid on A ?
[U.P.T.U. (B.Tech.) 2005]
9. Define the symmetric group of degree n denoted by Sn. [U.P.T.U. (B.Tech.) 2006]
10. Define algebraic systems with examples. [M.K.U. (M.C.A.) 2005, 2008]
11. Define subgroups and cyclic groups. [M.K.U. (B.E.) Tamil Nadu 2004, 2007]
12. Show that every group of order 2 is isomorphic to every other group of order 2.
13. If G is cyclic group of order n then show o (a) = n.
15. Show that the additive group Z 4 is isomorphic to multiplicative group of non-zero elements of Z 5.
16. Find all subgroup of a cyclic group of order 10 and 12.
17. Define and explain the following with suitable example
(i) cyclic group (ii) zero divisor of a ring
(iii) order of an element of a group (iv) field [U.P.T.U. (B.Tech.) 2009]
19. State and prove Lagrange's theorem. [U.P.T.U. (B.Tech.) 2009; P.T.U. (B.E.) Punjab 2004, 2007, 2009;
R.G.T.U. (B.Tech.) 2005, 2008; Raipur (B.E.) 2006]
❑❑❑
Unit-3
C hapter
6. : Par tial Order Sets and Lattices
7. : Boolean Algebra
8. : Logic Gate
6.1 Partial Order Set (Poset) [U.P.T.U. (B.Tech.) 2005, 2007; R.G.P.V. Bhopal 2005, 2009;
M.K.U. (B.E.) 2005, 2008; I.G.N.O.U. (M.C.A.) 2001, 2003, 2005, 2009; Rohtak (B.E.) 2009]
A non empty set A, together with a binary relation R is said to be a partially ordered set or a poset if
following conditions are satisfied.
( P1 ) Reflexivity: a R a ∀ a ∈ A
( P2 ) Antisymmetry: If a, b ∈ A, then
a R b and b R a ⇒ a = b
( P3 ) Transitivity: If a, b, c ∈ A then
a R b, b R c ⇒ a R c
The relation R on set A is called Partial Order Relation. The poset is denoted by ( A, R ) or ( A, ≤ )
Remark: We generally use the symbol ≤ in place of R. We read ≤ as less than or equal to (although it may
have nothing to do with the usual less than or equal to relation.)
Example 1: The set S on any collection of sets. The relation ⊆ read as ‘‘is subset of ’’ is partial ordering of S.
[U.P.T.U. (B.Tech.) 2007; I.G.N.O.U (M.C.A.) 2009; Rohtak (B.E.) 2004, 2007, 2009]
Solution: The power set of S is P (S ) = {φ, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, {a, b, c}}
Then P (S ) is partial order relation or poset if it satisfies the following conditions.
( P1 ) Reflexivity: Since every A ⊆ A ∀ A ∈ P (S ). Hence, it is reflexive
( P2 ) Antisymmetry: If A ⊆ B and B ⊆ A ⇒ A = B . Hence, it is antisymmetric
( P3 ) Transitivity: If A ⊆ B, B ⊆ C ⇒ A ⊆ C . Hence, it is transitive
∴ (P (S ), ⊆ ) is poset.
238 Discrete Mathematical Structures
Example 3: Let A = {2, 3, 6, 12, 24, 36} and R be the relation in A which is defined by a divides b then R is
partial order in A. [R.G.P.V. (B.E.) Bhopal 2004, 2006, 2008, 2008]
Solution: The relation divisor is a partial order if it satisfies the following conditions.
( P1 ) Reflexivity: Since a ‘|’ a ∀ a ∈ A ∴ ‘|’ is reflexive
( P2 ) Antisymmetric: If a ‘|’ b and b ‘|’ a ∀ a, b ∈ A then a = b ∴ ‘|’ is antisymmetric
( P3 ) Transitivity: If a ‘|’ b and b ‘|’ c ∀ a, b, c ∈ A then a‘|’ c
Illustration: 2 ‘|’ 6, 6 ‘|’ 12 ⇒ 2 ‘|’ 6
∴ ‘|’ is transitive. Hence, ( A, ‘|’) is a poset.
Example 4: The set of integers Z with usual ordering ≤ read as ‘‘Less than or equal to’’ is a poset.
Solution: The set of integer Z is poset if it satisfies the following conditions.
( P1 ) Reflexive: Since a ≤ a for every integer a∴ ≤ is reflexive
( P2 ) Antisymmetric: If a ≤ b and b ≤ a then a = b ∀ a, b ∈ Z. Hence ≤ is antisymmetric
( P3 ) Transitive: If a ≤ b and b ≤ c, where a, b, c ∈ Z then a ≤ c ∴ ≤ is a transitive relation
Hence, (Z, ≤ ) is a poset.
Example 5: If R is partially ordered relation on a subset X and A ⊆ X , show that
6.1.1 Comparable
Two elements a and b is a poset (S, ≤ ) are said to be comparable if either a ≤ b or b ≤ a. Thus a and b are called
Incomparable if neither a ≤ b nor b ≤ a
Illustration: In poset (Z + , ‘|’), the integer 3 and 9 are comparable. Since 3 ‘|’ 9. But the integers 5 and 7 are
incomparable because neither 5 ‘|’ 7 nor 7 ‘|’ 5.
Partial Order Sets and Lattices 239
6.2 Total Ordering Relation or Linear Order or Chain [U.P.T.U. (B.Tech.) 2007]
A relation R on a set A is said to be total ordering relation if the relation R is reflexive, anti-symmetric,
transitive and satisfies the following relation.
Law of Dichotomy: For each, a, b ∈ A, either a ≤ b or b ≤ a i.e. any two elements of A are comparable.
Illustration: The set (Z + , ‘|’) is not linearly ordered. Since 4 and 7 are incomparable as neither 4 ‘|’ 7 nor
7 ‘|’ 4 . But A = {2, 6, 12, 36} is linearly ordered subset of Z + . Since 2 ‘|’ 6 6 ‘|’ 12 and 12 ‘|’ 36 .
Illustration: The set N of positive integers along with usual order ≤ (less that or equal to) is totally or
linearly ordered.
Example 6: Define poset. Give an example of a set X such that (P ( X ), ⊆ ) is totally ordered set.
[U.P.T.U. (B.Tech.) 2006, 2007]
/
If a < b and no elements of A lies between a and b i.e. ∃ c ∈ A such that a < c < b.
240 Discrete Mathematical Structures
A graphical representation of a partial ordering relation in which all arrow heads are understood to be
pointing upward is known as the Hasse diagram of the relation.
In Hasse diagram, we represent each element of A as a node or vertex of the graph and we draw a rising line
from a to b if b covers a. These lines intersected only at the vertices of the graph. Subgraphs of the types
shown in Fig. 6.1 and Fig. 6.2 do not appear in Hasse diagrams of posets because in each case the left
branch says that cover b, whereas the right branch contradicts this on the other hand. Fig. 6.3 and Fig. 6.4
represent distinct posets.
a
a a a
d d e
c c d e
c c
b b b b
Fig. 6.1 Fig. 6.2 Fig. 6.3 Fig. 6.4
Not Poset
Posets
(ii) Draw the Hasse diagram of the relation S defined as ‘‘divides’’ on set B where
B = {2, 3, 4, 6, 12, 36, 48} [U.P.T.U. (B.Tech.) 2008]
Partial Order Sets and Lattices 241
Solution: (i) The Hasse diagram is given below (ii) The Hasse diagram is given below.
48 36 48
72
24 12
4 6
12
3 4
2 3
Fig. 6.5 Fig. 6.6
Example 8: Let A be the set of factors of a particular positive integer m and let ≤ be the relation ‘‘divides’’ i.e.
≤ = {( x, y ): x ∈ A, y ∈ A and x ‘|’ y} draw Hasse diagrams for
(a) m = 12 (b) m = 30 (c) m = 45
[U.P.T.U. (B.Tech.) 2005, 2008; M.C.A. (Uttranchal) 2007, 2009; M.K.U. (B.E.) 2001, 2003; U.P.T.U. (M.C.A.) 2008-2009]
Solution: (a) A = {1, 2, 3, 4, 6, 12}
(b) A = {1, 2, 3, 5, 6, 10, 15} (c) A = {1, 3, 5, 9, 15}
The Hasse diagrams is given below
12 30
6 4 6
10 15
15 9
3 2 3 5 3
2 5
1 1
1
(a) (b) (c)
Fig. 6.7 Fig. 6.8 Fig. 6.9
Example 9: Draw the Hasse diagram for the partial ordering {( A, B ): A ⊆ B} on the power set P (S ) where
S = {a, b, c}. [U.P.T.U. (B.Tech.) 2003; R.G.P.V. (Bhopal) 2005, 2009]
P (S ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
The Hasse diagram of the poset (P (S ), ⊆ ) is {a, b} {a, c} {b, c}
{a} {c}
{b}
φ
Fig. 6.10
242 Discrete Mathematical Structures
Example 10: The directed graph G for a relation R on set A = {1, 2, 3, 4} is shown in
1 2
Fig. 6 .11.
(i) Verify that ( A, R ) is a poset and find its Hasse diagram.
(ii) How many more edges are needed in the figure to extend ( A, R ) to a total
3 4
order?
Fig. 6.11
Solution: (i) The relation R corresponding to the given digraph is R = {(1, 1), (2, 2), (3, 3), (4, 4), (3, 1),
(3, 4), (1, 4), (3, 2)} R is a partial order relation if it is
Example 11: Let A = {1, 2, 3, 4, 6, 8, 9, 12, 18, 24} be ordered by the relation ‘‘a divides b’’. Draw the Hasse
diagram. [P.T.U. (B.E.) Punjab 2009]
24
24
8 12 18 8 12 18
Or
6 4 6 9
9
4
2 3
2 3
1
1
Fig. 6.13 Fig. 6.14
Example 12: Draw the Hasse diagram of B 3 with ‘‘≤’’ as defined for matrices of o’s and f ’s
| 0 , where B 3 are matrices with one row
[(rij )m × n ≤ (sij )m × n] iff rij ≤ sij ∀ i and j where 0 ≤ 0, 0 ≤ 1, 1 ≤ 1, 1 ≤
and three column. [R.G.P.V. (B.E.) Bhopal 2006; R.G.P.V. (B.E.) Raipur 2008]
3
Solution: The Hasse diagram of R is given below.
Partial Order Sets and Lattices 243
(1, 1, 1)
(0, 0, 0)
Fig. 6.15
Example 13: Let S be any class of sets. Prove that the relation of set inclusion ⊆ is a partial order relation on S.
where x1 + x 2 + x 3 + x 4 = 2 + 3 + 4 + (− 5) = 4
and y1 + y 2 + y 3 + y 4 = (− 2) + (− 3) + 8 + 1 = 4
i.e., x1 + x 2 + x 3 + x 4 = y1 + y 2 + y 3 + y 4 ; nevertheless
2 3 − 2 − 3
4 − 5 ≠ 8 1
i.e., x ≠ y.
Partial Order Sets and Lattices 245
Example 17: Let X be the set of all complex numbers z = x + iy. For, z1 = x1 + iy1 and z2 = x 2 + iy 2, let the
meaning of z1 ≤ z2 be: x1 ≤ x 2 an y1 ≤ y 2 where ≤ has usual meaning for the real numbers.
(i) Is ≤ an order relation on X? (ii) Is ( X , ≤ ) a chain?
(ii) The given relation ≤ is not totally ordered on the set X, because the law of dichotomy is in general are
not true in X. If z1 = x1 + iy1 , z2 = x 2 + iy 2 ∈ Z then it is not necessary true that either
z1 ≤ z2 or z2 ≤ z1
For example, if z1 = 3 + 4 i , z2 = 5 − 7i ∈ X , then 3 < 5, − 7 < 4
∴ neither z1 ≤ z2 nor z2 ≤ z1 . Hence, ( X , ≤ ) is not a chain.
Example 18: Draw the Hasse diagrams of
(i) (D 8 , ‘|’) (ii) (D 6 , ‘|’) [M.C.A. (Uttranchal) 2007]
(iii) A = {2, 3, 5, 30, 60, 120, 180, 360, ‘|’} [I.G.N.O.U. 2004, 2009; R.G.P.V. (B.E.) Bhopal 2005, 2007]
4 2 3
2
1
360
4 6 9
120 180
60
2 3
30
2 3 5 1
Fig. 6.18 Fig. 6.19
Example 19: Show that there are only five distinct Hasse diagrams for partially ordered sets that contain
three elements.
Solution: Let us consider that a ≤ b if a| b and consider the set
A = {2, 3, 5} B = {2, 3, 4}
C = {2, 3, 6} D = {2, 4, 6}
E = {2, 4, 8}, then its Hasse diagrams are:
8
4
6
4
4 6
2 3 5 2 3 2 3 2
(A, ≤) (B, ≤) (C, ≤) (D, ≤) (E, ≤)
Fig. 6.20
Partial Order Sets and Lattices 247
2 3
Fig. 6.21
Step 3: All edges are pointing upwards remove arrows from edges, replace circles by 4
dots.
1
Fig. 6.24
Example 21: Draw Hasse diagram for the following relations on set
(i) A = {1, 2, 3, 4, 12}
R = {(1, 1), (2, 2), (3, 3), (4, 4), (12, 12), (1, 2), (4, 12), (1, 3), (1, 4),
(1, 12), (2, 4), (2, 12), (3, 12)}
(ii) A = {1, 2, 3, 4, 5}
R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 4), (3, 5), (2, 2), (3, 3), (4, 4), (5, 5)}
248 Discrete Mathematical Structures
(iii) A = {1, 2, 3, 4, 5}
R = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (1, 2), (4, 5), (1, 3), (1, 4), (1, 5), (2, 4), (2, 5), (3, 5)}
Solution: (i) The digraph for the given relation R is
4
12
2
3
Fig. 6.25
Fig. 6.26
12
4
3
Fig. 6.28
Partial Order Sets and Lattices 249
Fig. 6.29
Step 3: All edges are painting upwards, remove arrows from edges replace circles by dots.
Hence Hasse diagram is
(iii) The diagraph for the given relation set R is Fig. 6.32
4 5
2 3
Fig. 6.33
250 Discrete Mathematical Structures
Fig. 6.34
Fig. 6.35
Step 3: Circles are replaced by dots. Arrows are also removed. Hence, the required Hasse diagram is
5
4
3
2
Example 22: Determine the Hasse diagram of the relation on A = {1, 2, 3, 4, 5}, 1
whose matrix is shown. Fig. 6.36
1 2 3 4 5 1 2 3 4 5
1 1 1 1 1 1 1 1 0 1 1 1
2 0 1 1 1 1 2 0 1 1 1 1
(i ) M R = 3 0 0 1 1 1 (ii) MR = 3 0 0 1 1 1
4 0 0 0 1 1 4 0 0 0 1 0
5 0 0 0 0 1 5 0 0 0 0 1
Fig. 6.37
Partial Order Sets and Lattices 251
Fig. 6.38
Step 2: Remove transitive edges (2, 5), (1, 3), (2, 4), (1, 5), (1, 4) and (3, 5)
Fig. 6.39
Step 3: Circles are replaced by dots and all edges are pointing upwards. Arrows are removed.
1
Fig. 6.40
Fig. 6.41
252 Discrete Mathematical Structures
2 3
1
Fig. 6.42
5
4
2 3
1
Fig. 6.43
Step 3: Circles are replaced by dots. Arrows are removed. All edges are pointing upwards. Hence the
required Hasse diagram is
Fig. 6.44
Example 23: Determine the matrix of the partial order whose diagram is given in fig. 6.45
Fig. 6.45
Partial Order Sets and Lattices 253
Fig. 6.46
i.e. 1 R 2 and 2 R 4 ⇒ 1 R 4
1 R 3 and 3 R 5 ⇒ 1 R 5
4 5
2 3
Fig. 6.47
Step 3: Put cycles on all circles
Fig. 6.48
R = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (1, 2), (2, 4), (1, 4), (1, 3), (3, 5), (1, 5)}
254 Discrete Mathematical Structures
Example 24: Let A = {a, b, c, d} and P ( A ) is its power set. Draw diagram for (P ( A ), ⊆ ).
P ( A ) = {φ, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}, {a, b, c}, {a, b, d},
MR =
Fig. 6.49
Example 25: Let A = {a, b, c}. Show that (P ( A ), ⊆ ) is a poset and draw its Hasse diagram.
[U.P.T.U. (B.Tech.) 2007]
Solution: We have A = {a, b, c}. Then
P ( A ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
Then (P ( A ), ⊆ ) will be posets if
{a, b, c}
{φ}
Fig. 6.51
Step 2: Remove transitive edges (φ, {a, b}), (φ, {a, c}), (φ, {b, c}), (φ, {a, b, c}), ({a}, {a, b, c}), ({b}, {a, b, c}),
({c}, {a, b, c})
Step 3: All edges are pointing upwards. Now replace circles by dots and remove arrow from edges.
Hence, required Hasse diagram is
{a, b, c}
φ
Fig. 6.52
Example 26: Let A = {a, b}, Show that (P ( A ), ⊆ ) is poset and draw its Hasse diagram.
[Raipur (B.E.) 2008; Rohtak (B.E.) 2007]
Solution: We have A = {a, b}. Then P ( A ) = {φ, {a}, {b}, {a, b}}
Then (P ( A ) ⊆ ) will be poset. See example 25.
Hence, (P ( A ), ⊆ ) is a poset.
258 Discrete Mathematical Structures
R = {(φ, φ ), (φ, {a}), (φ, {b}), (φ, {a, b}), ({a}, {a})
({a}, {b}), ({a}, {a, b}), ({b}, {b}), ({b}, {a, b}), ({a, b}, {a, b})}.
{a, b}
{a} {b}
Fig. 6.53
Fig. 6.54
Partial Order Sets and Lattices 259
{a, b}
{a} {b}
Fig. 6.55
Now, replaced circles by dots and remove arrows from edges. Hence, required Hasse diagram is
{a, b}
{a} {b}
{φ}
Fig. 6.56
Example 27: Let (P , ≤ ) be a partially ordered set. Where P = {1, 2, 3, 4, 5} and ≤ is the
relation of division which partially ordered the set P. Draw the Hasse diagram of P.
Solution: The Hasse diagram is shown in fig. 6 . 57
The maximal elements of P is 3, 4, 5
The minimal elements of P is 1.
Fig. 6.57
Example 28: Find all the maximal and minimal elements of posets whose Hasse diagrams are given in the
figures below.
(i) 3 (ii) f g
5
4 d e
2
6
a b c
1
Fig. 6.58
Maximal elements: 3, 5
Solution: (i)
Minimal elements: 1, 6
Maximal elements: f , g
(ii)
Minimal elements: a, b, c
Example 29: Find all the maximal and minimal elements of the posets whose Hasse diagrams are given in the
figures
(i) 5 6 (ii) 7
4
4 6 8
3 5
3 2 9
2 1
1
Fig. 6.59
Maximal elements: 5, 6
Solution: (i)
Minimal elements: 1
Maximal elements: 4, 7
(ii)
Minimal elements: 1, 9, 8
Partial Order Sets and Lattices 261
The greatest element is also called Last Element or Unit Element of A. The greatest element if exists is
unique. It may happen that the greatest element does not exist. The greatest element is generally denoted by 1.
Note: Greatest element is also called as universal upper bound. Least element is also called as univeral upper
bound.
Example 30: Find the greatest and least elements of following Hasse diagrams.
c e
a f
Fig. 6.61
(i) Upper bound for {c, e} is d lub {c, e} or sup {c, e} = d . Lower bound for {c, e} are the elements b, a and f
glb {c, e} = inf {c, e} = b
(ii) Lower bound for {a, f } are the the elements b, c, e, d lub {a, f } = b = sup {a, f } lower bounds of a, f do not
exist.
Example 31: Show that a poset has atmost one greatest and atmost one least element.
[U.P.T.U. (B.Tech.) 2002, 2004]
Solution: Let a and b are the greatest element of a poset A. Then, since b is the greatest element, we have
a≤b ...(1)
Similarly, since a is the greatest element, we have
b≤a ...(2)
Then from (1) and (2) b = a by antisymmetric property of poset.
Similarly it can be proved for least element. Hence a poset has atmost one greatest and one least element.
Example 32: Consider the set A = {1, 2, 3, 4, 5}. Define the relation < on A such that x < y iff
∴ (a mod 3) ≤ (c mod 3)
or a≤c
Hence, it is transitive. Therefore ( A, ≤ ) is poset.
(ii) The Hasse diagram for A = {1, 2, 3, 4, 5}
2
4
1 3
Fig. 6.62
Maximal element = 5
(iii)
Minimal element = 1 and 3
Example 33: Consider the partially order set A = {2, 4, 6, 8} where 2| 4 means 2 divide 4 show with reason
whether the following statements are true or false.
(i) Every pair of elements in the poset has a greatest lower bound.
(ii) Every pair of elements in the poset has a least upper bound.
(iii) This poset is a lattice. [U.P.T.U. (B.Tech.) 2002]
Solution: Now first we draw the Hasse diagram under relation of divisor
Fig. 6.63
∧ 2 4 6 8
2 2 2 2 2
4 2 4 2 4
6 2 2 6 2
8 2 4 2 8
Example 34: Consider the poset A = (1, 2, 3, 4, 6, 9, 12, 18, 36}, ‘|’) . Find the greatest lower bound and least
upper bound of the sets {6, 18} and {4, 6, 9}.
Solution: Hasse diagram under relation of divisibility
36
12 18
4 6 9
2 3
1
Fig. 6.64
An integer is a lower bound of {6, 18} if 6 and 18 are divisible by this integer. Only such integers are 1 and
6. Since 1| 6, 6 is the greatest lower bound of {6, 18}. Hence glb {6, 18} = 6
An integer is an upper bound of {6, 18} if and only if it is divisible by 6 and 18 which is 18.
Illustration: The set of real numbers R and the set of all integer I (with the usual ordering ≤) are not
well-ordered.
Theorem 3: If A and B are two posets then A × B is also a poset, where (a, b) ≤ (c, d )if and only if a ≤ c, b ≤ d
[U.P.T.U. (B.Tech.) 2009]
Example 35: Elaborate the term isomorphic poset? Let A = {1, 2, 3, 4} and ≤ (relation) be partial order of
divisibility on A. Let B = {0, 1, 2, 3, 4} and ≤ (relation) be usual less than or equal to an set B. Show that ( A, ≤ )
and (B, ≤ ) are isomorphic poset. [U.P.T.U. (B.Tech.) 2002]
Solution: We have
A = {1, 2, 3, 4}, ≤ : divisibility relation
R = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (1, 3), (1, 4), (2, 4)}
Partial Order Sets and Lattices 267
Whose diagram is
Fig. 6.65
0 1
2 3
Fig. 6.66
( A, ≤ ) and (B, ≤ ) are isomorphic poset because there exist function f which is one-one and onto.
Example 36: Let A = {1, 2, 4, 8} and let ≤ be the partial order of divisibility on A. Let A′ = {0, 1, 2, 3} and let ≤
be the usual relation ‘‘less than or equal to’’ on integers. Show that ( A, ≤ ) and ( A′ , ≤ ) are isomorphic posets.
[U.P.T.U. (B.Tech.) 2003, 2008]
Solution: The Hasse diagram of ( A, ‘|’) is
8
1
Fig. 6.67
268 Discrete Mathematical Structures
0
Fig. 6.68
The mapping f : A → A′ .
Since both have same Hasse diagram, every element of A maps to only a single element in A and both have
same number of elements. Hence it is one-one onto.
⇒ 0 <1
And 2 ‘|’ 4 ⇒ f (2) < f (4)
⇒1 < 2
Hence, f : A → A′ is an isomorphism
Example 37: Let A = {1, 2, 3, 4, 6, 12}. Let R be the partial order relation on A given by x R y iff x ‘|’ y. Then
( A, R ) is a poset. Consider another poset ( A, ≤ ) in which ≤ denotes the usual ‘‘less than equal to’’ relation on A.
The ( A, R ) and ( A, ≤ ) are not isomorphic. The Hasse diagrams of ( A, R ) and ( A, ≤ ) are given below
12
12 6
4 6 4
2 3 2
1 1
Fig. 6.69
Solution: The poset ( A, R ) and ( A, ≤ ) are not isomorphic. Let 4 and 6 be two distinct element in ( A, R ) and
f (4), f (6) be two distinct element in ( A, ≤ ). Now f (4) and f (6) are comparable in ( A, ≤ ), while 4 and 6 are
non-comparable.
Partial Order Sets and Lattices 269
Example 38: Show that the poset ( A, ≤ ) and (B, ≤ ), whose Hasse diagrams are given below in figure (i ) and
(ii ), respectively, are not isomorphic.
Solution: Since there is an one-one correspondence between (i) and (ii) so they are not isomorphic to
each other.
a3 b2 b3
a1 a2 b1
(i)
(ii)
Fig. 6.70
Example 39: Let A = {1, 2, 3, 6} and let ≤ the divisibility relation on A. Let B = {φ, {a}, {b}, {a, b}} and let ≤ be
the relation ⊆. Then ( A, ≤ ) and (B, ⊆ ) are isomorphic. [R.G.P.V. (B.E.) Bhopal 2008]
Then f is bijective isomorphic from ( A, ≤ ) to (B, ⊆ ). Hence ( A, ≤ ) and (B, ⊆ ) are isomorphic
6 {a, b} = f(6)
1 φ = f(1)
(i) (ii)
Fig. 6.71
6.11 Lattice
A partially ordered set (L, ≤ ) is said to be a lattice if every two elements in the set L has unique least upper
bound (sup) and a unique greatest lower bound (inf)
or
The poset (L, ≤ ) is a lattice if for every a, b ∈ L sup {a, b} and inf {a, b} exists in L. i.e.
sup {a, b} = a ∨ b = a joint b and Inf {a, b} = a ∧ b = a meet b
sup {a, b} = a ∪ b or a + b
Note: The other notations for
Inf {a, b} = a ∩ b or a . b
270 Discrete Mathematical Structures
Illustration: The set N of natural numbers under divisibility relation ‘|’ formed a lattice in which
a ∨ b = l c m (a, b) ∈ N
a ∧ b = gcd (a, b) ∈ N
Example 40: Determine whether the following Hasse diagrams represent lattice or not.
Partial Order Sets and Lattices 271
(ix) 5 (x) 6
5
4
3 4
2 3
1 2
[U.P.T.U. (B.Tech.) 2007] [U.P.T.U. (B.Tech.) 2007]
(xi) e
c d
a
[U.P.T.U. (B.Tech.) 2002; R.G.V.P. (B.E.) Bhopal 2005]
Fig. 6.72
Solution: (i) Construct the closure tables for lub (∨) or supremum or joint and glb (∧ )
∨ a b c d ∧ a b c d
a a b c d a a a a a
b b b c d b a b b b
c c c c d c a b c c
d d d d d d a b c d
Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
(ii) Construct the closure tables for lub (∨ ) and glb (∧ )
lub: glb:
∨ a b c d ∧ a b c d
a a b c d a a a a a
b b b c c b a b b a
c c c c c c a b c d
d d c c d d a a d d
272 Discrete Mathematical Structures
Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
Since each subset of two elements has not least upper bound but has greatest lower bound. So this is not
the lattice.
a a b c d e f g a a a a a a a a
b b b d d e f g b a b a b b b b
c c d c d e f g c a a c c c c c
d d d d d e f g d a b c d d d d
e e e e e e g g e a b c d e d e
f f f f f g f g f a b c d d f f
g g g g g g g g g a b c d e f g
Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
(v) Construct the closure tables for lub (∨ ) and glb (∧ ):
(∨) a b c d e f g (∧) a b c d e f g
a a a a a a a a a a b c d e f g
b a b a a b a b b b b e g e g g
c a a c a c c c c c e c f e f g
d a a a d a d d d d g f d g f g
e a b c a e c e e e e e g e g g
f a a c d c f f f f g f f g f g
g a b c d e f g g g g g g g g g
Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
Partial Order Sets and Lattices 273
a b c d e a b c d e
a a b c d e a a a a a a
b b b c e e b a b b a b
c c c c e e c a b c a c
d d e e d e d a a a d d
e e e e e e e a b c d e
Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
(vii) Construct the closure tables for lub (∨ ) and glb (∧ ).
lub: glb:
∨ a b c d e f ∧ a b c d e f
a a c c d e f a a − a a a a
b c b c d e f b − b b b b b
c c c c d e f c a b c c c c
d d d d d e f d a b c d d d
e e e e e e − e a b c d e d
f f f f f − f f a b c d d f
Since e ∨ f and a ∧ b does not exist. Then given poset is not lattice.
(viii) Construct the closure tables for lub (∨ ) and glb (∧ )
lub: glb:
∨ 1 2 3 4 5 6 ∧ 1 2 3 4 5 6
1 1 2 3 4 5 6 1 1 1 1 1 1 1
2 2 2 6 4 6 6 2 1 2 1 2 1 1
3 3 6 3 6 6 6 3 1 1 3 1 3 3
4 4 4 6 6 6 6 4 1 2 1 4 1 4
5 5 6 5 6 5 6 5 1 1 3 1 5 5
6 6 6 6 6 6 6 6 1 2 3 4 5 6
Since each subset of two elements has least upper bound and a greatest lower bound. So this is the lattice.
274 Discrete Mathematical Structures
∨ 1 2 3 4 5 ∧ 1 2 3 4 5
1 1 2 3 4 5 1 1 1 1 1 1
2 2 2 4 4 5 2 1 2 1 2 2
3 3 4 3 4 5 3 1 1 3 3 3
4 4 4 4 4 5 4 1 2 3 4 4
5 5 5 5 5 5 5 1 2 3 4 5
Since each subset of two elements has least upper bound and greatest lower bound. So this the lattice.
(x) Since 1 ∧ 2 does not exist so it is not lattice.
(xi) Construct the closure tables for lub (∨ ) and glb (∧ ).
lub: glb:
∨ a b c d e ∧ a b c d e
a a b c d e a a a a a a
b b b c d e b a b b b b
c c c c e e c a b c b c
d d d e d e d a b b d d
e e e e e e e a b c d e
Since each subset of two element has least upper bound and a greatest lower bound. So this is the lattice.
Example 41: Let S be any non empty set and P (S ) be its power set. Show that (P (S ), ⊆ ) is a lattice.
Solution: We have shown that (P (S ), ⊆ ) is a poset. Also for any two set {a, b, c}
A, B ∈ P (S ), we have
P (S ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
Example 42: For any positive integer m, D m denote the set of divisors of m ordered of divisibility, then
(D m , ‘|’) is lattice, where
sup (a, b) = lcm (a, b)
inf (a, b) = gcm (a, b)
for any pair a, b in D m .
i.e. D 36 = {1, 2, 3, 4, 6, 9, 12, 18, 36} is lattice.
[I.G.N.O.U. (M.C.A.) 2005, 2009; M.K.U. (B.E.) 2008; U.P.T.U. (B.Tech.) 2004]
36
12 18
4 6 9
2 3
1
Fig. 6.74
Since each subset of two elements least upper bound and a greatest lower bound. So this is the lattice.
Example 43: Let L be the set of all factor of 12 and let ‘|’ be the divisibility relation on L. Show that (L, ‘|’) is a
lattice.
Solution: Construct the closure table for ∨ and ∧
where a ∨ b = sup {a, b} = lcm (a, b)
a ∧ b = inf {a, b} = gcd (a, b)
∨ 1 2 3 4 6 12 ∧ 1 2 3 4 6 12
1 1 2 3 4 6 12 1 1 1 1 1 1 1
2 2 2 6 4 6 12 2 1 2 1 2 2 2
3 3 6 3 12 6 12 3 1 1 3 1 3 3
4 4 4 12 4 12 12 4 1 2 1 4 2 4
6 6 6 6 12 6 12 6 1 2 3 2 6 6
12 12 12 12 12 12 12 12 1 2 3 4 6 12
Since each subset of every two elements in L has ∨ and ∧. Then ≤ (L, ‘|’) is lattice.
Hence a ∧ b ≤ a.
Theorem 7: Let (L, ≤ ) be a lattice and let ∧ and ∨ denote the operations of meet and joint in L. Then for any
a, b ∈ L.
(i) a≤b⇔a∧ b=a (ii) a ≤ b ⇔ a ∨ b = b (iii) a∧ b⇒a⇔a∨ b=b
Proof: (i) Let a ∧ b = a. Since a ∧ b = inf {a, b} ⇒ a ∧ b ≤ b.
Now a∧ b≤b⇒a≤b [ a ∧ b = a]
Conversly, Let a ≤ b. By reflexivity of ≤ we have
a≤a
Now a ≤ b and a ≤ a ⇒ a is lower bound of {a, b}
⇒ a = inf {a, b} = a ∧ b
Since a ∧ b infimum of {a, b}, we have
a∧ b≤a
∴ a ≤ a ∧ b and a ∧ b ≤ a ⇒ a ∧ b = a (By antisymmetry)
(ii) Let a ∨ b = b, then show a ≤ b
Since a ∨ b = sup {a, b}
⇒a≤a∨ b
Now, a ≤ a ∨ b and a ∨ b = b ⇒ a ≤ b
278 Discrete Mathematical Structures
Theorem 8: Let (L, ≤ ) be a lattice and a, b, c ∈ L. Then the following implications hold:
(i) a ≤ b and a ≤ c ⇒ a ≤ b ∨ c (ii) a ≤ b and a ≤ c ⇒ a ≤ b ∧ c.
Proof: (i) Suppose a ≤ b and a ≤ c. From the definition of join operation in lattice (L, ≤ ), we have
b ∨ c = sup {b, c}
⇒ b ∨ c is an upper bound of {b, c}
⇒ b ≤ b ∨ c.
Now, by transitivity of the relation ≤ , we have
a ≤ b and b ≤ b ∨ c ⇒ a ≤ b ∨ c.
(ii) Suppose a ≤ b and a ≤ c. Then
a ≤ b and a ≤ c ⇒ a is a lower bound of {b, c}
⇒ a ≤ glb {b, c}
⇒a≤b∧ c [Q glb {b, c} = b ∧ c]
Corollarly: Let (L, ≤ ) be a lattice and (L, ≥ ) be its dual. Then for a, b, c ∈ L,
(i) a ≥ b and a ≥ c ⇒ a ≥ b ∧ c (ii) a ≥ b and a ≥ c ⇒ a ≥ b ∨ c .
Proof: Applying principle of duality on Theorem 8, we get the results.
Theorem 9: Let (L, ≤ ) be a lattice and a, b, c, d ∈ L. Then the following implications hold:
(i) a ≤ b and c ≤ d ⇒ a ∨ c ≤ b ∨ d (ii) a ≤ b and c ≤ d ⇒ a ∧ c ≤ b ∧ d.
Proof: (i) Suppose that a ≤ b and c ≤ d. By the definition of join operation ∨ in lattice (L, ≤ ), we have
b ≤ b ∨ d and d ≤ b ∨ d.
Now, by transitivity of the relation ≤, we have
a ≤ b and b ≤ b ∨ d ⇒ a ≤ b ∨ d .
Similarly, c ≤ d and d ≤ b ∨ d ⇒ c ≤ b ∨ d .
Now, a ≤ b ∨ d and c ≤ b ∨ d ⇒ b ∨ d is an upper bound of {a, c}
⇒ lub {a, c} ≤ b ∨ d
⇒a∨ c≤b∨ d [Q a ∨ c = lub {a, c}]
(ii) Suppose that a ≤ b and c ≤ d. By the definition of meet operation ∧ in lattice (L, ≤ ), we have
a ∧ c ≤ a and a ∧ c ≤ c.
By transitivity of the relation ≤, we have
a ∧ c ≤ a and a ≤ b ⇒ a ∧ c ≤ b.
Similarly, a ∧ c ≤ c and c ≤ d ⇒ a ∧ c ≤ d
Partial Order Sets and Lattices 279
Theorem 11: Show that dual of a lattice is a lattice. [U.P.T.U. (B.Tech.) 2004, 2007]
Solution: Let (L, ≤ ) be a lattice and let (L, ≥ ) be its dual, where the relation ≥ is defined as
x ≥ y if and only if y ≤ x.
We now show that ≥ is reflexive, antisymmetric and transitive.
( P1 ) ≥ is reflexive: Let a ∈ L. Since ≤ is reflexive, we have
a ≤ a ∀ a ∈L ⇒ a ≥ a ∀ a ∈L ⇒ ≥ is reflexive.
( P2 ) ≥ is anti-symmetric: Let a, b ∈ L be such that a ≥ b and b ≥ a. Then
a ≥ b and b ≥ a ⇒ b ≤ a and a ≤ b
⇒a=b [Q ≤ is antisymmetric]
Thus a ≥ b and b ≥ a ⇒ a = b. Hence, ≥ is anti-symmetric.
( P3 ) ≥ is transitive: Let a, b, c ∈ L be such that a ≥ b and b ≥ c. Then
a ≥ b and b ≥ c ⇒ b ≤ a and c ≤ b
⇒ c ≤ b and b ≤ a
⇒c≤a [Q ≤ is transitive]
⇒ a ≥ c.
Thus a ≥ b and b ≥ c ⇒ a ≥ c. Hence, ≥ is transitive.
Therefore, ≥ is a partial order relation and L, and so (L, ≥ ) is a poset.
Let a, b ∈ L. Then since (L, ≤ ) is a lattice, sup {a, b} exists in (L, ≤ ).
Let a ∨ b = sup {a, b} in (L, ≤ ). Then
a ≤ a ∨ b and b ≤ a ∨ b.
Now a ≤ a ∨ b and b ≤ a ∨ b
⇒ a ∨ b ≥ a and a ∨ b ≥ b
280 Discrete Mathematical Structures
Example 45: Let N denote the set natural numbers. For any a, b ∈ N , show that max {a, min {a, b}} = a and
min {a, max {a, b}} = a
Solution: We know a ∨ b = max {a, b} and a ∧ b = min {a, b}
By absorption law a ∧ (a ∨ b) = a ...(1)
a ∨ (a ∧ b) = a ...(2)
∴ min {a, max {a, b} = min {a, a ∨ b} = a ∨ (a ∧ b) = a
max {a, min {a, b} = max {a, a ∧ b} = a ∨ {a ∧ b} = a
∀ positive integers a and b.
6.14 Sub-lattice
A non empty subset M of lattice (L, ≤ ) is said to be a sub-lattice of L if M is closed with respect to meet (∧ )
and joint (∨ ) i.e.
x, y ∈ M ⇒ x ∨ y ∈ M and x ∧ y ∈ M
or
A non empty subset of M of lattice (L, ≤ ) is said to be sub-lattice of L if M itself formed lattice with respect to
∨ and ∧ operation.
Partial Order Sets and Lattices 281
Example 46: Consider the lattice of all the integer ‘|’ under the operation of divisibility. The lattice D n of all
divisors of n > 1 is a sub-lattice of ‘|’ . Determine all the sub-lattices of D 30 that contain at least four elements.
D 30 = {1, 2, 3, 5, 6, 10, 15, 30}
Solution: The sublattice of D 30 that solution at least four elements are as follows.
(i) {1, 2, 6, 30} (ii) {1, 2, 3, 30} (iii) {1, 5, 15, 30}
(iv) {1, 3, 6, 30} (v) {1, 5, 10, 30} (vi) {1, 3, 15, 30}
Example 47: Consider the lattice L = {1, 2, 3, 4, 5} as shown in fig. 6.75 Determine all sublattices with three
or more elements.
Fig. 6.75
Solution: All the sublattice with three or more elements are those whose least upper bound (lub) and
greatest lower bound (glb) exists for every pair of elements which are as.
(i) {1, 2, 5} (ii) {1, 3, 5} (iii) {1, 4, 5} (iv) {1, 2, 3, 5}
(v) {1, 3, 4, 5} (vi) {1, 2, 3, 4, 5} (vii) {1, 2, 4, 5}
Two lattice L1 and L 2 are isomorphic if there exists a one-to-one correspondence f : L1 → L 2 such that
f (a ∧ b) = f (a) ∧ f (b)
and f (a ∨ b) = f (a) ∨ f (b) ∀ a, b ∈ L1 and f (a), f (b) ∈ L 2
Example 48: Show that the lattice L and L′ given below are not isomorphic? [U.P.T.U. (B.Tech.) 2008]
f 5
d 4
e
b 2 3
c
a 1
(L) (L´)
Fig. 6.76
Example 49: Determine whether the lattice shown in Fig. 6.77 are isomorphic.
d
4
b c 3 2
a 1
L1 L2
Fig. 6.77
Solution: The lattice shown in fig. 6.77 are isomorphic. If we consider f = {(a, 1), (b, 2), (c, 3), (d, 4)}
i.e. f : L1 → L 2
a, b ∈ L1 ⇒ f (a), f (b) ∈ L 2
Then f (b ∧ c) = f (a) = 1
f (b) ∧ f (c) = 2 ∧ 3 = 1
Q f (b ∧ c) = f (b) ∧ f (c)
Again f (b ∨ c) = f (d ) = 4
f (b) ∨ f (c) = 2 ∨ 3 = 4
∴ f (b ∨ c) = f (b) ∨ f (1)
Hence, L1 and L 2 are isomorphic.
Example 50: Determine whether the lattice shown in fig.6.78 are isomorphic. [R.G.P.V. (B.E.) Bhopal 2009]
7
e
5 6
4
b c d
2 3
1
a
L1
Fig. 6.78
Solution: L1 and L 2 lattices are not isomorphic. Since one-one corresponding is not possible as the
element of two lattices are not same.
Partial Order Sets and Lattices 283
6.16 Distributive Lattice [U.P.T.U. (B.Tech.) 2009; I.G.N.O.U. (M.C.A.) 2001, 2004, 2006, 2009;
R.G.P.V. (B.E.) Bhopal 2005, 2008]
A lattice L is called distributive lattice if for any element a, b and c of L, it satisfies the following properties.
(i) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) (ii) a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)
Let (L, ≤ ) be lattice. Then L is said to be complete if every subset A of L, ∧ A and ∨ A exist in L. Thus, in every
complete lattice (L, ≤ ) there exist a greatest element g and a least element l.
Let (L, ≤ ) be a lattice. Then L is said to be bounded lattice if it has a least element 0 and a greatest element
1.0 is called the identity of joint and 1 is called the identity of meet in a bounded lattice (L, ∨, ∧ ) .
Theorem 14: Let L {a1 , a2, K an} be finite lattice then L is bounded.
Proof: Let L = {a1 , a2, a3 K an} be any finite lattice. Then we have to show that L having least and greatest
element.
Now, b1 = a1
b2 = a2 ∧ b1
b3 = a3 ∧ b2
.........................
.........................
.........................
bn = an ∧ bn −1
All b1 , b2, K bn ∈ L and bn ≤ ai ∀ i = 1, 2, 3 K n
⇒ bn is the least element of L
∴ bn = a1 ∧ a2 ∧ a3 K ∧ an
Similarly, a1 ∨ a2 ∨ a3 K ∨ an is the greatest element of L. Thus, L is bounded lattice.
Partial Order Sets and Lattices 285
Theorem 14: A lattice in which relative complements are unique is distributive. [Delhi (B.E.) 2009]
Proof: Let L be a lattice in which relative complements are unique. Then L cannot contain a pentagonal
sublattice in which relative complements are not unique. Similarly it cannot contain a sublattice
isomorphic with M 5. Hence L is distributive.
a ∨ ( a′ ∧ b) = a ∨ b
(iii) ( a ∧ b)′ = a′ ∨ b′ (iv)
a ∧ ( a′ ∨ b) = a ∧ b
[U.P.T.U. (B.Tech.) 2003, 2004, 2005]
Theorem 17: Prove that in a distributive lattice, if an element has a complement then this complement is
unique. [U.P.T.U. (B.Tech.) 2003, 2008, 2009]
Proof: Let (L, ≤ )be a bounded distributive lattice. Let a ∈ L having two complement b and c then show b = c
Theorem 18: If L is a distributive lattice and b′ is the complement of b in L and a ∧ b ′ = 0, then show a ≤ b.
Proof: We have a ∧ b ′ = 0
⇒ (a ∧ b ′ ) ∨ b = 0 ∨ b = b
⇒ (a ∨ b) ∧ (b ′ ∨ b) = b
⇒a∨ b=b
⇒a≤b
Theorem 20: In any lattices (L, ∨, ∧ ) the following statements are equivalent
(i) a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) ∀ a, b, c ∈ L (ii) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) ∀ a, b, c ∈ L
Proof: Let (i) → (ii) i.e. (i) is given than show (ii)
= [ a ∨ (c ∧ a) ∨ (c ∧ b)
= a ∨ (b ∧ c) = L.H.S. of (ii)
Again (ii) → (i) it can be show in dual number.
Partial Order Sets and Lattices 287
⇒ 0 R a, 0 R a ′ and a R 1, a ′ R 1
⇒ a R 0, a ′ R 0 and 1 R a, 1 R a ′
⇒ 0 is an upper bound of {a, a′ } in {L, R } and 1 is a lower bound of {a, a′ } in {L, R }.
Theorem 22: Two bounded lattices L1 and L 2 are complemented iff L1 × L 2 is complemented.
Proof: Let L1 and L 2 be two complemented lattices and let 0, 1 and 0 ′ , 1 ′ are least and greatest elements of
L1 and L 2 respectively. Then (0, 0 ′ ) and (1, 1′ ) will be the least and greatest elements of L1 × L 2. Let (a1 , a2 )
be any element of L1 × L 2 then a1 ∈ L1 and a2 ∈ L 2.
Since L1 and L 2 are complemented, there exists a1 ′ ∈ L1 and a2′ ∈ L 2 such that a1 ∧ a1 ′ = 0, a ∨ a ′ = 1 and
a2 ∧ a2′ = 0′ and a2 ∨ a2′ = 1. We shall show that (a1 ′ , a2′ ) is the complement of (a1 , a2 ) in L1 × L 2.
We have (a1 , a2 ) ∧ (a1 ′ , a2′ ) = (a1 ∧ a1 ′ , a2 ∧ a2′ ) = (0, 0 ′ )
and (a1 , a2 ) ∨ (a1 ′ , a2′ ) = (a1 ∨ a1 ′ , a2 ∨ a2′ ) = (1, 1′ ).
This shows that (a1 ′ , a2′ ) is the complement of (a1 , a2 ) in L1 × L 2.
Hence L1 × L 2 is complemented.
Conversely, Let L1 × L 2 be complemented, we have to show that L1 and L 2 are complemented.
Let a1 ∈ L1 and a2 ∈ L 2 then (a1 , a2 ) ∈ L1 × L 2.
Since L1 × L 2 is complemented, therefore exists (a1 ′ , a2′ ) ∈ L1 × L 2 such that
(a1 , a2 ) ∧ (a1 ′ , a2′ ) = (0, 0′ )
and (a1 , a2 ) ∨ (a1 ′ , a2′ ) = (1, 1′ )
⇒ (a1 ∧ a1 ′ , a2 ∧ a2′ ) = (0, 0′ ) and (a1 ∨ a1 ′ , a2 ∨ a2′ ) = (1, 1′ )
⇒ a1 ∧ a1 ′ = 0, a2 ∧ a2′ = 0′ and a1 ∨ a1 ′ = 1, a2 ∨ a2′ = 1′
⇒ a1 ∧ a1 ′ = 0, a1 ∨ a1 ′ = 1 and a2 ∧ a2′ = 0′ , a2 ∨ a2′ = 1′
⇒ a1 ′ and a2′ are complements of a1 and a2 respectively. Hence L1 and L 2 are complemented.
288 Discrete Mathematical Structures
Theorem 23: Show that every chain is a distributive lattice. [U.P.T.U. (B.Tech.) 2004]
Theorem 25: In lattice L with least element 0 and greatest element 1, show that 0 is the unique. Complement
of 1 and 1 is the unique complements of 0. [R.G.P.V. (B.E.) Raipur 2005, 2009; Kurukshetra (B.E.) 2008]
1
c
a
o
Proof: Let a ≤ c Fig. 6.79
and a ∨ (b ∧ c) = a ∨ 0 = a
(a ∨ b) ∧ c = 1 ∧ c = c
∴ a ∨ (b ∧ c) ≠ (a ∨ b) ∧ c
Therefore, the pentagonal lattice is not modular.
Theorem 28: Every distributive lattice is modular. [M.K.U. (B.E.) 2008; P.T.U. (B.E.) Punjab 2008]
Theorem 29: Show that a lattice L is modular iff for any a, b, c ∈ L, the following condition holds
a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c)
Proof: Let L is modular then
a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c ...(1)
Since a ≤ c then from (1)
a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c)
Conversely, Let for all a, b, c ∈ L
a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c) ...(2)
Then show L is modular. Let a, b, c ∈ L, a ≤ c then a ≤ c
Hence from (2), we have
a ≤ c ⇒ a ∨ (b ∧ c) = (a ∨ b) ∧ c
⇒ L is modular.
Example 51: If A = {a, b, c}. Prove that lattice (P ( A ), ∩, ∪ )(under ⊆) is distributive when P ( A ) = power set
of A.
Solution: Let A = {a, b, c} then power set
P ( A ) = {φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
The Hasse diagram is shown in fig. 6.80
{a, b, c}
{a, c}
{a, b} {b, c}
{a} {c}
{b}
φ
Fig. 6.80
A ∧ (B ∨ C ) = ( A ∧ B ) ∨ ( A ∧ C )
A ∨ (B ∧ C ) = ( A ∨ B ) ∧ ( A ∨ C )
Example 52: The lattice (L, ≤ ) in fig. 6.81 is not a distributive lattice.
a
b c d
e
Fig. 6.81
∴ b ∧ (c ∨ d ) = b ∧ a = b
and (b ∧ c) ∨ (b ∧ d ) = e ∨ e = e
Thus, b ∧ (c ∨ d ) ≠ (b ∧ c) ∨ (b ∧ d )
Example 53: Show that the lattice shown in Fig. 6.82 are non-distributive.
b a
o c
Fig. 6.82
Solution: We have a ∧ (b ∨ c) = a ∧ 1 = a
and (a ∧ b) ∨ (a ∧ c) = 0 ∨ c = c
∴ a ∧ (b ∨ c) ≠ (a ∧ b) ∨ (a ∧ c)
Hence, the lattice is not distributive.
Conversely: Let the condition (1) hold, then shown (L, ≤ ) is a distributive lattice.
We first show that (L, ≤ ) is a modular lattice.
Since a ∧ b ≤ a, a ∧ c ≤ a ⇒ (a ∧ b) ∨ (a ∧ c) ≤ a ∨ a
Then (a ∧ b) ∨ (a ∧ c) ≤ a ...(2)
= [(a ∧ b) ∨ (c ∧ a) ∨ (b ∧ (c ∧ a))]
= (a ∧ b) ∨ (c ∧ a)
Let a, b, c ∈ M . Then a, b, c ∈ L.
a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) in L
⇒ a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) in M.
⇒ M is distributive.
Partial Order Sets and Lattices 293
Example 54: Let A = {1, 2, 3, 5, 30} and a ≤ b iff a divided b. The Hasse diagram is shown in Fig. 6.83 Find
complement of 2. [U.P.T.U. (B.Tech.) 2002]
30
2 3 5
1
Fig. 6.83
Solution: Since 2 ∧ 3 = 1, 2 ∨ 3 = 30
2 ∧ 5 = 1, 2 ∨ 5 = 30
Hence, 2 has two complement 3 and 5
Example 55: In the lattice defined by the Hasse diagram given by the following figure. 6.84.
a
b c
e d
f
Fig. 6.84
How many complements does the elements ‘e’ have? Given all [U.P.T.U. (B.Tech.) 2003, 2006, 2007]
Solution:
Since e ∧ g = f , e ∨ g = aand e ∧ d = f e ∨ d = a
where a is universal upper bound and f be universal lower bound. Hence, d, g be two complement of e.
Example 57: Consider the lattice D 30 = {1, 2, 3, 5, 6, 15, 30}, the divisor of 30 ordered by divisibility.
(i) Draw the Hasse diagram of D 30 (ii) Find the complement of 2 and 10, if exists.
Fig. 6.85
(ii) The elements 2 and 10 has no complement as they do not satisfying the condition of complement
a ∨ a ′ = 30 and a ∧ a ′ = 1. 30 is upper bound, 1 is lower bound.
Example 58: Let (L, ≤ ) be a distributive lattice and let c′ be the complement of an element c in L. If b ∧ c ′ = 0
then show that b ≤ c.
Solution: Since b ∧ c ′ = 0, then we have
(b ∧ c ′ ) ∨ c = 0 ∨ c = c
⇒ (b ∨ c) ∧ (c ′ ∨ c) = c
⇒ (b ∨ c) ∧ 1 = c
⇒ b∨c=c
⇒ b≤c
Example 59: Let (L, ≤ ) be a distributive lattice. Show that if a ∧ x = a ∧ y and a ∨ x = a ∨ y for some a ∈ L.
Then x = y. [U.P.T.U. (M.C.A.) 2005]
5. Let ≤ be partial ordering of a set S. Define the dual order on S. How is the dual order related to the
inverse of the relation ≤
6. What is meant of a ‘‘Hasse diagram’’. Draw the Hasse diagram of the relation R on A where
A = {1, 2, 3, 4} and R = {(1, 1), (1, 2), (2, 2), (2, 4), (1, 3), (3, 3), (3, 4), (1, 4), (4, 4)}.
10. Let D m denote the positive divisors of m ordered by divisiblity. Draw the Hasse diagram of
(a) D12 (b) D15 (c) D16 (d) D17
11. Let A be given finite set and P ( A ) is a power set. Let ⊆ be inclusion relation on the elements of P ( A ).
Draw Hasse diagrams of (P ( A ), ⊆ ) for
(i) A = {a} (ii) A = {a, b} (iii) A = {a, b, c}
[R.G.P.V. (B.E.) Bhopal 2006; P.T.U. (B.E.) Punjab 2008]
12. Let A = {1, 2, 3, 4, 5}. Determine the relations represented by the following Hasse diagram.
5
5 5
3 4 4 4
3
2 3
2
1 1 1 2
13. Let A = {1, 2, 3, 4, 5} be ordered set as shown in fig. 6.87 below. Find
(i) all minimal and maximal elements of A
(ii) greatest and least element of A
(iii) all linearly ordered subset of A, each of which contains at least three elements.
2
1
3 5
4
6
Fig. 6.87
14. Consider the subsets {2, 3}, {4, 6}, and {3, 6} in the poset ({1, 2, 3, 4, 5, 6}, ‘|’). Find for each subsets if
exists
(i) upper bound and lower bound
(ii) greatest lower bound and least upper bound.
15. Let S be ordered set in fig. 6.88 Suppose A = {1, 2, 3, 4, 5} is isomorphic to S and
f : {(a, 1), (b, 3), (c, 5), (d, 2), (e, 4)} is similarly mapping from S to A. Draw the Hasse diagram of A.
e
d c
a
Fig. 6.88
16. Draw the Hasse diagrams of all lattices with upto five elements.
d e
b
a c
o
Fig. 6.89
Partial Order Sets and Lattices 297
18. Show that lattice L represented by the diagram is complemented, modular but not distributive.
1
a b c d
o
Fig. 6.90
19. Show that lattice L, represented by the diagram is modular, distributive but not complemented.
Fig. 6.91
21. Prove that the dual of a lattices is also a lattice. [U.P.T.U. (B.Tech.) 2005]
23. Determine the matrix of the partial order whose Hasse diagrams are given below
b c d e
(i) (ii)
Fig. 6.92
298 Discrete Mathematical Structures
4
6. 7. (i) No (ii) Yes (iii) No
8. R1 = {(a, a), (b, b)}, R 2 = {(a, a), (b, b), (a, b)},
2 3
R 3 = {(a, a), (b, b), (b, a)}
8 1
4 6 5 3
4
3
2 2
1
1 1
Fig. 6.94
{a} {b}
{a, b} {a, c} {b, c}
φ
φ
{b} {c}
{a}
φ
Fig. 6.95
12. (i) {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5), (3, 3), (3, 5), (4, 4), (4, 5), (5, 5)}
(ii) {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5), (3, 3), (3, 4), (3, 5), (4, 4),
(4, 5), (5, 5)}
(iii) {(1, 1), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (2, 4), (2, 5)(3, 3), (3, 4), (3, 5), (4, 4), (4, 5), (5, 5)}
For {4, 6}, no upper bound and lower bounds are 2 and 1 glb {4, 6} = 2
For {3, 6} upper bound is 6 and lower bounds are 3 and 1 i.e. glb {3, 6} = 3 and lub {3, 6} = 6
15. 4 16.
2 5
1
Fig. 6.96
Fig. 6.97
a b c d e 1 2 3 4 5
a 1 1 1 1 1 1 1 1 1 1 1
b 0 1 0 0 0 2 0 1 0 1 0
23. (i) c 0 0 1 0 0 (ii) 3 0 0 1 0 1
d 0 0 0 1 0 4 0 0 0 1 0
e 0 0 0 0 1 5 0 0 0 0 1
300 Discrete Mathematical Structures
2. The maximum number of zero element and unit element each in a poset is:
(a) 0 (b) 1 (c) 2 (d) none of these
3. The lattice (P (S ), ⊆ ) is bounded with greatest and least elements equal to:
(a) S and φ respectively (b) φ and S respectively
(c) 0 and 1 respectively (d) none of these
4. Let X = {2, 3, 6, 12, 24}, let ≤ be partial order relation defined by x ≤ y is x divides y. Number of edges
in Hasse diagram of ( X , ≤ ) is:
(a) 3 (b) 4 (c) 9 (d) none of these [U.P.T.U. (M.C.A.) 2008]
5. Identify which of the following partially ordered sets shown in following figures are lattices:
3
3 2 4
2 3
1 4 1
Fig. 6.98
Fig. 6.99
7. In the lattice defined by the Hasse diagram as given. How many complements does the a
element e have
b c
(a) 2 (b) 3 g
(c) 0 (d) none of these e d
f
Fig. 6.100
8. A self complemented, distributive lattice is called:
(a) Boolean algebra (b) Modular lattice (c) Bounded lattice (d) Complete lattice
Partial Order Sets and Lattices 301
5. (i) lattice (ii) not lattice (iii) lattice (iv) not lattice (iv) not lattice
6. (i) lub = 6 glb does not exist (ii) lub = 6 glb does not exist (iii) lub = 12, glb = 6,
7. 2 8. (a) 9. (c)
7. True
❑❑❑
Boolean Algebra 303
7.1 Introduction
Boolean algebra was originally introduced by British Mathematician George Boole. This Mathematics is an
algebraic structure which is based on the principle of logics. George Boole published a research paper
named ‘Laws of Thoughts’ in which he described that different fundamental principles of logics can be
expressed by symbolic notations.
Suppose B is any set of numbers [or Sets or Objects or Statements or Switches] and in B two binary
operations ∪ and ∩ [or ∨ and or + and ] are defined, then the algebraic structure (B, ∪, ∩) [or (B, ∨, ∧) or
(B, +, .)] is called a Boolean Algebra if the laws given below hold.
The identity elements for the operations ∪ and ∩ are respectively empty set φ and universal set I, for
operations ∨ and ∧ are 0 (false, F) and 1 (true, T) and for operations + and (. ) are 0 and 1.
Remark: The binary operations + and . used in Boolean algebra are not the operations of ordinary
addition and multiplication.
Note: Clearly it follows from the definition that a Boolean algebra has at least two elements.
7.2.2 Definition 2
In definition 1 above, if operation + and . are respectively used in place of operations ∪ and ∩, and 0 and 1
are used in place of empty set φ and universal set I, the definition of Boolean Algebra is given as follows:
Let B be a set of elements a, b, c, ... and + and . are two binary operations, then the algebraic structure (B,
+, .) is called a Boolean algebra, if the elements of B obey the following laws:
0 is identity element of B with respect to ‘+’ and 1 is identity element of B with respect to ‘.’ .
(B6) 0 ≠ 1
(B1) Closure Law: From composition tables it clearly follows that closure laws hold for ∨ and ∧.
Composition Table for ∨
∨ 1 2 3 5 6 10 15 30
1 1 2 3 5 6 10 15 30
2 2 2 6 10 6 10 30 30
3 3 6 3 15 6 30 15 30
5 5 10 15 5 30 10 15 30
6 6 6 6 30 6 30 30 30
10 10 10 30 10 30 10 30 30
15 15 30 15 15 30 30 15 30
30 30 30 30 30 30 30 30 30
a a′
1 30
2 15
3 10
5 6
6 5
10 3
15 2
30 1
306 Discrete Mathematical Structures
we have a∨ b = b∨ a and a∧ b = b∧ a
Illustration: 3 ∨ 5 = 5 ∨ 3 = 15 , 10 ∧ 15 = 15 ∧ 10 = 5
(B4) Identity Elements: Identity element for ∨ is 1 and identity element for ∧ is 30, since ∀a ∈ B, we have
a ∨ 1 = 1 ∨ a = a and a ∧ 30 = 30 ∧ a = a
Illustration: 15 ∨ 1 = 1 ∨ 15 = 15 , 5 ∧ 30 = 30 ∧ 5 = 5
(B5) Complementation: For each a ∈ B there exists its complementary element b, such that
a ∨ b = 30 and a ∧ b = 1
Example 2: Show that the structure (B, +, ⋅ , ') is a Boolean algebra where B={0, 1} and ‘+’ and ‘.’ are two
binary operations and ‘ ' ’ a unary operation on B, defined by the following tables:
+ 0 1 . 0 1 a a'
0 0 1 0 0 0 0 1
1 1 1 1 0 1 1 0
Solution:
(B1) Closure Law: The closure law with respect to both + and . hold clearly from given tables.
(B2) Commutative Law: First two tables are symmetrical in rows and columns,
(B4) Distributive Law: Every operation is distributive over other operation. Since for 0, 1 ∈B, we have
(i) 0 + (1.0) = 0 + 0 = 0 and (0 + 1) (0 + 0) = 1.0 = 0
Hence 0 + (1.0) = (0 + 1) (0 + 0)
(ii) 1 (1 + 0) = 1.1 = 1 and 1.1 + 1.0 = 1 + 0 = 1
Hence 1 (1 + 0) = 1.1 + 1.0
(B5) Complementation: From third table we clearly see that the complement of each a ∈ B exists in B
(B6) Clearly 0 ≠ 1
Example 3: Let S be a family of sets which is closed under the binary operations union ‘ ∪ ’, intersection ‘ ∩ ’,
and complement ‘ ′ ’ , then prove that (S, ∪, ∩ , ' ) is a Boolean algebra.
Solution: (B1) Closure Law: For any two elements A and B of S, we know that A ∪ B and A ∩ B are
unique elements of S, i.e., A ∪ B ∈ S and A ∩ B ∈ S, ∀ A, B ∈ S
(B3) Identity Elements: φ (empty set) and U (universal set) exist in S such that
(B4) Distributive Laws: For any three elements (or members) A, B, C of S, we have
(i) A ∪ (B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C ) (ii) A ∩ (B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )
(B6 ) Clearly φ ≠ U
7.3 Duality
Let (B, +, .) be a Boolean algebra if in a statement of (B, +, .) the positions of ‘+’ and ‘.’ are interchanged
and also the positions of identity elements 0 and 1 are interchanged, then the new statement (so obtained)
is called the Dual of the original statement.
(0 . a ) + (b . 1) = b
308 Discrete Mathematical Structures
L.H.S. = a + a
= (a + a) 1 [From B3]
= (a + a) (a + a′) [From B5]
= a + (a . a′) [From B4]
=a+0 [From B5]
= a = R.H.S. [From B3]
(ii) To prove a . a = a
L.H.S. = a . a
=a.a+0 [From B3]
= a . a+a . a′ [From B5]
= a (a+a′) [From B4]
=a.1 [From B5]
= a = R.H.S. [From B3]
Theorem 3: (Absorption Laws) For any two elements a and b of a Boolean algebra B.
(i) a + (a . b) = a (ii) a (a + b) = a
Proof: (i) To prove a + (a . b) = a
L.H.S. = a + (a . b)
=a.1+a.b [From B4]
= a (1 + b) [From B3]
=a.1 [Q 1 + b = 1]
= a = R.H.S [From B4]
(ii) To prove a (a + b) = a
L.H.S. = a (a + b)
= (a + 0) (a + b) [From B3]
= a + (0 . b) [From B4]
= a + 0 = a = R.H.S [From B4]
Theorem 4: (Associative Laws) The binary operation ‘+’ and ‘.’ both obey the associative laws in a
Boolean algebra B.
(i) a + (b + c) = (a + b) + c (ii) a (bc) = (ab) c
Proof: (ii) First of all, we shall prove that
a + a (bc) = a + (ab) c ...(1)
L.H.S. of eqn. (1) = a + a (bc)
=a [Prop. 3(i)]
= a (a + c) [Prop. 3 (ii)]
= (a + ab) (a + c) [Prop. 3 (i)]
= a + (ab) c [By Distributive law]
= R.H.S. of equation (1)
Again, we shall prove that
a′ + a (bc) = a′ + (ab) c ... (2)
L.H.S. of eqn. (2)= a′ + a (bc)
= (a′ + a)(a′ + bc) [From B3]
= 1 (a′ + bc) [From B6]
= a′ + bc [From B4]
= (a′ + b)(a′ + c) [From B3]
= [1 (a′ + b)](a′ + c) [From B4]
= [(a′ + a)(a′ + b)](a′ + c) [From B5]
= (a′ + ab)(a′ + c) [From B3]
= a′ + (ab) c [From B3]
Part (1) follows from principle of Duality. Since dual of a (bc) = (ab) c is
a + (b + c) = (a + b) + c
Theorem 5: In a Boolean algebra B, the identity elements are complementary to each other i.e., for 0, 1 ∈ B,
we have
(i) 0′ = 1 (ii) 1′ = 0
Proof: (i) To prove 0′ = 1
L.H.S. = 0′
= 0′ + 0 [From B3]
= 1 = R.H.S. [From B5]
(ii) To prove 1′ = 0
L.H.S. = 1′
= 1.1′ [From B3]
= 0 = R.H.S. [From B5]
Theorem 6: The identity elements in a Boolean algebra are unique. [U.P.T.U. (B.Tech.) 2001]
Theorem 7: The complement of each element of Boolean algebra B is unique. [Rohtak (M.C.A.) 2004, 2008]
Theorem 9: (De Morgan’s Laws) For any two elements a and b of Boolean algebra B, we have
(i) (a + b)′ = a ′ . b ′ (ii) (a . b)′ = a ′ + b ′ , ∀a, b ∈ B
Proof: (i) To prove ( a + b ) ′ = a ′ b ′
Here we have to show that the complement of (a + b) is a ′ . b ′, for which it is sufficient to prove
(a + b) + a ′ . b ′ = 1
and [Using B5]
(a + b)(a ′ . b ′ ) = 0
Now (a + b) + a ′ . b ′ = [(a + b) + a ′ ][(a + b) + b ′ ] [From B3]
= [(a + a ′ ) + b][ a + (b + b ′ )] [From property 4]
312 Discrete Mathematical Structures
F 0
T 1
Theorem 1: The algebra of propositions is a Boolean algebra i.e., if B is the set of propositions p, q, r... Then
(B, ∨, ∧, ~) is a Boolean algebra.
Proof: Let p, q, r ∈ B
( B1 ) Closure Law: We know that if p and q are propositions than p ∧ q and p ∨ q are also propositions. i.e.,
p ∧ q ∈ B and p ∨ q ∈ B ∀ p, q ∈ B
(i) p ∨ (q ∧ r) = ( p ∨ q) ∧ ( p ∨ r) (ii) p ∧ (q ∨ r) = ( p ∧ q) ∨ ( p ∧ r)
T T T T T T T T
T T F T T F T T
T F T T T F T T
T F F T T F T T
F T T T T T T T
F T F T F F F F
F F T F T F F F
F F F F F F F F
Tautology g and contradiction l are the identity propositions for ∨ and ∧ respectively, such that
p ∨ l = l ∨ p = p ∀ p ∈ B and p ∧ l = l ∧ p = p ∀ p ∈ B
Truth table:
p g l p∨l l∨ p p∧ g g∧p
T T F T T T T
F T F F F F F
Example 7: If B is a Boolean Algebra, then prove that the following statements are equivalent:
(i) a . b′ = 0 (ii) a + b = b (iii) a′ + b = 1 (iv) a . b = a
Solution: To prove (i) ⇒ (ii) i.e., a . b' = 0 ⇒ a + b = b
a + b = (a + b)1
= (a + b)(b + b′ ) (Q b + b′ = 1)
= (b + a)(b + b′ ) [Commutativity]
= (b + a)b + (b + a). b′
= b . b + a . b + b . b′ + a . b′
= b + a. b + 0 + 0 (Q a . b′ = 0)
= b + a. b
= 1 . b + a. b (Q 1 . b = b)
= (1 + a) b [From Distributive Law]
= (a + 1). b [From Commutative Law]
=1. b (Q a + 1 = 1)
=b (Q 1 . b = b .1 = b)
To prove (ii) ⇒ (iii) i.e., a + b = b ⇒ a′ + b = 1.
Let a + b = b, then a′ + b = a′ + (a + b)
= (a′ + a) + b (Associative Law)
= (a + a′ ) + b (From Commutative Law)
=1 + b (Q a + a′ = 1)
=1 (Q 1 + b = 1)
To prove (iii) ⇒ (i) i.e., a′ + b = 1 ⇒ a . b′ = 0.
a′ + b = 1 ⇒ (a′ + b)′ = 1′ (Taking Complement)
⇒ (a′ )′ . b′ = 1′ [Q (a + b)′ = a′. b′]
⇒ a . b′ = 0 [Q (a′ )′ = a and 1′ = 0]
To prove (i) ⇒ (iv) i.e., a . b′ = 0 ⇒ a . b = a
a . b′ = 0 ⇒ (a . b′ )′ = 0′ (Taking Complement)
⇒ a′ + (b′ )′ = 1 [Q (a . b′ )′ = a′ + b′]
⇒ a′ + b = 1 [Q (b′ )′ = b]
⇒ a . (a′ + b) = a . 1
⇒ a . a′ + a . b = a (Distributive Law)
⇒ 0 + a. b = a
⇒ a. b = a
Boolean Algebra 317
Solution:
(i) To prove a + a′b = a + b
L.H.S. = a + a′ b = (a′ + a′ )(a + b) [From B2]
= 1 (a + b) = a + b = R.H.S.
(ii) To prove a′ + a . b = a′ + b
L.H.S. = a′ + a′ . b = (a′ + a)(a′ + b) [From B2]
= 1 (a′ + b) = a′ + b = R.H.S.
(iii) To prove a . b = a ⇒ a . b′ = 0.
Given, a. b = a
then a . b′= (a . b) b′ (Putting a = a . b)
= a (b . b′ ) = a. 0 = 0
Hence, if a . b = 0, then a . b′ = 0
(iv) To prove a (a . b) = a . b
L.H.S. = a (a . b) = (a . a) b = a . b = R.H.S.
(v) To prove a + (a + b) = a + b
L.H.S. = a + (a + b) = (a + a) + b = a + b = R.H.S.
(vi) To prove ab + bc + ca = (a + b) (b + c) (c + a)
R.H.S. = (a + b) (b + c) (c + a)
= (a + b) [(c + b) (c + a)]
= (a + b) [c + ba]
= (a + b) c + (a + b) ba
= a . c + b . c + a . ba+ b . ba
= a . c + b . c + a . ab + b . ba
= a . c + b . c + (a . a) b + (b . b) a
= a . c + b . c + (a . b + a . b)
= c . a + b . c + a . b = ab + bc + ca = L.H.S.
Boolean Algebra 319
If a + x = b + x and a + x′ = b + x′ then a = b
Solution: The given statement are
a+x=b+x ...(1)
a + x′ = b + x′ ...(2)
Now a=a+0 [Q 0 is Additive Identity]
= a + x. x′ [Q x. x′ = 0]
= (a + x )(a + x′ ) [By Distributive Law]
= (b + x )(b + x′ ) [From (1) and (2)]
= b + x. x′ [By Distributive Law]
=b+0 [Q x. x′ = 0]
=b [Q 0 is Additive Identity]
Example 13: Show that a Boolean algebra cannot have three elements.
Since 0 and 1 are the identity elements of B with respect to the binary compositions ‘+’ and ‘ . ’ respectively.
Also 0′ = 1 and 1′ = 0. Also we know that complement of any element is unique. Therefore , a′ does not exist
in B. Hence (B, + , ⋅ , ' ) cannot be a Boolean algebra when B contains three elements.
= (1 + b)[(a + b) + c] [Q a + a′ = 1]
= 1 [(a + b) + c] [Q 1 + b = 1]
= ( a + b) + c
= 1 ( x + y′ ) + y [Q x + x′ = 1]
= ( x + y′ ) + y [Q 1 . b = b]
= x + ( y′ + y ) [By associativity]
= x +1 [Q y′ + y = 1]
=1 [Q x + 1 = 1]
Boolean Algebra 321
Example 16: If p and q are two propositions then write p ⇔ q in Boolean algebra. [U.P.T.U. (B.Tech.) 2002]
Example 17: Simplify the expression [{( x′ ∩ y′ )′ ∪ z} ∩ ( x ∪ z}]′ by first changing into Boolean form.
Express the simplified expression into set theory form again.
Solution: The symbols ‘+’ and ‘.’ are used in Boolean algebra instead of symbols ‘ ∪ ’ and ‘ ∩ ’ in set theory.
Now changing the expression in Boolean algebra, we have
= [{ x′. y′ )′ + z}( x + z )]′
= {( x′. y′ )′ + z}′ + ( x + z )′ [From De-Morgan's Law]
= ( x′. y′ ) z′ + ( x′. z′ ) [From De-Morgan's Law and (a′ )′ = a]
= ( x′. z′ ). y′ + ( x′. z′ )1 [Q ( x′. y′ ) z′ = x′( y′. z′ ) = x′(z′. y′ ) = ( x′. z′ )y′]
= ( x′. z′ )( y′ + 1) = ( x′. z′ )1 = x′ z′ [Q y′ + 1 = 1]
Changing to set theory the given expression = x′ ∩ z′.
11. Show that the triplet (B,+, ⋅ ) is a Boolean algebra where B = {a,b,c,d} and ‘+’ and ‘.’ are two binary
operations defined by the following tables:
+ a b c d • a b c d
a a b c d a a a a a
b b b b b b a b c d
c c b c b c a c c a
d d b b d d a d a d
12. Show that the triplet (B, +, .) is a Boolean algebra where B = {0, 1, 2, 3} and ‘+’ and ‘.’ are two
binary operations defined by the following tables:
+ 0 1 2 3 • 0 1 2 3
0 0 1 2 3 0 0 0 0 0
1 1 1 1 1 1 0 1 2 3
2 2 1 2 1 2 0 2 2 0
3 3 1 1 3 3 0 3 0 3
+ x y • x y
x x y x x x
y y y y x y
14. If B = {a, b, c, d} and binary operations ‘+’ and ‘.’ are defined by:
+ a b c d • a b c d
a a b c d a a a a a
b b b d d b a b a b
c c d c d c a a c c
d d d d d d a b c d
18. a + b + d′
24. (i) a+b (ii) (a′ + b′ )(a + b) (iii) (a + b)(a + c) (iv) (a′+ b)(a + b′ ) (v) (a + bc)(a + d )
Let (B, + , . , ' ) be a Boolean-algebra with binary operation ‘+’ (,) ‘.’ and a unary operation ‘,’ .
(i) Monomial: Monomial is any element of Boolean algebra. Also an element obtained by applying the
operation ‘.’ on two or more elements is called monomial. For example x, x′, y, x′. y, x′. y. z are
monomials.
(ii) Polynomial: Polynomial is an expression of Boolean algebra containing two or more than two
monomials with operation ‘+’ in between them. In other words, if the operation ‘+’ is applied to two or
more than two monomials then the expression so obtained is called a polynomial. For example:
x + y′ + x. y′ is a polynomial. Its First Term is x, Second Term is y′ and Third Term is x. y′.
324 Discrete Mathematical Structures
(iii) Factor: Consider an expression x. ( y′ + x ). Then we say that x and y′ + x are two factors of this
expression. If an expression is composed of several expressions with ‘.’ operation then each of these
expressions is called a factor.
(iv) Constant: By a constant we mean any symbol which represents a specified element of Boolean-
algebra B.
Illustration: 0 and 1 are constants of B, since 0 and 1 are identity elements for ‘+’ and ‘.’ in B. Hence 0
and 1 represents two specified elements of B.
(v) Variable: By variable we mean a symbol which represents an arbitrary element for B . Usually
variables are denoted by the symbols x, y, z, x′, y′, z′, . . .
Note: The number of variables in any Boolean function is the number of distinct letters appearing irrespective
of whether the letter is primed or unprimed.
(vii) Power and Multiple of a Variable in a Boolean Function: Let (B,+, .) be a Boolean- algebra
and x ∈ B be any arbitrary variable, then
x 2 = x. x = x
x 3 = x 2. x = x. x = x
x 4 = x 3 . x = x. x = x etc.
x n = x n−1 . x = x. x = x, when n is a positive integer.
Again 2x = x + x = x
3x = x + x + x = x + x = x, etc.
nx = x + x + x +. . . up to n terms, where n is +ve integer.
= x.
Hence, the powers and multiples of any variable do not exist in a Boolean function.
For each positive integer n, we have xn = x .
Proof: Suppose x1 , x 2. . . , x n are n variables in a Boolean algebra (B, +, .) and let their complements be
respectively x1′ , x 2′ . . . , x n′ . Now there are two ways of selecting the first variable, x1 or x1′ in a minimal
Boolean function; there are two ways of selecting the second variable, x 2 or x 2′ ... there are two ways
selecting the nth variable, x n or x n′ . Thus we see that there are two ways of selecting each of the n variables.
Hence the number of minimal Boolean functions in n variables.
= 2 x 2 x 2 x ... x 2 (n factors) = 2n
Suppose x1 , x 2, . . . , x n are n variables in a Boolean algebra (B, +, .) and their complements are respectively
x1′ , x′2, . . , x′n and suppose f ( x1 , x 2, . . . , x n ) is an arbitrary Boolean function of these n variables. The function
f is called in Disjunctive Normal Form if the function f can be written as the sum of terms of the type
f1 ( x1 ), f 2( x 2 ), . . . , f n( x n ) where f i( x i ) = x i or x′i ∀i = 1, 2, . . . , n and no two terms are identical. In addition to
it, 0 and 1, for n ≥ 0 are called disjunctive normal form in n variables.
Note: We know that there are 2 n minimal Boolean functions in n variables. Hence maximum number of
distinct terms in a disjunctive normal form of a Boolean function in n variables are 2 n .
But if f ( x1 , x 2, x 3 ) is Complete Disjunctive Normal Form then there are 23 i.e., 8 distinct terms in
f ( x1 , x 2, x 3 ) . Hence
f ( x1 , x 2, x 3 ) = x1 . x 2. x 3 + x1′ . x 2. x 3 + x1 . x′2. x 3 + x1 . x 2. x′3 + x1′ . x′2. x 3 + x1 . x′2. x′3 + x1′ . x 2. x′3 + x1′ . x′2. x′3
Repeating this process several times, every f is so expressed that each term contain all the n variables
(x i or x′i, ∀i = 1, 2, . . . , n).
(iv) In the end, repeated terms are removed by using Idempotent Law ( x i + x i = x i ) .
Theorem 4: To prove: If in complete disjunctive normal form or complete canonical form in n variables, each
variable is assigned arbitrarily the value 0 or 1, then just one term will have the value 1 while all others will have
the value 0.
Proof: Suppose (B, +, ⋅) is a Boolean-algebra and let a function f be in complete disjunctive normal form in
n variables x1 , x 2, . . . , x n of B. Let the values 0 and 1 be assigned to the variables x1 , x 2, . . . , x n.
Now we select a term in complete disjunctive normal form. We shall show that the value of this selected term
is 1 and every other term (2n − 1 term in all) has 0 as value. This selected term whose value is 1 contains x1 if x1
has the value 1 assigned or x1′ if x1 has the value 0 assigned x 2 if x 2 has the value 1 or x′2 if x 2 has the value 0,
x 3 if x 3 has the value 1 or x′3 if x 3 has the value 0,..., x n if x n has the value 1 or x′nif x n has the value 0.
∴ The value of this selected term = 1.1.1... 1 (n times) = 1.
Clearly remaining all 2n– 1 terms has 0 as at least one factor (since no two terms are same in complete
disjunctive normal form). Hence each of the remaining 2n – 1 terms has 0 as value.
Verification: Let f ( x1 , x 2 ) be a Boolean function in two variables x1 and x 2. Its complete disjunctive
normal form is given by
f ( x1 , x 2 ) = x1 . x 2 + x1′ . x 2 + x1 . x′2 + x1′ . x′2
Boolean Algebra 327
1 0 0 1 0 0 1 0
0 1 1 0 0 1 0 0
From the above table we observe that by giving values 0 or 1 to the variables only one term, in both
distributions, has value 1 and other terms have value 0.
Hence the theorem is verified.
Example 19: Find complete disjunctive normal form in two variables x1 , x 2 and show that its value is 1.
Solution: f ( x1 , x 2 ) = x1 . x 2 + x1 . x′2 + x1′ . x 2 + x1′ . x′2
= x1 ( x 2 + x′2 ) + x1′ ( x 2 + x′2 ) [By Distributive Law]
= x1 .1 + x1′ .1 [Q x 2 + x 2 = 1]
= x1 + x1′ = 1
Example 20: Find complete disjunctive normal form in three variables, and show that its value is 1.
Solution: f ( x1 , x 2, x 3 ) = x1 . x 2. x 3 + x1 . x 2. x′3 + x1 . x′2. x 3 + x1′ . x 2. x 3 + x1 . x′2. x′3 + x1′ . x 2. x′3
+ x1′ . x′2. x 3 + x1′ . x′2. x′3
= x1 . x 2( x 3 + x′3 ) + x1 . x′2( x 3 + x′3 ) + x1′ . x 2( x 3 + x′3 ) + x1′ . x′2[( x 3 + x′3 )
= x1 . x 2. 1 + x1 . x′2. 1 + x1′ . x 2. 1 + x1′ x′2.1 [Q x 3 + x′3 = 1]
= x1 . x 2 + x1 . x′2 + x1′ . x 2 + x1′ . x′2
= x1 ( x 2 + x′2 ) + x1′ ( x 2 + x′2 )
= x1 . 1 + x1′ . 1 = 1
7.7 Conjunctive Normal Form or Dual Canonical Form or Product of the Sums POS) Form
A Boolean polynomial is called a Conjunctive Normal Form (or Dual Canonical Form) if it is the
product of distinct factors where each factor is the sum of variables x1 , x 2, x 3 . . . and their complements
x1′ , x′2, x′3 , . . . and in each factor variables or their complements do not occur more than once. In addition to
it, 0 and 1 for n ≥ 0 are called in conjunctive normal form in n variables.
(iv) In the end, repeated factors are removed by using the Idempotent law ( x i. x i = x i ).
Thus f is expressed in conjunctive normal form.
Boolean Algebra 329
Illustration: Let f ( x, y ) = ( x + y )( x′ + y′ )
Now complete conjunctive normal form in two variables is ( x + y )( x′ + y )( x + y′ )( x′ + y′ )
Hence f ′( x, y ) = ( x′ + y )( x + y′ )
Rule for finding complement of a function in DN form
We can find by inspection the complement of any function given in disjunctive normal form. If a function f
is given in disjunctive normal form then its complement f ′ is obtain by omitting from the complete
disjunctive normal form, the terms which appear in the function f.
Remark: The complement of complement DN form is CN form.
Rule for finding complement of a function in CN form
We can find by inspection the complement of any function given in conjunctive normal form. If a function f is
conjunctive normal form then its complement f ' is obtain by omitting conjunctive normal form the terms
which appear in the function f.
Remark: The complement of complement CN form is DN form.
or
be a Boolean expression over two valued Boolean algebra. Write E ( x1 , x 2, x 3 ) in disjunction normal form.
[Kurukshetra (B.E.) 2006; R.G.P.V. (Bhopal) 2008; Osmania (B.E.) (Andhra) 2009]
Solution: We have
E ( x1 , x 2, x 3 ) = {( x1 + x 2 )′ + x1′ . x 3 }′
= ( x1′ . x′2 + x1′ . x 3 )′
= ( x1′ . x′2 )′ . ( x1′ . x 3 )′
= {( x1′ )′ + ( x′2 )′ } . {( x1′ )′ + x′3 }
= ( x1 + x 2 )( x1 + x′3 ) [( x1′ )′ = x1 ]
= x1 + x 2 x′3 [By distributive]
= x1 . 1 . 1 + x 2 x′3 . 1 [ x1 + x1′ = x 2 + x′2 = x 3 + x′3 = 1]
= x1 ( x 2 + x′2 )( x 3 + x′3 ) + x 2 x′3 ( x1 + x1′ )
= x1 ( x 2 x 3 + x 2 x′3 + x′2 x 3 + x′2 x′3 ) + x1 x 2 x′3 + x1′ x 2 x′3
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x′2 x 3 + x1 x′2 x′3 + x1 x 2 x′3 + x1′ x 2 x′3
= x1 x 2 x 3 + x1 x′2 x 3 + x1 x 2 x′3 + x1 x′2 x′3 + x1′ x 2 x′3 , [ x1 x 2 x′3 + x1 x 2 x′3 = x1 x 2 x′3 ]
330 Discrete Mathematical Structures
α ( x1 , x 2, . . . x n ) = [ x1 . x 2 + x 3 ] ′
if x1 = 1, x 2 = 0 and x 3 = 0, then
α ( x1 , x 2, x 3 ) = α (1, 0, 0) = [1 . 0 + 0] ′ = (0 + 0)′ = 0 ′ = 1
7.7.5 Literal
A literal is defined be a Boolean variable or its complement. For example x1 and x1′ are literals.
Example 24: Change the function f = uv + u' v + u' v' from DN form to CN form.
f ' = F – f = uv'
f = ( f ' )'
Example 25: Change the function f = ( x + y' )( x ' + y )( x ' + y ' ) from CN form to DN form.
f ′ = (x + y )
f = ( f ' )'
f = ( x + y )'
f = x' y'
Example 26: Simplify the Boolean function by using laws of Boolean algebra
= ( x ' + xy )
= 1 ⋅ (x '+ y ) [ x ' + x = 1]
f = x' + y [1. x = x]
332 Discrete Mathematical Structures
Example 27: Simplify the Boolean function by using the law of Boolean algebra xy + xyz + yz .
Solution: Let f = xy + xyz + yz
= xy(1 + z ) + yz
= xy + yz [1+z =1]
= xy + zy [By Commutative]
= ( x + z) y
Example 30: Obtain the sum of products canonical forms of Boolean expression x1 x′2 + x 3 .
Solution: We know
f ( x1 , x 2, x 3 ) = x1 x′2 + x 3
= x1 x′2(1) + x 3 1.1 [ x1 + x1′ = x 2 + x′2 = x 3 + x′3 = 1]
= x1 x′2( x 3 + x′3 ) + x 3 ( x1 + x1′ )( x 2 + x′2 )
= x1 x′2 x 3 + x1 x′2 x′3 + ( x1 x 3 + x1′ x 3 )( x 2 + x′2 )
= x1 x′2 x 3 + x1 x′2 x′3 + x1 x 2 x 3 + x1 x′2 x 3 + x1′ x 2 x 3 + x1′ x′2 x 3
= x1 x′2 x 3 + x1 x′2 x′3 + x1 x 2 x 3 + x1′ x 2 x 3 + x1′ x′2 x 3
This is the sum of products canonical forms.
Example 31: Write the Boolean expression f ( x1 , x 2, x 3 ) = ( x1′ x 2 )′ ( x1 + x 3 ) in both disjunctive and
conjunctive normal forms.
Solution: We have
f ( x1 , x 2, x 3 ) = ( x1′ x 2 )′ ( x1 + x 3 )
= [( x1′ )′ + ( x′2 )] ( x1 + x 3 ) [( x1′ )′ = x1 ]
= ( x1 + x′2 )( x1 + x 3 )
= x1 + x′2 x 3
= x1 1.1 + x 2′ x 3 . 1
Example 32: Change the function x′yz + xyz + x′yz′ + xyz′ into disjunctive normal form of two variables.
Solution:
x′yz + xyz + x′yz′ + xyz′= ( x′yz + x′yz′ ) + ( xyz + xyz′ )
= x′y(z + z′ ) + xy(z + z′ )
= x′y(1) + xy(1) [Q z + z′ = 1]
= x′y + xy = xy + x′y.
Example 33: Express the following function in disjunctive normal form in the smallest possible number of
variables:
f ( x, y, z )= xy′ + xz + xy.
Solution: f ( x, y, z ) = xy′ + xz + xy
= xy′ + xy + xz
= x ( y′ + y ) + xz = x.1 + xz = x + xz = x(1 + z ) = x.1 = x .
Example 34: Change the following functions to disjunctive normal forms of three variables x, y, z:
(i) x + y′ (ii) x′z + xz′ (iii) ( x + y )( x′ + y′ ) (iv) x
Solution:
(iv) x = x ( y + y′ )(z + z′ )
Example 35: Write the following functions into disjunctive normal forms of 3 variables x, y, z:
(i) x′ + y′ (ii) xy′ + x′y (iii) ( x + y )( x′ + z′ )
Solution: (i) x′ + y′= x′( y + y′ )(z + z′ ) + y′( x + x′ )(z + z′ ) [Q x + x′ = 1, etc.]
= x′( yz + yz′ + y′z + y′z′ ) + y′( xz + xz′ + x′z + x′z′ )
= x′yz + x′yz′ + x′y′z + x′y′z′ + xy′z + xy′z′ + x′y′z + x′y′z′
= x′yz + x′yz′ + 2x′y′z + 2x′y′z′ + xy′z + xy′z′
= x′yz + x′yz′ + x′y′z + x′y′z′ + xy′z + xy′z′ [Q nx = x, ∀n ∈ N ]
(ii) xy′ + x′y = xy′(z + z′ ) + x′y(z + z′ ) = xy′ z + xy′ z′ + x′yz + x′yz′. [Q z + z′ = 1]
(iii) ( x + y )( x′ + z′ ) = ( x + y )x′ + ( x + y ) z′
= xx′ + yx′ + xz′ + yz′
= 0 + x′y + xz′ + yz′ [Q xx′ = 0]
= x′y(z + z′ ) + xz′( y + y′ ) + yz′( x + x′ )
= x′yz + x′yz′ + xyz′ + xy′z′ + xyz′ + x′yz′
= x′yz + 2x′yz′ + 2xyz′ + xy′z′ = x′yz + x′yz′ + xyz′ + xy′ z′.
Example 36: Find a function of three variables x, y, z which has value 1, when either x = y = 1 and z = 0 or x
= z = 1 and y = 0, otherwise it has value 0.
Solution:
Hence the required function is the sum of above two functions and is given by xyz′ + xy′ z
Now if x,y,z are assigned values 0 and 1 in other distinct ways, the above function has value 0.
Example 38: What are Boolean functions? Simplify the given Boolean expression. (a . b)′ ⊕ (a ⊕ b)′
Solution: A Boolean function is an expression which is formed with binary variables. The two binary
operator OR and AND, the unary operator NOT parenthesis and equal sign.
(a . b)′ ⊕ (a ⊕ b)′ = [(a . b)′ ]′ (a ⊕ b)′ + (a . b)′ ((a ⊕ b)′ )′ [ a ⊕ b = ab′ + a′ b]
= (a . b)(a′ b + ab′ ) + (ab)′ (a ⊕ b)
= ab (a′ b + ab′ ) + (ab)′ (a′ b + ab′ )
= (a′ b + ab′ )1 = a′ b + ab′
Example 42: The function xy + x′y + x′y′ is given in disjunctive normal form, change it into conjunctive
normal form.
Solution: xy + x′y + x′y′ = xy + x′( y + y′ )
= xy + x′ [Q y + y′ = 1]
= x′ + xy
= ( x′ + x )( x′ + y ) [Q a + ab = (a + b)(a + c)]
=( x′ + y )
Example 43: The function ( x + y′ )( x′ + y )( x′ + y′ ) is given in conjunctive normal form, change it into
disjunctive normal form.
Solution: ( x + y′ )( x′ + y )( x′ + y′ )
= ( x + y′ )( x′ + yy′ ) [By Distributive Law]
= ( x + y′ )x′ [Q yy′ = 0]
= x x′ + x′y′ = 0 + x′y′ = x′y′
336 Discrete Mathematical Structures
Example 44: Change the following Boolean function to disjunctive normal form
f ( x, y, z ) = [ x + ( x ′+ y )′ ][ x + ( y′ . z′ )′ ]
Solution: f ( x, y, z ) = [ x + ( x′ + y )′ ][ x + ( y′. z′ )′ ]
= [ x + ( x′ )′ y′][ x + ( y′ )′ + (z′ )′ ] [By De Morgan Law]
= [ x + x. y′][ x + y + z] [Q (a′ )′ = a]
= ( x + x. y′ )x + ( x + x. y′ )y + ( x + x. y′ ) z [. is Distributive over +]
= x. x + x. y′. x + x. y + x. y′. y + x. z + x. y′. z
= x + x. y′ + x. y + 0 + x. z + x. y′. z [Q x. x = x]
= x . 1 . 1 + x. y′. 1 + x . y . 1 + x . 1 . z + x . y′. z
= x ( y + y′ )(z + z′ ) + x. y′(z + z′ ) + x. y(z + z′ ) + x ( y + y′ ) z + x. y′ . z
= x. y. z + x. y. z′ + x. y′. z + x. y′. z′ + x. y′. z + x. y′. z′ + x. y. z + x. y. z′ + x. y. z + x. y′. z + x. y′. z
= x. y. z + x. y. z′ + x. y′. z + x. y′. z′
Example 45: Change the following Boolean function to disjunctive normal form
f ( x, y, z, t ) = ( x′. y + x. y. z′ + x. y′. z + x′. y′. z′. t + t ′ )′ .
Solution: Applying general De-Morgan Law, we have
f ( x, y, z, t ) = ( x′. y )′ ( x. y. z′ )′ ( x. y′. z )′ ( x′. y′. z′. t )′ (t ′ )′
= ( x + y′ )( x′ + y′ + z )( x′ + y + z′ )( x + y + z + t ′ )t
= [ x. x′ + x. y′ + x. z + y′. x′ + y′. y′ + y′. z]( x′ + y + z′ )( x. t + y. t + z. t + t ′. t )
= [ x. y′ + x. z + x′. y′ + y′ + y′. z]( x′ + y + z′ )( x. t + y. t + z. t ) [Q a . a′ = 0, a . b = b. a, etc.]
= [ x. z + { y′ + y′( x + x′ + z )}( x′ + y + z′ ) ( x. t + y. t + z. t )]
= ( x. z + y′ )( x′ + y + z′ )( x. t + y. t + z. t ) [By Absorption Law: y′ + y′. u = y′]
= ( x. z. x′ + x. z. y + x. z. z′ + y′. x′ + y′. y + y′. z′ )( x. t + y. t + z. t )
= ( x. y. z + x′. y′ + y′. z′ )( x. t + y. t + z. t ) [Q x. x′ = 0]
= x. y. z. x. t + x. y. z. y. t + x. y. z. z. t + x′. y′. x. t + x′. y′. y. t + x′. y′. z. t + y′. z′. x. t + y′. z′. y. t + y′. z′. z. t
= x. y.z.t + x′. y′ .z.t + x. y′ .z′.t [Q a.a′ = 0,a + a = a]
Example 46: Change the following Boolean function to conjunctive normal form:
f ( x, y, z, t ) = ( x′. y + x. y. z′ + x. y′. z + x′. y′. z′. t + t ′ )′
Solution: By general De-Morgan's Law, we have:
f ( x, y, z, t ) = ( x′. y )′ ( x. y. z′ )′ ( x. y′. z )′ ( x′. y′. z′. t )′ (t ′ )′
= ( x + y′ )( x′ + y′ + z )( x′ + y + z′ )( x + y + z + t ′ )t
= ( x + y′ )( x′ + y′ + z )( x′ + y + z )t [By Absorption Law]
= ( x + y′ + 0 + 0)( x′ + y′ + z + 0)( x′ + y + z + 0)(0 + 0 + 0 + t )
= ( x + y′ + z. z′ + t . t ′ )( x′ + y′ + z + t . t ′ )( x′ + y + z + t . t ′ )( x. x′ + y. y′ + z. z′ + t )
= ( x + y′ + z + t )( x + y′ + z + t ′ )( x + y′ + z′ + t )( x + y′ + z′ + t ′ )( x′ + y′ + z + t )( x′ + y′ + z + t ′ )
( x′ + y + z + t )( x′ + y + z + t ′ )( x + y + z + t ) ( x + y + z′ + t )( x + y′ + z + t )( x + y′ + z′ + t )
( x′ + y + z + t )( x′ + y + z′ + t )( x′ + y′ + z + t )( x′ + y′ + z′ + t ) [Q + is Distributive over.1]
= ( x + y + z + t )( x + y + z + t ′ )( x + y + z′ + t )( x + y + z′ + t ′ )( x′ + y′ + z + t )( x′ + y′ + z + t ′ )
( x′ + y + z + t )( x + y′ + z′ + t )( x + y′ + z′ + t ′ )( x + y′ + z + t ′ )( x + y′ + z + t )( x + y′ + z′ + t )
( x′ + y + z′ + t)(x′ + y′ + z′ + t )
Boolean Algebra 337
a b c f T
1 1 1 0 a′. b′. c′
1 1 0 1 a′. b′. c
1 0 1 1 a′. b. c′
0 1 1 0 a . b.′ c′
1 0 0 1 a′. b. c
0 1 0 0 a . b.′ c
0 0 1 1 a . b. c′
0 0 0 0 a. b . c
= a′(b + b′. c) + a . b. c′
= a′.1 (b + c) + a . b. c′
= a′(b + c) + a . b. c′
= a′. b + a′. c + a . b. c′
Example 48: Determine the functions f1 and f 2 from the following table:
x1 x2 x3 T1 f1 f2 T2
Example 49: Determine the function f defined by the following table and simplify it:
x y z f ( x, y, z ) T
1 1 1 0 x. y. z
1 1 0 1 x. y. z′
1 0 1 1 x. y′. z
1 0 0 0 x. y′. z′
0 1 1 0 x′. y. z
0 1 0 0 x′. y. z′
0 0 1 1 x′. y′. z
0 0 0 0 x′. y′. z′
Solution: We know that for f to be in disjunctive normal form, the value of only one term is 1 while the
value of others is 0, when each variable is assigned arbitrarily the value 0 or 1. Consequently, the function f
in disjunctive normal form is given by
f ( x, y, z ) = x. y. z′ + x. y′. z + x′. y′. z
Verification: From the table, we have
∑ f . T =0 ( x. y. z ) + 1 ( x. y. z′ ) + 1 ( x. y′. z ) + 0 ( x. y′. z′ ) + 0 ( x′. y. z ) + 0 ( x′. y. z′ ) + 1 ( x′. y′. z ) + 0 ( x′. y′. z′ )
= x. y. z′ + x. y′. z + x′. y′. z
= x. y. z′ + ( x + x′ ). y′. z
= x. y. z′ + 1 . y′. z = x. y. z′ + y′. z = f ( x, y,z )
Which is the required function.
Example 50: Find the complement of the following Boolean functions which are in conjunctive normal
forms:
(i) F = ( x + y + z′ )( x + y′ + z′ )( x + y + z′ )
(ii) F = ( x + y + z )( x′ + y′ + z′ )( x + y′ + z )( x + y + z′ ). ( x + y′ + z′ )
2. Show that the number of minimal Boolean function in n variables are 2".
4. Show that complete canonical form in n variables is always equal to 2n. Explain it by giving examples
in 2 and 3 variables.
F ( x, y, z ) = x. y′ + x. z + z. y.
7. Show that every Boolean function can be written as the sum of minimal Boolean functions.
8. Change the following function to conjunctive normal forms in which minimum number of variables
are used:
(i) f = ( x + y′ )( y + z′ )(z + x′ )( x′ + y′ ). (ii) f = ( x + y )( x + y′ )( x′ + z )
(iii) f = x′. y. z + x. y′. z′ + x′. y′. z + x′. y. z′ + x. y′. z + x′. y′. z′.
(i) Case of Two Variables: We consider the case when the Boolean function f is of two variables x and y. We
have constructed a 2 × 2 matrix of square with each square containing one possible input combination of
variable x and y.
The Karnaugh map of the function is the 2 × 2 matrix obtained by placing 0’s and 1’s in the square according
to whether the functional value is 0 or 1 for the input combination associated with square. Let f = xy + x′y
be Boolean function is represented by the Karnaugh map in Fig. 7.1.
x x' x x'
y xy x 'y y 1 1
Fig. 7.1
Now consider the method to obtain minimal form of the function by using Karnaugh map. The application
of the Boolean law xy + x′y = x, when seen in the context of a Karnaugh map, because the replacement of
two adjacent squares containing 1’s by a rectangle containing two squares. The absorption law x + xy = x
has its counterpart on a Karnaugh map as well. It is simply the group of adjacent squares into the largest
possible rectangle of such squares and we will use the largest rectangle instead of individual squares. To
find minimal form of the function we first consider all largest rectangles composed of the adjacent squares
with 1’s in them. From the set of these largest rectangles, the minimum number of rectangles are taken
such that every square with 1’s is part of at least one such rectangle.
342 Discrete Mathematical Structures
Example 51: Using the Karnaugh map method to find a minimal DN form of the following functions
Fig. 7.4
(ii) Case of Three Variables: The Karnaugh map corresponding to xy x y' x' y' x' y
Boolean function f ( x, y, z ) is as in (a) part of Example 51. z
Each square represents the minterm corresponding to the column and row
z'
intersecting in that square. In order that every pair of adjacent products in
figure are geometrically adjacent the right and left edges must be Fig. 7.5
identified. By a basic rectangle in Karnaugh map three variables, we mean
a square, two adjacent squares or four squares which form a 1 × 4 of 2 × 2 rectangle.
Suppose that the Boolean function f ( x, y, z ) has been represented in Karnaugh map by placing 0's and 1's in
the appropriate squares.
Example 52: Find using Karnaugh maps a minimal form for each of the following Boolean functions.
(a) f ( x, y, z ) = xyz + xyz′ + x′yz′ + x′y′z′ (b) f ( x, y, z ) = xyz + xyz′ + xy′z + x′yz + x′y′z′
z 1 0 1 0
z' 1 0 1 1
Fig. 7.8
Thus f ( x, y, z ) has two minimal forms.
f ( x, y, z ) = xy + x′y′ + x′z′ and f ( x. y. z ) = xy + x′y′ + y z′
(iii) Case of Four Variables: The Karnaugh map corresponding to xy x y' x' y' x' y
Boolean function f ( x, y, z, w ) with four variables x, y, z and w. Each of zw
the 16 squares corresponding to one of the 16 minterms with four
zw'
variables xyzw, xyzw′K
z'w'
as indicated by the labels of the row and column of the square.
z'w
Now we consider the first and last column to be adjacent and the first
Fig. 7.9
and last rows to be adjacent. both by wrap around. A basic rectangle in
a four variable Karnaugh map is a square, two adjacent squares, four squares which form 1 × 4 or 2 × 2
rectangle or eight squares which form a 2 × 4 rectangle. The minimization method is same as three
variables functions.
Example 53: Use Karnaugh maps to find a minimal form for the following Boolean functions.
(a) f ( x, y, z, w ) = x′yzw + xy′zw′ + x′y′zw′ + xyzw′ + xy′z′w′
(b) f ( x, y, z, w ) = xy′ + xyz + x′y′z′ + x′yzw′
344 Discrete Mathematical Structures
zw 0 0 0 1
zw' 0 1 1 0
z'w' 1 1 0 0
z'w 0 0 0 0
Fig. 7.10
This has five squares with 1’s in them corresponding to the five min-terms of f. A minimal cover of all 1's of
the map consists of the three maximal rectangles as f ( x, y, z, w ) = y′z w′ + x z′w′ + x′y zw.
xy x y' x' y' x' y
(b) The Karnaugh map corresponding to given function (See Fig. 7.11).
zw 1 1
The minimum number of maximal basic rectangles to cover all 1's of the
map is 3. Thus the minimal form is f ( x, y, z ) = xz + y′z′ + yzw′ zw' 1 1 1
observe that the upper left 2 × 2 rectangle represents xz while the other
z'w' 1 1
2 × 2 rectangle represents y′z′.
z'w 1 1
Fig. 7.11
Example 54: Use a Karnaugh map to find a minimal form of the function xy x y' x' y' x' y
f ( x, y, z, w )= xyzw + xyzw′ + xy′zw′ + x′y′zw + x′y′zw′
zw 1 0 1 0
Solution: The Karnaugh map corresponding to given function (See
Fig. 7.12) zw' 1 1 1 0
Hence we obtain two minimal forms,
z'w' 0 0 0 0
f ( x, y, z, w ) = xyz + x′y′z + xzw′
Fig. 7.12
Example 55: Simplify the following Boolean expressions by using map method and show circuit diagrams for
original expression and reduced expression:
(a) x′y + xy′ + xy (b) x′yz + x′yz′ + x′y′z + xy′z
y
Solution: (a) Let F = x′y + xy′ + xy′ ...(1) x 0 1
Fig. 7.13
Boolean Algebra 345
Using K map method this equation can be reduced as shown in Fig. 7.14.
y'z
x 00 01 11 10
0 1 1 1
0
1 0 1 0 0
Fig. 7.14
This K map contain three pairs of 1's the horizontally and vertically adjacent and each pair is reducing a
variable. Thus the reduce expression is F = x′z + x′y + y′z
∴ Y = m7 + m3 + m4 = Σ m (3, 4, 7 )
This is other way of representation, where Σ denotes sum of products
∴ Y = M2 M0 M6
∴ Y = π M (0, 2, 6)
This is other way of representation, where π denotes product of sums.
Example 56: Write the following Boolean expressions in an equivalent sum of canonical form in three
variables x1 , x 2 and x 3 .
Solution: (i) x1 . x 2 = x1 . x 2 . 1
= x1 . x 2 . ( x 3 + x′3 ) [ x 3 + x′3 = 1]
= x1 x 2 x 3 + x1 x 2 x′3
= M 6 + M7
∴ x1 . x 2 = M 6 + M 7
(ii) x1 ( x′2 x 3 )′ = x1 [( x′2 )′ + x′3 ]
= x1 [ x 2 + x′3 ] [( x′2 )′ = x 2]
= x1 x 2 + x1 x′3
= x1 x 2 . 1 + x1 x′3 . 1
= x1 x 2 ( x 3 + x′3 ) + x1 x′3 ( x 2 + x′2 )
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x 2 x′3 + x1 x′2 x′3
= x1 x 2 x 3 + x1 x 2 x′3 + x1 x′2 x′3 [ x1 x 2 x′3 + x1 x 2 x′3 = x1 x 2 x′3 ]
= m7 + m6 + m4
= m4 + m6 + m7
= Σ 4, 6, 7 ≤ M (4, 6, 7 )
x1 + x 2 = ( x1 + x 2 ). 1
= ( x1 + x 2 ). ( x 3 + x′3 ) [ x 3 + x′3 = 1]
= x1 x 3 + x1 x′3 + x 2 x 3 + x 2 x′3
= ( x1 x 3 + x1 x′3 ). 1 + ( x 2 x 3 + x 2 x′3 ). 1
= ( x1 x 3 + x1 x′3 ). ( x 2 + x′2 ) + ( x 2 x 3 + x 2 x′3 ). ( x1 + x1′ )
= x1 x 3 x 2 + x1 x 3 x′2 + x1 x′3 x 2 + x1 x′3 x′2 + x 2 x 3 x1 + x 2 x 3 x1′ + x 2 x′3 x1 + x 2 x′3 x1′
= x1 x 2 x 3 + x1 x′2 x 3 + x1 x 2 x′3 + x1 x′2 x′3 + x1′ x 2 x 3 + x1′ x 2 x′3
X = A′ B′ C ′ + A B C ′ + A′ B C
X ( A, B, C ) = Σ (0, 6, 3) or Σ m (0, 6, 3)
where m = minterms
The Minterms Corresponding to square 0, 6, 3 of the Karnaugh map are present in the Boolean
function and marked by 1. Other squares are marked by 0. It is explain as
AB
C 00 01 11 10
0 1 0 1 0
1 0 1 0 0
Fig. 7.15
This widely used method of representation and simplification of Boolean functions is popular among
electrical engineers and is suitable for hand computations and is most efficient for function involving upto
4-5 variables. A Karnaugh map is a plane area subdivided into 2n equal cells each representing a point B 2n
for function of n variables. The cells corresponding to the arguments for which the function has the value 1
are shaded or darkened or a, 1 is written on it.
Example 58: Use Karnaugh map representation to find minimal sum of products expression for the following
Boolean function:
(i) F ( A, B, C , D ) = Σ (0, 2, 7, 8, 10, 15) [U.P.T.U. (B.Tech.) 2009]
(ii) F ( A, B, C , D ) = Σ (0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 11) [U.P.T.U. (B.Tech.) 2003]
(iii) F ( A, B, C ) = Σ (0, 1, 2, 4, 5, 6) [U.P.T.U. (B.Tech.) 2003]
(iv) F ( A, B, C ) = Σ (0, 2, 4) [R.G.P.V. (B.E.) Bhopal 2009]
(v) F ( A, B, C ) = Σ (0, 2, 3, 4, 7 ) [R.G.P.V. (B.E.) Raipur 2008]
(vi) F ( A, B, C ) = Σ (0, 4, 7 ) [Rohtak (B.E.) 2007]
(vii) F ( A, B, C ) = Σ (1, 2, 5, 6) [I.G.N.O.U. 2007]
348 Discrete Mathematical Structures
(xii) F ( A, B, C , D ) = Σ (0, 2, 4, 5, 6, 7, 8, 10, 13, 15) [Osmania (B.E.) 2004, 2006, 2007]
(xiv) F ( A, B, C , D ) = Σ (0, 2, 8, 9, 10, 11, 14, 15) [Kurukshetra (B.E.) 2004, 2008]
M 0 = 0000 = A B C D
M 2 = 0010 = A B C D
M 7 = 0111 = A B C D
M 8 = 1000 = A B C D
M10 = 1010 = A B C D
CD
AB C D [ 0 0] C D [ 0 1] CD [11] CD [10]
1 1
[ 0 0] A B
0 1 3 2
[ 0 1] A B 1
6
4 5 7
[11] A B 1
12 13 15 14
[10] A B 1
1 8 9 11 10
Fig. 7.16
Boolean Algebra 349
The Karnaugh map has one pair, and one quad. There are no over lapping.
Consider the pair m7 + m15 . A is the only variable which changes its form, so A is to be removed
The reduced expression for the pair m7 + m15 is BCD quad is m0 + m3 + m8 + m10 in the map moving
horizontally we observe that the variable C change its form and then moving vertically. We get A changes
its form. Therefore A and C are removed. The reduced expression for quad
m0 + m3 + m8 + m10 is B D
Then F (A B C D) = B C D + B D
(ii) F ( A, B, C , D ) = Σ (0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 11)
The looping of one octet and two quad as shown in map. The looping octet will give the minterm as A′ . The
looping quad formed by 0, 1, 8, 9 produces the minterm as B′ C ′ and the quad formed by 1, 3, 9, 11 gives the
minterm as B′ D. Hence simplified function is
F = A′ + B C ′ + B′ D
Karnaugh map of the given function is shown in fig. 7.17
AB
CD 00 01 11 10
00 1 1 1
01 1 1 1
11 1 1 1
10 1 1
Fig. 7.17
(iii) F ( A, B, C ) = Σ (0, 1, 2, 4, 5, 6)
Karnaugh map of given function is shown in fig. 7.18
BC
A 00 01 11 10
0 1 3 2
0
1 1 1
4 5 7 6
1
1 1 1
Fig.7.18
Fig. 7.18
(iv) F ( A, B, C ) = Σ (0, 2, 4)
BC
A BC BC BC BC
1 3 2
A
1 1 1
1 5 7 6
A
1
Fig. 7.19
F ( A, B, C ) = B C + A B C
(v) F ( A, B, C ) = Σ (0, 2, 3, 4, 7 )
BC
A 00 01 11 10
0 1 3 2
0
1 1 1
4 5 7 6
1
1 1
Fig. 7.20
F ( A, B, C ) = B C + B C + A B
Boolean Algebra 351
(vi) F ( A, B, C ) = Σ (0, 4, 7 )
Karnaugh map of given function is shown in fig. 7.21
BC
A BC BC BC BC
0 1 3 2
A
1 1
4 5 7 6
A
1 1 1
Fig. 7.21
BC
A 00 01 11 10
0 1 3 2
0
1 1
4 5 7 6
1
1 1
Fig. 7.22
Hence, the simplified function is
F ( A, B, C ) = B C + B C
352 Discrete Mathematical Structures
CD
AB 00 01 11 10
0 1 3 2
00
1
4 5 7 6
01
12 13 15 14
11
1 1
8 9 11 10
10
1 1
Fig. 7.23
CD
AB 00 01 11 10
0 1 3 2
00 1 1 1 1
4 5 7 6
01 1 1
11 12 13 15 14
8 9 11 10
10 1 1
Fig. 7.24
Boolean Algebra 353
CD
AB 00 01 11 10
0 1 3 2
00
1 1 1
4 5 7 6
01 1 1
12 13 15 14
11
1 1
8 9 11 10
10 1 1
Fig. 7.25
Hence simplifying function is
F ( A, B, C , D ) = A D + C D + A B C + A B D + A B C
(xi) F ( A, B, C , D ) = Σ (0, 2, 4, 6)
Karnaugh map of given function is shown in fig. 7.26
CD
AB C D C D CD CD
0 1 3 2
AB 1 0 0 1
4 5 7 6
AB 1 0 0 1
12 13 15 14
AB 0 0 0 0
8 9 11 10
AB 0 0 0 0
Fig. 7.26
Hence, simplified function is
F ( A, B, C , D ) = A D
354 Discrete Mathematical Structures
CD
AB 00 01 11 10
00 1 1
01 1 1 1 1
11 1 1
10 1
Fig. 7.27
Hence, simplified function is
F ( A, B, C , D ) = B D + A B + B D
(xiii) F ( A, B, C , D ) = Σ (0, 2, 4, 5, 6, 8, 9, 10, 13)
Karnaugh map of the given function is shown in fig. 7.28
CD
AB 00 01 11 10
00 1 1
01 1 1 1
11 1
10 1 1 1
Fig. 7.28
AB 00 01 11 0
0 1 3 2
00
1 1
4 5 7 6
01
12 13 15 14
11
1 1
8 9 11 10
10 1 1 1 1
Fig. 7.29
AB 00 01 11 10
0 1 3 2
00
4 5 7 6
01 1 1 1
12 13 15 14
11
1 1 1
8 9 11 10
10
Fig. 7.30
356 Discrete Mathematical Structures
CD
AB C D C D CD CD
0 1 3 2
AB
0 0 0 0
4 5 7 6
AB 1 1 1 1
12 13 15 14
AB
0 1 1 0
8 9 11 10
AB 0 0 0 0
Fig. 7.31
A B C mi Mi
0 0 0 A B C = m0 A + B + C = M0
0 0 1 A B C = m1 A + B + C = M1
0 1 0 A B C = m2 A + B + C = M2
0 1 1 A B C = m3 A + B + C = M3
1 0 0 A B C = m4 A + B + C = M4
1 0 1 A B C = m5 A + B + C = M5
1 1 0 A B C = m6 A + B + C = M6
1 1 1 A B C = m7 A + B + C = M7
Boolean Algebra 357
M i, where i = 1, 2, 3 K 2n − 1
A B m1 M1
0 0 A B = m0 A + B = M0
0 1 A B = m1 A + B = m1
1 0 A B = m2 A + B = M2
1 1 A B = m3 A + B = M3
Example 59: f = Σ m (0, 1, 2, 5) is a three input function, transform into its canonical sum of products form.
Solution: Let x1 , x 2 and x 3 denote the three inputs
Then, m0 = 000 = x1′ x′2 x′3
m3 = 101 = x1 x′2 x 3
Example 60: Obtain the three variable product of sums canonical form of the Boolean expression
= ( x1 + x 2 )( x1 + x′2 )( x 2 + x1 )( x 2 + x1′ )
= ( x1 + x 2 )( x1 + x′2 )( x 2 + x1′ ) [( x1 + x 2 )( x1 + x 2 ) = ( x1 + x 2 )]
A B C Z
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
Solution: First we draw the blank map of fig. Output 1 appears ABC inputs of 000, 001, 010 and 110. The
fundamental products for these conditions are A B C , A B C , A B C and A B C . Enter 1 s for these products
on the Karnaugh map Fig. Finally enter 0 s in the remaining spaces shown in fig. 7.32
AB AB
C 00 01 11 10 C 00 01 11 10
0 0 1 1 1
1 1 1
(a) (b)
AB
C 00 01 11 10
0 1 1 1 0
1 1 0 0 0
(c)
This is the Karnaugh map for Given Table
Fig. 7.32
Boolean Algebra 359
Example 62: Use the Karnaugh map method to find a minimal DN form (sum-of-products form) of the
following functions.
(i) Y = AB + AB′ [P.T.U. (Punjab) 2009]
(ii) Y = AB + A′ B + A′ B′ [R.G.P.V. (B.E.) (Raipur) 2008]
(iii) Y = AB + A′ B′ [R.G.P.V. (B.E.) Bhopal 2009]
A
B A A′
1 0
B
1 0
B′
Fig. 7.33
We have represented two adjacent squares with 1s in them by rectangle. This rectangle represents A.
Hence, Y=A
(ii) The representation of Y = AB + A′ B + A′ B′ by Karnaugh map is as follows
B A A′
B 1 1
B′ 0 1
Fig. 7.34
The function Y contains two pairs of adjacent squares with 1 which includes all the squares of Y which
contain 1. The horizontal pair (rectangle) represents Y with vertical pair (rectangle) represents A.
Hence, Y = B + A′ = A′ + B is its minimal form.
(iii) The representation of Y = AB + A′ B′ by Karnaugh map is as follows.
A
B A A′
B 1 0
B′ 0 1
Fig 7.35
Example 63: Find using Karnaugh maps a minimal form of each of the following Boolean functions
(i) Y = ABC + ABC ′ + A′ BC ′ + A′ B′ C ′ R.G.P.V. (Bhopal) 2006, 2009]
(ii) Y = ABC + ABC ′ + AB′ C + A′ B′ C [U.P.P.V. (B.Tech.) 2004]
(iii) Y = ABC + ABC ′ + A′ BC ′ + A′ B′ C ′ + A′ B′ C [Kurukshetra (B.E.) 2005, 2008]
AB
C AB AB′ A′ B′ A′ B
C 1 0 1 0
C′ 1 0 0 1
Fig. 7.36
We see from Karnaugh map that Y has three maximal basic rectangles containing squares with 1 which are
shown by rectangles. The squares corresponding to ABC′ and A′ BC ′ are adjacent. Thus the symbols are left
open ended to signify that they join in one rectangle.
Hence, the minimal Boolean function is Y = AB + BC ′ + A′ B′ C
AB
C AB AB′ A′ B′ A′ B
C 1 1 1 1
C′ 1 0 0 0
Fig. 7.37
From the Karnaugh map we find that Y has two maximal basic rectangles containing all the squares with
1s, which are shown by rectangles. One of the maximal baisc rectangle in the two adjacent squares which
represents A B and the other is (1 × 4) square which represents C. Both are needed to cover all the squares
with 1. So, the minimal form of Y is given by
A = AB + C
Boolean Algebra 361
AB
C AB AB′ A′ B′ A′ B
C 1 0 1 0
C′ 1 0 1 1
Fig. 7.38
which has five squares with 1‘s’ in them corresponding to the five minterms of Y. It has four maximal basic
rectangles to cover all squares with 1‘s’ in them. Hence we include basic rectangles which represent AB and
A′ B′ and only one of two rectangles which correspond to A′ C ′ and BC′ . Thus Y has two minimal forms
Y = AB + A′ B′ + A′ C ′ and Y = AB + A′ B′ + BC ′
Example 64: Draw a Karnaugh map to represent the following Boolean function
Y = A′ B′ C ′ D + ACD + BD ′ + AB + BC
Solution:
CD
AB C′ D ′ C′ D CD C D′
00 01 11 10
A′ B′ 00 1
0 1 3 2
A′ B 01 1 1 1
4 5 7 6
AB 11 1 1 1 1
12 13 16 16
AB′ 10 1
8 9 11 10
Fig. 7.39
362 Discrete Mathematical Structures
The first term represents a four variable term, from which it is clear that its minterm will be in square 1. It
has therefore been assigned to square 1. The term ACD represents a pair. Square 11 and 15 satisfy the
requirement of its position. There are three quartets, each of which yield a product of two variables. The
term BD ′ points, for which the proper squares are 12, 13, 14 and 15. The last quartet yields the product BC.
Its proper position is in squares 6, 7, 14 and 15.
E = y′ t ′ + y′ z′ t + x′ y′ zt + yzt ′
zt
xy zt z t′ z′ t ′ z′ t
xy 0 1 0 0
x y′ 0 1 1 1
x′ y′ 1 1 1 1
x′ y 0 1 0 0
Fig. 7.40
which represent nine squares with 1‘s’ in them corresponding to the four minterms of E. To cover all
squares with 1‘s’ in them.
Thus E has three mimal forms
E = x′ y′ + z t ′ + y′ z′
Boolean Algebra 363
1. Simplify the following Boolean expressions by using map method and show circuit diagram of
original expression and reduced expression
(a) A′BC + AB′C ′ + ABC + ABC ′ (b) A′C + A′B + AB′C + BC
2. Simplify the following Boolean expressions by using only laws of Boolean and then construct the
circuit diagrams of reduced Boolean expression
(a) AB′ + C ′D′ (b) (BC ′ + A′D )( AB′+ CD′ ) (c) (BC + AC ′ + AB + BCD )
3. Find the minimal form of the Boolean function of four variables represented by the Karnaugh map
given by
xy x y' x' y' x' y
zw 1 0 0 1
zw' 0 0 0 0
z'w' 0 0 0 0
z'w 1 0 0 1
Fig. 7.41
4. Use the Karnaugh map representation to find a minimal form each of the following functions
(a) f ( x, y ) = x′y + xy
(b) f ( x, y, z ) = xyz + xy′z + x′yz + x′y′z
(c) f ( x, y, z ) = xyz′ + xy′z′ + x′y′z′ + x′y′z + x′yz + x′yz′
(d) f = xyzw′ + xy′zw′ + xy′z′w′ + xy′z′ w + x′y′ zw′ + x′y′z′w′ + x′y′zw′
5. Draw Karnaugh map and simplify the following Boolean expressions
(i) F ( A, B, C , D ) = Σ (2, 3, 6, 7 ) (ii) F ( A, B, C ) = Σ (0, 1, 3, 4, 5)
(iii) F ( A, B, C , D ) = Σ (7, 13, 14, 15) (iv) F ( A, B, C , D ) = Σ (0, 2, 6, 8, 10, 12, 14, 15)
(v) F ( A, B, C ) = ∏ (0, 1, 4, 5) (vi) F ( A, B, C , D ) = ∏ (1, 3, 5, 7, 13, 15)
6. Define Boolean algebra and give a list of its important properties. Give some examples of Boolean
algebra
7. In Boolean algebra, for x1 , x 2 and x 3 ∈ B, find whether the following expressions are equivalent or not
(a) ( x1 ∧ x 2 ) ∨ ( x1 ∧ x 3 ) (b) ( x1 ∨ x 2 ) ∧ ( x1′ ∨ x 3 ) ∧ ( x 2 ∨ x 3 ) (c) ( x1 ∨ x 2 ) ∧ ( x1′ ∨ x 3 )
13. The poset (D n, divisor) forms a Boolean algebra iff n cannot be written as a product of distinct
primes.
❑❑❑
Logic Gates (Circuits) 367
Input Output
leads leads
Fig. 8.1
a
y=a+b
Fig. 8.3
The leads in the logic circuit represents voltage which are variable i.e., the voltages in the leads are not
constant. In the above diagrams the input variables have been represented by 'a' and 'b' and output variables by
x, y, z. The operation of sum, multiplication and complementation are usually called Connectives.
Two combinational circuits are given below. The diagrams are self explanatory.
a
a+b
b
(a+b)(ab)'
1
a
ab (ab)'
Fig. 8.5
Logic Gates (Circuits) 369
Fig. 8.6
Remark: Note that all crossing of wires are insulated except those which are circled.
a b a.b a b a+b a b
1 1 1 1 1 1 1 0
1 0 0 1 0 1 0 1
0 1 0 0 1 1
0 0 0 0 0 0
Fig. 8.7
If a and b are two inputs then their output through NAND-gate is (a. b)′. See following fig. 8.8:
a b NAND
1 1 0
a
(a.b)' 1 0 1
0 1 1
b
0 0 1
Fig. 8.8 Fig. 8.9
Also the output of NAND-gate is 0 if all the inputs are 1, (see truth table).
If a and b are two inputs then their output through NOR-gate is (a + b)′, See the following figure 8.10.
a b NOR
1 1 0
a 1 0 0
(a+b)'
0 1 0
b 0 0 1
Fig. 8.10 Fig. 8.11
Also the output of a NOR-gate is 1 if all the inputs are 0. [See the truth tables]
The only difference between the symbolic representation of AND and NAND gates and between OR and
NOR gates is that NAND and NOR gates are each followed by a circle.
Theorem 1: Show that the set of gates {OR, NOT} is functionally complete
Or
Show that an AND gate can be replaced by a suitable interconnections of OR gate and NOT gates.
[Kurukshetra (B.E.) 2008]
therefore an AND gate can be replaced by one OR gate and three NOT gates. The logic circuit is given
below:
Fig. 8.12
Logic Gates (Circuits) 371
Theorem 2: Show that an OR gate can be replaced by a suitable interconnection of AND gates and NOT gates.
[Rohtak (B.E.) 2009]
( x + y ) = ( x′ y′ )′
Thus an OR gate can be replaced by one AND gate and three NOT gates as shown below:
x
x'
y (x'y') x+y
y'
Fig. 8.13
a
b
a
d
c
b
c
d
Fig. 8.14
Solution: Clearly the output of first, second, third, and fourth OR gates are a' + b, a' + d, c' + b and c' + d
respectively. Thus the inputs first (upper) AND gate are a' + b and a' + d and inputs of second (lower) AND
gate are c' + b and c' + d. Hence inputs of last AND gate are (a' + b)(a' + d ) and (c' + b)(c' + d ). Therefore, the
Boolean expression corresponding to given circuit is
a a'
c a'c'
c'
a'c'+ba
b
d bd
Fig. 8.15
Example 4: Define a switching function. How are the operations of addition, multiplication and
complementation defined on these functions?
Solution: If B is a Boolean algebra then function B n → B defined by the output expression f (c), is called
Output Function or Switching Function of the circuit.
Now let Fn be the set of all switching function of all two valued logic circuits in n input variables and let
f , g ∈ Fn be two arbitrary switching functions.
The operation of addition, multiplication and complementation on these functions are defined as follows
(just similar for 0 and 1).
For each X 0 ∈ B n we define
( f + g )( X 0 ) = f ( X 0 ) + g( X 0 ) , ( fg )( X 0 ) = f ( X 0 ). g( X 0 ) , f ′( X 0 ) = ( f ( X 0 ))′ .
According to these definitions, the basic logic elements AND, OR and NOT for these functions are expressed
as follows:
Fig. 8.16
Theorem 3: The set Fn of all switching functions of n variables forms a Boolean algebra with respect to
operations ‘+’ . ‘ . ’ and ‘ ' ’. In other words, the following postulates hold for all f , g, h ∈ Fn .
(i) Commutativity f + g = g + f , f . g = g. f
(ii) Associativity ( f + g ) + h = f + (g + h), ( f . g ). h = f . (g. h)
(iii) Distributive Laws f (g + h) = fg + fh, f + gh = ( f + g )( f + h)
(iv) Identity Elements f + 0 = f , f .1 = f
Logic Gates (Circuits) 373
Proof: The functions f,g,h will have the values 0 or 1 i.e., f , g, h ∈ {0,1}. The proof of the above theorem
follows from the function table (i.e., truth table):
1 1 1 1 1 1 1 1 0 1 0
1 1 0 0 1 1 1 1 0 1 0
1 0 1 0 1 1 1 1 0 1 0
1 0 0 0 1 1 1 1 0 1 0
0 1 1 1 1 1 1 1 1 1 0
0 1 0 0 0 1 0 0 1 1 0
0 0 1 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 0 1 1 0
f1
f1 +f2+...+fm
f2
fm
(ii) The expression f1 . f 2. . . . f m where f i(i = 1, 2, . . . . , m) ∈ Fn is called multiple input AND-gate and is
represented by the following symbol:
f1
f1 .f2 ... .fm
f2
fm
f1
(f1 +f2+...+fm)'
f2
fm
(iv) The expression ( f1 . f 2. . . . f m )′ where f i(i = 1, 2, . . . . , m) ∈ Fn is called multiple input NAND-gate and is
represented by the symbol:
f1
(f1 . f2 . ... . fm )'
f2
fm
Fig. 8.21
Logic Gates (Circuits) 375
But we can write ( x. y ) + ( x. z ) as x. ( y + z ). The function x. ( y + z ) takes two gates: one AND-gate and one
OR-gate (see Fig. 8.22);
x x.(y+z)
y y+z
z
Fig. 8.22
The circuits represented by Fig. 8.21 and 8.22 are equivalent circuits.
Clearly circuit of Fig. 8.22 is more economical since it saves one AND-gate.
Input Output
A B F = A′ B + A B′
0 0 0 A F=A⊕B
0 1 1
B
1 0 1
XOR-gate
1 1 0
Fig. 8.23
Table for XOR
Using the truth table, the disjunctive normal form for the gate is
F = A B′ + A′ B = A ⊕ B
A A⊕B (A ⊕ B)´
B
Fig. 8.24
376 Discrete Mathematical Structures
Input Output
A B F = A B + A′ B′
A 0 0 1
(A ⊕ B)´
0 1 0
B
Fig. 8.25: Symbol for XNOR Gate
1 0 0
1 1 1
8.9 Method for Finding Boolean Function or Expression From a Logic Circuit
Start from the input side and write the equation at the output of each input gate and repeat this process
towards the output. Then write the switching equation for output.
x
xy
xy+zu
z
zu
u
Fig. 8.26: Implementation of x y + z u with AND, OR Network
(ii) We have f = x y + z′
x
xy
y
x y + z´
z z´
Fig. 8.27: Implementation with AND, OR and NOT Gate
(iii) We have f = x′ y′ z + x′ y z + x y′
Fig. 8.28
378 Discrete Mathematical Structures
8.11.1 Adders
The application of binary bits consists the following elementary operations
0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 10
We find left bit gives the carry. When the augend and addend numbers contain more significant digits, the
carry obtained from the addition of two bits is added to the next higher order pair of significant digits.
A B Carry ( C ) Sum ( S )
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Fig. 8.30
A1 B1 C1 C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Fig. 8.31
8.11.4 Decoder
A decoder is a combinational logic circuit that converts n input lines to maximum of 2n unique output lines.
In a 3 to 8 line decoder three inputs are decoded into 8 outputs where each output represents one of the
minterms of the 3 input variables. If the input variables represent a binary number then the outputs will be
digits of octal system i.e. contain 8 digits A 3 to 8 line decoder can also be used for decoding any 3 bit code
to provide 8 outputs. The following is the diagram of 3 to 8 decoder.
Inputs Outputs
A B C F0 F1 F2 F3 F4 F5 F6 F7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Fig. 8.33
We find that the outputs variables are mutually exclusive. A decoder with n input variables can generate 2n
minterms.
A logical circuit which performs the inverse operation of a decoder is called on Encoder. Decimal to
binary encoder converts decimal numbers and a Hexadecimal to binary encoder converts Hexadecimal
number to its binary equivalent. An encoder with 2n input lines will have n output line. The block diagram
for 24 to 4 encoder is given in Fig. 8.34
0
1
4 output lines
24 = 16 input lines
15
Fig. 8.34
Logic Gates (Circuits) 381
Multiplexers are used to transmit large number of data over a small number of lines. Multiplex means
many to one. A digital multiplexer is combinational circuit that selects binary information from many input
lines that directs its a single output line. The selection of a particular input line is controlled by a set of
selections lines. A multiplexer receives binary information from the 2n lines and transmit information on a
single output line. The block diagram of 4 to 1 line multiplexer is shown in Fig. 8.35
0
1
input output
2
3 S1 S2
Select
Fig. 8.35: Block Diagram for 4 × 1 Multiplexers
P Q R S
1 1 1 0
1 1 0 0
1 0 1 1
1 0 0 1
0 1 1 0
0 0 1 1
0 0 1 0
0 0 1 0
(i) Construct a Boolean Expression having this table as its truth table. Simplify the expression.
[U.P.T.U. (B.Tech.) 2003, 2004]
(ii) Construct a circuit having the given table as its input/output table. [U.P.T.U. (B.Tech.) 2003, 2004]
Solution: (i) Boolean expression is
S = PQ ′ R + PQ ′ R ′ + P ′ Q ′ R
= Q ′ R (P + P ′ ) + P Q ′ R ′
= Q′ R + P Q′ R ′ [ P + P ′ = 1]
382 Discrete Mathematical Structures
Fig. 8.36
Example 7: Draw the combinational circuit using the basic gates to obtain the following output.
Y = A B + BC + A B [P.T.U. (B.Tech.) Punjab 2008]
Fig. 8.37
Example 8: Write the Boolean expression for the logic circuit shown in Fig. 8.38
Fig. 8.38
Example 9: Sketch the given Boolean expression. Use one AND gate one OR gate only.
Y = A B + AC [Raipur (B.E.) 2008]
Solution: We have
Y = A B + A C = A (B + C )
This expression can be expressed using logic gates only as
Fig. 8.39
Example 10: Show that A ⊕ B = [( A B′ )′ . ( A′ B )′ ]′ and hence design a logic circuit of XOR gate using NAND
only.
Solution: A ⊕ B = (( A . B′ )′ . ( A′ . B )′ )′
= [( A′ + (B ′ )′ ). (( A′ )′ + B′ )]′
= [( A′ + B ). ( A + B′ )]′ [( A′ )′ = A]
= ( A′ + B )′ + ( A + B′ )′
= ( A′ )′ B′ + A′ (B′ )′ [( A′ )′ = A]
= A B′ + A′ B = A ⊕ B
The NAND gate implementation of the XOR function is shown in fig. 8.40
Fig. 8.40
Example 11: Realize the following Boolean expression using only NAND gates.
Y = (A B + B C )C [Rohtak (B.E.) 2007]
Solution: We have
Y = (A B + B C )C
= A BC + BC C
= A BC + BC [C C = C ]
= B C ( A + 1) [ A + 1 = 1]
Y = BC
⇒ Y = (BC )
384 Discrete Mathematical Structures
This expression can be realized used only NAND gates as shown in fig. 8.41
C BC (B C) = BC
Fig. 8.41
Example 12: Y = A B C + B C D + A B C
(ii) Realize the simplified equation using only NOR gates. [U.P.T.U. (B.Tech.) 2003]
= (A + A) B C + B C D [ A + A = 1]
=1. BC + B C D
= BC + B C D
= B (C + C D ) [By distributive]
= B (C + C )(C + D ) [C + C = 1]
= B (C + D )
Fig. 8.42
We have Y = B (C + D )
⇒ Y = B C (C + D ) ( A = A)
⇒ Y = B + (C + D )
Logic Gates (Circuits) 385
Fig. 8.43
Example 13: Reduce the following expressions and implement them using NAND gates only.
(i) f ( x, y ) = ( x y + x + y ) x y (ii) f ( x, y ) = ( x + x y + x y )
Solution: We have f ( x, y ) = ( x y + x + y ) x y
= (x + y + x . y ) x y
=x x y+ y x y+ x y x y [ x x = y y = 0, y y = y]
=0+ x y+ 0= x y
Now replace the inverter and the NAND gate by their NAND equivalent to get the circuit in Fig. 8.45
x
x –y x –y
y
–y
(ii) We have
f ( x, y ) = x + x y + x y
= x + (x + x) y [ x + x = 1]
= x + 1. y = x + y [1 . y = y]
f ( x, y ) = ( x + y ) = ( x + y ) = ( x . y )
This expression can be implemented using NAND gates as shown in Fig. 8.46
Fig. 8.46
Solution: We have Y = A + B C + B
= ( A + B )( A + C ) + B
= (A + B) + (A + C ) + B
= A B + AC + B
= A (B + C ) + B
Fig. 8.47
Logic Gates (Circuits) 387
Example 15: Simplify Boolean function algebraically and write CKT diagram.
f ( x1 , x 2, x 3 ) = ( x1 . x 2 + x 3 ). ( x 2 + x 3 ) + x 3 [U.P.T.U. (B.Tech.) 2004]
Solution: We have
f ( x1 , x 2, x 3 ) = ( x1 x 2 + x 3 )( x 2 + x 3 ) + x 3
= x1 x 2 x 2 + x 3 x 2 + x1 x 2 x 3 + x 3 x 3 + x 3
= x1 x 2 + x 2 x 3 + x1 x 2 x 3 + x 3 + x 3 [ x 2 x 2 = x 2, x 3 x 3 = x 3 ]
= x1 x 2 + x 2 x 3 (1 + x1 ) + x 3 [ x 3 + x 3 = x 3]
= x1 x 2 + x 2 x 3 + x 3 [1 + x1 = 1]
= x1 x 2 + x 3 ( x 2 + 1) [ x 2 + 1 = 1]
= x1 x 2 + x 3
Fig. 8.48
(ii)
x1
x2 x1 + x2 + x3
x3
Fig. 8.50: Circuit for Reduction of f
x3 x4
x1 x 2 00 01 11 10
0 2 3 2
00
1 1
4 5 7 6
01
1 1 1 1
13 12 15 14
11
1 1 1 1
8 9 11 10
10
1 1 1 1
Fig. 8.51
Example 17: Draw the logic circuit for each of the following Boolean expressions:
Solution:
(i)
Fig. 8.52
(ii)
Fig. 8.53
(iii)
Fig. 8.54
(iv)
Fig. 8.55
390 Discrete Mathematical Structures
Example 18: Draw the logic circuit for each of the following expression:
Solution: (i)
Fig. 8.56
Fig. 8.57
or
The logic circuit of the given expression may be drawn as follows:
x
y
z f
Fig. 8.58
Logic Gates (Circuits) 391
Example 19: Draw the logic circuit with inputs a, b, c and output y which corresponds to the Boolean
expression
y = ab′ c + abc′ + ab′ c′
Solution:
Fig. 8.59
Example 20: Draw the logic circuit with inputs a,b,c and output X where
X = abc + a′ c′ + b′ c′
Solution:
Fig. 8.60
Example 21: Express the output y as a Boolean expression in the input x1 , x 2, x 3 and x 4 for the logic circuit
in the following fig. 8.61:
Fig. 8.61
392 Discrete Mathematical Structures
The uppermost element x1 on the left hand side is connected with NOT-element, hence its output
expression is x1′ . The elements x 2 and x 3 are connected with NOR-element, hence their composite output is
( x 2 + x 3 )′ . Then under these elements, the element x 2 is connected with NOT-element, hence its output is
x′2. Lastly the elements x 3 and x 4 are connected with NOR-element, hence their output expression is
( x 3 + x 4 )′. Now elements x1′ and ( x 2 + x 3 )′ are connected by AND-element, hence their complete output is
x1′ ( x 2 + x 3 )'
Similarly x′2 and ( x 3 + x 4 )′ are connected by AND element, hence their composite output x′2( x 3 + x 4 ).
′
In the end x1′ ( x 2 + x 3 )′ and x′2( x 3 + x 4 )′ are connected by OR-element, hence their composite expression y
is given by
y = x1′ ( x 2 + x 3 )′ + x′2( x 3 + x 4 )′
Example 22: Draw the logic diagram to represent the Boolean expression:
(i) ( x + y )( x′ + y′. z′ ) (ii) x. y + [ z′( x ′+ y′ )] (iii) ( x + y + z )[ x. y + x′. z]
Solution: (i)
Fig. 8.62
So, Z = ( x + y ) + ( x′ + y′z′ )
(ii)
Fig. 8.63
So, Z = ( x ⋅ y ) + [ z′( x′ + y′ )]
Logic Gates (Circuits) 393
(iii)
Fig. 8.64
So, Z = ( x + y + z )( xy + x′z )
Example 23: Simplify the following Boolean expression and then construct the circuit diagram of reduced
Boolean expression.
(i) xy + xy′ + x′y′ ( ii) xy′z + (z + y ) x′
Fig. 8.65
(ii) xy′z + (z + y ) x′
∴ xy′z + x′z + x′y = z ( xy′ + x′ ) + x′y
= z( x(1 − y ) + x′ ) + x′y [ y + y' = 1]
= z( x − xy + x′ ) + x′y
= z(1 − xy ) + x′y
= z − zxy + x′y
= z − zxy + (1 − x )y
= z − zxy + y − yx
= z − xy(z + 1) + y Fig. 8.66
= z − xy + y
= z + y(1 − x ) = z + y. x′
394 Discrete Mathematical Structures
Example 24: Draw the logic diagram to represent the Boolean expressions:
(i) ( x + y )( x′ + y′ ⋅ z′ ) (ii) x ⋅ y + (z′( x ′+ y′ )] (iii) ( x + y + z )( x. y + x′. z )
Solution: (i)
Fig. 8.67
So, Z = ( x + y ) + ( x′ + y′z′ )
(ii)
Z
Fig. 8.68
So, Z = ( xy ) + [ z′( x′ + y′ )]
(iii)
Fig. 8.69
So, Z = ( x + y + z )( x. y + x′. z )
Logic Gates (Circuits) 395
Example 25: Simplify the following Boolean expressions by using only laws of Boolean and then construct
the circuit diagrams of reduced Boolean expression:
(i) x ( x′ + y ) (ii) x′y′z + x′yz + xy′ (iii) x + x′y
Solution:
(i) F = x ( x′ + y )
or F = x. x′ + x. y
or F = 0 + xy [By Inverse Law]
or F = x. y [By Identity Law]
x F
y
Fig. 8.70
(ii) F = x′y′z + x′yz + xy′
F = x′z( y′ + y ) + xy′
F = x′z + xy′
Fig. 8.71
Fig. 8.72
396 Discrete Mathematical Structures
Example 26: Write Boolean expressions corresponding to the following logic circuits:
(i)
Fig. 8.73
(ii)
Fig. 8.74
(iii)
Fig. 8.75
Solution:
(i)
Fig. 8.76
Logic Gates (Circuits) 397
(ii)
Fig. 8.77
(iii)
Fig. 8.78
Example 27: Draw the logic diagram to represent the Boolean expressions:
(i) ( x1′ x′2 )′ + x1 x 2 (ii) ( xy )′ + xyz (iii) ( x1 + x 2 ) x 3 + x 4
Solution:
(i) ( x1′ x′2 )′ + x1 x 2
Fig. 8.79
(ii) ( xy )′ + xyz
Fig. 8.80
398 Discrete Mathematical Structures
(iii) ( x1 + x 2 ) x 3 + x 4
Fig. 8.81
Example 28: Write Boolean expressions corresponding to the following logic circuits:
(i)
Fig. 8.82
(ii)
Fig. 8.83
(iii)
Fig. 8.84
Solution:
Example 29: Draw the logic diagram to represent the Boolean expressions.
Solution: (i)
Fig. 8.85
So, Z = ( x + y )( x′ + y′z′ )
(ii)
Fig. 8.86
So, Z = ( x. y ) + [ z′( x′ + y′ )]
(iii)
Fig. 8.87
So, Z = ( x + y + z )( x. y + x′z )
400 Discrete Mathematical Structures
Example 30: Draw the logic diagram to represent the following Boolean expressions.
(i) x′ z′+ yw (ii) xyz′+ yz′+ x ′ y
Solution: (i)
Fig. 8.88
(ii)
Fig. 8.89
Example 31: Show that logic circuit corresponding to any Boolean expression can be realized by using NAND
gate alone.
Solution: Since logic circuits corresponding to any Boolean expression are constructed using AND, OR
and NOT gates, therefore it is enough to show that AND, OR and NOT gates can be replaced by NAND gates
only. The following figures show how OR gates, AND gates and NOT gates can be replaced by suitable
interconnections of NAND gates.
(i)
Fig. 8.90
Logic Gates (Circuits) 401
(ii)
Fig. 8.91
(iii)
a
b a' b'
is equivalent
ab to NAND gate
a' b'
Fig. 8.92
Thus logic circuit corresponding to any Boolean expression can be constructed using NAND gates only.
Example 32: Show that logic circuit to realize any Boolean expression can be constructed using NOR gates
alone.
Solution: As in above example, we shall show that OR gate, AND gate and NOT gate can be replaced by
suitable interconnections of NOR gates.
(i)
Fig. 8.93
(ii)
a
b (a+b)'
is equivalent
a+b to OR gate
(a+b)'
Fig. 8.94
402 Discrete Mathematical Structures
(iii)
Fig. 8.95
Thus logic circuit corresponding to any Boolean expression can be constructed using NOR gates only.
z
Fig. 8.96
(ii)
Fig. 8.97
Exercise
@ Logic Gates
1. If f = gh′ + g′h, then prove that (gh′ + g′h)′ = gh + g′h′.
2. If x + y + z = xyz, then prove that x = y = z.
3. Prove the identity x′y′ + x′y + xy′ + xy = 1
4. If fg + hg′ = 1, where 1 is the function 1, then prove that f + h = 0.
5. Draw the logic circuits of the following:
(i) ( x + y )′ (ii) (a + b′ )(c. d′ )
6. Define NOR gate. Show that any logic circuit for a given Boolean expression can be constructed
using NOR gates only.
7. Define NAND gate. Show that an OR gate can be replaced by pair of NAND gates.
8. Use NAND gates to construct with following outputs
(i) x′ (ii) x+ y
(iii) xy (iv) x⊕y
9. Write the expression corresponding to the following logic circuits
x3
x1
x2
Fig. 8.98
5. (i)
Fig. 8.99
(ii)
Fig. 8.100
404 Discrete Mathematical Structures
8.
9. Z = [( x1 x 2 )′ + x 3 ] x 4
10.
Fig. 8.105
qqq
Unit-4
C hapter
9. : Propositional Logic
Propositional Logic 407
A Statement is a declarative sentence which is true or false, but not both; or in other words a Statement
is a declarative sentence which has a definite truth value.
and Conjunction ∧ 2
Or Disjunction ∨ 3
if...then Conditional → or ⇒ 4
Illustrations
(1) π is greater than 3 and π is less than 3.2. In symbolic language: let p ≡ π is greater than 3, q ≡ π is less
than 3.2, so p ∧ q.
(2) a is equal to 4 or b is equal 4. In symbolic language : let p ≡ a is equal to 4; q ≡ b is equal to 4, so p ∨ q.
(3) (4<7) ∨ (1=0)
(4) If two lines are parallel then they do not intersect. In symbolic language : let p ≡ two lines are parallel;
q ≡ two lines do not intersect; so p ⇒ q.
(5) A is a right angled triangle if the sum of squares of its two sides is equal to the square of the third side. In
symbols : let p ≡ A is a right-angled triangle, q ≡ the square of two sides of a triangle is equal to the square
of the third side. So p ⇔ q.
(6) If π > 3 then ~ π < 3
Rule 2: If in a statement, the connectives of the same rank appear, then brackets are applied from the left.
For example:
p ∧ q ∧ r ∧ s ∧ t = {( p ∧ q) ∧ s} ∧ t
Rule 3: If the connectives of different ranks appear, then first of all the bracket of that connective is
removed which is of lower rank.
Illustration: p ∨ (q ⇒ r) = p ∨ ( p ⇒ r)
Here, the rank (=4) of ' ⇒' is greater than the rank (=3) of ' ∨'. Therefore, this bracket cannot be removed.
Illustration:
∧ Conjunctive sentence
∨ Disjunctive sentence
→ or ⇒ Conditional sentence
↔ or ⇔ Bi-conditional sentence
(c) The sentences used to form a compound sentences are called its components. For example: The
components of p ∧ q are p and q.
Remark: The component may either be simple sentences or compound sentences.
The statement pattern may be simple or composite, according as it is composed of one or more logical
connectives. Thus statement patterns given by (i), (ii) and (iii) are simple while those given by (iv) and (v)
are composite.
If we put 6 in place of x, then this sentence becomes a true statement. Such a sentence is called an open
statement.
9.4.5 Proposition
If p, q, r K are Simple Statement then the compound statement P ( p, q, r, s, . . . ) is called a proposition.
The truth value of proposition P depends on the truth values of variables p, q, r, K . If the truth value of the
proposition P. A truth table is a simple way to show this relationship.
p q ~p ~p∧q
T T F F
T F F F
F T T T
F F T F
The statement formulas contain one or more simple statements and some connectives. If p and q be any two
statements, then p ∧ q, (~ p) ∧ q, ( p ∧ q) ∨ (~ p) are some statement formula derived from the statement
variables p and q, where p and q called components of the statement formula.
Consider p ∧ q and q ∧ p, where p and q are any two propositions. The truth tables of these two propositions
are identical. This happen when we have any proposition in place of P and any proposition in place of Q. So
we can develop the concept of a propositional variable and well formed formulas (wff ).
Note 1: A well formed formulas is not a proposition, but if we replace the proposition in place of
propositional variable, we get a proposition. For example
Note 2: We can drop parentheses when there is no ambiguity. For the sake of convenience we used well
formed formula ( wff )
Note 3: The final column entries of the truth table of a well formed formula gives the truth values of the
formula.
Example 2: Which of the following sentences are statements? Also state their truth value.
(i) Is 3 a prime number? (ii) x 2 − 5x + 6 = 0
(iii) There will be snow in December (iv) Give me ten rupees
(v) Ramesh is poor but honest
Solution:
(i) It is not the statement [Interrogative]
(ii) It is not statement. Its truth value depends upon the value of x.
(iii) It is statement. It can be judged to be true or false.
(iv) It is not statement [wish]
(v) It is the statement. It can be judged to be true or false. It is true if Ramesh is poor and honest and false
when he is poor but not honest.
Example 3: Which of the following sentences are proposition? What are the truth values of those that are
propositions?
(i) Kolkata is the capital of India (ii) Answer this question (iii) What time is it?
(iv) x+y = y+x for every pair of real number x and y (v) 5 + 6 = 10
(vi) x+3=3 (vii) x + 2 = 5 if x = 1 (viii) Do not go
Solution:
Example 4: Find out which of the following are statements and which are not.
(i) Where are you going? (ii) Gitanjali is sick or old
(iii) It is raining and the sun is shining
(iv) Intersection of two non-empty sets is always a non-empty set
(v) Two individuals are always related (vi) The real number x is less than 3
(vii) 5x + 8y = 17 (viii) Do not pluck the flowers
Propositional Logic 413
Solution:
(i) It is not a statement since it is an interrogative sentence. It can not be judged to be true or false.
(ii) It is a statement. It can be judged to be true or false. It is true if Gitanjali is sick or if Gitanjali is old or if
Gitanjali is sick as well as she is old. It is false if Gitanjali is neither sick nor she is old.
(iii) It is a statement. It can be judged to be true or false. It is true if it is raining and also the sun is shining. It is
false if it is not raining or if the sun is not shining or if neither it is raining nor the sun is shining.
(iv) It is a statement. It can be judged to be true or false. It is false statement because the intersection of two
non-empty sets is always not recessarily a non-empty set.
Illustration: A = {1, 2, 7} and B = {3, 5, 8, 11}
are two non-empty sets but A ∩ B = φ i.e. A ∩ B is an empty set.
(v) It is a statement. It can be judged to be true or false. It is false statement because it is not necessary that
two individuals are always related.
(vi) It is an open sentence. Its truth value depends upon x. Hence, it is not a statement.
(vii) It is an open sentence. Its truth value depends upon x and y. Hence, it is not a statement.
(viii) It is not a statement since it is an imperative sentence. It cannot be judged to be true or false.
Example 5: Which of the following are statements? If a statement, then find its truth value.
(i) 2+3=6 (ii) Listen to me, Vishu !
(iii) 6 has three prime factors (iv) 13 is a prime number
Solution:
(i) '2 + 3 = 6 ' is a statement. Since 2 + 3 = 5, so it is a false statement and hence its truth value is 'F'.
(ii) It is not statement, since it is an imperative sentence.
(iii) It is a statement. Since 6 has only two prime factors namely 2 and 3, therefore, it is a false statement. So its
truth value is 'F'.
(iv) It is a statement. Since 13 is prime number so it is a true statement. Hence its truth value is 'T'.
Solution:
(i) Since a quadratic equation may have a pair of complex roots also so the given statement is false. Hence, its
truth value is 'F'.
(ii) Since all triangles with prescribed lengths for sides a, b, c with
a < b + c, b < a + c and c < a + b, p = 4d is true. Hence, its truth value is 'T'.
(iii) Since a set may be finite or infinite so the given statement is false. Its truth value is 'F'.
(iv) The given statement is true. So, its truth value is 'T'.
(v) The given statement is true. So its truth value is 'T'.
414 Discrete Mathematical Structures
Example 7: Write down the truth value (T or F) of each of the following statements.
(i) There are only finite number of rational numbers.
(ii) The quadratic equation ax 2 + bx + c = 0, a ≠ 0, has always two real roots.
(iii) A triangle one of whose vertices lies on a circle and whose side opposite to this vertex is a diameter of the
circle is a right angle triangle.
(iv) The Taj Mahal is in Agra.
(v) { x : x 2 = 16} = {4, – 4}
Solution:
(i) It is a false statement because the rational numbers are infinite. Hence, its truth value is 'F'.
(ii) It is false statement because the quadratic equation ax 2+ bx + c = 0, a ≠ 0, may also have roots which are
not real. Hence, the truth value of this statements is 'F'.
(iii) The given statement is true because in a circle a diameter always subtends a right angle at any point on the
circumference opposite to it. Hence, its truth value is 'T'.
(iv) It is a true statement. Hence, its truth value is 'T'.
(v) It is a true statement. Hence, its truth value is 'T'.
(vi) It is a true statement. Hence its truth value is 'T'.
Example 8: Which of the following statements are true and which are false?
Solution:
(i) True, since 25 = 25 (ii) True, since 63 = 63
(iii) False, since 3 ∉ {2, 4, 6} (iv) True, since 5 is an element of the set {1, 3, 5}
Example 9: What type of sentence is 5 + x = 9? For what value of x it will become a true statement?
Solution: The given sentence 5+x =9 is an open statement. It becomes a true statement for x = 4.
(i) Some roses are black. (ii) All roses are white.
(iii) May you live long. (iv) The girls are beautiful.
(vii) Bravo ! you have done a good work. (viii) Children, come to me.
(xi) Go to college.
Propositional Logic 415
Solution:
(i) Yes, since it is a declarative sentence, whose truth value is True.
(ii) Yes, since it is a declarative sentence, whose truth value is False.
(iii) No, since it is not a declarative sentence.
(iv) (v), (vi), (vii), (viii), (ix) and (xi) are not proposition since these all are not declarative sentences.
(x) Yes, since it is a declarative sentence, whose truth value is False.
Example 11: If p = he is poor, q = he is laborious, then write down the following statements in symbols (i.e.,
in the language of logic):
(i) He is poor and laborious. (ii) He is poor but is not laborious.
(iii) It is false that he is poor or laborious. (iv) It is false that he is not poor or is laborious.
(v) Neither he is poor nor he is laborious. (vi) He is poor or is not poor and is laborious.
(vii) It is not true that he is not poor or is not laborious.
Solution: In terms of statement letters p, q and logical connectives, the solutions are as follows:
(vii) ~(~ p ∨ ~ q)
(ix) If he will do labour, he will success. If he will success, he will get pleasure. Thus, by doing labour one gets
pleasure.
(x) If teams do not arrive or the weather is bad, then there will be no match.
(xi) The necessary and sufficient condition for raining is that the sky should be cloudy.
(xii) I shall go to Agra, but I shall not see Taj Mahal.
Solution:
(i) Let p ≡ I say, q ≡ he refuses from that
Statement is : p ∧ q
(ii) p ≡ I shall reach the station in time, q ≡ I shall miss the train,
Statement is: p ∨ q
(iii) p ≡ I shall go to Delhi, q ≡ I shall see zoo
Statement is: p ⇒~ q
(iv) p ≡ he is ill, q ≡ I shall care.
Statement is: p ⇒ q
(v) p ≡ I take leave, q ≡ I fail ill.
Statement is : ~ p ∧ q
(vi) p ≡ I shall be called, q ≡ I shall remain here.
Statement is: ~ p ⇒ q
(vii) p ≡ Ram will go to work, q ≡ Ram will remain in the house,
r ≡ Ram will white-wash the house
Statement is: p ∨ (q ∧ r)
(viii) p ≡ men were killed, q ≡ women were killed, r ≡ children were killed
Statement is: p ∧ (q ∧ r)
(ix) p ≡ he will do labour, q ≡ he will success, r ≡ he will get pleasure.
Statement is: ( p ⇒ q ∧ q ⇒ r) ⇒ ( p ⇒ r)
(x) p ≡ teams do not arrive, q ≡ whether is bad, r ≡ there will be no match.
Statement is: ( p ∨ q) ⇒ r
(xi) p ≡ raining, q ≡ cloudy sky.
Statement is: p ⇔ q
(xii) p ≡ I shall go to Agra, q ≡ I shall see Taj Mahal.
Statement is: p ⇒~ q
Example 15: Whenever Ram and Shyam are present in the party then there is some trouble in the party.
Today there is no trouble in the party. Hence, Ram and Shyam are not present in the party. Write it in symbolic
notations.
Solution: p ≡ Ram and Shyam are present in the party, q ≡ To be trouble in the party.
Statement is: p ⇒ q, ~ q ⇒ ~ p
Propositional Logic 417
Example 16: If p ≡ It is 4 o'clock, q ≡ the train is late, then state in words the following results:
Solution:
(i) It is 4 0'clock, or the train is late. (ii) It is 4 0'clock, and the train is late.
(iii) It is 4 0'clock, and the train is not late. or It is 4 0'clock, but the train is not late.
(iv) The train is late or it is not 4 0'clock. (v) It is not 4 0'clock, and the train is late.
(vi) It is not 4 0'clock, and the train is not late. or Neither it is 4 0'clock, nor the train is late.
(vii) It is not 4 0'clock, or the train is not late. or Either it is not 4 0'clock, or the train is not late.
(viii) It is not true that it is 4 0'clock, and the train is late.
(ix) If it is not 4 0'clock, then the train is late.
Example 17: Let p = It is cold, q = It is raining. Give a simple verbal sentence which describes each of the
following statements:
Solution:
(i) It is not cold. (ii) It is cold and raining.
(iii) It is cold or it is raining. (iv) It is raining if and only if it is cold.
(v) If it is cold, then it is not raining. (vi) It is raining or it is not cold.
(vii) It is not cold and it is not raining. (viii) It is cold if and only if it is not raining.
(ix) It is not true that it is not raining. (x) If it is cold and not raining, then it is cold.
(xi) It is not true that it is not cold. (xii) If it is raining and not cold, then it is raining.
Example 18: If p ≡ Ramesh is a player, q ≡ Mohan is wise, then write the following symbols in sentences:
Solution:
(i) Neither Ramesh is a player nor Mohan is a wise boy.
(ii) Ramesh is not a player iff Mohan is a wise boy.
(iii) Ramesh is a player and Mohan is not a wise boy.
(iv) Ramesh is a player and Mohan is a wise boy.
(v) It is not true that Ramesh is a player and Mohan is a wise boy.
418 Discrete Mathematical Structures
p q p∧ q
T T T
T F F
F T F
F F F
Note: The statements, used to form the resulting statement, are called Components. For example, the
components of resulting statement p ∧ q are p and q.
9.6.2 Disjunction (∨ )
Suppose p and q are two statements. When two statements p, q are joined by using the word 'or', then we
get a new statement represented by p ∨ q . The resulting statement p ∨ q is read as 'p or q' 'p join q'. The
statement p ∨ q so obtained is called the Disjunction of p and q. The disjunction of statements p and q i.e.,
p ∨ q is false only in the condition when p and q both are false, i.e.,
(i) If p is true and q is true, then p ∨ q is true. (ii) If p is true and q is false, then p ∨ q is true.
(iii) If p is false and q is true, then p ∨ q is true. (iv) If p is false and q is false, then p ∨ q is false.
Propositional Logic 419
p q p∨q
T T T
T F T
F T T
F F F
p ~p
T F
F T
Thus, the negation of a statement is a new statement which is the denial of the previous statement. But at
the time of taking the negation (~) of a statement, one should be very cautious, which will be clear from
the following example:
Suppose p = Ramesh is a good player of Hockey, then ∼ p never means ‘Ramesh is a bad player of Hockey’.
∼ p has the following meaning:
∼ p = Ramesh is not a good player of Hockey.
Note: that a negation is called a connective although it only modifies a statement. In this sense, negation is
the only operator that acts on a single proposition.
Solution:
(i) 2 + 7 is not less than or equal to 13 (ii) 3 is not an odd integer and 8 is not an even integer
(iii) Nice people are not dangerous (iv) The weather is not bad and I will go to work
Let p and q be any two statements. The statement of the type 'if p then q' is called Conditional
Statement and is represented by ' p ⇒ q'. It is read as 'p implies q', 'p' is called antecedent and 'q' is called
Consequent. To be more clear about conditional statement, consider the following example:
A father said to his son, ''if you will stood first in the examination, then I shall purchase a scooter for you''. If
antecedent is denoted by p and consequent by q, then the given conditional statement is represented in
symbols as ' p ⇒ q'. Now there are following four possibilities:
(i) The son stands first in the examination and the father purchases a scooter for him, i.e.,
(ii) The son stands first in the examination and father does not purchases a scooter for him, i.e.,
(iii) The son does not stands first in the examination and the father purchases a scooter for him, i.e.,
(iv) The son does not stands first in the examination and the father does not purchases a scooter for him, i.e.,
If p is false, q is false, then p ⇒ q is true.
Hence, we observe that the conditional statement is false only in condition 'when antecedent is
true and consequent is false'.
Truth table for p ⇒ q
p q p ⇒q
T T T
T F F
F T T
F F T
Note: Some authors use the symbol ' → ' instead of the symbol ' ⇒.' and ↔ by ⇔
Propositional Logic 421
Let p and q be two statements. The statement of the type 'p ⇒ q and q ⇒ p' i.e., ' p ⇒ q ∧ q ⇒ p' is called
To make more clear the bi-conditional statement, in example of (iv) above of 9.6.4, if the father had
promised the son that, "I shall purchase a scooter for you if and only if you will stand first in the
examination". It means that the father will not purchase a scooter for him if the son does not stand first in
the examination. Thus, case (ii) and (iii) both in above example are against his promise, so bi-conditional
is a false statement.
Hence, we observe that a Bi-conditional statement is true only in those cases when its both
components have the same truth values.
Truth table for p ⇔ q
p q p⇔q
T T T
T F F
F T F
F F T
Note: Let p and q be statement letters, then following are example of statement patterns:
(i) p∧ q (ii) p∨ q
(iii) p∨ q ⇒ ~ p (iv) p⇒q
(v) p⇔q (vi) p∨ q ⇔ q∨ p
422 Discrete Mathematical Structures
A Tautology is a proposition which is true for all truth values of its sub propositions or components.
A tautology is also called Logically Valid or Logically True. Clearly in truth tables, all entries in the
column of tautology are of 'T' only.
Example 21: If truth set of any proposition over universal set is defined as
T p( n) = {a ∈ u : p (a) is true}
and T p→ q = (T pc ∨ Tq )
[U.P.T.U. (B.Tech.) 2008]
Propositional Logic 423
Tp Tq Tp↔ q T p ∧ Tq T pc T qc T pc ∧ T qc (T p ∧ T q ) ∨ (T pc ∧ T qc )
T T T T F F F T
T F F F F T F F
F T F F T F F F
F F T F T T T T
T p ↔ q = (T p ∧ Tq ) ∨ (T pc ∧ Tqc )
Tp Tq T p→ q T pc T pc ∨ T q
T T T F T
T F F F F
F T T T T
F F T T T
T p→ q = T pc ∨ Tq .
Example 22: Show that the truth values of the following formulas are independent of their components.
(i) ( p ∧ ( p → q)) → q (ii) ( p → q) ⇔ (~ p ∨ q)
(iii) (( p → q) ∧ (q → r)) → ( p → r)
[U.P.T.U. (B.Tech.) 2007]
Solution: Truth value of each of these expression being ‘‘Tautology’’ as shown below is independent of
the components.
(i) ( p ∧ ( p → q)) → q
p q p→ q p ∧ ( p → q) = A A→ q
T T T T T
T F F F T
F T T F T
F F T F T
424 Discrete Mathematical Structures
(ii) ( p → q) ⇔ (~ p ∨ q)
p q p→ q ~p ~p∨q ( p → q) ⇔ (~ p ∨ q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T
(iii) (( p → q) ∧ (q → r)) → ( p → r)
p q r p→ q q→ r p→ r ( p → q) ∧ ( q → r ) (( p → q) ∧ ( q → r )) → ( p → r )
T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T F F T
F T T T T T T T
F T F T F T F T
F F T T T T T T
F F F T T T T T
Example 23: (i) Consider the conditional statement p. If the floods destroy my house or fires destroy my
house, then my insurance company will pay me. Write the converse, inverse and contrapositive of the
statement. [U.P.T.U. (B.Tech.) 2003]
(ii) There are two restaurants next to each other one has sign that says ‘‘Good food is not cheap’’ and other has a
sign that says ‘‘cheap food is not good’’. Are the signs saying the same thing?
[U.P.T.U. (B.Tech.) 2003]
(iii) Given the following statements as premises, all refering to an arbitrary meal:
(a) If he takes coffee, he does not drink milk.
(b) He eats crackers only if he drink milk.
(c) He does not take soup unless he eats crackers.
(d) At noon today, he had coffee.
Whether he took soup at noon today? If so, what is the correct conclusion? [U.P.T.U. (B.Tech.) 2004]
Then, ( p ∨ q) ⇒ r
Its inverse is ~( p ∨ q) ⇒ ~ r or ~ p ∧ ~ q ⇒ ~ r
If the floods does not destroy my house and fires does not destroy my house, then my insurance company
will not pay me. Its converse is r ⇒ p ∨ q
Therefore, argument will be ‘‘If my insurance company pay me then the floods will destroy my house or
fires will destroy my house.
q ⇒~ p
T T F F F F
T F F T T T
F T T F T T
F F T T T T
Since last two columns are same. Hence we can say that the signs are saying the same thing.
(iii) Let p : he takes coffee, q : he drinks milk, r : he eats crackers and s : he takes soup
Then, we see
(a) p→ ~q (b) r→ q (c) ~r→ − s
(d) ~r→ − s (e) by condition (e), we have p
Since implication r → q is equivalent to its contrapositive ~ q → ~ r, we have the following chain of
arguments.
p→ ~q a premise
~r→ ~s a premise
p a premise
~s a conclusion by modusponen
Hence ~ s is the conclusion, i.e. he did not take soup at noon day.
426 Discrete Mathematical Structures
Example 24: The peirce arrow ↓ (NOR ) is a logical binary operation which is defined as follows
p ↓ q = ~( p ∨ q)
Solution: (i)
p ~p p∨ p ~ ( p ∨ p)
T F T F
F T F T
= p∧ q
(iii) Since, we have ( p → q) ≅ (~ p ∨ q) = ~( p ∧ ~ q) by (i)
= ~( p ∧ (q ↓ q)) by (ii)
= ~(( p ↓ p) ↓ (q ↓ q) ↓ (q ↓ q))
= (( p ↓ p) ↓ (q ↓ q) ↓ (q ↓ q) ↓ (( p ↓ p) ↓ (q ↓ q) ↓ (q ↓ q))
Example 25: The converse of a statement is given. Write the inverse and contrapositive statements ‘‘If I come
early, then I can get car’’. [Osmania (B.E.) Andhra 2004, 2008]
Solution: Inverse: ‘‘If I cannot get car, then I shall not come early’’.
Contrapositive: If I do not come early, then I can not get the car.
Example 26: The inverse of statement is given. Write the converse and contrapositive of the statement.
Illustration: If ( p ∧ q) ∧ ~( p ∨ q) is a contradiction
Hence, p∧ q⇒ p∨ q
Illustration: If ( p → q) ∧ (q → r) → ( p → r) is a tautology.
Hence, ( p → q) ∧ (q → r) ⇒ ( p → r)
Example 28: Write the equivalent formula for p ∧ (q → r) ∨ (r ↔ p)which does not contain bi-conditional.
[U.P.T.U. (B.Tech.) 2009]
Solution: p ∧ (q → r) ∧ (r → q) ∨ (r → p) ∧ ( p → r)
Example 29:Given that the value of p → q is true. Can you determine the value of ~ p ∨ ( p ↔ q)?
[R.G.P.V. (B.E.) Raipur 2008; P.T.U. (B.E.) Punjab 2007]
p q p→ q ~p p↔q ~ p ∨ ( p ↔ q)
T T T F T T
T F F F F F
F T T T F T
F F T T T T
From the table it follows that p → q is true then the value of ~ p ∨ ( p ↔ q) is true.
We can determine the value of ~ p ∨ ( p ↔ q) because corresponding to each possible choice of p and q for
which the value of p → q is true, the value of ~ p ∨ ( p ↔ q) is same as T.
Example 30: Given that the value of p → q is false, determine the value of (~ p ∨ ~ q) → q
[U.P.T.U. (B.Tech.) 2009; Rohtak (B.E.) 2007]
p q ~p ~q p→ q (~ p) ∨ (~ q) (~ p ∨ ~ q) → q
T T F F T F T
T F F T F T F
F T T F T T T
F F T T T T F
From the table it follow that p → q is false then the value of (~ p ∨ ~ q) → q is false.
T T T T T T T T
T T F T F F F T
T F T F F T F T
T F F F T F F T
F T T F T F F T
F T F F F T F T
F F T T F F F T
F F F T T T T T
Solution:
(i) Let the statement patterns p ⇒ q, q ⇒ r and p ⇒ r be denoted by sentence variables P, Q and R
respectively.
Truth Table for [( p ⇒ q) ∧ (q ⇒ r)] ⇒ ( p ⇒ r):
P Q R
p q r p⇒q q⇒r p⇒r P∧Q P ∧ Q⇒ R
T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T F F T
F T T T T T T T
F T F T F T F T
F F T T T T T T
F F F T T T T T
p q r p⇒q r⇒ p ( p ⇒ q) ∨ ( r ⇒ p)
T T T T T T
T T F T T T
T F T F T T
T F F F T T
F T T T F T
F T F T T T
F F T T F T
F F F T T T
From the last column, it is clear that the given statement ( p ⇒ q) ∨ (r ⇒ p) is a tautology.
(iv) Truth Table for ( p ⇔ q ∧ r) ⇒ (~ r ⇒ ~ p):
p q r q∧r p⇔q∧r ~r ~p ~ r ⇒~ p ( p ⇔ q ∧ r ) ⇒ (~ r ⇒ ~ p)
T T T T T F F T T
T T F F F T F F T
T F T F F F F T T
T F F F F T F F T
F T T T F F T T T
F T F F T T T T T
F F T F T F T T T
F F F F T T T T T
From the last column, it is clear that the given statement ( p ⇔ q ∧ r) ⇒ (~ r ⇒ ~ p) is a tautology.
Example 33: Prove that each of the following statement is a tautology:
(i) ( p ⇒ q) ∨ r ⇔ [( p ∨ r) ⇒ (q ∨ r)]
(ii) ( p ∧ q ⇒ r) ⇔ ( p ⇒ r) ∨ (q ⇒ r) [U.P.T.U. (B.Tech.) 2006]
430 Discrete Mathematical Structures
Solution:
(i) Truth Table for ( p ⇒ q) ∨ r ⇒ [( p ∨ r) ⇒ (q ∨ r)]:
T T T T T T T T T
T T F T T T T T T
T F T F T T T T T
T F F F F T F F T
F T T T T T T T T
F T F T T F T T T
F F T T T T T T T
F F F T T F F T T
p q ~q p⇒q (~ q) ∧ ( p ⇒ q) ~p (~ q) ∧ ( p ⇒ q) ⇒ (~ p)
T T F T F F T
T F T F F F T
F T F T F T T
F F T T T T T
From the last column, it is clear that the given statement (~ q) ∧ p ⇒ q) ⇒ (~ q) is a tautology.
A Contradiction is a Proposition which is always false for all truth values of its propositions or
components. A contradiction is also called logically false. Clearly in truth tables, all entries in the column
of contradiction are of 'F' only.
Example 34: Prove that p ∧ (~ p) is a contradiction.
Solution: Let p be a statement. Truth table for p ∧ (~ p) is:
p ~p p ∧ (~ p)
T F F
F T F
p ~p p ⇔ (~ p)
T F F
F T F
Since all entries in the last column are of 'F' s and so it is contradiction.
p q p∨q ~p ~q ( p ∨ q) ∧ (~ p) ( p ∨ q) ∧ (~ p) ∧ (~ q)
T T T F F F F
T F T F T F F
F T T T F T F
F F F T T F F
Since all entries in the last column are of 'F' s and so it is contradiction.
(iii) ( p ∨ q) ∧ (~ p) ∧ (~ q) (iv) [( p ∧ q) ⇒ p] ⇒ [ q ∧ ~ q] = A
(v) ( p ∧ q ⇒ q) ⇒ (q ∧ ~ q)
Solution:
(i) Let p ∨ q = R , p ∨ ~ q = S, ~ p ∨ q = U and ~ p ∨ ~ q = V.
Then construction of the truth table:
p q ~p ~q R = p∨q S = p∨ ~q U =~ p∨ q V = ~ p ∨ ~ q P = R ∧ S ∧U ∧ V
T T F F T T T F F
T F F T T T F T F
F T T F T F T T F
F F T T F T T T F
From the last column of truth table it is clear that P is a contradiction because the truth value of each entry
of this column is F.
432 Discrete Mathematical Structures
T T T F F F T F T F F F F
T T F F F T F T T F F F F
T F T F T F T F T F F F F
T F F F T T F F F F T T F
F T T T F F F F F T F T F
F T F T F T F T T F F F F
F F T T T F F F F T F T F
F F F T T T F F F F T T F
From the last column of the truth table it is clear that the statement P ⇔Q i.e.,
( p ∧ r) ∨ (q∧ ~ r) ⇔ (~ p ∧ r) ∨ (~ q∧ ~ r) is a contradiction.
(iii) On constructing of the truth table:
p q ~p ~q p∨q ( p ∨ q) ∧ (~ p) ( p ∨ q) ∧ (~ p) ∧ (~ q)
T T F F T F F
T F F T T F F
F T T F T T F
F F T T F F F
p q ~q p∧q ( p ∧ q) ⇒ p q ∧~q A
T T F T T F F
T F T F T F F
F T F F T F F
F F T F T F F
Since all entries in the last column are of F' s and so it is a contradiction.
Propositional Logic 433
T T T T F F F
T F F T T F F
F T F T F F F
F F F T T F F
Two statements (or propositions) are called Logically Equivalent if the truth values of both the
statements (or propositions) are always identical. In other words, two statement are called logically
equivalent if when either is true the other is true and when either is false the other is false.
If two statements P and Q are logically equivalent then these are represented by 'P ≡ Q '. If P ≡ Q then P ⇒ Q
is a tautology. Consider two open statements x = 4 and 3x = 12 (when x ∈ N ) . Both have the same truth
value T for the value 4 of x, therefore, these both open statements are logically equivalent.
Theorem: The necessary and sufficient condition for two statements P and Q to be logically equivalent is that
P ⇔ Q is a tautology. [Rohtak (M.C.A.) 2004, 2009]
Proof: P ⇔ Q will be a tautology if its truth value is always T. The necessary and sufficient condition for
the truth value of P ⇔ Q to be T is that the truth values of P and Q should always be identical i.e., P
and Q should be logically equivalent.
Example 38: If p and q are two statements, show that the implication p ⇒ q and its contra-positive
(~ q) ⇒ (~ p) are logically equivalent. [U.P.T.U. (B.Tech.) 2008]
p q p⇒q ~ p ~q (~ q) ⇒ (~ p)
T T T F F T
T F F F T F
F T T T F T
F F T T T T
The entries of third and sixth columns are identical. Hence, p ⇒ q and (~ q) ⇒ (~ p) are logically
equivalent.
434 Discrete Mathematical Structures
Example 39: Show that q ⇒ p converse of p ⇒ q and its inverse (~ p) ⇒ (~ q) are logically equivalent.
Solution:
p q q ⇒p ∼p ∼q ( ∼ p) ⇒ ( ∼ q)
T T T F F T
T F T F T T
F T F T F F
F F T T T T
p q ~q p⇒q ∼ ( p ⇒ q) p ∧ ( ∼ q) ∼ ( p ⇒ q) ⇔ { p ∧ ( ∼ q)}
T T F T F F T
T F T F T T T
F T F T F F T
F F T T F F T
(i) p ∨ p ⇔ p, (ii) p ∧ p ⇔ p.
Proof: (i) Truth table for p ∨ p ⇔ p :
p p p∨ p p∨ p⇔ p
T T T T
F F F T
p p p∧ p p∧ p⇔ p
T T T T
F F F T
Hence, p ∧ p ⇔ p is a tautology.
Note: Here the notation ' ⇔' can be replaced by ' ≡ ' or by '='. So the notation '=' will be used in the following
laws.
p q p∨q q∨ p p∨q=q∨ p
T T T T T
T F T T T
F T T T T
F F F F T
(i) ( p ∨ q) ∨ r ⇔ p ∨ (q ∨ r); or ( p ∨ q) ∨ r = p ∨ (q ∨ r)
(ii) ( p ∧ q) ∧ r ⇔ p ∧ (q ∧ r); or ( p ∧ q) ∧ r = p ∧ (q ∧ r)
Proof: (i)
p q r p∨q ( p ∨ q) ∨ r q∨r p ∨ (q ∨ r) ( p ∨ q) ∨ r ⇔ p ∨ ( q ∨ r )
T T T T T T T T
T T F T T T T T
T F T T T T T T
T F F T T F T T
F T T T T T T T
F T F T T T T T
F F T F T T T T
F F F F F F F T
436 Discrete Mathematical Structures
(ii)
p q r p∧q ( p ∧ q) ∧ r q∧r p ∧ (q ∧ r) ( p ∧ q) ∧ r ⇔ p ∧ ( q ∧ r )
T T T T T T T T
T T F T F F F T
T F T F F F F T
T F F F F F F T
F T T F F T F T
F T F F F F F T
F F T F F F F T
F F F F F F F T
Proof: (i) Disjunction is distributive over conjunction. Since the columns in the following table under
p ∨ (q ∧ r) and ( p ∨ q) ∧ ( p ∨ r) are identical. Hence, (i) is a equivalent.
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F T F F F
F F T F F T F F
F F F F F F F F
Propositional Logic 437
T T T T T T T T
T T F T T F T T
T F T T F T T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
Since the columns under p ∧ (q ∨ r) and ( p ∧ q) ∨ ( p ∧ r) are identical. Hence (ii) is a equivalent.
Proof: (i)
p q p∨q ~ ( p ∨ q) ~p ~q (~ p) ∧ (~ q) ~ ( p ∨ q) ⇔ (~ p) ∧ (~ q)
T T T F F F F T
T F T F F T F T
F T T F T F F T
F F F T T T T T
(ii)
p q p∧q ~ ( p ∧ q) ~p ~q (~ p) ∨ (~ q) ~ ( p ∧ q) ⇔ (~ p) ∨ (~ q)
T T T F F F F T
T F F T F T F T
F T F T T F F T
F F F T T T T T
438 Discrete Mathematical Structures
(i) The identity element (or identity statement) for conjunction is tautology t, and is such that
p∧t = t ∧ p = p
(ii) The identity element (or identity statement) for disjunction is contradiction (or fallacy) f and is such that
p∨ f = f ∨ p = p
Truth Table for (i)
p t p∧t t∧p
T T T T
F T F F
p f p∨ f f ∨p
T F T T
F F F F
(i) p ∨ (~ p) = t (ii) p ∧ (~ p) = f
(i) p ∨ ( p ∧ q) = p (ii) p ∧ ( p ∨ q) = p
p q ( p ∧ q) ( p ∨ ( p ∧ q)
T T T T
T F F T
F T F F
F F F F
p ∨ ( p ∧ q) = p
p F p∧F F ∧ p
T F F F
F F F F
Hence p ∧ F = F = F ∧ p
p T p∨T T ∨ p
T T T T
F T T T
Hence p ∨ T = T = T ∨ p
p (~ p) p ∧ (~ p)
T F F
F T F
p ~p p ∨ (~ p)
T F T
F T T
~(~ p) = P
Proof: The truth table is
p ~p ~ (~ p)
T F T
F T F
p q p⇒q ~p (~ p ∨ q)
T T T F T
T F F F F
F T T T T
F F T T T
p q ~p ~q p⇒q (~ q) ⇒ (~ p)
T T F F T T
T F F T F F
F T T F T T
F F T T T T
p q p⇔q p⇒q q⇒ p ( p ⇒ q) ∧ ( q ⇒ p)
T T T T T T
T F F F T F
F T F T F F
F F T T T T
p q r p∧q ( p ∧ q) ⇒ r q⇒r p ⇒ (q ⇒ r)
T T T T T T T
T T F T F F F
T F T F T T T
T F F F T T T
F T T F T F T
F T F F T T T
F F T F T T T
F F F F T T T
p q p⇒q ~q p ⇒~q ( p ⇒ q) ∧ ( p ⇒ ~ q) ~p
T T T F F F F
T F F T T F F
F T T F T T T
F F T T T T T
q≡2 + 4 = 8 F
∴ Truth table
p q p⇔q
F F T
q= 2 + 4 = 6 T
∴ Truth table
p q p⇔q
T T T
q ≡ London is in India F
Thus, the statement 'Meerut' is in U.K. then London is in India' is denoted symbolically by p ⇒ q.
Propositional Logic 443
Hence, the statement 'it is false that Meerut is in U.K. then London is in India' is denoted symbolically by
~( p ⇒ q).
∴ Truth table
p q p⇒q ~ ( p ⇒ q)
F F T F
Example 42: Construct converse, inverse and contrapositive of the direct statement 'if 4 x − 2 = 10 then x = 3'
Solution: Let p ≡ 4 x − 2 = 10, q ≡ x = 3. Thus, the statement 'if 4 x − 2 = 10 then x ' = 3' is the direct
implication p ⇒ q.
(i) Converse: Converse of ' p ⇒ q ' is 'q ⇒ p' , hence the converse of given statement is as follows:
'' if x = 3 then 4 x − 2 = 10 ''
(ii) Inverse: The inverse of ' p ⇒ q' is '(~ p ⇒ (~ q)', hence the inverse of the given statement is as follows:
'' If 4 x − 2 ≠ 10 then x ≠ 3 ".
(iii) Contrapositive: The contrapositive of ' p ⇒ q' is '(~ q) ⇒ (~ p)', hence the contrapositive of the given
statement is as follows:
"If x ≠ 3 then 4x-2 ≠ 10"
Example 43: Write the converse, inverse and contrapositive of the following direct statements:
q ≡ ABCD is a rectangle.
(i) Converse: Since the converse of ' p ⇒ q' is 'q ⇒ p' so the converse of given statement is:
(iii) Contrapositive: Since contrapositive of ' p ⇒ q' is '(~ q) ⇒ (~ p)', so the contrapositive of the given
statement is:
'If ABCD is not a rectangle then ABCD is not a square'.
(ii) Inverse: 'When sun does not rise then it is not morning'.
(iii) Contrapositive: 'When it is not morning then sun does not rise'.
Example 44: Let p ≡ it is rainy season. q ≡ the mango is delicious, construct the following statements:
(i) p⇒q (ii) its converse, (iii) its inverse, (iv) contrapositive,
Solution:
(i) If it is rainy season, then the mango is delicious.
(ii) If the mango is delicious, then it is rainy season.
(iii) If it is not rainy season, then the mango is not delicious.
(iv) If the mango is not delicious, then it is not rainy season.
(v) If it is rainy season and mango is not delicious.
Example 45: If the truth value of p ⇔ q is: (i) F, (ii) T, then find the truth value of p ∨ q.
Solution: We know that the truth value of p ⇔ q is F, when either one of p and q has truth value F and
other T.
Truth table
p⇔q p q p∨q
F T F T
F F T T
Since the entries in the column under p ∨ q are of only T ' s, hence the truth value of p ∨ q is True' (T).
(ii) The truth value of p ⇔ q is T When its both components P and q has the same truth values (i.e., T or F).
Truth table
p⇔q p q p∨q
T T T T
T F F F
From truth table we see that the truth value of p ∨ q is sometimes T and sometimes F, hence the truth value
of p ∨ q cannot be delicious.
Example 46: If the truth value of p ∨ q is F, then decide the truth value of p ⇔ q.
Solution: We know that the truth value of p ∨ q is F, only in the condition 'when p and q both have truth
values F'. Hence the truth value of p ⇔ q is T (see following truth table).
p∨q p q p⇔q
F F F T
Propositional Logic 445
P ⇔Q P Q ~Q P ∨ (~ Q)
T T T F T
T F F T T
Example 48: If p is a statement such that for any statement Q, the statement P ∧ Q is false, then what do you
conclude about the truth value of P ?
Solution: We know that the truth value of P ∧ Q is 'True' when truth values of P and Q both are 'True', and
in all other cases the truth value of P ∧ Q is 'False'. Therefore, in the given condition, the truth value of P is
given by the third column of the following truth table:
P∧Q Q P
F F T
F T F
F F F
Example 49: If P is a statement such that for any statement Q the statement P ∨ Q is true, then what do you
conclude about the truth value of P?
Solution: The truth value of P is given by the third column of the following truth table:
P∨Q Q P
T T F
T F T
T T T
or
Find a formula A that uses the variable p, q and r such that A is contradiction.
p q r q∧r p ⇒ (q ∧ r) ~p ~p∧q ( p ⇒ q ∧ r ) ∨ (~ p ∧ q) = A
T T T T T F F T
T T F F F F F F
T F T F F F F F
T F F F F F F F
F T T T T T T T
F T F F T T T T
F F T F T T F T
F F F F T T F T
T T T T T T T T T
T T F T F F F F T
T F T T T T T T T
T F F T F F T T F
F T T T T T T T T
F T F T F T F T F
F F T F T T T T T
F F F F T T T T T
Propositional Logic 447
T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T F F T
F T T T T T T T
F T F T F T F T
F F T T T T T T
F F F T T T T T
A B ~A ~B A⇒B ~ B ∧ ( A ⇒ B) (~ B ) ∧ ( A ⇒ B ) ⇒ (~ A )
T T F F T F T
T F F T F F T
F T T F T F T
F F T T T T T
Hence, (~ B ) ∧ ( A ⇒ B ) ⇒ (~ A ) is a tautology.
Example 53: If p ≡ Ram is beautiful, q ≡ Ram is mixable, r ≡ His friends like Ram,
then write the following statement in language:
(a) ( p ⇒ q) ∨ ( p ⇒ r) (b) p ⇒ (q ∨ r)
Examine, are the above statement equivalent?
Solution:
(a) If Ram is beautiful then either Ram is mixable or his friends like Ram.
(b) If Ram is beautiful then he is mixable or his friends like him.
448 Discrete Mathematical Structures
T T T T T T T T
T T F T F T T T
T F T F T T T T
T F F F F F F F
F T T T T T T T
F T F T T T T T
F F T T T T T T
F F F T T T F T
From above truth table, we see that the entries in sixth and eighth column are identical.
Hence, the statements given by (a) and (b) above are logically equivalent.
(ii) {( p ∨ q) ∧ r} ⇒ q
Solution: (i) Truth table of ( p ⇔ q) ∧ (r ∨ q):
p q r p⇔q r∨q ( p ⇔ q) ∧ ( r ∨ q)
T T T T T T
T T F T T T
T F T F T F
T F F F F F
F T T F T F
F T F F T F
F F T T T T
F F F T F F
Propositional Logic 449
p q r p∨q ( p ∨ q) ∧ r {( p ∨ q) ∧ r} ⇒ q
T T T T T T
T T F T F T
T F T T T F
T F F T F T
F T T T T T
F T F T F T
F F T F F T
F F F F F T
Example 55: Which of the following sentences are statements ? What are truth values of those that are
statements?
(i) May God bless you. (ii) Do you speak English?
(iii) 4 – x = 8 (iv) Seven is a prime number.
(v) Please try to solve the problem.
Solution: A statement (proposition)is a declarative sentence which is either true or false but not both.
These two values are 'truth' and 'false' denote by symbol 1 and 0 or T and F.
(i) It is not a statement [wish] (ii) It is not a statement.
(iii) It's not statement. (iv) It is a statement. It’s value is true.
(v) It's a command. It is not a statement.
Example 58: If p ≡ it is 10 ‘o’ clock, q ≡ the train is late, then statement in words are the following resultants:
(i) q∨¬ p (ii) p∧ q (iii) p∧¬q
(iv) ¬ ( p ∧ q) ≡ ¬ p ∨ ¬ q (v) ¬ p∧¬q
Solution:
(i) q∨¬ p
The train is late or it is not 10 ‘o’ clock.
(ii) p∧ q
It is 10 ‘o’ clock and the train is late.
(iii) p∧¬q
It is 10 ‘o' clock or the train is not late.
(iv) ¬ ( p ∧ q) = ¬ p ∨ ¬ q
It is not 10 ‘o’ clock or the train is not late.
(v) The question paper is not hard and I will not fail in the examination.
Example 59: Determine whether the following formulate are tautology, contradiction and satisfiable:
Example 60: Define the term proposition (or statement). Classify the following expression are statement or
not:
(i) May you live long. (ii) The population of India goes upto 100 million in year 2000.
(iii) x + y = 30 (iv) All roses are white. (v) 7 is a prime number.
Solution:
(i) If you understand logics then you get an A on the final exam.
(ii) If you will not take a course in Discrete Mathematics then you will not understand logic.
(iii) If you take a course in Discrete Mathematics and understand logic than you will get an A on the final
exam.
(iv) If you take a course in Discrete Mathematics and you understand logic then you will not get an A on the
final exam.
(v) You get an A on the final exam.
452 Discrete Mathematical Structures
Example 63: Determine whether the following formulas are tautology, contradiction and satisfactiable.
(i) p ∧ (q ∧ r) ⇒ ( p ∧ q) ∨ ( p ∧ r) (ii) [( p ∧ q) ⇒ p] ⇒ (q ∧ ¬ q)
(iii) p ∧ (q ∧ ¬ p)
Solution: (i)
T T T T T T T T T
T T F F F T F T T
T F T F F F T T T
T F F F F F F F T
F T T T F F F F T
F T F F F F F F T
F F T F F F F F T
F F F F F F F F T
Hence, it is a tautology.
(ii)
p q p∧q ( p ∧ q) ⇒ p ¬q q∧¬ q [( p ∧ q) ⇒ p] ⇒ ( q ∧ ¬ q)
T T T T F F F
T F F T T F F
F T F T F F F
F F F T T F F
Hence, it is a contradiction
(iii)
p q p∧q ¬ p q∧¬ q p ∧ ( q ∧ ¬ p)
T T T F F F
T F F T F F
F T F F F F
F F F T F F
Hence, it is a contradiction.
Propositional Logic 453
Example 65: Write in symbolic form the statement: The crop will be destroyed if there is a flood.
Solution: Let the statement be denoted as:
Example 66: Write the following statement in symbolic form: If either Jerry takes Calculus or Ken takes
Sociology then Lary will take English.
Solution: Denoting the statement as.
P : Jerry takes Calculus. Q : Ken takes Sociology. R : Lary takes English
The given statement can be symbolizes as: (P ∨ R ) → R
Example 67: If p = He is tall, q = He is handsome, then write down the following statements in symbols (i.e.,
in the language of logic).
(i) He is tall and handsome. (ii) He is tall but not handsome.
(iii) It is false that he is short and handsome. (iv) He is neither tall nor handsome.
(v) It is not true that he is short or not handsome. (vi) He is tall or he is short and handsome.
Solution: In terms of statements letters p, q and logical connectives, the symbolic forms are.
(i) p∧ q (ii) p ∧ (− q) (iii) ~(~ p ∧ q)
(iv) (~ p) ∧ (− q) (v) ~(~ p ∨ ~ q) (vi) p ∨ (~ p ∧ q)
Example 68: Find the truth value of each of the following compound statement:
(i) If 4 + 3 = 9, then 5 + 5 = 10.
(ii) It is not true that 3 + 3 = 7 if and only if 6 + 6 = 14.
(iii) Paris is in England or London is in France.
(iv) It is not true 2 + 2 = 5 or 3 + 2 = 5.
(v) It is false that if Paris is in England then London is in France.
Solution:
(i) Let p stands for ‘4+3=9’ and q for ‘5+5=10’. Clearly p is false and q is true. So p ⇒ q is true. Hence the
given statement is true.
454 Discrete Mathematical Structures
(ii) Let p stands for ‘3+3=7’ and q for ‘6+6=14’. Let r denote ‘p if and only if q’. Clearly p and q are each false.
So p ⇔ q is true i.e., r is true. But the given statement is the negation of r and hence the given statement is
false.
(iii) Let p stands for ‘Paris is in England’ and q for ‘London is in France’. Here p and q are each false, the given
statement is p ∨ q which is false.
(iv) Let p stands for ‘2+2=5’ and q for ‘3+2=5’. So the given statement is ~( p ∨ q). Let r denote p ∨ q. Here p is
false and q is true and therefore p ∨ q i.e., r is true. Now the given statement is ~( p ∨ q)i.e., ~r, it is false.
15. What do you mean by Mathematical logic? Discuss the different logic connectives.
[P.T.U. (B.E.) Punjab 2005]
18. Check the following statement by constructing truth table is it the tautology or not.
(a) P∨P =P (b) P ∨ (P ∧ Q ) = P (c) ¬ (P ∨ Q ) = ¬ P ∧ ¬ Q
19. Differentiate between the following with truth table
(a) Disjunction v/s. Conjunction
(b) Conditional v/s. Bi-Conditional
(c) Tautology v/s. Contradiction. [U.P.T.U. (B.Tech.) 2007]
(a) p ⇒ (q ⇒ r) ≡ ( p ∧ q) ⇒ r (b) ( p ⇒ q) ⇒ ( p ∧ q) ≡ (− p ⇒ q) ∧ (q ⇒ p)
(c) ~( p ⇔ q) = p ⇔ (~ q). (d) ( p ∨ q) ⇒ ( p ∧ q) ≡ p ⇔ q
[U.P.T.U. (B.Tech.) 2009]
24. Prove that the statement p ∨ q and (~ p) ∧ (~ q) are contradictory to each other.
25. Construct the truth table of the following:
(a) ( p ∧ q) ∨ ( p ∧ q) ∨ ( p ∧ q) ∨ ( p ∧ q)
(b) P ∧ ( Q ∧ R ) ∨ (Q ∧ R ) ∨ (P ∧ R ) [U.P.T.U. (B.Tech.) 2006]
26. What are the connectives? Define each of them through example.
27. Define the statement formula. Give some examples.
28. Construct the truth table of the following formula.
(i) Ø (p ∨ (Q ∧ R )) ⇔ ( p ∨ q) ∧ ( p ∨ R ) [U.P.T.U. (B.Tech.) 2006]
(ii) (G ∧ ¬H) ⇔ (G ∧ H )
(iii) ¬ (A ⇒ B)∨ (A ∨ ¬ B)
29. Show that the truth value of the following formula are independent of their components.
(i) ( p ∧ ( p → q)) ∧ → q [U.P.T.U. (B.Tech.) 2006]
(ii) ( p → q) ⇔ ( p ∨ q))
(iii) (( p → q) ∧ (q → p)) → ( p → r) [U.P.T.U. (B.Tech.) 2007]
32. Determine whether the following statements are tautology, contradiction or satisfiable.
(i) p ∧ (~ p)
(ii) p → (q → p)
(iii) [ p ∧ ( p → q)] → ~ q
(iv) ( p → q) ∧ (q → r) ∧ ( p ∧ ~ r) [U.P.T.U. (B.Tech.) 2003]
(v) q ∨ (~ q ∧ p)
(vi) ( p ∨ ~ q) ∧ (~ p ∨ ~ q) ∨ q [U.P.T.U. (B.Tech.) 2008]
Propositional Logic 457
1. (a) Yes; (b) No; (c) No; (d) No; (e) Yes.
2. (a) p ≡ Neha will go to college, q ≡ She will live in the house and r ≡ She will study.
∴ Statement: p ∨ (q ∧ r).
(b) p ≡ Kirty is happy, q ≡ Kirty is sad.
∴ Statement: ( p ∨ q) ∧ (~ q) ⇒ p.
∴ Statement: ( p ∨ ~ q) ∧ q ⇒ p]
the variables.
The formula A is a Tautology if A has the truth value T for all possible assignments of the truth values to
the variables p1 , p2, p3 , K pn and A is called Contradiction if A has truth value F for all possible
assignments of the truth values of the n variables. A is said to be satisfiable if A has the truth value T for at
least one combination of truth values assigned to p1 , p2, p3 K pn
If p and q are the given variables then p ∨ (~ p), ~ p ∨ q, ~ q ∨ p ∨ (~ p) are some examples of elementary
sum.
⇒ P ⇔Q
⇒ (P ∧ Q ) ∨ (~ P ∧ ~ Q )
⇒ (− ( p ∨ q) ∧ ( p ∧ q)) ∨ (( p ∨ q) ∧ ~( p ∧ q))
⇒ (− p ∧ ~ q) ∧ ( p ∧ q) ∨ ( p ∨ q) ∧ (~ p ∨ ~ q)
⇒ (~ p ∧ ~ q ∧ p ∧ q) ∨ (( p ∨ q) ∧ ~ p) ∨ (( p ∨ q) ∧ (− q))
This is DNF
Propositional Logic 459
= p ∨ p ∨ q ∨ ~q ∨ ~r
= p ∨ q ∨ ~q ∨ ~r
⇒ (P → Q ) ∧ (Q → P )
⇒ ~( p ∨ q) ↔ ( p ∧ q)
⇒ [( p ∨ q ∨ p) ∧ ( p ∨ q ∨ q) ∧ (~ p ∨ ~ q ∨ ~ p) ∧ (~ p ∨ ~ q ∨ ~ q)
= (~ p ∨ q) ∧ (~ p ∧ q)
= (~ p ∨ ~ p ∧ q) ∨ (q ∧ ~ p ∧ q)
= (~ p ∧ q) ∨ (q ∧ ~ p)
(ii) p ∧ ( p → q) → q = ~(~ p ∧ ~ p ∨ q) ∨ q
= ~ p ∨ ~(~ p ∨ q) ∨ q
= ~ p ∨ ( p ∧ ~ q) ∨ q
460 Discrete Mathematical Structures
= (~ p ∧ ~ q) ∨ (q ∧ p) This is DNF
= [(~ p ∧ ~ q) ∧ q][(~ p ∧ ~ q) ∧ p]
= (~ p ∧ q) ∧ (b ∧ ~ q)
This is CNF.
The statement of the type p ↓ q read as ' Neither p nor q' is called joint denial or NOR statement.
Thus, p ↓ q = ~( p ∨ q)
To make it more clear the joint denial statement, in the example of conditional, neither the father had
promised to purchase a scooter nor the son has stood first in the examination.
p q p↓q
T T F
T F F
F T F
F F T
Example 75: Express the three connective ∨, ∧ and ~ in terms of the connective ↓.
Solution: Truth tables for three connectives are as follows:
(i)
p ~p p↓ p
T F F
F T T
∴ ~ p = p ↓ p.
Propositional Logic 461
(ii)
p q p∧q p↓ p q↓q ( p ↓ p) ↓ ( q ↓ q)
T T T F F T
T F F F T F
F T F T F F
F F F T T F
∴ p ∧ q = ( p ↓ p) ↓ (q ↓ q)
(iii)
p q p∨q p↓q ( p ↓ q) ↓ ( p ↓ q)
T T T F T
T F T F T
F T T F T
F F F T F
∴ p ∨ q = ( p ↓ q) ↓ ( p ↓ q).
The connective NAND is denoted by symbol ↑ and is defined as “negation of AND of two statements’’.
p ↑ q = ~( p ∧ q)
Thus, p ↑ q is false only in the case when both p and q are true.
p q p↑q
T T F
T F T
F T T
F F T
(3) XOR ( ⊗ )
The XOR of two statements is True if only if one of the two statements is true. In other words, if p and q are
two statements then their XOR is denoted by p ⊗ q and is True if p is true or if q is true but not p and q both
be true.
462 Discrete Mathematical Structures
p q p⊗q
T T F
T F T
F T T
F F F
Solution:
T T T F T F T
T T F F T F F
T F T T F T F
T F F T T T T
F T T T F T F
F T F T T T T
F F T T F F T
F F F T T F F
9.11.3 Argument
In logical mathematic, We require the process of reasoning. Given a certain set of propositions (i.e.,
statements), we are required to derive other propositions by logical reasoning. The given set of
propositions is called Premises (or Hypothesis) and the proposition derived from this set is called
Conclusion.
OR
9.11.4 Argument
An argument is a process which yield a conclusion (i.e., another proposition) from a given set of
propositions, called premises. Let premises (i.e., given set of propositions) be p1 , p2, . . . , pn and let
argument yield the conclusion (i.e., another proposition) q, then such an argument is denoted by
p1 , p2. . . , pn |— q
Propositional Logic 463
argument is called Valid if and only if the premises implies the conclusion. Thus, the argument
p1 , p2, . . . , pn|— q is said to be valid if and only if the statement
( p1 ∧ p2 ∧ K ∧ pn ) → q is tautology.
q (Conclusion)
In the above representation premises are listed above the horizontal line and the conclusion below the
horizontal line.
p q ~p p∨q ( p ∨ q) ∧ ~ p [( p ∨ q) ∧ ~ p] → q
T T F T F T
T F F T F T
F T T T T T
F F T F F T
Since all entries in the last column are of 'T ' only, therefore [( p ∨ q) ∧ ~ p] → q is a tautology. Hence the
given argument is valid.
464 Discrete Mathematical Structures
p→ r (conclusion)
q (conclusion)
is a valid argument. This is called Rule of Detachment. This rule is also known as Modus Ponens.
The validity of a given argument can be checked by the help of a truth table and also without using the
truth table.
Solution:
p (premise)
p→ q (premise)
q→ r (premise)
By the above sequence of valid arguments, it follows that the given argument is valid.
[ p ∧ ( p → q) ∧ (q → r)] → r
Propositional Logic 465
p q r p→ q q→ r p ∧ ( p → q) p ∧ ( p → q) ∧ ( q → r ) = f ( say ) f → r
T T T T T T T T
T T F T F T F T
T F T F T F F T
T F F F T F F T
F T T T T F F T
F T F T F F F T
F F T T T F F T
F F F T T F F T
Since last column contains only T ' s, hence the given argument is valid.
p q p→ q p ∧ ( p → q) [ p ∧ ( p → q)] → q
T T T T T
T F F F T
F T T F T
F F T F T
Since last column contains only T 's, here the given argument is valid.
Example 81: Test the validity of the following argument: "If it rains then it will be cold. If it is cold then I
shall stay at home. Since it rains therefore I shall stay at home".
Solution: Let P : It rains, q : It will be cold; r : I shall stay at home.
The given argument in symbolic form can be written as
p→ q (a premise)
q→ r (a premise)
p (a premise)
r (conclusion
p q r p→ q q→ r ( p → q) ∧ ( q → r ) ( p → q) ∧ ( q → r ) ∧ p [( p → q)
∧ ( q → r ) ∧ p] → r
T T T T T T T T
T T F T F F F T
T F T F T F F T
T F F F T F F T
F T T T T T F T
F T F T F F F T
F F T T T T F T
F F F T T T F T
Since last column contains only T ' s, hence the given argument is valid.
p→ q (a premise)
~p (a premise)
~q (conclusion)
Propositional Logic 467
p q p→ q ~p ~q ( p → q) ∧ ~ p [( p → q) ∧ ~ p] → ~ q
T T T F F F T
T F F F T F T
F T T T F T F
F F T T T T T
The last column in the table shows that [( p → q) ∧ ~ p] → − q is not a tautology. Hence the given argument
is not valid.
Example 83: State whether the argument given below is valid. If it is valid, identify the tautology or
tautologies used:
I drive to work.
∴ I will arrive tired.
Solution: Let p : I drive to work, q : I will arrive tired.
∴ The given argument, in symbolic form, may be written as
p→ q (a premise)
p (a premise)
∴ q (conclusion)
p → q, p | q
which is valid.
Example 84: State whether the argument given below is valid or not valid. If it is valid, identify the
tautology used:
I will become famous or I will be writer.
I will not be a writer.
∴ I will become famous.
p∨ q (a premise)
~q (a premise)
∴ p (conclusion)
The given argument i.e., ( p ∨ q) ∧ (~ q) | p will be valid if the statement [( p ∨ q) ∧ (~ q)] → p is a
tautology. Now we construct the truth table for the above statement.
p q p∨q ~q ( p ∨ q) ∧ (~ p) [( p ∨ q) ∧ (~ q)] → p
T T T F F T
T F T T T T
F T T F F T
F F F T F T
Since last column contains only T ' s, hence the given argument is valid.
Example 85: Test the validity of the argument: If 8 is even then 2 does not divide 9. Either 7 is not prime or 2
divides 9. But 7 is prime, therefore, 8 is odd.
Solution: Let p : 8 is even; q : 2 divides 9; r : 7 is prime.
The given argument, in symbolic form, may be written as
p→ ~q (a premise)
− r∨q (a premise)
r (a premise)
∴ ~p (conclusion)
The given argument will be valid if the statement [( p → ~ q) ∧ (~ r ∨ q) ∧ r] → (~ p)is a tautology. We construct
the truth table:
p q r ~ p ~q ~r p→~q ~r ∨ q ( p → ~ q) ∧ (~ r ∨ q) f → (~ p)
∧ r = f ( say )
T T T F F F F T F T
T T F F F T F T F T
T F T F T F T F F T
T F F F T T T T F T
F T T T F F T T T T
F T F T F T T T F T
F F T T T F T F F T
F F F T T T T T F T
Since last column only contains T's hence, the given argument is valid.
Propositional Logic 469
Example 86: "If the labour market is perfect then the wages of all persons in a particular employment will be
equal. But it is always the case that wages for such persons are not equal therefore the labour market is not
perfect". Test the validity of the argument. [R.G.P.V. (Bhopal) 2009]
Solution: In the given case let
p1 : “The labour market is perfect”
p2 : “Wages fo all persons in a particular employment will be equal”
~p2 : Wages for such persons are not equal
~p1 : The labour market is not perfect.
The premise are p1 ⇒ p2, ~ p2 and the conclusions is ~ p1
p1 p2 ~ p1 ~ p2 p1 ⇒ p2 ( p1 ⇒ p2 ) ∧ ~ p2 [( p1 ⇒ p2) ∧ ~ p2] ⇒ ~ p1
T T F F T F T
T F F T F F T
F T T F T F T
F F T T T T T
Note: Hence the conclusion is given by the symbol ⇒. But in some example it is given by → which has same
meaning.
“If Ashok wins then Ram will be happy. If Kamal wins Raju will be happy. Either Ashok will win or Kamal will
win. However if Ashok win, Raju will not be happy and if Kamal wins Ram will not be happy. So Ram will be
happy if and only if Raju is not happy”. [Kurukshetra (B.E.) 2008]
p q r ¬ p ¬q ¬ q∨r ¬ p⇒q p ∧ ( ¬ q ∨ r ) ∧ ( ¬ p ⇒ q) f
T T T F F T T T T
T T F F F F T F T
T F T F T T T T T
F T T T F T T F T
T F F F T T T T F
F T F T F F T F T
F F T T T T F F T
F F F T T T F F T
Since f column does not contain all the truth values T. Thus it is not a tautology. Hence, the given
argument is not valid.
Propositional Logic 471
(a) p∧ q
¬ p⇒q
¬q
(b) r
p⇒¬q
q⇒r
(c) p∧ r
( p ⇒ q) ⇒ (r ⇒ s )
(d) [( p ⇒ q) ⇒ r] ⇒ s
r
s
p q ¬p ¬q p∧q ¬ p⇒q ( p ∨ q) ∧ ( ¬ p ⇒ ¬ q) f
T T F F T T T F
T F F T F T F T
F T T F F T F T
F F T T F F F T
Since f column does not contain all T. Hence, the given argument is not valid.
p q r q p⇔q q⇒r r ∧ ( p ⇔ q) ∧ ( q ⇒ r ) f
T T T F F T F T
T T F F F F F T
T F T T T T T T
F T T F T T T F
T F F T T T F T
F T F F T F F T
F F T T F T F T
F F F T F T F T
Since f column contain all the truth values T. Thus, it is a tautology and hence the given argument is valid.
(c) Let f = [( p ∧ r) ∧ [( p ⇒ q) ⇒ (r ⇒ s )]] ⇒ s
Construct the truth table
T T T T T T T T T T
T T T F T T F F F T
T T F T F T T T F T
T F T T T F T T T T
F T T T F T T T F T
T T F F F T T T F T
T F F T F F T T F T
F F T T F T T T F T
T F T F T F T F T F
F T T F F T F F F T
F T F T F T T T F T
T F F F F F T T F T
F T F F F T T T F T
F F T F F T F F F T
F F F T F T T T F T
F F F F F T T T F T
Since f column does not contain throughout T. Hence the given argument is invalid.
Propositional Logic 473
(d) F = [[[( p ⇒ q) ⇒ r] ⇒ s] ∧ r] ⇒ r
Construct the truth table for f
p q r s p ⇒ q ( p ⇒ q) ⇒ r (( p ⇒ q) ⇒ r) ⇒ s [(( p ⇒ q) ⇒ r ) ⇒ s ] ∧ r f
T T T T T T T T T
T T T F T T F F T
T T F T T F T F T
T F T T F T T T T
F T T T T F T T T
T T F F T T T F T
T F F T F T T F T
F F T T T T T T T
T F T F F T F F T
F T T F T T F F T
F T F T T F T F T
T F F F F T F F T
F T F F T F T F T
F F T F T T F F T
F F F T T F F F T
F F F F T F T F T
Example 90: Check the validity of the following arguments. Show with the use of symbolic notation.
x 2 = y 2 only if x = y
x=y
p⇒q
Let f = [( p ⇒ q) ∧ q] ⇒ p.
p q p⇒q ( p ⇒ q) ∧ q f
T T T T T
T F F F T
F T T T F
F F T F T
Since f column does not contain T throughout so it is not a tautology. Hence the given argument is invalid.
p q ~p ~q p∧q ~ ( p ∧ q) ~ p∨ ~q
T T F F T F F
T F F T F T T
F T T F F T T
F F T T F T T
(a) ( p ∨ q) ∧ r (b) ( p ∧ q) ∨ T
(c) ~( p ∨ q) ∧ ( p ∨ ~( p ∧ s ))
(a) ~( p ∧ q) = ~ p ∨ ~ q (b) ~( p ∨ q) = ~ p ∧ ~ q
~q
4. Check the validity of the following arguments:
p → q'
(a)
r' → q'
p → r'
(b) p
q
~ p→ r
q→ ~r
~r
(c) p
q
p∧ q→ r ∨ q
p ∧ q→ ρ ∧ q
r
5. Is the following argument valid? "If the labour market is perfect then the wages of all persons in a
particular employment will be equal. But it is always the case that wages for such persons are not equal.
Therefore the labour market is not perfect"
6. Express p → q and p ∧ q in terms of ↓.
7. Given that the value of p → q is true. Can you determine the value of ~ p ∨ ( p ↔ q) ?
8. Prove that the statement "if n is an integer, then n2 − n + 4 ! is a prime number" is false.
9. Define conditional and bi-conditional statements. Show that p → (q → r) = ( p ∧ q) → r
10. Define arguments and valid arguments with examples.
11. Make the truth table for ( p ↓ q) ∧ ( p ↓ r) where p ↓ q is a true statement if neither p nor q is true.
[U.P.T.U. (B.Tech.) 2005]
476 Discrete Mathematical Structures
1. (a) ( p ∧ q) ∨ r (b) ( p ∨ q) ∧ F
(c) ~( p ∧ q) ∨ ( p∧ ~( p ∨ s )
4. (a) valid (b) valid (c) valid
5. valid
6. p → q = (~ p ↓ q) ↓ (~ p ↓ q)
7. True
The validity of such type of argument depends upon the inner logical structure of simple statements it
contains.
The second premise of the above argument is a singular proposition; it states that the individual Newton
has the characteristic of being a human. We say ‘Newton’ the subject term and ‘human’ the predicate term.
The individuals are not necessarily persons, but may be any things, such as planets, stars, cities, animals
etc. of which the characteristics may be predicated. Similarly the characteristic can be designated by not
only adjectives but also by nouns, pronouns or verb.
In symbolic notation, we shall use small letters to denote the individuals such as the individual ‘Newton’
will be denoted by the small letter ‘n’ [the first letter of the name], and is called individual constant. The
characteristic will be denoted by the capital letter such as ‘mortal’ by M and ‘human’ by H. The symbolic
notation for ‘Newton is mortal’ will be used as M (n) and for ‘Newton is human’ as H (n). Some other
examples of singular propositions with the same characteristic are ‘Brijpal is human’. ‘Lakshay is human’
and their symbolic formulation are respectively ‘H (b)’, ‘H (l)’. Let us use the symbolic representations H ( x )
to denote the pattern common to all such singular propositions. The small letter ‘x’ is called ‘individual
variable’, and takes values from the set of individual constants. When an individual constant is substituted
for x, a singular proposition, is produced, such as H (n), H (b), H (l).
The singular propositions H (n), H (b), H (l) are either true or false i.e., they have their truth values but three
is no truth value (true or false) or H ( x ) since H ( x ) is not a proposition. The expressions of the type H ( x ) are
called ‘Propositional Functions’ or ‘Open Sentences’. Thus propositional functions are expressions
that contain individual variables and become propositions when their individual constants are replaced by
individual variables.
Propositional Logic 477
Definition: Let A be a given set. An expression denoted by P ( x ) is called a propositional function or,
simply, an open sentence or, a predicate on A if P (a) is true or false for each a ∈ A i.e. P (a) has a truth value for
each a ∈ A. In other words, P ( x ) is called a propositional function or, an open sentence if P ( x ) becomes a
statement whenever any element a ∈ A is substituted for the variable x.
Clearly P ( x ) is true for n = 1, 2, 3, 4 and false for x = 5, 6, 7, K Hence P ( x ) becomes a statement whenever any
element a ∈ N is substituted for x.
Illustration: Let P ( x )be ‘ x + 3 > 6’ , then P ( x )is a propositional function on the set of natural numbers N.
Illustration: Let P ( x ) be ‘ x + 3 > 6’, then P ( x ) is not a propositional function on the set of complex numbers
C, because inequalities are not defined on C.
Illustration: If ‘ x + 3 > 6’ be a propositional function defined on N, then find the truth set of P ( x ).
∴ T (P ) = { x : x + 3 > 6, x ∈ N} = {4, 5, 6, K }.
T (P ) = { x : x + 2 < 3, x ∈ N} = φ .
T (P ) = { x : x < 5, x ∈ D} = φ .
T (P ) = { x : x > 5, n ∈ N} = {6, 7, 8, K }.
9.14 Quantifiers
The restrictions namely ‘for every’ and ‘for some’ are called Quantifiers.
There are two types of quantifiers.
Let P ( x ) be a propositional function defined on the set D. If ‘for every x ∈ D, P ( x ) is a true statement’ then by
the use of universal quantifier (∀ ) it is written as
(∀ x ∈ D ) P ( x ) or ∀ x P ( x )or ∀ x, P ( x ). ...(1)
i.e., T (P ) = { x : x ∈ D, P ( x )} = D ...(2)
Illustration: The statement (∀ n ∈ N )(n + 2 > 1) is true since its truth set
T (P ) = {n : n ∈ N, n + 2 > 1} = {1, 2, 3, 4, K } = N.
Illustration: The statement (∀ n ∈ N )(n + 1 > 5) is false since its truth set
T (P ) = {5, 6, 7, K } ≠ N.
Illustration: The statement (∀ x ∈ R)( x 2 > − 1)where R is the set of real numbers, is true since its truth set
T (P ) = { x : x ∈ R, x 2 > − 1} = R.
Illustration: Let D be the set of all men, then the statement ‘All men are mortal’ is written as
(∀ x ∈ D ) (x is Mortal).
Illustration: Let { At }t ∈ T be a family of sets, where T is the index set. The intersection of family of sets
denoted by ∩ At may also be written as (by the use of ∀) follows
t ∈T
∩ At = { x : ∀ t ∈ T , x ∈ At }
t ∈T
Let P ( x ) be a propositional function defined on the set D. If ‘there exists an x ∈ D, such that P ( x ) is a true
statement’ or ‘for some x ∈ D, P ( x ) is a true statement’ or ‘for at least one x ∈ D, P ( x ) is a true statement’
then it is written as
Propositional Logic 479
( ∃ x ∈ D ) P( x ) or ∃ x P ( x ). ...(1)
Hence, we find that the truth set (or universe of discourse) is not the empty set, i.e.,
T (P ) = { x : x ∈ D, P ( x )} ≠ φ .
T (P ) = {n : n + 7 < 6} = φ .
Illustration: The statement ( ∃ x ∈ R)( x 2 − 1 = 0), R is the set of real numbers, is true since
T (P ) = { x : x 2 − 1 = 0} = {1, − 1} ≠ φ .
We see the variable x can take only two real values 1, − 1 for which x 2 − 1 = 0 is true.
Illustration: Let { At }t ∈ T be a family of sets. The union of family of sets denoted by ∪ At may also be
t ∈T
written as (by the use of ∃) follows:
∪ At = { x : ∃ t ∈ T , x ∈ At }.
t ∈T
Hence, we see that the negation of a statement with ‘universal quantifier’ is a statement with ‘existential
quantifier’.
Again we consider the proposition. ‘Some Indian are honest’.
If M denotes the set of Indians, then this statement in symbolic form can be written as
(∃ x ∈ M )( x is honest).
This statement will become false, if we say that ‘No India is honest’ or in symbolic form
(∀ x ∈ M )( x is not honest).
480 Discrete Mathematical Structures
Therefore, the negation of the statement ‘some Indians are honest’ will be ‘No Indian is honest’. In
symbolic form, the negation of (∃ x ∈ M ) P ( x ) is (∀ x ∈ M )(~ P ( x )) where P ( x ) denotes ‘x is honest’.
Hence, we see that the negation of a statement with ‘existential quantifier’ is a statement with ‘universal
quantifier’.
Similarly ~( ∃ x ∈ D ) P ( x ) ≡ (∀ x ∈ D )~ P ( x ) ...(2)
Example 94: Use quantifiers to say that 3 is not a rational number. [U.P.T.U. (B.Tech.) 2008]
Example 95: Let M ( x ) be ‘‘x is mammal’’. Let A( x ) be ‘‘x is an animal’’. Let W ( x ) be ‘‘x is warm blooded’’.
Translate into a formula; Every mammal is warm, blooded. Translate into English.
(∃ x )( A( x ) ∧ (~ M ( x ))) [U.P.T.U. (B.Tech.) 2008]
Example 97: Nagate the proposition ‘‘All integers are greater then 8’’.
[Nagpur (B.E.) 2005; Pune (B.E.) 2004, 2007; M.K.U. (B.E.) 2008; Rohtak (M.C.A.) 2009]
Remark: In negation a proposition ‘‘for all’’ becomes ‘‘there is’’ and ‘‘there is’’ becomes ‘‘for all’’.
Example 98: Translate the following statements given in English into equivalent statements of
Propositional/Predicate Calculus, after introducing appropriate symbolism.
(i) Some pet dogs are dangerous
(ii) Some physicists are not good in chemistry
(iii) Americans will stop driving big cars only if there are comfortable small cars.
(iv) Not all birds can fly
(v) Himadari, who is a doctor, is a good sports man also
(vi) Sum of two positive integers is greater than either of integers.
(vii) Some cats are black but all buffaloes are black
(viii) Some patients like all doctors
(ix) Some people have six fingers on one hand
(x) Some people help every body
(xi) Some mangoes are green
(xii) Some real numbers are integers
(xiii) Some mathematicians are not good in computer science
(xiv) All lions have tails
(xv) All cows are not white
(xvi) All frogs are brown
(xvii) All lions are dangerous animals
(xviii) All integers are either odd integers or even integers
(xix) All cows have four legs
(xx) All fish except shark are kind to children
(xxi) All men are mortal
(xxii) Any integer is either positive or negative
(xxiii) Every integer is also a real number
(xxiv) Nine plus ten equal nineteen
(xxv) Let A subset of B. Express this fact in predicate calculus.
(xxvi) Some irrational numbers x and y, the number x y is a rational numbers
(xxvii) Couple’s only surviving child is male
Solution: (i) Some Pets dogs are dangerous
Let P ( x ): x is pet dog and D( x ): x is dangerous
∴ In predicate calculus we have
x P ( x ) → D( x )
(ii) Some physicists are not good in chemistry
Let P ( x ): x is a physicist and C ( x ): x is good in chemistry
∃ x P( x ) → C ( x )
482 Discrete Mathematical Structures
(iii) Americans will stop driving big cars only if there are comfortable small cars.
Let A( x ): x is American will stop driving big cars and C ( x ): x is comfortable small cars
In predicate calculus, we have
C ( x ) → A( x )
(iv) Not all birds can fly.
Let B( x ): x is bird and F ( x ): x is fly
~(∀ B( x )) → F ( x )
(v) Himadari, who is a doctor, is a good sports person also
Let x : denote Himadari, D( x ): is doctor and S( x ): x is sport person
In predicate calculus, we have
( ∃ x ) D( x ) ∧ S( x )
(vi) Sum of two positive integers is greater than either of the integers
Let I( x ): x is positive integer, GT ( x, y ): x is greater then y and Su ( x, y ): sum of x and y
Thus, in predicate calculus, we have
(∀x )(∀y )(I( x ) I( y ))(GT (Su ( x, y ) GTSu ( x, y ), y )))
(vii) Some cats are black but all buffaloes are black
Let C ( x ): x is a cat, B( x ): x is a black, and BF ( x ): x is buffalo
∴ ∃ x ∈ C ( x ) ⇒ B( x )
and ∀x BF ( x ) ⇒ B( x )
(viii) Some patients like all doctors
Let P ( x ): x is patient, and D( y ): y is doctor, ( x, y ): x likes by y
∴ x P( x ) y
(ix) Some people have six fingers on one hand
Let P ( x ): x is people, S( x ): x is a people having six fingers on one hand
∃ x ∈ P ( x ) → S( x )
(x) Some people help everybody
∃ x ∈ P ( x ) → H ( x, y ) ∀ x ∈ (P ( x ) ∧ HB( y ))
or ∃ x ∈ P ( x ) → ∀ y ∈ (P ( x ) ∧ HB( y )) → H ( x, y )
(xi) Some mangoes are green
Let M ( x ): x are mangoes and G( x ): x are green
∴ In predicate calculus, we have
∃ x (M ( x ) → G( x ))
Propositional Logic 483
(vii) ∃ x ( x 2 = x ), (viii) ∃ x ( x + 2 = x ),
2 2
(ix) ∃ x ( x = 1 and x − 2x + 3 = 0), (x) If there is a will there is a way,
(xi) All men are mortal. (xii) All integer are greater than zero.
[U.P.T.U. (B.Tech.) 2008]
Take the universal set as set of real numbers from (i) to (ix).
(viii) ∀ x ( x + 2 ≠ x ).
(ix) ∀ x ~( x 2 = 1 and x 2 − 2x + 3 = 0).
or ∀ x (x 2 ≠ 1 or x 2 − 2x + 3 ≠ 0).
(x) We know that ~( p ⇒ q) ≡ p ∧ ~ q . Thus required negation is:
There is a will and there is no way.
(xi) Some men are not mortal.
(xii) Let A( x ) denote ‘‘x is an integer’’
and (B )x denoted ‘‘x is greater than 0’’
Then given proposition can be written as ( ∃ x ∈ A( x )(− B( x )))
Example 103: Negate the statement ‘It is daylight and all the people have arisen’.
Solution: We know that ~( p ∧ q) ≡ ~ p ∨ ~ q .
Hence the negation of the given statement is:
‘It is false that it is daylight and all the people have arisen’.
≡ ‘It not daylight or it is false that all the people have arisen’.
≡ ‘It is not daylight or some one has not arisen’.
Q ~ ∃ x P ( x ) ≡ ∀ x ~ P ( x ) and ~ ∀ y Q ( y ) ≡ ∃ y ~ Q ( y )
(ii) We know that ~( p ∧ q) ≡ ~ p ∨ ~ q .
∴ ~[ ∀ x P ( x ) ∧ ∃ y Q ( y )] ≡ ~ ∀ x P ( x ) ∨ ~ ∃ y Q ( y ) ≡ ∃ x ~ P ( x ) ∨ ∀ y ~ Q ( y ).
Example 105: Write the three properties of equivalence relation in symbolic notations.
Solution: Let R ( x, y ) denote that x has a relation R with y, then the three properties for R to be an
equivalence relation are:
(i) Reflexivity: ∀ x R ( x, x ).
(ii) Symmetric: ∀ x, y [ R ( x, y ) ⇒ R ( y, x )].
(iii) Transitivity: ∀ x, y, z [ R ( x, y ) ∧ R ( y, z ) ⇒ R ( x, y )].
Solution: ~ ∀ x ∃ y [ P ( x, y ) ⇒ Q ( y )] ≡ ∃ x ∀ y [ P ( x, y ) ∧ − Q ( y )] [Q ~( p ⇒ q) ≡ p ∧ ~ q].
Solution:
(i) ∃ x [ x < 7 ∧ 5 < x]. (ii) ∀ x ∃ y ( x < y ).
2
(iii) ∀ x ∀ y ∃ z (| x − y| < x z ). (iv) ( ∃ x )( ∃ y )( ∃ z )( xz < x + y ).
Example 110: ‘If the product of two rational numbers is zero, then at least one factor is zero’. Write this
statement into symbols.
Solution: Let P ( x ) ≡ product of rational numbers is x and F ( x, y ) ≡ x in a factor of y.
The given sentence is symbols is
∀ x [ P ( x ) ∧ ( x = 0) ⇒ ∃ y [ F ( x, y ) ⇒ ( y = 0)}].
Case (i): The truth value of (∀ x ∈ D : P ( x )) is T. In this case P ( x ) is satisfied for all x ∈ D . Therefore, there
is an x ∈ D for which ~ P ( x ) is not satisfied.
So the truth value of ( ∃ x ∈ D : ~ P ( x )) is F.
Case (ii): The truth value of (∀ x ∈ D : P ( x )) is F. In this case P ( x ) is not satisfied for some x ∈ D, therefore,
~ P ( x ) is satisfied for some x ∈ D.
So the truth value of ( ∃ x ∈ D : ~ P ( x )) is T. Hence
~(∀ x ∈ D : P ( x )) ≡ ( ∃ x ∈ D : ~ P ( x )).
488 Discrete Mathematical Structures
Example 115: Write the following predicate into symbols and also write its negative in symbols:
8. Define Predicate.
9. Translate the following sentences in quantified expressions of Predicate logic
(a) All students need financial acid
(b) Some students need financial aid [U.P.T.U. (B.Tech.) 2009]
10. Show that the following are not equivalent
∀ x ( P( x ) → Q( x ) ∀ x ∀ y P( x, y )
(a) (b)
∀ x P( x ) → ∀ x Q( x ) ∀ y ∀ x P( x, y )
[U.P.T.U. (B.Tech.) 2009]
11. Find out which statements are propositions
(a) Close the door (b) Beware the dogs
(c) 3 + x = 10 (d) This statement is true
12. Which of the following are statements:
(a) Grass is yellow (b) is the number 5 is prime
(c) Give me pen (d) { y : y 2 = 4 = { 2, − 2}
(e) a 2 + b 2 ≥ 0 (f) White roses are beautiful
(g) If dogs can bark, then no home guarded by a dog needs to fear intruders
(h) (7 x + 5 y = 12 : ( x, y ) = (1, 1), x, y ∈ N )
13. Let p be the proposition ‘‘x is an even number’’ and let q be the statement ‘‘x is the product of two integer’’.
Translate into symbols each of the following statements
(a) Either x is an even number, or x is a product of two integers
(b) x is an odd number, and x is a product of two integers
(c) Either x is an even number and a product of integers, or x is an odd number and is
not a product of integers
(d) x is neither an even number nor a product of integers
14. Negate the following propositions
(a) All the triangles have the sum of their angle equal to 180°
(b) There is an integer between 4 and 8 inclusive
(c) All students live in the hostels
(d) For all x in S, 0 + x = 0
(e) All differentiable functions are continuous
15. If p ≡ It is about 6:45 PM
2. X = φ ≡ V x ( x ∉ X ), X = ∪ ≡ Vx( x ∈ X )
2. X = φ ≡ V x ( x ∈ X ), X = ∪ ≡ V x ( x ∈ X )
11. (a) No (b) No (c) No (d) Yes
12. (a) Yes (b) No (c) No (d) Yes (e) Yes (f) Yes
(g) Yes (h) Yes
13. (a) p ∨ q (b) p ∧ q (c) p ∧ q ∨ (~ p ∧ ~ q) (d) φ ~ p ∧ ~ q
14. (a) There is a triangle whose sum of angles ≠ 180°
(b) All integers are not between 4 and 8 inclusive
(c) Some students do not leave in hostels
(d) There exists an x in S such that 0 + x ≠ 0
(e) Not all differentiable functions are continuous.
15. (a) It is about 6:45 p.m. and Sangam train is about of depart
(b) Either it is about 6:45 p.m. or Sangam train is about to depart
(c) Either Sangam Train is about to depart or it is not about 6:45 p.m.
(d) It is about to 6:45 p.m. and Sangam train is not about to depart
(e) It is false that it is about 6:45 p.m. and Sangam train is about to depart.
(f) Neither it is about to 6:45 p.m. nor Sangam train is about to depart.
(g) It is not about to 6:45 p.m., then Sangam train is about to depart
(h) If the Sangam train is not about to depart, then it is about to 6:45 p.m.
7. If T ( x ): x is teacher, M ( x ): x is male, then symbolic representation of the statement ‘‘All teacher are
male’’ is
(a) ∀ x [T ( x )] ⇒ M ( x ) (b) ∀ x {T ( x ) ∨ M ( x )}
(c) ∀ x {T ( x ) ∧ M ( x )} (d) ∃ x {T ( x ) ∧ ~ M ( x )}
8. The proposition p ∧ (~ ∨ Q ) is
(a) A tautology (b) A contradiction
(c) Logically equivalent to P ∧ Q (d) Logically equivalent to P ∨ Q
[U.P.T.U. (M.C. A.) 2008]
7. (a) 8. (c)
1. T 2. T 3. F 4. T 5. F
4. sufficient
qqq
Unit-5
C hapter
10. : Trees and their Proper ties
11. : Graph Theor y
12. : Recur rence Relations
13. : Discrete Numeric and Generating Functions
14. : Combinatories
15. : Polya's Theorem
10.1 Introduction
The concept of a tree is the most important tool for the study of graph theory, especially for those
interested in application of graph. In this chapter, first of all we shall define a tree and study its properties.
We shall also introduce and discuss other graph theoretic terms related to trees. Thereafter, we shall
introduce the concept of spanning tree-another important notion in the the ory of graphs. The re lationships
among circuits, trees, and so on, in a graph are explored.
10.2 Tree
In the study of graph of a network we obtain several circuit (closed paths) through which current can
flow. Such circuits, are necessary for the flow of current. However, by deleting some branches from the
graph we can check the current to flow. By deleting branches and rejecting the closed path, the residual
graph is known as a “tree”.
A Tree is a connected graph without any circuits.
Illustrations
(i) All the trees with at most five vertices are shown in Fig. 10.1.
Fig. 10.1
(ii) The adjoining Fig. 10.2 shows six trees with six vertices:
Fig. 10.2
496 Discrete Mathematical Structures
(iii) The adjoining Fig. 10.3 shows a river with its tributaries and sub-tributaries:
The process of deleting the branches from a graph can be done by several methods. In the adjoining
Fig. 10.4 (a) a graph is shown and in Fig. 10.4 (b) and Fig. 10.4 (c) two trees are shown amongst
several possibilities.
In every tree, the remaining branches of the tree are just sufficient to join all nodes. Hence we can
define precisely a tree as. Any set of branches in the original graph, just sufficient in number to
connect all the nodes, is called a tree.
If ni denotes the total number of nodes, then it can easily be seen that the minimum number of
branches to join all nodes is (ni − 1) and we shall not get any closed path (circuit).
If the number of branches is greater than (ni − 1), then only we shall get closed path.
Hence n = ni − 1
where n = number of tree branches, ni = total number of nodes.
The remaining branches are said to be Lines.
Thus, if l is the number of lines, then b = l + n where b denotes the total number of Branches.
A Rooted Tree is a tree with a distinguished ver tex, called the Root. Any vertex of a tree may be designed
as the root, but we shall cus tomarily draw a rooted tree with the root at the top (or at the bottom) and
circled or triangled.
Trees and their Properties 497
Illustrations
(i) In the adjoining Fig. 10.5 rooted trees with 4 vertices are shown:
(ii) In the ad joining Fig. 10.6 all rooted trees with 5 ver tices are shown:
(Root) 0
3
1
3.0 3.1
1.0 1.1 1.2 2
2.1.0 2.1.1
Fig. 10.7
498 Discrete Mathematical Structures
10.2.4 Arborescence
Let G be a directed graph. G is said to be an Arborescence if:
(i) G contains no circuit neither directed nor semi-circuit; and
(ii) G has exactly one vertex v of zero in-degree.
The vertex v of zero degree in G is called the Root of the
v (root)
Arborescence.
Fig. 10.8
From the definition, it is clear that on arborescence is a directed tree in
which there is exactly one vertex of in-degree zero. If G is an arborescence then every vertex of T is
reachable, from the root, and the root is not accessible from any other vertex of G. If v is a vertex of
out-degree zero, in G then v is necessarily a pendant vertex. An arborescence is sometimes referred to as an
out-tree.
Theorem 1: An arborescence is a tree in which every vertex other than the root has an in-de gree of exactly
one.
Proof: Let G be an arborescence with n-vertices. G can have at most n − 1, edges, because of condition (i). If
v1 , v2 , K , vn denote the vertices of G, then the sum of in degree of all vertices in G, i.e.,
d − (v1 ) + d − (v2 ) + K + d − (vn ) ≤ n − 1
exactly one of the terms on the left-hand side of the above equation is zero (by condition (ii)) and the
remaining terms must all be positive integers, therefore each of the remaining terms must be 1. Now, since
there are exactly n − 1, vertices of in-degree one and one vertex of in-degree zero. G has exactly n − 1 edges.
Since G is without circuits, G must be connected. Hence, G must be a tree, in which every vertex other than
the root has an in-degree of exactly one.
Theorem 2: In an arborescence there is a directed path from the root R to every other vertex.
Proof: Let us consider a path P which start from the root R and traverses as far as possible in an
arborescence. P can end only at a pendant vertex because otherwise we get a vertex whose in-degree is two
or more. But then it would be a contradiction. Hence P ends at a pendant vertex. Now since an
arborescence is a connected and every directed path from R ends at a pendant vertex, every vertex line on
some directed path from the root R.
Theorem 3: A cir cuit-less diagraph G is an arborescence if there is a vertex v in G such that every other vertex
is ac ces sible from v and v is not acces si ble from any other ver tex.
Proof : G is circuit-less and every vertex in G is accessible from v, therefore G is con nected and hence G is a
tree. Further we are given that v is not accessible from any other vertex, therefore d − (v ) = 0. Since every
vertex is accessible from v, therefore in-degree of every vertex other than v is at least one. Since G is a tree,
it has n − 1 edges, where n is the number of vertices in G. Therefore sum of in-degrees of all the vertices in G.
Now there are n − 1 vertices whose in-degree is at least one. From this, we conclude that in-degree of each
n − 1 vertices (other than v) is one. By the orem 1, G is an arborescence.
Trees and their Properties 499
A Binary Tree is defined as a tree in which there is exactly one vertex of degree two, and each of the
remaining vertices is of degree one or three. Since the vertex of degree two is distinct from all other
vertices, this vertex serves as a root. Thus every binary tree is a rooted tree. When the trees are levelled, the
root v constitute level o, the neighbouring vertices of v constitute level 1, the Neighbouring neighbors of
vertices having level 1 are assigned level 2 and so on.
If the level of any vertex x is i, then its neighboring vertices on next level (i+1) are called its Children or
descendants. The vertices on previous level are called Father or Predecessor. A rooted levelled tree in
which any vertex has at most two children is called binary tree. If every vertex of a binary tree has either
two children or no child, then such a binary tree is called a full or Complete Binary Tree.
1. The number of vertices n in a binary tree is always odd. This is because there is exactly one vertex of
even degree, and the remaining n − 1 vertices are of odd degrees. Since the number of vertices of odd
degrees is even, n − 1 is even. Hence n is odd.
2. Let p be the number of pendant vertices in a binary tree T . Then n − p − 1 is the number of vertices of
degree three.
It follows from (1) that the number of internal vertices in a binary tree is one less than the number of
pendant vertices.
500 Discrete Mathematical Structures
Illustration:
A student must pass two from three tests to pass a course, the binary decision tree appears in the adjoining
Fig. 10.10 with label P denoting “pass” and label F denoting “fail”.
Test 1 F
P
Test 2
F P F P
Test 3
P F
F P
Example 1: What is a ‘Binary search Tree’? A binary search tree T and an ITEM of information is given write
the algorithm which finds the location of ITEM or inserts ITEM as a new node in tree.
[U.P.T.U. (B.Tech) 2008]
Solution: Definition is given in article.
Algorithm: A binary search tree T and an ITEM of information as given
Step 1: Compare ITEM with the root N of the tree.
(i) If ITEM< N, proceed to the left child of N
(ii) If ITEM > N, proceed to the right child of N
Step 2: Repeat step 1 until one of the following obtains.
(i) We meet a node N such that ITEM=N. In this case the search is successful.
(ii) We meet an empty subtree, which indicate the search in successful. Insert ITEM in place of the empty
subtree.
Trees and their Properties 501
Example 2: Show that Hamiltonian path is a spanning tree. [U.P.T.U. (B.Tech) 2006]
Solution: A Hamiltonian circuit in a graph G is a closed path that transverse every vertex in G exactly
once. According to the definition of Hamiltonian path each vertices transversed. So the Hamiltonian path
contains all vertices of graph G. The Hamiltonian path does not transverse a particular vertex twice. So
therefore it is a graph without cycle. Then it is called Spanning Tree. Hence, the Hamiltonian path is a
spanning tree.
Theorem 4: Prove that a binary tree with n nodes has exactly (n + 1) null branches.
Let n = 1, then tree 0 level only one node has two null branches in case of binary tree.
At level 0 ⇒ 1 node → 0
→ Level 1 2
→ Level 3 2
2
m–1
At level m = 2 node →
Fig. 10.11
When n = m, n = m + 1 null branches holds, then show (m + 1)nodes there are (m + 2)null branches
this show (m + 1) nodes has (m + 2) null branches hence theorem is tree for all value of n.
Positional Binary Tree. The root of the tree is not labeled. Since it vL vL
is not an off spring of any vertex. The position of the off spring is vR
indicated by the direction of the edges as shown in 10.12. As each Fig. 10.12
vertex of positional binary tree has two potential off-spring, these
off-spring will be denoted by vL (left off spring) and vR (right off spring).
There are three standard recursive methods (or algorithms) for searching (traversing) a positional binary
tree T with root v, as given below:
(1) Depth first order search or pre order search
(2) In order search or systematic order search
(3) Post order search.
Depth first order search: Depth first order search algorithm is as follows:
Step 1: Visit the root v of the tree.
Step 2: If vL exists, then search the left subtree TL of T is pre-order.
Step 3: If vR exists, than search the right subtree TR of T in pre-order.
Illustration:
Let a positional tree T be shown in Fig. 10.13 with root vertex a. The left subtree TL consists of vertices
b, d, e, h, i and j and its right subtree TR consists of vertices c, f , g, k and l .
b c
g
d f
e
l 11
h 3 2 k 9 10
6 8
i 5
4 j 7
1
First we apply pre-order search on left subtree TL numbered as l. For this, we start pre-order search of TL1
by first visiting its roots vertex b and then vertices d, h, e, i and j in this order. Similarly, applying pre-order
search of right subtree TR numbered as 7. The pre-order search of TR 7 starts by first visiting its root vertex c
and then vertices f , k, g and l in this order. The result of complete pre-order search of the given tree is the
string a b d h e i j c f k g l.
Example 3: Show the result of per forming pre-order, in-order and post-order searches of the binary tree
shown in Fig. 10.14.
Solution: The result of pre-or der, in-or der and post-order tree search al gorithm is the follow ing:
a
Pre-order a b d c e f g c
b
In-order b d a c g f e e
d
f
Post-order d b g f e c a
g
Fig. 10.14
504 Discrete Mathematical Structures
Example 4: Show the result of performing pre-order, in-order and post-order searches of the binary tree
shown in Fig. 10.15 .
Solution:
Pre-order a b d h i e c f
In-order h d i b e a f c
Post-order h i d e b f j k
Fig. 10.15
Example 5: Let the pre-order and in-order search of a binary tree T yield the fol lowing se quence of ver tices
(nodes):
In-order d b p h q s e a c r k f l
↑
root node
Pre-order a b d e h p q s c f k r l
↑
root node
[U.P.T.U. (B.Tech) 2009]
(a) Draw the binary tree T .
(b) Find depth (height) of T and the decedents of vertex b.
a
Solution: Since the root of the binary tree T is the first vertex in
pre-order search, therefore choose vertex a as the root vertex of T . To
b c
find left child of root vertex a first mark in in-order search all nodes that
are to the left of a. These vertices constitute a subtree TL of a. The left e
f
d
subtree TL consists of the vertices d, b, p, h, q, s and e which are to the left
h k
of root vertex a. Then left child of a is then obtained by choosing the next
p f l
vertex (root) in the pre-order, i.e. vertex b. This vertex is to the left of a in q
in-order search. Thus b is the left child of a. s
Fig. 10.16
Similarly, the right subtree TR of root vertex a consists of the vertices c, r, k, f and l and c is the root of TR i.e.
c is the right child of T . To draw the tree as shown in Fig. 10.16 repeat the above process for each new
vertex until all the nodes of pre-order search are considered.
(b) The depth (height) of T is 5 and decedents of b are d, e, h, p, q, s.
Example 6: Suppose the pre-order and in-order search of a binary tree T give the fol lowing se quence of nodes.
In-order d b g e h a c f
↑
root node
Pre-order a b d e h p q s
↑
root node
a
Draw the binary tree T and find its height.
Solution: As the first vertex in the pre-or der search of a bi nary tree is the c
b
root ver tex, so ver tex a is the root vertex of the bi nary tree to be drawn.
e
The binary tree drawn by using same method as discussed in Ex. 6 is d f
h
shown in Fig. 10.17.
g
Fig. 10.17
506 Discrete Mathematical Structures
Example 7: Sup pose the post-or der and in-or der search of a bi nary tree T yield the fol lowing se quence of
nodes (vertices):
In-order d b g e h a c f
↑
root node
Pre-order d g h e b f c a
↑
root node
Example 8: Consider the general tree shown in Fig. 10.19. Draw the corresponding binary tree.
1 1
2
2
4 5 3
5 3
8 9 6 4
6 7 10 7
8
11
9 10 11 12 13 14 12 13
Fig. 10.19: General Tree
14
Solution: Apply the procedure for converting a general tree into a binary tree and then we obtain a binary
tree as shown in Fig. 10.20.
Trees and their Properties 507
Example 9: Consider the general tree Tg as shown in Fig. 10.21. Draw the corresponding binary tree Tb.
Solution: Applying the procedure for converting a general tree into a binary tree, we obtain a binary tree
as shown in Fig 10.22.
The maximum level, lmax , of any vertex in a binary tree is called the height of the tree. It is easy to see that
the minimum possible weight of an n-ver tex bi nary tree is
min lmax = [log 2 (n + 1) − 1] ...(1)
where [ n] denotes the smallest integer greater than or equal to n.
If we construct a binary tree for a given n such that the farthest vertex is as far as possible from the root,
then we must have exactly two vertices at each level, except at the 0 level. Therefore
n −1
max lmax = ...(2)
2
508 Discrete Mathematical Structures
For n = 11, binary trees realizing both these extremes are shown in Fig. 10.23.
Level
........................................... 0
Level
0 ............................. .................................. 1
........................... 2
1 ...................
................... 3
2 ..............
............ 4
3 ...
... 5
(a) (b)
Fig. 10.23
11 – 1
Min lmax = [log 2 12 – 1] = 3 and Max lmax = =5
2
Example 10: Show that the number of vertices in a binary tree is odd
[P.T.U. (B.E.) Punjab 2009; M.K.U. (B.E.) 2003, 2007]
Solution: Let T be a binary tree with n vertices. T contains exactly one vertex of degree 2 and the remaining
vertices of T are of degree one or three. Therefore number of odd degree vertices in T is (n – 1) . But number of
odd degree vertices in graph is even. Therefore (n – 1) must be even, then n is odd.
Example 11: Find the minimum height of the tree with 9 vertices [U.P.T.U. (M.C.A.) 2004]
Example 12: Let T be a binary tree with n vertices and p is the number of pendant vertices in T, show that the
number of vertices of degree 3 in T is n – p + 1. [Nagpur (B.E.) 2005; Pune (B.E.) 2007]
Solution: The tree T has p vertices of degree one and one vertex in T is of degree 2. Then number of
remaining vertices (vertices of degree 3) = n – p – 1.
n+1
Example 13: Let T be a binary tree with n vertices. Show that the number of pendant vertices in T is .
2
Solution: Let p = number of pendant vertices in T
⇒ p × 1 + 3(n – p – 1) + 2 = 2(n – 1)
n+1
⇒ p + 3n – 3p – 3 + 2 = 2n – 2 or (n + 1 = 2p or p=
2
Trees and their Properties 509
Solution: Here, n = 13
n − 1 13 – 1
We know maximum possible height of the binary tree = = =6
2 2
Fig. 10.24: Binary tree of maximum
height with 13 vertices.
10.7.1 Path Length of a Tree
In analysis of algorithms we are generally interested in computing the sum of the level of all pendant
vertex. This quantity is known as the Path Length of a Tree. The Path Length of a Tree is de fined as
the sum of the path lengths from the root of all pendant vertices. The importance of the path length of a
tree lies in the fact that this quantity is often di rectly related to the execution time of an algorithm.
c1 b1
b1
b2
b2
c2 b3 b5
b4 b3 b5
c3
c4 b4
c5 c6
c7
Remember that branches and chords are defined only with respective to a given spanning tree. An edge
that is a branch of one spanning tree T1 of a graph G may be a chord with respect to another spanning tree T2
of G.
(3) The co-spanning tree T ∗ of a spanning tree T of a connected graph G is the subgraph of G having all the
vertices of G and exactly those edges of G which are not in T .
It may be observe that a co-spanning tree may not be connected.
It is sometimes convenient to represent a connected graph G as a union of two subgraphs T and T ; that is
T ∪ T = G,
where T is a spanning tree, and T is the complement of T in G. Since the subgraph T is the collection of
chords, it is quite appropriately referred to as the chord set (or tie set or co-tree) of T .
Theorem 6: With respect fo any of its spanning trees, a connected graph with n vertices and e edges has n − 1
tree branches and e − n + 1 chords. [Rohtak (B.E.) 2009]
Proof: Let G be a graph with n vertices and e edges and let T be any spanning tree of G. Then T has n vertices
and n − 1 edges. The remaining e − n + 1 edges in G are chords.
Hence the graph G with n vertices and e edges has n − 1 tree branches and e − n + 1 chords.
For example, the graph in Fig. 10.25 (a) has 6 vertices and 12 edges (i.e. n = 6 and e = 12). This graph has 5
tree branches (b1 , b2, b3 , b4 , b5 ) and e − n + 1 = 12 − 6 + 1 = 7 chords, {c1 , c2, c3 , c4 , c5, c6 , c7 } with respect to
the spanning tree given in Fig. 10.25 (b).
Note that any other spanning tree will also yield the same number.
Trees and their Properties 511
Theorem 7: There is one and only one path between every pair of vertices in a tree T.
[Kurukshetra (B.E.) 2009]
Proof: Since T is a connected graph, there must exist at least one path between every pair of vertices in T .
Now suppose that between two vertices v and w of T there are two distinct paths. The union of these two
paths will contain a circuit and T cannot be a tree. Hence we conclude that there is one and only one path
between every pair of vertices in a tree T .
Conversely or Theorem 8: If in a graph G there is one and only one path between every pair of vertices,
then G is a tree.
Proof: Existence of a path between every pair of vertices assures that G is connected. A circuit in a graph
(with two or more ver tices) im plies that there is at least one pair of ver tices v and w such that there are two
distinct paths be tween v and w. Since G has one and only one path between every pair of vertices, also G can
have no circuit. Therefore, G must be a tree.
The above facts can be justified from the adjoining Fig. 10.28.
Assume that the theorem holds for all trees with fewer than n vertices.
We now consider a tree T with n vertices. In T let ek be an edge with end vertices vi and v j . According to
Theorem 7, there is no other path between vi and v j except ek . Therefore, deletion of ek from T will
disconnect the graph, as shown in Fig. 10.29 Furthermore, T − ek consists of exactly two components and
since there were no circuits in T to begin with, each of these components is a tree. Both these trees t1 and t 2,
have fewer than n vertices each. Therefore, by induction hypothesis, each contains one less edge than the
number of vertices in it. Thus T − ek consists of n − 2 edges (and n vertices). Hence T has exactly n − 1 edges.
t1 t2
ek vj
vi
Fig. 10.29
Theorem 10: Any connected graph with n vertices and (n − 1) edges is a tree.
Proof: The proof of this theorem is left as an exercise to the reader.
512 Discrete Mathematical Structures
Theorem 13: A connected graph G is a tree if and only if adding an edge between any two vertices in G creates
exactly one circuit.
Proof: Let G be a connected graph, and let it is a tree. Let a and b be any two vertices in G. Since G is a tree,
there exists one path between vertices a and b. Add an edge between a and b then we find that an additional
path between a and b will be created and hence it creates exactly one circuit.
Trees and their Properties 513
Conversely, suppose that G is a connected graph such that adding an edge between any two vertices in G
creates exactly one circuit. We now show that G is a tree. In order to show that G is a tree, it is sufficient to
show that G has no circuit because G is already connected. Suppose, if possible, that G has a circuit. Then
adding an edge between two vertices of the circuit will create two circuits because there are two paths
between these vertices in the circuit. But it contracts our hypothesis. This completes the proof.
Definition: A circuit forward by adding a chord to a spanning tree T of a connected graph G is called a
fundamental circuit of G.
Note that such a transformation is a standard operation in the iteration sequence for solving certain
transportation problems.
In the above mentioned elementary tree transformation, instead of deleting branch c d, we could have
deleted d or b and thus would have obtained two additional spanning trees abch and achd. After generating
these three trees, we can restart with T1 and add a different chord, say e, f or g and repeat the process of
obtaining a different spanning tree each time a branch is deleted from the fundamental circuit formed.
Thus, we have a procedure for generating spanning trees for any given graph G.
The above mentioned procedure for generating spanning trees for any given graph raises many questions
as mentioned below:
514 Discrete Mathematical Structures
Theorem 14: A tree with two or more vertices has at least two pendant vertices.
Proof: Consider a tree T of n vertices and therefore T has n − 1 edges. We know that each edge contributes
two degrees and so the sum of degrees of all vertices in T is equal to 2 (n − 1). This sum of degrees i.e.
2 (n − 1) is to be divided among n vertices. Let m be the number of vertices of degree one in T .
Then n − m vertices in T will have degree 2 or more (since no vertex in a tree is of degree zero) and the sum
of degrees of these n − m vertices is 2 (n − 1) − m. Hence, we have
2 (n − 1) − m
≥ 2 i.e., m ≥ 2
n−m
Hence a tree with two or more vertices has at least two pendant (i.e., of degree one) vertices.
Summary: From the above theorems we conclude that a tree has following five different but equivalent
definitions. Thus a graph G with n vertices is said to be tree if:
(i) the graph G is connected and has n − 1 edges.
(ii) the graph G is circuit less and has n − 1 edges.
(iii) the graph G is connected and is circuit less.
(iv) there exist exactly one path between every pair of vertices in G.
(v) the graph G is a minimally connected graph.
Theorem 15: In a tree (with two or more vertices). There are at least two pendant vertices.
Proof: In a tree with n vertices, there are n − 1 edges in the tree, and so the sum of degrees of all vertices in
the tree = 2 (n − 1). Now 2 (n − 1) degrees are to be divided amongst n vertices so that no vertex is of degree
zero (since in a tree no vertex can have zero degree). If all the vertices be of degree 2, then the sum of
degrees of all vertices will be 2n, which is not true. If there is only one vertex of degree one, then the sum of
degrees of all vertices = 2n − 1, which is also not true.
If there are two vertices of degree one, then the sum of degree of all vertices = 2n − 2 = 2 (n − 1)
Hence, there are at least two pendant vertices in a tree.
10.11.2 Edge-Connectivity
The number of edges in the smallest cut set is defined as the edge connectivity of the graph. Here by
smallest cut-set we mean that cut set which has fewest number of edges. The rank of the graph = n − k
where n is the number of vertices and k is the number of components. Since removal of a cut-set from a
connected graphs partitions the graph into two components, we can define the edge connectivity of a
connected graph as follows:
“The Edge Connectivity of a connected graph is defined as the minimum number of edges whose
removal reduces the rank of the graph by one.” [U.P.T.U. (M.C.A.) 2003, 2008]
Illustration: The edge connectivity of a tree is one because removal of an edge from the tree disconnects the
graph. [Rohtak (M.C.A.) 2004, 2007]
Illustration: The edge connectivity of the complete bipartite graph k2, 3 is 2. In general, edge connectivity of
K m, n is P, where P = min {m, n}.
Trees and their Properties 515
Example 15: Find the vertex connectivity of the graph in given Fig. 10.32.
Separable Graph: A connected graph whose vertex connectivity is one is called Separable Graph.
Otherwise it is called non-separable.
Cut-vertex: A cut-vertex is a vertex in a separable graph whose removal disconnects the graph. Cut-vertex
is also called an articulation point. A given separable graph can have more than one cut-vertex.
[U.P.T.U. (M.C.A.) 2005]
Illustration: The graph in the following figure is separable and both v1 and v2 are cut-vertices.
v1 v2
Fig. 10.33
Example 16: Prove that in a tree every vertex of degree greater than one is a cut-vertex.
Solution: Let G be a tree and let v be a vertex in G whose degree is greater than one. v
Since degree v is greater than one, it means there are at least two vertices v1 and v2 which
are adjacent to v, removal of v will put v1 and v2 in different components because there is v1 v2
no other path between v1 and v2. Hence removal of v disconnects the graph. Thus v is a
cut-vertex.
Fig. 10.34
516 Discrete Mathematical Structures
Example 17: Find the edge connec tiv ity and ver tex connec tiv ity of the graph.
a b
c d
Fig. 10.35
Solution: If we remove a and f any two vertices does not disconnect the graph. However, removal of three
vertices a, b and f disconnects the graph. Hence Vertex Connectivity is three.
Similarly if we remove a and f any two edges does not disconnect the graph but the set of any three edges
incident on a vertex forms a cut set. Hence Edge Connectivity is three.
v1 e1 e4
v10 v7
e2
v2 e3 v5
v9 e4 v8
v3 v6
Fig. 10.36
The vertex connectivity of this graph is three because removal of v1 , v2, v3 and v4 , v5, v6 disconnects the
graph. The edge connectivity of this graph is four
Theorem 16: A vertex v is a cut-vertex of a connected graph G iff there exist two vertices x and y distinct from
v such that every path between x and y passes through v.
Proof: First suppose that v is a cut-vertex of a connected graph G. Then G − v, the graph obtained after
removal of vertex v from G, is disconnected. Let x be a vertex in one of the component G1 of G − v and y be a
vertex in the complement of G1 in G − v. Since x and y are in different components of G − v, there exist no
path between x and y in G − v. But G is connected implies there exist paths between x and y in G. Hence
every path between x and y passes through v.
Conversely, suppose v lies on every path between x and y. Then the vertices x and y are not connected in
G − v. Thus the graph G − v is disconnected. Hence v is a cut-vertex.
Trees and their Properties 517
Theorem 17: Prove that the edge connectivity of a graph G cannot exceed the degree of the vertex with
smallest degree in G.
Proof: Let v be the vertex with the smallest degree in a given graph G. Vertex v can be separated from G by
removing the d (v ) edges incident on v. Hence removal of d (v ) edges disconnects the graph. Thus edge
connectivity ≤ d (v ). This completes the proof.
Theorem 18: The vertex connectivity of any graph G is always less than or equal to edge connectivity of G.
Proof: Let p denote the edge connectivity of G. Therefore, there exists a cut-set S in G containing p edges.
Then S partitions the vertices G into two subsets V1 and V2 such that every edge in S joins a vertex in V1 to a
vertex in V2. By removing at most p vertices from V1 or V2 on which the edges of S are incident, we will be
able to delete S from G (together with all other edges incident on these vertices). Thus, removal of at most p
vertices from G will disconnect the graph. Hence vertex connectivity is less than or equal to p.
Corollary: Every cut-set in a non-separable graph with more than two vertices contains at least two
edges.
Proof: By definition, a graph G is non-separable if its vertex connectivity is at least two. In view of above
theorem, edge connectivity ≥ vertex connectivity. hence edge connectivity of a non-separable graph is at
least two which is possible if the graph has at least two edges.
Theorem 19: The maximum vertex connectivity of a connected graph with n vertices and e edges is the
integral part of the number 2e / n .
(The integral part of a number x is denoted as [ x]).
Proof: We know that every edge of a graph contributes two degrees. Thus sum of degrees of all the
vertices in G is 2e. Since this sum (2e) is divided among n vertices, therefore there must be at least one vertex
in G whose degree is less than or equal to 2e/n. Therefore,
edge connectivity of G ≤ 2e / n [By Theorem 17]
⇒ vertex connectivity ≤ edge connectivity ≤ 2e/n [By Theorem 18]
⇒ maximum vertex connectivity possible = [ 2e/n], the integral part of 2e/n.
a e
f b
g
d c
h
Fig. 10.37
[R.G.P.V. (B.E.) 2009; Rohtak (M.C.A.) 2004, 2008; U.P.T.U. (M.C.A.) 2006]
518 Discrete Mathematical Structures
Solution:
Fig. 10.38
Trees and their Properties 519
Example 20: Find the rank and nullity of the fol lowing graph G .
v1 e1 v2 e2 v5
e3 e7
e4 e6
e8
v3 e5 v4
Fig. 10.39
Example 21: If a form (water tank) consisting of seven walled plots of land, as shown in
figure 10.40 and these plots are full of water then find out how many walls will have to be broken
so that the complete water can be drained out:
Solution: Here n = 12, e = 18 and k = 1 (because the graph is connected). Fig. 10.40
Since tree is always without circuit, so to form a spanning tree we have to remove all the chords. Thus,
The number of chords = e − n + k = 18 − 12 + 1 = 7
Hence just removing 7 walls complete water will be drained out.
Example 22: Find the rank and nullity of the following disconnected graph:
v5
e7
e12
v1 e5 v4 v9
e10
e2 e1 e4 e11 v8
e6 v6
e8 e9
v2 e3 v3 v7
Fig. 10.41
Solution: Here number of vertices, n = 9;
number of edges, e = 12;
number of components = maximum number of connected subgraphs.
k=2
∴ rank of the graph = n − k = 9 − 2 = 7
nullity of the graph = e − n + k = 12 − 9 + 2 = 5
520 Discrete Mathematical Structures
Example 23: Find all spanning trees for the graph G shown below:
v2 v3 v6
v1 v4 v5
[U.P.T.U. (M.C.A.) 2005]
Fig. 10.42
Solution: All spanning trees of the given graph G are shown below in Fig. 10.43.
v2 v3 v6 v2 v3 v6 v2 v3 v6
v1 v4 v5 v1 v4 v5 v1 v4 v5
T1 T2 T3
Fig. 10.43
Observe that there is a circuit (v1 v2v3 in Fig. 10.42) of the given graph G. The spanning tree T1 is obtained by
deleting edge v1 v3 from the circuit, the spanning tree T2 is obtained by deleting edge v1 v2 from the circuit,
while the spanning tree T3 is obtained by deleting edge v2v3 from the circuit. Thus, there are at all three
distinct spanning trees for the given graph G.
Example 24: What is the total number of nodes in a full binary tree with 20 leaves?
[P.T.U. (B.E.) Punjab 2007, 2009]
Solution: Let n = total number of leaves
i = internal nodes = n – 20
n–1
Then = m or n = mi + 1
i
n–1
But i= ⇒ n = 2i + 1
2
∴ n = 2(n – 20) + 1 ⇒ n = 39
Hence, full binary tree with 20 leaves has total of 30 nodes.
Example 25: If there are 60 players in a single-knockout tournament, how many matches must be played?
Solution: We know
Number of matches played = Number of players – 1.
or i = t – 1 (in term of binary tree)
i = 60 – 1 = 59
Trees and their Properties 521
Example 26: Show that total number of vertices in a full binary tree is always odd.
[Delhi (B.E.) 2005, 2009; Pune (B.E.) 2007]
Solution: We know that in full binary tree, there is exactly one vertex of even degree i.e., root and
remaining (n – 1) vertices are of odd degree. But number of vertices of odd degree in any graph is always
even. Thus (n − 1) is even. Hence n is odd.
Example 27: Find number of leaves in a full binary tree with n vertices. [Rohtak (B.E.) 2007]
n–1
Solution: The number of internal vertices i =
2
n −1 n + 1
then number of leaves t = n – i = n – =
2 2
Example 29: A tree has two vertices of degree 2, one vertex of degree 3 and three vertices of degree 4. How
many vertices of degree 1 does it have?
Solution: Let a be the required number. Now,
Total number of vertices = 2 + 1 + 3 + a = 6 + a e = (n – 1)
The number of edges = (6 + a – 1) = 5 + a
So, total degree of tree = 2 × 2 + 1 × 3 + 3 × 4 + 1 × a = 19 + a
19 + a
So, the number of edges = 2e = ∑ deg (vi )
2 i
19 + a
Now, = 5+ a⇒ a= 9
2
Thus, there are 9 vertices of degree one in the tree.
522 Discrete Mathematical Structures
Exercise
1. (a) Draw all distinct trees with exactly five vertices. [R.G.P.V. (B.E.) Bhopal 2008]
4. Draw the complete graph on four vertices and find all spanning trees within it.
5. If a graph G has n vertices and the subgraph T of G has n − 1 edges and no circuits, show that G is
connected and that T is a spanning tree in G.
6. Prove that every connected graph has at least one spanning tree.
8. Show that a connected graph of n vertices and e edges has n − 1 tree branches and (e − n + 1)
chords. [U.P.T.U. (M.C.A.) 2002]
9. Show that a connected graph G is a tree if adding an edge between any two vertices in G creates
exactly one circuit.
e4
e1
e9
e2
e8 e3
e6 e5
e7
Fig. 10.45
11. Find the rank and nullity of the following disconnected graph.
12. Show that the edge connectivity and vertex connectivity of the graphs in the following figure is each
equal to three.
13. List all cut-sets with respect to the vertex v1 , v2 in the graph.
v1
v2
Fig. 10.50
15. Give an example of a simple regular graph of degree three that is separable.
(a) Rooted tree (b) binary tree (c) binary search tree [U.P.T.U. (B.Tech.) 2007, 2009]
524 Discrete Mathematical Structures
18. Show that a Hamiltonian path is a spanning tree [U.P.T.U. (B.Tech.) 2004, 2006]
19. Prove that a binary tree with n nodes has exactly (n + 1) null branches. [U.P.T.U. (B.Tech.) 2005]
20. What is binary search tree? A binary search tree T and an ITEM of information is given. Write the
algorithm which finds the location of ITEM in T or insert ITEM as a new node in the tree.
[U.P.T.U. (B.Tech.) 2008]
21. Discuss one application of a rooted tree in the study of computer science.
[U.P.T.U. (M.C.A.) 2002]
22. Prove that far any tree T = (V, E ), T has at least two pendent vertices.
[P.T.U. (B.E.) Punjab 2005; M.K.U. (B.E.) 2006, 2009]
23. Discuss two important applications of binary trees. [U.P.T.U. (M.C.A.) 2001; Delhi (B.E.) 2008]
24. State the theorems when a graphs G with n vertices is said as tree.
[U.P.T.U. (M.C.A.) 2001, 2004; Bangalore (B.E.) 2007; M.K.U. (B.E.) 2005]
25. How many internal vertices does a full binary tree with h levels have?
[Hint n = m i +1]
26. What is a binary rooted tree? Indicate its importance and show that maximum height of an N vertex
binary tree is [log 2(N + 1) – 1] [Rohtak (M.C.A.) 2002, 2005, 2007]
Trees and their Properties 525
Fig. 10.51
Fig. 10.52
A R
C B
D E
F
G
H I J
Fig. 10.53
526 Discrete Mathematical Structures
3. A tree has
(a) Self loop as well as parallel edges (b) Self loop but not parallel edges
(c) neither self loop nor parallel edges (d) none of these
4. A tree with n vertices has— [Rohtak (M.C.A.) 2005]
(a) n edges (b) (n + 3) edges (c) (n – 1) edges (d) none of these
5. Which of the following sequences denotes the post order traversal sequence of the tree—
(a) fegedba (b) gcbdafe (c) gcdbfea (d) fedgcba
b e
c
f
d
g
Fig. 10.54
9. If every vertex of a binary tree has either two children or no child, it is called—
[M.C.A.) (Bhopal) 2008]
(a) Full or complete binary tree (b) Spanning tree
(c) Null graph (d) Forest
11. (b) 12. (a) 13. (a) 14. (b) 15. (c)
1. e ≤ (3n − 6) 2. 2k – 1 3. nm+1 4. 2n
qqq
11.1 Graph [M.K.U. (B.E.) 2003, 2007; Raipur (B.E.) 2006]
A Linear Graph (or simply a Graph) G = (V, E ) consists of a set of objects V = {v1 , v2 , K , }, whose elements
are called Vertices (or Nodes) and another set E = {e1 , e2 , K }, whose elements are called Edges (or Lines or
Branches) such that each ek is identified with an unordered pair (vi, v j ) of vertices. The vertices vi, v j associated
with edge ek are called the end vertices of ek .
The most common representation of a graph is by means of a Diagram, in which the ver tices are
represented as points and each edge as a line segment joining its end vertices. We often referred to this
diagram itself as the graph.
We denote by | V | the number of vertices and by | E | the number of edges of the graph G = (V, E ).
It may be observed that this definition permits an edge to
e1
be associated with a vertex pair (vi, vi ). Such an edge
v1 v2
having the same vertex as both its end vertices are called
e3
a Self-loop (or simply a loop). Also note that the
def inition allows more than one edge as sociated with a e4 e2
e5 v5
given pair of vertices. Such edges are referred to as
Parallel Edges. e7
11.1.1 Simple Graph [Raipur (B.E.) 2006; Nagpur (B.E.) 2006; Osmania (B.E.) 2003]
A multigraph G = (V, E ) consists a set of vertices V and a set of edges E such that edge set E may contain
multiple edges and self loops.
Illustration
e6 e7
v1 e2 v2 e3
v1
v2
e5
e1 e3 e1 e2 e4 e5
e4 v3 v4 v3
v4 e6
Fig. 11.5
Fig. 11.4
In Fig 11.4, e4 and e5 are multiple In Fig. 11.5 the edges e1 , e2 and e4 , e5 are multiple
edges, e6 is self loop. edges and e7 is self loop.
In the adjoining Fig. 11.7 (a) and (b) both picture the same finite graph {(v1 , v2 ), {v1 , v5}, {v2, v3 },
{v2, v4 }, {v3 , v5}. If {vi, v j } is an edge, we say that vertices vi and v j are adjacent. In the adjoining Fig.
11.7, v1 is adjacent to v2 but
v2
v4
v1
v2 v1 v5
v5 v3
v3
v4
(a) (b)
Fig. 11.7: Representations of the same finite graph
Portions of two infinite graphs are shown in Fig 11.8 (a) and (b).
(a) (b)
Fig 11.8: Portions of two infinite graphs
In this chapter we shall confine ourselves to the study of finite graphs and unless otherwise stated the term
“Graph” will always mean a Finite Graph.
Two vertices in a graph G = (V, E ) are said to be Adjacent if there exists an edge joining the vertices. For
example, in the graph of Fig. 11.1, vertices v1 and v3 are adjacent while vertices v1 and v4 are not adjacent.
Two non-parallel edges of a graph G = (V, E ) are said to be Adjacent if they are incident on a common
vertex. For example, edges e2 and e3 in the graph of Fig. 11. 1 are adjacent because they are incident on a
common vertex v2 while edges e4 and e7 are not adjacent.
532 Discrete Mathematical Structures
The Degree of a Vertex v in a graph G, written as d (v ), is equal to the number of edges which are incident
on v with self-loop counted twice. For example, in the graph of Fig. 11.7 (a), we have
d ( v1 ) = 2, d ( v 2 ) = 3, d ( v 3 ) = 2, d ( v 4 ) = 1.
v2 v6
11.1.6 Isolated Vertex v5
A vertex in a graph G having no edge incident on it is called an Isolated
Vertex. In other words, a vertex v is said to be isolated vertex if degree v4
of v is zero; that is, d (v ) = 0. For example, the vertex v6 in the graph of v1
Fig. 11.9 is isolate vertex.
v3
Fig. 11.9
11.1.7 Pendant Vertex
A vertex v in a graph G is said to be pendant vertex if its degree is one; i.e. d (v ) = 1. For example, the
vertex v5 in the graph of Fig. 11.9 is a pendant vertex.
v2
11.1.8 Null Graph
v1 v4
A graph G = (V, E ) is said to be null graph if the set of vertices V is non-empty but the set
of edges E is empty. A null graph is thus a graph in which every vertex is an isolated v3
vertex. A null graph of four vertices is shown in Fig. 11.10.
Fig 11.10
We now derive three simple but important results on degree of vertices.
Theorem 1: The sum of the degrees of all vertices in a graph G is equal to twice the number of edges in G.
[U.P.T.U. (M.C.A.) 2000, 2004; M.K.U. (B.E.) 2009; Rohtak (B.E.) 2005, 2008;
Nagpur (B.E.) 2005, 2008; Pune (B.E.) 2005, 2008]
Proof: Let G = (V, E ) be a graph. Then the number of edges in G is| E |. Since each edge in G is incident on two
vertices, it contributes 2 to the sum of the degrees of the graph. v9
Thus, the sum of degrees of all the vertices in G is given by
v2
∑ d (v ) = 2| E | v5 v10
v ∈V
v7 v8
This result is also known as Handshaking Lemma. v1 v4
To verify the above theorem, consider the graph in the Fig. 11.11. v3 v6
In this graph, we have Fig. 11.11
d (v1 ) = 2, d (v2 ) = 4, d (v3 ) = 2, d (v4 ) = 4, d (v5 ) = 2
d (v6 ) = 3, d (v7 ) = 2, d (v8 ) = 2, d (v9 ) = 1, d (v10 ) = 0
10
Therefore, ∑ d (vi ) = 22 = 2 × 11 = twice the number of edges.
i =1
Graph Theory 533
11.2 Directed Graph (Digraph) [R.G.P.V. (B.E) Bhopal 2006; Raipur (B.E) 2006]
A Directed Graph (or in short a di graph) G = (V, E ) consists of two sets : a fi nite set V = {v1 , v2, v3 K } of
vertices and a finite set E = {e1 , e2, e3 K } of edges and each edge is identified by some ordered pair of
vertices (vi, v j ). A di graph is also known as Oriented Graph.
Thus, if ek = (vi, v j ) is an edge then this edge in digraph is represented e1
by a line segment between the vertices vi and v j along with an arrow
from vi and v j , where vi is called the Initial Vertex and v j is called v1 v2
the Terminal Vertex of the edge ek . Also the edge ek is incident out e2
of the vertex vi and is incident into the vertex v j .
e3 e4
e7
Illustration
This is directed graph with four vertices and seven edges. v4
In this graph edge e2 is incident out of the vertex v1 and is incident into e5 v3
the vertex v2. The edge e1 is incident out of v2 and is incident into v1 e6
and so on. Fig. 11.12
Note: All definition is common in graph and digraph only difference is in direction only change in definition
of graph by directed graph.
Theorem 2: The vertices of odd degree (odd vertices) in a graph is always even.
[U.P.T.U. (M.C.A.) 2001; P.T.U. (B.E.) Punjab 2005, 2008; M.K.U. (B.E.) 2007; R.G.P.V. (B.E.) Raipur 2007]
Proof: Let G = (V, E ) be a graph. Let Ve and V0 denote the set of even and odd vertices in G. Then Ve ⊆ V and
V0 ⊆ V such that
V = Ve ∪ V0 and Ve ∩ V0 = φ
Hence, ∑ d (v ) = ∑ d (v ) + ∑ d (v )
v ∈V v ∈ Ve v ∈ V0
⇒ 2| E | = 2k + ∑ d (v )
v ∈ V0
[Q ∑ d (v ) = an even number = 2k, say ]
v ∈ Ve
⇒ ∑ d (v ) = 2 (| E | − k ) = an even number.
v ∈ V0
534 Discrete Mathematical Structures
But each term d (v ) in the L.H.S. is odd, the total number of terms in the sum must be even (to make the sum
an even number). Thus, the number of vertices of odd degree must be even; i.e.
| V0 | = an even number.
In a directed graph, the number of edges incident into a vertex vi is called In-Degree of the vertex vi and is
denoted by d − (vi ). e 6
Illustration v2
v1 e1
In the directed graph in the adjacent Fig. 11.13
e2
d − (v1 ) = 1, d + (v1 ) = 3
Fig. 11.13
d − (v2 ) = 4, d + (v2 ) = 0
d − (v3 ) = 1, d + (v3 ) = 2
d − (v4 ) = 2, d + (v4 ) = 3
For any vertex v in a directed graph, where d (v ) denotes the degree of vertex v in the corresponding
undirected graph.
Thus, Isolated Vertex in a directed graph is that vertex whose in-degree and out-degree both are zero.
A vertex v in a directed graph is Called Pendant Vertex if
d + (v ) + d − (v ) = 1
Notice that every edge in a directed graph contributes 1 to the sum of the in-degrees as well as to the sum of
out-degrees. Hence, we have the following theorem.
Source and Sink: A vertex in a diagraph with zero in degree is called a Source. A vertex in a diagraph
with Zero out Degree is called a Sink.
Theorem 3: In a directed graph G = (V, E ) with | E | edges, sum of the in - degrees = sum of the out-degrees
=| E |. In other words
∑ d − (vi ) = ∑ d + (vi ) = | E |
vi ∈ V vi ∈ V
Graph Theory 535
Example 1: Define the term ‘Degree’. What is the total degree of the given e5
graph? v4
v5
(v , v , K v5 ) are vertices e4
Here, 1 2 in the graph
& (e1 , e2 , K e10 ) are edges e3
e6 e7 e2
e1
e8 v v2
1 e10
e9
v3
Fig. 11.14
Solution: We denotes the degree of vertices vi by d (vi ). The degree of all vertices are as
d (v1 ) = 7, d (v2 ) = 4, d (v3 ) = 1, d (v4 ) = 5, d (v5 ) = 3
Then total degree of graph = 7 + 4 + 1 + 5 + 3 = 20
11.3 Isomorphic Graphs [U.P.T.U. (B.Tech.) 2006, 2007, 2008; Raipur (B.E) 2008;
Let G = (V, E ) be a graph, if ei ∈ E we write t (ei ) = (v j , vk ), where v j and vk are the terminals of ei; then t is
called Terminal Function of G.
Two graph G1 = (V1 , E1 ) and G 2 = (V2, E 2 ) are said to be Isomorphic if there ex ists a one-to-one
correspondence f : V1 → V2 between their vertex sets (V1 and V2 ) and one to one correspondence g : E1 → E 2
between their edge set (E1 and E 2 ) such that the corresponding edges of G1 and G 2 are incident on the
corresponding vertices of G1 and G 2; that is, if ei ∈ E1 , v j , vk ∈ V1 , then
t (ei ) = (v j , vk ) if t (g(ei )) = ( f (vi ), f (vk ))
In other words, two graph G1 and G 2 are isomorphic if and only if vertices and edges correspond one-to-one
and that edge incidence relationship is preserved. For example, Fig 11.15 show a pair of isomorphic
undirected graph.
Fig. 11.15
536 Discrete Mathematical Structures
u6 ↔ v6 , u7 ↔ v7 , u8 ↔ v8
Edge correspondence: 1 ↔ e1 , 2 ↔ e2, 3 ↔ e3 , 4 ↔ e4 , 5 ↔ e5, 6 ↔ e6 , 7 ↔ e7 ,
8 ↔ e8 , 9 ↔ e9 , 10 ↔ e10 , 11 ↔ e11 , 12 ↔ e12
Thus, the two graphs are isomorphic.
Example 3: Show that the graphs given below are not isomorphic.
v4
u5
u1 u2 u3 u4 v1 v2 v3 v5 v6
u6
(a) (b)
Fig: 11.17
Solution: The two graphs in Fig. 11.17 are not isomorphic because
(i) If the graph in Fig 11.17 (a) is isomorphic to the graph in Fig 11.17(b) then vertex u4 in (a) must
correspond to the vertex v3 in (b), since d (u4 ) = 3 = d (v3 ) and there are no other vertices of degree
three.
(ii) There are two pendant vertices u5 and u6 , adjacent to u4 in Fig 11.17(a) while there is only one
pendant vertex v4 , adjacent to v3 in Fig 11.17(b).
Solution: In the adjoining Fig 11.18 we have shown the equivalent labeled graphs G1 and G 2 (no vertex
labeling):
v3 w2
80
110 100 110
v1
100
v2 w1 w3
80
Fig. 11.18
A graph in which all vertices are of equal degree is called a Regular Graph (or simply a regular).
Example 5: The graph of three utilities is a regular graph of degree 3 (see the adjoining Fig. 11.19)
Fig. 11.19
It may be observe that in many applications of graph theory in computer science, the topology (V, E ) of a
graph is supplemented by additional information relating to either V or E or both. We can make this more
precise by defining the concept of a labeled graph.
11.5 Subgraph [M.K.U. (B.E.) 2006; Raipur (B.E.) 2006, 2009; Rohtak (B.E.) 2004]
A graph g is said to be a subgraph of a graph G if all the vertices and all the edges of g are in G, and each edge
of g has the same end vertices in g as in G.
In other words, a Subgraph of a graph G is any graph obtained from G by a deletion of edges and/or
vertices from G. Note that when a vertex v is deleted, all edges terminating at v must also be deleted.
538 Discrete Mathematical Structures
Example 6: The graph in Fig. 11.20 (b) is a subgraph of Fig. 11.20 (a):
v5
f
v1
v4
a h
c v1 a
b
v4
v2 g c
i e b
d v2
e
v3 d
j v3
v6
(a) (b)
Fig 11.20: Graph (a) and one of its subgraph (b)
Example 7: In Fig. 11.21 all graphs (b) to (i) are subgraphs of (a):
a 2 b a 2 b a a b a b
1 1 1 3 1 3 1 4
3 4 4
d 5 c d 5 c d 5 c d 5 c 5
d c
(a) (b) (c) (d) (e)
a b a a b a
1 4 1 3
3 4
d 5 c d c d c c
The above definition clearly shows that a subgraph can be thought of as being contained in (or a part of)
another graph. Thus, the symbol from set theory, g ⊂ G, is used in stating “g is a subgraph of G”. Hence, we
have the following definition of a subgraph of a graph.
A graph H = (V1 , E1 ) is said to be a Subgraph of G = (V, E ) if
V1 ⊆ V and E1 ⊆ E
If V1 = V, then H is said to be a Spanning Subgraph of G. If V1 is a non-empty subset of vertices of the
graph (V, E ) then the subgraph (V1 , E1 ) generated by V1 is de fined by [ v, w] ∈ E1 ⇔ v, w ∈ V1 and [ v, w] ∈ E .
The following observation can be made immediately:
1. Every graph is its own subgraph.
2. A subgraph of a subgraph of G is a subgraph of G.
3. A single vertex in a graph G is a subgraph of G.
4. A single edge in G, together with its end vertices, is also a subgraph of G.
Graph Theory 539
Example 8: Fig 11.22 (c) shows the com plement of the subgraph in Fig. 11.22 (b) with re spect to the graph
in Fig. 11.22 (a).
b c b c
b c
g a g
a d d g
h a
h d
h
f e
f e e
f
(a) (b) (c)
Fig. 11.22
Thus, the complement of a subgraph G′ with respect to graph G is obtained from G by removing the edges of G′
If G1 = (V1 , E1 ) and G 2 = (V2, E 2 ) are two graphs then their Union G1 ∪ G 2 is another graph G 3 = (V3, E 3 ) such
that V3 = V1 ∪ V2 and E 3 = E1 ∪ E 2.
The intersection of two graphs G1 = (V1 , E1 ) and G 2 = (V2, E 2 ), denoted as G1 ∩ G 2 is another graph
G 3 = (V1 ∩ V2, E1 ∩ E 2 ); that is, the vertex set of G 3 consists of only those vertices which are common in both G1
and G 2, and the edge set of G 3 consists of only those edges which are common in both E1 and E 2.
The union, intersection and ring sum of two graphs G1 and G 2 are shown in Fig. 11.23 below:
v1 v1 e8 v6
e1 e2 e1 e7
e9
v2 v3
e3
v2 e3 v3 e10
e4 e5
v4 v5
e6
v5
Graphs G1 Graphs G2
v1 e8 v6
v1 e8 v6
e7 e9
e1 v1
e7 e9
e2 e2
v2 v3 e10
e3 e1 v2 v3 e10
e4 e5 e4 e5
v2 v3
v4 v5 e3 v4 v6 v5
e6
G1∪G1 G1∩G2 G1⊕G2
Union of two graphs Intersection of two graphs Ring sum of two graphs
G1 and G2 G1 and G2 G1 and G2
(a) (b) (c)
Fig. 11.23
11.6.4 Decomposition
A graph G is said to be decomposed into two subgraphs G1 and G 2 if
G1 ∪ G 2 = G
G1 ∩ G 2 = a null graph.
For example, the graph G and its decomposed graphs are shown in Fig. 11.24 (a) and Fig. 11.24 (b), (c) as
follows:
v1
v2 v3
v2 v3 v1
v4 v5 v2 v3 v4 v5
(a) (b) (c)
Fig. 11.24
Graph Theory 541
It may be observe that in many applications of graph theory in computer science, the topology (V, E ) of a
graph is supplemented by additional information relating to either V or E or both. We can make this more
precise by defining the concept of a labeled graph.
f : V → SV , vertex labeling,
g : E → SE , edge labeling.
(ii) If G = (V, E ) is labeled by f and g and G1 = (V1 , E1 ) is labeled by f1 and g1 then G and G1 are Equivalent
Labeled Graphs if there is a bijection h : V → V1 such that :
(3) g [(v, w )] = g1 ([ h (v ), h (w )]) ∀ v, w ∈ V; i.e. corresponding edges have the same label.
We often label only the edges or only the vertices, the above still applies but with
f : V → SV
vertex labeling only
g = constant
f = constant
edge labeling only
g : E → SE
Observe that the edges or vertices (or both) of a labeled graph carry information that supplements or
replaces the usual identifying names.
f : V → {Indian cities},
Delhi
g : E → N,
199
f (v1 ) = Delhi , g ([ v1 , v4 ]) = 199 Agra
500 90
f (v2 ) = Meerut , g ([ v2, v3 ]) = 697 Aligarh
Bhopal
f (v3 ) = Bhopal, g ([ v3 , v4 ]) = 500 697
K1 K2 K3
(a) (b) (c)
Fig. 11.26
K4 K5 K6
(d) (e) (f )
Fig 11.27
Example 10: Show that graph in Fig. 11.28 is complete bipartite graph. [Pune (B.E.) 2008]
v4
v1
v5
v2 v6
v3
v7
Fig. 11.28
Graph Theory 543
v1 v4
v5
v6
v2
v2 v4
v7
(k2, 5) (k2, 2)
(a) (b)
Fig. 11.29
Illustration: The marriage relationship is a set of men and women ({vi, v j }) is an edge if vi and v j are married
is simple example of bipartite graph.
Example 13: Show that the maximum number of edges in a complete bipartite graph of n vertices is n2 / 4 .
[Nagpur (B.E.) 2007]
Solution: Let G be a complete bipartite graph with n vertices. Let n1 and n2 be the number of vertices in the
partitions V1 and V2 of vertex set of G. Since G is complete bipartite, each vertex in V1 is joined to each vertex
in V2 by exactly one edge. Thus, G has n1 n2 edges, where n1 + n2 = n. But we know that maximum value of
n1 n2 subject to n1 + n2 = n is n2 / 4. Thus, the maximum number of edges in G is n2 / 4.
Example 14: Prove that a graph is bipartite iff all its circuits are of even length. [U.P.T.U (M.C.A.) 2004]
Solution: Let G be a bipartite graph and let V1 and V2 be the partition of the vertex set of G. Let
v1 , e1 , v2, e2, v3 , K , en, vn + 1 , where vn + 1 = v1 be any circuit C in G. Since G is bipartite, the vertices
vi, i = 1, 2 , K , n, belong alternately to V1 and V2. Without loss of generality, we assume that v1 ∈ V1 . Since V1
and V2 are disjoint, vi ∈ V1 iff i is odd and v j ∈ V2 iff j is even. That is v1 , v3 , v5 , K belong to V1 and
v2, v4 , v6 , K belong to V2. Now, since C is a circuit and v1 ∈ V1 , therefore vn + 1 ∈ V1 . Hence, n + 1 is odd.
Thus, n is even and so the length of circuit C is even.
544 Discrete Mathematical Structures
Conversely, suppose every circuit of a graph G has even length. We arbitrarily select a vertex in each
component of G and paint each of them with colour 1. We now successively paint all the vertices of G as
follows. If a vertex has colour 1 then any vertex adjacent to it will be painted with colour 2. Next, if a vertex
has colour 2, then any vertex adjacent to it will be painted with colour 1. Continue this process till every
vertex in G has been painted. Since every circuit in G is of even length, no adjacent vertices will have the
same colour. Let V1 be the set of all those vertices in G which have colour 1 and V2 be the set of all those
vertices which have colour 2. Then V1 and V2 are a partition of the vertex set of G such that no two vertices in
V1 or V2 are adjacent. Hence, G is bipartite.
Example 15: If the intersection of two paths in a graph is a disconnected graph, show that the union of the
two paths has at least one circuit.
Solution: Let P1 and P2 be two paths in a graph G such that P1 ∩ P2 is disconnected graph. We want to show
P1 ∪ P2 contains a circuit. Since P1 ∩ P2 is disconnected, it has a pair of vertices u, v such that there is no path
between u and v in P1 ∩ P2. Since u, v are in P1 ∩ P2, both u and v are in P1 as well as in P2. Since P1 and P2 are
paths, there exists a path in P1 as well as in P2 connecting u and v. Since as there is no path in P1 ∩ P2
connecting u and v, we may assume that these paths in P1 and P2 connecting u and v are edge-disjoint. Now,
union of these two paths connecting u and v forms a circuit in P1 ∪ P2 as shown in the Fig. 11.30.
P1
u v
P2
Fig. 11.30
Exercise
1. Let G be a 3-regular graph with n vertices. What is the sum of the degree of the vertices? Show that in
such a graph n must be even.
3. Is it possible for a bipartite graph to contain a circuit C n with n odd as subgraph? Give a reason for
your answer. For what values of n, the circuit graph C n is bipartite?
4. Prove that a graph is bipartite if and only if it contains no circuit of odd length.
n2
5. Prove that an n vertex simple graph is not bipartite if it has more than edges.
4
7. Prove that the union of any two distinct paths (Paths having no edge in common) joining two
vertices contains a circuit.
8. Prove that a connected graph G remains connected after removing an edge e from a circuit.
9. Is it possible for wheel Wn (n ≥ 3) to be bipartite?
10. Draw the complement of the circuit graph C 4 .
11. How many edges has each of the following graphs?
(a) K10 (b) K 5, 7 (c) W8 (d) The Petersen graph
(e) The octahedron.
12. Give an example of each of the following:
(a) a bipartite platonic graph (b) a complete graph that is a wheel
(c) a complete platonic graph.
13. Which of the following is a bipartite graph? [Kurukshetra (M.C.A.) 2004, 2009]
(a) (b)
Fig. 11.31
14. State and prove first theorem of Graph Theory. [R.G.P.V. (B.E.) Raipur 2009]
v1 v2
v3
v4
v5
Fig. 11.32
17. Suppose a graph has five vertices. Find the maximum of edges in G if
(i) G is graph (ii) G is multigraph
18. Can a simple undirected graph of 8 vertices has 40 edges excluding self-loops?
[U.P.T.U. (B.Tech.) 2002]
546 Discrete Mathematical Structures
Fig. 11.33
15.
Fig. 11.34
16. deg (v1 ) = 4, deg (v2 ) = 3, deg (v3 ) = 2, deg (v4 ) = 3, deg (v5 ) = 4
17. (i) There are 5c2 = 10 ways of choosing two vertices from the set V of the vertices of G and
hence number of edges are 10 in G
(ii) Since multiple edges are permuted can have any number of edges (and loops), finite or
infinite, hence no such maximum number of edges in G exists.
In the incident matrix A, n rows correspond to the n vertices and m columns correspond to m edges. From
the above definition, it is clear that any element of A is either 0 or 1 and therefore, incident matrix is also
known as (0, 1) matrix or a bit matrix. The incidence, matrix is also known as vertex edge
incidence matrix. The incidence matrix A of G is also denoted by A (G ) .
The incidence matrix of a graph G depends upon the ordering of the vertices and edges of G. Therefore, for
different ordering we shall get different incidence matrix of the same graph G. But by interchanging some
of the rows and columns of the matrix, any one of the incidence matrix of G can be obtained from another
incidence matrix of G.
Example 17: Write the incidence matrix of the graph in Fig. 11.35 (a) and (b).
v5
e5
e4 v1 e1 v2 e2
e6 v3 v3
v4
e4
e2 e7 e3
e7 e3 v4
e5
v1 e1 v2 v5 e6 v6
(a) (b)
Fig 11.35
548 Discrete Mathematical Structures
Solution: (a) The graph in Fig. 11.35 (a) has 5 vertices and 7 edges. The incidence matrix A of the given
graph is given by
e1 e2 e3 e4 e5 e6 e7
v1 1 0 1 0 0 0 1
v2 1 1 0 0 0 0 0
A = v3 0 1 1 1 0 0 0
v4 0 0 0 1 1 1 1
v5 0 0 0 0 1 1 0
Observation: We clearly observe the following for the incidence matrix A of a graph G without self loops:
(i) The sum of each row is equal to the degree of the corresponding vertex.
(ii) We know that every edge is incident on exactly two vertices, therefore each columns of the incidence
matrix A has exactly two 1’s.
(iii) If a row has all zero’s then the corresponding vertex is an isolated vertex.
(iv) In case the graph has parallel edges then the corresponding columns in A are identical.
(v) If the incidence matrix is given, then the corresponding graph can be drawn.
(vi) In case the graph G is disconnected and G1 and G 2 are its components, then the incidence matrix A (G )
of G may be written as:
A(G1) O
A(G) =
O A(G2)
(b) The given Fig 11.35 (b) has 6 vertices and 7 edges. The incidence matrix A of the given graph is
given by
e1 e2 e3 e4 e5 e6 e7
v1 1 0 0 0 0 0 1
v2 1 1 1 1 0 0 0
v 0 1 0 0 0 0 0
X= 3
v4 0 0 0 1 1 0 0
v5 0 0 0 0 1 1 1
v6 0 0 1 0 0 1 0
Example 18: Write the adjacency matrix of the graph in Fig. 11.36.
v5 v 4 v5 v3
v3
v6 v4
v1 v2 v1 v2
(a) (b)
Fig. 11.36
Solution: (a) The given graph has six vertices. The adjacency matrix A of the given graph is given by
v1 v2 v3 v4 v5 v6
v1 0 1 0 0 1 1
v2 1 0 1 1 0 0
v3 0 1 0 1 0 0
A=
v4 0 1 1 0 1 0
v5 1 0 0 1 1 0
v6 1 0 0 0 0 0
Observations: We clearly observe the following for the adjacency matrix A of a graph G (without parallel
edges).
(i) The principal diagonal of A has all zero’s if and only if G has no self loop.
(ii) If G is without self loops then the sum of any row (or any column) is equal to the degree of the
corresponding vertex, since the matrix A is symmetric.
(iii) Permutations of columns and of the corresponding row simply implies the reordering of vertices.
(iv) In case the graph G is disconnected and G1 and G 2 are its components, then the adjacency matrix A (G )
can be written as:
A (G1 ) M O
A (G ) = . . . L L
O M A (G 2 )
(v) If the adjacency matrix is given then the corresponding graph can be drawn.
(vi) If two graphs G1 and G 2 are given, then they are isomorphic if and only if the adjacency matrix of one
can be derived from the adjacency matrix of the other by simply interchanging some of the columns
and the corresponding rows. Similarly,
(b) v1 v2 v3 v4 v5
v1 0 1 0 1 1
v2 1 0 1 0 0
X = v3 0 1 1 1 1
v4 1 0 1 0 1
v5 1 0 1 1 0
550 Discrete Mathematical Structures
Example 19: Draw the graph (undirected graph) repre sented by the following adjacency matrix A:
v1 v2 v3 v4 v5
v1 1 1 1 0 0
v2 1 1 1 0 0
A = v3 1 1 0 1 0
v4 0 0 1 1 1
v5 0 0 0 1 0
Fig. 11.37
v1 v2 v3 v4
v1 0 4 0 0
v2 4 1 1 1
A=
v3 0 1 1 2
v4 0 1 2 2
v1 v2
v3 v4
Fig. 11.38
0 2 0 1
2 1 1 1
Similar problem; X =
0 1 0 1
1 1 1 0
Graph Theory 551
v1 e1 v2
e3
e2
e6
v5 e4 v3
e5 v4
Fig. 11.39
Since this graph contain parallel edges so it is not a simple graph
Example 22: Find the incidence matrix of the digraph shown in Fig. 11.40.
v1 e1
v2
e6 e5 e3
e2
e7 v4 e4 v3
v5
Fig. 11.40
552 Discrete Mathematical Structures
Solution: The given digraph has five vertices and seven edges. The required incidence matrix A is a 5 × 7
matrix given by
e1 e2 e3 e4 e5 e6 e7
v1 1 0 0 0 1 −1 0
v2 − 1 − 1 − 1 0 0 0 0
A = v3 0 1 1 1 −1 0 0
v4 0 0 0 −1 0 1 − 1
v5 0 0 0 0 0 0 1
e1 e2 e3 e4 e5 e6 e7 e8 e9
a − 1 − 1 0 1 0 0 0 0 0
b 1 0 1 0 0 0 0 −1 0
c 0 1 −1 0 −1 −1 0 0 0
A= 0
d 0 0 −1 0 0 −1 1 1
e 0 0 0 0 1 1 1 0 0
0
f 0 0 0 0 0 0 0 − 1
Solution: The digraph corresponding to given incidence matrix is as shown in Fig 11.41
Fig. 11.41
Let G be a digraph with n vertices v1 , v2 , K , vn, then the adjacency matrix of G is an n × n matrix A = [ aij ]
defined by
Example 24: Find the adjacency matrix of the di graph shown in Fig 11.42
e10
e1
a b
e2 e4
e3 e5 e8
e
e9
e7 d e6 c
Fig. 11.42
Example 25: Draw the digraph whose incidence matrix is A given in solution to ex ample 24.
Solution: See Fig 11.43 (a)
e10
e1
a b
e2 e4
e3 e5 e8
e
e9
e7 d e6 c
Fig. 11.43
e v4
v5 d
f
v3
c
b
v1 a v2
Fig. 11.44
554 Discrete Mathematical Structures
Solution: The given graph has five ver tices and six edges. The incidence matrix is shown below:
a b c d e f
v1 1 0 0 0 0 0
v2 − 1 1 −1 0 0 0
v3 0 − 1 0 1 1 1
v4 0 0 0 0 − 1 − 1
v5 0 0 1 −1 0 0
e10 e4
e9 e5 v5
v9 e11
e6
v7 e8 v4
e7
e12 v6
v8
Fig. 11.45
v1 0 1 1 0 0 0 1 0 0
v2 0 0 0 0 0 0 0 0 0
v3 0 0 1 1 0 0 0 0 0
v4 0 0 0 0 1 1 1 0 0
A = v5 0 0 0 1 0 0 0 0 0
0
v6 0 0 0 0 0 1 0 0
v7 1 0 0 0 0 0 0 0 1
v8 0 0 0 0 0 0 1 0 0
v9 0 0 0 0 0 0 0 0 0
Fig. 11.46
Graph Theory 555
Solution: The graph has 6 vertices and 10 edges. The incidence matrix A (G )of the given graph is given by
e1 e2 e3 e4 e5 e6 e7 e8 e9 e10
v1 1 1 1 0 0 0 0 0 0 0
v2 0 1 1 1 0 0 0 0 0 0
v3 0 0 0 1 1 1 1 1 0 0
A (G ) =
v4 0 0 0 0 0 0 0 1 1 1
v5 0 0 0 0 0 0 1 0 1 1
v6 1 0 0 0 1 1 0 0 0 0
v3 v4
v5
Fig. 11.47
Example 30: Consider the directed graph. Determine the in-degree and out degree of each of vertices of the
graph.
2 3
Fig. 11.48
e4 e5 e2
v3
v4 e3
Fig. 11.51
Graph Theory 557
v1 1 0 0 1 1
v2 1 1 0 0 0
v3 0 1 1 0 1
v4 0 0 1 1 0
v4 v3
v1 v2
Fig. 11.52
x1 x2
x5
a c
x6
x3 x7
x4
e x8 d
Fig 11.53
Solution: e6
v5
v2
e5
e3 e4
e2
v1 v4 v3
e1
Fig. 11.54
Example 37: Find the adjacency matrix for the following graphs.
Fig. 11.55
Solution:
(a) The adjacency matrix. (b) The adjacency matrix.
a b c d u1 u2 u3 u4 u5
a 0 1 1 1 u1 0 1 0 0 0
b 0 1 1 0 u2 0 0 1 0 0
A=
c 1 0 0 1 u3 0 1 0 1 0
d 0 0 0 0 u4 1 0 0 0 1
u5 1 0 0 0 1
Example 38: Draw the graph having following matrix as its adjacency matrix.
v1 v2 v3 v4
v1 0 1 2 3
v2 1 0 3 2
v3 2 3 0 1
v4 3 2 1 0
Graph Theory 559
v3 v3
Fig 11.56
Example 39: Is there exist a graph G that corresponding to the following incidence matrix? Justify your
answer.
1 0 1 1 1 0
0 1 1 0 0 0
0 0 0 0 1 0
1 1 0 0 0 1
0 0 0 1 0 1
Solution: Yes there exists a graph G that corresponding to the following incidence matrix.
Observations about incidence matrix:
(i) The sum of each row is equal to the degree of the corresponding vertex.
(ii) We know that every edge is incident on exactly two vertices, therefore each columns of the incidence
matrix A has exactly two 1’s.
(iii) If a row has all zero’s, then the corresponding vertex is an isolated vertex.
(iv) In case the graph has parallel edges then the corresponding column in A are identical.
(v) If the incidence matrix is given, then the corresponding graph can be drawn.
Example 40: Find the incidence matrix for the following graph.
v3 v6
a
v2
e b
h
v4
g
f c
v1 v5
d
Fig. 11.57
Solution: The incidence matrix A for the given graph as follows:
a b c d e f g h
v1 0 0 0 1 0 1 0 0
v2 0 0 0 0 1 1 1 1
v3 0 0 0 0 0 0 0 1
A (G ) =
v4 1 1 1 0 1 0 0 0
v5 0 0 1 1 0 0 1 0
v6 1 1 0 0 0 0 0 0
560 Discrete Mathematical Structures
Example 41: Find the adjacency matrix for the following graph.
e8 v3
e4
v2
v4
e3
e5
e1 e7
e2 v5
v1 e6 v6
Fig 11.58
Example 42: Is it possible to make the incidence matrix of the following graph? If it is not possible then why?
Here, (v1 , v2 , K , v4 ) denotes the vertices and (e1 , e2 , K , e7 ) denotes the edges in the graph.
e1
v1 v2
e2
e7 e3
v4 e6 v3
e5
e4
Fig. 11.59
Solution: No, it is not pos sible to make the incidence ma trix of the given graph, be cause the graph
contains two self loops.
Example 43: Show the incidence ma trix of the following given graph.
v8 e7 v7
e12
e13 e4 e6
v9 v1 v2
e5
e1 e3
v3
e11 e8
v4 e2
e10 e9
v6 v5
Fig. 11.60
Here, (v1 , v2 , K , v9 ) denotes the vertices and (e1 , e2 , K , e13 ) denotes the edges in the graph.
Graph Theory 561
Example 44: Draw the graph having following matrix as its adjacency matrix.
0 3 2 2
3 0 1 2
2 1 0 1
2 2 1 0
e1 e6 e7
v2 e4
v4
e3
e5
v3
Fig. 11.62
562 Discrete Mathematical Structures
Let A and M denote the adjacency matrix and the incidence matrix of the graph G respectively. Then
v1 v2 v3 v4 v5 e1 e2 e3 e4 e5 e6 e7
v1 0 1 0 0 1 v1 1 1 0 0 0 0 0
v2 1 0 1 1 0 v2 1 0 1 1 0 0 0
A = v3 0 1 0 1 1 and M = v3 0 0 1 0 1 1 0
v4 0 1 1 0 1 v4 0 0 0 1 1 0 1
v5 1 0 1 1 0 v5 0 1 0 0 0 1 1
Let G = (V, E ) be a graph. Then by a walk we shall mean a finite sequence of edges of the form.
{v0 , v1 }, {v1 , v2}, {v2, v3 }, {v3 , v4 } , K , {vn − 1 , vn}
The Length of a walk is the number of edges it contains.
1 4 1 4
3
d 5 c d 5 c
(a) (b)
Fig. 11.63
11.12 Paths
Let G = (V, E ) be a directed graph. A path in G is a finite sequence of edges (ei1 , ei2 K eik ) such that the
terminal vertex of ei j coincides with the initial vertex of ei( j + 1 ) for 1 ≤ j ≤ k − 1.
A path is said to be simple if it does not include the same edge twice.
A path is said to be elementary if it does not meet the same vertex twice.
v6
Fig. 11.64
In Fig. 11.64 the sequence of edges (e1 , e2, e3 , e4 ) is a path; the sequence of edges (e1 , e2, e3 , e5, e8 , e3 , e4 ) is a
path, but not a simple one; the sequence of edges (e1 , e2, e3 , e5, e9 , e10 , e11 , e4 ) is a simple one and the
sequence of edges (e1 , e2, e3 , e5, e6 , e13 ) is an elementary simple path.
11.13 Circuit
Let G = (V, E ) be a graph. A circuit is a path (ei1 , ei2 , K , eik ) in which the terminal vertex of eik coincides with
the ini tial vertex of ei1 .
A circuit is said to be simple if it does not includes the same edge twice.
A circuit is said to be el e mentary if it does not meet the same vertex twice.
Illustration: In Fig. 11.64 (e1 , e2, e3 , e5, e9 , e10 , e12, e6 , e7 ) is a simple circuit, but not an elementary one;
(e1 , e2, e3 , e5, e6 , e13 ) is an elementary circuit.
Theorem 4: Let G = (V, E ) be a directed or undirected graph with n vertices. If there is a path from vertex v1 to
ver tex v2, then there is a path of no more than n − 1 edges from vertex v1 to vertex v2 .
Proof : Let there be a path from v1 to v2 and let (v1 , K , vi, K , v2 ) be the sequence of vertices that the path
meets when it is traced from v1 to v2. Suppose there are l edges in the path, then there would be l + 1 vertices
in the sequence.
If l > n − 1, then there must be a vertex vk that appears more than once in the sequence, that is
(v1` , K , vi , K , vk , K , vk , K , v2 ). Let us delete the edges in the path that leads vk back to vk , then we have
a path from v1 to v2 that has fewer edges than the original one. We shall repeat this argument until we have
a path that has n − 1 or fewer edges.
564 Discrete Mathematical Structures
Illustration: Fig. 11.65(a) shows a connected graph. However, we observe that it is not strongly connected,
while Fig. 11.65(b) shows a disconnected graph.
(a) (b)
Fig. 11.65
It is well known that calculations with the adjacency matrix reveal important information about the nature
of a graph.
Theorem 5: Let A be the adjacency matrix of a graph G = (V, E ) with| V | = n then ( A k )ij is the number of paths
of length k from vi to v j .
Proof: We shall prove this result by applying induction method on k.
For k = 1, a path of length 1 is just an edge of G. Hence, the result is true for k = 1 by virtue or definition of A.
Assume that this result is true for k − 1, then we consider A k . Let
( A k − 1 )ij = α ij and Aij = aij
n
Then ( A k )ij = ( A k − 1 A )ij = ∑ α iq aqj
q =1
B
Fig. 11.67: Graph of Konigsberg Bridge Problem
H1 H2 H3
H1 H2
H3
W
G W
W G E
Fig. 11.68: Three-utilities problem Fig. 11.69: Graph of Three-utilities Problem
In the Fig. 11.68 we have shown that how this problem can be represented by a graph — the conduits are
shown as edges while the houses and utility supply centers are vertices. This graph cannot be drawn in the
plane without edges crossing over. Thus, the answer to this problem is no.
566 Discrete Mathematical Structures
(a) (b)
Fig. 11.70: Planar graph
Two graphs are said to be homeomorphic if one can be obtained from the other by operations of the
follow ing kind:
(a) Replace an edge {vi, v j } by a new vertex vx and two edges {vi, vx } and {vx , v j }, so that
vi vj vi vx vj
(a) (b)
Fig. 11.71
(b) For a vertex vk of degree 2, replace vk and edges {vi, vk } and {vk , v j } by a single edge {vi, v j }, so that
vi vk vj vi vj
(a) (b)
Fig. 11.72
The graphs in Fig. 11.73 are homeomorphic; the degree 2 vertex v3 is deleted and degree 2 vertex v6 is
added, to convert graph (a) to graph (b).
v3 v2
v2
v6
v1 v4
v1 v4
v5
v5
(a) (b)
Fig. 11.73
Graph Theory 567
Y G
R R
G R Y Y
G
Y
B
G
R
Y B
Y R
G Y
A cut in this graph is a cut-set that leaves s and t in different compo nents. The ca pac ity of a cut is the sum of
the ca pac ities of its arrows. The Max-flow Min-cut Theorem asserts that the maximum possible flow
from s to t equals the minimum of the capac ities of all cuts between s and t.
We can also associate with each arrow a cost, the cost of unit flow through that arrow and then ask for the
flow pattern which transports commodities from s to t at minimum unit cost. This problem is known as the
Transportation Problem.
Exercise
1. Draw all simple graphs of one, two, three and four vertices.
5. Determine the adjacency matrices and incidence matrices by the pictures below:
v5
v1 e1 v2 v2
e1 e2 e4
e9 e2
e6 v3
e7 e3 v4
v3 v1 e5
v6
e8 e7 e6
e3 e8
e5
v5 e4 v4 v7 v6
(a) (b)
6. Show that the maximum degree of any vertex in a simple graph with n vertices is n − 1.
7. Show that the maximum number of edges in a simple graph with n vertices is n (n − 1)/ 2 .
8. If G = (V, E ) is a graph with | V | = n, then what is the maximum possible value for | E | ?
10. Prove that a simple graph with n vertices must be connected if it has more than [(n − 1)(n − 2)]/ 2
edges.
11. Prove that if a connected graph G is decomposed into two subgraphs g1 and g 2, there must be at least
one vertex common between g1 and g 2.
12. Let a, b and c be three distinct vertices in a graph. There is a path between a and b and also there is a
path between b and c. Prove that there is a path between a and c.
v5 v6
v4
v7
v8 v9
Fig. 11.78
0 1 0 1 0
1 0 0 1 0
A = 0 0 0 1 1
1 1 1 0 1
0 1 1 1 0
15. Find the adjacency matrix and incidence matrix of the multigraph shown in Fig. 11.79.
v1
v2 e1
e2 v3
e4
e5 e6
v4 e7 v5
e8
Fig. 11.79
570 Discrete Mathematical Structures
1.
(a) H1 H2
Elect-
Gas Water ricity
G W E
(b) H1 H2 H3 H4
Fig. 11.81
3. No
4. v1 v2
v1
v1 v2
v1
(a) (b) v2 v3 (c) v3 (d) v3
v2 v3
v4 v5
v4 v4 v5
Fig. 11.82
Graph Theory 571
v1 v2 v3 v4 v5 v6 e1 e2 e3 e4 e5 e6 e7 e8 e9
v1 0 1 0 1 0 0 v1 1 0 0 0 0 0 0 1 0
v2 1 0 1 1 0 1 v2 1 1 0 0 0 0 0 0 1
v3 0 1 0 1 0 1 v3 0 1 1 0 0 0 1 0 0
5. (a) A= M =
v4 1 1 1 0 1 0 v4 0 0 1 1 0 0 0 1 1
v5 0 0 0 1 0 1 v5 0 0 0 1 1 0 0 0 0
v6 0 1 1 0 1 0 v6 0 0 0 0 1 1 1 0 0
v1 v2 v3 v4 v5 v6 v7 e1 e2 e3 e4 e5 e6 e7 e8
v1 0 1 0 0 0 0 1 v1 1 0 0 0 0 0 0 1
v2 1 0 1 0 0 0 0 v2 1 1 0 0 0 0 0 0
v3 0 1 0 1 0 0 1 v3 0 1 1 0 0 0 1 0
(b) A = v4 0 0 1 0 1 1 0 M = v4 0 0 1 1 0 1 0 0
v5 0 0 0 1 0 1 0 v5 0 0 0 1 1 0 0 0
v6 0 0 0 1 1 0 0 v6 0 0 0 0 1 1 0 0
v7 1 0 1 0 0 0 0 v7 0 0 0 0 0 0 1 1
8. n(n – 1)
2
13. The connected components are (v1 , v2, v5, v6 ), (v3,v4 , v7 ), (v8 , v9 )
14. v1 v5
v4
v2
v3
Fig. 11.83
15. v1 v2 v3 v4 v5 e1 e2 e3 e4e8 e5 e6 e7
v1 0 0 1 0 1 v1 1 1 0 0 0 0 0 0
v2 0 1 0 1 1 v2 0 0 1 1 0 1 0 0
v3 1 0 0 1 0 = Adjacenty matrix, v3 1 0 0 0 0 1 0
0 = Incidence matrix
v4 0 1 1 0 1 v4 0 0 0 0 1 1 1 1
v5 1 1 0 1 0 v5 0 1 0 1 0 0 1 1
e5
e3 c
d c
e4 e6
d
11.17.1 Map
A particular planar representation of a finite planar graph is called Map.
11.17.2 Regions
A plane representation of a planar graph G divides the plane into R5
regions. A Region is characterized by the set of edges forming its v3
R4
boundary. A region of a planar graph is an area of the plane that is
bounded by edges and is not further divided into subareas. v2 v6
v1 R2 v5
Illustration R1 R3
A map with six vertices and nine edges divides the plane into five v4
regions in which four regions R1 , R 2, R 3 and R 4 are bounded Fig. 11.87
whereas the outer region R 5 of the graph is unbounded.
Example 46: Find whether the complete graph k6 and complete bipartite graph k3, 3 are isomorphic or not.
n(n – 1)
Solution: k6 and k3, 3 both contain 6 vertices. But k6 is complete graph and has edges
2
6×5
i.e. = 15 edges
2
But k3, 3 is complete bipartite graph and therefore number of edges = 3×3=9 edges.
Example 47: Determine which graph given below are bipartite graph.
[Pune (B.E.) 2004, 2008; Rohtak (M.C.A) 2004, 2007;
Kurukshetra (B.E.) 2005; P.T.U. (B.E.) 2007; M.K.U. (B.E.) 2007]
c a
e d a b
d
f
c
a e b d c b c
f
f a b
e f e d
G1 G2 G3 G4
(i) (ii) (iii) (iv)
Fig. 11.88
574 Discrete Mathematical Structures
Solution
(i) This is bipartite graph because we can divide its vertex set v = {a, b, c, d, e, f } into sets v1 = {a, b},
v2 = {c, d, e, f } such that V1UV2 = V and V1 ∧ V2 = φ.
(ii) It is not bipartite graph because we can not partition its vertex set into two parts.
(iii) This is bipartite graph because we can divide its vertex set
V = {a, b, c, d, e, f } in two sets V1 = {a, d, e} and
V2 = {b, c, f } and V1 ∪ V2 = V and V1 ∩ V 2 = φ
(iv) It is not bipartite graph because we can not partition its vertex set into two parts.
Example 48: How many edges has each of the following graph
Solution
n(n – 1) 10 × 9
(i) Since K10 is complete graph of 10 vertices, then the number of edges = = = 45
2 2
(ii) Since K 5,7 is complete bipartite graph. Then the number of edges = 5 × 7 = 35
Illustration: Which of the following graph of Fig. 11.89 represent bipartite graph and planar graph? If
planar graph redraw the same.
H1 H2 H2
G E W
(i) (ii)
Fig. 11.89
Both graphs are complete bipartite graph K 3, 3 and K 4, 4 respectively. These graph can not be draw on
plane.
Example 49: How many edges must a planar graph have if it has 7 regions and 5 nodes. Draw one such
graph.
Example 50: A connected planar graph has nine vertices having degrees 2, 2, 2, 3, 3, 3, 4, 4 and 5. How
many edges are there? [Osmania (B.E.) 2009]
n
Solution: We have by handshaking lemma ∑ d(vi ) = 2e
i=1
⇒ 2 + 2 + 2 + 3 + 3 + 3 + 4 + 4 + 5 = 2e ⇒ e = 14
Theorem 6: (Euler’s Formula). A connected planar graph with n vertices and e edges has e − n + 2
regions. [U.P.T.U. (B. Tech.) 2009]
Proof: We prove this theorem by induction on the number of edges e of G, where G is connected planar
graph.
Suppose e = 1 then n may be equal to 1 or 2.
In case e = 1, n = 2, then the number of regions r = 1 − 2 + 2 = 1. R2
[See Fig. 11.91(a)]. R1
Clearly graph in Fig. 11.91 (a) has one region (only infinite region).
In case e = 1, n = 1, then number of regions r = 1 − 1 + 2 = 2 . From e=1, n=2 e=1, n=1
Fig. 11.91 (b), it is clear that the graph has two regions, namely R1 (a) (b)
and R 2. Fig. 11.91
Hence the result is true for e = 1.
Now suppose that the result holds for all graph having at most e − 1 edges. Let G be a connected graph with e
edges and r regions.
In case G is a tree then e = n − 1 and number of regions is 1 (only infinite region). In this case by the formula,
we have
r = e − n + 2 = (n − 1) − n + 2 = 1
Thus, the theorem holds when G is a tree. Now consider the case when G is not a tree. In this case, G has
some circuits. Select an edge, say ‘c’, in some circuit. Deleting this edge ‘c’ from the plane representation of
G, we see that the regions are merged into a new region.
Therefore G − {c} is a connected graph with n vertices, e − 1 edges and r − 1 regions (where the number of
regions in G is r). Thus, by induction hypothesis, we have
r − 1 = (e − 1) − n + 2 or r=e−n+ 2
Illustration
An Euler graph is shown in Fig. 11.96. The closed walk has been indicated by arrows.
v1
v9 v10
v2 v3
v8 v4
v7
v11 v5 v12
v6
Fig. 11.96: Euler graph
Theorem 7: The nec es sary and suffi cient condition for a con nected graph G to be an Euler graph is that ‘all
vertices of G are of even degree’.
Proof: The condition is necessary. Let G be an Euler graph then to prove that all vertices of G are even.
Since G is an Euler graph and therefore, G has an Euler line i.e., G contains a closed walk which in cludes all
the edges of G. In tracing this closed walk we observe that every time the walk meets a vertex v (say) it goes
through two New Edges incident on v with one edge we entered v and with the other edge we exited v. This
happens for all intermediate vertices of the walk and also for the terminal vertex, since we exited and
entered the same vertex at the start and end of the closed walk respectively. Hence each vertex of G is of
even degree.
The condition is sufficient. Suppose all vertices of G are of even degree, then to prove that G is an Euler
graph. It is suf ficient to prove that there exists a closed walk which con sists of all edges of G. We construct a
walk starting from an arbitrary vertex v, (say) and go ing through the edges of G in such a way that each
edge is traced once and only once. Since each vertex is of even degree, we can exist from each vertex we
enter. In the start, we exited from vertex v, therefore, eventually we reach vertex v when walk comes to an
end. Let this closed walk (we have traced) be denoted by g. If g includes all edges of G, then G is an Euler
graph.
In case, g does not include all edges of G. Remove from G all edges of g and let g′ be a subgraph of G formed
remaining edges. Also each vertex of g′ is of even degree. Since G is connected, therefore, g′ must touch g at
least at one vertex u (say). Again construct a new walk in g′ which starts from the vertex u, this new walk
will terminate at u, since all vertices of g′ are even. Now we combine the walk in g′ with g and obtain a new
walk which begin and ends at the vertex v and consists of more edges than g. If the walk thus obtained
includes all the edges of G, then G is an Euler graph, otherwise above process is repeated until there are
edges in G which are not included in the walk. Ultimately we obtain a closed walk that includes all edges of
G and hence G is an Euler graph.
Theorem 8: A connected graph G is an Euler graph if and only if G is the union of some edges-disjoint circuits.
Proof: Suppose that the graph G is a union of some edge-disjoint circuits. Since the degree of each vertex
in a circuit is two, the degree of every vertex in G is even. By Theorem 3, G is an Euler graph.
Conversely, let G be an Euler graph. Then by Theorem 3, every vertex in G has even degree. Let v be any
vertex of G. Then d (v ) ≥ 2. Thus, there are at least two edges incident at v. Let v1 be any vertex adjacent to v.
Since degree of the vertex v1 is also even, there is a vertex v2 which is adjacent to v1 and is different from v.
Continuing in this way, we finally arrive at a vertex which has previously been traversed. If vi is the first
such vertex (that is, a vertex which has been previously traversed), then the part of the walk which begins
and ends at vi is a circuit C. We remove C from G and consider the graph G1 = G − C . Since every vertex in C is
of degree 2, it follows that every vertex in G1 must have even degree (the graph G1 may be disconnected).
From G1 , remove another circuit in exactly the same way as we removed C from G. Continue this process
until no edges are left. Thus, G is the union of circuits C , C1 , K , no two of which have common edges. This
completes the proof.
Corollary: Every vertex of a connected Euler graph is contained in some circuit.
578 Discrete Mathematical Structures
Illustration : De fine an Eu ler graph and show that a given connected graph G is an Euler graph if G has n
ver ti ces of odd de grees. It may be noted that by add ing an edge be tween the ini tial and fi nal verti ces of an open
Eu ler line (i.e., unicursal line) we shall get an Euler line. Thus, a connected graph is unicursal if it has ex actly
two vertices of odd degree.
Theorem 9: Let G = (V, E ) be a connected graph with 2k odd vertices (k ≥ 1). Then there exist k edge-disjoint
subgraphs such that they together contain all edges of G and that each is a unicursal graph.
Proof: Let G be a connected graph with 2k odd vertices. Let the odd vertices of G be named
v1 , v2, v3 , K , vk ; w1 , w2, K , wk . And k edges in the graph G between the vertex pairs
(v1 , w1 ), (v2, w2 ), K , (vk , wk ) to form a new graph G ∗ . Observe that in G ∗ , every vertex is of even degree and
hence G ∗ is Euler graph. Let ρ be any Euler line in G ∗ . Now if we remove from ρ the k edges we added in G to
get G ∗ then ρ will be split into k walks, each of which is a unicursal line and each edge of G is present in
exactly one of these unicursal lines. This completes the proof.
Theorem 10: (Kuratowski’s Theorem). A graph is planar if and only if it does not contain any subgraph
that is isomorphic to within vertices of degree 2 to either the graph K 3, 3 or K 5.
v3
v1
v4
v2
v5
Graph K2,3
Fig. 11.98
It is clear that each vertex in the graph K 2, 3 is not of even degree. Hence the graph K 2, 3 is not Euler.
Graph Theory 579
(iii) We know that each vertex in the graph of the octahedron is of degree 4 which is even. Hence the
graph of the octahedron is an Euler graph.
(iv) It is clear that the Petersen graph is not an Euler graph because each vertex of this graph is of degree
3 which is not even.
Example 53: A connected planar graph has six vertices each of degree 4. Determine the number of regions
into which this planar graph can be split.
Solution: The given planar graph has 6 vertices each of degree 4. Therefore, the sum of degrees of
vertices = 4v = 4 × 6 = 24.
Since the sum of degrees of vertices is equal to twice the number of edges, we must have
2e = 24 or e = 12
Now from Euler’s formula, the number of regions.
r = e − v + 2 = 12 − 6 + 2 = 8
Graph K3,3
Fig. 11.99
A path which contains every vertex of a graph G exactly once is called Hamiltonian Path.
A circuit that passes through each of the vertices in a graph G exactly once except the starting vertex (which
is also end vertex) is called Hamiltonian circuit.
It may be observe that every graph that has a Hamiltonian circuit also has a Hamiltonian path (by
removing any one edge from the Hamiltonian circuit). However, it is interesting to note that there are
graphs with Hamiltonian paths that have no Hamiltonian circuits.
Example 56: Which of the following graphs have a Hamiltonian circuit? [R.G.P.V. (B.E.) Bhopal 2008]
v1
v1 v2
v2 v5
v3
v3 v4 v4 v5
(i) (ii)
Fig. 11.100
Solution
(i) This graph has a Hamiltonian circuit v1 , v2, v3 , v4 , v5, v1 .
(ii) No Hamiltonian circuit is possible in this graph as there are four edges incident at v3 .
Example 57: Show that the following graphs have Hamiltonian circuits.
v6 v5
v1 v4
v7 v8
v2 v3
(i) (ii)
Fig. 11.101
Graph Theory 581
Solution
(i) This graph has a Hamiltonian circuit v1 , v2, v3 , v8 , v7 , v6 , v5, v4 , v1 as shown by dark line in
Fig.11.102 as follows:
v6 v5
v6
v5
v1
v4
v1 v4
v8 v8
v7 v7
v2 v3 v2 v3
Fig. 11.102: Graph and its Hamiltonian Circuit
(ii) This graph has a Hamiltonian circuit. One such circuit is shown by dark line in Fig. 11.103 as follows.
Example 58: Draw a graph with six vertices containing an Eulerian circuit but not Hamiltonian circuit.
[R.G.P.V. (B.E.) Bhopal 2001; Pune (B.E.) 2008]
Fig. 11.104
Theorem 11: Let G be a linear graph of n vertices. If the sum of the degrees of each pair of vertices in G is n − 1
or larger, then to prove that there exists a Hamiltonian path in G. [R.G.P.V. Nagpur (B.E.) 2009]
Proof: Let G be a linear graph of n vertices. Firstly, we shall prove that the graph G is a connected graph.
We shall prove it by contradiction. Let the graph G has two (or more) disconnected components. Suppose
one component has m1 vertices and let u1 be one of these vertices. Again suppose that another component
has m2 vertices and let u2 be one of these vertices. The degrees of u1 and u2 are at the most m1 − 1 and m2 − 1
respectively. Thus the sum of degrees of u1 and u2 is at the most m1 + m2 − 2, which is less than n − 1. This
give a contradiction and hence G is a connected graph. Now we shall show that there exists a Hamiltonian
path in G. Suppose there is a path of m − 1 edges, where m < n, in G which meets the sequence of vertices
u1 , u2, K , um . Now following cases arise.
Case (i) Either u1 or um may be adjacent to a vertex which is not in the path, then the path is extended to
cover this vertex and a path of m edges is obtained.
Case (ii) If case (i) does not happen then both the vertices u1 and um will be adjacent only to the vertices that
are in the path.
582 Discrete Mathematical Structures
Now we shall show that there exists a circuit containing exactly the vertices u1 , u2, u3 , K , um . In case the
vertex u1 is adjacent to the vertex um then the circuit u1 , u2, u3 , K , um , u1 exists.
Therefore, let us suppose that u1 is not adjacent to um , but u1 is adjacent only to vertices uP1 , uP2 , K , PPq ,
where 2 ≤ Pr ≤ m − 1, r = 1, 2, K , q. Now um may be adjacent to one of the vertices uP1 − 1 , uP2 − 1 , K , uPq − 1 ,
assume that um is adjacent to ur −1 , then the circuit (u1 , u2, K , ur − 1 , um , um −1 , K , ur , u1 ) will contain
exactly u1 , u2, K , um .
um–1
ur
Fig. 11.105
In case um is not adjacent to any of the vertices uP1 − 1 , uP2 − 1 , K , uPq − 1 , then um will be adjacent to at the
most m − q − 1 vertices. As a result the sum of the degrees of vertices u1 and um will be adjacent at the most
n − 2 vertices which is less than n − 1 consequently we get a contradiction.
Thus, we have a circuit containing all the vertices u1 , u2, u3 , K , um . Now let us choose a vertex ui, say,
which is not in the circuit. Since the graph G is connected, therefore, there is a vertex u j that is not in the
circuit with an edge joining ui and u j for some u j in {u1 , u2, K , um }. Removing the edge joining
uj um–1
u1 um
u2 uj–1 ur–1 ur
u1
Fig. 11.106
u1 uj um–1
um
u2 uj–1 uj+1 ur–1 ur
u1
Fig. 11.107
The above process is repeated step by step until we have a Hamiltonian path with n − 1 edges.
Graph Theory 583
Theorem 12: In a complete graph with n vertices there are (n − 1)/ 2 edge-disjoint Hamiltonian circuits, if n
is odd number ≥ 3.
Proof: Let G be a complete graph of n vertices. Then G has 5
n–2
3
n (n − 1)/ 2 edges. Since a Hamiltonian circuit in G contains n
edges, therefore the number of edge-disjoint Hamiltonian
circuits in G cannot exceed (n − 1)/ 2. We shall show that n 2
1
there are (n − 1)/ 2 edge-disjoint Hamiltonian circuits when n
n–1 n–3
is odd. The subgraph of a complete graph of n vertices as 4
shown in Fig. 11.108 is a Hamiltonian circuit. Fig. 11.108
If we keep the vertices fixed on a circle and rotate the
polygonal pattern anti-clockwise by
360 (360) (360) (n − 3) (360)
, 2. , 3. , K, ..., .
(n − 1) (n − 1) (n − 1) 2 (n − 1)
degrees, we find that each rotation results in producing a Hamiltonian circuit that has no edge in common
with any of the previous ones. Thus, we have obtained (n − 3)/2 new Hamiltonian circuits, all edge-disjoint
n−3 n −1
from the one in Fig. 11.108 and also edge-disjoint among themselves. Hence, we have +1=
2 2
edge disjoint Hamiltonian circuits.
b d f
a c g
e
h i j
Fig. 11.109
e2
b e6 f
e1 e11 e3
e7 c
e10 e13 g
a e0 e8 e12
h e9 e4
j
e5
Fig. 11.110
Example 60: Show that the graph shown below does not have a Hamiltonian circuit.
v1
v7
v2 v6
v8 v12
v13
v15
v16
v11
v9 v14
v3 v5
v10
v4
Fig. 11.111
A
Solution: We label the vertex v1 by A and all the vertices ad jacent to it by B. Then
we label all the vertices adjacent to B by A. We con tinue this pro cess until all the B
B B
vertices are labeled. If there is a Hamiltonian path or cir cuit then it must pass A A
A A
through the vertices A and B alternately. But we see that there are nine A vertices B
and seven B vertices as shown be low: B
B A
Therefore, the existence of a Hamiltonian circuit and path is not possible. A A
A
B
Fig. 11.112
Example 61: If G is a connected planar graph, then prove that it has a vertex with degree 5 or less.
Solution: Let each vertex of G have degree ≥ 6.
∑ log (V ) = 2| E |
V ∈V
2 1 2
⇒ 6| V | ≤ 2| E | ⇒ | V| ≤ | E| ∴ | V| ≤ | E | but | R| ≤ | E|
6 3 3
1 2
∴ | V| + | R | ≤ | E | + | E | ⇒ | V | + | R |, = | E |
3 3
By Euler’s formula | V | + | R | = | E | + 2 ∴ | E | + 2 ≤| E | ⇒ 2 ≤ 0, a contradiction
Each vertex x of G can not have a vertex degree ≥ 6 ⇒ each vertex of G of degree ≤ 5.
Graph Theory 585
Exercise
1. Draw a graph that has a Hamiltonian path but not have a Hamiltonian circuit.
5 4
5 B 2 C 8
3
2 3 5
D 2 E
Fig. 11.113
e5 v4
e5 e4
e6 e3
v2
e1 e2
v1 v3
7. Prove that the complete graph of five vertices is non-planar. Give example also.
or
Write a short note on Konigsberg problem.
D 2 E
Fig. 11.116
A colouring of a graph G is an assignment of colours to its vertices so that no two adjacent vertices have the
same colour.
a1 a3
a3 a1
a3 a2
Fig. 11.117
Generally colours are represented by positive integers. Thus n-colouring of a graph G is a function f: V(G )
→ (1, 2, K N ). Such that f (V1 ) ≠ f (V2 ) whenever {V1 , V2}, E (G ). The vertex colouring of two different graph
are shown in the graph of Fig. 11.118 and 11.119.
Graph Theory 587
The chromatic number of a graph G, is the minimum number of colours required to colour the vertices of
G r . Such that no two adjacent vertices receive the same colour. The chromatic number of a graph G is
denoted by X (G ). We find the following properties
(i) The Chromatic number of an isolated vertex is one.
(ii) The Chromatic number of a graph having atleast one edge is atleast two.
(iii) The chromatic number of a path pn, (n ≥ 2) is two.
(iv) The chromatic number of a wheel graph is 3 if it has odd number of vertices and u if it has even
number of vertices.
(v) If G is graph consisting of simply are circuit, with n ≥, 3, is 2 Chromatic if n is even and 3 chromatic if
n is odd.
Another definition of the chromatic number.
The Chromatic number of a graph G is the least integer K, such that G has K-colouring.
Theorem 13: There exists a K-colouring of a graph G if and only V(G ) can be partitioned into K subsets
V1 , V2...Vk such that no two vertices in Vr (r = 1, 2. . . . K ) are adjacent.
Hence X (H ) ≤ K ⇒ X (H ) ≤ X (G )
588 Discrete Mathematical Structures
Which are at even distance from v have colour 1. Since T’s connected and has atleast two vertices it
contains atleast are edge T is not 1-colourable. Hence T can be property coloured with 2 colours. Hence
chromatic number T is 2.
Assignment of colours to the edge of a graph G. So that no two adjacent edge receive the same colour is
called on Edge Colouring of G.
K-edge colouring of a graph G is an assignment of K-colours to the edges of G such that no two edges of G receive
the same colour.
Theorem 17: A graph G containing atleast one edge is 2-chromatic if and if it contains no odd cycles.
[Nagpur (B.E.) 2007, 2009]
Proof: Let G be a connected graph with cycles of only even lengths. Consider a spanning tree T of G. We
know that T can be properly coloured with two colours. Now add edges (of G which are not in T) one by
one. Since G has no cycles of odd length the end vertices of every edge being replaced are differently
coloured in T. Thus G is properly coloured with two colours i.e.G is 2-chromatic.
Conversely, Let G be a 2-coloured graph with atleast one edge. If G has a cycle of odd length, we would
need atleast three colours just for that cycle. G is 2-chromatic, hence G contain no odd cycles.
We shall now show that every planar graph can be properly coloured with five colours.
Proof: We shall prove this theorem by induction on the number n of vertices. Since any planar graph with
1, 2, 3, 4 or 5 vertices can be properly coloured with five colours, we consider that vertices of every planar
graph with n − 1 vertices can be properly coloured with five colours, and then prove that any planar graph G
with n vertices requires five colours for proper colouring.
Let G be a planar graph with n vertices. Since G is planar, it must have atleast one vertex of degree five or
less. Let V denote this vertex.
Let G′ = G – V, then G′ has n − 1 vertices and G′ requires no more than 5 colours. Suppose that the vertices of
G′ have been properly coloured and now we add the vertex V and all the edges incident of V to G′. If the
degree of is 1, 2, 3 or 4, we can assign a colour to V so that the vertices of G are properly coloured. Now we
consider the case in which the degree of V is 5 and all the five colours are used for colouring the vertices of
G adjacent to V. Let V1 , V2, V3 , V4 and V5 denote the vertices of adjacent to V in G coloured with C1 , C 2, C 3 , C 4
and C 5 respectively.
Let H1 denote the subgraph of G generated by the vertices coloured C1 and C 3 . If V1 and V2 belong to the
different components of H1 interchange the colours C1 and C 3 in the component containing V1 and assign
ten colour C 3 to the vertices V1 and V3 . We find the proper colouring of G by assigning colour C1 to the vertex
V. If V1 and V3 are in the same component of H, then there exists a V1 – V3 path in G all of whose points are
coloured alternatively with the colours C1 and C 3 . Since G is planar a similar path between the vertices V2
and V4 coloured alternatively with colours C 2 and C 4 cannot exist. let H 2 denote the subgraph generates by
the vertices coloured C 3 and C 4 then V2 and V4 belong to different components of K. We can interchange the
colours C 2 and C 4 in the component containing V2. When the vertices V2 and V4 are assigned the colour C 4 ,
we can choose the colour C 2 to paint the vertex V and obtain a proper colouring of G.
590 Discrete Mathematical Structures
4
3
2
Fig. 11.121
b
d e
a
Fig. 11.123
∑ ( λr ) C r
n
r =1
Where each C r has to evaluated individually for the given graph. If G is a graph with atleast one edge, then
G requires atleast two colours for proper colouring of G, therefore C1 = 0. If G has n vertices, then can be
properly coloured using in n ! ways, therefore C1 = 0. If G has n vertices, then can be properly coloured using
n colours in n ! ways. therefore C n = n ! .
If G is a complete graph (K n ) on vertices, we have C r = 0 for r = 1, 2, 3 . . . . n – 1 and C n = n !
Hence,
∑ ( rλ ) C r =
n
λ (λ – 1)(λ – 2). . . . . . (λ – n + 1)
Pn(λ ) = . n!
r =1
n!
= λ (λ – 1)(λ – 2). . . . . (λ – n + 1)
If G = K 4 (i.e. complete graph on 4 vertices)
We have C1 = C 2 = C 3 = 0 and C 4 = 4!
∴ The chromatic polynomial of G is
λ (λ – 1)(λ – 2)(λ – 3)
P4 (λ ) = ⋅ 4!
4!
= λ (λ – 1)(λ – 2)(λ – 3)
Theorem 19: Let u and v be two non-adjacent vertices of a graph G and G′ be a graph obtained by adding an
edge between u and v(i . e. G′ = G + uv ). Let G ′ ′ = G – uv. i.e. G′ ′ be the simple graph obtained from G by fusing
the vertices u and v together and replacing sets of parallel edges with single edges. Then
Pn(λ ) of G = Pn(λ ) of G′ + Pn–1 (λ ) of G′′
Proof: The λ colouring of G is of two types:
(i) λ colouring if G assigning different colours to the vertices of u and v.
(ii) λ colouring assignment the same colour to u and v.
∴ The number of ways of properly colouring G such that u and v have different colours.
= Number of ways of properly colouring G′ and the number of ways of properly colouring G
such that u and v have same colour.
= Number of ways of properly colouring G′′
Pn(λ ) of G = Pn(λ ) of G′ + Pn–1 (λ ) of G′′
592 Discrete Mathematical Structures
Example 62: Show that the graph in Fig. 11.125 is uniquely colourable.
V5 V4
V3
V1 V2
Fig. 11.125
Solution: This graph has 8 edges. We first find all maximal independent sets of this graph.
φ = V1 V2 + V1 V3 + V1 V5 + V2V3 + V2V4 + V3 V4 + V3 V5 + V4 V5
⇒ φ′ = (V1′ + V2′ )(V1′ + V3′ )(V1′ + V5′ )(V2′ + V3′ )(V2′ + V4′ )(V3′ + V4′ )(V3′ + V5′ )(V4′ + V5′ )
= (V1′ + V2′ V3′ V5′ )(V2′ + V3′ V4′ )(V3′ + V4′ V5′ )(V4′ + V5′ )
= (V1′ V2′ + V1′ V3′ V4′ + V2′ V3′ V5′ + V2′ V3′ V4′ V5′ )(V3′ V4′ + V3′ V5′ + V4′ V5′ )
= V1′ V2′ V3′ V4′ + V1′ V2′ V3′ V5′ + V1′ V2′ V4′ V5′ + V1′ V3′ V4′ + V1′ V3′ V4′ V5′
+ V1′ V3′ V4′ V5′ + V2′ V3′ V4′ V5′ + V2′ V3′ V5′ + V2′ V3′ V4′ V5′
= V1′ V3′ V4′ + V2′ V3′ V5′ + V1′ V2′ V4′ V5′ [Using a + ab = a]
Example 63: Find the chromatic polynomial of the graph given below.
c
d b
a
Fig. 11.126
Graph Theory 593
Solution: The procedure for obtaining the chromatic polynomial of a graph is illustrated below:
c
d b
c c
a
G
d b b
a a
λ(λ–1) (λ–2) (λ–3) λ(λ–1) (λ–2)
G′ G″
Fig. 11.127
Example 64: Show that the regions of a planar graph can be 2-coloured if each vertex is of even degree.
[Rohtak (B.E.) 2008]
Example 65: Find the chromatic polynomial of the complete bipartite graph K 2, s .
[Delhi (B.E.) 2005]
Solution: If vertices a and b have the same colour then total number of way of b
K2,s
proper colouring K 2, 5 is K (K – 1)5. If a and b have different colour then there are
Fig. 11.128
K (K – 1)(K – 2)5 different ways of colouring.
Example 66: Find all maximal independent sets of the graph in Fig. 11.129
c
f
a
b e
g
d
Fig. 11.129
594 Discrete Mathematical Structures
Now if we exclude from the vertex set of G the vertices appearing in any of the six terms, we get a maximal
independent set. The six maximal independent sets are
{a, c, d, f }, {a, c, d, g} {a, e}, {b, f }{b, g} {b, e}
Solution: With λ colours, the first vertex of a G can be coloured in λ ways. A second vertex can be
coloured in (λ –1) ways, the third vertex can be coloured in λ –3 ways if and only if the third vertex is
adjacent to first two vertices and the nth vertex can be coloured in λ – n + 1 ways if and only if every vertex is
adjacent to every other, that is if and only if G is complete.
Example 68: Show that a simple graph with 7 vertices each of degree 4 is non-planar.
[R.G.P.V. (B.E.) Raipur 2007]
Solution: Let G be a simple graph with 7 vertices each of degree 4. Then sum of degree of all vertices in G
is equal to 7×4=28. Thus, number of edges e in G is given by
2e = 28 ⇒ e = 14
Suppose that there are x regions of degree 3 and (9 – x ) regions of degree 4. Then
3x + 4 (9 – x ) = 28 ⇒ x=8
Hence there would be 8 regions of degree 3 and 1 region of degree 4 (observe that G cannot have any
region of degree ≥ 5). Any region of degree 3 requires 3 colours to colour its vertices. Hence G is not
2-colourable. But by Example-69 (on the next page) if G is a planar graph with each vertex of even degree
then it is 2-colourable. Contradiction proves that G is not planar.
Note: By degree of a region we mean number of edges forming the boundary of the region.
Graph Theory 595
Example 69: Find the chromatic polynomial of the graph shown in Fig. 11.130
V2
V1
V3
V5
V4
Fig. 11.130
Solution: G has a triangle therefore G requires minimum 3 colours for proper colouring.
∴ C1 = 0, C2 = 0
When we have three colours the vertices of the triangle formed by 3 points for example say V1 , V2, V3 can be
properly coloured in 3 ! ways. The vertex V4 can be assigned the colour of V2 and V5 can be assigned the of the
vertex V3 .
Thus C3 = 3 ! = 6
When we have 4 colours. We can take any four vertices say V1 , V2, V3 and V4 of G and properly be coloured
with the 4 colours in 4 ! ways. The fifth vertex can be assigned the colour the vertex V2 or of V3 . Thus
C 4 = 2. 4 ! = 48 and we have C 5 = 5 !
Hence, the chromatic polynomial of G is
(λ –1)(λ – 2) λ (λ –1)(λ – 2)(λ – 3) λ (λ –1)(λ – 2)(λ – 3)(λ – 4)
P5(λ ) = 3 ! + 2. 4 ! + 5!
3! 4! 5!
Example 70: Find the chromatic polynomial of the graph in Fig. 11.131
d c
e
a b
Fig. 11.131
Solution: Since this graph has non-adjacent vertices, choose any pair of non-adjacent vertices in the
graph. Let us choose a and c. We now draw an edge between a and c to obtain the graph G′. We will also
fuse vertices a and c to obtain G′′ as shown in the following Fig. 11.132
596 Discrete Mathematical Structures
d c
e
a b
d c d
(a) e
a b b
x=(a, c)
(b) (c)
Fig. 11.132
Again taking b and d as non-adjacent vertices in Fig (b) and (c) and applying the same procedure we get.
d
d e c e
x b
a b
d c e c b
e
e e
a b a b x b x b
Fig. 11.133
All the four graph are now complete graphs, therefore chromatic polynomial of the given graph is the sum
of chromatic polynomial of these four complete graphs. Hence, chromatic polynomial of the given graph is
P5(λ ) = λ(λ –1) (λ –2) (λ –3) (λ – 4) + 2λ (λ –1) (λ –2) (λ –3) + λ (λ –1) (λ –2) = λ(λ –1) (λ –2) (λ 2 –5λ + 7 ).
Example 71: Let G be a simple graph with n vertices which is regular of degree r. Prove that chromatic
n
number of G ≥ .
n–r [Pune (B.E.) 2007; Rohtak (M.C.A.) 2006]
Solution: Let C i be the number of vertices in any proper colouring of G which receives the colour i, where
1 ≤ i ≤ k, the chromatic number of G. Then
Ci ≤ n – d for each 1 ≤i ≤ k
Now n = C1 + C 2 + . . . . . . + C k .
≤ (n – d ) + (n – d ) + . . . . . . . (n – d ) k times
= k(n – d )
n
Thus k≥
n–d
Graph Theory 597
Exercise
1. Determine whether the graphs shown is a simple graph a multigraph and a pseudograph.
a b a
a d
d b
b c c d c
b d v1 v2
v5
a c e v4 v3
(i) (ii)
Fig. 11.135
3. Find the in-degree and out-degree of each vertex of the following directed graphs
Fig. 11.136
a e d' c'
c
a d a' b'
(i) (ii)
Fig. 11.137
598 Discrete Mathematical Structures
(b)
Fig. 11.138
6. Determine wether the following graphs are isomorphic
(a) v2 v2
v1 v3 v1 v3
v5 v4 v5 v4
(i) (ii)
Fig. 11.139
(b) v1
v2 v'1 v'2
v'5
v5 v6 v'6
v8 v7 v'7
v'8
v4 v3 v'4 v'3
(i) (ii)
Fig. 11.140
(c) a b a′ b′
f c f′ c′
e d e′ d′
(i) (ii)
Fig. 11.141
(d)
Fig. 11.142
Graph Theory 599
7. Determine which of the following graphs contain and Eulerian Circuit. If it does, find out on Eulerian
circuit fo.r the graphs.
c v3
v2
d v4
(a) b (b)
a e v1
f v5
Fig. 11.143
v2
e1
e2 e3 e4 a b
(c) v1 v5 v3 (d) c
d
e7 e6
e8 e5 e
v4
Fig. 11.144
8. Determine whether the given graph has a Hamilton circuit. If it does, find such a circuit.
a b c
a b
f g
(a) c (b) d e h
e d i j
Fig. 11.145
v1 v3 a b
v0 v2
(c) v7 v4 (d) e d c
v6 v5 f g
Fig. 146
Fig. 11.147
600 Discrete Mathematical Structures
(iii) (vi)
Fig. 11.148
(v) (vi)
Fig. 11.149
13. Define parallel edge, simple graph, regular graphs and degree of vertex with example.
[M.K.U. (B.E.) 2001, 2004, 2007, 2009, Rohtak (B.E.) 2005; Nagpur (B.E.) 2004, 2009; Pune (B.E.) 2008)
14. Define each of the following with given example. [U.P.T.U. (B.Tech.) 2006]
(vi) Hamiltonian circuit and graph and both [U.P.T.U. (B. Tech.) 2007]
(vii) Bipartite and complete bipartite graph [U.P.T.U. (B. Tech.) 2007, 2009]
15. G and G are bipartite, what can be concluded about G? [U.P.T.U. (B.Tech.) 2006]
16. Differentiate between Euler and Hamiltonian graph with examples. [U.P.T.U (B. Tech.) 2008]
n(n – 1)
17. Show that the maximum number of edges in a simple graph with n vertices is
2
18. A graph G has 21 edges, 3 vertices of degree 4 and other vertices are of degree 3. Find the number of
vertices in G.
19. Nine members of a club meet each day for lunch at a round table. They decide to sit such that every
member has different neighbours at each lunch. How many days can this arrangement last?
20. Construct a cubic graph on 10 vertices. Draw three different representations.
21. Suppose you are married and you and your husband visited a party with 3 other married couples. No
one shakes hands with himself or his wife. How many hands you have shaken and how many did
your husband shake. Give limits.
Graph Theory 601
22. What is the largest number of vertices in a graph with 35 edges if all vertices are degree atleast 3.
23. If a graph with n vertices is regular of degree r, what is sum of the degree of the vertices?
24. Draw the graphs of the chemical molecules (a) CH4 (b) C 2H6
26. Find the number of vertices, the number E of edges and the number R of regions of the graph.
Fig. 11.150
27. A graph g has 21 edges, 3 vertices of degree 4 and other vertices are of degree 3. Find the number of
vertices in G.
28. How many edges has each of the following graph?
(a) K7 (b) K 3, 6
in-degree v2 = 1 out-degree v2 = 2
in-degree v3 = 2 out-degree v3 = 1
25.
26. v = 6, E = 9, R = 5
27. 13
28. (a) 35, (b) 18
Graph Theory 603
1. (a)
2. (a) True (b) False (c) True (d) True (e) True (f) True
(g) False (h) True (i) True (j) True (k) True
❑❑❑
Recurrence Relations 607
Illustration: The nth term an of the sequence 3, 8, 13, 18, 23, ... can be written as
an = an–1 + 5 , for n ≥ 2. and a1 = 3
This formula is called Recursive Formula and relation is called recurrence relation, some times is called
Difference Equation. The beginning information a1 = 3 is called Initial Condition or Boundary
ar + 3 + 3ar + 2 + 4 ar +1 + 8 = 0
or
y h+ 3 + 3y h+ 2 + 4 y h+1 + 8 = 0
or
ux + 3 + 3ux + 2 + 4 ux +1 + 8 = 0
Illustration
Illustrations
1. y h3+ 3 + 2y 2h+ 2 + 2y h+1 = 0 2. y h+ 4 + y h+1 + y h = 0
The solution of (1) is of the form A α 1κ , where α1 is the Characteristic Root and A is constant determine
by the boundary conditions.
c0 Aα r + c1 Aα r –1 + c2 Aα r – 2 + . . . + ck Aα r – k = 0
Which is the characteristic equation of the difference equation (1). Therefore, if α 1 is one of the roots of the
characteristic equation (1), a characteristic equation of k th degree has k Characteristic Roots.
(xii) ar – 4ar –1 + 13 ar – 2 = 0
Aα r +1 – 1. 5 Aα r = 0 ⇒ Aα r (α – 1. 5) = 0 But Aα r ≠ 0
(ii) We have ar = 5 ar –1 – 6 ar – 2, r ≥ 2, a0 = a1 = 3
∴ ar – 5ar –1 + 6 ar – 2 = 0 ...(1)
r r –1 r–2
Put ar = A α , ar –1 = A α , ar – 2 = A α in (1)
5 6
Aα r – 5A α r –1 + 6 A α r – 2 = 0 or Aα r 1 – + 2 = 0 But Aα r ≠ 0
α α
⇒ α 2– 5 α + 6 = 0 , this is the characteristic equation.
⇒ (α – 3) (α – 2) = 0 ⇒ α = 2, 3 i . e. α1 = 2, α 2 = 3
Then the solution of homogeneous recurrence relations is given by
ar = A1 (α1 )r + A2(α 2 )r
∴ (α – 1)(α – 2)(α – 3) = 0 ⇒ α = 1, 2, 3
Which is the characteristic roots of the given equation. Therefore, the solution of the given recurrence
relation is
ar = A1 (1)r + A2(2)r + A3 (3)r ...(1)
⇒ A(z ) = 0 + 1z – 2z 2 + 19z 3 + . . .
⇒ A(z ) = z – 2z 2 + 19z 3 + . . .
(ix) We have 4 ar – 20 ar –1 + 17 ar – 2 – 4 ar – 3 = 0
The characteristic equation of given recurrence relation is
4 α 3 – 20 α 2 + 17α – 4 = 0
⇒ 4 α 3 – 16 α 2– 4 α 2 + 16 α + α – 4 = 0
⇒ 4 α 2(α – 4) – 4 α (α – 4) + (α – 4) = 0
(xii) We have ar – 4 ar –1 + 13 ar –2 = 0
4 ± 16 – 52 4 ± 6 i
The characteristic equation is α 2 – 4α + 13 = 0 ⇒ α= = = 2 ± 3i
2 2
2 + 3i = ρ ei θ = ρ cos θ + i ρ sin θ
3
⇒ ar = (13)r / 2 A1 cos r (tan –1 ( 3 / 2) + A2 sin r tan –1
2
1+ 3
Example 2: Solve the recurrence relation y n+ 2 – y n+1 + y n = 0 given that y 0 = 1 and y1 =
2
Solution: We have y n+ 2 – y n+1 + y n = 0
1± 1–4 1±i 3
The characteristic equation is α 2 – α + 1 = 0 ⇒ α= =
2 2
Compare α = ρ ei θ
1+i 3
= ρ (cos θ + i sin θ)
2
3 1 3 π
⇒ ρ cos θ = 1/2, ρ sin θ = square ρ 2 = + , ρ = 1 divide tan θ = 3, θ = tan –1 ( 3) =
2 4 4 3
π π n
Then, the solution of homogeneous recurrence relation is y n = (1)n( A1 cos n + A2 sin ... (1)
3 3
1+ 3
The initial condition is y 0 = 1 and y1 = then put n = 0, 1 in (1), we get
2
y 0 = A1 ⇒ A1 = 1
π π 1 + 3 A1 3
y1 = A1 cos + A2 sin ⇒ = + A2
3 3 2 2 2
3 1 3 1 3 3 3
∴ A1 = 1, A2 = + – or A1 = 1, A2 = , A2 = =1
2 2 2 2 2 2 3
Put A1 , A2 in (1) we get general solution of given recurrence relation.
nπ nπ
y n = (1)n cos + sin
3 3
Recurrence Relations 615
12.3.1 The Total Solution or General Solution of (1) Consists of Two Parts, Namely
(i) Homogeneous Solution (ii) Particular Solution
The homogeneous solution has been discussed in before articles. Now we shall discuss the methods of
determining Particular Solution (1).
1. br ar = Abr
Here f (r) = 2r , since 2 is a characteristic root of multiplicity 2, the general form of the particular solution of
(1) is taking as
ar = A 2r ⋅ r2 ...(2)
Put r = r – 1, r – 2 in (2), we get ar –1 = A 2 ( r –1 ) 2
(r – 1) and ar – 2 = A2r – 2 (r – 2
2)
Put these values in (1), we get
Ar2 2r – 4 A 2( r –1 )(r – 1)2 + 4 A 2( r – 2)(r – 2)2 = 2r
⇒ 2A 2r = 2r ⇒ A = 1/2
Hence, the required particular solution is given from (2)
1
ar = 2r r2 ⇒ ar = 2r –1 r2
2
Example 4: Determine the particular solution for the recurrence relation ar – 3ar –1 + 2ar – 2 = 2r
[U.P.T.U. (B.Tech.) 2002; P.T.U. (B.E.) Punbab 2007; R.G.P.V. (B.E.) Bhopal 2005]
Solution: We have ar − 3ar –1 + 2ar – 2 = 2r ...(1)
2
The characteristic equation is α – 3α + 2 = 0 ⇒ (α – 2)( α – 1) = 0 ⇒ α = 1, α=2
Since 2 is characteristic root of multiplicity, the general form of the particular solution of recurrence
relation (1) is
ar = Ar2r ...(2)
Put r = r – 1, r = r – 2 in (2), we get ar –1 = A(r – 1) 2( r –1 ), ar – 2 = A(r – 2) 2( r – 2)
Now, put these values in (1), we obtain
1
A 2r = 2r
Ar2r – 3A(r – 1) 2( r –1 ) + 2A(r – 2) 2( r – 2) = 2r ⇒ ⇒ A=2
2
1
Hence, the required particular solution is given from (2) ar = r 2r
2
Since (– 3) is a characteristic root of multiplicity 2, the general form of particular solution of (1) is given as
ar = A3 + A4 r + A5r2 ...(3)
Put this expression in (1), we get
{ A3 + A4 r + A5r2} + 6 { A3 + A4 (r – 1) + A5(r – 1)2}
+ 9 { A3 + A4 (r – 2) + A5(r – 2)2} = 3
⇒ 16 A5 r2 + (16 A4 – 48 A5 ) r + (16 A3 – 24 A4 + 42A5 ) = 3
Comparing like terms on both sides, we get
3
16 A5 = 0 ⇒ A5 = 0 , 16 A4 – 48 A5 = 0 ⇒ A4 = 0 , and 16 A3 – 24 A4 + 42A5 = 3 ⇒ A3 =
16
3
Then from (3) ar =
16
Hence, total solution as (i) is
ar = homogeneous solution + particular solution
3
⇒ ar = ( A1 + A2r)(–3)r + ...(4)
16
The given boundary condition is a0 = 0, a1 = 1
Put r = 0, 1 in (4), we get
3 3
a0 = A1 + , a1 = ( A1 + A2 )(– 3) +
16 16
3 3
or o = A1 + , 1 = ( A1 + A2 )(– 3) +
16 16
–3 −1
⇒ A1 = and A2 =
16 12
Put these value in (4), we get required solution
–3 1 3
ar = − r (– 3)r +
16 12 16
620 Discrete Mathematical Structures
1 13
Then put in (3), we get ar = 7 – r + r2
9 3
1 13
Therefore, the total solution is ar = ( A1 + A2r)(–2)r + 7 – r + r2
9 3
12.4 Recursive Algorithm [Delhi (B.E.) 2005, 2009; M.K.U. (B.E.) 2007, 2009]
An algorithm is a finite step-by-step list of well defined instructions to perform a certain task.
Illustration: To find out the output f ( x ) for a given function f with input X where X = list of values.
The list of instructions given to the computer to compute f ( x ) will be an algorithm. The particular choice of
the algorithm to compute f ( x ) may be depend on complexity of the algorithm.
Illustration: If you purchase a new car, then the instruction sheet that comes with the new car is an
algorithm for assembling the car.
A function is called Recursively Defined if the function of the function refers to itself, and satisfying the
following steps:
(i) There must be certain arguments for which the function does not refer to itself, these arguments are
called Base Values.
(ii) Each time function does not refer to itself, the argument of the function must be closer to a base
value.
Illustration: Let us consider a numeric function
a = (3° , 31 , 32, . . . . 3r , . . . ) or ar = 3r , r ≥ 0
But the numeric function a = (3° , 31 , 32, . . . 3r K ) can be represented as ar = 3 ar –1 ...(1)
Together with initial condition a0 = 1. This relation is called a recursive specification of the value of a at r. If
we are to given ar –1 then ar can be determine as 3 time ar –1 . Again if we know the value of ar – 2, then ar −1 can
be determined as 3 time ar −2 and so on. Hence to determine the value of ar for any r. For this we have to
know a0 , where a0 is the base value.
Example 7: Calculate 15 using recurrence definition. [P.T.U. (B.E.) Punjab 2006; U.P.T.U. (B. Tech.) 2005]
Exercise
@ Recurrence Relation
1. Solve the following recurrence relation
(i) ar + 3ar –1 = 0 (ii) ar + 4ar –1 + 4ar – 2 = 0
(iii) ar – 4ar –1 + 6ar – 2 – 4ar – 3 + ar – 4 = 0 (iv) ar – 8ar –1 + 15ar – 2 = 0
(v) ar + ar –1 – ar – 2 – ar – 3 = 0 (vi) ar + ar – 4 = 0
7. Given that a0 = 0, a1 = 1, a2 = 4 and a3 = 12, satisfy, the recurrence relation an + c1 an–1 + c2an– 2 = 0
determine an .
8. Show that ar = –2. (2)r is the solution of the non-homogeneous linear recurrence relation
ar = 3ar –1 + 2r .
9. Identify each of the given recurrence as linear homogeneous of constant coefficient. If the relation is
a linear homogenous relation, gives its degree.
10. Find the first four terms of the sequence defined by each of the recurrence relations and initial
conditions.
(i) an = an2–1 (ii) bk = bk –1 + 2bk – 2 (iii) bk = kbk –1 + k 2bk – 2
11. Find a recurrence relation for the number of ways a persons can climb n steps when
(a) (i) the person can skip at most one step at a time (ii) at most two steps at a time
(b) What are the initial conditions?
12. What is meant by recursively defined function? Give the recursive definition of factorial function.
[U.P.T.U. (B.Tech.) 2006]
13. Write a short note on recursive algorithm.
[P.T.U. (B.E.) Punjab 2005; Rohtak (M.C.A.) 2002, 2004, 2008; Delhi (B.E.) 2007]
14. What is the recurrence relation for the nth fibonacci number Fn?
Recurrence Relations 629
(iii) ar = A1 r3 + A2 r2 + A3 r + A4 (iv) ar = A1 5r + A2 3r
(v) ar = ( A1 r + A2 )(–1)r + A3 (vi) ar = ( A1 cos (θ1 r) + A2 sin (θ1 r) + ( A3 cos (θ 2r) + A4 sin (θ 2r)
2 1
r r
(ii) ar = 5r – 2r (iii) ar = 2r –
3 2
r r r r
1 1 1 1
(iv) ar = A1 + A2 , ar = –
2 4 2 4
4r(4)r
(iii) ar = A1 (–1)r + A2(4)r + (iv) ur = (r2 + 7 r − 22)2r –1 + (12 + 3r)
5
(v) ar = 1. (2)r + 3(5)r (vi) ar = (2 + r)4r –1
7. an = n ⋅ 2n–1
7. The number of bacteria in a colony double every hour. If a colony begins with 5 bacteria, how many
bacteria will be there after 3 hour, 6 hours? 1900 hours? After n hours? Find a recurrence relation to
represent the same.
(a) an = an–1 + an– 2 (b) an = 3an–1 + 2an– 2 (c) an = 2an–1 (d) an = an–1 + 5
Recurrence Relations 631
8. Which of the following are linear non-homogeneous recurrence relations with constant coefficients?
Find the order
(a) an + an–1 = 3 (b) an– 2 + 5an–1 + 6an = 0
(c) an = nan–1 (d) an = 3an–1 + 2an– 2 + an– 3
6. (d) 7. (c) 8. (a) No (b) yes, order 2 (c) No (d) yeas, order 3
2. 45
3. n − 1 + r C n(ar )
5. λ 4 + 2λ 3 − 3λ 2 − 6 = 0
❑❑❑
Discrete Numeric and Generating Functions 633
If a : N → R is a discrete numeric function, then a0 ,a1 , a2,... ar , ... denote the values of the function ‘ a ’ at
0, 1, 2, . . . r i.e. a(0) = a0 , a(1) = a1 , a(2) = a2 ... a(r) = ar K .
Illustrations
3 + 2r, 0 ≤ r ≤ 4
3r , 0≤r≤ 9
(2) g(r) or br = (3) h(r) or cr = 4 – r, r > 4 and r is odd
5r – 2, r ≥ 9
4r, r > 4 and r is even
–5, r = 6, 7, 8. . . . .
(4) i (r) or dr = (5) j (r) or er = 100 (2. 08)r , r ≥ 0
0 , otherwise
Illustration: Let ar denote the altitude of an aircraft in thousands of meters at the rth minute. Let the aircraft
takes of after spending 10 minutes on the ground, climbs up at a uniform speed at an altitude 10 thousand
meters in 10 minutes, starts to descend uniformly 2 hours of flying time and lands 10 minutes later. Then the
numeric function ar of the altitude of the aircraft is given by
634 Discrete Mathematical Structures
0 , 0 ≤ r ≤ 10
r − 10 , 11 ≤ r ≤ 20
ar = 10 , 21 ≤ r ≤ 130
140 – r , 131 ≤ r ≤ 140
0 , r ≥ 140
Example 1: In a process control system, monitoring device measures the temperature in side a chemical
reaction chamber once only 30 sec. Let ar denote the rth reading in degrees centigrade. Determine an expression
for ar if it is known that the temperature rises 100°C to 120°C at a constant rate in the first 300 sec and stays at
120°C from then on.
Solution: Let ar = rth reading and the temperature increase from 100 to 120°C at constant rate for first
300 sec.
Therefore, a0 = 100, a1 = 102, a2 = 104, ... a10 = 120 where the reading are taken at the interval of 30 sec.
Since temperature remain constant after 300 sec then
ar = 120, r ≥ 11.
Example 2: Every particle inside a nuclear reactor splites into three particles in each minute. If one particle
is inserted into the reactor every minute beginning at t = 0, express the process in the form of numeric function.
[R.G.P.V. (B.E.) Raipur 2009]
⇒ s = 1 + 4 + 13 + 40 + . . . + ar –1 + ar
s= + 1 + 4 + 13 + . . . . r terms
subtract
0 = 1 + 3 + 9 + 27 + . . . r term – ar
1(3r − 1) 1 r
or ar = 1 + 3 + 9 + 27 + . . . . . r term or ar = = (3 – 1)
3– 1 2
Discrete Numeric and Generating Functions 635
Let a and b are two numeric functions. Then their sum a + b is a numeric function whose value at r is equal
to the sum of the values of the two numeric function a and b at r.
2 − 3r , 0≤r≤2
Then cr = ar + br = 11 , r=3
2– r + 2 r + 8 , r ≥ 4
Let a and b be two numeric functions. The product of a and b is denoted by ab is also numeric function
whose value at r is equal to the product of the values of two numeric function a and b at r
0 , 0 ≤r ≤ 3 2 – 3r , 0 ≤r ≤ 2
ar = – r and br =
2 + 3 , r≥4 2r + 5 , r≥3
0 , 0≤ r≤3
Then cr = ar ⋅ br = – r
(2 + 3)(2 r + 5) , r ≥ 4
1 , 0 ≤ r ≤ i −1
br =
ar − i, r ≥i, r ≥i
1 , 0 ≤ r ≤ 10
ar =
2 , r ≥ 11
0 , 0 ≤ r ≤ 6
0 , 0≤r≤6
br = = 1 , 7 ≤ r ≤ 17
ar –7 , r ≥7 2 , r ≥ 18
Illustration
Illustration: Let
2 , 0≤r≤8
ar =
5 , r≥ 9
For r = 0, 1, 2, 3, 4, 5 i . e. b0 = b1 = b2 = b3 = b4 = b5 = 0 i.e. br = 0, 0 ≤ r ≤ 5
For r ≥ 6, i = 6
Discrete Numeric and Generating Functions 637
b6 = a6 – 6 = a0 = 2
b = a
7 – 6 = a1 = 2
7
b
8 = a 8 – 6 = a2 = 2
− − − − − − − − − − −
− − − − − − − − − − − , br = 2, 6 ≤ r ≤ 14
− − − − − − − − − − −
b12 = a12– 6 = a6 = 2
b13 = a 13 – 6 = a7 = 2
b14 = a14 – 6 = a8 = 2
b15 = a15– 6 = a9 = 5
b = a , br = 5, r ≥ 15
16 16 – 6 = a10 = 5
and so on
0 0≤r≤5
Thus, br = 2 6 ≤ r ≤ 14
5 r ≥ 15
Now to find g = S –7 f .
b0 = a( 0 +7 ) = a7 = 2
b = a(1 +7 ) = a8 = 2
1 2 , 0 ≤ r ≤ 1
b then br =
= a( 2+7 ) = a9 = 5 5 , r≥2
2
b3 = a( 3 +7 ) = a10 = 5
13.3 The Forward Difference and the Backward Difference of a Numeric Function
[Rohtak (B.E.) 2006; U.P.T.U. (M.C.A.) 2005]
The Forward Difference of a numeric function a is a numeric function denoted by ∆ a whose value at r is
given by
∆ar = ar +1 – ar , r ≥ 0
The backward difference of numeric function a is a numeric function denoted by ∇a whose value at r is
given by
∇ar = ar – ar −1 r ≥ 1
638 Discrete Mathematical Structures
Solution:
(i) The value of the numeric function b = S 2a is calculated as follows
br = 0, 0 ≤ 1 and br = ar –1 , r ≥ 2
Therefore, b0 = b1 = 0
b2 = a2– 2 = a0 = 2
b3 = a3 – 2 = a1 = 2
b4 = a4 – 2 = a2 = 2
b5 = a5– 2 = a3 = 2
b6 = a6 – 2 = a4 = 2–4 + 5
b7 = a7 – 2 = a5 = 2–5 + 5
and so on
∴ br = ar – 2 = 2−( r – 2) + 5
0 , 0 ≤r ≤1
Thus, br = 2 , 2≤r ≤ 5
2–( r – 2) + 5 , r≥6
c3 = a3 + 2 = a5 = 2– 5 + 5
and so on
cr = cr + 2 = 2–( r + 2) + 5
2 0 ≤1
or cr = – ( r + 2)
2 r≥2
49
b3 = a4 – a3 = (2– 4 + 5)– 2 =
16
b4 = a5 – a4 = (2– 5+ 5) – (2– 4 + 5) = 2– 5 – 2– 4
b5 = a6 – a5 = (2– 6 + 5) – (2– 5+ 5) = 2– 6 – 2– 4
and so on br = ar +1 – ar = 2– ( r +1 ) – 2– r = 2– r (2–1 – 1) = 2– ( r +1 )
0 0≤r≤2
Therefore, br = 49/16 r=3
– 2– ( r +1 ) r ≥ 4
Therefore c0 = 0
c1 = a1 – a0 = 2 – 2 = 0
c2 = a2 – a1 = 2 – 2 = 0
c3 = a3 – a2 = 2 – 2 = 0
c4 = a4 – a3 = 2– 4 + 5 – 2 = 2– 4 + 3 = 49/16
and so on cr = 2– r – 2– ( r –1 ) = 2– r – 2– r +1 = 2– r (1 – 2)
0 , 0≤r≤3
Thus, cr = 49 / 16 , r=4
– 2– r , r≥5
Example 5: Let f and g be two numeric functions whose values at r i.e. ar and br are given as follows:
2 0≤r≤2
ar =
0 r≥3
2 0≤r≤2
br =
0 r≥3
Find f * g.
or cr = a0 br + a1 br –1 + a2br – 2 + . . . + ar bo
Putting r = 0, 1, 2, 3 . . . . . . we find
c0 = a0 b0 = 2. 2 = 4
c1 = a0 b1 + a1 b0 = 2. 2 + 2. 2 = 8
c2 = a0 b2 + a1 b1 + a2b0 = 2. 2 + 2. 2 + 2. 2 = 12
c3 = a0 b3 + a1 b2 + a2b1 + a3 b0 = 2. 0 + 2. 2 + 2. 2 + 0 . 2 = 8
c4 = a0 b4 + a1 b3 + a2b2 + a3 b1 + a4 b0 = 2. 0 + 2. 0 + 2. 2 + 0 . 2 + 0 . 2 = 4
c5 = a0 b5 + a1 b4 + a2b3 + a3 b2 + a4 b1 + a5b0 = 2. 0 + 2. 0 + 2. 0 + 0 . 2 + 0 . 2 + 0 . 2 = 0
Similarly, c6 = c7 = c8 . . . . . . = 0 V r ≥ 5
The way in which the value of the numeric function f or ar = {a0 , a1 , a2, . . . } varies for larger values of r is
called Asymptotic Behavior of that numeric function.
Illustrations
1. The value of numeric function ar = 6 (r ≥ 0) remains constant for increasing r
6
2. The value of ar = (r ≥ 0) decrease for increasing r.
r
Illustrations
1. br = (1 + 0. 04)5r asymptotically dominates ar = (1 + 0. 3r), r ≥ 0 for k = 9, and m = 1.
4. If both b and c are asymptotically dominated by a, then for any constants α and β, α b + β c is also
asymptotically dominated by a.
Let f and g be two numeric functions, then f is O (g ) read as “ f is big-oh g” if there exist constant m and k
such that | f (n)| ≤ m| g(n)| V n ≥ k.
If f is o (g ), then rate of growth of f is not-greater then that of g. It can be write as g ∈ o ( f ) which is read as g
is of order f.
If the function be as log e n , n, n3 , 2n, then the values of these functions for certain values of n are given
below.
Function f(n)
n log 2n n n3 2n
5 3 5 53 25
10 4 10 103 210
We observed that the function log 2n grow most slowly while function 2n grows most rapidly.
O ( f ) also denotes the set of all numeric functions that are asymptotically dominated by f If
f = r2
2
g = 10r + 25
h = 5 – r
1
i = r2 log r – r2
2
Then g is O ( f ), h is O ( f ), i is not O ( f ) and f is O (i ). Hence g is O ( f ) and h is O (i )
4. If h is O (g ) and g is O ( f ), then h is O ( f )
13.5.2 Big Omega Q(f) and Big theta θ(f) Notations [U.P.T.U. (B.Tech.) 2009]
For a numeric function f Q ( f ) denotes the set of all numeric functions g, such that there exist positive
constant k and m with | br| ≥ mar , for r ≥ k (ar is positive) where ar , br are the values of function f and g at
r. If g is in Q ( f ), then grows at least as fast as f.
1, 0 ≤r ≤ 3
Put i = 7 then (S –7 a)r =
2, r≥4
Discrete Numeric and Generating Functions 643
Determine b [U.P.T.U (B.Tech.) 2004; M.K.U. (B.E.) 2005, 2009; R.G.P.V. (B.E.) Bhopal 2002, 2003;
P.T.U. (B.E.) Punjab 2006, 2008; Uttranchal (M.C.A.) 2007]
r
Solution: We have cr = ∑ aibr – i
i= 0
or cr = a0 br + a1 br –1 + a2br − 2 + . . . + ar b0
Then, c0 = a0 b0 ⇒ 1 = 1. b0 or b0 = 1 = (–2)0
c1 = a0 b1 + a1 b0
⇒ 0 = 1. b1 + 2.1
⇒ b1 = – 2 = (–2)1
and c2 = a0 b2 + a1 b1 + a2b0
0 = 1. b2 + 2(– 2) + 0.1
⇒ b2 = 22 = (– 2)2
Example 9: For the following pairs of functions, determine their asymptotic behaviour
an = n2 log n
3
bn = n [U.P.T.U. (B.Tech.) 2003]
Solution: b asymptotically dominates a if there exists two positive constant m and k such that
| an| ≤ m b, n r≥k
2 3
| n log n| ≤ mn r≥k
644 Discrete Mathematical Structures
Solution: We have
1 1
ab = r + O r + O
r r
1 1 1 1
= r3 / 2 + r O + r O + O O
r r r r
1 1
= r3 / 2 + O ( r ) + O + O 3 / 2
r r
= r3 / 2 + O ( r ) .
1 1
= n log n + n O + log n O ( n ) + O O ( n )
n n
1
= n log n + O (1) + O ( n log n) + O
n
1
= n log n + O ( n log n) + O (1) Q O n ⊂ O (1)
= n log n + O ( n log n) [Q O (1) ⊂ O n log n)]
Discrete Numeric and Generating Functions 645
ar = α 0 + α 1r + α 2r2 + . . . + α nr,n
Example 14: Let f , g and h be three numeric functions whose rth terms are denoted by ar , br and cr respectively
and h = fg show that ∆cr = ar +1 (∆br ) + br (∆ar ) [Pune (B.E.) 2009]
f
Example 15: Let f and g be numeric functions whose values at r are denoted by ar and br . Let h = be the
g
quotient of f and g, whose value at r is denoted by cr , then prove that
br (∆ar ) – ar (∆br )
∆ cr =
br⋅ br +1 [Nagpur (B.E.) 2004, 2007]
ar +1 ar a a b − ar br +1 ar +1 br – br ⋅ ar + ar br – ar br +1
Solution: We have ∆cr = cr +1 – cr = – cr = r = r +1 r =
br +1 br br br br +1 br +1 br
Exercise
@ Numeric Functions
1. A ball is dropped to the floor from a height of 40 cm. Suppose that the ball always rebounds to reach
half of the height from which it falls.
(a) Let ar denote the height it reaches in rth rebound. Sketch the numeric function a.
(b) Let br denote the loss in height during rthrebound. Express br in terms a r . Also sketch
the numeric function b.
(c) A second ball is dropped from a height of 15m to the same floor at the same time as
the first ball reaches the highest point of its second rebound. Let cr denote the
second ball reaches to its rthrebound. Express cr in terms of a r .
646 Discrete Mathematical Structures
2. The process of assigning n children to n sets in a class room can be brocken down into (i) choosing a
child for the first set and (ii) assigning the other (n – 1) children to the remaining sets. Let an denote
the number of ways of assignments of n children to n seats.
(a) write a recurrence relation an
(b) calculate a6 from the relation.
determine b
Determine ∆ a, ∆ 2 a, ∆ 3 a, ∆ 4 a
a + ar / 2 + a 2 + . . . + a i , r = 2i
13. Given a numeric function a, let br = r r/2 r/2
0 , r ≠ 2i
15. Discuss the discrete numeric functions and their sum and product with example.
[U.P.T.U. (M.C.A.) 2002; R.P.V. (B.E.) 2008]
16. Consider the function f (n) = 2n and g(n) = 3n. Show that f is O (g ) but g is not O ( f ).
[U.P.T.U. (M.C.A.) 2001]
r
1 3
1. (a) ar = 40 , r ≥ 0 (b) br = 40 – ar , r ≥ 0 (c) cr = ar , r ≥ 0
2 2
2. an = nan–1 , n ≥ 1, a6 = 720
1 – 2r , 0≤r≤2
0 , 0≤r≤4
3. a r + br = 2r + 2 , 8≤r≤4 , a r br =
r . 2– r + 2– r +1 + 3r + 6 , r ≥5
2– r + r + 5 , r≥ 5
0 , 0 ≤ r ≤1
2 2 , 0 ≤ r ≤1
4. S a = 2 , 2≤r ≤ 5 and S –2a = – r
2– r + 5 , r ≥ 6 2 + 5 , r ≥2
5. a * b = 2r +1 – 1, r ≥ 0
6. br = (–2)r , r ≥ 0
648 Discrete Mathematical Structures
or
Let (a0 , a1 , a2, . . . ar , . . . ) be a numeric function a. Then the infinite series in terms of a parameter z,
a0 + a1 z + a2 z 2 + K + ar z r
5. ar = nC r A(z ) = (1 + z )n
1
6. ar = α r A(z ) =
1 – az
Discrete Numeric and Generating Functions 649
Theorem 1: Let a, b and c be numeric functions and let A(z ), B(z ), and C (z ) be respectively the generating
functions of a, b and c. Show that
(i) If br = αar , for some constant α, then B(z )=α A(z )
and B (z ) = b0 + b1 z + b2z 2 + K + br z r + . . .
(ii) Let cr = ar + br , r ≥ 0.
Let the generating function of c be
C (z ) = c0 + c1 z + c2z 2 + K + cr z r + K .
= A(z ) + B(z ).
(iii) Let c = a * b. Then
r
cr = ∑ ai br – i, r ≥ 0.
i= 0
2
Now A(z ) = a0 + a1 z + a2z + K + ar z r + . . . and B(z ) = b0 + b1 z + b2z 2 + K + br z r + K
Multiplying, we get
A(z ) B(z ) = (a0 + a1 z + a2z + . . . + ar z r + K ). (b0 + b1 z + b2z 2 + . . . + br z r + . . . )
r
Q cr = ∑ ai b( r –1 )
i= 0
= c0 + c1 z + c2z 2 + K + cr z r + K = C (z )
(iv) Let br = α r ar , r ≥ 0. Then the generating function of b is
B(z ) = b0 + b1 z + b2z 2 + . . . + br z r + K
= α 0 a0 + α1 a1 z + α 2a2z 2. . . + α r ar z r + K [Q br = α r ar ]
= a0 + a1 (α z ) + a2(α z )2 + K + ar (α z )r + . . . = A(α z ) .
650 Discrete Mathematical Structures
Theorem 2: Let A(z ) be the generating function of the numeric function a = ( a0 , a1 , a2, K , ar , . . . ). Then
1
A(z ) is the generating function of the numeric function b which is accumulated sum of a.
1–z
1
Proof: We have = 1 + z + z2 + . . . + zr + . . . . ...(1)
1–z
1
Hence is the generating function for the numeric function (1, 1, 1, 1, . . . ).
1–z
We know A(z ) = a0 + a1 z + a2z 2 + . . . + ar z r + . . . ...(2)
Example 18: Find the generating function for the following sequences
(i) {a, a, a, a, , K } (ii) bn = a rn, n ≥ 0
(iii) 1, 0, 0, 1, 0, 0, 1, 0, 0 (iv) ar = c (m, r) or m c , r ≥ 0
r [U.P.T.U. (B.Tech.) 2005]
a 1
= a + a rz + a r2z 2 + ar3 z 3 + . . . ∞ = sum of infinite G. P. = (1 – r)
1– rz
(iii) Here, a0 = 1, a1 = 0, a2 = 0, a3 = 1, K
Hence, the required generating function is given by
∞
1
A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . = 1 + 0 + 0 + z3 + 0 + 0 + z6 + K = 1 + z3 + z6 + . . . ∞ =
1 – z3
r =0
Example 19: Find the generating function of each of the following discrete numeric functions
(i) 2, 4, 8, 16, 32, K (ii) 0, 1, – 2, 4, – 8, K
r
(iii) 1, – 2, 3, − 4, 5, − 6 . . . (–1) (r + 1) [U.P.T.U. (M.C.A) 2001]
2 3 4 r+1
(iv) 1, , , ,K r
3 9 27 3 [U.P.T.U. (B. Tech.) 2009]
(v) 2, 3, 5, 9, 17, 33. . . [U.P.T.U. (B.Tech.) 2003]
(vi) 2, 5, 13, 35, K
= 0 + z – 2z 2 + 4z 3 – 8z 4 + . . .
z
= z(1 – 2z + 4z 2 – 8z 3 + . . . = z(1 – (2z ) + (2z )2 – (3z )3 + . . . ) = ,|–2z| <|
1 – 2z
(iii) Here, a0 = 1, a1 = –2, a2 = 3, a3 = – 4, . . .
The require generating function is given by
∞
1
A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + K = 1 – 2z + 3z 2 – 4z 3 + . . . =
(1 + z )2
r =0
652 Discrete Mathematical Structures
2 3 4
(iv) Here, a0 = 1, a1 = , a2 = , a3 = ,...
3 9 27
The required generating function is given by
∞
A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + . . . . ∞
r =0
2 3 4 3
=1 + z + z2 + z + .... ∞
3 9 27
2 3
z z 1 9
= 1 + 2( z/3) + 3 + 4 + . . . ∞ = =
3 3 (1 – z /3)2 (3 – z )2
(v) Here, a0 = 2, a1 = 3, a2 = 5, a3 = 17, a4 = 33, . . .
The required generating function is given by
A(z ) = a0 + a1 z + a2z 2 + . . .
= 2 + 3z + 5z 2 + 17 z 4 + 33z 5 + . . .
= (1 + z + z 2 + z 3 + z 4 + . . . ) + (1 + 2z + (2z )2 + (2z )3 + . . . .
1 1 2 – 3z
= (1 – z )–1 + (1 – 2z )–1 = + =
1 – z 1 – 2z 1 – 3z + 2z 2
(vi) Here, a0 = 2, a1 = 5, a2 = 13, a3 = 35, . . .
The required generating function is given by
∞
A(z ) = ∑ ar z r = a0 + a1 z + a2z 2 + ...
r =0
= 2 + 5z + 13z 2 + 35z 3 + . . .
= [1 + 2z + (2z )2 + (3z )3 + . . . ]+ [1 + 3z + (3z )2 + (3z )3 + . . . ]
1 1 2 – 5z
= (1 – 2z )–1 + (1 – 3z )–1 = + =
1 – 2z 1 – 3z 1 – 5z + 6z 2
Example 22: Find the generating function for the finite sequence
3, 3, 3, 3, 3, 3, 3 [U.P.T.U. (B.Tech.) 2003]
Solution: Here, a0 = a1 = a2 = a3 = a4 = a5 = a6 = 3
The required function is A(z ) = a0 + a1 z + a2z 2 + a3 z 3 + a4 z 4 + a5z 5 + a6 z 6
⇒ A (z ) = 3 + 3z + 3z 2 + 3z 3 + 3z 4 + 3z 5 + 3z 6
= 3 (1 + z + z 2 + z 3 + z 4 + z 5 + z 6 )
3(1 – z7 ) th a (1 – rn )
= By sum of n term of G. P. =
1–z (1 – r)
Example 23: Find the generating functions of the following numeric functions
(i) ar = 7. 3r
(ii) ar = 2r [U.P.T.U. (B.Tech.) 2002; Uttranchal (M.C.A.) 2007]
r
(iii) ar = (r + 1)3 [R.G.P.V. (B.E.) Bhopal 2005, 2008]
r r r r
(iv) ar = 5 + (–1) 3 + 8 + 3cr [R.G.P.V. (B.E.) Bhopal 2005, 2008; P.T.U. (B.E.)
Punjab 2002, 2005, 2009; M.K.U. (B.E.) Tamil Nadu 2006, 2008]
= (1 + 5z + 52 z 2 + 53 z 3 + K ) + (1 – 3z + 32 z 2 – 33 z 3 + . . . )
+ (1 + 8z + 82 z 2 + (8z )3 + . . . ) + (3c0 + 3c1 z + 3c2z 2 + . . . )
Example 25: Determine the numeric function corresponding to each of the following generating functions.
1
(i) A(z ) =
5 – 6z + z 2 [U.P.T.U. (M.C.A) 2003, 2004, 2006]
2
(1 + z )
(ii) A(z ) =
(1 – z )4 [R.G.P.V. (B.E) Bhopal 2005, 2007, 2008]
2
(iii) A(z ) =
1 − 4z 2 [U.P.T.U. (B.Tech.) 2005]
4
z
(iv) A(z ) =
1 − 2z [Uttranchal (M.C.A.) 2010]
7 z2
(v) A(z ) =
(1 – 2z )(1 + 3z ) [U.P.T.U. (M.C.A.) 2005]
n n
(vi) A(z ) = (1 + z ) + (1 – z ) , n is positive integer [U.P.T.U. (M.C.A) 2003, 2004]
1
(vii) A(z ) =
1 – z3 [R.G.P.V. (B.E.) Bhopal 2005, 2006]
5
z
(viii) A(z ) =
(5 – 6z + z 2 ) [R.G.P.V. (B.E.) Bhopal 2001, 2005, 2006]
4 . 5. 6 . . . (r + 1)(2r2 + 4r + 3) (r + 1)(2r2 + 4r + 3)
= 2. =
|r 3
z4
(iv) We have A(z ) = = z 4 (1 – 2z )–1 = z 4 (1 + (2z ) + (2z )2 + . . . ) = z 4 + 2z 5 + 22 z 6 + . . .
1 – 2z
Therefore, the required generating function is given by
0 , 0 ≤ r ≤4
ar = r – 4
2 , r ≥5
7 z2 7 z2
(v) We have, A(z ) = =
(1 – 2z )(1 + 3z ) 1 + z – 6z 2
7 z2
=
1 1
–6z 2 1 – –
6z 6z 2
7 7(z + 1)
=– +
6 6(1 + z – 6z 2 )
7 7(z + 1)
=– +
6 6(1 – 2z )(1 + 3z )
7 7 2 3
=– + +
6 6 5(1 + 3z ) 5(1 – 2z )
7 2 3
= –1 + +
6 5(1 + 3z ) 5(1 – 2z )
7 2 –1 3 –1
= –1 + (1 + 3z ) + (1 – 2z )
6 5 5
7 2 2 3 3 2 3
= –1 + (1 – 3z + (3z ) – (3z ) + . . . + {1 + (2z ) + (2z ) + (2z ) + . . . }
6 5 5
Therefore, the required generating function corresponding to A(z ) is given by
7 2 3
6 + 5 + 5 r =
–1 , 0
0 , r = 0
ar = i.e. ar = 7 3 r 2
2 + (–3)r , r ≥ 1
7 2 ⋅ (–3)r + 3 2r , r ≥ 1 6 5 5
6 5 5
Discrete Numeric and Generating Functions 657
1 5
2
1 5 z z
= z [1 + z + z 2 + . . . . . ] – z 1 + + + . . . .
4 20 5 5
1 5 1 5 z6 zr
= (z + z 6 + . . . + z r )– (z + + . . . + ( r – 5)
4 20 5 5
Therefore, the required generating function is given by
0 , if 0≤ r≤4
ar = 1 1 1
– , if r ≥5
4 20 5r – 5
0 , if 0 ≤ r ≤ 4
= 1 1
– 1 – r – 4 , if r≥5
4 r
Solution: We know
1
= 1 + z + z2 + . . . + zr
1–z
Differentiating both sides of the above identity with respect to (z), we get
1
= 1 + 2z + 3z 2 + . . . + rz r –1 + . . . .
(1 – z )2
658 Discrete Mathematical Structures
+ (02 + 12 + 22 + . . . + r2 )z r + . . . .
z(1 + z )
Thus 02 + 12 + 22 + . . . + r2 = coefficient of z r in .
(1 – z )4
1
From the Binomial theorem, we know that the coefficient of z r in is
(1 – z )4
(– 4)(– 4 – 1). . . (– 4 – r + 1) 4 . 5. 6 . . . (r + 3) (r + 1)(r + 2)(r + 3)
(– 1)r = =
r! r! 1 . 2. 3
z(1 + z )
Therefore, the coefficient of z r in is
(1 − z )4
r(r + 1)(r + 2) (r – 1) r (r + 1) r(r + 1)(2r + 1)
= + =
1 . 2. 3 1 . 2. 3 6
r(r + 1)(2r + 1)
Hence 12 + 22 + K + r2 =
6
1 6z 2 6z 2
Then =
(1 – z ) (1 – z ) (1 – z )5
4
6z 2 6z 2 6
The coefficient of z r in 5
= coefficeint of z r in = coefficeint of z r – z in
(1 – z ) (1 – z )5 (1 – z )5
6 × 5. 6 . 7. . . (r – 2 + 5 – 1) 6. 1 . 2. 3. 4. 5. . . . (r + 2) 6 | (r + 2 )
= = =
|r– 2 1 . 2. 3. 4 . . . . | (r – 2 ) |4 | r– 2
6 | r +2
Hence, 3. 2. 1 + 4. 3. 2 + . . . + (r + 1) r(r – 1) =
|4 | r– 2
n
Example 28: Use generating function to show that ∑ C (n, k )2 = C (2n, n) where k is positive integer.
k=0 [Bangalore (B.E.) 2004, 2009]
Example 29: Suppose the sequence < an > where 0 ≤ n ≤ ∞ has generating function f ( x ) .
(i) What sequence is generated by the function g( x ) = (1 + x ) f ( x )?
f (x)
(ii) What sequence is generated by the function h( x ) = ?
1+ x [U.P.T.U. (B.Tech.) 2002, 2003]
Solution: We have f ( x )= a0 + a1 x + a2 x 2 + K + ar x 2 + K
g( x ) = (1 + x ) f ( x )
= (1 + x ){a0 + a1 x + a2 x 2 + K + ar x r + . . . }
= a0 + (a1 – a0 )x + (a2 + a1 a0 )x 2 + K
Example 31: Find the generating function of the sequence y 0 , y1 , y 2. . . . y n defined as follows
y n + 2y n–1 – 15y n– 2 = 0 for n ≥ 2.
⇒ ( A( x )– y 0 – y1 x ) + 2[ xA( x )– y 0 ] – 15x 2 A( x ) = 0
A( x ){1 + 2x – 15x 2] = x
x x
A( x ) = =
1 + 2x – 15x 2 (1 – 3x )(1 + 5x )
Where c0 , c1,c2. . . cr be constant and this relation valid for r ≥ k. Multiplying z r on both sides of (1) then take
summation r = k to r = ∞ we obtain.
∞ ∞
∑ (c0 ar + c1 ar –1 + c2ar – 2 + K + ak ar – k )z r = ∑ f (r)z r
r =k r =k
But we have
∞ ∞
∑ c0 ar z r = c0 ∑ ar z r – a0 – a1 z – a2z 2. . . – ak –1 z k –1
r =k r = 0
Discrete Numeric and Generating Functions 661
∞ ∞
∑ c1 ar –1 z r = c1 z ∑ ar z r – a0 – a1 z – a2z 2K – ak – 2 z k – 2
r =k r = 0
∞ ∞
∑ cr ar – k z r = ck z k ∑ ar z r
r =k r =0
We obtain
1 ∞
∑ f (r)z + c0 (a0 + a1 z + . . . + ak –1 z )
r k –1
A(z ) = k
c0 + c1 z + . . . + ck z r = k
+ c1 z( a0 + a1 z + K + ak – 2z k – z + . . . . + ck –1 z k –1 (a0 )
Solution: We have
ar – 7 ar –1 + 10 ar – 2 = 0 ...(1)
r
Multiplying z on both sides of (1) then take summation r = 2 to ∞ we get
∞ ∞ ∞
∑ ar z r – 7 ∑ a( r −1 ) z r + 10 ∑ ar – 2z r = 0
r =2 r =2 r =2
Put a0 = 3, a1 = 3.
Discrete Numeric and Generating Functions 663
3 + 24z 3 + 24z
∴ A(z ) = 2
=
10z – 7 z + 1 (5z – 1)(2z – 1)
3 + 24z A B
= +
(5z – 1)(2z – 1) 5z – 1 2z – 1
1
Put 5z – 1 = 0 or z = ⇒ A = – 13
5
1
Put 2z – 1 = 0 or z = ⇒ B = – 10
2
13 10
⇒ A(z ) = – But A(z ) = ∑ ar z r
1 – 5z 1 – 2z
∞ ∞ ∞
⇒ ∑ ar z r = ∑ 13(5)r z r – ∑ 10(2)r z r
r =0 r =0 r =0
r
Comparing the coefficient of z on both sides, we get
ar = 13(5)r – 10 (2)r
Put a0 = 2, a1 = 1 we obtain.
z2
⇒ A(z )– 2 – z − 2z( A )z – 2z + z 2 A(z ) =
1 – 2z
z2
(z 2 – 2z + 1) A(z ) = 2 + 3z +
1 – 2z
z2
(1 – z )2 A(z ) = 2 + 3z +
1 − 2z
2 3z z2
⇒ A(z ) = 2
+ 2
+
(1 – z ) (1 – z ) (1 – 2z )(1 – z )2
By partial fraction
1 3z 1
⇒ A(z ) = + +
(1 – z )2 (1 – z )2 1 – 2z
664 Discrete Mathematical Structures
∞ ∞ ∞ ∞
⇒ ∑ ar z r = ∑ (r + 1)z r + 3 ∑ rz r + ∑ 2r z r
r =0 r =0 r =0 r =0
r
Equating the coefficient of z on both sides, we get
ar = (r + 1) + 3r + 2r
Example 35: Solve S(n)– 2S(n – 1)– 3S(n – 2) = 0, n ≥ 0 with S(0) = 3 and S(1) = 1 using generating function.
[U.P.T.U. (B.Tech.) 2005, 2008]
Solution: We have S(n)– 2S(n – 1)– 3S(n – 2) = 0 ...(1)
With generating function
∞
∑ S(n)z
n
A(z ) = ...(2)
n= 0
⇒ A(z ){1 – 2z – 3z 2} = 3 – 5z
3 − 5z
⇒ A(z ) =
1 – 2z – 3z 2
By partial fraction
3 – 5z 3 – 5z A B
= = +
1 – 2z – 3z 2 (1 – 3z )(1 + z ) 1 – 3z 1 + z
Put 1 – 3z = 0, z = 1/3 ⇒ A = 1
Put 1 + z = 0, z = – 1 ⇒ B = 2
1 2
∴ A(z ) = +
1 − 3z 1 + z
∞ ∞ ∞
⇒ ∑ S(n)z n = ∑ 3n z n + 2 ∑ (–1)n z n
n= 2 n= 0 n= 2
n
Equation the coefficient of z on both sides
⇒ S(n) = 3n + 2(–1)n
Discrete Numeric and Generating Functions 665
Example 36: Solve by the method of generating functions the recurrence relation
1
ar – 2ar –1 + ar – 2 = 2r , r ≥ 2
4
with the boundary condition a0 = 2 and a1 = 1 [U.P.T.U. (B.Tech.) 2005]
1 1
⇒ [ A(z )– a1 z – a0 ] – 2[ z A(z )– a0 ] + z 2 A(z ) = – 2z – 1
4 1 – 2z
1 1
⇒ (1 – 2z + z 2 ) A(z ) – a1 z – a0 + 2a0 z = – 2z – 1
4 1 – 2z
But a0 = 2, a1 = 1
1 1
⇒ (1 – 2z + z 2 ) A(z ) – z − 2 + 4z = – 2z – 1
4 1 – 2z
1 1
⇒ (1 – 2z + z 2 ) A(z ) = − 14z + 7
4 1 – 2z
7 z2 – 7 z + 2
⇒ A(z ) =
(1 – 2z )(1 – z )2
7 z2 – 7 z + 2 A B Cz
Let 2
= + +
(1 – 2z )(1 – z ) 1 – 2z 1 – z (1 – z )2
1 1
= – 2z – 1 + z – 1
1 – 2z (1 – z )2
4z 2 1
(1 – 5z + 6z 2 )A(z ) – a1 z – a0 + 5a0 z = +z 2
– 1
1 – 2z (1 – z )
4z 2 1
⇒ (1 – 5z + 6z 2 )A(z )– 1 + 4z = +z 2
– 1
1 – 2z (1 – z )
1 − 8z + 27 z 2 – 35z 3 + 14z 4
⇒ A(z ) =
(1 – z )2(1 – 2z )2(1 – 3z )
5 1 3 2 17
⇒ A(z ) = + – − +
4(1 – z ) 2(1 – z )2 1 – 2z (1 – 2z )2 4(1 – 3z )
[By partial fraction]
⇒ By using generating function we get
∞ ∞ ∞ ∞ ∞ ∞
5 1 17
∑ ar z r = 4 r∑
z r + ∑ (r + 1)z r – 3 ∑ 2r z r – 2 ∑ (r + 1)2r z r +
2 4 ∑ 3r z r
r =0 =0 r =0 r =0 r =0 r =0
r
Equating the coefficient of z on both sides, we get
5 1 17 r
ar = + (r + 1)– 3 2r – 2(r + 1)2r + 3 , r≥0
4 2 4
Example 38: Using generating function, solve the recurrence relation ar = 3ar –1 + 2, r ≥ 1, with a0 = 1
[U.P.T.U. (B.Tech.) 2002]
Solution: The given recurrence relation ar = 3ar –1 + 2 ...(1)
∞
The generating function of the given sequence is A(z ) = ∑ ar z r ...(2)
r =0
Discrete Numeric and Generating Functions 667
Exercise
@ Generating Functions
1. Find the generating functions of the following:
(i) 2, 4, 8, 16, 32 ... (ii) a0 , 3a1 , 9a2, 27 a3 , K
(iii) 2, – 2, 2, – 2K. (iv) 3, – 3, 3, – 3, 3, – 3. . .
(v) 3, 9, 27, 81, . . . . (vi) 1, – 2, 3, – 4, K [U.P.T.U. (M.C.A.) 2001]
(vii) 1, 0, 1, 0, K
1
(vii) ar = ,r ≥ 0 (viii) ar = r(r – 1) [R.G.P.V (B.E.) Bhopal 2006, 2009]
| +1
r
3. Find the sequence {ar } having the generating function A(z ) given by:
z z z
(i) (ii) 2
+
1 – 2. z (1 – z ) 1–z
1 z5
(iii) (iv)
1 – 5z 1 – 3z [R.G.P.V. (B.E.) Bhopal 2007]
2
1+ z
(v)
4 − 4z – z 2 [R.G.P.V (B.E.) Bhopal 2006, 2009]
4. Applying the generating function technique to solve the following recurrence relations:
(i) ar + 2 + 2ar +1 + ar = 1 + r [U.P.T.U.(M.C.A.) 2002]
(ii) ar + 2– 2ar +1 + ar = 2r
(iii) ar = 4 (ar –1 – ar – 2 ) + 2 [U.P.T.U. (M.C.A.) 2003]
r
(iv) ar = 6ar –1 – 12ar – 2 + 8 ar – 3 + 3
2
1. (i) A(z ) = ,| 2 z| <| (ii) A(3x )
1 − 2z
2
(iii) A(z ) = ,| − z| <| (iv) A(z ) = 3/(1 − z )
1–z
3 1
(v) A(z ) = (vi) A(z ) =
1 − 3z (1 − z )2
1
(vii) A(z ) = ,| z 2| <|
1 − z2
3 z 3
2. (i) A(z ) = (ii) A(z ) = +
1−z (1 − z )2 1−z
3– z 1
(iii) A(z ) = 2 (iv) A(z ) =
(1 − z ) 1 − 3z
1 3z 5z(1 + z )
(v) A(z ) = (vi) A(z ) = +
(1 + z )5 (1 − z )2 (1 – z )3
0 , 0 ≤r ≤ 4
(iii) ar = 5r (iv) ar = r – 5
3 , r≥5
2r − 1
4. (i) ar = (c0 + c1 r)(–1)r + (ii) ar = a0 + c1 r + 2r
6
r2
(iii) ar = c0 + c1 r + 2r (iv) ar = (c0 + c1 r + c2r2 ) 2r + 27. 3r
2
1
5. (i) ar = 1 – (ii) ar = A ⋅ 2r – 2(r + 1)
2r
(iii) ar = 1 − 2 r + 2r (iv) ar = 2–( r +1 )(r2+ 3r)
(v) ar = – 2r + 5r (vi) ar = 1 – 2r + 3r
∞
1 (–1)k (4)k −1 1 1 1 1
∑
r
(vii) ar = + + – (–4) –
5 k = 0 |r − k |k 5 5 | 4r
6. 1 + z + z 2 + z 3 + 5z 4 + 5z 5 + 5z 6 + 5z7
670 Discrete Mathematical Structures
4. Numeric function ar is said to asymptotically dominate another numeric function br , if for two
positive constants m and k.
(a) | br2| ≥ m| ar| (b) | br| ≤ m| ar| (c) | br3| ≥ m| ar| (d) none of these
1
If f = r + O , g = r + O then f g:
1
5.
r r
(a) r3 / 2 + O ( r ) (b) r3 / 2 + O (r) (c) r1 / 2 + O ( 2) (d) none of these
4. 1
.......... is the generating function of sequence S(n) = .
n!
5. .......... is the generating function of the sequence Sn = 3n, n ≥ 0 .
672 Discrete Mathematical Structures
Answer
Multiple Choice Questions
1. (a) 2. (a) 3. (b) 4. (b) 5. (a) 6. (c) 7. (c)
8. (d) 9. (b) 10. (a)
❑❑❑
14.1 Counting Techniques
14.1.1 Permutation
The different arrangement which can be made out of a given number of things by taking some or all at a
time, are called Permutations.
For example, consider arranging the digits 1, 2 and 3. The possible arrangements as follows:
123, 132, 231, 213, 312, 321.
These are 6 permutations. Here the same three digits 1, 2 and 3 have been used but the number changes
when the order of digits is changed.
Thus, forming numbers with given digits means arranging the digits and hence it is the problem of
permutation.
? Notations
Let r and n be positive integers such that 1 ≤ r ≤ n.
n
Then, the number of all permutations of n things taking r at a time is denoted by P (n, r) or Pr
Theorem 1: Let 1 ≤ r ≤ n. Then the number of all permutations of n dissimilar things taken r at a time is given by
n n
Pr = n (n − 1)(n − 2). . . . (n − r + 1) = .
n − r
Theorem 2: The number of all per muta tions of n differ ent things taken all at a time is given by n Pn = n.
n n n n n n
Proof: We have, Pr = Put r = n, we find Pn = = = = n.
n − r n − n 0 1
12 12 12 12 × 11 × 10 × 9 × 8
Solution: (i) P4 = = = = 11, 880
12 − 4 8 8
6 6 6 6 × 5 × 4 × 3 × 2 6
(ii) P4 = = = = 360 or P4 = 6 × 5 × 4 × 3 = 360
6 − 4 2 2
8
(iii) P8 = 8 = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40, 320
20
Example 2: If Pr = 6, 840, find r.
20
Solution: We have, Pr = 6, 840
20
⇒ = 6, 840
−r
20
20 20 × 19 × 18 × 17
⇒ =
20 − r 17
20 20
⇒ = ⇒ 20 − r = 17 or r = 3
20 − r 17
n
Example 3: If P4 = 20 × nP2, find n.
( n + 5) 11 (n − 1) ( n + 3 )
Example 4: Pn + 1 = × Pn, find n.
2
Solution: We have,
n+ 5 11 (n − 1) ( n + 3 )
Pn + 1 = × Pn
2
⇒ n + 5 =
11 (n − 1) n + 3
(n + 5) − (n + 1) 2 n + 3 − n
(n + 5)(n + 4) n + 3 11 (n − 1) n + 3
⇒ = ×
4 × 3 2 3
⇒ (n + 5)(n + 4) = 22 (n − 1)
⇒ n2 + 9n + 20 = 22n − 22
⇒ n2 − 13n + 42 = 0 or (n − 6)(n − 7 ) = 0 or n = 6, 7.
Combinatories 675
Solution: n
P4 = 2 × 5P3
⇒ n (n − 1)(n − 2)(n − 3) = 2 × 5 × 4 × 3
⇒ n (n − 1)(n − 2)(n − 3) = 120
⇒ (n2 − 3n)(n2 − 3n + 2) = 120
⇒ m (m + 2) = 120 where m = n2 − 3n
⇒ m2 + 2m − 120 = 0
⇒ (m + 12)(m − 10) = 0
⇒ m = − 12, or m = 10
2 2
⇒ n − 3n = − 12 or n − 3n = 10
⇒ n2 − 3n + 12 = 0 or n2 − 3n − 10 = 0
3± 9 − 48
⇒ n= or (n − 5)(n + 2) = 0
2
3 ± i 39
⇒ n= or n = 5 or n = − 2
2
⇒ n=5 [neglecting negative and imaginary value]
9
Example 6: Find n if P5 + 5 ⋅ 9 P4 = 10 Pn.
9
Solution: We have, P5 + 5 ⋅ 9 P4 = 10 Pn
⇒ 9 + 5 ⋅ 9 = 10
−5
9 9 − 4 10 − n
⇒ 9 + 5 ⋅ 9 = 10
4 5 10 − n
⇒ 9 + 9 = 10
4 4 10 − n
9 10 × 9
⇒ 2× =
4 (10 − n)
⇒ 5 × 4 = 10 − n
⇒ 10 − n = 5 ⇒ 10 − n = 5 ⇒ n = 5.
n − 1 + r ⋅ n − 1 1 r
Solution: R.H.S. = ( n − 1 )Pr + r ⋅ ( n − 1 )Pr − 1 = = n − 1 +
n − 1 − r (n − 1) − (r − 1) n − r − 1 n − r
1 r n−r+ r
= n − 1 + = n − 1
n − r − 1 (n − r) n − r − 1 (n − r) n − r − 1
n n − 1 n
= = = nPr = L. H. S.
(n − r) n − r − 1 n − r
n n n n n − 1
Solution: (i) n
Pn − 1 = = = n = nPn (ii) n
Pr = = = n ⋅ ( n − 1 )Pr − 1
n − (n − 1 ) 1 n − r (n − 1 ) − (r − 1 )
Exercise
1. Prove that 9 P3 + 3 ⋅ 9 P2 = 10 P3 .
( n −1)
4. (i) If n P4 : nP5 = 1 : 2, find n. (ii) If P3 : ( n + 1 )P3 = 5 : 12, find n.
2n + 1
(iii) If Pn − 1 : ( 2n − 1 )Pn = 3 : 5, find n.
11
5. If Pr = 12Pr − 1 , find r.
6. (i) If 2n
P3 = 100 × nP2, find n. (ii) If 16 nP3 = 13 n + 1 P3 , find n. (iii) If n P5 = 20 × nP3 , find n.
Theorem 4: The number of permutations of n dif fer ent ob jects taken r at a time when each object may be
re placed any number of times in each arrangement is nr .
Proof: The number of permutations of n objects taken r at a time is the same as the number of ways of
filling r places with n different objects.
1st 2nd 3rd rth Place
No. of ways
n n n n
Example 10: Find the number of different messages that can be represented by sequences of four dashes and
three dots.
7
Solution: The number of different message sent by 4 deshes and 3 dots = = 35
4 3
Example 11: Find the number of ways to point 12 offices so that 3 of them are green, 2 of them pink, 2 of
them yellow and the remaining one white.
12
Solution: The required number of ways = = 1, 66, 320
2 5
3 2
Example 12: The letters of the word “TUESDAY” are arranged in a line each arrangement ending with letter
S. How many different arrangements are possible? How many of them start with letter D?
Solution: There are seven different letter in the word “TUESDAY”
678 Discrete Mathematical Structures
when last place is filled with letter S then remaining 6 places can be filled by 6 letters in
6
P6 = 6 ! ways = 720 ways
Now, when the letter ‘D’ is also fixed, then remaining 5 places can be filled by 5 letters in
5
P5 = 5! ways = 120 ways.
Example 13: How many signals can be made by using 6 flags of different colours when any number of them
may be hoisted at a time?
Solution: Number of signals that can be made using 1 flag = 6 P1 = 6
6!
Number of signals that can be made using 2 flags = 6 P2 = = 6 × 5 = 30
(6 − 2)!
6!
Number of signals that can be made using 3 flags = 6 P3 = = 6 × 5 × 4 = 120
(6 − 3)!
6!
Number of signals that can be made using 4 flags = 6 P4 = = 6 × 5 × 4 × 3 = 360
(6 − 4)!
6!
Number of signals that can be made using 5 flags = 6 P5 = = 6 × 5 × 4 × 3 × 2 = 720
(6 − 5)!
Therefore the total signals that can be made = 6 + 30 + 120 + 360 + 720 + 720 = 1, 956
Example 14: Find the number of 4 digit numbers that can be formed using the digits 1, 2, 3, 4 and 5 if no
digit is used more than once in a number. How many of these number will be even?
Solution: (i)
5! 5!
4 places can be filled by 5-digits in 5 P4 ways = ways = ways = 120 ways
(5 − 4)! 1!
(ii) 2 or 4
2 ways
For even numbers, unit’s place can be filled in 2 ways (either digit 2 or digit 4)
If units place is filled by any one digit, then remaining 3 places can be filled by remaining 4 digit in
Combinatories 679
4 4!
P3 = = 4 ! = 24 ways
(4 − 3)!
Example 15: How many 4 letter words, with or without meaning, can be formed out of the letters of the
word ‘LOGARITHMS’ if repetition of letters is not allowed?
Solution: The word ‘LOGARITHMS’ contains different letters
∴ the number of required words = number of arrangements of 10 letters, taken 4 at a time
= 10 P4 = 10 × 9 × 8 × 7 = 5, 040
Example 16: It is required to seat 5 men and 4 women in a row so that the women occupy the even places.
How many such arrangement are possible?
Solution: In a row of 9 positions, the 2nd, 4th, 6th and 8th are the even places.
These 4 places can be occupied by 4 women in 4 P4 = 4 = 24 ways
The remaining positions can be occupied by 5 men in 5 P5 = 5 = 120 ways
∴ the total number of seating arrangements = 24 × 120 = 2, 880.
Example 17: How many words, with or without meaning, can be founded by using all letters of the word
‘DELHI’, using each letter exactly once?
Solution: The word ‘DELHI’ contains 5 different letters.
∴ the number of required words = number of arrangements of 5 letters taken all at a time
= 5P5 = 5 = 5 × 4 × 3 × 2 = 120.
Example 18: In an examination hall, there are four rows of chairs. Each row has 8 chairs, one behind the
other. There are two classes appearing for the examination with 16 students in each class. It is desired that in
each row all students belong to the same class and that no two adjacent rows are allotted to the same class. In
how many way can these 32 students be seated?
Solution: There are 2 ways of selecting the rows for a class i . e. , either I and III or II and IV.
16
Now, 16 students of one class can be arranged in 16 chairs in P16 = 16 ways
and 16 students of another class can be arranged in 16 remaining chairs in 16 P16 = 16 ways
Example 19: How many odd numbers greater than 80,000 can be formed using the digits 2, 3, 4, 5 and 8. If
each digit is used only once in a number?
Solution:
8 3 or 5
1 way 2 way
Since, it is an odd number greater than 80,000, therefore unit’s place can be filled by 2 ways (either by
digit 3 or by digit 5) and ten thousand’s can be filled by only 1 digit i . e. , 8.
Also other 3 places can be filled by remaining 3 digits in 3 P3 = 3! ways
Total number of ways = 2 × 1 × 3! = 12 (By F.P.C.).
680 Discrete Mathematical Structures
Example 20: How many four-digit numbers (between 1,000 and 10,000) are there with distinct 2 of these,
how many are odd numbers ?
Solution: (i) Total number of arrangements of ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 taking 4 at a time is
10
P4 . But these arrangements, also include those numbers which has 0 at thousand’s place. Such numbers
are not the four digit numbers. So, we have to exclude those three digit numbers when 0 is in thousand’s
place, we have to arrange remaining 9 digits by taking 3 digits at a time. The number of such arrangements
is 9 P3 .
Hence, the total number of four digit numbers = 10 P4 − 9 P3 = 5, 040 − 504 = 4, 536.
(ii) Now, since we want the odd number, therefore unit’s place can be filled in 5 (1 or 3 or 5 or 7 or 9)
ways.
1 or 3 1 or 3
or 5 or or 5 or
7 or 9 0 7 or 9
9 8
P3 ways 5 ways 1 ways P2 ways 5 ways
The required number of odd numbers = number of all 4 digited number (including 0) having an odd digit in
thousand’s place − number of these 4 digited odd numbers which have 0 in thousand’s place
= 5 × 9 P3 − 1 × 8 P2 × 5 = 5 × 9 × 8 × 7 − 8 × 7 × 5 = 2, 240 .
Example 21: Find the number of permutations of n different things taken r at a time each of which includes 3
particular things ?
Solution: Given r places, 3 places by particular things can be filled in r P3 ways.
n− 3
Now, we have to fill up the remaining (r − 3) places with the remaining (n − 3) things in Pr − 3 ways.
n− 3
Total number of permutations = r P3 × Pr − 3 .
Example 22: Find the number of permutations of n different things taken r at a time from which three
particular things are to be excluded.
Solution: We exclude the 3 particular things from the total number of things and form permutations of
the remaining (n − 3) things taken r at a time.
n− 3
Therefore, the required number of permutations = Pr .
Example 23: How many permutation can be made out of the letters of the word ‘TRIANGLE’. How many of
these will begin with T and end with E ?
Solution: The word TRIANGLE contains 8 different letters.
The number of all permutation made out of 8 letters = 8 P8 = 8 = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40, 320.
If the word starts with the letter T and ends with letter E then, the number of ways to form the words = 8 P6
8 8
= = = 20 ,160
|8 − 6 2
Combinatories 681
Example 24: In how many ways can 10 books be arranged on a shelf so that a particular pair of books shell
be (i) always together (ii) never together ?
Solution: Since a particular pair of books is always together, let us tie these two books together and
consider the pair as one book. Then, we shall have to arrange 9 books on the shelf.
9
This can be done P9 = 9 ways
Now, in each of these arrangements, the two books comparising the particular pair can be arranged among
themselves in 2 i . e. , 2 ways.
∴ the required number of ways = 2 × ( 9)
10
(ii) We know that 10 books can be arranged on the shelf in P10 = 10 ways
Also, the number of ways of arranging 10 books so that a particular pair is always together = 2 × ( 9)
∴ the number of ways of arranging 10 books so that a particular pair is never together
= ( 10 − 2 9) = (10 × 9 − 2 × 9) = (8 × 9)
Example 25: There are 6 English, 4 Sanskrit and 5 Hindi books. In how many ways can they be arranged on
a shelf so as to keep all the books of the same language together?
Solution: Let us make one packet for each of the books on the same language.
Now, 3 packets can be arranged in 3 P3 = 3 = 6 ways
Example 26: In how many ways 9 pic tures can be hung of 6 picture nails on a wall (in a row) ?
Solution: Here, it is ob vious that only 6 pic tures out of 9 will be hung and 3 will be left out. The number
of ways in which pic tures can be hung on 6 picture nails on a wall is the same as the number of
arrangements of 9 things, taking 6 at a time.
Hence, the required number = 9 P6 = 9 × 8 × 7 × 6 × 5 × 4 = 60, 480.
Example 27: A tea party is ar ranged for 16 people along the two sides of a long table with 8 chairs on each
side. Four men wish to sit on one par tic ular side and two on the other side. In how many ways can they be
seated ?
Solution: The or der of seat ing arrangement is as below,
M1M2M3M4
S1 S2 S3 S4 S5 S6 S7 S8
(ii) 2 persons (M1 and M 2 ) wist to sit at other side on any of the 8 chairs. This can be in 8 P2 ways.
(iii) Rest 10 persons can sit on any of the remaining 10 chairs in 10 chairs in 10 P10 ways.
Example 28: In how many ways can 6 balls of different colours, namely, white, black, blue, red, green and
yellow be arranged in a row in such a ways that the white and black balls are never together ?
Solution: Let x be the number of all arrangements, each one of which contains white and black balls
together. And, let y be the number of arrangements, none of which contains white and black balls together.
Then, x + y = 6 P6 = 6 = 720.
Now, considering a white and a black ball tied together as one ball.
The number of ways of arranging the 5 balls = 5P5 = 5 = 120 .
Example 29: In how many ways can the word ‘PENCIL’ be arranged so that N is always next to E ?
Solution: Keeping E and N together and considering then as one letter, we have to arrange 5 letters at 5
places. This can be done in 5 P5 = 5 = 120 ways.
Example 30: The principal wants to arrange 5 students on the platform such that the boy Salim occupies the
second position and such that the girl Sita is always adjacent to the girl Rita. How many such arrangements
are possible?
Solution: Let the seats be arranged as shown O S O O O
I II III IV V
Keep Salim fixed at the second position. Since, Sita and Rita are to sit together, none of the two can occupy
the first seat. This seat can be occupied by any of the remaining two students in 2 ways. Now, two seats,
namely, III , IV, V, may be occupied by Sita and Rita in 4 ways. The remaining seat may now be occupied by
the 5th student in one way only.
∴ the number of required arrangement = 2 × 4 × 1 = 8.
Example 31: Find the number of ways in which 5 boys and 3 girls can be seated in a row so that two girls are
together.
5
Solution: The 5 boys may occupy 5 places in P5 = 5 = 120 ways.
Since no. two girls are to sit together, we may arrange the 3 girls at the 6 places. i . e. , X B X B X B X B X B
6
Now, the 3 girls at 6 places may be seated in P3 = 6 × 5 × 4 = 120 ways.
∴ The required number of ways = 120 × 120 = 14, 400.
Combinatories 683
Example 32: How many permutations of the letters of the word ‘APPLE’ are there ?
Solution: Here there are 5 objects, two of which are of same kind and the others are each of its own kind.
5
∴ The required number of permutations = = 60.
2 × 1 × 1 × 1
Example 33: (i) Find how many arrangements can be made with the letters of the word ‘MATHEMATICS’.
(ii) In how many of them are the vowels together?
Solution: (i) There are 11 letters in the word ‘MATHEMATICS’
Out of these letters M occurs twice. A occurs twice, T occurs twice and the rest are all different.
11
∴ Required number of arrangement = = 49, 89, 600.
2 × 2 × 2
(ii) The given word consists of 4 vowels namely A, E, A and I. Treating these four vowels as one letter, we
have to arrange 8 letters (MTHMTCS) + (AEAI);
out of which M occurs twice, T occurs twice and the rest are all different.
8
∴ The number of such arrangements = = 10, 080
( 2) × ( 2)
Corresponding to each such arrangement, the four vowels in which A occurs twice and the rest are
4
all different, can be arranged amongest themselves in = 12 ways.
2
∴ Total number of arrangements in which vowels are always together = 10080 × 12 = 1, 20, 960
Example 34: In the different permutations of the word ‘EXAMINATION’ are listed as in a dictionary, how
many items are there in the list before the first word starting with E ?
Solution: Starting with E, we have to find the number of arrangements of the remaining 10 letters,
EXAMINATION, out of which there are 2I’s, 2N’s, 2 A's and the rest of the letters are distinct.
10
The number of such arrangements is = = 4, 53, 600
2 × ( 2) × ( 2)
Clearly, we will have to start the next word with E, so the required numbers of items = 4, 53, 600.
Example 35: How many numbers greater than a million can be formed with digits 2, 3, 0, 3, 4, 2, 3 ?
Solution: Any number greater than one million will contain all the seven digits.
Now, we have to arrange seven digits, out of which 2 occurs twice, 3 occurs thrice and the rest are distinct.
7
The number of such arrangements = = 420
( 2) × 3
These arrangements will also include those which contain 0 at the million’s place. Keeping 0 fixed at the
million’s place, the remaining 6 digits out of which 2 occurs twice, 3 occurs thrice and the rest are distinct
6
can be arrange in = = 60 ways.
( 2) × 3
∴ The number of required numbers = 420 − 60 = 360.
684 Discrete Mathematical Structures
Example 36: In a shipment, there are 40 floppy disks of which 5 are defective, determine:
(i) In how many ways can we select five floppy disks?
(ii) In how many ways can we select five non-defective floppy disks?
(iii) In how many ways can we select five floppy disks containing exactly three defective floppy disks?
(iv) In now many ways can we select five disks containing at least 1 defective floppy disk?
[U.P.T.U. (B.Tech.) 2004]
Solution: (i) The required number of ways
| 40 40 × 39 × 38 × 37 × 36 ×| 35
= 40 C 5 = = = 39 × 38 × 37 × 12 = 6580088
5
| | 35 5 × 4 × 3 × 2 ×| 35
Solution: The balls can be arranged on the eight corners of the cube in the number of ways.
|8 8 × 7 × 6 × 5 ×| 4
= 8C4 = = = 70 ways
4
| | 4 |4 × 4 × 3 × 2
Now, two arrangements are same iff the two corners between the two arrangements become common.
Example 38: (a) How many selections any number at a time may be made from three white balls, four green
balls, one red ball one black ball, if at least one must be chosen.
(b) There are twelve students in the class. Find the number of ways that the twelve students take three
different tests if four students are to take each test. [U.P.T.U. (B.Tech.) 2008]
|12
(b) The required number of ways = = 369600
|3 |3 |3 |3
Combinatories 685
A D C B
D B C A B D A C
B A D
C
If we consider the position of an object retative to others then we find that the above four arrangements are
the same.
Proof : Fixing the position of an object can be done in n ways, as the position of anyone of them may be
fixed. Thus, each circular permutation corresponding to n linear permutations depending upon where
from we start.
n
Since, there are n linear permutations, it follows that there are i . e. , (n − 1) circular permutations.
n
Theorem 6: The number of ways in which n persons can be seated round a table is n − 1.
Proof: Let us fix the position of one person and then arrange the remaining (n − 1) persons in all possible
ways. Clearly, this can be done in (n − 1) ways. Hence, the required number of ways = n − 1.
Theorem 7: Show that the number of ways in which n different beads can be arranged to form a necklace is
1
(n − 1) .
2
Proof : Fixed the position of one bead, the remaining (n − 1) beads can be arranged in n − 1 ways.
In case of arranging the beads, there is no distinction between the clockwise and anticlockwise
1
arrangements. So, the required number of ways = (n − 1) .
2
Example 39: A gentleman has 6 friends to invites. In how many ways can he send invitation cards to them, if
he has 3 servants to carry the cards ?
Solution: Two friends can be invited by the same servant. Hence, in this problem, the servant is
repeatable (R ) and the friend is non-repeatable (NR ).
Number of ways = [ R ]NR = 36 = 729 .
686 Discrete Mathematical Structures
Example 40: A telegraph has 5 arms and each arm is capable of 4 distinct positions, including the position
of rest. Find the total signals that can be made ?
Solution: Two arms may have the same position, but same arms cannot have two positions at a time.
Hence, position is repeatable (R), but arm is non-repeatable (NR )
Number of ways = [ R ]NR = 45 = 1, 024
But, in one case, when all the 5 arms will be in rest position, no signal will be made.
Hence, the required number of signals = 1, 024 − 1 = 1, 023.
Example 41: Find the number of way in which 3 friends can stay in 2 hotels ?
Solution: Two friends can stay in the same hotel but same friend cannot stay in two hotel at a time.
Hence, hotel is repeatable (R ) and friend is non-repeatable (NR ).
Number of ways = [ R ]NR = [ 2]3 = 8.
Example 42: Find the number of ways in which Dr. Bansal can give 2 hotels to his 3 sons?
Solution: A son can get 2 hotels but a hotel cannot be given again and again.
Hence, son is repeatable (R ) but hotel is non-repeatable (NR ).
Number of ways = [ R ]NR = (3)2 = 9.
Example 43: Find the number of ways in which 6 pictures can be hung on 9 picture nails (in a row)?
Solution: A picture can not hung on two picture nails at a time, but two pictures can hung on one picture
nail. Hence, picture nail is repeatable (R ) but picture is non-repeatable (NR ).
Number of ways = [ R ]NR = (9)6 .
Example 45: In how many ways can a party of 4 men and 4 women be seated at a circular table so that no
two women are adjacent ?
Solution: The 4 men can be seated at the circular table such that there is a vacant seat between every pair
of men.
The number of ways in which these 4 men can be seated at the circular table = 3 = 6.
Example 46: In how many ways can 7 persons sit around a table so that all shall not have the same
neighbours in any arrangements.
Solution: 7 persons set at a round table in 6 ways.
But, in clockwise and anticlockwise arrangements, each person will have the same neighbours.
1
So, the required number of ways = × 6 = 360.
2
Combinatories 687
Exercise
1. In how many ways can 5 person occupy 3 vacant seats?
3. In how many ways can 4 different books, one each in Chemistry, Physics, Biology and Mathematics
be arranged in a shelf?
4. Seven students are contesting the election for the presidentship of the students union. In how many
ways can their names be listed on the ballot papers?
5. Find the number of different 4 letter words that can be formed from the letters of the word
‘NUMBERS’.
6. Ten students are participating in a race. In how many ways can the first three prizes be won?
7. In how many ways can 6 boys and 5 girls be arranged for a group photograph if the girls are to sit on
chairs in a row and the boys are stand in a row behind them?
8. How many words can be formed from the lettes of the word ‘SUNDAY’? How many of these begin
with D?
10. Find the number of permutations of the letters of the word ‘ENGLISH’. How many of these begin with
E and end with I?
11. In how many arrangements of word ‘GOLDEN’ will the vowels never occur together ?
12. In how many ways can 6 books on Economics, 5 on History and 3 on Hindi be arranged on a shelf so
that the books on each subject are always together?
13. A child has plastic toys bearing the digits 2, 2 and 5. How many three digit numbers can it make,
using them?
14. There are three blue balls, four red balls and five green balls. In how many ways can they be
arranged in a row?
15. How many arrangement can be made out of the letters of the word.
(a) INDIA (b) ENGINEERING (c) EXAMINATION
16. How many numbers can be formed with the help of the digits 5, 4, 3, 5, 3 ?
18. There are 5 men and 5 ladies to dine at a round table. In how many ways can they seat themselves so
that no two ladies are together?
688 Discrete Mathematical Structures
Answer
1. 60 2. 120 3. 24 4. 5,040
14.2 Combinations
Combinations: Each of the different groups or selections which can be formed by taking some or all of a
number of objects, irrespective of their arrangements, is called a combination. The total number of
n
combinations of n distinct objects taking r (1 ≤ r ≤ n) at a time is denoted by C (n, r) or nC r or .
r
where, nC r is defined only when n and r integers such that n ≥ r and n > 0, r ≥ 0.
Illustration: The combinations of 4 objects a, b, c, d taking 2 at a time are ab, ac, ad, bc, bd, cd
Now, each combination contains r objects, which may be arranged amongst themselves is r ways.
Thus, each combination gives rise to r permutations.
∴ x combinations will give rise to x × r permutations.
n
Pr n n
n n
∴ Cr = = Q Pr =
r n − r
r n − r
n n ( n − 1) ( n − 2) .... n factors
Note: We can write Cr = .
r
Combinatories 689
n
Theorem 9: Let 0 ≤ r ≤ n. Prove that C r = nC n − r .
n n n
Proof: We have Cn − r = = = nC r .
n−r
n − r n − (n − r) r
Proof: We have,
n n n n n n ⋅ (n − r + 1) n ⋅ r
C r + nC r −1 = + = + = +
r n − r r − 1 n − (r − 1) r n − r r − 1 n − r + 1 r ⋅ (n − r + 1) r n − r + 1
n (n + 1) n n + 1 n +1
= ⋅ {n − r + 1 + r} = = = Cr
r n − r + 1
r n − r + 1 n + 1 − r
r
Proof: We have n × ( n − 1 )C r − 1 = n × n − 1 =
n × n − 1
r − 1 × (n − 1) − (r − 1) r − 1 n − r
n (n − r + 1) n
= = (n − r + 1) × = (n − r + 1) × nC r − 1
r − 1 × n − r × (n − r + 1 ) r − 1 × n − r + 1
n
Cr n−r+1
Theorem 12: If n and r are positive integers such that 1 ≤ r ≤ n then n
= .
C r −1 r
n +1
Theorem 13: If 1 ≤ r ≤ n, prove that nC r + nC r + 1 = C r +1.
n n n
Proof: C r + nC r +1 = +
r n − r (r + 1 ) n − r − 1
n n
= +
r × (n − r ) n − r − 1 (r + 1 ) r × n − r − 1
n 1 1
= +
r n − r − 1 n − r r + 1
n (n + 1) (n + 1) n
= × =
r n − r − 1 (n − r)(r + 1) (r + 1) r × (n − r) × n − r − 1
= n + 1 = n + 1 = n +1
C r +1
r + 1 n − r r + 1 (n + 1) − (r + 1)
690 Discrete Mathematical Structures
Proof: We have, nC p = nC q = nC n − q
⇒ p=q or p=n−q or p + q = n.
Evaluate
Example 47: If n Pr = 720 and nC r = 120, find r.
n
n Pr
Solution: We know that Cr =
r
720 720
∴ 120 = ⇒ r = = 3
r 120
Hence, r = 3.
2n 2n × [1 ⋅ 3⋅ 5 . . . . (2n − 1)]
Example 48: Prove that Cn = .
n
2n 2n 2n
Solution: Cn = = 2
n 2n − n ( n)
(2n)(2n − 1)(2n − 2). . . . . . 4 ⋅ 3⋅ 2⋅ 1
=
( n)2
[ 2n (2n − 2)(2n − 4). . . . 4 ⋅ 2] × [(2n − 1)(2n − 3). . . . 5⋅ 3⋅ 1]
=
( n)2
⇒ 3n − 7 r = − 3 and 4n − 9r = 5
⇒ r = 27, n = 62
Combinatories 691
Exercise
1. Verify that 8 C 4 + 8C 3 = 9C 4 .
3. If n
C r : 15C r − 1 = 11 : 5 find r.
4. If 18 C r = 18C r + 2, find r C 5.
25 24
5. Find C 22 − C 21 .
Answer
2. (i) 12 (ii) 2925 (iii) 7 (iv) n = 8, r = 4 (v) n = 10, r = 5 3. 8 4. 56
5. 276
Example 51: A committee of 5 is to be formed out of 6 men and 4 la dies. In how many ways can this be done,
when (a) atleast 2 ladies are included (b) atmost 2 ladies are included.
Solution: (a) We have to make selection of
(i) (2 ladies out of 4) and (3 men out of 6) or (ii) (3 ladies out of 4) and (2 men out of 6) or
(iii) (4 ladies out of 4) and (1 man out of 6)
The number of ways of these selections are
Example 52: An examination paper containing 12 questions consists of two parts, A and B, part A contains
7 questions and part B contains 5 questions. A candidate is required to attempt 8 questions, selecting atleast 3
from each part. In how many ways the candidate select the questions ?
Solution: We have,
(i) (3 out of 7 from A) and (5 out of 5 from B) or (ii) (4 out of 7 from A) and (4 out of 5 from B) or
(iii) (5 out of 7 from A) and (3 out of 5 from B)
The number of ways of these selections are
Example 53: If 20 lines are drawn in a plane such that no two of them are parallel and no three are
concurrent, then in how many points will they intersect each other ?
Solution: Since, no two lines are parallel and no three pass through the same point, their point of
20 × 19
intersection, (i . e. , number of ways of selecting two lines from 20 lines) = 20C 2 = = 190 .
2×1
Example 54: How many lines can be drawn through 21 points on a circle ?
Solution: One line can be drawn by joining any 2 points, from 21 given points.
21 × 20
∴ Total no. of lines = 21C 2 = = 210.
2×1
Example 55: There are 15 points in a plane, no three of which are collinear. Find the number of triangles
formed by joining them.
Solution: One triangle is formed by selecting a group of 3 points from 15 given points.
15 × 14 × 13
∴ No. of triangles = 15C 3 = = 455.
3× 2×1
Example 56: Everybody in a room shakes hands with everybody else. The total number of handshakes is 66.
How many people are there in the room?
Solution: Let there are n persons in the room.
∴ Total no. of handshakes is same as the number of ways of selecting 2 persons among n
persons, i . e. , nC 2.
n
∴ C 2 = 66 [given]
n (n − 1)
= 66 ⇒ n2− n − 132 = 0
2
⇒ (n − 12)(n + 11) = 0 ⇒ n = 12 or n = − 11
But, no. of persons cannot be negative then n = 12.
Combinatories 693
Example 57: Determine the number of 5 cards combination out of a deck of 52 cards, if there is exactly one
ace in each combination.
Solution: One ace can be se lected from 4 aces and 4 other cards can be se lected from remaining 48 cards.
48 × 47 × 46 × 45
∴ No. of ways = 4C1 × 48C 4 = 4 × = 7,78, 320.
4 × 3× 2×1
Example 58: From a class of 25 students, 10 are to be chosen for an ex cursion party. There are 3 students
who de cide that ei ther all of them will join or none of them will join. In how many ways can they be cho sen?
Solution: There are two possibilities:
Case I: When the 3 particular students join the party. In this case, we have to select 7 more students from the
22
remaining 22 students. This can be done in C7 ways.
Case II: When the 3 particular students do not join the party. In this case, we have to select 10 students from
22
the remaining 22 students. This can be done in C10 ways
22 22 22 × 19 × 17 × 3 × 8
So, total number of ways = C7 + C10 = 170544 + 646646 = (720 + 2,730) = 8,17,190 .
10 × 9 × 8
Example 59: A committee of 12 is to be formed from 9 women and 8 men. In how many ways this can be
done, if atleast 5 women have to be included in a committee? In how many of these committees:
(a) the women are in majority, (b) the men are in majority?
Solution: The committee can be selected in the following way:
9 Women 5 6 7 8 9
→ (at least 5 women)
8 Men 7 6 5 4 3
Example 60: If m parallel lines in a plane are intersected by a family of n parallel lines, find the number of
parallelograms formed.
Solution: A parallelogram is formed when two lines from the set of m parallel lines are intersected by the
other 2 lines from another set of n parallel lines.
Hence, the number of parallelograms formed in this case
m (m − 1) n (n − 1) mn (m − 1)(n − 1)
= mC 2 × nC 2 = × = .
2 2 4
Example 61: A student is allowed to select at most n books from a collection of (2n + 1) books. If the total
number of ways in which he can select at least one book is 255, find the value of n.
Solution: The stu dent may select at most n books out of (2n + 1) books. Thus, according to the given
condition.
2n + 1 2n + 1 2n + 1 2n + 1
C1 + C2 + C3 + . . . . + C n = 255
694 Discrete Mathematical Structures
1 2n + 1 2n + 1 2n + 1 2n + 1
⇒ [2 ⋅ C1 + 2 ⋅ C2 + 2⋅ C3 + . . . . + 2⋅ C n] = 255
2
1 2n + 1 2n + 1
⇒ [( C1 + C1 ) + (2n + 1 C 2 + 2n + 1
C 2 ) + . . . . + (2n + 1 C n + 2n + 1
C n )] = 255
2
1 2n + 1 2n + 1
⇒ [( C1 + C 2n ) + (2n + 1 C 2 + 2n + 1
C 2n − 1 ) + . . . .
2
+ (2n + 1 C n + 2n + 1
C n + 1 )] = 255 (Q mC r = m
Cm − r )
1 2n + 1 2n + 1 2n + 1 2n + 1
⇒ [( C1 + C2 + C3 + . . . . + C 2n )] = 255
2
1 2n + 1 2n + 1 2n + 1 2n + 1
⇒ [( C0 + C1 + C2 + K + C 2n + 1 ) − (2n + 1 C 0 + 2n + 1
C 2n + 1 )] = 255
2
1 2n + 1
⇒ [2 − (1 + 1)] = 255 (Q nC 0 + nC1 + nC 2 + . . . . + nC n = 2n )
2
Example 62: A committee of 5 is to be formed out of 6 gents and 4 ladies. In how many ways this can be done
when
(i) at least 2 ladies are included, (ii) at most 2 ladies are included.
Solution: Total gents = 6, Total ladies = 4
(i) At least 2 ladies out of 4 ladies are included in the following ways
(1) 3 gents out of 6 gents + 2 ladies out of 4 ladies = 6C 3 × 4C 2 ways
The total number of ways of forming the committee = 6C 3 × 4C 2 + 6C 2 × 4C 3 + 6C1 × 4C 4 = 120 + 60 + 6 = 186
(ii) At most 2 ladies out of 4 ladies are included in the following ways
(1) No lady and 5 gents = 6C 5 ways
Example 63: A polygon has 44 diagonals. Find the numbers of its sides.
n (n − 3)
Solution: The number of diagonals of n sided polygon = nC 2 − n =
2
n (n − 3)
Given that: = 44
2
⇒ n2 − 3n = 88 or n2 − 3n − 88 = 0 or (n − 11)(n + 8) = 0 or n = 11 [Q n > 0]
Combinatories 695
Example 64: A box contains 5 different red and 6 different white balls. In how many ways can 6 balls be
selected so that there are at least two balls of each colour?
Solution: Total red balls = 5. Total white balls = 6
6 balls can be selected from the box so that there are at least two balls of each colour in the following ways:
(i) 2 red balls and 4 white balls = 5C 2 × 6C 4 ways
(ii) 3 red balls and 3 white balls = 5C 3 × 6C 3 ways
(iii) 4 red balls and 2 white balls = 5C 4 × 6C 2
Hence, the required ways = 5C 2 × 6C 4 + 5C 3 × 6C 3 + 5C 4 × 6C 2 = 150 + 200 + 75 = 425
Example 65: In how many ways can 21 identical books on English and 19 identical books on Hindi be placed
in a row on a shelf so that two books on Hindi may not be together?
Solution: Let E denote the position of an English book and H of Hindi book on a shelf. Since no two books
of Hindi must be together on the shelf therefore, we first arrange all books of English in a row. Since all the
books of English are identical so they can be arranged in a row in only one way as shown below
H E H E H E H ...... H E H E
As there are 21 books of English so there will be 22 places for Hindi books. Now we have 19 identical books
of Hindi, therefore out of 22 places, 19 places.
22 22 × 21 × 20
Total no. of ways = 22C19 = = = 1540
19
22 − 19 3 × 2 ×1
Example 66: In how many ways can a cricket team be selected from a group of 25 players containing 10
batsmen, 8 bowlers, 5 all-rounders and 2 wicket keepers ? Assume that the team of 11 players requires 5
batsman, 3 all-rounders, 2 bowlers and 1 wicket keeper.
Solution: The selection of team is divided into 4 phases :
(i) 5 batsman out of 10 batsman can be selected in 10 C 5 ways.
(ii) 3 all-rounders out of 5 all-rounders can be selected in 5C 3 ways.
(iii) 2 bowlers out of 8 bowlers can be selected in 8 C 2 ways.
(iv) 1 wicket keeper out of 2 wicket keepers can be selected in 2C1 ways.
∴ Team can be selected in 10 C 5 × 5C 3 × 8C 2 × 2C1 ways = 1, 41,120 ways.
Example 67: In how many ways can a committee of 3 ladies and 4 gentlemen be appointed from a group
consisting of 8 ladies and 7 gentlemen ? What will be the number of ways, if Aishwarya of this committee
refuses to serve in a committee in which Salman is a member?
Solution: (i) 3 ladies can be selected from 8 ladies in 8 C 3 ways and 4 gentlemen from 7 gentlemen in 7 C 4
ways.
∴ No. of ways in which the committee can be appointed = 8C 3 × 7 C 4 = 56 × 35 = 1, 960.
(ii) First we find the no. of committees of 3 ladies and 4 gentlemen in which both Aishwarya and
Salman are members. In this case, we can select 2 other ladies from the remaining 7 in 7 C 2 ways
and 3 other gentlemen from remaining 6 in 6 C 3 ways.
∴ No. of ways in which both Aishwarya and Salman are always included = 7 C 2 × 6C 3 = 21 × 20 = 420.
Hence, the required no. of committees in which Aishwarya and Salman do not serve together
= 1, 960 − 420 = 1, 540.
696 Discrete Mathematical Structures
Exercise
1. In how many ways can a cricket team be chosen out of a batch of 15 players, if
(a) there is no restriction on the selection (b) a particular player is always chosen
(c) a particular player is never chosen.
15 14 14
[Hint: (a) C11 (b) C10 (c) C11 ]
2. Out of 5 men and two women, a committee of 3 is to be formed. In how many ways can it be formed if
at least one women is to be included?
3. From a class of 32 students, 4 are to be chosen for a competition. In how many ways can this be
done?
4. In how many ways can a student choose 5 courses out of 9 courses if 2 courses are compulsory for
every student?
5. A question paper has two parts, part ‘A’ and part ‘B’, each containing 10 questions. If the student has to
choose 8 from part ‘A’ and 5 from part ‘B’. In how many ways can he choose the questions ?
6. From a class of 25 students, 10 are to be chosen for an excursion party. There are 3 students who
decide that either all of them will join or none of them will join. In how many ways can the ten be
chosen?
7. A cricket team of 11 players is to be selected from 16 players including 5 bowlers and 2 wicket
keepers. In how many ways can a team be selected so as to consist of exactly 3 bowlers and 1 wicket
keeper?
8. (i) How many straight lines can be obtained by joining 12 points, 5 of which are collinear?
(ii) How many triangles can be obtained by joining 12 points, five of which are collinear ?
9. A polygon has 44 diagonals. Find the number of its sides.
10. In a village, there are 87 families of which 52 families have at most 2 children. In a rural
development programme 20 families are to be chosen for assistance, of which at least 18 families
must have at most 2 children. In how many ways can the choice be made?
11. A bag contains 4 red, 3 white and 2 blue marbles. 3 marbles are drawn at random. Determine the
number of ways of selecting at least 1 white marble in this selection.
12. In how many ways can 5 white balls and 4 black balls be arranged in a row so that no two black balls
are together.
13. A man has 6 friends. In how many ways can he invite one or more to a party?
14. A boy has 3 library tickets and 8 books of his interest in the library of these 8, he does not want to
borrow chemistry part II, unless chemistry part I is also borrowed.
15. Out of 6 teachers and 8 students, a committee of 11 is to be formed. In how many ways can this be
done, if the committee contains
(i) exactly 4 teachers, (ii) at least 4 teachers.
16. In how many ways can a cricket team be selected from 17 players in which 5 players can bowl ? Each
cricket team must include 2 bowlers?
Combinatories 697
9. 11 10. 52
C18 × 35
C2 + 52
C19 × 35
C1 + 52
C 20
Corresponding to a − r combination { x1, a1 , x 2, a2, K x n, an}. The following results are made.
The number of r-combinations of {∞, a1 , ∞, a2, . . . ∞, an}
= The number of non-negative integers solution of x1 + x 2 + x 3 + K + x n = r
= The number of ways of placing r-indistinguishable balls in n numbered boxes.
= The number of binary number with n − 1 one r and r-zeros = C (n – 1 + r, r) = C (n – 1 + r, n – 1)
Solution: Let x1 = y1 + 2, x 2= y 2 + 2, x 3 = y 3 + 4, x 4 = y 4 + 2, x 5 = y 5 + 2
Now, x1 + x 2 + x 3 + x 4 + x 5 = 30
698 Discrete Mathematical Structures
Then, y1 + 2 + y 2 + 2 + y 3 + 4 + y 4 + 2 + y 5 + 2 = 30
or y1 + y 2 + y 3 + y 4 + y 5 = 19
The number of integral solutions of x1 + x 2 + x 3 + x 4 + x 5 = 30
Where x1 ≥ 2, x 2 ≥ 3, x 3 ≥ 4, x 4 ≥ 2, x 5 ≥ 0
is the same as the number of integral solution of y1 + y 2 + y 3 + y 4 + y 5 = 19
Therefore, there are C (5 − 1 + 19, 19) = C (23, 19) such solution
x1 + x 2 + x 3 + x 4 + x 5 = 19
The number of non-negative integral solution of x1 + x 2 + x 3 + x 4 + x 5 = 0 is C(5 − 1 + 0, 0)
The number of non-negative integral solution of x1 + x 2 + x 3 + x 4 + x 5 = 1 is C(5 − 1 + 1, 1)
........................................................
........................................................
The number of non-negative integral solution of x1 + x 2 + x 3 + x 4 + x 5 = 19 is C(5 − 1 + 19, 19)
∴ The number of non-negative integral solution of
x1 + x 2 + x 3 + x 4 + x 5 ≤ 19
is C (5 − 1 + 0, 0) + C (5 − 1 + 1, 1) + K + C (5 − 1 + 19, 19)
Example 71: Find the number of 3-combinations of {∞, a1 , ∞ , a2, ∞, a3 , ∞, a4 } [Osmania (B.E.) 2008]
Solution: We have n = 4, r = 3
6 × 5× 4
∴ The number of 3-combination of the given set is C(4 − 1 + 3, 3) = C(6, 3) = 6 C 3 = = 20
3× 2
Solution: We have n = 4, r = 20
∴ The number of non-negative integral solution
|23
= C (4 – 1 + 20, 20) = C(23, 20) = 23C 20 = = 1, 771
|20 |3
Example 73: Find the number of ways of placing 8 similar balls in 5 numbered bones.
Example 74: How many outcomes are possible by casting a 6 faced die 10 times. [Kurukshetra (B.E.) 2007]
|15
= C(6 – 1 + 10, 10) = C(15, 10) = 15C10 = = 30, 03.
|10 |5
Example 75: How many solution does x1 + x 2 + x 3 = 13 have where x1 , x 2, x 3 are non-negative integers with
x1 ≤ 4, x 2 ≤ 5 and x 3 ≤ 6 . [U.P.T.U. (B.Tech.) 2003; P.T.U. (B.E.) Punjab 2006; Nagpur (B.E.) 2004, 2008]
Solution: Let S be the set of all integers solutions of the given equation with each x i ≥ o, i = 1, 2, 3 and let
A1 , A2 and A3 be the set of integer solutions with x1 > 4, x 2 > 5 and x 3 > 6 or equivalently x1 ≥ 5, x 2 ≥ 6 and
x 3 ≥ 7 respectively. Then the number of solutions with 0 ≤ x1 ≤ 4, 0 ≤ x 2 ≤ 5 and 0 ≤ x 3 ≤ 6 will be
| A′1 ∩ A′ 2 ∩ A′ 3 |.
15 × 14
Now | S| =total number of solutions =13 + 3 –1 C13 =15C13 = = 105
2×1
10 × 9
| A1| = number of solutions with x1 ≥ 5 =(13 – 5)+ 3 –1C13 – 5 = 10C 8 = = 45
2×1
9×8
| A2| = number of solutions with x 2 ≥ 6 =(13 – 6 )+ 3 –1C13 – 6 = 9C7 = = 36
2×1
8 ×7
| A3| = number of solutions with x 3 ≥ 7 =(13 –7 )+ 3 –1C13 –7 = 8C 6 = = 28
2×1
4×3
| A1 ∩ A2| = number of solutions with x1 ≥ 5 and x 2 ≥ 6 =(13 – 5– 6 )+ 3 –1C13 – 5– 6 = 4C 2 = =6
2×1
| A1 ∩ A3| = number of solutions with x1 ≥ 5 and x 3 ≥ 7 =(13 – 5–7 )+ 3 –1C13 – 5–7 = 3C1 = 3
| A′1 ∩ A′ 2 ∩ A′ 3 | =| S|–| A1|–| A2|–| A3| + | A1 ∩ A2| + | A1 ∩ A3| + | A2∩ A3|–| A1 ∩ A2∩ A3|
= 105 – 45 – 36 – 28 + 6 + 1 + 3 − 0 = 6.
Example 76: How many integer solutions are there to the equation.
x1 + x 2 + x 3 + x 4 = 13, 0 ≤ x i ≤ 5, i = 1, 2, 3, 4
[U.P.T.U. (B.Tech.) 2002; M.K.U.(B.E.) 2006]
Solution: Let S be the set of all integer solutions of the given equation with each x i ≥ 0 and let Ai be the set
of integer solutions with x i > 5 or equivalently x i ≥ 6. Then the number of solutions with 0 ≤ x i ≤ 5 will be
| A′1 ∩ A′ 2 ∩ A′ 3 ∩ A′ 4 |.
16 × 15 × 14
Now | S| = 13 + 4 –1C13 = 16C13 = = 560
3× 2×1
10 × 9 × 8
| Ai| =(13 − 6 ) + 4 −1C13 – 6 =10C7 = = 120
3× 2×1
| Ai ∩ A j| =(13 − 6 – 6 ) + 4 –1C13 − 6 − 6 = 4C1 = 4.
Since each x i ≥ 6, therefore the sum of three x i's would exceed 13. Therefore,
| Ai ∩ A j ∩ Ak| = 0.
Similarly, | A1 ∩ A2 ∩ A3 ∩ A4| = 0.
Now by the principle of inclusion-exclusion theorem, we have
4
| A′1 ∩ A′ 2 ∩ A′ 3 ∩ A′ 4 | =| S|– ∑| Ai|+| ∑| Ai ∩ A j| ∑
− | Ai ∩ A j ∩ Ak| + | A1 ∩ A2 ∩ A3 ∩ A4|
i=1 1 ≤ i < j ≤4 1 ≤ i< j< k ≤ 4
Exercise
1. A committee of seven is to be formed from a boys and 5 girls. In how many ways can this be done.
When the committee contains.
(i) exactly three girls (ii) atleast three girls
2. A student is select two answer out of 10 questions in an examinations
(i) how many choices he has?
(ii) how many if he must answer the first three questions?
(iii) how many if he must answer atleast four of the five questions?
3. In how many ways 5 white balls and 3 black balls can be arranged in row so that no two black balls
may be together.
4. Among 20 members of a team, there are two wicket keepers and five bowlers. In how many ways can
eleven persons be chosen to include only are wicket keeper and atleast three bowlers?
5. Out of 5 officers and 10 clerks in an office, a committee consisting of 2 officers and 3 clerks is to be
formed. In how many ways committee be done if
(i) Any officers and any clerk can be included (ii) Are particular clerk must be in the committee?
(iii) Are particular officer cannot be in the committee.
Combinatories 701
6. A box contains 3 white 3 black balls and 4 red balls. In how many ways three balls be drawn from the
box if atleast one black ball is to be include in the draw?
7. Find the 3-combinations of {3, a, 2, b, 2, c, 1, d}
8. Find the number of 4-combinations of {∞, a1 , ∞, a2, ∞, a3 , ∞, a4 , ∞, a5}
9. Find the number of non-negative integral solution to x1 + x 2 + x 3 + x 4 + x 5 = 50
10. How many integral solutions are there to x1 + x 2 + x 3 + x 4 + x 5 = 20 , where x i ≥ 2 V i = 1, 2, 3, 4, 5
11. Find the number of integral solution to x1 + x 2 + x 3 + x 4 + x 5 = 20
where x1 ≥ 3, x 2 ≥ 2, x 3 ≥ 4, x 4 ≥ 6, x 5 ≥ 0
12. How many different outcomes are possible form tossing 10 similar dice?
Answer
1. (i) 1260 (ii) 1716 2. (i) 45 (ii) 21 (iii) 35 3. 20 4. 54054
7. aaa, aab, aac, aad, bba, bbd, cca, ccb, ccd, abc, abd, acd, bcd 8. 70 9. 316, 251
14.5.1 Theorem of Pigeonhole Principle [U.P.T.U. (B.Tech.) 2005, 2006, 2007; U.P.T.U. (M.C.A.) 2008]
If n pigeons are assigned to m pigeonholes, and m<n, then at least one pigeonhole contains two or more
pigeons.
Proof: Let H1 , H 2. . . H m denote m pigeonholes and P1 , P2, K Pm , Pm +1 , . . . Pn denote n pigeons. We consider
the assignment of n pigeons to m pigeonholes as follows:
Let the pigeon P1 is assigned to pigeonhole H1 , pigeon P2 is assigned to pigeonhole H 2... and pigeon Pm to
pigeonhole H m . This assigns as many as pigeons possible to individuals pigeonholes. Since m < n, there are
(n − m) pigeons that have not yet been assigned. At least one pigeonhole will be assigned to a second
pigeon.
702 Discrete Mathematical Structures
Example 77: Show that among 13 people, there are at least two people who were born in the same month.
Solution: We consider 13 peoples as pigeons and 12 months (January, February, ... December) as the
pigeonholes. Here the number of pigeons is grater than the number of pigeonholes, therefore by
pigeonhole principle there will be atleast two people who were born in the same month.
Example 78: If eight people are chosen in any way from some group, at least two of them will have been born
on the same day of the week. [Delhi (B.E.) 2005]
Solution: Here each person (pigeon) is assigned to the day of the week (pigeonhole) on which he or she
was born. Since there are eight people and only seven days of the week, then by pigeon hole principle at
least two people must be assigned to the same day of the week.
Example 79: Show that if we choose 9 single shoes out of 8 distinct pairs of shoes, then we are sure to have a
pair. [Rohtak (B.E.) 2008]
Solution: Here 8 distinct pairs correspond to 8 pigeonholes and 9 single shoes correspond to pigeons. It
means m = 8 and n = 9, m < n then by pigeonhole principle, there must be one pigeonhole with 2 shoes
which means that we have chosen atleast one pair.
Example 80: Find the minimum number of students in a class so that three of them are born in the same
month. [Kurukshetra (B.E.) 2007; Osmania (B.E.) 2009]
Example 81: How many students must there be in a class to guarantee that at least two students receive the
same score in the final examination if the examination is graded on a scale from zero to one hundred points.
then k + 1 = 2⇒ k = 1
m=101
So, total number of students in class to guarantee that atleast two students receive the same score.
= kn+ 2 = 1 × 101 + 1 = 102 .
Example 82: Show that if any five integers from 1 to 8 are chosen, then atleast two of them will have a sum 9.
The different sets, each containing two numbers whose sum is equal to 9 are
A1 = {1, 8}, A2 = {2, 7}, A3 = {3, 6}, A4 = {4, 5}.
Each of the five number chosen from 1 to 8 must belong to one of these sets. The four sets are consider as
pigeonholes and five chosen numbers are taking as pigeon. Since m = 4, n = 5 i . e. 4 < 5 Then by pigeonhole
principle we can say that the two of the selected numbers must belong to the same set whose sum is 9.
Combinatories 703
Example 83: Show that in any room of people who have been doing handshaking there will always be at least
two people who have shaken hands the same number of times.
Solution: Let the pigeonholes be labelled with the different numbers of hands shaken and we put the
people (pigeons) into their correct pigeonhole. Suppose there are n people, then since only shake hands
with each person at most once, the lables on the pigeonholes will go from o to (n–1) i.e. we have n holes
and n people. It is not possible for the o th and (n − 1)th the holes both to be occupied, because if one person
has shaken hands with nobody then there can not be any one person who has shaken hands with every
other person. Thus, we have at most (n − 1) holes occupied at any one time. Hence, by the pigeonholes
principle at least one of the holes has two occupants, which shows that there are at least two people who
have shaken hands the same number of time.
Example 84: What shall be the minimum number of words that must begin with the same alphabet at 27
English words.
Solution: Here, m = k n + 1 = 27 (Pigeonholes), n = 26 (number of alphabet)=(pigeons) – 1, where k is
any integer
∴ k × 26 + 1 = 27 ⇒ k = 1 and m = k+1 = 2
Hence at least two words must begin with the same alphabet.
Example 85: If there are 13 boys in a class, then find minimum number of boys born in the same months.
Solution: Consider month as pigeons i.e. n = 12 then find pigeonholes m. But n = 12, k n + 1 = 13
⇒ k × 12 + 1 = 13 ⇒ k = 1 , then m = k + 1 = 2
Example 86: Show that if seven numbers from 1 to 12 are chosen, then two of them will add up to 13.
Solution: There are six sets each containing two number that add up to 13 as follows:
A1 = {1, 12}, A2 = {2, 11}, A3 = {3, 10}, A4 = {4, 9} A5 = {5, 8}, A6 = {6, 7}
Each of the seven numbers belongs to one of these six sets. Since there are 6 sets, then by pigeonholes
principle two of the numbers chosen belong to the same set. These numbers add upto 13.
Example 87: If 20 candidates appear in a competitive examination then show that there exists at least two
among them whose Roll number differ by a multiple of 19. [U.P.T.U. (B.Tech.) 2004]
Solution: Let X be the set of Roll number of 20 candidates and Y be the set of remainder when any positive
integer is divided by 19.
i.e., Y = {0, 1, 2, . . . , 18}.
Here we define a function f : X → Y as f ( x ) = the remainder obtained when any positive integer is divided
by 19. Since | X | = 20 and | Y| = 19 i . e. ,| X | >| Y|, therefore by the pigeonhole principle function f cannot be
one-one. This shows that there exists two distinct Roll numbers x1 and x 2 such that f ( x1 ) = f ( x 2 )
x1 , x 2 can be written as x1 = 19n1 + f ( x1 ) and x 2 = 19n2 + f ( x 2 )
where n1 and n2 are positive integers.
This gives x1 – x 2 = 19 (n1 – n2 ). [Q f ( x1 ) = f ( x 2 )]
Now n1 – n2 is an integer. Therefore x1 − x 2 is a multiple of 19.
Hence there are at least two candidate whose Roll numbers differ by a multiple of 19.
704 Discrete Mathematical Structures
Example 88: If any 51 integers are chosen from the set {1, 2, 3, . . . . , 100} then show that among the chosen
integers there exist two integers such that one is multiple of the other. [U.P.T.U. (B.Tech.) 2005]
Solution: We know that every positive integer x can be written as=2p. r, where r is odd and p ≥ 0 (for
example, 12 = 22. 3 and 13 = 20 . 13). We shall call this odd integer r the odd part of integer x.
If x is in {1, 2, . . . . ,100} then its odd part r can only be in {1, 3, 5, . . . , 99}.
Let S be any set of 51 integers chosen from the set {1, 2, 3, . . . , 100}. Define a function
f : S → {1, 3, 5, 7, . . . , 99} by f ( x ) = odd part of x.
Since | S|=51 and |{1, 3, 5, 7, K , 99}| = 50, it follows from the pigeonhole principle that f cannot be
one-to-one. Thus there exist two integers x and y in S such that their odd parts f ( x ) and f ( y ) are same. That
is, f ( x ) = f ( y ). Therefore, we have
x = 2p⋅ r and y = 2q. r for some integers p and q.
If p ≥ q then x = 2p– q, y and therefore x is a multiple of y. If p < q then y is a multiple of x. Thus either x is
multiple of y or is multiple of x.
Example 89: Let any given five points to be placed in the interior of an equilateral triangle of side 1.
Show that there exists two points within a distance of at most 1/2.
Solution: Let us divide the given equilateral triangle into four equal triangles
(pigeonholes) as shown in the figure. The given five points (pigeons)
P1 , P2, P3 , P4 , P5, say, will be placed in these four triangles. By the pigeonhole
principle at least two of them must belong to one of the four small triangles. P4 P5
Clearly the distance between these points (P4 and P5 as shown in the Fig. 14.1)
1 P3
cannot exceed the side of the triangle which is .
2
P1 P2
1
Hence we conclude that there exists two points within a distance of at most . Fig. 14.1
2
Example 90: Given any five points inside a square of side 1, show that there exists two points within a
distance of at most 1/ 2 .
Solution: Let us divide the given square into four equal squares as shown in the Fig. 14.2 1/2 1/2
The given five points (pigeons) will be placed in these four squares (pigeonholes). By the
1/2
pigeonhole principle at least two of them must belong to one of the four small squares. The
distance between these two points cannot exceed the length of the diagonal of the small
1 2 1
square which is 1 + 12; i . e. , .
2 2
1 Fig. 14.2
Hence we conclude that there exists two points within a distance of at most .
2
Example 91: Show that any sequence of n2 + 1 distinct integers contains an increasing subsequence of length
n+1.
Solution: Suppose a1 , a2, a3 , . . . , an2 +1 is a sequence of n2 + 1 distinct integers (pigeons). Corresponding
to each ak , we now consider an ordered pair ( x k , y k ), where x k is the length of a longest increasing
subsequence starting at ak and y k is the length of a longest decreasing subsequence starting at ak .
Combinatories 705
Suppose, if possible, that there is no increasing or decreasing subsequence of length n + 1 in the sequence ai
of n2+1 integers. Then it is clear that the set {( x k , y k ) has at most n2 distinct ordered pairs (pigeonholes).
It follows by the pigeonhole principle that there must exist two elements ai and aj in the sequence which
correspond to the same ordered pair; i.e.,( x i, y i ) = ( x j , y j ). But this is not possible because if ai < aj then we
must have x i > x j and if ai > aj then we must have y i > y j . In each case, we have a contradiction. This
moves that there is either an increasing subsequence or a decreasing subsequence of length n + 1 .
i.e. there (n − 1) pigeons in all. Which is contradiction our assumption. Hence one of the pigeonholes must
contain at least
n – 1
+1 pigeons.
m
Example 92: Show that if any 26 people are selected then we may choose a subset of 4 so that all 4 were born
on the same day of the week.
Solution: We assign each person to the day of the week on which she or he was born. Then number of
pigeons (people) are to be assigned to 7 pigeonholes with n = 26 and m = 7 at least.
n −1 n −1 26 − 1
+ 1 or +1 = + 1 = 4 people
m m 27
must have been on the same day of the week.
Example 93: There are 38 different time periods during which classes at university can be scheduled if there
are 677 different classes, how many different rooms will be needed?
Solution: Assign each class to a time period then 677 different classes (pigeons) has to be assigned to 38
pigeonholes. Here n = 677, m = 38 .
Then by generalized pigeonhole principle, one of the pigeonholes must contain at least
677
+ 1 = [17. 81] + 8 = 17 + 1 = 18 pigeons
38
Example 94: In a group of six people, each pair of individuals consists of two friends or two enemies. Show
that there are either three mutual friends or three mutual enemies in the groups.
Solution: Let A be one of the six people of group. There are either three or more among the other five
people who are friends of A or enemies of A. Then by generalized pigeonhole principle five objects are
divided into two sets, one has at least + 1 = 3 objects. Let B, C and D are friends of A . If any two of these
5
2
individual are friends then these two and A form a group of three mutual friends. Otherwise B, C and D
form a set of three mutual enemies. In the second case suppose B, C and D are enemies of A. If any two of
these individual are enemies then these two and A form a group of three mutual enemies otherwise B, C
and D form a group of three mutual friends.
706 Discrete Mathematical Structures
Example 95: How many letters one must choose from the set of 15 A ’ s, 20’ s B and 25’ C, so that 12 identical
letters will always be included in the selection.
Solution: We see that there are three types of letters (pigeonholes) to be chosen from the set having
15A ’ s , 20B ’ s and 25C’ s, so that 12 identical letters should always be included in the selection is the smallest
n −1
integer n such that k + 1 = 12, k=
3
n – 1
or + 1 = 12 ⇒ [ n – 1] = 11 × 3 ⇒ n = 34
3
Thus, 34 is the minimum number of letters to be chosen from the set having 15A ’ s 20B ’ s and 25’ C so that 12
identical letters will always be included in the selection.
Example 96: What is the minimum number of students required in a class to be that at least five will receive
the same grade if there are four possible grades A, B, C and D.
Solution: There are four grade A, B, C, D which is the pigeonholes and at least 5 students must receive the
same grade. We have to find minimum number of students which is pigeons (n) such that
n −1
+1 = 5
4
n −1
or =4 or (n − 1) = 16 or n = 17.
4
Example 97: Show that if seven colours are used to paint 50 cars, at least eight cars will have the same
colour.
n – 1 50 – 1
Then, by generalized pigeonhole principle +1 = + 1 = 8 Cars
m 7
Example 98: Show that among 1000 people there are at least 84 people who were born in the same month.
Solution: Where n = 1000 people = pigeons, m = 12 months = pigeonholes
n −1 1000 − 1
Then, by generalized pigeonhole principle, we have +1 = + 1 = 83 + 1 = 84 people.
m 12
Example 99: Prove that among 1,00,000 people there are two who born on the same time.
[R.G..P.V. (B.E.) Bhopal 2001, 2007]
Exercise
@ Pigeonhole
1. State and prove pigeonhole Principle.
[U.P.T.U. (B.Tech.) 2007; U.P.T.U. (M.C.A.) 2008; R.G.P.V. (B.E.) Bhopal 2001, 2002, 2003, 2009;
Rohatak (B.E.) 2007; P.T.U. (B.E.) 2005; M.K.U. (B.E.) 2005, 2009]
2. If a bag contains several white, red and black shoes, then find the minimum number of shoes that a
person needs to choose in order to get two pairs (4) shoes of the same colour.
[Hint: n = 4, k + 1 = m = 5 ⇒ kn + 1 = 17]
3. If there are several black, white and green balls in a bag, then find the number of balls that must be
choosen to be sure of getting pair of balls with the same colour.
4. A professor tells three stories from ‘Panchtantra’ in his class each year. How many stories does the
professor require in order to never repeat exactly the same triple of stories over a period of 12 years.
5. If there are 104 different pairs of people who know each other at a party of 30 people, show that
some person has at most acquaintances.
6. Given any ten points inside an equilateral triangle of side 1, show that there are two points within a
distance of at most 1/3.
[Hint: Divide the given triangle into 9 square triangle]
7. How many persons must be chosen in order that atleast 7 of them will have birthdays in the same
calender month?
n − 1
Hint: 12 + 1 = 7
8. How many letters one must choose from the set of 15 A' s 20 B' s and 25C ' s , so that 12 identical letters
will always be included in the selection.
9. Show that atleast in any of the seven classes there must be two that meet on the same day that no
class hold on Sunday.
10. 11 shoes are selected from 10 pairs of shoes. Show that there is a pair of matched shoes among the
selection.
11. Show that in a set of five distinct integers, there must exists two integers with the same remainder
when divided by 4.
12. Show that if any five numbers from 1 to 8 are chosen then two of them will add upto 9.
13. Show that if any 30 people are selected, then we may choose a subset of 5 so that all 5 were born on
the same day of the week.
14. If 30 processors are inter connected, show that atleast two processors are directly connected to the
same number of processors.
15. There are four doors to enter a hall and three doors to leave the hall. In how many ways can a person
enter and leave the hall?
16. Explain the pigeon hole principle. [U.P.T.U. (M.C.A.) 2009]
708 Discrete Mathematical Structures
2. 17 3. 4 4. 6 7. 73 8. 34 15. 12
3. How many words of three distinct letters can be formed from the letters of word LAND?
(a) 24 (b) 28 (c) 20 (d) 10
5. In how many ways can a party of 9 persons arrange themselves around a circular table?
(a) |9 (b) |8 (c) |7 (d) none of these
6. How many five digit numbers can be formed with digits 2, 3, 5, 7, 9 which are
(a) odd (b) even
(c) greater then 30,000 (d) lie between 30,000 and 90,000
9. If a class has students from 3 states in India, then the minimum number of students that must be
chosen from the class to be sure to have students belonging to the same state is
(a) 4 (b) 1 (c) 3 (d) 1
10. In how many way can three boys and two girls sit in a row?
(a) 48 (b) 24 (c) 120 (d) none of these
11. I have 4 friends; in how many ways can I invite them for dinner?
(a) 20 (b) 10 (c) 15 (d) none of these
12. If a set A = {2, 4, 7, 9, 10, 12}, then the number subsets of A having less then 4 elements are
(a) 26 (b) 12 (d) 12 C 4 (d) none of these
Combinatories 709
1. Suppose that you work into a theater that has a single row of 6 seats. If 2 seats are to be occupied
then 30 seating arrangements are possible it is true or false.
3. We can arrange the letter in the words NOON by six ways is true or false.
4. True or false:
(i) n p = nc | r (ii) nc + nc = nc
r r r r −1 r +1
5. If (n + 1) or more pigeons are placed into n pigeonholes then there is at least one pigeonhole
containing two or more pigeons is true or false.
2. If n pigeon holes are occupied by k n + 1 or more pigeon, where k is a positive integers then at lest one
hole is occupied by .......... or more pigeons. [M.C.A. (Rohtak) 2009]
5. c (n, r) = . . . . . . . . . .
710 Discrete Mathematical Structures
Answer
Multiple Choice Questions
1. (a) 2. (c) 3. (a) 4. (b) 5. (b)
6. (a) 96 (b) 24 (c) 96 (d) 72 7. (a) 8. (c) 9. (a) 10. (c)
11. (c) 12. (a)
❑❑❑
Polya's Theorem 711
Illustration: If the set S = (a, b, c) then cycle structures of all its permutation (elements of cycle group P) are
1 2
Therefore, the cycle index of P is given by Z(P ) = (Y1 + 3Y1 Y2 + 2Y3 )
6
Similarly, the cycle index of permutation group of degree 4 and order 4 shown in example is given by
1
Z(P ) = (Y14 + Y22 + 2Y4 )
4
The Content W(f) of a mapping is defined as the product of the content of all its images. Thus
W ( f ) = II W[ f (di )]
d ∈D
All mapping from D to R are divided into equivalence classes by a permutation group P acting on set D. The
weight of an entire equivalence class of functions from D to R is defined to be the common weight of
functions in this class.
Polya's Theorem helps us in counting the number of equivalence classes with various weight when D, R, P
and weight W(P) for each P ∈ R are given.
Where aq = the number of elements in set R with weight X q. Similarly the number of configuration is
expressed in terms of configuration counting series given by
∞
B( X ) = ∑ bm X m
m =0
(
B( x ) = Z P ; ∑ aq x q, ∑ aq x 2q, ∑ aq x 3 q. . . . . . . . ∑ aq x kq, ) ...(1)
Polya's Theorem 713
OR
in case we suppose weight function W defined in R to be two dimensional, the counting series shall be
given by A( x, y ) = ∑ amn x m y n, where amn denotes the number of figure of weight (m, n) in R and
configuration counting series is given by B( x, y ) = ∑ bmn x m y n
where bmn denotes the number of orbits (= equivalence classes of configurations) of weight x m y m in R D ,
then the Polya's Theorem can be stated as follows.
The configuration counting series is obtained by substituting the figure counting series into the cycle index of
the configuration group, i.e. B( x, y ) = Z(P , A( x, y )) = Z(P , f ( x, y ), F ( x 2, y 2 ). . . . f ( x k , y k )) ...(2)
[M.K.U. (B.E.) 2005, 2007, U.P.T.U. (M.C.A.) 2008]
Proof: To prove this theorem we shall prove this theorem with the help of a well known counting formula
due to Burnside which is stated below as a theorem.
Theorem: Let P be a permutation group on a set X with orbits σ1 , σ 2, σ 3 … σ n and Let w be a function which
assign a weight to each orbit. w is defined on X so that w( x ) = w(σ i ) whenever x ∈ σ i then the sum of the weight
of orbits is given by
n
| P |. ∑ w(σ i ) = ∑ ∑ w (x) ...(3)
i=1 α ∈ P x ∈ αx
Main Proof: Let α be a permutation in a group P and α be the corresponding permutation in the power
group E p. Let φ be a configuration fixed by α and C be the cycle of length k in the disjoint cycle
decomposition α.
Then φ(a) = φ(ba) for each element a in the representation of b satisfying the condition that all elements
permuted by b have the same image under φ.
Again if element of each cycle of permutation α have same image under a configuration φ, then α fixes φ .
All configuration fixed by α are obtained independently by choosing an element e ∈ R for each cycle C of α
and putting φ(a) = e for all values of a permuted by C. Then if the weight W (r) = ( p. q) where p = w1 r, q = w2r
and C has length k, the cycle C contributes a factor of
Taking summation (6) over all permutation α in P( or over α in E p) and dividing both sides by| P| = | E p|, we
find
s
1 1
| E P|
∑P ∑ w (φ ) =
| P |
∑ ∏ A( x k , y k ). t k (α) ...(7)
φ =α φα ∈E α ∈ P k =1
714 Discrete Mathematical Structures
The R.H.S. of (7) is Z(P , A( x, y ), which is R.H.S. of (2). To see that L.H.S. of (7) is B( x, y ) , we see that the
sum of weight of orbits for power group E p is given by
n
∑ w(σ i ) = ∑ B pq( x p y p ) = B( x, y ) ...(8)
i=1
Now, it follows from (3) that left hand sides of (7) and (8) are equal. Therefore
Z(P , A( x, y )) = B( x, y ), which prove the theorem.
content x 0 (= 1) .
permutation group shall be the group of permutation on the pairs of vertices induced by Sn, the full symmetric
group on the n vertices of G = R n. Therefore, the configuration counting series can be obtained by putting 1 + x
for y1 , 1 + x 2 for y 2, 1 + x 3 for y 3 . . .1 + x n for y n in the the cycle index Z(R n ).
1 3
Illustration: For number of vertices n = 3 , Z(R 3 ) = (Y1 + 3Y1 Y2 + 2Y3 )
6
Illustration: If the number of vertices n = 4, the figure counting series is again A( x ) = 1 + x and the cycle
1
index is given by Z(R 4 ) = (Y16 + 9Y12 Y22 + 8Y32 + 6Y2 Y4 ) from Z(R 4 ), we can find the configuration counting
24
series (after simplification) as follows
B( x ) = 1 + x + 2x 2 + 3x 3 + 2x 4 + x 5 + x 6
in which the confident of x ishall give the number of non-isomorphic simple graphs with four vertices and i
edges.
Polya's Theorem 715
Note: In case of multigraph (having at most two parallel edges) the domain D remains the same as in simple
graph. The range R contain three elements say r1 (denoting no edge between a pair of vertices) r2 (denoting
one-edge between a pair of vertices) and r3 (denoting two edge between a pair of vertices) with contents x 0 , x1
and x2 respectively.
Remark: For a diagraph the figure-counting series remain the same as in case of simple graph. But the
cycle index changes as the domain consists of all n(n − 1) ordered pair of vertices.
Example 1: Using the Polya's Theorem, find the solution of the following problem.
Suppose that we are given a cube and four (identical balls). In how many ways can the balls be arranged on the
corners of the cube? Two arrangements are considered the same if by any rotation of the cube they can be
transformed into each other. [U.P.T.U. (M.C.A.) 2003-2004, U.P.T.U. (B.Tech.) 2005]
Solution: In Polya's terms the domain D is the set of 8 corners of the cube and the range R consists of 2
elements i.e. “presence of a ball” and “absence of a ball” whose contents are x1 and x 0 respectively. The
elements of figure-counting series is given by.
∞
A( x ) = ∑ ar x i = a0 x 0 + a1 x1 = 1 + x ...(1)
i= 0
Since a0 = the number of figure with content zero=1 and a1 = the number of figure with content one=1.
The number of configuration of different mappings assigning ball to the corners of the cube=28 = 256.
The permutation group P on the domain set D = the set of all permutation that can be produced by rotation
of the cube. These permutation with their cyclic structure are as:
(i) One identity permutations whose cycle structure is Y18 .
(ii) Three 180° rotations around lines connecting centres of opposites forces of the cube whose
cycle structure is Y24 .
(iii) Six 90° rotation (clockwise and anti-clockwise) around lines connecting centres of opposite
faces of the cube whose cycle structure is Y42 .
(iv) Six 180° rotation around lines connecting midpoints of opposite edge of the cube whose
cycle structure is Y24 .
(v) Eight 120° rotation around lines connecting opposite corners of the cube whose cycle structure
is Y12 × Y33 .
Now, the cycle index of this group having those 24 Permutation is
Z(P ) = (Y12 + 9Y24 + 6Y42 + 8Y12 Y33 )/24 ...(2)
Then by Polya's theorem, we put the figure counting series (= 1 + x ) from (1) for y1 ,1 + x 2 for y 2, 1 + x 3 for
Y3 and 1 + x 4 for Y4 in (2) to the configuration counting series given by
B ( x ) = 1 + x + 3x 2 + 3x 3 + 7 x 4 + 3x 5 + 3x 6 + x7 + x 8 ...(3)
4
The required number of configuration (arrangement of ball) with four balls (i.e. of content x )=the
coefficient of x 4 in B( x ) given by (3) = 7.
716 Discrete Mathematical Structures
Fig. 15.1
Example 2: State Polya's enumeration theorem. Use it to determine all unlabelled, simple graph of four
vertices. [U.P.T.U. (M.C.A.) 2007, 2008]
Fig. 15.2
Example 3: Use Polay's theorem to determine all unalabelled simple group of five vertices.
[Raipur (B.E.) 2006]
1
Solution: We have, Z(R 5) = [ Y110 + 10Y14 Y23 + 20Y1 Y33 + 15Y12Y24 + 30 Y2Y42 + 20Y1 Y3 Y6 + 24Y52
120
and B( x ) = 1 + x + 2x 2 + 4 x 3 + 6 x 4 + 6 x 5 + 6 x 6 + 4 x7 + 2x 8 + x 9 + x10
Exercise
1. Define the following terms with example:
cyclic structure, figures, configurations and permutation
2. Explain Polya's Counting Theorem. [U.P.T.U. (M.C.A.) 2008]
❑❑❑