codecogs equations

tisdag 3 mars 2020

Political intolerance and dating

In February, the following survey came out. It shows the political party sympathies among Swedish 18-29 year olds, broken down my males and females.

Political polls Sweden February 2020. Females 18-29 (left), and males 18-29 (right)

Key to the parties (links are to the corresponding party groups in the EU parliament)

V: Socialist (GUE/NGL)
S: Social democrat (S&D)
MP: Environmental/ green (Greens-EFA)
C: Decentralist liberals (RE/ALDE)
L: Liberals (RE/ALDE)
M: Liberal conservative (EPP
KD: Christian democrat (EPP)
SD: Conservative reformist (ECR)
Övr: all other parties (not currently in parliament)

When I saw this I thought: "Wow! That is not going to work out. Given some reasonable assumptions about which political parties do not tolerate each other, it won't be possible to match together boys and girls that accept each other's political views". Let's turn this into an optimization model.

Political intolerance model

Between which parties are the values difference so big that it will cause a strain on a romantic relationship? Without motivation, here is the map of tolerance that I use, based on just experience from living in Sweden. 

Binary tolerance model. Green: "fine, I can live with your views". Yellow: at least one partner says "we're going to have a problem here". Note that the model doesn't assume whether the intolerance goes both ways, as long as I can imagine at least one direction of intolerance. Therefore, the matrix is necessarily symmetric. 


Matching model

In order to get an upper bound to how many people can be matched, we assume that we create a new "Authority of Politically Stable Marriages" that matches people in a top-down fashion. This is preposterous of course, but the point is to see if it will be possible to match everyone even under these very favourable circumstances (in terms of number of matches). We turn this into a network flow model.
Network flow model of political matchmaking. Each party has a male and a female node. The nodes to the terminals (red) have a capacity proportional to the poll results of that party. The grey nodes have infinite capacity. Note that the two sides are not fully connected to each other, but only those nodes that tolerate each other according to the matrix above.
Now we only need to solve a network flow problem. There are specialized algorithms for that, but we can also use a Linear Programming model. The flow is restricted to go from female to male. The only constraint is that inflow should equal outflow in all nodes except in the terminals. The optimization objective is the total outflow (which should be equal to the total inflow).

This may not be the most efficient way for large graphs, but this is very explicit, modifiable, and only takes a minute to code.

Results

So, will it be possible to match young men and women romantically without political strife? Answer: almost!

Assignment of couples that maximize the number of matches. The total match rate is almost 98%. The width of the lines in the middle is proportional to the number of couples of that kind. 
Of course, this begs the question: who gets left out? In the table below, the ratio of each group that does not get matched:

V, women:   8.8%
V, men:     0.0%
MP, women:  0.0%
MP, men:    0.0%
S, women:   0.0%
S, men:     0.0%
C, women:   0.0%
C, men:     28.0%
L, women:   0.0%
L, men:     0.0%
M, women:   0.0%
M, men:     0.0%
KD, women:  0.0%
KD, men:    0.0%
SD, women:  0.0%
SD, men:    0.6%
What!? I was certain that the extremes of the political spectrum would have the most trouble, even in this simplified model. Here, the shock seems to be absorbed by the men who vote center liberal. Does that mean that there is a bug? Not necessarily, since we haven't encoded any nuanced preferences: only binary tolerance. The solution can be altered to be less "surprising" to our preconceived ideas without reducing the objective. For example, the M women are now all matched to SD men, and a portion of these could be transferred to the C men, so that these are completely matched. Our model currently does not take into account whether that is on average a preferable transfer or not.

Except for that odd result, the only groups that have unmatched members are indeed women to the far left and men to the far right, as would be expected.

Model uncertainties

We have not looked at the "Other" category. Instead, the opinions of each gender were normalized to sum to 100 percent. Implicitly, this assumes that the males who say "Other party" are distributed along the political spectrum the same way as the other males (and vice versa for females). This assumption is probably quite wrong, since those who answer "Other" are more likely to have extreme opinions, in either direction. Since 4.9% of males and 2.1% of females say "Other", this is a large source of uncertainty in the model. 

Another point of uncertainty is that not all who answered were heterosexuals, but we're using the polls to estimate the feasibility of heterosexual matching. The implicit assumption made is that political opinion does not correlate with sexuality. Once again, probably not true.

Of course, an final important implicit assumption is that the number of women and men is the same! This may be imbalanced by either gender being more likely to emigrate. 

The Big Problem

The big problem with this model is that relationships are not created by a central authority. It is more realistic to model relationships with a bottom-up model, that does not have a global objective, but rather just local equilibrium constraints. That is to say: a person wants to stay in a relationship if there is no better alternative. A relationship is stable if neither partner has a better alternative. So should solve for that equilibrium instead. This will be the topic of the next post. 

Inga kommentarer:

Skicka en kommentar