# Math Help - Probability of making a password and picking chips

1. ## Probability of making a password and picking chips

Hello,

I'm not too sure what the formal name for these problems is (my professor calls it the $C^{m}_{n}$ formula). I am having trouble finding answers, though, as I get different ones each time (I'm fine with permutations and combinations, though). Here the problems:

1) I have a 7 digit password made up of 3 numbers (1 - 9) and 4 letters (A - Z). How many passwords are there with...
4 "A"s?
at least 2 "A"s
three numbers next to each other
four letters next to each other
no two letters next to each other

2) A bag of chips has 10 chips in it: 1 sour cream and onion, 2 BBQ, 3 regular, and 4 low fat chips. I pick 5 chips at random. How many picks are there with...
at lest 2 BBQ chips
at least 2 BBQ chips and 1 regular chip
all 4 chips represented
at most 3 chips represented
at least 2 chips represented

Let me know if I should show my (erroneous) work or not.

2. ## Re: Probability of making a password and picking chips

Hello, m58!

2) A bag of chips has 10 chips in it: 1 sour cream and onion,
2 BBQ, 3 regular, and 4 low fat chips.
I pick 5 chips at random.
We have:. $1\,SC,\;2\,BBQ,\;3\,RG,\;4\,LF$

There are ${10\choose5} \:=\:\frac{10!}{5!\,5!} \:=\:252$ possible outcomes.

(a) How many picks are there with at least 2 BBQ chips
We want 2 BBQ and 3 Others.

There are:. ${2\choose2}{8\choose3} \:=\:1\cdot56 \:=\:56$ picks.

(b) at least 2 BBQ chips and 1 regular chip
I will assume this means: "at least 2 BBQ chips and at least 1 RG chip".

We want:.2BBQ, 1 RG, and 2 Others.

${2\choose2}{3\choose1}{7\choose2} \:=\:1\cdot3\cdot21 \:=\:63$ ways.

(c) all 4 chips represented
There are three possible cases.

1 SC, 1 BBQ, 1 RG, 2 LF:. ${1\choose1}{2\choose1}{3\choose1}{4\choose2} \:=\:1\cdot2\cdot3\cdot6 \:=\:36$

1 SC, 1 BBQ, 2 RG, 1 LF:. ${1\choose1}{2\choose1}{3\choose2}{4\choose1} \:=\:1\cdot2\cdot3\cdot4 \:=\:24$

1 SC, 2 BBQ, 1 RG, 1 LF:. ${1\choose1}{2\choose2}{3\choose1}{4\choose1} \:=\:1\cdot1\cdot3\cdot4 \:=\:12$

There are: . $36 + 24 + 12 \:=\:72$ ways.

(d) at most 3 chips represented
The opposite of "at most 3" is "more than 3" (all 4 chips).

In part (c), we found that: . $\text{All 4 chips}\:=\:72$

Therefore:. $\text{At most 3 chips} \:=\:252 - 72 \:=\:180$ ways.

(e) at least 2 chips represented
I started reasoning out the possible cases, then came the dawn!

Think about it . . .
It is impossible to get five chips of the same type.
Hence, we will always get at least 2 types of chips.

Answer:. $252\text{ ways.}$

3. ## Re: Probability of making a password and picking chips

Thank you very much, Soroban!

I realized that I mistyped the first two problems. Instead of "at least 2 BBQ chips", it should be low fat chips.
My answer for the first one was: $(C^4_2)(C^6_3) \to 120$
and for the second one: $(C^4_2)(C^3_1)(C^3_2) \to 54$

Is this right?

4. ## Re: Probability of making a password and picking chips

Your on the right track, however both your estimates are a little low because your missing the fact that the "others" can be low fat chips too. For example: In the first problem of at least 2 Lowfat chips. We could pick 2 Low fat + 2 Lowfat, 1 Regular. Your missing those extra picks.

So we need 2 LFC, 3 others + 3LFC + 2 other + 4LFC, 1 other where other = any chip thats not lowfat

So the answers should be:
$(C_2^4)(C_3^6) + (C_3^4)(C_2^6)+(C_4^4)(C_1^6) = 120 + 60 + 6 = 186$

and the 2nd question should be :
2LFC, 1 REG, 2 other + 3LFC ,1REG ,1 other + 4LFC ,1REG
$(C_2^4)(C_1^3) (C_2^3)+(C_3^4)(C_1^3) (C_1^3)+(C_4^4)(C_1^3) = 54+24+3 = 81$

For the first part of your question you need the same line of attack. But this time we won't be using Combos and Permutations because there is an infinite amount of 1-9s and an infinite amount of A-Zs we can pick. Unlike the potatoe chips, each time we choose a number, say 9, there aren't any less 9s to pick from.. we we don't lower the combinations by 1. (Which is what Combos, and Perms do).

So to get an idea the total number of password possible is:
9*9*9*26*26*26*26 = 333,135,504 quite a bit!
However, thats only 1 specific order. Assume a number is N, and letter is L
the above total is the different ways if our password is:
NNNLLLL (an example pword might be 123ABCD)

However it sounds like this password is possible:
AB12CD3

So how many ways can we rearrange NNNLLLL? For any string of letters its always:

$\frac{(total letters)!}{(letter1)!(letter2)!...(letterZ)!}$

So our case is:

$\frac{7!}{3!4!} = 35$

So I think the easiest way to do this is find out how many ways the answer comes out of NNNLLLL then multipy that by 35.

A) How many pwords have 4As.

All 4 letters must be A so:
9*9*9*1*1*1*1 = 729. this covers NNNLLLL but we need to shuffle them up so.

729*35 = 25,515.

B) How many pwords have at least 2As?
One of the dangers in this kind of problem is double counting. I'm going to show you a way that is wrong, so you get a feel for when your double counting.

This time we are going to make a 3rd type. N= number, L= any letter and A= letter A. So our password is:
NNNAALL = 9*9*9*1*1*26*26 = 492,804.

And the total ways we can rearrange that is:
$\frac{7!}{3!2!2!} = 210$

So: 492,804 * 210 = 103,488,840

This way seems correct but lets say the first password was 123AABA (one of the any letters was an A.) I'm going to subscript them so you can see more clearly, but in reality all the As look the same.
$123A_1A_2BA_3 = 123AABA$ our original password.
$A_1123A_2BA_3 = A123ABA$ one combination
$A_3123A_1BA_1 = A123ABA$ another combination.. and we've double counted.

So in reality what we need is this:
NNNAALL + NNNAAAL + NNNAAAA == where L is anything From B->Z
The first one is:
9*9*9*1*1*25*25 * 210 (combinations we found already above) = 95,681,250

Second one is:
9*9*9*1*1*1*25 * $\frac{7!}{3!3!1!}$ = 2,551,500

Third one is:
9*9*9*1*1*1*1 * $\frac{7!}{3!4!}$ = 25,515

Grand Total is: 98,258,265 (A lot less than the 103million+ up above).

C) 3 letters next to each other.

Oh we need our original combinations of NNNLLLL
9*9*9*9*26*26*26*26 = 333,135,504

Since there are exactly 3 numbers and they have to be next to each other its easy to see the only ways that can happen:
NNNLLLL
LNNNLLL
LLNNNLL
LLLNNNL
LLLLNNN
so take the 333,135,504*5 = 1,665,677,520.

Now you should be able to handle the last 2 using the same methods.

5. ## Re: Probability of making a password and picking chips

I figured the final two out. Thanks, takatok!