0

I want to find out the combination for question below:

If I have numbers 1 1 2 3 4, I have three slot for each number, I want to find out the combinations. Below are the possible combinations

(1 1 2), (1 1 3), (1 1 4), (1 2 3), (1 2 4), (1 3 4), (2 3 4)

What is a mathematical way of computing such questions?

  • Sorting into cases with and without duplicate numbers will make it easier. –  Oct 06 '20 at 04:30

2 Answers2

2

So you basically don't care about the order of the numbers and also the two $1$s are not distinguishable.

The easier way: split the problem into three non-overlapping cases where you can have zero, one or two $1$s.

Mathematically: $$ {3 \choose 3}+{3 \choose 2}+{3 \choose 1}=7 $$ When you have zero $1$s, you pick 3 numbers from set $\{2,3,4\}$. When you have one $1$ then two numbers are picked from set $\{2,3,4\}$ and finally, when you have two $1$s , only one number from set $\{2,3,4\}$.

There are other ways to solve this problem too including using generating functions, etc.

1

Alternate approach:

First, you have to recognize, that if you were selecting 3 numbers from the group {1,2,3,4,5}, the number of ways would be

$$\frac{n!}{k! (n-k)!} ~: ~n = 5, k = 3.$$

This is normally symbolized by $$\binom{n}{k}$$

In this instance, you have the complication that the first two elements are identical, so $\binom{5}{3}$ is not the final answer.

To get the final answer, you have to recognize that of all the ways there are of selecting one # from the two $1$'s, and two #'s from the other three, exactly 1/2 of them must be deducted from $\binom{5}{3}$.

This is because (for example) otherwise you would end up counting twice the combination (1,3,4) -- (1,3,4). One of these selections would represent when the first $1$ was selected, and the other would represent when the second $1$ was selected.

The total number of ways of having one # from the $1$'s and two #'s from the other 3 is

$$\binom{2}{1} \times \binom{3}{2}$$

Thus the final answer is $$\binom{5}{3} - \left[\frac{1}{2} \times \binom{2}{1} \times \binom{3}{2}\right]$$

user2661923
  • 35,619
  • 3
  • 17
  • 39