Theo Diamandis

Do Marxists ultimately invent surge pricing?

The Soviets famously viewed their economy as a giant optimization problem. The idea was simple. They had an objective: maximize a notion of social welfare. They attempted to centrally plan all economic inputs and outputs to maximize this objective. The implementation was… more difficult [1].

Capitalists let the market decide. Market participants, each trying to maximize its own notion of utility (profits, perhaps), negotiate on prices for economic inputs and outputs [2]. The prices act as a decentralized economic coordination mechanism.

Despite stemming from diametrically opposite philosophies, these approaches are, under certain conditions, entirely equivalent. Duality theory from constrained optimization reconciles the two and suggests universal means to “plan” any economic system.

Constrained optimization

Let’s plan an economy [3]. We’ll attempt to maximize some notion of utility for each participant, subject to input-output constraints. Inputs into some economic process (e.g., iron ore into a steel mill) must be output from some other process (e.g., iron ore from the mines). (These constraints resemble mass balance constraints in chemical reactions.)

Duality theory gives two equivalent optimization problems that accomplish this goal. In the first, we are the central planner, responsible for setting all the inputs and outputs in the system to maximize our objective. We choose how much iron is produced, the amount of steel manufactured, and so on. In the second, we don’t control the inputs and outputs at all; we only control the price (or subsidy) for each item. Each process operates independently and attempts to maximize its own utility. If we set prices to equilibrate supply and demand for each item, we will simultaneously solve the original problem [4].

To illustrate this concept, let's return to the mines. The iron mine has a cost of producing a particular quantity of iron, and the steel mill can generate revenue from receiving a particular quantity of iron. We'd represent both of these relationships as utility functions. Option one: we try to dictate the quantity of iron and steel produced to maximize the net welfare–-and we hope we accurately know the utility functions! Option two: we set the iron price such that the steel mill demands the same amount of iron that the mine supplies. (A price plus a utility function gives us a supply or demand curve.) Duality theory tells us that these are equivalent in that they result in the same overall net welfare. We can even outsource the second option to the market.

In other words, setting individual economic outputs and choosing prices to match supply and demand are equivalent. This equivalence provides a powerful tool to control system behavior. I'm a fan of using prices to allocate resources. These ideas hold whether that allocator is a central planning authority, an individual company, or the free market. Implementation details vary.

The difference between communist and capitalist viewpoints then boils down to two factors. First, are the prices set by a central planner or in a decentralized manner? Second, what’s the utility function of each participant [5]? In capitalist markets, participants dynamically choose and optimize their own objective function, and they negotiate prices in a decentralized way–-prices for the same thing may differ between different participants. This dynamism and decentralization is messy. However, it provides a lot of robustness: we don't rely on a central planner to have an accurate realtime view of the economy. Participants quickly integrate new information into the system, although this information may be slower to propagate [6].

Prices as a coordination mechanism

The optimal prices that solve the original optimization problem are called shadow prices. They were introduced by the Soviet mathematician Leonid Kantorovich (he called them “objectively determined valuations” because of, you know, Stalinism and gulags). Shadow prices equal the marginal cost or benefit each item has to the overall system. This price allows easy coordination. A producer indicates how much of some item they are willing to sell at a particular price, and the consumer indicates how much they are willing to buy. Neither the producer nor consumer needs to know anything about the other’s process for creating or using said item.

Thus, prices allow more decisions to be made at the system edges, where information actually lives. Amazon has a price-setting system, called Consensus Planning Protocol (CPP) [7], for supply chain capacity planning. A coordinator dynamically chooses prices, which allows different agents to coordinate their plans while operating semi-independently. From Garrret Van Ryzin’s plenary talk at Economics and Computation 2024:

CPP uses a central coordinator that interfaces with multiple planning systems (called agents) to iteratively “negotiate” over a common set of public variables through the use of agent-specific prices and proximal penalties. Prices in CPP have the interpretation of subsidies (either positive or negative) that an agent receives (or pays) for its public variable choices.

In fact, working with prices can not only permit coordination but also lead to faster optimization algorithms.

Are prices communist?

