Wavelength assignment is a widely research object and especially in optical networks. The centralized algorithm has been proposed in this paper and there are two scenarios for the authors' algorithm. The main effect and improvement in the algorithm is to save network capacity by decreasing network capacity after each wavelength assignment. The term network capacity and network capacity decreasing are well investigated and analyzed. There are also mathematical equations for them have been formed and created. By their knowledge, this is the first time the equations are created. The performance of their network is mainly depending on the perfect complete binary, ternary and quaternary.