Menage Number Calculator

Seating

menage number for 5 couples13
ways to seat the men once the women are seated120
share of seatings with no spouses adjacent10.83%
menage number for one more couple80
How this was calculated
  1. The menage problem seats 5 couples around a round table, alternating men and women, with no one next to their own spouse.
  2. Fix the women's seats first; the count then comes from Touchard's inclusion-exclusion sum over k = 0..5, where k counts the men provisionally placed next to their wives.
  3. Evaluating the sum gives 13 valid seatings of the men, out of 120 possible orders.
  4. Brute-force checks for small n agree with the formula: 3 couples give 1 seating, 4 couples give 2, 5 couples give 13.

The menage problem is a classic of combinatorics with a dinner-party statement: n couples are to be seated around a circular table, alternating men and women, with no one sitting next to their own partner. Count the seatings. It is harder than it looks - Lucas posed it in 1891, and the no-partners-adjacent condition tames neither the alternation constraint nor the circle.

This calculator reports the menage number M(n) for your n, with the convention used by the standard sequence: the women's seats are fixed first, so M(n) counts the men's arrangements against them - M(n) = 2 x n! x U(n), where U(n) is the number of 'touching couples' configurations. The anchors: M(3) = 1, M(4) = 2, M(5) = 13, M(6) = 80, and the sequence runs 1, 2, 13, 80, 579, 4738 for n = 3 to 8.

If you have seen a different-looking count elsewhere, it is probably the other convention - seat the women around the table in (n - 1)!/2 ways as well. The page states its convention explicitly and gives the conversion, so the two literatures can be reconciled from the same numbers.

Worked examples

Five couples

(5)

menage number for 5 couples13
ways to seat the men once the women are seated120
share of seatings with no spouses adjacent10.83%
menage number for one more couple80

Six couples

(6)

menage number for 6 couples80
ways to seat the men once the women are seated720
share of seatings with no spouses adjacent11.11%
menage number for one more couple579

Ten couples

(10)

menage number for 10 couples439,792
ways to seat the men once the women are seated3,628,800
share of seatings with no spouses adjacent12.12%
menage number for one more couple4,890,741

The menage problem

Seat n women around a round table, alternating with empty seats for the men, and fix the women's arrangement - by rotation, there is essentially one way the women's relative order sits in the alternating frame. Now place the n men in the n gaps. The arrangement fails if any man lands in either of the two seats flanking his own partner. The menage number counts the placements with no failures.

That sub-problem - permutations with forbidden positions next to one's partner - is the 'probleme des menages' proper, and its answer is packaged in the touching-couples number U(n): the fraction-like quantity in M(n) = 2 x n! x U(n). For n = 4 couples, U(4) = 1/24 and the final count is the integer M(4) = 2 - the fractions are intermediate bookkeeping only, and the seatings themselves are whole.

Small cases calibrate the difficulty. With 3 couples the alternating circle is so tight that exactly one arrangement pattern works (M(3) = 1). With 4 couples there are 2. From there the count explodes: 13, 80, 579, 4738 - the constraint thins the n! placements by a factor that settles towards 1/e^2, as the probability discussion below explains.

  • M(n) = 2 x n! x U(n), with U(n) the touching-couples number
  • M(3) = 1, M(4) = 2, M(5) = 13, M(6) = 80
  • Sequence n = 3..8: 1, 2, 13, 80, 579, 4738
  • Women's frame fixed - see the convention note for the other count

Touchard's formula: inclusion-exclusion over touching couples

The classical evaluation is Touchard's inclusion-exclusion sum. Force k specified couples to touch: the factor (2n/(2n - k)) x C(2n - k, k) counts the ways to choose and place those k touching couples around the circle, and (n - k)! seats the remaining men freely. Alternate the sign over k and sum: M(n) = sum over k of (-1)^k x (2n/(2n - k)) x C(2n - k, k) x (n - k)!. Every term is an integer in aggregate, and the alternating sum lands exactly on the menage number.

The formula can be audited by hand at n = 4, where the five terms are k = 0: 24; k = 1: -48; k = 2: +40; k = 3: -16; k = 4: +2 - summing to 24 - 48 + 40 - 16 + 2 = 2 = M(4). At n = 3 the terms 6 - 12 + 9 - 2 give 1 = M(3). A formula that reproduces both anchors by hand arithmetic can be trusted at n = 8, where it returns 4738 - and that is exactly how this calculator computes, with the tabulated sequence as a standing cross-check.

  • M(n) = sum_k (-1)^k x (2n/(2n - k)) x C(2n - k, k) x (n - k)!
  • Hand audit at n = 4: 24 - 48 + 40 - 16 + 2 = 2
  • Hand audit at n = 3: 6 - 12 + 9 - 2 = 1
  • Ground truth: M(3..8) = 1, 2, 13, 80, 579, 4738

Why 1/e^2 appears

Pick a random placement of the men. For each couple, the chance the man lands next to his partner is about 2/n, and with n couples the expected number of touching couples is about 2. Inclusion-exclusion over nearly independent rare events converges to a Poisson picture: the probability that no couple touches behaves like e^-2 for large n. So the valid fraction of all placements tends to 1/e^2, about 13.5 percent - the same style of limit as the famous 1/e for derangements, with the exponent doubled because each couple has two dangerous seats.

The calculator's U values show the convergence under way: U(8) = 4738 / (2 x 8!) = 0.0587. The limit 1/e^2 = 0.1353 is approached slowly, from below, as the finite-n corrections fade - even at 8 couples the valid fraction is less than half its limiting value, a reminder that Poisson limits in combinatorics can be honest and still take their time.

  • Valid fraction tends to 1/e^2 = 0.1353 for large n
  • Twice the derangement exponent: two dangerous seats per couple
  • U(8) = 0.0587 - approaching the limit from below

