USIT104-Discrete-Mathematics-munotes

Page 1

1 Unit I 1 INTRODUCTION AND INTRODUCTION TO SET THEORY Unit structure 1.0 Objectives 1.1 Introduction 1.2 Introduction to Sets 1.3 Relations and Functions 1.4 Subsets- Proof of the Concept 1.5 Properties of Set 1.6 Proving Property of Sets using Venn Diagram 1.7 Boolean Algebras, Russell’s Paradox and the Halting Problem 1.8 List of References 1.9 Unit End Exercise 1.0 OBJECTIVES This chapter would make you understand the following concepts: • Definition of Sets. • Understanding concepts of Relations and Functions. • Proof of Subsets. • Proving Property of Sets using Venn Diagram • Boolean Algebras, Russell’s Paradox and the Halting Problem 1.1 INTRODUCTION A v a r i a b l e c a n s o m e t i m e s b e t h o u g h t o f a s a p l a c e holder for values that are not known or can act as representatives for values that form a series and can also be represented as elements in a set. To bring clarity to the above definition certain examples can be considered. Consider the statement {For i = 1 to n}….. herei acts as placeholder for values ranging from 1 till n where n can vary based on users input. This means that i, n both being variables, i takes up values from 1 till the user specified input that is “n”. munotes.in

Page 2

2 S i m i l a r l y t h e o t h e r e x a m p l e o f a v a r i a b l e c a n b e in the form of “n2 + n” which can also be represented in the form of a set of elements {12+1, 22+2, 32 +3,…..}. A v a r i a b l e i s b a s i c a l l y a t e m p o r a r y r e g i s t e r t h a t accords names and places to values so that one can perform actual computations to help discover its possible values. S o m e o t h e r e x a m p l e s o f v a r i a b l e s c a n b e i n t h e f o rm of equations as a whole 3x2 + x+ 4 and can assume the values of x = 4/3 or x = 1. Another example can be as follows that given a real number p, p2≥ 0. Types of Mathematical Statements: T h e r e a r e t h r e e t y p e s o f m a t h e m a t i c a l s t a t e m e n t s : universal statements, conditional statements, and existential statements. A u n i v e r s a l s t a t e m e n t s p e c i f i e s t h a t a c e r t a i n p r operty is true for all elements in a set. For example: All positive integers are greater than zero. A c o n d i t i o n a l s t a t e m e n t d e p e n d s o n t h e t r u e v a l u e of the condition. For example If starfish is a sea animal then it can swim. A n e x i s t e n t i a l s t a t e m e n t s a y s t h a t t h e r e e x i s t s c ertain items for which the property is true. For example there exists a prime number that is even which is true. Universal Conditional Statements: Universal statements contain words like “For All” and conditional statements have words such as “If then” and a universal conditional statement contain both. A universal conditional statement is a statement that is both universal and conditional. For example “For All” birds if a is a crow then it can fly. The said example gives a flavor of more of a conditional statement. Whereas if the sentence is constructed in the form as follows “If a crow can fly then crow belongs to the bird species”. A few more variations of rewriting a universal conditional statement is shown as below: For all positive integers x, if x is not equal to 0 then square of x is positive. For all non-zero positive integers, then square of the integer is also positive. If x > 0 then square(x) > 0. The square of any positive integer is positive. All non-zero positive integers have squares which are positive. munotes.in

Page 3

3 Universal Existential Statements: A u n i v e r s a l e x i s t e n t i a l s t a t e m e n t i s a s t a t e m e n t that constitutes the first part containing a property that is true for all and the second part being existential it asserts the existence of something. For example: All real numbers when multiplied with its inverse generate an identity I is equal to 1. In this statement the property “multiplied with its inverse” applies universally to all real numbers. This statement asserts every number has an inverse however the inverse formats are different for different forms of real numbers. The statement can also be written as follows: A l l r e a l n u m b e r s h a v e m u l t i p l i c a t i v e i n v e r s e s t h a t on multiplication generates I as an identity. F o r a l l r e a l n u m b e r s r , t h e r e i s a m u l t i p l i c a t i v e inverse which when multiplied generates identity I OR F o r a l l r e a l n u m b e r s r , t h e r e i s a r e a l n u m b e r s such that s is a multiplicative inverse for r. Using variables in mathematics helps in referring to quantities without ambiguity while not r e s t r i c t i n g s p e c i f i c values for them. Example 1: Rewriting a Universal Existential Statement: The statement is as follows: Every category of wheel has spokes Possible solutions are as follows: a. All wheels have spokes b. For all category of wheel W there exists spokes for W. c. C is a type of spoke that is meant for the wheel W. Existential Universal Statements: A n e x i s t e n t i a l u n i v e r s a l s t a t e m e n t i s e x a c t l y t h e opposite of the above as the first part of the statement asserts that a certain entity exists and is universal because the suffixed part says that this entity satisfies a property common to all for a specific kind or type. F o r e x a m p l e a n i n t e g e r w h i c h i s g r e a t e r t h a n 0 b e longs to the set of natural numbers. The sentence can be written in multiple ways: T h e r e e x i s t s a p o s i t i v e n u m b e r g r e a t e r t h a n z e r o that belongs to the set of natural numbers OR Every positive integer m in set of natural of numbers n such that m, n is always >=0 munotes.in

Page 4

4 Example 2: Rewriting an Existential Universal Statement: Fill in the blanks to rewrite the following statement in three different ways: A rectangle has two opposite sides equal and parallel and belongs to the parallelogram family. The other forms of writing the statement are as follows: a) A rectangle having equal and opposite sides that are parallel is a p a r a l l e l o g r a m . b) Each parallelogram that has two opposite sides equal and parallel is a r e c t a n g l e . Some of the important mathematical concepts, like the limit of a sequence, can be represented by existential, conditional and universal phrases and require all the three phases like “For All”, “There Exists,” and “IF Then Else”. A sequence of real numbers is represented in the form as follows: Lim an = l if given €> 0, an≈ l for n ≥1 It is built in three steps as follows: • an ≈ l (an approximates to l within €) • an ≈ l for n ≥ 1 ( This approximation holds for all n) • If given €> 0, an≈l for n ≥ 1 ( Condition is smaller the €,approximation can be made as close as 1.2 INTRODUCTION TO SETS Notation: Imagine S to be a set, and if x is an element of this set then it is represented as x ∈ S . I f x i s n o t a n e l e m e n t o f t h e s e t S t h e n i t i s represented as x ∉ S. The notation for the set is that all the elements within the set should be included within braces. For example a set can comprise of elements as such {1, 2, 3} and these elements are members of the set. Sometimes very large sets are represented as follows: {1,2,3,…….,99}and these can be termed as set of positive integers. Infinite sets can be represented in this format as follows: {23,24,25………}. Example 3: Solving Problems on Sets: Consider A = {5, 6, 7}, B = {7, 5, 6}, and C = {7, 7, 6,6, 6,5,5}. a. Specify the elements of set A, B, and C and identify the relation that exists between them. b. Is {0} = 0? c. Specify the number of elements that are present in the set {5, {5}}? d. For each positive integer m, let Nm = {m, −m}. Find N3, N4, and N0. munotes.in

Page 5

5 To solve the above please note that for part “a” elements of asset are never repeated i.e. a. All the sets denoted by A, B, C have exactly the same number of elements within the set and also the elements are the same. b. As per the set notation the set containing “0” represents that there exists a single element in the set and it is not equal to 0. c. There are two elements in the set the first element being “5” and the second element being a set containing the number5. d. N3 = {3,-3},N4={4,-4},N = {0,0} There are certain set of numbers which are commonly referenced through symbolic names and are presented in the table below: Set Represented by R Set of all real numbers R+ Set of all positive real numbers Z Set of all integers Q Set of all rational numbers W Set of whole numbers N Set of all positive whole numbers R e a l n u m b e r s c a n b e r e p r e s e n t e d u s i n g a n u m b e r l i ne as shown below. These primarily constitute of rational numbers. Rational numbers majorly constitute of integers (positive and negative) and fractions (positive and negative). The set of integers comprise of negative integers and whole numbers and the whole numbers constitute of natural numbers and 0. T h e r e a l n u m b e r w h e n r e p r e s e n t e d u s i n g a l i n e i s said to be continuous and the integers positive and negative are located at fixed intervals along the line and every integer is said to be discrete as its position on the number line is unique and discrete. H e n c e t h e t e r m Discrete Mathematics comes from the distinction between continuous and discrete mathematical objects. The real number when represented using a line is said to be continuous and the integers positive and negative are located at fixed intervals along the line and every integer is said to be discrete as its position on the number line is unique and discrete.
munotes.in

Page 6

6 Coming back to the concept of set the set can be represented using set builder notation. Set-Builder Notation: L e t S b e a s e t a n d l e t P ( x ) b e a p r o p e r t y s u c h t h at for the elements of the set S the property might either hold true or false. The above can be represented as follows: We may define a new set to be the set of all elements x in S such that P(x) is true. The most natural way of denoting it is as follows: { x | P(x)} or {x ∈ S | P(x)} U n d e r s t a n d i n g s e t s b y m a k i n g u s e o f s e t b u i l d e r n otation can be achieved by solving a few examples: C o n s i d e r R , Z a n d Z + where R denotes the real numbers, Z denotes the integers and Z+ the set of positive integers and values range from -1 to 4 . It is required to depict the same through a number line. a. { x∈ R | -1 < x < 4, x ∈ Z | -1 < x < 4, x ∈ Z+ | -1 < x < 4 } Solution: So the solution sets are as follows: R = { 0,1,2,3}, Z = { 0,1,2,3} and Z+ = { 1,2,3} Subsets: A is a subset of B written A⊆ B, when every element of A is also an element of B. In other words A ⊆ B means that for all elements x, if x belongs to A then x also belongs to B written as if x ∈ A then x ∈ B. If A is a subset of B and B is not a subset of A then there exists at least one element in B that is not in A. This is represented as follows that there is at least one element x such that x ∈ B and x ∉ A. This type of set is also known as proper subset. Example 4: Subsets: Let A = {Set of whole numbers, B = {n ∈ W | 0 ≤ n ≤ 100}, and C = {40, 50, 60, 70, 80,120}. Evaluate the truth and falsity of each of the following statements. a. B ⊆A- True b. C is a proper subset of A - True
2 3 3 (For real numbers and integers 2 1 0 munotes.in

Page 7

7 c. C and B have at least one element in common - True d. C ⊆ B - False 120 is not in B e. C ⊆ C True because every element in C is also in C and every set is a s u b s e t o f i t s e l f . Example 5: Distinction between ∈ and ⊆ True or False a. 6∈ {4, 6, 9} -True b. {2} ∈ {1, 2, 3} - False It should have been {1, {2}, 3} c. 6⊆ {4, 6, 9} False as 6 has to be a set in itself d. {6}⊆{4, 6, 9} True e. 6 ⊆ {{4},{6},{9}} f. {6} ∈ {{4},{6}} True Cartesian Products: B e f o r e d e f i n i n g C a r t e s i a n p r o d u c t s i t i s m a n d a t o r y t o n o t e a n d understand ordered pairs. Given elements a and b, the representation (a, b) denotes the ordered pair where a is the first element of the pair and b is the second element. Two ordered pairs (a, b) and (c, d) are said to be equal if, and only if, a = c and b = d. This is represented as (a, b) = (c, d) means that a = c and b = d. Cartesian Product: This can now be defined as follows: Given sets A and B the Cartesian product of A and B denoted as AxB is the set of ordered pairs(a,b) where a is in A and b is in B. Symbolically: A × B = {(a, b)| a ∈ A and b ∈ B}. 1.3 RELATIONS AND FUNCTIONS Let P and Q be two sets. A relation R from P to Q is typically a subset of P × Q. An ordered pair (m, n) in P × Q, where m is related to n by relation R, written m R n, if, and only if (m, n) is in R. The set P is called the domain of R and the set Q is called its co-domain.The relation R is represented by (m,n) ∈ R. and when m is not in relation with n then it is written as m,n∉ R. Example 7: Let P = {8, 9} and B = {8,9,10} and define a relation R from P to Q as follows: Given any (m, n) ∈ P × Q, means that m – n/2 is an integer. a. State the ordered pairs are in P × Q and which are in R. b. Is 8 R 10? Is 9 R 10? Is 9 R 9? munotes.in

Page 8

8 c. What are the domain and co-domain of R? Solution: a. P x Q= {(8, 8), (8, 9), (8, 10), (9, 8), (9, 9), ( 9 , 1 0 ) } . T o d e t e r m i n e explicitly the composition of R, examine each ordered pair in P × Q to see whether its elements satisfy the defining condition for R. (8, 8) ∈ R because 8−8/2 = 0/2 = 0, which is an integer. (8, 9) ∉ R because 8−9/2 = −1/2, which is not an integer. (8, 10) ∈ R because 8−10/2 = −2/2 = −1, which is an integer. (9, 8) ∉ R because 9−8/2 = 1/2, which is not an integer. (9, 9) ∈ R because 9−9/ 2 = 0/2 = 0, which is an integer. (9, 10) ∉ R because 9−10/ 2 = −1/ 2 , which is not an integer. Thus a) R = {(8,8) (8, 10), (9, 9)} b) Yes, 8 R 10 because (8, 10) ∈ R. No, 9 R 10 because (2, 3) ∉ R. Yes, 9 R 9 because (9, 9) ∈ R. c) The domain of R is {8, 9} and the co-domain is {8, 9, 10}. Representation of relation through a diagram: Let R be a relation from a set P to a set Q. A diagram representing the relationship is obtained as follows: a. The elements of P are represented as points in one region and the elements of Q in another region. b. For each m in P and n in Q , an arrow has to be drawn from m to n if, and only if, m is related to n by R. Example 8: Let P = {7, 8, 9} and B = {8, 9, 10} and define relations S and T from P to Q as follows: For all (m, n) ∈ P × Q, (m, n) ∈ S means that m < n. S is a “less than” relation. T = {(7, 8), (7, 9)}. Draw arrow diagrams for S and T . Solution: S.T. munotes.in

Page 9

9 From every element in a set, based on a condition we can show single or multiple relationships within elements of two different sets using the arrow diagram. Functions: A function F from a set P to a set Q is a relation with domain P and co-domain Q that satisfies the two essential properties: a. Each element m in P has a corresponding element n in Q such that (m, n) ∈ F. b. For all elements m in P and n in Q if (m,n) ∈ F and (m,o) ∈ F then n = o. In other words a relation P to Q is a function if an only if every element of P is the first element of an ordered pair of the function F and no two distinct ordered pair have the same first element. More precisely, if F is a function from a set P to a set Q, by property (1) there is at least one element of Q that is related to m by F and by property (2) there is at most one such element. Here if the element of P is referred to as x then the corresponding element in Q is referred as F(x) 1.4 SUBSETS – PROOF OF THE CONCEPT In this section the incorporation of the previously d i s c u s s e d universal conditional statement to formally represent the concept of subsets is shown below: P⊆ Q⇔∀m, if m∈ P then m∈ Q The negation is, therefore, existential P ⊆ Q ⇔∃ m such that m ∈ P and m ∉ Q A proper subset of a set is a subset that does not have at least one element of the original set. Thus P is a proper subset of Q⇔ P⊆ Q and there is at least one element in Q that is not in P.
munotes.in

Page 10

10 Example 10: Let P = {5} and B = {5,{5}}. a. Is P⊆ Q? b. P a proper subset of Q Solution: a. Yes P is a subset of Q. P has an element from the set of elements present in Q b. P is also a proper subsetof Q because there exists at least one element in Q that is not in P. A method of direct proof can be used to show one set is a subset of the other using the concept of element argument. Element Argument: This is a method for proving that a set is the subset of another. Given X and Y. To prove that X ⊆ Y a. suppose that m is a particular but arbitrarily chosen element of P b. m has to be an element of Q . Proving and Disproving Subset Relations: Define sets P and Q as follows P = {m ∈ Z| m = 6a + 12 for some a∈ Z} Q = {n ∈ Z | n = 2b for some b∈ Z}. a. To prove that P ⊆ Q b. Q⇔ P⊆ Q (To prove that it is a proper subset) c. Disprove that Q⊆ P. Solution: a. Suppose m is randomly chosen from the set P. We have to prove that m belongs to Q as well. So P constitutes of elements as follows: {18, 24,30,36…..} since Z is a set of integers. The “a” s of the set are {1,2, 3……}. The “b’s “ of the set are {1,2,3…..} and n =2b i.e. 2,4,6,8,10,12,14, 16,18,20, 22,24,26, 28,……}. Hence every elements of P is in Q i.e. P ⊆ Q. b. To prove that P is a proper subset of Q which means that an element of Q is not in P. As can be seen that set Q is a set of all even numbers and the equation represented in set P is seen it to b e i n a r i t h m e t i c progression with a common difference “d” of 6. Hence the set P will not constitute of all even numbers as even numbers grow in a series munotes.in

Page 11

11 with a common difference “d” of 2. Hence it is proved that it is a proper subset of Q. c. To disprove the above statement and show that Q is not a subset of P we assume that there exist an integer m =2 such that m ∈ Q because 2 = 2 *1.But m does not belong to P as there is no integer “a” such that 2= 6a + 12. For if there were such an integer, then 6a + 12 = 2by assumption 3a + 4 = 1 by reduction a= -1 which is not an integer Hence P cannot be a subset of set Q. Set Equality: Sets P and Q are said to be equal if, and only if, they have exactly the same number of elements. The definition can still be formulated using the set language. Let there be two sets P and Q. It is said that they are equal if every element of set P is in set Q and vice versa represented as P = Q⇔ P⊆ Q and Q⊆ P. Example 11Set Equality: Define sets P and Q as follows P = {m ∈ Z | m = 2a for some integer a} Q = {n ∈ Z | n = 2b − 2 for some integer b} To prove P = Q There exist an element in P that is in Q. Let x be the element. Then x should necessarily be equal to 2a. To be equal the set Q should be represented by x. In other words x should be = 2b – 2. So 2a = 2b – 2 or b = a+1. Substituting in the equation of Q i.e. 2b -2 x = 2b – 2 = 2(a+1)-2 = 2a. So x which represents set Q also represents set P and both are stated to be equal. Whether x is an integer then the proof is as follows: since b= a + 1 and a being an integer as defined b is also represented as sum of integer i.e. (a+1). So x = 2b +2 is also an integer. munotes.in

Page 12

12 Set Operations: Union of sets: Let P and Q be the subsets of a universal set U. The union of P and Q is the setdenoted by P U Q such that the s e t c o n t a i n s a l l elements those which either belong to P or to Q. Intersection of sets: Represented by P ∩ Q this set constitutes of elements that are common to bothP and Q Complement of a Set: The complement of P denoted by Pc is the set of all elements of a Universal set that are not in A. Difference of sets: The difference of sets Q minus P denoted by Q − P, is the set of all elements that are in Q but not in P. Represented through notations the above operations are as follows: P∪ Q = {m∈ U | m ∈ P or m∈ Q} P ∩ Q={m ∈ U | m∈ P and m∈ Q} Q – P or Q/p = {x ∈ U | x ∈ Q and x ∉ P}, Pc or P = {x ∈ U | x ∉ P}. Here the above symbols are commonly used set theory s y m b o l s introduced in 1889 by the Italian mathematician G Peano.Venn diagrams embody mathematical or logical sets pictorially as circles enclosed within rectangles (the universal set U), and the common elements of the sets being represented by intersections of the circles. Example 12: Unions, Intersections, Differences, and Complements Let the universal set be U = {m, n, o, p, q} and let P = {m,n,p,q} and Q = {n, o, p, q}. Find P∪ Q, P ∩ Q, P − Q, and Pc. Solution: P ∪ Q = {m. n, o, p, q} P ∩ Q = {m.n,p, q} Q - P = {o} Pc = {} A notation for subsets of real numbers that are intervals Given real numbers m and n with
munotes.in

Page 13

13 m ≤ n: (m, n) = {y∈ R | m < y < n} [m, n]={y ∈ R | m ≤ y ≤ n} (m,n)=n{y ∈ R | m < y ≤ n} [a, b) = {y∈ R | m ≤ y ≤ n} Unbounded intervals are shown using ∞ a n d −∞ a r e u s e d t o i n d i c a t e intervals that are unbounded either on the right or on the left (m,∞) = {y ∈ R | y> m} [m, ∞]= {y∈ R | y≥ m} (−∞, n) = {y∈ R | y < n} [−∞, n) = {y∈ R | y ≤ n} Example 13 Using Intervals (Real Numbers): U = Set R of all real numbers P = (−1, 0) ={y∈ R | −1< y≤ 0} and Q = [0, 1) = {y∈ R | 0 ≤ y ≤ 1}. Represented by shaded region is the above relation Find Find P∪ Q, P ∩ Q, Q − P, and Pc Solution: P∪ Q = {y∈ R | y∈ (−1, 0] OR y∈ [0, 1)}={y∈ R | y∈ (−1, 1)} = { (-1,0) ∪ (0,1)} = (-1,1) P ∩ Q = {y∈ R | y∈ (−1, 0] AND y∈ [0, 1)}={(-1,0) ∩(0,1) = 0} Q – P = {y∈R | y∈ [0, 1) and y∉(−1, 0]} = {y∈ R | 0< y<= 1} = {1} Pc = {y∈ R | y∉ (−1, 0]} The Empty Set: Empty sets are otherwise known as the null sets and d e n o t e d b y∅. For example if we take { 3,4 } ∩ {2,5} then it is = ∅ Example 14 Set S = {y ∈ R | 5< y < 3}. Solution: Such an element does not exist hence the set is an empty set Partitions of Sets: The applications of Set Theory require that a set can be partitioned into a number of disjoint sets which is otherwise known as partitioning and the sets constitute of the disjoint sets. Such a division is called a partition. Two disjoint sets have no element in common. When sets are disjoint with no overlaps then sets are said to be disjoint as shown
munotes.in

Page 14

14 Sets P and Q are disjoint ⇔ P ∩ Q = ∅. Example 15 : Disjoint Sets Let P = {9, 3, 2} and B = {1, 4, 8}. Prove that P and Q are disjoint Solution : Since these two sets have no element in common they a r e s a i d t o b e disjoint {9, 3, 2}∩{1, 4, 8}=∅. Pairwise Disjoint Sets : P1, P2, P3 ... are pairwise disjoint or non-overlapping if, and only if, no two sets Pi and Pj with distinct subscripts have any element in common i.e. Pi ∩ Pj = ∅ where i,j = 1,2,3……….. Example 16 Mutually Disjoint Sets: a. Let P1 = { 1 , 3 , 5 } , P2 = { 1 , 5 , 6 } , a n d P3 = { 2 } . A r e P1, P2, and P3 mutually disjoint? b. Let P1 = {2, 5, 8}, P2 = {3, 7}, and P3 = {6, 8}. Are P1, P2, and P3 mutually disjoint? Solution: a. P1 a n d P2 h a v e { 1 , 5 } a s c o m m o n e l e m e n t s , P1 a n d P3 h a v e n o elements and P2 and P3 have no elements common. Hence P1 and P3 and P2 and P3 are mutually disjoint. b. P1 and P2 have no elements in common and P1 and P3 have common element {8}. P2 and P3 are mutually disjoint. Partition: P1, P2 , P3 and P4 if mutually disjoint can also act as partitions for the total set P and P can be written as P = P1∪P2 ∪, P3∪ P4 and is represented in the following manner. Partition of P is a collection of finite or infinite collection of nonempty sets P1, P2 ,P3 and P4 and
munotes.in

Page 15

15 a. P is the union of Pi’s. b. P1, P2 , P3 and P4 are all mutually disjoint Example 17 Partitions of Sets a. Let P = {1, 2, 3, 4, 5, 6}, P1 = {1, 2}, P2 = {3, 4}, and P3 = {5, 6}. Is {P1, P2, P3} a partition of P? Solution: a. P = P1∪ P2∪ P3 and the sets are mutually disjoint b. Let S = { Set of all integers} P1 = {n ∈ S| m = 5n, for some integer n}, P2 = {n∈ S| m = 5n + 1, for some integer n}, P3 = {n ∈ S| m = 5n + 2, for some integer n}. Is { P1 , P2 ,P3} a partition of P? Yes the sets are disjoint and no two sets have any common elements in them because the remainders 0, 1, 2 added to the e q u a t i o n s g i v e different values of m each time. For example for 5n ( n = 1 , 2 , 3 , 4 ) i . e . 5,10,15 20 …… the remainders are 0 in each case. For example for 5n + 1 (n = 1,2,3,4) i.e. 6,11,16,21 the remainders are 1 in each case. For 5n+2 (n = 1,2,3,4) i.e.7,12,17,22 the remainders are 2 in each case. Power Sets: The power set of B, denoted P (B), is the set of all subsets of B Example 18 Power Set Find the power set of the set {m, n}. That is, find P ({m, n}). Solution P({m,n}) = { ∅,{m},{n},{m,n}} Cartesian Products (additional): An ordered 2-tuple deduced from a cartesian product of two sets is an ordered pair representation, and so is an ordered 3-tuple also called an ordered triple. Two ordered n-tuples are equal if, and only if a1 = b1, a2 = b2 ….an = bn Symbolically represented as (a1, b1) = (a2, b2) ⇔ a1 = a2 and b1 = b2. 1.5 PROPERTIES OF SET Some subset relations are represented as follows: Intersection : For all sets P and Q (a) P ∩ Q⊆ P and (b) P ∩ Q ⊆ Q munotes.in

Page 16

16 Union : For all sets P and Q, (a) P ⊆ P∪ Q and (b) Q⊆ P∪ Q Property of Transitivity: For all sets P, Q, and R, if P⊆ Q and Q⊆ R, then P⊆R Procedural Versions of Set Definitions Let P and Q be subsets of a universal set U and suppose p and q are elements of U. a. p∈ P∪ Q⇔ p∈ P or q∈ Q b. p ∈ P ∩ Q⇔ p∈ P and q∈ Q c. p∈ P – Q ⇔ p∈ P and p ∉Q d. p∈ Pc⇔ p∉P e. (p, q) ∈ P × Q⇔ p∈ P and q∈Q Set Identities : for all p An identity is an equation that is universally true for all elements in some set. For example, p + q = q + p is an identity for real numbers and q. The set identities are equations that are true for all sets in some universal set. Set Identities Consider the universal set U and the following identities as represented Commutative Laws : For all sets P and Q (a) P∪ Q= Q∪ P and (b) P ∩ Q = Q ∩ P. 2. Associative Laws: For all sets P, Q, and R, (a) (P∪ Q) ∪ R = P∪ (Q∪ R) and (b) (P ∩ Q) ∩ R = P ∩ (Q ∩ R). 3. Distributive Laws : For all sets, P, Q, and R (a) P∪ (Q ∩ R) = (P∪ Q) ∩ (P∪ R) and (b) P∩ (Q∪ R) = (P ∩ Q) ∪ (P ∩ R). 4. Identity Laws: For all sets P, (a) P∪∅= P and (b) P ∩ U = P. 5. Complement Laws: (a) P ∪ Pc = U and (b) P ∩ Pc = ∅. 6. Double Complement Law: For all sets P, (Pc) c = P. 7. Idempotent Laws: For all sets P, (a) P∪ P = P and (b) P ∩ P = P. munotes.in

Page 17

17 8. Universal Bound Laws: For all sets P, (a) P∪ U = U and (b) P ∩∅=∅. 9. De Morgan’s Laws:For all sets P and Q, (a) (P∪ Q) c = Pc ∩ Qc and (b) (P ∩ Q) c = Pc∪ Qc 10. Absorption Laws: For all sets P and Q (a) P∪ (P ∩ Q) = P and (b) P ∩ (P∪ Q) = P 11. Complements of U and ∅: (a) Uc= ∅ and (b) ∅c = U 12. Set Difference Law: For all sets P and Q, P − Q = P ∩ Qc Proof of Set Identities : Two sets are said to be equal ⇔ if each is a subset of the other. Let sets P and Q be given. To prove that P = Q we have to do the following : Prove that P⊆ Q Prove that Q⊆ P Example 20 Proof of Distributive Law Prove that for all sets P, Q, and R, P ∪ (Q ∩ R) = (P∪ Q) ∩ (P∪ R) Solution: The two sets are equal if, and only if, each is a subset of the other. Hence, it is essential to prove the following: P∪ (Q ∩ R) ⊆ (P∪ Q) ∩ (P∪ R) and (P∪ Q) ∩ (P∪ R) ⊆ P∪ (Q ∩ R) To prove the above one has to necessarily show that for ∀x, if x ∈ P∪ (Q∩ R) then x ∈ (P∪ Q) ∩ (P∪ R) and also ∀x, if x ∈ (P∪ Q) ∩ (P∪ R) then x ∈ P∪ (Q ∩ R) Suppose P, Q, and R are sets and x be an arbitrary element of P ∪ (Q ∩ R) which means x ∈ P or x ∈(Q ∩ R). If x ∈ P then x necessarily belongs to (P∪ Q) and (P∪ R). Hence x ∈(P∪ Q) ∩ (P∪ R). If x ∈ (Q ∩ R) then x ∈ Q and x ∈ R. Hence x ∈ (P∪Q) and (P ∪R). Therefore P ∪ (Q ∩ R) ⊆ (P∪ Q) ∩ (P∪ R) For reverse inclusion let x ∈(P∪ Q) and x ∈(P∪ R) which means x ∈ P or x ∈ Q and x ∈ P or x ∈ R.If x ∉ P then x need to belong to Q and x need to belong to R i.e. x ∈ (P ∪ Q) and x ∈(P ∪ R) which means x should be both in Q and R. If x ∈ P then x should also belong to P ∪( Q∩ R). Hence (P∪ Q) ∩ (P∪ R)⊆P ∪ (Q ∩ R) munotes.in

Page 18

18 The Empty Set: It is said that a set with no elements is an empty set i.e. if E is a set with no elements and P is any set then E ⊆ P. The above statement can be solved by contradicting it and saying that let E be the empty set having at least one element that is in E and not in P. But since E is an empty set and cannot have any element in it hence the statement to contradict is false and the above statement that E is a subset of P is true. 1.6 PROVING PROPERTY OF SETS USING VENN DIAGRAM To prove that for all sets P,Q,R,(P – Q) ∪ (Q – R) = P - R The property is true if and only if the given equality holds for all sets P,Q and R false otherwise. The following can be proved using Venn Diagram by shading the different regions of the Venn diagram as per the formula given and arrive at the result Shade the region corresponding to (P − Q) ∪ (Q − R) and then shade the region corresponding to P − R. They are not the same . Here take A = P ,B= Q and C = R
(P – Q) ∪ (Q − R)(P – R) Solving the above by taking into considerations sets comprising of numbers further proves that (P − Q) ∪ (Q − R) (P – R)
P – Q = {1, 4},Q-R = {7,2}, P-R = {1,2}
munotes.in

Page 19

19 {P – Q} ∪ {Q – R} = {1,4, 7, 2} {P – R} = {1, 2} Hence they are not equal Power Sets: A set having n elements, has 2n elements in its power set. It can be proved using mathematical induction and is based on t h e f o l l o w i n g observations. P set with n elements has 2n subsets which is known as the Power Set. Basis step :P(0) is true, because the set with cardinality 0 (the empty set) has 1 subset (itself) and 20 = 1. Inductive step: To prove P(k) → P(k+1) That is, prove that if a set with k elements has 2K subsets, then a set with k+1 elements has 2K+1 subsets. Proof: Any set with cardinality k has 2K subsets. Let P be a set such that |P| = k+1. Enumerate the elements of P: P = c1……ck+1. Let S = c1……..ck. Then |S|=k, so S has 2k subsets, and according to theory of mathematical induction P = S ∪ {ck+1}.Hence every subset of S is also a subset of P. Any subset of Pcontains the element ck+1, or it doesn’t contain ck+1. If a subset of P doesn’t contain ck+1, then it is also a subset of S, and there are 2k o f t h o s e s u b s e t s . O n t h e o t h e r h a n d , i f a s u b s e t of P contains the element ck+1, then that subset is formed by including ck+1 in one of the 2k subsets of S, so P has 2k subsets containing ck+1. We have shown that P has 2k subsets containing ck+1 , and another 2k subsets not containing c k+1, so the total number of subsets of P is 2k + 2k = 2k+1 which is of the order of 2k. Proofs for Set Identities: Set Difference: Construct an algebraic proof that for all sets P, Q, and R, (P∪ Q) − R = (P − R) ∪ (Q − R). Solution: Let P, Q and R be any sets. Then = (P U Q) − R = (P U Q) ∩ Rc by the set difference law = Rc∩ (P∪ Q) by the commutative law = (Rc∩ P) ∪ (Rc ∩ Q) by the distributive law = (P ∩ Rc )∪ (Q ∩ Rc ) by the commutative law = (P − R) ∪ (Q− R) by the set difference law. Set Identity Proof Consider sets P and Q P − (P ∩ Q) = P − Q munotes.in

Page 20

20 Solution: Suppose P and Q are sets. Then P − (P ∩ Q) = P ∩ (P ∩ Q) c by the set difference law = P ∩ (Pc ∪Qc) by De Morgan’s laws = (P ∩ Pc )∪ (P ∩ Qc ) by the distributive law =∅∪( P ∩ Qc ) by the complement law = (P ∩ Qc) ∪∅ by the commutative law = P ∩ Qc by the identity law = P – Q by the set difference law. Associative Law Prove that for any sets A1, A2, A3, and A4, ((A1 ∪ A2) ∪ A3) ∪ A4 = A1 ∪ ((A2 ∪ A3) ∪ A4). Solution: Above can be written as (A U B) U C = A U( B UC) where A = A1 ∪ A2 for L.H.S and B = A2 ∪ A3 for R.H.S and solved using associative law. 1.7 BOOLEAN ALGEBRAS, RUSSELL’S PARADOX AND THE HALTING PROBLEM Logical Equivalances Set Properties For all statement variable m,n and p For all sets x,yand z i) m∨n=n∨m ii) m ∧ n=n∧m i) X∪Y=Y=X ii) X∩Y=Y∩X i) m∧n (n∧p)=(m∧n) ∧p ii) m ∨ (n∨p)=(m∨p) ∧p) ∨ p i) (X∪Y) ∪Z=X∪(Y∪Z) ii) (X∩Y) ∪Z=X∩(Y∩Z) i) m∧ (n∨p)=(m∧n) ∨(m∧p ii) m ∨ (n∧p)=(m∨n) ∧(m ∨ p) i) X∩(Y∪Z) (X∩Y) ∪ (X∩Z) ii) X∪(Y∩Z)= (X∪Y) ∩(x∩Z) i) m ∨c=m ii) m ∧t=m i) X∪∅=X ii) X∩U =X i) m ∨∼m=t ii) m ∧∼t=c i) X∪XC = ∪∅ ii) X∩XC=X∅ i) m ∼(∼m)=m i) (XC)C=X i) m∨t=m ii) m ∧C=C∼ i) X∪U=U ii) X∩ ∅ =∅ i) m ∨m=m ii) m ∧m=m i) X∪X=X ii) X∩X=X i) ∼ (m ∨n)=∼m∧∼n ii) ∼(m ∧n)= ∼ m∨∼n i) (X∪ Y)C= XC∩ YC i) (X∩ Y)C= XC∪ YC i) m ∨(m∧n) =m ii) m ∧( m ∨n)=m i) X∪( X∩ Y)=X ii) X∩ (X∪Y) )=X munotes.in

Page 21

21 Boolean Algebra: A Boolean algebra typically constitutes of a set with two operations i.e. + and ·. If p and q are elements of that set then p+q and p·q are in that set and the following properties hold true: Commutative Laws: For all p and q in the set suppose S, (a) p + q = q + p and (b) p ·q = q·p. Associative Laws: For all p, q, and r in S, (a) (p + q) + r = p + (q + r) and (b) (p ·q)·r = p ·(q·r). Distributive Laws: For all p, q, and r in S, (a) p + (q·r) = (p + q)·(p+ r) and (b) p ·(q + r) = (p·q) + (p ·r). Identity Laws: There exist distinct elements 0 and 1 in S such that for all p in S, (a) p + 0 = p and (b) p ·1 = p. Complement Laws: For each p in S, there exists an element in S, denoted p and called the complement or negation of p, such that (a) p + p = 1 and (b) p ·p = 0. Properties of a Boolean Algebra: Uniqueness of the Complement Law: For all p and x in S, if p + x = 1 and p · x = 0 then x = p. Uniqueness of 0 and 1: If there exists x in S such that p + x = p for all p in B, then p = 0, and p· y =p for all p in S, then y = 1. Double Complement Law: For all p∈ S,(p) = p Idempotent Law: For all p∈ S, (a) p + p = p and (b) p·p = p. Universal Bound Law: For all p∈S, (a) p + 1 = 1 and (b) p·0 = 0. De Morgan’s Laws: For all p and q∈S, (a) p + q= p ·q and (b) p ·q = p + q Absorption Laws: For all p and q∈S, (a) (p + q)·p = p and (b) (p·q) + p = p. Complements of 0 and 1: (a) 0 = 1 and (b) 1 = 0. Proof: Uniqueness of the Complement Law: Suppose p and x are particular, but arbitrarily chosen,elements of B that satisfy the following hypothesis: p + x = 1 and p · x = 0. Then munotes.in

Page 22

22 = x = x ·1 because 1 is an identity = x ·(p + p) by the complement law = x ·p + x ·p by the distributive law = p · x + x ·p by the commutative law = 0 + x ·p by hypothesis = p ·p + x ·p by the complement law = (p ·p) + (p· x) by the commutative law for = p·(p + x) by the distributive law = p ·1 by hypothesis = p because 1 is an identity Double Complement Law: Prove that for all elements p in Boolean algebra S,(a) = a. Proof: Suppose S is a Boolean algebra and p is any element of S. Then p + p = p + p by the commutative law = 1 b y t h e c o m p l e m e n t l a w f o r 1 and p ·p = p ·p by the commutative law = 0 b y t h e c o m p l e m e n t l a w f o r 0 . Thus p satisfies the above conditionswith respect to p that are satisfied by the complement of p. From the fact that the complement of p is unique, we conclude that (p) = p. Russell’s Paradox: Russell’s paradox is the most famous set-theoretical paradoxes. Also known as the Russell-Zermeloparadox, it considers that the set of all sets are not members of themselves. Such a set appears to bea member of itself if and only if it is not a member of itself. Hence the paradox. Example S = {S1,S2, S3…}. Hence S is not a member of itself. If S is not a member of itself then S is a member ofitself. S = {{ S}, S1, S2, S3}} Is S an element of itself? The answer is neither yes nor no. For if S ∈ S, then S satisfies the defining property for S. But if S ∉ S, then S is a set such that S ∉ S and so S satisfies the defining property for S, which implies that S ∈ S. Thus neither is S ∈ S nor is S ∉ S, which is a contradiction munotes.in

Page 23

23 The Halting Problem: It is said that a problem statement has initially a binary solution in the form of “Yes” or a “No” where a “Yes “ is a 1 and a “No” is a 0.Examples of such types are as follows: Is the sum o f t w o i n t e g e r s a n integer only or is a number even/odd/prime etc. An algorithm is the execution of a sequence of steps which can conclude o n t h e f o l l o w i n g questions and those which can answer correctly the question asked in a finite time period. The problems which can be solved using algorithms in finite amount of time are said to be the decidable problems whereas those which cannot be are said to be undecidable. Craig Kaplan, Associate Professor, Computer Graphics from University of Waterloo wrote a code as follows to prove the decidability or un-decidability specifically as an adaptation of Turing proof. boolwould_it_stop( char * program, char * input ) { if( something terribly clever ) { return TRUE; } e l s e { return FALSE; } } This program was then given the input as the program itself and this was done using the following code. boolstops_on_self( char * program ) { returnwould_it_stop( program, program ); } He then included an infinite loop in a small program that detects infinite loops as follows: boolbobs_yer_uncle( char * program ) { if(stops_on_self( program ) ) { while( 1 ) {} return FALSE; } else { return TRUE; } } The assumption was that the first algorithm that was written was a solution to the halting problem. That is the first algorithm will terminate after answering whether a program will loop forever o n s p e c i f i c i n p u t s . munotes.in

Page 24

24 Where as “stops_on_self” algorithm conducts two passes where one is to execute the program and second is to provide the same program as an input sequence to the program. Now if stops_on_self” algorithm is true then “boolbobs_yer_uncle” goes into an infinite loop else terminates and returns true. But the paradox is that when the third program i.e. “boolbobs_yer_uncle” is given as an input to itself either it runs for ever or stops and returns true depending on the true and false status of “stops_on_self”. - If bobs_yer_uncle(bobs_yer_uncle ) goes into an infinite loop, it is because stops_on_self( bobs_yer_uncle ) returned TRUE, which means that would_it_stop( bobs_yer_uncle,bobs_yer_uncle ) returned TRUE. But this means that bobs_yer_uncle would stop when feditself as input! This contradicts the assumption that it goes into an infinite loop. − If bobs_yer_uncle( bobs_yer_uncle ) stops and returns TRUE, it's because stops_on_self(bobs_yer_uncle ) returned FALSE, which means that would_it_stop( bobs_yer_uncle,bobs_yer_uncle ) returned FALSE. But this means that bobs_yer_uncle would run forever when f e d i t s e l f a s i n p u t ! T h i s c o n t r a d i c t s t h e a s s u m p t ion that it terminates. S o t h e c o n t r a d i c t i o n i s t h a t b o b s _ y e r _ u n c l e s t o p s if and only if it runs forever. 1.8 LIST OF REFERENCES 1. Discrete Mathematics with Applications by Sussana S. Epp 4th e d i t i o n . 2. Discrete Mathematics Schaums Outline Series 3. Discrete Mathematics and its Applications by Kenneth H. Rosen 4. Discrete Strictures by Liu 1.9 UNIT END EXERCISE 1. Find Products Problem Let A = {4, 5, 6} and B = {a,b}. a. Find A × B b. Find B × A c. Find B × B d. How many elements are in A × B, B × A, and B × B? e. Let R denote the set of all real numbers. Describe R × R. munotes.in

Page 25

25 2. Let P = {8, 4, 6} and Q = {1, 3, 4}. Which of the relations D, E, and F defined below are functions from P to Q? a. D = {(8, 1), (4, 1), (4, 3), (6, 4)} b. For all (m, n) ∈ P × Q, (m, n) ∈ E means that n = m + 1. c. T is defined by the arrow diagram
3. Let A = {m, n}, B = {1, 2, 3}, and C = {y, z}. a. Find A × B. b. Find (A × B) × C c. Find A × B× C *****
munotes.in

Page 26

26 2 THE LOGIC OF COMPOUND STATEMENTS Unit Structure 2.0 Objectives 2.1 Introduction 2.2 Logical Form and Logical Equivalence 2.3 Conditional Statements 2.4 Valid and Invalid Arguments 2.5 Unit End Exercise 2.6 List of References 2.0 OBJECTIVES This chapter would make you understand the following concepts: • Definition Logical Form • Understanding of Logical Equivalence • Compound Statements • Understanding valid and Invalid Arguments • Bi-conditional Statements 2.1 INTRODUCTION Statements: Definition- A statement (or proposition) is a sentence that is true or false but not both. For example, “Two plus three equals five” and “Two plus three equals six” are both statements, the first because it is true and the second because it is false. Compound Statements: We now introduce three symbols that are used to build more complicated logical expressions out of simpler ones. The symbol ~ denotes not, ˄ d e n o t e s a n d , a n d ˅ d e n o t e s o r . G i v e n a s t a t e m e n t p , t h e sentence “~p” is read “not p” or “It is not the case that p” and is called the negation of p. In some computer languages the symbol¬ is used in place munotes.in

Page 27

27 of ~. Given another statement q, the sentence “p ˄q” is read “p and q” and is called the conjunction of p and q. The sentence “p ˅ q” is read “p or q” and is called the disjunction of p and q. 2.2 LOGICAL FORM AND LOGICAL EQUIVALENCE Truth Values: Definition- If p is a statement variable, the negation of p is “not p” or “It is not the case that p” and is denoted as ∼p. It has opposite truth value from p: if p is true, ∼p is false; if p is false, ∼p is true. The truth values for negation are summarized in a truth table. Truth Table for ∼p P ∼P T F F T In ordinary language the sentence “It is hot and it i s s u n n y ” i s understood to be true when both conditions being hot and being sunny are satisfied. If it is hot but not sunny, or sunny but not hot, or neither hot nor sunny, the sentence is understood to be false. The formal definition of truth values for an and statement agrees with this general understanding. Definition: If p and q are statement variables, the conjunction of p and q is “p and q,” denoted p ˄ q. It is true when, and only when, both p and q are true. If either p or q is false, or if both are false, p ˄ q is false. The truth values for conjunction can also be summarized in a truth table. Truth Table for p ˄ q P q p ˄˄˄˄ q T T T T F T F T T F F F Definition: If p and q are statement variables, the disjunction of p and q is “p or q,” denoted p ˅ q. It is true when either p is true, or q is true, or both p and q are true; it is false only when both p and q are false. Here is the truth table for disjunction Truth Table for p ∨ q munotes.in

Page 28

28 p q p ∨ q T T T T F T F T T F F F Example 1 Truth Table for Exclusive Or: Construct the truth table for the statement form (p ˅ q) ˄~(p ˄ q). Note that when or is used in its exclusive sense, the statement “p or q” means “p or q but not both” or “p or q and not both p and q,” which translates into symbols as (p ˅ q) ˄ ~(p ˄ q). Solution: Set up columns labeled p, q, p ∨ q, p ∧ q, ∼(p ∧ q), and (p ∨ q) ∧ ∼(p ∧ q). Fill in the p and q columns with all the logically possible combinations of T’s and F’s. Then use the truth tables for ∨ and ∧ to fill in the p ∨ q and p ∧ q columns with the appropriate truth values. Next fill in the ∼(p ∧ q) column by taking the opposites of the truth values for p ∧ q. For example, the entry for ∼(p ∧ q) in the first row is F because in the first row the truth value of p ∧ q is T. Finally, fill in the (p ∨ q) ∧ ∼(p ∧ q) column by considering the truth table for an and statement together with the computed truth values for p ∨ q and ∼(p ∧ q). For example, the entry in the first row is F because the entry for p ∨ q is T, the entry for ∼(p ∧ q) is F, and an and statement is false unless both components are true. The entry in the second row is T because both components are true in this row. Truth Table for Exclusive Or: ( p ∨ ∨ ∨ ∨ q) ∧ ∼∧ ∼ ∧ ∼∧ ∼( p ∧ ∧ ∧ ∧ q) P Q ( p ∨ ∨ ∨ ∨ q) ( p∧∧∧∧q) ∼∼∼∼( p ∧ ∧ ∧ ∧ q) ( p ∨∨∨∨ q) ∧∧∧∧ ∼∼∼∼( p ∧∧∧∧ q) T T T T F F T F T F T T F T T F T T F F F F T F Example 2 Truth Table for ( p ˄˄˄˄ q) ˅˅˅˅ ~r Construct a truth table for the statement form ( p ˄˄˄˄ q) ˅˅˅˅ ~r Solution: Make columns headed p, q, r, p ∧ q, ∼r, and (p ∧ q) ∨ ∼r. Enter the eight logically possible combinations of truth values for p, q, and r in the three left-most columns. Then fill in the truth values for p ∧ q and for ∼r. Complete the table by considering the truth values for (p ∧ q) and for ∼r and the definition of an or statement. Since an or statement is false only when both components are false, the only rows in which the entry is F are the third, fifth, and seventh rows because those are the only rows in which the expressions p ∧ q and ∼r are both false. The entry for all the other rows is T. munotes.in

Page 29

29 Truth Table for ( p ˄˄˄˄ q) ˅˅˅˅ ~r P q r ( p ˄˄˄˄ q) ~r ( p ˄˄˄˄ q) ˅˅˅˅ ~r T T T T F T T T F T T T T F T F F F T F F F T T F T T F F F F T F F T T F F T F F F F F F F T T Logical Equivalence: Definition: Two statement forms are called logically equivalent if, and only if, they have identical truth values for each possible substitution of statements for their statement variables. The logical equivalence of statement forms P and Q is denoted by writing P ≡ Q. Two statements are called logically equivalent if, and only if, they have logically equivalent forms when identical component statement variables are used to replace identical component statements. Testing Whether Two Statement Forms P and Q Are Logically Equivalent 1. Construct a truth table with one column for the truth values of P and another column for the truth values of Q. 2. Check each combination of truth values of the statement variables to see whether the truth value of P is the same as the truth value of Q. a. If in each row the truth value of P is the same as the truth value of Q, then P and Q are logically equivalent. b. If in some row P has a different truth value from Q, then P and Q are not logically equivalent. Example 3 Negative Property: ~(~p) ≡≡≡≡ p Construct a truth table to show that the negation of the negation of a statement is logically equivalent to the statement. Solution: p ~p ~(~p) T F T F T F In the above truth table p and ~(~p) always have the same truth values, so they are logically equivalent munotes.in

Page 30

30 Example 4 Showing Nonequivalence: Show that the statement forms ~(p ˄ q) and ~p ˄ ~q are not logically equivalent. Solution: By using method of truth table P Q ~p ~q p ˄˄˄˄ q ~(p ˄˄˄˄ q) ~p ˄˄˄˄ ~q T T F F T F F T F F T F T F F T T F F T F F F T T F T T ∼(p ∧ q) and ∼p ∧∼q have different truth values in rows 2 and 3, so they are not logically equivalent. Example 5 Negations of And and Or: De Morgan’s Laws: For the statement “Rahul is tall and Rohit is redheaded” to be true, both components must be true. So for the statement to be false, one or both components must be false. Thus the negation can be written as “Rahul is not tall or Rohit is not redheaded.” In general, the negation of the conjunction of two statements is logically equivalent to the disjunction of their negations. That is, statements of the forms ~(p ˄ q) and ~p ˅ ~q are logically equivalent. Check this using truth tables. Solution: P Q ~p ~q p ˄˄˄˄ q ~(p ˄˄˄˄ q) ~p ˅˅˅˅ ~q T T F F T F F T F F T F T T F T T F F T T T F T T F T T In the above truth table ~ (p ˄ q) and ~p ˅ ~q always have the same truth values, so they are logically equivalent. Symbolically, ~ (p ˄ q) ≡ ~p ˅ ~q. Tautologies and Contradiction Definition- A tautology is a statement form that is always true regardless of the truth values of the individual statements substituted for its statement variables. A statement whose form is a tautology is a tautological statement. A contradiction is a statement form that is always false regardless of the truth values of the individual statements substituted for its statement munotes.in

Page 31

31 variables. A statement whose form is a contradiction is a contradictory statement. According to this definition, the truth of a tautological statement and the falsity of a contradictory statement are due to the logical structure of the statements themselves and are independent of the meanings of the statements. Example 6 Tautologies and Contradictions: Show that the statement form p ˅ ~p is a tautology and that the statement form p ˄~p is a contradiction. Solution: P ~p p ˅˅˅˅ ~p p ˄˄˄˄~p T F T T F T T T In the above truth table in the 3rd c o l u m n a l l t h e v a l u e s a r e T , Hence prove p ˅ ~p is a tautology and 4th c o l u m n a l l t h e v a l u e s a r e F , hence prove p ˄~p is a contradiction. 2.3 CONDITIONAL STATEMENTS Definition: If p and q are statement variables, the conditional of q by p is “If p then q” or “p implies q” and is denoted p → q. It is false when p is true and q is false; otherwise it is true. Truth Table for p → q P q p →→→→ q T T T T F F F T T F F T Example 8 Truth Table for p ∨ ∼q →→→→∼p Construct a truth table for the statement form p ∨ ∼q →∼p Solution: By the order of operations given above, the following two expressions are equivalent: p ∨ ∼q →∼p and (p ∨ (∼q)) → (∼p), and this order governs the construction of the truth table. First fill in the four possible combinations of truth values for p and q, and then enter the truth values for ∼p and ∼q using the definition of negation. Next fill in the p ∨ ∼q column using the definition of ∨. Finally, fill in the p ∨ ∼q →∼p column using the definition of →. The only rows in which the hypothesis p munotes.in

Page 32

32 ∨ ∼q is true and the conclusion ∼p is false are the first and second rows. So you put F’s in those two rows and T’s in the other two rows. p qqqq ∼∼∼∼p ∼∼∼∼q p ∨ ∼∨ ∼ ∨ ∼∨ ∼q p ∨ ∼∨ ∼ ∨ ∼∨ ∼q →∼→∼ →∼→∼p T T F F T F T F F T T F F T T F F T F F T T T T Logical Equivalences Involving →→→→ Imagine that you are trying to solve a problem involving three statements: p, q, and r. suppose you know that the truth of r follows from the truth of p and also that the truth of r follows from the truth of q. Then no matter whether p or q is the case, the truth of r must follow. The division in to cases method of analysis is based on this idea. Example 9 Division into Cases p ˅˅˅˅ q →→→→ r ≡≡≡≡ ( p →→→→ r) ˄˄˄˄ (q →→→→ r) Use truth tables to show the logical equivalence of the statement forms p ∨ q → r and (p → r) ∧ (q → r). Solution: First fill in the eight possible combinations of truth values for p, q, and r. Then fill in the columns for p ∨ q, p → r, and q → r using the definitions of or and if-then. For instance, the p → r column has F’s in the second and fourth rows because these are the rows in which p is true and q is false. Next fill in the p ∨ q → r column using the definition of if-then. The rows in which the hypothesis p ∨ q is true and the conclusion r is false are the second, fourth, and sixth. So F’s go in these rows and T’s in all the others. The complete table shows that p ∨ q → r and (p → r) ∧ (q → r) have the same truth values for each combination of truth values of p, q, and r. Hence the two statement forms are logically equivalent. P q R p ∨ ∨ ∨ ∨ q p →→→→ r q →→→→ r p ∨ ∨ ∨ ∨ q →→→→ r (p →→→→ r) ∧ ∧ ∧ ∧ (q →→→→ r) T T T T T T T T T T F T F F F F T F T T T T T T T F F T F T F F F T T T T T T T F T F T T F F F F F T F T T T T F F F F T T T T p ∨ q → r and (p → r) ∧ (q → r) always have the same truth values, so they are logically equivalent. Hence proof p ∨ q → r ≡ ( p → r) ∧ (q → r) munotes.in

Page 33

33 Bi-conditional Statements: Definition: Given statement variables p and q, the bi-conditional of p and q is “p if, and only if, q” and is denoted p ↔ q. It is true if both p and q have the same truth values and is false if p and q have opposite truth values. The words if and only if are sometimes abbreviated iff. The biconditional has the following truth table: Truth Table for p ↔ q P q p ↔↔↔↔ q T T T T F F F T F F F T In order of operations ↔ is coequal with →. As with ∧ and ∨, the only way to indicate precedence between them is to use parentheses. The full hierarchy of operations for the five logical operators is as follows. Order of Operations for Logical Operators 1. ~ Evaluate negations first. 2. ˄, ˅ Evaluate ˄ and ˅ second. When both are present, parentheses may be needed. 3. →, ↔ Evaluate → and ↔ third. When both are present, parentheses may be needed. According to the separate definitions of if and only if, saying “p if, and only if, q” should mean the same as saying both “p if q” and “p only if q.” The following annotated truth table shows that this is the case: Truth Table Showing that p ↔ q ≡ ( p → q) ˄ (q → p) P q p ↔↔↔↔ q q →→→→ p p →→→→ q ( p →→→→ q) ˄˄˄˄ (q →→→→ p) T T T T T T T F F T F F F T T F F F F F T T T T In the above truth table p ↔ q and (p → q) ∧ (q → p) always have the same truth values, so they are logically equivalent. 2.4 VALID AND INVALID ARGUMENTS Definition: An argument is a sequence of statements, and an argument form is a sequence of statement forms. All statements in an argument and all statement forms in an argument form, except for t h e f i n a l o n e , a r e called premises (or assumptions or hypotheses). The f i n a l s t a t e m e n t o r statement form is called the conclusion. The symbol ∴, which is read munotes.in

Page 34

34 “therefore,” is normally placed just before the conclusion. To say that an argument form is valid means that no matter what particular statements are substituted for the statement variables in its premises, if the resulting premises are all true, then the conclusion is also true. To say that an argument is valid means that its form is valid. Testing an Argument Form for Validity 1. Identify the premises and conclusion of the argument form. 2. Construct a truth table showing the truth values o f a l l t h e p r e m i s e s and the conclusion. 3. A row of the truth table in which all the premises are true is called a critical row. If there is a critical row in which the conclusion is false, then it is possible for an argument of the given form to have true premises and a false conclusion, and so the argument form is invalid. If the conclusion in every critical row is true, then the argument form is valid. Example 10 Determining Validity or Invalidity: Determine whether the following argument form is valid or invalid by drawing a truth table, indicating which columns represent the premises and which represent the conclusion, and annotating the table with a sentence of explanation. When you fill in the table, you only need to indicate the truth values for the conclusion in the r o w s w h e r e a l l t h e premises are true (the critical rows) because the truth values of the conclusion in the other rows are irrelevant to the validity or invalidity of the argument p → q ∨ ∼r q → p ∧ r ∴ p → r Solution: 1 2 3 4 5 6 7 8 9 p q r ∼r q ∨ ∼r p ∧ r p → q ∨ ∼r q → p ∧ r p → r T T T F T T T T T T T F T T F T F T F T F F T F T T F F T T F T T F F T T F T F T F F T F T F T F F F F T F F F T T T F F F T T F T T T In the above truth table column number (7) & column number (8) are the premises and column number (9) is the conclusion. munotes.in

Page 35

35 In above truth table row number (4) shows that an argument of this form can have true premises and a false conclusion. Hence this form of argument is invalid. Example 11 An Invalid Argument with True Premises and a True Conclusion: The argument below is invalid by the converse error, but it has a true conclusion. If New York is a big city, then New York has tall buildings. New York has tall buildings. ∴ New York is a big city. Definition: An argument is called sound if, and only if, it is valid and all its premises are true. An argument that is not sound is called unsound. Contradictions and Valid Arguments: The concept of logical contradiction can be used to make inferences through a technique of reasoning called the contradiction rule. Suppose p is some statement whose truth you wish to deduce. Contradiction Rule: If you can show that the supposition that statement p i s f a l s e l e a d s logically to a contradiction, then you can conclude that p is true 2.5 LIST OF REFERENCES 1. Discrete Mathematics with Applications by Sussana S. Epp 4th edition. 2. Discrete Mathematics Schaums Outline Series 3. Discrete Mathematics and its Applications by Kenneth H. Rosen 4. Discrete Strictures by Liu 2.6 UNIT END EXERCISE 1. Logical Equivalence Involving Tautologies and Contradictions If t is a tautology and c is a contradiction, show that p ˄ t ≡ p and p ˄ c ≡ c 2. Example 12 Contradiction Rule Show that the following argument form is valid: ∼p → c, where c is a contradiction ∴ p ***** munotes.in

Page 36

36 Unit II 3 QUANTIFIED STATEMENTS Unit Structure 3.0 Objectives 3.1 Introduction 3.2 Predicates and Quantified Statements 3.3 Statements with Multiple Quantifiers 3.4 Arguments with Quantified Statements 3.5 List of References 3.6 Unit End Exercises 3.0 OBJECTIVES This chapter would make you understand the following concepts: • Definition of Predicates and Quantified Statements, • The Universal Quantifier: ∀ • Existential Quantifier: ∃ • Equivalent Forms of Universal and Existential Statements • Truth of a ∃∀ Statement in a Tarski World • Quantifier Order in a Tarski World • Validity of Arguments with Quantified Statements 3.1 INTRODUCTION We have seen that the symbols ∧, ∨, ∼, ⇒ a n d ⇔ c a n g u i d e t h e logical flow of algorithms. We have learned how to use them to deconstruct many English sentences into a symbolic form. We have studied how this symbolic form can help us understand the logical structure of sentences and how different sentences may actually have the same meaning (as in logical equivalence). This will b e p a r t i c u l a r l y significant as we begin proving theorems in the next chapter. But these logical symbols alone are not powerful enough to capture the full meaning of every statement. To see why, imagine that we are dealing with some set munotes.in

Page 37

37 S = { x1, x2, x3,...} of integers. (For emphasis, say S is an infinite set.) Suppose we want to express the statement “Every element of S is odd.” We would have to write P(x1)∧ P(x2)∧ P(x3)∧ P(x4)∧··· , where P(x) is the open sentence “x is odd.” And if we wanted the express “There is at least one element of S that is odd,” we’d have to write P(x1)∨ P(x2)∨ P(x3)∨ P(x4)∨··· . The problem is that these expressions might never end. To overcome this defect, we will introduce two new symbols ∀ and ∃. The symbol ∀ stands for the phrase “for all” and ∃ stands for “there exists.” Thus the statement “Every element of S is odd.” is written symbolically as ∀x ∈ S,P(x), and “There is at least one element of S that is odd,” is written succinctly as ∃x ∈ S,P(x), These new symbols are called quantifiers. 3.2 PREDICATES AND QUANTIFIED STATEMENTS In Chapter 2 we discussed the logical analysis of compound statements—those made of simple statements joined by the connectives ~, ˄, ˅, →, and ↔. Such analysis casts light on many aspects of human reasoning, but it cannot be used to determine validity in the majority of everyday and mathematical situations. We discussed earlier that the sentence ‘‘She is a college Student’’ is not a statement, because we don’t know who ‘‘she’’ is. The sentence could be true or false depending on the value of the pronoun ‘‘she.’’ Similarly, the sentence ‘‘x + y ≥ 0’’ is not a statement, since the truth of the sentence depends on the value of x and y. We are going to use the word ‘‘predicate to talk’’ about sentences with variables. Definition: A predicate is a sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variables. The domain of a predicate variable is the set of all values that may be substituted in place of the variable Here is example of predicate: ‘‘x 2 > 2x.’’ This is a not statement yet, but when you put a specific number for x, we do get a statement. Let’s let P(x) denote this predicate. munotes.in

Page 38

38 Lets plug in a few values of x to see if we get true or false statements. P(2) : 22 > 2(2), or 4 > 4. False P(3) : 32 > 2(3), or 9 > 6. True The truth set of a predicate is the set of numbers that make the predicate true. We must always specify a ‘‘domain’’ of the predicate – that’s the set from which we may plug in values into the predicate variable. Example 3.2.1: let Q(n) be the predicate ‘‘n has no common factors (other than 1) with 12’’ Find the truth set of Q(n) if its d o m a i n i s {1,2,3,…..,11,12}. Solution: The truth set is {1,5,7,11}. Since all other natural numbers less than or equal to 12 will have a common factor (other than 1) with 12. For example 8 and 12 have the common factor 4. What if we change the domain to {1,2,3,….,23,24}? Now there are more numbers that will not have a common factor (other than 1) with 12. Now the answer will be {1,5,7,11,13,17,19,23}. You should check this answer. It’s important to keep in mind that the truth set of a predicate depends on the domain of predicate variable. The Universal Quantifier: ∀∀∀∀ Let Q(x) be a predicate and D the domain of x. A universal statement is a statement of the form ‘‘∀x ∈ D, Q(x).’’ It is defined to be true if, and only if, Q(x) is true for every x in D. It is defined to be false if, and only if, Q(x) is false for at least one x in D. A value for x for which Q(x) is false is called a counterexample to the universal statement. Example 3.2.2: Truth and Falsity of Universal Statements a. Let D = {1, 2, 3, 4, 5}, and consider the statement ∀x ∈ D, x2 ≥ x. Show that this statement is true. b. Consider the statement ∀x ∈ R, x2 ≥ x . F i n d a c o u n t e r e x a m p l e t o show that this statement is false. Solution: a. Check that ‘‘x 2 ≥ x’’ is true for each individual x in D. 12 ≥ 1, 22 ≥ 2, 32 ≥ 3, 42 ≥ 4, 52 ≥ 5 Hence ‘‘∀x ∈ D, x 2 ≥ x’’ is true b. Counterexample: Take x =1/2. Then x is in R (since 1/2 is a real number) and Hence ‘‘∀x ∈ R, x 2 ≥ x’’is false.
munotes.in

Page 39

39 The Existential Quantifier: ∃∃∃∃ The symbol ∃ d e n o t e s ‘ ‘ t h e r e e x i s t s ’ ’ a n d i s c a l l e d t h e e x i s t e n tial quantifier. For example, the sentence ‘‘There is a student in Math 140’’ can be written as ∃ a person p such that p is a student in Math 140 Definition: Let Q(x) be a predicate and D the domain of x. An existential statement is a statement of the form ‘‘∃x ∈ D such that Q(x).’’ It is defined to be true if, and only if, Q(x) is true for at least one x in D. It is false if, and only if, Q(x) is false for all x in D. Example 3.2.3 Truth and Falsity of Existential Statements: a. Consider the statement ∃m ∈ Z+ such that m2 = m. S h o w t h a t t h i s s t a t e m e n t i s t r u e b. Let E = {5, 6, 7, 8} and consider the statement ∃m ∈ E such that m2 = m. S h o w t h a t t h i s s t a t e m e n t i s f a l s e Solution: a. Observe that 12 = 1. Thus ‘‘m2 = m’’ is true for at least one integer m. Hence ‘‘∃ m ∈ Z such that m2 = m’’ is true. b. Note that m2 = m is not true for any integers m from 5 through 8: 52 = 25 ≠ 5, 62 = 36 ≠ 6, 72 = 49 ≠ 7, 82 = 64 ≠8. Thus ‘‘∃m ∈ E such that m2 = m’’ is false. Example 3.2.4: Translating from Formal to Informal Language: Rewrite the following formal statements in a variety of equivalent but more informal ways. Do not use the symbol ∀ or ∃. a. ∀x ∈ R, x2 ≥ 0. b. ∀x ∈ R, x 2 ≠−1. c. ∃m ∈ Z+ such that m2 = m. Solution: a. All real numbers have nonnegative squares. Or: Every real number has a nonnegative square. Or: Any real number has a nonnegative square. Or: The square of each real number is nonnegative Note : The singular noun is used to refer to the domain when the ∀ symbol is translated as every, any, or each. b. All real numbers have squares that are not equal to −1. munotes.in

Page 40

40 O r : N o r e a l n u m b e r s h a v e s q u a r e s e q u a l t o −1. (The words none are or no ... are are equivalent to the words all are not.) c. There is a positive integer whose square is equal to itself. O r : W e c a n f i n d a t l e a s t o n e p o s i t i v e i n t e g e r e q u al to its own square. Or: Some positive integer equals its own square. Or: Some positive integers equal their own squares. Universal Conditional Statements: A reasonable argument can be made that the most important form of statement in mathematics is the universal conditional statement: ∀x, if P(x) then Q(x). Familiarity with statements of this form is essential if you are to learn to speak mathematics. Example 3.2.5: Writing Universal Conditional Statements Informally Rewrite the following statement informally, without q u a n t i f i e r s o r variables. ∀x ∈ R, if x > 2 then x 2 > 4. Solution: If a real number is greater than 2 then its square is greater than 4. Or: Whenever a real number is greater than 2, its square is greater than 4. Or: The square of any real number greater than 2 is greater than 4. Or: The squares of all real numbers greater than 2 are greater than 4. Equivalent Forms of Universal and Existential Statements: Observe that the two statements ‘‘∀ real numbers x, if x is an integer then x is rational’’ and ‘‘∀ integers x, x is rational’’mean the same thing. Both have informal translations ‘‘All integers are rational.’’ In fact, a statement of the form ∀x ∈ U, if P(x) then Q(x) can always be rewritten in the form ∀x ∈ D, Q(x) by narrowing U to be the domain D consisting of all values of the variable x that make P(x) true. Conversely, a statement of the form ∀x ∈ D, Q(x) can be rewritten as ∀x, if x is in D then Q(x). Negations of Quantified Statements: Consider the statement ‘‘All mathematicians wear glasses.’’ Many people would say that its negation is ‘‘No mathematicians wear glasses,’’ munotes.in

Page 41

41 but if even one mathematician does not wear glasses, then the sweeping statement that all mathematicians wear glasses is false. So a correct negation is ‘‘There is at least one mathematician who does not wear glasses.’’ The general form of the negation of a universal statement follows immediately from the definitions of negation and of the truth values for universal and existential statements Theorem 3.1 Negation of a Universal Statement: The negation of a statement of the form ∀x in D, Q(x) is logically equivalent to a statement of the form ∃x in D such that ∼Q(x). Symbolically, ∼(∀x ∈ D, Q(x)) ≡∃x ∈ D such that ∼Q(x). Thus The negation of a universal statement (‘‘all are’’) is logically equivalent to an existential statement (‘‘some are not’’ or ‘‘there is at least one that is not’’). Theorem 3.2 Negation of an Existential Statement: The negation of a statement of the form ∃x in D such that Q(x) is logically equivalent to a statement of the form ∀x in D, ∼Q(x). Symbolically, ∼(∃x ∈ D such that Q(x)) ≡∀x ∈ D, ∼Q(x). Thus The negation of an existential statement (‘‘some are’’) is logically equivalent to a universal statement (‘‘none are’’ or ‘‘all are not’’). Example 3.2.6 Negating Quantified Statements: Write formal negations for the following statements: a. ∀ primes p, p is odd. b. ∃ a triangle T such that the sum of the angles of T equals 200◦. Solution: a. By applying the rule for the negation of a ∀ statement, you can see t h a t t h e a n s w e r i s ∃ a prime p such that p is not odd. b . By applying the rule for the negation of a ∃ statement, you can see t h a t t h e a n s w e r i s ∀ triangles T, the sum of the angles of T does not e q u a l 2 0 0 Example 3.2.7 Negating Quantified Statements: Rewrite the following statement formally. Then write formal and informal negations. No politicians are honest. munotes.in

Page 42

42 Solution: Formal version : ∀ politicians x, x is not honest. Formal negation : ∃ a politician x such that x is honest. Informal negation : Some politicians are honest 3.3 STATEMENTS WITH MULTIPLE QUANTIFIERS Quantifiers are performed in the order in which the quantifiers occur: Example 3.3.1 Truth of a ∀∃ Statement in a Tarski World Consider the Tarski world shown in Figure Show that the following statement is true in this world: For all triangles x, there is a square y such that x and y have the same color Solution: The statement says that no matter which triangle someone gives you, you will be able to find a square of the same color. There are only three triangles, d, f , and i. The following table shows that for each of these triangles a square of the same color can be found. Given x = Choose y = and check that y is the same color as x. d E yes f or i h or g yes Now consider a statement containing both ∀ and ∃, where the ∃ comes before the ∀: ∃ an x in D such that ∀y in E, x and y satisfy property P(x, y). To show that a statement of this form is true You must find one single element (call it x) in D with the following property: • After you have found your x, someone is allowed to choose any element whatsoever from E. The person challenges you by giving you that element. Call it y. • Your job is to show that your x together with the person’s y satisfy property P(x, y). Note that your x has to work for any y the person gives you; you are not allowed to change your x once you have specified it initially.
munotes.in

Page 43

43 Example 3.3.2 Truth of a ∃∀ Statement in a Tarski World Consider again the Tarski world in Figure Show that the following statement is true: There is a triangle x such that for all circles y, x is to the right of y. Solution: The statement says that you can find a triangle that is to the right of all the circles. Actually, either d or i would work for all of the three circles, a, b, and c, as you can see in the following table Choose x = Then, given y = check that x is to the right of y. d or i A yes B yes C yes Negations of Multiply-Quantified Statements: You can use the same rules to negate multiply-quantified statements that you used to negate simpler quantified statements. Recall that ∼(∀x in D, P(x)) ≡∃x in D such that ∼P(x). and ∼(∃x in D such that P(x)) ≡∀x in D, ∼P(x). We apply these laws to find ∼(∀x in D, ∃y in E such that P(x, y)) by moving in stages from left to right along the sentence. First version of negation: ∃x in D such that ∼(∃y in E such that P(x, y)). Final version of negation: ∃x in D such that ∀y in E, ∼P(x, y). Similarly, to find ∼(∃x in D such that ∀y in E, P(x, y)), we have First version of negation: ∀x in D, ∼(∀y in E, P(x, y)). Final version of negation: ∀x in D, ∃y in E such that ∼P(x, y).
munotes.in

Page 44

44 These facts can be summarized as follows: Negations of Multiply-Quantified Statements: ∼(∀ x in D, ∃y in E such that P(x, y)) ≡∃x in D such that ∀y in E, ∼P(x, y). ∼(∃x in D such that ∀y in E, P(x, y)) ≡∀x in D, ∃y in E such that ∼P(x, y). Example 3.3.3 Interpreting Multiply-Quantified∗ Statements: A college cafeteria line has four stations: salads, m a i n c o u r s e s , desserts, and beverages. The salad station offers a choice of green salad or fruit salad; the main course station offers spaghetti or fish; the dessert station offers pie or cake; and the beverage station offers milk, soda, or coffee. Three students, Uta, Tim, and Yuen, go through the line and make the following choices: Uta : green salad, spaghetti, pie, milk Tim : fruit salad, fish, pie, cake, milk, coffee Yuen : spaghetti, fish, pie, soda These choices are illustrated in Figure
Write each of following statements informally and find its truth value. a. ∃ an item I such that ∀ students S, S chose I. b. ∃ a student S such that ∀ items I, S chose I. c. ∃ a student S such that ∀ stations Z, ∃ an item I in Z such that S chose I. d. ∀ students S and ∀ stations Z, ∃ an item I in Z such that S chose I. Solution: a. There is an item that was chosen by every student. This is true; every student chose pie.
munotes.in

Page 45

45 b. There is a student who chose every available item. This is false; no student chose all nine items. c. There is a student who chose at least one item from every station. This is true; both Uta and Tim chose at least one item from every station. d. Every student chose at least one item from every station. This is false; Yuen did not choose a salad. Order of Quantifiers: Consider the following two statements: ∀ people x, ∃ a person y such that x loves y. ∃ a person y such that ∀ people x, x loves y. Note that except for the order of the quantifiers, these statements are identical. However, the first means that given any person, it is possible to find someone whom that person loves, whereas the second means that there is one amazing individual who is loved by all p e o p l e . ( R er e a d t he statements carefully to verify these interpretations!) The two sentences illustrate an extremely important property about multiply-quantified statements: In a statement containing both ∀ and ∃, changing the order of the quantifiers usually ! changes the meaning of the statement. Interestingly, however, if one quantifier immediately follows another quantifier of the same type, then the order of the quantifiers does not affect the meaning. Consider the commutative property of addition of real numbers, for example: ∀ real numbers x and ∀ real numbers y, x + y = y + x. This means the same as ∀ real numbers y and ∀ real numbers x, x + y = y + x. T h u s t h e p r o p e r t y c a n b e e x p r e s s e d m o r e b r i e f l y a s ∀ real numbers x and y, x + y = y + x. Example 3.3.4 Quantifier Order in a Tarski World Look again at the Tarski world of Figure
munotes.in

Page 46

46 Do the following two statements have the same truth value? a. For every square x there is a triangle y such that x and y have different colors. b. There exists a triangle y such that for every square x, x and y have different colors. Solution: Statement (a) says that if someone gives you one of t h e s q u a r e s from the Tarski world, you can find a triangle that has a different color. This is true. If someone gives you square g or h (which are gray), you can use triangle d (which is black); if someone gives you square e (which is black), you can use either triangle f or triangle i (which are both gray); and if someone gives you square j (which is blue), you can use triangle d (which is black) or triangle f or i (which are both gray). Statement (b) says that there is one particular triangle in the Tarski world that has a different color from every one of the squares in the world. This is false. Two of the triangles are gray, but they cannot be used to show the truth of the statement because the Tarski world contains gray squares. The only other triangle is black, but it cannot be used either because there is a black square in the Tarski world. Thus one of the statements is true and the other is false, and so they have opposite truth values. Formal Logical Notation: In some areas of computer science, logical statements are expressed in purely symbolic notation. The notation i n v o l v e s u s i n g predicates to describe all properties of variables and omitting the words such that in existential statements. (When you try to figure out the meaning of a formal statement, however, it is helpful to think the words such that to yourself each time they are appropriate.) The formalism also depends on the following facts: "∀x in D, P(x)" can be written as―∀x(x in D → P(x))," and "∃x in D such that P(x)" can be written as ―∃x(x in D ∧ P(x))." Example 3.3.5 Formalizing Statements in a Tarski World Consider once more the Tarski world of Figure

munotes.in

Page 47

47 Let Triangle(x), Circle(x), and Square(x) mean ‘‘x is a triangle,’’ ‘‘x is a circle,’’ and ‘‘x is a square’’; let Blue(x), Gray(x), and Black(x) mean ‘‘x is blue,’’ ‘‘x is gray,’’ and ‘‘x is black’’; let RightOf (x, y), Above (x, y), and Same Color As(x, y) mean ‘‘x is to the right of y,’’ ‘‘x is above y,’’ and ‘‘x has the same color as y’’; and use the notation x = y to denote the predicate ‘‘x is equal to y’’. Let the common domain D of all variables be the set of all the objects in the Tarski world. Use formal, logical notation to write each of the following statements, and write a formal negation for each statement. a. For all circles x, x is above f . b. There is a square x such that x is black. c. For all circles x, there is a square y such that x and y have the same color. d. There is a square x such that for all triangles y, x is to right of y. Solution: a. Statement: ∀x(Circle(x) → Above(x, f )). N e g a t i o n : ∼(∀x(Circle(x) → Above(x, f ))) ≡ ∃x ∼ (Circle(x) → Above(x, f )) by the law for negating a ∀ statement ≡ ∃x(Circle(x) ∧ ∼Above(x, f )) by the law of negating an if-then statement b. Statement: ∃x(Square(x) ∧ Black(x)). N e g a t i o n : ∼(∃x(Square(x) ∧ Black(x))) ≡∀x ∼ (Square(x) ∧ Black(x)) by the law for negating a ∃ statement ≡∀x(∼Square(x) ∨ ∼Black(x)) by De Morgan’s law c. Statement: ∀x(Circle(x) →∃y(Square(y) ∧ SameColor(x, y))). N e g a t i o n : ∼(∀x(Circle(x) →∃y(Square(y) ∧ SameColor(x, y)))) ≡ ∃x ∼ (Circle(x) →∃y(Square(y) ∧ SameColor(x, y))) by the law for negating a ∀ statement ≡ ∃x(Circle(x) ∧ ∼(∃y(Square(y) ∧ SameColor(x, y)))) by the law for negating an if-then statement ≡ ∃x(Circle(x) ∧ ∀y(∼(Square(y) ∧ SameColor(x, y)))) by the law for negating a ∃ statement ≡ ∃x(Circle(x) ∧ ∀y(∼Square(y) ∨ ∼SameColor(x, y))) by De Morgan’s law d. Statement: ∃x(Square(x) ∧ ∀y(Triangle(y) → RightOf(x, y))). N e g a t i o n : ∼(∃x(Square(x) ∧ ∀y(Triangle(y) → RightOf(x, y)))) munotes.in

Page 48

48 ≡ ∀x ∼ (Square(x) ∧ ∀y(Triangle(x) → RightOf(x, y))) b y t h e l a w f o r n e g a t i n g a ∃ statement ≡ ∀x(∼Square(x) ∨ ∼(∀y(Triangle(y) → RightOf(x, y)))) by De Morgan’s law ≡ ∀x(∼Square(x) ∨ ∃y(∼(Triangle(y) → RightOf(x, y)))) by the law for negating a ∀ statement ≡ ∀x(∼Square(x) ∨ ∃y(Triangle(y) ∧ ∼RightOf(x, y))) by the law for negating an if-then statement 3.4 ARGUMENTS WITH QUANTIFIED STATEMENTS Universal instantiation: if some property is true of everything in a set, then it is true of any particular thing in the set. Example : All men are mortal. S o c r a t e s i s a m a n . ∴ Socrates is mortal. Universal Modus Ponens: The rule of universal instantiation can be combined with modus ponens to obtain the valid form of argument called universal modus ponens. Universal Modus Ponens Formal Version Informal Version ∀x, if P(x) then Q(x). If x makes P(x) true, then x m a k e s Q ( x ) t r u e . P(a) for a particular a. a makes P(x) true. ∴ Q(a). ∴ a makes Q(x) true. Example: ∀ x, if E(x) then S(x). If an integer is even, then its square is even. E(k),for a particular k. k is a particular integer that is even. ∴S(k). ∴k2 is even. Example 3.4.1 Recognizing Universal Modus Ponens: Rewrite the following argument using quantifiers, variables, and predicate symbols. Is thisargument valid? Why? If an integer is even, then its square is even. k is a particular integer that is even. ∴ k2 is even. Solution: The major premise of this argument can be rewritten as ∀x, if x is an even integer then x2 is even. munotes.in

Page 49

49 Let E(x) be ‘‘x is an even integer,’’ let S(x) be ‘‘x 2 is even,’’ and let k stand for a particular integer that is even. Then the argument has the following form: ∀x, if E(x)then S(x). E(k),for a particular k. ∴ S(k). This argument has the form of universal modus ponens and is therefore valid. Example 3.4.2 Drawing Conclusions Using Universal Modus Ponens: Write the conclusion that can be inferred using universal modus ponens. If T is any right triangle with hypotenuse c and legs a and b, then c2 = a2 + b2. The triangle shown at the right is a right triangle with both legs equal to 1 and hypotenuse c. Pythogorean theorem c 1 1 Solution: c2= 12+ 12= 2 Note that if you take the nonnegative square root of both sides of this equation, you obtain c = √2. This shows that there is a line segment whose length is √2. Universal Modus Tollens: Another crucially important rule of inference is universal modus tollens. Its validity results from combining universal instantiation with modus tollens. Universal modus tollens is the heart of proof of contradiction, which is one of the most important methods of mathematical argument. Universal Modus Tollens : Formal Version Informal Version ∀x, if P(x) then Q(x). If x makes P(x) true, then x makes Q(x) true. ∼Q(a), for a particular a. a does not make Q(x) true. ∴ ∼P(a). ∴ a does not make P(x) true. Example 3.4.3 Recognizing the Form of Universal Modus Tollens: Rewrite the following argument using quantifiers, variables, and predicate symbols. Write the major premise in conditional form. Is this argument valid? Why? All human beings are mortal. munotes.in

Page 50

50 Zeus is not mortal. ∴ Zeus is not human. Solution: The major premise can be rewritten as ∀x, if x is human then x is mortal. Let H(x) be ‘‘x is human,’’ let M(x) be ‘‘x is mortal,’’ and let Z stand for Zeus. The argument becomes ∀x, if H(x) then M(x) ∼M(Z) ∴ ∼H(Z). This argument has the form of universal modus tollens and is therefore valid. Validity of Arguments with Quantified Statements: An argument form is valid, if and only if, for any particular predicates substituted for the predicate symbols in t h e p r e m i s e s i f t h e resulting premise statements are all true, then the conclusion is also true. Using Diagrams to Test for Validity Example 3.4.4 Using a Diagram to Show Validity Use diagrams to show the validity of the following syllogism: All human beings are mortal. Zeus is not mortal. ∴ Zeus is not a human being. Solution: The major premise is pictured on the left in Figure by placing a disk labeled ‘‘human beings’’ inside a disk labeled ‘‘mortals.’’ The minor premise is pictured on the right in Figure by placing a dot labeled ‘‘Zeus’’ outside the disk labeled "mortals." Mortals M o r t a l s Z e u s Human beings Major premise Minor premise The two diagrams fit together in only one way, as shown in Figure below Mortals Human beings Zeus munotes.in

Page 51

51 Since the Zeus dot is outside the mortals disk, it is necessarily outside the human beings disk. Thus the truth of the conclusion follows necessarily from the truth of the premises. It is impossible for the premises of this argument to be true and the conclusion false; hence the argument is valid. Example 3.4.5 Using Diagrams to Show Invalidity: Use a diagram to show the invalidity of the following argument: All human beings are mortal. Felix is mortal. ∴ Felix is a human being Solution: The major and minor premises are represented diagrammatically in Figure Mortals m o r t a l s Human beings F e l i x Major premise Minor premise A l l t h a t i s k n o w n i s t h a t t h e F e l i x d o t i s l o c a t e d somewhere inside the mortals disk. Where it is located with respect to the human beings disk cannot be determined. Either one of the situations shown in Figure below might be the case. mortals mortals F e l i x human beings human beings Felix (a) (b) The conclusion ‘‘Felix is a human being’’ is true in the first case but not in the second (Felixmight, for example, be a cat). Because the conclusion does not necessarily follow from the premises, the argument is invalid. The argument of Example 3.3.5 would be valid if the major premise were replaced by its converse. But since a universal conditional statement is not logically equivalent to its converse, such a replacement cannot, in general, be made. We say that this argument exhibits the converse error. munotes.in

Page 52

52 Converse Error (Quantified Form): Formal Version Informal Version ∀x, if P(x) then Q(x). If x makes P(x) true, then x makes Q(x) true. Q(a) for a particular a. a makes Q(x) true. ∴ P(a). ← invalid conclusion ∴ a makes P(x) true. ← invalid conclusion The following form of argument would be valid if a conditional statement were logically equivalent to its inverse. But it is n o t , a n d t h e a r g u m e n t form is invalid. We say that it exhibits the inverse error. Inverse Error (Quantified Form) Formal Version Informal Version ∀x, if P(x) then Q(x). If x makes P(x) true, then x makes Q ( x ) true. ∼P(a), for a particular a. a does not make P(x) true. ∴ ∼Q(a). ← invalid conclusion ∴ a does not make Q(x) true. ← invalid conclusion 3.5 REFERENCES 1. Discrete Mathematics with Applications by Sussana S. Epp 4th e d i t i o n . 2. Discrete Mathematics Schaums Outline Series 3. Discrete Mathematics and its Applications by Kenneth H. Rosen 4. Discrete Strictures by Liu 3.6 UNIT END EXERCISES 3.6.1 Write negations for each of the following statements: – All dinosaurs are extinct – No irrational numbers are integers – Some exercises have answers – All COBOL programs have at least 20 lines – The sum of any two even integers is even – The square of any even integer is even 3.6.2 Find the Truth Set of a Predicate: Let Q(n) be the predicate ‘‘n is a factor of 8.’’Find the truth set of Q(n) if a. the domain of n is the set Z+ of all positive integers b. the domain of n is the set Z of all integers. munotes.in

Page 53

53 3.6.3 Negating Statements in a Tarski World: Refer to the Tarski world of Figure 3.3.1, Write a negation for each of the following statements, and determine which is true, the given statement or its negation. a. For all squares x, there is a circle y such that x and y have the same color. b. There is a triangle x such that for all squares y, x is to the right of y. *****
munotes.in

Page 54

54 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Unit Structure 4.0 Objectives 4.1 Introduction to Direct Proofs 4.2 Rational Numbers 4.3 Divisibility 4.4 Division into Cases and the Quotient-Remainder Theorem 4.5 Floor and Ceiling 4.6 Contradiction and Contraposition 4.7 Two Classical Theorem 4.8 Unit End Exercises 4.9 List of References 4.0 OBJECTIVES This chapter would make you understand the following concepts: • Definition of Direct Proofs, Proving Existential Statements • Disproving Universal Statements by Counterexample • Proving Universal Statements • Method of Direct Proof • Proving Properties of Divisibility • The Unique Factorization of Integers Theorem • Division into Cases and the Quotient-Remainder Theorem • div and mod • Representations of Integers • Argument by Contraposition • Relation between Proof by Contradiction and Proof by Contraposition 4.1 INTRODUCTION TO DIRECT PROOFS Both discovery and proof are integral parts of problem solving. When you think you have discovered that a certain statement is true, try to figure out why it is true. If you succeed, you will know that your discovery munotes.in

Page 55

55 is genuine. Even if you fail, the process of trying will give you insight into the nature of the problem and may lead to the discovery that the statement is false. For complex problems, the interplay between discovery and proof is not reserved to the end of the problem-solving process but, rather, is an important part of each step. Assumptions: We use the three properties of equality: For all objects A, B, and C, A = A, (2) if A = B then B = A, and (3) if A = B and B = C, then A = C. In addition, we assume that there is no integer between 0 and 1 and that the set of all integers is closed under addition, subtraction, and multiplication. This means that sums, differences, and products of integers are integers. Of course, most quotients of integers are not integers. For example, 3 ÷ 2, which equals 3/2, is not an integer, and 3 ÷ 0 is not even a number. Definitions: An integer n is even if, and only if, n equals twice some integer. An integer n is odd if, and only if, n equals twice some integer plus 1. Symbolically, if n is an integer, then n is even ⇔ ∃ an integer k such that n = 2k. n is odd ⇔ ∃ an integer k such that n = 2k + 1. Example 4.1.1 Even and Odd Integers Use the definitions of even and odd to justify your a n s w e r s t o t h e following questions. a. Is 0 even? b. Is −301 odd? c. If a and b are integers, is 6a2b even? d. If a and b are integers, is 10a + 8b + 1 odd? Solution: a. Yes, 0 = 2·0. b. Yes, −301 = 2(−151) + 1. c. Yes, 6a2b = 2(3a2b), and since a and b are integers, so is 3a2b (being a product of integers). d. Yes, 10a + 8b + 1 = 2(5a + 4b) + 1, and since a and b are integers, so is 5a + 4b (being a sumof products of integers). /g3/g3/g3/g3• Definition: An integer n is prime if, and only if, n > 1 and for all positive integers r and s, ifn = rs, then either r or s equals n. An integer n is munotes.in

Page 56

56 composite if, and only if, n > 1and n = rs for some integers r and s with 1 < r < n and 1 < s < n. In symbols: n is prime ⇔ ∀ positive integers r and s, if n = r s then either r = 1 and s = n or r = n and s = 1. n is prime ⇔ ∀ positive integers r and s, if n = r s then either r = 1 and s = n or r = n and s = 1. Example 4.1.2 Prime and Composite Numbers: a. Is 1 prime? b. Is every integer greater than 1 either prime or composite? c. Write the first six prime numbers. d. Write the first six composite numbers. Solution: a. No. A prime number is required to be greater than 1. b. Yes. Let n be any integer that is greater than 1. Consider all pairs of positive integers r and such that n = r s. There exist at least two such pairs, namely r = n and s = 1 and r = 1 and s = n Moreover, since n = r s, all such pairs satisfy the inequalities 1 ≤ r ≤ n and 1 ≤ s ≤ n. If n is prime, then the two displayed pairs are the only ways to write n as rs. Otherwise, there exists a pair of positive integers r and s such that n = r s and neither r nor s equals either 1 or n. Therefore, in this case 1 < r < n and 1 < s < n, and hence n is composite. c. 2, 3, 5, 7, 11, 13 d. 4, 6, 8, 9, 10, 12 Proving Existential Statements: According to the definition given, a statement in the form ∃x ∈ D such that Q(x) is true if, and only if, Q(x) is true for at least one x in D. One way to prove this is to find an x in D that makes Q(x) true. Another way is to give a set of directions for finding such a n x . B o t h o f t h e s e methods are called constructive proofs of existence. Example 4.1.3 Constructive Proofs of Existence: a. Prove the following: ∃ an even integer n that can be written in two ways as a sum of two prime numbers. b. Suppose that r and s are integers. Prove the following: ∃ an integer k such that 22r + 18s = 2k. munotes.in

Page 57

57 Solution: a. Let n = 10. Then 10 = 5 + 5 = 3 + 7 and 3, 5, and 7 are all prime numbers. b. Let k = 11r + 9s. Then k is an integer because it is a sum of products of integers; and by substitution, 2k = 2(11r + 9s), which equals 22r + 18s by the distributive law of algebra. Disproving Universal Statements by Counterexample: To disprove a statement means to show that it is false. Consider the question of disproving a statement of the form ∀x in D, if P(x) then Q(x). Showing that this statement is false is equivalent to showing that its negation is true. The negation of the statement is existential: ∃x in D such that P(x) and not Q(x). But to show that an existential statement is true, we generally give an example, and because the example is used to show t h a t t h e o r i g i n a l statement is false, we call it a counter example. Thus themethod of disproof by counterexample can be written as follows: Disproof by Counterexample To disprove a statement of the form “∀x ∈ D, if P(x) then Q(x),” find a value of x in D for which the hypothesis P(x) is true and the conclusion Q(x) is false. Such an x is called a counterexample. Proving Universal Statements: The vast majority of mathematical statements to be proved are universal. In discussing how to prove such statements, it is helpful to imagine them in a standard form: ∀x ∈ D, if P(x)then Q(x). When D is finite or when only a finite number of elements satisfy P(x), such a statement can be proved by the method of exhaustion. Example 4.1.4 The Method of Exhaustion: Use the method of exhaustion to prove the following statement: ∀n ∈ Z, if n is even and 4 ≤ n ≤ 26, then n can be written as a sum of two prime numbers. Solution: 4 = 2 + 2 6 = 3 + 3 8 = 3 + 5 10 = 5 + 5 12 = 5 + 7 14 = 11 + 3 16 = 5 + 11 18 = 7 + 11 20 = 7 + 13 22 = 5 + 17 24 = 5 + 19 26 = 7 + 19 munotes.in

Page 58

58 In most cases in mathematics, however, the method of exhaustion cannot be used. For instance, can you prove by exhaustion that every even integer greater than 2 can be written as a sum of two prime numbers? No. To do that you would have to check every even integer, and because there are infinitely many such numbers, this is an impossible task. Example 4.1.5 Generalizing from the Generic Particular: At some time you may have been shown a “mathematical trick” like the following. You ask a person to pick any number, add 5, multiply by 4, subtract 6, divide by 2, and subtract twice the original number. Then you astound the person by announcing that their final result was 7. How does this “trick” work? Let an empty box or the symbol x stand for the number the person picks. Here is what happens when the person follows your directions: Step Visual Result Algebric Result Pick a number  Add 5 | | | | | +5 Multiply by 4 | | | | | | | | | | | | | | | | | | | | .(X+5).4= 4x+20 Subtract 6 | | | | | | | | | | | | | | ()42 0 6 41 4xx+− = + Divide By 2 | | | | | | | 4+142=2+7 Subtract twice the original number | | | | | | | ()27 27xx+− = Thus no matter what number the person starts with, the result will always be 7. Note that the x in the analysis above is particular (because it represents a single quantity), but it is also arbitrarily chosen or generic (because any number whatsoever can be put in its place). This illustrates the process of drawing a general conclusion from a particular but generic object. Method of Direct Proof : 1. Express the statement to be proved in the form “∀x ∈ D, if P(x) then Q(x).” (This step is often done mentally.) 2. Start the proof by supposing x is a particular but arbitrarily chosen element of D for which the hypothesis P(x) is true. (This step is often abbreviated “Suppose x ∈ D and P(x).”) 3. Show that the conclusion Q(x) is true by using definitions, previously established results, and the rules for logical inference. munotes.in

Page 59

59 Example 4.1.6 A Direct Proof of a Theorem: Prove that the sum of any two even integers is even. Proof: Suppose m and n are [particular but arbitrarily chosen] even integers. [We must show that m + n is even.] By definition of even, m = 2r and n = 2s for some integers r and s. Then m + n = 2r + 2s by substitution. = 2(r + s) by factoring out a 2. Let t = r + s. Note that t is an integer because it is a sum of integers. Hence m + n = 2t where t is an integer. It follows by definition of even that m + n is even. [This is what we needed to show.] Example 4.1.7 Identifying the “Starting Point” and the “Conclusion to Be Shown” : Write the first sentence of a proof (the “starting point”) and the last sentence of a proof (the “conclusion to be shown”) for the following statement: Every complete, bipartite graph is connected. Solution : It is helpful to rewrite the statement formally using a quantifier and a variable: Re : , if G is complete and bipartite, thenG i s c o n n e c t e dhypothesisdomainconclusionFormal statement graphs G∀       The first sentence, or starting point, of a proof supposes the existence of an object (in this case G) in the domain (in this case the set of all graphs) that satisfies the hypothesis of the if-then part of the statement (in this case that G is complete and bipartite). The conclusion to be shown is just the conclusion of the if-then part of the statement (in this case that G is connected). Starting Point: Suppose G is a [particular but arbitrarily chosen] graph such that G is complete and bipartite Conclusion to Be Shown: G is connected. Thus the proof has the following shape: Proof: Suppose G is a [particular but arbitrarily chosen] graph such that G is complete and bipartite. . . . Therefore, G is connected. Showing That an Existential Statement Is False Recall that the negation of an existential statement is universal. It follows that to prove an existential statement is false, you must prove a universal statement (its negation) is true. Example 4.1.8 Disproving an Existential Statement: Show that the following statement is false: There is a positive integer n such that n2 + 3n + 2 is prime. Solution: munotes.in

Page 60

60 Proving that the given statement is false is equivalent to proving its negation is true. The negation is For all positive integers n, n2 + 3n + 2 is not prime. Because the negation is universal, it is proved by generalizing from the generic particular. Claim: The statement “There is a positive integer n such that n2 + 3n + 2 is prime” is false Proof: Suppose n is any [particular but arbitrarily chosen] positive integer. [We will show that n2 + 3n + 2 is not prime.] We can factor n2 + 3n + 2 to obtain n2 + 3n + 2 = (n + 1)(n + 2). We also note that n + 1 and n + 2 are integers (because they are sums of integers) and that both n + 1 > 1 and n + 2 > 1 (because n ≥ 1). Thus n2 + 3n + 2 is a product of two integers each greater than 1, and so n2 + 3n + 2 is not prime 4.2 RATIONAL NUMBERS • Definition A real number r is rational if, and only if, it can be expressed as a quotient of two integers with a nonzero denominator. A real number that is not rational is irrational. More formally, if r is a real number, then r is rational ⇔∃ integers a and b such that r = ab and 0b≠ Example 4.2.1 Determining Whether Numbers Are Rational or Irrational: a. Is 10/3 a rational number? b. Is 0.281 a rational number? c. Is 7 a rational number? d. Is 0 a rational number? e. Is 2/0 a rational number? f. Is 2/0 an irrational number? g. Is 0.12121212 ... a rational number (where the digits 12 are assumed to repeat forever)? h. If m and n are integers and neither m nor n is zero, is (m + n)/mn a rational number? Solution: a. Yes, 10/3 is a quotient of the integers 10 and 3 and hence is rational. b. Yes, 0.281 = 281/1000. Note that the real numbers represented on a typical calculator display are all finite decimals. A n e x p l a n a t i o n similar to the one in this example shows that any such number is rational. It follows that a calculator with such a display can represent only rational numbers. c. Yes, 7 = 7/1. munotes.in

Page 61

61 d. Yes, 0 = 0/1. f. No, 2/0 is not a number (division by 0 is not allowed). e. No, because every irrational number is a number, and 2/0 is not a number. f. No, because every irrational number is a number, and 2/0 is not a n u m b e r . g. Yes. Let x = 0.12121212 .... Then 100x = 12.12121212 .... Thus 1 0 0 x − x = 12.12121212 ... − 0.12121212 ... = 12. B u t a l s o 1 0 0 x − x = 99x by basic algebra H e n c e 9 9 x = 1 2 , a n d s o x = 1 2 9 9 . T h e r e f o r e , 0 . 1 2 1 2 1 2 1 2 . . . = 1 2 / 9 9 , w h i c h i s a r a t io of two nonzero i n t e g e r s a n d t h u s i s a r a t i o n a l n u m b e r . h. Yes, since m and n are integers, so are m + n and mn (because sums a n d p r o d u c t s o f i n t e g e r s a r e i n t e g e r s ) . Theorem 4.2.2 The sum of any two rational numbers is rational: Proof: Suppose r and s are rational numbers. [We must show t h a t r + s i s rational.] Then, by definition of rational, r = a/b a n d s = c / d f o r s o m e integers a, b, c, and d with b≠0 and d ≠ 0. Thus r + s = a/ b + c /d by substitution = a d + b c / b d b y b a s i c a l g e b r a . Let p = ad + bc and q = bd. Then p and q are integers because products and sums of integers are integers and because a, b, c, and d are all integers. Also q ≠ 0 by the zero product property. Thus r + s = p/q where p and q are integers and q ≠ 0. Therefore, r + s is rational by definition of a rational number 4.3 DIVISIBILITY • Definition If n and d are integers and d ≠ 0 then n is divisible by d if, and only if, n equals d times some integer. Instead of “n is divisible by d,” we can say that n is a multiple of d, or d is a factor of n, or d is a divisor of n, or d divides n. The notation d | n is read “d divides n.” Symbolically, if n and d are integers and d ≠ 0: munotes.in

Page 62

62 d | n ⇔ ∃ an integer k such that n = dk. Example 4.3.1 Divisibility: a. Is 21 divisible by 3? b. Does 5 divide 40? c. Does 7 | 42? d. Is 32 a multiple of −16? e. Is 6 a factor of 54? f. Is 7 a factor of −7? Solution a. Yes, 21 = 3·7. b. Yes, 40 = 5·8. c. Yes, 42 = 7·6. d. Yes, 32 = (−16)·(−2). e. Yes, 54 = 6·9. f. Yes, −7 = 7·(−1). Example 4.3.2 Divisors of Zero If k is any nonzero integer, does k divide 0? Solution: Yes, because 0 = k ·0. Two useful properties of divisibility are (1) that if one positive integer divides a second positive integer, then the first is less than or equal to the second, and (2) that the only divisors of 1 are 1 and −1. Theorem 4.3.1 A Positive Divisor of a Positive Integer For all integers a and b, if a and b are positive and a divides b, then a ≤ b Proof: Suppose a and b are positive integers and a divides b. [We must show that a ≤ b.] Then there exists an integer k so that b = ak. By property T25 of Appendix A, k must be positive because both a and b a r e p o s i t i v e . I t follows that 1 ≤ k because every positive integer is greater than or equal to 1. Multiplying both sides by a gives a ≤ ka = b because multiplying both sides of an inequality by a positive number preserves the inequality by property T20 of Appendix A. Thus a ≤ b Theorem 4.3.2 Divisors of 1 The only divisors of 1 are 1 and −1. Proof: Since 1·1 = 1 and (−1)(−1) = 1, both 1 and −1 are divisors of 1. Now suppose m is any integer that divides 1. Then there exists an integer n such that 1 = mn. By Theorem T25 in Appendix A, either both m and n are positive or both m and n are negative. If both m and n are positive, then m is a positive integer divisor of 1. By Theorem 4.3.1, m ≤ 1, and, since the only positive integer that is less than or equal to 1 is 1 itself, it follows that m = 1. On the other hand, if both m and n are negative, then, by Theorem T12 in Appendix A, (−m)(−n) = mn = 1. In this case −m is a positive integer divisor of 1, and so, by the same reasoning, −m = 1 and thus m = munotes.in

Page 63

63 −1. Therefore there are only two possibilities: either m = 1 or m = −1. So the only divisors of 1 are 1 and −1. Example 4.3.3 Checking Non divisibility: Does 4 | 15? Solution: No, 15/4 = 3.75, which is not an integer. Be careful to distinguish between the notation a | b and the notation a/b. The notation a | b stands for the sentence “a divides b,” which means that there is an integer k such that b = ak. Dividing both sides by a gives b/a = k, an integer. Thus, when a ≠ 0, a | b if, and only if, b/a is an integer. On the other hand, the notation a/b stands for the number a/b which is the result of dividing a by b and which may or may not be an integer. In particular, be sure to avoid writing things like ()4| 3 5 4|8+= If read out loud, this becomes, “4 divides the quantity 3 plus 5 equals 4 divides 8,” which is nonsense. Example 4.3.4 Prime Numbers and Divisibility: An alternative way to define a prime number is to say that an integer n > 1 is prime if, and only if, its only positive integer divisors are 1 and itself. Proving Properties of Divisibility: One of the most useful properties of divisibility is that it is transitive. If one number divides a second and the second number divides a third, then the first number divides the third. Theorem 4.3.3 Transitivity of Divisibility For all integers a, b, and c, if a divides b and b divides c, then a divides c. Proof: Suppose a, b, and c are [particular but arbitrarily chosen] integers such that a divides b and b divides c. [We must show that a divides c.] By definition of divisibility, b = ar and c = bs for some integers r and s. By substitution c = bs = ( a r ) s = a ( r s ) b y b a s i c a l g e b r a . munotes.in

Page 64

64 Let k = r s. Then k is an integer since it is a product of integers, and therefore c = ak where k is an integer. Thus a divides c by definition of divisibility. Theorem 4.3.4 The Unique Factorization of Integers Theorem: Given any integer n > 1, there exist a positive integer k, distinct prime numbers p1, p2,..., pk , and positive integers e1, e2,..., ek such that n = p1e1 p2 e2 p3e3 ...... p k ek and any other expression for n as a product of prime numbers is identical to this except, perhaps, for the order in which the factors are written. Because of the unique factorization theorem, any integer n > 1 can be put into a standard factored form in which the prime factors are written in ascending order from left to right. Definition Given any integer n > 1, the standard factored form of n is an expression of the form n = p1e1 p2e2 p3e3 ...... p kek where k is a positive integer; p1, p2,..., pk are prime numbers; e1, e2,..., ek are positive integers; and p1 < p2 < ··· < pk . Example 4.3.5 Writing Integers in Standard Factored Form Write 3,300 in standard factored form. Solution: First find all the factors of 3,300. Then write them in ascending order: 3,300 = 100·33 = 4·25·3·11 = 2·2·5·5·3·11 = 22 ·31 ·52 ·111 4.4 DIVISION INTO CASES AND THE QUOTIENT-REMAINDER THEOREM Theorem 4.4.1 The Quotient-Remainder Theorem: Given any integer n and positive integer d, there exist unique integers q and r such that n = dq + r and 0 ≤ r < d. The proof that there exist integers q and r with the given properties If n i s p o s i t i v e , t h e munotes.in

Page 65

65 quotient-remainder theorem can be illustrated on the number line as follows: If n is negative, the picture changes. Since n = dq + r , w h e r e r i s nonnegative, d must be multiplied by a negative integer q to go below n. Then the nonnegative integer r is added to come back up to n. This is illustrated as follows : Example 4.4.1 The Quotient-Remainder Theorem: For each of the following values of n and d, find integers q and r such that n = dq + r and 0 ≤ r < d. a. n = 54, d = 4 b. n = −54, d = 4 c. n = 54, d = 70 Solution : a. 54 = 4·13 + 2; hence q = 13 and r = 2. b. −54 = 4·(−14) + 2; hence q = −14 and r = 2. c. 54 = 70·0 + 54; hence q = 0 and r = 54. div and mod: • Definition Given an integer n and a positive integer d, n div d = the integer quotient obtained w h e n n i s d i v i d e d b y d , a n d n mod d = the nonnegative integer remainder obtained w h e n n i s d i v i d e d b y d . Symbolically, if n and d are integers and d > 0, then n div d = q and n mod d = r ⇔ n = dq + r where q and r are integers and 0 ≤ r < d. Example 4.4.2 Computing div and mod: Compute 32 div 9 and 32 mod 9 by hand and with a calculator. Solution: Performing the division by hand gives the following results:
munotes.in

Page 66

66 If you use a four-function calculator to divide 32 by 9, you obtain an expression like 3.555555556. Discarding the fractional part gives 32 div 9 = 3, and so 32 mod 9 = 32 − 9·(32 div 9) = 32 − 27 = 5. A calculator with a built-in integer-part function iPart allows you to input a single expression for each computation: 32 div 9 = iPart(32/9) and 32 mod 9 = 32 − 9·iPart (32/9) = 5. Example 4.4.3 Computing the Day of the Week: Suppose today is Tuesday, and neither this year nor next year is a leap year. What day of the week will it be 1 year from today? Solution: There are 365 days in a year that is not a leap year, and each week has 7 days. Now 365 div 7 = 52 and 365 mod 7 = 1 because 365 = 52·7 + 1. Thus 52 weeks, or 364 days, from today will be a Tuesday, and so 365 days from today will be 1 day later, namely Wednesday. More generally, if Day T is the day of the week today and DayN is the day of the week in N days, then DayN = (DayT + N) mod 7, where Sunday = 0, Monday = 1,..., Saturday = 6. Example 4.4.4 Solving a Problem about mod: Suppose m is an integer. If m mod 11 = 6, what is 4m mod 11? Solution: Because m mod 11 = 6, the remainder obtained when m is divided by 11 is 6. This means that there is some integer q so that m = 11q + 6. Thus 4m = 44q + 24 = 44q + 22 + 2 = 11(4q + 2) + 2.
munotes.in

Page 67

67 Since 4q + 2 is an integer (because products and sums of integers are integers) and since 2 < 11, the remainder obtained when 4m is divided by 11 is 2. Therefore, 4m mod 11 = 2. Representations of Integers: We defined an even integer to have the form twice some integer. At that time we could have defined an odd integer to be one that was not even. Instead, because it was more useful for proving theorems, we specified that an odd integer has the form twice some integer plus one. The quotient-remainder theorem brings these two ways of describing odd integers together by guaranteeing that any integer is either even or odd. To see why, let n be any integer, and consider what happens when n is divided by 2. By the quotient-remainder theorem (with d = 2), there exist unique integers q and r such that n = 2q + r and 0 ≤ r < 2. But the only integers that satisfy 0 ≤ r < 2 are r = 0 and r = 1. It follows that given any integer n, there exists an integer q with n = 2q + 0 or n = 2q + 1. In the case that n = 2q + 0 = 2q, n is even. In the case that n = 2q + 1, n is odd. Hence n is either even or odd, and, because of the uniqueness of q and r, n cannot be both even and odd. The parity of an integer refers to whether the integer is even or odd. For instance, 5 has odd parity and 28 has even parity. We call the fact that any integer is either even or odd the parity property Example 4.4.5 Representations of Integers Module 4: Show that any integer can be written in one of the four forms n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3 for some integer q. Solution: Given any integer n, apply the quotient-remainder theorem to n with d = 4. This implies that there exist an integer quotient q and a remainder r such that n = 4q + r and 0 ≤ r < 4. But the only nonnegative remainders r that are less than 4 are 0, 1, 2, and 3. Hence n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3 for some integer q. munotes.in

Page 68

68 4.5 FLOOR AND CEILING Given any real number x, the floor of x, denotedis defined as follows: = that unique integer n such that n ≤ x < n + 1. Symbolically, if x is a real number and n is an integer, then = n ⇔ n ≤ x < n + 1. x n n+1 floor of x=[x] • Definition: Given any real number x, the ceiling of x, denoted, is defined as follows: = that unique integer n such that n − 1 < x ≤ n. Symbolically, if x is a real number and n is an integer, then = = n ⇔ n − 1 < x ≤ n. x ( n-1) n Ceiling of x=[x] Example 4.5.1 Computing Floors and Ceilings: Compute and for each of the following values of x: a. 25/4 b. 0.999 c. −2.01 Solution: a. 25/4 = 6.25 and 6 < 6.25 < 7; hence 25/4=6    25/4=7 b. 0 < 0.999 < 1; hence 0.0999=0    0.999=1 c. −3 <−2.01 <= and Note that on some calculators is denoted INT (x). hence −2.01=− 3    −2.01=− 2 Example 4.5.2 An Application: The 1,370 students at a college are given the opportunity to take buses to an out-of-town game. Each bus holds a maximum of 40 passengers. a. For reasons of economy, the athletic director will send only full buses. What is the maximum number of buses the athletic director will send? munotes.in

Page 69

69 b. If the athletic director is willing to send one partially filled bus, how many buses will be needed to allow all the students to take the trip? Solution : a. 1370/40=34.25=3 4 b. 1370/40=34.25=3 5 4.6 CONTRADICTION AND CONTRAPOSITION Method of Proof by Contradiction 1. Suppose the statement to be proved is false. That is, suppose that the negation of the statement is true. 2. Show that this supposition leads logically to a contradiction. 3. Conclude that the statement to be proved is true. T h e r e a r e n o c l e a r - c u t r u l e s f o r w h e n t o t r y a d i rect proof and when to try a proof by contradiction, but there are some general guidelines. Proof by contradiction is indicated if you want to show that there is no object with a certain property, or if you want to show that a certain object does not have a certain property. The examples illustrate these situations. Theorem 4.6.1: Proof: [We take the negation of the theorem and suppose it t o b e t r u e . ] Suppose not. That is, suppose there is a greatest integer N. [We must deduce a contradiction.] Then N ≥ n for every integer n. Let M = N + 1. Now M is an integer since it is a sum of integers. Also M > N since M = N + 1. Thus M is an integer that is greater than N. So N is the greatest integer and N is not the greatest integer, which is a c o n t r a d i c t i o n . [T h i s contradiction shows that the supposition is false and, hence, that the theorem is true.] Theorem 4.6.2: There is no integer that is both even and odd. Proof: [We take the negation of the theorem and suppose it to be true.] Suppose not. That is, suppose there is at least one integer n that is both even and odd. [We must deduce a contradiction.] By definition of even, n = 2a for some integer a, and by definition of odd, n = 2b + 1 for some integer b. Consequently, 2a = 2b + 1 by equating the two expressions for n and so 2a − 2b = 1 munotes.in

Page 70

70 2(a − b) = 1 a − b = 1/2 by algebra Now since a and b are integers, the difference a − b must also be an integer. But a − b = 1/2, and 1/2 is not an integer. Thus a − b is an integer and a − b is not an integer, which is a contradiction. [This contradiction shows that the supposition is false and, hence, that the theorem is true.] Theorem 4.6.3: The sum of any rational number and any irrational number is irrational. Proof: [We take the negation of the theorem and suppose it to be true.] Suppose not. That is, suppose there is a rational number r and an irrational number s such that r + s is rational. [We must deduce a contradiction.] By definition of rational, r = a/b and r + s = c/d for some integers a, b, c, and d with b ≠ 0 and d ≠ 0. By substitution, a/b + s = c/d , and so s = c/d – a/b by subtracting a/b from both side = b c – a d / b d b y t h e l a w s o f a l g e b r a . Now bc − ad and bd are both integers [since a, b, c, and d are integers and since products and differences of integers are integers], and bd ≠ 0 [by the zero product property]. Hence s is a quotient of the two integers bc − ad and bd with bd ≠ 0. Thus, by definition of rational, s is rational, which contradicts the supposition that s is irrational. [Hence the supposition is false and the theorem is true.] Argument by Contraposition: A s e c o n d f o r m o f i n d i r e c t a r g u m e n t , a r g u m e n t b y c ontraposition, is based on the logical equivalence between a statement and its contrapositive. To prove a statement by contraposition, you take the contrapositive of the statement, prove the contrapositive by a direct proof, and conclude that the original statement is true. The underlying reasoning is that since a conditional statement is logically equivalent to its contrapositive, if the contrapositive is true then the statement must also be true. Method of Proof by Contraposition: 1. Express the statement to be proved in the form ∀x in D, if P(x) then Q(x). 2. Rewrite this statement in the contrapositive form ∀x in D, if Q(x) is false then P(x) is false. munotes.in

Page 71

71 3. Prove the contrapositive by a direct proof. a. Suppose x is a (particular but arbitrarily chosen) element of D such that Q(x) is false. b. Show that P(x) is false Proposition: For all integers n, if n2 is even then n is even. Proof(by contraposition): Suppose n is any odd integer. [We must show that n2 is odd.] By definition of odd, n = 2k + 1 for some integer k. By substitution and algebra, n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1. B ut 2k2 + 2k is an in teg er because products and sums of integers are integers. So n2 = 2·(an integer) + 1, and thus, by definition of odd, n2 is odd [as was to be shown]. Relation between Proof by Contradiction and Proof by Contraposition: Observe that any proof by contraposition can be recast in the language of proof by contradiction. In a proof by contraposition, the statement ∀x in D, if P(x) then Q(x) is proved by giving a direct proof of the equivalent statement ∀x in D, if ∼Q(x) then ∼P(x). To do this, you suppose you are given an arbitrary element x of D such that ∼Q(x). You then show that ∼P(x). This is illustrated in Figure. Suppose x is an arbitrary element of D such that – Q(x) sequence of steps -P(x) Exactly the same sequence of steps can be used as the heart of a proof by contradiction for the given statement. The only thing that changes is the context in which the steps are written down. To rewrite the proof as a proof by contradiction, you suppose there is an x in D such that P(x) and ∼Q(x). You then follow the steps of the proof by contraposition to deduce the statement ∼P(x). But ∼P(x) is a contradiction to the supposition that P(x) and ∼Q(x). (Because to contradict a conjunction of two statements, it is only necessary to contradict one of them.) This process is illustrated in Figure. Suppose ∃x in D such that P(x)and ∼Q(x) Same sequence of steps Contradiction P(x) and ∼P(x) 4.7 TWO CLASSICAL THEOREM Theorem 4.7.1 Irrationality of √2 munotes.in

Page 72

72 √2 is irrational. Proof: [We take the negation and suppose it to be true.] Suppose not. That is, suppose √2 is rational. Then there are integers m and n with no common factors such that √2 = m/n [by dividing m and n by any common factors if necessary]. [We must derive a contradiction.] Squaring both sides of equation gives 2 = m2/n2 Or, equivalently m2 = 2n2. Note that equation implies that m2 is even (by definition of even). It follows that m is even. We file this fact away for future reference and also deduce (by definition of even) that m = 2k for some integer k. Substituting equation (2) into equation (1), we see that m2 = (2k)2 = 4k2 = 2n2. Dividing both sides of the right-most equation by 2 gives n2 = 2k2. Consequently, n2 is even, and so n is even. B ut we also know that m is even. [This is the fact we filed away.] Hence both m and n have a common factor of 2. But this contradicts the supposition that m and n have no common factors. [Hence the supposition is false and s o t h e t h e o r e m i s true.] Example 4.7.1 Irrationality of 1 + 3 √√√√2: Prove by contradiction that 1 + 3 √2 is irrational. Solution: The essence of the argument is the observation that if 1 + 3 √2 could be written as a ratio of integers, then so could √2. But by Theorem 4.7.1, we know that to be impossible. 1 + 3 √2 is irrational Proof: Suppose not. Suppose 1 + 3 √2 is rational. [We must derive a contradiction.] Then by definition of rational 1 + 3 √ 2 = a / b f o r s o m e integers a and b with b ≠ 0. It follows that 3 √2 = a/b − 1 by subtracting 1 from both sides = a/b – b/b by substitution = a – b/b by the rule for subtracting fractions with a common denominator. munotes.in

Page 73

73 Hence √2 = a – b/3b by dividing both sides by 3. But a − b and 3b are integers (since a and b are integers and differences and products of integers are integers), and 3b ≠ 0 b y t h e z e r o p r o d u c t property. Hence √2 is a quotient of the two integers a − b and 3b with 3b ≠ 0, and so √2 is rational (by definition of rational.) This contradicts the fact that √2 is irrational. [This contradiction shows that the supposition is false.] Hence 1 + 3 √2 is irrational. Theorem 4.7.3 Infinitude of the Primes The set of prime numbers is infinite. Proof (by contradiction): Suppose not. That is, suppose the set of prime numbers is finite. [We must deduce a contradiction.] Then some prime number p is the largest of all the prime numbers, and hence we can list the prime numbers in ascending order: 2, 3, 5, 7, 11,. . . ,p. Let N be the product of all the prime numbers plus 1: N = (2·3·5·7·11···p) + 1 Then N > 1, and so, N is divisible by some prime number q. Because q is prime, q must equal one of the prime numbers 2, 3, 5, 7, 11, ..., p. Thus, by definition of divisibility, q divides 2·3·5·7·11···p, and so, by Proposition 4.7.3, q does not divide (2·3·5·7·11···p) + 1, which equals N. Hence N is divisible by q and N is not divisible by q, and we have reached a contradiction. [Therefore, the supposition is false and the theorem is true.] 4.8 REFERENCES 1. Discrete Mathematics with Applications by Sussana S. Epp 4th edition. 2. Discrete Mathematics Schaums Outline Series 3. Discrete Mathematics and its Applications by Kenneth H. Rosen 4. Discrete Strictures by Liu 4.9 UNIT END EXERCISE 1 Derive Additional Results about Even and Odd Integers Suppose that you have already proved the following properties of even and odd integers: 1. The sum, product, and difference of any two even integers are even. 2. The sum and difference of any two odd integers are even. munotes.in

Page 74

74 3. The product of any two odd integers is odd. 4. The product of any even integer and any odd integer is even. 5. The sum of any odd integer and any even integer is odd. 6. The difference of any odd integer minus any even integer is odd. 7. The difference of any even integer minus any odd integer is odd. Use the properties listed above to prove that if a is any even integer and b is any odd integer, then a2+b2+1/2 is an integer. 2. Using Unique Factorization to Solve a Problem Suppose m is an integer such that 8·7·6·5·4·3·2·m = 17·16·15·14·13·12·11·10. Does 17 | m? 3. Compute div and mod Use the floor notation to compute 3850 div 17 and 3850 mod 17. ***** munotes.in

Page 75

75 Unit III 5 SEQUENCES, MATHEMATICAL INDUCTION AND RECURSION Unit Structure 5.0 Objectives 5.1 Introduction 5.2 Sequences 5.3 Mathematical Induction 5.4 Strong Mathematical Induction and The Well Ordering Principle for the Integers 5.5 Defining Sequences Recursively 5.6 Solving Recurrence Relation by Iteration 5.7 Second Order Linear Homogeneous Recurrence Relation with Constant Co-effcients 5.8 General Recursive Definition and Structural Induction 5.9 Summary 5.10 Bibliography 5.11 Unit End Exercise 5.0 OBJECTIVES Student will be able to understand the following from the Chapter: • The various terminologies used to define Sequence. Various Laws used to prove the Sequence known as Mathematical Induction and also the various types of Mathematical Induction. • Represent any sequence interns of Previous values (Recursive Function). • Study of Strong Mathematical Induction and Structural Induction for dening a Recursive Function. 5.1 INTRODUCTION Identication of a regular pattern and generalizing these patterns to a Mathematical Equation is the most important component in Mathematics. A Se-quence is a study of repetitive numbers which can be generalized to a munotes.in

Page 76

76 single mathematical equation satisfying the given Range of integers.The validity of the sequences can be veried by using a set of laws known as Mathematical Induction. The sequences can also be generalized using arithmetic operations on Previous values, thus forming a sequence in a Recursive manner. 5.2 SEQUENCES A Sequence is defined as a process of enumerated collection of objects or num- bers such that the numbers possess a common dierence or a multiplicative factor. It is also represented in the form of a function such that its domain may include all the integer value existing between two integers or the set of all integers greater than or equal to a given integer.For example: 1, 2,3,4,5,....,n where n is an integer. 2, 4,8,16,..., 2n where n is an integer. In the above examples the starting integer is considered as the Initial Term and the last integer present in the sequence is defined as Final Term. A sequence can be operated arithmetically by using two basic arithmetic operation: Addition: If the sequence is to be added, then all the terms are needed to be added continuously hence the Continuous addition m e t h o d i s represented by Summation (∑) 12 . . . . . . . .nkm m m nkmaaa a a++ +==+ +∑ Multiplication: If the sequence is to be Multiplied, then all the terms are needed to be multiplied continuously hence the Continuous addition method is represented by Pi (∏). 12 . . . . . . . . .nkm m m nkmaaa a a++==× × ×∏ If am,am+1,am+2,...andbm,bm+1,bm+2,...are sequence so f real numbers and c is any real number, then the following equations hold for any integer n≥ m. (a) ()nnnkk k kkm km kmab a b===+= +∑∑∑ ( b) ()nnkkkm kmca c a==×=×∑∑ (c) ()nn nkk k kkm km kmaba b== = ×= ×  ∏∏ ∏ 5.2.1 Solved Examples: Example1: Write the first four terms of these quences defined by the formulas munotes.in

Page 77

77 A. 10 'kkak=+ for all integers k≥1 Sol: The terms are 11110 1 11a==+ for (k=1) 22210 2 12a==+ for (k=2) 33310 3 13a==+ for (k=3) 44410 4 14a==+ for (k=4) B. ()110 3iic−=+, for all integers i≥0 Sol: The terms are: ()1111133c−−== for (i=1) ()2221139c−== for (i=2) ()3331132 7c−−== for (i=3) ()4441138 1c−== for (i=4) Example 2: Find an explicit formula for the given sequences: A . -1,1,-1,1,-1,1 In the given sequence the sign (Positive or negative) is present al- ternatively. Hence, the signs are position dependent which means: - 1 = ( - 1 )1 (First Position Term). 1 = ( - 1 )2 (Second Position Term). 1 = ( - 1 )3 ( T h i r d P o s i t i o n T e r m ) . 1 = ( - 1 )4 ( F o u r t h P o s i t i o n T e r m ) . 1 = ( - 1 )5 ( F i f t h P o s i t i o n T e r m ) . Hence the explicit formula is: ()1kka=− munotes.in

Page 78

78 Sol : Since 1112a=− ( F i r s t P o s i t i o n T e r m ) . 21123a=− (Second Position Term). 31134a=− ( T h i r d P o s i t i o n T e r m ) . 41145a=− (Fourth Position Term). 51156a=− ( F i f t h P o s i t i o n T e r m ) . Hence the explicit formula is: 111kakk=−+ Example3 Compute the summations and products of the following: A ()511kk=+∑ Sol: Let ak= (k + 1) where k is varying from 1 to 5. Hence the summation or the addition of the terms will be: ()511( 1 1 ) ( 1 2 ) ( 1 3 ) ( 1 4 ) ( 1 5 )kk=+=+++++++++∑ ( 2 ) + ( 3 ) + ( 4 ) + ( 5 ) + ( 6 ) = 2 0 B. 71111knn=−+∑ Let 111kann=−+where k is varying from 1to7. Hence the summation or the addition of the terms will be : 51111knn=−+∑ 11 1 1 11 1 1 1 111 1 2 21 331 4 41 5 51        =− + − +− + − +− +        ++ +++         11 1166 1 77 1 −+ − ++  11 1167 78 −+−   11 1 1 1 1 1261 22 03 04 25 6++ + + + + = 78 munotes.in

Page 79

79 C. 421kk=∏ Sol: Let ak=k2awhere k is varying from 1 to 4. Hence the product or the multiplication of the terms will be : ()( ) () () ()5222 2211234kk==×××∏ ()()()()1491 6××× = 5 7 6 D. 6211kk=−∏ Sol: Let 11112kak  =− =−    where k is varying from 2 to 6. Hence the product or the multiplication of the terms will be: 2211 1 111 1 1234kk=−      −= −× − × −×            ∏ 111156  −× −     =1234523456    ××××         =16 5.3 MATHEMATICAL INDUCTION Mathematical Induction is defined as a Mathematical Technique used for proving any mathematical expression, a statement or at theorem such that it holds true for a given set of Natural Number. It requires Two Steps for proving as statement: (a) Basic Step: This step will help to prove that the statement is true for the initial value. (b) InductiveStep: This step will prove that if a statement is true at nth Natural Number, the n the same statement should be True at(n + 1) th Natural Number. The above mentioned steps can be implemented by using the following steps: • Step 1: P r o v e t h a t t h e s t a t e m e n t i s t r u e f o r t h e v e r y f i r st value or the initial value.(The value from which the given statement or expression is defined) munotes.in

Page 80

80 • Step 2: This step is performed if and only if Step 1 is True. In this step we assume that the given expression is valid at k(Where k is a Natural Number.). According to the assumption made, it is to be proved that the same expression will be valid at (k+1)also.(Where(k+1)is a Natural Number or the number successive to k.) 5.3.1 Solved Examples: Example 1. For each integer n with n ≥ 2, let P(n) be the formula: () ( )()()111113ninn nii−=+−+=∑ A. Write P(2). Is P(2) true? B. Write P(k) C. Write P(k+1) D. In a proof by mathematical induction that the formula holds for all integers n n≥2, what must be shown in the inductive step? Sol: Given () ( )()()111113ninn nii−=+−+=∑where () ( ) ( )111nipn i i−=+∑ A. () ( ) ( )21121ipi i−=+∑ () ( ) ( )1121ipi i=+∑ ()()()21 1 1p=+ + ()22p= It is expressed in the form of the following equation: ()()113nn n+−= Hence the value at n=2 ()()22 1 2 13+−= ()()23 13= = 2 B. Similarly P(k) will be expressed as: () ( ) ( )()()111113kikk kpk i i−=+−=+∑ munotes.in

Page 81

81 C. Similarly P(k+1) will be expressed as: () ( ) ( )()()()11213kikk k kpk i i=++=+∑ D. Solving LHS and RHS in (c) separately. () ( )111KILHS i i+==+∑ ()()()123kk kRHS++= Considering LHS () ( )111KiLHS i i+==+∑ () ( ) ( ) ( )111Kiii k k==+ + + +∑ From the expression in (b) () ( )()()()111213Kikk k kii−=+++=∑ Hence, ()()()1113kk kkk+−=+ ++ Taking k(k + 1) common ()()1113kkk−=+ × + ()3113kkk+−=+ × ()213kkk+=+ × ()()()123kk k++= Thus, LHS=RHS Hence Proved by Mathematical Induction. Example 2. Prove the Following statement by using Mathematical Induction: ()11 1......1.2 2.3 1 1nnn n++ =++for all integers 1n≥ Sol: Given: ()11 1......1.2 2.3 . 1 1nnn n++ =++ L H S = ()11 1......1.2 2.3 . 1nn+++ munotes.in

Page 82

82 R H S = 1nn+ Substitute n=1 in LHS and RHS respectively L H S = 11.2 =12 R H S =111+ =12 Hence the expression is valid at n=1 Let the expression is valid at n=k hence, ()11 1...... ........(1)1.2 2.3 . 1 1kkk k++ =++ Prove that the same will be valid for n=k+1 also, () ( )11 1 1......1.2 2.3 1 . 2 2kkk k+++ =++ + Let LHS =() ( )() ( )11 1 11 1...... ......1.2 2.3 1 . 2 1.2 2.3 1 . 2kk kk++ ++++ ++ RHS 12kk+=+ Solving LHS ()() ( )11 1 1......1.2 2.3 . 1 1 . 2kk k k++ +++ + But ()11 1......1.2 2.3 . 1 1kkk k++ =++ from (1) Hence, ()() ( )111 . 2kkk k+++ + Taking()11k+ common ()1112kkk=× +++ ()()21112kkkk++=×++ ()212 112kkkk++=×++ munotes.in

Page 83

83 Since ()2222aa b ba b++ = + ()()21112kkk+=×++ ()212kk+=+ Thus LHS=RHS hence proved Example 3. Prove that 5n -11is divisible by 4, for each integer n≥0 Sol: To prove 5n -1is divisible by 4 by using Mathematical Induction, substitute the value of n=0 = 50-1 = 1 - 1 = 0 Since, 0 is divisible by all the integers. Hence, 0 is divisible by 4 also. Therefore, let 5n -1 is divisible by 4 at n=k Hence, by using Quotient Remainder theorem we can represent the divisibility as: 5k -1=4q where ‘q’ is an integer........(1) To prove the statement to be correct, it is required to prove that the statement is true for n=k+1 also such that 5k+1 - 1 = 4p, where ‘p’ is an integer. Considering, 151k+− 55 1k=× − But 541kq=+ from (1) Hence, (4q + 1) x 5 - 1 = 4 q x 5 + 5 - 1 = 4 q x 5 + 4 = 4 ( q x 5 + 1 ) Since, q is an integer hence (q x 5+1) will also be an integer. Let q x 5 + 1 = p Therefore, 5k+1 – 1 = 4p From Quotient Remainder Theorem, 5k+1– 1 is divisible by 4, Hence proved. Example 4. Prove that, for any integer n≥0, 7n – 2nis divisible by 5. Sol: To prove 7n – 2nis divisible by 5 by using Mathematical Induction, substitute the value of n=0 munotes.in

Page 84

84 = 70 – 20 = 1 – 1 = 0 Since, 0 is divisible by all the integers. Hence, 0 is divisible by 5 also. Therefore, let 7n – 2nis divisible by 5 at n = k Hence, by using Quotient Remainder theorem we can represent the divisibility as: = 7k – 2k = 5q where ’q’ is an integer........(1) To prove the statement to be correct, it is required to prove that the statement is true for n=k+1 also such that 7k+1 – 2k +1 = 5p, where ‘p’ is an integer. Considering 7k+1 – 2k +1 = 77 22kk×− × = ()75 2 2 2kk×+−× =75 72 22kkk×+ ×− × =()757 2 2kk k×+ − × But 72kk−= 5q from ….1 Hence, ()755 2kq×+ × = ()72 5kq+× Since, q is an integer hence ()72kq+will also be an integer. Let ()72kq+= p Therefore, 11725kkp++−= From Quotient Remainder Theorem 1172kk++−is divisible by 5, Hence Proved. Example 5. Prove that, ()25 1 !nn<+ +for all integers n≥2, Sol: Let LHS = 2nand RHS= (n+1)! To prove 2n<(n+1)! by using Mathematical Induction, substitute the value of n=2 in both the sides. L H S = 22 = 4 R H S = ( 2 + 1 ) ! = 3 ! = 6 Since 4 <6, Hence the statement is valid at n=2. munotes.in

Page 85

85 Therefore, let the statement is valid at n=k such that: ()21 !kk<+holds True.......(1) Furthermore, it is required to prove that the statement will hold True at n=k+1 also i.e. ()122 !kk+<+ From above, let LHS = 12k+and RHS = ()2!k+ Considering, LHS = 12k+ =22k× Considering, RHS = ()2!k+ = ( k + 2 ) x ( k + 1 ) ! From (1) we know that ()21 !kk<+ a n d ()22k<+because, k is an integer and any number added with 2 will yield a number always greater than 2. Hence, ()122 !kk+<+by Mathematical Induction method 5.4 STRONG MATHEMATICAL INDUCTION AND THE WELL-ORDERING PRINCIPLE FOR THE INTEGERS Strong Mathematical Induction can be considered similar to that of an Ordinary Mathematical Induction. Unlike Ordinary Mathematical Induction method, the Strong Mathematical Induction’s Basic Step requires several initial integers on the basis of which the statement or the expression can be proved (whereas, in an Ordinary Induction, Basis Step requires only a single initial value for satisfying the statement’s validity). In case of an Inductive step of a Strong Mathematical Induction, validity of P(k+1) is proved only if P(n) holds true for all integers through k. Principle of Strong Mathematical Induction: Let P(n) be the statement or the expression to be proved for the integers n. Let ‘a’ and ‘b’ be the two integers such that ab≤and: • P(a), P(a+1) ,….. upto P(b) are all True. (Basis Step) • For any integer k such that ka≥, P(i) should hold True for the integersfrom a to k. Then it can be concluded that, P(k+1) will also hold true by Inductive Hypothesis 5.4.1 Solved Examples: Example 1. Suppose a1, a2, a3 ……. is a sequence defined as follows: a1= 1, a2= 3, an ak =a k– 2+2a k – 1, for all integers Prove that anis odd for all integers 1n≥. munotes.in

Page 86

86 Sol: an is odd for all integers 1n≥i. e. an = 2n-1 We know that a1= 1, a2= 3, and an = 2n-1………..(1) Hence, Substitute n=1 and n=2 respectively in (1) at n=1: a1 = 2(1) – 1 a1 = 2 – 1 a1 = 1 at n=2: a2 = 2(2) – 1 a1 = 4 – 1 a1 = 3 which satisfies the given values of a1 and a2 respectively. Let k be an integer such that 2k≥and it satisfies the equation as ak = 2k– 1. It is required to prove that the sequence is valid at ‘k+1’ also. Considering ak = ak-2+ 2ak- 1. So for k+1 the equation will be: ak + 1 = ak - 1+ 2ak. Where, ak– 1 = 2(k – 1) – 1 and ak = 2(k) – 1 Substituting the values in ak + 1 = ak - 1+ 2ak and solving further, ()()()()121 1 2 2 1kak k+=− − + × − ()()()122 1 2 2 1kak k+=− − + × − ()()123 2 2 1kak k+=− + × − ()123 4 2kak k+=− + ×− 165kak+=− 164 1kak+=− − ()123 2 1kak+=− − let ()32kp−=, where p is an integer. 121kap+=− Thus ak+1 is an odd integer by Strong Mathematical Induction method. Example 2. Suppose that f0, f1, f2,……. is a sequence defined as follows f0=5, f1=16 1171 0kk kff f−−=− f o r a l l i n t e g e r s 2k≥ P r o v e t h a t 32 25nnnf=× +×for all integers 0n≥ Sol: To Prove, 32 25nnnf=× +×by using Strong Mathematical Induction We know that 015, 6ff==and 32 25nnnf=× +×…………(1) munotes.in

Page 87

87 Hence, Substitute n=0 and n=1 respectively in (1). at n=0: 00032 25f=× +× 032f=+ 05f= at n=1: 11132 25f=× +× ()()()()132 25f=×+× 161 0f=+ 116f= which satisfies the given values of f0 and f1 respectively. Let k be an integer such that 1k≥ a n d i t s a t i s f i e s t h e e q u a t i o n a s 32 25kkkf=× +×. It is required to prove that the sequence is valid at ‘k+1’ also. Considering 1271 0kk kff f−−=− So for k+1 the equation will be1171 0kk kff f+−=− where and 32 25kkkf=× +× and 11132 25kkkf−−−=× +× Substituting the values in 1171 0kk kff f+−=− and solving further, Substituting the values in and solving further, ()()11173 2 2 5 1 03 2 2 5kk k kkf−−+=× × +× − × × +× 11121 2 14 5 30 2 20 5kk k kkf−−+=×+×−× −× 12521 2 14 5 30 2025kkkkkf+ =×+×−× −×   121 2 14 5 15 2 4 5kkk kkf+=×+×−×− × ()()132 2 52 5kkkf+=××+×× ()()11132 25kkkf+++=× +× Thus ()()11132 25kkkf+++=× +×is an odd integer by Strong Mathematical Induction method. 5.3 DEFINING SEQUENCES RECURSIVELY A Recurrence function is defined as a function which is used to represent the sequence in form of a functions having previous as well as the present values. A Recurrence function can be mathematically defined as: munotes.in

Page 88

88 A Recurrence Relation for a sequence b0, b1, b2, .... is an expression which is used to represent each term bkusing its predecessor terms b0, b1, b2, ...., bk-i, where kia−≥and i is a non-negative integer. To develop a recurrence relation, it is important to have the information regarding the Initial conditions or the values of b0, b1, b2, ...., bi-1 to define the value of bi The vary famous example of a Recurrence Relation is Fibonacci Series. 1, 2, 3, 5, 8, 13, 21,……… In Fibonacci, the present value is determined by adding the previous two values. It can be mathematically expressed as: 12kk kff f−−=+ which is a Recurrence Relation. 5.5.1 Solved Example: Example 1. Find the first four terms o f each of the recursively defined sequences: A. 12kkaak−=+, for all integers 2k≥a1=1 Sol : K = 1 : 11a= (First Position Term) K = 2 : ()2122 2 1 2 4aa=+ = + = (Second Position Term) K = 3 : ()3222 2 4 2 1 0aa=+ = + = (Third Position Term) K = 4 : ()4322 2 1 0 2 2 2aa=+ = + = (Fourth Position Term) B.123kkbb k−=+, for all integers 2k≥b1=1 Sol : K = 1 : 11b= (First Position Term) K = 2 : ()2123 ( 1 ) 2 1 3 5bb=+ = + = (Second Position Term) K = 3 : ()()3223 2 2 5 6 1 6bb=+ = + = (Third Position Term) K = 4 : ()4323 ( 3 ) 2 1 6 9 4 1bb=+ = + = (Fourth Position Term) Example 2. Let 012,,. . . . . . . .bbb, be defined by the formula, bn=4n for all integers 0n≥. Show that this sequence satisfies the recurrence relation, bk=4bk-1 for all integers 1k≥ Sol: Given:bn= 4n, for 0n≥Hence b0 = 40 = 1 Let ‘k’ be an integer such that 1k≥ Therefore, bk-1= 4k-1 4 x bk-1= 4 x 4k-1 munotes.in

Page 89

89 444k=× = 4k which is, bk, Hence Proved. Example 3. Let 012,,. . . . . . . .sss, be defined by the formula, ()1,!nnsn−=for all integers 0n≥. Show that this sequence satisfies the recurrence relation, 1,kkssk−=for all integers 1k≥ Sol : Given:()1,!nnsn−=, for 0n≥Hence ()00110!s−== Let ‘k’ be an integer such that 1k≥ Therefore, ()()1111!kksk−−−=− 1ksk−=− = ()()111!kkk−−−− = ()()()1111!kkk−−−××− ()()1!kk−− Which is, sk Hence Proved. 5.6 SOLVING RECURRENCE RELATION BYITERATION If a sequence satisfies a recurrence relation with its initial conditions or values given, then an explicit formula can be defined for the given sequence by the method of iterations. In this s e c t i o n , t h e d i f f e r e n t ways of solving a recurrence relations have been mentioned. A sequence a0, a1, a2, ..... is called an Arithmetic Sequence of the form 0naan d=+where ‘n’ and ‘d’ are the integers, iff the recurrence relation is given as 1kkaa d−=+ munotes.in

Page 90

90 A sequence a0, a1, a2, ..... is called an Geometric Sequence of the form ()0nnar a=where ‘n’ and ‘r’ are the integers, if the recurrence relation is given as 1kkar a−=× 5.6.1 Solved Examples: Example 1. The formula: 12311. . . . . . .1nnrrr r rr+−++ + + + =− is true for all even numbers r except r = 1 and for all integers 0n≥. Use this fact to solve each of the following problems: A. If n is an integer and 1n≥, find a formula for the expression 1 + 3 + 32 + + 3n-1. B. If n is an integer and 2n≥find a formula for the expression is an integer and 1i≥1, find a formula for the expression 1 + 2 + 22 + + 2i-1. C. If 2 n+ 2n-2 × 3 + 2n-3× 3 + + 22× 3 + 2 × 3 + 3 Sol: Given: 12311. . . . . . .1nnrrr r rr+−++ + + + =− (a) 21122 . . . . . . .2i−++ + +on comparing the expression r = 2. Hence, the sum will be: 112121i−+−=− 211i−= 21i=− (b) 21133 . . . . . . .3n−++ + +on comparing the expression r=3. Hence, the sum will be: 113131n−+−=− 312n−= (C) 2 n+ 2n-2 × 3 + 2n-3× 3 + + 22× 3 + 2 × 3 + 3simplifying the expression we get. 2 n ()23 222. . . . . . . . 2 2 1 3 ,nn−−++ ++ + + ×where r=2 Hence, the sum will be: 21212321nn−+−=+ ×− munotes.in

Page 91

91 121231nn−−=+ × 123 2 3nn−=+ × − 1122 3 2 3nn n−−=× + × − ()123 2 3n−=+ × − ()152 3n−=× − Example 2. Following sequence is defined recursively. Use iteration to guess an explicit formula for the sequence. A 1,kkak a−=×for all integers 01, 1ka≥= Sol: Given:1,kkak a−=× and a0=1 A t ()101: 1 1ka a== × = A t ()()212: 2 2 1 2ka a== × = × = A t ()()323: 3 3 2 6ka a== × = × = ()1:nnkn a na−== × A t ()()21nnn a−=× − × A t ()()()()()()12 . . . . . . . . . . . . 3 2 1nn n=× − × − × × ×× !n= B. At 131 ,kkcc−=× +for all integers 12, 1kc≥= Sol: Given:131kkcc−=× + and 11c= A t ()()()1212: 3 1 3 1 1 3 1kc c== × + = × + = + A t ()()21323: 3 1 3 3 1 1 3 3 1kc c== × + = × + + = + + A t ()()21 321434: 3 1 3 3 3 1 1 3 3 3 1kc c== × + = × + + + = + + + A t ()1:3 1nnkn c c−== × + which is a Geometric progression with r=3. Hence, 113131n−+−=− 312n−= C.112kkkggg−−=+for all integers 12, 1kg≥= munotes.in

Page 92

92 Sol: Given:112kkkggg−−=+, At k = 221 1221 122ggggg−−  ==  ++   21112 3g==+ 22121g=− At k = 3:31 2331 222ggggg−−==++ 3113317233g    ==    +   311721=− At k = 4:341441 322ggggg−−==++ 4117711 5277g    ==    +   41115 2 1kn==− At k = n112nnnggk ng−−==+ : on simplifying 121n=− D.21kkyy k−=+, for all integers 12, 1ky≥= Sol: G i v e n :21kkyy k−=+and 11y= A t k = 22222 1 122yy y−=+ = + 212=+ A t k = 32233 1 233yy y−=+ = + 2212 3=+ + munotes.in

Page 93

93 A t k = 422 244 1 343 4yy y−=+ = + + 22212 3 4=+ + + A t 21:nnkn y y n−== + on simplifying: 222 212 3 4 . . . . . . . .n=+ + + + + which is equal to the sum of the square of n integers ()()3112 16nn n g−++= 5.7 SECOND ORDER LINEAR HOMOGENEOUS RECURRENCE RELATION WITH CON- STANT COEFFICIENTS If a recurrence relation is expressed in the following form: 12kk kaA a B a−−=± Then such relations will be considered as Second Order Linear Homogeneous Recurrence Relation. In the recurrence relation mentioned above ‘A’ and ‘B’ are the parameters of the recurrence function. The Order of any recurrence relation depends on the maximum level of previous values, a relation is referring to. For example: 23kk kak a B a−−=× ± i n t h i s c a s e t h e o r d e r o f r e c u r r e n c e relation will be 3. The values or the solution of the recurrence relation are determined by using Characteristic Equation of a Relation which is formed from the recurrence relation. If the recurrence relation is given12kkkaA k a B a−−=±, then the recurrence relation will be:2xA x B−− Steps for finding the generalized equation: Step 1: Find the characteristic equation from the recurrence relation. Since, order of there recurrence relation is 2. Hence, the degree of the characteristic equation will be also 2. Step 2: Find the roots of the Characteristic Equation. Step 3: Form the generalized equation using the roots of the Characteristic Equation. Case(a): If the roots are distinct then the generalized solution of the recurrence relation will be: () ()12nnnfC r D r=+ w h e r e , r1 and r2 are the roots of the Characteristic Equation. munotes.in

Page 94

94 Case(b): If the roots are repeated then the generalized solution of the recur-rencerelation will be: () ( )1nnnfC n D r=+ where,r1 and r2 are the roots of the Characteristic Equation. Step 4: Find the value of A and B by using the initial condition values. 5.7.1 Solved Example: Example1. Which of the following are second-order linear homogeneous recurrence relations with constant coefficients? A. 1225kk kaa a−−=− Sol: The given recurrence relation is a Second order recurrence relation with constant coefficients as: A= 2 and B= -5. B. 12kkkbk b b−−=+ Sol: The given recurrence relation is not a Second order recurrence relation with constant coefficients because one of the coefficients is not constant (A=k). C. ()2123kk kcc c−−=× Sol: The given recurrence relation is not a Second order recurrence relation with constant coefficients because the relation is non- linear. D. 123kk kddd−−=× Sol: The given recurrence relation is a Second order recurrence relation with constant coefficients as: A= 3 and B= 1. E. 122kk krr r−−=−− Sol: The given recurrence relation is not a Second order recurrence relation with constant coefficients because an extra non-zero constant (Offset) -2 is present. F. 210ks ks−= Sol: The given recurrence relation is a Second order recurrence relation with constant coefficients as: A=0 and B= 10. Example 2. L e t a0; a1; a2; :::::: be the sequence defied by the explicit formula 2nnac D=× +for all integers 0n≥where C and D are real numbers. A. Find C and D so that a0 = 1 and a1 = 3.What is a2 in this case? B. Find C and D so that a0 = 0 and a1 = 2. What is a2 in this case? Sol: The given 2nnac D=× + munotes.in

Page 95

95 A. To find C and D use the initial values of an. At n = 0 and 002ac D=× +where 01a= 1= C + D………(1) At n=1; 112ac D=× +, where 13a+ 3 = 2c + D……… (2) Solving (1) and (2) simultaneously C=2 and D= -1. Hence recurrence relation becomes:22 1nna=× − Therefore, a2 will be: 2222 1a=× − = 2 x 4 - 1 = 7 B. To find ‘C’ and ‘D’ use the initial values of an. At n=0; a0 = C × 20 + D, where a0 = 0 0= C + D …… (1) At n=1; a1 = C × 21 + D, where a1 = 2 2 = 2C+D.......(2) Solving (1) and (2) simultaneously. C = 2 a n d D = - 2 Hence, the recurrence relation an=2×2n – 2 = 2×4 -2 = 6 Example 3. Let b0,b1,b2,.....be the sequence defined by the explicit formula: () ( )22nnnbC D=+ −for all integers0n≥ Where C and D are real numbers. Show that for any choice of C and D, 126kk kbb b−−=+ for all integers2k≥ Sol : Given () ( )32nnnbC D=+ − from the generalized function the roots of the characteristic equation can be determined. They are: 3 and -2. Hence, the characteristic equation will be ()()()32 0fx x x=− ×+= ()()02 3 2xx x=+ −+ 202 3 6xx x=+−− 206xx=− − 26xx+= Thus the recurrence relation will be: 126kk kbb b−−=+, Hence Proved. munotes.in

Page 96

96 Example 4. Following sequences satisfies the given recurrence relation and initial conditions. Find an explicit formula for the sequence. A 1223kk kaa a−−=+, for all integers2k≥a0 = 1, a1 = 2. Sol: Given: 1223kk kaa a−−=+, 2k≥ with initial conditions given as: a0 = 1, a1 = 2. By using the recurrence relation: 1223kk kaa a−−=+, the characteristic equation will be: 223 0tt−− = ()()13 0tt+− = Hence, the roots are: t = -1 and 3. Now, the generalized explicit formula will be an = A(“1)n +B(3)n To find the value ‘A’ and ‘B’ we need initial conditions: at n=0, a0 = A(-1)0 + B(3)0 but a0 = 1 Therefore, 1 = A + B .......(1) Similarly, at n=1 the equation will be: 2 = - A + 3 B . . . . . . . ( 2 ) Solving equation (1) and (2) simultaneously. 14A= and 34B= Hence the explicit formula is:()()131344nnnA=−+ B. 1244kk ksss−−=− −, for all integers 2k≥so 010, 1ss== − Sol: Given: 1244kk ksss−−=− −2k≥with initial conditions given as: 00,s=and 11s=− By using the recurrence relation: 1244kk ksss−−=− −the characteristic equation will be: 244 0tt++ = ()()22 0tt++ = Hence, the roots are: t = -2. Now, the generalized explicit formula will be () ( )2nnsA n B=− + × To find the value ‘A’ and ‘B’ we need initial conditions: At0n=,() ( )()0020sA B=− + ×but00s= Therefore,0=A…………(1) Similarly, at n=1 the equation will be: -1= -2A - 2B…….(2) Solving equation (1) and (2) simultaneously. A = 0 and B=12 munotes.in

Page 97

97 Hence the explicit formula is: sn = ()122nnsn=− × 5.8 GENERAL RECURSIVE DEFINITION AND STRUCTURAL INDUCTION A Recursive function is not always used to represent a sequence of numbers but also used for building a set of objects. In case of building a set of object it is necessary to define a recursive definition for finding new elements of the sets which are defined by using a set of rules. A recursive definition mainly consists of three basic components or rules. (a) BASE: A statement in which particular object belongs too the set. (b) RECURSION: A c o l l e c t i o n o f r u l e s w h i c h w i l l h e l p t o f i n d n e w elements belonging to the set. (c) RESTRICTION: A d i s c l a i m e r s t a t e m e n t i n d i c a t i n g t h a t n o o t h e r element exist in the set which does not satisfies statement 1 and 2 When a recursive definition of the set is proved by u s i n g Mathematical Induction. It is known as Structural Induction. The steps for executing structural Induction is: (a) Show that the element in the set S has been derived from the BASE. (b) Show that the rules provided by the RECURSION is satisfied by the new object defined for the given set. 5.8.1 Solved Example: Example 1. T h e s e t o f B o o l e a n e x p r e s s i o n s i n v o l v i n g l e t t e r s from the alphabet such as p, q, and r , and the symbols ∧, ∨ and ∼. he set of Boolean expressions over a general alphabet is defined recursively. • BASE: Each symbol of the alphabet is a Boolean expression. • RECURSION: If P and Q are Boolean expressions, then so are: A . P ∧ Q B . P ∨ Q C . ∼ P • RESTRICTION: There are no Boolean expressions over the alphabet other than those obtained from a and b Derive the fact that the following is a Boolean expression over the English alphabet a, b, c, . . . , x, y, z: ()()()pq r p∧∨ ∧∼∼ Sol: A. In the given expression, all the symbols are included, Hence from 1. the p, q and r are Boolean expression B. ∼ r is a Boolean expression from 1 and 2 C. munotes.in

Page 98

98 C. ∼ r ∧ p is a Boolean expression from 1 and 2 A. D. p ∧ q is a Boolean expression from 1 and 2 A. E. ∼ (p ∧ q) is a Boolean expression from 1 and 2 C. F. (∼ (p ∧ q) ∨ (∼ r ∧ p)) is a Boolean expression from 1 and 2 B. Example 2. The set of arithmetic expressions over the real numbers can be defined recursively as follows: • BASE: Each real number r is an arithmetic expression. • RECURSION: I f u a n d v a r e a r i t h m e t i c e x p r e s s i o n s , t h e n t h e following are also arithmetic expressions: A. ()u+ B. ()u− C. ()uv+ D. ()uv− E. ()uv× F. uv • RESTRICTION: T h e r e a r e n o a r i t h m e t i c e x p r e s s i o n s o v e r t h e r e a l numbers other than those obtained from a and b. Give derivations showing that each of the following i s a n a r i t h m e t i c expression. (Note: that the expression uv is legal even though the value of v may be 0.) A. In the expression since all the number are real numbers hence, from 1. 9, 6.1, 2, 7 and 6 are arithmetic expressions. B. 6.1 + 2 is an Arithmetic expression from 1. and 2 C C. 9 × (6.1 + 2) is an Arithmetic expression from 1. and 2 E. D. 4 − 7 is an Arithmetic expression from 1. and 2 D. E. (4 − 7) × 6 is an Arithmetic expression from 1. and 2 E. F. ()()96 . 1 247 6×+−×is an Arithmetic expression from 1. and 2 F. Example 3. In Godel, Escher, Bach, Douglas Hofstadter introduces the following recursively defined set of strings of M’s, I ’s, and U’s, which he calls the MIU-system. • BASE: MI is in the MIU-system.
munotes.in

Page 99

99 • RECURSION: A. If x I is in the MIU-system, where x is a string, then x I U is in the MIU-system. (In other words, you can add a U to any s t r i ng t h a t ends in I. For example, since MI is in the system, so is MIU.) B. If Mx is in the MIU-system, where x is a string, then Mxx is in the MIU system. (In other words, you can repeat all the characters in a string that follow an initial M. For example, if MUI is in the system, so is MUIUI.) C. If x I I I y is in the MIU-system, where x and y are strings (possibly null), then xUy is also in the MIU-system.(In other words, you can replace I I I by U. For example, if M I I I I is in the system, so are MIU and MUI.) D. If x. D. If xUUy is in the MIU-system, where x and y are strings (possibly null), then xUy is also in the MIU-system. (In other words, you can replace UU by U. For example, if MIIUU is in the system, so is MIIU.) • RESTRICTION: No strings other than those derived from I and II are in the MIU-system. Derive the fact that MUIU and MIUI is in the MIU-system. • Sol: A. MI is in the MIU-system from 1. B. MII is in the MIU-system from 1. and 2 B. C. MIIII is in the MIU-system from 1. and 2 B. D. MUI is in the MIU-system from 1. and 2 C. E. MUIU is in the MIU-system from 1. and 2 A. A. MI is in the MIU-system from 1. B. MII is in the MIU-system from 1 and 2 B. C. MIIII is in the MIU-system from 1. and 2 B. D. MIIIIIIII is in the MIU-system from 1. and 2 B. E. MIUIIII is in the MIU-system from 1. and 2 C. F. MIUUI is in the MIU-system from 1. and 2 C. G. MIUI is in the MIU-system from 1. and 2D Example 4. Define a set S recursively as follows: • BASE: 1 ∈ S • RECURSION: If s ∈ S, then A. 0s ∈ S B. s1 ∈ S • RESTRICTION: Nothing is in S other than objects defined in a and b above munotes.in

Page 100

100 Use structural induction to prove that every string in S ends in a 1. Sol: In the given statement, the string should end with 1 and according to BASE of the recursion, one of the object is present in S is 1. Hence BASE condition is satisfied. In RECURSION component, there are two rules given. According to the first rule the string is starting with 0, hence it may or may not end with 1 and in the second rule the string should compulsorily get terminated by 1. Hence both the rules are satisfying the statement that the string in S should end with a 1. Example 5. Define a set S recursively as follows: • BASE: 1 ∈ S, 2 ∈ S, 3 ∈ S, 4 ∈ S, 5 ∈ S, 6 ∈ S, 7 ∈ S, 8 ∈ S, 9 ∈ S • RECURSION: If s ∈ S and t ∈ S, then A. s0 ∈ S B. st ∈ S • RESTRICTION: Nothing is in S other than objects defined in a and b above. • Use structural induction to prove that no string in S r e p r e s e n t s a n integer with a leading zero. Sol: In the given statement, the string should not start w i t h 0 a n d according to BASE of the recursion, only 0 does not belong to S. Hence BASE condition is satisfied. In the RECURSION component there are two rules mentioned. According to the first rule the string should end with 0, and in second rule the concatenation of the string has been mentioned. Hence, both the rules are satisfying the statement that the string in S should not start with 0 or the string should not have a leading 0. 5.9 SUMMARY • The symbol to represent continuous addition is ∑. • The symbol to represent continuous multiplication is ∏ . • A generalized expression of a sequence can be verified by using Mathematical Induction. • If the statement is needed to be proved for all the available values of the sequence, then the given induction is known as Mathematical Induction. munotes.in

Page 101

101 • The sequence whose values depends on the previous value or the initial value is known as Recurrence Function. • If the elements of set is to be determined by using M a t h e m a t i c a l Induction. Such inductions are known as Structural Mathematical Induction. 5.10 REFERENCES • Susanna S. Epp ”Discrete mathematics with applications.” (2010). (Chp 5) • Lipschutz, Seymour. ”Schaum’s Outlines of Theory and Problems of Discrete Mathematics.” (2016). (Chp3) 5.11 UNIT END EXERCISE (1) Write the following expression as a single summation or product. (Hint: Use Properties of Summation and Product) i. () ()1132 3 4 5nnkkkk==×− +−∑∑ ii. 11112nnkkkkkk== +  ×    ++    ∏∏ 2) Find an explicit formula for the given sequences i. 0,1,-2,3,-4,-5 ii. 12 3 4 5 6,, , , ,491 62 53 64 9 iii. 12 34 50, , , , ,23456−−− iv. 3, 6, 12, 24, 48, 96 v. 14 9 1 6 2 5 3 6,, , , ,392 78 12 4 37 2 9 (3) Let a0 = 2, a1 = 3, a2 = −2, a3 = 1, a4 = 0, a5 = −1, a6 = −2. Compute each of the summations and products below : i()60iia=∑ ii()11iia=∑ iii()52iia=∑ iv()60iia=∏ v()55iia=∏ (4) Compute the Summation and Product of the following i3012mm=∑ ii()()5112iii=+×∑ munotes.in

Page 102

102 iii() ( )111iii=−×+∑ iv()() ()52211iiiii=+−×+∏ 5) Prove the following statement by using Mathematical Induction i. For each positive integer n, let P(n) be the formula: ()()2322 212 11234 . . . . . . . . .6nn nn+++++ += ii. ()12022 2niniin++=×= × +∑ for all integer 0n≥ iii. () ()10!1 ! 1niii n+=×=+−∑, for all integers 1n≥ iv. If x is a real number not divisible by π, then for all integers n ≥ 1, () ( ) ( ) ( )()()()1c o s 2sin sin 3 sin 5 ........ sin 2 12sinnxxxx n xx−+++ +− = v. ()011 1.21 22 2 2 !niii n==++ +∏ for all integer n ≥ 0. vi. 71n−is divisible by 6, for each integer n ≥ 0. vii. 373nn−+ is divisible by 3, for each integer n ≥ 0. viii. 3nn−is divisible by 6, for each integer n ≥ 0. ix. 231n− is divisible by 8, for each integer n ≥ 0. x. ()25nn+is divisible by 6, for each integer n ≥ 0. xi. ()13 4nn+≤, for every integer n ≥ 0. xii. ()95 6nn+≤, for every integer n ≥ 2. xiii. 22nn≤, for every integer n ≥ 5. xiv. ()22 !nn<+) for all integers n ≥ 0. xv. ()321nn>+for all integers n ≥ 2. (6) Suppose b1, b2, b3, .... is a sequence defined as follows: b1 = 4, b2 = 12, 21kk kbb b−−=+ for all integers 3k≥. Prove that bn is divisible by 4 for all integers n ≥ 1. (7) Suppose 012,,, . . . . . .cccis a sequence defined as follows: 012 32, 2, 34, 3kkccc c c−=== =for all integers k ≥ 3. Prove that cn is an even number for all integers n ≥ 0. (8) Suppose 012,,, . . . . . .eeeis a sequence defined as follows: 01 1 212, 29, 5e 6ekk keee−−== = −for all integers k ≥ 2 . P r o v e t h a t 53 72nnne=× +×for all integers n ≥ 0. munotes.in

Page 103

103 (9) Suppose 123,,, . . . . . .pppis a sequence defined as follows: 12 1 23, 5, p 3 2kk kpp p p−−=== −for all integers k ≥ 3. Prove that 21nng=+ for all integers n ≥ 1. (10) Suppose 012,,, . . . . . .sssis a sequence defined as follows: 01 1 20, 4, 6, 6 5kk kkssss ss−−== = = −for all integers k ≥ 2. Prove that 51nns=−for all integers n ≥ 0. (11) Find the first four terms of each of the recursively defined sequences: i. ()21kkkcc−= , for all integers k ≥ 1 c0 = 1 ii. 122kk kss s−−=+,for all integers 2k≥ 011, 1ss== iii. 121kk kvv v−−=++, for all integers 3k≥ 121, 3vv== iv. 121kkkuk u u−−=− + for all integers k ≥ 3 u1 = 1, u2 = 1 (12) Let 012,,, . . . . . .aaa.. be defined by the formula 31nan=+, for all integers n ≥ 0 . S h o w t h a t t h i s s e q u e n c e s a t i s f i e s t h e r e c u r r e n ce relation 13kkaa−=+, for all integers k ≥ 1. (13) Let 012,,, . . . . . .tttbe defined by the formula 2nsn=+, for all integers n ≥ 0 . S h o w t h a t t h i s s e q u e n c e s a t i s f i e s t h e r e c u r r e n ce relation 122kk kttt−−=−for all integers k ≥ 2. (14) Let 012,,, . . . . . .dddbe defined by the formula 32nnnd=−, for all integers n ≥ 0 . S h o w t h a t t h i s s e q u e n c e s a t i s f i e s t h e r e c u r r e n ce relation1256kk kdd d−−=−, for all integers k ≥ 2. (15) Let 012,,, . . . . . .ttt, be defined by the formula 2nsn=+, for all integers n ≥ 0 . S h o w t h a t t h i s s e q u e n c e s a t i s f i e s t h e r e c u r r e n ce relation 122kk kttt−−=−, for all integers k ≥ 2. (16) The formula: ()11234. . . . .2nnn+++++ += true for all integers n ≥ 1. Use this fact to solve each of the following problems: i. If k is an integer and k ≥ 2, find a formula for the expression 1 ()123. . . . . 1k+++ + − ii. If n is an integer and n ≥ 1 , f i n d a f o r m u l a f o r t h e e x p r e s s i o n 32468. . . . . . .2n+++++ + iii. If n is an integer and n ≥ 1 , f i n d a f o r m u l a f o r t h e e x p r e s s i o n 33233. . . . . . .3nn+×+×+ +×+ munotes.in

Page 104

104 (17) Following sequence is defined recursively. Use iteration to guess an explicit formula for the sequence. i. gk = 111kkkbgb−−=+for all integers k ≥ 2, b0 = 1 ii. ek = 4 × ek−1 + 5, for all integers k ≥ 1, e0= 2 iii. tk = tk−1 + 3k+1, for all integers k ≥ 1, t0 = 0 iv. sk = sk−1 + 2k, for all integers k ≥ 1, s0 = 3 v. pk = pk−1 + 2 × 3 k , for all integers k ≥ 2, p1 = 2 vi. dk = 2 × dk−1 + 3, for all integers k ≥ 2, d1 = 2 (18) Which of the following are second-order linear homogeneous recurrence relations with constant coefficients? i. ak = (k − 1)ak−1 + 2kak−2 ii. bk = −bk−1 + 7bk−2 iii. ck = 3ck−1 + 1 iv. dk = 3 (dk−1) 2 + dk−2 v. v. rk = rk−1 − 6r k−3 vi. sk = s k−2 + 10s k−2 19) Let b0, b1, b2, ....... be the sequence defined by the explicit formula: bn = C × 3 n + D × (−2)n for all integers n ≥ 0, where C and D are real numbers. i. Find C and D so that b0 = 0 and b1 = 5. What is b2 in this case? ii. Find C and D so that b0 = 3 and b1 = 4. What is b2 in this case? (20) Let a0, a1, a2, ...... be the sequence defined by the explicit formula: an = C × 2 n + D for all integers n ≥ 0, where C and D are real numbers. Show that for any choice of C and D, ak = 3 ak −1 − 2 ak −2 for all integers k ≥ 2. (21) Following sequences satisfies the given recurrence relation and initial conditions. Find an explicit formula for the sequence. i. bk = 7bk-1 − 10bk-2 , for all integers k ≥ 2, b0 = 2, b1 = 2 ii. tk = 6tk-1 − 9t k-2, for all integers k ≥ 2, t0 = 1, t1 = 3 iii. sk = 2sk-1 + 2sk-2, for all integers k ≥ 2, s0 = 1, s1 = 3 iv. ck = ck −1 + 6 ck −2, for all integers k ≥ 2, c0 = 0, c1 = 3 v. ek = 9 ck −2, for all integers k ≥ 2,ec0 = 0, e1 = 2 (22) Consider the set of Boolean expressions defined in Example 1.(5.8.1) Give derivations showing that each of the following is a Boolean expression over the English alphabet a, b, c, . . . , x, y, z. • (∼ p ∨ (q ∧ (r∨∼ s))) • ((p ∨ q)∨∼ ((p∧∼ s) ∧ r)) munotes.in

Page 105

105 (23) Consider the Arithmetic expression discussed in Example 2.(5.8.1) Give derivations showing that ((2 × (0.3–4.2)) + (−7)) is an arithmetic expression. (24) Consider the MIU-system discussed in Example 2 . ( 5 . 8 . 1 ) G i v e derivations showing that MUIIU is in the MIU-system. (25) Define a set S recursively as follows: • BASE: a ∈ S • RECURSION: If s ∈ S, then – as ∈ S – sb ∈ S • RESTRICTION: Nothing is in S other than objects defined in a and b above. Use structural induction to prove that every string in S begins with an a. (26) Define a set S recursively as follows: BASE: 1 ∈ S, 3 ∈ S, 5 ∈ S, 7 ∈ S, 9 ∈ S RECURSION: If s ∈ S, then – st ∈ S – 2s ∈ S – 4s ∈ S – 6s ∈ S – 8s ∈ S • RESTRICTION: Nothing is in S other than objects defined in a and b above. Use structural induction to prove that every string in S represents an odd integer. (27) Define a set S recursively as follows: • BASE: 0 ∈ S, 5 ∈ S • RECURSION: If s ∈ S and t ∈ S then – s + t ∈ S – s − t ∈ S • RESTRICTION: Nothing is in S other than objects defined in a and b above Use structural induction to prove that every integer in S is divisible by 5. (28) Give a recursive definition for the set of all strings of 0’s and 1’s that have the same number of 0’s as 1’s. ***** munotes.in

Page 106

106 6 FUNCTIONS Unit Structure 6.0 Objectives 6.1 Introduction 6.2 Functions Defined on Sets 6.3 One-One, Onto and Inverse Function 6.4 Composition of Function 6.5 Summary 6.6 Bibliography 6.7 Unit End Exercise 6.0 OBJECTIVES Student will be able to understand the following from the Chapter: • The various terminologies related to Function, such a s : D o m a i n , CoDomain, Range, Image and Difference between them. • Identify a valid Function on the basis of mapping between the two set of elements. • Determine Function within a function and its various properties. 6.1 INTRODUCTION The representation of two varying variables in the form of some equations is an algebraic part of Mathematics. These equations are referred to as Functions in which one variable will be considered as Independent variable and another one will be considered as Dependent Variable. A Function can be considered valid if and only if a single value is having exactly on value at the output. It may happen that a single function will not help to define the correct relation between thevariables, Hence in such cases two or more functions are incorporated to define the relation more appropriately 6.2 FUNCTIONS DEFINED ON SETS A function f is defined as a relation between two sets. The set of elements which are provided to the functions are referred as Domain of the function and the set of elements in which probable outputs of the function is present are known as Co-Domain and the set of elements which are the munotes.in

Page 107

107 actual output of the functions are known as Range o r I m a g e . I f w e consider y = f(x), then x will be considered as Inverse Image of y. Note: Co-Domain and Range may or may not become equal. Range ⊆ Co − domain A function can be mathematically expressed as: :fX Y→ Where, f is a function, X is Domain and Y is Co-Domain. A function f will be considered as a valid function if and only if it satisfies two basic properties. (a) Every element in the Domain should get mapped with some elements of the Co-Domain. (b) No element in Domain should be mapped with more than one element in Co-Domain. The mapping between Domain and Co-Domain values can b e represented pictorially by using Arrow Diagram. A typical arrow diagram has been shown below as for reference. f P Q P 0 q 0 P 1 q 1 P 2 q 2 P 3 q 3 Fig. 6.2.1 Basic Arrow Diagram Logarithmic Function to the base ‘b’ of ‘x’ yields the value which is raised to the power of ‘b’ to get ‘x’. It is mathematically expressed as logbx, where b > 0 and x >0. The properties of Logarithmic function are: a. 10()yyl o gx xb=⇔ = b. 10() () a n d () ()elog x log x log x in x== c. () 1blog b= and (1) 0blog= d. () ( ) ( )bb blog x y log x log y×= + e. () ()bb bxlog log x log yy=− f. 1010()()()blog xlog xlog b= g. () ()ybblog x y log x=× munotes.in

Page 108

108 Boolean Function : is defined as the function whose Domain is an ordered n-tuples of 0’s and 1’s. The Co-Domain of the function is {0,1} . The mapping of the function can be mathematically expressed as: {}{}:0 , 1 0 , 1f→ where, {}:0 , 1nfis the cartesian product of n copies of 0, 1. Let, :a bF→ and :GA B→ be the two functions. The functions will be equal if and only if ()(),Fx Gx x X=∈ 6.2.1 Solved Examples: Example 1 : Let X = {1, 3, 5} and Y = {s, t, u, v}. Define F : X → Y by the following arrow diagram. f X Y 1 s 3 t 5 u v A. Write the domain off and the co-domain of f. B. Find f (1), f (3), and f (5). C. What is the range of f ? D. Is 3 an inverse image of s? Is 1 an inverse image of u? E. What is the inverse image of s? of u? of v? F. Represent f as a set of ordered pairs. Sol: A. Domain= {1, 3, 5} Co-Domain= {s, t, u, v} B. Referring the Arrow Diagram f ( 1 ) = v f ( 3 ) = s f ( 5 ) = v C. Range= {s, v} D. Yes, 3 is an inverse image of s. No,1 is not an inverse image of u. E. Inverse image of s is 3. Inverse image of u is φ. Inverse image of v is 5. F. The ordered pairs are f = {(1, v); (3, s); (5, v)} munotes.in

Page 109

109 Example 2 : Let A = {1, 2, 3, 4, 5} and define a function F : P(A) → Z as follows: For all sets X in P(A), Find the following: A. F({1, 3, 4}) B. F({2, 3}) C. F({2, 3, 4, 5}) D. F(φ) Sol: In the given function, the Domain is the elements of the Power Set of A (P(A)). A. F({1, 3, 4}) = 0 (Number of Element= 3 (Odd)) B. F({2, 3}) = 1 (Number of elements= 2 (Even)) C. F({2, 3, 4, 5}) = 1 (Number of elements= 2 (Even)) D. F(φ) = 1 (Number of elements= 0 (Even)) Example 3 Let J5 = {0, 1, 2, 3, 4}, and define functions f : J5 → J5 and g : J5 → J5 as follows: For each x ∈ J5, f(x) = (x + 4)2 mod 5 and g(x) = (x 2 + 3x + 1) mod 5 Is f = g? Explain. Sol: Given: J5 = {0, 1, 2, 3, 4}, f(x) = (x + 4)2 mod 5 and g(x) = (x2 + 3x + 1) mod 5. Substituting each elements present in J5 in f(x) and g(x). At x=1 = (1 + 4)2 mod 5 = 25 mod 5 =0 At x=2 f(x) = (2 + 4)2 mod 5 = 36 mod 5 =1 At x=3 f(x) = (3 + 4)2 mod 5 = f(x) = 49 mod 5 =4 At x=4 f(x) = (4 + 4)2 mod 5 = 64 mod 5 =4 At x=5 f(x) = (5 + 4)2 mod 5 = 81 mod 5 =1 Similarly for g(x). At x=1 g(x) = (12 + 3(1) + 1) mod 5
munotes.in

Page 110

110 = 5 mod 5 =0 At x=2 g(x) =(22 + 3(2)+1) mod 5 = 11 mod 5 =1 At x=3 g(x) =(32 + 3(3)+1) mod 5 = 19 mod 5 =4 At x=4 g(x) =(42 + 3(4)+1) mod 5 = 29 mod 5 =4 At x=5 g(x) =(52 + 3(5)+1) mod 5 = 41 mod 5 =1 Since each element of J5 is providing outputs in f(x) which are equal to g(x). Hence, f=g. Example 4 : Let F and G be functions from the set of all real numbers to itself. Define the product functions F · G : R → R and G · F : R → R as follows: For all x ∈ R (F · G)(x) = F(x) · G(x) (G · F)(x) = G(x) · F(x) Does (F · G)(x) = (G · F)(x)? Explain Sol: Given: (F · G)(x) = F(x) · G(x) and (G · F)(x) = G(x) · F(x) Since, multiplication follows Commutative Property a · b = b· a Hence, F(x) · G(x) = G(x) · F(x) Therefore, it can be concluded that (F · G)(x) = (G · F)(x) Example 5 F i n d e x a c t v a l u e s f o r e a c h o f t h e f o l l o w i n g q u a n t ities. Do not use a calculator. A. log381 Sol: 81 = 34 481 333log log=by using the following property: () ()ybblog x y log x=×) where b= 3, x= 3 and y= 4. ()343log=× but, ()1blog b=Hence, ()331log= =4 B. 21024log Sol: 101024 2= 10221024 2log log= munotes.in

Page 111

111 by using the following property() ()ybblog x y log x=×where2bx= and 10y= ()210 2log=× but, ()1blog b=Hence, ()221log= = 1 0 C. 3127log Sol: 327 3= = 3331127 3log log  =     by using the following property: () ()bb bxlog log x log yy=− where b= 3, x= 1 and y= 27. ()()33313log log− but, ()10blog=Hence, ()310log= ()333log=− by using the following property: () ()ybblog x y log x=×where b= 3, x= 3 and y= 3. ()333log=− × but, ()1blog b=Hence, ()221log= = - 3 Example 6 I f b a n d y a r e p o s i t i v e r e a l n u m b e r s s u c h t h a t l o gb(y) = 2, what is logb 2 (y)? Sol: Given: ()2blog y= But according to the property, ()()()loglogbxlog xb= Hence, ()()()loglogbylog yb= Therefore, ()()log2logyb= Similarly, ()()()22loglogbylog yb= from the property, () ()ybblog x y log x=× munotes.in

Page 112

112 ()()()2log2l o g ( )logyl o g ybb=× ()12l o g ( )log yb=× but, ()2log( )log yb= ()212log( ) 2log yb=× =1 Example 7 : Draw arrow diagram for the Boolean function defined by the following input/output table. Input Output P Q R 1 1 0 1 0 1 0 1 0 0 0 1 Sol: According to the Table given above, the Boolean functions have been defined using 3 variables in which 2 are used in the Input and 1 has been used as an Output. Thus the domain will be the Combinations formed by 0’s and 1’s in the Input and Co-Domain will be 0 and 1. Domain: {00, 01, 10, 11} Co-Domain: {0, 1} Function: Boolean Hence, The arrow diagram will be: B o o l e a n Input Output 1 1 0 1 0 1 0 1 0 0 munotes.in

Page 113

113 Example 8 Student A tries to define a function g : QZ→by the rule mgm nn=− for all integers m and n with n 6= 0. Student B claims that g is not well defined. Justify student B’s claim. Sol: Given: Student A defined the following function: mgm nn=− Let 12x=and 36y= According to the divisibility theorem, 1326g= but according to the definition, 112 12g=− = − 336 36g=−= − Since −1 ≠ −3 Hence, the function defined by Student A is wrong. Therefore, Student B’s claim is Correct. 6.3 ONE-ONE, ONTO AND INVERSE FUNCTION The type of mapping done by a function from Domain to Co-Domain are: One-One: A l l t h e e l e m e n t s i n t h e d o m a i n i s m a p p e d w i t h e x a ctly one element of the Co-domain. It is also termed as Bijective. It can be mathematically defined as: A Function f : X → Y w i l l b e a O n e - O n e function if and only if: ()()fa fb= a=b a and bX∈ F P Q P 0 q 0 P 1 q 1 P 2 q 2 Fig. 6.3.1 A One-One Function F munotes.in

Page 114

114 F P Q P 0 q 0 P 1 q 1 P 2 q 2 Fig. 6.3.2 Not a One-One Function F F P Q P 0 q 0 P 1 q 1 P 2 P 3 q 2 Fig. 6.3.3 Not a One-One Function Onto: All the elements in the Co-Domain should have at-least on element in Domain. It is also termed as Surjective. It can be mathematically expressed as: A function f defined as f : X → Y is an Onto function if and only if: ∀y ∈ Y, ∃x ∈ X such that f(x) = y. F P Q P 0 q 0 P 1 q 1 P 2 q 2 Fig. 6.3.4 An ONTO Function F munotes.in

Page 115

115 F P Q P 0 q 0 P 1 q 1 P 2 q 2 Fig. 6.3.5 Not an ONTO Function F P Q P 0 q 0 P 1 q 1 P 2 P 3 q 2 Fig. 6.3.6 An ONTO Function Note: If a Function possess both One-One and Onto, then the function will be considered as One-One Correspondence Inverse: If a function f is defined as f : X → Y i s a O n e - O n e correspondence, then the function f−1 : Y → X will be defined as an Inverse Function such that: f−1(y) = x. P F Q P0 Q0 Fig. 6.3.7 Inverse Function Arrow Diagram 6.3.1 Solved Examples: Example 1. All but two of the following statements are correct w ay s t o express the fact that a function f is onto. Find the three that are correct. A. f is onto ⇐⇒ e v e r y e l e m e n t i n i t s c o - d o m a i n i s t h e i m a g e o f s o me element in its domain. B. f is onto ⇐⇒ every element in its domain has a corresponding image in its co-domain. munotes.in

Page 116

116 C. f is onto ⇐⇒∀y ∈ Y, ∃x ∈ X such that f(x) = y. D. f is onto ⇐⇒∀x ∈ X, ∃y ∈ Y such that f(x) = y. E. f is onto ⇐⇒ the range of f is the same as the co-domain of f . Sol: A function is an Onto if and only if all the elements of co-domain are mapped (having images) to at least one element in the Domain. Therefore, it can be concluded that the Range of the function will be equal to the Co-Domain. Hence, the correct statements are (a), (c) and (e). Example 2. L e t X = { 1, 5 , 9 } a n d Y = { 3 , 4 , 7} . D efi n e f : X → Y by specifying that. f (1) = 4, f (5) = 7, f (9) = 4. I s f one-to-one? I s f onto ? Explain your answers. Sol: Given: X = {1, 5, 9} and Y = {3, 4, 7}, f : X → Y such that f (1) = 4, f (5) = 7, f (9) = 4. The following function is not a One-One function because two differ-ent values of x (1 and 9) are having same value of y (4). The following function is not an Onto function because y=3 is not having any image in X (Domain). Example 3. Define g : Ƶ → Ƶ by the rule g(n) = 4n − 5, for all integers n A. Is g one-to-one? Prove or give a counter example. B. Is g onto? Prove or give a counter example. Sol: Given: g : Ƶ → Ƶ defined as g(n) = 4n – 5 A. To check whether the g(n) is One-One function, let us consider two integers m and n such that m and n ∈ Z and g(m) = g(n). = 4 m − 5 = 4 n − 5 = 4 m = 4 n = m = n Since, m = n if g(m) = g(n). Hence g(n) is One-One Function. B. To check whether the g(n) is Onto function,let y be an integer such that g(n) = y. 4 n − 5 = y 4 n = y + 5 54yn+= Since 54yn+=is not an integer for any value of y, munotes.in

Page 117

117 Thus, all the integer value will not be have the corresponding image in the Domain. Hence, g(n) is not an Onto function. Example 4. Define G : R → R b y t h e r u l e G ( x ) = 2 − 3 x f o r a l l r e a l numbers x. A. Is G one-one? Prove or give a counter example. B. Is G onto? Prove or give a counter example. Sol: A. To check whether the G(x) is One-One function, let us consider two integers m and n such that m and n ∈ R and G(m) = G(n). = 2 − 3 m = 2 − 3 n = − 3 m = − 3 n = m = n Since, m = n if G(m) = G(n). Hence G(x) is One-One Function. B. To check whether the G(x) is Onto function,let y be a Real number such that G(x) = y. 2 − 3 x = y 3 x = 2 – y 23yx−= Since 23y− is a Real number for any value of y, Thus, all the Real number will have the corresponding image in the Domain. Hence, G(x) is an Onto function. Example 5. Function f is defined on a set of real numbers. Determine whether or not f is one-to-one and justify your answer. A. ()21xfxx=+for all real numbers x Sol: To check whether the f(x) is One-One function, let us consider two integers m and n such that m and n ∈ R and f(m) = f(n). 2211mnmn=++ m × ( n2 + 1) = n × (m2 + 1) m × ( n ) 2 + m = n × (m) 2 + n Since, m ≠ n if f(m) = f(n). Hence f(x) is not One-One Function. ()31xfxx−=for all real numbers x Sol: To check whether the f(x) is One-One function, let us consider two integers m and n such that m and n ∈ R and f(m) = f(n). munotes.in

Page 118

118 31 3 1mnmn−−= n × ( 3 m − 1 ) = m × ( 3 n − 1 ) n × ( 3 m ) − n = m × ( 3 n ) − m 3 m n − n = 3 m n − m n = m Since, m = n if f(m) = f(n). Hence f(x) is a One-One Function. Example 6 Let S be the set of all strings of 0’s and 1’s, and define :nonnegIS→Ζ by l(s) = the length of s, for all strings s in S. A. Is l one-to-one? Prove or give a counterexample. B. Is l onto? Prove or give a counterexample. Sol: Given: l(s) = the length of s, for all strings s in S. A. Let a=101 and b=110. The length of ’a’ and ’b’ are 3. S i n c e , t h e d e fi n i t i o n o f l ( s ) = t h e l e n g t h o f s , f or all strings s in S . A n d i n t h i s c a s e , l ( a ) = l ( b ) b u t ab≠ T h u s v i o l a t i n g t h e b a s i c d e fi n i t i o n o f O n e - O n e F u n ction. B. The function is mapped as: :nonnegIS→Ζ. Hence all the the non-negative integers are having an image in its domain value. T h e r e f o r e , l(s) is an Onto Function. Example 7.Let S be the set of all strings in a’s and b’s, and define C : S → S by: C(s) = as, for all s ∈ S.(C is called concatenation by a on the left.) A. Is C one-to-one? Prove or give a counter example. B. Is C onto? Prove or give a counter example. Sol: Given: C(s) = as, for all s ∈ S.(C is called concatenation by a on the left.) A. In One-One function, all the domain value should be m a p p e d w i t h exactly one element in the Co-Domain. But, in the function defined by C : S → S the string s=a will not get mapped to any of the element in the Co-Domain. Hence, the function is not One-One Function. B. In Onto function, all the Co-Domain value should h a v e a t l e a s t o n e image in the Domain. B u t , i n t h e f u n c t i o n d e fi n e d b y C : S → S the string s=a will not have any image Domain. Hence, the function is not an Onto Function. Example 8. Define G : R × R → R × R as follows: G(x, y) = (2y, −x) for all (x, y) /g19698 R × R. A. Is G one-to-one? Prove or give a counter example. munotes.in

Page 119

119 B. Is G onto? Prove or give a counter example. Sol: Given: G(x, y) = (2y, −x) for all (x, y) /g19698 R × R. A. To check whether the G(x, y) is One-One function, let us consider two pairs of integers m, n and a, b such that (m, n) and (a, b) /g19698 R × R and G(m, n) = G(a, b). 2n = 2b n = b Similarly, − m = − a m = a Since, m = a and n = b if G(m, n) = G(a, b). Hence G (x, y) is One-One Function. B. To check whether the G (x, y) is Onto function, let (u, v) be the Real number pair such that G (x) = (u, v). 2 y = u UY=2 Similarly, − x = v x = − v Since ,2uv− are also a Real number pairs for any value of u and v, Thus, all the Real number pairs will have the corresponding image in the Domain. Hence, G(x, y) is an Onto function. 6.4 COMPOSITION OF FUNCTION In a function, the mapping is done between Domain and Co-Domain. But, if there are three sets A,B and C such that the a function f is defined f : A → B and an another function g is defined g : B → C and the range of the function f is equal to the Domain of the function g, then such type of function is known as Composition of Function. It is represented as: g ◦ f : A → C The above definition can be explained by using the following Arrow Diagram. munotes.in

Page 120

120 Fig. 6.4.1 Representation of Composite Function using Arrow Diagram Theorems of Composite Functions. Theorem 1: If f is a function define from set A to set B. Let Ix be the Identity function of x and Iy be the Identity function of y then: f ◦ Ix = f and Iy ◦ f = f Theorem 2 If a function f : X → Y whose inverse is defined as f−1 : Y → X then: f ◦ f−1 = Ix and f−1 ◦ f = Iy Where, Ix and Iy are Identity functions of x and y respectively. Theorem 3 If a function f : X → Y is a One-One function and an another function g : Y → Z is also a One-One function, then g ◦ f : X → Z will be a One-One function. Theorem 4 I f a f u n c t i o n f : X → Y i s a n O n t o f u n c t i o n a n d a n a n o t h e r function g : Y → Z is also an Onto function, then g ◦ f : X → Z will be an Onto function. 6.4.1 Solved Examples: Example 1. F unctions f and g are defi ned by arrow diag rams. F ind g ◦ f and f ◦ g and determine whether g ◦ f equals f ◦ g. f y X X X X 1 1 1 1 3 3 3 3 5 5 5 5 Sol: From the above arrow diagram: g ◦ f(1) = 1 g ◦ f(3) = 5 g ◦ f(5) = 3
munotes.in

Page 121

121 Similarly, f ◦ g(1) = 3 f ◦ g(3) = 1 f ◦ g(5) = 5 Since, the output of g ◦ f and f ◦ g are not equal hence, g ◦ f ≠ f ◦ g Steps to map the composite functions using arrow diagram. f g X X X 1 1 1 3 3 3 5 5 5 C. find the output in the direction of the arrowheads of mapping.For eg. in case of g ◦ f at x=1, due to function f 1 is mapped with 5 and then,due to function g 5 is mapped with 1. Hence the end product becomes 1. Therefore, g ◦ f(1) = 1. f g X X X 1 1 1 3 3 3 5 5 5 In this method the complete arrow diagram has been shown below. f g X X X 1 1 1 3 3 3 5 5 5 Example 2. functions F and G are defined by formulas: F (x) = x3 and G(x) = x − 1, for all real numbers x. Find G ◦ F and F ◦ G and determine whether G ◦ F equals F ◦ G. Sol Given: F (x) = x3 and G(x) = x − 1. G ◦ F = G (F (x)) G ◦ F = G (x3) G ◦ F = x3 − 1 Similarly, F ◦ G = F (G(x)) F ◦ G = F ((x − 1)) F ◦ G = (x − 1)3 Since, x3 − 1 ≠ (x − 1)3 Hence, G ◦ F ≠ F ◦ G munotes.in

Page 122

122 Example 3. Define F : Z → Z and G : Z → Z by the rules F (a) = 7a and G(a) = a mod 5 for all integers a. Find (G ◦ F )(0), (G ◦ F )(1), (G ◦ F )(2), (G ◦ F )(3), and (G ◦ F )(4). Sol : Given: F (a) = 7a and G(a) = a mod 5 for all integers a. Hence, (G ◦ F ) = G (F (x)) ( G ◦ F ) = G (7a) ( G ◦ F ) = (7a mod 5) ( G ◦ F ) (0) = 7(0) mod 5 ( G ◦ F ) (0) = 0 mod 5 ( G ◦ F ) (0) = 0 ( G ◦ F ) (1) = 7(1) mod 5 ( G ◦ F ) (1) = 7 mod 5 ( G ◦ F ) (1) = 2 ( G ◦ F ) (2) = 7(2) mod 5 ( G ◦ F ) (2) = 14 mod 5 ( G ◦ F ) (2) = 4 ( G ◦ F ) (3) = 7(3) mod 5 ( G ◦ F ) (3) = 21 mod 5 ( G ◦ F ) (3) = 1 ( G ◦ F ) (4) = 7(4) mod 5 ( G ◦ F ) (4) = 28 mod 5 ( G ◦ F ) (4) = 3 Example 4. The function H and H−1 are both defined from R − {1} to R − {1} by the formula: () ()111xHx H xx−+==− for all x ∈ R − {1}. Sol: Given: () ()111xHx H xx−+==−for all x ∈ R − {1}. ()11HoH H H−−= 111xHoH Hx−+=− 1111111xxHoHxx−++−=+−− 11111xxHoHxx−++ −=+− − 122xHoH−= H ◦ H−1 = x H ◦ H−1 = Ix munotes.in

Page 123

123 Example 5. True or False? Given any set X and given any functions f : X → X, g : X → X and h : X → X, if h is one-to-one and h ◦ f = h ◦ g, then f = g. Justify your answer. Sol: Given: h is one-to-one and h ◦ f = h ◦ g Since, h is a One-One function: h(a) = h(b) if and only if a = b. But, h ◦ f = h ◦ g h ( f ( x ) ) = h ( g ( x ) ) According to the definition of One-One f ( x ) = g ( ( x ) Hence Proved. Example 6. Define f : R → R and f : R → R by the formulas: f (x) = x +3 and g(x) = -x for all x ∈ R. find g ◦ f, (g ◦ f)−1, g−1, f−1 and f−1 ◦ g−1. Sol: Given: f (x) = x +3 and g(x) = -x for all x ∈ R. g ◦ f = g(f(x)) g ◦ f = g(x + 3) g ◦ f = −(x + 3) l e t g ◦ f = −(x + 3) = y ( x + 3 ) = − y x = − y − 3 x = − ( y + 3 ) ( g ◦ f)−1 = −(y + 3) L e t g ( x ) = - x = m x = - m g − 1 = − m Let h(x) = x+3 = n x = n - 3 f−1 = n −3 f−1 ◦ g−1 = f−1 (g−1) f−1 ◦ g−1 = f−1 ((−m)) f−1 ◦ g−1 = (−m) − 3 f−1 ◦ g−1 = −(m + 3) f−1 ◦ g−1 = −(y + 3) because all the functions are defined within the same sets X. hence, f−1 ◦ g−1 = (g ◦ f)−1 6.5 SUMMARY • If a single Domain value does not have more than one number of values in the Co-Domain, then function is Valid. munotes.in

Page 124

124 • If each Domain value is mapped with exactly one Co-Domain value, then the function is known as One-One. • If each Co-domain value is mapped with at least one Domain value, then the function is known as Onto. • if f is a function then f−1 is known as Inverse function. 6.6 REFERENCES • Susanna S. Epp ” Discrete mathematics with applications.” (2010). (Chp 7) • Lipschutz, Seymour.” Schaum’s Outlines of Theory and Problems of Dis-crete Mathematics.” (2016). (Chp 3) 6.7 UNIT END EXERCISE (1) Let X = {1, 3, 5} and Y = {a, b, c, d}. Define g : X → Y b y t h e following arrow diagram. g X Y 1 a 3 b c 5 d i. Write the domain of g and the co-domain of g. ii. Find g(1), g(3), and g(5). iii. What is the range of g ? iv. Is 3 an inverse image of a? Is 1 an inverse image of b? v. What is the inverse image of b? of c? vi. Represent g as a set of ordered pairs. (2) Indicate whether the statements in parts (a)–(d) are true or false. Justify your answers. i. If two elements in the domain of a function are equal, then their images in the co-domain are equal. ii. If two elements in the co-domain of a function are equal, then their preimages in the domain are also equal. iii. A function can have the same output for more than one input. munotes.in

Page 125

125 iv. A function can have the same input for more than one output. (3) Define a function S : Z+ → Z+ as follows: For each positive integer n, S(n) = the sum of the positive divisors of n. Find the following: i. S(1) ii. S(15) iii. S(17) iv. S(5) v. S(18) vi. S(21) (4) Let J5 = {0, 1, 2, 3, 4}, and define a function F : J5 → J5 as follows: For each x ∈ J51, F (x) = (x3 + 2x + 4) mod5. Find the following: i. F(0) ii. F(1) iii. F(2) iv. F(3) v. F(4) (5) Let J5 = {0; 1; 2; 3; 4}, and define functions h : J5 → J5 and k : J5 → J5 as follows:For each x ∈ J5, h(x) =(x+3)3 mod 5 and k(x) =(x3 +4x2 + 2x + 2) mod 5. Is h=k? Explain. (6) Let F and G be functions from the set of all real numbers to itself. Define new functions F − G : R → R and G − F : R → R as follows: For all x ∈ R, (F − G)(x) = F (x) − G(x) (G − F )(x) = G(x) − F (x) Does F − G = G − F ? Explain. (7) If b and y are positive real numbers such that ()1log yb why? (8) Let S be the set of all strings of a’s and b’s. Define f : S → Z a s follows: For each string s in S. Find f(aba), f(bbab) and f(b). What is the range of f ? (9) Draw arrow diagram for the Boolean function defined by the following input/output table. Input Output P Q R S 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1
munotes.in

Page 126

126 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 (10) Student C tries to define a function h : Q → Q b y t h e r u l e 2mmgnn= for all integers m and n with n ≠ 0. Student D claims that h is not well defined. Justify student D’s claim. (11) Fill in each blank with the word most or least. i. A function F is one-to-one if, and only if, each element in the co-domain of F is the image of at _______one element in the domain of F. ii. A function F is onto if, and only if, each element in the co-domain of F is the image of at ___one element in the domain of F. (12) Define g : X → Y by specifying that g(1) = 7, g(5) = 3, g(9) = 4. Is g one-to-one? Is g onto? Explain your answers. (13) Define G : R → R by the rule G(x) = 4x − 5 for all real numbers x. Is G onto? Is G One-One? Prove or give a counterexample. (14) Define H : R → R by the rule H(x) = x2, for all real numbers x. i . I s H o n e - t o - o n e ? P r o v e o r g i v e a c o u n t e r e x a m p l e. ii. Is H onto? Prove or give a counterexample. (15) Define F : Z → Z by the rule F (n) = 2 − 3n, for all integers n. i . I s F o n e - t o - o n e ? P r o v e o r g i v e a c o u n t e r e x a m p l e. ii. Is F onto? Prove or give a counterexample. (16) A function f is defined on a set of real numbers. Determine whether or not f is one-to-one and justify your answer. i. ()1xFxx+=, for all real numbers x ≠ 0. ii. ()11xFxx+=−, for all real numbers x ≠1 (17) Define Floor: R → Z by the formula Floor x = xx=, for all real numbers x. i. Is Floor one-to-one? Prove or give a counterexample. ii. Is Floor onto? Prove or give a counterexample. (18) Let S be the set of all strings of 0’s and 1’s, and define D : S → Z as follows: munotes.in

Page 127

127 For all s ∈ S,D(s) = the number of 1’s in s minus the number of 0’s in s. i. Is D one-to-one? Prove or give a counterexample. ii. Is D onto? Prove or give a counterexample. (19) Define F : P({a, b, c}) → Z as follows: For all A in P({a, b, c}), F (A) = the number of elements in A. i. Is F one-to-one? Prove or give a counterexample. ii. Is F onto? Prove or give a counterexample. (20) Define H : R × R → R × R as follows: H ( x , y ) = ( x + 1 , 2 − y ) f o r a l l ( x , y ) ∈ R × R. i. Is H one-to-one? Prove or give a counterexample. ii. Is H onto? Prove or give a counterexample. (21) Functions f and g are defined by arrow diagrams. Find g ◦ f and f ◦ g a n d d e t e r m i n e w h e t h e r g ◦ f equals f ◦ g. f g X X X X 1 1 1 1 3 3 3 3 5 5 5 5 (22) Define H : Z → Z and K : Z → Z by the rules H(a) = 6a and K(a) = a mod 4 for all integers a. Find (H ◦ K)(0), (H ◦ K)(1), (H ◦ K)(2), (H ◦ K)(3),. (23) Define L : Z → Z and M : Z → Z by the rules L(a) = a2 and M(a) =a mod 4 for all integers a. Find (L ◦ M)(9), (M ◦ L)(9), (L ◦ M)(12), (M ◦ L)(12),. (24) The function F and F−1 a r e b o t h d e fi n e d f r o m R → R b y t h e formula:H(x) = 3x + 2, H−1(x) =23yx−=, for all x ∈ R. (25) True or False? Given any set X and given any functions f : X → X, g : X → X and h : X → X, if h is one-to-one and f ◦ h = g ◦ h, then f =g. Justify your answer. (26) If f : X → Y and g : Y → Z are functions and g ◦ f is one-to-one, must g be one-to-one? Prove or give a counterexample. (27) If f : X → Y and g : Y → Z are functions and g ◦ f is onto, must g be onto? Prove or give a counterexample. munotes.in

Page 128

128 (28) Let X = {a, c, b}, Y = {x, y, z}, and Z = {u, v,w}. Define f : X → Y a n d g : Y → Z by the arrow diagrams below. f g X Y Z a x u b y v c z w find g ◦ f, (g ◦ f) −1, g−1, f−1 and f−1 ◦ g−1 ***** munotes.in

Page 129

129 Unit IV 7 RELATIONS Unit structure 7.0 Objectives 7.1 Introduction 7. 2 An overview 7.2.1 Basic concepts related to set 7.3 Relation 7.3.1 Binary relation 7.3.2 Domain and range of a relation 7.3.3 Types of relation 7.3.4 Properties of relation 7.3.5 Representation of types of relation 7.4 Equivalence Relation 7.5 Partial Order Relation 7.5.1 Antisymmetric 7.5.2 Linear or Totally ordered relation 7.5.3 Hasse Diagram 7.6 Summary 7.7 References 7.0 OBJECTIVES After going through this unit, students will able 1. To understand the basics of relation, types of relation and properties of relation. 2. To define and provide examples of a relation 3. To determine if a binary relation is reflexive, sy mmetric, or transitive or is an equivalence relation or partial order relation 4. To apply the knowledge of relation to differentiate between equivalence relation and partial order relation 5. To draw Hasse diagram. 7.1 INTRODUCTION O f t e n i n m a t h e m a t i c s , w e c o m e a c r o s s w i t h t h e w o r d ‘ r e l a t i o n ’ . Generally speaking, by relation we usually understand some connection munotes.in

Page 130

130 between the two living or non-living things. Like the relations of mother-daughter, brother-sister, teacher-student etc. We are quite familiar with these relations. In this chapter we will learn about a new concept of “relations” in mathematics. We can also define a relationship between the two elements of a set. Associated with a relation is the act of comparing objects which are related to one another. In this chapter we first formulize the concept of a relation, various basic types and properties of relation. We will learn about well-known relations like equivalence relation and the partial order relation, linear or totally ordered relation. 7.2 AN OVERVIEW 7.2.1 Basic concepts related to set: Set: A Collection of objects is called as a set. e.g. A = {1, 3, 5, 7, 9} A is a set having objects 1, 3, 5, 7 and 9. All are odd numbers. Any object belonging to a set is called a member or an element of that set. Subset:-Let A and B be any two sets If set B contains some or all the elements of the set A then set B is called subset of A. e. g. A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} B = { 2 , 4 , 6 , 8 , 1 0 } ∴ B is subset of A B ⊆ A We can say that A is a subset of A itself. i.e. A ⊆ A. Equal Sets: Let A and B be any two sets. Two sets A & B are said to be equal if they contain the exact same elements. i.e. A ⊆ B and B ⊆ A. Symbolically, A = B ⇔ (A ⊆ B Λ B ⊆ A) Proper Subset: Let A and B be any sets. Set B is said to be proper subset of set A if B ⊆ A and B ≠ A, it is denoted by B ⊂ A. Symbolically, B ⊂ A ⇔ (B ⊆ A Λ A ≠ B) Empty set or Null set: A set which does not contain any element is called an empty set or null set. It is denoted by ϕ. Power set: For any set A, a collection or family of all subsets of A is called the Power set of A. The power set of A is denoted by p(A) or 2A If A = {a, b, c} We know that the null set ϕ and the set A are both subsets of A. ∴ p(A) or 2A = {ϕ, A, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}} munotes.in

Page 131

131 7. Cartesion Product: Let A and B be any two non empty sets. The set of all ordered pairs such that the first member of the o r d e r e d p a i r i s a n element of A and the second member is an element of B is called Cartesion Product of A and b and it is written as A X B. Symbolically, A X A = { ( x , y ) / ( x ∈A Λ y ∈ B) } e . g . I f A = { 1 , 2 , 3 } , B = { a , b } A X B = { ( 1 , a ) , ( 1 , b ) , ( 2 , a ) , ( 2 , b ) , ( 3 , a ) , (3, b)} B X A = { ( a , 1 ) , ( a , 2 ) , ( a , 3 ) , ( b , 1 ) , ( b , 2 ) , (b, 3)} 7.3 RELATION The word Relation suggests some familiar examples of relations such as the relation of father to daughter, mother to son, brother to sister etc. We know the relations such as “greater than”, “less than” or “equal to” between to two real numbers in mathematics. 7.3.1 Binary Relation: These examples suggest relationships between two objects. Relations may be present between objects of the same set or between objects of two or more sets. Here, we consider relation between two objects, called binary relations. Any set of ordered pairs defines a binary relation. We would call a binary relation simply as a relation. Sometimes it’s convenient to express the fact that a particular ordered pair, let’s say (a, b) ∈ R , w h e re R i s r e l a t i o n , by w r i t i n g a R b w h i c h m ay be read as “a is in relation R to b”. A binary relation R on a single set A is a subset of A X A. We would call a binary relation simply as a relation. Sometimes it‟s convenient to express the fact that a particular ordered pair, let‟s say (a, b) ∈ R, where R is relation, by writing aRb which may be read as “a is in relation R to b”. A binary relation R on a single set A is a subset of A X A. For two distinct sets, A and B, A relation R from a set A to a set B is a subset of A X B. If (a, b) ∈ to R then we can say that a is related to b and write aRb. If (a, b) ∉ R then we can say that a is not related to b. munotes.in

Page 132

132 e.g.: Let A = {2, 3, 9} and B = {2, 4, 8} and let R be a relation given by, R = {(a, b) | a < b} Then, R = { (2, 4), (2, 8), (3, 4), (3,8)} 7.3.2 Domain and Range of a Relation: If there are two sets A and B and relation R have order pair (x, y) then the set of all first coordinators of elements of R is called the domain of R, written as dom (R) and the set of al second coordinates of R is called the range of R, written as Range (R) ∴ dom (R) = {a: (a, b) ∈ R} and Range (R) = {b: (a, b) ∈ R} e.g.: Let A = {2, 3, 9} and B = {2, 4, 8} and let R be a relation given by, R = {(a, b) | a > b} Then, R = {(3, 2), (9, 2), (9, 4), (9, 8)} dom(R) = {3, 9} Range = {2, 4, 8} 7.3.3 Types of Relation: 1. Empty Relation ( or void relation): A relation R in a set A is called an empty relation, if no element of A is related to any element of A. Such a relation is denoted by ϕ. T h u s R = ϕ⊆ A X A e . g . : A = { 1 , 2 , 3 } R = { ( a , b ) | a - b = 8 } S i n c e n o e l e m e n t i n ( a , b ) ∈ A X A satisfies the property a – b = 8. ∴ R is an empty relation in A R = ϕ⊆ A X A 2. Universal Relation: A universal (or full relation) is a type of relation in which each element of a set is related to every element of a set. Thus R = (A X A) ⊆ (A X A) e . g . : A = { a , b , c } t h e n R = A X A = {(a, a), (a, b), (a, c), (b, a), (b, b), (b, c), (c, a), (c, b), (c, c)} is the universal relation in A. 3. Identity Relation: If every element of a set is related to itself only, then it is called identity relation. e . g . : I n a s e t A = { x , y , z } t h e i d e n t i t y r e l a t i o n will be I = { ( x , x ) , ( y , y ) , ( z , z ) } F o r i d e n t i t y r e l a t i o n , I = { ( a , a ) | a ∈ A} 4. Inverse Relation : The inverse relation R′ of a relation R is defined as R′ = {(b, a) | (a, b) ∈ R} munotes.in

Page 133

133 e . g : I f R = { ( a , b ) , ( c , d ) } t h e n R′ = {(b, a), (d, c)} 7.3.4 Properties of Binary Relation: 1. Reflexive: Let R be a relation on set X. R is reflexive if (x, x) ∈ R for every x ∈ X. i.e. ∀ x ∈ X, xRx e.g: The relation ≤ is reflexive in set of real numbers but relation < is not reflexive.150pdf 2. Symmetric: Let R be a relation on set X. R is symmetric if for all x, y ∈ X such that (x, y) ∈ R then, (y, x) ∈ R. i . e . ∀ x, y ∈ X, whenever xRy then yRx e . g : T h e r e l a t i o n ≤ a n d < i s n o t s y m m e t r i c i n s e t o f r e a l n u m b e r s while the relation of equality is 3. Transitive: Let R be a relation on set X. R is transitive if for all x, y, z ∈ X if (x, y) ∈ R and (y, z) ∈ R then, (x, z) ∈ R. i . e . ∀ x, y, z ∈ X, whenever xRy and yRz then xRz e . g : T h e r e l a t i o n ≤ , < and = are transitive in the set of real numbers. 4. Irreflexive : Let R be a relation on set X. R is irreflexive if for every x ∈ X, (x, x) ∉R Representation of types of Relations: Relation type Condition Empty Relation R = ϕ⊆ A X A Universal Relation R = (A X A) Identity Relation I = {(a, a) | a ∈ A} Inverse Relation R′ = {(b, a) | (a, b) ∈ R} Reflexive Relation aRa, ∀a∈A Symmetric Relation aRb ⇒bRa, ∀ a, b ∈A Transitive Relation aRb , bRc ⇒aRc, ∀ a, b, c ∈A Exercise: Q.1 State the domain and range of the following relation. a) (3, -4), (5, 7), (4, -2), (7, 7), (3, 4)} b) {(-4, 6), (-2, 6), (-3, 6), (1, 6), (0, 6), (3, 6)} Q.2 State whether True or False a) Let A be the set of all students of boys‟ school. The relation R on A given by R = {(a, b)| a is sister of b} Therefore R is empty relation. munotes.in

Page 134

134 b) Let A be the set of all students of girls school. The relation R on A given by R = {(a, b)| difference between the height of a and b is less than 2 meters}. Therefore R is universal Relation. c) Every identity relation on a non empty set A is a r e f l e x i v e relation, but not conversely. Q.3 Identify the relation. a) Every element is related to itself b) Every element is related to itself only c) Let A be the set of two male children in a family and R be a relation defined on set A as R = “ is brother of”. d) If R = {(1, 1), (2, 3), (3, 4), (2, 7)} R′ = {(1, 1), (3, 2), (4, 3), (7, 2)} F i n d d o m a i n ( R′) = range (?) R a n g e ( R′) = domain (?) Example 1: Let A = {1, 2, 3} and R be the relation defined on set A as R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1), (2, 3), (3, 2)}. Verify R is symmetric. Soln: A = { 1 , 2 , 3 } R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1), (2, 3), (3, 2)}. B y d e f i n i t i o n o f s y m m e t r i c r e l a t i o n , I f ( a , b ) ∈ R then (b, a) ∈ R ∴ f r o m a b o v e r e l a t i o n , ( 1 , 1 ) ∈ R ⇒ (1, 1) ∈ R ( 2 , 2 ) ∈ R ⇒ (2, 2) ∈ R ( 3 , 3 ) ∈ R ⇒ (3, 3) ∈ R ( 1 , 2 ) ∈ R ⇒ (2, 1) ∈ R ( 2 , 1 ) ∈ R ⇒ (1, 2) ∈ R ∴ R is symmetric Example 2: Let A = {1, 2, 3} and R be the relation defined on set A as “ is less than” and R = { (1, 2), (2, 3), (1, 3)}. Verify R is transitive. Soln: A = {1, 2, 3} R = { ( 1 , 2 ) , ( 2 , 3 ) , ( 1 , 3 ) } a n d r e l a t i o n i s l e ss than. L e t a = 1 , b = 2 a n d c = 3 By definition of transitive relation, for all x, y, z ∈ X if (x, y) ∈ R and (y, z) ∈ R then, (x, z) ∈ R. ∴ (1, 2) ∈ R and (2, 3) ∈ R ⇒ (1, 3) ∈ R ∴ R is transitive. Example 3: Let S be the set of all real numbers and let R be a relation in S, defined by R = {(a, b) | a ≤ b}. Which properties satisfy by the relation. munotes.in

Page 135

135 Soln: S b e t h e s e t o f a l l r e a l n u m b e r s R = { ( a , b ) | a ≤ b} 1. Reflexive: Let a be any real number. T h e n a ≤ a ⇒ (a, a) ∈ R T h u s ( a , a ) ∈ R ∀ a ∈ S ∴ R is reflexive. 2. Symmetric: consider 4, 6 ∈ S ∴ (4, 6) ∈ R as 4 < 6 B u t ( 6 , 4 ) ∉ R as 6 ≤ 4 is not true. ∴ R is not symmetric 3. Transitive : Let a, b, c be real numbers such that (a, b) ∈ R and ( b, c) ∈ R T h e n ( a , b ) ∈ R and ( b, c) ∈ R ⇒ a ≤ b and b ≤ c ⇒ a ≤ c ⇒ (a, c) ∈ R ∴ R is transitive. ∴ R satisfies reflexive and transitive but not symmetric. Exercise: Q.1 Let A = {1, 2, 3,4} and define relations are as follows. Check which relations are reflexive relations? a ) R 1 = { ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 4 , 4 ) } b ) R 2 = { ( 1 , 1 ) , ( 1 , 4 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 4 , 3 ) } [ n o t R e f l e x i v e ] c ) R 3 = { ( 1 , 1 ) , ( 1 , 2 ) , ( 2 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , (4, 4)} d ) R 4 = { ( 1 , 3 ) , ( 2 , 2 ) , ( 2 , 4 ) , ( 3 , 1 ) , ( 4 , 4 ) } [not Reflexive] Q. 2. Let N be the set of all natural numbers and let R be a relation in N, defined by R = {(a, b) | a is a factor of b}. Show that R is reflexive, transitive but not symmetric. 7.4 EQUIVALENCE RELATION A relation R in a set X is said to be an equivalence relation if it is reflexive, symmetric and transitive. Example1: Let X = {1, 2, 3, 4} and R = {(1, 1), (1, 4), (2, 2), (2, 3), (3, 2), (3, 3), (4, 1), (4, 4)} show that it is equivalence relation. Soln: T o s h o w R i s a n e q u i v a l e n c e r e l a t i o n , w e h a v e t o show R should satisfies following properties. munotes.in

Page 136

136 1. Reflexive: X = {1, 2, 3, 4} ( 1 , 1 ) ∈ R ( 2 , 2 ) ∈ R ( 3 , 3 ) ∈ R ( 4 , 4 ) ∈ R ∴∀ a ∈ X, (a, a)∈R ∴ R is reflexive. 2. Symmetric: X = {1, 2, 3, 4} ( 1 , 1 ) ∈ R ⇒ (1, 1) ∈ R ( 1 , 4 ) ∈ R ⇒ (4, 1) ∈ R ( 2 , 2 ) ∈ R ⇒ (2, 2) ∈ R ( 2 , 3 ) ∈ R ⇒ (3, 2) ∈ R ( 3 , 3 ) ∈ R ⇒ (3, 3) ∈ R ( 4 , 1 ) ∈ R ⇒ (1, 4) ∈ R ( 4 , 4 ) ∈ R ⇒ (4, 4) ∈ R ∴ R i s s y m m e t r i c . 3. Transitive: X = {1, 2, 3, 4} ( 1 , 1 ) ∈ R, (1,4) ∈ R ⇒ (1, 4) ∈ R ( 1 , 4 ) ∈ R, (4,1) ∈ R ⇒ (1, 1) ∈ R ( 2 , 2 ) ∈ R, (2,3) ∈ R ⇒ (2, 3) ∈ R ( 2 , 3 ) ∈ R, (3,3) ∈ R ⇒ (2, 3) ∈ R ( 3 , 2 ) ∈ R, (2,2) ∈ R ⇒ (3, 2) ∈ R ( 3 , 3 ) ∈ R, (3,2) ∈ R ⇒ (3, 2) ∈ R ( 4 , 1 ) ∈ R, (1,1) ∈ R ⇒ (4, 1) ∈ R ( 4 , 4 ) ∈ R, (4,1) ∈ R ⇒ (4, 1) ∈ R ∴R is transitive. Thus R is reflexive, s y m m e t r i c a n d t r a n s i t i v e . ∴ R is an equivalence relation. Example 2: L e t Z b e t he s e t o f a l l i n t e g e r s a n d l e t R b e a r elation in Z, defined by R = {(a, b)| (a – b) is even}. Show that R i s a n e q u i v a l e n c e relation in Z. Soln: T o s h o w R i s a n e q u i v a l e n c e r e l a t i o n , w e h a v e t o show R should satisfies following properties. 1. Reflexive: Let a be any element of Z. T h e n ( a – a ) = 0 a n d 0 i s e v e n . ∴ (a, a) ∈ R ∀ a ∈ Z. ∴ R is reflexive. 2. Symmetric: Let a, b ∈Z such that (a, b) ∈R T h e n ( a , b ) ∈R munotes.in

Page 137

137 ⇒ (a – b) is even ⇒ - (a – b) is even ⇒ (b – a) is even ⇒ (b – a) ∈ R ∴ R is symmetric. 3. Transitive: L e t a , b , c ∈Z such that (a, b) ∈R and (b, c) ∈R T h e n ( a , b ) ∈R and (b, c) ∈R ⇒ (a – b) is even and (b–c) is even ⇒ (a – b) + (b – c) is even ⇒ (a – c) is even ⇒ (a, c)∈R ∴ R is transitive. T h u s R i s r e f l e x i v e , s y m m e t r i c a n d t r a n s i t i v e . ∴ R is an equivalence relation. Example 3: Let N be the set of all natural numbers and let R be a relation on N X N, defined by (a, b)R(c, d ) ⇔ a d = b c S h o w t h a t R i s a n equivalence relation. Soln: T o s h o w R i s a n e q u i v a l e n c e r e l a t i o n , w e h a v e t o show R should satisfies following properties. 1. Reflexive: L e t ( a , b ) ∈ R then by definition, ( a , b ) R ( a , b ) a s a b = b a . ( a , b ) R ( a , b ) ∀ (a,b) ∈ R. ∴ R is reflexive. 2. Symmetric: L e t ( a , b ) ∈ R and (c, d) ∈ R ( a , b ) R ( c , d ) ⇒ ad = bc ⇒ bc = ad ⇒ cb = da ⇒ (c, b)R (d,a) ∴ R is symmetric. 3. Transitive: L e t ( a , b ) ∈ R, (c, d) ∈ R and (e,f) ∈ R, ( a , b ) R ( c , d ) a n d ( c , d ) R ( e , f ) i . e . a d = b c a n d c f = d e ⇒ adcf =bcde ⇒ (af)(cd) = (be)(cd) ⇒ af = be ⇒(a, b) R (e, f) munotes.in

Page 138

138 ∴(a, b)R(c, d ) and (c, d)R(e, f ) ⇒(a, b) R (e, f) ∴ R is transitive. T h u s R i s r e f l e x i v e , s y m m e t r i c a n d t r a n s i t i v e . ∴ R is an equivalence relation. Exercise: Q.1. Let A = {a, b, c}. Check which relation is an equivalence relation. a ) R 1 = { ( a , a ) , ( b , b ) , ( c , c ) } ] [ A n s : Y e s ] b ) R 2 = { ( a , a ) , ( b , b ) , ( c , c ) , ( b , a ) } [ A n s : Not symmetric] c ) R 3 = { ( a , a ) , ( a , c ) ( b , a ) , ( c , a ) } [ A n s : Not reflexive] d ) R 4 = { ( a , a ) , ( b , b ) , ( c , c ) , ( a , b ) , ( a , c ) (b, a), (c, a)} [Ans: Yes] e ) R 5 = A X A [ A n s : Y e s ] Q. 2. Let N be the set of natural numbers and let R b e a r e l a t i o n i n N , defined by R = {(a, b) | a- b is multiple of 3}. Check whether R is an equivalence relation or not. Q. 3 Let N be the set of natural numbers and let R b e a r e l a t i o n i n N , defined by R = {(a, b) | a- b is divisible by 2}. Check whether R is an equivalence relation or not. Q. 4 A = {0, 1, 2, 3, 4, 5, 6, 7}, R = {(x, y) |x + y = 3}.Which properties does the above relation satisfy? 7. 5 PARTIAL ORDER RELATION 7.5.1 Antisymmetric: Let R be a relation on set X. R is said to be antisymmetric relation if, for every x, y ∈ X if (x, y) ∈ R as well as (y, x) ∈ R then x = y. i . e . ∀ x, y ∈ X, whenever xRy and yRx then x = y. Partial order Relation : A binary Relation R in a set P is called a Partial order relation or a partial ordering in P iff R is reflexive, antisymmetric and transitive. It is convential to denote a partial ordering by the symbol ≤. This symbol does not necessarily mean “less than or equal to” as is used for real numbers. Since, the relation of partial ordering is reflexive, we call it a relation on set P. munotes.in

Page 139

139 If ≤ is a partial ordering relation on P, then the ordered pair (P, ≤) is called a Partially ordered set or POSET. It is denoted by (P, ≤) known as Partially Ordered Set(POSET). Note: It is not necessary to have x ≤ y a n d y ≤ x f o r e v e ry x a n d y i n a partially ordered set. Example1: L et X = {2, 3, 6, 12, 24, 36} and the relation ≤ be such that x≤y ifff x divides y. Show that (X, ≤) is Partially Ordered Relation. Soln: X = {2, 3, 6, 12, 24, 36} Relation is x divides y i. e. x | y. ∴ R = {(2, 2), (2, 6), (2, 12), (2, 24), (2, 36), (3, 3), (3, 6), (3, 12), (3, 24), (3, 36), (6, 6), (6, 12), (6, 24), (6, 36), (12, 12), (12, 24), (12, 36), (24, 24), (36, 36)} Relation is said to be partial opder relation it it is Reflexive, Antisymmetric and Transitive. 1. Reflexive: R is said to be reflexive if (x, x) ∈ R for every x ∈ X. ( 2 , 2 ) ∈ R ( 3 , 3 ) ∈ R ( 6 , 6 ) ∈ R ( 1 2 , 1 2 ) ∈ R ( 2 4 , 2 4 ) ∈ R ( 3 6 , 3 6 ) ∈ R 2. Antisymmetric: R is said to be antisymmetric relation if, for every x, y ∈ X if (x, y) ∈ R as well as (y, x) ∈ R then x = y. In this relation, ( 2 , 2 ) ∈ R and (2, 2) ∈ R then 2 = 2 ( 3 , 3 ) ∈ R and (3, 3) ∈ R then 3 = 3 ( 6 , 6 ) ∈ R and (6, 6) ∈ R then 6 = 6 ( 1 2 , 1 2 ) ∈ R and (12, 12) ∈ R then 12 = 12 ( 3 6 , 3 6 ) ∈ R and (36, 36) ∈ R then 36 = 36 3. Transitive : A relation R is said to be transitive if ∀ x, y, z ∈ X, ( x , y ) ∈ R and (y, z) ∈ R then (x, z) ∈ R In the relation, ( 2 , 2 ) ∈ R and (2, 6) ∈ R → (2, 6) ∈ R ( 2 , 6 ) ∈ R and (2, 12) ∈ R → (2, 12) ∈ R ( 2 , 1 2 ) ∈ R and (12, 24) ∈ R → (2, 24) ∈ R ( 2 , 2 4 ) ∈ R and (24, 24) ∈ R → (2, 24) ∈ R ( 2 , 3 6 ) ∈ R and (36, 36) ∈ R → (2, 36) ∈ R ( 3 , 3 ) ∈ R and (3, 6) ∈ R → (3, 6) ∈ R munotes.in

Page 140

140 ( 3 , 6 ) ∈ R and (6, 12) ∈ R → (3, 12) ∈ R ( 3 , 1 2 ) ∈ R and (12, 24) ∈ R → (3, 24) ∈ R ( 3 , 2 4 ) ∈ R and (24, 24) ∈ R → (3, 24) ∈ R ( 3 , 3 6 ) ∈ R and (36, 36) ∈ R → (3, 36) ∈ R ( 6 , 6 ) ∈ R and (6, 12) ∈ R → (6, 12) ∈ R ( 6 , 1 2 ) ∈ R and (12, 24) ∈ R → (6, 24) ∈ R ( 6 , 2 4 ) ∈ R and (24, 24) ∈ R → (6, 24) ∈ R ( 6 , 3 6 ) ∈ R and (36, 36) ∈ R → (6, 36) ∈ R ( 1 2 , 1 2 ) ∈ R and (12, 24) ∈ R → (12, 24) ∈ R ( 1 2 , 2 4 ) ∈ R and (24, 24) ∈ R → (12, 24) ∈ R ( 1 2 , 3 6 ) ∈ R and (36, 36) ∈ R → (12, 36) ∈ R ∴ The relation satisfies all three properties. ∴It is partial ordered relation. Let (P, ≤) be a partial order relation and x ∈ p, y ∈ p are said to be comparable either x ≤ y o r y ≤ x. (≤ i s n o t l e s s t h a n e q u a l t o b u t i t i s a relation (whatever it may be)) In the above example (2, 6), (3, 6), (3, 12), (3, 24), (3, 36) are comparable. But (2, 3) are not comparable as 2|3 or 3|2 is not possible. i.e. 2 doesn’t divide 3 or vice versa. 7.5.2 Linear or Totally ordered Relation: Let (P, ≤) be a poset relation. ≤ a r e s a i d t o b e l i n e a r ly r e l a t i o n i f every pair of observation of P are comparable. In that case, (P, ≤) is called as Chain. In a partially ordered set (P, ≤), an element y ∈ P is said to cover an element x ∈ P if x < y and if there does not exist any element z ∈ P such that x ≤ z and z ≤ y, that is y covers x ⇔ (x < y Λ (x ≤ z ≤ y ⇒ x = z ∨ z = y)) Sometimes the term “immediate predecessor” is also used. Note that “cover” as used here should not be confused with the “cover” of set defined in the part of set. 7.5.3 Hasse Diagram: A partial ordering ≤ on a set P can be represented by means of a diagram known as a Hasse diagram, or a partially ordered set diagram of (P, ≤). munotes.in

Page 141

141 In such diagram, each element is represented by a small circle or dot. The circle for x ∈ P is drawn below the circle for y ∈ P if x < y and a line is drawn between x and y if y covers x. If x < y but y does not cover x, then x and y are not connected directly by a single line, However, they are connected through one or more elements of P. It is possible to obtain the set of ordered pairs in ≤ from such a diagram. Example1: Let P = {1, 2, 3, 6, 12} and (P, ≤) is a partially ordered relation on relation ≤ ( l e s s t h a n a n d e q u a l t o ) . S h o w t h a t i t i s l i n e a r or totally ordered relation. Also draw Hasse diagram. Soln: P = { 1 , 2 , 3 , 6 , 1 2 } R = {(1, 1), (1, 2), (1, 3), (1, 6), (1, 12), (2, 2), (2, 3), (2, 6), (2, 12), (3, 3), (3, 6), (3, 12), (6, 6), (6, 12), (12, 12)}
Fig. 7.1 Hasse Diagram All the observations in the relations are comparable. i.e. x ≤ y. ∴ The relation is linear or totally ordered relation. Example 2: Let A = {a, b}. The relation is ⊆ defined on power set of A. Check whether this is linearly / totally ordered relation or not. Soln: A = {a, b} p(A) = { ϕ, A, {a}, {b}} B0 B1 B2 B3 Relation R = ⊆ = {(B0, B0), (B0, B1), (B0, B2), (B0, B3), (B1, B1), (B2, B1), (B2, B2), (B3, B1), (B3, B3)} 12 6 3 2 1 B1 B3 B2 B0
Fig. 7.2 Hasse Diagram
munotes.in

Page 142

142 In the relation, {a} is not subset of {b} i.e. B2 is not subset of B3 or B3 is not subset of B2. ∴ Relation is not comparable. ∴ It is not totally ordered set or linear ordered set. Example 3: Let A = { 2, 3, 6, 12, 24, 36}. Check the relation divide on set A is linear or totally ordered relation and draw its Hasse diagram. Soln: A = { 2, 3, 6, 12, 24, 36} Relation is divide relation. ∴ R = {(2, 2), (2, 6), (2, 12), (2, 24), (2, 36), (3, 3), (3, 6), (3, 12), (3, 24), (3, 36), (6, 6), (6, 12), (6, 24), (6, 36), (12, 12), (12, 24), (12, 36), (24, 24), (36, 36)} 12 6 2 3 24 36
Fig. 7.3 Hasse Diagram It is not linear or totally ordered relation because 2 does not divide 3, 3 does not divide 2, 24 does not divide 36 Example 4: L e t A b e s e t o f f a c t o r s o f p o s i t i v e i n t e g e r 3 0 . L et ≤ b e t h e relation divides i.e. ≤ = {(x, y ) | x∈ A and y∈ A Λ (x divides y }. Draw Hasse diagram. Soln: A is the set of factors of positive integer 30. ∴ A = {1, 2, 3, 5, 6, 10, 15, 30} ∴ R = {(1, 1), (1, 2), (1, 3), (1, 5), (1, 6), (1, 10), (1, 15), (1, 30), (2, 2), (2, 6), (2, 10), (2, 30), (3, 3), (3, 6), (3, 15), (3, 30), (6, 6), (6, 30), (10, 10), (10, 30), (15, 15), (15, 30), (30, 30)} Fig.
7.4 Hasse diagram
munotes.in

Page 143

143 Exercise: Q. 1 Which of the following realtion is partial order realtion? a) R = {(x, y) | x, y ∈ Z, x ≤ b} [Ans: partial order relation] b) R = {(x, y) | x, y ∈ Z, x < b} [Ans: not partial order relation] c) A= {1, 2, 3, 4}, R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)} [Ans: partial order relation] Q.2 Let A = {1, 2, 3, 6, 12, 18}. Let R be the relation “is divisor of”. Show that relation is partial ordered relation and draw its hasse diagram. Q.3 Let A = { 2, 3, 5, 6, 8, 16, 18}. (x, y)∈ R if x divides y. Check the relation divide on set A is a partial ordered relation or not. Q.4 Let A = { 1,2, 3, 4} and R = {(1, 1) and (x, y)∈ R if x divides y . Check the relation divide on set A is a partial ordered relation or not. 7.6 SUMMARY In this chapter, we learned about basics of relation, Binary relation, and types of relation and properties of relation. We now understand what theequivalence relation, partial order relation and linear or totally ordered relation is. Students differentiated between equivalence relation and partial order relation. Students could draw Hasse diagram. 7.7 REFERENCES 1. Tremblay J. P. & Manohar R., "Discrete Mathematical structure with applications to computer science", MGH, 1999. 2. Deo Narsingh., "Graph theory with applications to Engineering & Computer Science", PHI, 2000. 3. Rosen K.H., "Discrete Mathematics and Its Applications", 6/E, MGH, 2006. 4. Kolman B., Busby R.C. & Ross S., "Discrete Mathematical Structure", 5/E, PHI, 2003. 5. Liu C.L., "Elements of Discrete Mathematics", MGH, 2000. . ***** munotes.in

Page 144

144 8 GRAPHS Unit structure 8.0 Objectives 8.1 Introduction 8.2 What is Graph? 8.2.1 Definitions 8.3 Basic Properties of graph 8.4 Trails/Walk, Path, Circuit 8.5 Hamiltonian Path and Hamiltonian Circuit 8.6 Indegree and outdegree 8.7 Matrix Representation 8.7.1 Adjacency matrix 8.7.2 Incidence matrix 8.8 Isomorphism of graphs 8.9 Summary 8.10 References 8.0 OBJECTIVES After going through this unit, students will able 1. To explain the basic concepts of graph theory. 2. To describe and solve some real time problems using concepts of graph theory 3. To determine if a given graph is simple or a multigraph, directed or undirected, cyclic or acyclic 4. To represent a graph using an adjacency matrix and an incidence matrix. 5. To determine if a graph has a Hamilton path or circuit. 6. To check the isomorphism of graphs. 8.1 INTRODUCTION In mathematics, graph theory is the study of graphs w h i c h a r e mathematical structure used to give relationship between objects. Graph theory has a wide range of applications in engineering, in physical, social, and biological sciences, in linguistics and many other areas. Graph theory also plays an important role in computer science. Graphs are used to munotes.in

Page 145

145 represent networks of communication, data organization, operating system and AI. In this chapter, some basic concepts of graph theory, basic properties of graph have been introduced. The concepts such as walk, path, circuit, Hamiltonian path and Hamiltonian circuit, indegree and outdegree of graph have been discussed. Then we discussed two most frequently used matrix representation of a graph, a correspondence between graphs. 8.2 WHAT IS A GRAPH? A Graph consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph. Definition: A linear graph or simply a graph G = (V, E) consists of a set of of objects V = {v1, v2, v3,….} called vertices (nodes, point ) and another set E = { e1, e2, e3, ……..}, whose elements are called edges, such that each ek is identified with an unordered pair (vi , vj) of vertices. The vertices vi , vj a s s o c i a t e d w i t h e d g e e k a r e c a l l e d e n d vertices o f e k o r adjacentvertices. We shall assume all over that both the sets V and E of a graph are finite. It would be suitable to write a graph G as (V, E) or simply as G. In a graph G = (V, E) in which every edge is directed is called a digraph or directedgraph. A graph In which every edge is undirected is called an undirected graph. If some edges are directed and some are undirected in a graph the graph is called mixed. Fig 8.1 Directed Graph F i g : D i r e c t e d G r a p h F i g : M i x e d G r a p h Fig 8.2
munotes.in

Page 146

146 Exercise: Q.1. Draw all simple graphs of one, two, three and four vertices. Q.2. Draw a graph representing problems of: a. Two children and three games. b. Four children and four games Note that, in drawing a graph it is immaterial whether the lines are drawn straight or curve, long or short. What is important is the incidence between the edges and vertices. e.g. The two graphs shown in the following figure are same. Same graph drawn differently Fig 8.3 8.2.1 Definitions: Let (V,E) be a graph and let e1 ∈ E be a directed edge associated with the ordered pair of nodes (v1, v2). The node v1 is called the initial node of the edge e1. The node v2 is called the terminal node of the edge e1. An edge e1 ∈ E which joins the nodes v1 and v2 whether it be directed or undirected, is said to be incident to the notes v1 and v2. An edge of a graph which joins a node to itself is called a loop. In directed and undirected graphs, when there are more than one edge between pairs of nodes such edges are called parallel edges.
Fig 8.4
munotes.in

Page 147

147 In Fig (a), there are two parallel edges joining the nodes a and d while there is a loop at node b. In fig 8.4 (b), there are two parallel edges between nodes c and d. Any graph which contains some parallel edges is called a multigraph. If there is no more than one edge between a pair of nodes then such a graph is called a simple graph. A graph in which weights are assigned to every edge i s c a l l e d a weightedgraph.
Fig 8.5: weighted Graphs A vertex which is not adjacent to any other vertex is called isolated vertex. A graph containing only isolated vertices is called null graph. We can say that in a null graph, set of edges is empty. Fig 8.6 The graph in fig. 8.6 is null graph
Fig 8.7 while fig 8.7 has an isolated node v4
munotes.in

Page 148

148 8.3 BASIC PROPERTIES OF A GRAPH 1. Distance between two vertices: Distance is the number of edges in a shortest path between vertex A and vertex B. If there are more than one path onnecting two vertices, then consider the shortest path as the distance between two vertices. It is denoted by d (A, B).
Fig 8.8 Suppose, we want to find the distance between vertex A and C, then first of all we have to find the shortest path between vertex A and C. There are many paths from vertex A to vertex C: A → B→ C, length = 2 A → E → C, length = 2 A → D → E → C, length = 3 A → D → E → F→ C, length = 4 A → D → G → F→ C, length = 4 ∴ The minimum distance between vertex A and C is 2. 2. Eccentricity of a vertex: E c c e n t r i c i t y o f a v e r t e x i s t h e m a x i m u m distance between a vertex to all other vertices. It is denoted by e (V). To find the eccentricity of vertex, first find the distance from a vertex to all other vertices and the maximum distance is the eccentricity of that vertex. In the above example, if we want to find the eccentricity of vertex 'a' then: d (a, b) = 1 d (a, c) = 2, i. e (a→ b→ c , do not take path A → D → G → F→ C ) d (a, d) = 1 d (a, e) = 1 d (a, f) = 2 d (a, g)= 2
munotes.in

Page 149

149 Hence, the eccentricity of vertex 'a' is 2, which is a maximum distance from vertex a to all other vertices. Similarly, eccentricies of other vertices of the given graph are: e ( b ) = 3 e ( c ) = 3 e ( d ) = 3 e ( e ) = 2 e ( f ) = 2 e ( g ) = 3 3. Radius of Graph: T h e r a d i u s o f g r a p h i s t h e m i n i m u m e c c e n t r i c i t y from all the vertices of graph. It is denoted by r (G). From the above example, radius of the graph r (G) = 2 4. Diameter of a graph: T h e d i a m e t e r o f g r a p h i s t h e m a x i m u m eccentricity from all the vertices of graph. It is denoted by d (G). From the above example, diameter of the graph d (G) = 3. 5. Central Point: If the eccentricity of the graph is equal to its radius, then it is called as central point of the graph. i.e. if r (G) = e (V) then V is the central point of the graph. In the above example, vertex e and vertex f are central point of the graph. r (G) = e (e ) = e (f )=2 6. Centre: The set of all central point of the graph is called as Centre of the graph. In the above example, {e, f} are central point of the graph. 7. Circumference: The total number of edges in the longest cycle of the graph is called as circumference of graph. In the above example, circumference is 6, which is derived from longest path A→B→C→F→G→D→A or A →D→G→F→C→B→A or A →D→E→F→C→B→A. 8.4 TRAILS, PATH AND CIRCUIT Trail / Walk: Finite alternative sequence of vertices and edges is called walk / trail. No edge can appear more than once in the sequence. Fig. 8.9
munotes.in

Page 150

150 Walk – v1 e10 v7 e8 v2 e2 v3 Closed Walk: If initial and ending vertices are same then the walk is called closed walk. Closed Walk - v2 e2 v3 e3 v4 e5 v6 e4 v2 Open Walk: If initial and ending vertices are not same then the walk is called open walk. Open Walk – v2 e2 v3 e3 v4 e5 v6 Path: Any sequence of edges of diagram is called path. Simple Path: A path in a diagram in which the edges are all distinct is called a simple path (edge simple). Elementary Path: A p a t h i n w h i c h a l l t h e n o d e s t h r o u g h w h i c h i t traverses are distinct is called an elementary path (node simple). Note: every elementary path of a diagraph is also simple.
Fig: 8.10 Simple path 1 ) v1 e1 v2 e8 v4 e6 v1 e7 v4 e5 v3 2 ) v4 e6 v1 e1 v2 e4 v3 e3 v2 e2 v1 Elementary path: 1) v1 e1 v1 e8 v4 e5 v3 2 ) v4 e6 v1 e1 v2 e2 v3 Circuit : A path which originates and ends in the same node is a circuit or cycle. Simple circuit: A circuit is called simple circuit if its path is simple. i.e. no edge in the circuit appears more than once in the path. Elementary circuit: A circuit is called elementary if it does not traverse through any node more than once. A simple diagram which does not have any cycles (circuits) is called acyclic. From fig 8.10, Elementary Circuit: v1 e7 v4 e5 v3 e3 v2 e2 v1 Simple circuit: v1 e7 v4 e5 v3 e2 v2 e9 v2 e2 v1
munotes.in

Page 151

151 Exercise: Q.1 F i n d S i m p l e p a t h , E l e m e n t a r y p a t h a n d E l e m e n t a r y circuit from following graph. Fig 8.11 Simple path: v1 e1 v9 e4 v8 e5 v3 e10 v7 e9 v6 e8 v5 e7 v4 e6 v3 e3 v2 S i n c e v3 is repeated, it is not elementary. Elementary path: v1 e2 v2 e3 v3 e5 v8 e4 v9 N o e d g e a n d v e r t e x i s r e p e a t e d h e r e . Elementary circuit: v1 e2 v2 e3 v3 e5 v8 e4 v9 e1 v1 8.5 HAMILTONIAN PATHS AND CIRCUITS Hamiltonian circuit: A H a m i l t o n i a n c i r c u i t i n a c o n n e c t e d g r a p h i s defined as a closed walk that traverses every vertex of G exactly once, except the starting vertex at which the path also terminates. Hamiltonian Path: I f w e r e m o v e a n y o n e e d g e f r o m a H a m i l t o n i a n circuit, we are left with path. This path is called Hamiltonian Path. Note: 1. Every graph that has a Hamiltonian circuit, also has a Hamiltonian path. 2. Hamiltonian circuit in a graph on n vertices consists of exactly n edges. (a) (b) (c) 8.11.1 Figure From fig. 8.11.1 (a), Hamiltonian path: u1 u2 u3 u4 Hamiltonian Circuit: u1 u2 u3 u4 u1 From Fig 8.11.1 (b),
munotes.in

Page 152

152 Hamiltonian Circuit: u2 u3 u4 u5 u1 u2 Fig 8.11.1 (c) Hamiltonian Circuit: v1 v2 v3 v4 v7 v8 v5 v6 v1 Exercise: Q.1 Find different paths and circuits for the following graph.
Fig 8.12 8.6 INDEGREE AND OUTDEGREE For Undirected graph: Degree of vertex: Number of edges incident on vertex. For loop, we consider degree as 2. Fig 8.13 d(v1) = 2 d (v2) = 2 d (v3) = 3 + 2(loop) = 5 d(v4) = 3 d(v5) = 2 d(v6) = 0 (isolated vertex) For Directed graph: Indegree: In directed graph, the number of edges coming towards a vertex v is the indegree of v.
munotes.in

Page 153

153 Outdegree: In directed graph, the number of edges going out from a vertex v is the outdegree of v. The sum of indegree of all vertices is equal to the sum of outdegree of all vertices.
Fig. 8.14 I n d e g r e e : O u t d e g r e e: I ( v1) = 2 O (v1) = 3 I ( v2) = 2 O (v2) = 2 I ( v3) = 2 O (v3) = 2 I ( v4) = 2 O (v4) = 1 Σ I (vi) = Σ O (vi) = 8. Exercise: Find indegree and outdegree of following graphs. Q. 1 a) Fig 8.15a b) Fig 8.15b
munotes.in

Page 154

154 c) Fig 8.15c 8.7 MATRIX REPRESENTATION OF GRAPH There are two method of matrix representation. 1. Adjacency Matrix 2. Incidence Matrix 8.7.1 Adjacency Matrix: Let G = (V,E) be a simple diagraph in which V = {v1, v2, v3,……,vn) and nodes are assumed to be ordered from v1 to vn. An n X n matrix A whose elements aij are given by aij = 1 if (vi , vj) ∈ E = 0 o t h e r w i s e , , is called the adjacency matrix of the graph G. Here we plot the n X n matrix, where n is number of vertices. i.e. We take number of vertices present in the graph in row as well as in column. In the following graph, there are 5 vertices. So it is 5 X 5 matrix. If an edge is present between any pair of vertices then we put 1 otherwise we put 0 in the matrix. Consider the following directed graph.
For Directed Graph A(G) = 12345vvvvv 123450011010001010000100000110vvvvv Fig 8.16 For directed graph (Graph and matrix)
munotes.in

Page 155

155 In the above graph, there is an edge is from v1 to v3. So we put 1 from v1 to v3 in the matrix. There is no edge is from v3 to v1. So we put 0 from v3 to v1 in the matrix and so on. Consider the following undirected graph:
For Undirected Graph A(G) = abcde 2111010020100121210100210abcde Fig 8.17 For undirected graph (graph and matrix) Here, in the above graph, Here an edge is present between a to b. ∴ We put 1 from a to b as well as from b to a. There is self loop at vertex a. So we put 2 from a to a in the matrix. Also, there are two edges from b to d. So we put 2 from b to d and d to b and so on. 8.7.2 Incidence Matrix: If G be a graph having n number of vertices and e edges then n X e which is represented by A. A = [ A i j ] , n – n u m b e r o f r o w s c o r r e s p o n d s t o n u m ber of vertices. e – number of columns corresponds to e edges. a i j = 1 , i f v e r t e x v i i s i n c i d e n t o n e d g e e j = 2 , i f t h e r e i s a s e l f l o o p = 0 , o t h e r w i s e . Here we plot the n X e matrix, where n is number of vertices and e is number of edges. i.e. We take number of vertices present in the graph in row and number of edges present in the graph in column. In the following graph, there are 5 vertices and 8 edges. So we plot 5 X 8 matrix. If an edge is incident on the vertex then we put 1 otherwise we put 0 in the matrix. Consider the following directed graph.
munotes.in

Page 156

156 Fig 8.18.For directed graph (Graph and matrix) In the above graph, an edge e1 is incident on vertex v1. So we put 1 from v1 to e1 in the matrix. An edge e2 is incident on vertex v3. So we put 1 from v3 to e2 in the matrix. An edge e3 is incident on vertex v2. So we put 1 from v2 to e3 in the matrix and so on. Consider the following undirected graph:
Fig 8.19 For undirected graph (Graph and matrix) In the above graph, a self-loop e1 is incident on vertex a. So we put 2 from a to e1 in the matrix. An edge e2 is present in between vertex a and vertex b. So we put 1 from a to e2 a s w e l l a s b t o e2 i n t h e m a t r i x . A n e d g e e3 i s p r e s e n t i n between vertex a and vertex d. So we put 1 from a to e3 as well as d to e3 in the matrix and so on. Exercise: Q.1 Determine adjacency and incidence matrix for following graphs
munotes.in

Page 157

157 a)
Fig.8.20 b)
Fig 8.21 c)
Fig 8.22 8.8 ISOMORPHISM OF GRAPHS Two graphs are isomorphic if there exists a one to one correspondence between the nodes of the two graphs which preserves adjacency of the nodes as well as the direction of the edges if any. It is denoted by G1≅≅≅≅ G2 To check whether the G1 and G2 are isomorphic graphs, we have to check following conditions. 1. Equal number of vertices 2. Equal number of edges
munotes.in

Page 158

158 3. Incidence relationship should be preserved Example 1: Check whether G1 and G2 are isomorphic or not. G 1 G 2 Fig 8.23 Soln: To check graphs are isomorphic 1. In graph G1 and G2, numbers of vertices are same. 2. In graph G1 and G2, numbers of edges are same. 3. Degree of vertices in graph G1 and G2 d ( G 1 ) d ( G 2 ) d ( u1) = 2 d(v1) = 2 d ( u2) = 3 d(v2) = 3 d ( u3) = 3 d(v3) = 3 d ( u4) = 2 d(v4) = 2 In G1, vertices of degree 3 is adjacent to two vertices of degree 2. Same in G2 as well as vertices of degree 2 is adjacent to two vertices of degree 3 in both the graphs. ∴ Incidence relation is preserved. Correspondence: u1 → v1 u2 → v2 u3 → v3 u4 → v4 ∴ G1 ≅ G2 Example 2: Check whether G1 and G2 are isomorphic or not. G 1 G 2 Fig 8.24
munotes.in

Page 159

159 Soln: Number of vertices are same in G1 and G2. Number of edges are same in both the graphs. In both the graphs, there are 4 vertices of degree 3 and 2 vertices of degree 2. Also, incidence relation is preserved. In G1, vertices of degree 3 is adjacent with two vertices of degree 3 and 1 vertex of degree 2. Same in G2. The vertex of degree 2 is adjacent with vertices of degree 3 in both G1 and G2. Correspondence: u1→ v1 u2→ v2 u3→ v3 u4→ v4 ∴ G1 ≅ G2 Example 3: Check whether G1 and G2 are isomorphic or not. G 1 G 2 Fig 8.25 Soln: The number of vertices are same in G1 and G2 Number of degrees are same in G1 and G2 In G1 every vertex having 1 indegree and 1 outdegree but in G2 it is not. ∴ G1 and G2 are not isomorphic. Example 4: Check whether G1 and G2 are isomorphic or not.
G 1 G 2 Fig. 8.26
munotes.in

Page 160

160 Soln: Number of vertices are same in G1 and G2 Number of edges are same in G1 and G2 d(G1) d(G2) I(v1) = 2 O(v1) = 1 I(u1) = 2 O(u1) = 2 I(v2) = 1 O(v2) = 2 I(u2) = 2 O(u2) = 1 I(v3) = 2 O(v3) = 2 I(u3) = 2 O(u3) = 1 I(v4) = 1 O(v4) = 2 I(u4) = 1 O(u4) = 2 I(v5) = 2 O(v5) = 1 I(u5) = 1 O(u5) = 2 Correspondence: v1→ u2 v2→ u4 v3→ u1 v4→ u5 v5→ u3 ∴ G1 ≅ G2 Exercise: Check whether graphs are isomorphic or not. a) G 1 G 2 Fig 8.27 [Ans: Graphs are not isomorphic graphs] b) Fig 8.28 [Ans: Graphs are isomorphic graphs] c) G 1 G 2 Fig 8.29 [Ans: Graphs are isomorphic graphs]
munotes.in

Page 161

161 d)
G 1 G 2 d) Fig 8.30 [Ans: Graphs are not isomorphic graphs ] Example 1: P r o v e t h a t t h e s u m o f d e g r e e o f v e r t i c e s o f a n o n directed graph G is twice the number of edges in G. i.e. Σ d(v) = 2E This is called Hand Shaking Lemma. Proof : Let G be a graph with vertex and edges i.e. G (V,E). The number of incident pairs (v, e) where e is an edge and v is a vertex. Vertex v belongs to d(v) pairs where degree is number of edges incident to it. ∴ T h e n u m b e r o f i n c i d e n t p a i r i s t h e s u m o f d e g r e e since every edge is incident with exactly two vertices, each edge gets counted twice, once at each end. Thus the sum of degrees is equal to twice the number of edges. Σ d(v) = 2E e.g: Consider the following graph.
Fig 8.31
munotes.in

Page 162

162 The number of edges in G are 10 and total degree of graph is d ( G ) = d ( v1) + d(v2) + d(v3) + d(v4) + d(v5) + d(v6) + d(v7) = 3 + 4 + 4 + 4 + 4 + 1 + 0 = 2 0 = 2 x 1 0 = 2 x E Thus the sum of degrees is equal to twice the number of edges. Example 2: A graph G has 16 edges, each vertex is of degree 2. Find the number of vertices in G. Soln: Let G be a graph with n vertices and 16 edges. Given that each vertex is of degree 2. ∴ By Hand Shaking Lemma, Σ d(v) = 2E 2n = 2xE = 2 x 16 = 32 ∴n = 32 / 2 = 16 ∴Number of vertices in G is 16. 8.9 SUMMARY In this chapter, some basic concepts of graph theory had been introduced and some results have been obtained. After reading this chapter we can understand that graphs can be used to represent almost any problems involving arrangements of objects. We can show the relationship between the objects. We also discussed the walks, paths, circuits, Hamiltonian paths and Hamiltonian circuits, matrix representation of graphs using adjacency matrix and incidence matrix. We also checked the isomorphism of graphs. 8.10 REFERENCES 1. Tremblay J. P. & Manohar R., "Discrete Mathematical structure with applications to computer science", MGH, 1999. 2. Deo Narsingh., "Graph theory with applications to Engineering & Computer Science", PHI, 2000. 3. Rosen K.H., "Discrete Mathematics and Its Applications", 6/E, MGH, 2006. 4. Kolman B., Busby R.C. & Ross S., "Discrete Mathematical Structure", 5/E, PHI, 2003. 5. Liu C.L., "Elements of Discrete Mathematics", MGH, 2000. Unit IV Chapter 9 Trees. ***** munotes.in

Page 163

163 9 TREES Unit structure 9.0 Objective 9.1 Introduction 9.2 Tree 9.2.1 Basic terms 9.2.2 Properties of Tree 9.3 Rooted Tree 9 . 3 . 1 B a s i c t e r m s a n d d e f i n i t i o n s 9 . 3 . 2 L e v e l o f n o d e 9 . 3 . 3 H e i g h t o f n o d e 9 . 3 . 4 D e p t h o f n o d e 9.4 Binary Tree 9 . 4 . 1 F u l l B i n a r y T r e e 9.5 Isomorphism of Tree 9.6 Spanning Tree and Shortest Paths 9 . 6 . 1 F u n d a m e n t a l C i r c u i t 9 . 6 . 2 M i n i m u m S p a n n i n g T r e e 9 . 6 . 3 P r i m ’ s A l g o r i t h m 9 . 6 . 4 K r u s k a l ’ s A l g o r i t h m 9.7 Summary 9.8 References 9.0 OBJECTIVE After going through this unit, students will able 1. To determine if a tree is a binary, m-ary tree or not a tree. 2. To understand the properties of trees to classify trees, identify ancestors, descendants, parents, children, and siblings. 3. To determine the level of node, the height of a tree, depth of node 4. To check the isomorphism of tree. 5. To find minimum spanning tree using Prim’s algorithm and Kruskal’s algorithm. 9.1 INTRODUCTION The concept of tree is probably the most important in graph theory. To describe any structure which involves hierarchy, trees are very useful. munotes.in

Page 164

164 Our family is the best example of tree. In this chapter we shall define a tree and its properties. There are many new terms and definitions introduced in this chapter. This chapter will discuss level of node, height of node, height of tree, depth of node as well as some concepts of binary tree. Here we also introduced isomorphism of tree, spanning tree, different spanning tree and shortest path. Prim’s Algorithm and Kruskal’s Algorithm are used for finding the Minimum Spanning Tree (MST) of a given graph. To apply these algorithms, the given graph must be weighted, c o n n e c t e d a n d undirected. 9.2 TREE Tree: A directed tree is an acyclic diagraph which has one node called its root with indegree 0, while all other nodes have indegree 1. Every directed tree must have atleast one node. An isolated node is also a directed tree. A tree is a connected undirected graph with • No simple circuit • N o m u l t i p l e e d g e s • N o l o o p Therefore, any tree must be a simple graph. 9.2.1 Basic terms: An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices It consists of nodes with a parent child relation. Examples of tree: a b c e d e f b c d (a) (b) Fig 9.1 Examples of not a tree: a b c a b d f c d (a) (b) Fig 9.2 munotes.in

Page 165

165 Figure a is not a tree because it contains a cycle or loop. Figure b is not a tree because it is not a connected graph. There is only one path between every pair of vertices in a tree. Fig 9.3 If we want to travel from b to g, there is only one path. Every edge in a tree is a bridge. If a tree has n vertices then it has n – 1 edges. Any connected graph with n vertices and n – 1 edges is also a tree Exercise: Q.1 Which of the following graphs are trees?
Fig 9.4. (a – e) [Ans: Fig 9.4. (a) & (e) are Not a tree] 9.2.2 Properties of Tree: 1. Distance : D i s t a n c e i s t h e s h o r t e s t p a t h b e t w e e n t w o v e r t i c e s. It is denoted by d (a, b). Consider the following tree. Fig 9.5
b munotes.in

Page 166

166 d (a, b) is distance between a and b. d ( a , b ) = d ( a , c ) = 1 d ( a , d ) = d ( a , e ) = d ( a , f ) 2 d ( a , g ) = d ( a , h ) = 3 d ( a , i ) = d ( a , j ) = 4 d ( a , k ) = d ( a , l ) = d ( a , m ) = 5 d ( a , n ) = d ( a , o ) = d ( a , p ) = 6 2 Eccentricity: E c c e n t r i c i t y o f a v e r t e x i s t h e m a x i m u m d i s t a n c e of a vertex from other end, either from left or right side. e ( a ) = 6 i . e . m a x i m u m d i s t a n c e f r o m p e ( b ) = 7 e ( c ) = 5 e ( d ) = e ( e ) = 6 e ( f ) = 4 i . e . m a x i m u m d i s t a n c e f r o m p e ( h ) = 4 i . e . m a x i m u m d i s t a n c e f r o m b e ( g ) = e ( i ) = e ( j ) = 5 e ( k ) = e ( l ) = e ( m ) = 6 e ( n ) = e ( o ) = e ( p ) = 7 3. Centre of Tree: Vertex having minimum eccentricity is called Centre of tree. i.e. minimum eccentricity among all. e ( f ) = e ( h ) = 4 i s t h e C e n t r e o f t r e e . 9.3 ROOTED TREE 9.3.1 Basic Terms and definitions: Rooted Tree: A r o o t e d t r e e i s a t r e e i n w h i c h o n e v e r t e x h a s b een designated as the root and every edge is directed away from the root.
Fig 9.6 Node: Element of tree Here a too are nodes.
munotes.in

Page 167

167 Root Node: Starting node of a tree. a is a root node. Tree will have only one root. Edge: Edge is link or connection between two nodes. If there are n nodes then there are (n - 1) edges in tree. Here n = 14, e = 13 Every node in the tree is having some children. If v is a vertex in a rooted tree other than the root, the parent of v is the unique vertex u such that there is a directed edge from u to v. Parent of d, e, f is b. Ancestor: Ancestor is a node higher than parent. If b is a parent of d, e and f then higher than b is a. ∴ a is ancestor for d, e, f Descendant: d, e and f are descendant of a. Siblings: Siblings means having same parent. Node g and node h are siblings because they have same parent i.e. parent c. But node f and node g are not siblings because they have different parent. Node f is having parent b and node g is having parent c. Leaf Node: Leaf nodes are those nodes which do not have any child. In the above tree, d, e, f, g, m, n, o, j, k are leaf nodes. Internal/branch nodes: t h e n o d e s w h i c h a r e n e i t h e r r o o t s n o d e n o r l e a f nodes are called internal nodes or we can say that vertices that have children are called internal nodes. In the above tree, b, c, h, i are internal / branch node. 9.3.2 Level of node: The level of any node is the length of its path from the root. Level of node b and c is 1 Level of node d, e, f, g, and h is 2. Level of node i, j and k is 3. Level of node m, n, o is 4. munotes.in

Page 168

168 Fig 9.7 9.3.3 Height of node: Longest path from leaf node to that node is height of node. Height of node B is 2 (from G→E→B, or H→E→B) Height of node A is 3 (from G→E→B→A, or H→E→B→A). Here don’t consider the path D→B→A or F→B→A because these are not longest path. Height of node H is 1 (from G→E, or H→E) Height of a tree: Height of a tree is length of the longest path between root node to any leaf node. So here height of tree is 3. 9.3.4 Depth of a node: Longest path from root node to that node. Depth (B) =1 (from A→B) Depth (C) =1 (from A→C) Depth (D) =2 (from A→B→D) Depth (E) =2 (from A→B→E) Depth (F) =2 (from A→B→F) Depth (G) =3 (from A→B→E→G) Depth (H) =3 (from A→B→E→H) Subtree: Node with child node forms subtree. Exercise: Q.1 Show root node, leaves, siblings, internal nodes, ancestors of v11, descendants of v2, subtree of node v4.
munotes.in

Page 169

169 Fig. 9.8 Q.2 Answer the following questions from the given tree.
Fig. 9.9 a) Which is the root vertex? b) Which vertices are internal vertices? c) Which are the leaf vertices? d) Which vertex is the parent of vertex h? e) Which are the children of vertex f? f) Which vertices are siblings of vertex i? g) Which vertices are ancestors of h? h) Which vertices are descendants of e? Example: Consider the following tree. Find the height and depth of tree.
fig. 9.10
munotes.in

Page 170

170 Node Height Depth a 3 0 b 1 1 c 0 1 d 2 1 e 0 2 f 0 2 g 0 2 h 1 2 i 0 3 Exercise: Find height and depth of each node of tree.
Fig. 9.11 9.4 BINARY TREE m-ary tree: An m-ary tree is a rooted tree in which each node has no more than m children.
Fig. 9.12 In this tree maximum number of children are 4. i.e. the children of vertex e are f, g, h and i. e. ∴ It is 4-ary tree. The tree is called a full m ary tree if every vertex has exactly m children.
munotes.in

Page 171

171 Fig 9.13 This is full binary tree. Internal node, i = 6 The total number of nodes in a full m ary tree with i internal nodes, n = m * I + 1 , w h e r e n = n u m b e r o f n o d e s = 2 * 6 + 1, m = 2 = 13
Fig 9.14 This is full ternary tree. Internal node, i = 5 The total number of nodes with i internal nodes, n = m * I + 1 , w h e r e n = n u m b e r o f n o d e s = 3 * 5 + 1, m = 3 = 16 Example: Draw 2 binar y tree with 6 leaves. Soln: 1 4 3 4 1 2 5 6 2 3 5 6 ( a ) ( b ) Fig. 9.15 (a) and (b) are two different binary trees with 6 leaves. These are binary trees because it has almost two children and have 6 leaves as shown in the tree.
munotes.in

Page 172

172 Note: B i n a r y t r e e w i t h n v e r t i c e s h a s ( n + 1 ) / 2 p e n d e n t v ertices. (Pendent vertex is same as leaf vertex). Example: Draw a tree with 7 vertices and count the pendent (leaf) vertices. Soln: A tree with 7 vertices is as follows. 1 3 2 5 4 7 6 Fig. 9.16 Number of vertices, n = 7 ∴Pendent vertex = (n + 1)/2 = ( 7 + 1 ) / 2 = 8 / 2 = 4 ∴Pendent (leaf) vertices are 4, i. e. vertices 2, 4, 6, 7. Example: In a full 5 – ary tree with 100 internal vertices. Count: a) Number of nodes b) Number of edges c) Number of leaf nodes Soln: Given m = 5, i = 100 a) Number of nodes for full m-ary tree is given by, n = m * I + 1 = 5 * 1 0 0 + 1 = 5 0 1 b) Number of edges for tree with n vertices having (n – 1) edges ∴ number of edges = n – 1 = 5 0 1 – 1 = 5 0 0 c) Number of leaf nodes = other than internal nodes = n – i = 5 0 1 – 1 0 0 = 4 0 1 Exercise: Q.1. Draw two ternary tree with 11 leaves. Q.2. How many edges does a full binary tree with 1000 internal vertices have? Find the number of leaf nodes. [Ans: Number of leaf nodes = 1001] munotes.in

Page 173

173 9.5 ISOMORPHISM OF TREE Two trees are called isomorphic if one of them can be obtained from other by a series of flips, i.e. by swapping left and right children of a number of nodes. Any number of nodes at any level can have their children swapped. Two Tree are isomorphic if and only if they preserve same no of levels and same no of vertices in each level The conditions which needed to be satisfied are: 1. Empty trees are isomorphic 2. Roots must be the same 3. Either left subtree & right subtree of one must be same with the same of other's, Eg. 1 1 2 3 2 3 or Left subtree of one must been same with right subtree of other's & right subtree of one must same with left subtree of other's. 1 1 2 3 3 2 So either of the two is present in the trees, trees are isomorphic. Example: Check whether the following trees are isomorphic or not.
Fig. 9.17
munotes.in

Page 174

174 Soln: Consider the above trees. Here 1 = 1 The left subtree of 1 in T1 is isomorphic to right subtree of 1 in T2. The right subtree of 1 in T1 is isomorphic to left subtree of 1 in T2. Inside the subtree, left subtree of 2 in T1 is isomorphic to right subtree of 2 in T2 and right subtree of 2 in T1 is isomorphic to left subtree of 2 in T2. Fig. 9.18 In above tree, left child of 4 is equal to left child of 4 and right child of 4 is equal to right child of 4. Also, left child of 5 is equal to right child of 5 and right child of 5 is equal to left child of 5. ∴ In every subtree of tree, isomorphism is preserved. ∴ Trees T1 and T2 are Isomorphic Trees. Exercise: Q.1 Check whether the following trees are isomorphic or not. a)
Fig. 9.19 9.6 SPANNING TREE Spanning tree is a graph which contains all vertices with minimum number of edges. We can say that a spanning tree is a spanning subgraph and it should be a tree.
munotes.in

Page 175

175 Consider the following graph. Fig: 9.20 We have to draw the spanning tree for the above graph. First, it contains all the vertices. We draw an edge between v1 and v2 , then we draw an edge between v2 and v4 and from v4 to v3 Now if we draw, v3 to v1, it forms a cycle. As it is a tree, We do not want a cycle. ∴This would be final spanning tree. There are more than one spanning tree for the same graph. Only condition is minimum number of edges with all vertices. ∴The different spanning trees for graph given in the Fig 9.20 are, Fig. 9.21 Number of edges in spanning tree are always (n – 1), for n vertices. If there are four vertices, the number of edges are three.
munotes.in

Page 176

176 In a spanning tree, there are two terms, 1. Branch 2. Chord 1. Branch: Branch is an edge in a spanning tree 2. Chord : Chord is an edge in a graph which is not in a spanning tree Fig 9.22 Different spanning trees for above graph are: a) Fig 9.23 n = 5, e = 4 Branch = {a, b, c, f} Chord = {d, e, g, h} b) Fig 9.24 n = 5, e = 4 Branch ={a, b, f, h } Chord = {c, d, e, g} 9.6.1 Fundamental Circuit: L e t G b e a c o n n e c t e d g r a p h , T b e i t s spanning tree. A circuit formed by adding a chord to spanning tree T i s c a l l e d a s a fundamental circuit.
munotes.in

Page 177

177 Consider the graph G.
Fig. 9.25 Take any arbitrary spanning tree. Fig. 9.26 Branch ={a, b, c, f }, Chord = { d, e, g, h} We add one edge from chord set to form a fundamental circuit. Number of edges in chord set will generate that many number of fundamental circuits. We add chord d, that form the following circuit: Fig: 9.27 We add chord e, which form the following circuit. Fig: 9.28 We add chord g, which form the following circuit.
munotes.in

Page 178

178 Fig: 9.29 We add chord h, which form the following circuit. Fig: 9.30 If graph G, having e edges and n vertices. T is a spanning tree with n – 1 branches, then there are exactly (e – n + 1) chord. ∴ (e – n + 1) fundamental circuit In the above example, G is a graph having 8 edges, 5 vertices. T is a spanning tree with n – 1 i.e. 5 -1 = 4 branches ∴ chord = e – (n – 1) = e – n + 1 = 8 – 5 + 1 = 4 . ∴ chord = 4 and fundamental circuit = 4. Exercise: Q.1 Draw the different spanning tree from the following graph:
Fig 9.31
munotes.in

Page 179

179 Fig 9.32 9.6.2 Minimum Spanning Tree: M i n i m u m s p a n n i n g t r e e i s a t r e e o r a s u b g r a p h w h i ch has total weight of all the edges to be minimum. For this there must be a weight over every edge. The weight of a spanning tree is the sum of all the w e i g h t’ s a s s i g ne d t o each edge of the spanning tree.
Fig. 9.33 Here is a graph with 4 vertices and weights on each e d g e . I n m i n i m u m spanning tree, total of weights of edges must be minimum. Here vertices are 4 so in spanning tree, there must be n – 1 edges .i.e. 3 edges Consider minimum weight in the graph, minimum weight is 1 for the edge c to d. Next minimum weight is 2 for the edge d to a
munotes.in

Page 180

180 Next minimum weight is for two edges. Take that edge which do not form a cycle. If we take edge from a to c, then it forms a cycle so take another edge d to b with weight 3. This is the minimum spanning tree. Minimum spanning tree with weight = 1 + 2 + 3 = 6 Example: Draw the minimum spanning tree for the following graph.
Fig 9.34 Soln: In this graph, n = 6. ∴Number of edges = 5 Minimum weight Edge 1 B → D 2 B → C 7 B → F 12 B → A 14 D → E Fig 9.35 Minimum spanning tree with weight = 1 + 2 + 7 + 12 + 14 = 36 Exercise: Q. 1 Find minimum spanning tree for following graph.
munotes.in

Page 181

181 a) Fig 9.36 b)
Fig 9.37 [Hint: You can take all edges with same weight but the condition is there should not form a cycle.] Methods for finding the minimum spanning tree. 1) Prim’s Algorithm 2) Kruskal’s Algorithm 9.6.3 Prim’s algorithm for Minimum Spanning Tree: P r i m ’ s A l g o r i t h m f i n d s a m i n i m u m s p a n n i n g t r e e f or a weighted graph. It is initiate with a node. Prim’s algorithm consider the nodes as a single tree and keeps on adding new nodes to the spanning tree from the given graph. Following are the steps for Prim’s algorithm: Step-1: R e m o v e a l l t h e l o o p s a n d p a r a l l e l e d g e s ( k e e p t h a t p a r a l l e l e dg e which has minimum weight.) Step-2: F i n d a l l t h e e d g e s t h a t c o n n e c t t h e t r e e t o n e w v ertices, find the minimum and add it to the tree (no cycle allowed) Step-3 keep repeating Step 2 until we get (n-1) edges Consider the following graph.
munotes.in

Page 182

182 Fig 9.38 Here There are 7 vertices i.e. n = 7 ∴ Number of edges in spanning tree are, n - 1 = 7 – 1 = 6. Here we start with the vertex ‘‘a’’ and proceed Visited vertices = {a}, Edges to choose from = {af, ab} Here weight of edge af is minimum. So we select edge af. Visited vertices = {a, f}, Edges to choose from = {ab, fe} Here weight of edge fe is minimum. So we select edge fe.
Visited vertices = {a, f, e}, Edges to choose from = {ab, eg, ed} Here weight of edge ed is minimum. So we select edge ed.
munotes.in

Page 183

183 Visited vertices = {a, f, e, d}, Edges to choose from = {ab, eg, dg, dc} Here weight of edge dc is minimum. So we select edge dc.
Visited vertices = {a, f, e, d, c}, Edges to choose from = {ab, eg, dg, cb} Here weight of edge cb is minimum. So we select edge cb.
Visited vertices = {a, f, e, d, c, b}, Edges to choose from = {ab, eg, dg, bg} Here weight of edge bg is minimum. So we select edge bg.
In above figure, there are all 7 vertices with 6 edges.
munotes.in

Page 184

184 It satisfy both the conditions i. e. number of vertices n and n-1 edges. ∴ This is minimum spanning tree. Weight of the minimum spanning tree = Sum of all the edge weights = 8 + 2 3 + 2 1 + 1 0 + 1 4 + 1 2 = 8 8 Exercise: Q. 1 Find minimum spanning tree for following graph using Prim’s algorithm. a)
Fig 9.39 b)
Fig 9.40 [ Hint: Remove all loops and parallel edges from the given graph. In case of parallel edges, keep the one which has the least weight and remove all others.] c) Fig 9.41
munotes.in

Page 185

185 9.6.3 Kruskal’s Algorithm for minimum spanning tree: K r u s k a l a l g o r i t h m i s u s e d t o f i n d a m i n i m u m s p a n ning tree for a connected weighted graph. It includes every edge of given graph and the total weight of all the edges in the tree. Following are the steps for Kruskal’s algorithm: Step-1: Arrange all the edges of the given graph. In ascending order as per their weight. Step-2: Select the edge with minimum weight from the graph and check if it forms a cycle with the spanning tree. Step-3: I n c l u d e t h i s e d g e t o t h e s p a n n i n g t r e e , i f t h e r e is no cycle. Otherwise discard that edge. Step-4: Repeat step 2 and step 3 until we get (n-1) edges. Example: Find the minimum spanning tree of the following graph.
Fig 9.42 Soln: From the above graph, Edge with minimum weight Vertex pair 6 (a, f) 8 (c, d) 10 (b,g) 12 (c ,b) 14 (d, g) 18 (d, e) 21 (e, f) 24 (a, b)
munotes.in

Page 186

186 Now draw all the vertices We start with minimum weighted edge i. e. edge (a, f) with weight 6/873. After adding edge (a, f) After adding edge (c, d)
After adding edge (b, g) After adding edge (c, b) Next minimum weighted edge (d, g). If we add edge (d, g), it will form cycle.
munotes.in

Page 187

187 ∴ We ignore edge (d, g). Next minimum weighted edge is (d, e). After adding edge (d, e) Again if we add edge (e, g) then it will form cycle. So ignore edge (e, g). Next minimum weighted edge is (e, f). After adding edge (e, f) Fig 7 Since all the vertices have been included in the minimum spanning tree, so we stop here. Number of edges are 6 which is equal to n-1 (where n is number of vertices). It satisfy both the conditions i. e. number of vertices n and n-1 edges. ∴ This is minimum spanning tree. Weight of the minimum spanning tree = sum of all the edge weights = 6 + 8 + 10 + 12 + 18 + 21 = 75 Exercise: Q.1 Find minimum spanning tree for following graph using Kruskal’s algorithm. a) Fig 9.43
munotes.in

Page 188

188 b) Fig 9.44 9.7 SUMMARY In this chapter, we learnt the most important topic of graph theory i.e. tree. Other related concepts such as distance, e c c e n t r i c i t y , C e n t r e o f tree, height of tree, depth of tree were also studied. Different types of trees such as rooted tree, binary tree, spanning tree were discussed. We are now able to find out all different spanning tree of a given graph, find a shortest spanning tree in a given weighted graph. 9.8 REFERENCES 1. Tremblay J. P. & Manohar R., "Discrete Mathematical structure with applications to computer science", MGH, 1999. 2. Deo Narsingh., "Graph theory with applications t o E n g i n e e r i n g & Computer Science", PHI, 2000. 3. Rosen K.H., "Discrete Mathematics and Its Applications", 6/E, MGH, 2006. 4. Kolman B., Busby R.C. & Ross S., "Discrete Mathematical Structure", 5/E, PHI, 2003. 5. Liu C.L., "Elements of Discrete Mathematics", MGH, 2000. UNIT V Chapter 10 C *****
munotes.in

Page 189

189 UNIT V 10 COUNTING Unit Structure 10.0 Objectives 10.1 Introduction 10.2 Possibility Trees and the multiplication Rule 10.3 Counting elements of disjoint sets with Addition Rule 10.4 The Pigeonhole Principle 10.5 Counting Subset of a Set 10.6 Combinations 10.7 Let us sum up 10.8 Unit end Exercises 10.9 List of References 10.0 OBJECTIVES After going through this unit, you will able to : • Possibility trees and multiplication rule. • Counting elements of disjoint sets and addition rule. • The Pigeonhole Principle. • Counting Subset of a Set. • Combinations and combinations with repetition allowed. 10.1 INTRODUCTION C o m b i n a t o r i a l m a t h e m a t i c s i s t h e f i e l d o f m a t h e m a tics concerned with problems of selection, arrangement and operation with in a finite or discrete system. Its objective is how to count without ordinary counting. One of the basic problems of combinatorics is to determine the number of possible configurations of objects of a given type. T h i s c h a p t e r i n c l u d e s numerous quite elementary topics, such as enumerating multiplication rule, addition rule and all combinations of a finite set. T h e s e a r e c a l l e d a s counting techniques. munotes.in

Page 190

190 10.2 POSSIBILITY TREES AND THE MULTIPLICATION RULE We define a possibility tree to track outcomes of a sequence of events as follows: Definition: Suppose that there is a sequence of events occurring in a specific order. Then, starting at a point, we draw a line out from that point for all possible outcomes of the first event. From the end of each of these lines, we then draw a line for each possible outcome from the next event and so on until we reach the final outcome of all events. We call such a diagram a possibility tree for that sequence of events. To understand this complicated definition of possibility tree of sequence of events with easy to give actually example: S u p p o s e t h a t t h e r e a r e t w o b o x , e a c h c o n t a i n i n g a n equal number of black and white marbles. You take one marble from one box and then one marble from other box. Draw the possibility tree to determine all possible outcomes. However since there are equal numbers of marbles in e a c h b o x , i t i s equally likely that either are drawn in both tree, and so we restrict branches to the two possibilities. As shown in above tree. Therefore above example suggest the following method to count the number of possible outcomes which is the consequence of a sequence of events. Example 1: There are 9 points A ,B, C, D, E, F, G,H, and I as shown in figure below X---------------G-------------N Suppose man begins at A and allowed to move horizontally or vertically, one step at a time. He stops when he cannot continue to walk without reaching the same point more than once. Find the number of ways
munotes.in

Page 191

191 he walks, if he moves from X to D. Also find the number of such trips which cover all points. Using possible tree diagram. Solution: The possible tree diagram for all point by given condition is given below, Step I: Start with X and towards D. X---------------------D Step II: From D he can travel E and G. Step III : From E he can travel B , G and F or From A he can travel B
Step IV: From B he can travel A and C, G to H, and F to C and H or from or from B he can travel C and E.
Step V : F r o m C h e c a n t r a v e l F t o H t o G , F r o m H h e c a n t ravel F to C to B to A, from H to G, From C to B to A, from C he can travel F, from E he can travel F and G.
munotes.in

Page 192

192 Step VI: from F he can travel E and H than from E to G to H and from H to G to E, From F to G and H to G , from G to H to F to C.
i) From possible tree total number of walks = 10 ways. ii) Number of trips which cover all points = 4 ways. Multiplication Rule: If the procedure can be broken into first and second stages, and if there are m possible outcomes for the first stage and for each of these outcomes, there are n possible outcomes for second stage, then the total procedure can be carried out in the designate order, in ways. This principle can be extended to a general form as follows: Theorem : If a process consists of n steps, and i) The first step can be performed by ways. ii) The second step can be performed by ways. iii) The step can be performed by ways. Then the whole process can be completed by different ways. Example 2: There are 8 men and 7 women in a drama company. How many way the director has to choose a couple to play lead roles in a stage show?
munotes.in

Page 193

193 Solution: The director can choose a man (task 1) in 8 ways and then a woman (task 2) in 7 ways. Then by multiplication rule he can choose a couple from ways. Example 3: How many four digits numbers can be formed contains each of the digits 7, 8, and 9 exactly once? Solution: To construct four digits number we have four places _______ _______ _______ _________ Thousand place Hundred place Ten place Unit place First for ‘7’ there are 4 places, for ‘8’ there are 3 places and for ‘9’ there are 2 places. For last digit, we can choose any of 0,1,2,3,4,5,6 so there will be 7 digits. Thus these can be done by 4x3x2x7 = 168 ways. Example 4: To generate typical personal identification number (PIN) is a sequence of any four symbols chosen from the letters in the alphabet and the digits , How many different PIN’s are generated? i) repetition is not allowed. ii) repetition is allowed. Solution: T h e r e a r e 2 6 l e t t e r s o f a l p h a b e t s a n d 1 0 d i g i t s . Total different symbols are 36. i) Repetition is not allowed: T h e r e a r e f o u r p l a c e t o g e n e r a t e P I N w i t h f o u r s y mbols, F i r s t p l a c e c a n b e f i l l e d b y 3 6 w a y s , s e c o n d p l a c e can be filled by 35 ways, third place can be filled by 34 ways and last fourth place can be filled by 33 ways. B y t h e m u l t i p l i c a t i o n r u l e , T h e r e f o r e t h e s e c a n b e d o n e b y 3 6 x 3 5 x 3 4 x 3 3 = 1413720 ways ii) Repetition is allowed: Since repetition is allowed, so each place can be filled by 36 ways, By multiplication rule, T h e s e c a n b e d o n e b y w a y s 3 6 x 3 6 x 3 6 x 3 6 = 1 679161 ways. Check your progress: 1. A license plate can be made by 2 letters followed by 3 digits. How many different license plates can be made if i) repetition is not allowed. ii) Repetition is allowed. 2. Mr. Modi buying a personal computer system is offered a choice of 4 models of basic units, 2 models keyboard, and 3 models of printer. How many distinct systems can be purchased? munotes.in

Page 194

194 10.3 COUNTING ELEMENTS OF DISJOINT SETS WITH ADDITION RULE In above section we have discussed counting problem t h a t c a n b e solved using possibility tree. Here we discuss counting problem that can be solved using the operation sets like union, intersection and the difference between two sets. 10.3.1 The addition rule: If a task can be performed in m ways and another task in n ways assuming that these two tasks cannot perform simultaneously, then the performing either task can be accomplished in any one of the m+n ways. In general from as follows: If there are n1,n2,n3 different objects in m different sets respectively and the sets are disjoint, then the number of ways to select an object from one of the m sets is n1+ n2 + n3+ .......+nm Example 5: How many different number of signals that can be sent by 5 flags of different colours taking one or more at a time ? Solution: Let number of signal made by one colour flag =5ways. Number of signal made by two colours flag = 5 x 4 = 20 ways. Number of signal made by three flag colours = 5 x 4 x 3 = 60 ways. Number of signal made by four flag colours = 5 x 4 x 3 x 2 = 120 ways. Number of signal made by five flag colours = 5 x 4 x 3 x 2 x 1 = 120 ways. Using Addition rule we get, Therefore total number of signals = 5 +20+60+120+120=325 ways. Example 6: There are 4 different English books, 5 different Hindi books and 7 different Marathi books. How many ways are there to pick up an pair of two books not both with the same subjects? Solution: One English and one Hindi book is chosen, that selection can be done by 4 x 5 = 20 ways. One English and one Marathi book is chosen, that selection can be done by ways. 4 x 7 = 28 ways. One Hindi and one Marathi book is chosen, that selection can be done by ways = 5 x 7 = 35 ways. These three types of selection are disjoint, therefore by addition rule, Total selection can be done by = 20+28+35=83 ways. munotes.in

Page 195

195 10.3.2 Additive Principle with Disjoint sets: Given two sets A and B, both sets are disjoint i.e. if , AB =φ∩ than AB = A B+∪ Example 7: In college 200 students visit to canteen every day of which 80 likes coffee and 70 likes tea. If no one student like both than find i) number of students like atleast one of them? ii) number of students like none of them? Solution: Total number of students = 200 Total number of students who like coffee = |A| = 80 Total number of students who like tea = |B| = 70 Total number of students like at least one AB = A B+∪=80+70=150 Total number of students like none of them 200-150=50 10.4 THE PIGEONHOLE PRINCIPLE We represent the basic principle of counting which is easily derived and extremely useful. Statement: If there n -pigeons to be placed in m -pigeonhole where m < n. Then there is at least one pigeonhole which receives more than one pigeon. Pigeonhole Principle Here is a simple consequence of the pigeonhole principle. In one set 13 or more people there are at least two whose birthdays fall in the same month. In this case we have to think of putting the people in to pigeonhole. it can be January, February, March and so on. Since there are 13 people and only 12 pigeon holes one of the pigeonhole must contain at least two people. That this intuitively obvious result can be quite useful is illustrated by the following example. Example 8: If eight people are chosen in any way what so ever at least two of them will have been born on the same day of the week.
munotes.in

Page 196

196 Solution: Here each person (pigeon) is assigned the day of the week(pigeonhole) on which he and she was born since t h e r e a r e e i g h t people and only seven days of the week, the pigeonhole principle. Tells us that at least two people must be assigned to the same day. Example 9: Consider the area shown it is bounded by a regular hexagon. Whose sides have length 1units. Show that if any seven points are chosen with in this area then two of them must be on further apart then 1 unit. Solution: Suppose that the area is divided in to six equilateral triangles. As shown in figure 1.1 1 6 2 5 3 4 If seven points are chosen we can assign each one to a triangle that contains it. If the point belongs to several triangles, assigns it arbitrarily to one of them. The seven points one assigned to six triangles so by pigeonhole principle, at least two points must belong to the same triangle. These two can not be more then 1 unit apart. Example 10: Five points are located inside a square whose sides a r e o f length 2. Show that two of the points are within a distance 2 of each other. Solution: Divide up the square into four square regions of area 1 unit. as indicated in figure 1.2. By Pigeonhole principle, it follows that at least one of these regions will contain at least two points. The result now follows since two points in a square of radius 1.can not be further apart then length of the diagonal of the square is which ( by Pythagoras theorem) 2 . Example 11: Show that if any five numbers from 1 to 8 are chosen, then two of that will add to 9.
munotes.in

Page 197

197 Solution: Constructs four different sets each contains two numbers that add to 9, as follows {}{}{}{}12 3 41, 8 , 2, 7 , 3, 6 , 4, 5AA A A== = =each of the five numbers chosen will be assigned to the set that contains it .Since there are only four sets. The pigeonhole principle tells that two of the chosen numbers will be assigned to the same set. These two numbers will add to 9. Example 12: Fifteen children together gathered 100 nuts. Prove that some pair of children gathered the same numbers of nuts. Solution: Now to prove that we use method of contradiction. Suppose all the children gathered a different numbers of nuts. Then the fewest total number is 0123456. . . . . . . . . . .1 41 0 5++ ++ + + + + =, but this is more then 100. which is contradiction to our assumption. There fore at least pair of children gathered same number of nuts. Example 13: Show that in any set of 10 integers there are at least pair of integers who have same remainder when divided by 9. Solution: Set of 10 integers, when it divide by 9, lie in the same residue classes of modulo 9. i.e. the remainder is 0,1,2,3,4,5,6,7,8. Here there will be 9 remainder and 10 integers. Therefore by pigeonhole principle, at least one integer has same remainder. 10.4.1 The extended pigeonhole principle: If there n -pigeons are assigned to m -pigeonholes, then one of the pigeonhole must contain at least ()11nm−+ Proof: If each contain number more then ()11nm−+ pigeons, then there are at most ()()111nnmnmm−−≤= − Example 14: Show that if 30 dictionaries in a library contains a total of 61,327 pages, then one of the dictionaries must have at least 2045 pages. Solution: Let the pages be the pigeons and the dictionaries are the pigeonholes. Assigns each to the dictionaries in which it appears then by the extended pigeonhole principle are dictionary must contain at least pages ()61,327 161,32611 2 0 4 530 30−+= +=munotes.in

Page 198

198 Example 15: Show that if any 29 people are selected then one may choose subset of 5. So that all 5 were born on the same day of the week. Solution: Assign each person to the day of week on which he and she was born. Then n = 29 persons are being assigned to m = 7 pigeonholes. By the extended pigeonholes principle at least persons Therefore 5 persons must have been born on the same day of the week. Check Your Progress: 1. Show that if there are seven numbers from 1 to 12 are chosen then t w o o f t h e m w i l l a d d t o 1 3 . 2. Let T be an equilateral triangle whose sides has length 1 unit. Show t h a t i f a n y f i v e p o i n t a r e c h o s e n l y i n g o n i n s i d e T. Then two of them w i l l b e m o r e t h e n 12unit apart 3. Show that if any Eight positive integer are chosen two of them will h a v e t h e s a m e r e m a i n d e r w h e n d i v i d e d b y 7 . 4. Show that if seven colors are used to paint 50 bicycles at least eight b i c y c l e s m u s t h a v e t h e s a m e c o l o r s . 5. All 82 entering student of a certain high school take courses in E n g l i s h , H i s t o r y , M a t h s a n d s c i e n c e . I f t h r e e s e c tion of each of these f o u r s u b j e c t s . S h o w t h a t t h e r e a r e t w o s t u d e n t s t hat have all four c l a s s e s t o g e t h e r . 6. Nineteen points are chosen inside a regular hexagon whose side l e n g t h 1 . P r o v e t h a t t w o o f t h e s e p o i n t s m a y b e c hosen whose d i s t a n c e t h e m i s l e s s t h e n 13 7. In any group of 15 people there are at least three born on the same d a y o f t h e w e e k 10.5 COUNTING SUBSET OF A SET Sets : A set is any well defined collection of distinct objects. Objects could be fans in a class room, numbers, books etc. F o r e x a m p l e , c o l l e c t i o n o f f a n s i n a c l a s s r o o m c ollection of all people in a state etc. Now, consider the example, collection of Brave ()()12 9 12811 1 577nm−−  += += +=    munotes.in

Page 199

199 people in a class. Is it a set? The answer is no because Brave is a relative word and it varies from person to person so it is not a set. Note : W e l l - d e f i n e d m e a n s t h a t i t i s p o s s i b l e t o d e c i d e whether a given object belongs to given collection or not. Subset: Set A is said to be a subset of B if every element of A is an element of B and this is denoted by A ⊆ B or B ⊇ A. If A is not a subset of B we write AB⊄ A ⊆ B.For example, For example, 1) {}{}2A1 , B = 1 ,xx x Z== ∈ then AB⊆and BA⊄ 2) N⊆ W ⊆ Z ⊆Q ⊆ R Note: (1) Every set A is a subset of itself i.e. A ⊆ A (2) If A ⊆ B but A ≠ B then we say A is a proper subset of B and we write A ⊂ B. If A is not a proper subset of B then we write A ⊄ B. (3) ∅ ⊆ A for any set ‘A’ (4) A = B iff A ⊆ B and B ⊆ A Cardinality of a set: The number of elements in a set is called as cardinality of a set and it is denoted by n(A) or |A|. For example, ( 1 ) A = { 1 , 2 , 3 , 4 , 5 } , | A | = 5 ( 2 ) B = ∅ , |B| = 0 Power set : Let A be a given set. Then set of all possible subsets of A is called as a power set of (1) If A = {1, 2} than P(A) = { ∅ , {1}, {2}, {1, 2}} Example 16: If X is a finite set having n elements, then the total number of subset of X is 2n Solution: consider X contain n elements. ∴ X = {x1, x2 , x3 , x4 ,......., xn} . There are two possibility of every element of X it may or may not be the subset of X . ∴It is true for every element of xi ∈ X . x2 x3 x4 x ………………… x n 2 2 2 2 …………………. 2 ∴ By multiplication principle, the total number of way it can be done b y = 2×2×2×2×..............×2( n times). = 2 n. ∴ The total number of subset of X is 2n . munotes.in

Page 200

200 10.6 COMBINATIONS Before giving the definition of combination, we need the following terminology, which are useful in writing proofs and solving problems Factorial Notation: For any integer ≥0,  factorial is denoted by ! is defined by, ! = (  1(  2( 3… (2)(1), for  ≥ 1 with an understanding 0! ! = 1. Thus we have a simple relation, ! =n(n-1!. In a set {w,x,y,z) + all the combinations taken three at a time are {, , +} There are four such combinations. In combinations we are concerned only that and have been selected. And are the same combination. Therefore the objects are an unordered. A formal definition for a combination is given below: Definition: A n r - c o m b i n a t i o n o f n d i s t i n c t o b j e c t s i s a n u n o r dered selection, or subset, of r out of the n objects. We use C (n,r) nrC to denote the number of r-combinations. This number is called as binomial number. 123,,, . . . . . . . . . .nxxx x a r e n d i s t i n c t o b j e c t s , a n d r i s a n y i n t e g e r , w ith 1.rn≤≤ Therefore selecting r-objects from n objects is given by ()()!,!!nCn rrnr=− Example 17: How many elements of set 3-bit string with weight 2? Solution: there are 3-bit with weight 2, i.e. n=3, r=2 These can be done by = c (n, r) = c (3, 2) = 3 Therefore the bit string is 011, 101, 110 Example 18: A bag contains 4 red marbles and 5 green marbles. Find the number of ways that 4 marbles can be selected from the bag, if selection contain i) No restriction of colors. ii) all are of same colors. Solution: Total number of marbles: 4 Red + 5 Green = 9 marbles To select 4 marbles from the bag with condition, i) No restriction of colors: These can be done by : C (9, 4) = 126 ways. ii) All are of same colors: F i r s t s e l e c t t h e c o l o r s b y C ( 2 , 1 ) = 2 I f a l l i s R e d i n c o l o r s t h a n t h e s e c a n b e d o n e = C (4+4) = 1 by If all is Green in colors then these can be done by = C (5+4) = 5 Therefore total number of ways 215 1 0×× = ways. Example 19: There are 10 members in a society who are eligible to attend annual meeting. Find the number of ways a 4 members can be selected that munotes.in

Page 201

201 i) No restriction ii) If 2 of them will not attend meeting together. iii) If 2 of them will always attend meeting together. Solution: i) To select 4 members from 10 members, it can be done by = C (10,4)=210 ways ii) If 2 of them will not attend meeting together, Let A and B denote the 2 members who will not attend meeting together. ()28 , 3 1 1 2C×= It possible that both will not attend meeting, i.e. Neither A nor B will attend meeting, these can be done by = c (8,2)=28 ways. Therefore total number of ways = 112 + 28 =140 ways. iii) If 2 of them will attend meeting together, Let A and B denote the 2 members who will attend meeting together. i.e. A or B = C (8,2) = 28 ways It possible that both will not attend meeting, i.e. Neither A nor B will attend meeting, these can be done by = C (8,4) 70 ways. Therefore total number of ways = 28 +70 = 88 ways. Example 20: How many diagonal has a regular polygon with n sides? Solution: T h e r e g u l a r p o l y g o n w i t h n s i d e s h a s n v e r t i c e s . Any two vertices determine either a side or diagonal. Therefore these can be done by ()()1,22nnCn−==. But there are n sides by which are not diagonal. Therefore total number of diagonals are ()()221312 322 2 2 2nn nnnn n nn−−−−=− = − = = diagonals. 10.7.1 r-combinations with Repetition Allowed: Till now, we have seen the formula for the number of combinations when r objects are chosen from the collection of n distinct objects. The following results is very important to find the number of selection of n objects when not all n are distinct. The number of selection with repetition of r objects chosen from n types of objects is ()1,Cn r r+− Example 21: How many ways are there to fill a box with a dozen marbles chosen five different colors of marbles with the requirement that at least one fruit of each colors is picked? munotes.in

Page 202

202 Solution: One can pick one marble of each colors and then the remaining seven marbles in any way. There is no choice in picking one marble of each type. The choice occurs in picking the remaining 7 marbles from 5 colors. By the result of r-combination with repetition allowed, These can be done by ()()571 , 7 1 1 , 7 3 3 0CC+− = = ways Example 22: H o w m a n y s o l u t i o n d o e s t h e f o l l o w i n g e q u a t i o n 123415xxxx+++= have 123,,xxx and 4xare non-negative integers? Solution: Assume we have four types of unknown 123,,xxx and 4x.There are 15 items or units (since we are looking for an integer solution). Every time an item is selected it adds one to the type it picked it up. Observe that a solution corresponds to a way of selecting 15 items from set of four elements. Therefore, it is equal to r-combinations with repetition allowed from set with four elements, we have () ( ) ( )18 17 1641 51 , 1 5 1 8 , 1 5 1 8 , 3 8 1 6321CC C××+− = = = =×× Example 23: I n h o w m a n y w a y s c a n a t e a c h e r c h o o s e o n e o r m o r e students from 5 students? Solution: Let set of student are 5, therefore total number of s u b s e t s a r e 523 2= To select one or more students, we must deleted empty set,. Therefore total number of selection = 32 – 1= 31 ways. 10.7 LET US SUM UP In this chapter we have learn; • Possible tree with multiplication Rule. • Counting elements of disjoint sets with addition Rule. • The pigeonhole principle and its generalization. • Counting subsets of set. • Combination and r-combination with repetition allowed. 10.8 UNIT END EXERCISES 1. Suppose A, B, C, …., F is denote island and the line connecting them bridges. A man begins at A and walks from island to island. He stops for lunch when he cannot continue to walk without crossing the same bridge twice. i) Find the number of ways that he can take his walk before eating lunch. ii) At which islands cab he eat his lunch? munotes.in

Page 203

203 A B C E F 2. 5 teachers are required to teach maths to 8 divisions of school. In how many ways can the teacher chose the classes if one teacher teaches one class at a time? 3. In how many ways can 3 prize be awarded to 10students if i)a student is eligible to get only one prize? ii) a student is eligible to get any number of prize? 4. How many four digit passwords can be formed using the digits 1,2,3,4,5,6,7 if i) no digit is repeated in password? ii) Repetition of digits is allowed in password? 5. How many six digit Gpay PIN can be generated by using two letters and digits, if i) no digit is repeated in PIN? ii) Repetition of digits is allowed in PIN? 6. 10 people want to go to the movies, and there are only 7 cars, then at least more then one person in the same car. 7. Prove that among the 51 positive integers less than 100. There is a pair whose sum is 100. 8. There are 33 students in the class and sum of their ages 430 year. Is it true that one can find 20 students in the class such that sum of their ages greater 260? 9. A bag contains 5 black marbles and 6 white marbles. Find the number of ways that five marbles can be drawn from the bag s u c h t h a t i t contains i) No restriction ii) no black marbles, iii) 3 black and 2 white, iv) at least 4 black, v) All are of same colors. 10. A student is to answer 8 out of 10 questions on a n e x a m . F i n d t h e number of ways that the student can chose the 8 questions if i) No restriction, ii) student must answer the first 4 questions, iii) student must answer atleast 4 out of the five questions. 11. There are 12 points in a given plane, no three on the same line. i) How many triangle are determine by the points? ii) How many of these triangle contain a particular point as a vertex? 12. Which regular polygon has the same number of diagonal as sides? munotes.in

Page 204

204 13. How many committees of two or more can be selected from 8 people? 14. How many non-integer solutions are there to the e q u a t i o n s x1+x2+x3+x4+x5=67 15. Find the number of combinations if the letters of the letters of the word EXAMINATION taken out at a time. 10.9 LIST OF REFERENCES • Discrete Mathematics with Applications by Sussana S. Epp • Discrete Mathematics Schaum’s Outlines Series by Seymour Lipschutz, Marc Lipson • Discrete Mathematics and its Applications by Kenneth H. Rosen • Discrete Mathematical Structures by B Kolman, RC Busby, S Ross Discrete structures by Liu. ***** munotes.in

Page 205

205 11 PROBABILITY Unit Structure 11.0 Objectives 11.1 Introduction 11.2 Basic concept of probability 11.3 Probability Axioms 11.3.1 Addition theorem of probability 11.4 Condition Probability 11.5 Independent events 11.5.1 For Independent events multiplication theorem 11.6 Baye’s formula 11.7 Expected Value 11.8 Let us sum up 11.9 Unit end Exercises 11.10 List of References 11.0 OBJECTIVES After going through this unit, you will able to: • Know the basic concept of probability. • Probability axioms. • Conditional probability and its examples. • Independent events and multiplication theorem of probability. • Baye’s formula of probability. • Expected value of probability. 11.1 INTRODUCTION Some time in daily life certain things come to mind like “I will be success today’, I will complete this work in hour, I will be selected for job and so on. There are many possible results for these things but we are happy when we get required result. Probability theory deals with experiments whose outcome is not predictable with certainty. Probability is very useful concept. These days many field in computer science such as machine learning, computational linguistics, cryptography, computer vision, robotics other also like science, engineering, medicine and management. Probability is mathematical calculation to calculate the chance of munotes.in

Page 206

206 occurrence of particular happing, we need some basic concept on random experiment , sample space, and events. 11.2 BASIC CONCEPT OF PROBABILITY Random experiment: W h e n e x p e r i m e n t c a n b e r e p e a t e d a ny n u m b e r o f times under the similar conditions but we get different results on same experiment, also result is not predictable such experiment is called random experiment. For. e.g. A coin is tossed, A die is rolled and so on. Outcomes: The result which we get from random experiment is called outcomes of random experiment. Sample space: The set of all possible outcomes of random experiment is called sample space. The set of sample space is denoted by S and number of elements of sample space can be written as(). For e.g. A die is rolled, we get {}1, 2, 3, 4, 5, 6 , ( ) = 6nS= Events: A n y s u b s e t o f t h e s a m p l e s p a c e i s c a l l e d a n e v e n t . O r a s e t o f sample point which satisfies the required condition i s c a l l e d a n e v e n t s . Number of elements in event set is denoted by n(). For example in the experiment of throwing of a dia. The sample space is {}1, 2, 3, 4, 5, 6S= each of the following can be event i) A: even number i.e. A = { 2, 4, 6} ii) B: multiple of 3 i.e. B = { 3, 6} iii) C: prime numbers i.e. C = { 2, 3, 5}. Types of events: Impossible event: A n e v e n t w h i c h d o e s n o t o c c u r r e d i n r a n d o m experiment is called impossible event. It is denoted by ∅ set. i.e. (∅) = 0. For example getting number 7 when die is rolled. The probability measure assigned to impossible event is Zero. Equally likely events: when all events get equal chance of occurrences is called equally likely events. For e.g. Events of occurrence of head or tail in tossing a coin are equally likely events. Certain event: A n e v e n t w h i c h c o n t a i n s a l l s a m p l e s p a c e e l e m e n t s is called certain events. i.e. n() = () Mutually exclusive events: T w o e v e n t s A a n d B o f s a m p l e s p a c e S , i t does not have any common elements are called mutually exclusive events. In the experiment of throwing of a die A: number less than 2 , B: multiple of 3. There fore ( ∩ ) = 0 Exhaustive events: Two events A and B of sample space S, elements of event A and B occurred together are called exhaustive events. For e.g. In a thrown of fair die occurrence of even number and occurrence of odd munotes.in

Page 207

207 number are exhaustive events. Therefore ( ∪ ) = 1. Complement event: L e t S b e s a m p l e s p a c e a n d A b e a n y e v e n t t h a n complement of A is denoted by ̅ is set of elements from sample space S, which does not belong to A. For e.g. if a die is thrown, S = {1, 2, 3, 4, 5, 6} and A: odd numbers, A = {1, 3, 5}, then ̅ = {2,4,6}. Probability: F o r a n y r a n d o m e x p e r i m e n t , s a m p l e s p a c e S w i t h r e quired chance of happing event E than the probability of event E is define as ()()()nEPEnS= Basic properties of probability: 1) The probability of an event E lies between 0 and 1. i.e. 0 ≤ P(E) ≤1. 2) The probability of impossible event is zero. i.e. (∅) 3) The probability of certain event is unity. i.e. ()=1 4) If A and B are exhaustive events than probability of () 1PA B=∪ (AUB)=10 5) If A and B are mutually exclusive events than probability of () 0PA B=∩ 6) If A be any event of sample space than probability of complement of A is given by () + (̅) = 1 ⇒∴ (̅) = 1 − (). 11.3 PROBABILITY AXIOMS Let S be a sample space. A probability function P from the set of all event in S to the set of real numbers satisfies the following three axioms for all events A and B in S. i.) () 0PA≥ ii) () 0Pφ= and P (S) =1 iii) If A and B are two disjoint sets()ABφ=∩ i.e. equation than the probability of the union of A and B is ()()()PA B PA PB=+∪ Theorem: Prove that for every event A of sample space,0 ( ) 1SP A≤≤ Proof: ,A ASAAφ=∪ =∩ ()()()()1A APS PA A P P∴= =+∪ ()()1A APP∴= + ()()A1 APP⇒=− () 0PA≥. Than () 1PA≤ For every event A 0( A ) 1P≤≤ munotes.in

Page 208

208 11.3.1 Addition theorem of probability: Theorem: If A and B are two events of sample space S, then probability of union of A and B is given by ()()()(A B)PP A P B P A B∪= + − ∩ Proof: A and B are two events of sample space S. S AB∩ BA∩ A ∩ B Now from diagram probability of union of two events A and B is given by, ()()()(A B)PP A B P A B P B A∪= ∩+ ∩+ ∩ ()()(A B)PP A A B∩= −∩ and ()()()PB A PB PA B∩= − ∩ ()()()()()()PA B PA PA B PA B PB PA B∴∪ = −∩ +∩ + −∩ ()()()()PA B PA PB PA B∴∪ = + −∩ Note: The above theorem can be extended to three events A, B and C as shown below: ()()()()()()PA B C PA PB PC PA B PB C∴∪ ∪ = + + −∩ −∩()()PC A PA B C−∩ +∩ ∩ Example 1: A bag contains 4 black and 6 white balls; two balls are selected at random. Find the probability that balls are i) both are different colors. ii) both are of same colors. Solution: Total number of balls in bag = 4 blacks + 6 white = 10 balls To select two balls at random, we get () = (10,2) = 45. i) A be the event to select both are different colors. ()()()A4 , 1 6 , 1 4 6 2 4nC C∴= × = × = ()()()240.5345nAPAnS== = ii) To select both are same colors. Let Abe the event to select both are black balls ()()A4 , 2 6nC∴= = ()()()645nAPAnS== munotes.in

Page 209

209 Let B be the event to select both are white balls. ()()6, 2 15nB C∴= = ()()()1545nBPBnS== A and B are disjoint event. The required probability is () ( ) ( )61 52 10.46745 45 45PA B PA PB∴∪ = + = + = = Example 2: From 40 tickets marked from 1 to 40, one ticket is drawn at random. ()()40,1 40nS C∴= =Find the probability that it is marked with a multiple of 3 or 4. Solution: F r o m 4 0 t i c k e t s m a r k e d w i t h 1 t o 4 0 , o n e t i c k e t i s d r a w n a t random n(S) = C ( 40, 1) = 40 it is marked with a multiple of 3 or 4, we need to select in two parts. Let A be the event to select multiple of 3, i. e. {}3, 6, 9...39A= ()()13,1 13nA C== ()()()1340nAPAnS== Let B be the event to select multiple of 4. {}4,8,12......., 40B= ()()10,1 10nB C== ()()()1040nBPBnS== Here A and B are not disjoint. AB∩be the event to select multiple of 3 and 4. ()12, 24,36AB∩= ()()3,1 3nA B C∩= = ()()()340nA BPA BnS∩∴∩ = = The required probability is () ( ) ( ) ()13 10 3 200.540 40 40 40PA B PA PB PA B∪= + − ∩= +−= = Example 3: If the probability is 0.45 that a program development job; 0.8 that a networking job applicant has a graduate degree and 0.35 that applied munotes.in

Page 210

210 for both. Find the probability that applied for at least one of jobs. If number of graduate are 500 then how many are not applied for jobs? Solution: Let Probability of program development job = ()0.45PA= Probability of networking job = ()0.8PB= Probability of both jobs = ()0.35PA B∩= Probability of atleast one i.e. to find ()()()()PA B PA PB PA B∪= + − ∩ ()0.45 0.8 0.35 0.9PA B∪= + − = Now there are 500 application, first to find probability that not applied for ()()11 0 . 9 0 . 1PA B PA B∪= − ∪= − = Number of graduate not applied for job = 0.1 500 50×= . Check your Progress: 1. A card is drawn from pack of 52 cards at random. Find the probability that it is a face card or a diamond card 2. If ()38PA= and ()58B=()78PA B∪=than find i) ()PA B∪ i i ) ()PA B∩ 3. In a class of 60 students, 50 passed in computers, 40 passed in mathematics and 35 passed in both. What is the probability that a student selected at random has i) Passed in atleast one subject, ii) failed in both the subjects, iii) passed in only one subject. 11.4 CONDITIONAL PROBABILITY In many case we have the occurrence of an event A and are required to find out the probability of occurrence an event B w h i c h d e p e n d o n event A this kind of problem is called conditional probability problems. Definition: L e t A a n d B b e t w o e v e n t s . T h e c o n d i t i o n a l p r o b a b ility of event B, if an event A has occurred is defined by the relation, ()()()/PB APB APA∩= if and only if ()0PA> In case when P (A) P(B | A ) is not define because ()0PB A∩=and ()00PBA= an indeterminate quantity. Similarly, Let A and B be two events. The conditional probability of event A, if an event B has occurred is defined by the relation, ()PA B∪munotes.in

Page 211

211 ()()()/PA BPABPB∩= If and only if ()0PB> Example 4: A pair of fair dice is rolled. What is the probability that the sum of upper most face is 6, given that both of the numbers are odd? Solution: A pair of fair dice is rolled, therefore n(s)=36 A to select both are odd number, i.e. ()()()()()()()()(){}1, 1 , 1, 3 , 1, 5 , 3, 1 , 3, 3 , 3, 5 , 5, 1 , 5, 3 , 5, 5A= ()()()936nAPAnS== B is event that the sum is 6, i.e. ()()()()(){}1, 5 , 2, 4 , 3, 3 , 4, 2 , 5,1B= ()()()536nBPBnS== ()()()(){}1, 5 , 3, 3 , 5,1PA B∩= ()()()336nA BPA BnS∩∩= = By the definition of conditional probability, ()()()3136/A9336PA BPBPA∩== = Example 5: If A and B are two events of sample space S, such that ()()0.85, 0.7PA PB==and ()0.95,PA B∪= Find i) ()PA B∩ ii) P (A/B) iii) P(B/A) Solution: Given that()()0.85, 0.7PA PB== and ()0.95,PA B∪= i) By Addition Theorem ()()()()PA B PA PB PA B∪= + − ∩ ()0.95 0.85 0.7PA B=+ −∩ ()1.55 0.95 0.6PA B∩= − = ii) By the definition of conditional probability ()() 0 . 6/0 . 8 5 7() 0 . 7PA BPABPB∩== = iii) ()() 0 . 6/0 . 7 0 6() 0 . 8 5PA BPB APA∩== = Example 6: An urn A contains 4 Red and 5 Green balls. Another urn B contains 5 Red and 6 Green balls. A ball is transferred from the urn A to the urn B, then a ball is drawn from urn B. find the probability that it is Red. munotes.in

Page 212

212 Solution: Here there are two cases of transferring a ball from urn A to B. Case I: When Red ball is transferred from urn A to B. There for probability of Red ball from urn A is ()49APR= After transfer of red ball, urn B contains 6 Red and 6 Green balls. Now probability of red ball from urn () ( )64 2 4/12 9 108BA ABP RR P R=× = × = Case II: When Green ball is transferred from urn A to B. There for probability of Green ball from urn A is ()59APG= After transfer of red ball, urn B contains 5 Red and 7 Green balls. Now probability of red ball from urn () ( )55 2 5/12 9 108BA ABP RG P G=× = × = Therefore required probability 24 25 490.4537108 108 108=+== Check your progress: 1. A family has two children. What is the probability that both are boys, given at least one is boy? 2. Two dice are rolled. What is the condition probability that the sum of the numbers on the dice exceeds 8, given that the first shows 4? 3. Consider a medical test that screens for a COVID-19 in 10 people in 1000. Suppose that the false positive rate is 4% and the false negative rate is 1%. Then 99% of the time a person who has the condition tests positive for it, and 96% of the time a person who does not have the condition tests negative for it. a) What is the probability that a randomly chosen person who tests positive for the COVID-19 actually has the disease? b) What is the probability that a randomly chosen person who tests negative for the COVID-19 does not indeed have the disease? 11.5 INDEPENDENT EVENTS Independent events: Two events are said to be independent if the occurrence of one of them does not affect and is not affected by the occurrence or non-occurrence of other. munotes.in

Page 213

213 i.e. ()()BPP BA× or ()()APP AB= Multiplication theorem of probability: I f A a n d B a r e a n y t w o e v e n t s associated with an experiment, then the probability o f s i m u l t a n e o u s occurrence of events A and B is given by () ( )()BPA B PAPA∩= Where P( B⁄A ) denotes the conditional probability of event B given that event A has already occurred. OR () ( )()APA B PBPB∩= Where ()APB denotes the conditional probability of event A given that event B has already occurred. 11.5.1 For Independent events multiplication theorem: If A and B are independent events then multiplication theorem can be written as, ()()()PA B PAPB∴∩ = Proof: Multiplication theorem can be given by, If A and B are any two events associated with an experiment, then the probability of simultaneous occurrence of events A and B is given by () ( )()BPA B PAPA∩= By definition of independent events, ()()()()BAPP B o r PP AAB== ()()()PA B PAPB∴∩ = Note: 1) If A and B are independent event then, A and B are independent event. 2) If A and B are independent event then, A and B are independent event. 3) If A and B are independent event then, A and Bare independent event. Example 7: Manish and Mandar are trying to make Software for company. Probability that Manish can be success is 15 and Mandar can be success is 35, both are doing independently. Find the probability that i) both are success. ii) At least one will get success. iii) None of them will success. iv) Only Mandar will success but Manish will not success. munotes.in

Page 214

214 Solution: Let probability that Manish will success is ()10.25PA== Therefore probability that Manish will not success is ()()11 0 . 2 0 . 8PA PA=− =− = Probability that Mandar will success is ()30.65PB== Therefore probability that Mandar will not success is ()()11 0 . 6 0 . 4 .PB PB=− =− = i) Both are success i.e. ()PA B∩ ()()()0.2 0.6 0.12PA B PA PB∩= × = ×=∵A and B are independent events. ii) At least one will get success. i.e. ()PA B∪ By addition theorem ()()()()0.2 0.6 0.12 0.68PA B PA PB PA B∪= + − ∩= + − =. iii) None of them will success. ()PA B∪ or ()PA B∩ [ By De Morgan’s law both are same] ()()11 0 . 6 8 0 . 3 2PA B PA B∪= − ∪= − = Or If A and B are independent than Aand B and are also independent ()()()0.8 0.4 0.32PA B PA PB∩= × = × = iv) Only Mandar will success but Manish will not success. i.e. ()PA B∩ ()()()0.8 0.6 0.48PA B PA PB∩= × =× = Example 8: 50 coding done by two students A and B, both are trying independently. Number of correct coding by student A is 35 and student B is 40. Find the probability of only one of them will do correct coding. Solution: L e t p r o b a b i l i t y o f s t u d e n t A g e t c o r r e c t c o d i n g i s P ( A ) ()350.750PA== Probability of student A get wrong coding is ()10 . 7 0 . 3PA=− = Probability of student B get correct coding is ()400.850PB== Probability of student B get wrong coding is ()10 . 8 0 . 2PB=− = The probability of only one of them will do correct coding. i.e. A will correct than B will not or B will correct than A will not. ()()()()()()PA B PB A PA PB PB PA∩+ ∩= × + × munotes.in

Page 215

215 0.7 0.2 0.8 0.3 0.14 0.24 0.38=×+×= + = Example 9 : Given that ()()32,,77PA PB== if A and B are independent events than find i)()PA B∩ ii) ()PB iii) ()PA B∪ iv) ()PA B∩ Solution: Given that ()()32,,77PA PB== i) A and B are independent events, () ( ) ( )32 60.12277 4 9PA B PA PB∴∩ = × = × = = ii) ()()2511 0 . 7 1 477PB PB=− =− = = iii) By addition theorem, () ( ) ( ) ()32 6 2 90.592774 94 9PA B PA PB PA B∪= + − ∩= + −= = iv) ()()()11 0 . 5 9 2 0 . 4 0 8PA B PA B PA B∩= ∪= − ∪= − = Check your progress: 1. If ()()21,53PA PB== and if A and B are independent events, find (i) ()PA B∩, (ii) ()PA B∪ (iii) ()PA B∩. 2. The probability that A,B, and C can solve the same p-roblem independently are 12,35 and 34 respectively. Find the probability that i0 the problem remain unsolved, ii) the problem is solved , iii) only one of them solve the problem. 3. The probability that Ram can shoot a target is 2/5 and probability of Laxman can shoot at the same target is 4/5. A and B s h o t independently.Find the probability that (i) the target is not shot at all, (ii) the target is shot by at least one of them. (iii) the target shot by only one of them. iv) target shot by both. 11.6 BAYES FORMULA In 1763, Thomas Bayes put forward a theory of revising the prior probabilities of mutually exclusive and exhaustive events whenever new information is received. These new probabilities are called as posterior probabilities. The generalized formula of bayes theorem is given below: munotes.in

Page 216

216 Suppose 1, 2, ,...........kAA Aare k mutually exclusive events defined in B (a collection of events) each being a subset of the sample space S such that 1KiiUA S==and ()0, 1, 2........iPA i k>∀ =. For Some arbitrary event B, which is associated with Ai such that P(B) >0, we can find out the probabilities ()()()12,, . . . . . . . . . . . .kPBA PBA PBA In Baye’s approach we want to find the posterior probability of an event Ai given that B has occurred. i.e. ()iPAB By definition of conditional probability, ()()()iipA BPABPB∩= BS∴∈such that BSB∩=. ()12........kBB A A A=∩ ∪ ∪ ∪ 1KiiUA S== and Ai ’s are disjoint. i.e.i.e. i.e.i.e. ()()()12.......kBB E B E B E=∩ ∪∩ ∪ ∪∩ () ( )1kiiPB PB A=∴= ∩∑ ()() ( )()()()iii iPB APB A pA B PB pA BPB∩∩= ×⇒= But ()()()ii iPB A pBA PA∩=and () ( )( )1/kiiiPB PB APA==∑ Therefore we get, ()()()() ( )1//iiikiiipBA PAPA BPB APA==∑ this known as Baye’s formula. Example 10: There are three bags, first bag contains 2 white, 2 b l a c k , 2 r e d balls; second bag 3 white, 2 black, 1 red balls and t h i r d b a g 1 w h i t e 2 black, 3 red balls. Two balls are drawn from a bag chosen at random. These are found to be one white and I black. Find the probability that the balls so drawn came from the third bag. Solution: Let B1 be the first bag, B2 be the second bag and B3 be the third bag A denotes the two ball are white and black. First select the bag from any three bags,)) () () ()12313PB PB PB=== munotes.in

Page 217

217 Probability of white and black ball from first bag: ()()()()12,1 2,14/6, 2 15ccPABc×== Probability of white and black ball from second bag: ()()()()23,1 2,16/6, 2 15ccPABc×== Probability of white and black ball from third bag: ()()()()31,1 2,12/6, 2 15ccPABc×== By Baye’s theorem, ()()()() ( ) () ( ) () ( )33311 2 2 33/////PB PABPB APB PAB PB PAB PB PAB=++ 122131 5 4 5141612 1 264531 5 31 5 31 5×== =×+ ×+ × Example 11: A company has two factories F1 and F2 t h a t p r o d u c e t h e s a m e chip, each producing 55% and 45% of the total production. The probability of a defective chip at F1 and F2 is 0.07 and 0.03 respectively. Suppose someone shows us a defective chip. What is the probability that this chip comes from factory F1. Solution: Let Fi denote the event that the chip is produced by factory. A denote the event that chip is defective. Given that P(F1) = 55 P(F2)=0.45 P(A|F1) =0.07, P(A|F2) = 0.03 By Bayes’ formula, ()()()()( ) ()( )11111 2 2/0.55 0.07/// 0 . 5 5 0 . 0 7 0 . 4 5 0 . 0 30.03850.740.052PF PAFPF APF PAF PF PAF×==+× + ×== 11.7 EXPECTED VALUE In order to understand the behavior of a random variable, we may want to look at its average value. For probability we need to find Average is called expected value of random variable X. for that first we have to learn some basic concept of random variable. munotes.in

Page 218

218 Random Variable: A probability measurable real valued functions, say X, defined over the sample space of a random experiment with respective probability is called a random variable. Types of random variables: There are two type of random variable. Discrete Random Variable: A r a n d o m v a r i a b l e i s s a i d t o b e d i s c r e t e random variable if it takes finite or countably infinite number of values. Thus discrete random variable takes only isolated values. Continuous Random variable: A random variable is continuous if its set of possible values consists of an entire interval on the number line. Probability Distribution of a random variable: All possible values of the random variable, along with its corresponding probabilities, so that 11==∑, is called a probability distribution of a random variable. The probability function always follow the following properties: i. ()0iPx≥for all value of i. ii. 1niiP=∑ The set of values ixwith their probability iP constitute a discrete probability distribution of the discrete variable X. For e.g. Three coins are tossed, the probability distribution of the discrete variable X is getting head. iXx= 0 1 2 3 iPx= 18 38 38 18 Expectation of a random variable (Mean) : All the probability information of a random variable is contained in probability mass function for random variable, it is often useful to consider various numerical characteristics of that random variable. One such number is the expectation of a random variable. If random variable X takes values x1, x2, ………….. xn, with corresponding probabilities P1, P2, ………….Pn, respectively, then expectation of random variable X is ()1niiiEX p x==∑ where 11niip==∑ Example 12: In Vijay sales every day sale of number of laptops with his past munotes.in

Page 219

219 experience the probability per day are given below: No. of laptop 0 1 2 3 4 5 Probability 0.05 0.15 0.25 0.2 0.15 0.2 Find his expected number of laptops can be sale? Solution: Let X be the random variable that denote number of laptop sale per day. To calculate expected value, ()1niiiEX p x==∑ ()()()()()()()00 . 0 5 10 . 1 5 20 . 2 5 30 . 2 40 . 1 5 50 . 2EX=× + × +× +× +× +× ()2.85 3EX=∼ Therefore expected number of laptops sale per day is 3. Example 13: A random variable X has probability mass function as follow: X=ix -1 0 1 2 3 P=(ix) K 0.2 0.3 2k 2k Find the value of k, and expected value. Solution: A random variable X has probability mass function, 11niip==∑ 0.2 0.3 2 2 1kk k⇒+++ + = 50 . 5k⇒= 0.1k⇒= Therefore the probability distribution of random variable X is X=ix -1 0 1 2 3 P=(ix) 0.1 0.2 0.3 0.2 0.2 To calculate expected value, ()1niiiEX p x==∑ ()()()()()()10 . 1 00 . 2 10 . 3 20 . 2 30 . 2 1 . 2EX=−× + × + × + × + × = Example 15: A box contains 5 white and 7 black balls. A person draws 3 balls at random. He gets Rs. 50 for every white ball and losses Rs. 10 every black ball. Find the expectation of him. Solution: Total number of balls in box = 5 white + 7 black = 12 balls. To select 3 balls at random, () ( )12 11 101, 2, 3 220321ns C××== =×× munotes.in

Page 220

220 Let A be the event getting white ball. A takes value of 0, 1, 2 and 3 white ball. Case I : no white ball. i.e. A = 0, ()()7,3350220 220CPA== = Case II: one white ball i.e. A = 1, ()()()5,1 7, 21051220 220CCPA×== = Case III: two white balls i.e. A = 2, ()()()5, 2 7,1702220 220CCPA×== = Case IV: three white balls i.e. A = 3, ()()5,3103220 220CPA== = Now let X be amount he get from the game. Therefore the probability distribution of X is as follows:- X=ix -30 30 90 150 P=(ix) 35220 105220 70220 10220 To calculate expected value, ()1niiiEX p x==∑ ()35 105 70 1030 30 90 150 .45.220 220 220 220EXRs      =− × + × + × + × =             11.8 LET US SUM UP In this chapter we have learn: • Basic concept of probability like random experiment, outcomes, sample space, events and types of events. • Probability Axioms and its basic properties. • Addition theorem of probability for disjoint events. • Condition Probability for dependent events. • Independent events. • For Independent events multiplication theorem. • Baye’s formula and its application. • Expected Value for discrete random probability distribution. munotes.in

Page 221

221 11.9 UNIT END EXERCISES 1. A card is drawn at random from well shuffled pack of card find the probability that it is red or king card. 2. There are 30 tickets bearing numbers from 1 to 15 in a bag. One ticket is drawn from the bag at random. Find the probability that the ticket bears a number, which is even, or a multiple of 3. 3. In a group of 200 persons, 100 like sweet food items, 120 like salty food items and 50 like both. A person is selected at random find the probability that the person (i). Like sweet food items but not salty food items (ii). Likes neither. 4. A bag contains 7 white balls & 5 red balls. One ball is drawn from bag and it is replaced after noting its color. In the second draw again one ball is drawn and its color is noted. The probability of the event that both the balls drawn are of different colors. 5. The probability of A winning a race is 13 & that B wins a race is 15. Find the probability that (a). either of the two wins a race. b), no one wins the race. 6. Three machines A, B & C manufacture respectively 0.3, 0.5 & 0.2 of the total production. The percentage of defective items produced by A, B & C is 4 , 3 & 2 percent respectively. for an item chosen at random , what is the probability it is defective. 7. An urn A contains 3 white & 5 black balls. Another urn B contains 5 white & 7 black balls. A ball is transferred from the urn A to the urn B, then a ball is drawn from urn B. find the probability that it is white. 8. A husband & wife appear in an interview for two vacancies in the same post. The probability of husband selection is 17 & that of wife’s selection is. 15 What is the probability that, a). both of them will be selected. b). only one of them will be selected. c). none of them will be selected? 9. A problem statistics is given to 3 students A,B & C whose chances of solving if are 13 1,&24 4 respectively. What is the probability that the problem will be solved? 10. A bag contains 8 white & 6 red balls. Find the probability of drawing 2 balls of the same color. 11. Find the probability of drawing an ace or a spade or both from a deck of cards? 12. A can hit a target 3 times in a 5 shots, B 2 times in 5 shots & C 3 munotes.in

Page 222

222 times in a 4 shots. they fire a volley. What is the probability that a).2 shots hit? b). at least 2 shots hit? 13. A purse contains 2 silver & 4 cooper coins & a second purse contains 4 silver & 4 cooper coins. If a coin is selected at random from one of the two purses, what is the probability that it is a silver coin? 14. The contain of a three urns are : 1 white, 2 red, 3 green balls; 2 white, 1 red, 1 green balls & 4 white, 5 red, 3 green balls. Two balls are drawn from an urn chosen at random. This are found to be 1 white & 1 green. Find the probability that the balls so drawn come from the second urn. 15. Three machines A,B & C produced identical items. Of t h e r e respective output 2%, 4% & 5%of items are faulty. On a certain day A has produced 30% of the total output, B has produced 25% & C the remainder. An item selected at random is found to be faulty. What are the chances that it was produced by the machine with the highest output? 16. A person speaks truth 3 times out of 7. When a die is thrown, he says that the result is a 1. What is the probability that it is actually a 1? 17. There are three radio stations A, B and C which can be received in a city of 1000 families. The following information is available on the basis of a survey: (a). 1200 families listen to radio station A (b). 1100 families listen to radio station B. (c). 800 families listen to radio station C. (d). 865 families listen to radio station A & B. (e). 450 families listen to radio station A & C. (f). 400 families listen to radio station B & C. (g). 100 families listen to radio station A, B & C. The probability that a family selected at random listens at least to one radio station. 18. The probability distribution of a random variable x is as follows. X 1 3 5 7 9 P(x) K 2K 3K 3K K Find value of (i). K (ii). E(x) 19. A player tossed 3 coins. He wins Rs. 200 if all 3 coins show tail, Rs. 100 if 2 coins show tail, Rs. 50 if one tail appears and loses Rs. 40 if no tail appears. Find his mathematical expectation. 20. The probability distribution of daily demand of cell phones in a mobile gallery is given below. Find the expected mean . Demand 5 10 15 20 Probability 0.4 0.22 0.28 0.10 munotes.in

Page 223

223 21. If ()()47P, P15 15AB== a n d i f A a n d B a r e i n d e p e n d e n t e v e n t s , find ( i ()PA B∩, (ii) ()PA B∪, (iii) ()PA B∩. 22. If ()()52P, P99AB== and if A and B are independent events, find ( i ()PA B∩, (ii) ()PA B∪, (iii) ()PA B∩ 23. If ()()P0 . 6 5 , P0 . 7 5AB==and ()0.45PA B∩=where A and B are events of sample space S, find (i) ()/PAB, (ii) ()PA B∪, (iii) ()PA B∩. 24. A box containing 5 red and 3 black balls, 3 balls are drawn at random from box. Find the expected number of red balls drawn. 25. Two fair dice are rolled. X denotes the sum of the numbers appearing on the uppermost faces of the dice. Find the expected value. 11.10 LIST OF REFERENCES • Discrete Mathematics with Applications by Sussana S. Epp • Discrete Mathematics and its Applications by Kenneth H. Rosen • Discrete Mathematical Structures by B Kolman, RC Busby, S Ross • Discrete structures by Liu. ***** munotes.in