01:198:344 Lecture Notes - Lecture 7: Dynamic Programming, Big O Notation, Wii

66 views1 pages

Document Summary

Last lecture: dynamic programming, de ne edit distance e(s, t ) between strings s and t to be the minimum character deletes, inserts and switches needed to convert s to t . Problem: given s and t , nd the edit distance e(s, t ). Space o(n2): read pages 358 413 of clrs, and work through one example to become familiar with dynamic programming. We are given a set of n items, where each item i has weight wi and value vi. We are also given a weight budget w (the size of the knapsack). Find the subset of items of maximum total value such that sum of their weights is at most w i, (i. e. they all t into the knapsack). General problem: de ne w (i, w) to be the solution to the problem above with budget at most w and i items. W (i, w) = max{vi + w (i 1, w wi), w (i 1, w)}

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions