discrete mathematics - content.kopykitab.com · discrete mathematics, the study of finite...

16

Upload: others

Post on 25-Mar-2020

42 views

Category:

Documents


12 download

TRANSCRIPT

Page 1: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen
Page 2: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen
Page 3: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

DISCRETEMATHEMATICS

Page 4: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

Books by the Same Author

• Operations Research: Theory and Applications (4nd Edition)

• Operations Research: Problems and Solution (3nd Edition)

• Linear Programming: Theory and Applications

• Quantitative Techniques for Managerial Decisions

• Quantitative Methods

• Management of Systems

Page 5: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

DISCRETEMATHEMATICS

Dr J K SharmaProfessor, Amity Business School

Amity University, Noida

FOURTH EDITION

(An Imprint of Laxmi Publications Pvt. Ltd.)An ISO 9001:2008 Company

BENGALURU ● CHENNAI ● COCHIN ● GUWAHATI ● HYDERABADJALANDHAR ● KOLKATA ● LUCKNOW ● MUMBAI ● RANCHI ● NEW DELHI

BOSTON (USA) ● ACCRA (GHANA) ● NAIROBI (KENYA)

Page 6: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

DISCRETE MATHEMATICS

© by Laxmi Publications Pvt. Ltd. All rights reserved including those of translation into other languages. In accordance with the Copyright (Amendment) Act, 2012, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise. Any such act or scanning, uploading, and or electronic sharing of any part of this book without the permission of the publisher constitutes unlawful piracy and theft of the copyright holder’s intellectual property. If you would like to use material from the book (other than for review purposes), prior written permission must be obtained from the publishers.

Printed and bound in India First Published: 2003 (Reprinted 2 times)

Second Published: 2005 (Reprinted 5 times)Third Edition: 2011; Reprinted 2013, Fourth Edition: 2015

ISBN 978-93-5138-143-3

Limits of Liability/Disclaimer of Warranty: The publisher and the author make no representation or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties. The advice, strategies, and activities contained herein may not be suitable for every situation. In performing activities adult supervision must be sought. Likewise, common sense and care are essential to the conduct of any and all activities, whether described in this book or otherwise. Neither the publisher nor the author shall be liable or assumes any responsibility for any injuries or damages arising here from. The fact that an organization or Website if referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers must be aware that the Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.

All trademarks, logos or any other mark such as Vibgyor, USP, Amanda, Golden Bells, Firewall Media, Mercury, Trinity, Laxmi appearing in this work are trademarks and intellectual property owned by or licensed to Laxmi Publications, its subsidiaries or affiliates. Notwithstanding this disclaimer, all other names and marks mentioned in this work are the trade names, trademarks or service marks of their respective owners.

Published in india by

An ISO 9001:2008 Company 113, GOLDEN HOUSE, DARYAGANJ,NEW DELHI - 110002, INDIA Telephone : 91-11-4353 2500, 4353 2501 Fax : 91-11-2325 2572, 4353 2528 C—8785/014/09www.laxmipublications.com [email protected] Printed at: Mittal Enterprises, Delhi

& Bengaluru 080-26 75 69 30

& Chennai 044-24 34 47 26, 24 35 95 07

& Cochin 0484-237 70 04, 405 13 03

& Guwahati 0361-254 36 69, 251 38 81

& Hyderabad 040-27 55 53 83, 27 55 53 93

& Jalandhar 0181-222 12 72

& Kolkata 033-22 27 43 84

& Lucknow 0522-220 99 16

& Mumbai 022-24 91 54 15, 24 92 78 69

& Ranchi 0651-220 44 64

Bran

ches

Page 7: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen
Page 8: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics coveredin this book have been chosen keeping in view the knowledge required to understand the functioning ofthe digital computer because many of its properties can be understood and interpreted within the framework of finite mathematical systems. This book provides reasonably rigorous and compact treatment ofmajor mathematical techniques available for study in theoretical computer science. An attempt has beenmade to cover elementary to advance concepts in each chapter to take care of the needs of students whomay earlier not have knowledge of these topics.

Each chapter contains sufficiently large number of solved examples and illustrations to explaindefinitions, principles, theorems and other descriptive material. This is followed by sets of Self PracticeProblems with Hints and Answers to stimulate further learning and interest.

The book is designed to be self-contained and comprises of 13 chapters. It can be used by studentsof BSc (Maths), BCA/BIS/BIT and BE/BTech as an introduction to the fundamental concepts of discretemathematics and by students of MSc, MCA, MTech for the development of more advanced mathematicalconcepts required in computer science applications.

J K Sharma

Preface to the First Edition

Page 9: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

List of Symbols

a, b, c, x, y, z elements of a set∈ belongs to∉ do not belong toI set of all integers

I+ set of all positive integersN set of real numbersQ set of rational numbersΦ empty (null) set

~ or ≡ equivalent sets⊆ subset or is contained in

P(A) power set or set of all setsA ⇒ B A implies BA ⇔ B A is equivalent to B

U universal setA ∪ B union of sets A and BA ∩ B intersection of sets A and BA – B A difference B

