## Enemies and Friends

### by Tanya Khovanova and Alex Ryba

The following problem appeared at the Gillis Math Olympiad organized by the Weizmann Institute:

A foreign government consists of 12 ministers. Each minister has 5 friends and 6 enemies amongst the ministers. Each committee needs 3 ministers. A committee is considered legitimate if all of its members are friends or all of its members are enemies. How many legitimate committees can be formed?

Surprisingly, this problem implies that the answer doesn’t depend on how exactly enemies and friends are distributed. This meta thought lets us calculate the answer by choosing an example. Imagine that the government is divided into two factions of six people. Within a faction people are friends, but members of two different factions dislike each other. Legitimate committees can only be formed by choosing all three members from the same faction. The answer is 40.

We would like to show that actually the answer to the problem doesn’t depend on the particular configuration of friendships and enmities. For this, we will count illegitimate committees. Every illegitimate committee has exactly two people that have one enemy and one friend in the committee. Let’s count all the committees from the point of view of these “mixed” people. Each person participates in exactly 5*6 committees as a mixed person. Multiply by 12 (the number of people), divide by 2 (each committee is counted twice) and you get the total 180. This gives an answer of 40 for the number of legitimate committees without using a particular example.

What interests us is the fact that the number of illegitimate, as well as legitimate, committees is completely defined by the degree distribution of friends. For any set of people and who are either friends or enemies with each other, the number of illegitimate committees can be calculated from the degree distribution of friends in the same way as we did above.

Any graph can be thought of as representing friendships of people, where edges connect friends. This cute puzzle tells us that the sum of the number of 3-cliques and 3-anti-cliques depends only on the degree distribution of the graph.

As a non mathematical comment, the above rule for legitimate committees is not a bad idea. In such a committee there is no reason for two people to gang up on the third one. Besides, if at some point in time all pairs of friends switch to enemies and vice versa, the committees will still be legitimate.

Share: