Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Discrete Structure BY Prof.NILOY GANGULY scribe prepared by Krishna Devaroy G.T ,07cs1012 25/08/08 1 RELATION List all the partitions of A={1,2,3} 1. P1 ={ {1} ,{2},{3} } 2. P2 ={ {1,2} , {3} } 3. P3 ={ {2,3} ,{1} } 4. P4 ={ {1,3} ,{2} } 1.1 EXAMPLE Consider A={a,b,c,d} and let R= { (a,a),(a,b),(b,c),(c,a),(d,c),(c,b) }. Then R(a)={a,b} , R(b)={c} ,and if A1 ={c,d} ,then R(A1 )={a,b,c} . 1 1.2 THEOREM 1 Let R be a relation from A to B , and let A1 and A2 be subsets of A. Then (a) If A1 ⊆ A2 ,then R(A1 ) ⊆ R(A2 ). (b)R(A1 ∪ A2 ) = R(A1 ) ∪ R(A2 ) . (c)R(A1 ∩ A2 ) ⊆ R(A1 ) ∩ R(A2 ). PROOF:(a) If y ∈ R(A1 ),then x R y for some x ∈ A1 . Since A1 ⊆ A2 , x ∈ A2 . Thus , y ∈ R(A2 ) ,which proves part (a). (b) If y∈R(A1 ∪ A2 ) , then by definition x R y for some x in A1 ∪ A2 . If x is in A1 ,then since x R y ,we must have y ∈ R(A1 ). By the same argument, if x is in A2 ,then y ∈ R(A2 ). In either case y∈ R(A1 ) ∪ R(A2 ). Thus we have shown that R(A1 ∪ A2 ) ⊆ R(A1 ) ∪ R(A2 ). Conversly,since A1 ⊆ (A1 ∪ A2 ) ,part (a) tells us that R(A1 ) ⊆ R(A1 ∪ A2 ). Similarly ,R(A2 ) ⊆ R(A1 ∪ A2 ). Thus R(A1 ) ∪ R(A2 ) ⊆ R(A1 ∪ A2 ), and there fore part (b) is true. (c)If y ∈ R(A1 ∩ A2 ),then for some x in A1 ∩ A2 , x R y . Since x is in both A1 and A2 , it follows that y is in both R(A1 ) and R(A2 ); that is y ∈ R(A1 ) ∩ R(A2 ). Thus part (c) holds good. 1.3 EXAMPLE Let A=Z ,R be ” ≤, ”A1 = {0, 1, 2}, and A2 = {9, 13}. Then R(A1 ) consists of all integers n such that 0 ≤ n, or 1 ≤ n, or 2 ≤ n. Thus R(A1 ) = {0, 1, 2, ....}. Similarly ,,R(A2 ) = {9, 10, 11, ......}, so R(A1 ) ∩ R(A2 ) = {9.10.11.....}. On the other hand A1 ∩ A2 = Φ; thus R(A1 ∩ A2 ) = Φ. This shows that the containment in Theorem 1(c) is not always equality. 2 1.4 THEOREM 2 Let R and S be relations from A to B. IF R(a)=S(a) for all a in A, then R=S. Proof If a R b ,then B ∈ R(a). Therefore ,b∈ S(a) and a S b. Acompletelysimilarargumentshowsthat, if aSb, thenaRb. T husR = S. 1.5 EXAMPLE We can represent relation between two sets as follows A= {a1 , a2 , ......, am } and B={b1 , b2 , ......, bn } Let R is a relation from A to B , We represent R by the m x n matrix =[mij ],which is defined by mij = 1if (ai , bj ) ∈ R mij = 0if (ai , bj ) ∈ / R. The matrix MR is called the matrix of r often MR provides an easy way to check whether R has a given property. 1.6 EXAMPLE 1 0 0 1 Consider the matrix M = 0 1 1 0 1 0 1 0 Mij = 1 if (ai , bj ) ∈ R Since M is 3 x 4 we get A = {a1 , a2 , a3 } and b = {b1 , b2 , b3 , b4 }. Then (ai , bj ) ∈ R if and only if mij = 1. Thus R = {(a1 , b1 ), (a1 , b4 ), (a2 , b2 ), (a2 , b3 ), (a3 , b1 ), (a3 , b3 )}. 3