1

Please read it once again, it's not as easy as it seems.

Is there any Mathematical formula or finite approach to solve this type of problem. Eg - Find the permutation of word "MALAYALAM" taking 5 at a time.

I have written a program which can solve this type of problem ,but I couldn't found any method to do it on paper.

My programming approach - (i) Find all the combination taking r at a time

(ii) Remove duplicates from combination by sorting

(iii) Find the permutation of individual combination and then sum up, to get the answer.

Please help me, Thanks

1 Answers1

0

Yes, there is a formula.
The word has one Y, two each of M and L and four of A

and the formula would be to find the coefficient of $x^5$ in $5!(1+\frac{x}{1!})(1+\frac{x}{1!}+\frac{x^2}{2!})^2 (1+\frac{x}{1!} + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!})$

To understand why this works, you can see here