Many of you will recall the above expression as factorial (N ), written as N!. We must
divide this number by 2 because of the tour pairs that mirror each other as we saw
earlier. Therefore, the formula for the distinct number of tours is given by N!/2. Table
5.3
shows how the number of distinct tours grows with N up to 10 cities.
Looking at Table 5.3 you can note that the number of possible tours grows very quickly
as we consider visiting more and more cities. The pattern of growth in the number of
tours in Table 5.3 is called the exponential growth. Such a growth in the number of
possibilities make
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.