Help with calculating combinations (permutations?) with multiple Objects? so I think I have hit a road block with my understanding of math and could use some guidance.
I am trying to figure out how I calculate the possible number of calculations where their are multiple objects of different ranges. I am not sure if I just don't understand combinations and permutations as well as I thought I did or if this is actually a much more complex question that I anticipated but could someone help me solve the below:
I have 3 jars, inside each jar are cards with numbers on them, in the first jar there are the numbers 1 - 9, in the second, 1 - 100 and in the third 1 - 5, I pick 1 card from each jar, what is the total number of combinations possible?
Struggling with this more than I thought I would, making me a little embarrassed, and would really appreciate the help.
 A: Consider a card from cards numbered 1-5 is picked from Jar III. Now, following are the only possible cases:

*

*A card from cards numbered 1-5 is picked from Jar I
1.1.  A card from cards numbered 1-5 gets picked from Jar II
1.2.  A card from cards numbered 6-100 gets picked from Jar II


*A card from cards numbered 6-9 is picked from Jar I
2.1. A card from cards numbered 1-5 gets picked from Jar II
2.2. A card from cards numbered 6-9 gets picked from Jar II
2.3. A card from cards numbered 10-100 gets picked from Jar II
This way, we have total $5$ cases, where each case represents a possible number of combinations of the three cards, for instance, Case $2.3$ is when a card from cards numbered $1-5, 6-9, 10-100$ is picked from Jar III, I and II respectively.
Case 1.1 We want to select $3$ cards from cards numbered $1-5$ with repetition allowed. Since the cards having same numbers from different jars are identical, we consider when all the selected three cards are alike, $5$ ways, exactly two of the three are alike, $5×4=20$ ways, none of them are alike, $^5C_3=10$ ways. This makes a total of $35$ combinations.
Case 1.2 Cards from Jar III and II can be selected in $ ^5C_2$ (when both are different)+$5$ (when both are alike)=$15$ ways. This makes a total of $15×95=1425$ possible combinations for the three cards selected from the three jars.
Case 2.1 Since the cards having same numbers from different jars are identical, the combinations for this case have already been covered in Case $1.2$ which makes this case superfluous.
Case 2.2 Cards from Jar I and II can be selected in $ ^4C_2$ (when both are different)+$4$ (when both are alike)=$10$ ways. This makes a total of $10×5=50$ possible combinations for the three cards selected from the three jars.
Case 2.3 Here, possible number of combinations is $5×4×91=1820$, since each arrangement is unique.
Thus, required number of combinations is the sum of possible number of combinations obtained in cases, $1.1, \: 1.2, \: 2.2\:$ and $\:2.3\:$, that is equal to $35+1425+50+1820=3330$.
A: This does not look like a simple problem to me.
I wish I could figure out a formula for a general case, but for this specific problem the
answer is 3300. Here is why.
Let's say that we pick $1 \leq x \leq 5$, $1 \leq y \leq 9$ and $1 \leq z \leq 100$.

*

*The total number would 5 * 9 * 100 = 4500, but we only consider unique combinations, i.e.
(2,4,7) is the same as (4,2,7), etc.


*To keep the sets unique we want only to pick $(x,y,z)$'s such that $x\leq y\leq z$
How many will we reject?


*Since $x\leq 5$ there are $\frac{5*4}{2} = 10$ pairs of $x,y$ where $x>y$. Since $z$ can
have any of 100 values the total number of such sets is 10*100 = 1000.


*Since $y \leq 9$ there are $\frac{9*8}{2} = 36$ pairs of $y,z$ where $y>z$. Having 5
different values for $x$ makes the total number of such sets 36 * 5 = 180.


*But the two of the previous sets (with sizes 1000 and 360) have non-empty intersection,
i.e. all sets where $x>y>z$. Since $x<=5$ the total number of such sets is
$\frac{5*4*3}{1*2*3} = 10$


*This means that out of 4500 combinations we have to throw out 1000 + 180 - 10 = 1170,
which leaves us with 4500 - 1170 = 3300 different sets.
