I read the following here
Sub-problem: DPn be the number of ways to write N as the sum of 1, 3, and 4.
Finding recurrence: Consider one possible solution, n = x1 + x2 + ... xn. If the last number is 1, the sum of the remaining numbers should be n - 1. So, number of sums that end with 1 is equal to DPn-1.. Take other cases into account where the last number is 3 and 4. The final recurrence would be:
DPn = DPn-1 + DPn-3 + DPn-4.
Base cases: DP0 = DP1 = DP2 = 1, and DP3 = 2.
My Problem - I do not at all understand the base cases, I did get the recurrence relation though. Am
not getting as to what DP0 = DP1 = DP2 = 1 really mean here.
How many ways can you write each of $0,1,2,3$ as a sum of $1,3,4$?