# B A simple (?) combinatorics question...

1. Aug 28, 2016

### t_n_p

Hi all,

Say you have 4 apples, 3 strawberries and 6 carrots...

a) If 4 items are to be selected, how many combinations are there?
b) How many combinations will have no carrots?
c) How many combinations will have at least 1 apple?
d) Create the probability distribution table for strawberries.

Now this isn't a simple basic combinatorics formula type question from what I've gathered. I actually did it manually...

a) there are 14 combinations: {a,a,a,a} {a,a,a,s} {a,a,a,c} {a,a,s,s} {a,a,s,c} {a,a,c,c} {a,s,s,s} {a,s,s,c} {a,s,c,c} {a,c,c,c} {s,s,s,c} {s,s,c,c} {s,c,c,c} {c,c,c,c}

b) Again by hand, 13 combinations: {s} {a} {ss} {aa} {sa} {sss} {aaa} {ssa} {saa} {aaaa} {aaaas} {aaaass} {aaaasss}

c) Total number of combinations is 4*3*6=72. To find the ones with at least 1 apple I was thinking of doing total number of combinations and subtracting the combinations with no apples. Combinations with no apples are: {s} {c} {ss} {cc} {cs} {sss} {ccc} {ccs} {css} {cccc} {cccs} {ccss} {csss} {ccccs} {ccccc} {ccccss} {cccccc} {cccccs} {cccsss} {ccccsss} {ccccccc} {ccccccs} {cccccss} {ccccccss} {cccccsss} {ccccccsss}

Therefore 72 – 26 = 46

d) Have not attempted yet, but wondering if there is a better way to do this? My only thoughts are to do it manually but it appears this will take a very long time.

Am I missing something here? It all seems very convoluted. Feedback appreciated.

2. Aug 28, 2016

### Staff: Mentor

I would expect that (b) and (c) also refer to sets of 4 items. This also fits to (d) where you need a number of items to create such a table.

Assuming (b) doesn't fix the number of items, there is a more direct way to get that number (and it is larger than 13, as an example you forgot {ssaa} and {}), you used this idea in (c).

You can have 0, 1, 2 or 3 strawberries, that gives 4 not 3 different options. Same for apples and carrots.

There is a direct way for (d).

3. Aug 28, 2016

### t_n_p

Ah, if it's selecting 4 then b and c will just be subsets of part a.

Answer to b would be 4 and c would be 10. For d that makes the distribution very basic, pr(s=0)= 5/14, pr(s=1)=4/14, etc.

Is the more direct way for b (assuming not restricted by 4 selections) given by (number of apples +1)*(number of strawberries+ 1)? Similar technique for c, find the total combo with no apples by (number of carrots+1)*(number of strawberries+ 1) and then total number of combos minus that?

4. Aug 28, 2016

### Staff: Mentor

How did you get that?
That is not right.
Correct.
That works.

5. Aug 28, 2016

### t_n_p

From part a I've established there are 14 combinations of picking the 4 items: {a,a,a,a} {a,a,a,s} {a,a,a,c} {a,a,s,s} {a,a,s,c} {a,a,c,c} {a,s,s,s} {a,s,s,c} {a,s,c,c} {a,c,c,c} {s,s,s,c} {s,s,c,c} {s,c,c,c} {c,c,c,c}

Assuming parts b and c are still talking about selecting 4 items, 4 of the above 14 combinations contain no carrots. Similarly, for c, 10 of the 14 contain at least 1 apple.

How come the probability distribution isn't correct? I'm stumped, as to me this seems quite straightforward?

6. Aug 28, 2016

### Staff: Mentor

How did you get 5/14?

You pick 4 out of  13 items, where 3 of those 13 are strawberries. What is the probability to have no strawberry for all 4 picks? You can derive that step by step, for example.

Last edited: Aug 28, 2016
7. Aug 28, 2016

### t_n_p

Hang on a second..

There are a total of 13 items, of which we are to pick 4. We have established there are 14 ways we can do this.

From the sample space of 14 I'm identifying those with 0, 1, 2 and 3 strawberries.

I count 5 of the 14 combinations have 0 strawberries.

I count 4/14 with 1 strawberry.

I count 3/14 with 2 strawberries

I count 2/14 with 3 strawberries.

I'm struggling to understand how it could be any more complicated? Thank you for providing feedback and stimulating conversation by the way.

8. Aug 28, 2016

### Staff: Mentor

If you pick random items, those 14 combinations do not have the same probability. "Apple, strawberry, carrot, carrot" is much more likely than "apple, apple, apple, apple", for example.

9. Aug 28, 2016

### t_n_p

Gotcha. I'll have a sit down and think of it. Thanks for your help

10. Aug 28, 2016

### t_n_p

OK, thought it over, think I've got it.

For each of the 14 possible combinations I will establish the number of ways that combination can be achieved.

For example (cssa) can be achieved 6*3*2*4 ways, (cccc) can be achieved 6*5*4*3 ways, (sssa) can be achieved 3*2*1*4 ways etc.

Do this for all 14 combinations and the sum gives the total number of ways any of the v possible combinations can occur.

Then I can determine probability of 0 strawberries by (number of ways of obtaining a combination with 0 strawberries)/(number of total ways of obtaining the 14 combinations). And repeat for 1,2 and 3 strawberries.

11. Aug 28, 2016

### WWGD

For a) , consider a function from the collection of all fruits into a collection of 4 boxes. How many such functions are there? How can you interpret any such function in a way that relates to your problem.

12. Aug 28, 2016

### t_n_p

Not sure what you mean by function. I've gone through it manually. In terms of a systematic way, I could do a four branched tree diagram and they eliminate the duplicates but this is tedious and time consuming. Are you suggesting there is an alternate systematic way to do post a or are you saying my answer to a is wrong?

13. Aug 28, 2016

### WWGD

Sorry. I have not seen your question and proposed answers in detail yet, will do so now. I was suggesting for a) , that you consider an assignment of the 13 fruits to a collection of 4 boxes, each box containing one fruit, as a way of finding a systematic way of addressing the problem. This can be seen as a function from the collection of fruits into boxes. The function assigns any one fruit to box 1, another fruit to box 2, and so on. Each such assignment is a function from the collection of all fruits to the collection of the 4 boxes. Then any such function represents an assignment of fruits to the boxes, and every assignment of the fruits to the boxes can be described as one such function (assuming there is no replacement.)

14. Aug 29, 2016

### Staff: Mentor

There are more ways than that. As an easier example, for (sa) you can first pick s (3 options) and then pick a (4 options), OR first pick a (4 options) and then pick s (3 options), for a total of 2*3*4=24 options, while your calculation would only consider 12.

You can do this for all 14 combinations, but that is way more complicated than necessary because you don't care about carrots vs. applies in (d).

15. Aug 29, 2016

### t_n_p

But it's combinations so order wouldn't matter?!

(sa) would be the same as (as)

Am I missing something?

16. Aug 29, 2016

### Staff: Mentor

Correct, but there are two ways to collect that set, and you have to take into account both because you do not care about the order in the final result.

17. Aug 29, 2016

### t_n_p

I get where you're coming from. Extremely convoluted for a high school question!

So easy said and done with (as) and (sa), how will one shortcut to find number of ways of getting for example (sssa)?

18. Aug 29, 2016

### Staff: Mentor

As I said before, you don't really care about the difference between apples and carrots for (d). And you don't have to care about order.

There are 3 strawberries and 10 other fruits. How many different sets of 4 can you make that contain no strawberry, which means you have to choose 4 out of the 10 others?

19. Aug 29, 2016

### t_n_p

OK.

For zero strawberry cases we have the combinations {a,a,a,a} {a,a,a,c} {a,a,c,c}{a,c,c,c} {c,c,c,c}. The number of ways of obtaining each of these combinations is 10*9*8*7. Thus the total number of ways to obtain any combination with zero strawberries is 5*10*9*8*7.

For 1 strawberry, the number of ways of finding any one particular combination with 1 strawberry will be given by 3*10*9*8.

For 2....3*2*10*9

For 3....3*2*1*10

Then sum and find probability.

On the right track here?

20. Aug 29, 2016

### Staff: Mentor

No it is not. That would be the total number of ordered sets.

How many options are there to choose 4 out of 10 items?
How many options are there to choose 4 out of 13 items?

21. Aug 29, 2016

### t_n_p

10C4 and 13C4 respectively?

So pr of 0 strawberries = (3C0 * 10C4) / (13C4)

Etc

I now see this as one of those type of questions that are like "A team of 6, comprised of 4 boys and 2 girls is to be selected. If there are 7 boys and 3 girls, how many combinations can be chosen? Now what if the team of 6 is to have 3 boys and 3 girls selected from the 7 and 3 respectively? Etc etc"

I had never really made the connection as I was fixated in there being 3 possible choices. However the key point that you highlighted before was that it's irrelevant whether they are carrots or apples, the important thing is that they are not strawberries!

Last edited: Aug 29, 2016
22. Aug 30, 2016

### Staff: Mentor

Correct.

23. Aug 30, 2016

### t_n_p

Thanks for your help, much appreciated.

All fairly straightforward in the end, just took me ages to make the connection!