Conventions: read the fine print

Two counts circulate under the name 'menage numbers', and confusing them produces apparent factor-of-factorial disagreements. This page fixes the women's alternating frame and counts men's placements with identities: M(n) = 2 x n! x U(n), giving 1, 2, 13, 80, ... The other common convention also seats the women around the table, multiplying by (n - 1)!/2 for their distinct circular orders (up to reflection), giving much larger numbers for the same problem.

Neither is wrong; they answer 'how many seatings' at different levels of quotienting. Fixing the women's frame divides out exactly their (n - 1)! circular orders, so the seat-everyone count is recovered by multiplying back: for n = 4, that is 2 x 6 = 12. When comparing against a reference, check whether its n = 4 value is 2 (this convention) or 12 (everyone seated) - the factor between the conventions at general n is (n - 1)!, and the calculator states its convention in the result panel so the comparison can be made honestly.

A final calibration of the two conventions against the sequence itself: this page's M(5) = 13 counts men's placements against a fixed women's frame. Seat the women as well and the same dinner party has 13 x 24 = 312 seatings up to rotation of the whole table (the women's circular orders number (5 - 1)! = 24). Both numbers describe the identical physical arrangements - the factor between them is purely the quotienting - which is why the calculator insists on printing its convention next to every result.

Same dinner party, two counts: with the women's frame fixed, M(4) = 2. References that also arrange the women report larger numbers for the identical problem - check the convention before comparing.

A hand check at n = 5, and the shape of U(n)

The Touchard sum can be pushed one step further by hand to confirm M(5) = 13. The terms for n = 5 are k = 0: 120; k = 1: -240; k = 2: +210; k = 3: -100; k = 4: +25; k = 5: -2 - and 120 - 240 + 210 - 100 + 25 - 2 = 13. Watching the alternating terms nearly cancel to a small residue is the inclusion-exclusion experience in miniature: the menage number is the small surviving difference of large counts, which is why direct enumeration fails and the formula earns its keep.

The touching fraction U(n) = M(n) / (2 x n!) traces the approach to the 1/e^2 limit: U(5) = 13/240 = 0.0542, U(6) = 80/1440 = 0.0556, U(8) = 0.0587. The climb is slow and monotone in this range - the limit 0.1353 is approached over dozens of couples, not a handful, a typical pace for Poisson limits with a mean of 2.

  • Hand audit at n = 5: 120 - 240 + 210 - 100 + 25 - 2 = 13
  • U(5) = 0.0542, U(6) = 0.0556, U(8) = 0.0587 - climbing slowly towards 0.1353
  • Menage numbers are small residues of large cancelling counts

Lucas, Touchard and the problem's pedigree

Edouard Lucas posed the probleme des menages in 1891 in his Theorie des Nombres, and Jacques Touchard supplied the inclusion-exclusion formula in 1934 that this calculator evaluates. The problem became a standard exhibit in combinatorics texts - it is the cleanest nontrivial example of inclusion-exclusion over a circular arrangement with forbidden adjacencies, harder than the derangement problem it resembles because the forbidden positions depend on the seating frame.

The problem also generalizes gracefully: seating with some couples allowed to touch, rectangular tables, and menage-type rook polynomials all descend from it. The classical numbers on this page - 1, 2, 13, 80, 579, 4738 - are the reference values every generalization must reproduce at its base case.

  • Posed by Lucas (1891); Touchard's formula dates to 1934
  • The standard inclusion-exclusion exhibit for circular arrangements
  • Base-case values 1, 2, 13, 80, 579, 4738 anchor all generalizations

FAQs

What is the menage problem?

Seat n couples around a circular table, alternating men and women, with nobody next to their own partner, and count the seatings. With the women's frame fixed, the counts are M(3) = 1, M(4) = 2, M(5) = 13, M(6) = 80.

What is the menage number for 6 couples?

M(6) = 80 in the fixed-frame convention. The sequence continues 579 for 7 couples and 4738 for 8.

How are menage numbers computed?

By inclusion-exclusion over 'touching couples' configurations: M(n) = 2 x n! x U(n), where U(n) sums the configurations with k specified couples forced to touch, with alternating signs. The results are cross-checked against the classical sequence 1, 2, 13, 80, 579, 4738.

Why do references give different menage numbers?

Two conventions exist. This page fixes the women's alternating frame and counts the men's arrangements (M(4) = 2). References that also arrange the women around the table multiply by their circular orders and report larger numbers for the same problem.

What fraction of seatings is valid for large n?

About 1/e^2 = 0.1353. Each couple has two dangerous seats, so the no-touch probability behaves like a Poisson limit with mean 2 - the menage analogue of the derangement constant 1/e.

Why does the count start at n = 3?

With 1 or 2 couples, alternation around a circle forces partners to be adjacent, so there are no valid seatings to count in the usual sense; the classical sequence is tabulated from n = 3, where M(3) = 1.

Sources

Related calculators

Permutation and Combination Calculator
nPr and nCr with and without repetition — permutations where order matters, combinations where it does not — with all four counts side by side.
Absolute Value Calculator
Absolute values and the distance between two numbers on the number line: |a|, |b| and |a - b|, with the sign-stripping logic spelled out.
Abundancy Index Calculator
Compute the abundancy index sigma(n)/n of a number, classify it as deficient, perfect or abundant, and test whether two numbers are friendly.