2. At a party, there are $n$ guests. For each pair of guests, they are either friends or not friends. Each guest is friends with exactly four other guests. If a guest is not friends with two other guests, it is always the case that those two guests are also not friends with each other.

What are the possible values of $n$?
2. First, we look at the friends of one of the guests, say Marieke. We know that Marieke has exactly four friends at the party, say Aad, Bob, Carla, and Demi. Marieke is not friends with the other guests (if there are any), and these other guests cannot have friendships among themselves, so they can only be friends with Aad, Bob, Carla, and Demi. Since everyone has exactly four friends at the party, each of them must be friends with Aad, Bob, Carla, and Demi (and no one else).

Since Aad also has exactly four friends (including Marieke), the group of people who are not friends with Marieke can contain at most three people. If this group consists of zero, one, or three people, then we have the following solution (where a line between two people means they are friends):
![](https://cdn.mathpix.com/cropped/2024_04_17_b3df29de425f4a16c366g-1.jpg?height=344&width=1256&top_left_y=2266&top_left_x=410)

Solutions with five, six, and eight guests in total.

$\mathrm{Now}$ we will prove that it is not possible for this group to consist of two people. In this case, Aad would have exactly one friend among Bob, Carla, and Demi; say that Aad and Bob are friends. Similarly, Carla must be friends with one of Aad, Bob, and Demi. Since Aad and Bob already have four friends, Carla and Demi must be friends with each other. However, since neither of them is friends with Aad, this contradicts the requirement in the problem.

Therefore, there are five, six, or eight guests at the party. The possible values for $n$ are thus 5, 6, and 8.