Skip to main content
Log in

A Constant Factor Approximation Algorithm for the Storage Allocation Problem

  • Published:
Algorithmica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Notes

  1. Bonsma et al. [10] use tiny, medium, and large, since they consider both medium and tiny tasks as small tasks.

References

  1. 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)

  2. 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)

  3. 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)

  4. 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)

    Article  MathSciNet  MATH  Google Scholar 

  5. 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)

    Article  MathSciNet  MATH  Google Scholar 

  6. Bar-Yehuda, R., Beder, M., Cohen, Y., Rawitz, D.: Resource allocation in bounded degree trees. Algorithmica 54(1), 89–106 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  7. 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)

  8. Bar-Yehuda, R., Even, S.: A local-ratio theorem for approximating the weighted vertex cover problem. Ann. Discret. Math. 25, 27–46 (1985)

    MathSciNet  MATH  Google Scholar 

  9. 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)

  10. 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)

    Article  MathSciNet  MATH  Google Scholar 

  11. 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)

  12. 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)

    Article  MathSciNet  MATH  Google Scholar 

  13. 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)

  14. Chakrabarti, A., Chekuri, C., Gupta, A., Kumar, A.: Approximation algorithms for the unsplittable flow problem. Algorithmica 47(1), 53–78 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  15. 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

  16. 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)

  17. 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)

    Article  MathSciNet  MATH  Google Scholar 

  18. Chen, B., Hassin, R., Tzur, M.: Allocation of bandwidth and storage. IIE Trans. 34, 501–507 (2002)

    Google Scholar 

  19. Chrobak, M., Woeginger, G.J., Makino, K., Xu, H.: Caching is hard—even in the fault model. Algorithmica 63(4), 781–794 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  20. Erlebach, T., Jansen, K.: The complexity of path coloring and call scheduling. Theor. Comput. Sci. 255(1–2), 33–50 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  21. 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)

    Article  MathSciNet  MATH  Google Scholar 

  22. 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)

  23. 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)

    MATH  Google Scholar 

  24. Gergov, J.: Algorithms for compile-time memory optimization. In: 10th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 907–908 (1999)

  25. Golumbic, M.C.: Algorithmic Graph Theory and Perfect Graphs. Academic Press, Cambridge (1980)

    MATH  Google Scholar 

  26. 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)

  27. Matula, D.W., Beck, L.L.: Smallest-last ordering and clustering and graph coloring algorithms. J. ACM 30(3), 417–427 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  28. 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)

Download references

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

Authors

Corresponding author

Correspondence to Dror Rawitz.

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.

figure c

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,

$$\begin{aligned} w_1(S)>w(j^*) \cdot 2 \cdot \frac{B/2 - d_{j^*}}{B} \ge w(j^*) \cdot 2 \cdot \frac{B/2 - 2\delta B}{B} =w(j^*) \cdot (1 - 4 \delta ) ~. \end{aligned}$$

On the other hand, for a feasible SAP solution T we have that

$$\begin{aligned} w_1(T) =w_1(T(e^*)) \le w(j^*) + w(j^*) \cdot 2 \cdot 2B/B =5 w(j^*), \end{aligned}$$

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

$$\begin{aligned} w(S')\ge \frac{(1-4\delta )^2}{5} \cdot \textsc {opt} _{\textsc {SAP}}(J) \ge \frac{1-8\delta }{5} \cdot \textsc {opt} _{\textsc {SAP}}(J)~. \end{aligned}$$

The lemma follows by setting \(\delta \) such that \(\delta < \delta _0\) and \(\frac{5}{1-8\delta } \le 5 + \varepsilon \). \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-016-0137-8

Keywords

Navigation