Tuesday, December 18

Difference of Sets


Difference of Sets is the operation on set(s). if there is a st A and a st B then st difference A – B  gives the elements of st A that are not in st B. similarly by Difference Set B – A gives the elements of st B that are not in st A.

As shown in above Venn diagram A – B is the closed curve with blue outline. This shows clearly that A– B is composed of those elements which do not belong to st B. set diffrnce A – B can also be stated as st A – (A∩B).  A∩B is the part which is common in A and B. so A – B is said to be that part of A which has exclusion of common part of A and B or which excludes common part with st B.

A – B = {x: x ∈A,and  B}
For example if there exists a st S1 {1, 2, 3, 4, 8, 10} and st S2 {2, 6, 7, 4, 8, 5} then S1 – S2 gives the elements of S1 that are not in S2 {1, 3, 10}. As you see this difference does not contain any element of S2 and also it contains only those elements of S1 that are not in st S2 or that are uniquely in st S1. Similarly S2 – S1 or above example gives a st = {6, 7, 5}.

Symmetric Difference of Sets is another operation done on sts as explained below:
Given two sts A and B then by symmtric Difference Sets A and B gives those elements of A and B which are either in A st or in B st but not in both st. We can also say that it gives the union of two sts but excluding the common element of them or intersection of them. This operation is represented as: A ∆ B = (A ∪B)-(A ∩ B ) as shown in diagram given below:

   
Example: if st A = {2, 3, 4, 5, 7} and st B = {3, 6, 7, 8, 9} then A ∆ B = {2, 4, 5, 8, 9}. Elements 3, 6, 7 are not there as they are common in both the sts. Another way to do it is find union and intersection of both sts and subtract intersection from union as:  A ∪B  = {2, 3, 4, 5, 6, 7, 8, 9} and A ∩ B = {3, 6, 7}. So (A∪B)-(A∩B ) ={2,4,5,8,9}
R Set Difference of B and A gives elements of B but not of A.

No comments:

Post a Comment