Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The full question text is below with answers and my reasoning for them. Could someone please explain the reasoning behind part (c).

A coffee shop sells 5 types of coffee (latte, mocha, espresso, cappuccino and iced coffee). All coffee of the same type is indistinguishable. We are buying 10 coffees in total.

How many ways are there to buy 10 coffees if:

(a) there are no restrictions

C(10+5-1, 10) The reasoning is that given no restrictions, this is a combination with repetition.

(b) you buy at least 2 iced coffees.

C(8+5-1, 8) The reasoning is that since 2 coffees are decided, its a combination with repetition for the remaining 8.

(c) you can buy at most 2 mochas.

C(13,3) + C(12,3) + C(11,3) Here is where I have no idea how they got these numbers.

Any help is greatly appreciated.

share|cite|improve this question
If you can buy at most 2 mochas, you can either buy no mochas, 1 mocha or 2 mochas. – Jeroen Dec 13 '12 at 22:39
up vote 2 down vote accepted

If you buy no mochas, it’s just like part (a), except that there are only four varieties, so the number of possibilities is $$\binom{10+4-1}{4-1}=\binom{13}3\;.$$ If you buy exactly one mocha, you’re making an unrestricted choice of the other nine from four varieties; you can do this in $$\binom{9+4-1}{4-1}=\binom{12}3$$ ways. Finally, if you buy exactly two mochas, you’re making an unrestricted choice of the other eight from four varieties; you can do this in $$\binom{8+4-1}{4-1}=\binom{11}3$$ ways.

share|cite|improve this answer
edit cus i was being stupid. thank you. – superdemongob Dec 13 '12 at 22:47
@superdemongob: Happens to all of us. You’re welcome! – Brian M. Scott Dec 13 '12 at 22:50
yea, i caught what i was missing a few seconds after i posted the comment asking about it... that was rather silly. – superdemongob Dec 13 '12 at 22:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.