If every group of 3 students has two friends and every group of 4 has two non-friends, what is the largest possible number of students? In a classroom, the teacher noticed that every time he formed a group of three students, always had two who were friends. And every time he formed a group of 4 students, always had two were not friends. Which is the largest number of students who have the classroom?
 A: The largest number of students is $8$. 
Assume that in the room are at least $9$ students. Then we keep some $9$ of students in the classroom and free away the rest of them. The remaining $9$ students still satisfy the question condition. If each student has exactly $5$ friends in the room then the total number of the pairs of friends is $5\cdot 9/2$ unnatural, so there exists a student $s$ which has $d\ne 5$ friends. 
If $d\ge 6$ then by well-known problem among $6$ friends of $s$ there is a triple of mutual friends or  a triple of mutual non-friends. The last case is impossible by the condition, the first case is impossible too because then this triple with added $s$ constitutes a quadruple of mutual friends. 
If $d\le 4$ then $s$ has at least $4$ non-friends and among them each two are friends, which is impossible.
The following picture shows that there can be $8$ students in the classroom satisfying the question condition (here students are so humble that they look like small points but their friendship relations are so strong that are even visible as segments).  This is a graph of the cube where we draw an additional diagonal on each face of the cube. 

Congratulation, we have just showed that Ramsey number $R(3,4)$ is $9$.
