Text this: Dynamic programming and inventory control