Suppose the country of Weirdonia has coins of n different denominations. Let a coin of denomination i, 1 ? i ? n, have value di. We assume that
each di > 0. Further, we assume that the denominations are presented to us in increasing order i.e., d? < d? < d? < ... < d?. Finally, we assume
that d? is 1 so that it is feasible to make up any amount. Let m be the amount for which we want to determine the minimal number of coins needed.
You are expected to work alone and not consult outside resources other than our textbook, slides and your own personal class notes.
Define c[i, j] to be the minimum number of coins required to pay an amount of j cents, 0 ? j ? m, using only coins of denominations 1 through i,
1 ? i ? n.
Develop a recurrence relation for c[i, j] by analyzing the structure of the optimal solution. You need to specify clearly the recurrence relation(s) and
the base condition(s). You should also justify as to why they are correct.