Multinational investors often reduce tax on dividends by using indirect investment routes. This paper constructs a tax rate matrix to represent a real-world network of tax treaties between 70 countries and develops network algorithms to study the structure of tax-minimizing (direct or indirect) investment routes in the tax treaty network. The treaty shopping arbitrage rate, defined as the difference between the foreign tax rates of the direct route and a tax-minimizing route, is computed to be about 3.57 percentage points on average. This paper also examines the relationship between FDI and the structure of tax-minimizing routes. Empirical results show that the availability of a tax-minimizing direct route is positively and significantly related to FDI. The inward FDI stock via a tax-minimizing direct route is larger by about 4,260.78 million US dollars (or about 2.48 times larger) than the inward FDI stock via a direct route that is not tax-minimizing. By making a direct route tax-minimizing, countries can encourage FDI via the direct route and reduce treaty shopping.