[Math] How to calculate amount of unique combinations using formula

combinations

First of all, I apologize if this question is considered "stupid", but I don't even know what term to search for in English to find an answer to my problem, I've tried googling it and searching here but to no avail.
The questions I found were sort of related, but not exactly the same problem so I found no relevant information.

My question is: If I have a certain amount of items that can create combinations with each other, but not with a copy of itself, how would i put that into a formula?

Example: I get to pick two flavors out of strawberry, chocolate or vanilla ice cream, but I do not get two scoops of the same flavor.

The answer to this is fairly simple if I'm talking about it in a conversation, but I can't for the life of me put it in a formula that I could get for example a calculator to understand. On top of that I'd like to know how to calculate this fairly easily if the numbers reach two or even three digits.

Once again, apologies if I've overlooked an available answer, no idea what to search for, if the answer is available here already (with a formula shown in said answer), feel free to refer me to that instead of writing a fresh one.

Best Answer

There is theory dedicated to the art of counting. Take a look at https://www.probabilitycourse.com for a primer. Specifically the bottom of this page lists the formulae to use in the event that you are looking at an ordered problem or not, and whether you are sampling with or without replacement.

For this question, let n be your 3 flavours and k be your two unique choices. This is a unordered problem, without replacement. $$\frac{n!}{k!(n-k)!}=3$$

edit: for clarification a factorial of n is the multiplication of every number from 1 up to and including n. $5!=1\times 2 \times 3 \times 4 \times 5$. Also, formally, 0! =1.

further explanation:

$$\binom{n}{k}=\frac{n!}{k!(n-k)!}=\binom{n}{n-k}$$ This can be seen from the symmetry of the equation in the middle.

Now to address the case $\binom{14}{2}=91=\frac{14 \times 13}{2}$ as requested in the comments. Write it out on paper, I'll abbreviate with ...s. $$\frac{14 \times 13 \times 12 \times ... \times 2 \times 1}{(2 \times 1)(12 \times 11 \times ...\times 2 \times 1)}$$ See how the $(n-k)! = 12 \times 11 \times ... 2 \times 1$? Notice that is also in the numerator, as part of the $14!$? Well that lot cancels out. leaving $\frac{14\times13}{2}$. Let's look at it algebraically. $$n!=n \times (n-1)!=n \times (n-1) \times (n-2)!=.....=n \times (n-1) \times (n-2) \times ... \times 2 \times 1$$

Now let's apply this to your query by cancelling out the (n-k)!: $$\binom{n}{k}=\frac{n\times(n-1)\times (n-k+1)}{k!}$$ Well you have sated n=14 and k=2, so your (n-k+1) value will equal (14-2+1)=13. So you will multiply every number from 13 until your n value, which here is 14. $$\binom{14}{2}=\frac{14 \times (14-1)}{2!}$$

Related Question