Basic Structures Lesson 1 Sets
Basic Structures Lesson 1 Sets
IV BASIC STRUCTURES
Lesson 1: Sets
Introduction
Set is a fundamental discrete structure on which all other discrete structures are
built. Sets are used to group objects (that often have similar properties, but not always)
together. For instance, all the students enrolled in DMMMSU make up a set. Likewise, all
the students who are currently taking the Discrete Structures 1 course at any university
make up another set. In addition, students enrolled in DMMMSU who are taking Discrete
Structures 1 form a set that can be obtained by taking elements common to the first two
collections. The topics on sets is a way to study such collections in an organized manner.
Set Defined
Roster Method. This describes a set by listing all the elements or members of a
set, if possible. All elements or members of the set are listed between open and close
braces. For example, V = {a, e, i, o, u} represents five elements of the set of vowels. On
the other hand, roster method is used to describe a set without listing all its elements.
2
Some elements of the set are listed, followed by ellipses (…) are used when the general
pattern of the element is shown. For example, P = {1, 2, 3, 4, …, 99} represents the set of
positive integers less than 100.
Set Builder. Sets are described by characterizing all those elements in the set by
stating the property or properties they must have to become members of the set. 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}.
The following sets, each denoted using a boldface letter, play a vital 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.
Equal 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.
The sets {2, 17, 3} and {3, 17, 2} are equal, because they have the same elements.
Note that the order in which the elements of a set are listed does not matter. Note also
that it does not matter if an element of a set is listed more than once, so {2, 17, 17, 17, 3,
3, 3, 3} is the same as the set {2, 17, 3} because they have the same elements.
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 { }. Often, a set of
elements with certain properties turns out to be the null set. For instance, the set of all
positive integers that are greater than their squares is the null set.
3
A set with one element is called a singleton set. A common error is to confuse the
empty set ∅ with the set {∅}, which is a singleton set. The single element of the set {∅} is
the empty set itself. A useful analogy for remembering this difference is to think of folders
in a computer file system. The empty set can be thought of as an empty folder and the set
consisting of just the empty set can be thought of as a folder with exactly one folder
inside, namely, the empty folder.
Venn Diagrams
Sets can be represented graphically using Venn diagrams, named after the English
mathematician John Venn, who introduced their use in 1881. In Venn diagrams, the
universal set U, which contains all the objects under consideration, is represented by a
rectangle. Taking note that the universal set varies depending on which objects are of
interest. Inside this rectangle, circles or other geometrical figures are used to represent
sets. Sometimes, points are used to represent the particular elements of the set. Venn
diagrams are often used to indicate the relationships between sets.
Subsets
Size of a Set
Sets are used extensively in counting problems, and for such applications we need
to discuss the sizes of sets.
Example 1: Let S be the set of letters in the English alphabet. Then |S| = 26.
Example 2: Let A be the set of odd positive integers less than 20. Then |A| = 10.
Example 3: Because the null set has no elements, it follows that |∅| = 0.
A set is said to be infinite if it is not finite. The set of positive integers is infinite.
Power Sets
Given a set S, the power set of S is the set of all subsets of the set S. Note that the
empty set and the set itself are members of this set of subsets. The power set of S is
denoted by P(S).
Cartesian Products
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}.
Note that the Cartesian products A × B and B × A are not equal, unless A = ∅ or B = ∅ (so
that A × B = ∅) or A = B.
6
YOUR TURN…
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
II. Directions: Given the sets described inside the box, show the power sets and
cartesian products in each of the items below. Write your answer on the space
provided after each item.
A = {0, 1}
B = {a, b, c}
C = {y, u, a, n}
D = {one, zero}
1. P(B)
____________________________________________________________________
____________________________________________________________________
2. P(C)
____________________________________________________________________
____________________________________________________________________
7
YOUR TURN…
3. D x A
____________________________________________________________________
____________________________________________________________________
4. B x A x B
____________________________________________________________________
____________________________________________________________________