SlideShare a Scribd company logo
1 of 27
Download to read offline
SETS and SET
OPERATIONS
SET
 Definition: A set is a (unordered) collection of objects.
These objects are sometimes called elements or members
of the set. (Cantor's naive definition)
Examples:
 Vowels in the English alphabet
V = { a, e, i, o, u }
 First seven prime numbers.
X = { 2, 3, 5, 7, 11, 13, 17 }
SET
Representing a set:
1) Listing the members.
2) Definition by property, using set builder notation
{x| x has property P}
3) Venn Diagram
Example:
Even integers between 50 and 63.
1) E = {50, 52, 54, 56, 58, 60, 62}
2) E = {x | 50 <= x < 63, x is an even integer}
If enumeration of the members is hard we often use ellipses.
Example: a set of positive integers between less than 100
1) A= {1,2,3 …, 99}
2) A = {x ∈ Z+ | x is odd and x < 100}
Sets in Discrete Math
 Natural numbers:
N = {0,1,2,3, …}
 Integers
Z = {…, -2,-1,0,1,2, …}
 Positive integers
Z+ = {1,2, 3.…}
 Rational numbers
Q = {p/q | p ∈ Z, q ∈ Z, q ≠ 0, the set of rational numbers}
 Real numbers
R
Special Sets
 The universal set is denoted by U: the set
of all objects under the consideration.
 The empty set is denoted as ∅ or { }.
Venn Diagram
 A set can be visualized using Venn Diagrams:
V={ A, B, C }
A
B
C
U
Comparing Sets
Subsets
Superset
Equal sets
Disjoint sets
Infinite sets
Subset
 Definition: A set A is said to be a subset of B if and only if every element of
A is also an element of B. We use A ⊆ B to indicate A is a subset of B.
 Alternate way to define A is a subset of B:
∀x (x ∈ A) → (x ∈ B)
A
B
Subset Properties
 Theorem ∅ ⊆ S
Empty set is a subset of any set.
 Theorem: S ⊆ S
Any set S is a subset of itself
Superset
 Definition: A set B is a superset of another set A if all
elements of the set A are elements of the set B.
 A⊃B
Equal Sets
 Definition: Two sets are equal if and only if they have the
same elements.
Example:
 {1,2,3} = {3,1,2} = {1,2,1,3,2} – listed more than one,
they have the same elements
Note: Duplicates don't contribute anything new to a set, so
remove them. The order of the elements in a set doesn't
contribute anything new.
Disjoint Sets
 Two sets are called disjoint if their intersection is the empty set.
Example
A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}. A ∩ B = ∅, A and B are disjoint
A
B
U
Infinite Set
 Definition: A set is infinite if it is not finite.
Examples:
 The set of natural numbers is an infinite set.
N = {0, 1, 2, 3, ... }
 The set of real numbers is an infinite set.
Set Operators
 Union, ∪
 Intersection, ∩
 Complement,
 Difference, -
 Proper Subset, ⊂
 Powerset, P
 Cardinality, |..|
 Cartesian Product, x
Union
 Definition: Let A and B be sets. The union of A and B,
denoted by A ∪ B, is the set that contains those elements
that are either in A or in B, or in both.
 Alternate: A ∪ B = { x | x ∈ A ∨ x ∈ B }
Example:
A = {1,2,3,6} B = { 2,4,6,9}
A ∪ B = { 1,2,3,4,6,9 }
Intersection
 Definition: Let A and B be sets. The intersection of A and
B, denoted by A ∩ B, is the set that contains those
elements that are in both A and B.
 Alternate: A ∩ B = { x | x ∈ A ∧ x ∈ B }
Example:
A = {1,2,3,6} B = { 2, 4, 6, 9}
A ∩B = { 2, 6 }
Complement
 Let U be the universal set. The complement of the set A, denoted by A, is the
complement of A with respect to U. Therefore, the complement of the set A is
U − A.
A = {x ∈ U | x /∈ A}.
Example
A = {a, e, i, o, u} (where the universal set is the set of
letters of the English alphabet)
A = {b, c, d, f, g, h, j, k, l,m, n, p, q, r, s, t, v,w, x, y, z}.
Difference
 Definition: Let A and B be sets. The difference of A and
B, denoted by A - B, is the set containing those elements
that are in A but not in B. The difference of A and B is also
called the complement of B with respect to A.
 A - B = { x | x ∈ A ∧ x ∉ B }.
Example:
A= {1,2,3,5,7} B = {1,5,6,8}
A - B ={2,3,7}
A Proper Subset
 Definition: A set A is said to be a proper subset of B if
