Corollary 1. A linear chain with $n$ tasks is equivalent to a single task of cost $W = \sum_{i=1}^{n} w_i$.
Indeed, in the optimal solution, the $n$ tasks are executed at the same speed, and they can be replaced by a single task of cost $W$, which is executed at the same speed and consumes the same amount of energy.
4.2.3. Fork and join graphs
Let $V = {T_1, \dots, T_n}$. We consider either a fork graph $G = (V \cup {T_0}, E)$, with $E = {(T_0, T_i), T_i \in V}$, or a join graph $G = (V \cup {T_0}, E)$, with $E = {(T_i, T_0), T_i \in V}$. $T_0$ is either the source of the fork or the sink of the join.
Theorem 1 (fork and join graphs) When $G$ is a fork (resp. join) execution graph with $n+1$ tasks $T_0, T_1, \dots, T_n$, the optimal solution to MINENERGY$(G, D)$ is the following:
the execution speed of the source (resp. sink) $T_0$ is $s_0 = \frac{(\sum_{i=1}^n w_i^3)^{\frac{1}{3}} + w_0}{D}$;
for the other tasks $T_i$, $1 \le i \le n$, we have $s_i = s_0 \times \frac{w_i}{(\sum_{i=1}^n w_i^3)^{\frac{1}{3}}} \quad \text{if } s_0 \le s_{max}$.
Otherwise, $T_0$ should be executed at speed $s_0 = s_{max}$, and the other speeds are $s_i = \frac{w_i}{D}$, with $D' = D - \frac{w_0}{s_{max}}$, if they do not exceed $s_{max}$ (Proposition 1 for independent tasks). Otherwise there is no solution.
If no speed exceeds $s_{max}$, the corresponding energy consumption is
Proof. Let $t_0 = \frac{w_0}{s_0}$. Then, the source or the sink requires a time $t_0$ for execution. For $1 \le i \le n$, task $T_i$ must be executed within a time $D - t_0$ so that the deadline is respected. Given $t_0$, we can compute the speed $s_i$ for task $T_i$ using Theorem 1, since the tasks are independent: $s_i = \frac{w_i}{D-t_0} = w_i \cdot \frac{s_0}{s_0 D - w_0}$. The objective is therefore to minimize $\sum_{i=0}^n w_i s_i^2$, which is a function of $s_0$:
Let $W_3 = \sum_{i=1}^{n} w_i^3$. In order to find the value of $s_0$ that minimizes this function, we study the function $f(x)$, for $x > 0$. $f'(x) = 2x(w_0 + \frac{W_3}{(xD-w_0)^2}) - 2D \cdot x^2 \cdot \frac{W_3}{(xD-w_0)^3}$, and therefore $f'(x) = 0$ for $x = (W_3^{1/3} + w_0)/D$. We conclude that the optimal speed for task $T_0$ is $s_0 = (\sum_{i=1}^{n} w_i^3)^{1/3} + w_0/D$, if $s_0 \le s_{max}$. Otherwise, $T_0$ should be executed at the maximum speed $s_0 = s_{max}$, since it is the bottleneck task. In any case, for $1 \le i \le n$, the optimal speed for task $T_i$ is $s_i = w_i s_0/(s_0 D - w_0)$.