I'm a social person with lots of friends![citation needed]
Unfortunately, my friends don't really like each other. In fact, each of my friends only likes one other friend, and dislikes two others. Likes are reciprocal; if Foo likes Bar, Bar likes Foo. This poses a problem in social situations, to say the least. Each friend can be happy as long as the number of people they dislike in the current group doesn't exceed the number of people they like.
I have twenty-two friends with fixed likes and dislikes, and I want to throw a party with them, but I have to be very choosy about who I invite because if I invite everyone, nobody will be happy. I want to figure out how large the largest happy group I can invite is, and which people to invite to reach that size.
How should I go about finding that group(s)?
(I intend to turn the answer into a program and use it to search for the optimal groups.)