Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

B A simple (?) combinatorics question...

  1. Aug 28, 2016 #1
    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. jcsd
  3. Aug 28, 2016 #2

    mfb

    User Avatar
    2016 Award

    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).
     
  4. Aug 28, 2016 #3
    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?
     
  5. Aug 28, 2016 #4

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    How did you get that?
    That is not right.
    Correct.
    That works.
     
  6. Aug 28, 2016 #5
    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?
     
  7. Aug 28, 2016 #6

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    How did you get 5/14?

    You pick 4 out of [edit] 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
  8. Aug 28, 2016 #7
    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.
     
  9. Aug 28, 2016 #8

    mfb

    User Avatar
    2016 Award

    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.
     
  10. Aug 28, 2016 #9
    Gotcha. I'll have a sit down and think of it. Thanks for your help
     
  11. Aug 28, 2016 #10
    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.
     
  12. Aug 28, 2016 #11

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  13. Aug 28, 2016 #12
    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?
     
  14. Aug 28, 2016 #13

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    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.)
     
  15. Aug 29, 2016 #14

    mfb

    User Avatar
    2016 Award

    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).
     
  16. Aug 29, 2016 #15
    But it's combinations so order wouldn't matter?!

    (sa) would be the same as (as)

    Am I missing something?
     
  17. Aug 29, 2016 #16

    mfb

    User Avatar
    2016 Award

    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.
     
  18. Aug 29, 2016 #17
    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)?
     
  19. Aug 29, 2016 #18

    mfb

    User Avatar
    2016 Award

    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?
     
  20. Aug 29, 2016 #19
    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?
     
  21. Aug 29, 2016 #20

    mfb

    User Avatar
    2016 Award

    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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: A simple (?) combinatorics question...
  1. Simple combinatorics q (Replies: 5)

  2. Combinatorics question (Replies: 1)

Loading...