You are on page 1of 10

CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders

OMPAD, GERARD 1st Semester, 2023-2024

OUTLINE To test if set A is a subset of set B, compare their elements.


Midterms Topics 1.1 Set Theory
1.2 Relations Example: Let A = {1} and B = {1, {1}}.
1.3 Cartesian Product
1.4 Functions • Solution:
1.5 Important Figures in
Mathematics - A is a subset of B (A ⊆ B) since every element in A is in
B
- A is a proper subset of B (A ⊂ B) as B has additional
Susanna S. Epp elements not in A.

Preface Element argument is a method in set theory for direct proof of


subset relationships and the primary way to prove one set is a
This reviewer is a combined effort of Discrete subset of another (X ⊆ Y).
Mathematics Group 6, wherein students were assigned to
study/read for each topic. The Compiler, Charles Montero Steps:
simply summarized them into a more digestible reviewer. The
goal of this reviewer is that it will provide an opportunity for 1. Choose any element (x) from set X.
students who read this, to pass or even do well in this upcoming 2. Prove that x is also an element of set Y.
midterm exam. May the odds be in your favor.
Note A set with only one element, is called a singleton set.
Set Theory
Finite Set
Set
• When a set is finite and reasonably small, we can
• A set is a fundamental concept in mathematics and its describe its contents by simply listing its elements, as
applications, representing a collection of objects, often in the example equation A = {1, 2, 3, 4}, where set A
referred to as elements or members. contains the elements 1, 2, 3, and 4.

Subsets: Proof and Disproof Infinite Set

