discrete mathematics - jaipur national universityjnujprdistance.com/assets/lms/lms jnu/mca/sem...

138
Discrete Mathematics

Upload: others

Post on 25-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

Page 2: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Board of Studies

Prof. H. N. Verma Prof. M. K. GhadoliyaVice- Chancellor Director, Jaipur National University, Jaipur School of Distance Education and Learning Jaipur National University, JaipurDr. Rajendra Takale Prof. and Head AcademicsSBPIM, Pune

___________________________________________________________________________________________

Subject Expert Panel

Dr. Ramchandra G. Pawar Ashwini PanditDirector, SIBACA, Lonavala Subject Matter ExpertPune

___________________________________________________________________________________________

Content Review Panel

Gaurav Modi Shubhada PawarSubject Matter Expert Subject Matter Expert

___________________________________________________________________________________________Copyright ©

This book contains the course content for Discrete Mathematics.

First Edition 2013

Printed byUniversal Training Solutions Private Limited

Address05th Floor, I-Space, Bavdhan, Pune 411021.

All rights reserved. This book or any portion thereof may not, in any form or by any means including electronic or mechanical or photocopying or recording, be reproduced or distributed or transmitted or stored in a retrieval system or be broadcasted or transmitted.

___________________________________________________________________________________________

Page 3: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

I

Index

ContentI. ...................................................................... II

List of FiguresII. ..........................................................VI

List of TablesIII. ......................................................... VII

AbbreviationsIV. ......................................................VIII

ApplicationV. ............................................................. 119

BibliographyVI. ......................................................... 124

Self Assessment AnswersVII. ................................... 127

Book at a Glance

Page 4: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

II

Contents

Chapter I ....................................................................................................................................................... 1Logic .............................................................................................................................................................. 1Aim ................................................................................................................................................................ 1Objectives ...................................................................................................................................................... 1Learning outcome .......................................................................................................................................... 11.1 Introduction .............................................................................................................................................. 21.2 Statement/Proposition .............................................................................................................................. 21.3 Truth Value ............................................................................................................................................... 21.4 Venn Diagrams ......................................................................................................................................... 21.5 Compound Statements and Logical Connectives .................................................................................... 51.6 Truth Tables .............................................................................................................................................. 71.7 Tautology, Contradiction and Contingency ............................................................................................. 81.8 Logical Equivalence ................................................................................................................................. 91.9 Negation of a Compound Statement ........................................................................................................ 91.10 Some Standard Equivalent Statements in Logic .................................................................................. 101.11 The Use of Logic in Circuits ................................................................................................................ 101.12 Quantifiers .............................................................................................................................................11Summary ..................................................................................................................................................... 14References ................................................................................................................................................... 14Recommended Reading ............................................................................................................................. 14Self Assessment ........................................................................................................................................... 15

Chapter II ................................................................................................................................................... 17Combinatorics ............................................................................................................................................ 17Aim .............................................................................................................................................................. 17Objectives .................................................................................................................................................... 17Learning outcome ........................................................................................................................................ 172.1 Introduction ............................................................................................................................................ 182.2 Basic Counting Principles ...................................................................................................................... 18 2.2.1 The Sum Rule ........................................................................................................................ 18 2.2.2 The Product Rule ................................................................................................................... 18 2.2.3 Inclusion and Exclusion ......................................................................................................... 19 2.2.4 Tree Diagrams ........................................................................................................................ 202.3 The Pigeonhole Principle ....................................................................................................................... 212.4 Permutations and Combinations ............................................................................................................ 22 2.4.1 Permutation ............................................................................................................................ 22 2.4.2 Combinations ......................................................................................................................... 24 2.4.3 Permutations with Indistinguishable Objects ........................................................................ 24Summary ..................................................................................................................................................... 26References ................................................................................................................................................... 26Recommended Reading ............................................................................................................................. 26Self Assessment ........................................................................................................................................... 27

Chapter III .................................................................................................................................................. 29Mathematical Induction ............................................................................................................................ 29Aim .............................................................................................................................................................. 29Objectives .................................................................................................................................................... 29Learning outcome ........................................................................................................................................ 293.1 Introduction ............................................................................................................................................ 303.2 First Principle of Mathematical Induction ............................................................................................. 303.3 Second Principle of Mathematical Induction ......................................................................................... 323.4 Different Perspective of Applying Mathematical Induction Principles ................................................ 333.5 Steps to Use Mathematical Induction .................................................................................................... 35

Page 5: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

III

Summary ..................................................................................................................................................... 40References ................................................................................................................................................... 40Recommended Reading ............................................................................................................................. 40Self Assessment ........................................................................................................................................... 41

Chapter IV .................................................................................................................................................. 43Recurrence Relation .................................................................................................................................. 43Aim .............................................................................................................................................................. 43Objectives .................................................................................................................................................... 43Learning outcome ........................................................................................................................................ 434.1 Introduction ............................................................................................................................................ 444.2 Definition of Recurrence Relation ........................................................................................................ 44 4.2.1 Linear Recurrence Relation with Constant Coefficients ....................................................... 444.3 Construction of Recurrence Relation ..................................................................................................... 44 4.3.1 Degree of Recurrence Relation .............................................................................................. 45 4.3.2 Characteristic Equation of Recurrence Relation .................................................................... 45 4.3.3 Characteristic Roots of Recurrence Relation ......................................................................... 45 4.3.4 Homogeneous Recurrence Relation ....................................................................................... 46 4.3.5 Non-homogenous Recurrence Relation ................................................................................. 464.4 Solution of Recurrence Relation ............................................................................................................ 46 4.4.1 Solution of Homogenous Recurrence Relation ..................................................................... 46 4.4.2 Solution of Non-homogenous Recurrence Relation .............................................................. 474.5 Applications of Recurrence Relation ..................................................................................................... 48Summary ..................................................................................................................................................... 50References ................................................................................................................................................... 50Recommended Reading ............................................................................................................................. 50Self Assessment ........................................................................................................................................... 51

Chapter V .................................................................................................................................................... 53Graphs ......................................................................................................................................................... 53Aim .............................................................................................................................................................. 53Objectives .................................................................................................................................................... 53Learning outcome ........................................................................................................................................ 535.1 Introduction ............................................................................................................................................ 545.2 Terminologies in Graph ......................................................................................................................... 545.3 Representation of Graph ........................................................................................................................ 565.4 Uses of Graphs ....................................................................................................................................... 575.5 Some Important Graphs ......................................................................................................................... 585.6 Degree Sequence .................................................................................................................................... 59 5.6.1 Graphical Degree Sequence ................................................................................................... 595.7 Isomorphism in Graphs .......................................................................................................................... 60 5.7.1 Isomorphism by Using Adjacency Matrix ............................................................................. 615.8 Applicability of Graphs .......................................................................................................................... 62Summary ..................................................................................................................................................... 64References ................................................................................................................................................... 64Recommended Reading ............................................................................................................................. 64Self Assessment ........................................................................................................................................... 65

Chapter VI .................................................................................................................................................. 67Tree .............................................................................................................................................................. 67Objectives ............................................................................................................................................. 67Learning outcome ........................................................................................................................................ 676.1 Introduction ............................................................................................................................................ 686.2 Tree ........................................................................................................................................................ 68 6.2.1 Properties of Tree Graph ........................................................................................................ 69

Page 6: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

IV

6.2.2 Equivalent Properties of Tree ................................................................................................ 696.3 Spanning Tree ........................................................................................................................................ 71 6.3.1 Terminologies in Spanning Tree ............................................................................................ 716.4 Fundamental Circuits ............................................................................................................................. 726.5 Shortest Spanning Tree .......................................................................................................................... 736.6 Kruskal’s Algorithm ............................................................................................................................... 746.7 Binary Tree............................................................................................................................................. 76 6.7.1 Binary Rooted Tree ................................................................................................................ 76 6.7.2 Height of Binary Tree ............................................................................................................ 766.8 Graph/Tree Search Techniques .............................................................................................................. 77Summary ..................................................................................................................................................... 81References ................................................................................................................................................... 81Recommended Reading ............................................................................................................................. 81Self Assessment .......................................................................................................................................... 82

Chapter VII ................................................................................................................................................ 85Connected and Disconnected Graphs ...................................................................................................... 85Aim .............................................................................................................................................................. 85Objectives .................................................................................................................................................... 85Learning outcome ........................................................................................................................................ 857.1 Connected and Disconnected Graph ...................................................................................................... 86 7.1.1 Walk ....................................................................................................................................... 86 7.1.2 Trail ........................................................................................................................................ 86 7.1.3 Path ....................................................................................................................................... 87 7.1.4 Cycle (Circuit) ....................................................................................................................... 877.2 Connected Graph ................................................................................................................................... 87 7.2.1 Component ............................................................................................................................. 88 7.2.2 Cut Vertex .............................................................................................................................. 887.3 Weight Graph ......................................................................................................................................... 88 7.3.1 Dijkstra’s Algorithm .............................................................................................................. 897.4 Connectivity ........................................................................................................................................... 91 7.4.1 Edge Connectivity .................................................................................................................. 91 7.4.2 Vertex Connectivity ............................................................................................................... 92 7.4.3 Degree of Graph ..................................................................................................................... 93Summary ..................................................................................................................................................... 95References ................................................................................................................................................... 95Recommended Reading ............................................................................................................................. 95Self Assessment ........................................................................................................................................... 96

Chapter VIII ............................................................................................................................................... 98Introduction to Probability ....................................................................................................................... 98Aim .............................................................................................................................................................. 98Objectives .................................................................................................................................................... 98Learning outcome ........................................................................................................................................ 988.1 Introduction ............................................................................................................................................ 998.2 Terminologies in Probability .................................................................................................................. 998.3 Probability ........................................................................................................................................... 100 8.3.1 Definition of Probability Using an Event ............................................................................ 100 8.3.2 Definition of Probability Using Sample Space .................................................................... 101 8.3.3 Rules of Probability ............................................................................................................. 101 8.3.4 Conditional Probability ........................................................................................................ 103 8.3.5 Axiomatic Approach of Probability ..................................................................................... 1058.4 Bayes’ Theorem ................................................................................................................................... 1058.5 Probability Distributions ...................................................................................................................... 106 8.5.1 Binomial Distribution .......................................................................................................... 107

Page 7: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

V

8.5.1.1 Probability Function of Binomial Distribution ..................................................... 107 8.5.1.2 Parameters of Binomial Distribution .................................................................... 108 8.5.1.3 Important Measures or Constants of Binomial Distribution ................................. 109 8.5.2 Poisson Distribution ..............................................................................................................1108.6 Other Types of Distribution ..................................................................................................................112 8.6.1 Multinomial Probabilities .....................................................................................................112 8.6.2 Hypergeometric Probabilities ...............................................................................................1128.7 Random Walk ........................................................................................................................................113Summary ....................................................................................................................................................116References ..................................................................................................................................................116Recommended Reading ............................................................................................................................116Self Assessment ..........................................................................................................................................117

Page 8: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

VI

List of Figures

Fig. 1.1 All X’s are Y’s .................................................................................................................................. 3Fig. 1.2 All scientists are scholars .................................................................................................................. 3Fig. 1.3 No X’s are Y’s .................................................................................................................................. 4Fig. 1.4 No wicket keeper is a bowler, in a cricket team ............................................................................... 4Fig. 1.5 (a) Some X’s are Y’s ......................................................................................................................... 4Fig. 1.5 (b) Some X’s are Y’s ......................................................................................................................... 4Fig. 1.6 (a) Some quadratic equations have two imaginary roots .................................................................. 5 Fig. 1.6 (b) Some quadratic equations have two imaginary roots ................................................................ 5Fig. 2.1 Basic rules of counting principles .................................................................................................. 18Fig. 2.2 Bit strings of length four without consecutive 1s ........................................................................... 21Fig. 2.3 More pigeons than pigeonholes ...................................................................................................... 21Fig. 4.1 Homogenous and non-homogenous recurrence relation ................................................................ 46Fig. 6.1 Tree ................................................................................................................................................. 68Fig. 6.2 Graphs are not trees ........................................................................................................................ 69Fig. 6.3 Spanning tree .................................................................................................................................. 71Fig. 8.1 Bayes’ theorem illustration-I ........................................................................................................ 105Fig. 8.2 Bayes’ theorem illustration-II ....................................................................................................... 105Fig. 8.3 Bayes’ theorem illustration-III ...................................................................................................... 106Fig. 8.4 Probability distribution ................................................................................................................. 106Fig. 8.5 Positively skewed binomial distribution....................................................................................... 108Fig. 8.6 Symmetrical binomial distribution ............................................................................................... 108Fig. 8.7 Negatively skewed binomial distribution ..................................................................................... 109Fig. 8.8 Bell-Shaped binomial distribution ................................................................................................ 109Fig. 8.9 Different paths leading to a final position .....................................................................................113Fig. 8.10 Estimate lies in a range around µ ................................................................................................115

Page 9: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

VII

List of Tables

Table 4.1 Solution to Example 1 .................................................................................................................. 45Table 4.2 Solution to solve non-homogenous recurrence relation ............................................................... 47Table 5.1 Different types of graphs .............................................................................................................. 59

Page 10: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

VIII

Abbreviations

BFS - Breadth First SearchDFS - Depth First SearchFIFO - First In, First OutLHS - Left Hand SideMST - Minimum Spanning TreeRHS - Right Hand SideSP - Shortest Pathw.r.t - With respect to

Page 11: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

1

Chapter I

Logic

Aim

The aim of this chapter is to:

explicate the concept of propositional logic•

explain truth table and venn diagram•

elucidatetheconceptoflogicalconnectivesandquantifiers•

Objectives

The objectives of this chapter are to:

explain tautology•

explicate De Morgan’s law and truth table•

enlist the logical equivalence in simple and compound statement•

Learning outcome

At the end of this chapter, you will be able to:

understand contradiction and contingency•

identify truth table and logical equivalence•

describe the use of logic in electr• onic circuits

Page 12: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

2

1.1 IntroductionIn order to understand mathematics like any other language, one must learn the vocabulary and its application. Math logic is the structure that allows us to describe concepts in terms of maths. We will start with very basic ideas and build on them.

Logicdefinesthegroundrulesforestablishingtruths.Mathematicallogicspellsouttheserulesincompletedetail,definingwhatconstitutesaformalproof.Learningmathematicallogicisagoodwaytolearnlogicbecauseitcreatesafirmfoundation.Writingformalproofsinmathematicallogicislikecomputerprogrammingtoagreatextent.

1.2 Statement/PropositionA simple sentence which is declarative or assertive and is either true or false (but not both), is called as a statement or a proposition in logic. We denote the statements by lower case letters like p, q, r etc. They are called statement letters.

Example:Consider the following sentences:

My new shirt is blue in colour.•Is the shirt blue in colour?•How beautiful is the new shirt!•

In above sentences,Sentence 1 is a simple assertive sentence, hence, it is a statement.Sentence 2 is an interrogative sentence (question form) hence, it is not a statement.Sentence 3 is an exclamatory sentence (a common). Hence, it is not a statement.

Thus, for a sentence to be a statement, it should be assertive. Moreover, it should be true or false. Sentence which is interrogative or exclamatory is not a statement. Mathematical identities are considered to be statements.

1.3 Truth ValueThe truth or falsity of a statement is called its truth value.When a statement is true, its truth value is ‘TRUE’ and is denoted by ‘T’.When a statement is false, its truth value is ‘FALSE’ and is denoted by ‘F’.

Example:Consider the following sentences:

The earth is round.•Everysetisafiniteset.•2 is a prime number.•

Sentences 1, 2 and3 are simple assertive sentences. Therefore, they are statements. The truth value of sentence 1 and 3 is ‘T’ and that of sentence 2 is ‘F.

1.4 Venn DiagramsWe can represent statements having truth value T by sets and hence, by Venn diagrams. Venn diagrams are thus useful to check the validity of the given statements.Let,U: Universal setX: Set of elements xY: Set of elements y

Page 13: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

3

Type I: “All X’s are Y’s”This statement is assumed to be true with true value T. In the language of sets, the statement means that X is a subset of Y. Hence, each element of X belongs to Y. This is represented by the following Venn diagram. The validity of the statement:AllX’sareY’sareshowninthefigurebelow.

We observe that X is a subset of Y. Further, each element of the set X belongs to the set Y, does not belong to X. Only some elements of Y belong to X. In general, when the statement: All X’s are Y’s is given with truth value T, the statement: All Y’s are X’s does not follow from it.

xY

U

X

Fig. 1.1 All X’s are Y’s

Example: Consider the statement: “All scientists are scholars”.It is assumed to be true with truth value T.Let U = Set of all the people X = Set of all the scientists Y = Set of all the scholarsWecandrawtheVenndiagramasshowninthefigurebelow.We observe that there is a scholar say y, who is not a scientist. Hence, the statement: All scholars are scientists follow from statement 1. However, the statement: Some scholars are scientists follows from 1.

xY

U

X

Fig. 1.2 All scientists are scholars

Type II: “No X’s are Y’s”This statement is assumed to be true with truth value ‘T’.Inthelanguageofsets,thestatementmeansthatnotasingleelementofsetXbelongstosetY.Thefigurebelowrepresents the truth of the statement: No X’s are Y’s. We observe that not a single element of Y belongs to set X, i.e., No Y’s are X’s. In general, when the statement: No X’s are Y’s is given with truth value T, the statement: ‘No Y’s are X’s follows.

Page 14: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

4

Y

UX

Fig. 1.3 No X’s are Y’s

Example:Consider the statement: “No wicket keeper is a bowler, in a cricket team”.This statement is of the type “No X’s are Y’s”. It is assumed to be true with truth value T.Let U= Set of all the players W= Set of wicket keepers B= Set of bowlers.TheVenndiagraminthefigurebelowrepresentsthetruthofthestatement:“Nowicketkeeperisabowler”.Weknowthatthestatement:NoY’sareX’sfollowsfromthestatement:NoX’sareY’s.Hence,thefigurebelowalsorepresents the truth of the statement. ‘No Bowler is a Wicket-keeper’.

B

UW

Fig. 1.4 No wicket keeper is a bowler in a cricket team

Type III: Some X’s are Y’sThis statement is assumed to be true with the truth value T. In the language of sets, the statement means that some elements of X belong to the set Y. This can be represented by two Venn diagrams as follows.

X

U

Y

XU

Y

(a) (b) Fig. 1.5 Some X’s are Y’s

Page 15: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

5

Fig. 1.5 (a) and (b) both represent the truth of the statement: “Some X’s are Y’s”.From Fig.1.5 (a), we observe that the statement: “Some X’s are Y’s” follows from the statement: “Some X’s are Y’s”. In Fig.1.5 (b) we observe that the statement: All Y’s are X’s follows from the statement: “Some X’s are Y’s”.

Example:Consider the statement: “Some quadratic equations have two imaginary roots”. This statement is of the type, Some X’s are Y’s. It is assumed to be true with the truth value T.Let, U= Set of all equations X= Set of quadratic equations Y= Set of quadratic equations having two imaginary rootsThe Venn diagram Fig.1.6 (a) represents the truth of the statement: “Some quadratic equations have two imaginary roots”

XU

Y

X

U

Y

(a) (b)

Fig. 1.6 Some quadratic equations have two imaginary roots

Consider the statement: “Some professors are absent minded”.This statement is of the type ‘Some X’s are Y’s. It is assumed to be true with the truth value T.Let, U= Set of all people, X= Set of professors, Y= Set of absent minded people.The Venn diagram in Fig.1.6 (b) represents the truth of the statement: ‘Some professors are absent minded’.

1.5 Compound Statements and Logical ConnectivesLogical connectives: The words or phrases which combine two simple statements are called logical connectives or sentential connectives.Example: ‘and, not, of, but, if, then, either, or’, etc are some connectives which are commonly used.Compound Statements: A combination of simple statements formed by using connectives is called a compound statement. The statements which form a compound statement are called its prime components.While forming a compound statement, we are not concerned with its truth or falsity.Weconsiderthefollowingfivetypesofcompoundstatements:Negation (~p): If p is a statement then the statement ‘not p’ (obtained by making the statement p negative) is called the negation of p. It is denoted by ~p and read as ‘not p’.Then negation of a given statement can also be obtained with the help of phrase “It is not true that” or “It is false that”.Example:Consider p : 2 is a prime number.Then, ~p : 2 is not a prime number.Consider q : Logic is interesting.Then ~q : Logic is not interesting.

Page 16: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

6

Disjunction or Alternation (p ∨ q): If p and q are two simple statements, then the compound statement ‘p or q’ is called their disjunction. It is denoted by p ∨ q and read as p or q. the statement p and q are called its disjuncts.Example:Consider, p: I will watch the cricket match on TV. q: I will go to the Wankhede stadium.Then, p ∨ q: I will watch the cricket match on TV or go to the Wankhede stadium.

Conjunction (p ∧ q):If p and q are two simple statements, then the compound statement ‘p and q’ is called their conjunction.It is denoted by p ∧ q and read as ‘p and q’. The statement p and q are called its conjuncts.Example:Consider, p: 12 is an even number. q: 12 is a perfect square.Then, p ∧ q: 12 is an even number and it is a perfect square.

Implication or Conditional (p → q):If p and q are two simple statements then the compound statement ‘if p then q’ is called a conditional statement or an implication.Itisdenotedbyp→qanditisreadas‘pimpliesq’.Statementpiscalledtheantecedentorhypothesisand statement q is called the consequent or conclusion.Example: Consider, p: Lines L1

and L2 are parallel, q: Lines L1 and L2 have no point in common. Then,p→q:IflinesL1 and L2 are parallel, then they have no point in common.

Double Implication or Bi-conditional (p ⟷ q):If p and q are two simple statements, then the compound statement ‘p if and only if q’ is called the bi-conditional or doubleimplicationorequivalence.Itisdenotedbyp↔qmeansp→qandq→p.thus,abi-conditionalstatementis the conjunction of two conditional statements.Example:Consider, p: A triangle is isosceles, q: The base angles are congruent.Then, p ⟷ q: A triangle is isosceles if and only if the base angles are congruent.

The various connectives have been listed in the following table.

Connective Symbol Compound Statement

1 NOT ~ Negation

2 OR ∨ Disjunction

3 AND ∧ Conjunction

4 IF … THEN → Implication

5 IF AND ONLY IF ↔ Double Implication

Page 17: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

7

Example:Using the statements, p: Akshay is rich q: Akshay is happyand assuming that ‘not rich’ is ‘poor’, write the following statements in symbolic form.

Solution:We have, p: Akshay is rich.

~p: Akshay is poor. q: Akshay is happy. ~q: Akshay is unhappy.

Thus,p ∧ ~q : Akshay is rich and unhappy.~p ∧ q : Akshay is poor but happy.~p ∧ ~q : Akshay is neither rich nor happy.~p ∨ ~q : Akshay is unhappy or poor.~ (~p ∧ q) : It is not true that Akshay is poor and happy.~q↔p:Akshayisunhappyifandonlyifheisrich.

1.6 Truth TablesThe truth value of a compound statement can be expressed conveniently in the form of a table known as Truth Table. A truth shows all possible truth values of prime components and the corresponding truth values of the compound statement.Weshallconsidertruthtablesforthefivetypesofcompoundstatementsdiscussedearlier.

Truth table for Negation (~p):p ~pT FF T

Truth table for Disjunction (p ∨ q):

p q p ∨ qT T TT F TF T TF F F

Truth table for Conjunction (p ∧ q):

p q p ∧ q

T T T

T F F

F T F

F F F

Page 18: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

8

Truth table for Implication (p → q):

p q p→q

T T T

T F F

F T T

F F T

Truth table for Double Implication (p ↔ q):

p q p↔q

T T T

T F F

F T F

F F T

1.7 Tautology, Contradiction and ContingencyTautologyA statement pattern which is always true (i.e., which always takes truth value T) irrespective of truth values of its component statement letters is called a tautology.

Example:Consider the statement pattern p ∨ ~pThe truth table for p ∨ ~p is as follows.Since p ∨ ~p always takes value T for all possible truth values of p, it is a tautology. Note: The disjunction of a statement pattern and its negation is always a tautology.

Thus, (p ∧ q) ∨ ~ (p ∧q),(p→q)∨~(p→q)etc.aretautologies.

p ~p p ∨ ~p

T F T

F T T

ContradictionA statement pattern which is always false (i.e., always takes truth value F) irrespective of truth values of its component statement letters is called a contradiction.

Example:Consider the statement pattern p ∧ ~p.The truth table for p ∧ ~p is given along side. Since p ∧ ~p always takes a value F for all possible truth values of p, it is a contradiction.

