# On the approximability of the two-phase knapsack problem

- 55 Downloads

## Abstract

We consider a natural generalization of the knapsack problem and the multiple knapsack problem, which has two phases of packing decisions. In this problem, we have a set of items, several small knapsacks called boxes, and a large knapsack called container. Each item has a size and profit, each box has a size and the container has a capacity. The first phase is to select some items to pack into the boxes, and the second phase is to select the boxes (each includes some packed items) to pack into the container. The total profit of the problem is determined by the items that are selected and packed into the container within some packed box, and the objective is to maximize the total profit. This problem is motivated by various practical applications, e.g., in logistics. It is a generalization of the multiple knapsack problem, and hence is strongly NP-hard. We mainly propose three approximation algorithms for it. Particularly, the first one is a \(\frac{1}{4}\)-approximation algorithm based on its linear programming relaxation; the second one is based on applying the algorithms for the multiple knapsack problem and the knapsack problem, and has an approximation ratio \(\frac{1}{3} - \epsilon \) for any small enough \(\epsilon >0\). We finally provide a polynomial time approximation scheme for this problem.

## Keywords

Two-phase knapsack Multiple knapsack Approximation algorithms Polynomial time approximation scheme## Notes

### Acknowledgements

This work has been supported by NSFC No. 11801589, No.11771245 and No. 11371216.

## References

- Chekuri C, Khanna S (2005) A polynomial time approximation scheme for the multiple knapsack problem. SIAM J Comput 35(3):713–728MathSciNetCrossRefGoogle Scholar
- Chen L, Zhang G (2016) Packing groups of items into multiple knapsacks. In: Ollinger N, Vollmer H (eds) STACS 2016. LIPIcs, vol 47, pp 28:1–28:13MathSciNetCrossRefGoogle Scholar
- Dudziński K, Walukiewicz S (1987) Exact methods for the knapsack problem and its generalizations. Eur J Oper Res 28(1):3–21MathSciNetCrossRefGoogle Scholar
- Faaland BH (1981) The multiperiod knapsack problem. Oper Res 29(3):612–616MathSciNetCrossRefGoogle Scholar
- Feige U, Vondrak J (2006) Approximation algorithms for allocation problems: improving the factor of \(1 - 1/e\). In: FOCS’06, pp 667–676Google Scholar
- Fernandez de la Vega W, Lueker GS (1981) Bin packing can be solved within 1 + \(\epsilon \) in linear time. Combinatorica 1(4):349–355MathSciNetCrossRefGoogle Scholar
- Fleischer L, Goemans MX, Mirrokni Vahab S, Sviridenko M (2011) Tight approximation algorithms for maximum separable assignment problems. Math Oper Res 36(3):416–431MathSciNetCrossRefGoogle Scholar
- Garey MR, Johnson DS (1979) Computers and intractability: a guide to the theory of NP-completeness. Freeman, New YorkzbMATHGoogle Scholar
- Hariri AMA, Potts CN, Van Wassenhove LN (1995) Single machine scheduling to minimize total weighted late work. ORSA J Comput 7(2):232–242CrossRefGoogle Scholar
- Ibarra OH, Kim CE (1975) Fast approximation algorithms for the knapsack and sum of subset problems. J ACM 22(4):463–468MathSciNetCrossRefGoogle Scholar
- Jansen K (2010) Parameterized approximation scheme for the multiple knapsack problem. SIAM J Comput 39(4):1392–1412MathSciNetCrossRefGoogle Scholar
- Johnston RE, Khan LR (1995) Bounds for nested knapsack problems. Eur J Oper Res 81(1):154–165CrossRefGoogle Scholar
- Kellerer H, Pferschy U, Pisinger D (2004) Knapsack problems. Springer, BerlinCrossRefGoogle Scholar
- Kosuch S (2014) Approximability of the two-stage stochastic knapsack problem with discretely distributed weights. Discrete Appl Math 165:192–204MathSciNetCrossRefGoogle Scholar
- Kosuch S, Lisser A (2011) On two-stage stochastic knapsack problems. Discrete Appl Math 159(16):1827–1841MathSciNetCrossRefGoogle Scholar
- Lawler EL (1979) Fast approximation algorithms for knapsack problems. Math Oper Res 4(4):339–356MathSciNetCrossRefGoogle Scholar
- Murgolo FD (1987) An efficient approximation scheme for variable-sized bin packing. SIAM J Comput 16(1):149–161MathSciNetCrossRefGoogle Scholar
- Nip K, Wang Z (2013) Combination of two-machine flow shop scheduling and shortest path problems. In: Du D-Z, Zhang G (eds) COCOON 2013. LNCS, vol 7936. Springer, pp 680–687Google Scholar
- Nip K, Wang Z, Talla NF, Leus R (2015a) A combination of flow shop scheduling and the shortest path problem. J Comb Optim 29(1):36–52MathSciNetCrossRefGoogle Scholar
- Nip K, Wang Z, Xing W (2015b) Combinations of some shop scheduling problems and the shortest path problem: complexity and approximation algorithms. In: Xu D, Du D, Du D-Z (eds) COCOON 2015. LNCS, vol 9198. Springer, pp 97–108Google Scholar
- Nip K, Wang Z, Xing W (2016) A study on several combination problems of classic shop scheduling and shortest path. Theor Comput Sci 654:175–187MathSciNetCrossRefGoogle Scholar
- Shmoys DB, Tardos É (1993) An approximation algorithm for the generalized assignment problem. Math Program 62(3):461–474MathSciNetCrossRefGoogle Scholar
- Wang Z, Cui Z (2012) Combination of parallel machine scheduling and vertex cover. Theor Comput Sci 460:10–15MathSciNetCrossRefGoogle Scholar
- Williamson DP, Shmoys DB (2011) The design of approximation algorithms. Cambridge University Press, New YorkCrossRefGoogle Scholar
- Xavier EC, Miyazawa FK (2006) Approximation schemes for knapsack problems with shelf divisions. Theor Comput Sci 352(1):71–84MathSciNetCrossRefGoogle Scholar
- Ye Y (1997) Interior point algorithms: theory and analysis. Wiley, LondonCrossRefGoogle Scholar