0% found this document useful (0 votes)
42 views29 pages

Chapter 2, Section 2.1 Sets: Discrete Mathematics

This document defines and explains fundamental concepts about sets including: - A set is an unordered collection of elements that can be described by listing elements or using set-builder notation. - Sets are represented using curly braces and membership is denoted using the symbol ∈. - The powerset of a set S is the set of all subsets of S and is represented by P(S) or 2|S|. - A subset A is contained within set B if every element of A is also an element of B, denoted A ⊆ B.

Uploaded by

abc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views29 pages

Chapter 2, Section 2.1 Sets: Discrete Mathematics

This document defines and explains fundamental concepts about sets including: - A set is an unordered collection of elements that can be described by listing elements or using set-builder notation. - Sets are represented using curly braces and membership is denoted using the symbol ∈. - The powerset of a set S is the set of all subsets of S and is represented by P(S) or 2|S|. - A subset A is contained within set B if every element of A is also an element of B, denoted A ⊆ B.

Uploaded by

abc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Discrete Mathematics

Chapter 2, Section 2.1


Sets
Sets
• A set is an unordered collection of objects.
• The set is the fundamental discrete
structure on which all other discrete
structures are built.
• The objects in a set are called its elements,
or members.
• A set is said to contain its elements.
Set Notation
• We normally use upper-case letters to
represent the names of sets, and lower-
case letters to represent their elements.
• To denote that a is an element of set S we
write: a  S
• To denote that a is not an element of set S
we write: a  S
How to Describe a Set
• We can describe a set in two ways:
– List all of its elements
– Give a set of rules that characterize all
of the members of the set (set builder
notation)
Listing the Elements of a Set
• To list the members of a set, we use curly braces,
separating each element from the next with a comma.
• Example: the set of all vowels in the English language is
the set
V = {a, e, i, o, u}
• We can use ellipses to keep us from having to list all of
the elements individually, provided the meaning is
obvious: H = {1, 2, 3, 4, …, 100}
Using Set Builder Notation
• Often we are dealing with sets where it is
impossible to list all of their elements.
• In set builder notation, we give a rule that
characterizes all members of a set.
• Example:
S = {x | x is the square of an integer}
• This can be read, “S is the set of all x such
that x is the square of an integer”.
Using Set Builder Notation
• In studying computer theory, we find it
useful to remember the following sets:
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
Q+ = the set of positive rational numbers
R = the set of real numbers
What Can Constitute a Set?
• Note that anything within a set of curly
braces can be considered a set. The
elements of a set don’t necessarily have to
have anything to do with one another.
• Example: {Boston, “7”, iPod, 2.7, Sleepy} is
a legal set.
What Can Constitute a Set?
• Two sets are equal if and only if they have
the same elements.
• Consider sets A and B. Then A = B (A
and B are equal) iff:
x ((x  A)  (x  B))
The Elements of a Set
The order in which elements occur in sets is
irrelevant. For example, the following two
sets are equal:
{a, b, c, d, e}
{c, e, a, d, b}
The Elements of a Set
It does not matter if an element of a set is
listed more than once. For example,
{a, a, a, b, c}
and
{a, b, c}
are equivalent. We ignore any duplicates.
What Can Constitute a Set?
• The elements of a set can themselves be
sets. For example,
S = {N, Z, Q, R}
• Question: Does set S have any duplicate
elements?
• Answer: No. Set S has only 4 elements,
none of which is equivalent to any of the
others.
What Can Constitute a Set?
• A set that has no elements is called the empty set or
null set.
• Yes, it is still considered a real set, even though it has no
elements.
• It is denoted by , or by { }.
• Since the empty set is a set, another set can contain the
empty set as one of its elements:
A ={, a} This set has 2 elements
B = {} This set has 1 element
C= This set has 0 elements
Venn Diagrams
• Sets can be represented graphically using
Venn diagrams.
• In Venn diagrams:
– A rectangle represents the universal set
(universe of discourse)
– Circles (and other geometric figures)
represents sets
– Points (or words) represent elements
Venn Diagrams
• Assistant professors at Blivet State
University who have taught CSE 2813:

Smith Green

Jones

Brown Moore
Subset
The set A is said to be a subset of set B if and
only if every element of set A is also an
element of set B.
We use this notation: A  B
A  B is true if and only if the following
quantification is true:
x ((x  A)  (x  B))
Subset
Obviously, according to the preceding
definition, if A = B, it must be true that:
A  B, and
B  A.
Moreover, it should be self-evident that
every set is a subset of itself. That is:
AA
Proper Subset
However, if all of A’s elements are also in B,
but B has some elements in it that A does
not have (that is, A  B), then we can be a
more precise and say that A is a proper
subset of B.
We use this notation: A  B
A is a proper subset of B iff:
x (x  A  x  B)  x(x  B  x  A)
Proper Subset
We can represent the subset relationship
using a Venn diagram. The following
diagram represents A  B:

A
Subset
Interestingly enough, the empty set, , is a
subset of every other set (or, more
precisely, every nonempty set).
Your book gives a formal proof, but you
might think of it this way instead: if set S =
{a, b}, then it has 4 subsets –
{{a}, {b}, {ab}, }
Properties of Sets
One way to show that two sets are equal is
to show that each set is a subset of the
other.
The Cardinality of a Set
Given a set S, and n  N (that is, n is an
element of the set of natural numbers -- the
integers from 0 on up),
if there are exactly n distinct elements in S,
then:
S is a finite set, and
n is the cardinality of S
The cardinality of S is represented by |S|.
Properties of Sets
We now can see that every nonempty set S
must have at least two subsets:
 and S
Theorem 1 in section 2.1 of your textbook
says:

For every set S,


S
SS
Powerset

The powerset of S is the set of all subsets of S.


The powerset of S is represented by P(S), or
by the symbol 2|S|
For example, if S = {a, b}, then:
P(S) = {{a}, {b}, {a, b}, }
Powerset
Remember that |S| represents the
cardinality of S (the number of elements in
S).
Here S has two elements, a and b. So 2|S| can
be understood as 22, which is 4.
And 4 is the number of subsets of S, or the
cardinality of the powerset of S.
Powerset
The powerset of the empty set is a special
case.
The powerset of the empty set is:
P() = {, {}}
Cartesian Product
The Cartesian product, or cross product, of two sets is the
set of ordered pairs of elements of the two sets. To
represent the cross product of sets A and B we use the
symbol , as in A  B.
For example, given:
set A = {a, b} and
set Y = {x, y}
The Cartesian product A  Y = {ax, ay, bx, by}
Set Notation with Quantifiers
xS(P(x)) means “ for all x that are
elements of S, P(x) is true”. This is referred
to as the universal quantification of P(x)
over all elements in the set S. It is
shorthand for: x(x  S P(x))
 xS(P(x)) is the existential quantification of
P(x) over all elements in the set S. It is
shorthand for: x(x  S P(x))
Truth Sets of Quantifiers
Given a predicate, P, and a domain, D, the
truth set of P is defined as the set of
elements in D for which P(x) is true.
The truth set of P(x) is is denoted by {x  D |
P(x)}: “those elements of domain D such
that P(x) is true”

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy