SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Sets
DISCRETE STRUCTURE
ABDUL BASIT TAHIR, KAMRAN ALI,
FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
Definition :
 A set is an unordered collection of objects, called elements or members of
the set.
 A set is said to contain its elements. We write a ∈ A to denote that ‘a’ is an
element of the set ‘A’ (or that ‘a’ belongs to ‘A’).
 The notation a ∈ A denotes that ‘a’ is not an element of the set ‘A’.
 Two sets are equal if and only if they have the same elements. Therefore.
 if A and B are sets, then A and B are equal if and only if ∀x(x ∈ A ↔ x ∈
B).We write A = B if A and B are equal sets.
Set notation:
 There are several ways to describe a set. One way is to list all the members
of a set, When this is possible.
 We use a notation where all members of the set are listed between braces.
For example, the notation {a, b, c, d} represents the set with the four
elements a, b, c, and d.
 This way of describing a set is known as the roster method.
Examples:
 EXAMPLE 1 The set V of all vowels in the English alphabet can be written
as V = {a, e, i, o, u}.
 EXAMPLE 2 The set O of odd positive integers less than 10 can be
expressed by O = {1, 3, 5, 7, 9}.
 EXAMPLE 3 The set of positive integers less than 100 can be denoted by
{1, 2, 3, . . . , 99}.
Method two:
 Another way to describe a set is to use set builder notation.
 We characterize all those elements in the set by stating the property or
properties they must have to be members. For instance, the set O of all
odd positive integers less than 10 can be written as…
O = {x | x is an odd positive integer less than 10}.
Sets and it’s types:
 These sets, each denoted using a boldface letter, play an important role in
discrete mathematics:
 N = {0, 1, 2, 3, . . .}, the set of natural numbers
 Z = {. . . ,−2,−1, 0, 1, 2, . . .}, the set of integers
 Z+ = {1, 2, 3, . . .}, the set of positive integers
 Q = {p/q | p ∈ Z, q ∈ Z, and q = 0}, the set of rational numbers
 R, the set of real numbers
 R+, the set of positive real numbers
 C, the set of complex numbers.
Arsalan mubashir:
Equality of sets:
 Two sets are equal if and only if they have the same elements. Therefore.
 If A and B are sets, then A and B are equal if and only if ∀x(x ∈ A ↔ x ∈
B).We write A = B if A and B are equal sets.
 EXAMPLE The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the
same elements.
 Note that the order in which the elements of a set are listed does not
matter.
Types:
 THE EMPTY SET There is a special set that has no elements. This set is
called the empty set , or null set, and is denoted by ∅.
 The empty set can also be denoted by { } (that is, we represent the empty
set with a pair of braces that encloses all the elements in this set).
Subsets:
 It is common to encounter situations where the elements of one set are
also the elements of a second set.
 DEFINITION The set A is a subset of B if and only if every element of A is
also an element of B. We use the notation A ⊆ B to indicate that A is a
subset of the set B.
 EXAMPLE The set of all odd positive integers less than 10 is a subset of
the set of all positive integers less than 10.
 EXAMPLE The set of all computer science majors at your school is a subset
of the set of all students at your school.
Draw a Venn diagram that represents V, the set of
vowels in the English alphabet.
 Solution: We draw a rectangle to indicate the universal set U, which is the set of the 26
letters
 of the English alphabet. Inside this rectangle we draw a circle to represent V . Inside this
circle
 we indicate the elements of V with points •
Venn Diagram for the Set of Vowels.
Empty Set:
 every nonempty set S is guaranteed to have at least two subsets, the empty
set and the set S itself, that is, ∅ ⊆ S and S ⊆ S.
 For every set S, ( i ) ∅ ⊆ S and (ii ) S ⊆ S.
 Venn Diagram Showing that A Is a Subset of B.
Power set:
 DEFINITION Given a set S, the power set of S is the set of all subsets of
the set S. The power set of S is denoted by P(S).
 What is the power set of the set {0, 1, 2}?
 Solution: The power set P({0, 1, 2}) is the set of all subsets of {0, 1, 2}.
