About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Size: px
Start display at page:

Download "About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics"

Transcription

1

2 About the Tutorial Disrete Mathematis is a branh of mathematis involving disrete elements that uses algebra and arithmeti. It is inreasingly being applied in the pratial fields of mathematis and omputer siene. It is a very good tool for improving reasoning and problem-solving apabilities. This tutorial explains the fundamental onepts of Sets, Relations and Funtions, Mathematial Logi, Group theory, Counting Theory, Probability, Mathematial Indution and Reurrene Relations, Graph Theory, Trees and Boolean Algebra. Audiene This tutorial has been prepared for students pursuing a degree in any field of omputer siene and mathematis. It endeavors to help students grasp the essential onepts of disrete mathematis. Prerequisites This tutorial has an ample amount of both theory and mathematis. The readers are expeted to have a reasonably good understanding of elementary algebra and arithmeti. Copyright & Dislaimer Copyright 2014 by Tutorials Point (I) Pvt. Ltd. All the ontent and graphis published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, opy, distribute or republish any ontents or a part of ontents of this e-book in any manner without written onsent of the publisher. We strive to update the ontents of our website and tutorials as timely and as preisely as possible, however, the ontents may ontain inauraies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the auray, timeliness or ompleteness of our website or its ontents inluding this tutorial. If you disover any errors on our website or in this tutorial, please notify us at [email protected] i

3 Table of Contents About the Tutorial... i Audiene... i Prerequisites... i Copyright & Dislaimer... i Table of Contents... ii 1. Disrete Mathematis Introdution... 1 Topis in Disrete Mathematis... 1 PART 1: SETS, RELATIONS, AND FUNCTIONS Sets... 3 Set Definition... 3 Representation of a Set... 3 Cardinality of a Set... 4 Types of Sets... 4 Venn Diagrams... 6 Set Operations... 7 Power Set... 8 Partitioning of a Set Relations Definition and Properties Domain and Range Representation of Relations using Graph Types of Relations Funtions Funtion Definition Injetive / One-to-one funtion Surjetive / Onto funtion Bijetive / One-to-one Correspondent Composition of Funtions PART 2: MATHEMATICAL LOGIC Propositional Logi Prepositional Logi Definition Connetives Tautologies Contraditions Contingeny Propositional Equivalenes Inverse, Converse, and Contra-positive Duality Priniple Normal Forms ii

4 6. Prediate Logi Prediate Logi Definition Well Formed Formula Quantifiers Nested Quantifiers Rules of Inferene What are Rules of Inferene for? Addition Conjuntion Simplifiation Modus Ponens Modus Tollens Disjuntive Syllogism Hypothetial Syllogism Construtive Dilemma Destrutive Dilemma PART 3: GROUP THEORY Operators and Postulates Closure Assoiative Laws Commutative Laws Distributive Laws Identity Element Inverse De Morgan s Law Group Theory Semigroup Monoid Group Abelian Group Cyli Group and Subgroup Partially Ordered Set (POSET) Hasse Diagram Linearly Ordered Set Lattie Properties of Latties Dual of a Lattie PART 4: COUNTING & PROBABILITY Counting Theory The Rules of Sum and Produt Permutations Combinations Pasal's Identity Pigeonhole Priniple The Inlusion-Exlusion priniple iii

5 11. Probability Basi Conepts Probability Axioms Properties of Probability Conditional Probability Bayes' Theorem PART 5: MATHEMATICAL INDUCTION & RECURRENCE RELATIONS Mathematial Indution Definition How to Do It Strong Indution Reurrene Relation Definition Linear Reurrene Relations Partiular Solutions Generating Funtions PART 6: DISCRETE STRUCTURES Graph and Graph Models What is a Graph? Types of Graphs Representation of Graphs Planar vs. Non-planar graph Isomorphism Homomorphism Euler Graphs Hamiltonian Graphs More on Graphs Graph Coloring Graph Traversal Introdution to Trees Tree and its Properties Centers and Bi-Centers of a Tree Labeled Trees Unlabeled trees Rooted Tree Binary Searh Tree Spanning Trees Minimum Spanning Tree Kruskal's Algorithm Prim's Algorithm iv

6 PART 7: BOOLEAN ALGEBRA Boolean Expressions and Funtions Boolean Funtions Boolean Expressions Boolean Identities Canonial Forms Logi Gates Simplifiation of Boolean Funtions Simplifiation Using Algebrai Funtions Karnaugh Maps Simplifiation Using K- map v

7 1. DISCRETE MATHEMATICS INTRODUCTION Mathematis an be broadly lassified into two ategories: Continuous Mathematis Disrete Mathematis Continuous Mathematis is based upon ontinuous number line or the real numbers. It is haraterized by the fat that between any two numbers, there are almost always an infinite set of numbers. For example, a funtion in ontinuous mathematis an be plotted in a smooth urve without breaks. Disrete Mathematis, on the other hand, involves distint values; i.e. between any two points, there are a ountable number of points. For example, if we have a finite set of objets, the funtion an be defined as a list of ordered pairs having these objets, and an be presented as a omplete list of those pairs. Topis in Disrete Mathematis Though there annot be a definite number of branhes of Disrete Mathematis, the following topis are almost always overed in any study regarding this matter: Sets, Relations and Funtions Mathematial Logi Group theory Counting Theory Probability Mathematial Indution and Reurrene Relations Graph Theory Trees Boolean Algebra 1

8 Part 1: Sets, Relations, and Funtions 2

9 2. SETS Disrete Mathematis German mathematiian G. Cantor introdued the onept of sets. He had defined a set as a olletion of definite and distinguishable objets seleted by the means of ertain rules or desription. Set theory forms the basis of several other fields of study like ounting theory, relations, graph theory and finite state mahines. In this hapter, we will over the different aspets of Set Theory. Set Definition A set is an unordered olletion of different elements. A set an be written expliitly by listing its elements using set braket. If the order of the elements is hanged or any element of a set is repeated, it does not make any hanges in the set. Some Example of Sets A set of all positive integers A set of all the planets in the solar system A set of all the states in India A set of all the lowerase letters of the alphabet Representation of a Set Sets an be represented in two ways: Roster or Tabular Form Set Builder Notation Roster or Tabular Form The set is represented by listing all the elements omprising it. The elements are enlosed within braes and separated by ommas. Example 1: Set of vowels in English alphabet, A = {a,e,i,o,u} Example 2: Set of odd numbers less than 10, B = {1,3,5,7,9} Set Builder Notation The set is defined by speifying a property that elements of the set have in ommon. The set is desribed as A = { x : p(x)} Example 1: The set {a,e,i,o,u} is written as: A = { x : x is a vowel in English alphabet} 3

10 Example 2: The set {1,3,5,7,9} is written as: B = { x : 1 x<10 and (x%2) 0} If an element x is a member of any set S, it is denoted by x S and if an element y is not a member of set S, it is denoted by y S. Example: If S = {1, 1.2,1.7,2}, 1 S but 1.5 S Some Important Sets N: the set of all natural numbers = {1, 2, 3, 4,...} Z: the set of all integers = {..., -3, -2, -1, 0, 1, 2, 3,...} Z + : the set of all positive integers Q: the set of all rational numbers R: the set of all real numbers W: the set of all whole numbers Cardinality of a Set Cardinality of a set S, denoted by S, is the number of elements of the set. If a set has an infinite number of elements, its ardinality is. Example: {1, 4, 3,5} = 4, {1, 2, 3,4,5, } = If there are two sets X and Y, X = Y represents two sets X and Y that have the same ardinality, if there exists a bijetive funtion f from X to Y. X Y represents set X has ardinality less than or equal to the ardinality of Y, if there exists an injetive funtion f from X to Y. X < Y represents set X has ardinality less than the ardinality of Y, if there is an injetive funtion f, but no bijetive funtion f from X to Y. If X Y and X Y then X = Y Types of Sets Sets an be lassified into many types. Some of whih are finite, infinite, subset, universal, proper, singleton set, et. 4

11 Finite Set A set whih ontains a definite number of elements is alled a finite set. Example: S = {x x N and 70 > x > 50} Infinite Set A set whih ontains infinite number of elements is alled an infinite set. Example: S = {x x N and x > 10} Subset A set X is a subset of set Y (Written as X Y) if every element of X is an element of set Y. Example 1: Let, X = { 1, 2, 3, 4, 5, 6 } and Y = { 1, 2 }. Here set Y is a subset of set X as all the elements of set Y is in set X. Hene, we an write Y X. Example 2: Let, X = {1, 2, 3} and Y = {1, 2, 3}. Here set Y is a subset (Not a proper subset) of set X as all the elements of set Y is in set X. Hene, we an write Y X. Proper Subset The term proper subset an be defined as subset of but not equal to. A Set X is a proper subset of set Y (Written as X Y) if every element of X is an element of set Y and X < Y. Example: Let, X = {1, 2,3,4,5, 6} and Y = {1, 2}. Here set Y is a proper subset of set X as at least one element is more in set X. Hene, we an write Y X. Universal Set It is a olletion of all elements in a partiular ontext or appliation. All the sets in that ontext or appliation are essentially subsets of this universal set. Universal sets are represented as U. Example: We may define U as the set of all animals on earth. In this ase, set of all mammals is a subset of U, set of all fishes is a subset of U, set of all insets is a subset of U, and so on. Empty Set or Null Set An empty set ontains no elements. It is denoted by. As the number of elements in an empty set is finite, empty set is a finite set. The ardinality of empty set or null set is zero. Example: = {x x N and 7 < x < 8} 5

12 Singleton Set or Unit Set Singleton set or unit set ontains only one element. A singleton set is denoted by {s}. Example: S = {x x N, 7 < x < 9} Equal Set If two sets ontain the same elements they are said to be equal. Example: If A = {1, 2, 6} and B = {6, 1, 2}, they are equal as every element of set A is an element of set B and every element of set B is an element of set A. Equivalent Set If the ardinalities of two sets are same, they are alled equivalent sets. Example: If A = {1, 2, 6} and B = {16, 17, 22}, they are equivalent as ardinality of A is equal to the ardinality of B. i.e. A = B =3 Overlapping Set Two sets that have at least one ommon element are alled overlapping sets. In ase of overlapping sets: n(a B) = n(a) + n(b) - n(a B) n(a B) = n(a - B) + n(b - A) + n(a B) n(a) = n(a - B) + n(a B) n(b) = n(b - A) + n(a B) Example: Let, A = {1, 2, 6} and B = {6, 12, 42}. There is a ommon element 6, hene these sets are overlapping sets. Disjoint Set If two sets C and D are disjoint sets as they do not have even one element in ommon. Therefore, n(a B) = n(a) + n(b) Example: Let, A = {1, 2, 6} and B = {7, 9, 14}, there is no ommon element, hene these sets are overlapping sets. Venn Diagrams Venn diagram, invented in1880 by John Venn, is a shemati diagram that shows all possible logial relations between different mathematial sets. 6

13 Examples Set Operations Set Operations inlude Set Union, Set Intersetion, Set Differene, Complement of Set, and Cartesian Produt. Set Union The union of sets A and B (denoted by A B) is the set of elements whih are in A, in B, or in both A and B. Hene, A B = {x x A OR x B}. Example: If A = {10, 11, 12, 13} and B = {13, 14, 15}, then A B = {10, 11, 12, 13, 14, 15}. (The ommon element ours only one) A B Figure: Venn Diagram of A B Set Intersetion The intersetion of sets A and B (denoted by A B) is the set of elements whih are in both A and B. Hene, A B = {x x A AND x B}. Example: If A = {11, 12, 13} and B = {13, 14, 15}, then A B = {13}. A B Figure: Venn Diagram of A B 7

14 Set Differene/ Relative Complement The set differene of sets A and B (denoted by A B) is the set of elements whih are only in A but not in B. Hene, A B = {x x A AND x B}. Example: If A = {10, 11, 12, 13} and B = {13, 14, 15}, then (A B) = {10, 11, 12} and (B A) = {14,15}. Here, we an see (A B) (B A) A B A B A B B A Figure: Venn Diagram of A B and B A Complement of a Set The omplement of a set A (denoted by A ) is the set of elements whih are not in set A. Hene, A' = {x x A}. More speifially, A'= (U A) where U is a universal set whih ontains all objets. Example: If A ={x x belongs to set of odd integers} then A' ={y y does not belong to set of odd integers} U A Figure: Venn Diagram of A' Cartesian Produt / Cross Produt The Cartesian produt of n number of sets A1, A2...An, defined as A1 A2... An, are the ordered pair (x1,x2,...xn) where x1 A1, x2 A2,... xn An Example: If we take two sets A= {a, b} and B= {1, 2}, The Cartesian produt of A and B is written as: A B= {(a, 1), (a, 2), (b, 1), (b, 2)} The Cartesian produt of B and A is written as: B A= {(1, a), (1, b), (2, a), (2, b)} Power Set Power set of a set S is the set of all subsets of S inluding the empty set. The ardinality of a power set of a set S of ardinality n is 2 n. Power set is denoted as P(S). 8

15 Example: For a set S = {a, b,, d} let us alulate the subsets: Subsets with 0 elements: { } (the empty set) Subsets with 1 element: {a}, {b}, {}, {d} Subsets with 2 elements: {a,b}, {a,}, {a,d}, {b,}, {b,d},{,d} Subsets with 3 elements: {a,b,},{a,b,d},{a,,d},{b,,d} Subsets with 4 elements: {a,b,,d} Hene, P(S) = { { },{a}, {b}, {}, {d},{a,b}, {a,}, {a,d}, {b,}, {b,d},{,d},{a,b,},{a,b,d},{a,,d},{b,,d},{a,b,,d} } P(S) = 2 4 =16 Note: The power set of an empty set is also an empty set. P ({ }) = 2 0 = 1 Partitioning of a Set Partition of a set, say S, is a olletion of n disjoint subsets, say P1, P2,... Pn, that satisfies the following three onditions: Pi does not ontain the empty set. [ Pi { } for all 0 < i n] The union of the subsets must equal the entire original set. [P1 P2... Pn = S] The intersetion of any two distint sets is empty. [Pa Pb ={ }, for a b where n a, b 0 ] The number of partitions of the set is alled a Bell number denoted as Bn. Example Let S = {a, b,, d, e, f, g, h} One probable partitioning is {a}, {b,, d}, {e, f, g,h} Another probable partitioning is {a,b}, {, d}, {e, f, g,h} In this way, we an find out Bn number of different partitions. 9

16 3. RELATIONS Disrete Mathematis Whenever sets are being disussed, the relationship between the elements of the sets is the next thing that omes up. Relations may exist between objets of the same set or between objets of two or more sets. Definition and Properties A binary relation R from set x to y (written as xry or R(x,y)) is a subset of the Cartesian produt x y. If the ordered pair of G is reversed, the relation also hanges. Generally an n-ary relation R between sets A1,..., and An is a subset of the n-ary produt A1... An. The minimum ardinality of a relation R is Zero and maximum is n 2 in this ase. A binary relation R on a single set A is a subset of A A. For two distint sets, A and B, having ardinalities m and n respetively, the maximum ardinality of a relation R from A to B is mn. Domain and Range If there are two sets A and B, and relation R have order pair (x, y), then: The domain of R is the set { x (x, y) R for some y in B } The range of R is the set { y (x, y) R for some x in A } Examples Let, A = {1,2,9} and B = {1,3,7} Case 1: If relation R is equal to then R = {(1, 1), (3, 3)} Case 2: If relation R is less than then R = {(1, 3), (1, 7), (2, 3), (2, 7)} Case 3: If relation R is greater than then R = {(2, 1), (9, 1), (9, 3), (9, 7)} Representation of Relations using Graph A relation an be represented using a direted graph. The number of verties in the graph is equal to the number of elements in the set from whih the relation has been defined. For eah ordered pair (x, y) in the relation R, there will be a direted edge from the vertex x to vertex y. If there is an ordered pair (x, x), there will be self- loop on vertex x. Suppose, there is a relation R = {(1, 1), (1,2), (3, 2)} on set S = {1,2,3}, it an be represented by the following graph: 10

17 2 1 Figure: Representation of relation by direted graph 3 Types of Relations 1. The Empty Relation between sets X and Y, or on E, is the empty set 2. The Full Relation between sets X and Y is the set X Y 3. The Identity Relation on set X is the set {(x,x) x X} 4. The Inverse Relation R' of a relation R is defined as: R = {(b,a) (a,b) R} Example: If R = {(1, 2), (2,3)} then R will be {(2,1), (3,2)} 5. A relation R on set A is alled Reflexive if a A is related to a (ara holds). Example: The relation R = {(a,a), (b,b)} on set X={a,b} is reflexive 6. A relation R on set A is alled Irreflexive if no a A is related to a (ara does not hold). Example: The relation R = {(a,b), (b,a)} on set X={a,b} is irreflexive 7. A relation R on set A is alled Symmetri if xry implies yrx, x A and y A. Example: The relation R = {(1, 2), (2, 1), (3, 2), (2, 3)} on set A={1, 2, 3} is symmetri. 8. A relation R on set A is alled Anti-Symmetri if xry and yrx implies x=y x A and y A. Example: The relation R = {(1, 2), (3, 2)} on set A= {1, 2, 3} is antisymmetri. 9. A relation R on set A is alled Transitive if xry and yrz implies xrz, x,y,z A. Example: The relation R = {(1, 2), (2, 3), (1, 3)} on set A= {1, 2, 3} is transitive. 10. A relation is an Equivalene Relation if it is reflexive, symmetri, and transitive. Example: The relation R = {(1, 1), (2, 2), (3, 3), (1, 2),(2,1), (2,3), (3,2), (1,3), (3,1)} on set A= {1, 2, 3} is an equivalene relation sine it is reflexive, symmetri, and transitive. 11

18 4. FUNCTIONS Disrete Mathematis A Funtion assigns to eah element of a set, exatly one element of a related set. Funtions find their appliation in various fields like representation of the omputational omplexity of algorithms, ounting objets, study of sequenes and strings, to name a few. The third and final hapter of this part highlights the important aspets of funtions. Funtion Definition A funtion or mapping (Defined as f: X Y) is a relationship from elements of one set X to elements of another set Y (X and Y are non-empty sets). X is alled Domain and Y is alled Codomain of funtion f. Funtion f is a relation on X and Y s.t for eah x X, there exists a unique y Y suh that (x,y) R. x is alled pre-image and y is alled image of funtion f. A funtion an be one to one, many to one (not one to many). A funtion f: A B is said to be invertible if there exists a funtion g: B A Injetive / One-to-one funtion A funtion f: A B is injetive or one-to-one funtion if for every b B, there exists at most one a A suh that f(s) = t. This means a funtion f is injetive if a1 a2 implies f(a1) f(a2). Example 1. f: N N, f(x) = 5x is injetive. 2. f: Z + Z +, f(x) = x 2 is injetive. 3. f: N N, f(x) = x 2 is not injetive as (-x) 2 = x 2 Surjetive / Onto funtion A funtion f: A B is surjetive (onto) if the image of f equals its range. Equivalently, for every b B, there exists some a A suh that f(a) = b. This means that for any y in B, there exists some x in A suh that y = f(x). Example 1. f : Z + Z +, f(x) = x 2 is surjetive. 2. f : N N, f(x) = x 2 is not injetive as (-x) 2 = x 2 Bijetive / One-to-one Correspondent A funtion f: A B is bijetive or one-to-one orrespondent if and only if f is both injetive and surjetive. 12

19 Problem: Prove that a funtion f: R R defined by f(x) = 2x 3 is a bijetive funtion. Explanation: We have to prove this funtion is both injetive and surjetive. If f(x1) = f(x2), then 2x1 3 = 2x2 3 and it implies that x1 = x2. Hene, f is injetive. Here, 2x 3= y So, x = (y+5)/3 whih belongs to R and f(x) = y. Hene, f is surjetive. Sine f is both surjetive and injetive, we an say f is bijetive. Composition of Funtions Two funtions f: A B and g: B C an be omposed to give a omposition g o f. This is a funtion from A to C defined by (gof)(x) = g(f(x)) Example Let f(x) = x + 2 and g(x) = 2x, find ( f o g)(x) and ( g o f)(x) Solution (f o g)(x) = f (g(x)) = f(2x) = 2x+2 (g o f)(x) = g (f(x)) = g(x+2) = 2(x+2)=2x+4 Hene, (f o g)(x) (g o f)(x) Some Fats about Composition If f and g are one-to-one then the funtion (g o f) is also one-to-one. If f and g are onto then the funtion (g o f) is also onto. Composition always holds assoiative property but does not hold ommutative property. 13

20 Part 2: Mathematial Logi 14

21 5. PROPOSITIONAL LOGIC Disrete Mathematis The rules of mathematial logi speify methods of reasoning mathematial statements. Greek philosopher, Aristotle, was the pioneer of logial reasoning. Logial reasoning provides the theoretial base for many areas of mathematis and onsequently omputer siene. It has many pratial appliations in omputer siene like design of omputing mahines, artifiial intelligene, definition of data strutures for programming languages et. Propositional Logi is onerned with statements to whih the truth values, true and false, an be assigned. The purpose is to analyze these statements either individually or in a omposite manner. Prepositional Logi Definition A proposition is a olletion of delarative statements that has either a truth value "true or a truth value "false". A propositional onsists of propositional variables and onnetives. We denote the propositional variables by apital letters (A, B, et). The onnetives onnet the propositional variables. Some examples of Propositions are given below: "Man is Mortal", it returns truth value TRUE " = 3 2", it returns truth value FALSE The following is not a Proposition: "A is less than 2". It is beause unless we give a speifi value of A, we annot say whether the statement is true or false. Connetives In propositional logi generally we use five onnetives whih are: OR (V), AND (Λ), Negation/ NOT ( ), Impliation / if-then ( ), If and only if ( ). OR (V): The OR operation of two propositions A and B (written as A V B) is true if at least any of the propositional variable A or B is true. The truth table is as follows: A B A V B True True True True False True False True True False False False AND (Λ): The AND operation of two propositions A and B (written as A Λ B) is true if both the propositional variable A and B is true. 15

22 The truth table is as follows: A B A Λ B True True True True False False False True False False False False Negation ( ): The negation of a proposition A (written as A) is false when A is true and is true when A is false. The truth table is as follows: A A True False False True Impliation / if-then ( ): An impliation A B is False if A is true and B is false. The rest ases are true. The truth table is as follows: A B A B True True True True False False False True True False False True If and only if ( ): A B is bi-onditional logial onnetive whih is true when p and q are both false or both are true. The truth table is as follows: A B A B True True True True False True False False False False False True 16

23 Tautologies A Tautology is a formula whih is always true for every value of its propositional variables. Example: Prove [(A B) Λ A] B is a tautology The truth table is as follows: A B A B (A B) Λ A [(A B) Λ A] B True True True True True True False False False True False True True False True False False True False True As we an see every value of [(A B) Λ A] B is True, it is a tautology. Contraditions A Contradition is a formula whih is always false for every value of its propositional variables. Example: Prove (A V B) Λ [( A) Λ ( B)] is a ontradition The truth table is as follows: A B A V B A B ( A) Λ ( B) True True True False False False False True False True False True False False False True True True False False False False False False True True True False (A V B) Λ [( A) Λ ( B)] As we an see every value of (A V B) Λ [( A) Λ ( B)] is False, it is a ontradition. Contingeny A Contingeny is a formula whih has both some true and some false values for every value of its propositional variables. Example: Prove (A V B) Λ ( A) a ontingeny The truth table is as follows: A B A V B A (A V B) Λ ( A) True True True False False True False True False False False True True True True False False False True False 17

24 As we an see every value of (A V B) Λ ( A) has both True and False, it is a ontingeny. Propositional Equivalenes Two statements X and Y are logially equivalent if any of the following two onditions hold: The truth tables of eah statement have the same truth values. The bi-onditional statement X Y is a tautology. Example: Prove (A V B) and [( A) Λ ( B)] are equivalent Testing by 1 st method (Mathing truth table): A B A V B (A V B) A B [( A) Λ ( B)] True True True False False False False True False True False False True False False True True False True False False False False False True True True True Here, we an see the truth values of (A V B) and [( A) Λ ( B)] are same, hene the statements are equivalent. Testing by 2 nd method (Bi-onditionality): A B (A V B) [( A) Λ ( B)] [ (A V B)] [( A) Λ ( B)] True True False False True True False False False True False True False False True False False True True True As [ (A V B)] [( A) Λ ( B)] is a tautology, the statements are equivalent. Inverse, Converse, and Contra-positive A onditional statement has two parts: Hypothesis and Conlusion. Example of Conditional Statement: If you do your homework, you will not be punished. Here, "you do your homework" is the hypothesis and "you will not be punished" is the onlusion. Inverse: An inverse of the onditional statement is the negation of both the hypothesis and the onlusion. If the statement is If p, then q, the inverse will be If not p, then not q. The inverse of If you do your homework, you will not be punished is If you do not do your homework, you will be punished. 18

25 Converse: The onverse of the onditional statement is omputed by interhanging the hypothesis and the onlusion. If the statement is If p, then q, the inverse will be If q, then p. The onverse of "If you do your homework, you will not be punished" is "If you will not be punished, you do not do your homework. Contra-positive: The ontra-positive of the onditional is omputed by interhanging the hypothesis and the onlusion of the inverse statement. If the statement is If p, then q, the inverse will be If not q, then not p. The Contra-positive of " If you do your homework, you will not be punished is" If you will be punished, you do your homework. Duality Priniple Duality priniple set states that for any true statement, the dual statement obtained by interhanging unions into intersetions (and vie versa) and interhanging Universal set into Null set (and vie versa) is also true. If dual of any statement is the statement itself, it is said self-dual statement. Example: The dual of (A B) C is (A B) C Normal Forms We an onvert any proposition in two normal forms: Conjuntive normal form Disjuntive normal form Conjuntive Normal Form A ompound statement is in onjuntive normal form if it is obtained by operating AND among variables (negation of variables inluded) onneted with ORs. Examples (P Q) (Q R) ( P Q S T) Disjuntive Normal Form A ompound statement is in onjuntive normal form if it is obtained by operating OR among variables (negation of variables inluded) onneted with ANDs. Examples (P Q) (Q R) ( P Q S T) 19

26 6. PREDICATE LOGIC Disrete Mathematis Prediate Logi deals with prediates, whih are propositions ontaining variables. Prediate Logi Definition A prediate is an expression of one or more variables defined on some speifi domain. A prediate with variables an be made a proposition by either assigning a value to the variable or by quantifying the variable. The following are some examples of prediates: Let E(x, y) denote "x = y" Let X(a, b, ) denote "a + b + = 0" Let M(x, y) denote "x is married to y" Well Formed Formula Well Formed Formula (wff) is a prediate holding any of the following - All propositional onstants and propositional variables are wffs If x is a variable and Y is a wff, x Y and x Y are also wff Truth value and false values are wffs Eah atomi formula is a wff All onnetives onneting wffs are wffs Quantifiers The variable of prediates is quantified by quantifiers. There are two types of quantifier in prediate logi: Universal Quantifier and Existential Quantifier. Universal Quantifier Universal quantifier states that the statements within its sope are true for every value of the speifi variable. It is denoted by the symbol. x P(x) is read as for every value of x, P(x) is true. Example: "Man is mortal" an be transformed into the propositional form x P(x) where P(x) is the prediate whih denotes x is mortal and the universe of disourse is all men. Existential Quantifier Existential quantifier states that the statements within its sope are true for some values of the speifi variable. It is denoted by the symbol. x P(x) is read as for some values of x, P(x) is true. 20

27 Example: "Some people are dishonest" an be transformed into the propositional form x P(x) where P(x) is the prediate whih denotes x is dishonest and the universe of disourse is some people. Nested Quantifiers If we use a quantifier that appears within the sope of another quantifier, it is alled nested quantifier. Examples a b P (x, y) where P (a, b) denotes a + b=0 a b P (a, b, ) where P (a, b) denotes a + (b+) = (a+b) + Note: a b P (x, y) a b P (x, y) 21

28 7. RULES OF INFERENCE Disrete Mathematis To dedue new statements from the statements whose truth that we already know, Rules of Inferene are used. What are Rules of Inferene for? Mathematial logi is often used for logial proofs. Proofs are valid arguments that determine the truth values of mathematial statements. An argument is a sequene of statements. The last statement is the onlusion and all its preeding statements are alled premises (or hypothesis). The symbol, (read therefore) is plaed before the onlusion. A valid argument is one where the onlusion follows from the truth values of the premises. Rules of Inferene provide the templates or guidelines for onstruting valid arguments from the statements that we already have. Addition If P is a premise, we an use Addition rule to derive P V Q. P P V Q Example Let P be the proposition, He studies very hard is true Therefore: "Either he studies very hard Or he is a very bad student." Here Q is the proposition he is a very bad student. Conjuntion If P and Q are two premises, we an use Conjuntion rule to derive P Λ Q. P Q P Λ Q Example Let P: He studies very hard Let Q: He is the best boy in the lass Therefore: "He studies very hard and he is the best boy in the lass" 22

29 Simplifiation If P Λ Q is a premise, we an use Simplifiation rule to derive P. P Λ Q P Example "He studies very hard and he is the best boy in the lass" Therefore: "He studies very hard" Modus Ponens If P and P Q are two premises, we an use Modus Ponens to derive Q. P Q P Q Example "If you have a password, then you an log on to faebook" "You have a password" Therefore: "You an log on to faebook" Modus Tollens If P Q and Q are two premises, we an use Modus Tollens to derive P. P Q Q P Example "If you have a password, then you an log on to faebook" "You annot log on to faebook" Therefore: "You do not have a password " 23

30 Disjuntive Syllogism If P and P V Q are two premises, we an use Disjuntive Syllogism to derive Q. P P V Q Q Example "The ie ream is not vanilla flavored" "The ie ream is either vanilla flavored or hoolate flavored" Therefore: "The ie ream is hoolate flavored Hypothetial Syllogism If P Q and Q R are two premises, we an use Hypothetial Syllogism to derive P R P Q Q R P R Example "If it rains, I shall not go to shool "If I don't go to shool, I won't need to do homework" Therefore: "If it rains, I won't need to do homework" Construtive Dilemma If ( P Q ) Λ (R S) and P V R are two premises, we an use onstrutive dilemma to derive Q V S. ( P Q ) Λ (R S) P V R Q V S Example If it rains, I will take a leave If it is hot outside, I will go for a shower Either it will rain or it is hot outside Therefore: "I will take a leave or I will go for a shower" 24

31 Destrutive Dilemma If (P Q) Λ (R S) and Q V S are two premises, we an use destrutive dilemma to derive P V R. (P Q ) Λ (R S) Q V S P V R Example If it rains, I will take a leave If it is hot outside, I will go for a shower Either I will not take a leave or I will not go for a shower Therefore: "It rains or it is hot outside" 25

32 Part 3: Group Theory 26

33 8. OPERATORS AND POSTULATES Disrete Mathematis Group Theory is a branh of mathematis and abstrat algebra that defines an algebrai struture named as group. Generally, a group omprises of a set of elements and an operation over any two elements on that set to form a third element also in that set. In 1854, Arthur Cayley, the British Mathematiian, gave the modern definition of group for the first time: A set of symbols all of them different, and suh that the produt of any two of them (no matter in what order), or the produt of any one of them into itself, belongs to the set, is said to be a group. These symbols are not in general onvertible [ommutative], but are assoiative. In this hapter, we will know about operators and postulates that form the basis of set theory, group theory and Boolean algebra. Any set of elements in a mathematial system may be defined with a set of operators and a number of postulates. A binary operator defined on a set of elements is a rule that assigns to eah pair of elements a unique element from that set. For example, given the set A={1,2,3,4,5}, we an say is a binary operator for the operation = a b, if it speifies a rule for finding for the pair of (a,b), suh that a,b, A. The postulates of a mathematial system form the basi assumptions from whih rules an be dedued. The postulates are: Closure A set is losed with respet to a binary operator if for every pair of elements in the set, the operator finds a unique element from that set. Example: Let A = { 0, 1, 2, 3, 4, 5,. } This set is losed under binary operator into (*), beause for the operation = a + b, for any a, b A, the produt A. The set is not losed under binary operator divide ( ), beause, for the operation = a + b, for any a, b A, the produt may not be in the set A. If a = 7, b = 2, then = 3.5. Here a,b A but A. Assoiative Laws A binary operator on a set A is assoiative when it holds the following property: ( x y) z = x ( y z ), where x, y, z A Example: Let A = { 1, 2, 3, 4 } The operator plus ( + ) is assoiative beause for any three elements, x,y,z A, the property (x + y) + z = x + ( y + z ) holds. 27

34 The operator minus ( - ) is not assoiative sine ( x y ) z x ( y z ) Commutative Laws A binary operator on a set A is ommutative when it holds the following property: Example: Let A = { 1, 2, 3, 4 } x y = y x, where x, y A The operator plus ( + ) is ommutative beause for any two elements, x,y A, the property x + y = y + x holds. The operator minus ( - ) is not assoiative sine x y y x Distributive Laws Two binary operators and on a set A, are distributive over operator when the following property holds: x ( y z ) = ( x y) ( x z ), where x, y, z A Example: Let A = { 1, 2, 3, 4 } The operators into ( * ) and plus ( + ) are distributive over operator + beause for any three elements, x,y,z A, the property x * ( y + z ) = ( x * y ) + ( x * z ) holds. However, these operators are not distributive over * sine x + ( y * z ) ( x + y ) * ( x + z ) Identity Element A set A has an identity element with respet to a binary operation on A, if there exists an element e A, suh that the following property holds: e x = x e, where x A Example: Let Z = { 0, 1, 2, 3, 4, 5,.. } The element 1 is an identity element with respet to operation * sine for any element x Z, 1 * x = x * 1 On the other hand, there is no identity element for the operation minus ( - ) 28

35 Inverse If a set A has an identity element e with respet to a binary operator, it is said to have an inverse whenever for every element x A, there exists another element y A, suh that the following property holds: x y = e Example: Let A = {.. -4, -3, -2, -1, 0, 1, 2, 3, 4, 5,.. } Given the operation plus ( + ) and e = 0, the inverse of any element x is (-x) sine x + (- x) = 0 De Morgan s Law De Morgan s Laws gives a pair of transformations between union and intersetion of two (or more) sets in terms of their omplements. The laws are: (A B) = A B (A B) = A B Example: Let A = { 1, 2, 3, 4}, B = {1, 3, 5, 7}, and Universal set U = { 1, 2, 3,, 9, 10 } A = { 5, 6, 7, 8, 9, 10} B = { 2, 4,6,8,9,10} A B = {1, 2, 3,4, 5, 7} A B = { 1,3} (A B) = { 6, 8,9,10} A B = { 6, 8,9,10} Thus, we see that (A B) = A B (A B) = { 2,4, 5,6,7,8,9,10} A B = { 2,4, 5,6,7,8,9,10} Thus, we see that (A B) = A B 29

36 9. GROUP THEORY Disrete Mathematis Semigroup A finite or infinite set S with a binary operation 0 (Composition) is alled semigroup if it holds following two onditions simultaneously: Closure: For every pair (a, b) S, (a 0 b) has to be present in the set S. Assoiative: For every element a, b, S, (a 0 b) 0 = a 0 (b 0 ) must hold. Example: The set of positive integers (exluding zero) with addition operation is a semigroup. For example, S = {1, 2, 3,...} Here losure property holds as for every pair (a, b) S, (a + b) is present in the set S. For example, 1 +2 =3 S] Assoiative property also holds for every element a, b, S, (a + b) + = a + (b + ). For example, (1 +2) +3=1+ (2+3)=5 Monoid A monoid is a semigroup with an identity element. The identity element (denoted by e or E) of a set S is an element suh that (a 0 e) = a, for every element a S. An identity element is also alled a unit element. So, a monoid holds three properties simultaneously: Closure, Assoiative, Identity element. Example The set of positive integers (exluding zero) with multipliation operation is a monoid. S = {1, 2, 3,...} Here losure property holds as for every pair (a, b) S, (a b) is present in the set S. [For example, 1 2 =2 S and so on] Assoiative property also holds for every element a, b, S, (a b) = a (b ) [For example, (1 2) 3=1 (2 3) =6 and so on] Identity property also holds for every element a S, (a e) = a [For example, (2 1) = 2, (3 1) =3 and so on]. Here identity element is 1. Group A group is a monoid with an inverse element. The inverse element (denoted by I) of a set S is an element suh that (a 0 I) = (I 0 a) =a, for eah element a S. So, a group holds four properties simultaneously - i) Closure, ii) Assoiative, iii) Identity element, iv) Inverse element. The order of a group G is the number of elements in G and the order of an 30

37 element in a group is the least positive integer n suh that a n is the identity element of that group G. Examples The set of N N non-singular matries form a group under matrix multipliation operation. The produt of two N N non-singular matries is also an N N non-singular matrix whih holds losure property. Matrix multipliation itself is assoiative. Hene, assoiative property holds. The set of N N non-singular matries ontains the identity matrix holding the identity element property. As all the matries are non-singular they all have inverse elements whih are also nonsingular matries. Hene, inverse property also holds. Abelian Group An abelian group G is a group for whih the element pair (a,b) G always holds ommutative law. So, a group holds five properties simultaneously - i) Closure, ii) Assoiative, iii) Identity element, iv) Inverse element, v) Commutative. Example The set of positive integers (inluding zero) with addition operation is an abelian group. G = {0, 1, 2, 3, } Here losure property holds as for every pair (a, b) S, (a + b) is present in the set S. [For example, 1 +2 =2 S and so on] Assoiative property also holds for every element a, b, S, (a + b) + = a + (b + ) [For example, (1 +2) +3=1 + (2 +3) =6 and so on] Identity property also holds for every element a S, (a e) = a [For example, (2 1) =2, (3 1) =3 and so on]. Here, identity element is 1. Commutative property also holds for every element a S, (a b) = (b a) [For example, (2 3) = (3 2) =3 and so on] Cyli Group and Subgroup A yli group is a group that an be generated by a single element. Every element of a yli group is a power of some speifi element whih is alled a generator. A yli group an be generated by a generator g, suh that every other element of the group an be written as a power of the generator g. Example The set of omplex numbers {1,-1, i, -i} under multipliation operation is a yli group. There are two generators: i and i as i 1 =i, i 2 =-1, i 3 =-i, i 4 =1 and also ( i) 1 =-i, ( i) 2 =-1, ( i) 3 =i, ( i) 4 =1 whih overs all the elements of the group. Hene, it is a yli group. 31

38 Note: A yli group is always an abelian group but not every abelian group is a yli group. The rational numbers under addition is not yli but is abelian. A subgroup H is a subset of a group G (denoted by H G) if it satisfies the four properties simultaneously: Closure, Assoiative, Identity element, and Inverse. A subgroup H of a group G that does not inlude the whole group G is alled a proper subgroup (Denoted by H<G). A subgroup of a yli group is yli and a abelian subgroup is also abelian. Example Let a group G = {1, i, -1, -i} Then some subgroups are H1= {1}, H2= {1,-1}, This is not a subgroup: H3= {1, i} beause that (i) -1 = -i is not in H3 Partially Ordered Set (POSET) A partially ordered set onsists of a set with a binary relation whih is reflexive, antisymmetri and transitive. "Partially ordered set" is abbreviated as POSET. Examples 1. The set of real numbers under binary operation less than or equal to ( ) is a poset. Let the set S = {1, 2, 3} and the operation is The relations will be {(1, 1), (2, 2), (3, 3), (1, 2), (1, 3), (2, 3)} This relation R is reflexive as {(1, 1), (2, 2), (3, 3)} R This relation R is anti-symmetri, as {(1, 2), (1, 3), (2, 3)} R and {(1, 2), (1, 3), (2, 3)} R This relation R is also transitive. Hene, it is a poset. 2. The vertex set of a direted ayli graph under the operation reahability is a poset. Hasse Diagram The Hasse diagram of a poset is the direted graph whose verties are the element of that poset and the ars overs the pairs (x, y) in the poset. If in the poset x<y, then the point x appears lower than the point y in the Hasse diagram. If x<y<z in the poset, then the arrow is not shown between x and z as it is impliit. Example The poset of subsets of {1, 2, 3} = {ϕ, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} is shown by the following Hasse diagram: 32

39 {1, 2, 3} {1, 2} {1, 3} {2, 3} {1} { 2} {3} {ϕ } Linearly Ordered Set A Linearly ordered set or Total ordered set is a partial order set in whih every pair of element is omparable. The elements a, b S are said to be omparable if either a b or b a holds. Trihotomy law defines this total ordered set. A totally ordered set an be defined as a distributive lattie having the property {a b, a b} = {a, b} for all values of a and b in set S. Example The powerset of {a, b} ordered by is a totally ordered set as all the elements of the power set P= {ϕ, {a}, {b}, {a, b}} are omparable. Example of non-total order set A set S= {1, 2, 3, 4, 5, 6} under operation x divides y is not a total ordered set. Here, for all (x, y) S, x y have to hold but it is not true that 2 3, as 2 does not divide 3 or 3 does not divide 2. Hene, it is not a total ordered set. Lattie A lattie is a poset (L, ) for whih every pair {a, b} L has a least upper bound (denoted by a b) and a greatest lower bound (denoted by a b).lub ({a,b}) is alled the join of a and b.glb ({a,b}) is alled the meet of a and b. a b a b a b 33

40 Example f e d b a This above figure is a lattie beause for every pair {a, b} L, a GLB and a LUB exists. f e d a b This above figure is a not a lattie beause GLB (a, b) and LUB (e, f) does not exist. Some other latties are disussed below: Bounded Lattie A lattie L beomes a bounded lattie if it has a greatest element 1 and a least element 0. Complemented Lattie A lattie L beomes a omplemented lattie if it is a bounded lattie and if every element in the lattie has a omplement. An element x has a omplement x if Ǝx(x x =0 and x x = 1) Distributive Lattie If a lattie satisfies the following two distribute properties, it is alled a distributive lattie. a (b ) = (a b) (a ) a (b ) = (a b) (a ) 34

41 Modular Lattie If a lattie satisfies the following property, it is alled modular lattie. a ( b (a d)) = (a b) (a d) Properties of Latties Idempotent Properties a v a = a a a = a Absorption Properties a v (a b) = a a (a v b) = a Commutative Properties a v b = b v a a b = b a Assoiative Properties a v (b v )= (a v b) v a (b )= (a b) Dual of a Lattie The dual of a lattie is obtained by interhanging the v and operations. Example The dual of [a v (b )] is [a (b v )] 35

42 Part 4: Counting & Probability 36

43 10. COUNTING THEORY Disrete Mathematis In daily lives, many a times one needs to find out the number of all possible outomes for a series of events. For instane, in how many ways an a panel of judges omprising of 6 men and 4 women be hosen from among 50 men and 38 women? How many different 10 lettered PAN numbers an be generated suh that the first five letters are apital alphabets, the next four are digits and the last is again a apital letter. For solving these problems, mathematial theory of ounting are used. Counting mainly enompasses fundamental ounting rule, the permutation rule, and the ombination rule. The Rules of Sum and Produt The Rule of Sum and Rule of Produt are used to deompose diffiult ounting problems into simple problems. The Rule of Sum: If a sequene of tasks T1, T2,, Tm an be done in w1, w2, wm ways respetively (the ondition is that no tasks an be performed simultaneously), then the number of ways to do one of these tasks is w1 + w2 + +wm. If we onsider two tasks A and B whih are disjoint (i.e. A B = Ø), then mathematially A B = A + B The Rule of Produt: If a sequene of tasks T1, T2,, Tm an be done in w1, w2, wm ways respetively and every task arrives after the ourrene of the previous task, then there are w1 w2... wm ways to perform the tasks. Mathematially, if a task B arrives after a task A, then A B = A B Example Question: A boy lives at X and wants to go to Shool at Z. From his home X he has to first reah Y and then Y to Z. He may go X to Y by either 3 bus routes or 2 train routes. From there, he an either hoose 4 bus routes or 5 train routes to reah Z. How many ways are there to go from X to Z? Solution: From X to Y, he an go in 3+2=5 ways (Rule of Sum). Thereafter, he an go Y to Z in 4+5 = 9 ways (Rule of Sum). Hene from X to Z he an go in 5 9 =45 ways (Rule of Produt). Permutations A permutation is an arrangement of some elements in whih order matters. In other words a Permutation is an ordered Combination of elements. Examples From a set S ={x, y, z} by taking two at a time, all permutations are: xy, yx, xz, zx, yz, zy. 37

44 We have to form a permutation of three digit numbers from a set of numbers S= {1, 2, 3}. Different three digit numbers will be formed when we arrange the digits. The permutation will be = 123,132,213,231,312,321 Number of Permutations The number of permutations of n different things taken r at a time is denoted by n Pr where n! = (n 1). n n P r = n! (n r)! Proof: Let there be n different elements. There are n number of ways to fill up the first plae. After filling the first plae (n-1) number of elements is left. Hene, there are (n-1) ways to fill up the seond plae. After filling the first and seond plae, (n-2) number of elements is left. Hene, there are (n-2) ways to fill up the third plae. We an now generalize the number of ways to fill up r-th plae as [n (r 1)] = n r+1 So, the total no. of ways to fill up from first plae upto r-th-plae: n Pr = n (n 1) (n 2)... (n r+1) Hene, = [n(n 1)(n 2)... (n r+1)] [(n r)(n r 1) ] / [(n r)(n r 1) ] n Pr = n!/(n-r)! Some important formulas of permutation 1. If there are n elements of whih a1 are alike of some kind, a2 are alike of another kind; a3 are alike of third kind and so on and ar are of r th kind, where (a1 + a ar) = n. Then, number of permutations of these n objets is = n! / [ (a1!) (a2!)... (ar!)]. 2. Number of permutations of n distint elements taking n elements at a time = n Pn = n! 3. The number of permutations of n dissimilar elements taking r elements at a time, when x partiular things always oupy definite plaes = n-x pr-x 4. The number of permutations of n dissimilar elements when r speified things always ome together is: r! (n r+1)! 5. The number of permutations of n dissimilar elements when r speified things never ome together is: n! [r! (n r+1)!] 6. The number of irular permutations of n different elements taken x elements at time = n Px /x 7. The number of irular permutations of n different things = n Pn /n 38

45 Some Problems Problem 1: From a bunh of 6 different ards, how many ways we an permute it? Solution: As we are taking 6 ards at a time from a dek of 6 ards, the permutation will be 6 P6 = 6! = 720 Problem 2: In how many ways an the letters of the word 'READER' be arranged? Solution: There are 6 letters word (2 E, 1 A, 1D and 2R.) in the word 'READER'. The permutation will be = 6! / [(2!) (1!)(1!)(2!)] = 180. Problem 3: In how ways an the letters of the word 'ORANGE' be arranged so that the onsonants oupy only the even positions? Solution: There are 3 vowels and 3 onsonants in the word 'ORANGE'. Number of ways of arranging the onsonants among themselves= 3 P3 = 3! = 6. The remaining 3 vaant plaes will be filled up by 3 vowels in 3 P3 = 3! = 6 ways. Hene, the total number of permutation is 6 6=36 Combinations A ombination is seletion of some given elements in whih order does not matter. The number of all ombinations of n things, taken r at a time is: n C r = n! r! (n r)! Problem 1 Find the number of subsets of the set {1, 2, 3, 4, 5, 6} having 3 elements. Solution The ardinality of the set is 6 and we have to hoose 3 elements from the set. Here, the ordering does not matter. Hene, the number of subsets will be 6 C3=20. Problem 2 There are 6 men and 5 women in a room. In how many ways we an hoose 3 men and 2 women from the room? Solution The number of ways to hoose 3 men from 6 men is 6 C3 and the number of ways to hoose 2 women from 5 women is 5 C2 Hene, the total number of ways is: 6 C3 5 C2=20 10=200 39

46 Problem 3 How many ways an you hoose 3 distint groups of 3 students from total 9 students? Solution Let us number the groups as 1, 2 and 3 For hoosing 3 students for 1 st group, the number of ways: 9 C3 The number of ways for hoosing 3 students for 2 nd group after hoosing 1 st group: 6 C3 The number of ways for hoosing 3 students for 3 rd group after hoosing 1 st and 2 nd group: 6 C3 Hene, the total number of ways = 9 C3 6 C3 3 C3 = =1680 Pasal's Identity Pasal's identity, first derived by Blaise Pasal in 19th entury, states that the number of ways to hoose k elements from n elements is equal to the summation of number of ways to hoose (k-1) elements from (n-1) elements and the number of ways to hoose elements from n-1 elements. Mathematially, for any positive integers k and n: n Ck = n-1 Ck-1 + n-1 Ck Proof: n 1 n 1 C k 1 + C k = (n 1 )! ( k 1)! (n k)! + (n 1)! k! (n k 1)! k = (n 1 )! ( k! ( n k )! + = ( n 1 )! = n! k! ( n k )! n = C k n k! (n k)! n k k! ( n k )! ) Pigeonhole Priniple In 1834, German mathematiian, Peter Gustav Lejeune Dirihlet, stated a priniple whih he alled the drawer priniple. Now, it is known as the pigeonhole priniple. Pigeonhole Priniple states that if there are fewer pigeon holes than total number of pigeons and eah pigeon is put in a pigeon hole, then there must be at least one pigeon hole with more than one pigeon. If n pigeons are put into m pigeonholes where n>m, there's a hole with more than one pigeon. Examples 1. Ten men are in a room and they are taking part in handshakes. If eah person shakes hands at least one and no man shakes the same man s hand more than one then two men took part in the same number of handshakes. 40

47 2. There must be at least two people in a big ity with the same number of hairs on their heads. The Inlusion-Exlusion priniple The Inlusion-exlusion priniple omputes the ardinal number of the union of multiple non-disjoint sets. For two sets A and B, the priniple states: A B = A + B A B For three sets A, B and C, the priniple states: A B C = A + B + C A B A C B C + A B C The generalized formula: n A i = A i A j i=1 1 i<j n + A i A j A k + ( 1) n 1 A 1 A 2 1 i<j<k n Problem 1 How many integers from 1 to 50 are only multiples of 2 or 3? Solution From 1 to 100, there are 50/2=25 numbers whih are multiples of 2. There are 50/3=16 numbers whih are multiples of 3. There are 50/6=8 numbers whih are multiples of both 2 and 3. So, A =25, B =16 and A B = 8. A B = A + B A B = = 33 Problem 2 In a group of 50 students 24 like old drinks and 36 like hot drinks and eah student likes at least one of the two drinks. How many like both offee and tea? Solution Let X be the set of students who like old drinks and Y be the set of people who like hot drinks. So, X Y = 50, X = 24, Y = 36 X Y = X + Y X Y = = = 10 Hene, there are 10 students who like both tea and offee. 41

48 11. PROBABILITY Disrete Mathematis Closely related to the onepts of ounting is Probability. We often try to guess the results of games of hane, like ard games, slot mahines, and lotteries; i.e. we try to find the likelihood or probability that a partiular result with be obtained. Probability an be oneptualized as finding the hane of ourrene of an event. Mathematially, it is the study of random proesses and their outomes. The laws of probability have a wide appliability in a variety of fields like genetis, weather foreasting, opinion polls, stok markets et. Basi Conepts Probability theory was invented in the 17th entury by two Frenh mathematiians, Blaise Pasal and Pierre de Fermat, who were dealing with mathematial problems regarding of hane. Before proeeding to details of probability, let us get the onept of some definitions. Random Experiment: An experiment in whih all possible outomes are known and the exat output annot be predited in advane is alled a random experiment. Tossing a fair oin is an example of random experiment. Sample Spae: When we perform an experiment, then the set S of all possible outomes is alled the sample spae. If we toss a oin, the sample spae S = {H, T} Event: Any subset of a sample spae is alled an event. After tossing a oin, getting Head on the top is an event. The word "probability" means the hane of ourrene of a partiular event. The best we an say is how likely they are to happen, using the idea of probability. Probability of ourene of an event = Total number of favourable outome Total number of Outomes As the ourrene of any event varies between 0% and 100%, the probability varies between 0 and 1. Steps to find the probability: Step 1: Calulate all possible outomes of the experiment. Step 2: Calulate the number of favorable outomes of the experiment. Step 3: Apply the orresponding probability formula. 42

49 Tossing a Coin If a oin is tossed, there are two possible outomes: Heads (H) or Tails (T) So, Total number of outomes = 2 Hene, the probability of getting a Head (H) on top is ½ and the probability of getting a Tails (T) on top is ½ Throwing a Die When a die is thrown, six possible outomes an be on the top: 1, 2, 3, 4, 5, 6. The probability of any one of the numbers is 1/6 The probability of getting even numbers is 3/6=1/3 The probability of getting odd numbers is 3/6=1/3 Taking Cards From a Dek From a dek of 52 ards, if one ard is piked find the probability of an ae being drawn and also find the probability of a diamond being drawn. Total number of possible outomes: 52 Outomes of being an ae: 4 Probability of being an ae = 4/52 =1/13 Probability of being a diamond = 13/52 =1/4 Probability Axioms 1. The probability of an event always varies from 0 to 1. [0 P(x) 1] 2. For an impossible event the probability is 0 and for a ertain event the probability is If the ourrene of one event is not influened by another event, they are alled mutually exlusive or disjoint. If A1, A2...An are mutually exlusive/disjoint events, then P(Ai Aj) = ϕ for i j and P(A1 A2... An) = P(A1) + P(A2)+... P(An) Properties of Probability 1. If there are two events x and x whih are omplementary, then the probability of the omplementary event is: P(x ) = 1 P(x) 43

50 2. For two non-disjoint events A and B, the probability of the union of two events: P(A B) = P(A) + P(B) 3. If an event A is a subset of another event B (i.e. A B), then the probability of A is less than or equal to the probability of B. Hene, A B implies P(A) p(b) Conditional Probability The onditional probability of an event B is the probability that the event will our given an event A has already ourred. This is written as P(B A). If event A and B are mutually exlusive, then the onditional probability of event B after the event A will be the probability of event B that is P(B). Mathematially: P(B A) = P(A B) / P(A) Problem 1 In a ountry 50% of all teenagers own a yle and 30% of all teenagers own a bike and yle. What is the probability that a teenager owns bike given that the teenager owns a yle? Solution Let us assume A is the event of teenagers owning only a yle and B is the event of teenagers owning only a bike. So, P(A) = 50/100 = 0.5 and P(A B) = 30/100= 0.3 from the given problem. P(B A) = P(A B) / P(A) = 0.3/0.5 = 0.6 Hene, the probability that a teenager owns bike given that the teenager owns a yle is 60%. Problem 2 In a lass, 50% of all students play riket and 25% of all students play riket and volleyball. What is the probability that a student plays volleyball given that the student plays riket? Solution Let us assume A is the event of students playing only riket and B is the event of students playing only volleyball. So, P(A) = 50/100=0.5 and P(A B) = 25/100=0.25 from the given problem. P(B A) = P(A B) / P(A) =0.25/0.5 =0.5 Hene, the probability that a student plays volleyball given that the student plays riket is 50%. 44

51 Problem 3 Six good laptops and three defetive laptops are mixed up. To find the defetive laptops all of them are tested one-by-one at random. What is the probability to find both of the defetive laptops in the first two pik? Solution Let A be the event that we find a defetive laptop in the first test and B be the event that we find a defetive laptop in the seond test. Hene, P(A B) = P(A)P(B A) =3/9 2/8 = 1/21 Bayes' Theorem Theorem: If A and B are two mutually exlusive events, where P(A) is the probability of A and P(B) is the probability of B, P(A B) is the probability of A given that B is true. P(B A) is the probability of B given that A is true, then Bayes Theorem states: P(B A) P(A) P(A B) = n P(B Ai)P(Ai) i=1 Appliation of Bayes Theorem In situations where all the events of sample spae are mutually exlusive events. In situations where either P( Ai B ) for eah Ai or P( Ai ) and P(B Ai ) for eah Ai is known. Problem Consider three pen-stands. The first pen-stand ontains 2 red pens and 3 blue pens; the seond one has 3 red pens and 2 blue pens; and the third one has 4 red pens and 1 blue pen. There is equal probability of eah pen-stand to be seleted. If one pen is drawn at random, what is the probability that it is a red pen? Solution Let Ai be the event that i th pen-stand is seleted. Here, i = 1,2,3. Sine probability for hoosing a pen-stand is equal, P(Ai) = 1/3 Let B be the event that a red pen is drawn. The probability that a red pen is hosen among the five pens of the first pen-stand, P(B A1) = 2/5 The probability that a red pen is hosen among the five pens of the seond pen-stand, P(B A2) = 3/5 The probability that a red pen is hosen among the five pens of the third pen-stand, P(B A3) = 4/5 45

52 Aording to Bayes Theorem, P(B) = P(A1).P(B A1) + P(A2).P(B A2) + P(A3).P(B A3) = 1/3 2/5 + 1/3 3/5 + 1/3 4/5 = 3/5 46

53 Part 5: Mathematial Indution & Reurrene Relations 47

54 12. MATHEMATICAL INDUCTION Disrete Mathematis Mathematial indution, is a tehnique for proving results or establishing statements for natural numbers. This part illustrates the method through a variety of examples. Definition Mathematial Indution is a mathematial tehnique whih is used to prove a statement, a formula or a theorem is true for every natural number. The tehnique involves two steps to prove a statement, as stated below: Step 1(Base step): It proves that a statement is true for the initial value. Step 2(Indutive step): It proves that if the statement is true for the n th iteration (or number n), then it is also true for (n+1) th iteration ( or number n+1). How to Do It Step 1: Consider an initial value for whih the statement is true. It is to be shown that the statement is true for n=initial value. Step 2: Assume the statement is true for any value of n=k. Then prove the statement is true for n=k+1. We atually break n=k+1 into two parts, one part is n=k (whih is already proved) and try to prove the other part. Problem 1 3 n -1 is a multiple of 2 for n=1, 2,... Solution Step 1: For n=1, = 3-1 = 2 whih is a multiple of 2 Step 2: Let us assume 3 n -1 is true for n=k, Hene, 3 k -1 is true (It is an assumption) We have to prove that 3 k+1-1 is also a multiple of 2 3 k+1 1 = 3 3 k 1 = (2 3 k ) + (3 k 1) The first part (2 3 k ) is ertain to be a multiple of 2 and the seond part (3 k -1) is also true as our previous assumption. Hene, 3 k+1 1 is a multiple of 2. So, it is proved that 3 n 1 is a multiple of 2. Problem (2n-1) = n 2 for n=1, 2,... 48

