In this article the relevance of computer science to economic planning is presented. An algorithm for constructing a balanced economic plan is presented and found to be of time order N log (N) in the complexity of the economy. The time taken to perform a complete plan optimization in natural units for a part of economy is estimated. The experimental results confirm the Initial complexity analysis of the algorithm. Our conclusions are that. automated resource allocation by computer constitutes a third economic alternative to market allocation or bureaucratic allocation.