If M is a finite multiset, then a multiset permutation is an ordered arrangement of elements of M in which each element appears a number of times equal exactly to its multiplicity in M. An anagram of a word having some repeated letters is an example of a multiset permutation. If the multiplicities of the elements of M (taken in some order) are "{\\displaystyle m_{1}} , {\\displaystyle m_{2}} , ..., {\\displaystyle m_{l}}" and their sum (that is, the size of M) is n, then the number of multiset permutations of M is given by the multinomial coefficient,
"{\\displaystyle {n \\choose m_{1},m_{2},\\ldots ,m_{l}}={\\frac {n!}{m_{1}!\\,m_{2}!\\,\\cdots \\,m_{l}!}}={\\frac {\\left(\\sum _{i=1}^{l}{m_{i}}\\right)!}{\\prod _{i=1}^{l}{m_{i}!}}}.}"
In our case, the number of ternary strings of length 15 are there containing exactly four 0s, five 1s, and six 2s is
"\\frac {15!}{4!\\,5!\\,6!}=\\frac {15\\cdot 14\\cdot13\\cdot12\\cdot11\\cdot10\\cdot9\\cdot8\\cdot7}{(2\\cdot3\\cdot4)\\,(2\\cdot3\\cdot4\\cdot5)}=630,630"
Comments
Leave a comment