55 Solution Step 1: For n=1, 1 = 1 2, Hene, step 1 is satisfied. Step 2: Let us assume the statement is true for n=k. Hene, (2k-1) = k 2 is true (It is an assumption) We have to prove that (2(k+1)-1) = (k+1) 2 also holds (2(k+1) 1) = (2k+2 1) = (2k + 1) = (2k 1) + (2k + 1) = k 2 + (2k + 1) = (k + 1) 2 So, (2(k+1) 1) = (k+1) 2 hold whih satisfies the step 2. Hene, (2n 1) = n 2 is proved. Problem 3 Prove that (ab) n = a n b n is true for every natural number n Solution Step 1: For n=1, (ab) 1 = a 1 b 1 = ab, Hene, step 1 is satisfied. Step 2: Let us assume the statement is true for n=k, Hene, (ab) k = a k b k is true (It is an assumption). We have to prove that (ab) k+1 = a k+1 b k+1 also hold Given, Or, (ab) k = a k b k (ab) k (ab)= (a k b k ) (ab) [Multiplying both side by ab ] Or, (ab) k+1 = (aa k ) ( bb k ) Or, (ab) k+1 = (a k+1 b k+1 ) Hene, step 2 is proved. So, (ab) n = a n b n is true for every natural number n. Strong Indution Strong Indution is another form of mathematial indution. Through this indution tehnique, we an prove that a propositional funtion, P(n) is true for all positive integers, n, using the following steps: Step 1(Base step): It proves that the initial proposition P(1) true. Step 2(Indutive step): It proves that the onditional statement [P(1) P(2) P(3) P(k)] P(k + 1) is true for positive integers k. 49

56 13. RECURRENCE RELATION Disrete Mathematis In this hapter, we will disuss how reursive tehniques an derive sequenes and be used for solving ounting problems. The proedure for finding the terms of a sequene in a reursive manner is alled reurrene relation. We study the theory of linear reurrene relations and their solutions. Finally, we introdue generating funtions for solving reurrene relations. Definition A reurrene relation is an equation that reursively defines a sequene where the next term is a funtion of the previous terms (Expressing Fn as some ombination of Fi with i<n). Example: Fibonai series: Fn = Fn-1 + Fn-2, Tower of Hanoi: Fn = 2Fn Linear Reurrene Relations A linear reurrene equation of degree k is a reurrene equation whih is in the format xn= A1 xn-1+ A2 xn-1+ A3 xn Ak xn-k (An is a onstant and Ak 0) on a sequene of numbers as a first-degree polynomial. These are some examples of linear reurrene equations: Reurrene relations Initial values Solutions Fn = Fn-1 + Fn-2 a1=a2=1 Fibonai number Fn = Fn-1 + Fn-2 a1=1, a2=3 Luas number Fn = Fn-2 + Fn-3 a1=a2=a3=1 Padovan sequene Fn = 2Fn-1 + Fn-2 a1=0, a2=1 Pell number How to solve linear reurrene relation Suppose, a two ordered linear reurrene relation is: Fn = AFn-1 +BFn-2 where A and B are real numbers. The harateristi equation for the above reurrene relation is: x 2 Ax B = 0 Three ases may our while finding the roots: Case 1: If this equation fators as (x- x1)(x- x1) = 0 and it produes two distint real roots x1 and x2, then Fn = ax1 n + bx2 n is the solution. [Here, a and b are onstants] Case 2: If this equation fators as (x- x1) 2 = 0 and it produes single real root x1, then Fn = a x1 n + bn x1 n is the solution. Case 3: If the equation produes two distint real roots x1 and x2 in polar form x1 = r θ and x2 = r (- θ), then Fn = r n (a os(nθ)+ b sin(nθ)) is the solution. 50

57 Problem 1 Solve the reurrene relation Fn = 5Fn-1-6Fn-2 where F0 = 1 and F1 = 4 Solution The harateristi equation of the reurrene relation is: x 2 5x + 6=0, So, (x-3) (x-2) = 0 Hene, the roots are: x1 = 3 and x2= 2 The roots are real and distint. So, this is in the form of ase 1 Hene, the solution is: Fn = ax1 n + bx2 n Here, Fn = a3 n + b2 n (As x1 = 3 and x2= 2) Therefore, 1=F0 = a3 0 + b2 0 = a+b 4=F1 = a3 1 + b2 1 = 3a+2b Solving these two equations, we get a = 2 and b = -1 Hene, the final solution is: Fn = 2.3 n + (-1). 2 n = 2.3 n - 2 n Problem 2 Solve the reurrene relation Fn = 10Fn-1-25Fn-2 where F0 = 3 and F1 = 17 Solution The harateristi equation of the reurrene relation is: x 2 10x -25 =0, So, (x 5) 2 = 0 Hene, there is single real root x1 = 5 As there is single real valued root, this is in the form of ase 2 Hene, the solution is: Fn = ax1 n + bnx1 n 3 = F0= a b = a 17 = F1= a b = 5a+5b Solving these two equations, we get a = 3 and b = 2/5 51

58 Hene, the final solution is: Fn = 3.5 n + (2/5).n.2 n Problem 3 Solve the reurrene relation Fn = 2Fn-1-2Fn-2 where F0 = 1 and F1 = 3 Solution The harateristi equation of the reurrene relation is: x 2 2x -2 =0 Hene, the roots are: x1 = 1+ i and x2= 1- i In polar form, x1 = r θ and x2 = r (- θ), where r= 2 and θ= π / 4 The roots are imaginary. So, this is in the form of ase 3. Hene, the solution is: Fn = ( 2 ) n (a os(n. π / 4) + b sin(n. π / 4)) 1 = F0 = ( 2 ) 0 (a os(0. π / 4) + b sin(0. π / 4) ) = a 3 = F1 = ( 2 ) 1 (a os(1. π / 4) + b sin(1. π / 4) ) = 2 ( a/ 2 + b/ 2) Solving these two equations we get a = 1 and b = 2 Hene, the final solution is: Fn = ( 2 ) n (os(n. π / 4)+ 2 sin(n. π / 4)) Partiular Solutions A reurrene relation is alled non-homogeneous if it is in the form Fn = AFn 1 + BFn-2 + F(n) where F(n) 0 The solution (an) of a non-homogeneous reurrene relation has two parts. First part is the solution (ah) of the assoiated homogeneous reurrene relation and the seond part is the partiular solution (at). So, an= ah + at Let F(n) = x n and x1 and x2 are the roots of the harateristi equation: x 2 = Ax+ B whih is the harateristi equation of the assoiated homogeneous reurrene relation: If x x1 and x x2, then at = Ax n If x = x1, x x2, then at = Anx n If x= x1 = x2, then at = An 2 x n 52

59 Problem Solve the reurrene relation Fn = 3Fn-1 +10Fn n where F0 = 4 and F1 = 3 Solution The harateristi equation is: x 2 3x -10 =0 Or, (x - 5)(x + 2) = 0 Or, x1= 5 and x2= -2 Sine, x= x1 and x x2, the solution is: at = Anx n = An5 n After putting the solution into the non-homogeneous relation, we get: An5 n = 3A(n 1)5 n A(n 2)5 n n Dividing both sides by 5 n-2, we get: An5 2 = 3A(n 1)5 + 10A(n 2) Or, 25An = 15An 15A + 10An 20A Or, 35A = 175 Or, A = 5 So, Fn = n5 n+1 Hene, the solution is: Fn = n5 n (-2) n -2.5 n Generating Funtions Generating Funtions represents sequenes where eah term of a sequene is expressed as a oeffiient of a variable x in a formal power series. Mathematially, for an infinite sequene, say a 0, a 1, a 2,, a k,, the generating funtion will be: Some Areas of Appliation: G x = a 0 + a 1 x + a 2 x a k x k + = a k x k Generating funtions an be used for the following purposes: For solving a variety of ounting problems. For example, the number of ways to make hange for a Rs. 100 note with the notes of denominations Rs.1, Rs.2, Rs.5, Rs.10, Rs.20 and Rs.50 For solving reurrene relations For proving some of the ombinatorial identities For finding asymptoti formulae for terms of sequenes k=0 53

60 Problem 1 What are the generating funtions for the sequenes {a k } with a k = 2 and a k = 3k? Solution When a k = 2, generating funtion, G(x) = k=0 2x k = 2 + 2x + 2x 2 + 2x 3 + When a k = 3k, G(x) = k=0 3kx k = 0 + 3x + 6x 2 + 9x 3 + Problem 2 What is the generating funtion of the infinite series; 1, 1, 1, 1,.? Solution Here, a k = 1, for 0 k. Hene, G(x) = 1 + x + x 2 + x 3 + = Some Useful Generating Funtions 1 (1 x) For a k = a k, G(x) = a k x k = 1 + ax + a 2 x 2 + = 1 k=0 (1 ax) k=0 For a k = (k + 1), G(x) = (k + 1)x k = 1 + 2x + 3x 2 + = 1 (1 x) 2 For a k = C n k, G(x) = k=0 C n k x k = 1 + C n 1 x + C n 2 x x 2 = (1 + x) n For a k = 1, G(x) = xk x2 = 1 + x + k! k=0 k! + x3 2! 3! = e x 54

61 Part 6: Disrete Strutures 55

62 14. GRAPH AND GRAPH MODELS Disrete Mathematis The previous part brought forth the different tools for reasoning, proofing and problem solving. In this part, we will study the disrete strutures that form the basis of formulating many a real-life problem. The two disrete strutures that we will over are graphs and trees. A graph is a set of points, alled nodes or verties, whih are interonneted by a set of lines alled edges. The study of graphs, or graph theory is an important part of a number of disiplines in the fields of mathematis, engineering and omputer siene. What is a Graph? Definition: A graph (denoted as G = (V, E)) onsists of a non-empty set of verties or nodes V and a set of edges E. Example: Let us onsider, a Graph is G = (V, E) where V = {a, b,, d} and E = {{a, b}, {a, }, {b, },{, d}} a b d Figure: A graph with four verties and four edges Even and Odd Vertex: If the degree of a vertex is even, the vertex is alled an even vertex and if the degree of a vertex is odd, the vertex is alled an odd vertex. Degree of a Vertex: The degree of a vertex V of a graph G (denoted by deg (V)) is the number of edges inident with the vertex V. Vertex Degree Even / Odd a 2 even b 2 even 3 odd d 1 odd Degree of a Graph: The degree of a graph is the largest vertex degree of that graph. For the above graph the degree of the graph is 3. The Handshaking Lemma: In a graph, the sum of all the degrees of verties is equal to twie the number of edges. 56

63 Types of Graphs There are different types of graphs, whih we will learn in the following setion. Null Graph A null graph has no edges. The null graph of n verties is denoted by Nn a b Null graph of 3 verties Simple Graph A graph is alled simple graph/strit graph if the graph is undireted and does not ontain any loops or multiple edges. a b Simple graph Multi-Graph If in a graph multiple edges between the same set of verties are allowed, it is alled Multigraph. a b Multi-graph Direted and Undireted Graph A graph G = (V, E) is alled a direted graph if the edge set is made of ordered vertex pair and a graph is alled undireted if the edge set is made of unordered vertex pair. 57

64 a b Undireted graph a b Direted graph Conneted and Disonneted Graph A graph is onneted if any two verties of the graph are onneted by a path and a graph is disonneted if at least two verties of the graph are not onneted by a path. If a graph G is unonneted, then every maximal onneted subgraph of G is alled a onneted omponent of the graph G. a b d Conneted graph a b d Unonneted graph 58

65 Regular Graph A graph is regular if all the verties of the graph have the same degree. In a regular graph G of degree r, the degree of eah vertex of G is r. a d Regular graph of degree 3 Complete Graph A graph is alled omplete graph if every two verties pair are joined by exatly one edge. The omplete graph with n verties is denoted by K n a b Complete graph K3 Cyle Graph If a graph onsists of a single yle, it is alled yle graph. The yle graph with n verties is denoted by Cn a b Cyli graph C3 59

66 Bipartite Graph If the vertex-set of a graph G an be split into two sets in suh a way that eah edge of the graph joins a vertex in first set to a vertex in seond set, then the graph G is alled a bipartite graph. A graph G is bipartite if and only if all losed walks in G are of even length or all yles in G are of even length. a b d Bipartite graph Complete Bipartite Graph A omplete bipartite graph is a bipartite graph in whih eah vertex in the first set is joined to every single vertex in the seond set. The omplete bipartite graph is denoted by Kr,s where the graph G ontains x verties in the first set and y verties in the seond set. a b d Complete bipartite graph K2,2 Representation of Graphs There are mainly two ways to represent a graph: Adjaeny Matrix Adjaeny List Adjaeny Matrix An Adjaeny Matrix A[V][V] is a 2D array of size V V where V is the number of verties in a undireted graph. If there is an edge between Vx to Vy then the value of A[Vx][ Vy]=1 and A[Vy][ Vx]=1, otherwise the value will be zero. And for a direted graph, if there is an edge between Vx to Vy, then the value of A[Vx][ Vy]=1, otherwise the value will be zero. Adjaeny Matrix of an Undireted Graph Let us onsider the following undireted graph and onstrut the adjaeny matrix: 60

67 a b d An undireted graph Adjaeny matrix of the above undireted graph will be: a b d a b d Adjaeny Matrix of a Direted Graph Let us onsider the following direted graph and onstrut its adjaeny matrix: a b d A direted graph Adjaeny matrix of the above direted graph will be: a b d a b d

68 Adjaeny List In adjaeny list, an array (A[V]) of linked lists is used to represent the graph G with V number of verties. An entry A[Vx] represents the linked list of verties adjaent to the Vx-th vertex. The adjaeny list of the graph is as shown in the figure below: a b b a a b d d Planar vs. Non-planar graph Planar graph: A graph G is alled a planar graph if it an be drawn in a plane without any edges rossed. If we draw graph in the plane without edge rossing, it is alled embedding the graph in the plane. a b d Planar graph Non-planar graph: A graph is non-planar if it annot be drawn in a plane without graph edges rossing. a b d Non-planar graph 62

69 Isomorphism If two graphs G and H ontain the same number of verties onneted in the same way, they are alled isomorphi graphs (denoted by G H). It is easier to hek non-isomorphism than isomorphism. If any of these following onditions ours, then two graphs are non-isomorphi: The number of onneted omponents are different Vertex-set ardinalities are different Edge-set ardinalities are different Degree sequenes are different Example The following graphs are isomorphi: a a b d b d a d b Three isomorphi graphs Homomorphism A homomorphism from a graph G to a graph H is a mapping (May not be a bijetive mapping) h: G H suh that: (x, y) E(G) (h(x), h(y)) E(H). It maps adjaent verties of graph G to the adjaent verties of the graph H. A homomorphism is an isomorphism if it is a bijetive mapping. Homomorphism always preserves edges and onnetedness of a graph. The ompositions of homomorphisms are also homomorphisms. To find out if there exists any homomorphi graph of another graph is a NP-omplete problem. Euler Graphs A onneted graph G is alled an Euler graph, if there is a losed trail whih inludes every edge of the graph G. An Euler path is a path that uses every edge of a graph exatly one. An Euler path starts and ends at different verties. An Euler iruit is a iruit that uses every edge of a graph exatly one. An Euler iruit always starts and ends at the same vertex. A onneted graph G is an Euler graph if and only if all verties of G are of even degree, and a onneted graph G is Eulerian if and only if its edge set an be deomposed into yles. 63

