How to rotate $2n$-sliced pizza so half the people are happy There are $n$ boys and $n$ girls sitting around a round table in some order.
In the middle of the table there is a pizza sliced to $2n$ parts some parts contain olives and some parts contain mushrooms.
The boys are willing to eat only mushroom parts and girls are willing to eat only olive parts.
Prove that it is possible to rotate the pizza so at least half the people are happy?
I couldn't find a similar question to this.
I think it needs to use the pigeon hole theorem in some way but I cannot find the right way.
 A: Hint: test all rotations and find the average number of happy people. Count the total number of happy people for all the rotations not by summing the number of happy people for each rotation, but the number of rotations that makes each person happy.
A: I'll try to phrase the problem in a way where the pigeonhole principle can be used directly, i.e., by identifying what pigeons and boxes.
Let $a$ be the number of slices with olives and $b$ be the number of slices with mushrooms. Observe that $a+b = 2n$.
Let there be a box for each rotation of the pizza. Thus, we have $2n$ boxes.
Identifying the pigeons is a bit trickier. Instead of letting the children be the pigeon, we'll create multiple pigeons for each children. Label the children and the pizza slices from $1$ through $2n$. We will let our pigeons be the pairs $\{(c,p): \text{child $c$ likes slice $p$}\}$. Now we place the pigeon $(c,p)$ in the box (which is a pizza rotation) that allows child $c$ to eat slice $p$. Observe that each pigeon is assigned to exactly one box.
Counting the pigeons, it isn't too difficult to see that the number of such pairs is $an+bn$. Now, by the pigeonhole principle, there is a box that contains at least
$$\left\lceil \frac{an+bn}{2n}\right\rceil = \left\lceil \frac{(a+b)n}{2n}\right\rceil = \left\lceil \frac{(2n)n}{2n}\right\rceil = n$$
pigeons. In other words, there exists a pizza rotation that allows at least $n$ children (out of a total of $2n$ children) to have a slice of pizza they will enjoy.
A: Suppose that each person's happiness is presented as a number, $1$ for happiness and $-1$ for unhappiness.
Let the number of pizza slices with mushroom is $a$ and the other is $b$.
After all of possible rotations, each boy has the total of happiness is $a-b$, and for each girl, the total of happiness is $b-a$, and the total of happiness of all of the boys and girls are $n\left(a-b\right)+n\left(b-a\right)=0$.
Suppose that it's not possible to rotate the pizza so that at least half the people are happy. That is each rotation there more unhappy people than happy people, and the sum of happiness of all of the boys and girls in each rotation is $h<0$. It's easy to see that the sum of happiness of all of the boys and girls after all of rotations is $<0$. It contradicts with what we have above.
