# Talent scheduling

Talent scheduling represents a complex optimization challenge within the fields of computer science and operations research, specifically categorized under combinatorial optimization. Consider, for example, a case involving the production of multiple films, each comprising several scenes that necessitate the participation of one or more actors. Importantly, only one scene can be filmed per day, and the remuneration for the actors is calculated on a daily basis. A critical constraint in this problem is that actors must be engaged for consecutive days; for instance, an actor cannot be contracted for filming on the first and third days without also being hired on the intervening second day. Furthermore, during the entire hiring period, producers are obligated to compensate the actors, even on days when they are not actively participating in filming. The primary objective of talent scheduling is to minimize the total salary expenditure for the actors by optimizing the sequence in which scenes are filmed.

## 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_{m\times n}^{0}={\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_{i,\sigma (j)}^{0}$ 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_{ij}^{0}$ 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_{i,j}^{0}$
The total cost of unnecessary days is:
    $K(\sigma )=\sum _{i=1}^{m}c_{i}h_{i}(\sigma )=\sum _{i=1}^{m}c_{i}[l_{i}(\sigma )-e_{i}(\sigma )+1-\sum _{j=1}^{n}t_{i,j}^{0}]$
$K(\sigma )$ will be the objective function we should minimize.

## Proof of strong NP-hardness

It can be proved that the talent scheduling problem is NP-hard by a reduction to the optimal linear arrangement(OLA) problem. Even if we restrict the problem by requiring that 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:
| Minimize | $\sum _{i=1}^{m}c_{i}(l_{i}-e_{i}+1)$ |
| subject to | $\sum _{j=1}^{n}x_{j,k}=\sum _{k=1}^{n}x_{j,k}=1,$ | $1\leq j,k\leq n$ |
| | $t_{i,j}e_{i}\leq \sum _{k=1}^{n}t_{i,j}kx_{j,k}\leq l_{i},$ | $1\leq i\leq m,1\leq j\leq n$ |
| | $l_{i},e_{i}\geq 1,$ | $1\leq i\leq m$ |
| | $x_{j,k}\in \{0,1\},$ | $1\leq j,k\leq n$ |
| | $l_{i},e_{i}\in \mathbb {Z} ,$ | $1\leq i\leq m$ |
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}}$