Note:The conjunction of a statement pattern and its negation is always contradiction. Thus, (p i. ∨ q) ∧ ~ (p ∨q),(p→q)∧~(p→q)etc.arecontradictions.Negation of a tautology is a contradiction and vice- versa.ii.

Page 19: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

9

A statement pattern is a tautology by virtue of the property of logical connectives and their positions iii. in the statement pattern. It is independent of the statement letters it contains.

p ~p p ∧ ~p

T F F

F T F

ContingencyA statement pattern which is neither a tautology nor a contradiction is called a Contingency. Thus, a contingency is a statement pattern which is either true or false depending on the truth values of its component statement letters.

Note: If a statement pattern is not a tautology, then it may be either a Contradiction or a Contingency.

1.8 Logical EquivalenceAny two simple statements p and q are said to be logically equivalent if they have same truth values. This is denoted byp≡qandreadas‘pisequivalenttoq’.

Example:Let p: 6 is an even number, q: 6 is a multiple of 3.Hence, p and q are logically equivalent.

Two statement patterns are said to be logically equivalent if their truth values are identical for each combination of the truth values of their component statement letters.IfA,Barelogicallyequivalentstatementpatterns,wedenoteitbyA≡BorA⟺B.

Example:Consider the following truth table:

p q A: p → q B: ~p ∨ q A ↔ BT T T T T

T F F F T

F T T T T

F F T T T

1.9 Negation of a Compound StatementThe negation of negation of a statement is logically equivalent to the statement itself, i.e.,~(~p)≡p Proof: We construct the truth table as follows, using the rule for truth value of negation. The entries in the columns for p and ~ (~p) are identical. Hence,~(~p)≡p

P ~p ~(~p)

T F T

F T F

Page 20: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

10

The negation of the disjunction of two statements is logically equivalent to the conjunction of their negations. i.e., ~(p ∨ q) ≡ ~p ∧ ~q (De Morgan’s Law) Proof: We construct the truth table as follows, using the rule for truth value of negation for column 3, 4 and 6, disjunction for column 5, conjunction for column 7.

1 2 3 4 5 6 7

p q ~p ~q p ∨ q ~ (p ∨ q) ~ p ∧ ~q

T T F F T F F

T F F T T F F

F T T F T F F

F F T T F T T

1.10 Some Standard Equivalent Statements in LogicThe following is a comprehensive list of standard equivalent statements:

Commutative Laws:p ∧ q = q ∧ pp ∨ q = q ∨ pAssociative Laws:(p ∧ q) ∧ r = p ∧ (q ∧ r)(p ∨ q) ∨ r = p ∨ (q ∨ r)Idempotent Laws:p ∧ p = pp ∨ p = pDistribution Laws:p ∧ (q ∨ r) = (p ∧ q) ∨ (p ∧ r)p ∨ (q ∧ r) = (p ∨ q) ∧ (p ∨ r)Double Negation Law:~p (~p) = pDe Morgan’s Laws:~ (p ∧ q) = ~p ∨ ~q~ (p ∨ q) = ~p ∧ ~q

1.11 The Use of Logic in CircuitsConsider an electronic circuit with various switches that may be on (closed) or off (open).

INPUT OUTPUT

Currentwillflowalongaparticularpathwhentheswitchesareclosed.Currentwillflowfromtheinputtotheoutputwhen all switches along some path from input to output are closed.Let c, p, q, r be the following propositions:c:currentflowsfrominputtooutput.p:currentflowsthroughswitchp.q:currentflowsthroughswitchq.

Page 21: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

11

r:currentflowsthroughswitchr.Considerthecircuitsgivenbelowandoverleaf.

Suppose there are two switches in the circuit connected in parallel.

INPUT OUTPUT

p

q

Currentflowsfrominputtooutputwhenpaloneisclosed,orqaloneisclosedorbothswitchesareclosed.Here, c = p ∨ q.

Suppose there are two switches in the circuit connected in series.

INPUT OUTPUT

Currentwillonlyflowfrominputtooutputwhenbothpandqareclosed.Here,c=p∧ q.

Suppose three switches are connected as shown below.

r

INPUT OUTPUT

p

q

Here, c = p ∨ q ∨ r.

Suppose three switches are connected as shown below.

INPUT OUTPUT

p

q r

Here, c = p ∨ (q ∧ r).

1.12 QuantifiersThelanguageofpropositionsallowsustomodelagreatvarietyofpropertiesaboutspecificobjects;however,•it doesn’t allow us to state general properties such as “Every cloud has a silver lining”. These general properties are known as • universal properties,sincetheydescribepropertiesthatmustbesatisfiedby every individual in some universe of discourse. In order to symbolise universal and existential properties we shall need two new symbols i.e. • ∀ (called as ‘For all’) and ∃ (called as ‘there exist’).Thequantifiersymbolsareusedtobuildpredicates;apredicateislikea“• ∀” is the universal quantifier, and “∃” is the existential quantifier.

Page 22: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

12

Anyquantifierthatstartswith“• ∃” (such as “∃x”)isanexistentialquantifier.“∃x” is translated as “there exists anxsuchthat..”Wecancombineaquantifierwithapredicatetomakeawell-formedformula,asin‘∃xBx’To understand such a well-formed formula, we can rewrite it as a semi-formal statement: There exists an x •such that Bx. Or alternatively, There is at least one x such that Bx. So what it says is that, there is some object x, and x is B.In other words, it simply says that something is B. If the predicate “Bx” means x is a boy, then the well-formed •formula can be translated as there is at least one boy, or a boy exists. Notice that “• ∃xBx”, “∃yBy”, “∃zBz”, etc. all say the same thing. They are different well-formed formulae since they employ different variables. But they are logically equivalent nonetheless. Also notice that the truth of “• ∃xBx” is consistent with the claim that there is more than one B. It is just that this is not what “∃xBx” says. The latter well-formed formula says that there is one or more. It might be the case that there is just one, or it might be that there is more than one.

Anyquantifierthatstartswith“∀”isaUniversalQuantifier.“∀x” means “for all x, ... “. Again we can combine a universalquantifierwithapredicatetoformawell-formedformula,suchas:∀xBx

In semi-formal notation, this means the same as “for all x, Bx”. What this says is that for any object x, x is B. If “Bx” means x is a boy, this well-formed formula would mean for every x, x is a boy. In other words, take any object whatsoever;itisaboy,whichisjustthesameassayingthateverythingisaboy.Undersuchatranslation,thewell-formed formula is of course actually false.Now consider the following formula, what do you think it means? (Suppose “Dy” means y is dirty, and “By” as before.)Forally,(By→Dy) For all y, if y is a boy, then y is dirty. Everything is such that if it is a boy, then it is dirty.

Wemightfindtheinterpretationofwell-formedformuladifficultatfirst,butifyoutrytounderstandthemstep-by-step, then it might become easier. We can see in the above example that the last sentence says the same as “Every boy is dirty”, which is just what the well-formed formula means. We will use the same translation scheme as before to understand the meaning of the well-formed formula.

∀1. zDz

Everything is dirty.

∀2. z(Dz→Dz)

Everything that is dirty is dirty.

Here are some more examples. ∀y ~ Dy: Everything is not D~∀y Dy: Not everything is D

The second well-formed formula above actually means “It is not the case that EVERYTHING IS D.” So it says that noteverythingisD.ThisisofcoursethesameassayingthatsomethingisnotD.Refertothefigurebelow.

Page 23: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

13

D

Suppose the gray region represents everything that is D. The area outside the gray region represents things that are not D. To say that not everything is D is to say that something exists in the class represented by the region outside the D circle. So this is the same as saying that something is not D.

~• ∀y ~ Dy: It is not the case that everything is not D (In other words, something is D!)∃• yDy: Something is D∃• y ~ Dy: Something is not D~• ∃yDy: It is not the case that something is D (So everything is not D)~• ∃y ~ Dy: It is not the case that something is not D (So everything is D)

As you can see, some of these wffs are equivalent to each other:∀• yDy≡~∃y ~ Dy~• ∀yDy≡∃y ~ Dy∀• y~Dy≡~∃yDy~• ∀y~Dy≡∃yDy

Example:The following are all examples of universal properties:

Every cloud has a silver lining.1. All the bells in heaven shall ring.2. Each student must hand in homework.3. Nobody knows the trouble I seen.4. Roses are red.5. Jim doesn’t know anybody who can sign his bail application.6.

Example: The following are all examples of existential properties:

Something’s got into the tank.1. There is a tavern in the town.2. I heard it from one of your friends.3. A mad dog has bitten Robert.4. Some people prefer logic.5.

Page 24: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

14

SummaryIn mathematical logic, a propositional calculus or logic (also called sentential logic) is a formal system in which •formulas of a formal language may be interpreted as representing propositions.In mathematics, a logical value, also called a truth value, is a value indicating the relation of a proposition to •truth. In classical logic, the truth values are true and false.Venn diagrams or set diagrams are diagrams that show all hypothetically possible logical relations between •finitecollectionsofsets(aggregationofthings).Theyareusedtoteachelementarysettheory,aswellasillustratesimple set relationships in probability, logic, statistics, linguistics and computer science.In logic, a logical connective (also called a logical operator) is a symbol or word used to connect two or more •sentences (of either a formal or a natural language) in a grammatically valid way, such that the compound sentence produced has a truth value dependent on the respective truth values of the original sentences.Each logical connective can be expressed as a function, called a truth function. For this reason, logical connectives •are sometimes called truth-functional connectives. The most common logical connectives are binary connectives (also called dyadic connectives) which join two sentences whose truth values can be thought of as the function’s operands.Tautology is an unnecessary or unessential repetition of meaning, using different and dissimilar words that •effectively say the same thing.Inlogic,quantificationisthebindingofavariablerangingoveradomainofdiscourse.Thevariablethereby•becomesboundbyanoperatorcalledaquantifier.Academicdiscussionofquantificationrefersmoreoftentothis meaning of the term than the preceding one.Ingrammar,aquantifierisatypeofdeterminer,suchasallormany,thatindicatesquantity.Theseitemshave•beenarguedtocorrespondtologicalquantifiersatthesemanticlevel.

ReferencesSimpson, S. G., 2010. • Mathematical Logic, Logic, Pennsylvania state university press.Schwichtenberg, H., 2004. • Mathematical Logic, Logic, Mathematics Institute University Munchen.Lal, A. K., • Lecture Notes on Discrete Mathematics, [Pdf] Available at: <http://home.iitk.ac.in/~arlal/book/mth202.pdf> [Accessed 20 June 2013].Lovasz, L. & Vesztergombi, K., • Discrete Mathematics, [Pdf] Available at: <http://www.cims.nyu.edu/~regev/teaching/discrete_math_fall_2005/dmbook.pdf> [Accessed 20 June 2013].nptelhrd, 2007. • Lecture 1 - Propositional Logic, [Video online] Available at: <http://www.youtube.com/watch?v=xlUFkMKSB3Y> [Accessed 20 June 2013].nptelhrd, 2007. • Lecture 1 - Propositional Logic, [Video online] Available at: <http://www.youtube.com/watch?v=xlUFkMKSB3Y&list=PL0862D1A947252D20> [Accessed 20 June 2013].

Recommended ReadingNerode, A. & Shore, R. A., • Logic for Applications, Mathematical Logic, 2nd ed., Springer Textbooks.Hinman, P. G., 2005. • Fundamentals of Mathematical logic, Logic, A K Peters, Ltd.Kleene, S. C., 2002. • Mathematical logic, Proof and theory, Courier Dover Publications.

Page 25: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

15

Self Assessment

A] If p: Prakash is obedient. q: Prakash is handsome. Write the statements in symbolic form for the following.

Prakash is obedient but not handsome.1. a.

b. c. d.

Prakash is obedient as well as handsome.2.

a. b. c. d.

Prakash is neither obedient nor handsome.3.

a. b. c. d.

What is the logical negation of the following statement?4. “Indians are intelligent and obedient”

a. b. c. d.

B] Negate the following statements.∀5. x, ∃y, (x + y > xy)

∀a. x, ∃y, (x - y > xy)∀b. x, ∃y, (x + y < xy)∃c. x, ∀y,(x+y≤xy)∃d. y, ∀x,(x-y≤xy)

∃6. x, ∀y, (x2 + y2 +2 = 0)∃a. x, ∀y, (x + y +2 = 0)∃b. x, ∀y, (x - y - 2 = 0)∃c. x, ∀y, (x2 - y2 - 2 = 0)∃d. x, ∀y, (x2 + y2+2≠0)

Page 26: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

16

∃7. x, ∀y,(x+y≤xy)∀a. x, ∃y, (x + y > xy)∃b. x, ∀y, (x - y > xy)∀c. x, ∃y,(x+y≥xy)∃d. x, ∀y,(x-y≥xy)

∀8. x, ∃y, (x2 + y2+2≠0)∃a. x, ∀y, (x2 + y2+2≠0)∃b. x, ∀y, (x2 - y2 - 2 = 0)∀c. x, ∃y, (x2 + y2+2≠0)∃d. x, ∀y, (x2 + y2 +2 = 0)

What is the contrapositive form of “If study then I pass”9. ~p→qa. ~p←qb. ~p→~qc. ~p↔~qd.

Translatethefollowingstatementintosymbolicformusingquantifiers.10. “Some men do not like cat”, if M is set of all men, C = cats

∃a. x ∈ ~C∃b. x ∋ ~C∃c. x ∈ M, (C(x))∃d. x ∈ M, (~C(x))

Page 27: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

17

Chapter II

Combinatorics

Aim

The aim of this chapter is to:

explain counting theory•

highlight the idea of pigeonhole principle•

explicate the techniques, permutation and combination•

Objectives

The objectives of this chapter are to:

explain the basic principles of counting theory•

describe the concept of permutation and combination•

elucidate problems using tree diagrams•

Learning outcome

At the end of this chapter, you will be able to:

understand the probabilities of discrete events•

identify counting problems using sum and product rules•

recognise the techniques to solve problems using permutation and combination theorems•

Page 28: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

18

2.1 IntroductionCombinatorics is the study of arrangements of objects, which is an important part of discrete mathematics. This subject was studied in seventeenth century, when combinatorial questions arose in the study of gambling games. The important part of combinatorics is counting of objects with certain properties. Counting theory has several uses. Few of them have been mentioned below:

It is used to determine the complexity of algorithms•It is also required to determine whether there are enough telephone numbers or internet protocol addresses to •meet demand.

Another important combinatorial tool is the pigeonhole principle which we will study in this chapter, this states that when objects are placed in boxes and there are more objects than boxes, then there is a box containing at least two objects.We can phrase many counting problems in terms of ordered or unordered arrangements of the objects of a set. These arrangements, called permutations and combinations, are used in many counting problems.

A password on a computer system consists of six, seven or eight characters. Each of these characters must be a digit or a letter of the alphabet. Each password must contain at least one digit. How many such passwords are there? The technique needed to answer such questions and a wide variety of other counting problems will be introduced in this chapter.

2.2 Basic Counting PrinciplesIn counting theory, we will focus on two basic counting principles, which are explained below:

Fig. 2.1 Basic rules of counting principles2.2.1 The Sum RuleIf a task can be done in n1 ways and a second task in n2 ways, and if these two tasks cannot be done at the same time, then there are n1 + n2 ways to do either of the tasks.

Example:The department will award a free computer to either a Computer Science (CS) student or a CS professor. How many different choices are there, if there are 530 students and 15 professors? There are 530 + 15 = 545 choices.

Generalised sum ruleIf we have tasks T1, T2, …, Tm that can be done in n1, n2, …, nm ways respectively, and no two of these tasks can be done at the same time, then there are n1+ n2+….+ nm ways to do one of these tasks.

2.2.2 The Product RuleSuppose that a procedure can be broken down into two successive tasks. If there are n1waystodothefirsttaskandn2waystodothesecondtaskafterthefirsttaskhasbeendone,thentherearen1.n2 ways to do the procedure.

Counting Principle

SUM Rule

PRODUCT Rule

Page 29: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

19

Example:How many different license plates are there which contain exactly three English letters?Solution:Thereare26possibilitiestopickthefirstletter,then26possibilitiesforthesecondone,and26forthelastone.So,there are 26⋅26⋅26 = 17576 different license plates.

Generalised product ruleIf we have a procedure consisting of sequential tasks T1, T2… Tm that can be done in n1, n2… nm ways, respectively, then there are n1 ⋅ n2 ⋅… ⋅ nm ways to carry out the procedure.

The sum and product rules can also be phrased in terms of set theory.

Sum rule: Let A1, A2… Am be disjoint sets. Then the number of ways to choose any element from one of these sets is, |A1 ∪ A2 ∪… ∪ Am | = |A1| + |A2| + … + |Am|.

Product rule: Let A1, A2… Ambefinitesets.ThenthenumberofwaystochooseoneelementfromeachsetintheorderA1, A2… Am is,|A1 × A2 ×… × Am | = |A1| ⋅ |A2| ⋅… ⋅ |Am|.

2.2.3 Inclusion and ExclusionWhen two tasks can be done at the same time, we cannot use the sum rule to count the number of ways to do one of the two tasks. Adding the number of ways to do each task leads to an over count, since the ways to do both tasks are counted twice. To correctly count the number of ways to do one of the two tasks, we add the number of ways to do each of the two tasks and then subtract the number of ways to do both tasks. This technique is called the Principle of inclusion-exclusion.

Example:

How many bit strings of length 8 either start with a 1 or end with 00?

Task 1: Construct a string of length 8 that starts with a 1.

Thereisonewaytopickthefirstbit(1),

two ways to pick the second bit (0 or 1),

two ways to pick the third bit (0 or 1),

.

..

two ways to pick the eighth bit (0 or 1).

Product rule: Task 1 can be done in 1⋅27 = 128 ways.

Task 2:

Construct a string of length 8 that ends with 00.

Therearetwowaystopickthefirstbit(0or1),

two ways to pick the second bit (0 or 1),

Page 30: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

20

.

..

two ways to pick the sixth bit (0 or 1)

one way to pick the seventh bit (0) and

one way to pick the eighth bit (0)

Product rule: Task 2 can be done in 26 = 64 ways

Since there are 128 ways to do Task 1 and 64 ways to do Task 2, does this mean that there are 192 bit strings either starting with 1 or ending with 00? No, because here, task 1 and task 2 can be done at the same time. When we carry out task 1 and create strings starting with 1, some of these strings end with 00. Therefore, we sometimes do tasks 1 and 2 at the same time, so the sum rule does not apply. If we want to use the sum rule in such a case, we have to subtract the cases when Tasks 1 and 2 are done at the same time.

Howmanycasesarethere,thatis,howmanystringsstartwith1andendwith00?Thereisonewaytopickthefirstbit (1), two ways for the second… sixth bit (0 or 1), one way for the seventh, eighth bit (0).

Product rule: In 25 = 32 cases, Tasks 1 and 2 are carried out at the same time.

Since there are 128 ways to complete Task 1 and 64 ways to complete Task 2, and in 32 of these cases, tasks 1 and 2 are completed at the same time, there are 128 + 64 – 32 = 160 ways to do either task. In set theory, this corresponds to sets A1 and A2 that are not disjoint. Then we have:|A1 ∪ A2| = |A1| + |A2| - |A1∩A2|This is called the principle of inclusion-exclusion.

2.2.4 Tree DiagramsCounting problems can be solved using tree diagrams. A tree consists of a root, a number of branches leaving the root, and possible additional branches leaving the endpoints of other branches. To use trees in counting, we use a branch to represent each possible choice. We represent the possible outcomes by the leaves, which are the endpoints of branches not having other branches starting at them.Example:How many bit strings of length four do not have two consecutive 1s?

Page 31: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

21

Fig. 2.2 Bit strings of length four without consecutive 1sThere are 8 strings.

2.3 The Pigeonhole PrincipleThefirst versionof this principlewaswritten byDirichlet in 1834who called it “Schubfachprinzip” (drawerprinciple), according to an observation he made of how socks were arranged in his drawers. In some countries like Russia,itiscalledthe“Dirichlet’sprinciple”or“theDirichlet-Schlafli’sboxprinciple”.InEnglish,itiscalledthepigeonhole principle, inspired by a pigeon house.

In mathematics, the pigeonhole principle states that if n objects are placed into m boxes, and if n > m, then there is at least one box with at least two objects in it.Anotherformulationwouldbethatmboxescannotcontainmorethanmobjectswithasingleobjectineach;addan object and one of the boxes must be used twice.

Illustration:Supposethataflockofpigeonsfliesintoasetofpigeonholestoroost.Thepigeonholeprinciplestatesthatifthereare more pigeons than pigeonholes, then there must be at least one pigeonhole with at least two pigeons in it (refer tothefigurebelow.).Thisprincipleappliestootherobjectsbesidespigeonsandpigeonholes.

Fig. 2.3 More pigeons than pigeonholes

The Pigeonhole Principle“If (k+1) or more objects are placed into k boxes, then there is at least one box containing two or more of the objects”.

1stbit

2ndbit

3rdbit

4thbit

0

1

0

0

0

0

00

0

0

0

01

11

1

1

1

Page 32: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

22

Prove by ContradictionSuppose that the theorem is false and derive a contradiction. Suppose that none of the k boxes contains more than one object. Then, the total number of objects would be at the most k. This is a contradiction, because there are at least k + 1 objects.Example 1: If there are 11 players in a soccer team that wins 12-0, there must be at least one player in the team who scored at least twice.Example 2: If you have 6 classes from Monday to Friday, there must be at least one day on which you have at least two classes.Example 3:Assume you have a drawer containing a random distribution of a dozen brown socks and a dozen black socks. It is dark, so how many socks do you have to pick to be sure that among them there is a matching pair? There are two types of socks, so if you pick at least 3 socks, there must be either at least two brown socks or at least two black socks.Generalised pigeonhole principle: ⋅3/2⋅ = 2.

The Generalised Pigeonhole Principle If N objects are placed into k boxes, then there is at least one box containing at least ⎡N/k⎤ of the objects.Prove by contradiction:Suppose that the theorem is false and derive a contradiction. Suppose that none of the boxes contains more than ⎡N/k⎤−1objects.Usingtheinequality⎡N/k⎤ < (N/k) + 1, the total number of objects is at most

This is a contradiction because there are a total of N objects.Example 1: In a 60-student class, at least 12 students will get the same letter grade (A B C D or F)Example 2: In a 61-student class, at least 13 students will get the same letter grade.

2.4 Permutations and CombinationsBefore understanding Permutation and combination, it is important to understand the term ‘Factorial’.Factorial Notationn!,pronouncednfactorialcanberepresentedasfollows; (n)(n - 1)(n - 2). . . (3)(2)(1)

Example:3! = (3)(2)(1) = 6 4! = (4)(3)(2)(1) = 24 5! = (5)(4)(3)(2)(1) = 120 6! = (6)(5)(4)(3)(2)(1) = 720

The Multiplication PrincipleSuppose n choices must be made, with m1 ways to make choice 1, and for each of these ways, m2 ways to make choice 2, and so on, with mn ways to make choice n. Then there are m1⋅m2⋅…⋅mn different ways to make the entire sequence of choices.

2.4.1 Permutation“A permutation is one of the different arrangements of a group of items where order matters”.Whenordermatters,AB≠BA

Page 33: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

23

Example:Consider the following:Given 3 people, Bob, Mike and Sue, how many different ways can these three people be arranged, as far as an order matters?Let BMS stand for the order of Bob on the left, Mike in the middle and Sue on the right. Since order matters, a differentarrangementisBSM.WhereBobisontheleft,SueisinthemiddleandMikeisontheright.Ifwefindallpossible arrangements of Bob, Mike and Sue where order matters, we have the following:BMS, BSM, MSB, MBS, SMB, SBMThe number of ways to arrange three people three at a time is: 3! = (3)(2)(1) = 6 ways

Apermutationofr(wherer≥1)elementsfromasetofnelementsisanyspecificorderingorarrangement,withoutany repetition of the r elements. Each rearrangement of the r elements is a different permutation. The number of permutationsofnthingstakenratatime(withr≤n)iswrittenas:

P (n, r) or

IfP(n,r)(wherer≤n)isthenumberofpermutationsofnelementstakenratatime,then,

P (n, r) =

Points to be remember

If you want to arrange 3 people in groups of 3 at a time, there are 3! ways to accomplish this task. •If you want to arrange 4 people in groups of 4 at a time, there are 4! ways to accomplish this task. •If you want to arrange n objects in groups of n at a time, there are n! ways to accomplish this task.• = n!•

