0

Scenario

Given 6 scientists, 3 baristas, 2 cooks and 4 mathematicians, how many ways can they be arranged in a row so no 2 mathematicians are next to each other?

Method 1

Arrange 15 people in a row, subtract the ways in which two mathematicians are grouped together, subtract the ways in which three mathematicians are grouped together, subtract the ways in which four mathematicians are grouped together, subtract the ways in which there are two groups of two mathematicians grouped together. $$ 15!-11!(12C3)(3P3)(4C2)(2P2)-11!(12C2)(2P2)(4C3)(3P3)-11!(12C1)(4P4)-11!(12C2)(2P2)(4C2)(2P2)(2C2)(2P2)=4.11\times10^{11} $$

Logic behind first subtracted term: There are 12 slots between 11 people, choose 3 slots (fill 1 slot with 2 mathematicians), permute the 3 slots, choose 2 mathematicians from the 4 mathematicians, permute the two mathematicians within the 1 slot.

Method 2

$$ (11P11)(12P4)=4.74\times10^{11} $$

Permute the 11 people (other than the mathematicians). Slot 4 mathematicians into the 12 slots between the 11 people, 1 mathematician into each of the 4 slots. Permute the 4 slots.

My Questions

  1. Why is method 1 presently undercounting?
  2. How can method 1 be corrected to give the correct answer calculated in method 2?
Caleb
  • 19
  • 1
    Please read up on how to apply Principle of Inclusion and Exclusion correctly. – Calvin Lin Dec 23 '23 at 23:27
  • I noted the formula and venn diagram given in https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle. What term should I add to method 1? – Caleb Dec 23 '23 at 23:32
  • 1
    Rather than thinking of grouping two, three, or four mathematicians, you should be thinking in terms of pairs of adjacent mathematicians. Pairs may overlap. For instance, three consecutive mathematicians form two overlapping pairs of mathematicians. However, it is also possible to have two disjoint pairs of mathematicians. – N. F. Taussig Dec 23 '23 at 23:39
  • Thanks for the reply! Could you illustrate how this would change my working in method 1? – Caleb Dec 24 '23 at 00:17
  • See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula. Following the syntax of the article, since there are $~4~$ separate mathematicians, there are $~\binom{4}{2} = 6,~$ possible pair violations. Label the mathematicians $~M_1, M_2, M_3, M_4.~$ ...see next comment – user2661923 Dec 24 '23 at 01:26
  • Let $~S~$ denote the set of all possible distributions. Let $~S_1~$ denote the subset of $~S,~$ where $~M_1,M_2~$ are together. Let $~S_2~$ denote the subset of $~S,~$ where $~M_1,M_3~$ are together, and so forth. Then, you want to compute $~|S| - |S_1 \cup S_2 \cup \cdots \cup S_6|.~$ See the referenced answer (i.e. 2nd link in my previous comment) for how to proceed. – user2661923 Dec 24 '23 at 01:29
  • Re previous comments, you have to be extremely careful to diagnose when considerations of symmetry do and do not apply. For example, when computing $~T_2,~$ consider the two sets $~S_1 \cap S_2~$ which has $~M_1,M_2~$ together as well as $~M_1,M_3.~$ Contrast this with $~S_1 \cap S_6~$ which has $~M_1,M_2~$ together, as well as $~M_3,M_4.~$ These two terms, $~S_1 \cap S_2,~$ and $~S_1 \cap S_6~$ will have different enumerations. – user2661923 Dec 24 '23 at 01:33
  • Thank you for the detailed leads and suggestions! In this concrete case what term would I add to method 1? – Caleb Dec 24 '23 at 03:34
  • In the concrete case, I would scrap method 1, in favor of the approach that I suggest. For one thing, it is difficult to decipher your method 1. For another, one thing that I have learned (the hard way, by temporarily posting erroneous MathSE answers, and getting them corrected by others) is that to accurately use Inclusion-Exclusion, you have to formally define your sets $~S_1, \cdots, S_k,~$ very carefully. – user2661923 Dec 24 '23 at 16:35
  • I am curious to see how it appears when formulated using exclusion-inclusion. It can be solved via method 1 (see answer below). – Caleb Dec 25 '23 at 12:12

1 Answers1

1
  1. Method 1 undercounts because the last term overcounts.
  2. How to fix method 1: introduce a 1/2! term to the last term to account for identical permutations of identical combinations, eg: (AB,CD) and (CD,AB) are identical upon permutation.

$$ 15!−11!(12C3)(3P3)(4C2)(2P2)−11!(12C2)(2P2)(4C3)(3P3)−11!(12C1)(4P4)−11!(12C2)(2P2)(4C2)(2P2)(2C2)(2P2)(1/2!)=4.74×10^{11} $$

Caleb
  • 19