0% found this document useful (0 votes)
143 views110 pages

01 Sets and Logic PDF

The document summarizes key concepts in discrete mathematics including: 1) Sets can contain any type of elements and be described by listing elements or properties of membership. Common sets of numbers include integers, rational numbers, and real numbers. 2) Logical concepts like membership, equality, subsets, cardinality (number of elements), and set operations are introduced. 3) Examples illustrate set descriptions, membership, equality, and properties of key number sets.

Uploaded by

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

01 Sets and Logic PDF

The document summarizes key concepts in discrete mathematics including: 1) Sets can contain any type of elements and be described by listing elements or properties of membership. Common sets of numbers include integers, rational numbers, and real numbers. 2) Logical concepts like membership, equality, subsets, cardinality (number of elements), and set operations are introduced. 3) Examples illustrate set descriptions, membership, equality, and properties of key number sets.

Uploaded by

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

Discrete Mathematics

Prepared by: Onecho Angelo A. Gabinete


System of Numbers

Real Imaginary

Irrational Rational

Integers

Negative Zero Natural


Numbers Numbers
Real Numbers

A value of a continuous quantity that can represent a


distance along a line.
Imaginary Numbers

𝑖 = −1
Irrational Numbers

Cannot be expressed as a quotient of two integers

Example: 2 π, e,…
Rational Numbers

Can be expressed as a quotient (ratio) of two integers

Example: 0.5, 2/3, -3, 0.3333…


Integers

Are all natural number, the negative of the natural


numbers and the number zero.
Sets and Logic
SET NOTATION

{x1, . . . , xn} set consisting of the elements x1, . . . , xn;

{x | p(x)} set consisting of those elements x satisfying property p(x);

Z, Z−, Z+, Znonneg sets of integers, negative integers, positive integers,


nonnegative integers;

Q,Q−,Q+,Qnonneg sets of rational numbers, negative rational numbers, positive


rational numbers, nonnegative rational numbers;

R,R−,R+,Rnonneg sets of real numbers, negative real numbers, positive real


numbers, nonnegative real numbers;

x∈X x is an element of X;

x∉X x is not an element of X;


X=Y set equality (X and Y have the same elements);

|X| cardinality of X (number of elements in X);

∅ empty set;

X ⊆Y X is a subset of Y;

X⊂Y X is a proper subset of Y;

P (X) power set of X (all subsets of X);

X∪Y X union Y (all elements in X or Y);


‫𝒊𝑿 𝟏=𝒊𝒏ڂ‬ union of X1, . . . , Xn (all elements that belong to
at least one of X1, X2, . . . , Xn);

‫∞ڂ‬
𝒊=𝟏 𝑿𝒊 union of X1, X2, . . . (all elements that belong to
at least one of X1, X2, . . . );

∪S union of S (all elements that belong to at least one set in S);

X ∩Y X intersect Y (all elements in X and Y);

‫𝒊𝑿 𝟏=𝒊𝒏ځ‬ intersection of X1, . . . , Xn


(all elements that belong to every one of X1, X2, . . . , Xn);

‫∞ځ‬
𝒊=𝟏 𝑿𝒊 intersection of X1, X2, . . .
(all elements that belong to every one of X1, X2, . . . );

∩S intersection of S (all elements that belong to every set in S);


X−Y set difference (all elements in X but not in Y);


𝑿 complement of X (all elements not in X);

(x, y) ordered pair; (x1, . . . , xn) n-tuple;

X×Y Cartesian product of X and Y


[pairs (x, y) with x in X and y in Y];

X1 × X2 × · · · × Xn Cartesian product of X1, X2, . . . , Xn


(n-tuples with xi ∈ Xi);

X△Y symmetric difference of X and Y;


A set is a collection of objects; order is not taken into
account.

Discrete mathematics is concerned with objects


such as graphs and Boolean algebras
Logic is the study of reasoning; it is specifically
concerned with whether reasoning is correct.

Logic focuses on the relationship among


statements as opposed to the content
of any particular statement.
Consider, for example, the following argument:

All mathematicians wear sandals.

Anyone who wears sandals is an algebraist.

Therefore, all mathematicians are algebraists.

Technically, logic is of no help in determining whether any of


these statements is true; however, if the first two statements
are true, logic assures us that the statement,