Example:I. Three married couples have bought six seats in a row for a performance of a musical comedy.

In how many ways can they be seated?a. 6! = 720

In how many ways can they be seated if each couple is to sit together with the husband to the left of his b. wife?3! = 6

In how many ways can they be seated if each couple is to sit together?c. 3! !2! !2! ×2! = 48

In how many ways can they be seated if all the men are to sit together and all the women are to sit d. together?2! ×3! ×3! = 72

II. In how many ways can 8 people A, B, C, D, E, F, G and H be seated in a row if there are no restrictions on seating arrangement:a. 8! = 40320

persons A and B must not sit next to each other:b. 8!−7!×2!=30240

Page 34: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

24

2.4.2 CombinationsA combination is an arrangement of a group of items where order does not matter.When order does not matter, AB = BA.

Example:Consider the following: Given 3 people, Bob, Mike and Sue, how many different ways can these three people be arranged where order does not matter?

Solution:Since order does not matter, any arrangement with Bob, Mike and Sue is considered the same arrangement. Therefore, the only arrangement is BMS.Now suppose we want to take four people, Bob, Mike, Sue and Alice, and arrange them in groups of three at a time where order does not matter. The following demonstrates all the possible arrangements. BMS, MSA, BMA, BSAThere are 4 ways to arrange 4 people in groups of 3 at a time.

Acombinationofr(wherer≥1)elementsfromasetofnelementsisasubsetofrelementswithoutregardtoorder.IfC(n,r)or()denotesthenumberofcombinationsofnelementstakenratatime,wherer≤n,then

Remark: and

Example:Find the number of ways to pick 4 people and place them in groups of 3 at a time, where order does not matter. Solution:Since order does not matter, use the combination formula.C (4,3) = Thereare4waystoarrange4items;taken3atatime,whenorderdoesnotmatter.

Example:Find the number of ways to take 20 objects and arrange them in groups of 5 at a time where order does not matter.

Solution:C (20,5) = Thereare15,504waystoarrange20objects;taken5atatime,whenorderdoesnotmatter.

Example:In the State Lotteries, will we use a combination or a permutation?

Solution:If order matters, then it is a permutation. If order does not matter, then it is a combination. Do the numbers on a ticket have to be in the same order as the order in which they became the winning numbers? In other words, let’s say the winning numbers rolled out of the machine in the order of: 1,2,3,4,5,6. Do the numbers on your ticket have to be in this same order to win? Or will any order such as 2,3,1,5,6,4 also be a winning ticket? The answer is, any order of the winning numbers will produce the winning ticket. Thus, the lotteries are combinations.

2.4.3 Permutations with Indistinguishable ObjectsTheorem 1:The number of different permutations of n objects, where there are n1 indistinguishable objects of type 1, n2 indistinguishable objects of type 2, and nk indistinguishable objects of type k, is

Page 35: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

25

Examples:I. How many strings can be made by reordering the letters of the word “daricks”?II. How many strings can be made by reordering the letters of the word “darickschan”?III. How many strings can be made by reordering the letters of the word “darickswaihongchan”?

Theorem 2:The number of ways to distribute n distinguishable objects into k distinguishable boxes so that ni objects are placed into box i, i = 1,2,…, k , equals

Examples:

In a class of 20 students, 5 of them will get Grade A, 10 of them Grade B, 3 of them Grade C, and 2 will be fail. How many grade distributions are possible among 20 students?

How many ways can we distribute a standard deck of 52 playing cards into 4 sets of 13 cards each?

Page 36: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

26

SummaryIn Combinatorics, the rule of sum or addition principle is a basic counting principle. Stated simply, it is the •idea that if we have a ways of doing something and b ways of doing another thing and we can not do both at the same time, then there are a + b ways to choose one of the actions.The inclusion-exclusion principle can be thought of as a generalisation of the rule of sum in that it too enumerates •the number of elements in the union of some sets (but does not require the sets to be disjoint).In mathematics and computer science, the pigeonhole principle states that if n items are put into m pigeonholes •withn>m, thenat leastonepigeonholemustcontainmorethanoneitem.This theoremisexemplifiedinreal-life by truisms like “there must be at least two left gloves or two right gloves in a group of three gloves”. It is an example of a counting argument, and despite seeming intuitive it can be used to demonstrate possibly unexpected results.In elementary combinatorics, the name “permutations and combinations” refers to two related problems, both •counting possibilities to select k distinct elements from a set of n elements, where for k-permutations the order of selection is taken into account, but for k-combinations it is ignored. However k-permutations do not correspond to permutations of n objects unless k = n.

ReferencesJohnsonbaugh, R., 2008. • Discrete Mathematics, 7th ed., Basic Counting Principle, Prentice Hall.Vatsa, B. S. & Vatsa, S., 2009. • Discrete Mathematics, Pigeonhole Principle, New Age International.Combinatorics• , [Pdf] Available at: <http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter3.pdf> [Accessed 20 June 2013].Cameron, P. J., • Notes on Combinatorics, [Pdf] Available at: <http://www.maths.qmul.ac.uk/~pjc/notes/comb.pdf> [Accessed 20 June 2013].eHow, 2012. • Introduction to Combinatorics : Principles of Math, [Video online] Available at: <http://www.youtube.com/watch?v=jrLYCzCc77g> [Accessed 20 June 2013].bethjonesmath, 2008. • Introduction to Combinatorics (part 1) [Video online] Available at: <http://www.youtube.com/watch?v=cErUmuxraQ0> [Accessed 20 June 2013].

Recommended ReadingKoshy, T., 2004. • Discrete mathematics with applications, Combinatorics and Discrete Mathematics, Elsevier Academic Press.Hein, J. L., 2009. • Discrete Structures, Logic, and Computability, Permutation and Combinations, Jones and Bartlett Learning.Merris, R., 2004. • Combinatorics, 2nd ed., John Wiley & Sons.

Page 37: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

27

Self AssessmentWhenbuildingahouse,Bobcanchoosefromfourdifferentlots,threedifferenthousestyles,andfivedifferent1. floorplans.Howmanydifferentpossibilitiesarethereforbuildingahouse?

60a. 30b. 40c. 50d.

Alan and Mike have ten major league baseball ballparks that they would like to visit over the next few years. If 2. they have not visited any of the parks previously and would like to visit four parks this summer, in how many ways can they organise their trip?

1000a. 2000b. 5000c. 5040d.

In the state track meet, eight sprinters will run the 100-yard dash. How many ways can gold, silver, and bronze 3. medals be awarded?

333a. 336b. 400c. 433d.

Howmanyfive-digitzipcodescanbemadewherealldigitsareuniqueifthepossibledigitsare0through9?4. 1340a. 10300b. 30240c. 3240d.

If n=5 and r=2, what is the value of 5P2? The symbol 5P2 means the number of permutations of 5 items taken 5. 2 at a time.

10a. 20b. 30c. 35d.

How many different ways can a chairperson and an assistant chairperson be selected for a research project, if 6. there are seven scientists available?

32a. 40b. 42c. 50d.

Page 38: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

28

In how many ways can three class representatives be chosen from a group of twelve students? If the order of 7. the arrangement is not important, how many outcomes will there be?

150a. 220b. 200c. 500d.

Calculate the value of 8. 9C5.126a. 226b. 124c. 224d.

Determine whether the following scenarios represent permutation.9. Selecting two types of yogurt from the grocery’s dairy case from a selection of nine.a. Choosing two books to take with you on vacation from the nine books on your shelf.b. Choosing three CDs to purchase from the music store.c. Arranging seven photographs on a page of your senior memory book.d.

Determine whether the following scenarios represent combination.10. Selecting two types of yogurt from the grocery’s dairy case from a selection of nine.a. Selecting your favourite yogurt and then your second favourite yogurt from a selection of nine.b. Selectingthreemembersfromyourclasstoworkspecifichomeworkproblemsontheboard.c. Arranging seven photographs on a page of your senior memory book.d.

Page 39: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

29

Chapter III

Mathematical Induction

Aim

The aim of this chapter is to:

explain the concept of mathematical induction•

enlist various principles of mathematical induction•

explicate various perspectives of mathematical induction•

Objectives

The objectives of this chapter are to:

explain applicability of mathematical induction•

describe methods of solving problems on mathematical induction•

explicate the principles of mathematical induction•

Learning outcome

At the end of this chapter, you will be able to:

understand the principles of mathematical induction and its application•

identify truth and falsity of statement by using induction principles•

classify the sequence and expression of a statement•

Page 40: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

30

3.1 IntroductionMathematical induction is the process of proving a general formula from particular cases. It is a technique for showing a statement, a theorem, or a formula that is asserted about every natural number.

Moreover, mathematical induction is used to establish that a given statement is true of all natural numbers. It is the methodofprovingthatthefirststatementintheinfinitesequenceofstatementsistrue,andthenprovingthatifanyonestatementintheinfinitesequenceofstatementsistrue,thensoisthenextone.

3.2 First Principle of Mathematical InductionLet, p (n) be a statement involving a natural number n.If

p (1) is true.i. p (k) is true.ii. ∴iii. p (k+1) is true, ∵ For k > 1.

Then,p(n)istrueforalln≥1

Working rule:Let p (n): given statement to be proved.Step I : Prove statement for n=1StepII :Assumethatstatementistrueforn=k;n∈ ℕ.Step III : Prove statement for n = k+1.Thenbyfirstprincipleofmathematicalinduction,theresultistrueforalln≥1.

Example 1:Provethatsumoffirstnnaturalnumbersin .

Solution:Let p (n) = 1 + 2 + 3 + … + n

= Step I: For n=1.LHS =1

RHS = ∴ LHS = RHS∴ Statement is true for n=1.

Step II: Assume tat statement is true for n = k, k ∈ ℕ.

∴ 1 +2 +3 +… +k =

Step III: Now to prove statement for n = k+1

i.e., to prove 1+ 2+ 3+…+ k+ (k+1) = Consider,LHS = 1+ 2+ 3+ …+ (k+1) = [1+2+3+…+k] + (k+1)

=

=

Page 41: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

31

=

= RHS

∴ Result is true for n = k + 1∴ By principle of mathematical induction, statement is true for any natural number n.

Example 2:Provethatsumofsquaresoffirstnnaturalnumbersis

Solution:Let,P (n) = 12 + 22 + 32 + … + n2

= i.e. to prove 12 + 22+ 32+ … + n2

=

Step I: For n =1LHS = 12=1

RHS =

=

= = 1∴ LHS = RHS∴ the statement is true for n = 1.

Step II: Assume that statement is true for n = k, k ∈ ℕ.

∴ 12 +22 +32 +… +k2 =

Step III: Now to prove statement is true for n = k+1

i. e., to prove 12+22+32+ … + k2 + (k+1)2 =

Consider,LHS = 12+22+32+ … + k2 + (k+1)2

= (12+22+32+ … + k2) + (k+1)2

=

=

=

=

=

= = RHS

Page 42: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

32

∴ Statement is true for n= k+1∴Byfirstprincipleofmathematicalinduction,statementistrueforallnaturalnumbersn.

3.3 Second Principle of Mathematical InductionStatement:Let p (n) be a statement involving a natural number n.If,

p (1) is true. (i.e., statement is true for n = 1)i. p (k) is true for all 1<k<m then p (m) is true.ii.

Then p (n) is true ∀n≥1.

Working rule:Consider p (n)Step I : Prove statement for n = 1Step II : Assume statement for 1 < k < 1 i.e., for k = 2,3,4,5 …., (m-2), (m-1) statement is true.Step III : Now to prove statement or n = m Then statement p (n) is true ∀n≥1

Example 1:Prove that integer ‘n’ can be expressed as a product of positive primes, n ≥ 2.

Solution:Let p (n): n can be expressed as product of primes n ≥ 2. : n = p1.p2.p3 … pr where pi’s are prime numbers.

Step I : For n = 2 Here ‘2’ itself a prime number. Result holds for n = 2.

Step II : Assume statement for 2 < k < m (i.e., if k < m, it can be expressed as product of primes)

Step III : Now to prove statement for n = m If m is a prime number then result is clear. Suppose m in not a prime. ∴ m is composite. ∴ m is product of two integers. Say, m = r.s … (1) Where r < m < s and r, s ∈ ℤ Here, r < m and s < m ∴ From Step II. R, s can be expressed as product of primes. Say, r = r1.r2… ri s = s1.s2… sj Where r1 … ri, s1…sj are primes. With these equation (1) becomes, m = (r1.r2…ri). (s1.s2…sj) = (Product of Primes) ∴ Statement is true for n = k +1. ∴ by second principle of mathematical induction statement is true for all n ≥ 2.

Page 43: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

33

Example 2:If u1=3, u2=5, un = 3un-1 – 2n-2 for n ≥ 3.Then using induction, show that, un = 2n +1 ∀ n ≥ 3.

Solution:Let p (n) : un = 2n +1

Step I: For n = 3. Um = 3um-1 – 2um-2 (bydefinition) = 3.2m-1 – 2.2m-2

= 3.2m-1 – 2m-2+1

= 3.2m-1 – 2m-2

= (3-1). 2m-1

= 2.2m-1

= 2m

∴ Statement is true for n = m.∴ By second principle of Mathematical induction p (n) is true ∀ n ≥ 3.

3.4 Different Perspective of Applying Mathematical Induction Principles Principle of Mathematical Induction (English)

Showsomethingworksthefirsttime.•Assume that it works for this time.•Show it will work for the next time.•Conclusion, it works all the time.•

Principle of Mathematical Induction (Mathematics)Show true for n = 1•Assume true for n = k•Show true for n = k + 1•Conclusion: Statement is true for all n >= 1•

(The key word in step 2 is assume)You are not trying to prove it’s true for n = k, you’re going to accept on faith that it is, and show it’s true for the next number, n = k + 1. If it later turns out that you get a contradiction, then the assumption was wrong.

Example:Prove that 1 + 4 + 9 + ... + n2 = for all positive integers n.Another way to write “for every positive integer n” is ∀n∈ℤ +. This works because ℤ is the set of integers, so ℤ

+ is the set of positive integers.

The ‘∀’ is the symbol for “for all” or “for every” or “for each” and the symbol that looks like a weird e is the “element of” symbol. So technically, the statement is saying “for every n that is an element of the positive integers”, but it’s easier to say “for every positive integer n”.

Solution:Identify the general term and nth partial sum before beginning the problemThe general term, an, is the last term on the left hand side. an = n2

The nth partial sum, Sn, is the right hand side. Sn =

Find the next term in the general sequence and the seriesThe next term in the sequence is ak+1 and is found by replacing n with k+1 in the general term of the sequence,

Page 44: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

34

an.ak+1 = ( k + 1 )2

The next term in the series is Sk+1 and is found by replacing n with k+1 in the nth partial sum, Sn. You may wish to simplify the next partial sum, Sk+1 Sk+1 = Sk+1 = (This will be our Goal in step 3)

Wewillusethesedefinitionslaterinthemathematicalinductionprocess.We’renowreadytobegin.

1. Show the statement is true for n = 1, that is, Show that a1 = S1.a1 is thefirst termon the left or you canfind it by substitutingn=1 into the formula for thegeneral term, an. S1 is found by substituting n=1 into the formula for the nth partial sum, Sn.LHS: a1 = 1 RHS: S1 = = = 1

So,youcanseethatthelefthandsideequalstherighthandsideforthefirstterm,sowehaveestablishedthefirstcondition of mathematical induction.

2. Assume the statement is true for n = kThelefthandsideisthesumofthefirstkterms,sowecanwritethatasSk. The right hand side is found by substituting n=k into the Sn formula.

Assume that Sk =

3. Show the statement is true for n = k+1What we are trying to show is that,

Sk+1 = .

This was our goal from earlier.

We begin with something that we know (assume) is true and add the next term, ak+1, to both sides.

Sk + ak+1 = + ak+1

On the left hand side, Sk + ak+1meansthe“sumofthefirstkterms”plus“thek+1term”,whichgivesusthesumofthefirstk+1terms,Sk+1.Assume k=10. Then Sk would be S10,thesumofthefirst10termsandak+1 would be a11, the 11th term in the sequence. S10 + a11 would be the sum of the 10 terms plus the 11thtermwhichwouldbethesumofthefirst11terms.Ontheright hand side, replace ak+1 by (k+1)2, which is what you found it was before beginning the problem.

Sk+1 = + (k + 1)2

Now, try to turn your right hand side into goal of . You need to get a common denominator, so multiply the last term by

Sk+1 = +

Now simplify. It is almost always easier to factor rather than expand when simplifying. This is especially aided by the fact that your goal is in factored form. You can use that to help you factor.

You know that you want a (k+1) (k+2) (2k+3) inthefinalform.

We see right now that there is a (k+1) that is common to both of those, so let’s begin by factoring it out.

Page 45: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

35

Sk+1 =

What’s left inside the brackets [ ] doesn’t factor, so we expand and combine like terms.

Sk+1 = Sk+1 =

Now, try to factor 2k2 + 7k + 6, keeping in mind that you need a (k+2) and (2k+3) in the goal that you don’t have yet.

Sk+1 =

ConclusionThe conclusion is found by saying “Therefore, by the principle of mathematical induction” and restating the original claim.

Therefore, by the principle of mathematical induction, 1 + 4 + 9 + ... + n2 = for all positive integers n

3.5 Steps to Use Mathematical InductionAnyinfinitesequenceofstatementisprovedtrueorfalsebymathematicalinductionthrough2steps.

Basis or Base step is to prove that the statement is true for the lowest value of the statement.•Inductive step is to show that, if the statement is true for some natural number n then it is also true when n+1 •is substituted in place of n.

The assumption in second step that the statement is true for some n is called Induction Hypothesis.Let's use the Mathematical induction to prove the following statement.1 + 3 + 5 + .............. + (2n - 1) = n2 is true for all natural numbers.This statement gives the formula for sum of odd natural numbers less than or equal to n.Toprovethestatementbymathematicalinduction,firststepistoproveBasestep.LetthestatementbeP(n).Base step: In this step, it should be proved that the statement is true for lowest value, that is P(1) = 1, substitute 1 in place of n.1 = 12

1 = 1Both sides are equal, so the statement is true for n = 1.Inductive step: Let us assume that P(n) is true.1 + 3 + 5 +................. + (2n - 1) = n2

It must than be shown that P(n + 1) is also true.1 + 3 + 5 + ................ + (2n -1) + (2n + 1)= n2 + (2n + 1)= n2 + 2n + 1= (n + 1)2

Thereby, showing that P(n + 1) is true.

Since both, the Base and Inductive step have been proved, it has been proved by mathematical induction that P (n) is true for all natural number.

Page 46: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

36

The Inductive step is another way to say that, if P (1) is true then P (2) is true, if P (2) is true then P (3) is true, if P (3) is true then P (4) is true and so on.

Mathematicalinductionisjustashortcutthatdefinesinfinitenumberofsuchstepsintotwostepsabove.

Solved examples on Mathematical Induction

1. Use mathematical induction to prove that, 1+2+3+ … + n = for all positive integers n.Solution:

Let the statement P (n) be

1 + 2 + 3 + ... + n =

STEP1:Wefirstshowthatp(1)istrue.

LHS = 1

RHS = = 1

Both sides of the statement are equal. Hence, p (1) is true.

STEP 2: We now assume that p (k) is true.

1 + 2 + 3 + ... + k = and show that p (k + 1) is true by adding k + 1 to both sides of the above

statement.

1 + 2 + 3 + ... + k + (k + 1) = + (k + 1)

= (k + 1) ( + 1)

=

The last statement may be written as

1 + 2 + 3 + ... + k + (k + 1) =

This is the statement p(k + 1)

2. Prove that 12 + 22 + 32 + ... + n2 = , for all positive integers n.Solution:

StatementP(n)isdefinedby

12 + 22 + 32 + ... + n2 =

Page 47: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

37

STEP1:Wefirstshowthatp(1)istrue.

LHS = 12 = 1

RHS = = 1

Both sides of the statement are equal. Hence, p (1) is true.

STEP 2: We now assume that p (k) is true.

12 + 22 + 32 + ... + k2 = and show that p (k + 1) is true by adding (k + 1) 2 to both sides of the above statement.

12 + 22 + 32 + ... + k2 + (k + 1)2 = + (k + 1)2

Set common denominator and factor k + 1 on the right side.

=

Expand k (2k + 1) + 6 (k + 1)

=

Now factor 2k2 + 7k + 6.

=

We have started from the statement P (k) and have shown that,

12 + 22 + 32 + ... + k2 + (k + 1)2 =

This is the statement P (k + 1).

Use mathematical induction to prove that, 1.

13 + 23 + 33 + ... + n3 = for all positive integers n.Solution:

StatementP(n)isdefinedby,

13 + 23 + 33 + ... + n3 =

STEP1:Wefirstshowthatp(1)istrue.

LHS = 13 = 1

RHS = = 1

Page 48: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

38

Hence, p (1) is true.

STEP 2: We now assume that p (k) is true.

13 + 23 + 33 + ... + k3 =

Add (k + 1)3 to both the sides.

13 + 23 + 33 + ... + k3 + (k + 1)3 = + (k + 1)3

factor (k + 1)2 on the right side

= (k + 1)2 [ + (k + 1)]

Set to common denominator and group.

=

=

We have started from the statement P(k) and have shown that

13 + 23 + 33 + ... + k 3 + (k + 1) 3 =

This is the statement P (k + 1).

Prove that for any positive integer number n, n2. 3 + 2 n is divisible by 3.Solution:

StatementP(n)isdefinedby,

n3 + 2 n is divisible by 3

STEP1:Wefirstshowthatp(1)istrue.Letn=1andcalculaten3 + 2n

13 + 2(1) = 3

3 is divisible by 3

Hence, p (1) is true.

STEP 2: We now assume that p (k) is true

k3 + 2 k is divisible by 3 is equivalent to k3 + 2k = 3 M, where M is a positive integer.

We now consider the algebraic expression (k + 1)3+2(k+1);expanditandgroupitliketerms:

(k + 1)3 + 2 (k + 1) = k 3 + 3 k 2 + 5 k + 3

Page 49: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

39

= [k3 + 2 k] + [3k2 + 3 k + 3]

= 3 M + 3 [k2 + k + 1] = 3 [M + k2 + k + 1] Hence, (k + 1)3 + 2(k + 1) is also divisible by 3 and therefore, statement P (k + 1) is true.

Page 50: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

40

SummaryMathematical induction is a method of mathematical proof typically used to establish that a given statement is •true of all natural numbers (non-negative integers). Themethodcanbeextendedtoprovestatementsaboutmoregeneralwell-foundedstructures,suchastrees;this•generalisation, known as structural induction, is used in mathematical logic and computer science. Mathematical induction in this extended sense is closely related to recursion.Mathematical induction should not be misconstrued as a form of inductive reasoning, which is considered non-•rigorous in mathematics. Mathematical induction is a form of rigorous deductive reasoning.•The principle of mathematical induction is usually stated as an axiom of the natural numbers.•The simplest and most common form of mathematical induction proves that a statement involving a natural •number n holds for all values of n.The proof consists of two steps, a) the basis (base case): showing that the statement holds when n is equal to •the lowest value that n is given in the question. Usually, n = 0 or n = 1. b) The inductive step: showing that if the statement holds for some n, then the statement also holds when n + 1 is substituted for n.

ReferencesLangote, U. B. & Vhanmane, M. M., 2009. • Discrete Mathematics, Mathematical Induction, 2nd ed., Tech-Max Publication.Rosen, K., 2007. • Discrete Mathematics, Mathematical Induction, 6th ed., McGraw Hill publication.Davis, T., • Mathematical Induction, [Pdf] Available at: <http://www.math.utah.edu/mathcircle/notes/induction.pdf> [Accessed 20 June 2013].Mathematical Induction,• [Pdf] Available at: <http://www.people.vcu.edu/~rhammack/BookOfProof/Induction.pdf> [Accessed 20 June 2013].bullcleo1, 2010. • Mathematical Induction [Video online] Available at: <http://www.youtube.com/watch?v=QHkG0d5kZvE> [Accessed 20 June 2013].AbsoluteMathematics, 2011. • Mathematical Induction [Video online] Available at: <http://www.youtube.com/watch?v=Uqn3f2k4vrA> [Accessed 20 June 2013].

Recommended ReadingFomin, D., Genkin, S. & Itenberg, I., 1996. • Mathematical Circles (Russian Experience), AMS.Graham, R., Knuth, D. & Patashnik, O., 1994. • Concrete Mathematics, 2nd ed., Addison-Wesley.Courant, R. & Robbins, H., 1996. • What is Mathematics?, Oxford University Press.

Page 51: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

41

Self AssessmentLetS(n)=2n−1.EvaluateS(k)1.

k - 1a. k - 2b. 2k - 1c. (k – 1)d. 2

LetS(n)=2n−1.EvaluateS(k+1)2. k + 2 a. 2k + 1b. k + ½c. (k + 1)d. 2

Thesumofthefirstnoddnumbersisequaltothenthsquare.1+3+5+7+...+(2n−1)=n².Toprovethis3. by mathematical induction, what will be the induction assumption?

2ka. kb. 2

k + 2c. k/2d.

How many properties are there in induction principle?4. Onea. Twob. Threec. Fourd.

Inductionisadefiningdifferencebetweendiscreteand_____________mathematics.5. continuousa. non-continuousb. realc. non-reald.

Mathematical induction is based on which of the following concepts?6. Hypothesisa. Real timeb. Induction principlec. Othersd.

Page 52: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

42

Contradictory proof of mathematics can be formulated by ___________.7. inductiona. functionb. relationc. differentiationd.

Mathematical induction is the method of proving statement true for all ___________ numbers.8. evena. oddb. naturalc. primed.

In mathematical induction, which of the following is true, if p (n) is a statement involving a natural number?9. P(1)a. P (r)b. P (k) c. ≠ 0P (k+1) d. ≠0

According to second principle of mathematical induction, statement is true for all ____________.10. na. n – 1b. n > 1c. n d. ≥ 1

Page 53: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

43

Chapter IV

Recurrence Relation

Aim

The aim of this chapter is to:

explain the concept of recurrence relation•

describe the construction of recurrence relation•

introduce homogeneous and non-homogeneous recurrence relation•

Objectives

The objectives of this chapter are to:

explicate the characteristic equation of recurrence relation•

explain discrete and constant functions of variables in recurrence relation•

emphasise on various terminologies and concepts of recurrence relation •

Learning outcome

At the end of this chapter, you will be able to:

differentiate between homogeneous and non-homogenous recurrence relation•

solve problems on characteristic roots and characteristic equation•

calculate the degree of recurrence relation•

Page 54: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

44

4.1 IntroductionIn computer science, recursive techniques are useful in algorithms, programmes etc.The recursive formula is called recurrencerelation,inwhichifweknowthefirstfewtermsofasequence,thenbyusingpreviousterms,wecanfindallremainingterms.Recurrencerelationsarisenaturallyinmanycountingproblemsandprogrammeanalysisproblems and programme analysis problems.

4.2 Definition of Recurrence Relation If a1, a2, a3… ar be a sequence, then relation that relates ar to one or more previous terms of sequence is called Recurrence Relation.

Todefinesequencecorrespondingtorecurrencerelation,itisimportanttoknowfirstfewterms,whicharecalledas initial conditions of recurrence relation.

Example:1) ar = ar-1 + with initial condition a0 = 10. It generates the sequence a0 = 10, a1 = 15, a2 = 20 … i.e., <10, 15, 20, 25, …>2) Fibonacci sequence: fn = fn-1 + fn-2 with initial conditions f0 = 1, f1 =1.It generates f0 = 1, f1 =1, f2 =2, f3 = 3, f4 = 5, f5 = 8 …i.e., <1, 1, 2, 3, 5, 8, 13, 21, … >

If we change initial conditions, then the corresponding sequence also changes.

Example: ar = ar-1 +2 with a0 =1 Corresponding sequence is, <1, 3, 5, 7, 9, 11 ...> sequence of odd numbers. Now if we take the same recurrence relation: Ar = ar-1 +2 with a0 = 2 Corresponding sequence is, <2, 4, 6, 8 … >, sequence of even numbers.

4.2.1 Linear Recurrence Relation with Constant CoefficientsLet a1, a2, a3 … an…beinfinitesequencethenrecurrencerelationoftheformc0 ar + c1 ar-1 + c2 ar-2 + c3 ar-3 + … + ck ar-k = f(r). Where areconstants,suchfunctioniscalledlinearrecurrencerelationwithconstantcoefficient.

4.3 Construction of Recurrence RelationExample 1:Sharma invests Rs.10,0000/- to purchase a land. Land cost increases by 20% per year. From recurrence relation, what will be the cost of land after ‘n’ years?

Solution:Initially land cost = Rs.100000/- i.e., a0 = 100000, suppose an is the land cost after n years.

Page 55: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

45

We observe following table:No. of years Initial land cost at starting of nth year 20% increases land cost Land cost at end of nth year

0 100000 00 100000

1 100000 100000 + 20000 = 120000

2 120000

: : :n-1 --- ---

N an-1

Table 4.1 Solution to Example 1

∴ Land cost at the end of nth year will be with initially a0 = 100000.

4.3.1 Degree of Recurrence RelationNumberofprevioustermsrequiredtofindnexttermofsequenceinrecurrencerelationiscalleddegreerecurrencerelation.i.e., Let, c0 ar + ci ar-1 + c2ar-2 + ... + ck ar-k =f(r)isrecurrencerelation.Tofindthevalueofar,itisimportanttoknowthe previous terms, namely, ar-1, ar-2 ... ar-k. Hence, k is a degree of above recurrence relation.

Example: Find degree of recurrence relation.

Solution:Here,werequiretwovaluesofar-1,ar-2,tofindvalueofar. Hence, degree of recurrence relation is 2.

4.3.2 Characteristic Equation of Recurrence RelationIf c0 ar + c1 ar-1 + c2 ar-2 + ... + ck ar-k + f(r) Berecurrencerelationwithconstantcoefficientofdegreekthenequationofthetypec0α

k + c1αk-1 + c2 α

k-2 + c3αk-3 + ... + ckα

(k-k) = 0where,αisconstant.Such equation is called characteristic equation of recurrence relation.

4.3.3 Characteristic Roots of Recurrence RelationRoots of characteristic equation of recurrence relation are called as Characteristic roots of recurrence relation. i.e., valuesofvariableαwhichsatisfythecharacteristicequationarecalledascharacteristicroots.Sayα1,α2,α3,...,αk are k characteristic roots.

Degree of recurrence relation = number of characteristic rootsAll characteristic roots may not be distinct.

Example:Find characteristic equation and characteristic roots of recurrence relation.ar- 7 ar-1 +12 ar-2 = 0

Page 56: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

46

Solution:Degree of recurrence relation is k =2.Characteristic equation is,⇒1.αk-7αk-1+12αk-2 = 0 as k=2⇒1.α 2 -7α2-1+12α2-2 = 0⇒α-7α+12=0

Characteristic roots are,⇒α2 -7α+12=0⇒(α–3)(α–4)=0⇒α=3orα=4⇒α=(3,4)aretwocharacteristicroots.

4.3.4 Homogeneous Recurrence RelationRecurrence relation of the type c0 ar + c1 ar-1 +c2 ar-2 + ... + ck ar-k = f(r) is non homogenous recurrence relation, if f(r)=0.i.e., c0 ar + c1 ar-1 +c2 ar-2 + ... + ck ar-k = 0, is a homogenous recurrence relation.

4.3.5 Non-homogenous Recurrence RelationRecurrence relation of the typec0 ar + c1 ar-1 +c2 ar-2 + ... + ck ar-k=f(r)isanon-homogenousrecurrencerelation,iff(r)≠0i.e., f(r) may be constant or any function of variable ‘r’.

4.4 Solution of Recurrence RelationNumeric function described by recurrence relation together with an appropriate set of initial conditions is called a solution of recurrence relation.

Homogenous Solution ( ):Asolution that satisfies the recurrence relationwhen right hand side of recurrence relation is zero, is calledhomogeneous solution. And is denoted as .

Particular Solution (Asolutionwhichsatisfiestherecurrencerelationwithnonzerof(r)onrighthandsideiscalledparticularsolution.It is denoted by

Recurrence Relationc0 ar + c1 ar-1 +c2 ar-2 + ... + ck ar-k = f(r)

Homogenous recurrence relationf(r) = 0

Total solution = Homogenous solutionThat is T.S. = a(h)

r

Non-homogenous recurrence relationf (r) ≠0

Total solution = Homogenous solution + Particular solutionThat is T.S. = ar

(h)+ar(p)

Fig. 4.1 Homogenous and non-homogenous recurrence relation

4.4.1 Solution of Homogenous Recurrence RelationSolution of homogenous recurrence relation is only a homogenous solution .That is, total solution ar = .Working steps:Step I : Consider homogenous recurrence relation.

Page 57: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

47

c0 ar + c1 ar-1 + c2 ar-2 +c3 ar-3 + ... + ck ar-k = 0 with k initial conditions.

StepII : Find order, characteristic equation, characteristic roots (say α1, α2, α3... αk) of recurrence relation. Characteristic roots are may or may not be distinct.

StepIII:(A)Ifallcharacteristicrootsarenotdistinctthatisα1≠α2 ≠α3≠...αk then, c1(α1)

r + c2(α2) r + c3(α3)

r +...+ck(αk) r

(B)Ifallcharacteristicrootsarenotdistinct,sayα1 occurs t times and remaining are distinct. Then,c1(α1)

r + c2(α2) r + (αi-1)

r + ( + r + r2 + ... + r (t-1)) + ci+1(αi+1)r+ ...+ ck is homogenous

solution, with all c0, c1, c2, c3, ... ck are constant.

4.4.2 Solution of Non-homogenous Recurrence RelationRecurrence relation of the type,c0 ar + c1 ar-1 + c2 ar-2 +c3 ar-3 + ... + ck ar-k = f (r)f(r)≠0iscallednon-homogenousrecurrencerelation.Itstotalsolutionis:T.S = ar = i.e., a sum of homogenous solution and particular solution.

Steps to solve Non-homogenous recurrence relation:Step I : Consider non homogenous recurrence relation. c0 ar + c1 ar-1 + c2 ar-2 + ... + ck ar-k = f(r) where f(r)=0StepII :Tofindhomogenoussolution,considerf(r)=0.Thenrecurrencerelationbecomeshomogenous.Itssolutionis (referstepstofindhomogenoussolutionofhomogenousrecurrencerelation.)StepIII:Tofindparticularsolution,considerf®.Dependingonnatureoff(r),theformofparticularsolutionisasfollows:

f (r) Form of particular solution

d constant

d0 + d1r linear equation

d0 + d1 r + d2 r2 + ... +dn r

n (polyno-mial of degree n)

ar (exponential)

d.ar

(d0+d1r) ar

(d0 + d1r + d2r2+ ... + dn r

n) ar

Table 4.2 Solution to solve non-homogenous recurrence relation

are all constants.StepIV:usinggivenrecurrencerelationfindvaluesofconstantsp0, p1, p2... pn. IF all values of p1, p2... pn exists, put it in of step III.StepV :Ifthereissomecontradictiontofindvaluesofp1, p2... pn , then use another form of particular solution r.

(r times previous term of particular solution) continues the above process to get all values of p1, p2... pn and put them in

Page 58: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

48

Step VI : Form ar = + Step VII: Find values of c0, c2 ... ck from ar, using initial conditions which gives required solution of given recurrence relation.

4.5 Applications of Recurrence RelationRecurrence relation equations are applicable universally to differentfields such as,Economics,Digital signalprocessing, Biology etc.

EconomicsRecurrence relations, especially linear recurrence relations, are used extensively in both theoretical and empirical economics.Inparticular,inmacroeconomics,onemightdevelopamodelofvariousbroadsectorsoftheeconomy(thefinancialsector, the goods sector, the labor market, etc.) in which some agents’ actions depend on lagged variables. The model would then be solved for current values of key variables (interest rate, real GDP, etc.) in terms of exogenous variables and lagged endogenous variables. Refer to time series analysis.

Digital signal processingIn digital signal processing, recurrence relations can model feedback in a system, where outputs at one time become inputsforfuturetime.Theythusariseininfiniteimpulseresponse(IIR)digitalfilters.Example:Theequationfora“feedforward”IIRcombfilterofdelayTis: yt=(1−α)xt+αyt−TWhere xt is the input at time T, yt is the output at time T,andαcontrolshowmuchofthedelayedsignalisfedbackinto the output. From this we can see that yt=(1−α)xt+α((1−α)xt −T+αyt−2T) yt=(1−α)xt+(α−α

2) xt−T+α2yt−2Tetc.

BiologySome of the best-known difference equations have their origins in the attempt to model population dynamics. Example: The Fibonacci numbers were once used as a model for the growth of a rabbit population.The logistic map is used either directly to model population growth, or as a starting point for more detailed models. In this context, coupled difference equations are often used to model the interaction of two or more populations. For example, the Nicholson-Bailey model for a host-parasite interaction is given by Nt+1 = λ Nt e

-aPt, Pt+1 = Nt (1-e-aPt),with Nt representing the hosts, and Pt the parasites, at time t.Integro difference equation is a form of recurrence relation important to spatial ecology. These and other difference equations are particularly suited to modelling univoltine populations.

Solved Examples:Paresh opened a bank account by investing Rs.1000. He deposits Rs.100 in it each month. Bank pays 2% interest 1. monthly. Find the recurrence relation for the amount of money on Paresh’s account after n years.

Solution:Let N = Number of monthsP = Principle amountR = Rate of interestT = Total amountI = InterestI = andT = P + I

Page 59: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

49

Consider following table for some months.

N P I = T = P + I

No. of Months Principle amount Interest Total Amount

0 1000 0 1000 + 0 = 1000

1 1000+100 = 1100 1100 + 22 = 1122

2 1122 + 100 = 1222 1222 + 24.44 = 1246.44

: : : :

n -1 …. …. an-1

n 1000 + an-1

( +

⇒an =

= ⇒an = 1020+ 1.02 an-1 with a0 = 1000

Solve the recurrence relation. a2. n – 2an-1 + an-2 = 0Solution:Here f(r) = 0 ∴ Homogeneous recurrence relation.Its degree is 2 i.e., k =2∴ Its characteristic equation is,αk - 2αk-1 + αk-2 =0α2 - 2α + 1 = 0(α - 1)2 = 0α = 1, α = 1 are repeated character toots.∴

If characteristic roots of recurrence relation are 2, 2, 3 with f(r) = (r3. 2 + 1) 2r. Then what will be particular solution of such recurrence relation.

Solution:Here 𝛂 = 2 is a characteristic root, with multiplicity 2, and f(r) = (r2 + 1) 2r contains one of the term 2r hence two time contradiction occur in

∴Required form of particular solution is,

Page 60: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

50

SummaryInmathematics,arecurrencerelationisanequationthatrecursivelydefinesasequencei.e.,eachtermofthe•sequenceisdefinedasafunctionoftheprecedingterms.Thetermdifferenceequationsometimes(andforthepurposesofthisarticle)referstoaspecifictypeofrecurrence•relation. “Difference equation” is frequently used to refer to any recurrence relation.•Iftherecurrenceisinhomogeneous,aparticularsolutioncanbefoundbythemethodofundeterminedcoefficients•and the solution is the sum of the solution of the homogeneous and the particular solutions. Another method to solve an inhomogeneous recurrence is the method of symbolic differentiation.•Many linear homogeneous recurrence relations may be solved by means of the generalised hypergeometric series. •Special cases of these lead to recurrence relations for the orthogonal polynomials, and many special functions

ReferencesRamana, B. V. & Grimaldi, R. P., 2008. • Discrete and Combinatorial Mathematics, Recurrence Relations, 5th ed., Pearson Education India.Rosen, K. H. & Michaels, J. G., 2000. • Handbook of discrete and combinatorial mathematics, Recurrence Relations, CRC Press.Recurrence Relations,• [Pdf] Available at: <http://www.mathdb.org/resource_sharing/training/se_rr.pdf> [Accessed 20 June 2013].Moura, L., • Recurrence Relations, [Pdf] Available at: <http://www.site.uottawa.ca/~lucia/courses/2101-10/lecturenotes/07RecurrenceRelations.pdf> [Accessed 20 June 2013].tjkearns1, 2013. • Introduction to Recurrence Relations-1 [Video online] Available at: <http://www.youtube.com/watch?v=loh8rYkghHg> [Accessed 20 June 2013].nptelhrd, 2007. • Lecture 32 - Recurrence Relations [Video online] Available at: <http://www.youtube.com/watch?v=qvw1GX93JSY> [Accessed 20 June 2013].

Recommended Reading

Gupta, S. B., 2005. • Comprehensive Discrete Mathematics and Structures, Recurrence Relations, 2nd ed., Laxmi Publication.Veerarajan., 2006. • Discrete Mathematics, Recurrence Relations, 7th ed., Tata McGraw-Hill.Gupta, S. B., 2008. • Discrete Mathematics And Structures, Recurrence Relations, 5th ed., Laxmi Publications Ltd.

Page 61: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

51

Self AssessmentRoots of characteristic equation of recurrence relation are called _____________.1.

rootsa. root equationb. characteristic rootsc. recurrence rootsd.

Asolutionthatsatisfiestherecurrencerelationwhenrighthandsideofrecurrencerelationiszero,iscalled2. _________________.

particular solutiona. zero solutionb. recurrence solutionc. homogeneous solution d.

A solution which satisfies the recurrence relation with non zero f(r) on right hand side is called 3. _______________.

particular solutiona. zero solutionb. recurrence solutionc. homogeneous solution d.

Non homogeneous recurrence relation = _______________4. f (r) = 1a. f (r) b. ≠ 0f (r) = 0c. f (r) d. ≠ 1

Find the characteristic equation for, a5. r – 7 ar-1 + 12 ar-2 = 0. k -7k +12k = 0a. αb. 2 - 7α - 12α = 0αc. 2 - 7α - 12 = 0αd. 2 + 7α2 + 12α2 = 0

Find the characteristic roots of recurrence relation a6. r – 7 ar-1 + 12 ar-2 = 0.1, 2a. 7, 11b. 12, 6c. 3, 4d.

Sum of homogeneous solution and particular solution is _______________.7. homogeneous recurrence relationa. total solution of non homogenous recurrence relation b. non homogenous recurrence relationc. total solution of homogeneous recurrence relationd.

Page 62: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

52

Find the characteristic roots of recurrence relation a8. r + 6 ar-1 + 12 ar-2 + 12 ar-3= 0.6, 2a. -6 , 12b. – 6, - 2c. 6, -2 d.

Find the characteristic roots of recurrence relation a9. r - 6 ar-1 + 12 ar-2 = 0.6, 2a. -6 , 12b. – 6, - 2c. 6, -2 d.

Find the characteristic roots of recurrence relation a10. r - 3 ar-1 + 21 ar-2 = 0.9, 12a. 3, 7b. 8, 13c. -9, -12d.

Page 63: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

53

Chapter V

Graphs

Aim

The aim of this chapter is to:

explicate the basics of graph theory•

explain the concepts of representing data by graphs•

focus on terminologies involved in graph theory•

Objectives

The objectives of this chapter are to:

describe graph theory and its applications in computer science•

explain various types of graphs and their uses•

introduce isomorphism in graph theory•

Learning outcome

At the end of this chapter, you will be able to:

enlist the various types of graphs•

understandinformationingraphsbygettingvariousinputswithspecificobject•

recognise the complex graphs and• understand the intricacy of information or complexity of problem

Page 64: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

54

5.1 IntroductionIn everyday life, we have to translate descriptive data into various types of symbolic forms. Graph is also one of the forms of symbolic representation of descriptive data in terms of points (verticals) and line segments (edges). It iswidelyusedinmanyfieldslikeElectricalEngineering,telecommunication,genetics,computerscienceetc.

Agraphissimplyacollectionoffinitepoints(calledvertices)andlinesegments(callededges)inwhicheachedgeis assigned to pair of points called end vertices or terminal (not necessarily distinct). Informally, a graph is a bunch of dots connected by lines. Here is an example of a graph:

Sadly,thisdefinitionisnotpreciseenoughformathematicaldiscussion.Formally,agraphisapairofsets(V,E),where:

V is a non-empty set whose elements are called • vertices.E is a collection of two-element subsets of V called • edges.

The vertices correspond to the dots in the picture, and the edges correspond to the lines. Thus, the dots-and-lines diagram above is a pictorial representation of the graph (V, E) where,V = {A, B, C, D, E, F, G, H, I}E = {{A, B}, {A, C}, {B, D}, {C, D}, {C, E}, {E, F}, {E, G}, {H, I}}.

5.2 Terminologies in GraphGraph: A graph G is an ordered pair (V,E) where V is the non-empty set of vertices and E is the set of edges in which each element of E is assigned to a unique unordered pair of elements (not necessarily distinct) of V.An element of a set E is generally denoted as e – (u, v) or e = (v, u) where u, v ∈ V.Here u, v are called end vertices of edge e.Example:

(1)u w

v

e2e1

(2)

v1

v4

v2

v3

e1

e2

G2e5

v5

e3

e4

Here, V = {u, v, w}E = {e1, e2,}

Here, V = {v1, v2, v3, v4, v5}E = {e1, e2, e3, e4, e5}

Observe in G2 edgee2 = (v2, v2) has end vertices v2 and v2 i.e., same and vertices.

Page 65: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

55

Loop: If both the end vertices of an edge are same then the edge is called a loop.Example:

v1

v3

e1e2G3

e5

e3

e4

Parallel edges: If two or more edges have same terminal vertices, then these edges are called as parallel edges.Simple graph: A graph without loops and parallel edges is called simple graph.Compound graph: A graph which contains loops or parallel edges is called compound graph or multigraph.Adjacency and incidence: Tow vertices v1 and v2 in a graph G are said to be adjacent to each other, if they are end vertices of the same edge e.If the vertex u is an end vertex of the edge e then the edge e is said to be incident on vertex u.Degree of a vertex: The number of edges incident on a vertex v is called degree of vertex v, with loop being counted twice.Notation: Degree of v = d (v)

Example:

v1

v4

v2

v3v5

v6

Isolated vertex: A vertex with degree zero is called as isolated vertex.

Pendent vertex: A vertex with degree one is called as pendent vertex.

10. Degree of the graph: Sum of the degrees of all vertices of graph G is called degree of the graph G.Notation: d (G) = degree of graph G.i.e.,

Example:

v1

v4

v2

v3

v5

Here, V = {v1, v2, v3} , E = {e1, e2, e3, e4, e5} Hence edge e4 is a loop. Observe that in G3 , edges e1 and e2 have same pair of end vertices.i.e., e1 = (v1, v2)e2 = (v1, v2)

Here, d (v1) = 4d (v2) = 6d (v3) = 3d (v4) = 4d (v5) = 1d (v6) = 0

Here,d (v1) = 2d (v2) = 4d (v3) = 1d (v4) = 2d (v5) = 3d (G) = 2 + 4 +1 + 2 + 3 = 12∴ = 12.

Page 66: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

56

5.3 Representation of GraphGraph can be represented in following methods:

Ordered pair representation•Structure representation•Matrix representation (i. Adjacency, ii. Incidence)•

Ordered pair representationA graph G can be represented in ordered pair (V, E) where V is non-empty set of vertices and E is set of edges.Example:G (V, E) with V = {v1, v2, v3, v4} E = {(v1, v2) (v2, v4) (v3, v3) (v2, v3)}

Structure representationA graph can be represented by structure with points and lines each line has two end points.Example: Above order form of graph represented by structure.

Matrix representationDepending on adjacency of vertices and incidency of an edge, a graph can be represented in two types of matrices:Adjacency matrix: If G is a graph on n vertices say v1, v2, v3, .... vn then adjacency matrix of G is the n × n matrix A(G) =

Where,

Example: Consider the above graph,

v4

v2

v3

Observations:The sum of the entries in the ithcolumn or ithrow gives the degree of vertex vi (diagonal entries counted twice).aij= 0 if there is no loop at vi.Since the number of edges joining vi to vj= no. of edges joining vj to vi.i.e. aij = aji∴ Adjacency matrix is symmetric.If G is a simple graph, then A (G) is a matrix containing 0s and 1s (Binary matrix in which each diagonal entry is 0).

Incidence matrix:Let G be a graph in structural form with n vertices v1, v2 ...vn and m edges e1, e2, ...em then the incidence matrix of G denoted by I(G) is,

A (G) =

Page 67: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

57

I(G) = [aij]n×m where,

aij=

Example:

v1v2

v3

e1

e2

e5

e3

e4

Observations:Any column’s sum must be 2.•The sum if the entries in a row indicate the degree of the corresponding vertex.•If two columns are identical, then the corresponding edges are parallel edges.•If a row contains only zero’s then the corresponding vertex must be an isolated vertex.•If a row contains a single ‘1’ the corresponding vertex must be pendent vertex.•If an edge is a loop there will be a single ‘2’ in the column remaining entries being zero’s.•

5.4 Uses of GraphsGraphs are the most useful mathematical objects in computer science. One can model an enormous number of real-world systems and phenomena using graphs. Once we’ve created such a model, we can tap the vast store of theorems about graphs to gain insight into the system you’re modelling.

Here are some practical situations where graphs arise:Data Structures:• Each vertex represents a data object. There is a directed edge from one object to another if the firstcontainsapointerorreferencetothesecond.

Attraction: Each vertex represents a person, and each edge represents a romantic attraction. The graph could be •directed to model the unfortunate asymmetries.

Airline connections:• Eachvertexrepresentsanairport.Ifthereisadirectflightbetweentwoairports,thenthereis an edge between the corresponding vertices. These graphs often appear in airline magazines.

The web: Each vertex represents a web page. Directed edges between vertices represent hyperlinks.•

Peopleoftenputnumbersontheedgesofagraph;putcoloursonthevertices;oraddotherornamentsthatcaptureadditional aspects of the phenomenon being modelled. For example, a graph of airline connections might have numbers on the edges to indicate the duration of the

e1 e2 e3 e4 e5

1 1 0 0 11 1 2 1 00 0 0 1 1

v1

v2

v3

I = (G)

Page 68: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

58

correspondingflight.Theverticesintheattractiongraphmightbecolouredtoindicatetheperson’sgender.

5.5 Some Important GraphsThere are different types of graphs used in mathematics for representing descriptive data, which are explained below:

Type of Graph Details Figure

1. Null Graph A graph with n vertices without edges is called as null graph.Notation: Nn = Null graph with n vertices.

2. Complete GraphA simple graph G is called a complete graph, if there is an edge between each pair of vertices.Notation: Kn = complete graph on n vertices.

3. Regular Graph If all vertices of a graph G have same degree, then G is called as a regular graph.Notation: mRnor mRnregular graph on n vertices.

4. Bipartite Graph A graph G(V, E) is said to be bipartite, if the vertex set V can be partitioned in to two non-empty disjoint subsets V1 and V 2(V= V1∪ V2, V1 ∩V2 = ∅), such that each edge in G has end vertex in V1 and other end vertex in V2.There is no edge between two vertices of V1 as well as there is no edge between two vertices of V2. Here, V1, V2 bipartition of V.

Page 69: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

59

5. n-partite Graph Graph G(V, E) is said to be n-partite. If vertex set V is partitioned in to n disjoint vertex sets say V1, V2, V3, ... Vn.

1

2

43

5

6. Complete bipartite Graph

A bipartite graph is called complete bipartite, if each vertex of vertex set V1 is adjacent to every vertex set V2 contain n vertices, then this bipartite graph is denoted as Km,n.

1

2

4

3

5

6

7

Table 5.1 Different types of graphs

5.6 Degree SequenceIf d1, d2, d3 ... dn are the degrees of the vertices of the graph on on vertices then increasing or decreasing sequence of {di}i

n is called a degree sequence of the graph.

Example:

V1

V2

V4

V5V6

5.6.1 Graphical Degree SequenceLet d1, d2...dnbefinitesequenceofnon-negativeintegers.Thenthesequenceiscalledgraphicaldegreesequence,if there is a simple graph G of which d1, d2, ... dn is degree sequence.

We can solve graphical degree sequence problems by using Havel-Hakimi theorem.

Havel-Hakimi TheoremLet S =(d1, d2, …, dn) be a sequence of n integers written in decreasing order: d1≥d2≥…≥dn-1≥dn.Then, S is a graphic sequence if and only if the following sequence S’ of n-1 integers is graphic, where k = d1:S’ = (d2-1, d3-1 … dk+1-1… dn-1, dn).

Steps to determine whether degree sequence is graphical:Step 1 : Consider decreasing degree sequence.Step2 :UseHavel-Hakimitheoremformodifiedsequence.Step 3 : Rearrange terms in decreasing in order.

d (v1) = 2d (v2) = 2d (v3) = 2d (v4) = 3d (v5) = 5 d (v6) = 2, Decreasing sequence of degree is 5, 3, 2, 2, 2, 2

Page 70: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

60

Step 4 : Continue steps 2 and 3.Step 5 : If we get all terms zero, the original sequence is graphical otherwise is not graphical.

Example:Show that the following sequence is graphical 5, 5, 4, 4, 3, 2, 2, 1.

Solution:Consider degree sequence.

5, 5, 4, 4, 3, 2, 2, 1 Use Havel-Hakimi theorem

4, 3, 3, 2, 1, 2, 1 Arrange terms

4, 3, 3, 2, 2, 1, 1 Use theorem

2, 2, 1, 1, 1, 1 Use theore

1, 0, 1, 1, 1 Arrange terms

1, 1, 1, 1, 0 Use theorem

0, 1, 1, 0 Arrange terms

1, 1, 0, 0 Use theorem

0, 0, 0

At last, we get all zero.∴ given degree sequence is graphical.

5.7 Isomorphism in GraphsDefinition:Let G1(V1, E1) and G2(V2, E2) be two graphs. The graphs G1 and G2are said to be isomorphic, if there is bijective function fv: V1→E1such that if u and v are end vertices of some edge e ∈ E1 then fv(u), fv(v) end vertices of fE(e). Sometimes, two graphs look different but they represent the same graph, then these two graphs are isomorphic graphs.ISO≈same morph≈structure

Example:Following two graphs G1 and G2 are isomorphic.

p

r

q

s

x

y

w

z

G1 G2

Here, Number of vertices in G1 = 4 =number of vertices in G2Number of edges in G1 = 4 = number of edges in G2

Page 71: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

61

In graph G1

Vertex Degree Degree of adjacent vertices

P 2 2, 2

Q 2 2, 2

R 2 2, 2

S 2 2, 2

In graph G2

Vertex Degree Degree of adjacent vertices

W 2 2, 2

X 2 2, 2

Y 2 2, 2

Z 2 2, 2

i.e., adjacency of vertices preserves.⇒f (p) = w, f (q) = x, f (r) = y, f (s) = z is bijection.∴ G1 and G2 are isomorphic graphs.

5.7.1 Isomorphism by Using Adjacency MatrixTwo graphs G1 and G2 are isomorphic, if their adjacency matrices are equivalent (equivalent matrices = one matrix is obtained from another matrix by interchanging rows or by interchanging columns).

Example:Using adjacency matrices show that following two graphs are isomorphic:

a

b

c

d

ep

q

s

rt

Solution:Adjacency matrix of G1 is,

Page 72: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

62

Adjacency matrix of G2 is,

Consider A1 and apply R1,2 , R3,4

C1,2, C3,4

Last matrix is A2∴ Graphs G1 and G2 are isomorphic.

5.8 Applicability of GraphsGraphs are among the most ubiquitous models of both, natural and human-made structures. They can be used to represent many types of relations and process dynamics in physical, biological and social systems. Many problems of practical interest can be represented by graphs.

In computer science, graphs are used to represent networks of communication, data organisation, computational •devices,theflowofcomputation,etc.

Example: The link structure of a website could be represented by a directed graph. The vertices are the web pages available at the website and a directed edge from page A to page B exists if and only if A contains a link to B.

Asimilarapproachcanbetakentoproblemsintravel,biology,computerchipdesign,andmanyotherfields.•The development of algorithms to handle graphs is therefore of major interest in computer science.The transformation of graphs is often formalised and represented by graph rewrite systems. They are either •directlyusedorpropertiesoftherewritesystems(e.g.confluence)arestudied.Complementary to Graph Transformation Systems focussing on rule-based in-memory manipulation of graphs •are graph databases geared towards transaction-safe, persistent storing and querying of graph-structured data.Graph-theoretic methods, in various forms, have proven particularly useful in linguistics, since natural language •often lends itself well to discrete structure. Traditionally, syntax and compositional semantics follow tree-based structures, whose expressive power lies •in the Principle of Compositionality, modelled in a hierarchical graph. Within lexical semantics, especially as applied to computers, modelling word meaning is easier when a given word is understood in terms of related words;semanticnetworksarethereforeimportantincomputationallinguistics.Stillothermethodsinphonology(e.g.OptimalityTheory,whichuseslatticegraphs)andmorphology(e.g.finite-statemorphology,usingfinite-state transducers) are common in the analysis of language as a graph. Indeed, the usefulness of this area of mathematics to linguistics has borne organisations such as text graphs, as well as various ‘Net’ projects, such as WordNet, VerbNet, and others.

Page 73: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

63

Graph theory is also used to study molecules in chemistry and physics. In condensed matter physics, the three •dimensional structure of complicated simulated atomic structures can be studied quantitatively by gathering statistics on graph-theoretic properties related to the topology of the atoms.

Example: Franzblau’s shortest-path (SP) rings.

In chemistry, a graph makes a natural model for a molecule, where vertices represent atoms and edges bonds. •This approach is especially used in computer processing of molecular structures, ranging from chemical editors to database searching. In statistical physics, graphs can represent local connections between interacting parts of a system, as well as •the dynamics of a physical process on such systems.

Page 74: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

64

SummaryIn mathematics and computer science, graph theory is the study of graphs, mathematical structures used to •model pair wise relations between objects from a certain collection. Graphs are one of the prime objects of study in Discrete Mathematics.•A graph may be undirected, meaning that there is no distinction between the two vertices associated with each •edge, or its edges may be directed from one vertex to another.The graphs studied in graph theory should not be confused with [graphs of functions] or other kinds of graphs.Graphs are represented by drawing a dot or circle for every vertex, and drawing an arc between two vertices if •they are connected by an edge. If the graph is directed, the direction is indicated by drawing an arrow.Acommonproblem,calledthesubgraphisomorphismproblem,isfindingafixedgraphasasubgraph.•One reason to be interested in such a question is that many graph properties are hereditary for subgraphs, which •means that a graph has the property if and only if all subgraphs have it too.

ReferencesGross, J. L. & Yellen, J., 2003. • Handbook of Graph Theory, Graphs, CRC Press.Gross, J. L., 2007. • Combinatorial Methods with computer applications, Graph theory, Chapman and Hall CRC.Chapter IV – Graph Theory,• [Pdf] Available at: <http://www.math.hkbu.edu.hk/~zqiao/Math1130_2009/Chap4.pdf> [Accessed 20 June 2013].Graphs - Terminology and Representation• , [Online] Available at: <http://www.radford.edu/~nokie/classes/360/graphs-terms.html> [Accessed 20 June 2013].patrickJMT, 2010. • Graph Theory - An Introduction! [Video online] Available at: <http://www.youtube.com/watch?v=HmQR8Xy9DeM> [Accessed 20 June 2013].StatsLabDublin, 2013. • Discrete Mathematics : Important Graph Theory Terms [Video online] Available at: <http://www.youtube.com/watch?v=TwLYYOMAK4o> [Accessed 20 June 2013].

Recommended ReadingLiu, C. L., 1968. • Introduction to Combinatorial Mathematics, Graph theory, McGraw Hill New York.Deo N., 1974. • Graph Theory with applications to Engineering and Computer Science, Graphs, Prentice Hall, Englewood Cliffs, N.J.Rosen, K., • Discrete Mathematics and its applications with Combinatorics and graph theory, Graph theory, 6th ed., Tata McGraw Hill publication.

Page 75: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

65

Self Assessment____________isacollectionoffinitepointsandlinesegmentsinwhichedgeisassignedtoapairofpoints.1.

Verticesa. Vertexb. Graphc. Cut Edged.

If two or more edges have same terminal vertices, then these edges are called ______________.2. graph a. complete graphb. loopc. parallel edgesd.

Two vertices v3. 1 and v2 in a graph G are said to be ______________ to each other if and only if they are end vertices of the same edge e.

parallela. adjacentb. orderedc. composited.

A graph with n vertices without edges is called a _____________.4. null grapha. simple graphb. compound graphc. complete graphd.

A simple graph G is called a _______________ graph, if there is an edge between each pair of vertices.5. null grapha. regular graphb. complete graphc. n-partite graphd.

If all vertices of a graph G have same degree then G is called a _____________ graph.6. simple a. regularb. completec. bipartited.

What are the number of edges for K7. 5,8 graph?12a. 13b. 40c. 3d.

Page 76: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

66

Every regular graph is ____________ graph.8. partitea. bipartiteb. completec. incompleted.

How many vertices are there for 9. 3R6 graph?3a. 6b. 9c. 5d.

How many regular graphs are there for 10. 4R6 graph?4a. 6b. 2c. 3d.

Page 77: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

67

Chapter VI

Tree

Aim

The aim of this chapter is to:

explain spanning tree in graph theory•

classify the properties of trees that are useful in computer science •

describe binary tree in graph theory•

Objectives

The objectives of this chapter are to:

explain “tree” and properties of a tree in graph theory•

highlight the uses of Kruskal’s algorithm•

explain idea of calculating shortest spanning tree •

Learning outcome

At the end of this chapter, you will be able to:

enlist various types of trees in graph theory•

solve problems related to spanning tree and using Kruskal’s algorithm•

understand binary rooted tree and its applications•

Page 78: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

68

6.1 IntroductionMathematicallyspeaking,atreeisageometricfigureconsistingofverticesandedges,butofaspecialkind.Wethink of vertices as points in the plane and edges as line segments.

Most of the trees we use in computer science have a special vertex called a root. Such trees are usually called “rooted trees.” We could certainly describe what we mean by a rooted tree in ordinary English.Tree is special type of graph. It has various applications in

technology•classificationsanddistributionstudy•managerial problems etc.•

A connected, acyclic graph is called a tree. (A graph is acyclic if no subgraph is a cycle.) Below mentioned is a figureforatree.

Fig. 6.1 Tree

A vertex of degree one is called a leaf. Intheabovefigure,thereare5leaves.Thegraphshownabovewouldnolongerbe a tree if any edge were removed, because it would no longer be connected. The graph would also not remain a tree if any edges were added between two of its vertices, because then it would contain a cycle. Furthermore, note that there is a unique path between every pair of vertices. These features of the example tree are actually common to all trees.

6.2 TreeA connected graph without any cycle is called as a Tree.Notation: Tree graph on n vertices is denoted as Tn.

Example:Trees on 1, 2 and 3 vertices1.

T3T2T1

Non isomorphic tree on 4 vertices (T2. 4)

T4T4

Non isomorphic tree on 5 vertices (T3. 5)

T5

T5

T5

Page 79: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

69

Non isomorphic tree 6 vertices (T4. 6)

T6 T6 T6T6

Following are not trees:

Disconnected hence not tree.

Connected but contains cycle hence not tree

Disconnected as well as contains cycle So it is not tree.

Fig. 6.2 Graphs are not trees

6.2.1 Properties of Tree GraphProperties of Tree Graph are as follows:

Tree is simple graph, which does not contain loops or parallel edges.•Each edge of tree is isthmus.•Tree on n vertices has (n-1) edges.•There exists a unique path between any pair of vertices.•After joining any two non-adjacent vertices of a tree by an edge, there exists only one circuit in resulting •graph.Other than pendent vertices, each vertex is cut vertex.•Every tree contains at least one pendent vertex.•

6.2.2 Equivalent Properties of TreeTheorem 1:Let T be a graph on p vertices and q edges. If T is tree then T has no circuit and q = p-1.Proof:

As T is a tree, T is acyclic and connected.Only remains to show q = p-1.Prove this by the method of induction.Step I : Prove that tree on p=1 vertex has p-1 = 0 edges. ∴ Result is true for p =1.

Step II : Assume that result is result true for p >k.That is, assume that tree on k vertices has k-1 edges for all p>k.

Step III : Prove that the result is true for p = k+1.That is, prove that, tree with k+1 vertices has (k+1)-1 edges.

Page 80: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

70

Let T be a tree with k+1 vertices. Each edge of T is bridge (isthmus), hence, T-e is dis-connected having two components T1 and T2 are tree.

Suppose T1 has K1 vertices and T2 and K2 vertices and

K1 + k2 = k +1 and k1, k2 < k. By step 2, T1 has k1-1 edges and T2 has K2-1 edges. ∴ Edge set of T contains (k1-1) + (k2-1) + 1 edges. = (k1 + k2) -1 = (k + 1) -1 = k ∴ Tree on k+1 vertices has (k+1) -1=k edges is proved. ∴ By the method of mathematical induction result is true for any number of vertices. ∴ Tree with p vertices p-1 edges.

Theorem 2:Let T be a graph on p vertices and q edges. If T is acyclic and q = p-1, then T is connected and q = p-1.Proof:

Let T be a graph on p vertices and q edges. As T is acyclic and q = p-1, then only remains to show that T is connected.Provethisbythemethodofcontradiction.Contradictorily,assumethatTisdisconnectedandhas2≤kcomponents say T1, T2, T3, ... Tk. Suppose each component has p1, p2, p3, .... pk vertices respectively.⇒ p1 +p2 +p3 +...+pk = pClearly, each Ti is tree and has (p1 -1), (p2 -1), (pk -1 ) edges respectively.∴ Total number of edges in T are, (p1- 1) + (p2-1) + (p3-1) + ... + (pk-1) = (p1 +p2 +p3 + ...+ pk) - k = p- k∴ Total number of edges in T are p-kFork≥2,whichiscontradiction.∴ k = 1∴ T has only one component, i.e., T is connected.

Theorem 3:Let T be a graph on p vertices and q edges. If T is connected and p = q-1, then T is connected and every edge is an isthmus.Proof:

Let T be a graph on p vertices and q edges.If T is connected and p = q-1, then only remains to show that each edge of T is isthmus. We prove this by the method of contradiction.Contradictorily assume that edge e of graph is not isthmus.∴ T – e is connected and edges in T – e are (p-1) -1 = p-2 which is contradiction that p-1 which is contra-dictionthatp-1≥p-2.∴ e must be isthmus.∴ every edge of T is isthmus.

Theorem 4:Let T be a graph on p vertices and q edges. If T is connected and each edge is isthmus, then there exist exactly one path between any pair of vertices of T.Proof:

Let T be a connected graph with p vertices and q edges, in which each edge is isthmus. Prove that there exists a unique path between any pair of vertices of T.Let u and v be any two vertices of T. Since T is connected, there exists u-v path.Prove this by the method of contradiction.

Page 81: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

71

Contradictorily assume that there exists more than one paths say p1 and p2 from u-v in T.Union of p1 and p2 forms a circuit. Edge of cycle is not isthmus, which is contradiction.∴ There exists a unique path between any two vertices of T.

Theorem 5:A connected graph G with p vertices and p-1 edges is tree.Proof:

Let G be a connected graph with p vertices and p-1 edges.Claim that G is tree. That is only to show that G is cyclic.Prove this by the method of contradiction.Contradictorily assume that G contains circuit C.If e is edge contained in the circuit, then C-2 is connected.∴ G – e is a graph connected with n vertices and n-2 edges. This is contradiction.∴ G does not contain any circuit.∴ G is connected and acyclic.∴ G is a tree.

6.3 Spanning Tree

Definition:Let G be a connected graph. T is the one that is spanning sub-graph of G. Then T is called as spanning tree of G.Example:

Fig. 6.3 Spanning tree

6.3.1 Terminologies in Spanning TreeSpanningtreehasfollowingterminologiesused,whicharedefinedbelow:

Spanning sub-graph:Let G be a graph. H is a sub-graph of G containing all vertices of G, then H is called as spanning sub-graph of G.

Branches of spanning tree:Let G be a connected graph. T is spanning tree of G, then edges of G which are in T are called as branches of T in G.In other words, edges of spanning tree are called branches of T in G.

Chords of spanning tree:Let G be a connected graph. T is spanning tree of G, then edges of G which are not in T are called as chords of T in G.Remarks:

For connected graph G, there exists one or more than one spanning trees.1. Depending upon various spanning trees for single graph G, set of branches as well as set of chords changes.2.

Page 82: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

72

Let G be a connected graph with n vertices and m edges, then any spanning tree of G has n-1 branches and 3. (m-(n-1)) = m-n+1 chords.

Example:ForfollowinggraphG,findanytwospanningtreeofG.Listallbranchesandchordsforcorrespondingspanningtree.

v3

v5

v4

v1

v6

e7

e9 e10

e8

e5

e6

e1 e2

e3

e4

Solution:

First spanning tree of graph G is Branches of T1 in G aree1, e2, e7, e5, e4Chords of T1 in G aree3, e6, e8, e9, e10.

Second Spanning tree of graph Branches of T2 in G are,e2, e3, e6, e9, e10Chords of T2 in G are,e1, e4, e5, e7, e8

6.4 Fundamental CircuitsLet G be a connected graph. T is spanning tree of G. Let an edge ‘e’ be a chord of T in G, then T + e contains exactly one circuit. Such circuit of T + e is called as fundamental circuit of G w.r.t. spanning tree T. In other words, each chord of spanning tree T forms one circuit in T + e graph, such circuit is called as fundamental circuit of G w.r.t. T.

Every fundamental circuit contains only one chord and all remaining edges of circuit are the branches of 1. spanning tree T.Each chord gives unique fundamental circuit. Therefore, connected graph with n vertices and m edges has 2. (m-n+1) number of fundamental circuits w. r. t. any spanning tree of G.

Page 83: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

73

Example:Find all fundamental circuits w. r. t. spanning tree T of graph G.

e5

e1

e2

e3

e4

v2

v3v4

v1

e5 e2e4

v2

v3v4

v1

Solution: Fundamental circuit w. r. t. e1 is

e5 e2e4

v2

v3v4

v1

e1

i.e., v1, e1, v2, e2, v3, e5, v1

Fundamental circuit w. r. t. e3 is

e5 e2e4

v2

v3v4

v1

e3

i.e., v1, e5, v3, e3, v4, v1

6.5 Shortest Spanning Tree“Spanning tree with minimum weight is called shortest spanning tree”.Connected weighted graph can have more than one spanning trees.Let G be a weighted connected graph. T is spanning tree of G. Sum of the weights of branches of T is called weight of T and is called weighted spanning tree.

Different spanning trees of G will have different weights.•

Example:v2

v3v1

v5 v4

3

5

54

7 6

3

Page 84: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

74

Following are some weighted spanning trees:

v2

v3v1

v5 v4

3

7 6

3

T1 =

Weight of T1= 7 + 3 + 3 + 6= 19

4

7 6

3

v3v1

v2

v5 v4

T2 =

Weight of T2= 4 + 7 + 3 + 6= 20

v1

v2

v5

v4

v3

3

54

3

T3 =

Weight of T3= 4 + 5 + 3 + 3= 15

v1

v2

v5

v3

v4

54

7 6T4 =

Weight of T4= 7 + 4 + 5 + 6= 22

v1

v2

v5

v3

v4

5

7 6T5 = 5

Weight of T5= 7 + 5 + 5 + 6= 23

Problemsarisetofindminimumweightedspanningtreeofweightedgraph.

6.6 Kruskal’s AlgorithmUsingKruskal’sAlgorithm,wecanfindshortestspanningtree.

Step 1 : Consider given connected weighted graph on n vertices.

Page 85: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

75

Step 2 : Find increasing sequence of weights of all edges of G, say w1, w2, w3, ... , wm.Step 3 : Select edge ei of minimum weight w1 which is not loop.Step 4 : Suppose the edges e1, e2, e3 ... ei have been chosen. Then choose next edge ei +1 such that,

ea) i +1≠ek k = 1, 2, ... i

Induced sub-graph G < eb) 1, e2, e3... ei+1> does not contain circuit.

W (ec) i+1) is of smallest weight satisfying a), b).

Step 5 : Stop if (n-1) edges have been chosen. Else, continue with step 4.

Example:UsingKruskal’salgorithm,findshortestspanningtreeoffollowinggraph.

3e3

e2

v7

e10 v6

12e5

v5e4

3e6

2e7

v4

1e8

e11

62

e98

v8

v3

5v2

e110v1

Solution:Plot all vertices of graph G.Increasing sequence of weights of given graph is:1, 2, 2, 3, 3, 4, 5, 6, 8, 10, 12Corresponding edge sequence of increasing weights of graph is:

Vertex e8 e7 e10 e3 e6 e4 e2 e11 e9 e1 e5

Weight 1 2 2 3 3 4 5 6 8 10 12

e2

v7

e10 v6

12e5

v5

3e6

2e7

v4

1e8

e11

62

v8

v3

5v2

e110v1

