Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| courses:cs211:winter2012:journals:jeanpaul:chaptersixsectioniv [2012/03/28 03:02] – [Designing the Algorithm] mugabej | courses:cs211:winter2012:journals:jeanpaul:chaptersixsectioniv [2012/03/28 03:13] (current) – [Designing the Algorithm] mugabej | ||
|---|---|---|---|
| Line 28: | Line 28: | ||
| >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| - | >>>>>>>>>>>>>>>>>>> | + | >>>>>>>>>>>>>>>>>>> |
| >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | \\ | ||
| + | ====== Algorithm ====== | ||
| + | >>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | ||
| + | >>>>>>>>>>>>>>>>>>> | ||
| + | |||
| + | |||
| + | ** Algorithm Analysis** | ||
| + | \\ | ||
| + | * The algorithm takes Θ(nW) time to compute the optimal value of the problem. | ||
| + | * Given a table M of the optimal values of the subproblems, | ||
| + | * Thus the Knapsack Problem can be solved in O(nW) time. | ||
| + | |||
| + | |||
| + | I give this section an 8/10. | ||
| + | |||
| + | |||
| + | |||
| + | |||
