What is the formula for calculating combinations that have different permutations?

55 Views Asked by At

Hopefully the title of this question isn't the incorrect way to phrase the problem I'm having. If so let me know and I'll update it.

I have three items (A, B and C) and each item has three unique values (1, 2 and 3) they can hold.

How can I calculate all the various combinations? Where A, B, C might not always appear together at once.

Below is a list of 36 combinations (hopefully I've not missed any)...

A=1
A=2
A=3
B=1
B=2
B=3
C=1
C=2
C=3
A=1, B=1
A=1, B=2
A=1, B=3
A=2, B=1
A=2, B=2
A=2, B=3
A=1, C=1
A=1, C=2
A=1, C=3
A=2, C=1
A=2, C=2
A=2, C=3
B=1, C=1
B=1, C=2
B=1, C=3
B=2, C=1
B=2, C=2
B=2, C=3
A=1, B=1, C=1
A=2, B=2, C=2
A=3, B=3, C=3
A=2, B=1, C=1
A=3, B=1, C=1
A=1, B=2, C=1
A=1, B=3, C=1
A=1, B=1, C=2
A=1, B=1, C=3

UPDATE/ADDITIONAL QUESTION

What would the formula look like if there were a larger number of values assigned to A, B and C. For A might hold numbers from 1-4, where as B might hold numbers 1-10, and C might hold numbers 1-2.

2

There are 2 best solutions below

0
On

You have $x$ variables and want to assign $y$ values to them with $x,y \in \mathbb{N}$, so that is $y^x$ possibilities.

If you want to assign the values $\{0,1,2,3\}$ , with $"0"$ being no value, to the set $\{A,B,C\}$, you have $4^3$ ways of doing so.

0
On

If what you mean is that you want to take a subset of your items together with each choice of unique values of the appearing elements in the subset, the the answer should be $4^3$. However, this does not seem match very much with your manual draw.

More generally, if there are $n$ items where each item is associated with a unique value from $\{1,2,\dots,k\}$, then the number of items that you'd like to count would be $(k+1)^n$.

The enumeration of each object would naturally associate with a string of length $n$ whose values of each digit is taken from $\{0,1,\dots,k\}$ where each digit corresponds to an item and the value of the digit corresponds to the unique value of the item. However, if the digit takes a zero value, then interpret it as not appearing in the subset.