# Combinatorics, arrangements (edited)

"How many ways can the letters in the word SLUMGULLION be arranged so that the three L’s precede all the other consonants?"

My work is below: Can someone also solve this ONLY using the multiplication rule, permutations, and permutations with repetitions?

We have 3 L's and the other 4 consonants are S,M,G,N. That is, our consonants are LLLSMGN, call them all X for the moment. Then we have XXXXXXXUUIO. The number of arrangements of these letters is $\frac{11!}{7!2!}$. Hence the answer is $4!*\frac{11!}{7!2!}$ since there are $4!$ ways to arrange the 4 consonants other than the L's.

• Hmm, I got the same answer as you. – JohnJamesSmith Mar 26 '12 at 2:12
• Your reasoning is correct. I also solved the problem a different way (using combinations) and got the same answer. – Brett Frankel Mar 26 '12 at 2:47

## 2 Answers

Your argument is fine (as previously noted), and there's probably no significantly better approach to counting them.

If you want to double-check your result, here's some GAP code which can list all the possibilities.

A:=["S","L","U","M","G","U","L","L","I","O","N"];
T:=Arrangements(A,Size(A));
count:=0;

for P in T do

# where the last L is
a:=Maximum(Positions(P,"L"));

# where the first non-L consonant is
b:=Minimum(Position(P,"S"),Position(P,"M"),Position(P,"G"),Position(P,"N"));

if(b>a) then
count:=count+1;
Print(P,"\n");
fi;

od;

Print(count,"\n");


and it found 95040, matching your result $4! \frac{11!}{7!\ 2!}$. Here is an automaton that will generate the required words. A good word has three parts : A is before the third L, then the third L, then the suffix B that contains no L's.

the equations are :

$$A = 1 + (l+i+o+u).A$$

$$B = 1 + (g + m + n + s + i + o + u) .B$$

$$W = A.l.B$$

the generating function for W is

$${1 \over 1- (l+i+o+u)} .l. {1 \over 1- (g+m+n+s + i + o + u)}$$ and we are interested in the coefficient of

$$l^3.g.m.n.s.u^2.i.o$$ which is $$95040$$.

The third L is necessary and it may be find (hidden) both in solution and in algorithm.

As one may see, such a problem involves only the sum and the product rules, and some coefficient stuff.

But, since 11 = (1+1+2) + (3+1+1+1+1) and there are four types of letters I can not imagine a shorter answer than the first, which is a product of four (factorial) factors.

U-type : 2 letters I-type : 2 letters S-type : 4 letters, consonants L type : 3 letter, a multiple L

we have:

$$11= 2+2+3+4,$$

$$7 = 3+4,$$

$$4 = 4,$$

$$2 = 2$$.