While trying to model a practical problem, I have formulated the following combinatorial optimization problem:
\begin{equation} \mathcal{V}^* = \arg\min_{\pi(\pmb{v})}d(\pi(\pmb{v})\odot \pmb{w},\pmb{u}) \end{equation}
where $\pmb{0} \leq \pmb{v}, \pmb{u}, \pmb{w} \in \mathbb{R}^d$, and $\pi(\pmb{v})$ is a permutation of the coordinates of $\pmb{v}$, $\odot$ is componentwise multiplication, $d(\cdot, \cdot)$ is some dissimilarity metric, and $\mathcal{V}^*$ is the set of minimizers. As a simplification, I have picked
$$d(\pmb{x},\pmb{y}) = \| \pmb{x}-\pmb{y} \|^2_2$$
Then, in the case where $\pmb{w} = (1,1,\dots,1)$, this has a simple solution. Namely, permuting $\pmb{v}$ so that the $k$-th order statistic of $\pi(\pmb{v})$ corresponds to the $k$-th order statistic of $\pmb{u}$. One can prove that in this case this permutation $\pi(\pmb{v})$ is a minimizer not only for $\|\cdot\|^2_2$ but also for $\|\cdot\|_{\infty}$.
If I drop the simplification $\pmb{w}=(1,1,\dots,1)$, and I let it be arbitrary, are there any known solutions, or methods that can be used to efficiently (possibly numerically) solve the permutation problem:
\begin{equation} \mathcal{V}^* = \arg\min_{\pi(\pmb{v})} \|\pi(\pmb{v})\odot \pmb{w} -\pmb{u} \|^2_2 \end{equation}
Solutions and methods for other metrics than $\|\cdot\|_2$ are also welcome.
I am unsure whether this is useful, but if I were to apply the previous method, to the current formulation, the error is (where $\pi(\pmb{v})$ is the permutation that makes the order statistics match to the ones of $\frac{\pmb{u}}{\pmb{w}}$):
\begin{equation} \operatorname{Err} = \sum_{k=1}^{d}(1-w^2_k)\left(\pi(\pmb{v})_k - \frac{u_k}{w_k}\right)^2 \end{equation}