All mathematicians are algebraists,

is also true.
Logic is essential in reading and developing proofs. An
understanding of logic can also be useful in clarifying ordinary
writing.

For example, at one time, the following ordinance was in effect


in Naperville, Illinois:

“It shall be unlawful for any person to keep more than three
dogs and three cats upon his property within the city.”

Was one of the citizens, who owned five dogs and no cats,
in violation of the ordinance? Think about this question now;
then analyze it.
No, assuming the interpretation:

It shall be unlawful for any person to keep more than


three [3] dogs and more than three [3] cats upon his
property within the city.

A judge ruled that the ordinance was “vague.”

Presumably, the intended meaning was: “It shall be


unlawful for any person to keep more than three [3]
dogs or more than three [3] cats upon his property
within the city.”
Sets | A set is simply a collection of objects. The objects are sometimes
referred to as elements or members. If a set is finite and not too large, we
can describe it by listing the elements in it. For example, the equation
A = {1, 2, 3, 4} (1.1.1)

describes a set A made up of the four elements 1, 2, 3, and 4. A set is


determined by its elements and not by any particular order in which the
elements might be listed. Thus the set A might just as well be specified as
A = {1, 3, 4, 2}

The elements making up a set are assumed to be distinct, and although


for some reason we may have duplicates in our list, only one occurrence
of each element is in the set. For this reason we may also describe the set
A defined in (1.1.1) as
A = {1, 2, 2, 3, 4}
If a set is a large finite set or an infinite set, we can describe it by
listing a property necessary for membership. For example, the
equation
B = {x | x is a positive, even integer} (1.1.2)

describes the set B made up of all positive, even integers; that is,
B consists of the integers 2, 4, 6, and so on. The vertical bar “|” is
read “such that.”

Equation (1.1.2) would be read “B equals the set of all x such


that x is a positive, even integer.” Here the property necessary
for membership is “is a positive, even integer.” Note that the
property appears after the vertical bar. The notation in (1.1.2) is
called set-builder notation.
A set may contain any kind of elements whatsoever,
and they need not be of the same “type.” For example,

{4.5, Lady Gaga, π, 14}

is a perfectly fine set. It consists of four elements: the


number 4.5, the person Lady Gaga, the number π(=
3.1415 . . .), and the number 14.
A set may contain elements that are themselves sets.
For example, the set

{3, {5, 1}, 12, {π, 4.5, 40, 16}, Henry Cavill}

consists of five elements: the number 3, the set {5, 1},


the number 12, the set {π, 4.5, 40, 16}, and the person
Henry Cavill.
Some sets of numbers that occur frequently in mathematics generally,
and in discrete mathematics.

The symbol Z comes from the German word, Zahlen, for integer. Rational
numbers are quotients of integers, thus Q for quotient. The set of real
numbers R can be depicted as consisting of all points on a straight line
extending indefinitely in either direction (see Figure 1.1.2).
To denote the negative numbers that belong to
one of Z, Q, or R, we use the superscript minus. For
example, Z− denotes the set of negative integers,
namely −1, −2, −3, . . . . Similarly, to denote the
positive numbers that belong to one of the three
sets, we use the superscript plus. For example, Q+
denotes the set of positive rational numbers.

To denote the nonnegative numbers that belong


to one of the three sets, we use the superscript
nonneg. For example, Znonneg denotes the set of
nonnegative integers, namely 0, 1, 2, 3, . . . .
If X is a finite set, we let |X| = number of elements
in X. We call |X| the cardinality of X. There is also a
notion of cardinality of infinite sets.

For example, the cardinality of the integers, Z, is


denoted ℵ0, read “aleph null.”

Aleph is the first letter of the Hebrew alphabet.


A = {1, 2, 3, 4} (1.1.1)

B = {x | x is a positive, even integer} (1.1.2)

Example 1.1.1 | For the set A in (1.1.1),we have |A| = 4, and


the cardinality of A is 4.

The cardinality of the set {R,Z} is 2 since it contains two


elements, namely the two sets R and Z.
A = {1, 2, 3, 4} (1.1.1)
B = {x | x is a positive, even integer} (1.1.2)

Given a description of a set X such as (1.1.1) or (1.1.2) and an


element x, we can determine whether or not x belongs to X.

If the members of X are listed as in (1.1.1), we simply look to see


