5 people are sitting around a table. Let x be the number of people sitting next to at least one woman and y be the number of people sitting next to at least one man. How many possible values of the ordered pair (x,y) are there? (For example, (5,0) is the pair if all 5 people are women, since all 5 people are sitting next to a woman, and 0 people are sitting next to a man.)
I was going to list them all out because I didn't know what formula to use. But obviously the formula is much quicker if anyone can help derive it.
Take $n$ women and $5-n$ men with ($0\leq n \leq 5$)
By symmery the set of $\{(x,y)\}_n$ for $n$ women is the same as the $\{(y,x)\}_{5-n}$ for $5-n$ women, so we need only focus on $0\leq n\leq 2$
Obviously $\{(x,y)\}_0 = \{(0,5)\}$ and just as clearly $\{(x,y)\}_1 = \{(2,5)\}$ .
For $n=2$ either the two women are seated adjacent, or apart: $\therefore \{(x,y)\}_2 =\{(4,5),(3,4)\}$
Put it all together we have: $\{(0,5),(2,5),(3,4),(4,3),(4,5),(5,0),(5,2),(5,4)\}$