7.5 Discussion
7.5.2 Problem identification
7.5.2.2 Computational Complexity
A further potential problem that can be identified with the simulation is the computational complexity of the planning algorithm. Should the run time of the algorithm scale exponen-tially with the number of products or production methods, then even an advanced computer might be unable to determine a production plan for a modern economy in an acceptable time period.Nove(1983, 103), citing a Soviet source (Antonov 1965, 23), contends that calculat-ing an accurate and detailed production plan could take millions of years. Uscalculat-ing an experi-mental method, I have determined that calculating a production plan in the manner described in my simulation can in fact be done in polynomial time and that the complexity is thus in principle tractable. Further reducing the run time is nonetheless desirable. I will briefly ex-plain my methodology, show the results and discuss possibilities for further improving the run time of the algorithm. In Section 7.6, I will also discuss the relevance of computational complexity to the socialist calculation debate.
Klee & Minty(n.d.) show that the simplex algorithm, on which the used linear programming solver is based (”lp_solve” n.d.), runs in exponential time in some worst case scenarios. How-ever, this is rarely the case in real world applications, where the algorithm usually runs in
polynomial time and is thus generally tractable (Borgwardt 1987). One factor that may serve to reduce the complexity of the kind of economic planning problems considered here is that many elements of an input-output table will be null. That is because it is not the case that every product requires every other product to make. While the total number of elements in an input-output table is given by n2, where n is the number of items or industries considered, Reifferscheidt & Cockshott (2014) demonstrated that the non-null elements tend to follow n∗ log(n).
In order to experimentally determine the computational complexity of the considered plan-ning problems, I generated random test economies of various levels of complexity. These were then translated into a linear programming problem, using the same method that is used in the simulation. Time measurements were taken just before and after the problem is then solved using lp_solve.
For a given number of products, a random input table and a random output table specifying three distinct production methods for each product were generated. Each production method only produces that one output, which is specified by an according non-null entry in the output table. The general form of these tables is the same as in the simulation described above. This means that the upper section of the input table specifies the required input of produced items, while the lower section specifies the inputs of produced resources. The number of non-produced resources is set to be one tenth of the number of products. In accordance with the findings byReifferscheidt & Cockshott(2014), the total number of non-null elements in the produced part of the input table is given by 21∗n∗log(n), where n is the number of products.
The non-null elements for non-produced inputs is one tenth of that. The non-null elements were evenly divided among the various production methods. Each non-null element in the input table is given by a random integer between 1 and 10.
For the output table, the identity of the non-null elements is sufficiently determined by the fact that for each product there are three production methods which only produce that one product. The value of these elements, i.e. how much this method produces at an intensity of one, was also given by a random integer. The value range for those integers was between 231∗ log(n) and 462 ∗ log(n). This range was chosen, so that the total output volume of the economy is higher than the input volume. While this does not fully guarantee that the economy can produce a surplus of all products, no infeasible economies were noticed. So in all of the observed economies, it was possible to produce more of all products than was being used up and an optimised production plan thus led to a positive value of the objective function. It should be noted that the size of the surplus that can be produced might be another factor influencing the run time of the linear optimisation. The complexity of the optimisation could thus differ if different ranges for the output values are chosen.
As in the simulation, the objective function is given by the surplus of the first product in the
input table. The resource vector and target vector are randomly generated. Each entry of the resource vector is given a random integer between 210∗ log(n) and 420 ∗ log(n), providing sufficient resources for some production to take place. The target values are random integers between 0 and 10, except for the first entry, for which the value is between 1 and 10, so that the objective function shall not be equal to zero.4
The results are shown in Figure 7.4. On a log-log scale, the data points appear on a straight line, which shows that the relationship is polynomial. The line of best fit has a gradient of 3.3, which suggests that the relationship between n and time t is of order n3.3. This is consistent with similar findings for economic planning with lp_solve byCockshott(2019). It must be stressed that this is for a single optimisation. Since calculating the value of each product requires an additional optimisation, we can expect the algorithm for valuation to be of order n4.3. It must also be noted that the precise order may depend on other factors than n, such as the relative values of inputs and output of production methods and thus the ability of the economy to generate a surplus.
Figure 7.4: Graph showing the run time of a linear optimisation for randomly generated economies with n products. X-axis shows the value of log(n), Y-axis shows the value of log(t), where t is the time measured for the optimisation. The data points closely follow a straight line, which suggests a polynomial relationship between n and t. A linear best fit with a gradient of 3.3 is shown, suggesting the relationship between n and t is of order n3.3.
While these results make it clear that the proposed planning algorithm is not exponential, re-ducing the order of the polynomial is nonetheless desirable. I will point out two ways that this
4See the description of the simulation for why the first entry of the target vector must not be 0.
might be achieved. The first is to use a more efficient optimisation algorithm than lp_solve.
One possibility is the harmony algorithm first proposed byCockshott(1990), which Cock-shott & Cottrell(1993) also consider as part of their labour value model.Cockshott(2019) determined that the harmony algorithm is of order n2and that with the algorithm a computer with 1000 threads could determine an optimal production plan for an economy with 200 mil-lion product types in 22 minutes. This is particularly impressive, as this considers plans which span over five plan periods, rather than the single plan period that I have considered. This allows to plan production in order to optimise output over several months or years, rather than each month or year individually.
Unfortunately, 22 minutes is still a very long time when one considers that one optimisation has to be carried out to calculate the value of every single one of the 200 million product types, or at least for the once that require valuation (such as consumer products). My second proposal is thus to use a different method of valuation than the one originally proposed here.
I think it was useful for the purposes of this investigation to directly consider the cost of a product in terms of changes in plan fulfilment. I consider this to be the most direct measure of the lost opportunity that can be associated with the production of any one product. But in practical terms, this is probably not feasible due to computational limitations.
One alternative way of determining valuations that might be worthwhile considering in the future is to start by determining the opportunity cost of key inputs, rather than outputs. The valuations proposed here consider changes in the value of the objective function when a single unit of a consumer product or some output is made available for free. Input-based valuations would use the same principle to determine the valuation of key inputs, such as labour, energy or emission rights, land or machinery. Valuation would consider marginal changes in the objective function when a single additional unit of the input is made available. The advantage is that for this optimisations would have to be carried out only for these key inputs. The value of other products, in particular consumer products, could then be calculated based on their input requirements and the valuations of these inputs. This would be a much simpler process which is analogous to calculating labour values by solving a set of linear equations. The difference is that instead of a single input, one would consider a variety of inputs which are weighted based on their opportunity cost. This might achieve a similar result to the valuations used in my simulation, since other production requirements than labour, such as harmful emissions, will also be considered.
Overall, it is clear that the algorithm proposed here is far from perfect from a computational standpoint and requires various changes and improvements to be practical in real world ap-plications. It is, however, also clear that solving the kind of economic planning problems considered here is not at all beyond the reach of modern algorithms and computing tech-nology. Computational complexity might be a hurdle for socialist planning, but it is not an insurmountable obstacle.