<p>An interval storage request is represented by a tuple $(s,t,v)$ satisfying $s&lt;t$, meaning that the value $v$ needs to be stored from time $s$ to time $t$. A stack serves the request $(s,t,v)$ in the following natural way: at time $s$, it push an entry with content $v$ into the stack, and pop it out at time $t$. Note that a stack can only pop out its top entry. This implies that a single stack cannot serve two requests $(s_1,t_1,v_1)$, $(s_2,t_2,v_2)$ where $s_1&lt;s_2&lt;t_1&lt;t_2$, since at time $t_1$, the top entry of the stack is $v_2$ rather than $v_1$. However, with two stacks we can serve both requests easily.</p>

<p>The question is: given a set of interval storage requests and capacitated machines, what is the largest subset (in cardinality) of the requests such that we can find a way to serve them using the given stacks (when a request come, we can decide which stack to push it in)?</p>

<p>The formal statement of the problem is the following. We say two intervals $[s_i,t_i]$ and $[s_j,t_j]$ <em>cross</em> if $s_1&lt;s_2&lt;t_1&lt;t_2$ or $s_2&lt;s_1&lt;t_2&lt;t_1$.</p>

<p>Given intervals $I=\{[s_i,t_i]\}_{i\in [n]}$ (assume all endpoints are different integers in $[2n]$), together with integer $T$ and $\{m_t\}_{t\in [T]}$, find a collection of disjoint subsets $J_1,\cdots, J_T\subseteq [n]$  with the largest sum of cardinalities $|J_1|+\cdots+|J_T|$ such that:</p>

<p>(i) (no crossing) for any $t\in [T]$, no two intervals in $I_{J_t}=\{[s_i,t_i]\mid i\in J_t\}$ cross; </p>

<p>(ii) (capacity constraint) for any $t\in [T]$, there is no integer $k\in [2n]$ such that $k$ is contained in at least $m_t+1$ intervals in $I_{J_t}$.</p>

<p>The case $T=1$ is easy. Some other interesting special cases include: </p>

<p>(a) $\forall i\in [T], m_i=\infty.$ Namely, there is no capacity constraint.</p>

<p>(b) Determine whether or not all requests can be served.</p>

<p>I wonder if this problem (or any of the above special cases) was studied before? Any previous results or new ideas are appreciated.</p>

CC BY-SA 3.0
2017-12-01T22:44:54.260Z
Keywords: coloring, interval graph, online algorithm?
François G. Dorais
CC BY-SA 3.0
2017-12-01T23:42:26.760Z
@François G. Dorais I thought about this. But the problem does not ask for online algorithms (it can, but that's an variant). On the other hand, it is not an "interval graph" problem, since we allow intervals to overlap, but only not cross. However, it does not hurt to add them, thanks.
Zihan Tan
<approximation-algorithms><optimization><scheduling><interval-graphs>
Stacks serving interval storage requests
Zihan Tan
# Stacks serving interval storage requests

(Asked by: username_0 on 2017-12-01)

An interval storage request is represented by a tuple $(s,t,v)$ satisfying $s

The question is: given a set of interval storage requests and capacitated machines, what is the largest subset (in cardinality) of the requests such that we can find a way to serve them using the given stacks (when a request come, we can decide which stack to push it in)?

The formal statement of the problem is the following. We say two intervals $[s\_i,t\_i]$ and $[s\_j,t\_j]$ *cross* if $s\_1

Given intervals $I=\{[s\_i,t\_i]\}\_{i\in [n]}$ (assume all endpoints are different integers in $[2n]$), together with integer $T$ and $\{m\_t\}\_{t\in [T]}$, find a collection of disjoint subsets $J\_1,\cdots, J\_T\subseteq [n]$ with the largest sum of cardinalities $|J\_1|+\cdots+|J\_T|$ such that:

(i) (no crossing) for any $t\in [T]$, no two intervals in $I\_{J\_t}=\{[s\_i,t\_i]\mid i\in J\_t\}$ cross;

(ii) (capacity constraint) for any $t\in [T]$, there is no integer $k\in [2n]$ such that $k$ is contained in at least $m\_t+1$ intervals in $I\_{J\_t}$.

The case $T=1$ is easy. Some other interesting special cases include:

(a) $\forall i\in [T], m\_i=\infty.$ Namely, there is no capacity constraint.

(b) Determine whether or not all requests can be served.

I wonder if this problem (or any of the above special cases) was studied before? Any previous results or new ideas are appreciated.

**Tags:** approximation-algorithms, optimization, scheduling, interval-graphs
> **Comments:**
> **username_1**: Keywords: coloring, interval graph, online algorithm?  
> **username_0**: @François G. Dorais I thought about this. But the problem does not ask for online algorithms (it can, but that's an variant). On the other hand, it is not an "interval graph" problem, since we allow intervals to overlap, but only not cross. However, it does not hurt to add them, thanks.  

---

## 0 answers