and only if A ⊆ B and A ≠ B. We denote that A is a proper
subset of B with the notation
A ⊂ B.
A
B
A Proper Subset
Example:
A={1,2,3} B ={1,2,3,4,5}
Is: A ⊂ B ? Yes.
Power Set
 Definition: Given a set S, the power set of S is the set of all subsets of S.
The power set is denoted by P(S).
Examples:
Assume an empty set ∅
 What is the power set of ∅ ? P(∅) = { ∅ }
 What is the cardinality of P(∅) ? |P(∅)| = 1
Assume set {1}
 P( {1} ) = { ∅, {1} }
 |P({1})| = 2
Power Set
Assume {1,2}
 P( {1,2} ) = { ∅, {1}, {2}, {1,2} }
 |P({1,2} )| =4
Assume {1,2,3}
 P({1,2,3}) = {∅, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }
 |P({1,2,3} | = 8
 If S is a set with |S| = n then | P(S) | = 2n..
Cardinality
 Definition: Let S be a set. If there are exactly n distinct elements in S, where n is
a nonnegative integer, we say S is a finite set and that n is the cardinality of S.
The cardinality of S is denoted by | S |.
Examples:
 V={1 2 3 4 5}
| V | = 5
 A={1,2,3,4, …, 20}
|A| =20
 | ∅ | = 0
Cartesian Product
 Definition: Let S and T be sets. The Cartesian product of S and T, denoted
by S x T, is the set of all ordered pairs (s,t), where s∈ S and t ∈ T. Hence,
S x T = { (s,t) | s ∈ S ∧ t ∈ T}.
Examples:
 S = {1,2} and T = {a,b,c}
 S x T = { (1,a), (1,b), (1,c), (2,a), (2,b), (2,c) }
 T x S = { (a,1), (a, 2), (b,1), (b,2), (c,1), (c,2) }
 Note: S x T ≠ T x S !!!!
Cardinality of Cartesian Product
 |S x T| = |S| * |T|
Example:
 A= {John, Peter, Mike}
 B ={Jane, Ann, Laura}
 A x B= {(John, Jane), (John, Ann) , (John, Laura), (Peter, Jane), (Peter, Ann) ,
(Peter, Laura) , (Mike, Jane) , (Mike, Ann) , (Mike, Laura)}
 |A x B| = 9
 |A|=3, |B|=3 -> |A||B|= 9
Definition: A subset of the Cartesian product A x B is called a relation from the set A
to the set B.
Set
Identities
Set Identities
 Set identities can be proved using membership tables.
 List each combination of sets that an element can belong to.
 Then show that for each such a combination the element either belongs or
does not belong to both sets in the identity.
Example
Prove: (A ∩ B) = A ∪ B
A B A B A ∩ B A ∪ B
1 1 0 0 0 0
1 0 0 1 1 1
0 1 1 0 1 1
0 0 1 1 1 1

More Related Content

Similar to Set and Set operations, UITM KPPIM DUNGUN

Mathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfMathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfgowhiksankar54
 
Set Theory
Set TheorySet Theory
Set Theoryitutor
 
pdf_20221016_194015_0000.pdf
pdf_20221016_194015_0000.pdfpdf_20221016_194015_0000.pdf
pdf_20221016_194015_0000.pdfSenaJover
 
SET AND ITS OPERATIONS
SET AND ITS OPERATIONSSET AND ITS OPERATIONS
SET AND ITS OPERATIONSRohithV15
 
Ch1 sets and_logic(1)
Ch1 sets and_logic(1)Ch1 sets and_logic(1)
Ch1 sets and_logic(1)Kwonpyo Ko
 
Moazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptx
Moazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptxMoazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptx
Moazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptxKhalidSyfullah6
 
Set theory and Venn Diagram.docx
Set theory and Venn Diagram.docxSet theory and Venn Diagram.docx
Set theory and Venn Diagram.docxRenierXanderUy
 
SETS - Vedantu.pdf
SETS - Vedantu.pdfSETS - Vedantu.pdf
SETS - Vedantu.pdfAneeshRenu
 
Set
SetSet
SetH K
 
Sets in Maths (Complete Topic)
Sets in Maths (Complete Topic)Sets in Maths (Complete Topic)
Sets in Maths (Complete Topic)Manik Bhola
 

Similar to Set and Set operations, UITM KPPIM DUNGUN (20)

Sets
SetsSets
Sets
 
2.1 Sets
2.1 Sets2.1 Sets
2.1 Sets
 
Mathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfMathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdf
 
Set Theory
Set TheorySet Theory
Set Theory
 
pdf_20221016_194015_0000.pdf
pdf_20221016_194015_0000.pdfpdf_20221016_194015_0000.pdf
pdf_20221016_194015_0000.pdf
 
6.1_set.pptx
6.1_set.pptx6.1_set.pptx
6.1_set.pptx
 
Mtk3013 chapter 2-3
Mtk3013   chapter 2-3Mtk3013   chapter 2-3
Mtk3013 chapter 2-3
 
SETS
SETSSETS
SETS
 
SET AND ITS OPERATIONS
SET AND ITS OPERATIONSSET AND ITS OPERATIONS
SET AND ITS OPERATIONS
 
Ch1 sets and_logic(1)
Ch1 sets and_logic(1)Ch1 sets and_logic(1)
Ch1 sets and_logic(1)
 
SETS PPT-XI.pptx
SETS PPT-XI.pptxSETS PPT-XI.pptx
SETS PPT-XI.pptx
 
Sets in discrete mathematics
Sets in discrete mathematicsSets in discrete mathematics
Sets in discrete mathematics
 
Concept of set.
Concept of set.Concept of set.
Concept of set.
 
Moazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptx
Moazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptxMoazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptx
Moazzzim Sir (25.07.23)CSE 1201, Week#3, Lecture#7.pptx
 
Set theory and Venn Diagram.docx
Set theory and Venn Diagram.docxSet theory and Venn Diagram.docx
Set theory and Venn Diagram.docx
 
SETS - Vedantu.pdf
SETS - Vedantu.pdfSETS - Vedantu.pdf
SETS - Vedantu.pdf
 
Set
SetSet
Set
 
Sets in Maths (Complete Topic)
Sets in Maths (Complete Topic)Sets in Maths (Complete Topic)
Sets in Maths (Complete Topic)
 
Sets class 11
Sets class 11Sets class 11
Sets class 11
 
Chpt 2-sets v.3
Chpt 2-sets v.3Chpt 2-sets v.3
Chpt 2-sets v.3
 

Recently uploaded

Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxdolaknnilon
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfchwongval
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 

Recently uploaded (20)

Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptx
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdf
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 

Set and Set operations, UITM KPPIM DUNGUN

  • 2. SET  Definition: A set is a (unordered) collection of objects. These objects are sometimes called elements or members of the set. (Cantor's naive definition) Examples:  Vowels in the English alphabet V = { a, e, i, o, u }  First seven prime numbers. X = { 2, 3, 5, 7, 11, 13, 17 }
  • 3. SET Representing a set: 1) Listing the members. 2) Definition by property, using set builder notation {x| x has property P} 3) Venn Diagram Example: Even integers between 50 and 63. 1) E = {50, 52, 54, 56, 58, 60, 62} 2) E = {x | 50 <= x < 63, x is an even integer} If enumeration of the members is hard we often use ellipses. Example: a set of positive integers between less than 100 1) A= {1,2,3 …, 99} 2) A = {x ∈ Z+ | x is odd and x < 100}
  • 4. Sets in Discrete Math  Natural numbers: N = {0,1,2,3, …}  Integers Z = {…, -2,-1,0,1,2, …}  Positive integers Z+ = {1,2, 3.…}  Rational numbers Q = {p/q | p ∈ Z, q ∈ Z, q ≠ 0, the set of rational numbers}  Real numbers R
  • 5. Special Sets  The universal set is denoted by U: the set of all objects under the consideration.  The empty set is denoted as ∅ or { }.
  • 6. Venn Diagram  A set can be visualized using Venn Diagrams: V={ A, B, C } A B C U
  • 8. Subset  Definition: A set A is said to be a subset of B if and only if every element of A is also an element of B. We use A ⊆ B to indicate A is a subset of B.  Alternate way to define A is a subset of B: ∀x (x ∈ A) → (x ∈ B) A B
  • 9. Subset Properties  Theorem ∅ ⊆ S Empty set is a subset of any set.  Theorem: S ⊆ S Any set S is a subset of itself
  • 10. Superset  Definition: A set B is a superset of another set A if all elements of the set A are elements of the set B.  A⊃B
  • 11. Equal Sets  Definition: Two sets are equal if and only if they have the same elements. Example:  {1,2,3} = {3,1,2} = {1,2,1,3,2} – listed more than one, they have the same elements Note: Duplicates don't contribute anything new to a set, so remove them. The order of the elements in a set doesn't contribute anything new.
  • 12. Disjoint Sets  Two sets are called disjoint if their intersection is the empty set. Example A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}. A ∩ B = ∅, A and B are disjoint A B U
  • 13. Infinite Set  Definition: A set is infinite if it is not finite. Examples:  The set of natural numbers is an infinite set. N = {0, 1, 2, 3, ... }  The set of real numbers is an infinite set.
  • 14. Set Operators  Union, ∪  Intersection, ∩  Complement,  Difference, -  Proper Subset, ⊂  Powerset, P  Cardinality, |..|  Cartesian Product, x
  • 15. Union  Definition: Let A and B be sets. The union of A and B, denoted by A ∪ B, is the set that contains those elements that are either in A or in B, or in both.  Alternate: A ∪ B = { x | x ∈ A ∨ x ∈ B } Example: A = {1,2,3,6} B = { 2,4,6,9} A ∪ B = { 1,2,3,4,6,9 }
  • 16. Intersection  Definition: Let A and B be sets. The intersection of A and B, denoted by A ∩ B, is the set that contains those elements that are in both A and B.  Alternate: A ∩ B = { x | x ∈ A ∧ x ∈ B } Example: A = {1,2,3,6} B = { 2, 4, 6, 9} A ∩B = { 2, 6 }
  • 17. Complement  Let U be the universal set. The complement of the set A, denoted by A, is the complement of A with respect to U. Therefore, the complement of the set A is U − A. A = {x ∈ U | x /∈ A}. Example A = {a, e, i, o, u} (where the universal set is the set of letters of the English alphabet) A = {b, c, d, f, g, h, j, k, l,m, n, p, q, r, s, t, v,w, x, y, z}.
  • 18. Difference  Definition: Let A and B be sets. The difference of A and B, denoted by A - B, is the set containing those elements that are in A but not in B. The difference of A and B is also called the complement of B with respect to A.  A - B = { x | x ∈ A ∧ x ∉ B }. Example: A= {1,2,3,5,7} B = {1,5,6,8} A - B ={2,3,7}
  • 19. A Proper Subset  Definition: A set A is said to be a proper subset of B if and only if A ⊆ B and A ≠ B. We denote that A is a proper subset of B with the notation A ⊂ B. A B
  • 20. A Proper Subset Example: A={1,2,3} B ={1,2,3,4,5} Is: A ⊂ B ? Yes.
  • 21. Power Set  Definition: Given a set S, the power set of S is the set of all subsets of S. The power set is denoted by P(S). Examples: Assume an empty set ∅  What is the power set of ∅ ? P(∅) = { ∅ }  What is the cardinality of P(∅) ? |P(∅)| = 1 Assume set {1}  P( {1} ) = { ∅, {1} }  |P({1})| = 2
  • 22. Power Set Assume {1,2}  P( {1,2} ) = { ∅, {1}, {2}, {1,2} }  |P({1,2} )| =4 Assume {1,2,3}  P({1,2,3}) = {∅, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }  |P({1,2,3} | = 8  If S is a set with |S| = n then | P(S) | = 2n..
  • 23. Cardinality  Definition: Let S be a set. If there are exactly n distinct elements in S, where n is a nonnegative integer, we say S is a finite set and that n is the cardinality of S. The cardinality of S is denoted by | S |. Examples:  V={1 2 3 4 5} | V | = 5  A={1,2,3,4, …, 20} |A| =20  | ∅ | = 0
  • 24. Cartesian Product  Definition: Let S and T be sets. The Cartesian product of S and T, denoted by S x T, is the set of all ordered pairs (s,t), where s∈ S and t ∈ T. Hence, S x T = { (s,t) | s ∈ S ∧ t ∈ T}. Examples:  S = {1,2} and T = {a,b,c}  S x T = { (1,a), (1,b), (1,c), (2,a), (2,b), (2,c) }  T x S = { (a,1), (a, 2), (b,1), (b,2), (c,1), (c,2) }  Note: S x T ≠ T x S !!!!
  • 25. Cardinality of Cartesian Product  |S x T| = |S| * |T| Example:  A= {John, Peter, Mike}  B ={Jane, Ann, Laura}  A x B= {(John, Jane), (John, Ann) , (John, Laura), (Peter, Jane), (Peter, Ann) , (Peter, Laura) , (Mike, Jane) , (Mike, Ann) , (Mike, Laura)}  |A x B| = 9  |A|=3, |B|=3 -> |A||B|= 9 Definition: A subset of the Cartesian product A x B is called a relation from the set A to the set B.
  • 27. Set Identities  Set identities can be proved using membership tables.  List each combination of sets that an element can belong to.  Then show that for each such a combination the element either belongs or does not belong to both sets in the identity. Example Prove: (A ∩ B) = A ∪ B A B A B A ∩ B A ∪ B 1 1 0 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 1 1