Skip to content

Lot-Size Bellman Recursion

Definition

Let fi(xi+1)f_i(x_{i+1}) be the minimum cost through period ii of the dynamic lot-size model, including its ending-stock holding cost, conditional on stock xi+1x_{i+1}. For given initial stock x1x_1, the course's forward lot-size recursion is

f1(x2)=C1(D1+x2−x1)+h1x2f_1(x_2)=C_1(D_1+x_2-x_1)+h_1x_2

when the required order is nonnegative, and +∞+\infty otherwise. For i≥2i\ge2,

fi(xi+1)=min⁡0≤yi≤Di+xi+1{Ci(yi)+hixi+1+fi−1(xi+1+Di−yi)}.f_i(x_{i+1}) =\min_{0\le y_i\le D_i+x_{i+1}} \left\{C_i(y_i)+h_ix_{i+1} +f_{i-1}(x_{i+1}+D_i-y_i)\right\}.

Use integer states and decisions in the course tables; unreachable predecessor states have value +∞+\infty. The required final value is fn(0)f_n(0).


Interpretation

The recursion fills a table with one value fi(xi+1)f_i(x_{i+1}) for each period and ending stock: the cheapest way to meet the demand of periods 1,…,i1,\dots,i and end period ii with xi+1x_{i+1} units. To compute it, try each order size yiy_i in period ii. The stock balance then fixes where period ii must have started, xi=xi+1+Di−yix_i=x_{i+1}+D_i-y_i, and the best cost of reaching that starting stock is already known as fi−1(xi)f_{i-1}(x_i).

A staged network of stock levels 0 to 2 after each period, with every transition that needs no negative order drawn and the optimal ordering path highlighted, and the values f2(1) = 53 and f3(0) = 79 marked.

The columns are the stock levels after each period, from x1=0x_1=0 to x4=0x_4=0, and the arrows join stock levels of consecutive periods; only levels 0 to 2 are drawn, and only transitions with a nonnegative order yiy_i. The highlighted route orders 22 units in each period, and the stock goes 0→0→1→00\to0\to1\to0, which matches the demands 22, 11 and 33. The value f2(1)=53f_2(1)=53 is the cheapest cost of ending period 2 with one unit in stock; the last step adds C3(2)=26C_3(2)=26 and gives f3(0)=79f_3(0)=79, the minimum total cost.

The upper bound yi≤Di+xi+1y_i\le D_i+x_{i+1} says exactly that the starting stock xix_i is not negative. The answer is fn(0)f_n(0) because the plan must end with xn+1=0x_{n+1}=0.

This is the dynamic programming scheme with periods as stages and stock levels as states. When the cost assumptions of the zero-inventory ordering property hold, only order sizes that are sums of consecutive demands need to be tried. The highlighted route is not of this form: it carries one unit into period 3 and still orders there.

A common slip is to index fif_i by the starting stock xix_i instead of the ending stock xi+1x_{i+1}. The holding cost hixi+1h_ix_{i+1} is charged on the stock carried out of period ii.


Key Results

  • The bound on yiy_i ensures nonnegative predecessor inventory.
  • Reconstruct from xn+1=0x_{n+1}=0 using stored minimizers and xi=xi+1+Di−yix_i=x_{i+1}+D_i-y_i.
  • In the course examples, states need not exceed the remaining future demand.

Examples

  • The three-period example gives f2(1)=53f_2(1)=53 and f3(0)=26+53=79f_3(0)=26+53=79.
  • Backward reconstruction gives y3=2y_3=2, x3=1x_3=1, y2=2y_2=2, x2=0x_2=0, y1=2y_1=2.

Prerequisites

Sources

Aliases: Dynamic lot-size recurrence, lot-size recursion Symbols: infinity

Last updated: 27 October 2026 11:52