A base case is a known value at the boundary of a dynamic-programming problem. It anchors the recurrence: once the boundary values are defined, dependent states can be evaluated from smaller subproblems. States, transitions, and base cases must be specified together; a recurrence alone does not determine a complete solution. section 6.1.3 section 6.2.3
A base case can represent different kinds of boundaries:
- A trivial subproblem, such as having no items or no remaining capacity. section 6.2.3
- An initial value from which tabulation builds larger answers. section 6.3.3
- A terminal condition, such as the end of a planning horizon or direct connections in a network. section 6.4.2 section 6.4.3
Coin change
For counting combinations, ways[0] = 1: there is one way to make zero, by selecting no coins. This initial count lets tabulation build counts for positive amounts; without it, later counts remain zero. section 6.3.3
The equation states the initial count used to build the coin-change table. section 6.3.3

