IAE Academy

GATE 2025 CS1 GA Q.10: solution and answer

GATE 2025 · CS1GA Q.10 · 2 marks · MCQ

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. (A)

    4

  2. (B)

    20

  3. (C)

    24

  4. (D)

    48

See the question in the paper

Answer and solution

ANSWER

There are 20 ways to buy the 3 scoops, which is option (B).

Official answer: BSource: Official answer key, GATE 2025 CS1 (IIT Roorkee)

  1. Order does not matter and a flavor may be chosen more than once, so this is a selection with repetition: choose 3 scoops from 4 flavors.

  2. Let be the number of scoops of each flavor. Then .

  3. By stars and bars, the number of non-negative integer solutions of is .

  4. Here and , so the count is .

  5. .

  6. Check by cases. All three scoops of the same flavor: 4 ways. Two scoops of one flavor and one of a different flavor: ways. Three different flavors: ways. Total , which is option (B).

KEY IDEA

When order does not matter and repeats are allowed, count the non-negative integer solutions of . Stars and bars gives .

WATCH OUT FOR

Using or counts ordered purchases. Using forbids repeating a flavor. Neither fits a purchase where order is ignored and repeats are allowed.

From the GATE 2025 CS1 paper. Every question of this paper · Download the full paper · All 103 Numerical questions, with notes

More Numerical questions