3

I am looking for guidance as to how to account for the three e's in the word "freezer" where where double letters are not allowed.

The word consists of the following letters: • f: 1 • z: 1 • e: 3 • r: 2

Total Arrangements Without Restrictions

The total number of arrangements of the letters can be calculated using the formula for permutations of a multiset where: • n is the total number of letters. • n1,n2,n3,… are the frequencies of each unique letter. • Total letters n=7 (f, z, e, e, e, r, r) • Frequencies: f = 1, z = 1, e = 3, r = 2

Thus, the total arrangements are: $\frac{7!}{1!\cdot 3!\cdot 2!\cdot 1!} = 420$

Using the inclusion/exclusion principal I can subtract out arrangements with double letters.

For "rr", there are 6 different ways that a double "rr" can occur, leaving 5 places for the other letters, three of which are "e"

  1. r r _ _ _ _ _
  2. _ r r _ _ _ _
  3. _ _ r r _ _ _
  4. _ _ _ r r _ _
  5. _ _ _ _ r r _
  6. _ _ _ _ _ r r

$\frac{6 \cdot 5!}{1!\cdot 3! \cdot 1!} = 120$

Now I have to subtract out the three e's. This is where I become less sure of how to solve.

What I did was lump (ee) together and set my letters as (ee) e _ _ _ _ places or r, r, f, z

If I do this, I get 5 ways to arrange an (ee) e - each with 4 places to fill, two of which are "r".

  1. (ee) e _ _ _ _
  2. _ (ee) e _ _ _
  3. _ _ (ee) e _ _
  4. _ _ _ (ee) e _
  5. _ _ _ _ (ee) e

$\frac{5 \cdot 4!}{1! \cdot 2! \cdot 1!} = 60$

420 - 120 - 60 = 240.

I still think I'm not accounting for that 3rd "e". Is there a better way to attack this problem? And, how does this work where I have 4 of the same letter and need to avoid doubles?

  • 2
    I would set down the $e's$, thereby making $4$ gaps, two of which can't be empty. You have $4$ letters to distribute so it's easy to count the patterns. Now it's just a matter of ruling out the $rr$ block. – lulu Nov 22 '24 at 15:31

3 Answers3

4

We shall solve by successively applying the well known "gap" and "subtraction" methods.

Firstly, we shall keep the $E's$ separate by placing them in the gaps of $-F-Z-R-R-$ and permute the other letters, thus $\binom53\cdot\frac{4!}{2!} = 120$ ways.

We shall now subtract arrangements with the $R's$ together treating them as a super $R,\;\;$ $-F-Z-\mathscr R-$, i.e. $\binom43\cdot3!= 24$

Thus we get $120-24 = 96$


Added

Regarding your query regarding two double letters, unless you give details of other letters with it, the question remains vague

  • There is no general way to solve such problems at an elementary level. Some other tools that are useful are the "string" method and "successive placement", examples of which you can look up on this site itself. Perhaps the most useful at an intermediate level is inclusion-exclusion.

  • At an advanced level, there are general methods, two such advanced methods and inclusion-exclusion can be seen here and here

4

Here is an answer based upon PIE the principle of inclusion-exclusion where we also do some bookkeeping in order to cover all different cases.

Problem: We want to count all words of length $7$ which are built from the letters $e,e,e,f,r,r,z$ which do not contain a bad word from $\mathcal{B}=\{ee,rr\}$.

  • According to PIE we symbolically list all the different cases but indicate only the bad words in lexicographical order.

  • Different cases are separated by a vertical bar $|$.

  • Non-overlapping bad words are separated by space

  • $k$ overlapping bad words are given by $k+1$ consecutive letters as for instance $eee$ indicates two overlapping bad words $ee$.

We obtain \begin{align*} \color{blue}{(\ ) }&\color{blue}{- (ee\ |\ rr)}\\ &\quad\color{blue}{+(ee\ rr\ |\ eee)}\\ &\quad\color{blue}{-(eee\ rr)}\tag{1} \end{align*}

We calculate the wanted number by writing the number of the coefficients in the same order as the cases in (1). We get \begin{align*} &\frac{7!}{3!1!2!1!}-\frac{6!}{(1!1!)1!2!1!}-\frac{6!}{3!1!(1!)1!}\\ &\qquad+\frac{5!}{(1!1!)1!(1!)1!}+\frac{5!}{(1!)1!2!1!}\\ &\qquad-\frac{4!}{(1!)1!(1!)1!}\\ &\quad=420-360-120+120+60-24\\ &\,\,\quad\color{blue}{=96} \end{align*} where counting bad/overlapping words is indicated by parentheses.

Markus Scheuer
  • 112,413
1

I think we are obliged to do an exhaustive search. (Edit : Not really exhaustive search, but methodic search, to look at all patterns).

The 3 'e' can be in positions (1,3,5), (1,3,6), (1,3,7) ...... (3,5,7). I count 10 patterns.

One of them is specific, when the 3 'e' are in positions (2,4,6). In this case, I have the garantee that the 2 'r' will not be adjacent. So, this pattern generates 12 solutions.

When the 3 'e' are in positions (1,3,7), I need to have 'f' or 'z' in position 5 , and it is the only constraint. So if 'f' is in position $5$, I have 3 options for remaining letters, and same if 'z' is in position $5$. This pattern (e?e???e) generates 6 solutions.

Same for pattern (1,5,7) (e???e?e)

With pattern (1,4,7), the empty places are 2 group of 2 places. We have $4$ options to place 'f', and only $2$ to place 'z'. This pattern generate $8$ solutions.

All 6 other patterns (1,3,5)(1,3,6)(1,4,6)(2,4,7)(2,5,7)(3,5,7) are similar. The empty places are : $2$ isolate spots, plus $2$ adjacents spots. In the $12$ possibilities to put 'f','z','r' 'r' in these $4$ spots, $1$ is not valid. Each of these $6$ patterns generates $11$ solutions.

Total is : $1 \times 12 + 2 \times 6 + 1 \times 8 + 6 \times 11 = 98$

Lourrran
  • 1,765