
Figure 1: Specification of a Market Algorithm 
1.0 Introduction
This article is heavily based on Bidard (2004).
An approach to the analysis of the choice of technique, in keeping with construction of the outer envelope of wage curves,
is to consider replacing processes, more or less, one at a time.
This post presents this approach as following an algorithm.
Assume that a set of techniques exist where all techniques are at least viable, indecomposable, and produce the same set of commodities. From the set of techniques, one can form a set of processes. In each process, workers produce a single commodity at the end of the year from certain inputs. The inputs, by assumption, are totally consumed in the course of the year. I also assume that the numeraire is specified.
Consider the algorithm specified by the flowchart in Figure 1. For this to be an algorithm, Steps 1 and 3 must be fully specified. One might as well assume that a known pseudo random number generator is used with a specified initial seed. Whether or not a candidate process yields extra profits is found in Step 5 with the prices of production calculated in Step 2. A process yields extra profits if and only if:
p a_{.,j} (1 + r) + w a_{0,j} > p_{j}
where a_{0,j} is the direct labor coefficient,
and a_{.,j} is a column vector for the new process.
I am imagining that a_{.,j} is the j
column of the Leontief inputoutput matrix for a new technique. This new technique is formed by replacing a process in the technique previously selected in Step 2. Since, by assumption, no joint production exists, the process to be replaced is easily found. It is the process in the current technique that produces the same commodity as the candidate process. I have taken the wage as given in this specification of the algorithm. One could just as well take rates of profits as given.
This algorithm converges to a costminimizing technique. Consider the sequence of Steps enumerated as ‘2, 3, 4, (5, 7, 9)*, 5, 6, 2’. This expression
denotes a single path around the loop on the bottom left of Figure 1, including zero or more paths around the loop on the right. As long as the loop on the right is repeated less times than the number of techniques, this path can be repeated. The question arises whether or not this algorithm contains an infinite loop. In a simple case, a process would be introduced into a technique because it is costminimizing for prices corresponding to the first technique, and that first technique would be costminimizing at the prices corresponding to the new technique. It can be shown that the existence of an infinite loop is impossible, under the assumption that no joint production exists. The algorithm always terminates.
(The use of metalinguistic symbols of parentheses and an asterisk to denote a repeated sequence of symbols is a convention in defining regular expressions. A sequence of symbols in a language, where the grammar of that language is specified by a regular expression, is accepted by a finite state machine, a type of automata. This is the lowest level of the Chomsky hierarchy. Chomsky (1965) uses transformational grammars to characterize human languages, which he argues are at the highest level of the hierarchy.)
Furthermore, except at switch points, the costminimizing technique found by the algorithm is unique. Which technique is initially selected at Step 1 or how processes are ordered at Step 3 does not matter, except for performance. The same costminimizing technique is ultimately found. The algorithm terminates with the selection of any one of the techniques that are cost minimizing at a switch point, depending on these details.
The algorithm is specified sequentially in Figure 1. Steps 3, 4, 5, 7, and 9 can be distributed. Inasmuch as this algorithm is executed in a capitalist economy, these steps are, in fact, distributed across firms. One might also modify the algorithm to apply when the set of processes and techniques are not known at that start of algorithm. Innovation and technical progress can be accommodated with an appropriate modification of Step 4 and Step 9. Step 7 should be eliminated, and the algorithm would be defined without a termination step, like daemons in operating systems. When the algorithm is modified for distributed processing, more than one process might be introduced into a technique simultaneously, including in the same industry. For which technique, then, are prices calculated in Step 2? This relates to the question of when labor expended in new processes is ‘socially necessary’, as Marx put it.
References
 Bidard, Christian. 2004. Prices, Reproduction, Scarcity. Cambridge: Cambridge University Press.
 Chomsky, Noam. 1965. Aspects of the Theory of Syntax. Cambridge: M.I.T. Press.