From 08d0ba70fa231c4a7fefd1cf4f731cb4e840ac85 Mon Sep 17 00:00:00 2001 From: Skullheadx <94652084+Skullheadx@users.noreply.github.com> Date: Tue, 27 Dec 2022 00:02:21 -0500 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`. -- 2.54.0