
Practical Discrete Mathematics
By :

In mathematics, set theory is the study of collections of objects, which is prerequisite knowledge for studying discrete mathematics.
A set is a collection of objects. If a set A is made up of objects a1, a2, …, we write it as A = {a1, a2, …}.
Each object in a set A is called an element of A, and we write an A.
The empty set is denoted .
Sets may contain many sorts of objects—numbers, points, vectors, functions, or even other sets.
Examples of sets include the following:
A set A is a subset of B if all elements in A are also in B, and we write it as A B. We call B a superset of A. If A is a subset of B, but they are not the same set, we call A a proper subset of B, and write A
B.
It is helpful to have an alternative notation in order to construct sets satisfying certain criteria, which we call set-builder notation, defined next.
A set may be written as {x A | Conditions}, which consists of the subset of A such that the given conditions are true.
Sometimes, sets will be expressed as {x | Conditions} when it is obvious what kind of mathematical object x is from the context.
Examples of sets constructed by set-builder notation include the following.
There are some useful operations that may be done to pairs of sets, which we will see in the next definition.
Let A and B be sets. Let's take a look at the basic operations:
It is often useful to represent these set operations with Venn diagrams, which are visual displays of sets. Here are some examples of the operations shown previously:
Figure 1.3 – A B
Figure 1.4 – A B
Figure 1.5 – Ac
Figure 1.6 – A - B
As an example, consider the following diagram. We can use the language of set theory to describe many aspects of the diagram:
Figure 1.7 – Two sets with some elements
Sets A and B are disjoint (or mutually exclusive) if A B =
. In other words, the sets share no elements in common.
Consider sets of even natural numbers E = {2, 4, 6, ...} and odd natural numbers O = {1, 3, 5, ...}. These sets are disjoint, E O =
, since no number is both odd and even.
The union of E and O make up the set of all-natural numbers, E O = N.
De Morgan's laws state how mathematical concepts are related through their opposites. In set theory, these laws make use of complements to address the intersection and union of sets.
De Morgan's laws can be written as follows:
The following diagrams display De Morgan's laws:
Figure 1.8 – De Morgan's laws (A B)C = AC
BC
Figure 1.9 – De Morgan's laws (A B)C = AC
BC
Proof:
Let's now look at the proof of this theorem:
Let x (A
B)C, then x
(A
B), which means x
A and x
B, or x
AC and x
BC, or x
AC
BC. Thus, (A
B)C is a subset of AC
BC.
Next, let x (AC
BC), then x
AC and x
BC, or x
A and x
B, then x
(A
B) or x
(A
B)C. Like the last step, we see AC
BC is a subset of (A
B)C. Since (A
B)C is a subset of AC
BC and vice versa, (A
B)C = AC
BC.
The proof of this result is similar and is left as an exercise for the reader.
Notice that the preceding method of proof is designed to show that any element of (A B)C is an element of AC
BC, and to show that any element of AC
BC is an element of (A
B)C, which establishes that the two sets are the same.
Consider two sets of natural numbers, the even numbers E = {2, 4, 6, …} and A = {1, 2, 3, 4}. If we take the set of elements in either set, or the complement of the union of the sets, we have (E A)C = {1, 2, 3, 4, 6, 8, 10, …}C = {5, 7, 9, …}.
De Morgan's law states that the intersection of the complements of the sets should be equal to this. Let's verify that this is true. The complements of the sets are EC = {1, 3, 5, …} and AC = {5, 6, 7, …}. The intersection of these complements is EC AC = {5, 7, 9, …}.
The cardinality, or size, of a set A is the number of elements in the set and is denoted |A|.
The cardinalities of some sets are computed here:
With our knowledge of set theory, we can now move on to learn about relations between different sets and functions, which help us to map each element from a set to exactly one element in another set.
Change the font size
Change margin width
Change background colour