Discrete Mathematics Cheat Sheet
Discrete Mathematics Cheat Sheet
The function is surjective (onto) if every element of the codomain is mapped to by at least one element
of the domain.
The function is injective (one-to-one) if every element of the codomain is mapped to by at most one
element of the domain.
The function is bijective if every element of the codomain is mapped to by exactly one element of the
domain.
Properties of relations:
1. reflexive: for all x in X it holds that xRx (Show that ( x , x )∈ R )
2. symmetric: for all x and y in X it holds that if xRy then yRx. (Show that if ( x , y ) ∈ R , then
(y,x)∈R )
3. antisymmetric: for all x and y in X, if xRy and yRx then x = y. (Show that if ( x , y ) ∈ R and
( y , x ) ∈ R , then x = y)
4. transitive: for all x, y and z in X it holds that if xRy and yRz then xRz. (Show that if ( x , y ) ∈ R
and ( y , z ) ∈ R , then ( x , z ) ∈ R )
Partial orders are reflexive, antisymmetric, and transitive
Equivalence relations are reflexive, symmetric and transitive
To write a matrix for a relation R from X to Y, use the elements in X to label the rows and the elements
of Y to label the columns
then
There are n +n
2( )
2 symmetric relations
()
n
There are n
2×3
2 antisymmetric relations
n −n
2
Recurrence Relations
Order 1: + b (the most general solution is an = krn with a0 = k)
Solution:
If r = 1: an =a0 +nb
[ ]
n n 0 b b
If r ≠ 1: a =r a +r−1 −r
−1
Order 2:
Solution:
A± √ A2+ 4
Now we solve this polynomial using the quadratic equation
( r=
B
2 )
Solve for r to obtain the two roots λ1, λ2
o If they are distinct, then we get
o If they are the same, then we get
Now apply initial conditions
Graph Theory
Types of Graphs
Simple graph: No loops or parallel edges
Complete Graph: each pair of vertices has an edge connecting them.
(
◦ K has n vertices and n
edges
n n−1)
2
Bipartite Graph: vertex set can be partitioned into two sets, W and X, so that no two vertices in
W are adjacent and no two vertices in X are adjacent
◦ Cannot contain an odd cycle
Complete Bipartite Graph:
◦ If m=∣W∣ and n=∣X∣ , then:
▪ Km, n has m + n vertices and nm edges
Planar Graph: can be drawn in such a way that no edges cross each other
◦ Kuratowski's Theorem: A finite graph is planar if and only if it does not contain a
subgraph that is a subdivision of K5 or K3,3.
◦ Euler's formula: v − e + f = 2.
◦ Graph is not planar if it contains a subgraph homeomorphic to K3,3 or K5
Types of Cycles:
A cycle is a path that starts and ends at the same vertex and does not repeat edges
Euler Cycle: Every vertex in the graph must have even degree. Traverses every edge
exactly once.
Hamiltonian Cycle: Visits each vertex exactly once.
Simple Cycle: closed walk with no repetitions of vertices and edges allowed, other than the
repetition of the starting and ending vertex
Isomorphism:
Two graphs which contain the same number of graph vertices connected in the same way
are said to be isomorphic.