Discrete Mathematics (H) Lecture 4 Notes
Basic Discrete Mathematics Objects
Sets
Introduction to Sets
Definition: Sets
A set is an unordered collection of objects. These objects are called elements or members.
We can represent a set by
- listing the elements, or
- define it by property, e.g.
- Natural numbers:
- Integers:
- Positive integers:
- Rationals:
- Real numbers:
- Complex numbers:
Interval notation: -
Two sets
Russell’s Paradox
Let
- If
, then does not satisfy the condition, so . - If
, then is included in the set , so .
The most common solution of this paradox in modern mathematics is the axiomatic set theory.
Two special sets:
- The universal set is the set of all objects under
consideration, denoted as
. - The empty set is the set that contains no elements, denoted
as
or .
Venn Diagrams and Subsets
Definition: Subsets
A set
Definition: Proper Subsets
If
Theorem: Empty Set
Proof: we substitute
Theorem: Reflexivity of Subset Relation
Proof: we substitute
The set relations can be visualized by using Venn diagrams,
e.g. 
Cardinality
Definition: Cardinality
Let
A set if infinite if it is not finite.
Power Set
Definition: Power Set
Given a set
Example
We can observe that
Tuples
Definition: Tuple
The ordered n-tuple
Definition: Cartesian Product
Let
It easy to observe that
Definition: Relations
A subset of the Cartesian product
Set Operations
Definition: Union
Let
Definition: Intersection
The intersection of the set
Definition: Complement
If
Definition: Difference
Let
Definition: Disjoint Sets
Two sets
Theorem: The Principle of Inclusion and Exclusion
This is very similar to the principle of inclusion and exclusion in probability.
Set Identities
Identity Laws
Domination Laws
Idempotent Laws
Identity Laws
Complementation Laws
Commutative Laws
Associative Laws
Distributive Laws
Associative Laws
Absorbtion Laws
Complement Laws
The set identities are extremely similar to that ones of logic. The proofs for them are also very close to the ones of logic.
For example, to prove
Proof by membership tables:
| 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 |
| 0 | 0 | 1 | 1 | 1 | 1 |
Proof by equivalence: showing that
Proof by logical equivalences:
The intersection of a collection of sets is the set that
contains those elements that are members of all sets in the collection
Computer Representation of Sets
A naive way to represent sets in computers is to explicitly store all
the elements in a list. But this will make common set
operations like lookup/insertion/deletion inefficient. A better solution
is to assign a bit in a bit string to each element in the universal set
and set the bit to 1 if the element is in the set, otherwise 0. By using
this representation, each set of cardinality
Functions
Definition: Functions
Let
To represent a function, we can either
- explicitly state the assignments between elements of the two sets, or
- by a formula.
Definition: Important Sets of Functions
Let
Example
For a function:
is the image of is a preimage of- the domain of
is - the codomain of
is - the range of
is
Definition: Image of a Subset
For a function
Definition: Injective Function
A function
Definition: Surjective Function
A function
Definition: Bijective Function
A function
| Properties to prove | Method to prove |
|---|---|
| To show |
Show that |
| To show |
Show that |
| To show |
Show that |
| To show |
Show that |
Tip
For a function
Proof.
- Only if: suppose that
is injective. Let be elements of . Then for . Therefore, . But and . Therefore, . - If: suppose that
is surjective. Let be a listing of the elements of . Suppose that for some . Then, . But , a contradiction.
But note that this conclusion cannot be straightforwardly generalize to functions with infinite domain and codomain.
Let
Definition: Inverse Function
Let
Caution
If
Definition: Composition of Functions
Let
Suppose that
- Title: Discrete Mathematics (H) Lecture 4 Notes
- Author: Zhige Chen
- Created at : 2025-09-23 15:24:34
- Updated at : 2025-10-10 13:20:48
- Link: https://nofe1248.github.io/2025/09/23/discrete-math-lec-4/
- License: This work is licensed under CC BY-NC-SA 4.0.