Abstract
We consider a version of the knapsack problem in which an item size is random and revealed only when the decision maker attempts to insert it. After every successful insertion the decision maker can choose the next item dynamically based on the remaining capacity and available items, while an unsuccessful insertion terminates the process. We propose an exact algorithm based on a reformulation of the value function linear program, which dynamically prices variables to refine a value function approximation and generates cutting planes to maintain a dual bound. We provide a detailed analysis of the zero-capacity case, in which the knapsack capacity is zero, and all item sizes have positive probability of equaling zero. We also provide theoretical properties of the general algorithm and an extensive computational study. Our main empirical conclusion is that the algorithm is able to significantly reduce the gap when initial bounds and/or heuristic policies perform poorly.
Similar content being viewed by others
References
Adelman, D.: Price-directed replenishment of subsets: methodology and its application to inventory routing. Manuf. Serv. Oper. Manag. 5, 348–371 (2003)
Adelman, D., Klabjan, D.: Computing near-optimal policies in generalized joint replenishment. INFORMS J. Comput. 24, 148–164 (2011)
Balseiro, S., Brown, D.: Approximations to stochastic dynamic programs via information relaxation duality. Oper. Res. (2018). Forthcoming
Bhalgat, A., Goel, A., Khanna, S.: Improved approximation results for stochastic knapsack problems. In: Proceedings of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1647–1665. SIAM (2011)
Blado, D., Hu, W., Toriello, A.: Semi-infinite relaxations for the dynamic knapsack problem with stochastic item sizes. SIAM J. Optim. 26, 1625–1648 (2016)
Blado, D., Toriello, A.: Relaxation analysis for the dynamic knapsack problem with stochastic item sizes. SIAM J. Optim. 29, 1–30 (2019)
Carraway, R., Schmidt, R., Weatherford, L.: An algorithm for maximizing target achievement in the stochastic knapsack problem with normal returns. Naval Res. Logist. 40, 161–173 (1993)
Dean, B., Goemans, M., Vondrák, J.: Approximating the stochastic knapsack problem: the benefit of adaptivity. In: Proceedings of the 45th Annual IEEE Symposium on the Foundations of Computer Science, pp. 208–217. IEEE (2004)
Dean, B., Goemans, M., Vondrák, J.: Adaptivity and approximation for stochastic packing problems. In: Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 395–404. SIAM (2005)
Dean, B., Goemans, M., Vondrák, J.: Approximating the stochastic Knapsack problem: the benefit of adaptivity. Math. Oper. Res. 33, 945–964 (2008)
Derman, C., Lieberman, G., Ross, S.: A renewal decision problem. Manag. Sci. 24, 554–561 (1978)
de Farias, D., van Roy, B.: The linear programming approach to approximate dynamic programming. Oper. Res. 51, 850–865 (2003)
Goel, A., Indyk, P.: Stochastic load balancing and related problems. In: Proceedings of the 40th Annual IEEE Symposium on the Foundations of Computer Science, pp. 579–586. IEEE (1999)
Goyal, V., Ravi, R.: A PTAS for chance-constrained knapsack problem with random item sizes. Oper. Res. Lett. 38, 161–164 (2010)
Gupta, A., Krishnaswamy, R., Molinaro, M., Ravi, R.: Approximation algorithms for correlated knapsacks and non-martingale bandits. In: Proceedings of the 52nd IEEE Annual Symposium on Foundations of Computer Science, pp. 827–836. IEEE (2011)
Henig, M.: Risk criteria in a stochastic knapsack problem. Oper. Res. 38, 820–825 (1990)
Ilhan, T., Iravani, S., Daskin, M.: The adaptive knapsack problem with stochastic rewards. Oper. Res. 59, 242–248 (2011)
Kellerer, H., Pferschy, U., Pisinger, D.: Knapsack Problems. Springer, Berlin (2004)
Kleinberg, J., Rabani, Y., Tardos, É.: Allocating Bandwidth for Bursty Connections. In: Proceedings of the Twenty-Ninth Annual ACM Symposium on the Theory of Computing, pp. 664–673. Association for Computing Machinery (1997)
Kleinberg, J., Rabani, Y., Tardos, É.: Allocating bandwidth for bursty connections. SIAM J. Comput. 30, 191–217 (2000)
Kleywegt, A., Papastavrou, J.: The dynamic and stochastic knapsack problem. Oper. Res. 46, 17–35 (1998)
Kleywegt, A., Papastavrou, J.: The dynamic and stochastic knapsack problem with random sized items. Oper. Res. 49, 26–41 (2001)
Ma, W.: Improvements and Generalizations of Stochastic Knapsack and Multi-Armed Bandit Algorithms. In: Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 1154–1163. SIAM (2014)
Ma, W.: Improvements and generalizations of stochastic knapsack and markovian bandits approximation algorithms. Math. Oper. Res. (2018). Forthcoming
Martello, S., Toth, P.: Knapsack Problems: Algorithms and Computer Implementations. Wiley, Chichester (1990)
Merzifonluoğlu, Y., Geunes, J., Romeijn, H.: The static stochastic knapsack problem with normally distributed item sizes. Math. Program. 134, 459–489 (2012)
Morita, H., Ishii, H., Nishida, T.: Stochastic linear knapsack programming problem and its applications to a portfolio selection problem. Eur. J. Oper. Res. 40, 329–336 (1989)
Papastavrou, J., Rajagopalan, S., Kleywegt, A.: The dynamic and stochastic knapsack problem with deadlines. Manage. Sci. 42, 1706–1718 (1996)
Schweitzer, P., Seidmann, A.: Generalized polynomial approximations in markovian decision processes. J. Math. Anal. Appl. 110, 568–582 (1985)
Shi, W., Zhang, L., Wu, C., Li, Z., Lau, F.: An online auction framework for dynamic resource provisioning in cloud computing. IEEE/ACM Trans. Netw. 24, 2060–2073 (2016)
Sniedovich, M.: Preference order stochastic knapsack problems: methodological issues. J. Oper. Res. Soc. 31, 1025–1032 (1980)
Steinberg, E., Parks, M.: A preference order dynamic program for a knapsack problem with stochastic rewards. J. Oper. Res. Soc. 30, 141–147 (1979)
Trick, M., Zin, S.: Spline approximations to value functions: a linear programming approach. Macroecon. Dyn. 1, 255–277 (1997)
Acknowledgements
D. Blado’s work was partially supported by an NSF Graduate Research Fellowship Program under Grant No. DGE-1650044. Both authors’ work was partially supported by the National Science Foundation via grant CMMI-1552479.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix
Appendix
1.1 Proof of Proposition 2
Proof
For simplicity in notation, let us denote \(v^*_N(0)\) as \(v_N\) and \(w^*_N(0)\) as \(w_N\). We proceed by induction on the size of N, with the trivial base case that \(w_{\{i\}} = q_i c_i\). We now observe
where \(r_U := \prod _{i \in U} q_i\), and the second to last equality follows from the induction hypothesis. Considering the following identity,
we can thus simplify (16) above to yield
Examining the double sum in (17), for a set X, \(r_X\) appears once for each (strict) subset of \((N \backslash n) \backslash X\). Thus we have
where the exponent for \(-1\) is taken from the substitution of \(V = X\) and \(U = X \cup Y\).
On the other hand, the right hand side of (9) can be rewritten as
Comparing the double sum in (17) with the sum in (19), identity (18) implies that it thus suffices to show
But viewing the sum \(S_{N,X}\) combinatorially, we can rewrite
where the third equality substitutes \(k = |N| - |X| - 1\), and the last equality follows from the identity that the alternating sum of binomial coefficients is 0. Hence,
The entire argument above is identical for any subset \(M \subseteq N\). \(\square \)
1.2 Computational experiments—10-item instances discussion
Table 3 provides summary results for the computational experiments described in Sect. 5. The success rate is defined as the percentage of instances that reached the optimality gap within the time limit, while run time is the average run time in hours for the successful instances. The incomplete remaining gap refers to the geometric mean of the remaining gap of any instance that did not reach the target optimality gap within the time limit. We observe from Table 3 that distributions D6 and D7, the two distributions that do not have support for 0, have the highest success rate. Other distributions seem to have a lower success rate as the variance of the distribution decreases; these results suggest that both including 0 in the support and smoothing the distribution can make closing the final gap of less than 0.5% difficult. We also observed that uncorrelated instances tend to take less time to complete than correlated instances, which makes sense as correlated item sizes and profits tend to make more difficult deterministic knapsack problems.
Additionally, recalling that the 10-item instances actually solve to (numerical) optimality, Figs. 6 and 7 provide insight into which set cardinalities are more prevalent in the optimal solution. In particular, we observe a noticeable difference in the set size distributions between the Bernoulli instances (D1, D3, D4, D5) and non-Bernoulli instances (D2, D6, D7). The plot for Bernoulli instances is more skewed to the right and has a mode of two items, which further explains why the Quadratic relaxation (4) (which includes all singleton and pair item sets) was the best-performing approximation in earlier experiments for these instance types [6]. However, the plot for non-Bernoulli instances seems to become more normally distributed as the instance’s variance decreases: D2 is centered around set sizes of 3 and 4, D6 centered around set sizes 4 and 5, and D7 centered around set size 5. This suggests that, at optimality, less extreme instances favor variables that correspond to larger item set sizes, because individual items have a relatively smaller impact, as opposed to in the more extreme Bernoulli instances.
1.3 Additional plots—20 and 30-item instances
Figures 8, 9, 10 display various parameters of the 30 item instances against the relative remaining gap, while Figs. 11, 12, 13, 14, 15, 16 display various parameters of the 20 and 30-item instances against the relative gap closed per loop (RGPL), an alternative metric for the general algorithm’s progress.
1.4 Raw data
Tables 4, 5, 6 present the raw data used to calculate the summaries in Tables 1, 2, 3 of the general algorithm’s performance in Sect. 5. They are separated by the number of items in each instance, recording results for 10, 20, and 30-items. For fairness in comparisons, the Avg. Inner Loops Metric for 20 and 30-item instances is only recorded for instances that completed 16 algorithm loops.
Rights and permissions
About this article
Cite this article
Blado, D., Toriello, A. A column and constraint generation algorithm for the dynamic knapsack problem with stochastic item sizes. Math. Prog. Comp. 13, 185–223 (2021). https://doi.org/10.1007/s12532-020-00189-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12532-020-00189-0