Spring 2011
CMSC 451: Homework 1
Clyde Kruskal
Due at the start of class Thursday, September 22, 2011.
Problem 1. Let G = (V, E ) be a directed graph. The reversal of G is a graph GR = (V, E R )
where the directions of the edges have been reversed (i.e. E

Spring 2011
CMSC 451: Homework 1
Clyde Kruskal
Due at the start of class Thursday, October 13, 2011.
Problem 1. Do Exercise 3 on pages 189-190 of Kleinberg and Tardos. But use our favorite
method for the proof.
Problem 2.
(a) Show that Prims algorithm is

CMSC451
Spring 2013
Homework 5
due March 27, 2013
Unless otherwise stated, assume that graphs have no self-loops and no multi-edges. As usual,
for a graph G = (V, E ), n denotes the number of vertices and m the number of edges. For
all algorithms, explain

CMSC451
Spring 2013
Homework 7
due May 8, 2013
Unless otherwise stated, assume that graphs have no self-loops. As usual, for a graph
G = (V, E ), n denotes the number of vertices and m the number of edges. For all algorithms, explain time complexity and p

ASSIGNMENT 1: Solutions
CMSC 451 (Spring 2016)
1. Asymptotic growth.
For each of the following pairs of functions f (n) and g(n), indicate whether f (n) is in O, o, ,
, and/or of g(n). (You should either write true or false for each of these five possibil

Introduction to Algorithms
CS 482 Spring 2000
Problem Set 1
Due February 4, 2000
(1) We can think about a more general version of the stable matching problem, in which certain
man-woman pairs are explicitly forbidden. In the case of employers and applican

CMSC451
Spring 2017
Homework 1
due February 9, 2017 at 3pm EST
For all algorithms, provide time complexity analysis as well as a formal proof of correctness. Homework solutions should be clearly written and electronically submitted via ELMS
(http:/elms.um

1. Given the following function that evaluates a polynomial whose coefficients are stored in
an array:
double evaluate(double[] coefficients, int n, double x)
double result = coefficients[0];
double power = 1;
for (int i = 1; i < n; i+)
power = power * x;

CMSC451
Spring 2013
Homework 1
due February 6, 2013
For all algorithms, provide time complexity analysis as well as a formal proof of correctness.
1. Given a sequence of integers x1 , x2 , . . . , xn (possibly including negative integers) and
2
an interva

CMSC451
Spring 2013
Homework 4
due March 13, 2013
Unless otherwise stated, assume that graphs have no self-loops and no multi-edges. As usual,
for a graph G = (V, E ), n denotes the number of vertices and m the number of edges. You
may assume that maximum

CMSC451
Spring 2013
Homework 3
due February 20, 2013
Unless otherwise stated, assume that graphs have no self-loops and no multi-edges. As usual,
for a graph G = (V, E ), n denotes the number of vertices and m the number of edges. For
all algorithms, expl

Spring 2011
CMSC 451: Homework 3
Clyde Kruskal
Due at the start of class Tuesday, October 25, 2011.
Problem 1. Do Exercise 2 on page 246 of Kleinberg and Tardos.
Problem 2. Do Exercise 3 on pages 246-7 of Kleinberg and Tardos.
Problem 3. Assume we measure

Fall 2011
CMSC 451: Homework 4
Clyde Kruskal
Due at the start of class Thursday, November 10, 2011.
Problem 1. We are going to multiply the two polynomials A(x) = 5 3x and B (x) = 4+2x
to produce C (x) = a + bx + cx2 in three dierent ways. Do this by hand

Fall 2011
Clyde Kruskal
CMSC 451: Homework 5
Due at the start of class Tuesday, November 22, 2011.
Problem 1. Use the dynamic programming algorithm to nd by hand an optimal parenthesization for multiplying matrices of dimensions are given by the sequence

Fall 2011
CMSC 451: Homework 6
Clyde Kruskal
Due at the start of class Thursday, December 8, 2011.
We know a number of problems are NP-complete including: Circuit SAT, SAT, 3-SAT,
Independent Set, Vertex Cover, Hamiltonian Cycle, Traveling Salesman, 3-Dim

CMSC 451:Fall 2011
Clyde Kruskal
Practice Problems for the Final Exam
Disclaimer: These are practice problems for the upcoming nal exam. This does NOT
reect the length, diculty, or coverage of the actual exam.
Problem 1. Consider a mergesort-like algorith

CMSC 451:Spring 2011
Clyde Kruskal
Practice Questions for Midterm Exam
Warning and Disclaimer: These are practice problems for the upcoming midterm exam.
It does not necessarily reect the length or coverage of the actual exam.
Problem 1. Consider the foll

CMSC451
Spring 2013
Homework 6
due April 24, 2013
Unless otherwise stated, assume that graphs have no self-loops. As usual, for a graph
G = (V, E ), n denotes the number of vertices and m the number of edges. For all algorithms, explain time complexity an

CMSC451
Spring 2013
Homework 2
due February 13, 2013
Unless otherwise stated, assume that graphs have no self-loops and no multi-edges. As usual,
for a graph G = (V, E ), n denotes the number of vertices and m the number of edges. For
all algorithms, expl

1. Given the following two functions:
f(n) = 3n2 + 5
g(n) = 53n + 9
Use limits to prove or disprove each of the following:
f (g)
g (f)
2. Rank the following functions from lowest asymptotic order to highest. List any two or
more that are of the same order