Venn Diagrams
Venn Diagrams
Venn Diagrams
Discrete Structures I
Venn diagram, invented in 1880 by John Venn, is a schematic
diagram that shows all possible logical relations between different
mathematical sets.
Venn
Diagrams Examples
Set Operations include Set Union, Set Intersection, Set Difference,
Complement of Set, and Cartesian Product.
Set Union
The union of sets A and B (denoted by A ∪ B) is the set of elements
Set Operations which are in A, in B, or in both A and B.
Hence, A ∪ B ={ x | x ∈ A OR x ∈ B}.
Example − If A = {10,11,12,13} and B = {13,14,15}, then A ∪ B =
{10,11,12,13,14,15}. (The common element occurs only once)
Set Intersection
The intersection of sets A and B (denoted by A ∩ B) is the set of
Set Operations elements which are in both A and B.
Hence, A ∩ B = { x | x ∈ A AND x ∈ B}.
Example − If A = {11,12,13} and B = {13,14,15}, then A ∩ B = {13}.
Set Difference/ Relative Complement
The set difference of sets A and B (denoted by A – B) is the set of
elements which are only in A but not in B.
Set Operations Hence, A − B = { x | x ∈ A AND x ∉ B}.
Example − If A = {10,11,12,13} and B = {13,14,15}, then (A − B) =
{10,11,12} and (B − A) = {14,15}. Here, we can see (A − B ) ≠ (B − A)
Complement of a Set
The complement of a set A (denoted by A′) is the set of elements
which are not in set A. Hence, A′ = { x | x ∉ A}.
Set Operations More specifically, A′= (U − A) where U is a universal set which
contains all objects.
Example − If A = { x | x belongs to set of odd integers} then A′ = { y | y
does not belong to set of odd integers}
Cartesian Product / Cross Product
The Cartesian product of n number of sets A1,A2,…An denoted as A1
× A2 ⋯ × An can be defined as all possible ordered pairs (x1, x2, … xn)
where x1 ∈ A1, x2 ∈ A2, … xn ∈ An
Example − If we take two sets A = {a,b} and B = {1,2},
Set Operations
The Cartesian product of A and B is written as −
A × B = {(a,1),(a,2),(b,1),(b,2)}
The Cartesian product of B and A is written as −
B × A = {(1,a),(1,b),(2,a),(2,b)}
Power set of a set S is the set of all subsets of S including the
empty set. The cardinality of a power set of a set S of cardinality n
is 2n. Power set is denoted as P(S).
Example –
For a set S = {a,b,c,d} let us calculate the subsets −
Power Set Subsets with 0 elements − {∅} (the empty set)
Subsets with 1 element − {a},{b},{c},{d}
Subsets with 2 elements − {a,b},{a,c},{a,d},{b,c},{b,d},{c,d}
Subsets with 3 elements − {a,b,c},{a,b,d},{a,c,d},{b,c,d}
Subsets with 4 elements − {a,b,c,d}
Hence, P(S) = {{∅},{a},{b},{c},{d},
{a,b},{a,c},{a,d},{b,c},{b,d},{c,d},
{a,b,c},{a,b,d},{a,c,d},{b,c,d},{a,b,c,d}}
|P(S)| = 24 = 16
Power Set
Note − The power set of an empty set is also an empty set.
|P({∅})| = 20 = 1
Partition of a set, say S, is a collection of n disjoint subsets, say
P1,P2,…Pn that satisfies the following three conditions −
Pi does not contain the empty set.
[Pi ≠ {∅} for all 0 < I ≤ n]
Partitioning of The union of the subsets must equal the entire original set.
a Set [P1 ∪ P2 ∪ ⋯ ∪ Pn = S]
The intersection of any two distinct sets is empty.
[Pa ∩ Pb = {∅}, for a ≠ b where n ≥ a, b ≥ 0]
Example
Partitioning of Let S = {a,b,c,d,e,f,g,h}
Example −
Let S = {1,2,3}, n = |S| = 3
Partitioning of
a Set The alternate partitions are −
1. ∅, {1,2,3}
2. {1}, {2,3}
3. {1,2}, {3}
4. {1,3}, {2}
5. {1}, {2}, {3}
Hence B3=5