Leibniz was famously satirized by Voltaire, in his play Candide, as saying that ours is the best of all possible worlds. While that played well on the stage, what Leibniz actually wrote, in 1714, in his Monodology, was a good deal more interesting. He did argue that God chose the one real world from an infinitude of possible worlds, by requiring it to have “as much perfection as possible.” But what is often missed is how he characterized degrees of perfection. Leibniz defined a world with “as much perfection as possible” to be one having “as much variety as possible, but with the greatest order possible.”

I believe that Leibniz’s insight of a world that optimizes variety, subject to “the greatest order possible”, is a powerful concept that could be helpful for current work in biology, computer science, neuroscience, physics and numerous other domains including social and political theory and urban planning.

To explain why, I have to define variety. I believe we ought to see variety as a measure of complexity which applies to systems of relationships. These are systems of individual units, which each have a unique set of interactions or relationships with the other units in the system. Leibniz saw the universe as just such a system of relationships. In a Leibnizian world, an object’s properties are not intrinsic to it-rather they reflect the relationships or interactions that object has with other objects.

Systems of relationships are often visualized as graphs or networks. Each element is represented by a node and two nodes are related when they are connected by a line. We know of a great many systems, natural and artificial, that can be represented by such a network. These include ecosystems, economies, the internet, social networks etc.

What does it mean for such a relational world to have a high variety. I would argue that variety is a measure of how unique is each element’s role in the network. In a Liebnizian world, each element has a view of the rest which summarizes how it is related to the other elements. An element’s view tells us what the whole system looks like from its point of view. Variety is a measure of how distinct these different views are.

Leibniz expressed this almost poetically.

"This interconnection (or accommodation) of all created things to each other, brings it about that each simple substance has relations that express all the others, and consequently, that each simple substance is a perpetual, living mirror of the universe.”

He then reaches for a striking metaphor, of a city.

“Just as the same city viewed from different directions, appears entirely different and, as it were, multiplied perspectively, in just the same way it happens that, because of the infinite multitude of simple substances, there are, as it were, just as many different universes, which are, nevertheless, only perspectives on a single one,”

One can almost hear Jane Jacobs in this, when she praises a good city as one with many eyes on the street.

A system of relations can, I believe, be said to have its maximal variety when the different views are maximally distinct from each other.

A city has low variety if the views from many of the houses are similar. A city has high variety if it is easy to tell, just by looking out the window, which street you are on.

An ecosystem is a system of relations, such as who eats who. A niche is a situation characterized by what you eat and who eats you. An economy is a system of relations including who buys what from who. The variety of an ecosystem is a measure of the extent which each species has a unique niche. The variety of an economy measures the uniqueness of each firm’s role in the market.

It is commonly asserted that ecosystems and economies evolve to higher degrees of complexity. But to develop these ideas we need a precise notion of complexity. Negative entropy does not suffice to measure complexity because the network of chemical reactions in our bodies and a regular lattice both have low entropy. We want a measure of complexity that recognizes that chemical reaction networks are far more complex than either random graphs or regular lattices.

I would suggest that variety is a very helpful notion of complexity, because it distinguishes the truly complex from the regular. In a high variety network it is easy to know where you are from looking around at your neighbourhood. In other words, the less information you need about the neighbourhoods to distinguish each node from the rest, the higher the variety. This captures a notion of complexity distinct from and, perhaps, more useful than, negative entropy.

Having defined variety, we can go back and try to imagine what Leibniz meant by maximizing variety but “with the greatest order possible.” Order can mean subject to law. Can there then be a law of maximal variety?

Such a law might be emergent in a complex system such as an economy or ecology. This might arise as follows: when the variety is maximal, the network is most efficient because there is a maximum amount of cooperation and a minimum of redundancy. Entities compete not to dominate a single niche, but to invent new ways to cooperate by inventing new niches, which have a novel interrelation to the rest.