6

The question wants to count certain arrangements of the word "ARRANGEMENT":

a) find exactly 2 pairs of consecutive letters?

b) find at least 3 pairs of consecutive letters?

I have the answer given from the tutor but it doesn't make sense to me.

Let's start with the base case:

$S_2 = \frac{(11-2\times2+2)!}{(2!)^{(4-2)}}\binom{4}{2}$:All possible combinations for 2 pairs of consecutive letters are known.

$S_3 = \frac{(11-2\times3+3)!}{(2!)^{(4-3)}}{4\choose3}$:All possible combinations for 3 pairs of consecutive letters are known.

$S_4 = (11-2\times4+4)!\binom{4}{4}=7!$:All possible combinations for 4 pairs of consecutive letters are known.

The equation for exactly m conditions:$E_m = S_m - {m + 1\choose1}S_{m+1} + {m + 2\choose2}S_{m+2}$.

The equation for at least m conditions:$L_m = S_m - {m \choose1}S_{m+1} + {m + 1\choose2}S_{m+2}$.

Answer for (a):$E_2 = S_2 - {3\choose1}S_3 + {4\choose3}S_4$.

Answer for (b):$L_3 = S_3 - {3\choose1}S_4$.

For (a), I don't understand why we need to multiply $\binom{3}{1}$ with $S_3$ and $\binom{4}{3}$ with $S_4$?

If we have ${S_3}$ that satisfies the requirement for ${S_2}$ (as three pairs would include two pairs), then wouldn't ${E_2} = S_2 - S_3$?

For (b), wouldn't the answer just be ${S_3}$ since we it contains the combination for every triple pair?

I don't understand the given formula used for ${E_m}$ and ${L_m}$, mainly the combinatorics part because it looks to me that we already handled that combinations in the calculations of ${S_2}$, ${S_3}$, ${S_4}$.

Could someone please explain the formula and why the answers are as such?

Thanks!

EDIT: I got the question from https://www.youtube.com/watch?v=D1T3xy_vtxU&index=8&list=PLDDGPdw7e6Aj0amDsYInT_8p6xTSTGEi2 - start the video at (4.35) for the question

2 Answers2

3

Terms used in the answer:

  1. $A_k$: The set of elements has (at least) property indexed $k$.
  2. IEP for Inclusion-Exclusion Principle.
  3. Exactly-none IEP: exactly none of the indexed properties got selected via IEP. i.e.

\begin{align} \bigcap_{k=1}^{m}{\overline{A_k}} \end{align}


Long answer to understand the two coefficients:

  1. Let's define $S_m$: It's a shorthand to simplify the formula of IEP. Assume there are $n$ properties in total, and $I$ is an index set, then we can pick any $m\le n$: $$\begin{align} S_m&=\sum\left|\textrm{an intersection of }m\textrm{ sets}\right|\\ &=\sum_{|I|=m}\left|\bigcap_{j\in I}A_j\right| \end{align}$$

  2. $E_0$ gives exactly-none IEP: (Let $S_0=U$): $$ \begin{align}E_0 &=\sum_{j=0}^n(-1)^{j-0}{j\choose 0}S_j\\ &=\sum_{j=0}^{n}(-1)^{j}S_j\\ &=\left|\bigcap_{j=1}^n\bar{A_j}\right|.\\ \end{align} $$

    for each $S_j$, the coefficient is $(-1)^j$:

    $$\begin{align} E_0&=\sum_{j=m}^n(-1)^{j-m}{j\choose m}S_j, m=0\\ &=\sum_{j=0}^n(-1)^{j-0}{j\choose 0}S_j\\ &=\sum_{j=0}^{n}(-1)^{j}S_j. \end{align} $$

    The ${j\choose m}$ disappears in $E_0$. But for $E_m$, we got more than that. So maybe there are more than one exactly-none IEPs in $E_m$?

  3. My attempt to explain $E_m$:

    $$ E_0=\sum_{j=m}^n(-1)^{j-m}{j\choose m}S_j\\ $$

    3.1. Observe the first term, $j=m$. Now $S_m$ gives:

    $$\begin{align} S_m&=\sum_{|I|=m}\left|\bigcap_{j\in I}A_j\right|\\ &=A_{1,2,...,m} + A_{1,2,...,(m-1),(m+1)} + ... + A_{(n-m+1),(n-m+2),...,n}\\ \end{align}\\ $$

    3.2. Now we calculate $E_0$ once for each term $A_{...}$ as the universe. So we have: (The notation $E_{0,U}$ where $U$ means the universe defined for the calculation)

    $$\begin{align} E_{0,A_{1,2,...,m}}&=\sum_{j=m+1}^n(-1)^{j-m}S_j\\ E_{0,A_{1,2,...,(m-1),(m+1)}}&=\sum_{j=m+1}^n(-1)^{j-m}S_j\\ \vdots\\ E_{0,A_{(n-m+1),(n-m+2),...,n}}&=\sum_{j=m+1}^n(-1)^{j-m}S_j\\ \end{align} $$

    you might have many questions at this stage:

    Q1:

    Those $A_{...}$ might overlap some of the others?

    Yes. But if each $E_{0, A_{\dots}}$ work, no overlapping. Because $E_m$ means exactly-m properties when the calculation is complete.

    Q2:

    Each $E_0$, ignoring those $(-1)^{j-m}$, have $1$ for each term. Now you're trying to convince me that applying it many times will create ${j\choose m}$, a variable for each term in the resulting $E_m$? By intuition, if you apply it, say $5$ times, you should have a $5$ for each term?

    Yes. I don't know how to explain this either for now.

  4. Now, the strangest step, I cannot believe it too:

    Let's try to calculate how many $S_j$ are needed when $j$ is given. This is equivalent to finding how many universes include each of them. So here is the term:

    $$ {j\choose m} $$

    given any $j$ properties, you choose $m$ of them, you find one universe, i.e. one left-hand-side on the list of 3.2. that includes it on the right-hand-side. This explains the mysterious ${j\choose m}$ of $E_m$.

  5. On the other hand, The formula of $L_m$(Count the elements included in $\ge m$ sets) is: $$\begin{align} L_m&=\sum_{k=m}^nE_k\\ &=\sum_{k=m}^n\sum_{j=k}^n(-1)^{j-k}\binom{j}{k}S_j\\ &=\sum_{j=m}^n(-1)^j\sum_{k=m}^j(-1)^k\binom{j}{k}S_j\\ &=\sum_{j=m}^n(-1)^j\sum_{k=m}^j(-1)^k\left[(-1)^{k-m}\binom{-1}{k-m}\right]\binom{j}{j-k}S_j\\ &=\sum_{j=m}^n(-1)^{j-m}\binom{j-1}{j-m}S_j\quad\quad\square \end{align}$$

    So $L_m$ does sum up the coefficients of $E_m$.


