4.2. Special execution graphs
4.2.1. Independent tasks
Consider the problem of minimizing the energy of n independent tasks (i.e., each task is mapped onto a distinct processor, and there are no precedence constraints in the execution graph), while enforcing a deadline D.
Proposition 1 (independent tasks) When G is composed of independent tasks {$T_1, \dots, T_n$}, the optimal solution to MINENERGY(G, D) is obtained when each task $T_i$ ($1 \le i \le n$) is computed at speed $s_i = \frac{w_i}{D}$. If there is a task $T_i$ such that $s_i > s_{max}$, then the problem has no solution.
Proof. For task $T_i$, the speed $s_i$ corresponds to the slowest speed at which the processor can execute the task, so that the deadline is not exceeded. If $s_i > s_{max}$, the corresponding processor will never be able to complete its execution before the deadline, therefore there is no solution. To conclude the proof, we note that any other solution would meet the deadline constraint, and therefore the $s_i$'s should be such that $\frac{w_i}{s_i} \le D$, which means that $s_i \ge \frac{w_i}{D}$. These values would all be higher than the $s_i$'s of the optimal solution, and hence would lead to a higher energy consumption. Therefore, this solution is optimal. $\square$
4.2.2. Linear chain of tasks
This case corresponds for instance to n independent tasks {$T_1, \dots, T_n$} executed onto a single processor. The execution graph is then a linear chain (order of execution of the tasks), with $T_i \to T_{i+1}$, for $1 \le i < n$.
Proposition 2 (linear chain) When G is a linear chain of tasks, the optimal solution to MINENERGY(G, D) is obtained when each task is executed at speed s = W/D, with W = $\sum_{i=1}^{n} w_i$. If s > smax, then there is no solution.
Proof. Suppose that in the optimal solution, tasks $T_i$ and $T_j$ are such that $s_i < s_j$. The total energy consumption is $E_{opt}$. We define s such that the execution of both tasks running at speed s takes the same amount of time than in the optimal solution, i.e., $(w_i + w_j)/s = w_i/s_i + w_j/s_j$: $s = \frac{(w_i+w_j)}{w_i s_j + w_j s_i}$ × $s_i s_j$. Note that $s_i < s < s_j$ (it is the barycenter of two points with positive mass).
We consider a solution such that the speed of task $T_k$, for $1 \le k \le n$, with $k \neq i$ and $k \neq j$, is the same as in the optimal solution, and the speed of tasks $T_i$ and $T_j$ is s. By definition of s, the execution time has not been modified. The energy consumption of this solution is E, where $E_{opt} - E = w_i s_i^2 + w_j s_j^2 - (w_i + w_j)s^2$, i.e., the difference of energy with the optimal solution is only impacted by tasks $T_i$ and $T_j$, for which the speed has been modified. By convexity of the function $x \mapsto x^2$, we obtain $E_{opt} > E$, which contradicts its optimality. Therefore, in the optimal solution, all tasks have the same execution speed. Moreover, the energy consumption is minimized when the speed is as low as possible, while the deadline is not exceeded. Therefore, the execution speed of all tasks is $s = W/D$. $\square$