In the famous TV series *Game of Thrones, *the different noble houses in the continent called Poniente fight to rule the seven kingdoms that make up the territory. To do this, they establish relationships of alliance and enmity with the other houses. If three houses form a triple alliance, they constitute a stable system, since there are no tensions between its components. However, what happens with the stability of systems in which two allied houses do not coincide in the consideration of a third, for one is friend and for another enemy?

To study this type of system, Frank Harary formalized the mathematical concept of balance in 1954, based on social balance theory of the psychologist Fritz Heider. Harary proposed to describe the relationships in a network whose nodes (points) represent the entities of the system, and the edges (junctions between points), which carry positive or negative signs, represent the relationships between those entities. Alliance relationships are identified with a positive sign (+) and those of enmity with a negative sign (-). In this context a cycle (that is, a succession of relations that begin and end in the same element) is *balanced* if the product of its signs is positive. And if all the cycles of a network are balanced, then the network is.

The fundamental result of his work was the structural balance theorem, which offers a way to identify balanced networks without having to check all their cycles one by one. According to this theorem, a network with signs is balanced as long as it is possible to split its set of vertices into two parts, in such a way that each positive edge connects vertices of the same subset and the negative edges connect vertices between the two subsets.

For example, consider the alliances and conflicts between the major European powers in the late 19th and early 20th centuries, depicted in the image below. Alliance relationships are represented in blue and enmity relationships in red. Applying the previous theorem it can be determined that only with the Anglo-Russian alliance of 1907 in which Great Britain, Russia and France formed a triple-alliance and Germany, the Austro-Hungarian empire and Italy formed another, both facing each other, was achieved that this system was balanced. This balance remained in 1914 when the First World War broke out (Figure 1).

Beyond deciding whether or not a network is balanced, it is also possible to quantify its degree of balance, as Harary himself studied. Various measures have been proposed, but most require computational approximations or do not take into account all the cycles of the network. In 2014, the author of this article and mathematician Michele Benzi proposed a quantitative characterization the degree of balance of a network. This measure is based on the calculation of the *spectrum* of the network.

To do this, the network is represented in the form of a table whose entries can be +1, if the corresponding pairs of nodes have a positive relationship; -1, if they have negative and zero, if they have no relation. Using methods of linear algebra, this table is decomposed into what is called its spectrum of eigenvalues. Applying a mathematical theorem, we know that if we start from an initial balanced network, its spectrum is identical to that of the network obtained by transforming the network, changing each negative value for a positive one. The balance index quantifies precisely how far the spectrum is from a network to that of the network in which all relationships are positive. Therefore, its value is one if the network is balanced and it will approach zero as the network becomes less and less balanced.

This characterization has revealed that many real-world networks are very far from balance, contrary to Fritz Heider’s hypothesis, which proposed that social systems tend to balance. For example, the network of alliances and conflicts between the tribes that inhabit the Gahuku-Gama region of Papua New Guinea has a degree of balance of approximately 1/3. Other networks, such as the one formed by the votes to elect Wikipedia administrators, in which the connections are positive if both voters vote for the same candidate, and negative if they vote against, have a balance of 0.00001.

These ideas were also applied to analyze the networks of alliances and conflicts between the different nations of the world between the years 1938 and 2008, with which data were provided by the researcher Zeev Maoz. The results indicate (see Fig. 2) that the world is not heading for a steady state. Furthermore, it is observed that periods of high degree of balance were almost always followed by large-scale armed conflicts. It is as if the balance of force gave the parties the confidence to exalt themselves in the fight against the others. And therefore, perhaps we should avoid them. Perhaps the low degree of balance that existed in 1962 forced the parties to find a solution to the Cuban missile crisis.

**Ernesto estrada ***is a research professor at the*** Superior Council of Scientific Investigations ***at*** Institute of Interdisciplinary Physics and Complex Systems, ***on the*** University of the Balearic Islands in Palma de Mallorca.**

**Editing and coordination***: Ágata A. Timón G Longoria (ICMAT).*

**Coffee and theorems**** ***is a section dedicated to mathematics and the environment in which it is created, coordinated by the Institute of Mathematical Sciences (ICMAT), in which researchers and members of the center describe the latest advances in this discipline, share meeting points between the mathematics and other social and cultural expressions and remember those who marked its development and knew how to transform coffee into theorems. The name evokes the definition of the Hungarian mathematician Alfred Rényi: “A mathematician is a machine that transforms coffee into theorems.”*

*You can follow MATTER in** Facebook**,** Twitter** and** Instagram**, or sign up here to receive **our weekly newsletter**.*