A or Ac complement of set AA ⊕ B Symmetric difference of sets A and

Bn(A) or |A| Cardinality of set A

A × B cartesian product of A and B

A ii

n

=∏

1cartesian product of n sets

x R y x is related to yMR adjacency or relation matrixR–1 inverse relation

IA identity relationA/R partition of set A determined by

equivalence relation R on A[a] or Aa equivalence class of a

f : A → B a function f from the set A to set Bf (x) image of x under ff –1 f inverse

f –1 (x) inverse image of xgof composition of function f with func-

tion gx ceiling function, the smallest

integer ≥ xx floor function, the largest integer ≤

xfA characteristic function of a set A

a ≡ b (mod m) a congruent to b modulo mGCD (a, b) greatest common divisor of a and bLCM (a, b) least common divisor of a and b

n! n-factorialnPr number of permutations of n ob-

jects taken r at a timenCr number of combinations of n ob-

jects taken r at a timeP (A) probability of the event A

A complement of an event AP(A ∪ B) probability of occurrence of event

A or B

Page 10: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

P(A ∩ B) probability of occurrence of eventA and B

P(A/B) conditional probability of event Agiven that event B has occurred

∆ forward or descending differenceoperator

E shift operatorG (a z) generating function of sequence of

numbers aG (V E) graph with vertices V and edges Edeg (V) degree of vertex V

indeg (V) indegree of the vertexoutdeg (V) outdegree of the vertex

d (u v) distance between vertices u and vdiam (b) diameter the maximum distance

between two verticesE = Φ null graph

Kn complete graph with n verticesKmn bipartite graphMij incidence matrix

c (G) chromatic number of G∗ a binary operation

a ∗ b image of the pair (a b)S/R quotient semigroup of a semigroup

S(G ∗) a group under the operation ∗

+m addition modulo m×p multiplication modulo p

(R + ⋅) a ring under the operation + and ⋅(D + ∗) an integral domain under the

operator + and ∗(F + ⋅) a field under the operation + and ⋅

glb greatest lower boundlub least upper bound

a ∧ b ‘a meet b’ least upper bound of aand b

a ∨ b ‘a join b’ greatest lower bound ofa and b

(L ∧ ∨ ) a lattice L under the operation ∧and ∨

Dn set of positive integers that aredivisors of n

x complement of an element x~ p not p (negation operation)