whether or not x appears in the listing.

In a description such as (1.1.2), we check to see whether the


element x has the property listed.

If x is in the set X, we write x ∈ X, and if x is not in X, we write x ∉ X.

For example, 3 ∈ {1, 2, 3, 4}, but 3 ∉ {x | x is a positive, even integer}.


The set with no elements is called the empty (or null or void) set
and is denoted ∅. Thus ∅ = { }.

Two sets X and Y are equal and we write X = Y if X and Y have the
same elements.

To put it another way, X = Y if the following two conditions hold:

■ For every x, if x ∈ X, then x ∈ Y, and


■ For every x, if x ∈ Y, then x ∈ X.

The first condition ensures that every element of X is an element


of Y, and the second condition ensures that every element of Y is
an element of X.
Example 1.1.2

If A = {1, 3, 2} and
B = {2, 3, 2, 1},

by inspection, A and B have the same elements.

Therefore A = B.
Example 1.1.3 Show that if
A = {x | x2 + x − 6 = 0} and
B = {2,−3},
then A = B.

SOLUTION According to the criteria in the paragraph


immediately preceding Example 1.1.2, we must show
that for every x,
if x ∈ A, then x ∈ B, (1.1.3)
and for every x,
if x ∈ B, then x ∈ A. (1.1.4)
To verify condition (1.1.3), suppose that x ∈ A. Then
x2 + x − 6 = 0.

Solving for x, we find that x = 2 or x = −3. In either case, x ∈ B.


Therefore, condition (1.1.3) holds.

To verify condition (1.1.4), suppose that x ∈ B. Then x = 2 or x = −3.


If x = 2, then
x2 + x − 6 = 22 + 2 − 6 = 0.

Therefore, x ∈ A. If x = −3, then


x2 + x − 6 = (−3)2 + (−3) − 6 = 0.

Again, x ∈ A. Therefore, condition (1.1.4) holds. We conclude that


A=B.
For a set X to not be equal to a set Y (written X ≠ Y), X and Y must
not have the same elements:

There must be at least one element in X that is not in Y or at


least one element in Y that is not in X (or both).
Example 1.1.4 | Let A = {1, 2, 3} and B = {2, 4}.

Then A ≠ B since there is at least one element in A (1 for


example) that is not in B.

Another way to see that A ≠ B is to note that there is at


least one element in B (namely 4) that is not in A.
Suppose that X and Y are sets. If every element of
X is an element of Y, we say that X is a subset of Y
and write X ⊆ Y. In other words, X is a subset of Y if
for every x, if x ∈ X, then x ∈ Y.
Example 1.1.5 If C = {1, 3} and A = {1, 2, 3, 4}, by
inspection, every element of C is an element of A.

Therefore, C is a subset of A and we write C ⊆ A.


Example 1.1.6 Let X = {x | x2 + x − 2 = 0}. Show that X ⊆ Z.

SOLUTION

We must show that for every x, if x ∈ X, then x ∈ Z. If x ∈ X,


then x2 + x − 2 = 0. Solving for x, we obtain x = 1 or x = −2.
In either case, x ∈ Z.

Therefore, for every x, if x ∈ X, then x ∈ Z. We conclude


that X is a subset of Z and we

write X ⊆ Z.
Example 1.1.7

The set of integers Z is a subset of the set of


rational numbers Q.

If n ∈ Z, n can be expressed as a quotient of


integers, for example, n = n / 1. Therefore n ∈ Q and
Z ⊆ Q.
Example 1.1.8

The set of rational numbers Q is a subset of the


set of real numbers R.

If x ∈ Q, x corresponds to a point on the number


line (see Figure 1.1.2) so x ∈ R.
For X to not be a subset of Y, there must be at
least one member of X that is not in Y.
Example 1.1.9 Let X = {x | 3x2 − x − 2 = 0}. Show that X is
not a subset of Z.

SOLUTION If x ∈ X, then 3x2−x−2 = 0. Solving for x, we


obtain x = 1 or x = −2/3.

Taking x = −2/3, we have x ∈ X but x ∉ Z. Therefore, X is


not a subset of Z.

X⊄Z
Any set X is a subset of itself, since any element in X is in X.

Also, the empty set is a subset of every set.

If ∅ is not a subset of some set Y, according to the discussion


