I'm looking for an algorithm that solve Party problem. The party problem asks to find the minimum number of guests that must be invited so that at least 3 will know each other or at least 3 will not know each other. I know that the answer is 6 but i have to write a program that will check if 4 is enough, 5 people are enough, 6 ... 7 ... etc.
Edit: I want this unsophisticated algorithm, but i dont know how to enumerate all possible assignments and check whether they know each other.