Discrete Mathematics and Its ApplicationsLecture 2: Basic Structures: Set Theory
MING GAO
DaSE@ ECNU(for course related communications)
Mar. 27, 2020
Outline
1 Set Concepts
2 Set Operations
3 Application
4 Take-aways
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 2 / 16
Set Concepts
Set
Definition
Set A is a collection of objects (or elements).
a ∈ A : “a is an element of A” or “a is a member of A”;
a 6∈ A : “a is not an element of A”;
A = {a1, a2, · · · , an} : A contains a1, a2, · · · , an;
Order of elements is meaningless;
It does not matter how often the same element is listed.
Set equality
Sets A and B are equal if and only if they contain exactly the same elements.
If A = {9, 2, 7,−3} and B = {7, 9, 2,−3}, then A = B.
If A = {9, 2, 7} and B = {7, 9, 2,−3}, then A 6= B.;
If A = {9, 2,−3, 9, 7,−3} and B = {7, 9, 2,−3}, then A = B.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 3 / 16
Set Concepts
Set
Definition
Set A is a collection of objects (or elements).
a ∈ A : “a is an element of A” or “a is a member of A”;
a 6∈ A : “a is not an element of A”;
A = {a1, a2, · · · , an} : A contains a1, a2, · · · , an;
Order of elements is meaningless;
It does not matter how often the same element is listed.
Set equality
Sets A and B are equal if and only if they contain exactly the same elements.
If A = {9, 2, 7,−3} and B = {7, 9, 2,−3}, then A = B.
If A = {9, 2, 7} and B = {7, 9, 2,−3}, then A 6= B.;
If A = {9, 2,−3, 9, 7,−3} and B = {7, 9, 2,−3}, then A = B.MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 3 / 16
Set Concepts
Applications
Examples
Bag of words model: documents, reviews, tweets, news, etc;
Transactions: shopping list, app downloading, book reading,video watching, music listening, etc;
Records in a DB, data item in a data streaming, etc;
Neighbors of a vertex in a graph;
“Standard” sets
Natural numbers: N = {0, 1, 2, 3, · · · }Integers: Z = {· · · ,−2,−1, 0, 1, 2, · · · }Positive integers: Z+ = {1, 2, 3, 4, · · · }Real Numbers: R = {47.3,−12,−0.3, · · · }Rational Numbers: Q = {1.5, 2.6,−3.8, 15, · · · }
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 4 / 16
Set Concepts
Applications
Examples
Bag of words model: documents, reviews, tweets, news, etc;
Transactions: shopping list, app downloading, book reading,video watching, music listening, etc;
Records in a DB, data item in a data streaming, etc;
Neighbors of a vertex in a graph;
“Standard” sets
Natural numbers: N = {0, 1, 2, 3, · · · }Integers: Z = {· · · ,−2,−1, 0, 1, 2, · · · }Positive integers: Z+ = {1, 2, 3, 4, · · · }Real Numbers: R = {47.3,−12,−0.3, · · · }Rational Numbers: Q = {1.5, 2.6,−3.8, 15, · · · }
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 4 / 16
Set Concepts
Representation of sets
Tabular form
A = {1, 2, 3, 4, 5};B = {−2, 0, 2};
Descriptive form
A = set of first five natural numbers;
B = set of positive odd integers;
Set builder form
Q = {a/b : a ∈ Z ∧ b ∈ Z ∧ b 6= 0};B = {y : P(y)}, where P(Y ) : y ∈ E ∧ 0 < y ≤ 50;
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 5 / 16
Set Concepts
Representation of sets
Tabular form
A = {1, 2, 3, 4, 5};B = {−2, 0, 2};
Descriptive form
A = set of first five natural numbers;
B = set of positive odd integers;
Set builder form
Q = {a/b : a ∈ Z ∧ b ∈ Z ∧ b 6= 0};B = {y : P(y)}, where P(Y ) : y ∈ E ∧ 0 < y ≤ 50;
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 5 / 16
Set Concepts
Representation of sets
Tabular form
A = {1, 2, 3, 4, 5};B = {−2, 0, 2};
Descriptive form
A = set of first five natural numbers;
B = set of positive odd integers;
Set builder form
Q = {a/b : a ∈ Z ∧ b ∈ Z ∧ b 6= 0};B = {y : P(y)}, where P(Y ) : y ∈ E ∧ 0 < y ≤ 50;
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 5 / 16
Set Concepts
Representation of sets
Remarks
A = ∅ : empty set, or null set;
Universal set U: contains all the objects under consideration.
A = {{a, b}, {b, c , d}};
Venn diagrams
In general, a universal set is represented by a rectangle.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 6 / 16
Set Concepts
Representation of sets
Remarks
A = ∅ : empty set, or null set;
Universal set U: contains all the objects under consideration.
A = {{a, b}, {b, c , d}};
Venn diagrams
In general, a universal set is represented by a rectangle.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 6 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Subsets
Definition
Set A is a subset of B iff every element of A is also an element of B,denoted as A ⊆ B.
A ⊆ B = ∀x(x ∈ A→ x ∈ B);
For every set S , we have: (1) ∅ ⊆ S ; and (2) S ⊆ S ;
When we wish to emphasize that set A is a subset of set B butthat A 6= B, we write A ⊂ B and say that A is a proper subsetof B, i.e., ∀x(x ∈ A→ x ∈ B) ∧ ∃(x ∈ B ∧ x 6∈ A);
Two useful rules: (1) A = B ⇔ (A ⊆ B) ∧ (B ⊆ A);(2) (A ⊆ B) ∧ (B ⊆ C )⇒ (A ⊆ C );
Given a set S , the power set of S is the set of all subsets of S ,denoted as P(S). The size of 2|S |, where |S | is the size of S .
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 7 / 16
Set Concepts
Cartesian product
Definition
Let A and B be sets. The Cartesian product of A and B, denotedby A× B, is set A× B = {(a, b) : a ∈ A ∧ b ∈ B}, where (a, b) is aordered 2-tuples, called ordered pairs.
Let A = {1, 2} and B = {a, b, c}, the Cartesian product
A× B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)};
The Cartesian product of A1,A2, · · · ,An is denoted asA1 × A2 × · · · × An
A1 × A2 × · · · × An = {(a1, a2, · · · , an) : ∀i ai ∈ Ai};
A subset R of the Cartesian product A× B is called a relationfrom A to B.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 8 / 16
Set Concepts
Cartesian product
Definition
Let A and B be sets. The Cartesian product of A and B, denotedby A× B, is set A× B = {(a, b) : a ∈ A ∧ b ∈ B}, where (a, b) is aordered 2-tuples, called ordered pairs.
Let A = {1, 2} and B = {a, b, c}, the Cartesian product
A× B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)};
The Cartesian product of A1,A2, · · · ,An is denoted asA1 × A2 × · · · × An
A1 × A2 × · · · × An = {(a1, a2, · · · , an) : ∀i ai ∈ Ai};
A subset R of the Cartesian product A× B is called a relationfrom A to B.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 8 / 16
Set Concepts
Cartesian product
Definition
Let A and B be sets. The Cartesian product of A and B, denotedby A× B, is set A× B = {(a, b) : a ∈ A ∧ b ∈ B}, where (a, b) is aordered 2-tuples, called ordered pairs.
Let A = {1, 2} and B = {a, b, c}, the Cartesian product
A× B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)};
The Cartesian product of A1,A2, · · · ,An is denoted asA1 × A2 × · · · × An
A1 × A2 × · · · × An = {(a1, a2, · · · , an) : ∀i ai ∈ Ai};
A subset R of the Cartesian product A× B is called a relationfrom A to B.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 8 / 16
Set Concepts
Cartesian product
Definition
Let A and B be sets. The Cartesian product of A and B, denotedby A× B, is set A× B = {(a, b) : a ∈ A ∧ b ∈ B}, where (a, b) is aordered 2-tuples, called ordered pairs.
Let A = {1, 2} and B = {a, b, c}, the Cartesian product
A× B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)};
The Cartesian product of A1,A2, · · · ,An is denoted asA1 × A2 × · · · × An
A1 × A2 × · · · × An = {(a1, a2, · · · , an) : ∀i ai ∈ Ai};
A subset R of the Cartesian product A× B is called a relationfrom A to B.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 8 / 16
Set Operations
Set operations
Operators
Let A and B be two sets, and U be the universal set
Union: A ∪ B = {x : x ∈ A ∨ x ∈ B};Intersection: A ∩ B = {x : x ∈ A ∧ x ∈ B};Difference: A− B = {x : x ∈ A ∧ x 6∈ B} (sometimes denotedas A \ B);
Complement: A = U − A = {x ∈ U : x 6∈ A};
A− B = A ∩ B;
|A ∪ B| = |A|+ |B| − |A ∩ B|.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 9 / 16
Set Operations
Set operations
Operators
Let A and B be two sets, and U be the universal set
Union: A ∪ B = {x : x ∈ A ∨ x ∈ B};Intersection: A ∩ B = {x : x ∈ A ∧ x ∈ B};Difference: A− B = {x : x ∈ A ∧ x 6∈ B} (sometimes denotedas A \ B);
Complement: A = U − A = {x ∈ U : x 6∈ A};
A− B = A ∩ B;
|A ∪ B| = |A|+ |B| − |A ∩ B|.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 9 / 16
Set Operations
Set operations
Operators
Let A and B be two sets, and U be the universal set
Union: A ∪ B = {x : x ∈ A ∨ x ∈ B};Intersection: A ∩ B = {x : x ∈ A ∧ x ∈ B};Difference: A− B = {x : x ∈ A ∧ x 6∈ B} (sometimes denotedas A \ B);
Complement: A = U − A = {x ∈ U : x 6∈ A};
A− B = A ∩ B;
|A ∪ B| = |A|+ |B| − |A ∩ B|.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 9 / 16
Set Operations
Set operations
Operators
Let A and B be two sets, and U be the universal set
Union: A ∪ B = {x : x ∈ A ∨ x ∈ B};Intersection: A ∩ B = {x : x ∈ A ∧ x ∈ B};Difference: A− B = {x : x ∈ A ∧ x 6∈ B} (sometimes denotedas A \ B);
Complement: A = U − A = {x ∈ U : x 6∈ A};
A− B = A ∩ B;
|A ∪ B| = |A|+ |B| − |A ∩ B|.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 9 / 16
Set Operations
Set identities
Table of logical equivalence
equivalence name
A ∩ U = A Identity lawsA ∪ ∅ = A
A ∩ A = A Idempotent lawsA ∪ A = A
(A ∩ B) ∩ C = A ∩ (B ∩ C ) Associative laws(A ∪ B) ∪ C = A ∪ (B ∪ C )
A ∪ (A ∩ B) = A Absorption lawsA ∩ (A ∪ B) = A
A ∩ A = ∅ Complement laws
A ∪ A = U
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 10 / 16
Set Operations
Logical equivalence Cont’d
Table of logical equivalence
equivalence name
A ∪ U = U Domination lawsA ∩ ∅ = ∅
A ∩ B = B ∩ A Commutative lawsA ∪ B = B ∪ A
(A ∩ B) ∪ C = (A ∪ C ) ∩ (B ∪ C ) Distributive laws(A ∪ B) ∩ C = (A ∩ C ) ∪ (B ∩ C )
(A ∩ B) = A ∪ B De Morgan’s laws
(A ∪ B) = A ∩ B
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 11 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise
= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic
= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Proof of De Morgan law
Proof
Use set builder notation and logical equivalences to establish the firstDe Morgan lawSteps Reasons
A ∩ B primise= {x : x 6∈ 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 law for logic= {x : (x 6∈ A) ∨ (x 6∈ B)} definition of does not belong symbol
= {x : (x ∈ A) ∨ (x ∈ B)} definition of complement
= {x : x ∈ (A ∪ B)} definition of union
= A ∪ B meaning of set builder notation
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 12 / 16
Set Operations
Generalized unions and intersections
Union
A1 ∪ A2 ∪ · · · ∪ An =⋃n
i=1 Ai ;
A1 ∪ A2 ∪ · · · ∪ An ∪ · · · =⋃∞
i=1 Ai ;
Intersection
A1 ∩ A2 ∩ · · · ∩ An =⋂n
i=1 Ai ;
A1 ∩ A2 ∩ · · · ∩ An ∩ · · · =⋂∞
i=1 Ai ;
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 13 / 16
Set Operations
Generalized unions and intersections
Union
A1 ∪ A2 ∪ · · · ∪ An =⋃n
i=1 Ai ;
A1 ∪ A2 ∪ · · · ∪ An ∪ · · · =⋃∞
i=1 Ai ;
Intersection
A1 ∩ A2 ∩ · · · ∩ An =⋂n
i=1 Ai ;
A1 ∩ A2 ∩ · · · ∩ An ∩ · · · =⋂∞
i=1 Ai ;
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 13 / 16
Application
Set covering problem
Input
Universal set U = {u1, u2, · · · , un}Subsets S1,S2, · · · , Sm ⊆ UCost c1, c2, · · · , cm
Goal
Find a set I ⊆ {1, 2, · · · ,m} that minimizes∑
i∈I ci ,such that
⋃i∈I Si = U
Applications
Document summarization
Natural language generation
Information cascade
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 14 / 16
Application
Set covering problem
Input
Universal set U = {u1, u2, · · · , un}Subsets S1,S2, · · · , Sm ⊆ UCost c1, c2, · · · , cm
Goal
Find a set I ⊆ {1, 2, · · · ,m} that minimizes∑
i∈I ci ,such that
⋃i∈I Si = U
Applications
Document summarization
Natural language generation
Information cascade
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 14 / 16
Application
Set covering problem
Input
Universal set U = {u1, u2, · · · , un}Subsets S1,S2, · · · , Sm ⊆ UCost c1, c2, · · · , cm
Goal
Find a set I ⊆ {1, 2, · · · ,m} that minimizes∑
i∈I ci ,such that
⋃i∈I Si = U
Applications
Document summarization
Natural language generation
Information cascade
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 14 / 16
Take-aways
Take-aways
Set Concepts;
Set Operations;
Applications.
MING GAO (DaSE@ecnu) Discrete Mathematics and Its Applications Mar. 27, 2020 15 / 16