CS 470 Exam 1
Fall 2009
Name_
1. Suppose that we want to write a function that returns the i smallest values (in sorted order) from an
unsorted list of N values. In just a sentence or two describe an
CS 470/570 Exam 4
Fall 2010
Name _
CS 470: Your grade will be based on your best 4 of these 5 problems.
CS 570: Solve all 5 problems.
1. First draw a minimum spanning tree for this graph, and specify
CS 470/570 Exam 4
Fall 2010
Solution
CS 470: Your grade will be based on your best 4 of these 5 problems.
CS 570: Solve all 5 problems.
1. First draw a minimum spanning tree for this graph, and specif
CS 470/570 Design and Analysis of Algorithms
Final Exam Fall 2006 Prof. Phillip G. Bradford Circle one: 470/570
Name: Student ID:
This test is closed book and closed notes. The best answers are well t
CS 470/570 Design and Analysis of Algorithms Name: Student ID:
Midterm 3 Fall 2006 Prof. Phillip G. Bradford
This test is closed book and closed notes. The best answers are well thought-out brief answ
Lecture Notes for CS470 Fall 2005 Part 6 (preliminary draft)
Topological sort [Give a realistic example of events, dependencies between them, and their ordering the events - building a home] Suppose t
Lecture Notes for CS470 Fall 2005 Part 3 (preliminary draft)
2. The recursion tree method ["forming an educated guess"] The substitution method required a guess, but sometimes it is not easy to make a
Lecture Notes for CS470 Fall 2005 Part 5 (preliminary draft)
Graph algorithms Definitions A directed graph is a pair (V,E) where V is a finite set of elements called vertices, and E is a set of ordere
Lecture Notes for CS470 Fall 2005 Part 4 (preliminary draft)
Lower bound on time of sorting So far we have seen one algorithm that sort in time (n log n) in the worst-case: mergesort. One may wonder,
Lecture Notes for CS470 Fall 2005 Part 2 (preliminary draft)
1. Notion of an algorithm and some definitions; Section 1 Algorithm is a description of how to transform a value, called input, to a value,
CS 470/570 Exam 3
Fall 2010
Solution
CS 470: Your grade will be based on your best 4 of these 5 problems.
CS 570: Solve all 5 problems.
1. Trace the greedy algorithm for the instance of the fractional
CS 470/570 Exam 3
Fall 2010
Name _
CS 470: Your grade will be based on your best 4 of these 5 problems.
CS 570: Solve all 5 problems.
1. Trace the greedy algorithm for the instance of the fractional k
CS 470 Exam 2
Fall 2009
Name_
1.
a. Construct an undirected graph with 7 vertices and 20 edges, and give each edge a distinct
weight from the set cfw_120 (use each weight once) such that the largest w
CS 470/570 Exam 1
Fall 2010
Name _
CS 470: Your grade will be based on your best 5 of these 6 problems.
CS 570: Solve all 6 problems.
1. Write a precise definition for each of these relations. You may
CS 470/570 Exam 1
Fall 2011
Name _
1. Solve each recurrence below and express T(n) as the simplest function of n.
a. T(n) = 25 T(n/5) + n3
b. T(n) = 64 T(n/4) + n3
c. T(n) = 81 T(n/3) + n3
d. T(n) = 2
CS 470/570 Exam 1
Fall 2010
Solution
CS 470: Omitted 2 lowest, so grade is based on your best 4 of these 6 problems.
CS 570: Omitted 1 lowest, so grade is based on your best 5 of these 6 problems.
1.
CS 470/570 Exam 1
Fall 2011
Solution
1. Solve each recurrence below and express T(n) as the simplest function of n.
a. T(n) = 25 T(n/5) + n3
(n3)
b. T(n) = 64 T(n/4) + n3
(n3 lg n)
c. T(n) = 81 T(n/3)
CS 470/570 Exam 2
Fall 2010
Name _
CS 470: Your grade will be based on your best 4 of these 5 problems.
CS 570: Solve all 5 problems.
1. Recall the selection problem: Given a list of n values and an i
CS 470/570 Exam 2
Fall 2011
Name _
1. Trace the dynamic programming algorithm for the matrix chain product M1 M2 M5, using
the array of dimensions as given below. So each value cost(i,j) should be the
CS 470/570 Exam 2
Fall 2010
Solution
CS 470: Your grade will be based on your best 4 of these 5 problems.
CS 570: Solve all 5 problems.
1. Recall the selection problem: Given a list of n values and an
CS 470/570 Exam 2
Fall 2011
Solutions
1. Trace the dynamic programming algorithm for the matrix chain product M1 M2 M5, using
the array of dimensions as given below. So each value cost(i,j) should be
Lecture Notes for CS470 Fall 2005 Part 7 (preliminary draft)
Minimum Spanning Tree Consider the following transportation problem. We are given n cities, and the costs of constructing a road between pa