Minimum weighted spanning tree.Trace edge e8 of minimum weight 2.Trace next edge e7 of next minimum weight 2.Trace next edge e10 of next minimum weight 2.Next minimum weighted edge is e3 of weight 3, but it forms circuit. Hence, select next minimum weight edge e6 of weight 3.Next minimum weighted edge is e4 of weight 4, but it forms circuit, avoid it.Next minimum weighted edge is e2. It is of weight 5, trace it. Next minimum weighted edges e11 and e9 forms circuit, avoid it.

Trace next edge e1 of next minimum weight 10. Trace next edge e5 of next minimum weight 12.Graph becomes connected, without any cycle, contains all vertices of G i.e., spanning tree.Weight of spanning tree is 1 + 2 + 2 + 3 + 5 + 10 + 12 = 35Weight of minimum spanning tree = 35.

Page 86: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

76

6.7 Binary TreeA tree in which exactly one vertex is distinguishable form all their vertices is called rooted tree, such particular vertex is called the root of that tree. There are exactly two branches coming out of root. Each intermediate vertex has degree 3, remaining are all pendent vertices. Binary tree is special case of rooted tree. Binary rooted tree has very important applications in binary search procedure in software.

6.7.1 Binary Rooted TreeA tree in which exactly one vertex is of degree 2, and remaining vertices are of degree 3 or 1 is called binary rooted tree.

Example: Root

Remarks:Every binary tree has odd number of vertices.1. Every binary tree with n vertices has exactly one root (vertex of degree 2), 2. pendent vertices and vertices are degree of 3.

Example: verify above remarks for above binary trees.

6.7.2 Height of Binary TreeThe maximum level in a binary tree is known as the height of a binary tree.i.e., height of binary tree = max {lv/lv is height of vector v}Maximum height of binary tree with n vertices = .Minimum height of binary tree with n vertices = log2 (n+1) -1.

Example:

v1

v2

v3

v11

v13

v14

v16

v4

v12

v15v7v8

v6

v5

v10v9

0 LEVEL

1 LEVEL

2 LEVEL

3 LEVEL

4 LEVEL

5 LEVEL

Solution:Oth level vertices is v11st level vertices are v2 and v112nd level vertices are v3, v4, v12, v133rd level vertices are v5, v6, v144th level vertices are v7, v8, v15, v165th level vertices are v9, v10∴ Maximum number of levels = 5

Page 87: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

77

∴ Height of binary tree = 5

6.8 Graph/Tree Search TechniquesWe have seen connectedness of graphs is a basic property, but how does one determine whether the graph is connected or not? In case of small graphs, we can do so by inspection, searching for paths between all pairs of vertices. However, in large graphs, such an approach could be time consuming, because a number of paths to examine might be prohibitive. Therefore,it’sdesirabletohavesystematicprocedure,oralgorithm,whichisbothefficientandapplicabletoallgraphs.

In this topic we are going to focus on two methods or techniques of graph or tree search. i.e., Breadth First Search and Depth First Search.

Breadth First SearchBFS is an uninformed search method that aims to expand and examine all nodes of a graph or combination of sequences by systematically searching through every solution.

Inotherwords,itexhaustivelysearchestheentiregraphorsequencewithoutconsideringthegoaluntilitfindsit.It does not use a heuristic algorithm.From the standpoint of the algorithm, all child nodes obtained by expanding a node are added to a FIFO (i.e., First In, First Out) queue.

In typical implementations, nodes that have not yet been examined for their neighbours are placed in some container (such as a queue or linked list) called “open” and then once examined are placed in the container “closed”.

Applications:Breadth-firstsearchcanbeusedtosolvemanyproblemsingraphtheory,suchas:

Findingconnectedcomponents:ThesetofnodesreachedbyaBFS(breadth-firstsearch)formtheconnected•component containing the starting node.Finding all nodes within one connected component.•Finding the shortest path between two nodes u and v.•Testing a graph for bi-partiteness: BFS can be used to test bi-partiteness, by starting the search at any vertex and •giving alternating labels to the vertices visited during the search. That is, give label 0 to the starting vertex, 1 to all its neighbours, 0 to those neighbours’ neighbours, and so on. If at any step a vertex has (visited) neighbours with the same label as itself, then the graph is not bipartite. If the search ends without such a situation occurring, then the graph is bipartite.

Example:This search technique has two steps to follow which are:

Visit start vertex and put into a FIFO queue.a.

Repeatedly remove a vertex from the queue, visit its unvisited adjacent vertices, put newly visited vertices b. into the queue.

Page 88: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

78

Start Search vertex (1)

Visit/mark/label start vertex and put in a FIFO queue.

Remove (1) from Q: visit adjacent unvisited vertices: put in Q.

Remove 2 from Q visit unvisited vertices: put in Q.

Likewise, remove 3, 5, 6 from Q: visit unvisited vertices and put in Q. we will get

If we randomly follow the above pro-cedure with all connected vertices, at last we will get empty queue as shown the adjacent graph.

So from above graph it is cleared that, Queue is empty so search termi-nates.

Depth First SearchDFSisanuninformedsearchthatprogressesbyexpandingthefirstchildnodeofthesearchtreethatappearsandthus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks,returningtothemostrecentnodeithasn’tfinishedexploring.

In a non-recursive implementation, all freshly expanded nodes are added to a stack for exploration. The time and space analysis of DFS differs according to its application area. In theoretical computer science, DFS is typically used to traverse an entire graph, and takes time O (|V| + |E|), linear in the size of the graph.

Applications:Algorithmsthatusedepth-firstsearchasabuildingblockinclude:

findingconnectedcomponents•

Page 89: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

79

topological sorting•finding2-(edgeorvertex)-connectedcomponents•findingstronglyconnectedcomponents•solvingpuzzleswithonlyonesolution,suchasmazes(DFScanbeadaptedtofindallsolutionstoamazeby•only including nodes on the current path in the visited set.)

Example:

Depth First Search

Start search at vertex 1.

Labelvertex1anddoadepthfirstsearch from either 2 or 4.Suppose that vertex 2 is selected.

Labelvertex2anddoadepthfirstsearch from either 3, 5, or 6.Suppose that vertex 5 is selected.

Labelvertex5anddoadepthfirstsearch from either 3, 7, or 9.Suppose that vertex 9 is selected.

Labelvertex9anddoadepthfirstsearch from either 6 or 8.Suppose that vertex 8 is selected.

Label vertex 8 and return to vertex 9.From vertex 9 do a DFS (6).

Labelvertex6anddoadepthfirstsearch from either 4 or 7.Suppose that vertex 4 is selected.

Page 90: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

80

Label vertex 4 and return to 6.From vertex 6 do a DFS (7).

Label vertex 7 and return to 6.Return to 9.

Return to 5.

Do a DFS (3).

Label 3 and return to 5.Return to 2.

Return to 1.

Return to invoking method.

Page 91: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

81

SummaryInmathematics,morespecificallygraphtheory,atreeisanundirectedgraphinwhichanytwoverticesare•connected by exactly one simple path. In other words, any connected graph without cycles is a tree.A spanning tree of a connected graph G is a maximal set of edges of G that contains no cycle, or as a minimal •set of edges that connect all vertices.A Shortest Spanning Tree or Minimum Spanning Tree (MST) or minimum weight spanning tree is then a •spanning tree with weight less than or equal to the weight of every other spanning tree. More generally, any undirected graph (not necessarily connected) has a minimum spanning forest, which is a •union of minimum spanning trees for its connected components.In computer science, a binary tree is a tree data structure in which each node has at most two child nodes, •usually distinguished as “left” and “right”. Nodes with children are parent nodes, and child nodes may contain references to their parents. Outside the tree, there is often a reference to the “root” node (the ancestor of all nodes), if it exists.A rooted binary tree is a tree with a root node in which every node has at most two children.•A full binary tree (sometimes proper binary tree or 2-tree or strictly binary tree) is a tree in which every node •other than the leaves has two children.A perfect binary tree is a full binary tree in which all leaves are at the same depth or same level.(This is •ambiguously also called a complete binary tree).Kruskal’salgorithmisanalgorithmingraphtheorythatfindsaminimumspanningtreeforaconnectedweighted•graph.Thismeansitfindsasubsetoftheedgesthatformsatreethatincludeseveryvertex,wherethetotalweightofalltheedgesinthetreeisminimised.Ifthegraphisnotconnected,thenitfindsaminimumspanningforest (a minimum spanning tree for each connected component).

ReferencesDr. Sharma, G. C. & Dr. Jain, M., 2009. • Advance Discrete Mathematics, Trees, 1st ed., Laxmi Publications, Ltd.Singh, S. G., 2010. • Graph Theory, Trees, PHI Learning Pvt. Ltd.IEEM 2012 Discrete Mathematics:Trees • [Pdf] Available at: <http://chern.ie.nthu.edu.tw/DM/9-Tree.pdf> [Accessed 23 June 2013].2009. • Discrete Mathematics. 5 Graphs & Trees [Pdf] Available at: <http://vplab.snu.ac.kr/lectures/09-1/discrete_math/dm09_slide5.pdf> [Accessed 23 June 2013].2007. Lecture 16-Trees• [Video online] Available at: <https://www.youtube.com/watch?v=q0woiOp7sqU> [Accessed 23 June 2013].2007. • Lecture 17- Trees and Graphs [Video online] Available at: <https://www.youtube.com/watch?v=fZqfkJ-cb28> [Accessed 23 June 2013].

Recommended ReadingVeerarajan, T., 2008.• Discrete Mathematics with Graph Theory and Combinotorics, Tata McGraw-Hill Publishing Company Limited.Babu, R., 2011. • Discrete Mathematics, Dorling Kindersley (India) Pvt. Ltd.Simpson, A., 2010. • Discrete Mathematics By Examples, Tata McGraw-Hill Publishing Company Limited.

Page 92: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

82

Self Assessment Trees are simple graphs and they do not contain ___________.1.

loopa. parallel edgesb. vertexc. pendent vertexd.

A spanning tree with weight less than or equal to the weight of every other spanning tree is called a 2. __________.

binary treea. weighted treeb. shortest spanning treec. sub graphd.

The maximum level of binary tree is known as ________________ of binary tree.3. length a. vertexb. branchc. heightd.

Which of the following is the minimum number of vertices in k4. th level binary tree?k+1a. 2k+1b. (k+1)c. 2

2(k+1)d.

What is the diameter of the given tree?5.

v2

v1

v16

v3 v5 v10 v11

v13

v14

v4

v9

v15

v12v7v6 v8

6a. 7b. 8c. 9d.

Page 93: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

83

What is the radius of the given tree?6.

v2

v1

v16

v3 v5 v10 v11

v13

v14

v4

v9

v15

v12v7v6 v8

5a. 4b. 3c. 6d.

What is the centre of this tree?7.

v2

v1

v16

v3 v5 v10 v11

v13

v14

v4

v9

v15

v12v7v6 v8

va. 9

vb. 7

vc. 5, v10

vd. 16, v13, v9

ForgivengraphT,findcentre.8.

v2v1

v3

v5

v10

v4

v9

v7

v6 v8

Va. 6

Vb. 4

Vc. 5

Vd. 7

Page 94: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

84

If T is spanning tree of K9. 9, how many bridges does T contain?6a. 8b. 9c. 4d.

If T is spanning tree of K10. 9, how many vertices will be there for a tree T?8a. 7b. 9c. 10d.

Page 95: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

85

Chapter VII

Connected and Disconnected Graphs

Aim

The aim of this chapter is to:

explain the concepts of connected and disconnected graphs•

give a brief description of walk, path, trail and cycle•

describe connected graphs•

Objectives

The objectives of this chapter are to:

explain the components of connected graphs•

explicate the method of solving problems on calculating shortest path on graphs•

describe Dijsktra’s algorithm•

Learning outcome

At the end of this chapter, you will be able to:

calculate shortest path on graphs•

enlist the terminologies in connectivity of graphs•

identify the use of connected and disconnected graphs•

Page 96: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

86

7.1 Connected and Disconnected GraphConnected and disconnected graph contains the following types:

Walk•Trail•Path•Cycle•

7.1.1 WalkLetGbeagraph.AfinitealternatingsequenceW:{v1, e1, v2, e2, v3, e3 ... vi ei ... vi+1 ... vn} of vertices and edges of G beginning and ending with a vertex in such a way, that every edge in W is incident on a vertex which precedes and succeeds, is called as walk in G. Note:

The walk is called v1. 1 – vn walk.v2. 1 and vn are called terminal vertices of the walk and v2, v3, ... vn-1 are called intermediate vertices.If terminal vertices are same in a walk, then it is called as closed walk.3. In a walk, an edge or a vertex may be repeated more than once.4. The number of edges in the walk (including repetition) is called the length of the walk.5.

Example:Consider,

e5 e4e6

v2

v4

v1e1

e3

e7

e2

e8v5

Then following are some walks:W1. 1: v1 e1 v2 e2 v2 e3 v3 e8 v4 It is v1-v4walk;length=4W2. 2: v5 e7 v4 e5 v1 e1 v2 It is v5-v2walk;length=3W3. 3: v2 e2 v2 It is v2-v2closedwalk;length=1W4. 4: v2 e2 v2 e1 v1 e5 v4 e7 v5 e6 v1 e1 v2 It is v2-v2closedwalk;length=6

7.1.2 TrailA walk in which no edge is repeated is called a trail. If terminal vertices in a trail are same, it is called a closed trail, otherwise it is called an open trail.

Page 97: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

87

Example:Consider,

e5

e4e6

v2

v3

v4

v1 e1

e3e7

e2

e8v5

Now, v1. 3, e3, v3 e2 v2 e7 v5 e5 v4 e4 v2 e1 v1 here edges are not repeated, therefore, it is a trial (∴it is trail).v2. 2 e2 v3 e3 v3 e2 v2: not a trail (∵ e2 is repeated twice)

7.1.3 Path The walk in which no vertex is repeated more than once is called a path. Since vertex does not repeat, edge cannot repeat more than once.∴ Every path is a trial. Loop cannot be included in a path.

Length of Path: Number of edges in the path is called length of path. Any two paths with the same number of vertices are isomorphic.

7.1.4 Cycle (Circuit)A closed path is called a cycle or a circuit. The number of edges in the path is called length of path.Length of a cycle: Length is a number of edges in cycle.

7.2 Connected GraphThe graph is said to be a connected graph, if there is a path between every pair of vertices in G.Otherwise, it is called a disconnected graph. Thus, a graph G is disconnected, if there is a pair of vertices in G such that there is no path between them.

Example:

v1

v8

v7

v5

v6

v4

v2

v3

In the above graph, there is no path joining vertices v3 and v4. ∴ It is a disconnected graph.In a graph, the vertex ‘u’ is said to be connected with vertex ‘v’ if there is a path form u to v.

Page 98: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

88

7.2.1 ComponentLet G be a graph and u be a vertex of G. Let v(u) denote the set of all vertices in G which are connected to the vertex u. Then, the sub-graph G’ of G induced by v(u) is called a component of G.

Example:Following are connected graphs, (Graph is only one component)1.

G1 G2 G3

Following are disconnected graphs (Graph contains more than one components)2.

G1 G2 G3 G4

7.2.2 Cut VertexLet G be a connected graph. Vertex v is cut vertex if and only if G-v is a disconnected graph.In each of the following graphs, vertex v is cut vertex.

V

VV V V V V V

7.3 Weight GraphWeighted graph is a graph in which each edge of a graph is assigned a positive real number.Positive real number is called as weight of edge ‘e’.

Example:u

x

w

v

u

x

v

w

y15

3

4

2

2

4

3

5

Weight of a path is sum of weights of all edges in the path.Weight of minimum weighted path is called as shortest path.

Page 99: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

89

7.3.1 Dijkstra’s AlgorithmDijkstras’s algorithm gives shortest path between a vertex to all other vertices of connected graph.Steps of Dijkstras’s algorithm:Step 1 : Consider given connected weighted graph. G.V is set of vertices of G. S. and t are any two vertices of G.Step2 :Initiallyλ(s)=0andλ(v)=∞.Pv denotes shortest path from S to V. Assign T = V.Step3 :SelectvertexuinTforwhichλ(u)isminimum.Step 4 : If u = t then STOP. And Pt is desired path.Step 5 : For every vertex V ∈Twhichisadjacenttou,Consideredgee={u,v}Ifλ(u)+W(e)<λ(v)then, λ(v)=λ(u)+W(e)andPv = Pu ∪ {e}Step 6 : Modify T by T = T(u) and go to step 2.

Example:ByusingDijkstra’salgorithm,findtheshortestpathfromvertexa to all vertices of the graph given below.

b

a

c

d e h

gf

2

2

1

6

5

2

3

4

4

1 7

3

Solution:Initiallyλ(a)=0

Vertex a b c d e F g h

λ 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞

T a b c d e F g h

Vertices b and f are adjacent to a,λ(b)=min{∞,2}=2λ(f)=min{∞,1}=1

Vertex a b c d e F g h

λ 0 2 ∞ ∞ ∞ 1 ∞ ∞

T a b c d e F g h

λ(f)=1isminimumVertex d and g are adjacent to f

∴λ(d)=min{∞,4}=4∴λ(g)=min{∞,6}=6

Page 100: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

90

Vertex a b c d e f g h

λ(v) 0 2 ∞ 4 ∞ 1 6 ∞

T - b c d e - g h

λ(b)=2isminimumThe vertex in T adjacent to b are c, d, e. ∴λ(c)=min{∞,4}=4 λ(d)=min{4,4}=4 λ(e)=min{∞,6}=6

Vertex a b c d e f g h

λ(v) 0 2 4 4 6 1 6 ∞

T - - c d e - g h

The vertex in T adjacent to b are c, e, h.λ(e)=min(6,7)=6λ(h)=min{∞,5}=5

Vertex a b c d e f g h

λ(v) 0 2 4 4 6 1 6 5

T - - - d e - g h

λ(d)=4isminimumThe vertices in T adjacent to d is e only.Λ(e)=min{6,8}=6

Vertex a b c d e f g h

λ(v) 0 2 4 4 6 1 6 5

T - - - - e - g h

λ(h)=5inminimumThe vertices in T adjacent to h is g only.λ(g)=min{6,11}=6

Vertex a b c d e f g h

λ(v) 0 2 4 4 6 1 6 5

T - - - - e - g -

λ(e)=λ(g)=6Supposeλ(e)=6isminimumandg∈ T is adjacent to e.∴λ(g)=min{6,13}=6

Page 101: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

91

Vertex a b c d e f g h

λ(v) 0 2 4 4 6 1 6 5

T - - - - - - g -

Finally,

Vertex a b c d e f g h

λ(v) 0 2 4 4 6 1 6 5

T - - - - - - - -

At the last shortest path from a to all other vertices is

b

a

c

d e h

gf

2 2

6

5

c

4

1

6

4

0

7.4 ConnectivityConnectivity of a graph includes following terminologies:

7.4.1 Edge ConnectivityLet G be a connected graph. E is a set of minimum number of edges required to disconnect the graph. Number of edges in such minimum disconnecting set edges is called as edge connectivity of graph G.Removal of a minimum number of edges required to disconnect the graph, such number is called edge connectivity.Itisdenotedasλ(G).

Example 1:

e2

e3

e4

e1

Removal of only one edge e1issufficienttodisconnectthegraphG.∴λ(G)=1

Example 2:

e2

e1

Page 102: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

92

Removal of minimum two edges e1 and e2 requires to disconnect the graph.∴λ(G)=2

Example 3:

e2

e3

e1

Removal of minimum three edges e1, e2, e3 are required to disconnect the graph.∴λ(G)=3

7.4.2 Vertex ConnectivityLet G be a connected graph. Minimum number of vertices whose removal from G leaves disconnected graph such number of vertices is called vertex is called connectivity of G.Notation: Vertex connectivity denoted by k (G)Removal of a minimum number of vertices required to disconnect the graph. Such number is called vertex connectivity.

Example 1:

v

RemovalofonlyonevertexvissufficienttodisconnectthegraphG.∴ k (G) = 1

Example 2:

v1

v2

Removal of minimum two vertices v1 and v2 requires to disconnect the graph.∴ k (G) = 2

Example 3:

v2

v1

v3

Removal of minimum three vertices v1, v2, v3 requires to disconnect the graph∴ k (G) = 3

Page 103: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

93

7.4.3 Degree of GraphLet G be a connected graph. Degree of minimum degree vertex of graph G is called degree of graph G.Notation:δ(G)=degreeofgraphG.

Example 1:

v3

v2

v1 v4

v6

v5v7

d (v1) = 2, d (v2) = 2 , d (v3) = 3d (v4) = 1, d (v5) = 1, d (v6) = 1d (v7) = 4min {2, 2, 3, 1, 1, 1, 4} =1∴δ(G)=1

Example 2:

v3

v2v1

v4

d(v1) = 2, d(v2) =3d(v3) = 2, d(v4) = 3Min {2, 2, 3, 3} = 2∴δ(G)=2

Example 3:

v3

v2v1

v4

v5

d (v1) = 3, d (v2) =3d (v3) = 3, d (v4) = 3, d (v5) = 4min {3, 3,3, 3, 4} = 3∴δ(G)=3

Theorem 1: The edge connectivity of a graph G can not exceed the smallest degree of a vertex in G.

Proof:Let G be a connected graph with n vertices. Degrees of these vertices is d1, d2, d3, d4, ... dn.Suppose v1 is vertex of smallest degree vertex in G.

Page 104: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

94

∴δ(G)=d1∴ there are d1 edges incident on vertex v1.The removal of such d1 edges graph becomes disconnected.∴λ(G)≤δ(G)

Theorem 2:ThevertexconnectivityofgraphGcannotexceedtheedgeconnectivityofG.i.e.,k(G)≤λ(G).

Proof:LetGbeaconnectedgraphwithedgeconnectivityλ(G)=t.∴ Removal of t edges from graph G becomes disconnected and vertex set is partitioned into two disjoint subsets v1 and v2.End vertices of above t edges in v1 are at the most t in number.∴ removing t edges from G graph becomes disconnected.k(G)≤δ(G)k(G)≤λ(G)≤δ(G)

Page 105: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

95

SummaryA walk is an alternating sequence of vertices and edges, beginning and ending with a vertex, where each vertex •is incident to both the edge that precedes it and the edge that follows it in the sequence, and where the vertices thatprecedeandfollowanedgearetheendverticesofthatedge.Awalkisclosedifitsfirstandlastverticesare the same, and open if they are different.A trail is a walk in which all the edges are distinct. A closed trail has been called a tour or circuit, but these are •not universal, and the latter is often reserved for a regular subgraph of degree two.Traditionally, a path referred to what is now usually known as an open walk. Nowadays, when stated without •anyqualification,apathisusuallyunderstoodtobesimple,meaningthatnovertices(andthusnoedges)arerepeated.A walk that starts and ends at the same vertex but otherwise has no repeated vertices or edges is called a •cycle.Ifitispossibletoestablishapathfromanyvertextoanyothervertexofagraph,thegraphissaidtobeconnected;•otherwise, the graph is disconnected. A graph is totally disconnected if there is no path connecting any pair of vertices. This is just another name to describe an empty graph or independent set.

ReferencesKenneth, R., 2008. • Discrete Mathematics and its applications, Graphs, 6th ed., Tata McGraw Hill Publications.Deo, N., 2004. • Graph Theory with Applications to Engineering and Computer Science, Connected and Disconnected Graphs, PHI Learning Pvt. Ltd.Graphs• , [Pdf] Available at: <https://courses.cit.cornell.edu/info2950_2012sp/graph.pdf> [Accessed 23 June 2013].Graph concepts,• [Pdf] Available at: <http://users.phys.psu.edu/~ralbert/phys597_08/c02_graph_conc.pdf > [Accessed 23 June 2013].2011.• Disconnected Graphs-Graph Theory [Video online] Available at: <https://www.youtube.com/watch?v=iR7o8rPi2PI > [Accessed 23 June 2013].2009.Connected Graph [Video online] Available at: <https://www.youtube.com/watch?v=wG-82q-0Dhg > •[Accessed 23 June 2013].

Recommended ReadingMarcus, D., 2008. • Graph Theory: A Problem Oriented Approach, Mathematical Association of America.Balakrishnan, V. K., 1997. • Schaum’s outline of theory and problems of graph theory. McGraw-Hill Professional.Gross, J. L. & Yellen, J., 2006. • Graph theory and its applications, Graph theory, Chapman and Hall/CRC.

Page 106: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

96

Self AssessmentIf terminal vertices are same in a walk, it is called a/ an ____________ walk.1.

identicala. uniformb. openc. closedd.

The number of edges in the path is called __________ of a path.2. rangea. lengthb. distancec. widthd.

