DSA Lab 10 Fall 2009, 11/15/09

This lab is about Dynamic Programming
  1. 6.17 (DG) - Implement your algorithm, (Hint: This is similar to knapsack problem with reptitions allowed - Algorithm in pages 181 and 182) Show the algorithm works with:
    v = 13 and the coin denominations 2, 3, 5
    v = 17 and the coin denominations 3, 5
  2. 6.19 (DG) Please fill in the following recurrence relation
    Definition:
    Let C(m,j) = true if a value of m could be changed with j coins or less.
               = false otherwise.
    Initializations:
    C(0,j) = ??  for 0 <= j <= k
    C(m, 0) = ?? for 0 < m <= v
    C(m,j)  = ??  for 0 < m <=v and 0 < j <= k
    Recurrence Relation:
    C(m,j) = fill a function here ( C([??], [??]), C(m,j)) for 0 < m <= v
    
    for solving this problem. Implement and test the code. What is the running time of this code in big Oh notation. Test it with Sample Data