Think of two groups of things, like Group A and Group B. Group • For large finite or infinite sets, we can describe them
A is a list of items, and Group B is a bigger list. A is a subset of by specifying a membership criterion. For instance, the
B when everything in A is also in B. But if A is smaller than B equation B = {x | x is a positive, even integer} defines
and B has at least one thing that A doesn't, then A is a proper the set B, consisting of positive even integers like 2, 4,
subset of B. So, in simple terms: 6, and so forth.
Mathematical Expressions and Mathematical Sentences • In this notation, the vertical bar "|" is read as "such
that," and the equation is read as "B is the set of all x
Subset Proper Subset
such that x is a positive, even integer." This notation is
• A ⊆ B = {x | ((x  A) → (x • A  B = {x | ((x  A) → (x
referred to as set-builder notation, where the
B)  (A may be = B)}  B)  (A  B)} membership criterion, in this case, "is a positive, even
• A subset means • a proper subset on the integer," follows the vertical bar.
everything in A is in B, other hand means A is
and A might also be still in B but A has extra Empty Set
equal to B elements that B doesn’t
have, so A does not equal • The empty set, which contains no elements, is
to B represented as ∅ or {}. It's also known as the null or
void set.
Testing subset

1
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

Unique Empty Set: - There's only one set with no Intersection (A ∩ B) • All elements common to
elements, called the empty set (or null set), both A and B.
symbolized by ∅. • A∩B
• A ∩ B = {x | x ∈ A and x
Examples: {1, 3} ∩ {2, 4} = ∅ and {x ∈ R | x^2 = −1} = ∅. ∈ B}

Powersets Difference (A - B) or • All elements in A but not


(A \ B) in B.
• A power set is a set of all possible subsets of a given • A – B or A \ B
set. In other words, if A is a set, then the power set of • A – B or A \ B = {x ∈ U | x
A is the set of all subsets of A, including the empty set ∈ A and x ∉ B}
and A itself.
Complement (AC) • All elements in U
Example: (universal set) that are
not in A.
• AC
• AC = {x ∈ U | x ∉ A}

Set Equality

• Sets A and B are equal (A = B) if every element of A is


in B and every element of B is in A.

Symbolically:

A = B if and only if A is a subset of B and B is a subset of A


(A ⊆ B and B ⊆ A).

Cardinality

• The number of elements in a set is called its


"cardinality" the symbol for cardinality is |A| =
(number of elements in a set). For example, if set A is
described as {1, 2, 3, 4}, its cardinality is 4 or |A| = 4.

Operation on Sets

Set Operations
Definitions
Universal Set • The set of real numbers Venn diagram representations
in that context is called
the universal set or
universe of discourse.
• U'
Union (A ∪ B) • All elements in A or B.
• AUB
A U B = {x | x ∈ A or x ∈
B}

2
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

Partition of Sets

• Two sets are called disjoint if, and only if, they have no
elements in common.

Disjoint Set Examples:

Two sets are called disjoint if, and only if, they have no
elements in common.

Symbolically:

A and B are disjoint ⇔ A ∩ B = ∅

Mutually Disjoint Sets.

• Sets A1, A2, A3 ... are mutually disjoint (or pairwise


disjoint or non-overlapping)
• If, and only if, no two sets Ai and Aj with distinct
subscripts have any elements in common. More
precisely, for all i, j = 1, 2, 3, ...

Ai ∩ Aj = ∅ whenever i = j.

Example

Mutually Disjoint Sets:

Sets A1, A2, and A3: {3, 5}, {1, 4, 6}, {2}.

Sets B1, B2, and B3: {2, 4, 6}, {3, 7}, {4, 5}.
Unions, Intersections, Differences and Complements
a. Are A1, A2, and A3 mutually disjoint?
Examples:
-Yes. A1, A2, and A3 have no common elements.
Universal set U = {a, b, c, d, e, f, g}.
b. Are B1, B2, and B3 mutually disjoint?
Set A = {a, c, e, g}.
-No. B1 and B3 share the element 4.
Set B = {d, e, f, g}.
Illustration: Sets represented by regions in Figure 6.1.5.
Results:

A ∪ B = {a, c, d, e, f, g}.

A ∩ B = {e, g}.

B − A = {d, f}.

Ac = {b, d, f}.

3
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

Set Identities to set A. This is such that the ordered pair (x, y) exists in
the original relation R.”

This definition can be written operationally as follows:

For all x ∈ A and y ∈ B, (y, x) ∈ 𝑅 −1 = (x, y) ∈ R.

This is read as “For all elements x in A, and all elements y


in B, both the ordered pair (y, x) in R-inverse and (x, y) in R
are equivalent”

Explanation: Basically, for every ordered pair (x, y) that


exists in R, its inverse counterpart (y, x) must exist.

8.2 Reflexivity, Symmetry, and Transitivity

Summary of important sets:


Reflexivity Symmetry Transitivity
• R is reflexive if, • R is symmetric • R is transitive if,
and only if, for if, and only if, and only if, for
all x ∈ A, x R x. for all x, y ∈ A, all x, y, z ∈ A, if x
• R is reflexive if if x R y then y R y and y R z,
and only if, for R x. {0, 1, 2, 3, then x R z.
all elements x in …} • R is transitive, if
A, the relation • R is symmetric and only if, for
of x to itself if, and only if, all elements x, y,
must exist. for all and z in A, if
elements x, y BOTH x R y and y
Relations in A, if there is R z exist, then x
8.1 Relations on Sets x R y then R z must exist.
there is y R x.
• Binary Relations - Cartesian Product of two sets – R x
R
• Ternary Relations – R x R x R
• Quaternary Relations – R x R x R x R

Definition:

Let R be a relation from A to B. Define the inverse relations


𝑅 −1 from B to A as follows: 1. Reflexive: Each element is related to itself.

𝑅 −1 = {(y, x) ∈ B xA | (x, y) ∈ R}. Explanation: For every element given in a set A, its ordered
pair (x, x) must exist for EVERY element in the given relation R.
This is read as “The inverse of relation R is defined as the
ordered pair (y, x), where y belongs to set B and x belongs

4
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

4. Antisymmetric: A relation R on a set X is antisymmetric if (x,


y) and (y, x) ∈ R only when x = y.

Explanation: A relation R on a set S is antisymmetric if for


every (a, b), we do NOT have a (b, a), or if for every (a, b) ∈ R
& (b, a) ∈ R, then a = b

2. Symmetric: If any one element is related to any other


element, then the second element is related to the first.

Explanation: For EVERY ordered pair (x, y) as x is related to y,


being symmetric means there is another ordered pair (y, x) as y
is related to x that exists in the relation.

5. Equivalence Relations: Equivalence relations partition a set


into subsets where elements in the same subset are related by
a certain criterion. They possess the properties of reflexivity,
symmetry, and transitivity.
• Equivalence Classes: is the name given to a subset of
some equivalence relation R which includes all
elements that are equivalent to each other.
Explanation: Let R be an equivalence relation on a set
A. The set of all elements which are related to an
3. Transitive: If any one element is related to a second and element x of set A is called the equivalence class of x.
that second element is related to a third, then the first
element is related to the third. Example:
Consider the relation
Explanation: If an ordered pair (x, y) exists, and it’s connected
R = {(1, 1), (1, 3), (1, 5), (2, 2), (2, 4), (3, 1), (3, 3), (3, 5), (4, 2),
to another ordered pair (y, z) then there must be an ordered (4, 4), (5, 1), (5, 3), (5, 5)}
pair (x, z) that it’s connected to.

If there is no (y, z) to connect to (x, y), it’s skipped in checking on {1, 2, 3, 4, 5}. The relation is reflexive because (1, 1), (2, 2),
(3, 3), (4, 4), (5, 5) ∈ R. The relation is symmetric because
for transitivity or in other words, VACUOUSLY TRANSITIVE
whenever (x, y) is in R, (y, x) is also in R. Finally, the relation is
transitive because whenever (x, y) and (y,z) are in R, (x,z) is
also in R. Since R is reflexive, symmetric, and transitive, R is an
equivalence relation on {1, 2, 3, 4, 5}

6. Partial Order: Let R be a relation defined on a set A. R is a


partial order relation if, and only if, R is reflexive,
antisymmetric, and transitive.

Example:

R = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (1, 2), (1, 5), (2, 5), (3, 5),
(4, 5)}.
Since R is reflexive, antisymmetric, and transitive, it is a partial
order.

5
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

7. Composition of Relations: The composition of two relations Using the strong definition, we can easily define triples,
R1 from X to Y and R2 from Y to Z, denoted R2◦R1, combines quadruples, etc., as well as the corresponding products, e.g.,
them to form a relation from X to Z.
• (x, y, z): = (x,(y, z))
Let R1 be a relation from X to Y and R2 be a relation from Y to • (x, y, z, w): = (x,(y, z, w)) = (x,(y,(z, w)))
Z. The composition of R1 and R2, denoted R2◦R1, is the • A × B × C: = A × (B × C)
relation from X to Z defined by:
With this method of defining tuples, a tuple of length n + 1 is a
pair with a second member a tuple of length n.
R2◦R1 = {(x, z) | (x, y) ∈ R1 and (y, z) ∈ R2 for some y ∈ Y}.

The composition of the relations


2 Problem Sets
R1 = {(1, 2), (1, 6), (2, 4), (3, 4), (3, 6), (3, 8)}
and Prove that for non-empty finite sets A, and B, we have the
R2 = {(2, u), (4, s), (4, t), (6, t), (8, u)} cardinality of their Cartesian product as:
is
R2 ◦ R1 = {(1, u), (1, t), (2, s), (2, t), (3, s), (3, t), (3, u)}. |A × B| = |A| · |B|

Proof. Consider the following table, where the entries are


For example, (1, u) ∈ R2 ◦ R1 because (1, 2) ∈ R1 and (2, u) ∈
generated by the elements ai ∈ A,
R2.
and bj ∈ B
• Additional Note René Descartes (1596-1650)
- If there is no possible link for (y, z) to connect
to (x, y) then it is skipped or VACUOUSLY was a French philosopher, mathematician, and scientist who is
TRANSITIVE often regarded as one of the founding figures of modern
philosophy and the Scientific Revolution. He made significant
1.3 Cartesian Product contributions to several fields, including philosophy,
1 Convention, Terminologies, Facts mathematics, and science. Some key aspects of his work and
contributions include:
Definition 1. (Simple Definition)
Cartesian Coordinate System
The Cartesian Product for any two sets A and B, the set of
ordered pairs of members of A and members of B is denoted Descartes is renowned for his introduction of the Cartesian
by: A × B = {(x, y) | x ∈ A ∧ y ∈ B} coordinate system, a crucial tool in geometry and algebra. This
system enables the precise representation and analysis of
In the same way, for each n ≥ 2,
geometric shapes and equations by using coordinates.
• A1 × · · · × An = {(x1, · · · , xn) | x1 ∈ A1, · · · , xn ∈ An}
• "Cogito, ergo sum" (I think; therefore, I am)
• An = {(x1, ..., xn) | x1, · · · , xn ∈ A}
• Dualism
We call A1 × · · · × An the Cartesian product of A1, ..., An. • Methodical Doubt
• Mathematical Contributions
Definition 2. (Expanded Definition)
• Scientific Investigation
The Cartesian Product for any two sets A and B,
The Cartesian product is a mathematical operation that
• the class A × B = {(x, y) | x ∈ A ∧ y ∈ B} is a set combines elements from two sets to create a new set of
• (x, y) = (x′, y′) ⇐⇒ x = x′ and y = y′ ordered pairs. In the context of sets A and B, the Cartesian
product of A and B, denoted as, A x B = {(a,b) | a ∈ A, b ∈ B}
(The set A x B is defined as the collection of all ordered pairs
Remark 3.
(a, b) where "a" is an element of set A and "b" is an element of
set B.)
6
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

In other words, if you have two sets, A and B, the Cartesian explicitly is more convenient than using a set-builder notation,
product A × B contains all the pairs formed by taking one which describes a set based on a rule or condition.
element from A and one element from B.
• n-tuple - is a set of n objects or quantities, where n is
The Cartesian product can be represented as a set enclosed in an integer, especially such a set arranged in a specified
curly braces, containing all the ordered pairs, for example: order.

Example 1.1.26:

If set A = {(a), (b)} and set B = {(c), (d)} then A x B would be This example demonstrates that the Cartesian product of two
represented as A x B = {(a,c), (a,d), (b,c) (b,d)}, and B x A would sets, X and Y (denoted as XY), is not necessarily equal to YX.
be represented as B x A = {(c,a), (c,b), (d,a), (d,b)}; A x A = However, the cardinality of the Cartesian product, denoted as
{(a,a), (a,b), (b,a), (b,b)} and B x B = {(c,c), (c,d), (d,c), (d,d)} |XY|, is always equal to the product of the cardinalities of the
individual sets, |X| and |Y|.
Visual Representation:
Sets: X = {1, 2, 3}, Y = {a, b}

|XY| = |X| * |Y| = 3 * 2 = 6

It illustrates that there are 3 ways to choose an element from X


for the first member of an ordered pair and 2 ways to choose
an element from Y for the second member. The total number
of pairs is 3 * 2 = 6.

Example 1.1.27:

This example involves a restaurant serving appetizers and


entrees. It introduces two sets, A (appetizers) and E (entrees),
and calculates the Cartesian product AE to list all possible
• Set roster notation (Important) - is a way of
dinner combinations.
representing a set by explicitly listing all of its elements
• within curly braces {} - In this notation, you write Sets: A = {r, n, x, f}, E = {c, b, t}
down each element of the set,
The Cartesian product AE lists 12 possible dinners consisting of
• separated by commas - to describe its contents.
one appetizer and one entree.
Here's the basic format for set roster notation:
Example 1.1.28:
{ element 1 , element 2 , element 3 , … , elementn}
This example extends the concept to three sets: X = {1, 2}, Y =
Here are a few examples to illustrate how set roster notation {a, b}, and Z ={α, β} . It calculates the Cartesian product X x Y x
works: Z as a set of ordered triples and shows that |XYZ| = |X| * |Y| *
|Z| = 2x2x2 = 8.
The set of natural numbers less than 5 can be represented as: {
1,2,3,4}

The set of even integers can be represented as: { − 6 , − 4 , − 2 , If X = {1, 2}, Y = {a, b}, and Z = {α, β}, then
0,2,4,6,…}
X × Y × Z = {(1, a, α), (1, a, β), (1, b, α), (1, b, β), (2, a, α), (2, a,
The set of primary colors can be represented as: { red , blue , β), (2, b, α), (2, b,β)}
yellow }
The Cartesian product X x Y x Z lists all possible ordered triples.
Set roster notation is particularly useful when the set has a
Demonstrates that |XYZ| = |X| * |Y| * |Z|.
finite number of elements or when listing all elements

7
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

Structure Query Language (SQL) Now, if we look at all the members in group Y that we can
reach by following our special rule from group X, we get
the CROSS JOIN is used to combine each row of the first table
something called the "range" of the function. It's like the
with each row of the second table. It is also known as the
subset of group Y that we can actually reach from X using our
Cartesian join since it returns the Cartesian product of the sets
rule.
of rows from the joined tables.
Summary
1.4 Functions
Functions: A function connects two groups (X and Y), and it's like a set of
rules that makes sure every member in X has a unique partner
A function assigns to each member of a set X exactly one
in Y. The domain is where we start, the codomain is where we
member of a set Y. Functions are used extensively in discrete
could end up, and the range is the actual members of the
mathematics; for example, functions are used to analyze the
codomain that we can reach from the domain using our rules.
time needed to execute algorithms.

Definition
Focus on the x-coordinates, when given a relation
Imagine you have two groups, X and Y. A "function" from
group X to group Y is like a special rule that connects members If the set of ordered pairs has different x-coordinates,
of X to members of Y.
it IS A function
Key Points:
If the set of ordered pairs has same x-coordinates,
This function is like a collection of pairs, where each pair has
it is NOT a function
one member from X and one from Y. Importantly, for every
member in X, there's only one corresponding member in Y. We Y-coordinates have no bearing in determining functions
write it like this: f: X → Y.
Types of Functions (Injective, Surjective, Bijective)
Pre-image and Image
Injective (One to One Function):

• For every input there is a unique output. ALL the


elements in the domain have to be used, but all
elements in the co-domain need not be used.
• An injective function can be represented as: f: A → B,
where A is the domain and B is the codomain, and for
all a, b in A, if f(a) = f(b), then a = b.

Domain and Codomain

The group X is called the "domain," and the group Y is called


the "codomain." The domain is where we start, and the
codomain is where we could end up. Horizontal line test for injective functions (must only cut graph
once).
Range

8
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

Bijective (Both Injective and Surjective Functions)

• These functions are one to one function but every


element in the co-domain is used.
• A bijective function can be represented as: f: A → B,
where A is the domain and B is the codomain, and it is
both injective and surjective.

Key Note: The name of the diagram is called a Function


Mapping Diagram.
Surjective (Onto Functions) Composition of Functions:
Reminder that Range = Co – Domain Let f: X → Y’ and g: Y → Z be functions with the property that
• Every element in the co-domain is the image of at least the range of f is a subset of the domain of g. Define a new
one element in the domain. function g ◦ f: X → Z as follows:
• A surjective function can be represented as: f: A → B, (g ◦ f)(x) = g(f (x)) for all x ∈ X,
where A is the domain and B is the codomain, and for
every y in B, there exists an x in A such that f(x) = y. where g ◦ f is read “g circle f ” and g( f (x)) is read “g of f of x.”
The function g ◦ f is called the composition of g and f.

Conversely,

Let g: X → Y’ and f: Y → Z be functions with the property that


the range of f is a subset of the domain of g. Define a new
function f ◦ g: X → Z as follows:

(f ◦ g)(x) = f(g (x)) for all x ∈ X,

where f ◦ g is read “f circle g” and f(g (x)) is read “f of g of x.”


The function g ◦ f is called the composition of f and g.

Horizontal line test for surjective functions (must cut AT LEAST


ONCE in the graph graph).
Example 1

IF f: ℝ → ℝ, ℝ is the set of all real numbers

is given by f(x) = 2x + 4 and g: ℝ → ℝ is given by g(x) = x3,

then:

a) (f ∘ g) (x) = ?

