There are several approaches to the problem of construction of an orthogonal MRA on Vilenkin groups, but all of them are reduced to the search of the so-called scaling function. In 2005 Yu. Farkov used the so-called "blocked sets" in order to find all possible band-limited scaling functions with compact support for each set of certain parameters and his conditions are necessary and sufficient. S. F. Lukomskii, Iu. S. Kruss and G. S. Berdnikov presented another approach in 2014-2015 which has some advantages over the previous ones and employs the notion from discrete mathematics to achieve the same goals. This approach gives an algorithm for construction of band-limited orthogonal scaling functions with compact support in a concrete fashion using some class of directed graphs, which, in turn, is obtained from the so-called N -valid trees introduced by the same authors in 2012. Up to this point, though, it was not known whether this algorithm is good enough to produce any possible orthogonal scaling function of such a class. This paper describes the aforementioned algorithm and proves that it can be viewed as a necessary and sufficient condition itself, i. e. it produces any possible orthogonal scaling function. Additionally, we get another, more convenient description of the class of directed graphs we are interested in.