Assignment #4: Due September 25
1. Exercise 16.2-4 (page 384). 2. Exercise 16.2.5 (page 384). 3. 16.2-7 (page 384) 4. The following problem is known in the literature as the knapsack problem: We are given n objects each of which has a weight and a v
Assignment #3: Due September 18
1. Draw the permutation network for n = 16 using subnetworks for n = 8 as boxes with 8 inputs and outputs 2. Show switch settings for the following using the algorithm described in class: Show the settings for all swi
Cheat Sheet
Asymptotic Notation Suppose we are interested in comparing two algorithms whose "growth" functions are f (n) and g (n) where n represents the
"size" of the instance. Normally, these functions are positive, increasing functions and tend to inni
Lecture #1:
Characterization of types of algorithms: O-line vs on-line algorithms; deterministic vs randomized algorithms; exact vs approximation algorithms; sequential vs parallel algorithms; centralized vs distributed algorithms. This
course primarily d
Lecture #2:
This section is about comparing performance of dierent algorithms for the
same problem. For the sake of concreteness, let us focus on sorting by using
comparisons. We have several algorithms: quicksort, insertion sort, heapsort,
merge sort, et
Assignment #4:
Due October 21
1. Exercise 16.2-4
2. Exercise 16.2.5
3. 16.2-7
4. The following problem is known in the literature as the knapsack problem: We are given n objects each of which has a weight and a value.
Suppose that the weight of object i i
Assignment #6:
Due December 2 (Firm!): Please keep a copy since the graded paper
may not reach you before Exam III
1. Solve the minimum spanning tree problem on the following graph by
(i)Boruvka Algorithm; (ii)Kruskals Method A (show the evolution of the
Assignment #5:
Due October 30
1. Exercise 15-2-1 (page 378)
2. Exercise 15-4-1 (page 396): Note that the rst string has eight characters
and the second has nine. When you show the solution, you must indicate
the positions in the two strings that belong to
Assignment #6:
1. Solve the minimum spanning tree problem on the following graph by
(i)Boruvka Algorithm; (ii)Kruskals Method A (show the evolution of the
algorithm and its UNION-FIND data structure); and (iii)Prims Algorithm starting with node E (show th
Assignment #6:
Due July 26
1. Solve the minimum spanning tree problem on the following graph by
(i)Boruvka Algorithm; (ii)Kruskals Method A (show the evolution of the
algorithm and its UNION-FIND data structure); and (iii)Prims Algorithm starting with nod
Assignment #5:
Due June 30
1. Exercise 15-2-1 (page 338)
2. Exercise 15-4-1 (page 355): Note that the rst string has eight characters
and the second has nine. When you show the solution, you must indicate
the positions in the two strings that belong to th
Assignment #2: Due September 9
1. 4.1-2 (page 67) 2. 4.1-6 9page 67) 3. (4.2-3) (page 72) (You may replace
n 2
by
n 2
for this problem.
4. Problem 4-1 parts (a), (b), (c), (d), (f), and (h) (page 85)
1
Assignment #1: Due September 2
1. Let P be a problem. The worst-case time complexity of P is O(n2 ). The worst case time complexity of P is also (n lg n). Let A be an algorithm that solves P . Which subset of the following statements are consistent
Lecture #3:
When we study Divide and Conquer type algorithms, we often come across
recurrence relations during the analysis phase. We need to solve these to know
the complexity of these algorithms. We now take up some methods to solve
such equations. This
Lecture #6:
0.0.1
Divide & Conquer Method (Continued More Examples):
We conclude this section with a few more examples.
Example 1 Scheduling Tournaments among n teams to complete the schedule
in (n 1) days.
Example 2 (Chapter 10.3) Selecting the k th smal
Lecture #8:
0.0.1
Dynamic Programming:(Chapter 15)
We now take up the concept of dynamic programming again using examples.
Example 1 (Chapter 15.2) Matrix Chain Multiplication
INPUT: An Ordered set of Matrices [A1 A2 A3 .An ] with Ai of size pi1 pi
(given
Lecture #10:
0.0.1
Graph Algorithms: Shortest Path (Chapter 24-25)
Problem 1 Given a directed graph G = [V, E ], and weight function w : E
R mapping edges to real valued weights. The weight of a path p = hvo , v1 , ., vk i
is the sum of the weights of ed
Lecture #12:
0.0.1
Graph Algorithms: Maximum Flow (Chapter 26)
Given a directed graph G = (V, E ) in which each edge (u, v ) E has a capacity
c(u, v ) 0. If (u, v ) E we assume that c(u, v ) = 0. We also distinguish two
/
vertices s (origin = source) and
Assignment #1:
Due June 2 (Please leave this in the box outside my oce)
1. Let P be a problem. The worst-case time complexity of P is O(n2 ). The
worst case time complexity of P is also (n lg n). Let A be an algorithm
that solves P . Which subset of the f
Assignment #2:
Due June 7
1. 4.1-2 (page 67)
2. 4.1-6 9page 67)
3. (4.2-3) (page 72) (You may replace
n
2
by
n
2
for this problem.
4. Problem 4-4 parts (a), (c), (g), (h), and (j) (page 85)
5. Does the master theorem apply to 4-4(b) and 4-4(e). (Do each s
Assignment #3:
Due June 16
1. Draw the permutation network for n = 16 using subnetworks for n = 8 as
boxes with 8 inputs and outputs
2. Show switch settings for the following using the algorithm described in
class: Show the settings for all switches.
1
8
Assignment #4:
Due June 23
1. Exercise 16.2-4 (page 384).
2. Exercise 16.2.5 (page 384).
3. Consider the following generalization of a scheduling example done in class:
A single server (such as a processor, a cashier in a bank, etc.) has n
customers to se