The rigorous version of the explanation can be found on the linked question: Combinatorics meaning of $L_m=\sum_{j=m}^{n}(-1)^{j-m}\binom{j-1}{m-1}S_j$.

0

In order to analyse the relationship between $E_m, L_m$ and $S_m$ it is convenient to have a closer look at the sets which form the building blocks for these numbers.

In case of problem (a) it boils down to show that according to the formula of $E_m$ \begin{align*} \color{blue}{E_2}&=\sum_{j=2}^4(-1)^{j-2}\binom{j}{2}S_j\\ &\,\,\color{blue}{=S_2-\binom{3}{1}S_3}+\color{blue}{\binom{4}{2}S_4}\tag{1} \end{align*} and we also want to clarify how to derive the binomial coefficients $\binom{3}{1}$ and $\binom{4}{2}$.

The Setting:

  • Given the word ARRANGEMENT, we consider the set \begin{align*} X=\{\mathrm{AAEEGMNNRRT},\ldots,\mathrm{ARRANGEMENT},\ldots,\mathrm{TRRNNMGEEAA}\} \end{align*} consisting of $\frac{11!}{\left(2!\right)^4}=2\,494\,800$ permutations with repetitions of the letters from this word.

  • We introduce a set $U$ of properties \begin{align*} U=\{P_A,P_E,P_N,P_R\} \end{align*} A word in $X$ has property $P_A\in U$ if the letter A occurs consecutively and the meaning of the other properties in $U$ is analogously.

Given a set of $T\subseteq U$ of properties from $U$ we define

  • $E(T)$ as the number of words in $X$ which have exactly the properties $T\subseteq U$, and

  • $L(T)$ as the number of words in $X$ which have at least the properties $T\subseteq U$.

So, for instance $\mathrm{ARRANGEMENT}$ contributes to $E(\{P_R\})$ and $L(\{P_R\})$, whereas $\mathrm{AAEEGMNNRRT}$ contributes to $L(\{P_R\})$ and $U$, but not to $E(\{P_R\})$.

The numbers $E(T)$ and $L(T)$ form building blocks for $E_m$ and $L_m$. Since we have

  • $E_m$ is the number of words which have exactly $m$ properties from $U, (0\leq m\leq 4)$ and

  • $L_m$ is the number of words which have at least $m$ properties from $U, (0\leq m\leq 4)$

we can write these quantities as

\begin{align*} \color{blue}{E_m}&\color{blue}{=\sum_{{T\subseteq U}\atop{|T|=m}}E(T)}\tag{2.1}\\ \color{blue}{L_m}&\color{blue}{=\sum_{{T\subseteq U}\atop{|T|\geq m}}E(T)}\tag{2.2}\\ \end{align*}

Example $m=2$:

In the case $m=2$ we have according to (2.1) \begin{align*} E_2&=\sum_{{T\subseteq U}\atop{|T|=2}}E(T)\\ &=E(\{P_A,P_E\})+E(\{P_A,P_N\})+E(\{P_A,P_R\})\\ &\qquad + E(\{P_E,P_N\})+E(\{P_E,P_R\})+E(\{P_N,P_R\})\\ &=\binom{4}{2}E(\{P_A,P_E\}) \end{align*} where the factor $\binom{4}{2}=6$ can be taken thanks to the symmetry of the words with its respective properties. For $L_2$ we obtain according to (2.2) \begin{align*} L_2&=\sum_{{T\subseteq U}\atop{|T|\geq 2}}E(T) =\sum_{j=2}^{4}\sum_{{T\subseteq U}\atop{|T|=j}}E(T)\\ &=E_2+E_3+E_4\tag{2.3} \end{align*}

The Setting continued:

Now we take a closer look at the quantities $S_m$. They are calculated for $0\leq m\leq 4$ as \begin{align*} S_m=\frac{(11-2\times m+m)!}{(2!)^{4-m}}\binom{4}{m}\tag{2.4} \end{align*} and their meaning is:

  • $S_m$ is the number of words in $X$, so that for each subset $T\subseteq U$ of properties with size $|T|=m$ we take the number of words which have at least $m$ properties from $T\subseteq U$, i.e. \begin{align*} \color{blue}{S_m=\sum_{{T\subseteq U}\atop{|T|=m}}L(T)}\tag{2.5} \end{align*} Indeed, taking for instance $m=2$ in (2.4) we have \begin{align*} S_2=\frac{(11-2\times 2+2)!}{(2!)^{4-2}}\binom{4}{2} \end{align*} where the factor $\binom{4}{2}$ represents each subset $T\subseteq U$ of properties with size $|T|=2$, whereas the factor $(11-2\times 2+2)!$ in the numerator represents the number of permutations of the other letters besides the selected two pairs. Since there are two more letters which occur twice we have to divide by $2^{4-2}=4$ as they can't be distinguished.

$S_m$ is given in (2.5) in terms of $L(T)$. We can find a more convenient representation in terms of $E(T)$ as follows. We have in case $m=2$:

\begin{align*} \color{blue}{S_2}=\color{blue}{\sum_{{T\subseteq U}\atop{|T|=2}}L(T)} &=\sum_{{T\subseteq R\subseteq U}\atop{|T|=2}}E(R)\\ &=\sum_{R\subseteq U}E(R)\sum_{{T\subseteq R}\atop{|T|=2}}1\\ &=\sum_{R\subseteq U}E(R)\binom{|R|}{2}\\ &=\sum_{j=2}^4\sum_{{R\subseteq U}\atop{|R|=j}}E(R)\binom{j}{2}\\ &=\sum_{j=2}^4\binom{j}{2}E_j\\ &\,\,\color{blue}{=E_2+\binom{3}{2}E_3+\binom{4}{2}E_4}\tag{2.6} \end{align*}

A derivation of (2.6) in a more general context is given in this answer.

Answer of (a) and (b):

We find in the same way as in (2.4) to following identities: \begin{align*} S_2&=\sum_{j=2}^4\binom{j}{2}E_j=E_2+\binom{3}{2}E_3+\binom{4}{2}E_4\tag{3.1}\\ S_3&=\sum_{j=3}^4\binom{j}{3}E_j=E_3+\binom{4}{3}E_4\tag{3.2}\\ S_4&=\sum_{j=4}^4\binom{j}{4}E_j=E_4\tag{3.3} \end{align*} These relations enable us to represent $E_2$ in terms of $S_2, S_3$ and $S_4$. We obtain \begin{align*} \color{blue}{E_2}&=S_2-\binom{3}{2}E_3-\binom{4}{2}E_4\tag{$\to (3.1)$}\\ &=S_2-\binom{3}{2}\left(S_3-\binom{4}{3}E_4\right)-\binom{4}{2}E_4\tag{$\to (3.2)$}\\ &=S_2-\binom{3}{2}S_3+\left(\binom{3}{2}\binom{4}{3}-\binom{4}{2}\right)S_4\tag{$\to (3.3)$}\\ &\,\,\color{blue}{=S_2-\binom{3}{2}S_3+\binom{4}{2}S_4} \end{align*} according to result (a). Similarly we obtain with (2.3) \begin{align*} \color{blue}{L_3}&=E_3+E_4\\ &=S_3-\binom{4}{3}E_4+E_4\tag{$\to (3.2)$}\\ &=S_3-\left(\binom{4}{3}-1\right)S_4\tag{$\to (3.3)$}\\ &\,\,\color{blue}{=S_3-\binom{3}{1}S_4} \end{align*} according to result (b).

Markus Scheuer
  • 112,413