At a certain orphanage, every pair of orphans are either friends or enemies of each other. For every three of an orphan's friends, an even number of pairs of them are enemies. Prove that it's possible to assign each orphan two parents such that every pair of friends shares exactly one parent, but no pair of enemies does, and no three parents are in a love triangle (where each pair of them has a child).
Solution
Solution: Form a graph with the orphans as vertices and with an edge between two orphans if they are friends. Let be the maximal cliques of ; that is, every pair of orphans in is friends, and every orphan outside is an enemy of some orphan in . We now have a sequence of lemmas.
Lemma 1. Any two maximal cliques intersect in at most one orphan.
Proof. Suppose for the sake of contradiction that and had intersection of size at least 2. We may choose orphans and such that is not friends with ; in particular, this means that and . Then, taking two orphans , notice that is friends with , , and and that and are pairs of friends, but is not, contradicting the given. This proves the lemma. □
Lemma 2. Every orphan is in either 1 or 2 of the .
Proof. No orphan is in none of the , as any orphan forms a clique of size 1, which may be grown into a maximal clique. Suppose for the sake of contradiction that some orphan were in at least 3 maximal cliques. Without loss of generality, let these cliques include , and , and choose friends , and of .
For , notice that , as intersects in at most one orphan, which is . Thus, , and are distinct. If, say, and are friends, then forms a clique, hence is contained in some maximal clique ; then intersects both and in at least two orphans, implying by Lemma 1 that , a contradiction. Thus, there are no friendships between , and , which contradicts the given because is friends with each of them. □
Form a graph with vertices the maximal cliques of and with an edge between two vertices if the corresponding cliques intersect. From , form the graph by attaching a leaf to the maximal clique for each orphan for which is the unique maximal clique containing . Assign a parent to each vertex of and assign orphans to parents in the following way.
* If an orphan lies in only one maximal clique , assign it to and .
* If an orphan lies in two maximal cliques and , assign it to and .
This construction covers all cases by Lemma 2 and assigns each pair of parents at most one orphan by Lemma 1. By construction, if an orphan is assigned to two parents, there is an edge between those parents in . Further, two orphans share a parent if and only if they share a maximal clique, meaning that they are friends. Finally, if contained a love triangle, then we would have three maximal cliques and with non-empty pairwise intersections at . Then is a clique, hence lies in a maximal clique which intersects each of and with cardinality at least 2. By Lemma 1, this implies that , a contradiction. Thus, has no love triangles, completing the proof.