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
Permutations: Order matters
The number of ways of obtaining an ordered subset of k elements from a set of n elements is given by
( n !)
n Pk =
( nk ) !
Generalized permutations:
n!
P ( n ;n1, n2, ... , nk )=
n1 ! n2 ! ... n k !
Combinations: Order does not matter
The number of ways of picking k unordered outcomes from n possibilities. Also known as the binomial
coefficient or choice number and read "n choose k,"
n!
n=
n Ck =
k ( nk ) ! k !
Generalized combinations:
n+ k1 = ( n+ k1 ) !
n Ck =
k
( n1 ) ! k !
k groups from n objects.
Binomial Coefficients:
We can find these using Pascal's Triangle:
n!
n=
n Cr =
r ( nr ) ! r !
()
()
then
If A has n elements
n
Recurrence Relations
Order 1:
Solution:
If r = 1: an =a0 +nb
n
If r 1: an =r a0 +
b
b
r1 r 1
Order 2:
Solution:
A A +4 B
2
2
r=
Types of Graphs
Simple graph: No loops or parallel edges
Complete Graph: each pair of vertices has an edge connecting them.
n ( n1 )
K n has n vertices and
edges
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:
K m , 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.