Assignment 4 - Dynamic Programming & Graphs

Computer Algorithms (506994-002)

Computer Algorithms (506994-002). Released Week 13. Due Week 15, before the final exam begins (submit via the course Learning Management System, LMS). Individual work.

Tasks

1. LCS with traceback (35 pts). CampusNav's "find a study buddy" feature compares two students' weekly course-code sequences and finds their longest common subsequence.

2. Dijkstra on a real dataset (35 pts). Using the six-location CampusNav campus graph from slides/_shared/case-study.md (Gate, Library, CS-Building, Dorm, Gym, Cafeteria; edge weights as given), implement Dijkstra's algorithm.

3. Short written question - P vs. NP (30 pts). CampusNav's organizers want a feature that plans a single scavenger-hunt route visiting every one of the 6 campus locations exactly once, minimizing total walking distance.

Submission format

Source code (LCS + Dijkstra implementations), a short report (PDF or Markdown) with the LCS result, Dijkstra results (both graphs), and written answers to task 3.

Rubric

Criterion Excellent (full) Good Needs work Missing/incorrect
Correctness LCS table/traceback and Dijkstra results all correct One minor error One algorithm has a real bug Both fundamentally incorrect
Traceback & complexity Correct reconstructed LCS string, correct complexity stated and justified Correct string, complexity minor error String or complexity wrong, not both Neither correct
Negative-edge investigation Clearly shows Dijkstra's incorrect result with the wrong distance/path identified, and correctly explains why Bellman-Ford fixes it Shows the failure, explanation has a gap Runs the experiment but conclusion is vague/wrong Not attempted
P/NP explanation Correctly distinguishes the two problems and uses P/NP/NP-complete accurately Mostly correct, one terminology slip Right intuition, wrong terminology Missing or incorrect

Graded within one week of the due date. Model answers and weak-topic guidance are shared with the class after grading; individual review is available on request.