This is a homework problem for a class that ended 2 years ago, I'm learning it by myself.
Consider a directed graph $D=(V,A)$, $s,t\in V$. $A=\{a_1,\ldots,a_n\}$. Let $P=\{p_1,\ldots,p_m\}$ be the set of all simple paths from $s$ to $t$, There is a capacity function $c:A\to \mathbb{R}^+$. First we are asked to express max s-t flow as a linear program letting each path $p_j$ in $P$ associated with the variable $x_j$, there could be a exponential number of variables.
The formulation, $$ \begin{align} \text{Maximize:} & \sum_{j}x_j\\ \text{subject to:} & \sum_{a_i \in p_j}{x_j} \leq c(a_i) &\text{ for } 1 \le i \le n, \\ & x_j\geq 0 &\text{ for } 1 \leq j \leq m\\ \end{align} $$
The dual is therefore: $$ \begin{align} \text{Minimize:} & \sum_{i} c(a_i) y_i\\ \text{subject to:} & \sum_{a_i\in p_j} y_i \geq 1 &\text{ for } 1 \le j \le m, \\ & y_i\geq 0 &\text{ for } 1 \leq i \leq n\\ \end{align} $$
Assuming we have an optimal solution for the dual, the problem ask us to use complementary slackness to show there exist a formulation of the primal with only a polynomial number of paths, which also obtain an optimal solution. How is this done?