We examine a model of a perfect competitive homogeneous good market with a network structure. Such a structure is typically important for energy resources: natural gas, oil and electricity. Local markets are connected by transmission lines with limited capacities and given cost functions for capacity increments. We consider the total welfare optimization problem and provide a method that determines optimal investments in the transmission system expansion for some types of the networks. In particular, we study the case where the market is divided into two submarkets with binding transmission line flow constraints between the submarkets. We obtain efficient algorithms for determination of the transmission systems optimal expansion. We conclude with the impact of the results and the outlook to future studies.