preceding Example 1.1.9, there would have to be at least one
member of ∅ that is not in Y. But this cannot happen because
the empty set, by definition, has no members.

Notice the difference between the terms “subset” and “element


of.” The set X is a subset of the set Y(X ⊆ Y), if every element of X
is an element of Y; x is an element of X(x ∈ X), if x is a member of
the set X.
Example 1.1.10 Let
X = {1, 3, 5, 7} and
Y = {1, 2, 3, 4, 5, 6, 7}.

Then X ⊆ Y since every element of X is an element of Y.


But X ∉ Y, since the set X is not a member of Y. Also, 1 ∈ X,
but 1 is not a subset of X. Notice the difference between
the number 1 and the set {1}. The set {1} is a subset of X.
If X is a subset of Y and X does not equal Y, we
say that X is a proper subset of Y and write X ⊂ Y.

Example 1.1.11 Let C = {1, 3} and A = {1, 2, 3, 4}.


Then C is a proper subset of A since C is a subset
of A but C does not equal A. We write C ⊂ A.
Example 1.1.12 Example 1.1.7 showed that Z is a
subset of Q. In fact, Z is a proper subset of Q
because, for example, 1/2 ∈ Q, but 1/2 ∉ Z.
Example 1.1.13 Example 1.1.8 showed that Q is a subset of
R. In fact, Q is a proper subset of R because, for example,
2 ∈ R, but 2 ∉ Q. (In Example 2.2.3, we will show that 2
is not the quotient of integers).
The set of all subsets (proper or not) of a set X,
denoted P (X), is called the power set of X.

Example 1.1.14 If A = {a, b, c}, the members of P (A)


are ∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}. All
but {a, b, c} are proper subsets of A.

In Example 1.1.14, |A| = 3 and | P (A)| = 23 = 8. In


Section 2.4 (Theorem 2.4.6), we will give a formal
proof that this result holds in general; that is, the
power set of a set with n elements has 2n elements.
Given two sets X and Y, there are various set operations
involving X and Y that can produce a new set. The set
X ∪ Y = {x | x ∈ X or x ∈ Y} is called the union of X and Y.
The union consists of all elements belonging to either
X or Y (or both).

The set X ∩ Y = {x | x ∈ X and x ∈ Y} is called the


intersection of X and Y. The intersection consists of all
elements belonging to both X and Y.

The set X − Y = {x | x ∈ X and x ∉ Y} is called the


difference (or relative complement). The difference X −
Y consists of all elements in X that are not in Y.
Example 1.1.15 If A = {1, 3, 5} and B = {4, 5, 6}, then

A ∪ B = {1, 3, 4, 5, 6}
A ∩ B = {5}
A − B = {1, 3}
B − A = {4, 6}.

Notice that, in general, A − B ≠ B − A.


Example 1.1.16 Since Q ⊆ R,

R∪Q=R
R∩Q=Q
Q − R = ∅.

The set R − Q, called the set of irrational numbers,


consists of all real numbers that are not rational.
We call a set S, whose elements are sets, a
collection of sets or a family of sets.

For example, if
S = {{1, 2}, {1, 3}, {1, 7, 10}},
then S is a collection or family of sets. The set S
consists of the sets {1, 2}, {1, 3}, {1, 7, 10}.
Sets X and Y are disjoint if X∩Y = ∅.

A collection of sets S is said to be


pairwise disjoint if, whenever
X and Y are distinct sets in S,
X and Y are disjoint.
Example 1.1.17
The sets {1, 4, 5} and {2, 6}
are disjoint.

The collection of sets


S = {{1, 4, 5}, {2, 6}, {3}, {7, 8}}
is pairwise disjoint.
Sometimes we are dealing with sets, all
of which are subsets of a set U. This set U
is called a universal set or a universe.

The set U must be explicitly given or


inferred from the context. Given a
universal set U and a subset X of U, the
set U − X is called the complement of X
and is written 𝐗ഥ.
Example 1.1.18 Let A = {1, 3, 5}. If U, a
universal set, is specified as
ഥ = {2, 4}.
U = {1, 2, 3, 4, 5}, then 𝐀

If, on the other hand, a universal set is


specified as U = {1, 3, 5, 7, 9}, then
ഥ = {7, 9}. The complement obviously
𝑨
depends on the universe in which we are
working.
Example 1.1.19 Let the universal
set be Z. Then Z , the

