P - P^T(P \circ P) \right), \\
\dot{\lambda} &= \frac{1}{3} \mbox{tr} \left( P^T \left( P - (P \circ P) \right) \right).
\end{aligned}$$ The above set of equations are obtained by using gradient descent on the Lagrangian cost function.

\[ex:P flow\] In order to illustrate the gradient flow approach, let us consider a simple TSP with 10 cities. Using , we obtain the results shown in Figure \[fig:P flow\]. In this example, the dynamical system converges to the optimal tour.

![Traveling salesman problem with 10 cities solved using the gradient flow . The original positions of the cities are shown in black, the positions transformed by the orthogonal matrix $ P $ in red. a) Initial trivial tour given by $ \sigma = (1, \dots, 10) $. b–d) Intermediate solutions. e) Convergence to an orthogonal matrix which is “close” to a permutation matrix with respect to any matrix norm. f) Extraction of the corresponding permutation matrix. The initial tour was transformed into the optimal tour by the gradient flow.[]{data-label="fig:P flow"}](P1){width="80.00000%"}

![Traveling salesman problem with 10 cities solved using the gradient flow . The original positions of the cities are shown in black, the positions transformed by the orthogonal matrix $ P 