CT243 lab5
http://geminga.it.nuigalway.ie/~gettrick/courses/CT243/labs/l5.html
-
For this lab you must submit
-
Handwritten development notes, including statement of the problem, analysis of the problem, algorithm design (which may include flow charts).
-
A printout of form, image and code of your program, and any numerical answers requested.
-
The above material should be given to David or left in the cardboard box marked CT243 in the mail room (room IT415) on the 4th floor of the IT Building
before
the deadline of 5pm
Monday 3rd March 2008. You will lose 20% for each day
(or part of day) the lab is late.
In this lab we re-visit the Knapsack problem of Lab 4, to solve it using
the dynamic programming technique.
We have fifteen (15) items with weights
[12,17,5,3,17,10,14,10,9,4,2,25,21,11,37] (in Kg) and values
[36,50,12,10,55,27,45,30,25,13,5,50,70,34,110] (in euro) respectively. (You can
call these items A, B, C, ...,O if you want....) There is only one of
each item.
-
Let the bag/knapsack capacity K be 63 Kg. Write a program/function
in VB .net using
-
iteration
-
recursion
to
solve this problem (i.e. decide which items to put in to the bag
to achieve maximum value) using dynamic programming.
-
Modify your recursive solution to calculate how many times the
recursive function is called, and present this as output along with the
answer.
©
NUI, Galway