Homework Assignments:
- Due Jan 17:
- Give an example of BFS and DFS on a simple graph which distinguishes them
- Give an example of Dijkstra's shortest path algorithm and Prim's minimum spanning tree algorithm on a graph which distinguishes them. Show the steps of the algorithm
- Due Jan 24:
- Show what would happen after running the Floyd-Warshall algorithm on the graph on page 5 of Jan 19 notes for j=1,2,3. Show the arrays di,k and pi,k.
- Consider the two variants of the Floyd-Warshall algorithm:
- pi,k = j if di,k > di,j + dj,k
- pi,k = pi,j if di,k > di,j + dj,k
In both cases, pi,k remains the same if di,k ≤ di,j + dj,k
Illustrate the differences on a simple graph. Which gives pi,k as the first node in the path to k?
- Due Feb 2:
- What is the difference between a set and a sequence?
- Given conditions A, B, and C, if A ⇒ B and B ⇒ C and C ⇒ A, then the three conditions are equivalent. True or False? Why?
- Problem 1: We want to maximize F(x) subject to the constraint that x ∈ S1
Problem 2: We want to maximize F(x) subject to the constraint that x ∈ S2, where S1 ⊂ S2
Then the maximum value of F(x) in Problem 1 is less than or equal to the maximum value of F(x) in Problem 2. True or False? Why?