Abstract
We study the storage allocation problem (SAP) which is a variant of the unsplittable flow problem on paths (UFPP). A SAP instance consists of a path \(P = (V,E)\) and a set J of tasks. Each edge \(e \in E\) has a capacity \(c_e\) and each task \(j \in J\) is associated with a path \(I_j\) in P, a demand \(d_j\) and a weight \(w_j\). The goal is to find a maximum weight subset \(S \subseteq J\) of tasks and a height function \(h:S \rightarrow \mathbb {R}^+\) such that (i) \(h(j)+d_j \le c_e\), for every \(e \in I_j\); and (ii) if \(j,i \in S\) such that \(I_j \cap I_i \ne \emptyset \) and \(h(j) \ge h(i)\), then \(h(j) \ge h(i) + d_i\). SAP can be seen as a rectangle packing problem in which rectangles can be moved vertically, but not horizontally. We present a polynomial time \((9+\varepsilon )\)-approximation algorithm for SAP. Our algorithm is based on a variation of the framework for approximating UFPP by Bonsma et al. [FOCS 2011] and on a \((4+\varepsilon )\)-approximation algorithm for \(\delta \)-small SAP instances (in which \(d_j \le \delta \cdot c_e\), for every \(e \in I_j\), for a sufficiently small constant \(\delta >0\)). In our algorithm for \(\delta \)-small instances, tasks are packed carefully in strips in a UFPP manner, and then a \((1+\varepsilon )\) factor is incurred by a reduction from SAP to UFPP in strips. The strips are stacked to form a SAP solution. Finally, we provide a \((10+\varepsilon )\)-approximation algorithm for SAP on ring networks.
Similar content being viewed by others
Notes
Bonsma et al. [10] use tiny, medium, and large, since they consider both medium and tiny tasks as small tasks.
References
Anagnostopoulos, A., Grandoni, F., Leonardi, S., Wiese, A.: Constant integrality gap LP formulations of unsplittable flow on a path. In: 16th International Integer Programming and Combinatorial Optimization Conference, volume 7801 of LNCS, pp. 25–36 (2013)
Anagnostopoulos, A., Grandoni, F., Leonardi, S., Wiese, A.: A mazing \((2+\varepsilon )\)-approximation for unsplittable flow on a path. In: 25th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 26–41 (2014)
Bansal, N., Chakrabarti, A., Epstein, A., Schieber, B.: A quasi-ptas for unsplittable flow on line graphs. In: 38th Annual ACM Symposium on the Theory of Computing, pp. 721–729 (2006)
Bansal, N., Friggstad, Z., Khandekar, R., Salavatipour, M.R.: A logarithmic approximation for unsplittable flow on line graphs. ACM Trans. Algorithms 10(1), 1 (2014)
Bar-Noy, A., Bar-Yehuda, R., Freund, A., Naor, J., Shieber, B.: A unified approach to approximating resource allocation and scheduling. J. ACM 48(5), 1069–1090 (2001)
Bar-Yehuda, R., Beder, M., Cohen, Y., Rawitz, D.: Resource allocation in bounded degree trees. Algorithmica 54(1), 89–106 (2009)
Bar-Yehuda, R., Beder, M., Rawitz, D.: A constant factor approximation algorithm for the storage allocation problem. In: 25th ACM Symposium on Parallelism in Algorithms and Architectures, pp. 204–213 (2013)
Bar-Yehuda, R., Even, S.: A local-ratio theorem for approximating the weighted vertex cover problem. Ann. Discret. Math. 25, 27–46 (1985)
Batra, J., Garg, N., Kumar, A., Mömke, T., Wiese, A.: New approximation schemes for unsplittable flow on a path. In: 26th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 47–58 (2015)
Bonsma, P.S., Schulz, J., Wiese, A.: A constant-factor approximation algorithm for unsplittable flow on paths. SIAM J. Comput. 43(2), 767–799 (2014)
Buchsbaum, A.L., Efrat, A., Jain, S., Venkatasubramanian, S., Yi, K.: Restricted strip covering and the sensor cover problem. Technical report. arXiv:cs/0605102v1. CoRR (2008)
Buchsbaum, A.L., Karloff, H., Kenyon, C., Reingold, N., Thorup, M.: OPT versus LOAD in dynamic storage allocation. SIAM J. Comput. 33(3), 632–646 (2004)
Calinescu, G., Chakrabarti, A., Karloff, H.J., Rabani, Y.: Improved approximation algorithms for resource allocation. In: 9th International Integer Programming and Combinatorial Optimization Conference, vol. 2337 of LNCS, pp. 401–414 (2002)
Chakrabarti, A., Chekuri, C., Gupta, A., Kumar, A.: Approximation algorithms for the unsplittable flow problem. Algorithmica 47(1), 53–78 (2007)
Chekuri, C., Ene, A., Korula, N.: Unsplittable flow in paths and trees and column-restricted packing integer programs. http://www.cs.princeton.edu/aene/papers/ufp-full.pdf
Chekuri, C., Ene, A., Korula, N.: Unsplittable flow in paths and trees and column-restricted packing integer programs. In: 12th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, vol. 5687 of LNCS, pp. 42–55 (2009)
Chekuri, C., Mydlarz, M., Shepherd, F.B.: Multicommodity demand flow in a tree and packing integer programs. ACM Trans. Algorithms 3(3), 1–23 (2007)
Chen, B., Hassin, R., Tzur, M.: Allocation of bandwidth and storage. IIE Trans. 34, 501–507 (2002)
Chrobak, M., Woeginger, G.J., Makino, K., Xu, H.: Caching is hard—even in the fault model. Algorithmica 63(4), 781–794 (2012)
Erlebach, T., Jansen, K.: The complexity of path coloring and call scheduling. Theor. Comput. Sci. 255(1–2), 33–50 (2001)
Frieze, A.M., Clarke, M.R.B.: Approximation algorithms for the \(m\)-dimensional \(0-1\) knapsack problem: worst-case and probabilistic analyses. Eur. J. Oper. Res. 15, 100–109 (1984)
Friggstad, Z., Gao, Z.: On linear programming relaxations for unsplittable flow in trees. In: 18th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, vol. 40 of LIPIcs, pp. 265–283 (2015)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Company, New York (1979)
Gergov, J.: Algorithms for compile-time memory optimization. In: 10th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 907–908 (1999)
Golumbic, M.C.: Algorithmic Graph Theory and Perfect Graphs. Academic Press, Cambridge (1980)
Leonardi, S., Marchetti-Spaccamela, A., Vitaletti, A.: Approximation algorithms for bandwidth and storage allocation problems under real time constraints. In: 20th Conference on Foundations of Software Technology and Theoretical Computer Science, vol. 1974 of LNCS, pp. 409–420 (2000)
Matula, D.W., Beck, L.L.: Smallest-last ordering and clustering and graph coloring algorithms. J. ACM 30(3), 417–427 (1983)
Mömke T., Wiese A., A \((2+\epsilon )\)-approximation algorithm for the storage allocation problem. In: 42nd Annual International Colloquium on Automata, Languages, and Programming, vol. 9134 of LNCS, pp. 973–984 (2015)
Acknowledgments
We thank an anonymous referee for pointing out that we can use LP-rounding instead of local ratio for computing a \(\frac{1}{2}B\)-packable SAP solution in Sect. 4.1.
Author information
Authors and Affiliations
Corresponding author
Additional information
A preliminary version was presented at the 25th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), 2013.
Appendix: A Local Ratio Algorithm for Packing Small Tasks in a Strip
Appendix: A Local Ratio Algorithm for Packing Small Tasks in a Strip
In this section we provide a local ratio algorithm that computes \(\frac{1}{2}B\)-packable \((5+\varepsilon )\)-approximate solutions for \(\delta \)-small SAP instances in which edge capacities are between B and 2B, for some constant \(\delta > 0\) (depending on \(\varepsilon \)).
The local ratio technique [5, 8] is based on the Local Ratio Lemma. We use the maximization version of the lemma which applies to optimization problems in which the input is a profit vector \(w \in (\mathbb {Q}^+)^n\) and a set of feasibility constraints \(\mathcal {F}\). The problem is to find a solution vector \(x \in \mathbb {Q}^n\) that maximizes the inner product \(p \cdot x\) subject to the constraints \(\mathcal {F}\).
Lemma 19
(Local Ratio [5]). Let \(\mathcal F\) be a set of constraints and let \(w,w_1\), and \(w_2\) be profit functions such that \(w = w_1 + w_2\). Then, if x is r-approximate both with respect to \((\mathcal {F},w_1)\) and with respect to \((\mathcal {F},w_2)\), for some r, then x is also an r-approximate solution with respect to \((\mathcal {F},w)\).
We are now ready to present our local ratio algorithm.
Sorting the tasks according to their right end-point can be done in \(O(n \log n)\). There are O(n) recursive calls, each requiring linear time. Hence the running time of Algorithm Strip is \(O(n^2)\).
We show that Algorithm Strip computes approximate solutions whose load on any edge is at most \(\frac{1}{2}B\).
Lemma 20
Given a \(\delta \)-small SAP instance in which \(b(j) \in [B,2B)\), for every \(j \in J\), Algorithm Strip computes a \(\frac{1}{2}B\)-packable UFPP solution S. Furthermore, \(w(S) \ge \frac{5}{1-4\delta } \cdot \textsc {opt} _{\textsc {SAP}}(J)\).
Proof
We first prove that S is \(\frac{1}{2}B\)-packable, for every e, by induction on the number of recursive calls. In the base case \(S=\emptyset \) and we are done. For the inductive step, assume that \(d(S'(e)) \le \frac{1}{2}B\), for every \(e \in E\). First, \(d(S(e)) = d(S'(e)) \le \frac{1}{2}B\), for every \(e \not \in I_{j^*}\). For \(e \in I_{j^*}\), observe that \(d(S(e)) \le d(S(e^*)) \le \frac{1}{2}B\).
We prove that S is \(\frac{5}{1-4\delta }\)-approximate also by induction on the number of recursive calls. In the base case \(S=\emptyset \) is optimal. For the inductive step, assume that \(S'\) is \(\frac{5}{1-4\delta }\)-approximate with respect to \(J^+\) and \(w_{2}.\) Since \(w_2(j^*)=0\), S is also \(\frac{5}{1-4\delta }\)-approximate with respect to J and \(w_2\), We show that S is also \(\frac{5}{1-4\delta }\)-approximate with respect to J and \(w_1\). This completes the proof, since by the Local Ratio Lemma we get that S is \(\frac{5}{1-4\delta }\)-approximate with respect to J and w as well.
It remains to show that S is \(\frac{5}{1-4\delta }\)-approximate with respect to J and \(w_1\). Notice that either \(j^* \in S\) or \(d(S(e^*)) + d_{j^*} > \frac{1}{2}B\). If \(j^* \in S\), then \(w_1(S) \ge w(j^*)\). Otherwise,
On the other hand, for a feasible SAP solution T we have that
due to Observation 1. Therefore w(S) is \(\frac{5}{1-4\delta }\)-approximate with respect to J and \(w_1\). \(\square \)
The following lemma replaces Lemma 5.
Lemma 21
There exists a polynomial time algorithm such that for every constant \(\varepsilon >0\), there exists a constant \(\delta >0\), such that the algorithm computes \(\frac{1}{2}B\)-packable \((5+\varepsilon )\)-approximate solutions for \(\delta \)-small SAP instances in which \(b(j) \in [B,2B)\), for every \(j \in J\).
Proof
First, execute Algorithm Strip to compute a \(\frac{1}{2}B\)-packable \(\frac{5}{1-4\delta }\)-approximate UFPP solution S. By Lemma 4, S can be transformed into a \(\frac{1}{2}B\)-packable SAP solution \((S',h')\) such that \(w(S') \ge (1-4\delta ) w(S)\) in polynomial time. It follows that
The lemma follows by setting \(\delta \) such that \(\delta < \delta _0\) and \(\frac{5}{1-8\delta } \le 5 + \varepsilon \). \(\square \)
Rights and permissions
About this article
Cite this article
Bar-Yehuda, R., Beder, M. & Rawitz, D. A Constant Factor Approximation Algorithm for the Storage Allocation Problem. Algorithmica 77, 1105–1127 (2017). https://doi.org/10.1007/s00453-016-0137-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-016-0137-8