0
$\begingroup$

Is there any method where I could count the possibilities of X number of number/character/anything-PAIRS (everything is appearing twice) in Y number of places?

The same question: How many different ways can the given numbers placed to a given size of empty place, where every number is doubled?

Not all of the numbers need to be placed into an order, but all of the rooms must be filled, and if a number is placed its pair needs to be used too. (The room's size will never be larger than the total number of items * 2, and is always even.)


What I learned already: when there are no pairs, just single items we count the possible orders:

for example 4 items (1 2 3 4) in 4 rooms, and under that 10 items in 10 rooms:

4*3*2*1 = 24

10*9*8*7*6*5*4*3*2*1 = 3,628,800

but I need to use pairs (doubles), which seems to make it a lot more difficult.


[4 pairs in 2 slots = 4 orders possible]
1 1
2 2
3 3
4 4



[4 pairs in 4 slots = 24 if counted right]
1 1 2 2
1 2 1 2
1 1 3 3
1 3 1 3
1 1 4 4
1 4 1 4

2 2 1 1
2 1 2 1
2 2 3 3
2 3 2 3
2 2 4 4
2 4 2 4

3 3 1 1
3 1 3 1
3 3 2 2
3 2 3 2
3 3 4 4
3 4 3 4

4 4 1 1
4 1 4 1
4 4 2 2
4 2 4 2
4 4 3 3
4 3 4 3



[3 pairs in 6 slots = ?]
1 1 2 2 3 3
1 1 2 3 2 3
1 1 2 3 3 2
1 1 3 2 2 3
1 1 3 2 3 2
1 1 3 3 2 2

1 2 1 2 3 3
1 2 1 3 2 3
1 2 1 3 3 2
1 2 3 1 2 3
1 2 3 1 3 2
1 2 3 2 1 3
1 2 3 2 3 1
1 2 3 3 1 2
1 2 3 3 2 1

1 3 1 2 2 3
1 3 1 2 3 2
1 3 1 3 2 2
1 3 2 1 2 3
1 3 2 1 3 2
1 3 2 3 1 2
1 3 2 3 2 1

2 1 1 2 3 3
etc... stopping here, it is getting too complicated already for manual counting



[50 pairs in 100 slots = any way to solve these?]
  • 0
    Pick which of the numbers will actually appear (*order irrelevant*) and then use multinomial coefficients to count the number of arrangements of those numbers (*and their duplicates*) into a row. For $4$ pairs into $4$ slots, it would be $\binom{4}{2}\cdot \binom{4}{2,2} = 36$. You have forgotten to include in your count some arrangements such as 1,2,2,1 and 1,3,3,1 etc... which account for your missing twelve items from your count. For $3$ pairs in $6$ slots, you have $\binom{3}{3}\cdot \binom{6}{2,2,2}$ and $50$ in $100$ slots is $\binom{50}{50}\binom{100}{2,2,2,\dots,2}$ etc...2017-02-13
  • 0
    Thank you, though not too clear cause of the short comment. I mean I'll need to do some more study I guess in multinomial coefficients. Do you know any online calculator by chance? Couldn't find any where I can enter in this form. Closest was this, but only for binomial: https://www.wolframalpha.com/examples/Combinatorics.html2017-02-13
  • 0
    $\binom{N}{a,b,c,\dots,k} = \frac{N!}{a!b!c!\cdots k!}$2017-02-13
  • 0
    sorry for the confusion, $\binom{n}{r}$ is interpreted to be the *binomial coefficient* $\binom{n}{r}=\frac{n!}{r!(n-r)!}$ and could have been rewritten as the *multinomial coefficient* $\binom{n}{r,n-r}$. Multinomial coefficients $\binom{N}{a,b,c,\dots,k}$ must satisfy $a+b+c+\dots+k=N$. In other words, your first term should have been a $\frac{4!}{2!2!}$ as well instead of a $\frac{4!}{2!}$2017-02-13
  • 0
    `(4! / (2!2!)) * (4! / (2!2!))` = 36 yeah that works finally! Thanks! Could you please give 1-2 more examples in this format (with the results so I can check myself if I do it right)? :] For eg. 3 pairs in 6 slots I tried: `(3! / (3!3!3!)) * (6! / (2!2!2!))` but it gives 2.5 as the result.2017-02-13
  • 0
    You should instead make an answer what I could accept. Putting all of the info from your comments there with a few more details and 1-2 examples. :) Then we should delete our comments from here. I'm goin offline now, see ya tomorrow, and thanks again for your help!2017-02-13

0 Answers 0