Download presentation
Presentation is loading. Please wait.
1
Lecture 36 CSE 331 Nov 30, 2016
2
Quiz 2 on Monday
3
Official Feedback forms
4
We need volunteers!
5
Scheduling to min idle cycles
n jobs, ith job takes wi cycles You have W cycles on the cloud What is the maximum number of jobs you can schedule?
6
When to use Dynamic Programming
O(nW) runtime There are polynomially many sub-problems OPT(j,W’) 0 ≤ j ≤ n, 0 ≤ W’ ≤ W Richard Bellman Optimal solution can be computed from solutions to sub-problems OPT(j, W’) = … There is an ordering among sub-problem that allows for iterative solution OPT (j,W’) only depends on OPT(j-1, 0), …, OPT(j-1,W)
7
Is O(nW) polynomial time?
Pseudo-polynomial n jobs, ith job takes wi cycles You have W cycles on the cloud log W bits needed What is the maximum number of jobs you can schedule?
8
Shortest Path Problem Input: (Directed) Graph G=(V,E) and for every edge e has a cost ce (can be <0) t in V Output: Shortest path from every s to t Assume that G has no negative cycle 1 100 -1000 899 s t Shortest path has cost negative infinity
9
Today’s agenda Dynamic Program for shortest path
10
May the Bellman force be with you
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.