Final Guide
Final Guide
Asymptotic Notation
Relations
1. Definition of relations
2. Properties of relations: reflexive, symmetric, and transitive relations
3. Given a relation ... determine whether this relation is transitive, reflexive,
symmetric, anti-symmetric, equivalence relation, partial order.
4. Equivalence relations, and equivalence classes.
o Let X be the set of all pairs (x,y) of integers, where 0 ≤ x ≤ 2 and 0 ≤ y ≤
3. Define relation R such that (x,y) R (u,v) if and only if x+y = u+v (mod
3). Give the matrix of R and show that R is an equivalence relation. List
equivalence classes of R.
o Let Z be the set of all integers, and let R be a relation on Z such that xRy
iff |x-y| ≤ 3. Is R an equivalence relation? Justify your answer.
5. Partial orders.
o Let X be the set of all pairs (x,y) of integers, where 0 ≤ x ≤ 2 and 0 ≤ y ≤
3. Let R be the relation on X such that (x,y)R(u,v) iff x ≤ u and y ≥ v.
Give the matrix of R. Is R a partial order? Justify your answer.
o Consider an arbitrary directed acyclic graph G. Define a relation R on its
vertices as follows: uRv iff there is a directed path from u to v. Prove
that R is a partial order.
Induction (Examples)
Number Theory
Divide-and-Conquer Recurrences
Inclusion-Exclusion
1. Prove that in an undirected graph G the sum of all vertex degrees is equal to
two times the number of edges.
2. State the sufficient and necessary condition for an undirected graph to have an
Euler cycle. Prove that if an undirected graph has an Euler cycle then all vertex
degrees are even.
3. Can you generalize the characterization of Eulerian graphs to directed graphs?
4. State Dirac's theorem.
5. For graphs shown below ...., tell whether they have (a) an Euler tour, (b) a
Hamiltonian cycle. Justify your answer.
6. For graphs shown below, determine the minimum number of colors needed to
color them. Justify your answer. (Coloring of a graph with max vertex degree
D.)
7. Bipartite graphs. State the sufficient and necessary condition for an undirected
graph to be bipartite. Perfect matching. State Hall’s theorem. For the bipartite
graph below..., tell whether it has a perfect matching. Justify your answer.
8. Given a bipartite graph and a matching M (not perfect). Find an augmenting
path for M.
9. Define a planar graph.
10. State Kuratowski's theorem (and define the terms used in this theorem).
11. Give Euler's formula for planar graphs (and define the terms involved in it.)
12. Using Euler's formula, prove that in a planar graph, m ≤ 3n-6 (where m,n
denote the numbers of edges and vertices.)
13. Use Euler's inequality (m ≤ 3n-6) to prove that each planar graph has a vertex
of degree at most 5.
Stronger version: Each sufficiently large planar graph must have at least a
certain number of vertices of degree at most 5. What is this number? Justify
your answer.
14. Given the graphs below (...), determine whether they are planar or not. If a
graph is planar, show a planar embedding. If a graph is not planar, prove it.
(You can use Euler's inequality, Kuratowski's theorem, or a direct argument.)
15. How many colors are needed to color planar graphs? Give a proof that each
planar graph can be colored with at most 6 colors. (Hint: induction. Use the fact
that each planar graph has a vertex of degree no more than 5.)
16. For a given directed graph, determine its strongly connected components.
17. For a given directed graph, prove that it is acyclic by showing its topological
ordering.
Trees
1. Prove, by induction, that a tree with n nodes has exactly n-1 edges.
2. Binary trees
o Prove (by induction) that a binary tree of height h has at most 2h leaves.
o Prove (by induction) that a binary tree of height h has at most 2 h+1-1
nodes.
o Draw a decision (comparison) tree for sorting 4 items.
o Similarly as for sorting, we can consider decision trees for other
problems that can be solved using comparisons. Draw a decision tree for
selecting the second smallest element out of five.