Hence,
 P({0, 1, 2}) = {∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}.
 Note that the empty set and the set itself are members of this set of
subsets.
Kamran Ali:
Cartesian product:
 The order of elements in a collection is often important. Because sets are
unordered, a different
 structure is needed to represent ordered collections. This is provided by
ordered n-tuples(multiples).
 DEFINITION The ordered n-tuple (a1, a2, . . . , an) is the ordered collection
that has a1 as its first element, a2 as its second element, . .., and an as its
nth element.
 DEFINITION Let A and B be sets. The Cartesian product of A and B,
denoted by A × B, is the set of all ordered pairs (a, b), where a ∈ A and b ∈
B.
 Hence, A × B = {(a, b) | a ∈ A ∧ b ∈ B}.
Questions:
List the members of these sets.
 a) {x | x is a real number such that 𝑥2 = 1}.
 b) {x | x is a positive integer less than 12}.
 c) {x | x is an integer such that 𝑥2 = 2}.
Q.2: Determine whether each of these
pairs of sets are equal.
 a) {1, 3, 3, 3, 5, 5, 5, 5, 5}, {5, 3, 1}
 b) {{1}}, {1, {1}}
 c) ∅, {∅}
3: For each of the following sets, determine
whether 2 is an element of that set.
 a) {x ∈ R | x is an integer greater than 1}
 b) {x ∈ R | x is the square of an integer}
 c) {2,{2}}
 d) {{2},{{2}}}
 e) {{2},{2,{2}}}
 f ) {{{2}}}
Q 4: Determine whether each of these
statements is true or false.
 a) {1,2,3} ∈ N
 b) {1,2,3,4,9} ∈ R
 c) {0} ⊂ ∅
 d) ∅ ⊂ {0}
 e) {0} ∈ {0}
 f ) {0} ⊂ {0}
 g) {∅} ⊆ {∅}
Faizan Illahi:
Set operations:
 Introduction Two, or more, sets can be combined in many different ways.
 1: UNION
 2: INTERSECTION
 3: SUBTRACTION
 4: ADDITION
Union of two sets:
 DEFINITION Let A and B be sets. The union of the sets 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.
 An element x belongs to the union of the sets A and B if and only if x
belongs to A or x belongs to B. This tells us that
 A ∪ B = {x | x ∈ A ∨ x ∈ B}.
Union of two sets:
 EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5};
that is: {1, 3, 5} ∪ {1, 2, 3} = {1, 2, 3, 5}.
 EXAMPLE 2 The union of the set of all computer science majors at your
university and the set of all mathematics majors at your university is the set of
students at your university who are majoring either in mathematics or in computer
science (or in both).
Intersection of two sets:
 DEFINITION Let A and B be sets. The intersection of the sets A and B,
denoted by A ∩ B, is the set containing those elements in both A and B.
 An element x belongs to the intersection of the sets A and B if and only if x
belongs to A and x belongs to B. This tells us that
 A ∩ B = {x | x ∈ A ∧ x ∈ B}.
Intersection of two sets:
 EXAMPLE: The intersection of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 3}; that is,
{1, 3, 5} ∩ {1, 2, 3} = {1, 3}.
 EXAMPLE: The intersection of the set of all computer science majors at your university
and the set of all mathematics majors is the set of all students who are joint majors in
mathematics and computer science.
 Note: Two sets are called disjoint if their intersection is the empty set.
Noman Ahmad:
Question: Let A = {1, 2, 3, 4, 5}
and B = {0, 3, 6}.
 Find
 a) A ∪ B.
 b) A ∩ B.
 c) A − B.
 d) B − A.
Q’s: Let A = {a, b, c, d, e} and B = {a, b,
c, d, e, f, g, h}.
Find
 a) A ∪ B.
 b) A ∩ B.
 c) A − B.
 d) B − A.
Q’s: Let A and B be sets. Show that
 a) (A ∩ B) ⊆ A.
 b) A ⊆ (A ∪ B).
 c) A − B ⊆ A.
Questions:
 1. Let A be the set of students who live within one mile of school and let B
