Abstract
The online knapsack problem (OKP) is a generalized version of the 0-1 knapsack problem (0-1KP) to a setting in which the problem inputs are revealed over time. Whereas the 0-1KP involves the maximization of the value of the knapsack contents without exceeding its capacity, the OKP involves the following additional requirements: items are presented one at a time, their features are only revealed at their arrival, and an immediate and irrevocable decision on the current item is required before observing the next one. This problem is known to be non-approximable in its general case. Accordingly, we study a relaxed variant of the OKP in which items delay is allowed: we assume that the decision maker is allowed to retain the observed items until a given deadline before deciding definitively on them. The main objective in this problem is to load the best subset of items that maximizes the expected value of the knapsack without exceeding its capacity. We propose an online algorithm based on dynamic programming, that builds-up the solution in several stages. Our approach incorporates a decision rule that identifies the most desirable items at each stage, then places the fittest ones in the knapsack. Our experimental study shows that the proposed algorithm is able to approach the optimal solution by a small error margin.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.