Professional Documents
Culture Documents
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}
Set Equality
Symbolically:
Cardinality
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.
Two sets are called disjoint if, and only if, they have no
elements in common.
Symbolically:
Ai ∩ Aj = ∅ whenever i = j.
Example
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.”
Definition:
𝑅 −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
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}
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}.
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}
Example 1.1.27:
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):
8
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024
Conversely,
then:
a) (f ∘ g) (x) = ?
= f(g(x))
= f(x3)
Example 2
b) (g ∘ f)(x) = ?
9
CIS 1103 – Discrete Math | MIDTERMS REVIEW Group 6 Leaders
OMPAD, GERARD 1st Semester, 2023-2024
Inverse Functions
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.
• 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 .
Greg Cantor
10