can be completed within respective deadlines, respectively, they can run in sequential order by their deadlines in ascending fashion to meet the deadlines. Then the deadline constraints can be formulated as follow (noticing that $d_1 \leq d_2 \leq \cdots \leq d_J$): $$\begin{aligned}
\nonumber && \sum_{i'=1}^{i}\sum_{j=1}^{T_{i'}}(x_{i',j,k,l}\cdot\frac{r_{i',j}}{r_k}) \leq d_{i},\\
&&\hspace{0.1in} \forall i=1,...,J,\  \forall l=1,...,N_k,\  \forall k=1,...,P+V,
\label{deadline}\end{aligned}$$ where the binary variable $x_{i,j,k,l}$ ($i=1,...,J$, $j=1,...,T_i$, $k=1,...,P+V$, $l=1,...,N_k$) represents whether $t_{i,j}$ is assigned to core $l$ of container $k$. If so, $x_{i,j,k,l}=1$, otherwise, $x_{i,j,k,l}=0$. The left sides of Inequalities (\[deadline\]) represent the finish times of $t_{i,j}$, $i=1,...,J$, $j=1,...,T_i$, respectively. The total time using a container is the maximum finish time of the task running on it, $\max\limits_{1\leq l\leq N_k}\sum_{i=1}^{J}\sum_{j=1}^{T_i}(x_{i,j,k,l}\cdot r_{i,j}/r_k)$, $k=1,...,P+V$. Thus, the costs for leasing VMs from public cloud respectively are $$\begin{aligned}
\nonumber && c_k = \lceil\max\limits_{1\leq l\leq N_k}\sum_{i=1}^{J}\sum_{j=1}^{T_i}(x_{i,j,k,l}\cdot r_{i,j}/r_k)\rceil\cdot p_k,\\
&&\hspace{1.3in} \forall k=P+1,...,P+V,
\label{cost}\end{aligned}$$ where $\lceil X \rceil$ is the ceiling integer of $X$, and the utilizations of PMs respectively are $$\begin{aligned}
\label{uti}
\nonumber&&u_k = \left\{ \begin{array}{l}
0, \hspace{0.4in}\textrm{if $\sum_{l=1}^{N_k}\sum_{i=1}^{J}\sum_{j=1}^{T_i}x_{i,j,k,l}=0$}\\
\frac{\sum_{l=1}^{N_k}\sum_{i=1}^{J}\sum_{j=1}^{T_i}(x_{i,j,k,l}\cdot r_{i,j})}{N_k\cdot\max\limits_{1\leq l\leq N_k}\sum_{i=1}^{J}\sum_{j=1}^{T_i}(x_{i,j,k,l}\cdot r_{i,j})},\hspace{0.2in} \textrm{else}
\end{array} \right.,\\
&&\hspace{2in}\forall k=1,...,P.\end{aligned}$$ The overall utilization of local resources (PMs) is $\sum_{k=1}^Pu_k/P$.

We formulate the problem of hybrid cloud management as a BNP as follows:

