s152.
As for barter, the formula is n(n-1)/2, where n is the number of towns, so the exact number for direct links between 1,000 towns is 499,500 two-way flights. For hub-based links it is simply 2(n-1)/2, or 999 two-way flights. For a more normal distribution—with, say, each town being linked four ways with the nearest four towns, the number of two-way links rises at the rate of 2n, less the smaller number of links maintained by towns near the edge of the system—and those edges may be expected to be irregular, with some towns having only one link.