Optimization of the Nested Monte-Carlo Algorithm on the Traveling