SlideShare a Scribd company logo
CSC102 - Discrete Structures
(Discrete Mathematics)
Set Operations
Set operations: Union
Formal definition for the union of two sets:
A U B = { x | x  A or x  B } or
A U B = { x  U| x  A or x  B }
Further examples
 {1, 2, 3}  {3, 4, 5} = {1, 2, 3, 4, 5}
 {a, b}  {3, 4} = {a, b, 3, 4}
 {1, 2}   = {1, 2}
Properties of the union operation
 A   = A Identity law
 A  U = U Domination law
 A  A = A Idempotent law
 A  B = B  A Commutative law
 A  (B  C) = (A  B)  C Associative law
2
3
Set presentation
4
Set operations: Intersection
Formal definition for the intersection of two sets:
A ∩ B = { x | x  A and x  B }
Examples
 {1, 2, 3} ∩ {3, 4, 5} = {3}
 {a, b} ∩ {3, 4} = 
 {1, 2} ∩  = 
Properties of the intersection operation
 A ∩ U = A Identity law
 A ∩  =  Domination law
 A ∩ A = A Idempotent law
 A ∩ B = B ∩ A Commutative law
 A ∩ (B ∩ C) = (A ∩ B) ∩ C Associative law
5
6
Disjoint sets
Formal definition for disjoint sets:
Two sets are disjoint if their intersection is the
empty set
Further examples
 {1, 2, 3} and {3, 4, 5} are not disjoint
 {a, b} and {3, 4} are disjoint
 {1, 2} and  are disjoint
• Their intersection is the empty set
  and  are disjoint!
• Because their intersection is the empty set
7
Exercise
• What is the cardinality of AUB where A and B
are two finite sets?
• |A ∪ B| = |A| + |B| ???
• Incorrect
• |A ∪ B| = |A| + |B| − |A ∩ B|???
• Correct
8
Set operations: Difference
Formal definition for the difference of two sets:
A - B = { x | x  A and x  B }
Sometimes denoted by AB.
Further examples
 {1, 2, 3} - {3, 4, 5} = {1, 2}
 {a, b} - {3, 4} = {a, b}
 {1, 2} -  = {1, 2}
The difference of any set S with the empty set will be the set S
9
Exercise
• What is the cardinality of A∩B where A and B
are two finite sets?
• |A∩B | = |B| - |B - A|???
• Correct
• |A∩B | = |A| - |A - B|???
• Correct
• |A∩B | = |A| + |B| - (|A - B| + |B - A|)???
• Incorrect
10
Complement sets
Formal definition for the complement of a set:
A = { x | x  A } = Ac
 Or U – A, where U is the universal set
Further examples (assuming U = Z)
 {1, 2, 3}c = { …, -2, -1, 0, 4, 5, 6, … }
 {a, b}c = Z
Properties of complement sets
 (Ac)c = A Complementation law
 A  Ac = U Complement law
 A ∩ Ac =  Complement law
11
Set Identities
12
Set Identities
13
Set Identities
14
How to prove a set identity
For example: A ∩ B = B - (B - A)
Four methods:
1. Using the basic set identities
2. Proving that each set is a subset of each other
3. Using set builder notation and logical
equivalences
4. Using membership tables (we’ll not study it)
• Similar to truth tables
15
First Proof
A ∩ B = B - (B - A)
A B
A∩B
B-A
B-(B-A)
16
1. Proof by Set Identities
A  B = A - (A - B) = B – (B – A)
Proof: A - (A - B)
= A - (A  Bc) A - B = A  Bc
= A  (A  Bc)c Same as above
= A  (Ac  B) De Morgan’s Law
= (A  Ac)  (A  B) Distributive Law
=   (A  B) Complement Law
= A  B Identity Law
17
2. Showing each is a subset of the others
Second Example Proof
 (A  B)c = Ac  Bc
Proof: Want to prove that
(A  B)c  Ac  Bc and Ac  Bc  (A  B)c
(i) x  (A  B)c
 x  (A  B)
  (x  A  B)
  (x  A  x  B)
  (x  A)   (x  B)
 x  A  x  B
 x  Ac  x  Bc
 x  Ac  Bc
(ii) Similarly we show that Ac  Bc  (A  B)c
18
Same proof with Set builder Notation
(A ∩ B)c = Ac ∪ Bc
• (A ∩ B)c = {x | x  A ∩ B} Definition of complement
= {x |¬(x ∈ (A ∩ B))} Definition of does not belong symbol
= {x |¬(x ∈ A ∧ x ∈ B)} Definition of intersection
= {x | ¬(x ∈ A)∨¬(x ∈ B)} De Morgan’s law
= {x | x  A ∨ x  B} Definition of does not belong symbol
= {x | x ∈ Ac ∨ x ∈ Bc} Definition of complement
= {x | x ∈ Ac ∪ Bc} Definition of union
= Ac ∪ Bc meaning of set builder notation
19
20
END
21

