# How many Words in a language of seven letters

if you could please answer the bellow question, with a easy to follow method, I would be most grateful

A language has 7 total letters in their alphabet. S, NO, WM, AN. Every word in this language adds up to 7 letters. The letters that are together have to stay together in every word (W will always be followed by M) . For example "snonono" and "sssanwm" are words in this language, and "sssmwan" or "sssawmn" are not

How many total words are there in this alphabet ?

• You can treat the letter pairs NO, WM, and AN as single letters, then consider cases depending on how many S's are in the word. E.g. if there is one S, there must be three letter pairs; if there are three S's, there must be two letter pairs; if there are five S's there must be one letter pair; and if there are seven S's - well that's just sssssss. – kccu Dec 17 '15 at 17:15
• Why "sssawmn" is not!!! Here $M$ follows $W$. And please format the important terms of this post with $\LaTeX$ (as I did). It will make your post look clearer. – user249332 Dec 17 '15 at 17:17
• @SubhadeepDey because also N must always follow A – kccu Dec 17 '15 at 17:18
• @kccu, Oh, I have to treat $NO, \,WM,\,AN$ as joined case, I mean I can't separate them? – user249332 Dec 17 '15 at 17:21
• @SubhadeepDey Yes that is what's specified in the question. What is not clear, however, is whether the word "anossss" is allowed, as N follows A and O follows N, but there are not two distinct AN/NO blocks. – kccu Dec 17 '15 at 17:23

HINT: Break this down into a few cases based on how many times the "S" letter is used. I'm assuming the words in this language are 7 letters though the technique could be expanded for shorter words.

1. 7 times: This has just the 1 word that is "sssssss".

2. 5 times: In this case, any of the other 3 letter pairs could be used in any of 6 slots around the 5 "s" words which would generate 3*6 words as kccu's comment points out.

3. 3 times: In this case, the other letter pairs are used 2 times around the 3 "s" uses and likely could be counted.

4. 1 time: In this case there are 3 other pairs and while it may be harder to count, the idea would still be about the same.

• You have overcounted in case 2. This would be the number of ways to fill every slot around the S's with letter pairs. The correct number is $3 \cdot 6$ because there are $3$ choices for which letter pair is used and $6$ choices for which slot around the S's it will go. – kccu Dec 17 '15 at 17:21

The terms for the number of ways are

[choose pairs] $\times$ [successively place the pairs in the gaps including ends]

$7 S's: 1$

$5 S's, 1$ pair: $[\binom31]\times$

$3 S's, 2$ pairs: $[\binom32]\times[4\cdot5]$

$1 S, 3$ pairs: $[\binom33]\times[2\cdot3\cdot4]$