ECE 665 Spring 2005 Computer Algorithms PowerPoint PPT Presentation

presentation player overlay
About This Presentation
Transcript and Presenter's Notes

Title: ECE 665 Spring 2005 Computer Algorithms


1
ECE 665Spring 2005Computer Algorithms
  • Dynamic Programming
  • Knapsack revisited

2
Recurrence equation
  • Problem statement max ?i pi,
  • s.to
  • ?i wi ? M knapsack volume
  • pi benefit of item i
  • wi weight of item i
  • Optimum solution at decision variable xn
  • Fn(M) maxfn-1(M), fn-1(M-wn)pn)

3
Recurrence equation
  • For arbitrary fi(X)
  • fi(X) max fi-1(X), fi-1(X-wi)pi
  • If item i is not added.
  • If item i is added (with benefit cost pi,
    contributing weight wi)
  • We can represent solution space conveniently in
    terms of pairs (wi, pi)

4
Knapsack Solution space
(pi,wi)
M6
1 2
2 3
5 4
  • Purge solution (Pj, Wj) dominated by (Pk, Wk) if
  • Pj? Pk and Wj? Wk
  • Delete solutions with W gt M (knapsack volume
    exceeded
Write a Comment
User Comments (0)
About PowerShow.com