2

This is my first time using this site, so sorry if I do anything incorrect. I am asking this here because I couldn't find any relevant answers to my question here or elsewhere on the web. If anyone knows a webpage that has a detailed overview of this process, I would appreciate it if you could link me to it. Anyways, on to the question.

I am trying to find a general equation to determine how many permutations p exist for a set of marbles M if you select m at a time. For instance, for a set M comprising of 1 blue marble, 1 green marble, and 2 red marbles, each of which is indistinguishable aside from color, there are 12 distinct permutations p if you take the marbles $m = 3$ at a time. I am wondering if there is an equation that gives you p for any set M and any selection m. I know that the number of permutations of M with length\size L is $\frac{L!}{1!1!2!}$ if $m = L$, but what if $m \lt L$?

I have found some equations on my own that work, but only for certain sets M. One equation I have found is: $$p = \sum_{i=0}^k C_i^m \cdot P_{m-i}^{n-1}$$ $$\text{or}$$ $$p = \sum_{i=0}^k \binom{m}{i} \cdot \binom{n-1}{m-i} \cdot (m-i)$$ with n being the number of colors that exist in set M and k being the largest amount of marbles per color in M. However, this only works if all the marbles are different colors except for one color.

I was also able to develop another equation for M of type {0,1,2,2,3,3} (with the different numbers representing colors), where there are 2 colors with 2 marbles a-piece and all the other colors have only one marble: $$p = P_m^n + 2 \cdot C_2^m \cdot P_{m-2}^{n-1} + C_2^m \cdot C_2^{m-2} \cdot P_{m-4}^{n-2}$$ $$\text{or}$$ $$p = m \cdot \binom{n}{m} + 2 \cdot \binom{m}{2} \cdot \binom{n-1}{m-2} \cdot (m-2) + \binom{m}{2} \cdot \binom{m-2}{2} \cdot \binom{n-2}{m-4} \cdot (m-4)$$

Unfortunately that's about as far as I was able to get. I couldn't find any solid unifying equation much past that. If anyone has any ideas or knows the full equation, please share. I would be very grateful to be enlightened about this. Thanks!

JMoravitz
  • 79,518
Hunsinger
  • 21
  • 2
  • 1
    Related: https://math.stackexchange.com/questions/238906/how-many-distinct-n-letter-words-can-be-formed-from-a-set-of-k-letters-where-s?noredirect=1&lq=1 – JMoravitz Jan 09 '20 at 19:42
  • 1
    I remember a few times writing out the fully generalized formula... it is very messy. In most cases it is easier to work with the exact numbers and not use the generalized formula. I'll see if I can find it before closing this as a duplicate of something else – JMoravitz Jan 09 '20 at 19:43
  • @JMoravitz Thank you for the link. I think the answer to that post should suffice to answer my question. However, if you do find the generalized formula, I would love to see it, as messy as it may be. I am trying to find it because the specific case I'm trying to apply it to has 96 'letters', 6 of which are unique, that I need to permute into varying length 'words'. So I was thinking that a general formula would be easier than a specific case formula. – Hunsinger Jan 09 '20 at 19:57
  • I may have been thinking of a post of mine like this where I discuss the fully generalized formula for the question of combinations rather than permutations (i.e. order of the letters does not matter, only the quantity of each used). The fully generalized formula for permutations will likely be just as monstrous as that one. – JMoravitz Jan 09 '20 at 20:12
  • @JMoravitz Do you know if the answer in this post is the generalized formula for permutations? – Hunsinger Jan 09 '20 at 20:36
  • Yes, that would work, though admittedly it is not much different than brute forcing a count by having broken into cases. – JMoravitz Jan 09 '20 at 22:43
  • Well I just found this answer on MO that I think is the best equation for it so far. It's nice and clean too. – Hunsinger Jan 09 '20 at 23:13
  • @MikeEarnest I already saw that post and it's a bit too complicated for my purposes, but thanks for the help! :) – Hunsinger Jan 09 '20 at 23:15

0 Answers0