From: Skullheadx <94652084+Skullheadx@users.noreply.github.com> Date: Tue, 27 Dec 2022 05:02:21 +0000 (-0500) Subject: Update README.md X-Git-Url: http://git.skullheadx.com/links.html?a=commitdiff_plain;h=08d0ba70fa231c4a7fefd1cf4f731cb4e840ac85;p=The-Traveling-Salesman-Problem.git Update README.md --- diff --git a/README.md b/README.md index 61b3c6b..b116199 100644 --- 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`.