A showroom contains 20 cars. In how many ways can 8 cars be selected if each…

2025

A showroom contains 20 cars. In how many ways can 8 cars be selected if each car can be repeated any number of times?

Answer: D. 27C8When r items are selected from n distinct types, repetition allowed, and the order of selection does not matter, the count is a combinations-with-repetition…

  1. A.

    20C7

  2. B.

    None of these

  3. C.

    20C8

  4. D.

    27C8

Attempted by 94 students.

Show answer & explanation

Correct answer: D

When r items are selected from n distinct types, repetition allowed, and the order of selection does not matter, the count is a combinations-with-repetition (multiset) problem, not a plain combination. Such a selection corresponds one-to-one with a nonnegative-integer solution of x1 + x2 + ... + xn = r, where xi is how many times type i is chosen. By the stars-and-bars method, the number of such solutions — and hence the number of valid selections — is C(n + r - 1, r).

  1. Here n = 20 (the number of distinct cars in the showroom) and r = 8 (the number of cars to be selected), with repetition of any car allowed.

  2. Let xi be the number of times car i is selected, for i = 1, 2, ..., 20; each xi is a nonnegative integer.

  3. Since exactly 8 cars are selected in total, x1 + x2 + ... + x20 = 8.

  4. By the combinations-with-repetition formula, the number of nonnegative integer solutions — and so the number of valid selections — is C(n + r - 1, r) = C(20 + 8 - 1, 8) = C(27, 8).

Sanity-check the formula on a smaller analogous case: choosing r = 2 items with repetition from n = 2 types gives the selections {1,1}, {1,2}, {2,2} — exactly 3 ways. The formula gives C(n + r - 1, r) = C(2 + 2 - 1, 2) = C(3, 2) = 3, matching the direct count, confirming the method used above is applied correctly.

Answer: C(27, 8).

Explore the full course: Aptitude For Placement

Loading lesson…