Professional Documents
Culture Documents
Dis - Struc - ITEC 205 - L11 - 1
Dis - Struc - ITEC 205 - L11 - 1
STUDIES
PREPARED BY: P. FERNANDEZ
Discrete Structures
LESSON 11 – SETS
SETS
A set is an unordered collection of objects.
The objects are called elements of the set.
Many of the sets we talk about in discrete structures are sets of numbers.
We simply list each element
(or "member") separated by a
comma, and then put some
curly brackets around the
whole thing
Some Sets of Numbers:
We use braces (also called curly brackets) to show the elements of a set.
The elements of a set do not have to be numbers.
Some Other Sets:
Set Basics
If x is an element of S, we write x є S which may also be read as
“x is in S."
If x is not in S, we write, x є / X.
Two sets are equal if and only if they have the same elements.
{ a, b, c }= { b, c, a } = { b, a, c }
We do not usually write a element twice, as in { b, a, c, b } but
sometimes it just happens.
Set Basics
We might, for example, compute { 2x, x 2; x3 – 4 } for some
values of x.
Set Basics
If a set has a finite number of elements, we say it is a finite set
and the cardinality or size of the set is the number of elements
it contains.
We use the notation |S| to denote the cardinality of S.
If S = { 1, 2, 5, 7 } then |S| = 4.
Cardinality is also defined for infinite sets, i.e. sets with infinitely
many elements.
Set Basics
So:
The set {socks, shoes, watches, shirts, ...} we call an infinite set,
The set {index, middle, ring, pinky} we call a finite set.
Equality
Two sets are equal if they have precisely the same members.
So:
A is a subset of B, but B is not a subset of A
Set Theory Exercise
Is each of the following a well-defined set? Give brief reasons for each
of your answers.
(a) The collection of all alphanumeric characters.
(b) The collection of all tall people.
(c) The collection of all real numbers x for which: 2x – 9 = 16.
(d) The collection of all integers x for which: 2x – 9 = 16.
(e) The collection of all good tennis players.
Set Theory Exercise
U = {natural numbers}; A = {2, 4, 6, 8, 10}; B = {1, 3, 6, 7, 8}
State whether each of the following is true or false.
Explain your answer.
(a) 2 ∈ A
(b) 11 ∈ B
(c) 4 ∉ B
(d) A ∈ U
(e) A = {even numbers}