{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Final_Exam_Fall2004

# Final_Exam_Fall2004 - CS570 Analysis of Algorithms Fall...

This preview shows pages 1–5. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS570 Analysis of Algorithms Fall 2004 Final Exam Name: _____________________ Student ID: _________________ 1) a. Which of the diagrams below best describes the relationship between P, NP, and NP-Complete problems? (25 pts) b. Each diagram represents 3 relationships between P & NP, P & NPC, and NP & NPC. Prove each of the three relationships or state that a proof does not exist. If a proof does not exist state why this relationship should exist. P & NP: P & NPC: NP & NPC: P NP NP NPC P P NP P NPC A D C B NP NPC NPC 2) Let G = (V,E) be a directed graph with edge weights w(e) >0 for all edges. For all paths p, let m(p) = max{w(e), such that e is an edge on the path p}. Let the set of vertices, V = {1, ..., n}. For all pairs (i, j) ∈ V , let d(i, j) = min({m(p), such that p is a path from i to j} or d(i, j)= ∞ if no such path exists. Show that d(i, j) for all i, j with 1 ≤ i ≤ n and 1 ≤ j ≤ n can be computed in O(n 3 ) time (in other words present the algorithm and proof). (25 pts) Hint: First show that for all i, j, k, d(i, j) ≤ max{d(i, k), d(k, j)}. Additional space for problem 2. Additional space for problem 2....
View Full Document

{[ snackBarMessage ]}

### Page1 / 8

Final_Exam_Fall2004 - CS570 Analysis of Algorithms Fall...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online