70 a 1 b d f 6 5 e Euler graph The above graph is an Euler graph as a 1 b 2 3 d 4 e 5 6 f 7 g overs all the edges of the graph. a 1 b d 3 Non-Euler graph Hamiltonian Graphs A onneted graph G is alled Hamiltonian graph if there is a yle whih inludes every vertex of G and the yle is alled Hamiltonian yle. Hamiltonian walk in graph G is a walk that passes through eah vertex exatly one. If G is a simple graph with n verties, where n 3 If deg(v) 1/2 n for eah vertex v, then the graph G is Hamiltonian graph. This is alled Dira's Theorem. If G is a simple graph with n verties, where n 2 if deg(x) + deg(y) n for eah pair of non-adjaent verties x and y, then the graph G is Hamiltonian graph. This is alled Ore's theorem. a 1 b e d 3 Hamiltonian graph 64

71 a 1 b e f d 3 Non-Hamiltonian graph 65

72 15. MORE ON GRAPHS Disrete Mathematis Graph Coloring Graph oloring is the proedure of assignment of olors to eah vertex of a graph G suh that no adjaent verties get same olor. The objetive is to minimize the number of olors while oloring a graph. The smallest number of olors required to olor a graph G is alled its hromati number of that graph. Graph oloring problem is a NP Complete problem. Method to Color a Graph The steps required to olor a graph G with n number of verties are as follows: Step 1. Arrange the verties of the graph in some order. Step 2. Choose the first vertex and olor it with the first olor. Step 3. Choose the next vertex and olor it with the lowest numbered olor that has not been olored on any verties adjaent to it. If all the adjaent verties are olored with this olor, assign a new olor to it. Repeat this step until all the verties are olored. Example a b d Graph oloring In the above figure, at first vertex a is olored red. As the adjaent verties of vertex a are again adjaent, vertex b and vertex d are olored with different olor, green and blue respetively. Then vertex is olored as red as no adjaent vertex of is olored red. Hene, we ould olor the graph by 3 olors. Hene, the hromati number of the graph is 3. 66

73 Appliations of Graph Coloring Some appliations of graph oloring inlude Register Alloation Map Coloring Bipartite Graph Cheking Mobile Radio Frequeny Assignment Making time table, et. Graph Traversal Graph traversal is the problem of visiting all the verties of a graph in some systemati order. There are mainly two ways to traverse a graph. Breadth First Searh Depth First Searh Breadth First Searh Breadth First Searh (BFS) starts at starting level-0 vertex X of the graph G. Then we visit all the verties that are the neighbors of X. After visiting, we mark the verties as "visited," and plae them into level-1. Then we start from the level-1 verties and apply the same method on every level-1 vertex and so on. The BFS traversal terminates when every vertex of the graph has been visited. BFS Algorithm: Visit all the neighbor verties before visiting other neighbor verties of neighbor verties Start traversing from vertex u Visit all neighbor verties of vertex u Then visit all of their un-traversed neighbor verties Repeat until all nodes are visited Problem Let us take a graph (Soure vertex is a ) and apply the BFS algorithm to find out the traversal order. 67

74 a 1 b 8 6 e d 3 A graph Solution: Vertex a (Level-0 vertex) is traversed first and marked as visited. Then we will visit the adjaent verties b, d and e of vertex a, marked them as level-1 and added to the visited list. We an traverse b, d and e in any order. Next, we will visit the adjaent verties of b that is. Then, it is marked as level-2 and added to the visited list. As all verties are travelled, the algorithm is terminated. So the alternate orders of traversal are: Or, Or, Or, Or, Or, a b d e a b e d a d b e a e b d a b e d a d e b Appliation of BFS Finding the shortest path Minimum spanning tree for un-weighted graph GPS navigation system Deteting yles in an undireted graph Finding all nodes within one onneted omponent Complexity Analysis Let G(V, E) be a graph with V number of verties and E number of edges. If breadth first searh algorithm visits every vertex in the graph and heks every edge, then its time omplexity would be: It may vary between O(1) and O( V 2 ) O( V + E ). O( E ) 68

75 Depth First Searh Depth First Searh (DFS) algorithm starts from a vertex v, then it traverses to its adjaent vertex (say x) that has not been visited before and mark as "visited" and goes on with the adjaent vertex of x and so on. If at any vertex, it enounters that all the adjaent verties are visited, then it baktraks until it finds the first vertex having an adjaent vertex that has not been traversed before. Then, it traverses that vertex, ontinues with its adjaent verties until it traverses all visited verties and has to baktrak again. In this way, it will traverse all the verties reahable from the initial vertex v. DFS Algorithm Visit all the neighbor verties of a neighbor vertex before visiting the other neighbor verties Visit all verties reahable from vertex u and mark them as visited Then visit all unvisited nodes that are the neighbor verties of u Repeat until all verties of the graph are visited Problem Let us take a graph (Soure vertex is a ) and apply the DFS algorithm to find out the traversal order. a 1 b 8 6 e d 3 Solution A graph Vertex a (Level-0 vertex) is traversed first and marked as visited. Then we will visit the a s adjaent vertex b and add b to the visited list and proeed to b s adjaent vertex and add to the visited list. Then we proeed to s adjaent vertex d and add d to the visited list. Next, we proeed to d s adjaent vertex e and add e to the visited list and stop as all the verties are visited. Hene, the alternate orders of traversals are: Or, Or, Or, a b d e a e b d a b e d a d e b 69

76 Or, Or, a d e b a d b e Complexity Analysis Let G(V, E) be a graph with V number of verties and E number of edges. If DFS algorithm visits every vertex in the graph and heks every edge, then the time omplexity is: Θ ( V + E ) Appliations Deteting yle in a graph To find topologial sorting To test if a graph is bipartite Finding onneted omponents Finding the bridges of a graph Finding bi-onnetivity in graphs Solving the Knight s Tour problem Solving puzzles with only one solution 70

77 16. INTRODUCTION TO TREES Disrete Mathematis Tree is a disrete struture that represents hierarhial relationships between individual elements or nodes. A tree in whih a parent has no more than two hildren is alled a binary tree. Tree and its Properties Definition: A Tree is a onneted ayli graph. There is a unique path between every pair of verties in G. A tree with N number of verties ontains (N-1) number of edges. The vertex whih is of 0 degree is alled root of the tree. The vertex whih is of 1 degree is alled leaf node of the tree and the degree of an internal node is at least 2. Example: The following is an example of a tree: A tree Centers and Bi-Centers of a Tree The enter of a tree is a vertex with minimal eentriity. The eentriity of a vertex X in a tree G is the maximum distane between the vertex X and any other vertex of the tree. The maximum eentriity is the tree diameter. If a tree has only one enter, it is alled Central Tree and if a tree has only more than one enters, it is alled Bi-entral Tree. Every tree is either entral or bi-entral. Algorithm to find enters and bi-enters of a tree Step 1: Remove all the verties of degree 1 from the given tree and also remove their inident edges. Step 2: Repeat step 1 until either a single vertex or two verties joined by an edge is left. If a single vertex is left then it is the enter of the tree and if two verties joined by an edge is left then it is the bi-enter of the tree. 71

78 Problem 1 Find out the enter/bi-enter of the following tree: f a b d e g Tree T1 Solution At first, we will remove all verties of degree 1 and also remove their inident edges and get the following tree: b d Tree after removing verties of degree 1 from T1 Again, we will remove all verties of degree 1 and also remove their inident edges and get the following tree: Tree after again removing verties of degree 1 Finally we got a single vertex and we stop the algorithm. As there is single vertex, this tree has one enter and the tree is a entral tree. 72

79 Problem 2 Find out the enter/bi-enter of the following tree: h a b d e f g A tree T2 Solution At first, we will remove all verties of degree 1 and also remove their inident edges and get the following tree: b d e Tree after removing verties of degree 1 from T2 Again, we will remove all verties of degree 1 and also remove their inident edges and get the following tree: d Tree after again removing verties of degree 1 Finally, we got two verties and d left, hene we stop the algorithm. As two verties joined by an edge is left, this tree has bi-enter d and the tree is bi-entral. 73

80 Labeled Trees Definition: A labeled tree is a tree the verties of whih are assigned unique numbers from 1 to n. We an ount suh trees for small values of n by hand so as to onjeture a general formula. The number of labeled trees of n number of verties is n n-2. Two labelled trees are isomorphi if their graphs are isomorphi and the orresponding points of the two trees have the same labels. Example 1 2 A labeled tree with two verties Three possible labeled tree with three verties Unlabeled trees Definition: An unlabeled tree is a tree the verties of whih are not assigned any numbers. The number of labeled trees of n number of verties is (2n)! / (n+1)!n! Example An unlabeled tree with two verties 74

81 An unlabeled tree with three verties Two possible unlabeled trees with four verties Rooted Tree A rooted tree G is a onneted ayli graph with a speial node that is alled the root of the tree and every edge diretly or indiretly originates from the root. An ordered rooted tree is a rooted tree where the hildren of eah internal vertex are ordered. If every internal vertex of a rooted tree has not more than m hildren, it is alled an m-ary tree. If every internal vertex of a rooted tree has exatly m hildren, it is alled a full m-ary tree. If m = 2, the rooted tree is alled a binary tree. 75

82 Root Node Internal Node Internal Node Internal Node Leaf Node Leaf Node Leaf Node Leaf Node Leaf Node Leaf Node A Rooted Tree Binary Searh Tree Binary Searh tree is a binary tree whih satisfies the following property: X in left sub-tree of vertex V, Value(X) Value (V) Y in right sub-tree of vertex V, Value(Y) Value (V) So, the value of all the verties of the left sub-tree of an internal node V are less than or equal to V and the value of all the verties of the right sub-tree of the internal node V are greater than or equal to V. The number of links from the root node to the deepest node is the height of the Binary Searh Tree. Example A Binary Searh Tree 76

83 Algorithm to searh for a key in BST BST_Searh(x, k) if ( x = NIL or k = Value[x] ) return x; if ( k < Value[x]) return BST_Searh (left[x], k); else return BST_Searh (right[x], k) Complexity of Binary searh tree Average Case Worst ase Spae Complexity O(n) O(n) Searh Complexity O(log n) O(n) Insertion O(log n) O(n) Complexity Deletion Complexity O(log n) O(n) 77

84 17. SPANNING TREES Disrete Mathematis A spanning tree of a onneted undireted graph G is a tree that minimally inludes all of the verties of G. A graph may have many spanning trees. Example f b d e A Graph G f b d e A Spanning Tree of Graph G 78

85 Minimum Spanning Tree A spanning tree with assigned weight less than or equal to the weight of every possible spanning tree of a weighted, onneted and undireted graph G, it is alled minimum spanning tree (MST). The weight of a spanning tree is the sum of all the weights assigned to eah edge of the spanning tree. Example b 1 5 f d b 1 f 2 3 d e 14 e 4 Weighted Graph G A Minimum Spanning Tree of Graph G Kruskal's Algorithm Kruskal's algorithm is a greedy algorithm that finds a minimum spanning tree for a onneted weighted graph. It finds a tree of that graph whih inludes every vertex and the total weight of all the edges in the tree is less than or equal to every possible spanning tree. Algorithm Step 1: Arrange all the edges of the given graph G (V,E) in non-dereasing order as per their edge weight. Step 2: Choose the smallest weighted edge from the graph and hek if it forms a yle with the spanning tree formed so far. Step 3: If there is no yle, inlude this edge to the spanning tree else disard it. Step 4: Repeat Step 2 and Step 3 until (V-1) number of edges are left in the spanning tree. 79

86 Problem Suppose we want to find minimum spanning tree for the following graph G using Kruskal s algorithm. a b 4 e 3 d 5 f 14 Weighted Graph G Solution From the above graph we onstrut the following table: Edge No. Vertex Pair E1 (a, b) 20 E2 (a, ) 9 E3 (a, d) 13 E4 (b, ) 1 E5 (b, e) 4 E6 (b, f) 5 E7 (, d) 2 E8 (d, e) 3 E9 (d, f) 14 Edge Weight 80

87 Now we will rearrange the table in asending order with respet to Edge weight: Edge No. Vertex Pair Edge Weight E4 (b, ) 1 E7 (, d) 2 E8 (d, e) 3 E5 (b, e) 4 E6 (b, f) 5 E2 (a, ) 9 E3 (a, d) 13 E9 (d, f) 14 E1 (a, b) 20 a a 1 b e d b e d f f After adding verties After adding edge E4 81

88 a a b e d b e 3 d f f After adding edge E7 After adding edge E8 a a b e 3 d b e 3 d 5 5 f f After adding edge E6 After adding edge E2 Sine we got all the 5 edges in the last figure, we stop the algorithm and this is the minimal spanning tree and its total weight is ( ) = 20. Prim's Algorithm Prim's algorithm, disovered in 1930 by mathematiians, Vojteh Jarnik and Robert C. Prim, is a greedy algorithm that finds a minimum spanning tree for a onneted weighted graph. It finds a tree of that graph whih inludes every vertex and the total weight of all the edges in the tree is less than or equal to every possible spanning tree. Prim s algorithm is faster on dense graphs. 82

89 Algorithm 1. Create a vertex set V that keeps trak of verties already inluded in MST. 2. Assign a key value to all verties in the graph. Initialize all key values as infinite. Assign key value as 0 for the first vertex so that it is piked first. 3. Pik a vertex x that has minimum key value and is not in V. 4. Inlude the vertex U to the vertex set V. 5. Update the value of all adjaent verties of x. 6. Repeat step 3 to step 5 until the vertex set V inludes all the verties of the graph. Problem Suppose we want to find minimum spanning tree for the following graph G using Prim s algorithm. a b 4 e 3 d 5 f 14 Weighted Graph G 83

90 Solution Here we start with the vertex a and proeed. a a b e d b e d f f No verties added After adding vertex a a 9 a 9 1 b e d b e d f f After adding vertex After adding vertex b 84

91 a a b e d b e 3 d f f After adding vertex d After adding vertex e a b e 3 d 5 f After adding vertex f This is the minimal spanning tree and its total weight is ( ) =

92 Part 7: Boolean Algebra 86

93 18. BOOLEAN EXPRESSIONS AND FUNCTIONS Disrete Mathematis Boolean algebra is algebra of logi. It deals with variables that an have two disrete values, 0 (False) and 1 (True); and operations that have logial signifiane. The earliest method of manipulating symboli logi was invented by George Boole and subsequently ame to be known as Boolean Algebra. Boolean algebra has now beome an indispensable tool in omputer siene for its wide appliability in swithing theory, building basi eletroni iruits and design of digital omputers. Boolean Funtions A Boolean funtion is a speial kind of mathematial funtion f: X n X of degree n, where X = {0, 1} is a Boolean domain and n is a non-negative integer. It desribes the way how to derive Boolean output from Boolean inputs. Example: Let, F(A, B) = A B. This is a funtion of degree 2 from the set of ordered pairs of Boolean variables to the set {0, 1} where F(0, 0) = 1, F(0, 1) = 0, F(1, 0) = 0 and F(1, 1) = 0 Boolean Expressions A Boolean expression always produes a Boolean value. A Boolean expression is omposed of a ombination of the Boolean onstants (True or False), Boolean variables and logial onnetives. Eah Boolean expression represents a Boolean funtion. Example: AB C is a Boolean expression. Boolean Identities Double Complement Law ~(~A) = A Complement Law A + ~A = 1 (OR Form) A ~A = 0 (AND Form) Idempotent Law A + A = A A A = A Identity Law A + 0 = A A 1 = A (OR Form) (AND Form) (OR Form) (AND Form) 87

