Let us be given a function $f(x_1,\dots,x_{10})$ of multiple variables $x_1,\dots,x_{10}$ given that $\sum_{i=1}^{10} x_i \leq 7$. How do we solve the following problem?
$$ \begin{equation} \begin{aligned} \max_{\{x_i\}, i=1,\dots,10} \quad & f(x_1,\dots,x_{10})\\ \textrm{s.t.} \quad & \sum_{i=1}^{10} x_i \leq 7\\ & x_i \in X_i, X_i = [0,10] \\ \end{aligned} \end{equation} $$
I with my professor are trying to work on building a neural network in such a way that we have multiple output from each layer. For example there are $n$ neurons in the $i^{th}$ layer, there will be, let us say $k$ outputs of each size $n$. Similarly, the next layer will also have same number of output and we will look at all the possible ways to connect $k$ outputs of the $i^{th}$ layer and $k$ outputs of the $(i+1)^{st}$ layer. And we take the max of the output in each layer while updating the loss function. My professor told me that this boils down to finally become a DP problem.