Minimization, metric graphs, rearrangement, nonlinear Schroedinger equation