94 Dominane Law A + 1 = 1 A 0 = 0 (OR Form) (AND Form) Commutative Law A + B = B + A (OR Form) A B = B A (AND Form) Assoiative Law A + (B + C) = (A + B) + C (OR Form) A (B C) = (A B) C (AND Form) Absorption Law A (A + B) = A A + (A B) = A Simplifiation Law A (~A + B) = A B A + (~A B) = A + B A B + A C + ~B C = A B + ~B C Distributive Law A + (B C) = (A + B) (A + C) A (B + C) = (A B) + (A C) De-Morgan's Law ~(A B) = ~A + ~B ~(A+ B) = ~A ~B Canonial Forms For a Boolean expression there are two kinds of anonial forms: 1. The sum of minterms (SOM) form 2. The produt of maxterms (POM) form The Sum of Minterms (SOM) or Sum of Produts (SOP) form A minterm is a produt of all variables taken either in their diret or omplemented form. Any Boolean funtion an be expressed as a sum of its 1-minterms and the inverse of the funtion an be expressed as a sum of its 0-minterms. Hene, and F (list of variables) = Σ (list of 1-minterm indies) F (list of variables) = Σ (list of 0-minterm indies) 88

95 A B C Minterm m m m m m m m m7 Example Let, F(x, y, z) = x y z + x y z + x y z + x y z Or, F(x, y, z) = m0 + m5 + m6 + m7 Hene, F(x, y, z) = Σ (0, 5, 6, 7) Now we will find the omplement of F(x, y, z) F (x, y, z) = x y z + x y z + x y z + x y z Or, F (x, y, z) = m3 + m1 + m2 + m4 Hene, F (x, y, z) = Σ (3, 1, 2, 4) = Σ (1, 2, 3, 4) The Produt of Maxterms (POM) or Produt of Sums (POS) form A maxterm is addition of all variables taken either in their diret or omplemented form. Any Boolean funtion an be expressed as a produt of its 0-maxterms and the inverse of the funtion an be expressed as a produt of its 1-maxterms. Hene, and F (list of variables) = π (list of 0-maxterm indies) F (list of variables) = π (list of 1-maxterm indies). A B C Maxterm M M M M M M M M7 89

96 Example Let, F(x, y, z) = (x+y+z) (x+y+z ) (x+y +z) (x +y+z) Or, F(x, y, z) = M0 M1 M2 M4 Hene, F (x, y, z) = Π(0, 1, 2, 4) F '(x, y, z) = (x+y +z ) (x +y+z ) (x +y +z) (x +y +z ) Or, F(x, y, z) = M3 M5 M6 M7 Hene, F ' (x, y, z) = Π(3, 5, 6, 7) Logi Gates Boolean funtions are implemented by using logi gates. The following are the logi gates: NOT Gate A NOT gate inverts a single bit input to a single bit of output. A ~A Truth table of NOT Gate AND Gate An AND gate is a logi gate that gives a high output only if all its inputs are high, otherwise it gives low output. A dot (.) is used to show the AND operation. A B A.B Truth table of AND Gate OR Gate An OR gate is a logi gate that gives high output if at least one of the inputs is high. A plus (+) is used to show the OR operation. 90

97 A B A+B Truth table of OR Gate NAND Gate A NAND gate is a logi gate that gives a low output only if all its inputs are high, otherwise it gives high output. A B ~ (A.B) Truth table of NAND Gate NOR Gate An NOR gate is a logi gate that gives high output if both the inputs are low, otherwise it gives low output. A B ~ (A+B) Truth table of NOR Gate XOR (Exlusive OR) Gate An XOR gate is a logi gate that gives high output if the inputs are different, otherwise it gives low output. A B A B Truth table of XOR Gate 91

98 X-NOR (Exlusive NOR) Gate An EX-NOR gate is a logi gate that gives high output if the inputs are same, otherwise it gives low output. A B A X-NOR B Truth table of X-NOR Gate 92

99 19. SIMPLIFICATION OF BOOLEAN FUNCTIONS Disrete Mathematis Simplifiation Using Algebrai Funtions In this approah, one Boolean expression is minimized into an equivalent expression by applying Boolean identities. Problem 1 Minimize the following Boolean expression using Boolean identities: F (A, B, C) = A B+ BC + BC+ AB C Solution Given, Or, F (A, B, C) = A B+ BC + BC+ AB C F (A, B, C) = A B+ (BC + BC ) + BC+ AB C [By adding BC, as it does not hange F] Or, Or, F (A, B, C) = A B+ (BC + BC) + (BC + AB C ) F (A, B, C) = A B+ B(C + C) + C (B+ AB ) Or, F (A, B, C) = A B+ B.1+ C (B+ A) [ (C + C) =1 and (B+ AB )= (B+ A)] Or, F (A, B, C) = A B+ B+ C (B+ A) [ B.1 =B ] Or, F (A, B, C) = B(A + 1)+ C (B+ A) Or, F (A, B, C) = B.1+ C (B+ A) [ (A + 1) =1 ] Or, F (A, B, C) = B+ C (B+ A) [ As, B.1 =B ] Or, Or, Or, F (A, B, C) = B+ BC + AC F (A, B, C) = B(1+ C ) + AC F (A, B, C) = B.1 + AC [As, (1+ C ) =1] Or, F (A, B, C) = B + AC [As, B.1 =B] So, F (A, B, C) = B + AC is the minimized form. 93

100 Problem 2 Minimize the following Boolean expression using Boolean identities: F (A, B, C) = (A+B) (B+ C) Solution Given, F (A, B, C) = (A+B) (A+ C) Or, F (A, B, C) = A.A+A.C+B.A+ B.C [Applying distributive Rule] Or, F (A, B, C) = A+A.C+B.A+ B.C [Applying Idempotent Law] Or, F (A, B, C) = A(1+C)+B.A+ B.C [Applying distributive Law] Or, F (A, B, C) = A+B.A+ B.C [Applying dominane Law] Or, F (A, B, C) = (A+1).A+ B.C [Applying distributive Law] Or, F (A, B, C) = 1.A+ B.C [Applying dominane Law] Or, F (A, B, C) = A+ B.C [Applying dominane Law] So, F (A, B, C) = A+ BC is the minimized form. Karnaugh Maps The Karnaugh map (K map), introdued by Maurie Karnaughin in 1953, is a grid-like representation of a truth table whih is used to simplify boolean algebra expressions. A Karnaugh map has zero and one entries at different positions. It provides grouping together Boolean expressions with ommon fators and eliminates unwanted variables from the expression. In a K-map, rossing a vertial or horizontal ell boundary is always a hange of only one variable. Example 1 An arbitrary truth table is taken below: A B AoperationB 0 0 w 0 1 x 1 0 y 1 1 z Truth table Now we will make a k-map for the above truth table: 94

101 B A w x 1 y z K-map Example 2 Now we will make a K-map for the expression: AB+ A B B A K-map Simplifiation Using K- map K-map uses some rules for the simplifiation of Boolean expressions by ombining together adjaent ells into single term. The rules are desribed below: Rule 1: Any ell ontaining a zero annot be grouped. BC A Wrong grouping 95

102 Rule 2: Groups must ontain 2n ells (n starting from 1). BC A Wrong grouping Rule 3: Grouping must be horizontal or vertial, but must not be diagonal. BC A Wrong diagonal grouping BC A Proper vertial grouping BC A Proper horizontal grouping 96

103 Rule 4: Groups must be overed as largely as possible. BC A Improper grouping BC A Proper grouping Rule 5: If 1 of any ell annot be grouped with any other ell, it will at as a group itself. BC A Proper grouping Rule 6: Groups may overlap but there should be as few groups as possible. BC A Proper grouping 97

104 Rule 7: The leftmost ell/ells an be grouped with the rightmost ell/ells and the topmost ell/ells an be grouped with the bottommost ell/ells. BC A Proper grouping Problem Minimize the following Boolean expression using K-map: F (A, B, C) = A BC+ A BC + AB C + AB C Solution Eah term is put into k-map and we get the following: BC A K-map for F (A, B, C) Now we will group the ells of 1 aording to the rules stated above: BC A K-map for F (A, B, C) We have got two groups whih are termed as A B and AB. Hene, F (A, B, C) = A B+ AB = A B. It is the minimized form. 98

Sebastián Bravo López

Sebastián Bravo López Transfinite Turing mahines Sebastián Bravo López 1 Introdution With the rise of omputers with high omputational power the idea of developing more powerful models of omputation has appeared. Suppose that

More information

1.3 Complex Numbers; Quadratic Equations in the Complex Number System*

1.3 Complex Numbers; Quadratic Equations in the Complex Number System* 04 CHAPTER Equations and Inequalities Explaining Conepts: Disussion and Writing 7. Whih of the following pairs of equations are equivalent? Explain. x 2 9; x 3 (b) x 29; x 3 () x - 2x - 22 x - 2 2 ; x

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

5.2 The Master Theorem

5.2 The Master Theorem 170 CHAPTER 5. RECURSION AND RECURRENCES 5.2 The Master Theorem Master Theorem In the last setion, we saw three different kinds of behavior for reurrenes of the form at (n/2) + n These behaviors depended

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

INTRODUCTORY SET THEORY

INTRODUCTORY SET THEORY M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,

More information

How To Fator

How To Fator CHAPTER hapter 4 > Make the Connetion 4 INTRODUCTION Developing seret odes is big business beause of the widespread use of omputers and the Internet. Corporations all over the world sell enryption systems

More information

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology First Name: Family Name: Student Number: Class/Tutorial: WOLLONGONG COLLEGE AUSTRALIA A College of the University of Wollongong Diploma in Information Technology Final Examination Spring Session 2008 WUCT121

More information

Lecture 16 : Relations and Functions DRAFT

Lecture 16 : Relations and Functions DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence

More information

Channel Assignment Strategies for Cellular Phone Systems

Channel Assignment Strategies for Cellular Phone Systems Channel Assignment Strategies for Cellular Phone Systems Wei Liu Yiping Han Hang Yu Zhejiang University Hangzhou, P. R. China Contat: [email protected] 000 Mathematial Contest in Modeling (MCM) Meritorious

More information

Chapter 1 Microeconomics of Consumer Theory

Chapter 1 Microeconomics of Consumer Theory Chapter 1 Miroeonomis of Consumer Theory The two broad ategories of deision-makers in an eonomy are onsumers and firms. Eah individual in eah of these groups makes its deisions in order to ahieve some

More information

So let us begin our quest to find the holy grail of real analysis.

So let us begin our quest to find the holy grail of real analysis. 1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

More information

3 Game Theory: Basic Concepts

3 Game Theory: Basic Concepts 3 Game Theory: Basi Conepts Eah disipline of the soial sienes rules omfortably ithin its on hosen domain: : : so long as it stays largely oblivious of the others. Edard O. Wilson (1998):191 3.1 and and

More information

Cartesian Products and Relations

Cartesian Products and Relations Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special

More information

2. Properties of Functions

2. Properties of Functions 2. PROPERTIES OF FUNCTIONS 111 2. Properties of Funtions 2.1. Injetions, Surjetions, an Bijetions. Definition 2.1.1. Given f : A B 1. f is one-to-one (short han is 1 1) or injetive if preimages are unique.

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

