{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

shortnegpath

# shortnegpath - CMSC 451 Shortest Paths with Negative...

This preview shows pages 1–4. 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: CMSC 451: Shortest Paths with Negative Weights Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Section 6.8 of Algorithm Design by Kleinberg & Tardos. Dynamic Programming Principles, Reviewed Dynamic Programming Pattern: 1 Decompose the problem into subproblems. 2 Recursively define the value of a solution of a subproblem by the value of solutions of smaller subproblems. 3 Compute the value of the solutions for subproblems from smaller to larger. 4 Use the choices made (arrows) to reconstruct an actual solution. DP Principles, 2 Principle of Optimality: A problem obeys this principle if an optimal solution to the problem contains within it optimal solutions to subproblems. • Solution to the problem requires making a choice e.g. include the last interval or not? • This choice leaves 1 or more subproblems unsolved. • Assuming you’re given the optimal solution to these subproblems, you show how to construct the optimal solution to the larger subproblem. Shortest Path Problem...
View Full Document

{[ snackBarMessage ]}

### Page1 / 13

shortnegpath - CMSC 451 Shortest Paths with Negative...

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

View Full Document
Ask a homework question - tutors are online