complement of the set of


negative integers, is Z nonneg, the
set of nonnegative integers.
Notation

x ∈ S → x is an element of S
x ∉ S → x is not an element of S
{1, 2, 3} → the set whose elements are 1, 2, and 3
{1, 2, 3, •••, 100} → the set of all integers from 1 to 100
{1, 2, 3, •••} → the set of all positive integers

(The symbol ... is called an ellipsis


and is read “and so forth.”)
Seatwork:

1. Let A = {1, 2, 3}, B = {3, 1, 2}, and C = {1, 1, 2, 3, 3, 3}.


What are the elements of A, B, and C?

2. Is {0} = 0?

3. How many elements are in the set {1, {1}}?


Let
A= Z+
B={n∈Z│0≤n≤100}
C ={100, 200, 300, 400, 500}.
Evaluate the truth and falsity of each of the following
statements.
4. B ⊆ A
5. C is a proper subset of A
6. C and B have at least one element in common
7. C⊆B
8. C⊆C
Evaluate the truth and falsity of each of the
following statements.

9. 2 ∈ { 1, 2, 3 }
10. {2} ∈ { 1, 2, 3 }
11. 2 ⊆ { 1, 2, 3 }
12. {2} ⊆ { 1, 2, 3 }
13. {2} ⊆ { { 1 }, { 2 } }
14. {2} ∈ { { 1 }, { 2 } }
Venn diagrams provide
pictorial views of sets. In a
Venn diagram, a rectangle
depicts a universal set (see
Figure 1.1.3).

Subsets of the universal set


are drawn as circles. The
inside of a circle represents
the members of that set.
In Figure 1.1.3 we see two sets A and B within the universal set U.
Region 1 represents A ∪ B, the elements in neither A nor B.
Region 2 represents A − B, the elements in A but not in B.
Region 3 represents A ∩ B, the elements in both A and B.
Region 4 represents B − A, the elements in B but not in A.
Example 1.1.20 Particular regions in Venn diagrams are
depicted by shading. The set A ∪ B is shown in Figure
1.1.4, and Figure 1.1.5 represents the set A − B.
Example 1.1.21 Among a group of 165 students,
• 8 are taking calculus, psychology, and computer
science;
• 33 are taking calculus and computer science;
• 20 are taking calculus and psychology;
• 24 are taking psychology and computer science;
• 79 are taking calculus;
• 83 are taking psychology; and
• 63 are taking computer science.
How many are taking none of the three subjects?
Review Exercises
Question: What is a set?

Answer: A set is a collection of objects.


Question: What is set notation?
Answer: A set may be defined by listing the
elements in it. For example, {1, 2, 3, 4} is the set
consisting of the integers 1, 2, 3, 4.

A set may also be defined by listing a property


necessary for membership. For example,
{x | x is a positive, real number}
defines the set consisting of the positive, real
numbers.
Question: Describe Answer:
the sets
Z, Q, R, Z+, Q+,
R+, Z−, Q−, R−, Znonneg,
Qnonneg, and Rnonneg,
and give two
examples of
members of each set.
Question: If X is a finite set, what is |X|?

Answer: The cardinality of X


(i.e., the number of elements in X)
Question: How do we denote
x is an element of the set X?

Answer: x ∈ X
Question: How do we denote
x is not an element of the set X?

Answer: x ∉ X
Question: How do we denote the empty set?

Answer: ∅
Question: Define set X is equal to set Y. How
do we denote X is equal to Y?

Answer: Sets X and Y are equal if they have the


same elements. Set equality is denoted X = Y
Question: Explain a method of verifying that
sets X and Y are equal.

Answer: Prove that for every x, if x is in X, then


x is in Y, and if x is in Y, then x is in X.
Question: Explain a method of verifying that
sets X and Y are not equal.

Answer: Prove one of the following:


(a) There exists x such that x ∈ X and x ∉ Y.
(b) There exists x such that x ∉ X and x ∈ Y.
Question: Define X is a subset of Y. How do we
denote X is a subset of Y?

Answer:

X is a subset of Y if every element of X is an


element of Y.

X is a subset of Y is denoted X ⊆ Y.
Question: Explain a method of verifying that
X is a subset of Y.

