0

How many distinct 4 letter words can be formed by using letters from USURY and LUXURY? I tried in this manner. 4 'U's, 2 'R's and 2 'Y's. All the U are same, so that means it is equivalent to having only one U. Same happens with R and Y. Therefore, I am left with 6 distinct letters. Answer should be 6C4*4!, which is 360, but answer shows 210 is the answer. Please give the appropriate method.

1 Answers1

1

The problem of how many words of different lengths can be formed with a given multiset of numbers can be solved using exponential generating polynomials. If with a given stock of letters one can form $a_l$ words of length$~l$, this can be expressed by the polynomial $\sum_ia_i\frac{X^i}{i!}$ (it is a polynomial because the stock is finite). Now if one adds a new letter with multiplicity$~m$, then it can be used some number$~k$ times, with $0\leq k\leq m$, and if so then to form a word of length$~n$ one can choose the positions for the new letter in $\binom nk$ ways, and fill the remaining positions with a word formed from the old stock in $a_{n-k}$ ways. One must sum this over all allowed values of$~k$ to get the new coefficient of$~X^n$; one can easily check that this means the new generating polynomial is the old one multiplied by $1+\frac X{1!}+\cdots+\frac{X^m}{m!}$.

For the problem at hand, where the multiplicities of letters are $4,2,2,1,1,1$, one needs to compute $$ P= \left(1+X+\frac{X^2}2+\frac{X^3}6+\frac{X^4}{24}\right)\left(1+X+\frac{X^2}2\right)^2\left(1+X\right)^3. $$ It can be checked that the term of degree$~4$ in$~P$ is $759\frac{X^4}{24}$, so the answer is $759$.

  • I think this is a generating function. How did you check that the coefficient of $x^4$ is 759? – Sherlock Watson May 24 '19 at 07:54
  • @SherlockWatson Hard to recall, but I guess I just had a computer multiply the power series modulo $X^5$. If one is good at rational arithmetic (probably not my case), it is not so hard to do with pencil and paper either. – Marc van Leeuwen May 24 '19 at 10:05
  • Just tried to do it by hand, took me about a quarter of an hour. The best way seems to be to use $$(\sum_ia_i\frac{X^i}{i!}) (\sum_jb_j\frac{X^j}{j!}) = \sum_k\left(\sum_{i+j=k}\binom kia_ib_j\right)\frac{X^k}{k!} $$ so that one can use integer arithmetic. Doing the convolution of sequences while throwing in binomial coefficients is something that is not too hard to get used to. – Marc van Leeuwen May 24 '19 at 10:33
  • @MarcvanLeeuwen hi. does your equation above answer https://math.stackexchange.com/q/2372? –  Jan 06 '22 at 09:02