ECE 665 Spring 2005 Computer Algorithms - PowerPoint PPT Presentation

About This Presentation
Title:

ECE 665 Spring 2005 Computer Algorithms

Description:

wi M = knapsack volume. pi = benefit of item i. wi = weight of item i ... Knapsack Solution space. Purge solution (Pj, Wj) dominated by (Pk, Wk) if. Pj Pk and Wj Wk ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 5
Provided by: MaciejCi9
Learn more at: http://www.ecs.umass.edu
Category:

less

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