The Soviets found market signals anathema. Dynamic price setting–which implies scarcity–was too capitalist. Yet prices themselves are apolitical; they just fall out of duality theory. Even the United States Government engages in pseudo-price setting (with American characteristics) by imposing taxes and giving subsidies to influence economic outputs. Political philosophy only dictates if, ultimately, prices are set in a decentralized or centralized manner, and who gets to choose the objective function [8].

Prices help coordinate decisions in complex systems; prices are a communication system. They implicitly indicate information about supply, demand, and resource constraints. They work well for systems in which the price setter controls the means of production or for systems with many participants on both sides. This view allows use mechanisms like centralized congestion pricing or decentralized marketplaces [9] to incentivize optimal outcomes.

Prices are the communications system for markets [10]. The proof is in the math.

Acknowledgements

Thank you to Axel Feldmann, Ryan Cohen, Tarun Chitra, Alex Evans, Max Franzblau, and Mallesh Pai for helpful comments on drafts of this post.

Appendix: Some mathematical specifics

To make this duality precise, we need to wade into the math. We'll collect the inputs and outputs of economic process ii into a vector xix_i. The vector x=(x1,,xn)x = (x_1, \dots, x_n) keeps track of all inputs and outputs in the system. Each process is subject to some constraints, which we represent by a set SiS_i such that xiSix_i \in S_i. The input-output relationships between processes can be represented linearly as Ax=bAx = b. Finally, each agent (one of which might be the central planner) has a utility function of their inputs and outputs, ui(xi)u_i(x_i). The problem of choosing all inputs and outputs to maximize utility is

maximizei=1nui(xi)subject toAx=bxiSii=1,,n. \begin{aligned} &\text{maximize} && \sum_{i=1}^n u_i(x_i)\\ &\text{subject to} && Ax = b \\ &&& x_i \in S_i \qquad i = 1, \dots, n. \\ \end{aligned}

Note that the variable is xx, the inputs and outputs of the economic processes.

The Lagrange dual problem is

minimizebTp+i=1nsupxiSi(ui(xi)piT(Aixi)). \begin{aligned} &\text{minimize} && b^Tp + \sum_{i=1}^n \sup_{x_i \in S_i}\left(u_i(x_i) - p_i^T(A_ix_i) \right). \end{aligned}

Here, the variable is pp, the prices of all inputs and outputs. Each term of the sum finds the utility-maximizing feasible production plan xix_i, where the agent running process ii incurs a cost (or receives a subsidy) for each of their inputs and outputs, collected in the vector pip_i.

Duality theory tells us that, if the sets SiS_i are convex, the functions uiu_i are concave, and a (strictly) feasible production plan xx exists, these two problems have the same optimal value. Furthermore, at optimality, the input-output constraints are satisfied (supply equals demand),

b=Ax, b = Ax^\star,

and the optimal prices pp^\star equal the marginal utilities corresponding to each input and output at the optimal production plan xx^\star,

ui(xi)=AiTpi. \nabla u_i(x_i^\star) = A_i^Tp_i^\star.

If you want to see this in a real-world example, check out this paper, especially section 3. We discuss and interpret the online version of the problem in the follow up work.

Footnotes

[1] Red Plenty should be required reading for any operations research graduate student with grand notions of planned economies.
[2] Well, maybe not if you’re in the DoD. The simulation writers do love a bit of irony.
[3] Just bear with me for the thought experiment. There are lots of other considerations—transaction costs, information asymmetry, nonconvexities, and so on—that are beyond the scope of a blog post.
[4] Duality theory relies on several assumptions for theoretical equivalence. Real-world markets will of course deviate from these assumptions. This is why price setting works better for Uber than for the entire Soviet Union. See also [1].
[5] Utility functions are ultimately shaped by laws (e.g., penalties for externalities) and by philosophy (or appeasing your local commissar).
[6] Analogously, stochastic gradient descent gives weaker convergence results in exchange for robustness to model misspecification.
[7] The small edit distance is not lost on me.
[8] Dictating the objective function is one thing. Getting participants to abide by it is something else. Again, see [1].
[9] Airbnb does allow hosts to use their smart pricing algorithms, which, you know, kinda underscores the point of this post.
[10] In fact, prices are the "most efficient" communication system for resource allocation. All roads lead to prices.