dshizzle wrote:Finally gave in and looked at the page, good thing too, wasn't anywhere close to the solution. Funny how missing a simple thing can make such a difference in complexity.

The basic way to solve this problem is to use the fundamental principle of counting, then the inclusion exclusion principle.

Obviously, if you seat the women first, imagine that the chairs are alternating red and blue. There are 14! ways to seat the women in blue chairs, and 14! to seat them in red chairs, so that's where the 2*14! comes from.

The summation term is a bit more complicated to reason, but the (-1)^k term there comes from inclusion-exclusion.

Fundamental principle of counting then gets invoked to multiply the summation term by 2*14!.

So it's simple at the outset, but it does become more challenging when you try to reason out the ways to seat the men.