p ∧ q p and q (conjunction operation)p ∨ q p or q (disjunction operation

p ⇒ q p implies q a conditional operationp ⇔ q p is equivalent to q a biconditional

operationp ↑ q negation after ANDing statements

p and qp ↓ q negation after ORing statements p

and qp ⊕ q XORing of statements p and q

∨ for all or every (universal quanti-fier)

∃ there exist for some (existentialquantifier)

[A + ⋅ –] a mathematical system with opera-tion + ⋅ and –

1 tautology0 contradiction

[A ∧ ∨ ~] a Boolean algebra with operation ∨(and) ∧ (or) and ~ (NOT)

AND gate, 304

OR gate, 304

NOT (inverter) gate, 305

viii LIST OF SYMBOLS

Page 11: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

Preface to the Fourth Edition vPreface to the First Edition viList of Symbols vii

Chapter 1 Set Theory 1–471.1 Introduction 21.2 Set and its Elements 2

• Elements of a Set 2• Standard Sets and Symbols 2

1.3 Set Description 3• Roster Method 3• Set Builder Method 4• Cardinal Number (Dimension or Order) of a Set 4

1.4 Types of Sets 41.5 Venn-Euler Diagrams 7

Self-practice Problems I 9Hints and Answers 9

1.6 Set Operations and Laws of Set Theory 10• Union of Sets 10• Intersection of Sets 12• Disjoint Sets 13• Difference of Two Sets 14• Complement of a Set 15• Distributive Laws 17• Symmetric Difference of Sets 18

1.7 Fundamental Products 181.8 Index and Indexed Sets 18

Contents

Page 12: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

x CONTENTS

1.9 Partitions of Sets 201.10 Minsets 211.11 Countable and Uncountable Sets 211.12 Algebra of Sets and Duality 241.13 Computer Representation of Sets 31

Self-practice Problems II 32Hints and Answers 35

1.14 The Inclusion and Exclusion Principle 351.15 Fuzzy Sets 40

• Some Useful Definitions 42• Operations on Fuzzy Sets 43Self-practice Problems III 45Hints and Answers 47

Chapter 2 Number Theory 48–772.1 Introduction 482.2 Basic Properties of Integers 492.3 Properties of Integers 49

• Division Theorem (or Algorithm) 502.4 Greatest Common Divisor 51

• Basic Properties of the Greatest Common Divisor 522.5 Euclidean Algorithm 53

• Basic Properties of Prime Factors 552.6 Least Common Multiple 562.7 Testing for Prime Number 59

Self-practice Problems I 60Hints and Answers 61

2.8 Congruence Relation 62• Properties of Congruences 63• Congruence Arithmetic 64

2.9 Residue or Congruence Classes 65• Properties of Residue Classes 66• Arithmetic of Residue Classes 66

2.10 Congruence Equations 67• Linear Congruence Equation 68• Criteria for the Existence of Solutions 68• Simultaneous Linear Congruence 71

2.11 Application of Congruences 72• Hashing Function 72• Random Numbers 74• Cryptography 75Self-practice Problems II 76Hints and Answers 76

Page 13: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

CONTENTS xi

Chapter 3 Relations and Digraphs 78–1083.1 Introduction 793.2 Cartesian Product of Sets 79

• The Cartesian Product of n Sets 80• Important Results on Cartesian Product 80Self-practice Problems I 83Hints and Answers 83

3.3 Binary Relations 84• Binary Relation Defined in a Set 85• Domain and Range of a Relation 85

3.4 Set Operations on Relations 853.5 Types of Relations 86

• Properties of Relations 873.6 Partial Order Relations 893.7 Equivalence Relation 903.8 Equivalence Classes (or Sets) 93

• Quotient Set 943.9 Representation of Relations on Finite Sets 96

• Relation as an Arrow Diagram and Table 97• Relation as a Directed Graph 97• Relation as a Matrix 99

3.10 Path in Relations and Digraphs 1003.11 Composition of Relations 101

• Matrix Representation of Composition of Relations 1013.12 Hasse Diagrams 103

Review Questions 104Self-practice Problems II 104Hints and Answers 107

Chapter 4 Functions 109–1414.1 Introduction 1094.2 Definition and Notation of a Function 109

• Range and Domain of a Function 110• Function as Sets of Ordered Pairs 111• Difference between Relation and Function 111• Difference between a Function and its Value 112

4.3 Types of Functions 1124.4 Invertible Functions 1164.5 Composition of Functions 120

• Important Results on Composition of Functions 1214.6 Identity Function 121

Self-practice Problems I 125Hints and Answers 127

Page 14: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

xii CONTENTS

4.7 Functions for Computer Science 128• Floor and Ceiling Functions 128• Sequence (or Discrete) Functions 130• Strings 131• Fibonacci Sequence 132• Ackermann's Function 132• Characteristic Function 133• Exponential Functions 134• Logarithmic Functions 135• Mod Functions 135• Hamming Distance Function 136• Time-complexity Function 136Self-practice Problems II 138Hints and Answers 140

Chapter 5 Mathematical Induction 142–1545.1 Introduction 1425.2 Principle of Mathematical Induction 1435.3 Principle of Strong Mathematical Induction 151

Self-practice Problems 153

Chapter 6 Combinatorics 155–1886.1 Introduction 1556.2 Sum and Product Rules 156

• Kramp’s Factorial Notation 1586.3 Permutations 158

• Important Deductions 159• Permutations with Repetition of Objects 160• Circular Permutations 162• Restricted Permutations 163• Permutation of Objects not all Different 166Self-practice Problems I 167Hints and Answers 169

6.4 Combinations 170• Restricted Combinations 176• Combinations of Objects not all Different 177Self-practice Problems II 178

6.5 Pigeonhole Principle 179• Generalised Pigeonhole Principle 180

6.6 Binomial Theorem 1816.7 Multinomial Coefficient 1826.8 Number of Onto Functions 1836.9 Principle of Inclusion and Exclusion 184

Page 15: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

CONTENTS xiii

6.10 Derangements 187Self-practice Problems III 188Hints and Answers 188

Chapter 7 Fundamentals of Probability 189–2167.1 Introduction 1897.2 Concepts of Probability 190

• Random Experiment 190• Sample Space 190• Types of Events 190

7.3 Probability Defined 191• The Classical Approach 192• The Relative Frequency Approach 192• The Subjective Approach 193• Probability Axioms 193

7.4 Rules of Probability and Algebra of Events 195• Addition Rules 195• Multiplication Rules 198

7.5 Probability Tree Diagram 2037.6 The Baye’s Theorem 204

Review Questions 207Self-practice Problems 207Hints and Answers 211

Chapter 8 Recurrence Relations and Generating Functions 217–2578.1 Introduction 2178.2 Recurrence Relations 218

• General Solution of Recurrence Relation 2198.3 Linear Recurrence Relations with Constant Coefficients 220

• Characteristic Equation of the Recurrence Relation 2208.4 Methods of Solving Recurrence Relations with Constant Coefficients 2208.5 Non-homogeneous Recurrence Relations 231

• Undetermined Coefficients Method 232• E and D Operators Method 234• Use of E and D Operators 237• Solution of Non-homogeneous Recurrence Relations 241

8.6 Methods of Generating Functions 244• Solution of Recurrence Relations using Generating Functions 244• Addition and Multiplication of Generating Functions 245• Shifting of Generating Functions 246Self-practice Problems 255Hints and Answers 256

Page 16: DISCRETE MATHEMATICS - content.kopykitab.com · Discrete Mathematics, the study of finite mathematical systems, is a hybrid subject. The topics covered in this book have been chosen

Discrete Mathematics

Publisher : Laxmi Publications ISBN : 9789351381433 Author : Dr J K Sharma

Type the URL : http://www.kopykitab.com/product/10288

Get this eBook

40%OFF