At an IMOTC party, all people have pairwise distinct ages. Some pairs of people are friends and friendship is mutual. Call a person junior if they are younger than all their friends, and senior if they are older than all their friends. A person with no friends is both junior and senior. A sequence of pairwise distinct people is called photogenic if:
* is junior,
* is senior, and
* and are friends, and is older than for all .
Let be a positive integer such that for every photogenic sequence , is not divisible by . Prove that the people at the party can be partitioned into groups so that no two people in the same group are friends.
Solutions — 2
Solution 1
Consider obvious graph theory interpretation, with vertices being labelled by the ages. Whenever we say an increasing path, we refer to the labels being monotonically increasing. For any vertex , let be the set of all such that there exists an increasing path with being small. Thus each is a subset of . Further, can't be empty, because by going backwards, there is at least one increasing path starting from a small vertex that ends at . Moreover, , because there is an increasing path starting from ending at a big vertex (just by picking a larger neighbour every time), and by picking a suitable path from a small vertex to (whose length is the required residue modulo ), we get a good path passing through whose number of vertices is divisible by .
We properly color the vertices in colors , just based on . Indeed, since is a non-empty proper subset of , there exists a such that . Choose any such and color with .
We claim that this is a proper coloring. Indeed, suppose two neighbours have been assigned the same color . WLOG the label of is smaller than the label of . Then, adding edge to any increasing path ending at , we get an increasing path ending at , so . But being colored implies , while being colored implies , which implies , contradiction! Hence the coloring is proper, as required.
Solution 2
It is easy to see that every edge is part of a photogenic sequence. We color the vertices in colors (indices modulo ), based on the following algorithm:
Step 1: Color all juniors .
Step 2: Pick the youngest uncolored vertex , and pick a color such that no friend of younger than has color , while some friend of younger than has color .
We can prove inductively that if has color , then there is a path of (vertex-)length . Thus the only way Step 2 fails is if has neighbors younger than them of every color. But in that case there is an increasing path starting from a junior to with length for every , which is impossible as seen in Solution A.