Back to news

Folha: 'The mathematics of city council elections'

Reduction of Marcelo Viana's column in Folha de S. Paulo

As I write this column, more than 150 million Brazilians are voting to elect mayors and city council members. The election for city council member is interesting from a mathematical point of view.

Under Brazilian law, this is a proportional election. This means that, in theory, the number of councilors elected by each party is proportional to its respective total vote, that is, the sum of the number of votes for its candidates (to simplify, I will disregard the vote for the party list, which is not relevant to the discussion).

The problem is that the rule of proportionality cannot be applied literally. To explain why, let's consider the following example, adapted from the work of my friend Ali Tahzibi, a professor at USP.

In the (fictional) city of Alguidares de Baixo, the City Council has three seats (in Brazilian cities the number of councilors varies between 9 and 55, depending on the population). Seven candidates from three parties run for election, obtaining the following votes: party A: Ali (25 votes), Ana (12) and Ada (8); party B: Bia (20) and Bel (13); party C: Céu (15) and Cid (7).

The total vote for party A (45 votes) is 45% of the total valid votes (100): therefore, according to the rule of proportionality, this party would fill 45% of the three available seats, that is, it would have 1.35 elected councilors. But this doesn't make sense, of course. So the question is: how to convert the parties' votes into the number of elected officials, in an approximately proportional way, but avoiding fractional numbers?

Read more: OBMEP Portal gains new content
The "Women in Mathematics" award announces the names of the winners.
Nobel Prize in Physics recognizes work in artificial intelligence.

The most commonly used procedure for this is the D'Hondt method, proposed in 1878 by the Belgian lawyer Victor D'Hondt (1841–1901). He wrote extensively on the subject and played an important role in introducing proportional representation in his country. But the same method had already been proposed in 1792 by Thomas Jefferson (1743–1826), who was then Secretary of State and later became the third president of the United States.

To apply the D'Hondt method, we begin by considering the quotients of the total votes for the parties by the integers between 1 and 3 (the number of seats to be filled). In our example, these quotients are A1=45, A2=45/2, A3=45/3, B1=33, B2=33/2, B3=33/3, C1=22, C2=22/2, C3=22/3.

Next, we look for the three largest numbers in this list: A1=45, B1=33, and A2=45/2. Since two of them relate to party A, the two candidates with the most votes from that party (Ali and Ana) are elected; since the other relates to party B, the candidate with the most votes from that party (Bia) is also elected.

Note that party A ends up electing 2/3 = 66.66% of the council members, even though it only received 45% of the votes. In fact, the D'Hondt method tends to favor the most voted parties, reducing political fragmentation, which has the advantage of facilitating the formation of stable majorities in the elected council.

To read the full text, visit the newspaper's website.

Read also: Final results released for industrial mathematics position
IMPA has openings for researchers and postdoctoral fellows.