GATE 2025 CS (CS1) – Question 10
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?
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
- GATE 2024 CS (CS1) Q3
- GATE 2024 CS (CS2) Q2
- GATE 2024 CS (CS2) Q3
- GATE 2022 CS Q8
- GATE 2021 CS (CS1) Q8
- GATE 2023 EC Q9
All Quantitative Aptitude: Probability, Statistics and Combinatorics questions →