BY
D.SHANMUGAPRIYA
SECTION SUMMARY
 Set operations
 Union
 Intersection
 Complementation
 Difference
 More on set cardinality
 Set identities
 Proving identities
 Membership tables
UNION
 DEFINITION:
Let A and B be sets.the union of the sets A and B
,denoted by AUB,is the set:

Example:what is{1,2,3} U {3,4,5}?
Solution:{1,2,3,4,5}
{X|XE A V XE B}
U
A B
INTERSECTION
Definition:The intersection of sets A and B,denoted by
AnB,is
 Then A and B are said to be disjoint
Example:what is {123}n {345}
Solution:[3]
{X|X E A ^ X E B
U
A B
COMPLEMENTED
 Definition:If A is set,then the complement of the A
denoted by A is the set U-A
 Example:if U is the positive integers less than 100,what is
the complement of{x |x>70}
A={X E U| X E|A
A
AA
DIFFERENCE
 Definition:Let A and B be sets.the difference ofA and B
,denoted by A-B,is the set containing the elements of A
that are not inB,
 The difference of A and B is called complement of B with
respect to A.
Venn diagram A-B
A-B={X|X E A^ X E B}=AnB
COMPLEMENT
A B
U
CARDINATY OF THE UNION
OF TWO SETS
 EXAMPLE:
 Let A be the math majors in your class and B be the
CS majors.
To count the number of students who are either math
major or CS major,add the number of math majors and the
numbers of CS majors,and subtract the number of joints
CSmath majors.
REVIEW QUESTIONS
1. Example:U={0,1,2,3,4,5,6,7,8,9,10}A={1,2,3,4,5},B={4
,5,6,7,8}
2. AUB:{1,2,3,4,5,6,7,8}
3. AnB;{4,5}
4. A COMPLEMENT:{0,6,7,8,9,10}
5. B COMPLEMENT:{O,1,2,3,9,10}
6. A-B:{1,2,3}
7. B-A:{6,7,8}
SYMMETRIC DIFFERENCE
 Definition:The symmetric difference of AandB
denoted by AOB is the set
(A-B)U(B-A)
EXAMPLE:
U={0,1,2,3,4,5,6,7,8,9,10}
A={1,2,3,4,5} B={4,5,6,7,8}
SOLUTION:
{1,2,3,6,7,8}
A B
dffierenced
VENN DIAGRAM WITH 3 SETS
 A
 AUB
 BnC
 C”
 AnBnC
2 3 1 8
5 C
A B
C
U
9
SET IDENTITES
 IDENTITY LAWS
A U =A AnU=A
 Domination laws
AuU=U An=0
 Idempotent laws
AUA=A AnA=A
 Complementation law
(A)=A
TYPES OF LAWS
 COMMUTATIVE LAWS
 AUB=BUA ANB=BnA
ASSOCIATIVE LAWS
 AU(BUC)=(AUB)UC
 An(BnC)=(AnB)nC
DISTRIBUTIVE LAWS
 An(BUC)=(AnB)U(AnC)
 AU(BnC)=(AU B)n(AUC)
PROVING SET IDENTITES
Different ways to prove set identites:
Prove that each set is a subset of the other.
Use set builder notation and propositional logic.
 membership tables:verify that elements in the same
combination of sets always either belong or do not belong
to the same side of the identity.
Use 1 to indicate it is the set and a 0 to indicate that it is
not.
CONCLUSION
Restored sets of values in a dynamic databases are simply
read and write operations with respect to the databases
respectively.although the values used during restortation
are typically two operations reading and writing.

20104136 ----set operations

  • 1.
  • 2.
    SECTION SUMMARY  Setoperations  Union  Intersection  Complementation  Difference  More on set cardinality  Set identities  Proving identities  Membership tables
  • 3.
    UNION  DEFINITION: Let Aand B be sets.the union of the sets A and B ,denoted by AUB,is the set:  Example:what is{1,2,3} U {3,4,5}? Solution:{1,2,3,4,5} {X|XE A V XE B} U A B
  • 4.
    INTERSECTION Definition:The intersection ofsets A and B,denoted by AnB,is  Then A and B are said to be disjoint Example:what is {123}n {345} Solution:[3] {X|X E A ^ X E B U A B
  • 5.
    COMPLEMENTED  Definition:If Ais set,then the complement of the A denoted by A is the set U-A  Example:if U is the positive integers less than 100,what is the complement of{x |x>70} A={X E U| X E|A A AA
  • 6.
    DIFFERENCE  Definition:Let Aand B be sets.the difference ofA and B ,denoted by A-B,is the set containing the elements of A that are not inB,  The difference of A and B is called complement of B with respect to A. Venn diagram A-B A-B={X|X E A^ X E B}=AnB COMPLEMENT A B U
  • 7.
    CARDINATY OF THEUNION OF TWO SETS  EXAMPLE:  Let A be the math majors in your class and B be the CS majors. To count the number of students who are either math major or CS major,add the number of math majors and the numbers of CS majors,and subtract the number of joints CSmath majors.
  • 8.
    REVIEW QUESTIONS 1. Example:U={0,1,2,3,4,5,6,7,8,9,10}A={1,2,3,4,5},B={4 ,5,6,7,8} 2.AUB:{1,2,3,4,5,6,7,8} 3. AnB;{4,5} 4. A COMPLEMENT:{0,6,7,8,9,10} 5. B COMPLEMENT:{O,1,2,3,9,10} 6. A-B:{1,2,3} 7. B-A:{6,7,8}
  • 9.
    SYMMETRIC DIFFERENCE  Definition:Thesymmetric difference of AandB denoted by AOB is the set (A-B)U(B-A) EXAMPLE: U={0,1,2,3,4,5,6,7,8,9,10} A={1,2,3,4,5} B={4,5,6,7,8} SOLUTION: {1,2,3,6,7,8} A B dffierenced
  • 10.
    VENN DIAGRAM WITH3 SETS  A  AUB  BnC  C”  AnBnC 2 3 1 8 5 C A B C U 9
  • 11.
    SET IDENTITES  IDENTITYLAWS A U =A AnU=A  Domination laws AuU=U An=0  Idempotent laws AUA=A AnA=A  Complementation law (A)=A
  • 12.
    TYPES OF LAWS COMMUTATIVE LAWS  AUB=BUA ANB=BnA ASSOCIATIVE LAWS  AU(BUC)=(AUB)UC  An(BnC)=(AnB)nC DISTRIBUTIVE LAWS  An(BUC)=(AnB)U(AnC)  AU(BnC)=(AU B)n(AUC)
  • 13.
    PROVING SET IDENTITES Differentways to prove set identites: Prove that each set is a subset of the other. Use set builder notation and propositional logic.  membership tables:verify that elements in the same combination of sets always either belong or do not belong to the same side of the identity. Use 1 to indicate it is the set and a 0 to indicate that it is not.
  • 14.
    CONCLUSION Restored sets ofvalues in a dynamic databases are simply read and write operations with respect to the databases respectively.although the values used during restortation are typically two operations reading and writing.