{"title":"Online Unit Profit Knapsack with Predictions","authors":"Joan Boyar, Lene M. Favrholdt, Kim S. Larsen","doi":"10.1007/s00453-024-01239-y","DOIUrl":null,"url":null,"abstract":"<div><p>A variant of the online knapsack problem is considered in the setting of predictions. In Unit Profit Knapsack, the items have unit profit, i.e., the goal is to pack as many items as possible. For Online Unit Profit Knapsack, the competitive ratio is unbounded. In contrast, it is easy to find an optimal solution offline: Pack as many of the smallest items as possible into the knapsack. The prediction available to the online algorithm is the average size of those smallest items that fit in the knapsack. For the prediction error in this hard online problem, we use the ratio <span>\\(r=\\frac{a}{\\hat{a}}\\)</span> where <i>a</i> is the actual value for this average size and <span>\\(\\hat{a}\\)</span> is the prediction. We give an algorithm which is <span>\\(\\frac{e-1}{e}\\)</span>-competitive, if <span>\\(r=1\\)</span>, and this is best possible among online algorithms knowing <i>a</i> and nothing else. More generally, the algorithm has a competitive ratio of <span>\\(\\frac{e-1}{e}r\\)</span>, if <span>\\(r \\le 1\\)</span>, and <span>\\(\\frac{e-r}{e}r\\)</span>, if <span>\\(1 \\le r < e\\)</span>. Any algorithm with a better competitive ratio for some <span>\\(r<1\\)</span> will have a worse competitive ratio for some <span>\\(r>1\\)</span>. To obtain a positive competitive ratio for all <i>r</i>, we adjust the algorithm, resulting in a competitive ratio of <span>\\(\\frac{1}{2r}\\)</span> for <span>\\(r\\ge 1\\)</span> and <span>\\(\\frac{r}{2}\\)</span> for <span>\\(r\\le 1\\)</span>. We show that improving the result for any <span>\\(r< 1\\)</span> leads to a worse result for some <span>\\(r>1\\)</span>.</p></div>","PeriodicalId":50824,"journal":{"name":"Algorithmica","volume":"86 9","pages":"2786 - 2821"},"PeriodicalIF":0.9000,"publicationDate":"2024-06-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://link.springer.com/content/pdf/10.1007/s00453-024-01239-y.pdf","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Algorithmica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s00453-024-01239-y","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
A variant of the online knapsack problem is considered in the setting of predictions. In Unit Profit Knapsack, the items have unit profit, i.e., the goal is to pack as many items as possible. For Online Unit Profit Knapsack, the competitive ratio is unbounded. In contrast, it is easy to find an optimal solution offline: Pack as many of the smallest items as possible into the knapsack. The prediction available to the online algorithm is the average size of those smallest items that fit in the knapsack. For the prediction error in this hard online problem, we use the ratio \(r=\frac{a}{\hat{a}}\) where a is the actual value for this average size and \(\hat{a}\) is the prediction. We give an algorithm which is \(\frac{e-1}{e}\)-competitive, if \(r=1\), and this is best possible among online algorithms knowing a and nothing else. More generally, the algorithm has a competitive ratio of \(\frac{e-1}{e}r\), if \(r \le 1\), and \(\frac{e-r}{e}r\), if \(1 \le r < e\). Any algorithm with a better competitive ratio for some \(r<1\) will have a worse competitive ratio for some \(r>1\). To obtain a positive competitive ratio for all r, we adjust the algorithm, resulting in a competitive ratio of \(\frac{1}{2r}\) for \(r\ge 1\) and \(\frac{r}{2}\) for \(r\le 1\). We show that improving the result for any \(r< 1\) leads to a worse result for some \(r>1\).
期刊介绍:
Algorithmica is an international journal which publishes theoretical papers on algorithms that address problems arising in practical areas, and experimental papers of general appeal for practical importance or techniques. The development of algorithms is an integral part of computer science. The increasing complexity and scope of computer applications makes the design of efficient algorithms essential.
Algorithmica covers algorithms in applied areas such as: VLSI, distributed computing, parallel processing, automated design, robotics, graphics, data base design, software tools, as well as algorithms in fundamental areas such as sorting, searching, data structures, computational geometry, and linear programming.
In addition, the journal features two special sections: Application Experience, presenting findings obtained from applications of theoretical results to practical situations, and Problems, offering short papers presenting problems on selected topics of computer science.