Home > Net >  The shortest path
The shortest path

Time:02-07

1: suppose you have 10000 random location (X1, Y1), coordinates (X2, Y2), (X3, Y3)... (Xn, Yn); Beginning from the starting point moves to each of these points, and then back to the starting point
2: assuming that the distance of each move for d1, d2... Dn, how to move to obtain the shortest distance? D=d1 + d2 +... + dn;

CodePudding user response:

I hate algorithm, the top of the head bald

CodePudding user response:

This is a hair asked a question no hair

CodePudding user response:

Can use the Microsoft Foundation Solver to solve this kind of simple integer linear programming problem, linear programming method can choose the optimal gradient descent to speed up the speed of "slope", I hope can solve the problem of "10000 addresses this size,

CodePudding user response:

If the relatively small size, can consider to traverse the violence, if does not require the optimal solution, can consider to some path search algorithm, but if the required optimal solution, so can only use mathematics method and neural network based on planning,
  •  Tags:  
  • C#
  • Related