Answer: To prove that X is a subset of Y,


let x be an arbitrary element of X and
prove that x is in Y.
Question: Explain a method of verifying that
X is not a subset of Y.

Answer:

Find x such that x is in X,


but x is not in Y.
Question: Define X is a proper subset of Y. How
do we denote X is a proper subset of Y?

Answer:

X is a proper subset of Y if
X ⊆ Y and X ≠ Y.
X is a proper subset of Y is denoted X ⊂ Y.
Question: Explain a method of verifying that
X is a proper subset of Y.

Answer: To prove that X is a proper subset of Y,


prove that X is a subset of Y and
find x in Y such that x is not in X.
Question: What is the power set of X?
How is it denoted?

Answer: The power set of X is the collection of


all subsets of X. It is denoted P (X).
Question: Define X union Y.
How is the union of X and Y denoted?

Answer:
X union Y is the set of elements that belong
to either X or Y or both.

It is denoted X ∪ Y.
Question: If S is a family of sets, how do we
define the union of S? How is the union
denoted?

Answer:
The union of S is the set of elements that
belong to at least one set in S.

It is denoted ∪S.
Question: Define X intersect Y.
How is the intersection of X and Y denoted?

Answer:
X intersect Y is the set of elements that
belong to both X and Y.

It is denoted X ∩ Y.
Question: If S is a family of sets, how do we
define the intersection of S? How is the
intersection denoted?

Answer:
The intersection of S is the set of elements that
belong to every set in S.

It is denoted ∩ S.
Question: Define X and Y are disjoint sets.

Answer: X ∩ Y = ∅
Question:

What is a pairwise disjoint family of sets?

Answer:

A collection of sets S is pairwise disjoint if,


whenever X and Y are distinct sets in S,
X and Y are disjoint.
Question: Define the difference of sets X and Y.
How is the difference denoted?

Answer: The difference of X and Y is the set of


elements that are in X but not in Y. It is
denoted X − Y.
Question: What is a universal set?

Answer: A universal set is a set that contains all


of the sets under discussion.
Question:

What is the complement of the set X?


How is it denoted?

Answer: The complement of X is U − X,


where U is a given universal set.
The complement of X is denoted 𝑋. ത
Question: What is a Venn diagram?

Answer: A Venn diagram provides a pictorial


view of sets. In a Venn diagram, a rectangle
depicts a universal set, and subsets of the
universal set are drawn as circles. The inside of
a circle represents, the members of that set.
Question: In the Venn diagram of three sets,
identify the set represented by each region.

Answer: Region 1 represents elements in


none of X, Y, or Z. Region 2 represents
elements in X, but in neither Y nor Z.
Region 3 represents elements in X and Y,
but not in Z. Region 4 represents elements
in Y, but in neither X nor Z. Region 5
represents elements in X, Y, and Z. Region
6 represents elements in X and Z, but not
in Y. Region 7 represents elements in Y and
Z, but not in X. Region 8 represents
elements in Z, but in neither X nor Y.
Let U be a universal set and let A, B, and C be subsets of U.
The following properties hold.
(a) Associative laws:
(A ∪ B) ∪ C = A ∪ (B ∪ C) (A ∩ B) ∩ C = A ∩ (B ∩ C)

(b) Commutative laws:


A∪B=B∪A A∩B=B∩A

(c) Distributive laws:


A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

(d) Identity laws:


A∪∅=A A∩U=A
(e) Complement laws:
A ∪ 𝐴ҧ = U A ∩ 𝐴ҧ = ∅

(f) Idempotent laws:


A∪A=A A∩A=A

(g) Bound laws:


A∪U=U A∩∅=∅

(h) Absorption laws:


A ∪ (A ∩ B) = A A ∩ (A ∪ B) = A
(i) Involution law:
𝐴Ӗ = A†

(j) 0 / 1 laws:
ഥ=U
∅ ഥ=∅
𝑈

(k) De Morgan’s laws for sets:


(𝐴 ∪ 𝐵)= 𝐴ҧ ∩ 𝐵ത (𝐴 ∩ 𝐵) = 𝐴ҧ ∪ 𝐵ത
Example 1.1.23

Let S = {{1, 2}, {1, 3}, {1, 7, 10}}.

Then ∪S = {1, 2, 3, 7, 10} since each of the


elements 1, 2, 3, 7, 10 belongs to at least one set in
S, and no other element belongs to any of the
sets in S.

Also ∩S = {1} since only the element 1 belong to


every set in S.
Example 1.1.24
For i ≥ 1, define Ai = {i, i + 1, . . .} and S = {A1, A2, . . .}.
As examples, A1 = {1, 2, 3, . . .} and A2 = {2, 3, 4, . . .}. Then
A partition of a set X divides X into
nonoverlapping subsets. More formally, a
collection S of nonempty subsets of X is said
to be a partition of the set X if every element
in X belongs to exactly one member of S.
Notice that if S is a partition of X, S is pairwise
disjoint and ∪S = X.
Example 1.1.25

Since each element of X = {1, 2, 3, 4, 5, 6, 7, 8}


is in exactly one member of
S = {{1, 4, 5}, {2, 6}, {3}, {7, 8}} ,
S is a partition of X.
We pointed out that a set is an unordered collection of
elements; that is, a set is determined by its elements and
not by any particular order in which the elements are
listed.

Sometimes, however, we do want to take order into


account. An ordered pair of elements, written (a, b), is
considered distinct from the ordered pair (b, a), unless,
of course, a = b. To put it another way, (a, b) = (c, d)
precisely when a = c and b = d. If X and Y are sets, we let
X × Y denote the set of all ordered pairs (x, y) where x ∈ X
and y ∈ Y. We call X × Y the Cartesian product of X and Y.
Example 1.1.26

If X = {1, 2, 3} and Y = {a, b}, then


X × Y = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, b)}
Y × X = {(a, 1), (b, 1), (a, 2), (b, 2), (a, 3), (b, 3)}
X × X = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}
Y × Y = {(a, a), (a, b), (b, a), (b, b)}.

Example 1.1.26 shows that, in general, X × Y ≠ Y × X.


Notice that in Example 1.1.26, |X×Y| = |X| · |Y| (both are equal to 6). The
reason is that there are 3 ways to choose an element of X for the first
member of the ordered pair, there are 2 ways to choose an element of Y
for the second member of the ordered pair, and 3 · 2 = 6. The preceding
argument holds for arbitrary finite sets X and Y;
it is always true that |X × Y| = |X| · |Y|.
Figure 1.1.8 |X × Y| = |X| · |Y|, where X = {1, 2, 3} and Y = {a, b}.
There are 3 ways to choose an element of X for the first
member of the ordered pair (shown at the top of the diagram)
and, for each of these choices, there are 2 ways to choose an
element of Y for the second member of the ordered pair (shown
at the bottom of the diagram). Since there are 3 groups of 2,
there are 3 · 2 = 6 elements in X × Y (labeled at the bottom of
the figure).
Example 1.1.27

A restaurant serves four appetizers,


r = ribs, n = nachos, s = shrimp, f = fried cheese,

and three entrees,

c = chicken, b = beef, t = trout.

If we let A = {r, n, s, f } and E = {c, b, t}, the Cartesian product A × E lists the 12 possible dinners
consisting of one appetizer and one entree.

Ordered lists need not be restricted to two elements. An n-tuple, written (a1, a2, . . . , an), takes order
into account; that is,

(a1, a2, . . . , an) = (b1, b2, . . . , bn)

precisely when

a1 = b1, a2 = b2, . . . , an = bn.

The Cartesian product of sets X1, X2, . . . , Xn is defined to be the set of all n-tuples (x1, x2, . . . , xn)
where xi ∈ Xi for i = 1, . . . , n; it is denoted X1 × X2 × · · · × Xn.
Example 1.1.28 If X = {1, 2}, Y = {a, b}, and Z = {α, β}, then
X × Y × Z = {(1, a, α), (1, a, β), (1, b, α), (1, b, β), (2, a, α), (2, a, β),
(2, b, α), (2, b, β)}.

Notice that in Example 1.1.28, |X × Y × Z| = |X| · |Y| · |Z|. In


general,

|X1 × X2 × · · · × Xn| = |X1| · |X2| · · · |Xn|.


Example 1.1.29 If A is a set of appetizers, E is a set of
entrees, and D is a set of desserts, the Cartesian product
A×E ×D lists all possible dinners consisting of one
appetizer, one entree, and one dessert.

You might also like