be the set of students who walk to classes.
 Describe the students in each of these sets.
 a) A ∩ B
 b) A ∪ B
 c) A − B
 d) B − A
Answers:
 1: a) {−1,1} b) {1,2,3,4,5,6,7,8,9,10,11} c) ∅.
 2. a) Yes b) No c) No
 3. a) Yes b) No c) Yes d) No e) No f) No
 4. a) True b) True c) False d) True e) False f) True g) True
____________________________________________________________________
 1. a) The set of students who live within one mile of school
 and walk to classes b) The set of students who live within
 one mile of school or walk to classes (or do both) c) The
 set of students who live within one mile of school but
 do not walk to classes d) The set of students who walk
 to classes but live more than one mile away from school
 2. a) {0,1,2,3,4,5,6} b) {3} c) {1, 2, 4,5} d) {0, 6}
Thankiew

Weitere ähnliche Inhalte

Ähnlich wie 4898850.ppt

Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on sets
Rahul Avicii
 
Set Theory
Set TheorySet Theory
Set Theory
itutor
 

Ähnlich wie 4898850.ppt (20)

CMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set OperationsCMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set Operations
 
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
 
7-Sets-1.ppt
7-Sets-1.ppt7-Sets-1.ppt
7-Sets-1.ppt
 
discrete maths notes.ppt
discrete maths notes.pptdiscrete maths notes.ppt
discrete maths notes.ppt
 
Discrete mathematics OR Structure
Discrete mathematics OR Structure Discrete mathematics OR Structure
Discrete mathematics OR Structure
 
Module week 1 Q1
Module week 1 Q1Module week 1 Q1
Module week 1 Q1
 
Sets in discrete mathematics
Sets in discrete mathematicsSets in discrete mathematics
Sets in discrete mathematics
 
Set concepts
Set conceptsSet concepts
Set concepts
 
Discrete mathematics for diploma students
Discrete mathematics for diploma studentsDiscrete mathematics for diploma students
Discrete mathematics for diploma students
 
Set concepts
Set conceptsSet concepts
Set concepts
 
sets and their introduction and their exercises.pptx
sets and their introduction and their exercises.pptxsets and their introduction and their exercises.pptx
sets and their introduction and their exercises.pptx
 
6.1_set.pptx
6.1_set.pptx6.1_set.pptx
6.1_set.pptx
 
SETS
SETSSETS
SETS
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on sets
 
Set
SetSet
Set
 
SET AND ITS OPERATIONS
SET AND ITS OPERATIONSSET AND ITS OPERATIONS
SET AND ITS OPERATIONS
 
Set Theory
Set TheorySet Theory
Set Theory
 
Explore the foundational concepts of sets in discrete mathematics
Explore the foundational concepts of sets in discrete mathematicsExplore the foundational concepts of sets in discrete mathematics
Explore the foundational concepts of sets in discrete mathematics
 
Q1 Week 1 Lesson -Concepts of Sets and Operation on Sets.pptx
Q1 Week 1 Lesson -Concepts of Sets and Operation on Sets.pptxQ1 Week 1 Lesson -Concepts of Sets and Operation on Sets.pptx
Q1 Week 1 Lesson -Concepts of Sets and Operation on Sets.pptx
 
Digital text sets pdf
Digital text sets  pdfDigital text sets  pdf
Digital text sets pdf
 

Kürzlich hochgeladen

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Kürzlich hochgeladen (20)

Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

