Talent scheduling

Talent scheduling is an optimization problem in computer science and operations research, and it is also a problem in combinatorial optimization. Suppose we need to make films, and each film contains several scenes. Each scene needs to be shot by one or more actors. And suppose you can only shoot one scene a day. The salaries of these actors are calculated by the day. In this problem, we can only hire each actor consecutively. For example, we can't hire an actor on the first and third days, but not the second day. During the hiring period, the producers still need to pay the actors even if they are not involved in the filming assignment. The purpose of talent scheduling is to minimize the actors' total salary by adjusting the sequence of scenes.

Mathematical formulation
Consider a film shoot composed of $$n$$ shooting days and involving a total of $$m$$ actors. Then we use the day out of days matrix (DODM) $$T^0 \in \{0,1\}_{m \times n}$$ to represent the requirements for the various shooting days. The matrix with the $$(i,j)$$ entry given by:
 * $$t^0_{m \times n} = \begin{cases}

1, & \mbox{if actor i is required in scene j,}\\ 0, & \mbox{otherwise.} \end{cases}$$

Then we define the pay vector $$\mathfrak{R}^m$$, with the $$i$$th element given by $$c_i$$ which means rate of pay per day of the $$i$$th actor. Let v denote any permutation of the n columns of $$T^0$$, we have:
 * $$\sigma :\{1,2,...,n\} \rightarrow \{1,2,...,n\}$$

$$\sigma_n$$ is the permutation set of the n shooting days. Then define $$T(\sigma)$$ to be the matrix $$T^0$$ with its columns permuted according to $$\sigma$$, we have:
 * $$t_{i,j}(\sigma)=t^0_{i,\sigma(j)}$$ for $$i \in \{1,2,...,n\},j \in \{1,2,...,n\}$$

Then we use $$l_i(\sigma)$$ and $$e_i(\sigma)$$ to represent denote respectively the earliest and latest days in the schedule $$S$$ determined by a which require actor $$i$$. So we can find actor $$i$$ will be hired for $$l_i(\sigma)-e_i(\sigma)+1$$ days. But in these days, only $$r_i=\sum_{j=1}^{n} t^0_{ij}$$ days are actually required, which means $$h_i(S)$$ days are unnecessary, we have:
 * $$h_i(S)=h_i(\sigma)=l_i(\sigma)-e_i(\sigma)+1-r_i=l_i(\sigma)-e_i(\sigma)+1-\sum_{j=1}^{n} t^0_{i,j}$$

The total cost of unnecessary days is:
 * $$K(\sigma)=\sum_{i=1}^{m}c_ih_i(\sigma)=\sum_{i=1}^{m}c_i[l_i(\sigma)-e_i(\sigma)+1-\sum_{j=1}^{n} t^0_{i,j}]$$

$$K(\sigma)$$ will be the objective function we should minimize.

Proof of strong NP-hardness
In talent scheduling problem, we can prove that is NP-hard by a reduction from the optimal linear arrangement(OLA) problem. And in this problem, even we restrict each actor is needed for just two days and all actors' salaries are 1, it's still polynomially reducible to the OLA problem. Thus, this problem is unlikely to have pseudo-polynomial algorithm.

Integer programming
The integer programming model is given by:

In this model, $$e_i$$ means the earliest shooting day for talent $$i$$, $$l_i$$ is the latest shooting day for talent $$i$$, $$x_{j,k}$$ is the scheduling for the project, i.e.
 * $$ x_{j,k} = \begin{cases} 1 & \text{if scene } j \text{ is scheduled in day } k \text{ of shooting } \\ 0 & \text{otherwise} \end{cases}$$