A walk in which no edge is repeated is called a/ an _________.3. closed walka. open trailb. trailc. pathd.

The graph is said to be a connected graph, if there is a path between every _________.4. pointa. pair of verticesb. pair of edgec. componentd.

A ________ is an edge whose removal disconnects a graph.5. bridgea. cut vertexb. vertexc. pointerd.

Find the bridges of the graph.6.

e5

e1

e2e3 e4

e6

ea. 1

eb. 3, e6

ec. 1, e4

ed. 1, e2, e6

Page 107: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

97

Which of the following is an expression of the given graph?7.

connecteda. disconnectedb. bipartitec. completed.

Find the number of components for the following graph:8.

1a. 3b. 2c. 5d.

Find number of components for the following graph:9.

2a. 6b. 1c. 3d.

Find the number of components for the following graph:10.

1a. 6b. 5c. 4d.

Page 108: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

98

Chapter VIII

Introduction to Probability

Aim

The aim of this chapter is to:

highlight the concept of discrete probability•

focus on solving the problems using discrete probability distribution•

explain different types of probability distribution •

Objectives

The objectives of this chapter are to:

explain the term of probability distribution with its main types •

elaborate various applications of poisons and binomial distribution•

explain the students to solve practical problems using binomial and poisons distribution•

Learning outcome

At the end of this chapter, you will be able to:

understand the knowledge of probability and their types•

formulate and solve problems related to probability distribution•

calc• ulate binomial distribution, poisson distribution and normal distribution

Page 109: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

99

8.1 IntroductionProbability is basically concerned with drawing conclusions (or inference) from experiments involving uncertainties. For these conclusions and inferences to be reasonably accurate, an understanding of probability theory is essential. Study of probability in computer science is important for software development phases since it is used to extract requirements from the customers which are used by the next phases for designing and implementation of the system. Because of its importance, this chapter focuses on the various aspects required in computer science and help students to get familiar with basic concepts of discrete probability in the long run.

8.2 Terminologies in ProbabilityTo become familiar with the discrete probability, we should know about probabilistic experiments, sample spaces, simple events and compound events.

Probabilistic experimenta. A probabilistic experiment, or random experiment, or simply an experiment, is the process by which an observation is made. In probability theory, any action or process that leads to an observation is referred to as an experiment.Example:

tossing a pair of fair coins•tossing a balanced dice•counting cars that drive past a toll booth•

Sample spaceb. The sample space associated with a probabilistic experiment is the set consisting of all possible outcomes of the experiment and is denoted by S. The elements of the sample space are referred to as sample points. A discrete sample spaceisonethatcontainseitherafiniteoracountablenumberofdistinctsamplepoints.

Eventc. An event in a discrete sample space S is a collection of sample points, i.e., any subset of S. In other words, an event is a set consisting of possible outcomes of the experiment.

I. Simple Event and Compound EventA simple event is an event that cannot be decomposed. Each simple event corresponds to one and only one sample point. Any event that can be decomposed into more than one simple event is called a compound event.

II. Complementary EventLet A be an event connected with a probabilistic experiment E and let S be the sample space of E. The event B of non-occurrence of A is called the complementary event of A. This means that the subset B is the complement of A in S.

Example:Experiment 1: Tossing a coinSample space: S = {Head or Tail} or we could write:S = {0, 1} where 0 represents a tail and 1 represents a head.

Experiment 2: Tossing a coin twiceSample Space: S = {HH, TT, HT, TH} where H represents head and T represents tail.Some events:E1 = {Head},

Page 110: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

100

E2 = {Tail},E3 = {All heads}

Experiment 3: Tossing a diceSample space:S = {1, 2, 3, 4, 5, 6} or S = {Even, odd}Some events:Even numbers, E1 = {2, 4, 6}Odd numbers, E2 = {1, 3, 5}The number 1, E3 = {1}At least 3, E4 = {3, 4, 5, 6}

Experiment 4:Two items are picked, one at a time, at random from a manufacturing process, and each item is inspected and classifiedasdefectiveornon-defective.Sample space: S = {NN, ND, DN, DD} whereN = Non-defectiveD = DefectiveSome events:E1 = {only one item is defective} = {ND, DN}E2 = {both are non-defective} = {NN}

8.3 ProbabilityLet S be the sample space in probabilistic experiment E. Suppose each outcome of an experiment is equally likely andthenumberofoutcomesisfinite.IfAisaneventconnectedwithE, then the probability of the occurrence of A, P (A), is given by:

Example:Consider the experiment of tossing a single balanced dice and recording the number on the top face.A: The number on the top face is an even number. Then A = {2, 4, 6} the probability of occurrence of A, P (A), is given by

=

8.3.1 Definition of Probability Using an EventSuppose an event E can happen in r ways out of a total of n possible equally likely ways. Then the probability of occurrence of the event (called its success) is denoted by:

P (E) =

The probability of non-occurrence of the event (called its failure) is denoted by:

P ( ) = .

Notice the bar above the E, indicating the event does not occur.Thus, P ( ) + P (E) =1

In other words, this means that the sum of the probabilities in any experiment is 1.

Page 111: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

101

8.3.2 Definition of Probability Using Sample SpaceWhen an experiment is performed, we set up a sample space of all possible outcomes. In a sample of n equally likely outcomes, we assign a chance (or weight) of to each outcome.

Wedefinetheprobabilityofaneventforsuchasampleasfollows:TheprobabilityofaneventEisdefinedasthenumberofoutcomesfavourabletoEdividedbythetotalnumberofequally likely outcomes in the sample space S of the experiment.That is, P (E) = Where,n (E) is the number of outcomes favourable to E andn (S) is the total number of equally likely outcomes in the sample space S of the experiment.

8.3.3 Rules of ProbabilityThe rules of probability includes following:

All probabilities between 0 and 1 are inclusive.1. 0 ⇐P (E) ⇐ 1

The sum of all the probabilities in the sample space is 1.2. There are some other rules which are also important.

The probability of an event which cannot occur is 0.3. The probability of any event which is not in the sample space is zero.

The probability of an event which must occur is 1.4. The probability of the sample space is 1.

The probability of an event not occurring is one minus the probability of it occurring.5. P (E’) = 1 – P (E)

Mutually exclusive events6. Two events are mutually exclusive if they cannot occur at the same time. Another word that means mutually exclusive is disjoint. If two events are disjoint, then the probability of them both occurring at the same time is 0.

Disjoint: P (A and B) = 0

If two events are mutually exclusive, then the probability of either occurring is the sum of the probabilities of each occurring.

Specific addition rule7. Only valid when the events are mutually exclusive. P (A or B) = P (A) + P (B)

Example:Given: P (A) = 0.20, P (B) = 0.70, A and B are disjoints.

B B’ Marginal

A 0.00 0.20 0.20

A’ 0.70 0.10 0.80

Marginal 0.70 0.30 1.00

Page 112: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

102

The values in BOLD are given in a problem. The grand total is always 1.00 and the remaining values are obtained after addition and subtraction.

Non-mutually exclusive events8. In the events which aren’t mutually exclusive, there is some overlap. When P(A) and P(B) are added, the probability of the intersection (and) is added twice. To compensate for that double addition, the intersection needs to be subtracted.

General addition ruleP (A or B) = P (A) + P (B) – P (A and B)

Interpreting the tableCertain things can be determined from the joint probability distribution. Mutually exclusive events will have a probability of zero. All inclusive events will have a zero opposite the intersection. All inclusive means that there is nothing outside of those two events: P (A or B) = 1.

B B’ Marginal

A A and B are mutually exclusiveif this value is 0

A’ A and B are all inclusive if this value is 0

Marginal 1.00

Independent events9. Two events are independent if the occurrence of one does not change the probability of the other occurring. An examplewouldberollinga2onadiceandflippingaheadonacoin.Rollingthe2doesnotaffecttheprobabilityofflippingthehead.If events are independent, then the probability of them both occurring is the product of the probabilities of each occurring.

Specific multiplication ruleP (A and B) = P (A) × P (B)

Example:P (A) = 0.20, P (B) = 0.70, A and B are independent.

B B’ Marginal

A 0.14 0.06 0.20

A’ 0.56 0.24 0.80

Marginal 0.70 0.30 1.00

The 0.14 is because the probability of A and B is the probability of A times the probability of B or 0.20 × 0.70 = 0.14.

Dependent events10. If the occurrence of one event affects the probability of the other occurring, then the events are dependent.

Conditional probabilityThe probability of event B occurring that event A has already occurred is read “the probability of B given A”

Page 113: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

103

and is written: P (B|A)General multiplication rule P (A and B) = P (A) × P (B|A)

Example:P (A) = 0.20, P (B) = 0.70, P (B|A) = 0.40A good way to think of P (B|A) is that 40% of A is B. 40% of the 20% which was in event A is 8%, thus the intersection is 0.08.

B B’ Marginal

A 0.08 0.12 0.20

A’ 0.62 0.18 0.80

Marginal 0.70 0.30 1.00

Independence Revisited11. The following four statements are equivalent

A and B are independent events.P (A and B) = P (A) × P (B)P (A|B) = P (A)P (B|A) = P (B)

The last two are because if two events are independent, the occurrence of one doesn’t change the probability of the occurrence of the other. This means that the probability of B occurring, whether A has happened or not, is simply the probability of B occurring.

Example:Given P (A) = 0.20, P (B) = 0.70, P (A and B) = 0.15

B B’ Marginal

A 0.15 0.05 0.20

A’ 0.55 0.25 0.80

Marginal 0.70 0.30 1.00

8.3.4 Conditional ProbabilityLet A and B be two events connected with a probabilistic experiment. Then the conditional probability of A, when itisgiventhateventBhasoccurred,i.e.,P(B)≠0,isdenotedbysymbolP(A|B)andisgivenby,P (A|B) =

Example:Considerthetossoftwodistinctbalanceddice.Forfindingtheprobabilityofgettingasumof7,whenitisgiventhatthedigitinthefirstdiceisgreaterthanthatintheseconddice.Intheprobabilisticexperimentoftossingtwodice the sample space S consists of 6 × 6 = 36 outcomes.

Assume that each of these outcomes is equally likely. Let A be an event: The sum of the digits of the two dice is 7, •

A: {(6, 1), (5, 2), (4, 3), (3, 4), (2, 5), (1, 6)}

Page 114: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

104

LetBbeanevent:Thedigitinthefirstdiceisgreaterthanthesecond.•B : {(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (5 , 1), (5 , 2), (5 , 3),(5 , 4), (4, 1), (4, 2), (4, 3), (3, 1), (3, 2), (2, 1)}.

LetCbetheevent:Thesumofthedigitsinthetwodiceis7butthedigitinthefirstdiceisgreaterthanthe•second.

C:{(6,1),(5,2),(4,3)}=A∩B.Recall that the probability of an event occurring given that another event has already occurred is called a •conditional probability. The probability that event B occurs, given that event A has already occurred is, •

P (B|A) = This formula comes from the general multiplication principle and a little bit of algebra. •Since we are given that event A has occurred, we have a reduced sample space. Instead of the entire sample •space S, we now have a sample space of A since we know A has occurred. So the old rule about being the number in the event divided by the number in the sample space still applies. It •is the number in A and B (must be in A since A has occurred) divided by the number in A. If you then divide numerator and denominator of the right hand side by the number in the sample space S, then •you have the probability of A and B divided by the probability of A.

Example 1:The question, “Do you smoke?” was asked of 100 people. Results are shown in the table.

Yes No Total

Male 19 41 60

Female 21 28 40

Total 31 69 100

1. What is the probability of a randomly selected individual being a male who smokes? Solution: This is just a joint probability. The number of “Male and Smoke” divided by the total = = 0.19

2. What is the probability of a randomly selected individual being a male?

Solution: This is the total for male divided by the total = = 0.60. Since no mention is made of smoking or not smoking, it includes all the cases.

3. What is the probability of a randomly selected individual smoking? Solution: Again, since no mention is made of gender, this is a marginal probability, the number of people who smoke divided by the total number o people= = 0.31.

4. What is the probability of a randomly selected male smoking? Solution:Thistime,therandomlyselectedpersonisamale-thinkofstratifiedsampling.

5. What is the probability that the male smokes? Solution: 19 males smoke out of 60 males, so = 0.31666.

6. What is the probability that a randomly selected smoker is male? Solution:Thistimewearetoldthatwehaveasmokerandaskedtofindtheprobabilitythatthesmokerisalsoamale. There are 19 male smokers out of 31 total smokers, so ≅ 0.6129.

Page 115: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

105

8.3.5 Axiomatic Approach of ProbabilityAnalysing the concept of equally likely probability, we see that three conditions must hold.

The probability of occurrence of any event must be greater than or equal to 0.1. The probability of the whole sample space must be 1.2. If two events are mutually exclusive, the probability of their union is the sum of their respective probabilities.3.

Thesethreefundamentalconceptsformthebasisofthedefinitionofprobability.

8.4 Bayes’ TheoremLet E1 and E2 be two mutually exclusive events forming a partition of the sample space S and let E be any event of thesamplespacesuchthatP(E)≠0.

Fig. 8.1: Bayes’ theorem illustration-IExample:The sample space S is described as “the integers 1 to 15” and is partitioned into: E1 = “the integers 1 to 8” and E2 = “the integers 9 to 15” If E is the event “even number” then we have the following:

Fig. 8.2 Bayes’ theorem illustration-II

Statement of Bayes’ TheoremThe probability for the situation described above is given by Bayes’ theorem, which can be calculated in two ways:

P (E1|E) =

=

So for our example above, checking both items of this equation:

P (E1|E) =

Page 116: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

106

=

= Example:Of all the smokers in a particular district, 40% prefer brand A and 60% prefer brand B. Of those smokers who prefer brand A, 30% are females, and of those who prefer brand B, 40% are females.

What is the probability that a randomly selected smoker prefers brand A, given that the person selected is a female?

Solution:

Fig. 8.3 Bayes’ theorem illustration-IIIS = “smokers in the district” E1 = “prefer brand A”E2 = “prefer brand B” and E is the event “female”.

P (E1|E) =

=

=

8.5 Probability DistributionsThere are two main types of probability distributions i.e., Discrete and Continuous. These two types are further dividedintofurthersubtypesasshowninthefigurebelow:

Page 117: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

107

Fig. 8.4 Probability distributionIn this chapter we focus only 2 types of discrete distribution, i.e., Binomial and Poisson’s Distribution

8.5.1 Binomial DistributionThis distribution was discovered by a Swiss mathematician James Bernoulli. Binomial probability distribution is concerned with a discrete random variable and describes discrete data resulting from what is often called as the Bernoulli process.

Forexample,thetossingofafaircoinforafixednumberoftimesisaBernoulliprocessandtheoutcomeofsuchtosses can be represented by the binomial distribution. This distribution applies in situations where there are repeated trials of any experiment for which only one of two mutually exclusive outcomes (denoted as ‘success’ and ‘failure’) can result on each trial.The Bernoulli process has following characteristics:

Dichotomy• : This means that each trial has only two mutually exclusive possible outcomes, viz., ‘success’ or ‘failure’, ‘yes’ or ‘no’, ‘heads’ or ‘tails’ and the like.Stability• :Thismeansthattheprobabilityoftheoutcomeofanytrialisknown(orgiven)andremainsfixedover time i.e., remains the same for all the trials.Independence• : This means that the trials are statistically independent, i.e., to say the happening of an outcome or the event in any particular trial is independent of its happening in any other trial or trials.

8.5.1.1 Probability Function of Binomial DistributionThe random variable, say X, of interest in the Binomial distribution is the number of ‘successes’ in n trials. The probability function of the binomial distribution is written as under-f (X = r) = nr = 0, 1, 2… nwheren = number of trialsp = probability of success in a single trialq = (1 - p) = probability of failure in a single trial ( p + q = 1)r = number of successes in n trials

Page 118: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

108

8.5.1.2 Parameters of Binomial DistributionThebinomialdistributiondependsuponthevaluesofpandn.KnowledgeofptrulydefinestheprobabilityofXsincenisknownbydefinitionoftheproblem.Theprobabilityofthehappeningofexactlyreventsinntrialscanbe found out using the above stated binomial function. The value of p also determines the general appearance of the binomial distribution, if shown graphically as follows:

When p (i) < 0.5, the binomial distribution is skewed to the right or it is positively skewed and the graph takes thefollowingformasshowninthefigurebelow.

Fig. 8.5 Positively skewed binomial distributionWhen p = 0.5, the binomial distribution is symmetrical and the graph takes the following form as shown (ii) inthefigurebelow.

Fig. 8.6 Symmetrical binomial distribution When p > 0.5, the binomial distribution is skewed to the left or it is negatively skewed and the graph takes (iii) thefollowingformasshowninthefigurebelow.

Page 119: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

109

Fig. 8.7 Negatively skewed binomial distributionBut if p stays constant and n increases, the shaded portion tends to bunch up together to form a bell shape, (iv) i.e., the binomial distribution tends to become symmetrical and the graph will be something like as shown inthefigurebelow.

Fig. 8.8 Bell-Shaped binomial distribution

8.5.1.3 Important Measures or Constants of Binomial Distribution

Mean = •

Variance = •

Standard Deviation = •

CoefficientofSkewness=•

CoefficientofKurtosis=•

Example 1:Five coins are tossed 3200 times. Find the frequency of distribution of heads and tales and tabulate the results.

Answer:Here,n = 5, N = 3200p = q =

Page 120: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

110

r = 0, 1, 2, 3, 4, 5

No. of heads Probability

0 5

1 5

2 5

3 5

4 5

5 5

Total 3200

Example 2:The probability of a defective volt is 0.2. Find the mean, variance and standard deviation for the distribution of defectivevoltsinatotalof1000,andalsofindcoefficientofskewnessandkurtosis.

Answer:Here,p = 0.2q = 1 – 0.2 = 0.8n = 1000Mean = n.p = 1000 0.2 = 200Variance = n.p.q = 1000 0.2 0.8 = 160Standard Deviation = = = 12.6

8.5.2 Poisson DistributionPoisson distribution is appropriate, specially when probability of happening of an event is very small so that q is almostequaltounityandnisverylargesuchthattheaverageofseriesi.e.,n.pisafinitenumber.Experiencehasshown this distribution is good for calculating the probabilities associated with x occurrences in a given time period orspecifiedarea.

The random variable of interest in Poisson distribution is the number of occurrences of a given event during a given interval (this interval may be time, distance, area etc). We use X to represent the discrete random variable and r to representaspecificvaluethatXcantake.Theprobabilityfunctionofthisdistributioniswrittenas-

f (X = r) = Where,e = 2.7183 being the basis of natural logarithms.r=0,1,2,3...∞m=averagenumberofoccurrencesperspecifiedintervalorwecansayitisthmeanofthedistributionandm≥0.

Page 121: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

111

The Poisson process has following characteristics:Concerning a given random variable, the mean relating to a given interval can be estimated on the basis of past •data concerning the variable under study.Ifwedividethegivenintervalintoverysmallintervals,wewillfind:•

The probability that exactly one event will happen during the very small interval is a very small number �and is constant for every other very small interval.The probability that two or more events will happen within a very small interval is so small, that we can �assign it a zero value.The event that happens in a given very small interval does not depend on when the very small interval falls �during a given interval.The number of events in any small interval does not depend on the number of events in any other small �interval.

The Poisson distribution has following uses:The use of Poisson distribution is resorted to those cases when we do not know the value of ‘n’ or when ‘n’ cannot be estimated with any degree of accuracy. In fact, in certain cases, it does not make any sense in asking the value of ‘n’. For example,

The goals scored by one team in a football match are given, it cannot be stated how many goals could not be •scored.Ifonewatchescarefullyonemayfindouthowmanytimesthelightningflashed,butitisnotpossibletostate•howmanytimesitdidnotflash.The number of deaths per day in a district in one year due to a disease•The number of scooters passing through a road per minute during a certain part of the day for a few months•The number of typing mistakes per page in a book containing many pages by an experienced typist•The number of suicides per day in a city•The number of telephone calls per minute in a telephone booth•The number of bacteria in a drop of clean water•

Example 1:A book distributed randomly, contains 100 misprints throughout its 100 pages. What is the probability that a page observed at random contains at least 2 misprints?

Answer:m =

Probability that a page contains at least 2 misprints is given by-

P(r≥2)=1–[P(0)+P(1)]-------------(equation-1)

Applying Poisson’s distribution,

P (r) =

Put r = 0,

P (0) =

P (1) =

Page 122: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

112

Substitute the value of P (0) and P (1), we get,

P(r≥2)=1–

= 1 –

Example 2:IfthemeanofPoissondistributionis4,findstandarddeviation,coefficientofskewnessandkurtosis.

Answer:Here, mean = m = 4

∴Standard deviation =

β1 =

β2 =

8.6 Other Types of DistributionOther types of probabilities distribution or simply probabilities includes following subtypes:i.e., Multinomial and Hyper geometric probabilities

8.6.1 Multinomial ProbabilitiesA multinomial experiment is an extended binomial probability. The difference is that in a multinomial experiment, therearemorethantwopossibleoutcomes.However,therearestillafixednumberofindependenttrials,andtheprobability of each outcome must remain constant from trial to trial. Instead of using a combination, as in the case of the binomial probability, the number of ways the outcomes can occur is done using distinguishable permutations.

Example:The probability that a person will pass a College Algebra class is 0.55, the probability that a person will withdraw before the class is completed, is 0.40, and the probability that a person will fail is 0.05. Find the probability that in a class of 30 students, exactly 16 pass, 12 withdraw, and 2 fail.

Outcome X P(outcome)

Pass 16 0.55

Withdraw 12 0.40

Fail 2 0.05

Total 30 1.00

The probability is found using this formula: P = × [(0.55)16 × (0.40)12 × (0.05)2]

8.6.2 Hypergeometric ProbabilitiesHypergeometric experiments occur when the trials are not independent of each other and occur due to sampling withoutreplacement,asinafivecardpokerhand.Hypergeometricprobabilitiesinvolvethemultiplicationoftwocombinations together and then division by the total number of combinations.

Example:How many ways can 3 men and 4 women are selected from a group of 7 men and 10 women?

Page 123: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

113

Solution:

P = ≅ 0.3779.

Note that the sum of the numbers in the numerator are the numbers used in the combination in the denominator. This can be extended to more than two groups and called an extended hyper geometric problem.

8.7 Random WalkTossing a coin N times has a physical interpretation. Consider a particle that can move in only one-dimension. Let usalsoassumetheparticlecanmoveonlyafixeddistance,andcanonlymoveeithertotherightortheleft.

Todecidewhichwaytheparticlewillmove,wetossacoin.IftosscomesupwithH,theparticlemovestotheright;if the toss comes up with a tail, the particle moves to the left. In other words, the outcome is +1with probability P (H) and outcome is –1 with probability P (T).

In effect, the particle moves on a lattice of equally spaced points. This process that the particle is undergoing is called a Random walk also called Brownian motion.

Random walk is precisely the way the molecules from an open bottle of perfume spread the smell into the entire room, and is called a diffusion process. Tossing the coin N times corresponds to taking N steps.

Suppose the particle starts the random walk at the origin, takes k steps to the right, and concomitant N - k steps to the left. If NH is the number of heads and NT is the number of tails, then clearly, the distance from the origin is NH – NT=2k-N.Therearemanypathswhichleadtothefinalpositionofl=2k-N,andcorrespondtothenumberofdifferent ways that k heads can come up in N toss.

Fig. 8.9 Different paths leading to a final positionThe Probability that the particle, after doing a random walk of N-steps, will end up at position l= 2k –N is given by choosing k = .

AssumeNiseven,whichimplies,sincewithl=even.DefineN=2Mandl=2m.Then we have, PRW = (m, N) = probability of reaching position 2m

= P (

= ;–M≤m≤M

Fair Coin For simplicity, consider the special case when the probability to step to the right or left is equal, that is, p =q =

Page 124: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

114

Then we have, PRW (m, N) =

The interpretation of the formula above is the following. Since in every toss there are two outcomes, the probabilityofaspecificoutcomeis .AspecificpathistheresultoftakingNsteps,andhencethe

probability of it occurring is .

Theprobabilityofreachingapointlisgivenbymultiplyingtheprobabilityforaspecificpathtooccurbyallthepossible ways (paths) that go from the origin to the point l. We thus obtain P (l, N).For a particle undergoing a random walk, its position m at every point in its N-steps is a random variable. An important tool for studying the behaviour of random variables is to compute the average values of quantities of interest. For a function of the random variable m, say f (m), let us denote its average value by <f (m)>. Then we have,<f (m)> = -----equation (1)The above expression means that the average value of f(m) is given by the summing the value of f(m) for every outcomem,weightedby the likelihoodof thatvalueoccurring.Wehave thefollowingnaturaldefinitionforP(H). P (H) = ------- equation (2)

The two most important properties of any random variable is its average and its standard deviation. Let us return to the random walk with p =q = .The average position of the particle is given by,<m> = -------equation (3)<m> = 0 -------- equation (4)The reason we get zero is because we have assumed equal probability to step to the right or to the left.

Hence, on the average, its steps on either side of the origin cancel, with the average being at the starting point. However, we intuitively know that even though the average position of the particle undergoing random walk is zero, it will deviate more and more from the origin as it takes more and more steps.

Thereasonbeingthateverysteptheparticletakesisrandom;itishighlyunlikelythattheparticlewilltaketwoconsecutive steps in opposite directions. The measure of the importance of the paths that are far from the origin is measured by the average value of the square of the position of the particle.

The reason this measure is useful, is because every time the particle deviates from the origin, be it in the right or left directions, the square of the deviation is always be positive. We hence have the standard deviation given by,

2 ------------- equation (5)

= --------- -equation (6)

= 2M------------ equation (7)

= N -------------- equation (8)

We have the important result from equation (9) and (12) that, since, for k = ,m≡ , we have the following,

< ( ) 2 > = N ------------- equation (9)

⇒ < ( ---------------equation (10)

The equation above has an important interpretation. In any particular experiment, all we can obtain is NH= number of heads for N trial. So how do we compute P (H)?

Page 125: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

115

We would like to set <NH> = NH, but there are errors inherent in this estimate, since in any particular set of toss, we can get any value of NH which need not be equal to <NH>. In other words, what is the error we make if set P (H) =

?

Equation (14) tells us that for a fair coin, with , if we compute , we have

P (H) = ----------------equation (11)

= ---------------equation (12)

In other words, the estimate that we obtain for PH from our experiment, namely is withinthe errors which are approximately equal to the actual value.

Thepointtonotethattheerrorsthatareinherentinanyestimatearequantifiedabove,andgodownasthe ,

Where,

In general, for any random variable with standard deviation given by , the estimate for the probability , where NH is the number of times that the outcome has occurred, is given by,

P (H) = --------------- equation (13)In general, let beanestimateofsomequantityμthathasastandarddeviationgivenbyσandderivedfromasample of size N.

with 66% likelihood -------------------- equation (14)

= with 95% likelihood ------------------ equation (15)

The relation of with what it is estimating, namely ,isgraphicallyshowninthefigurebelow.

mest lies in this range with probability 95%

mest lies in this range with probability 2/3

µ - σ µ + σ

µ - 2σ µ µ + 2σ

Fig. 8.10 Estimate lies in a range around µ

Page 126: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

116

SummaryThe binomial distribution is the discrete probability distribution of the number of successes in a sequence •of n independent yes/no experiments, each of which yields success with probability p.The Poisson distribution is a discrete probability distribution that expresses the probability of a number of events •occurringinafixedperiodoftimeiftheseeventsoccurwithaknownaveragerateandindependentlyofthetime since the last event.Aprobability distribution identifies either the probability of each value of a randomvariable (when the•variable is discrete), or the probability of the value falling within a particular interval (when the variable is continuous).The probability distribution describes the range of possible values that a random variable can attain and •the probability that the value of the random variable is within any (measurable) subset of that range.A random walk is a mathematical formalisation of a trajectory that consists of taking successive random steps. •The results of a random walk analysis have been applied to computer science, physics, ecology, economics, psychologyandanumberofotherfieldsasafundamentalmodelforrandomprocessesintime.

ReferencesYakov, G. S., 1992. • Probability theory: An introductory Course, Introduction to Probability, Springer Textbooks.Grinstead, C. M., 1997. • Introduction to Probability, Conditional Probability. AMS Bookstore.Introduction to Probability • [Pdf] Available at: <http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf> [Accessed 23 June 2013].Bertsekas, D.P. & Tsitsiklis, J. N.• , Introduction to Probability [Pdf] Available at: <http://vfu.bg/en/e-Learning/Math--Bertsekas_Tsitsiklis_Introduction_to_probability.pdf > [Accessed 23 June 2013].2011• .Introduction to Probability [Video online] Available at: <https://www.youtube.com/watch?v=-8eSOmTPUbk > [Accessed 23 June 2013].2010.• Introduction to Probability [Video online] Available at: <https://www.youtube.com/watch?v=YWt_u5l_jHs > [Accessed 23 June 2013].

Recommended ReadingFreund, J.E., 1993. • Introduction to Probability, Dover publications.Rota G. C., 1998. • Probability Theory, Preliminary Edition.Roussas, G.G., 2007. • Introduction to Probability, Elsevier Inc.

Page 127: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

117

Self AssessmentWhat is the probability of getting an ace if a person chooses a card at random from a standard pack of 52 playing 1. cards?a. b. c. d.

What is the probability of getting a 5 when one rolls a dice?2. a. b. c. d.

There are 15 balls numbered 1 to 15, in a bag. If a person selects one at random, what is the probability that the 3. number printed on the ball will be a prime number greater than 5?a. b. c. d.

In a class of 100 students, suppose that 60 are French, and suppose that 10 of the French students are females. 4. FindtheprobabilitythatifIpickaFrenchstudent,itwillbeagirl,thatis,findP(A|B).a. b. c. d.

Whatistheprobabilitythatthetotaloftwodiceswillbegreaterthan8,giventhatthefirstdiceisa6?5. a. b. c. d.

If the probability that person 6. A will be alive in 20 years, is 0.7, and the probability that person B will be alive in 20 years is 0.5. What is the probability that they will both be alive in 20 years?

0.35a. 0.45b. 0.30c. 0.25d.

Page 128: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

118

Afairdiceistossedtwice.Findtheprobabilityofgettinga4or5onthefirsttossanda1,2,or3inthesecond7. toss.a. b. c. d.

Two balls are drawn successively without replacement from a box which contains 4 white balls and 3 red balls. 8. Findtheprobabilitythatthefirstballdrawniswhiteandthesecondisred.a. b. c. d.

A bag contains 5 white marbles, 3 black marbles and 2 green marbles. In each draw, a marble is drawn from the 9. bagandnotreplaced.Inthreedraws,findtheprobabilityofobtainingwhite,blackandgreeninthatorder.a. b. c. d.

The probability that a student passes in Mathematics is 10. and the probability that he passes in English is . If the probability that he will pass at least in one subject is , what is the probability that he will pass in both the subjects? (We assume it is based on probability only).a. b. c. d.

Page 129: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

119

Application I

Medical Testing

Thereisadeadlydiseasecalled‘X’thathasinfected10%ofthepopulation.Therearenosymptoms;victimsjustdrop dead one day. Fortunately, there is a test for the disease. The test is not perfect, however:

If John has the disease, there is a 10% chance that the test will say NO! (These are called “false negatives”.)•If John does not have disease, there is a 30% chance that the test will say YES! (These are “false positives”.)•

A random person is tested for the disease. If the test is positive, then what is the probability that the person has the disease?

Solution:Forfindingmeresolution,followthestepsbelow:Step 1: Find the sample spaceThe sample space is found with the tree diagram below.

Step 2: Define events of interestLet A be the event that the person has the disease. Let B be the event that the test waspositive. The outcomes in each event are marked in the tree diagram. WewanttofindP(A|B),theprobabilitythataJohnhasdiseaseX,giventhatthetestwaspositive.

Step 3: Find outcome probabilitiesFirst, we assign probabilities to edges. These probabilities are drawn directly from the problem statement. By the product rule, the probability of an outcome is the product of the probabilities on the corresponding root-to-leafpath.Allprobabilitiesareshowninthefigure.

Step 4: Compute event probabilitiesP(A | B) ===If the test is positive, then there is only a 25% chance that he has the disease. Thisanswerisinitiallysurprising,butmakessenseonreflection.Therearetwowaysthathecouldtestpositive.

First, it could be that he is sick and the test is correct. •Second, it could be that he is healthy and the test is incorrect. •

Theproblemisthatalmosteveryoneishealthy;therefore,mostofthepositiveresultsarisefromincorrecttestsofhealthy people.

pos.09

.9

.9

.1

.1 .01

.27.3

.63.7

pos

yes neg

neg

no

personhas X?

test result outcomeprobability

event A:has

disease?

event B:test

positive?

event A ∩ B ?

Page 130: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

120

We can also compute the probability that the test is correct for a random person. This event consists of two outcomes. The person could be sick and the test can be positive (probability 0.09), or the person could be healthy and the test can be negative (probability 0.63).

Therefore, the test is correct with the probability 0.09 + 0.63 = 0.72. The test is correct almost three-quarters of the time. But there is a simple way to make the test correct 90% of the time: always return a negative result. This “test” gives the right answer for all healthy people and the wrong answer only for the 10% that actually have the disease.

Page 131: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

121

Application II

A Chess ProblemIn how many different ways can we place a pawn (p), a knight (k), and a bishop (b) on a chessboard so that no two pieces share a row or a column?

Solution:Avalidconfigurationisshownbelowintheleftfigure,andaninvalidconfigurationisshownintherightfigure.First,wemapthisproblemaboutchesspiecestoaquestionaboutsequences.Thereisanabijectionfromconfigurations

to sequences. (rp, cp, rk, ck, rb, cb)where rp, rk, and rb are distinct rows and cp, ck, and cb are distinct columns. In particular, rp is the pawn’s row, cp is the pawn’s column, rk is the knight’s row, etc. Now we can count the number of such sequences using the generalised product rule:

•r• p is one of 8 rows•c• p is one of 8 columns•r• kis one of 7 rows (any one but rp)•c• k is one of 7 columns (any one but cp)•r• b is one of 6 rows (any one but rp or rk)•c• b is one of 6 columns (any one but cp or ck)

Thus,thetotalnumberofconfigurationsis(8·7·6)2.

k

b

p

valid

p

b k

invalid

Page 132: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

122

Application III

BoxingFlo,famed6.042TA,hasdecidedtotryoutfortheUSOlympicboxingteam.Flofiguresthatnpeople(includinghimself) are competing for spots on the team and only k will be selected. Thus, there are two cases to consider:

Floisselectedfortheteamandhisk−1teammatesareselectedfromamongtheothern−1competitors.The•number of different teams that be formed in this way is:Floisnotselectedfortheteam,andallkteammembersareselectedfromamongtheothern−1competitors.•The number of teams that can be formed this way is:

AllteamsofthefirsttypecontainFlo,andnoteamofthesecondtypedoes;therefore,thetwosetsofteamsaredisjoint. Thus, by the sum rule, the total number of possible olympics boxing teams is:

Claire, equally-famed 6.042 TA, thinks Flo isn’t so tough and so she might as well try out also. She reasons that n people (including her) are trying out for k sports. Thus, the number of ways to select the team is simply:

ClaireandFloeachcorrectlycountedthenumberofpossiblyboxingteams;thus,theiranswersmustbeequal.So we know:

+=

This is called Pascal’s Identity. Here, we relied purely on counting techniques.

Page 133: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

123

Application IV

Pass the BroccoliHere’s a game that involves a random walk. There are n+1 people, numbered 0, 1. . .n sitting in a circle:

The B indicates that person 0 has a big stalk of nutritious broccoli, which provides 250%of the US recommended daily allowance of vitamin-C and is also a good source of vitamin-A and iron. (Typical for a random walk problem, this game originally involved a pitcher of beer instead of a broccoli.)Person 0 passes the broccoli either to the person on his left or the person on his right with equal probability. Then, that person also passes the broccoli left or right at randomand so on. After a while, everyone in an arc of the circle has touched the broccoli and everyone outside that arc has not. Eventually, the arc grows until all but one person hastouchedthebroccoli.Thatfinalpersonisdeclaredthewinnerandgetstokeepthebroccoli!

Suppose that we are allowed to position ourself anywhere in the circle. Where we should stand in order to maximise theprobabilitythatwewin?Weshouldn’tbeperson0;wecan’twininthatposition.Theansweris“intuitivelyobvious”: we should stand as far as possible from person 0 at position .

Let’s verify this intuition. Suppose that we stand at position k ≠ 0. At some point, the broccoli is going to end up inthehandsofoneofourneighbors.Thishastohappeneventually;thegamecan’tenduntilatleastoneofthemtouchesit.Let’ssaythatpersonk−1getsthebroccolifirst.Nowlet’scutthecirclebetweenourselfandourotherneighbor, person k + 1:

k(k−1)...3210n(n−1)...(k+1)B

Now there are two possibilities. If the broccoli reaches to us before it reaches person k + 1, then we lose. But if the broccoli reaches person k + 1 before it reaches to us, then we and every other person who has touched the broccoli will win!

Thisisjustthefleaproblem:theprobabilitythatthebroccolihopsn−1peopletotheright(reachingpersonk+1)before it hops 1 person to the left (reaching to us) is. Therefore, our intuition was completely wrong: our probability of winning is regardless of where we’re standing!

01

2

3

.

.

.

.

k – 1

n – 1

nB

k + 1k

Page 134: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

124

Bibliography

References2007. • Lecture 1 - Propositional Logic, [Video online] Available at: <http://www.youtube.com/watch?v=xlUFkMKSB3Y> [Accessed 20 June 2013].2007. • Lecture 1 - Propositional Logic, [Video online] Available at: <http://www.youtube.com/watch?v=xlUFkMKSB3Y&list=PL0862D1A947252D20> [Accessed 20 June 2013].2007. Lecture 16-Trees• [Video online] Available at:< https://www.youtube.com/watch?v=q0woiOp7sqU> [Accessed 23 June 2013].2007. • Lecture 17- Trees and Graphs [Video online] Available at:< https://www.youtube.com/watch?v=fZqfkJ-cb28> [Accessed 23 June 2013].2007. • Lecture 32 - Recurrence Relations [Video online] Available at: <http://www.youtube.com/watch?v=qvw1GX93JSY> [Accessed 20 June 2013].2009. • Discrete Mathematics. 5 Graphs & Trees [Pdf] Available at:< http://vplab.snu.ac.kr/lectures/09-1/discrete_math/dm09_slide5.pdf> [Accessed 23 June 2013].2009.• Connected Graph [Video online] Available at:< https://www.youtube.com/watch?v=wG-82q-0Dhg > [Accessed 23 June 2013].2010. • Graph Theory - An Introduction! [Video online] Available at: <http://www.youtube.com/watch?v=HmQR8Xy9DeM> [Accessed 20 June 2013].2010.• Introduction to Probability [Video online] Available at:< https://www.youtube.com/watch?v=YWt_u5l_jHs > [Accessed 23 June 2013].2011.• Disconnected Graphs-Graph Theory [Video online] Available at:< https://www.youtube.com/watch?v=iR7o8rPi2PI > [Accessed 23 June 2013].2011• .Introduction to Probability [Video online] Available at:< https://www.youtube.com/watch?v=-8eSOmTPUbk > [Accessed 23 June 2013].2013. • Introduction to Recurrence Relations-1 [Video online] Available at: <http://www.youtube.com/watch?v=loh8rYkghHg> [Accessed 20 June 2013].AbsoluteMathematics, 2011. • Mathematical Induction [Video online] Available at: <http://www.youtube.com/watch?v=Uqn3f2k4vrA> [Accessed 20 June 2013].Bertsekas, D.P. & Tsitsiklis, J. N.• , Introduction to Probability [Pdf] Available at:< http://vfu.bg/en/e-Learning/Math--Bertsekas_Tsitsiklis_Introduction_to_probability.pdf > [Accessed 23 June 2013].bethjonesmath, 2008. • Introduction to Combinatorics (part 1) [Video online] Available at: <http://www.youtube.com/watch?v=cErUmuxraQ0> [Accessed 20 June 2013].bullcleo1, 2010. • Mathematical Induction [Video online] Available at: <http://www.youtube.com/watch?v=QHkG0d5kZvE> [Accessed 20 June 2013].Cameron, P. J., • Notes on Combinatorics, [Pdf] Available at: <http://www.maths.qmul.ac.uk/~pjc/notes/comb.pdf> [Accessed 20 June 2013].Chapter IV – Graph Theory,• [Pdf] Available at: <http://www.math.hkbu.edu.hk/~zqiao/Math1130_2009/Chap4.pdf> [Accessed 20 June 2013].Combinatorics• , [Pdf] Available at: <http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter3.pdf> [Accessed 20 June 2013].Davis, T., • Mathematical Induction, [Pdf] Available at: <http://www.math.utah.edu/mathcircle/notes/induction.pdf> [Accessed 20 June 2013].Deo, N., 2004. • Graph Theory with Applications to Engineering and Computer Science, Connected and Disconnected Graphs, PHI Learning Pvt. Ltd.Dr. Sharma, G. C. & Dr. Jain, M., 2009. • Advance Discrete Mathematics, Trees, 1st ed., Laxmi Publications, Ltd.

Page 135: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

125

eHow, 2012. • Introduction to Combinatorics : Principles of Math, [Video online] Available at: <http://www.youtube.com/watch?v=jrLYCzCc77g> [Accessed 20 June 2013].Graph concepts,• [Pdf] Available at:< http://users.phys.psu.edu/~ralbert/phys597_08/c02_graph_conc.pdf > [Accessed 23 June 2013].Graphs - Terminology and Representation• , [Online] Available at: <http://www.radford.edu/~nokie/classes/360/graphs-terms.html> [Accessed 20 June 2013].Graphs• , [Pdf] Available at:< https://courses.cit.cornell.edu/info2950_2012sp/graph.pdf> [Accessed 23 June 2013].Grinstead, C. M., 1997. • Introduction to Probability, Conditional Probability. AMS Bookstore.Gross, J. L. & Yellen, J., 2003. • Handbook of Graph Theory, Graphs, CRC Press.Gross, J. L., 2007. • Combinatorial Methods with computer applications, Graph theory, Chapman and Hall CRC.IEEM 2012 Discrete Mathematics: Trees • [Pdf] Available at:< http://chern.ie.nthu.edu.tw/DM/9-Tree.pdf> [Accessed 23 June 2013].Introduction to Probability • [Pdf] Available at:< http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf> [Accessed 23 June 2013].Johnsonbaugh, R., 2008. • Discrete Mathematics, 7th ed., Basic Counting Principle, Prentice Hall.Kenneth, R., 2008. • Discrete Mathematics and its applications, Graphs, 6th ed., Tata McGraw Hill Publications.Lal, A. K., • Lecture Notes on Discrete Mathematics, [Pdf] Available at: <http://home.iitk.ac.in/~arlal/book/mth202.pdf> [Accessed 20 June 2013].Langote, U. B. & Vhanmane, M. M., 2009. • Discrete Mathematics, Mathematical Induction, 2nd ed., Tech-Max Publication.Lovasz, L. & Vesztergombi, K., • Discrete Mathematics, [Pdf] Available at: <http://www.cims.nyu.edu/~regev/teaching/discrete_math_fall_2005/dmbook.pdf> [Accessed 20 June 2013].Mathematical Induction,• [Pdf] Available at: <http://www.people.vcu.edu/~rhammack/BookOfProof/Induction.pdf> [Accessed 20 June 2013].Moura, L., • Recurrence Relations, [Pdf] Available at: <http://www.site.uottawa.ca/~lucia/courses/2101-10/lecturenotes/07RecurrenceRelations.pdf> [Accessed 20 June 2013].Ramana, B. V. & Grimaldi, R. P., 2008. • Discrete and Combinatorial Mathematics, Recurrence Relations, 5th ed., Pearson Education India.Recurrence Relations,• [Pdf] Available at: <http://www.mathdb.org/resource_sharing/training/se_rr.pdf> [Accessed 20 June 2013].Rosen, K. H. & Michaels, J. G., 2000. • Handbook of discrete and combinatorial mathematics, Recurrence Relations, CRC Press.Rosen, K., 2007. • Discrete Mathematics, Mathematical Induction, 6th ed., McGraw Hill publication.Schwichtenberg, H., 2004. • Mathematical Logic, Logic, Mathematics Institute University Munchen.Simpson, S. G., 2010. • Mathematical Logic, Logic, Pennsylvania state university press.Singh, S. G., 2010. • Graph Theory, Trees, PHI Learning Pvt. Ltd.StatsLabDublin, 2013. • Discrete Mathematics : Important Graph Theory Terms [Video online] Available at: <http://www.youtube.com/watch?v=TwLYYOMAK4o> [Accessed 20 June 2013].Vatsa, B. S. & Vatsa, S., 2009. • Discrete Mathematics, Pigeonhole Principle, New Age International.Yakov, G. S., 1992. • Probability theory: An introductory Course, Introduction to Probability, Springer Textbooks.

Page 136: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

126

Recommended ReadingBabu, R., 2011. • Discrete Mathematics, Dorling Kindersley (India) Pvt. Ltd.Balakrishnan, V. K., 1997. • Schaum’s outline of theory and problems of graph theory. McGraw-Hill Professional.Courant, R. & Robbins, H., 1996. • What is Mathematics?, Oxford University Press.Deo N., 1974. • Graph Theory with applications to Engineering and Computer Science, Graphs, Prentice Hall, Englewood Cliffs, N.J.Fomin, D., Genkin, S. & Itenberg, I., 1996. • Mathematical Circles (Russian Experience), AMS.Freund, J.E., 1993. • Introduction to Probability, Dover publications.Graham, R., Knuth, D. & Patashnik, O., 1994. • Concrete Mathematics, 2nd ed., Addison-Wesley.Gross, J. L. & Yellen, J., 2006. • Graph theory and its applications, Graph theory, Chapman and Hall/CRC.Gupta, S. B., 2005. • Comprehensive Discrete Mathematics and Structures, Recurrence Relations, 2nd ed., Laxmi Publication.Gupta, S. B., 2008. • Discrete Mathematics And Structures, Recurrence Relations, 5th ed., Laxmi Publications Ltd.Hein, J. L., 2009. • Discrete Structures, Logic, and Computability, Permutation and Combinations, Jones and Bartlett Learning.Hinman, P. G., 2005. • Fundamentals of Mathematical logic, Logic, A K Peters, Ltd.Kleene, S. C., 2002. • Mathematical logic, Proof and theory, Courier Dover Publications.Koshy, T., 2004. Discrete mathematics with applications, Combinatorics and Discrete Mathematics, • Elsevier Academic Press.Liu, C. L., 1968. • Introduction to Combinatorial Mathematics, Graph theory, McGraw Hill New York.Marcus, D., 2008. • Graph Theory: A Problem Oriented Approach, Mathematical Association of America.Merris, R., 2004. • Combinatorics, 2nd ed., John Wiley & Sons.Nerode, A. & Shore, R. A., • Logic for Applications, Mathematical Logic, 2nd ed., Springer Textbooks.Rosen, K., • Discrete Mathematics and its applications with Combinatorics and graph theory, Graph theory, 6th ed., Tata McGraw Hill publication.Rota G. C., 1998. • Probability Theory, Preliminary Edition.Roussas, G.G., 2007. • Introduction to Probability, Elsevier Inc. Simpson, A., 2010. • Discrete Mathematics By Examples, Tata McGraw-Hill Publishing Company Limited.Veerarajan, T., 2008.• Discrete Mathematics with Graph Theory and Combinotorics, Tata McGraw-Hill Publishing Company Limited.Veerarajan., 2006. • Discrete Mathematics, Recurrence Relations, 7th ed., Tata McGraw-Hill.

Page 137: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

127

Self Assessment Answers

Chapter Id1. b2. c3. a4. c5. d6. a7. d8. c9. d10.

Chapter IIa1. d2. b3. c4. b5. c6. b7. a8. d9. a10.

Chapter IIIc1. b2. b3. b4. a5. a6. a7. c8. a9. d10.

Chapter IVc1. d2. a3. b4. c5. d6. b7. c8. a9. b10.

Page 138: Discrete Mathematics - Jaipur National Universityjnujprdistance.com/assets/lms/LMS JNU/MCA/Sem I/Discrete... · 2019-07-28 · Discrete Mathematics 2 1.1 Introduction In order to

Discrete Mathematics

128

Chapter Vc1. d2. b3. a4. c5. b6. c7. d8. b9. a10.

Chapter VIb1. c2. d3. b4. c5. b6. a7. c8. b9. c10.

Chapter VIId1. b2. c3. b4. a5. d6. c7. d8. c9. a10.

Chapter VIIIb1. c2. a3. c4. d5. a6. c7. b8. d9. a10.