Spring 2014 - 4110 Algorithms
Homework 1
1. (16 points) For each function f (n) and time t in the following table, determine the largest size n
of a problem that can be solved in time t, assuming that the algorithm to solve the problem takes
f (n) microse
Spring 2014 - 4110 Algorithms
Homework 2
1. Show that a sub-tree of a heap can have at most 2n/3 nodes.
A complete tree of height h has 2h+1 1 nodes.
Assume that the left sub-tree of the root node is of height h, and the right sub-tree of height
h 1.
N
Fall 2012 - 4110 Algorithms
Homework 3
1. (10 points) Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is h4, 5, 10, 3, 8, 2i Show the contents of m and s after the execution of the algorithm.
1
0
2
200
0
3
210
150
0
Spring 2014 - 4110 Algorithms
Homework 4 - Solution Outline
1. (40 points) Suppose that instead of always selecting the rst activity to nish, we instead select
the last activity to start that is is compatible with all previously selected activities. Descr
Spring 2014 - 4110 Algorithms
Homework 5 - Solution Outline
1. (30 points) Determine an algorithm that creates a path traversing each edge of an undirected graph
exactly twice. The running time of your algorithm should be O(V + E). Make sure to discuss th