Question

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?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2025 answer key

Solution

Use the combinations with repetition (stars and bars) formula (n+r−1r)\binom{n + r - 1}{r} for choosing r=3r = 3 unordered items from n=4n = 4 types.

Selecting r=3r = 3 scoops from n=4n = 4 distinct flavors where repetition is allowed and order does not matter is the number of non-negative integer solutions to x1+x2+x3+x4=3x_1 + x_2 + x_3 + x_4 = 3:

(n+r−1r)=(4+3−13)=(63)=6×5×43×2×1=20\binom{n + r - 1}{r} = \binom{4 + 3 - 1}{3} = \binom{6}{3} = \frac{6 \times 5 \times 4}{3 \times 2 \times 1} = 20
Final answer

Option (B)

Common trap

Using 43=644^3 = 64 (ordered selections) or 4×3×2=244 \times 3 \times 2 = 24 (ordered without repetition).

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
Question
10 of 65
Section
General Aptitude

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.