The GATE Grind

GATE 2025 CS (CS1) – Question 10

General Aptitude · Quantitative Aptitude: Probability, Statistics and Combinatorics · 2 marks · Multiple choice

A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential. If one wants to purchase 3 scoops of ice-cream, in how many ways can one make that purchase?

  1. 4
  2. 20
  3. 24
  4. 48

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) 20

Explanation

Represent a purchase by nonnegative integers a,b,c,d, the scoop counts of the four flavors. The constraint is a+b+c+d=3; zero scoops of a flavor is allowed and purchase order is irrelevant.

Stars and bars places three scoop symbols among three separators:
$$\binom{3+4-1}{4-1}=\binom63=20.$$
Alternatively count by type: all three the same gives 4; two of one flavor and one of another gives 4×3=12; three different flavors gives 4. Total 4+12+4=20, **B**.

More Quantitative Aptitude: Probability, Statistics and Combinatorics questions

All Quantitative Aptitude: Probability, Statistics and Combinatorics questions →