]> Skullheadx's Git Forge - The-Traveling-Salesman-Problem.git/commitdiff
Update README.md
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Tue, 27 Dec 2022 05:02:21 +0000 (00:02 -0500)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Tue, 27 Dec 2022 05:02:21 +0000 (00:02 -0500)
README.md

index 61b3c6bb8364a2ee823dec3b503f5c1b169b332a..b1161992549eec5daa252fd1121c729d36176432 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,4 +16,4 @@ Assuming that:
 --------------------------------------------------------------------------------------------------------------
 **Method 1: Brute Force**
 
-By checking every single possibility and calculating the distance of each route, the shortest path can be determined. However, this strategy does not work for a large number of towns because as **n**, the number of towns, increases, on the first turn, (starting at any town) there are n-1 towns to choose from, then on the second turn there are n-2 choices and so on until there is only one option left which is to return to the starting town. This means that there are `(n - 1)! / 2` total possibilities accounting for duplicates.
+By checking every single possibility and calculating the distance of each route, the shortest path can be determined. As **n**, the number of towns, increases, on the first turn, (starting at any town) there are n-1 towns to choose from, then on the second turn there are n-2 choices and so on until there is only one option left which is to return to the starting town. This means that there are `(n - 1)! / 2` total possibilities accounting for duplicates. This strategy while easy to implement, is not suited to calculating more than 20 nodes as the number possibilities that would be considered at _n=20_ is `(20-1)!/2 = 60,822,550,204,416,000`.