4898850.ppt

  • 1. Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
  • 2.
  • 3. Definition :  A set is an unordered collection of objects, called elements or members of the set.  A set is said to contain its elements. We write a ∈ A to denote that ‘a’ is an element of the set ‘A’ (or that ‘a’ belongs to ‘A’).  The notation a ∈ A denotes that ‘a’ is not an element of the set ‘A’.  Two sets are equal if and only if they have the same elements. Therefore.  if A and B are sets, then A and B are equal if and only if ∀x(x ∈ A ↔ x ∈ B).We write A = B if A and B are equal sets.
  • 4. Set notation:  There are several ways to describe a set. One way is to list all the members of a set, When this is possible.  We use a notation where all members of the set are listed between braces. For example, the notation {a, b, c, d} represents the set with the four elements a, b, c, and d.  This way of describing a set is known as the roster method.
  • 5. Examples:  EXAMPLE 1 The set V of all vowels in the English alphabet can be written as V = {a, e, i, o, u}.  EXAMPLE 2 The set O of odd positive integers less than 10 can be expressed by O = {1, 3, 5, 7, 9}.  EXAMPLE 3 The set of positive integers less than 100 can be denoted by {1, 2, 3, . . . , 99}.
  • 6. Method two:  Another way to describe a set is to use set builder notation.  We characterize all those elements in the set by stating the property or properties they must have to be members. For instance, the set O of all odd positive integers less than 10 can be written as… O = {x | x is an odd positive integer less than 10}.
  • 7. Sets and it’s types:  These sets, each denoted using a boldface letter, play an important role in discrete mathematics:  N = {0, 1, 2, 3, . . .}, the set of natural numbers  Z = {. . . ,−2,−1, 0, 1, 2, . . .}, the set of integers  Z+ = {1, 2, 3, . . .}, the set of positive integers  Q = {p/q | p ∈ Z, q ∈ Z, and q = 0}, the set of rational numbers  R, the set of real numbers  R+, the set of positive real numbers  C, the set of complex numbers.
  • 9. Equality of sets:  Two sets are equal if and only if they have the same elements. Therefore.  If A and B are sets, then A and B are equal if and only if ∀x(x ∈ A ↔ x ∈ B).We write A = B if A and B are equal sets.  EXAMPLE The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the same elements.  Note that the order in which the elements of a set are listed does not matter.
  • 10. Types:  THE EMPTY SET There is a special set that has no elements. This set is called the empty set , or null set, and is denoted by ∅.  The empty set can also be denoted by { } (that is, we represent the empty set with a pair of braces that encloses all the elements in this set).
  • 11. Subsets:  It is common to encounter situations where the elements of one set are also the elements of a second set.  DEFINITION The set A is a subset of B if and only if every element of A is also an element of B. We use the notation A ⊆ B to indicate that A is a subset of the set B.  EXAMPLE The set of all odd positive integers less than 10 is a subset of the set of all positive integers less than 10.  EXAMPLE The set of all computer science majors at your school is a subset of the set of all students at your school.
  • 12. Draw a Venn diagram that represents V, the set of vowels in the English alphabet.  Solution: We draw a rectangle to indicate the universal set U, which is the set of the 26 letters  of the English alphabet. Inside this rectangle we draw a circle to represent V . Inside this circle  we indicate the elements of V with points • Venn Diagram for the Set of Vowels.
  • 13. Empty Set:  every nonempty set S is guaranteed to have at least two subsets, the empty set and the set S itself, that is, ∅ ⊆ S and S ⊆ S.  For every set S, ( i ) ∅ ⊆ S and (ii ) S ⊆ S.  Venn Diagram Showing that A Is a Subset of B.
  • 14. Power set:  DEFINITION Given a set S, the power set of S is the set of all subsets of the set S. The power set of S is denoted by P(S).  What is the power set of the set {0, 1, 2}?  Solution: The power set P({0, 1, 2}) is the set of all subsets of {0, 1, 2}. Hence,  P({0, 1, 2}) = {∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}.  Note that the empty set and the set itself are members of this set of subsets.
  • 16. Cartesian product:  The order of elements in a collection is often important. Because sets are unordered, a different  structure is needed to represent ordered collections. This is provided by ordered n-tuples(multiples).  DEFINITION The ordered n-tuple (a1, a2, . . . , an) is the ordered collection that has a1 as its first element, a2 as its second element, . .., and an as its nth element.
  • 17.  DEFINITION Let A and B be sets. The Cartesian product of A and B, denoted by A × B, is the set of all ordered pairs (a, b), where a ∈ A and b ∈ B.  Hence, A × B = {(a, b) | a ∈ A ∧ b ∈ B}.
  • 18. Questions: List the members of these sets.  a) {x | x is a real number such that 𝑥2 = 1}.  b) {x | x is a positive integer less than 12}.  c) {x | x is an integer such that 𝑥2 = 2}.
  • 19. Q.2: Determine whether each of these pairs of sets are equal.  a) {1, 3, 3, 3, 5, 5, 5, 5, 5}, {5, 3, 1}  b) {{1}}, {1, {1}}  c) ∅, {∅}
  • 20. 3: For each of the following sets, determine whether 2 is an element of that set.  a) {x ∈ R | x is an integer greater than 1}  b) {x ∈ R | x is the square of an integer}  c) {2,{2}}  d) {{2},{{2}}}  e) {{2},{2,{2}}}  f ) {{{2}}}
  • 21. Q 4: Determine whether each of these statements is true or false.  a) {1,2,3} ∈ N  b) {1,2,3,4,9} ∈ R  c) {0} ⊂ ∅  d) ∅ ⊂ {0}  e) {0} ∈ {0}  f ) {0} ⊂ {0}  g) {∅} ⊆ {∅}
  • 23. Set operations:  Introduction Two, or more, sets can be combined in many different ways.  1: UNION  2: INTERSECTION  3: SUBTRACTION  4: ADDITION
  • 24. Union of two sets:  DEFINITION Let A and B be sets. The union of the sets 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.  An element x belongs to the union of the sets A and B if and only if x belongs to A or x belongs to B. This tells us that  A ∪ B = {x | x ∈ A ∨ x ∈ B}.
  • 25. Union of two sets:  EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is: {1, 3, 5} ∪ {1, 2, 3} = {1, 2, 3, 5}.  EXAMPLE 2 The union of the set of all computer science majors at your university and the set of all mathematics majors at your university is the set of students at your university who are majoring either in mathematics or in computer science (or in both).
  • 26. Intersection of two sets:  DEFINITION Let A and B be sets. The intersection of the sets A and B, denoted by A ∩ B, is the set containing those elements in both A and B.  An element x belongs to the intersection of the sets A and B if and only if x belongs to A and x belongs to B. This tells us that  A ∩ B = {x | x ∈ A ∧ x ∈ B}.
  • 27. Intersection of two sets:  EXAMPLE: The intersection of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 3}; that is, {1, 3, 5} ∩ {1, 2, 3} = {1, 3}.  EXAMPLE: The intersection of the set of all computer science majors at your university and the set of all mathematics majors is the set of all students who are joint majors in mathematics and computer science.  Note: Two sets are called disjoint if their intersection is the empty set.
  • 29. Question: Let A = {1, 2, 3, 4, 5} and B = {0, 3, 6}.  Find  a) A ∪ B.  b) A ∩ B.  c) A − B.  d) B − A.
  • 30. Q’s: Let A = {a, b, c, d, e} and B = {a, b, c, d, e, f, g, h}. Find  a) A ∪ B.  b) A ∩ B.  c) A − B.  d) B − A.
  • 31. Q’s: Let A and B be sets. Show that  a) (A ∩ B) ⊆ A.  b) A ⊆ (A ∪ B).  c) A − B ⊆ A.
  • 32. Questions:  1. Let A be the set of students who live within one mile of school and let B be the set of students who walk to classes.  Describe the students in each of these sets.  a) A ∩ B  b) A ∪ B  c) A − B  d) B − A
  • 33. Answers:  1: a) {−1,1} b) {1,2,3,4,5,6,7,8,9,10,11} c) ∅.  2. a) Yes b) No c) No  3. a) Yes b) No c) Yes d) No e) No f) No  4. a) True b) True c) False d) True e) False f) True g) True ____________________________________________________________________  1. a) The set of students who live within one mile of school  and walk to classes b) The set of students who live within  one mile of school or walk to classes (or do both) c) The  set of students who live within one mile of school but  do not walk to classes d) The set of students who walk  to classes but live more than one mile away from school
  • 34.  2. a) {0,1,2,3,4,5,6} b) {3} c) {1, 2, 4,5} d) {0, 6}