# Arrange letters of the word COMPUTE so that vowels OR consonants are in alphabetical order OR at least two vowels next to each other.

Question: How many ways are there to arrange the letters of the word COMPUTE so that vowels OR consonants are in alphabetical order OR at least two vowels next to each other.

I have tried lots of things to solve this question. I have started by looking for the number of permutations where vowels are in alphabetical order. (7!/4!) Then, I looked for the number of permutations where all the consonants in alphabetical order. (7!/3!) Then I subtracted the number of arrangements where all the consonants and vowels are in alphabetical order. (C(7,3)). That is the point I stuck. How should I include the condition of having "OR at least two vowels next to each other." ?

• so that vowels or consonants are in alphabetical order? Dec 3, 2020 at 21:01
• yes, I've add "are". Thank you. Dec 3, 2020 at 21:22
• You seem to have confused permutations with vowels in alphabetical order with those with consonants in alphabetical order. For vowels in alphabetical order, there are seven ways to place the C, six ways to place the M, five ways to place the P, and four ways to place the T. The three vowels can only be placed in the remaining three positions in one way. Hence, there are $7 \cdot 6 \cdot 5 \cdot 4 = \frac{7!}{(7 - 4)!} = \frac{7!}{3!}$ permutations in which the vowels appear in alphabetical order. Dec 3, 2020 at 22:52
• A similar argument shows that there are $\frac{7!}{4!}$ permutations in which the vowels appear in alphabetical order. Dec 3, 2020 at 22:52

Start by counting the number of ways to choose the positions of the vowels: $$\binom{7}{3}=35$$

Then find how many of these do not have vowels in consecutive positions. With four consonants, there are five places to insert vowels: _c_c_c_c_ Choose three of them: $$\binom{5}{3}=10$$

So there are $$35-10=25$$ patterns that meet the condition of having consecutive vowels. For each of these there are $$4!$$ permutations of the consonants and $$3!$$ permutations of the vowels. This gives a total of $$25\times 4!\times 3!=3600$$ permutations with at least two vowels next to each other.

For the $$10$$ patterns that do not have consecutive vowels, there are $$4!$$ permutations with the vowels in order and $$3!$$ with the consonants in order. The permutation with both groups in order is counted twice, so there are $$4!+3!-1=29$$ permutations with at least one group in alphabetical order. This gives a total of $$10\times 29=290$$ additional permutations that meet the given conditions.

The total is therefore $$3890$$ arrangements.

• Thank you for your answer. However, isn't the number of total permutations 7!=5040? Maybe I should have added "without repetition" condition. Dec 8, 2020 at 10:19
• @yunusemre Yeah, my original result was insane. I have corrected the error. Dec 8, 2020 at 22:55
• @DanielMathias Could you explain why you multiplied by $3!$ in $25*4!*3!$? When doing $\binom{7}{3}$ aren't you already considering the vowels as in order? why multiply by $3!$ if they are already in order? to consider for the case in which the consonants are in order? But shouldn't you separate the counting? Counting the number of ways the consonants are in order and multiply by 3! and then counting the number of ways the vowels are in order and multiply by 4! and then subtract by the number of ways in which they both are in order? Sep 22, 2021 at 9:16
• @Marco That part counts the number of arrangements with consecutive vowels, with letters in any order. The second part counts arrangements with consonants and/or vowels in order as you suggest. Sep 22, 2021 at 9:26
• @DanielMathias yeah so why multiply by 3! in the first part if you are considering the vowels are in order? There is only 1 way for the vowels to be in order, not 3!. Then for this unique way for them to be in order, there are $\binom{7}{3}$ ways to choose the positions in a 7 letter word. Sep 22, 2021 at 9:28