= f(g(x))

= f(x3)

= 2(x3) + 4 where the x for f(x) is being substituted with g (x) =


x3.

= 2x3 + 4 Final Answer

Example 2

b) (g ∘ f)(x) = ?
9
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024

= g(f(x)) developing all of its various branches from set theory


and logic alone.
= g(2x + 4) 4 where the x for g(x) is being substituted with f (x)
= 2x + 4.

= (2x+4)3 Final Answer

Inverse Functions

If F is a one-to-one correspondence from a set X to a set Y ,


then there is a function from Y to X that “undoes” the action of
F; that is, it sends each element of Y back to the element of X
that it came from. This function is called the inverse function
for F.

Example (Finding an Inverse Function for a Function Given by


a Formula)
• A major stumbling block was how to use sets to define
The function f : R → R defined by the formula
an ordered pair because the definition of a set is
• f (x) = 4x − 1 for all real numbers x unaffected by the order in which its elements are
listed.
Find its inverse function.

Solution
Nobert Wiener (1894–1964) and Felix Hausdorff (1868–1942)
For any [particular but arbitrarily chosen] y in R, by definition
of f -1, f -1 = that unique real number x such that f (x) = y. • Nobert Wiener made crucial breakthroughs in 1914
• A young American who had recently received his Ph.D.
from Harvard,
• Felix Hausdorff is a German Mathematician
• Both gave definitions showing that an ordered pair can
be defined as a certain type of set, but both definitions
were somewhat awkward.

Kazimierz Kuratowski (1896-1980)

• Polish Mathematician
In other words, you convert from f(x) = x to f (x) = y. • Published the following definition in 1921, which has
Afterwards, you get f(x) = y by getting f(x) = 4x – 1 = y, then since become standard. It says that an ordered pair is a
simplifying 4x – 1 = y. You get this by transposing (–1) to the set of the form {{a}, {a, b}}
4𝑥 𝑦+1
right side, getting 4x = y + 1. Then dividing 4
= 4 to remove
𝑦+1 𝑦+1
4 from x you get x = 4
resulting in f-1(y) = 4 .

1.5 Important Figures in Mathematics


Note: All Names are under Cartesian Product Topic

Greg Cantor

• With the introduction of Georg Cantor’s set theory in


the late nineteenth century, it began to seem possible
to put mathematics on a firm logical foundation by

10

You might also like