CPSC 320
Intermediate Algorithm Design and Analysis
Course Information and Introduction
Jan Manuch
2015W1
Jan Manuch
CPSC 320Intermediate Algorithm Design and Analysis
Course Information CPSC 320
1
Instructor : Jan Manuch
Email : jmanuch@cs.ubc.ca
Office
Solutions to Sample Problems for Tutorial #11
1.
o With[z] = wl- + Without-I].
o Without] = max cfw_ With[i - I], Without[i-I].
2. We can prove that there is an optimal solution in which x contacts its children Ci in order of
decreasing R(cy. Assume witho
CPSC 320 Assignment #6 Sample Solution
March 20, 2015
For this assignment, you'll work through a thorough solution to the textbook's problem 6.6 (on page
317, the one beginning In a word processor, the goal. . . ).
1. Give a good set of examples to explor
CPSC 320 Assignment #2 Sample Solution
January 14, 2015
Due date: Monday, 2015/01/19 at 5PM
Staple your solution behind the CPSC 320 cover page and submit in our
handin box.
We will mark at least one part of each of the 4 problems.
Problems 13 ask about t
CPSC 320 Assignment #5 Sample Solution
February 22, 2015
1. You're designing a divide-and-conquer algorithm for a problem. An existing algorithm that solves the
problem (without using divide-and-conquer) runs in
(n2 )
time.
n down
n/3 in constant time, bu
CPSC 320 Assignment #3 Sample Solution
January 22, 2015
Due date: Monday, 2015/02/02 at 5PM
Staple your solution behind the CPSC 320 cover page and submit in our handin box.
We guarantee that we'll mark at least one part of problem 1, at least one sub-par
CPSC 320 Assignment #4 Sample Solution
February 18, 2015
1. Consider the following recurrence:
(
3T (b 4n
c) + 3T (b n9 c) + n n
9
T (n) =
1
if
if
n9
n8
(a) Draw the rst two levels (the root and its children) of the recursion tree for this recurrence plus
CPSC 320 Assignment #7 Sample Solution
April 3, 2015
1. Identify two places where this interesting article's coverage of NP-completeness and computational
complexity is either incorrect or incomplete in important (and signicantly dierent) ways. (You can
n
Assignment #1 Sample Solution
January 9, 2015
Due date: Monday, 2015/01/12 at 5PM
1. Prove or disprove this statement about the Gale-Shapley stable marriage algorithm with
women proposing to men:
All possible order-
ings of proposals by women result in th