In how many ways can you write down all 29 letters of the alphabet so that none of the "words" GLAD, HÄST, PONKE appear in the text string?

130 Views Asked by At

Before I ask the question, I am working with an alphabet that also includes the three letters Å, Ä, Ö which are from the Swedish alphabet. Therefore I am working with 29 letters instead of 26 which there are in the regular English alphabet.

The question:

In how many ways can you write down all 29 letters of the alphabet so that none of the "words" GLAD, HÄST, PONKE appear in the text string?


I am thinking about if I can use the Inclusion–exclusion principle to solve this problem, but can not figure out how I would use it.

1

There are 1 best solutions below

9
On BEST ANSWER

Rather conveniently, the three target words share no letters between them, so the number of strings containing given target words may be computed by treating each included word as one letter. The number of strings containing GLAD is $26!$, for example, since there are $26$ objects to permute after composing the four-letter word, and there are $22!$ strings containing both GLAD and PONKE.

Then, by inclusion/exclusion, the desired answer is $29!$

  • minus the strings containing one of the words: $-26!-26!-25!$
  • plus the strings containing two: $+23!+22!+22!$
  • minus the strings containing three: $-19!$