3

How many 5-letter strings are possible out of the 6-letter word APPLES?

okarin
  • 2,221
  • 1
  • 21
  • 42

2 Answers2

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

sebii
  • 264