[Solutions]
COT5405 Design & Analysis of Algorithms
First Midterm Exam 02/03/2011
Problem #1 (Solving Recurrence Relations) [10 points] [2 pts each question]
a) T(n)= 4 T(n/4)
(n)
b) T(n)=2 T(n/2) + n
(n log n )
c) T(n)=2 T(n/2) + n2
(n2)
d) T(n)=3 T(n/2)
Name:
PID:
COT5405 Design & Analysis of Algorithms Second Midterm Exam 11/10/2010
Problem 1 2 3 4 Total
Points 30 30 20 20 100
Points Received
Name:
PID:
1. [30 points] Show that the following variation of the maximum flow problem can be reduced to linear
Final Examination
COT 5405
Due December 10, 2012 between 1:30pm and 2:30pm in the class.
This test became available on December 3, 2012 at 1:30pm.
Solve any one of the following problems. If you solve more than
one problem, only the rst two solutions will
Name:
PID:
Note: Output the minimum total penalty.
Let S[j] be the minimum total penalty when you stop at hotel j.
If j=0
S[j] =
0
else if j >=1 and j <= n
S[j] =
min cfw_S[i] + (200-(aj-ai)2
i<j
Output =
S[n]
Name:
PID:
Note: Output the maximum expected
In 5.1 (a), when you add the edge FG, F should be moved to the first set.
In 5.2 (a), the last number should be 12 and not 9.
Presented the solutions for 5.2 (b) in class on 03/29.
First Name:
Last Name:
PID:
COT5405 Design & Analysis of Algorithms
Final Exam 04/26/2011
Problem
Points
1
25
2
25
3
25
4
25
Total
100
Points Received
First Name:
Last Name:
PID:
Problem #1 (Strongly connected components)[25 points]
Decompose the followin
First Name:
Last Name:PID:
SOLUTIONS
COT5405 Design & Analysis of Algorithms
Second Midterm Exam 03/31/2011
Problem
Points
1
30
2
25
3
5
Total
60
Points Received
First Name:
Last Name:PID:
Problem #1 (MST, Kruskals algorithm, Prims algorithm) [30 points]
COT5405, Spring 2010 (Partial) Answer Key to Assignment #5 1. (10 pts.) Exercise 15-7 on p. 369 of Cormen et al.'s text. Specifically, be sure to, (1) define a recurrence with explanations including the boundary conditions for solving the problem; (2) des
COT5405, Spring 2010 Answer Key to Assignment #4 April 20, 2010 Note: Some questions are taken from the text by Cormen et al. as noted. 1. (12 pts., from Chapter 16, pp. 402 - 403) Question 16-2 of Cormen et al.'s text, see below:
Answer: (a) A greedy alg
Name:
PID: COT5405 - Homework 3
Out date: 10/22/2010 (Friday), due date: 11/03/2010 (Wednesday) 15 points each problem. You need to turn in the solutions for all eight problems. But we will select four problems and only grade these four.
Note: Do not outp
COT5405 - Homework I
Out date: 09/08/2010 (Wednesday), due date: 09/14/2010 (Wednesday)
Problem (a) Vertices A B C D E F G H
Pre number 1 2 3 4 8 7 6 5
Post number 16 15 14 13 9 10 11 12
Edges A->B A->F B->C B->E C->D D->B D->H
Tree Edge x
Cross Edge
Back
COT 5405 Homework The bounds of the summations are L = 0 and H = n, where n is any fixed, but arbitrary, positive integer. 1) Prove by induction that, for n 0, i = n(n+1)/2.
Proof: By definition of the summation symbol, when n = 0, i = i = 0. Also, when n
Computational Tractability
As soon as an Analytic Engine exists, it will necessarily
guide the future course of the science. Whenever any
result is sought by its aid, the question will arise - By what
course of calculation can these results be arrived at