Update TSP.ipynb
This commit is contained in:
@@ -31,10 +31,10 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"| | |\n",
|
"| | |\n",
|
||||||
"|--------|--------|\n",
|
"|--------|--------|\n",
|
||||||
"|*Given a **set of cities***|I'll represent them with a set of points in the (*x*, *y*) plane|\n",
|
"|*Given a set of cities*|I'll represent them with a set of points in the (*x*, *y*) plane|\n",
|
||||||
"|*and the **distance** between each pair of cities*,|I'll define a function `distance(A, B)`|\n",
|
"|*and the distance between each pair of cities*,|I'll define a function `distance(A, B)`|\n",
|
||||||
"|*what is the **shortest***| I'll use `shortest(tours)` to find this, and `tour_length(tour)` to compute the length of each candidate tour.|\n",
|
"|*what is the shortest*| I'll use `shortest(tours)` to find this, and `tour_length(tour)` to compute the length of each candidate tour.|\n",
|
||||||
"|***tour***|A **tour** will be represented by a list. `[A, B, C]` is the tour from `A` to `B` to`C` and back to `A` . |\n",
|
"|*tour*|A **tour** will be represented by a list. `[A, B, C]` is the tour from `A` to `B` to`C` and back to `A` . |\n",
|
||||||
"|*that visits each city exactly once, and returns to the starting city?*|The function `valid_tour(tour)` will check this.|\n",
|
"|*that visits each city exactly once, and returns to the starting city?*|The function `valid_tour(tour)` will check this.|\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Four more basic concepts, implied by the definition:\n",
|
"Four more basic concepts, implied by the definition:\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user