For that recurrence to make sense, $V$ can only be the array that contains the coin values; that is, $V=\{C_1, C_2, ..., C_m\}$.
Whenever confronted with a new dynamic programming problem, you should always try to understand how optimal solutions are structured in terms of optimal solutions for smaller subproblems (cf. optimal substructure). This will help you come up with the recurrence relation. Note that, in dynamic programming, you take the solution for one or more subproblems (initially, the base cases) and extend them, repeating this extension iteratively until, eventually, you reach the solution for the original problem.
In the coin change problem (using your notation) a subproblem is of the form solution[i][j]
, which means: you can make change for $j$ cents using the first $i$ coins from $V$. How have we arrived at this optimal solution (i.e., how have we extended a previously solved subproblem)? We may have brought one more coin from $V$ into the picture. How does this new coin extend the previous solution? Well, there are two possibilities: we have used this coin to make change or we haven't. We must add up these two cases (since both of them represent valid ways to make change):
Case 1 (the coin is not taken): when coin $i$ is not taken, the number of ways to make change for $j$ is exactly the same as it was before coin $i$ was even considered; that is, solution[i-1][j]
.
Case 2 (the coin is taken): when coin $i$ is taken, your are spending its value; therefore, you must substract the value $C_i$ to $j$. Now, the number of ways to make change is solution[i][j-v[i]]
*.
The final recurrence is obtained by adding up these two cases:
solution[i][j] = solution[i-1][j] + solution[i][j-v[i]]
Observe that case 2 is not applicable when $j$ is smaller than the value of the $i$th coin (that is, when $j < C_i$), hence the distinction in the third and fourth lines of your recurrence.
Footnote:
* It will be v[i-1]
if the array starts at index 0.