Chapter 6 A N ovel Solution Of Linear Congruenes Proeedings NCUR IX. (1995), Vol. II, pp. 708{712 Jerey F. Gold Department of Mathematis, Department of Physis University of Utah Salt Lake City, Utah 84112

More information

Programming Basics - FORTRAN 77 http://www.physics.nau.edu/~bowman/phy520/f77tutor/tutorial_77.html

Programming Basics - FORTRAN 77 http://www.physics.nau.edu/~bowman/phy520/f77tutor/tutorial_77.html CWCS Workshop May 2005 Programming Basis - FORTRAN 77 http://www.physis.nau.edu/~bowman/phy520/f77tutor/tutorial_77.html Program Organization A FORTRAN program is just a sequene of lines of plain text.

More information

Examination paper for MA0301 Elementær diskret matematikk

Examination paper for MA0301 Elementær diskret matematikk Department of Mathematical Sciences Examination paper for MA0301 Elementær diskret matematikk Academic contact during examination: Iris Marjan Smit a, Sverre Olaf Smalø b Phone: a 9285 0781, b 7359 1750

More information

Discrete Mathematics. Hans Cuypers. October 11, 2007

Discrete Mathematics. Hans Cuypers. October 11, 2007 Hans Cuypers October 11, 2007 1 Contents 1. Relations 4 1.1. Binary relations................................ 4 1.2. Equivalence relations............................. 6 1.3. Relations and Directed Graphs.......................

More information

Automata and Formal Languages

Automata and Formal Languages Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

More information

Computer Networks Framing

Computer Networks Framing Computer Networks Framing Saad Mneimneh Computer Siene Hunter College of CUNY New York Introdution Who framed Roger rabbit? A detetive, a woman, and a rabbit in a network of trouble We will skip the physial

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

Discrete Mathematics Problems

Discrete Mathematics Problems Discrete Mathematics Problems William F. Klostermeyer School of Computing University of North Florida Jacksonville, FL 32224 E-mail: [email protected] Contents 0 Preface 3 1 Logic 5 1.1 Basics...............................

More information

USA Mathematical Talent Search. PROBLEMS / SOLUTIONS / COMMENTS Round 3 - Year 12 - Academic Year 2000-2001

USA Mathematical Talent Search. PROBLEMS / SOLUTIONS / COMMENTS Round 3 - Year 12 - Academic Year 2000-2001 USA Mathematial Talent Searh PROBLEMS / SOLUTIONS / COMMENTS Round 3 - Year - Aademi Year 000-00 Gene A. Berg, Editor /3/. Find the smallest positive integer with the property that it has divisors ending

More information

A Holistic Method for Selecting Web Services in Design of Composite Applications

A Holistic Method for Selecting Web Services in Design of Composite Applications A Holisti Method for Seleting Web Servies in Design of Composite Appliations Mārtiņš Bonders, Jānis Grabis Institute of Information Tehnology, Riga Tehnial University, 1 Kalu Street, Riga, LV 1658, Latvia,

More information

cos t sin t sin t cos t

cos t sin t sin t cos t Exerise 7 Suppose that t 0 0andthat os t sin t At sin t os t Compute Bt t As ds,andshowthata and B ommute 0 Exerise 8 Suppose A is the oeffiient matrix of the ompanion equation Y AY assoiated with the

More information

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights

More information

Some Special Artex Spaces Over Bi-monoids

Some Special Artex Spaces Over Bi-monoids Some Special Artex Spaces Over Bi-monoids K.Muthukumaran (corresponding auther) Assistant Professor PG and Research Department Of Mathematics, Saraswathi Narayanan College, Perungudi Madurai-625022,Tamil

More information

Handout #1: Mathematical Reasoning

Handout #1: Mathematical Reasoning Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

More information

Weighting Methods in Survey Sampling

Weighting Methods in Survey Sampling Setion on Survey Researh Methods JSM 01 Weighting Methods in Survey Sampling Chiao-hih Chang Ferry Butar Butar Abstrat It is said that a well-designed survey an best prevent nonresponse. However, no matter

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

Abstract Algebra Cheat Sheet

Abstract Algebra Cheat Sheet Abstract Algebra Cheat Sheet 16 December 2002 By Brendan Kidwell, based on Dr. Ward Heilman s notes for his Abstract Algebra class. Notes: Where applicable, page numbers are listed in parentheses at the

More information

Linear Algebra. A vector space (over R) is an ordered quadruple. such that V is a set; 0 V ; and the following eight axioms hold:

Linear Algebra. A vector space (over R) is an ordered quadruple. such that V is a set; 0 V ; and the following eight axioms hold: Linear Algebra A vector space (over R) is an ordered quadruple (V, 0, α, µ) such that V is a set; 0 V ; and the following eight axioms hold: α : V V V and µ : R V V ; (i) α(α(u, v), w) = α(u, α(v, w)),

More information

1 if 1 x 0 1 if 0 x 1

1 if 1 x 0 1 if 0 x 1 Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

Open and Extensible Business Process Simulator

Open and Extensible Business Process Simulator UNIVERSITY OF TARTU FACULTY OF MATHEMATICS AND COMPUTER SCIENCE Institute of Computer Siene Karl Blum Open and Extensible Business Proess Simulator Master Thesis (30 EAP) Supervisors: Luiano Garía-Bañuelos,

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

DSP-I DSP-I DSP-I DSP-I

DSP-I DSP-I DSP-I DSP-I DSP-I DSP-I DSP-I DSP-I Digital Signal Proessing I (8-79) Fall Semester, 005 IIR FILER DESIG EXAMPLE hese notes summarize the design proedure for IIR filters as disussed in lass on ovember. Introdution:

More information

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 3 Binary Operations We are used to addition and multiplication of real numbers. These operations combine two real numbers

More information

. 0 1 10 2 100 11 1000 3 20 1 2 3 4 5 6 7 8 9

. 0 1 10 2 100 11 1000 3 20 1 2 3 4 5 6 7 8 9 Introduction The purpose of this note is to find and study a method for determining and counting all the positive integer divisors of a positive integer Let N be a given positive integer We say d is a

More information

Mathematical Induction. Lecture 10-11

Mathematical Induction. Lecture 10-11 Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

More information

Basic Properties of Probability

Basic Properties of Probability Basi Properties of Probability Definitions: A random experiment is a proedure or an operation whose outome is unertain and annot be predited with ertainty in advane. The olletion of all possible outomes

More information

Mathematics Review for MS Finance Students

Mathematics Review for MS Finance Students Mathematics Review for MS Finance Students Anthony M. Marino Department of Finance and Business Economics Marshall School of Business Lecture 1: Introductory Material Sets The Real Number System Functions,

More information

Fixed-income Securities Lecture 2: Basic Terminology and Concepts. Present value (fixed interest rate) Present value (fixed interest rate): the arb

Fixed-income Securities Lecture 2: Basic Terminology and Concepts. Present value (fixed interest rate) Present value (fixed interest rate): the arb Fixed-inome Seurities Leture 2: Basi Terminology and Conepts Philip H. Dybvig Washington University in Saint Louis Various interest rates Present value (PV) and arbitrage Forward and spot interest rates

More information

Granular Problem Solving and Software Engineering

Granular Problem Solving and Software Engineering Granular Problem Solving and Software Engineering Haibin Zhu, Senior Member, IEEE Department of Computer Siene and Mathematis, Nipissing University, 100 College Drive, North Bay, Ontario, P1B 8L7, Canada

More information

10.1 The Lorentz force law

10.1 The Lorentz force law Sott Hughes 10 Marh 2005 Massahusetts Institute of Tehnology Department of Physis 8.022 Spring 2004 Leture 10: Magneti fore; Magneti fields; Ampere s law 10.1 The Lorentz fore law Until now, we have been

More information

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886) Chapter 2 Numbers God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886) God created the integers and the rest is the work

More information

A Context-Aware Preference Database System

A Context-Aware Preference Database System J. PERVASIVE COMPUT. & COMM. (), MARCH 005. TROUBADOR PUBLISHING LTD) A Context-Aware Preferene Database System Kostas Stefanidis Department of Computer Siene, University of Ioannina,, [email protected] Evaggelia

More information

Classical Electromagnetic Doppler Effect Redefined. Copyright 2014 Joseph A. Rybczyk

Classical Electromagnetic Doppler Effect Redefined. Copyright 2014 Joseph A. Rybczyk Classial Eletromagneti Doppler Effet Redefined Copyright 04 Joseph A. Rybzyk Abstrat The lassial Doppler Effet formula for eletromagneti waves is redefined to agree with the fundamental sientifi priniples

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

More information

Notes on Algebraic Structures. Peter J. Cameron

Notes on Algebraic Structures. Peter J. Cameron Notes on Algebraic Structures Peter J. Cameron ii Preface These are the notes of the second-year course Algebraic Structures I at Queen Mary, University of London, as I taught it in the second semester

More information

Chapter 5 Single Phase Systems

Chapter 5 Single Phase Systems Chapter 5 Single Phase Systems Chemial engineering alulations rely heavily on the availability of physial properties of materials. There are three ommon methods used to find these properties. These inlude

More information

Static Fairness Criteria in Telecommunications

Static Fairness Criteria in Telecommunications Teknillinen Korkeakoulu ERIKOISTYÖ Teknillisen fysiikan koulutusohjelma 92002 Mat-208 Sovelletun matematiikan erikoistyöt Stati Fairness Criteria in Teleommuniations Vesa Timonen, e-mail: vesatimonen@hutfi

More information

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

More information

Collinear Points in Permutations

Collinear Points in Permutations Collinear Points in Permutations Joshua N. Cooper Courant Institute of Mathematics New York University, New York, NY József Solymosi Department of Mathematics University of British Columbia, Vancouver,

More information

Math 223 Abstract Algebra Lecture Notes

Math 223 Abstract Algebra Lecture Notes Math 223 Abstract Algebra Lecture Notes Steven Tschantz Spring 2001 (Apr. 23 version) Preamble These notes are intended to supplement the lectures and make up for the lack of a textbook for the course

More information

Boolean Algebra Part 1

Boolean Algebra Part 1 Boolean Algebra Part 1 Page 1 Boolean Algebra Objectives Understand Basic Boolean Algebra Relate Boolean Algebra to Logic Networks Prove Laws using Truth Tables Understand and Use First Basic Theorems

More information

Full and Complete Binary Trees

Full and Complete Binary Trees Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

More information

Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

More information

Geometric Transformations

Geometric Transformations Geometric Transformations Definitions Def: f is a mapping (function) of a set A into a set B if for every element a of A there exists a unique element b of B that is paired with a; this pairing is denoted

More information

Discrete Mathematics

Discrete Mathematics Discrete Mathematics Chih-Wei Yi Dept. of Computer Science National Chiao Tung University March 16, 2009 2.1 Sets 2.1 Sets 2.1 Sets Basic Notations for Sets For sets, we ll use variables S, T, U,. We can

More information

Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal. Predicate Logic Example: All men are mortal. Socrates is a man. Socrates is mortal. Note: We need logic laws that work for statements involving quantities like some and all. In English, the predicate is

More information

E3: PROBABILITY AND STATISTICS lecture notes

E3: PROBABILITY AND STATISTICS lecture notes E3: PROBABILITY AND STATISTICS lecture notes 2 Contents 1 PROBABILITY THEORY 7 1.1 Experiments and random events............................ 7 1.2 Certain event. Impossible event............................

More information

Fundamentele Informatica II

Fundamentele Informatica II Fundamentele Informatica II Answer to selected exercises 1 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 Let L be a language. It is clear

More information

BUILDING A SPAM FILTER USING NAÏVE BAYES. CIS 391- Intro to AI 1

BUILDING A SPAM FILTER USING NAÏVE BAYES. CIS 391- Intro to AI 1 BUILDING A SPAM FILTER USING NAÏVE BAYES 1 Spam or not Spam: that is the question. From: "" Subjet: real estate is the only way... gem oalvgkay Anyone an buy real estate with no

More information

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 6 Permutation Groups Let S be a nonempty set and M(S be the collection of all mappings from S into S. In this section,

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Incenter Circumcenter

Incenter Circumcenter TRIANGLE: Centers: Incenter Incenter is the center of the inscribed circle (incircle) of the triangle, it is the point of intersection of the angle bisectors of the triangle. The radius of incircle is

More information

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

More information

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers. MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

More information

Logic in Computer Science: Logic Gates

Logic in Computer Science: Logic Gates Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers

More information

6.2 Permutations continued

6.2 Permutations continued 6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Introduction to Modern Algebra

Introduction to Modern Algebra Introduction to Modern Algebra David Joyce Clark University Version 0.0.6, 3 Oct 2008 1 1 Copyright (C) 2008. ii I dedicate this book to my friend and colleague Arthur Chou. Arthur encouraged me to write

More information

WORKFLOW CONTROL-FLOW PATTERNS A Revised View

WORKFLOW CONTROL-FLOW PATTERNS A Revised View WORKFLOW CONTROL-FLOW PATTERNS A Revised View Nik Russell 1, Arthur H.M. ter Hofstede 1, 1 BPM Group, Queensland University of Tehnology GPO Box 2434, Brisbane QLD 4001, Australia {n.russell,a.terhofstede}@qut.edu.au

More information

Basic Concepts of Set Theory, Functions and Relations

Basic Concepts of Set Theory, Functions and Relations March 1, 2006 p. 1 Basic Concepts of Set Theory, Functions and Relations 1. Basic Concepts of Set Theory...1 1.1. Sets and elements...1 1.2. Specification of sets...2 1.3. Identity and cardinality...3

More information

Course Syllabus. MATH 1350-Mathematics for Teachers I. Revision Date: 8/15/2016

Course Syllabus. MATH 1350-Mathematics for Teachers I. Revision Date: 8/15/2016 Course Syllabus MATH 1350-Mathematics for Teachers I Revision Date: 8/15/2016 Catalog Description: This course is intended to build or reinforce a foundation in fundamental mathematics concepts and skills.

More information

Discrete Maths. Philippa Gardner. These lecture notes are based on previous notes by Iain Phillips.

Discrete Maths. Philippa Gardner. These lecture notes are based on previous notes by Iain Phillips. Discrete Maths Philippa Gardner These lecture notes are based on previous notes by Iain Phillips. This short course introduces some basic concepts in discrete mathematics: sets, relations, and functions.

More information

BOOLEAN ALGEBRA & LOGIC GATES

BOOLEAN ALGEBRA & LOGIC GATES BOOLEAN ALGEBRA & LOGIC GATES Logic gates are electronic circuits that can be used to implement the most elementary logic expressions, also known as Boolean expressions. The logic gate is the most basic

More information

Elements of probability theory

Elements of probability theory 2 Elements of probability theory Probability theory provides mathematical models for random phenomena, that is, phenomena which under repeated observations yield di erent outcomes that cannot be predicted

More information

1 The Concept of a Mapping

1 The Concept of a Mapping Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 1 The Concept of a Mapping The concept of a mapping (aka function) is important throughout mathematics. We have been dealing

More information

Mathematical Induction

Mathematical Induction Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

More information

An Enhanced Critical Path Method for Multiple Resource Constraints

An Enhanced Critical Path Method for Multiple Resource Constraints An Enhaned Critial Path Method for Multiple Resoure Constraints Chang-Pin Lin, Hung-Lin Tai, and Shih-Yan Hu Abstrat Traditional Critial Path Method onsiders only logial dependenies between related ativities

More information

MA651 Topology. Lecture 6. Separation Axioms.

MA651 Topology. Lecture 6. Separation Axioms. MA651 Topology. Lecture 6. Separation Axioms. This text is based on the following books: Fundamental concepts of topology by Peter O Neil Elements of Mathematics: General Topology by Nicolas Bourbaki Counterexamples

More information

k, then n = p2α 1 1 pα k

k, then n = p2α 1 1 pα k Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

THE LANGUAGE OF SETS AND SET NOTATION

THE LANGUAGE OF SETS AND SET NOTATION THE LNGGE OF SETS ND SET NOTTION Mathematics is often referred to as a language with its own vocabulary and rules of grammar; one of the basic building blocks of the language of mathematics is the language

More information

Vector and Matrix Norms

Vector and Matrix Norms Chapter 1 Vector and Matrix Norms 11 Vector Spaces Let F be a field (such as the real numbers, R, or complex numbers, C) with elements called scalars A Vector Space, V, over the field F is a non-empty

More information

Outline. Planning. Search vs. Planning. Search vs. Planning Cont d. Search vs. planning. STRIPS operators Partial-order planning.

Outline. Planning. Search vs. Planning. Search vs. Planning Cont d. Search vs. planning. STRIPS operators Partial-order planning. Outline Searh vs. planning Planning STRIPS operators Partial-order planning Chapter 11 Artifiial Intelligene, lp4 2005/06, Reiner Hähnle, partly based on AIMA Slides Stuart Russell and Peter Norvig, 1998

More information

Solutions to TOPICS IN ALGEBRA I.N. HERSTEIN. Part II: Group Theory

Solutions to TOPICS IN ALGEBRA I.N. HERSTEIN. Part II: Group Theory Solutions to TOPICS IN ALGEBRA I.N. HERSTEIN Part II: Group Theory No rights reserved. Any part of this work can be reproduced or transmitted in any form or by any means. Version: 1.1 Release: Jan 2013

More information

You know from calculus that functions play a fundamental role in mathematics.

You know from calculus that functions play a fundamental role in mathematics. CHPTER 12 Functions You know from calculus that functions play a fundamental role in mathematics. You likely view a function as a kind of formula that describes a relationship between two (or more) quantities.

More information

SOLUTIONS TO EXERCISES FOR. MATHEMATICS 205A Part 3. Spaces with special properties

SOLUTIONS TO EXERCISES FOR. MATHEMATICS 205A Part 3. Spaces with special properties SOLUTIONS TO EXERCISES FOR MATHEMATICS 205A Part 3 Fall 2008 III. Spaces with special properties III.1 : Compact spaces I Problems from Munkres, 26, pp. 170 172 3. Show that a finite union of compact subspaces

More information

4. CLASSES OF RINGS 4.1. Classes of Rings class operator A-closed Example 1: product Example 2:

4. CLASSES OF RINGS 4.1. Classes of Rings class operator A-closed Example 1: product Example 2: 4. CLASSES OF RINGS 4.1. Classes of Rings Normally we associate, with any property, a set of objects that satisfy that property. But problems can arise when we allow sets to be elements of larger sets

More information