More Related Content

PPT
Set Operations
PPT
06-set_operations.ppt
PDF
unit-1.pdfSRM MATHS DISCREATE MATHS 2024
PDF
Set and Set operations, UITM KPPIM DUNGUN
PPT
Set Operations Topic Including Union , Intersection, Disjoint etc De Morgans ...
PPT
Introduction to set theory with application
PPT
A set is a structure, representing an unordered collection (group, plurality)...
PPT
SetTheory.ppt
Set Operations
06-set_operations.ppt
unit-1.pdfSRM MATHS DISCREATE MATHS 2024
Set and Set operations, UITM KPPIM DUNGUN
Set Operations Topic Including Union , Intersection, Disjoint etc De Morgans ...
Introduction to set theory with application
A set is a structure, representing an unordered collection (group, plurality)...
SetTheory.ppt

Similar to 8-Sets-2.ppt (20)

PPT
SetTheory.ppt
PPT
1. set theory
PDF
Sets.pdf
PPTX
Set theory for the Data Analysis and AI.pptx
PPT
Lesson 1 &2 -Set Theory and Functions.ppt
PPTX
sets by navneet
PPTX
PresentationMaths.pptx based on set theory
PPTX
INTRODUCTION OF SETS AND PROPERTIES OF SETSSets.pptx
PDF
Mathematics Sets and Logic Week 1
PDF
2 》set operation.pdf
PPT
Mtk3013 chapter 2-3
PPTX
Set Theory DM
PPTX
set identities and their examples outlined.pptx
PPTX
Discrete mathematic
PPTX
2.1 Sets
PPTX
6.1_set.pptx
PDF
Set theory
PPTX
Sets in Maths (Complete Topic)
PPTX
2nd unit by Kiranmaie p.pptxuwuudhjhgjhfg
PPTX
LEC 3 by oral patholgy peroio dv fr juiv.pptx
SetTheory.ppt
1. set theory
Sets.pdf
Set theory for the Data Analysis and AI.pptx
Lesson 1 &2 -Set Theory and Functions.ppt
sets by navneet
PresentationMaths.pptx based on set theory
INTRODUCTION OF SETS AND PROPERTIES OF SETSSets.pptx
Mathematics Sets and Logic Week 1
2 》set operation.pdf
Mtk3013 chapter 2-3
Set Theory DM
set identities and their examples outlined.pptx
Discrete mathematic
2.1 Sets
6.1_set.pptx
Set theory
Sets in Maths (Complete Topic)
2nd unit by Kiranmaie p.pptxuwuudhjhgjhfg
LEC 3 by oral patholgy peroio dv fr juiv.pptx
Ad

More from jaffarbikat (10)

DOCX
Deep Learning Vocabulary.docx
DOCX
Deep Neural Network DNN.docx
PPTX
Chapter 24 till slide 40.pptx
PPTX
Chapter 21 Couloumb Law 25.pptx
PDF
Chapter 21.pdf
PPTX
Chapter 21 Couloumb Law 25.pptx
PPTX
10-Sequences and summation.pptx
PPTX
11-Induction CIIT.pptx
PPTX
9-Functions.pptx
PPT
7-Sets-1.ppt
Deep Learning Vocabulary.docx
Deep Neural Network DNN.docx
Chapter 24 till slide 40.pptx
Chapter 21 Couloumb Law 25.pptx
Chapter 21.pdf
Chapter 21 Couloumb Law 25.pptx
10-Sequences and summation.pptx
11-Induction CIIT.pptx
9-Functions.pptx
7-Sets-1.ppt
Ad

Recently uploaded (20)

PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Well-logging-methods_new................
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Project quality management in manufacturing
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Digital Logic Computer Design lecture notes
PPTX
Sustainable Sites - Green Building Construction
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
PPT on Performance Review to get promotions
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Welding lecture in detail for understanding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Internet of Things (IOT) - A guide to understanding
Well-logging-methods_new................
Lecture Notes Electrical Wiring System Components
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Project quality management in manufacturing
Operating System & Kernel Study Guide-1 - converted.pdf
CH1 Production IntroductoryConcepts.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
CYBER-CRIMES AND SECURITY A guide to understanding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Digital Logic Computer Design lecture notes
Sustainable Sites - Green Building Construction
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT on Performance Review to get promotions
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding

8-Sets-2.ppt

  • 1. CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
  • 2. Set operations: Union Formal definition for the union of two sets: A U B = { x | x  A or x  B } or A U B = { x  U| x  A or x  B } Further examples  {1, 2, 3}  {3, 4, 5} = {1, 2, 3, 4, 5}  {a, b}  {3, 4} = {a, b, 3, 4}  {1, 2}   = {1, 2} Properties of the union operation  A   = A Identity law  A  U = U Domination law  A  A = A Idempotent law  A  B = B  A Commutative law  A  (B  C) = (A  B)  C Associative law 2
  • 3. 3
  • 5. Set operations: Intersection Formal definition for the intersection of two sets: A ∩ B = { x | x  A and x  B } Examples  {1, 2, 3} ∩ {3, 4, 5} = {3}  {a, b} ∩ {3, 4} =   {1, 2} ∩  =  Properties of the intersection operation  A ∩ U = A Identity law  A ∩  =  Domination law  A ∩ A = A Idempotent law  A ∩ B = B ∩ A Commutative law  A ∩ (B ∩ C) = (A ∩ B) ∩ C Associative law 5
  • 6. 6
  • 7. Disjoint sets Formal definition for disjoint sets: Two sets are disjoint if their intersection is the empty set Further examples  {1, 2, 3} and {3, 4, 5} are not disjoint  {a, b} and {3, 4} are disjoint  {1, 2} and  are disjoint • Their intersection is the empty set   and  are disjoint! • Because their intersection is the empty set 7
  • 8. Exercise • What is the cardinality of AUB where A and B are two finite sets? • |A ∪ B| = |A| + |B| ??? • Incorrect • |A ∪ B| = |A| + |B| − |A ∩ B|??? • Correct 8
  • 9. Set operations: Difference Formal definition for the difference of two sets: A - B = { x | x  A and x  B } Sometimes denoted by AB. Further examples  {1, 2, 3} - {3, 4, 5} = {1, 2}  {a, b} - {3, 4} = {a, b}  {1, 2} -  = {1, 2} The difference of any set S with the empty set will be the set S 9
  • 10. Exercise • What is the cardinality of A∩B where A and B are two finite sets? • |A∩B | = |B| - |B - A|??? • Correct • |A∩B | = |A| - |A - B|??? • Correct • |A∩B | = |A| + |B| - (|A - B| + |B - A|)??? • Incorrect 10
  • 11. Complement sets Formal definition for the complement of a set: A = { x | x  A } = Ac  Or U – A, where U is the universal set Further examples (assuming U = Z)  {1, 2, 3}c = { …, -2, -1, 0, 4, 5, 6, … }  {a, b}c = Z Properties of complement sets  (Ac)c = A Complementation law  A  Ac = U Complement law  A ∩ Ac =  Complement law 11
  • 15. How to prove a set identity For example: A ∩ B = B - (B - A) Four methods: 1. Using the basic set identities 2. Proving that each set is a subset of each other 3. Using set builder notation and logical equivalences 4. Using membership tables (we’ll not study it) • Similar to truth tables 15
  • 16. First Proof A ∩ B = B - (B - A) A B A∩B B-A B-(B-A) 16
  • 17. 1. Proof by Set Identities A  B = A - (A - B) = B – (B – A) Proof: A - (A - B) = A - (A  Bc) A - B = A  Bc = A  (A  Bc)c Same as above = A  (Ac  B) De Morgan’s Law = (A  Ac)  (A  B) Distributive Law =   (A  B) Complement Law = A  B Identity Law 17
  • 18. 2. Showing each is a subset of the others Second Example Proof  (A  B)c = Ac  Bc Proof: Want to prove that (A  B)c  Ac  Bc and Ac  Bc  (A  B)c (i) x  (A  B)c  x  (A  B)   (x  A  B)   (x  A  x  B)   (x  A)   (x  B)  x  A  x  B  x  Ac  x  Bc  x  Ac  Bc (ii) Similarly we show that Ac  Bc  (A  B)c 18
  • 19. Same proof with Set builder Notation (A ∩ B)c = Ac ∪ Bc • (A ∩ B)c = {x | x  A ∩ B} Definition of complement = {x |¬(x ∈ (A ∩ B))} Definition of does not belong symbol = {x |¬(x ∈ A ∧ x ∈ B)} Definition of intersection = {x | ¬(x ∈ A)∨¬(x ∈ B)} De Morgan’s law = {x | x  A ∨ x  B} Definition of does not belong symbol = {x | x ∈ Ac ∨ x ∈ Bc} Definition of complement = {x | x ∈ Ac ∪ Bc} Definition of union = Ac ∪ Bc meaning of set builder notation 19
  • 20. 20