How many different permutations are possible for the letters Abcdef and G?

Consider this question: Consider permutations of the sequence of seven letters $ABCDEFG$. How many of the permutations contain the strings $AB$ and $DC$?

If we think of $AB$ and $DC$ as one element, we see that we're just looking for permutations of the set ${AB, DC, E, F, G}$. There are 5 elements in this set, so there are $5! = 120$ permutations.

However, think of this way: we're looking to place $AB$ and $DC$ somewhere within the string $EFG$. There are $4$ possible positions (an underscore signifies a possible position): $\_E\_F\_G\_$

There are $4\choose2$ $=6$ ways to choose the positions of the elements $AB$ and $DC$.

Of course, the letters $EFG$ can be arranged in any way. There are $3! = 6$ permutations of a $3$-element set.

So in total we have $4\choose2$ $3! = 36$ possible permutations.

Which of these two ways of thinking is correct, and what's wrong with the other one? Is the answer $120$ or $36$? Any help is appreciated!

Hint: Here, we need to find the number of permutations of letters a b c d e f g taken all together, if neither ‘beg’ nor ‘cad’ patterns are repeated. First, we will find the total number of permutations in which any of the 7 letters can be arranged in any of the 7 places. Then, we will find the number of permutations in which the arrangement ‘beg’ appears, the number of permutations in which the arrangement ‘cad’ appears, and the number of permutations in which both the arrangements ‘beg’ and ‘cad’ appear. Finally, we will use the formula \[n\left( {A \cup B} \right) = n\left( A \right) + n\left( B \right) - n\left( {A \cap B} \right)\] to get the required number of permutations.

Formula Used: The number of permutations in which a set of \[n\] objects can be arranged in \[r\] places is given by \[{}^n{P_r} = \dfrac{{n!}}{{\left( {n - r} \right)!}}\].
The number of objects in the union of two sets is given by \[n\left( {A \cup B} \right) = n\left( A \right) + n\left( B \right) - n\left( {A \cap B} \right)\].

Complete step-by-step answer:
Let the set of objects be \[S = \left\{ {a,b,c,d,e,f,g} \right\}\].
The number of places in which the 7 letters are to be arranged is 7.
Since the letters are distinguishable, we will use permutations instead of combinations.
We know that the number of permutations in which a set of \[n\] objects can be arranged in \[r\] places is given by \[{}^n{P_r} = \dfrac{{n!}}{{\left( {n - r} \right)!}}\].
First, we will find the total number of permutations in which any of the 7 letters can be arranged in any of the 7 places.
Substituting \[n = 7\] and \[r = 7\] in the formula for permutations, we get
\[{}^7{P_7} = \dfrac{{7!}}{{\left( {7 - 7} \right)!}} = \dfrac{{7!}}{{0!}} = 7! = 5040\]
Thus, the number of permutations in which the 7 letters can be arranged is 5040.
Now, we will find the number of permutations in which the arrangement ‘beg’ and the arrangement ‘cad’ appears.
Let \[P\] be the set that the arrangement ‘beg’ appears, and \[Q\] be the set that the arrangement ‘cad’ appears.
Assume that the letters b e g come together in the arrangement.
The set of objects becomes \[P = \left\{ {a,c,d,f,\left( {beg} \right)} \right\}\].
The number of elements of set \[P\] is 5.
Substituting \[n = 5\] and \[r = 5\] in the formula for permutations, we get
\[{}^5{P_5} = \dfrac{{5!}}{{\left( {5 - 5} \right)!}} = \dfrac{{5!}}{{0!}} = 5! = 120\]
Thus, the number of permutations in which the letters can be arranged such that the arrangement ‘beg’ appears is 120.
Now, assume that the letters c a d come together in the arrangement.
The set of objects becomes \[Q = \left\{ {b,e,f,g,\left( {cad} \right)} \right\}\].
The number of elements of set \[Q\] is 5.
Substituting \[n = 5\] and \[r = 5\] in the formula for permutations, we get
\[{}^5{P_5} = \dfrac{{5!}}{{\left( {5 - 5} \right)!}} = \dfrac{{5!}}{{0!}} = 5! = 120\]
Thus, the number of permutations in which the letters can be arranged such that the arrangement ‘cad’ appears is 120.
Next, assume that the both ‘cad’ and ‘beg’ come together in the arrangement.
The set of objects becomes \[P \cap Q = \left\{ {\left( {beg,} \right),f,\left( {cad} \right)} \right\}\].
The number of elements of set \[P \cap Q\] is 3.
Substituting \[n = 3\] and \[r = 3\] in the formula for permutations, we get
\[{}^3{P_3} = \dfrac{{3!}}{{\left( {3 - 3} \right)!}} = \dfrac{{3!}}{{0!}} = 3! = 6\]
Thus, the number of permutations in which the letters can be arranged such that the arrangements ‘beg’ and ‘cad’ both appear is 6.
Now, we know that the number of objects in the union of two sets is given by \[n\left( {A \cup B} \right) = n\left( A \right) + n\left( B \right) - n\left( {A \cap B} \right)\].
We can use this formula to find the number of permutations in which either ‘beg’ or ‘cad’ arrangements appear.
The number of permutations in which the arrangement ‘beg’ appears is 120.
The number of permutations in which the arrangement ‘cad’ appears is 120.
The number of permutations in which the arrangements ‘beg’ and ‘cad’ both appear is 6.
Therefore, we get
Number of permutations in which either ‘beg’ or ‘cad’ appear \[ = 120 + 120 - 6 = 234\]
Finally, we will subtract the number of permutations in which either ‘beg’ or ‘cad’ appear, from the total number of permutations of arranging 7 letters in 7 places, to get the number of permutations in which neither ‘beg’ nor ‘cad’ appear.
The number of permutations in which the 7 letters can be arranged is 5040.
The number of permutations in which either ‘beg’ or ‘cad’ appear \[ = 120 + 120 - 6 = 234\]
Thus, we get
Number of permutations in which neither ‘beg’ nor ‘cad’ appear \[ = 5040 - 234 = 4806\]
Therefore, the number of permutations of letters a b c d e f g taken all together is 4806, if neither ‘beg’ nor ‘cad’ patterns are repeated.

Note: You should remember that \[0! = 1\]. A common mistake is to use \[0! = 0\] instead of \[0! = 1\]. This is incorrect.
Also, you should not get confused about why this solution required permutations and not combinations. We know that each student is different. Since the order of the students of the same class also matters, we needed to use permutations instead of combinations.
A common mistake is to subtract 120 and 120 from 5040 to get the answer. This is incorrect because there are 6 arrangements where both ‘beg’ and ‘cad’ appear. Subtracting just 120 and 120 from 5040 means that those 6 arrangements have been subtracted twice.

How many permutations are there of the letters Abcdef?

Number of distinct permutations of the letters A,B,C,D,E,F= 6! =720. Those that start with A = 1*5! =120.

How many permutations of the word abcdefg contain abc and cde?

ANSWERS: (a) The set of permutations of the letters ABCDEFGH that contain the string CDE is the same as the set of permutations of the 6-element set {A, B, CDE, F, G, H}. The latter set has P(6,6) = 6! = 720 elements.

How many ways 7 People A B C D E F and G can be arranged in a circle such that B and C should always be together?

Answer: The correct answer is option(c) 3600.

How many different arrangements are there for the letters abcd and E?

So the total permutations are 4 · 5 · 4 · 3 · 2 · 1 · 3 = 1440. Given five letters {A, B, C, D, E}.