Great combinations question — the constraint is what makes it tricky.
Key Concept: Combinations with Per-Group Constraints
When a selection problem has a "maximum from each group" restriction, you can't just do C(total, pick). You have to enumerate the valid splits and add them up.
Step 1 — Identify the valid splits
You're picking 8 candies from 2 jars of 10 each, with a max of 5 from either jar. So the only valid (Jar A, Jar B) splits are:
- (3, 5)
- (4, 4)
- (5, 3)
Note: (2, 6) and (6, 2) are invalid because they exceed the 5-candy cap.
Step 2 — Calculate combinations for each split
- Split (3, 5): C(10,3) × C(10,5) = 120 × 252 = 30,240
- Split (4, 4): C(10,4) × C(10,4) = 210 × 210 = 44,100
- Split (5, 3): C(10,5) × C(10,3) = 252 × 120 = 30,240
Step 3 — Add them up
30,240 + 44,100 + 30,240 = 104,580
Answer: C
The common trap: Most students jump straight to C(20,8) = 125,970, which ignores the maximum-per-jar restriction entirely. That number doesn't even appear in the choices, which is your signal that an unconstrained approach won't work here.
Takeaway: Whenever you see "pick from multiple groups with a per-group limit," list every valid split first, calculate each independently, then sum — never treat constrained multi-group problems as a single unrestricted pool.