0

I've n pair of couples where w pair doesn't wish to be paired together. How can I get the number of combinations (male & female pair) using a formula?

Example for 3 pair where 2 pair (number 1 and 2 couple) doesn't wish to be paired together and 1 pair either way (number 3 couple). The following has 3 combinations.

M1 - F2, M2 - F1, M3 - F3
M1 - F3, M2 - F1, M3 - F2
M1 - F2, M2 - F3, M3 - F1

Gab
  • 11
  • 3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 25 '23 at 02:12
  • 1
    Looks like an instance of inclusion-exclusion. – Alexander Burstein Feb 25 '23 at 02:54
  • Hi @AlexanderBurstein Care to elaborate a bit more? – Gab Feb 25 '23 at 03:41
  • See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula. – user2661923 Feb 25 '23 at 04:57
  • Re last comment, my first instinct would be to index the couples as $a_1, a_2, \cdots, a_w, b_1, b_2, \cdots, b_{n-w}.$ Then, I would let $S$ denote the set of all possible couplings, where each couple has 1 man and 1 woman. Then, I would let $S_k$ denote the subset of S, where couple $a_k$ are together. Then, you can apply the Inclusion-Exclusion theory in my last comment. – user2661923 Feb 25 '23 at 05:01
  • 1
    Please see this article on MathSE protocol. As onerous as the article may appear to you, it provides a defense mechanism against the MathSE forum being used as a do my homework forum. In particular, please see the Edit-Tools section of the article, and the portion of the article that discusses showing work. It is irrelevant whether the problem is homework. What counts is whether the protocol is observed. – user2661923 Feb 25 '23 at 05:01

1 Answers1

1

Let there be $n$ couples, $k$ of whom do not want to be paired. Then by inclusion/exclusion the number of possible pairings is $$\sum_{i=0}^k(-1)^i\binom ki(n-i)!$$ The terms that are alternately added and subtracted, $(n-i)!$, count the number of pairings where $i$ of the "forbidding" couples are paired anyway. This can happen in $\binom ki$ ways, since the forbidding couples are fixed.

In your instance $n=3$ and $k=2$, and the formula gives $3$ admissible matchings, agreeing with your explicit listing.

Parcly Taxel
  • 103,344