How many 5-letter strings are possible out of the 6-letter word APPLES?
Asked
Active
Viewed 2,608 times
3
-
2Does the word have to be an english word, or just a string of characters ? – Amr Dec 24 '13 at 20:30
-
Just a string of characters – okarin Dec 24 '13 at 20:31
2 Answers
3
Here my attempt: if the 5-letter string has just 1 P. Then we have 5! ways of getting such strings. If the 5-letter string has 2 P's, then there are 4 ways this can be done namely:
P, P, A, L, E
P, P, A, L , S
P, P, A, E, S
P, P, L, E, S
Each of of the above 4 cases has: 5!/2! = 60 distinct 5-letter strings. So the answer is : 120 + 4*60 = 360 such strings.
DeepSea
- 77,651
-1
A generating function approach might work. It should be the exponent of $x^5$ in $$5! \left(1 + \frac{x}{1!}\right)^4 \left(1 + \frac{x}{1!} + \frac{x^2}{2!}\right)$$
This gives me 360.
Related: 6-letter permutations in MISSISSIPPI