How many permutations of the letters ABCDEFG contain

A gentle reminder.

“A permutation of a set of distinct objects is an ordered arrangement of these objects.”

Theorem: “If n is a positive integer and r is an integer with 1 ≤ r ≤ n, then there are P (n, r ) = n(n − 1)(n − 2) · · · (n − r + 1) r-permutations of a set with n distinct elements.”

Corollary: “If n and r are integers with 0 ≤ r ≤ n, then P(n,r) = n! / (n−r)!”

The previous definition, theorem, and corollary are from the textbook Discrete Mathematics and its Applications by Rosen.

a) the string BCD?

To solve this type of exercise, we will use a simple trick.

We have a sequence of letters from A to G, and we need to find out how many permutations have the string BCD.

Because the string BCD needs to be present in all the permutations, we can modify the problem as follows:

How many permutations of the set {BCD, A, E, F, G} are there?

Notice that BCD now is 1 element of the set instead of a letter. This will guarantee that BCD appears in each permutation.

P(5,5) = 5!/(5-5)! = 5! = 120

Answer:

120 permutations of the letters ABCDEFG contain the string BCD.

b) the string CFGA?

Following the same approach as the previous exercise, we can get the set {CFGA, B, D, E}.

P(4,4) = 4!/(4-4)! = 4! = 24

Answer:

24 permutations of the letters ABCDEFG contain the string CFGA.

c) the strings BA and GF?

By now, you should already know the trick.

The set, in this case, is {BA, GF, C, D, E}

P(5,5) = 120, we already calculated in a).

Answer:

120 permutations of the letters ABCDEFG contain the strings BA and GF.

d) the strings ABC and DE?

The set, in this case, is {ABC, DE, F, G}

P(4,4) = 4!/(4-4)! = 4! = 24

Answer:

24 permutations of the letters ABCDEFG contain the string CFGA.

e) the strings ABC and CDE?

The set in this case is {ABCDE, F, G}

Notice that we need ABC and CDE, but the C is common in the two blocks of letters. Because we have only one C (as an element of the set), the only way that can happen is if the two blocks are together as “ABCDE”.

P(3,3) = 3!/(3-3)! = 3! = 6

Answer:

6 permutations of the letters ABCDEFG contain the strings ABC and CDE.

f) the strings CBA and BED?

In his case, you should notice that the two strings contain a B. But there is no way we can combine the two strings in one like in the previous example.

Notice that CBA has a B in the middle and BED has a B at the beginning.

Because of this, the answer is the following:

There is no permutation of the letters ABCDEFG that contain the strings CBA and BED.

Related exercises: