Splitting a parliament into two houses
Statement
In a parliament, each member has at most enemies, and enmity is mutual. Prove that the members can be split into two houses so that every member has at most enemy in his own house.
Hint
Start with an arbitrary split. If somebody has at least enemies in his own house, move him to the other house. Consider the number of pairs of enemies who sit in the same house.
Show solutionHide solution
Solution
Idea. Use a monovariant: a nonnegative integer that strictly decreases at each step.
Process. Start with any split of the members into two houses. Let be the number of pairs of enemies belonging to the same house. If every member has at most one enemy in his own house, we are done. Otherwise, take a member with at least enemies in his own house.
Effect of the move. Since has at most enemies in total, he has at most enemy in the other house. Move to the other house.
- The pairs with an enemy in his former house are no longer in the same house: at least pairs are removed from the count.
- The pairs with an enemy in the other house now count: at most new pair.
- All other pairs are unaffected.
Hence decreases by at least .
Termination. is a nonnegative integer, so the process cannot continue forever. When it stops, nobody has or more enemies in his own house.
Lesson. Monovariant: to prove a configuration with some property exists, start anywhere and improve a nonnegative integer quantity until it cannot be improved.