{"title":"带预测的在线单位利润包","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":"{\"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}","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
摘要
在预测的背景下,我们考虑了在线可纳包问题的一个变体。在单位利润包中,物品具有单位利润,即目标是尽可能多地打包物品。对于在线单位利润可纳包,竞争率是无限制的。相比之下,很容易找到离线最优解:将尽可能多的最小物品装入背包。在线算法可以利用的预测结果是装入背包的最小物品的平均尺寸。对于这个困难的在线问题的预测误差,我们使用比率(r=\frac{a}{\hat{a}}\),其中 a 是这个平均大小的实际值,\(\hat{a}\) 是预测值。如果 \(r=1\) ,我们给出的算法是具有竞争性的(\(frac{e-1}{e}\),这在知道 a 而不知道其他信息的在线算法中是最好的。更一般地说,如果(r=1),算法的竞争率是(\frac{e-1}{e}r\);如果(r=1),算法的竞争率是(\frac{e-r}{e}r\)。任何算法在某些(r<1\)情况下具有较好的竞争比率,在某些(r>1\)情况下就会具有较差的竞争比率。为了获得对所有r的正竞争比率,我们调整了算法,结果是对(r\ge 1\ )的竞争比率为(\frac{1}{2r}\ ),对(r\le 1\ )的竞争比率为(\frac{r}{2}\ )。我们证明,对任何(r< 1\) 结果的改进都会导致对某些(r> 1\) 结果的恶化。
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.